@abtasty/modal
Advanced tools
Comparing version 2.5.5-10 to 2.5.5-11
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.widgetForm=t()}(this,function(){"use strict";var e={backgroundGroup:{propName:"backgroundGroup",category:"style",type:"group",label:{en:"Background",fr:"Fond"},collapsible:!0,children:[{propName:"backgroundColor",type:"colorpicker",category:"style",label:{en:"Background color",fr:"Couleur d'arrière-plan"},value:"rgba(255, 255, 255, 1)",conditions:[{field:"layout",value:function(e){return"no-title"!==e&&"imageOnly"!==e}}]},{category:"style",type:"short-separator",propName:"backgroundImage-style-separator",conditions:[{field:"layout",value:function(e){return"no-title"!==e&&"imageOnly"!==e}}]},{propName:"backgroundImage",type:"mediaupload",category:"style",label:{en:"Background image",fr:"Image d'arrière-plan"},conditions:[{field:"layout",value:function(e){return"no-title"!==e&&"imageOnly"!==e}}]},{category:"style",type:"short-separator",propName:"overlay-style-separator",conditions:[{field:"layout",value:function(e){return"no-title"!==e&&"imageOnly"!==e}}]},{propName:"overlayOpacity",type:"slider",category:"style",label:{en:"Overlay opacity",fr:"Opacité de l'overlay"},value:"50",unit:"%"}]},borderGroup:{propName:"borderGroup",category:"style",type:"group",label:{en:"Border",fr:"Bordure"},collapsible:!0,children:[{propName:"borderWidth",category:"style",type:"slider",unit:"px",value:0,min:0,max:10,label:{en:"Border Thickness",fr:"Largeur de la bordure"}},{category:"style",type:"short-separator",propName:"borderRadius-style-separator"},{propName:"borderRadius",category:"style",type:"slider",unit:"px",value:10,min:0,max:20,label:{en:"Border radius",fr:"Angle de la bordure"}},{category:"style",type:"short-separator",propName:"borderRadiusImage-separator",conditions:[{field:"layout",value:function(e){return"imageOnly"!==e}}]},{propName:"borderRadiusImage",category:"style",type:"slider",unit:"px",value:10,min:0,max:20,label:{en:"Image Border radius",fr:"Angle de la bordure de l'image"},conditions:[{field:"layout",value:function(e){return"imageOnly"!==e}}]},{category:"style",type:"short-separator",propName:"borderColor-style-separator"},{propName:"borderColor",category:"style",type:"colorpicker",label:{en:"Border color",fr:"Couleur de la bordure"},value:"rgba(0, 0, 0, 1)"}]},closeButtonGroup:{propName:"closeButtonGroup",category:"style",type:"group",label:{en:"Close button",fr:"Bouton de fermeture"},collapsible:!0,children:[{propName:"closeButtonPosition",category:"style",type:"radio",label:{en:"Close button position",fr:"Position du bouton de fermeture"},value:"inside",options:[{label:{en:"Inside",fr:"À l'intérieur"},value:"inside"},{label:{en:"Outside",fr:"À l'extérieur"},value:"outside"}]},{category:"style",type:"short-separator",propName:"closeButtonColor-style-separator"},{propName:"closeButtonColor",type:"colorpicker",category:"style",label:{en:"Close button color",fr:"Couleur du bouton de fermeture"},value:"rgba(92, 92, 92, 1)"},{category:"style",type:"short-separator",propName:"closeBackgroundButtonColor-style-separator",conditions:[{field:"closeButtonPosition",value:"outside"}]},{propName:"backgroundCloseButtonColor",type:"colorpicker",category:"style",label:{en:"Background close button color",fr:"Couleur du fond du bouton de fermeture"},value:"rgba(255, 255, 255, 1)",conditions:[{field:"closeButtonPosition",value:"outside"}]}]},dimensions:[{propName:"widthImageWithText",type:"radio",category:"style",label:{en:"Width",fr:"Largeur"},value:"medium",options:[{label:{en:"Small",fr:"Petite"},value:"small"},{label:{en:"Medium",fr:"Moyenne"},value:"medium"},{label:"Large",value:"large"},{label:{en:"Custom",fr:"Sur mesure"},value:"custom"}],conditions:[{field:"type",value:function(e){return"video"!==e}},{field:"layout",value:function(e){return"imageOnly"!==e}}]},{propName:"widthImageOnly",type:"radio",category:"style",label:{en:"Width",fr:"Largeur"},value:"fit",options:[{label:{en:"Fit to size",fr:"S'adapte à la taille"},value:"fit"},{label:{en:"Small",fr:"Petite"},value:"small"},{label:{en:"Medium",fr:"Moyenne"},value:"medium"},{label:"Large",value:"large"}],conditions:[{field:"type",value:function(e){return"video"!==e}},{field:"layout",value:function(e){return"imageOnly"===e}}]},{propName:"customWidth",type:"number",category:"style",label:{en:"Custom width (%)",fr:"Largeur sur mesure (%)"},value:50,conditions:[{field:"widthImageWithText",value:"custom"}]}],animations:[{category:"style",type:"separator",propName:"animation-separator"},{propName:"animation",type:"radio",category:"style",label:"Animation",value:"none",options:[{label:{en:"None",fr:"Aucune"},value:"none"},{label:"slide In",value:"slideIn"},{label:"Fade In",value:"fadeIn"}]}]},t=[{propName:"recurrence",type:"select",category:"conditions",label:{en:"Recurrence",fr:"Récurrence"},value:"-1",options:[{label:{en:"Every time",fr:"Chaque page"},value:"-1"},{label:{en:"Every session",fr:"Chaque session"},value:"0"},{label:{en:"Everyday",fr:"Chaque jour"},value:"1"},{label:{en:"Every week",fr:"Chaque semaine"},value:"7"},{label:{en:"Every month",fr:"Chaque mois"},value:"30"},{label:{en:"Once per user (no recurrence)",fr:"Une fois par visiteur (pas de récurrence)"},value:"365"}]},{category:"conditions",type:"separator",propName:"triggerEvent-separator"},{propName:"triggerEvent",type:"select",category:"conditions",label:{en:"Triggers on",fr:"Se déclenche au"},value:"pageLoad",options:[{label:{en:"Page load",fr:"Chargement de la page"},value:"pageLoad"},{label:{en:"Click",fr:"Clic"},value:"click"},{label:{en:"Exit intent",fr:"Avant fermeture de l'onglet"},value:"exitIntent"},{label:{en:"Delay",fr:"Délai"},value:"timer"},{label:{en:"Reengage (after inactivity)",fr:"Réengagement (après inactivité)"},value:"reengage"}]},{propName:"clickEventSelector",type:"selectelement",category:"conditions",label:{en:"DOM element to listen to",fr:"Élément du DOM à écouter"},placeholder:{en:"Please select an element in the webpage",fr:"Veuillez sélectionner un élément dans la page"},conditions:[{field:"triggerEvent",value:"click"}]},{propName:"exitEventDelay",type:"number",category:"conditions",label:{en:"Delay after leaving",fr:"Délai avant affichage (après sortie de page)"},min:0,max:120,value:0,conditions:[{field:"triggerEvent",value:"exitIntent"}]},{propName:"reengageEventDelay",type:"number",category:"conditions",label:{en:"Delay before reengagement",fr:"Délai d'inactivité avant affichage"},min:1,max:120,value:10,conditions:[{field:"triggerEvent",value:"reengage"}]},{propName:"triggerEventDelay",type:"number",category:"conditions",label:{en:"Trigger event delay (in seconds)",fr:"Délai avant l'affichage (en secondes)"},value:10,conditions:[{field:"triggerEvent",value:"timer"}]}],a={title:{propName:"title",type:"wysiwyg",category:"content",label:{en:"Title",fr:"Titre"},placeholder:{en:"Some title",fr:"Mon titre"},value:{en:"Title",fr:"Titre"},conditions:[{field:"layout",value:function(e){return"no-title"!==e&&"imageOnly"!==e}}]},buttonSettings:[{category:"content",type:"separator",propName:"button-separator"},{propName:"button",category:"content",type:"switch",value:!1,label:{en:"Add a button",fr:"Ajouter un bouton"}},{propName:"buttonText",type:"text",category:"content",label:{en:"Button text",fr:"Texte du bouton"},value:{en:"Accept",fr:"Valider"},placeholder:{en:"Submit",fr:"Valider"},conditions:[{field:"button"}]},{propName:"buttonLink",type:"text",category:"content",label:{en:"Button link",fr:"Lien du bouton"},value:"https://www.google.com",conditions:[{field:"button"}]},{propName:"buttonTextColor",category:"content",type:"colorpicker",label:{en:"Button text color",fr:"Couleur du texte du bouton"},value:"rgba(255, 255, 255, 1)",conditions:[{field:"button"}]},{propName:"buttonBackgroundColor",category:"content",type:"colorpicker",label:{en:"Button background color",fr:"Couleur de fond du bouton"},value:"rgba(86, 159, 242, 1)",conditions:[{field:"button"}]}]};function o(e){if(Array.isArray(e)){for(var t=0,a=Array(e.length);t<e.length;t++)a[t]=e[t];return a}return Array.from(e)}var r=[{propName:"type",value:"image",type:"hidden",category:"layout"},{propName:"layout",category:"layout",value:"imageOnly",type:"radioImage",options:[{label:{en:"Image only",fr:"Image seule"},value:"imageOnly",src:"https://gitlab.com/abtasty/public/storage/raw/master/widget-form-popin-image-layouts/image-only.png"},{label:{en:"Left",fr:"Gauche"},value:"left",src:"https://gitlab.com/abtasty/public/storage/raw/master/widget-form-popin-image-layouts/left.png"},{label:{en:"Right",fr:"Droite"},value:"right",src:"https://gitlab.com/abtasty/public/storage/raw/master/widget-form-popin-image-layouts/right.png"},{label:{en:"Top",fr:"Haut"},value:"top",src:"https://gitlab.com/abtasty/public/storage/raw/master/widget-form-popin-image-layouts/top.png"},{label:{en:"Bottom",fr:"Bas"},value:"bottom",src:"https://gitlab.com/abtasty/public/storage/raw/master/widget-form-popin-image-layouts/bottom.png"}]},{propName:"image",type:"mediaupload",category:"content",label:"Image"},{category:"content",type:"separator",propName:"title-separator",conditions:[{field:"layout",value:function(e){return"no-title"!==e&&"imageOnly"!==e}}]},a.title,{category:"content",type:"separator",propName:"wysiwyg-content-separator",conditions:[{field:"layout",value:function(e){return"imageOnly"!==e}}]},{propName:"content",type:"wysiwyg",category:"content",label:{en:"Content",fr:"Contenu"},value:"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",conditions:[{field:"layout",value:function(e){return"imageOnly"!==e}}]}].concat(o(a.buttonSettings),o(e.dimensions),[{type:"separator",category:"style"},e.backgroundGroup,{type:"separator",category:"style"},e.borderGroup,{type:"separator",category:"style"},e.closeButtonGroup],o(e.animations),o(t));function l(e){if(Array.isArray(e)){for(var t=0,a=Array(e.length);t<e.length;t++)a[t]=e[t];return a}return Array.from(e)}var n=[{propName:"type",value:"simple",type:"hidden",category:"layout"},{propName:"layout",category:"layout",value:"center",type:"radioImage",options:[{label:{en:"Center",fr:"Centre"},value:"center",src:"https://gitlab.com/abtasty/public/storage/raw/master/widget-form-popin-simple-layouts/center.png"},{label:{en:"Left",fr:"Gauche"},value:"left",src:"https://gitlab.com/abtasty/public/storage/raw/master/widget-form-popin-simple-layouts/left.png"},{label:{en:"Right",fr:"Droite"},value:"right",src:"https://gitlab.com/abtasty/public/storage/raw/master/widget-form-popin-simple-layouts/right.png"}]},a.title,{category:"content",type:"separator",propName:"title-content-separator"},{propName:"content",type:"wysiwyg",category:"content",label:{en:"Content",fr:"Contenu"},value:"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."}].concat(l(a.buttonSettings),l(e.dimensions),[{type:"separator",category:"style"},e.backgroundGroup,{type:"separator",category:"style"},e.borderGroup,{type:"separator",category:"style"},e.closeButtonGroup],l(e.animations),l(t));function i(e){if(Array.isArray(e)){for(var t=0,a=Array(e.length);t<e.length;t++)a[t]=e[t];return a}return Array.from(e)}var u=[{propName:"type",value:"video",type:"hidden",category:"layout"},{propName:"layout",category:"layout",value:"no-title",type:"radioImage",options:[{label:{en:"No title",fr:"Sans titre"},value:"no-title",src:"https://dp8v87cz8a7qa.cloudfront.net/36548/5a26b83ea311a1512486974.png"},{label:{en:"Top",fr:"Haut"},value:"top",src:"https://gitlab.com/abtasty/public/storage/raw/master/widget-form-popin-video-layouts/bottom.png"},{label:{en:"Bottom",fr:"Bas"},value:"bottom",src:"https://gitlab.com/abtasty/public/storage/raw/master/widget-form-popin-video-layouts/top.png"}]},a.title,{propName:"videoLink",type:"text",category:"content",label:{en:"URL (Youtube or Vimeo)",fr:"URL (Youtube ou Vimeo)"},value:"https://www.youtube.com/watch?v=XyGGixAg3bE"}].concat(i(a.buttonSettings),i(e.dimensions),[{type:"separator",category:"style",conditions:[{field:"type",value:function(e){return"video"!==e}},{field:"layout",value:function(e){return"imageOnly"!==e}}]},e.backgroundGroup,{type:"separator",category:"style"},e.borderGroup,{type:"separator",category:"style"},e.closeButtonGroup],i(e.animations),i(t),[{category:"content",type:"separator",propName:"autoPlay-separator"},{propName:"autoPlay",category:"conditions",type:"switch",value:!1,label:{en:"Auto play (Youtube only)",fr:"Lecture automatique (Youtube uniquement)"}}]);function p(e){if(Array.isArray(e)){for(var t=0,a=Array(e.length);t<e.length;t++)a[t]=e[t];return a}return Array.from(e)}var s=[{propName:"type",value:"scratch",type:"hidden",category:"layout"},{propName:"layout",category:"layout",value:"imageOnly",type:"radioImage",options:[{label:{en:"Image only",fr:"Image seule"},value:"imageOnly",src:"https://gitlab.com/abtasty/public/storage/raw/master/widget-form-popin-image-layouts/image-only.png"},{label:{en:"Left",fr:"Gauche"},value:"left",src:"https://gitlab.com/abtasty/public/storage/raw/master/widget-form-popin-image-layouts/left.png"},{label:{en:"Right",fr:"Droite"},value:"right",src:"https://gitlab.com/abtasty/public/storage/raw/master/widget-form-popin-image-layouts/right.png"},{label:{en:"Top",fr:"Haut"},value:"top",src:"https://gitlab.com/abtasty/public/storage/raw/master/widget-form-popin-image-layouts/top.png"},{label:{en:"Bottom",fr:"Bas"},value:"bottom",src:"https://gitlab.com/abtasty/public/storage/raw/master/widget-form-popin-image-layouts/bottom.png"}]},{propName:"scratchBackgroundImage",type:"mediaupload",category:"content",label:{en:"Background Image",fr:"Image de fond"}},{propName:"scratchImage",type:"mediaupload",category:"content",label:{en:"Scratch Image",fr:"Image à gratter"}},{category:"content",type:"separator",propName:"title-separator",conditions:[{field:"layout",value:function(e){return"no-title"!==e&&"imageOnly"!==e}}]},a.title,{category:"content",type:"separator",propName:"wysiwyg-content-separator",conditions:[{field:"layout",value:function(e){return"imageOnly"!==e}}]},{propName:"content",type:"wysiwyg",category:"content",label:{en:"Content",fr:"Contenu"},value:"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",conditions:[{field:"layout",value:function(e){return"imageOnly"!==e}}]}].concat(p(a.buttonSettings),p(e.dimensions),[{type:"separator",category:"style"},e.backgroundGroup,{type:"separator",category:"style"},e.borderGroup,{type:"separator",category:"style"},e.closeButtonGroup],p(e.animations),p(t)),c=void 0,y=document.getElementById("abtasty-widget-react-form__widget");if(y){var g=y.getAttribute("data-plugin-id");c=9===Number(g)?n:64===Number(g)?u:82===Number(g)?s:r}else c=r;return c}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.widgetForm=t()}(this,function(){"use strict";function e(e){if(Array.isArray(e)){for(var t=0,a=Array(e.length);t<e.length;t++)a[t]=e[t];return a}return Array.from(e)}function t(e){if(Array.isArray(e)){for(var t=0,a=Array(e.length);t<e.length;t++)a[t]=e[t];return a}return Array.from(e)}function a(e){if(Array.isArray(e)){for(var t=0,a=Array(e.length);t<e.length;t++)a[t]=e[t];return a}return Array.from(e)}var o={propName:"backgroundGroup",category:"style",type:"group",label:{en:"Background",fr:"Fond"},collapsible:!0,children:[{propName:"backgroundColor",type:"colorpicker",category:"style",label:{en:"Background color",fr:"Couleur d'arrière-plan"},value:"rgba(255, 255, 255, 1)",conditions:[{field:"layout",value:function(e){return"no-title"!==e&&"imageOnly"!==e}}]},{category:"style",type:"short-separator",propName:"backgroundImage-style-separator",conditions:[{field:"layout",value:function(e){return"no-title"!==e&&"imageOnly"!==e}}]},{propName:"backgroundImage",type:"mediaupload",category:"style",label:{en:"Background image",fr:"Image d'arrière-plan"},conditions:[{field:"layout",value:function(e){return"no-title"!==e&&"imageOnly"!==e}}]},{category:"style",type:"short-separator",propName:"overlay-style-separator",conditions:[{field:"layout",value:function(e){return"no-title"!==e&&"imageOnly"!==e}}]},{propName:"overlayOpacity",type:"slider",category:"style",label:{en:"Overlay opacity",fr:"Opacité de l'overlay"},value:"50",unit:"%"}]},r={propName:"borderGroup",category:"style",type:"group",label:{en:"Border",fr:"Bordure"},collapsible:!0,children:[{propName:"borderWidth",category:"style",type:"slider",unit:"px",value:0,min:0,max:10,label:{en:"Border Thickness",fr:"Largeur de la bordure"}},{category:"style",type:"short-separator",propName:"borderRadius-style-separator"},{propName:"borderRadius",category:"style",type:"slider",unit:"px",value:10,min:0,max:20,label:{en:"Border radius",fr:"Angle de la bordure"}},{category:"style",type:"short-separator",propName:"borderRadiusImage-separator",conditions:[{field:"layout",value:function(e){return"imageOnly"!==e}}]},{propName:"borderRadiusImage",category:"style",type:"slider",unit:"px",value:10,min:0,max:20,label:{en:"Image Border radius",fr:"Angle de la bordure de l'image"},conditions:[{field:"layout",value:function(e){return"imageOnly"!==e}}]},{category:"style",type:"short-separator",propName:"borderColor-style-separator"},{propName:"borderColor",category:"style",type:"colorpicker",label:{en:"Border color",fr:"Couleur de la bordure"},value:"rgba(0, 0, 0, 1)"}]},n={propName:"closeButtonGroup",category:"style",type:"group",label:{en:"Close button",fr:"Bouton de fermeture"},collapsible:!0,children:[{propName:"closeButtonPosition",category:"style",type:"radio",label:{en:"Close button position",fr:"Position du bouton de fermeture"},value:"inside",options:[{label:{en:"Inside",fr:"À l'intérieur"},value:"inside"},{label:{en:"Outside",fr:"À l'extérieur"},value:"outside"}]},{category:"style",type:"short-separator",propName:"closeButtonColor-style-separator"},{propName:"closeButtonColor",type:"colorpicker",category:"style",label:{en:"Close button color",fr:"Couleur du bouton de fermeture"},value:"rgba(92, 92, 92, 1)"},{category:"style",type:"short-separator",propName:"closeBackgroundButtonColor-style-separator",conditions:[{field:"closeButtonPosition",value:"outside"}]},{propName:"backgroundCloseButtonColor",type:"colorpicker",category:"style",label:{en:"Background close button color",fr:"Couleur du fond du bouton de fermeture"},value:"rgba(255, 255, 255, 1)",conditions:[{field:"closeButtonPosition",value:"outside"}]}]},l=[{propName:"widthImageWithText",type:"radio",category:"style",label:{en:"Width",fr:"Largeur"},value:"medium",options:[{label:{en:"Small",fr:"Petite"},value:"small"},{label:{en:"Medium",fr:"Moyenne"},value:"medium"},{label:"Large",value:"large"},{label:{en:"Custom",fr:"Sur mesure"},value:"custom"}],conditions:[{field:"type",value:function(e){return"video"!==e}},{field:"layout",value:function(e){return"imageOnly"!==e}}]},{propName:"widthImageOnly",type:"radio",category:"style",label:{en:"Width",fr:"Largeur"},value:"fit",options:[{label:{en:"Fit to size",fr:"S'adapte à la taille"},value:"fit"},{label:{en:"Small",fr:"Petite"},value:"small"},{label:{en:"Medium",fr:"Moyenne"},value:"medium"},{label:"Large",value:"large"}],conditions:[{field:"type",value:function(e){return"video"!==e}},{field:"layout",value:function(e){return"imageOnly"===e}}]},{propName:"customWidth",type:"number",category:"style",label:{en:"Custom width (%)",fr:"Largeur sur mesure (%)"},value:50,conditions:[{field:"widthImageWithText",value:"custom"}]}],i=[{category:"style",type:"separator",propName:"animation-separator"},{propName:"animation",type:"radio",category:"style",label:"Animation",value:"none",options:[{label:{en:"None",fr:"Aucune"},value:"none"},{label:"slide In",value:"slideIn"},{label:"Fade In",value:"fadeIn"}]}],u=[{propName:"recurrence",type:"select",category:"conditions",label:{en:"Recurrence",fr:"Récurrence"},value:"-1",options:[{label:{en:"Every time",fr:"Chaque page"},value:"-1"},{label:{en:"Every session",fr:"Chaque session"},value:"0"},{label:{en:"Everyday",fr:"Chaque jour"},value:"1"},{label:{en:"Every week",fr:"Chaque semaine"},value:"7"},{label:{en:"Every month",fr:"Chaque mois"},value:"30"},{label:{en:"Once per user (no recurrence)",fr:"Une fois par visiteur (pas de récurrence)"},value:"365"}]},{category:"conditions",type:"separator",propName:"triggerEvent-separator"},{propName:"triggerEvent",type:"select",category:"conditions",label:{en:"Triggers on",fr:"Se déclenche au"},value:"pageLoad",options:[{label:{en:"Page load",fr:"Chargement de la page"},value:"pageLoad"},{label:{en:"Click",fr:"Clic"},value:"click"},{label:{en:"Exit intent",fr:"Avant fermeture de l'onglet"},value:"exitIntent"},{label:{en:"Delay",fr:"Délai"},value:"timer"},{label:{en:"Reengage (after inactivity)",fr:"Réengagement (après inactivité)"},value:"reengage"}]},{propName:"clickEventSelector",type:"selectelement",category:"conditions",label:{en:"DOM element to listen to",fr:"Élément du DOM à écouter"},placeholder:{en:"Please select an element in the webpage",fr:"Veuillez sélectionner un élément dans la page"},conditions:[{field:"triggerEvent",value:"click"}]},{propName:"exitEventDelay",type:"number",category:"conditions",label:{en:"Delay after leaving",fr:"Délai avant affichage (après sortie de page)"},min:0,max:120,value:0,conditions:[{field:"triggerEvent",value:"exitIntent"}]},{propName:"reengageEventDelay",type:"number",category:"conditions",label:{en:"Delay before reengagement",fr:"Délai d'inactivité avant affichage"},min:1,max:120,value:10,conditions:[{field:"triggerEvent",value:"reengage"}]},{propName:"triggerEventDelay",type:"number",category:"conditions",label:{en:"Trigger event delay (in seconds)",fr:"Délai avant l'affichage (en secondes)"},value:10,conditions:[{field:"triggerEvent",value:"timer"}]},{category:"conditions",type:"separator",propName:"actionTrackingEvent-separator"},{propName:"actionTrackingEventDisplay",category:"conditions",type:"switch",value:!1,label:{en:"Send an Action tracking event when shown",fr:"Déclencher un Action Tracking à l'affichage"}},{propName:"actionTrackingName",type:"text",category:"conditions",label:{en:"Action tracking name",fr:"Nom de l'évènement"},value:{en:"Modal displayed",fr:"Affichage de la modale"},conditions:[{field:"actionTrackingEventDisplay"}]},{category:"conditions",type:"separator",propName:"actionTrackingEventClose-separator"},{propName:"actionTrackingEventClose",category:"conditions",type:"switch",value:!1,label:{en:"Send an Action tracking event when closed",fr:"Déclencher un Action Tracking à la fermeture"}},{propName:"actionTrackingNameClose",type:"text",category:"conditions",label:{en:"Action tracking name",fr:"Nom de l'évènement"},value:{en:"Modal closed",fr:"Fermeture de la modale"},conditions:[{field:"actionTrackingEventClose"}]}],c={title:{propName:"title",type:"wysiwyg",category:"content",label:{en:"Title",fr:"Titre"},placeholder:{en:"Some title",fr:"Mon titre"},value:{en:"Title",fr:"Titre"},conditions:[{field:"layout",value:function(e){return"no-title"!==e&&"imageOnly"!==e}}]},buttonSettings:[{category:"content",type:"separator",propName:"button-separator"},{propName:"button",category:"content",type:"switch",value:!1,label:{en:"Add a button",fr:"Ajouter un bouton"}},{propName:"buttonText",type:"text",category:"content",label:{en:"Button text",fr:"Texte du bouton"},value:{en:"Accept",fr:"Valider"},placeholder:{en:"Submit",fr:"Valider"},conditions:[{field:"button"}]},{propName:"buttonLink",type:"text",category:"content",label:{en:"Button link",fr:"Lien du bouton"},value:"https://www.google.com",conditions:[{field:"button"}]},{propName:"buttonTextColor",category:"content",type:"colorpicker",label:{en:"Button text color",fr:"Couleur du texte du bouton"},value:"rgba(255, 255, 255, 1)",conditions:[{field:"button"}]},{propName:"buttonBackgroundColor",category:"content",type:"colorpicker",label:{en:"Button background color",fr:"Couleur de fond du bouton"},value:"rgba(86, 159, 242, 1)",conditions:[{field:"button"}]},{propName:"actionTrackingEventButton",category:"content",type:"switch",value:!1,label:{en:"Send an Action Tracking when the button is clicked",fr:"Déclencher un Action Tracking au clic sur le bouton"},conditions:[{field:"button"}]},{propName:"actionTrackingButtonName",type:"text",category:"content",label:{en:"Action tracking name",fr:"Nom de l'évènement"},value:{en:"Modal button clicked",fr:"Clic sur le bouton de la modale"},conditions:[{field:"actionTrackingEventButton"}]}]},p=[{propName:"type",value:"image",type:"hidden",category:"layout"},{propName:"layout",category:"layout",value:"imageOnly",type:"radioImage",options:[{label:{en:"Image only",fr:"Image seule"},value:"imageOnly",src:"https://gitlab.com/abtasty/public/storage/raw/master/widget-form-popin-image-layouts/image-only.png"},{label:{en:"Left",fr:"Gauche"},value:"left",src:"https://gitlab.com/abtasty/public/storage/raw/master/widget-form-popin-image-layouts/left.png"},{label:{en:"Right",fr:"Droite"},value:"right",src:"https://gitlab.com/abtasty/public/storage/raw/master/widget-form-popin-image-layouts/right.png"},{label:{en:"Top",fr:"Haut"},value:"top",src:"https://gitlab.com/abtasty/public/storage/raw/master/widget-form-popin-image-layouts/top.png"},{label:{en:"Bottom",fr:"Bas"},value:"bottom",src:"https://gitlab.com/abtasty/public/storage/raw/master/widget-form-popin-image-layouts/bottom.png"}]},{propName:"image",type:"mediaupload",category:"content",label:"Image"},{category:"content",type:"separator",propName:"title-separator",conditions:[{field:"layout",value:function(e){return"no-title"!==e&&"imageOnly"!==e}}]},c.title,{category:"content",type:"separator",propName:"wysiwyg-content-separator",conditions:[{field:"layout",value:function(e){return"imageOnly"!==e}}]},{propName:"content",type:"wysiwyg",category:"content",label:{en:"Content",fr:"Contenu"},value:"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",conditions:[{field:"layout",value:function(e){return"imageOnly"!==e}}]}].concat(e(c.buttonSettings),e(l),[{type:"separator",category:"style"},o,{type:"separator",category:"style"},r,{type:"separator",category:"style"},n],e(i),e(u)),s=[{propName:"type",value:"simple",type:"hidden",category:"layout"},{propName:"layout",category:"layout",value:"center",type:"radioImage",options:[{label:{en:"Center",fr:"Centre"},value:"center",src:"https://gitlab.com/abtasty/public/storage/raw/master/widget-form-popin-simple-layouts/center.png"},{label:{en:"Left",fr:"Gauche"},value:"left",src:"https://gitlab.com/abtasty/public/storage/raw/master/widget-form-popin-simple-layouts/left.png"},{label:{en:"Right",fr:"Droite"},value:"right",src:"https://gitlab.com/abtasty/public/storage/raw/master/widget-form-popin-simple-layouts/right.png"}]},c.title,{category:"content",type:"separator",propName:"title-content-separator"},{propName:"content",type:"wysiwyg",category:"content",label:{en:"Content",fr:"Contenu"},value:"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."}].concat(t(c.buttonSettings),t(l),[{type:"separator",category:"style"},o,{type:"separator",category:"style"},r,{type:"separator",category:"style"},n],t(i),t(u)),y=[{propName:"type",value:"video",type:"hidden",category:"layout"},{propName:"layout",category:"layout",value:"no-title",type:"radioImage",options:[{label:{en:"No title",fr:"Sans titre"},value:"no-title",src:"https://dp8v87cz8a7qa.cloudfront.net/36548/5a26b83ea311a1512486974.png"},{label:{en:"Top",fr:"Haut"},value:"top",src:"https://gitlab.com/abtasty/public/storage/raw/master/widget-form-popin-video-layouts/bottom.png"},{label:{en:"Bottom",fr:"Bas"},value:"bottom",src:"https://gitlab.com/abtasty/public/storage/raw/master/widget-form-popin-video-layouts/top.png"}]},c.title,{propName:"videoLink",type:"text",category:"content",label:{en:"URL (Youtube or Vimeo)",fr:"URL (Youtube ou Vimeo)"},value:"https://www.youtube.com/watch?v=XyGGixAg3bE"}].concat(a(c.buttonSettings),a(l),[{type:"separator",category:"style",conditions:[{field:"type",value:function(e){return"video"!==e}},{field:"layout",value:function(e){return"imageOnly"!==e}}]},o,{type:"separator",category:"style"},r,{type:"separator",category:"style"},n],a(i),a(u),[{category:"conditions",type:"separator",propName:"autoPlay-separator"},{propName:"autoPlay",category:"conditions",type:"switch",value:!1,label:{en:"Auto play (Youtube only)",fr:"Lecture automatique (Youtube uniquement)"}}]),d=void 0,g=document.getElementById("abtasty-widget-react-form__widget");if(g){var m=g.getAttribute("data-plugin-id");d=9===Number(m)?s:64===Number(m)?y:p}else d=p;return d}); |
@@ -1,1 +0,1 @@ | ||
!function(){"use strict";"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var t,e,a=(function(t,e){"undefined"!=typeof self&&self,t.exports=function(a){function n(t){if(o[t])return o[t].exports;var e=o[t]={i:t,l:!1,exports:{}};return a[t].call(e.exports,e,e.exports,n),e.l=!0,e.exports}var o={};return n.m=a,n.c=o,n.d=function(t,e,a){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:a})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=41)}([function(t,e){var a=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=a)},function(t,e,a){var n=a(29)("wks"),o=a(30),i=a(0).Symbol,r="function"==typeof i;(t.exports=function(t){return n[t]||(n[t]=r&&i[t]||(r?i:o)("Symbol."+t))}).store=n},function(t,e){var a=t.exports={version:"2.5.3"};"number"==typeof __e&&(__e=a)},function(t,e,a){var n=a(8);t.exports=function(t){if(!n(t))throw TypeError(t+" is not an object!");return t}},function(t,e,a){var y=a(0),p=a(2),b=a(10),v=a(5),_="prototype",g=function(t,e,a){var n,o,i,r=t&g.F,s=t&g.G,c=t&g.S,l=t&g.P,u=t&g.B,d=t&g.W,f=s?p:p[e]||(p[e]={}),m=f[_],h=s?y:c?y[e]:(y[e]||{})[_];for(n in s&&(a=e),a)(o=!r&&h&&void 0!==h[n])&&n in f||(i=o?h[n]:a[n],f[n]=s&&"function"!=typeof h[n]?a[n]:u&&o?b(i,y):d&&h[n]==i?function(n){var t=function(t,e,a){if(this instanceof n){switch(arguments.length){case 0:return new n;case 1:return new n(t);case 2:return new n(t,e)}return new n(t,e,a)}return n.apply(this,arguments)};return t[_]=n[_],t}(i):l&&"function"==typeof i?b(Function.call,i):i,l&&((f.virtual||(f.virtual={}))[n]=i,t&g.R&&m&&!m[n]&&v(m,n,i)))};g.F=1,g.G=2,g.S=4,g.P=8,g.B=16,g.W=32,g.U=64,g.R=128,t.exports=g},function(t,e,a){var n=a(7),o=a(25);t.exports=a(6)?function(t,e,a){return n.f(t,e,o(1,a))}:function(t,e,a){return t[e]=a,t}},function(t,e,a){t.exports=!a(16)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e,a){var n=a(3),o=a(46),i=a(47),r=Object.defineProperty;e.f=a(6)?Object.defineProperty:function(t,e,a){if(n(t),e=i(e,!0),n(a),o)try{return r(t,e,a)}catch(t){}if("get"in a||"set"in a)throw TypeError("Accessors not supported!");return"value"in a&&(t[e]=a.value),t}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e){t.exports={}},function(t,e,a){var i=a(11);t.exports=function(n,o,t){if(i(n),void 0===o)return n;switch(t){case 1:return function(t){return n.call(o,t)};case 2:return function(t,e){return n.call(o,t,e)};case 3:return function(t,e,a){return n.call(o,t,e,a)}}return function(){return n.apply(o,arguments)}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e){var a={}.hasOwnProperty;t.exports=function(t,e){return a.call(t,e)}},function(t,e){var a={}.toString;t.exports=function(t){return a.call(t).slice(8,-1)}},function(t,e){var a=Math.ceil,n=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(0<t?n:a)(t)}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,a){var n=a(8),o=a(0).document,i=n(o)&&n(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,e,a){var n=a(27),o=a(15);t.exports=function(t){return n(o(t))}},function(t,e,a){var n=a(29)("keys"),o=a(30);t.exports=function(t){return n[t]||(n[t]=o(t))}},function(t,e,a){var n=a(7).f,o=a(12),i=a(1)("toStringTag");t.exports=function(t,e,a){t&&!o(t=a?t:t.prototype,i)&&n(t,i,{configurable:!0,value:e})}},function(t,e,a){var o=a(11);t.exports.f=function(t){return new function(t){var a,n;this.promise=new t(function(t,e){if(void 0!==a||void 0!==n)throw TypeError("Bad Promise constructor");a=t,n=e}),this.resolve=o(a),this.reject=o(n)}(t)}},function(t,e,a){t.exports={default:a(42),__esModule:!0}},function(t,e,a){var _=a(24),g=a(4),x=a(48),w=a(5),k=a(12),C=a(9),T=a(49),S=a(20),E=a(55),P=a(1)("iterator"),O=!([].keys&&"next"in[].keys()),I="values",L=function(){return this};t.exports=function(t,e,a,n,o,i,r){T(a,e,n);var s,c,l,u=function(t){if(!O&&t in h)return h[t];switch(t){case"keys":case I:return function(){return new a(this,t)}}return function(){return new a(this,t)}},d=e+" Iterator",f=o==I,m=!1,h=t.prototype,y=h[P]||h["@@iterator"]||o&&h[o],p=!O&&y||u(o),b=o?f?u("entries"):p:void 0,v="Array"==e&&h.entries||y;if(v&&(l=E(v.call(new t)))!==Object.prototype&&l.next&&(S(l,d,!0),_||k(l,P)||w(l,P,L)),f&&y&&y.name!==I&&(m=!0,p=function(){return y.call(this)}),_&&!r||!O&&!m&&h[P]||w(h,P,p),C[e]=p,C[d]=L,o)if(s={values:f?p:u(I),keys:i?p:u("keys"),entries:b},r)for(c in s)c in h||x(h,c,s[c]);else g(g.P+g.F*(O||m),e,s);return s}},function(t,e){t.exports=!0},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,a){var n=a(52),o=a(31);t.exports=Object.keys||function(t){return n(t,o)}},function(t,e,a){var n=a(13);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==n(t)?t.split(""):Object(t)}},function(t,e,a){var n=a(14),o=Math.min;t.exports=function(t){return 0<t?o(n(t),9007199254740991):0}},function(t,e,a){var n=a(0),o="__core-js_shared__",i=n[o]||(n[o]={});t.exports=function(t){return i[t]||(i[t]={})}},function(t,e){var a=0,n=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++a+n).toString(36))}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,a){var n=a(0).document;t.exports=n&&n.documentElement},function(t,e,a){var n=a(15);t.exports=function(t){return Object(n(t))}},function(t,e,a){var o=a(13),i=a(1)("toStringTag"),r="Arguments"==o(function(){return arguments}());t.exports=function(t){var e,a,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(a=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),i))?a:r?o(e):"Object"==(n=o(e))&&"function"==typeof e.callee?"Arguments":n}},function(t,e,a){var o=a(3),i=a(11),r=a(1)("species");t.exports=function(t,e){var a,n=o(t).constructor;return void 0===n||null==(a=o(n)[r])?e:i(a)}},function(t,e,a){var n,o,i,r=a(10),s=a(66),c=a(32),l=a(17),u=a(0),d=u.process,f=u.setImmediate,m=u.clearImmediate,h=u.MessageChannel,y=u.Dispatch,p=0,b={},v="onreadystatechange",_=function(){var t=+this;if(b.hasOwnProperty(t)){var e=b[t];delete b[t],e()}},g=function(t){_.call(t.data)};f&&m||(f=function(t){for(var e=[],a=1;arguments.length>a;)e.push(arguments[a++]);return b[++p]=function(){s("function"==typeof t?t:Function(t),e)},n(p),p},m=function(t){delete b[t]},"process"==a(13)(d)?n=function(t){d.nextTick(r(_,t,1))}:y&&y.now?n=function(t){y.now(r(_,t,1))}:h?(i=(o=new h).port2,o.port1.onmessage=g,n=r(i.postMessage,i,1)):u.addEventListener&&"function"==typeof postMessage&&!u.importScripts?(n=function(t){u.postMessage(t+"","*")},u.addEventListener("message",g,!1)):n=v in l("script")?function(t){c.appendChild(l("script"))[v]=function(){c.removeChild(this),_.call(t)}}:function(t){setTimeout(r(_,t,1),0)}),t.exports={set:f,clear:m}},function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},function(t,e,a){var n=a(3),o=a(8),i=a(21);t.exports=function(t,e){if(n(t),o(e)&&e.constructor===t)return e;var a=i.f(t);return(0,a.resolve)(e),a.promise}},function(t,e,a){e.__esModule=!0,e.default=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e,a){e.__esModule=!0;var n,o=(n=a(79))&&n.__esModule?n:{default:n};e.default=function(){function n(t,e){for(var a=0;a<e.length;a++){var n=e[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),(0,o.default)(t,n.key,n)}}return function(t,e,a){return e&&n(t.prototype,e),a&&n(t,a),t}}()},function(t,e,a){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.SCRATCH_TYPE=e.ScratchCard=void 0;var o=n(a(22)),s=n(a(73)),c=n(a(39)),i=n(a(40)),l=a(82),u=a(83),d=n(a(84)),r=function(){function r(t,e){var a=this;(0,c.default)(this,r);var n=this,o={scratchType:l.SCRATCH_TYPE.SPRAY,containerWidth:100,containerHeight:100,percentToFinish:50,nPoints:100,pointSize:[10,10],callback:function(){alert("done.")},brushSrc:"",imageForwardSrc:"./images/scratchcard.png",imageBackgroundSrc:"./images/scratchcard-background.svg",clearZoneRadius:0,enabledPercentUpdate:!0};this.config=(0,s.default)(o,e),this.scratchType=this.config.scratchType,this.container=document.querySelector(t),this.position=[0,0],this.readyToClear=!1,this.percent=0,this.callbackDone=!1,this.generateCanvas(),this.ctx=this.canvas.getContext("2d"),this.zone=this.canvas.getBoundingClientRect(),this.brush=new d.default(this.ctx,this.position[0],this.position[1]),this.config.scratchType===l.SCRATCH_TYPE.BRUSH&&(this.brushImage=d.default.generateBrush(this.config.brushSrc));var i=(0,u.throttle)(function(t){t.preventDefault(),n.dispatchEvent("scratch","move"),n.position=n.mousePosition(t),n.brush.updateMousePosition(n.position[0],n.position[1]),n.scratch(),a.config.enabledPercentUpdate&&(n.percent=n.updatePercent())},16);this.canvas.addEventListener("mousedown",function(t){n.zone=n.canvas.getBoundingClientRect(),n.canvas.addEventListener("mousemove",i),document.body.addEventListener("mouseup",function t(){n.canvas.removeEventListener("mousemove",i),n.finish(),this.removeEventListener("mouseup",t)})}),this.canvas.addEventListener("touchstart",function(t){t.preventDefault(),n.canvas.addEventListener("touchmove",i),document.body.addEventListener("touchend",function t(){n.canvas.removeEventListener("touchmove",i),n.finish(),this.removeEventListener("touchend",t)})}),window.addEventListener("resize",(0,u.throttle)(function(){a.zone=a.canvas.getBoundingClientRect(),a.redraw()},100)),window.addEventListener("scroll",(0,u.throttle)(function(){a.zone=a.canvas.getBoundingClientRect()},16))}return(0,i.default)(r,[{key:"getPercent",value:function(){return this.percent}},{key:"finish",value:function(){!this.callbackDone&&this.percent>this.config.percentToFinish&&(this.clear(),this.canvas.style.pointerEvents="none",void 0!==this.config.callback&&(this.callbackDone=!0,this.config.callback()))}},{key:"dispatchEvent",value:function(t,e){(0,u.dispatchCustomEvent)(this.canvas,t+"."+e,{})}},{key:"init",value:function(){var n=this;return new o.default(function(e,a){(0,u.loadImage)(n.config.imageForwardSrc).then(function(t){n.scratchImage=t,n.ctx.drawImage(n.scratchImage,0,0,n.canvas.width,n.canvas.height),n.setBackground(),e()},function(t){return a(t),new TypeError(n.config.imageForwardSrc+" is not loaded.")})})}},{key:"generateCanvas",value:function(){this.canvas=document.createElement("canvas"),this.canvas.classList.add("sc__canvas"),this.canvas.width=this.config.containerWidth,this.canvas.height=this.config.containerHeight,this.container.appendChild(this.canvas)}},{key:"setBackground",value:function(){var e=this,a=document.createElement("img");(0,u.loadImage)(this.config.imageBackgroundSrc).then(function(t){a.src=t.src,e.container.insertBefore(a,e.canvas)},function(t){console.log(t.message)})}},{key:"mousePosition",value:function(t){var e=void 0,a=void 0;switch(t.type){case"touchmove":e=t.touches[0].clientX-this.config.clearZoneRadius-this.zone.left,a=t.touches[0].clientY-this.config.clearZoneRadius-this.zone.top;break;case"mousemove":e=t.clientX-this.config.clearZoneRadius-this.zone.left,a=t.clientY-this.config.clearZoneRadius-this.zone.top}return[e,a]}},{key:"scratch",value:function(){switch(this.position[0],this.position[1],this.ctx.globalCompositeOperation="destination-out",this.ctx.save(),this.config.scratchType){case l.SCRATCH_TYPE.BRUSH:this.brush.brush(this.brushImage);break;case l.SCRATCH_TYPE.CIRCLE:this.brush.circle(this.config.clearZoneRadius);break;case l.SCRATCH_TYPE.SPRAY:this.brush.spray(this.config.clearZoneRadius,this.config.pointSize,this.config.nPoints)}this.ctx.restore()}},{key:"updatePercent",value:function(){for(var t=0,e=this.ctx.getImageData(0,0,this.canvas.width,this.canvas.height),a=e.data.length,n=0;n<a;n+=4)0===e.data[n]&&0===e.data[n+1]&&0===e.data[n+2]&&0===e.data[n+3]&&t++;return 1<=t?t/(this.canvas.width*this.canvas.height)*100:0}},{key:"redraw",value:function(){var t=this.config.containerWidth;this.zone.width<t&&(this.ctx.clearRect(0,0,this.zone.width,this.zone.height),this.canvas.width=this.zone.width,this.canvas.height=this.zone.height,this.ctx.drawImage(this.scratchImage,0,0,this.zone.width,this.zone.height))}},{key:"clear",value:function(){this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height)}}]),r}();window.ScratchCard=r,window.SCRATCH_TYPE=l.SCRATCH_TYPE,e.ScratchCard=r,e.SCRATCH_TYPE=l.SCRATCH_TYPE},function(t,e,a){a(43),a(44),a(56),a(60),a(71),a(72),t.exports=a(2).Promise},function(t,e){},function(t,e,a){var n=a(45)(!0);a(23)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,a=this._i;return a>=e.length?{value:void 0,done:!0}:(t=n(e,a),this._i+=t.length,{value:t,done:!1})})},function(t,e,a){var c=a(14),l=a(15);t.exports=function(s){return function(t,e){var a,n,o=String(l(t)),i=c(e),r=o.length;return i<0||r<=i?s?"":void 0:(a=o.charCodeAt(i))<55296||56319<a||i+1===r||(n=o.charCodeAt(i+1))<56320||57343<n?s?o.charAt(i):a:s?o.slice(i,i+2):n-56320+(a-55296<<10)+65536}}},function(t,e,a){t.exports=!a(6)&&!a(16)(function(){return 7!=Object.defineProperty(a(17)("div"),"a",{get:function(){return 7}}).a})},function(t,e,a){var o=a(8);t.exports=function(t,e){if(!o(t))return t;var a,n;if(e&&"function"==typeof(a=t.toString)&&!o(n=a.call(t)))return n;if("function"==typeof(a=t.valueOf)&&!o(n=a.call(t)))return n;if(!e&&"function"==typeof(a=t.toString)&&!o(n=a.call(t)))return n;throw TypeError("Can't convert object to primitive value")}},function(t,e,a){t.exports=a(5)},function(t,e,a){var n=a(50),o=a(25),i=a(20),r={};a(5)(r,a(1)("iterator"),function(){return this}),t.exports=function(t,e,a){t.prototype=n(r,{next:o(1,a)}),i(t,e+" Iterator")}},function(t,e,n){var o=n(3),i=n(51),r=n(31),s=n(19)("IE_PROTO"),c=function(){},l="prototype",u=function(){var t,e=n(17)("iframe"),a=r.length;for(e.style.display="none",n(32).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),u=t.F;a--;)delete u[l][r[a]];return u()};t.exports=Object.create||function(t,e){var a;return null!==t?(c[l]=o(t),a=new c,c[l]=null,a[s]=t):a=u(),void 0===e?a:i(a,e)}},function(t,e,a){var r=a(7),s=a(3),c=a(26);t.exports=a(6)?Object.defineProperties:function(t,e){s(t);for(var a,n=c(e),o=n.length,i=0;i<o;)r.f(t,a=n[i++],e[a]);return t}},function(t,e,a){var r=a(12),s=a(18),c=a(53)(!1),l=a(19)("IE_PROTO");t.exports=function(t,e){var a,n=s(t),o=0,i=[];for(a in n)a!=l&&r(n,a)&&i.push(a);for(;e.length>o;)r(n,a=e[o++])&&(~c(i,a)||i.push(a));return i}},function(t,e,a){var c=a(18),l=a(28),u=a(54);t.exports=function(s){return function(t,e,a){var n,o=c(t),i=l(o.length),r=u(a,i);if(s&&e!=e){for(;r<i;)if((n=o[r++])!=n)return!0}else for(;r<i;r++)if((s||r in o)&&o[r]===e)return s||r||0;return!s&&-1}}},function(t,e,a){var n=a(14),o=Math.max,i=Math.min;t.exports=function(t,e){return(t=n(t))<0?o(t+e,0):i(t,e)}},function(t,e,a){var n=a(12),o=a(33),i=a(19)("IE_PROTO"),r=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),n(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?r:null}},function(t,e,a){a(57);for(var n=a(0),o=a(5),i=a(9),r=a(1)("toStringTag"),s="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),c=0;c<s.length;c++){var l=s[c],u=n[l],d=u&&u.prototype;d&&!d[r]&&o(d,r,l),i[l]=i.Array}},function(t,e,a){var n=a(58),o=a(59),i=a(9),r=a(18);t.exports=a(23)(Array,"Array",function(t,e){this._t=r(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,a=this._i++;return!t||a>=t.length?(this._t=void 0,o(1)):o(0,"keys"==e?a:"values"==e?t[a]:[a,t[a]])},"values"),i.Arguments=i.Array,n("keys"),n("values"),n("entries")},function(t,e){t.exports=function(){}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,a){var n,o,i,r,s=a(24),c=a(0),l=a(10),u=a(34),d=a(4),f=a(8),m=a(11),h=a(61),y=a(62),p=a(35),b=a(36).set,v=a(67)(),_=a(21),g=a(37),x=a(38),w="Promise",k=c.TypeError,C=c.process,T=c[w],S="process"==u(C),E=function(){},P=o=_.f,O=!!function(){try{var t=T.resolve(1),e=(t.constructor={})[a(1)("species")]=function(t){t(E,E)};return(S||"function"==typeof PromiseRejectionEvent)&&t.then(E)instanceof e}catch(t){}}(),I=function(t){var e;return!(!f(t)||"function"!=typeof(e=t.then))&&e},L=function(l,a){if(!l._n){l._n=!0;var n=l._c;v(function(){for(var s=l._v,c=1==l._s,t=0,e=function(t){var e,a,n=c?t.ok:t.fail,o=t.resolve,i=t.reject,r=t.domain;try{n?(c||(2==l._h&&M(l),l._h=1),!0===n?e=s:(r&&r.enter(),e=n(s),r&&r.exit()),e===t.promise?i(k("Promise-chain cycle")):(a=I(e))?a.call(e,o,i):o(e)):i(s)}catch(t){i(t)}};n.length>t;)e(n[t++]);l._c=[],l._n=!1,a&&!l._h&&R(l)})}},R=function(i){b.call(c,function(){var t,e,a,n=i._v,o=A(i);if(o&&(t=g(function(){S?C.emit("unhandledRejection",n,i):(e=c.onunhandledrejection)?e({promise:i,reason:n}):(a=c.console)&&a.error&&a.error("Unhandled promise rejection",n)}),i._h=S||A(i)?2:1),i._a=void 0,o&&t.e)throw t.v})},A=function(t){return 1!==t._h&&0===(t._a||t._c).length},M=function(e){b.call(c,function(){var t;S?C.emit("rejectionHandled",e):(t=c.onrejectionhandled)&&t({promise:e,reason:e._v})})},j=function(t){var e=this;e._d||(e._d=!0,(e=e._w||e)._v=t,e._s=2,e._a||(e._a=e._c.slice()),L(e,!0))},B=function(t){var a,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw k("Promise can't be resolved itself");(a=I(t))?v(function(){var e={_w:n,_d:!1};try{a.call(t,l(B,e,1),l(j,e,1))}catch(t){j.call(e,t)}}):(n._v=t,n._s=1,L(n,!1))}catch(t){j.call({_w:n,_d:!1},t)}}};O||(T=function(t){h(this,T,w,"_h"),m(t),n.call(this);try{t(l(B,this,1),l(j,this,1))}catch(t){j.call(this,t)}},(n=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=a(68)(T.prototype,{then:function(t,e){var a=P(p(this,T));return a.ok="function"!=typeof t||t,a.fail="function"==typeof e&&e,a.domain=S?C.domain:void 0,this._c.push(a),this._a&&this._a.push(a),this._s&&L(this,!1),a.promise},catch:function(t){return this.then(void 0,t)}}),i=function(){var t=new n;this.promise=t,this.resolve=l(B,t,1),this.reject=l(j,t,1)},_.f=P=function(t){return t===T||t===r?new i(t):o(t)}),d(d.G+d.W+d.F*!O,{Promise:T}),a(20)(T,w),a(69)(w),r=a(2)[w],d(d.S+d.F*!O,w,{reject:function(t){var e=P(this);return(0,e.reject)(t),e.promise}}),d(d.S+d.F*(s||!O),w,{resolve:function(t){return x(s&&this===r?T:this,t)}}),d(d.S+d.F*!(O&&a(70)(function(t){T.all(t).catch(E)})),w,{all:function(t){var r=this,e=P(r),s=e.resolve,c=e.reject,a=g(function(){var n=[],o=0,i=1;y(t,!1,function(t){var e=o++,a=!1;n.push(void 0),i++,r.resolve(t).then(function(t){a||(a=!0,n[e]=t,--i||s(n))},c)}),--i||s(n)});return a.e&&c(a.v),e.promise},race:function(t){var e=this,a=P(e),n=a.reject,o=g(function(){y(t,!1,function(t){e.resolve(t).then(a.resolve,n)})});return o.e&&n(o.v),a.promise}})},function(t,e){t.exports=function(t,e,a,n){if(!(t instanceof e)||void 0!==n&&n in t)throw TypeError(a+": incorrect invocation!");return t}},function(t,e,a){var f=a(10),m=a(63),h=a(64),y=a(3),p=a(28),b=a(65),v={},_={};(e=t.exports=function(t,e,a,n,o){var i,r,s,c,l=o?function(){return t}:b(t),u=f(a,n,e?2:1),d=0;if("function"!=typeof l)throw TypeError(t+" is not iterable!");if(h(l)){for(i=p(t.length);d<i;d++)if((c=e?u(y(r=t[d])[0],r[1]):u(t[d]))===v||c===_)return c}else for(s=l.call(t);!(r=s.next()).done;)if((c=m(s,u,r.value,e))===v||c===_)return c}).BREAK=v,e.RETURN=_},function(t,e,a){var i=a(3);t.exports=function(t,e,a,n){try{return n?e(i(a)[0],a[1]):e(a)}catch(e){var o=t.return;throw void 0!==o&&i(o.call(t)),e}}},function(t,e,a){var n=a(9),o=a(1)("iterator"),i=Array.prototype;t.exports=function(t){return void 0!==t&&(n.Array===t||i[o]===t)}},function(t,e,a){var n=a(34),o=a(1)("iterator"),i=a(9);t.exports=a(2).getIteratorMethod=function(t){if(null!=t)return t[o]||t["@@iterator"]||i[n(t)]}},function(t,e){t.exports=function(t,e,a){var n=void 0===a;switch(e.length){case 0:return n?t():t.call(a);case 1:return n?t(e[0]):t.call(a,e[0]);case 2:return n?t(e[0],e[1]):t.call(a,e[0],e[1]);case 3:return n?t(e[0],e[1],e[2]):t.call(a,e[0],e[1],e[2]);case 4:return n?t(e[0],e[1],e[2],e[3]):t.call(a,e[0],e[1],e[2],e[3])}return t.apply(a,e)}},function(t,e,a){var s=a(0),c=a(36).set,l=s.MutationObserver||s.WebKitMutationObserver,u=s.process,d=s.Promise,f="process"==a(13)(u);t.exports=function(){var a,n,o,t=function(){var t,e;for(f&&(t=u.domain)&&t.exit();a;){e=a.fn,a=a.next;try{e()}catch(t){throw a?o():n=void 0,t}}n=void 0,t&&t.enter()};if(f)o=function(){u.nextTick(t)};else if(!l||s.navigator&&s.navigator.standalone)if(d&&d.resolve){var e=d.resolve();o=function(){e.then(t)}}else o=function(){c.call(s,t)};else{var i=!0,r=document.createTextNode("");new l(t).observe(r,{characterData:!0}),o=function(){r.data=i=!i}}return function(t){var e={fn:t,next:void 0};n&&(n.next=e),a||(a=e,o()),n=e}}},function(t,e,a){var o=a(5);t.exports=function(t,e,a){for(var n in e)a&&t[n]?t[n]=e[n]:o(t,n,e[n]);return t}},function(t,e,a){var n=a(0),o=a(2),i=a(7),r=a(6),s=a(1)("species");t.exports=function(t){var e="function"==typeof o[t]?o[t]:n[t];r&&e&&!e[s]&&i.f(e,s,{configurable:!0,get:function(){return this}})}},function(t,e,a){var i=a(1)("iterator"),r=!1;try{var n=[7][i]();n.return=function(){r=!0},Array.from(n,function(){throw 2})}catch(t){}t.exports=function(t,e){if(!e&&!r)return!1;var a=!1;try{var n=[7],o=n[i]();o.next=function(){return{done:a=!0}},n[i]=function(){return o},t(n)}catch(t){}return a}},function(t,e,a){var n=a(4),o=a(2),i=a(0),r=a(35),s=a(38);n(n.P+n.R,"Promise",{finally:function(e){var a=r(this,o.Promise||i.Promise),t="function"==typeof e;return this.then(t?function(t){return s(a,e()).then(function(){return t})}:e,t?function(t){return s(a,e()).then(function(){throw t})}:e)}})},function(t,e,a){var n=a(4),o=a(21),i=a(37);n(n.S,"Promise",{try:function(t){var e=o.f(this),a=i(t);return(a.e?e.reject:e.resolve)(a.v),e.promise}})},function(t,e,a){t.exports={default:a(74),__esModule:!0}},function(t,e,a){a(75),t.exports=a(2).Object.assign},function(t,e,a){var n=a(4);n(n.S+n.F,"Object",{assign:a(76)})},function(t,e,a){var f=a(26),m=a(77),h=a(78),y=a(33),p=a(27),o=Object.assign;t.exports=!o||a(16)(function(){var t={},e={},a=Symbol(),n="abcdefghijklmnopqrst";return t[a]=7,n.split("").forEach(function(t){e[t]=t}),7!=o({},t)[a]||Object.keys(o({},e)).join("")!=n})?function(t,e){for(var a=y(t),n=arguments.length,o=1,i=m.f,r=h.f;o<n;)for(var s,c=p(arguments[o++]),l=i?f(c).concat(i(c)):f(c),u=l.length,d=0;d<u;)r.call(c,s=l[d++])&&(a[s]=c[s]);return a}:o},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,a){t.exports={default:a(80),__esModule:!0}},function(t,e,a){a(81);var n=a(2).Object;t.exports=function(t,e,a){return n.defineProperty(t,e,a)}},function(t,e,a){var n=a(4);n(n.S+n.F*!a(6),"Object",{defineProperty:a(7).f})},function(t,e,a){Object.defineProperty(e,"__esModule",{value:!0});var n,o=e.SCRATCH_TYPE=void 0;(n=o||(e.SCRATCH_TYPE=o={}))[n.BRUSH=0]="BRUSH",n[n.SPRAY=1]="SPRAY",n[n.CIRCLE=2]="CIRCLE"},function(t,e,a){Object.defineProperty(e,"__esModule",{value:!0});var n,o=(n=a(22))&&n.__esModule?n:{default:n};e.randomPoint=function(t,e){var a=Math.abs(Math.random()*(e-t)+t);return parseInt(a.toFixed(0),10)},e.loadImage=function(n){return new o.default(function(t,a){var e=new Image;e.onload=function(){t(e)},e.src=n,e.onerror=function(t){var e=new Error("Image "+n+" is not loaded.");a(e)}})},e.throttle=function(n,o){var i=void 0,r=void 0;return function(){var t=this,e=+new Date,a=arguments;i&&e<i+o?(clearTimeout(r),r=setTimeout(function(){i=e,n.apply(t,a)},o)):(i=e,n.apply(t,a))}},e.dispatchCustomEvent=function(t,e,a){var n=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:a});t.dispatchEvent(n)},function(){function t(t,e){e=e||{bubbles:!1,cancelable:!1,detail:void 0};var a=document.createEvent("CustomEvent");return a.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),a}"function"!=typeof window.CustomEvent&&(t.prototype=window.Event.prototype,window.CustomEvent=t)}()},function(t,e,a){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(a(39)),i=n(a(40)),r=function(){function n(t,e,a){(0,o.default)(this,n),this.ctx=t,this.mouseX=e,this.mouseY=a}return(0,i.default)(n,[{key:"updateMousePosition",value:function(t,e){this.mouseX=t,this.mouseY=e}},{key:"circle",value:function(t){this.ctx.beginPath(),this.ctx.arc(this.mouseX+t,this.mouseY+t,t,0,2*Math.PI,!1),this.ctx.fillStyle="#000000",this.ctx.fill(),this.ctx.closePath()}},{key:"clearPoint",value:function(t){var e=t,a=2*Math.random()*e-e,n=Math.sqrt(e*e-a*a),o=2*Math.random()*n-n;return a+=e,o+=e,a+=this.mouseX,o+=this.mouseY,[a,o]}},{key:"spray",value:function(t,e,a){for(var n=0,o=a;n<o;n++){var i=this.clearPoint(t/2);this.ctx.beginPath(),this.ctx.arc(i[0]+t/2,i[1]+t/2,e/2,0,2*Math.PI,!1),this.ctx.fillStyle="#000000",this.ctx.fill(),this.ctx.closePath()}}},{key:"brush",value:function(t){if(null!==t){var e=Math.atan2(this.mouseY,this.mouseX);this.ctx.save(),this.ctx.translate(this.mouseX,this.mouseY),this.ctx.rotate(e),this.ctx.drawImage(t,-t.width/2,-t.height/2)}else{var a=new Error("argument img is not a node IMG");console.log(a.message)}}}],[{key:"generateBrush",value:function(t){if(0!==t.length){var e=new Image;return e.src=t,e}return null}}]),n}();e.default=r}])}(t={exports:{}},t.exports),t.exports);(e=a)&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")&&e.default;var r=a.ScratchCard,s=a.SCRATCH_TYPE;!function(t,e){void 0===e&&(e={});var a=e.insertAt;if(t&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===a&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t))}}("abtasty-modal{display:none;position:fixed;top:0;left:0;width:100%;height:100%;z-index:2147483647}abtasty-modal:not(.abtasty-modal--video){overflow-y:auto}abtasty-modal__underlay{width:100%;height:100%;position:fixed;top:0;left:0;background-color:rgba(0,0,0,.5);cursor:pointer}.abtasty-modal__area{top:0;left:0;right:0;width:auto;margin:10px!important;z-index:100;position:relative}.abtasty-modal__area-layout--imageOnly{max-width:80%}.abtasty-modal__area-layout--imageOnly img{border-style:solid;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:100%}.abtasty-modal__area-type--video.abtasty-modal__area-layout--no-title .abtasty-modal__content{padding:5px;border-radius:0!important;border-width:0!important;background-color:transparent!important;background-image:none!important}.abtasty-modal__area-type--video.abtasty-modal__area-layout--bottom .abtasty-modal__content{padding:25px 20px 20px}.abtasty-modal .abtasty-modal__content{border-color:#f6f6f6;border-style:solid;padding:20px}.abtasty-modal__area-type--image,.abtasty-modal__area-type--no-title,.abtasty-modal__area-type--scratch,.abtasty-modal__area-type--simple,.abtasty-modal__area-type--video{margin:0 auto 20px!important;top:10vh;border:none;background:none}.abtasty-modal__area-type--video.abtasty-modal__area-layout--bottom .abtasty-modal__close--inside{top:2px}.abtasty-modal__area-type--video.abtasty-modal__area-layout--top .abtasty-modal__close--inside{right:15px;top:20px}.abtasty-modal__area-type--image .abtasty-modal__close,.abtasty-modal__area-type--scratch .abtasty-modal__close,.abtasty-modal__area-type--simple .abtasty-modal__close{right:10px;top:15px}.abtasty-modal__close{position:absolute;right:5px;top:0;font-size:20px;font-weight:300;background:transparent;border:0;color:#222;font-family:Helvetica Neue,Helvetica,Arial,sans-serif!important;line-height:24px!important;margin-right:5px;cursor:pointer;width:20px;height:20px;padding:0;-webkit-box-sizing:border-box;box-sizing:border-box;z-index:2}.abtasty-modal__close svg{display:block}.abtasty-modal__close svg .close-x{stroke:#5c5c5c;fill:transparent;stroke-linecap:round;stroke-width:3}.abtasty-modal__area-type--video.abtasty-modal__area-layout--no-title .abtasty-modal__close--inside{top:-6px;right:-15px;background:#fff;border-radius:20px;width:20px;height:20px}.abtasty-modal__area-type--image .abtasty-modal__close--outside,.abtasty-modal__area-type--scratch .abtasty-modal__close--outside,.abtasty-modal__area-type--simple .abtasty-modal__close--outside,.abtasty-modal__close--outside,.abtasty-modal__close .abtasty-modal__close--outside{top:-25px;right:-25px;width:20px;height:20px}.abtasty-modal__close--outside{background:#fff;border-radius:20px}.abtasty-modal__media,.abtasty-modal__media-link{max-width:100%;display:block}.abtasty-modal__text{padding:20px;font-family:Open Sans,sans-serif!important;color:#000;overflow:auto}.abtasty-modal__title{width:auto;font-size:20px!important;font-weight:500;line-height:1.1;margin-bottom:10px}.abtasty-modal__text p{margin:0 0 10px!important;font-size:15px;font-weight:300;word-wrap:break-word}.abtasty-modal__button{width:100%;text-align:center;margin-top:20px}.abtasty-modal__button a{padding:10px 20px;border-radius:10px;display:inline-block;font-weight:700}.abtasty-modal__area-type--simple.abtasty-modal__area-layout--center .abtasty-modal__title{text-align:center}.abtasty-modal__area-type--simple.abtasty-modal__area-layout--center .abtasty-modal__innertext{text-align:center;white-space:pre-wrap}.abtasty-modal__area-type--simple.abtasty-modal__area-layout--left .abtasty-modal__title{width:50%;float:left;text-align:center;vertical-align:middle}.abtasty-modal__area-type--simple.abtasty-modal__area-layout--left .abtasty-modal__innertext{width:50%;float:left}.abtasty-modal__area-type--simple.abtasty-modal__area-layout--right .abtasty-modal__title{width:50%;float:left;text-align:center;vertical-align:middle}.abtasty-modal__area-type--simple.abtasty-modal__area-layout--right .abtasty-modal__innertext{width:50%;float:left}.abtasty-modal__area-type--image .abtasty-modal__image img,.abtasty-modal__area-type--scratch .abtasty-modal__image img{max-height:400px;max-width:100%;display:inline}.abtasty-modal__area-layout--imageOnly.abtasty-modal__area-type--scratch .abtasty-modal__image,.abtasty-modal__area-type--scratch .abtasty-modal__image{min-height:100%;font-size:0;position:relative;overflow:hidden;cursor:grabbing;cursor:-webkit-grabbing;cursor:-moz-grabbing}.abtasty-modal__area-type--scratch .abtasty-modal__image canvas{position:absolute;top:0;left:0;max-width:100%;z-index:1}.abtasty-modal__area-type--image.abtasty-modal__area-layout--left .abtasty-modal__image,.abtasty-modal__area-type--scratch.abtasty-modal__area-layout--left .abtasty-modal__image{width:50%;display:inline-block;height:auto;vertical-align:middle;text-align:center}.abtasty-modal__area-type--image.abtasty-modal__area-layout--left .abtasty-modal__text,.abtasty-modal__area-type--scratch.abtasty-modal__area-layout--left .abtasty-modal__text{text-align:left;width:50%;display:inline-block;vertical-align:middle;-webkit-box-sizing:border-box;box-sizing:border-box}.abtasty-modal__area-type--image.abtasty-modal__area-layout--right .abtasty-modal__image,.abtasty-modal__area-type--scratch.abtasty-modal__area-layout--right .abtasty-modal__image{width:50%;display:inline-block;height:auto;vertical-align:middle;text-align:center}.abtasty-modal__area-type--image.abtasty-modal__area-layout--right .abtasty-modal__text,.abtasty-modal__area-type--scratch.abtasty-modal__area-layout--right .abtasty-modal__text{text-align:left;width:50%;display:inline-block;vertical-align:middle;-webkit-box-sizing:border-box;box-sizing:border-box}.abtasty-modal__area-type--image.abtasty-modal__area-layout--top .abtasty-modal__image,.abtasty-modal__area-type--scratch.abtasty-modal__area-layout--top .abtasty-modal__image{width:100%;text-align:center}.abtasty-modal__area-type--image.abtasty-modal__area-layout--top .abtasty-modal__text,.abtasty-modal__area-type--scratch.abtasty-modal__area-layout--top .abtasty-modal__text{width:100%;padding:20px 0}.abtasty-modal__area-type--image.abtasty-modal__area-layout--top .abtasty-modal__image img{max-height:300px}.abtasty-modal__area-type--image.abtasty-modal__area-layout--bottom .abtasty-modal__image,.abtasty-modal__area-type--scratch.abtasty-modal__area-layout--bottom .abtasty-modal__image{width:100%;text-align:center}.abtasty-modal__area-type--image.abtasty-modal__area-layout--bottom .abtasty-modal__text,.abtasty-modal__area-type--scratch.abtasty-modal__area-layout--bottom .abtasty-modal__text{width:100%;padding:20px 0}.abtasty-modal__area-type--video{text-align:center;width:100%}.abtasty-modal__area-type--video iframe{width:100%}@media (min-width:630px){abtasty-modal:not(.abtasty-modal--video) .abtasty-modal__area-width--medium{width:600px;margin:0 auto 20px!important}.abtasty-modal--video{width:50%;left:25%}}@media (min-width:330px){abtasty-modal:not(.abtasty-modal--video) .abtasty-modal__area-width--small{width:300px;margin:0 auto 20px!important}}@media (min-width:930px){abtasty-modal:not(.abtasty-modal--video) .abtasty-modal__area-width--large{width:900px;margin:0 auto 20px!important}}.abtasty-animation-fadeIn{-webkit-animation-name:a;animation-name:a}.abtasty-animation-fadeIn,.abtasty-animation-fadeOut{-webkit-animation-duration:.5s;animation-duration:.5s}.abtasty-animation-fadeOut{-webkit-animation-name:b;animation-name:b}.abtasty-animation-slideIn{-webkit-animation-name:c;animation-name:c;-webkit-animation-duration:.5s;animation-duration:.5s}.abtasty-animation-slideOut{-webkit-animation-name:d;animation-name:d;-webkit-animation-duration:.5s;animation-duration:.5s}@-webkit-keyframes a{0%{opacity:0}to{opacity:1}}@keyframes a{0%{opacity:0}to{opacity:1}}@-webkit-keyframes b{0%{opacity:1}to{opacity:0}}@keyframes b{0%{opacity:1}to{opacity:0}}@-webkit-keyframes c{0%{-webkit-transform:translateY(-100%);transform:translateY(-100%)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes c{0%{-webkit-transform:translateY(-100%);transform:translateY(-100%)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@-webkit-keyframes d{0%{-webkit-transform:translateY(0);transform:translateY(0)}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}@keyframes d{0%{-webkit-transform:translateY(0);transform:translateY(0)}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}",{});var T=function(t){var i=Object.prototype.hasOwnProperty;function s(t,e){return Array.isArray(t)?function(t,e){for(var a,n="",o="",i=Array.isArray(e),r=0;r<t.length;r++)(a=s(t[r]))&&(i&&e[r]&&(a=u(a)),n=n+o+a,o=" ");return n}(t,e):t&&"object"==typeof t?function(t){var e="",a="";for(var n in t)n&&t[n]&&i.call(t,n)&&(e=e+a+n,a=" ");return e}(t):t||""}function c(t){if(!t)return"";if("object"==typeof t){var e="";for(var a in t)i.call(t,a)&&(e=e+a+":"+t[a]+";");return e}return t+""}function r(t,e,a,n){return!1!==e&&null!=e&&(e||"class"!==t&&"style"!==t)?!0===e?" "+(n?t:t+'="'+t+'"'):("function"==typeof e.toJSON&&(e=e.toJSON()),"string"==typeof e||(e=JSON.stringify(e),a||-1===e.indexOf('"'))?(a&&(e=u(e))," "+t+'="'+e+'"'):" "+t+"='"+e.replace(/'/g,"'")+"'"):""}t.merge=function t(e,a){if(1===arguments.length){for(var n=e[0],o=1;o<e.length;o++)n=t(n,e[o]);return n}for(var i in a)if("class"===i){var r=e[i]||[];e[i]=(Array.isArray(r)?r:[r]).concat(a[i]||[])}else if("style"===i){var r=c(e[i]);r=r&&";"!==r[r.length-1]?r+";":r;var s=c(a[i]);s=s&&";"!==s[s.length-1]?s+";":s,e[i]=r+s}else e[i]=a[i];return e},t.classes=s,t.style=c,t.attr=r,t.attrs=function(t,e){var a="";for(var n in t)if(i.call(t,n)){var o=t[n];if("class"===n){o=s(o),a=r(n,o,!1,e)+a;continue}"style"===n&&(o=c(o)),a+=r(n,o,!1,e)}return a};var l=/["&<>]/;function u(t){var e=""+t,a=l.exec(e);if(!a)return t;var n,o,i,r="";for(n=a.index,o=0;n<e.length;n++){switch(e.charCodeAt(n)){case 34:i=""";break;case 38:i="&";break;case 60:i="<";break;case 62:i=">";break;default:continue}o!==n&&(r+=e.substring(o,n)),o=n+1,r+=i}return o!==n?r+e.substring(o,n):r}return t.escape=u,t.rethrow=function e(a,t,n,o){if(!(a instanceof Error))throw a;if(!("undefined"==typeof window&&t||o))throw a.message+=" on line "+n,a;try{o=o||require("fs").readFileSync(t,"utf8")}catch(t){e(a,null,n)}var i=3,r=o.split("\n"),s=Math.max(n-i,0),c=Math.min(r.length,n+i);var i=r.slice(s,c).map(function(t,e){var a=e+s+1;return(a==n?" > ":" ")+a+"| "+t}).join("\n");a.path=t;a.message=(t||"Pug")+":"+n+"\n"+i+"\n\n"+a.message;throw a},t}({}),n=function(t){var w,k="",C={};try{var e={},a=t||{};(function(e,t,a,n,o,i,r,s,c,l,u,d,f,m,h,y,p,b,v,_,g,x){C.button=w=function(){this&&this.block,this&&this.attributes;k=(k=(k+='<div class="abtasty-modal__button">')+"<a"+(T.attr("href",u,!0,!0)+T.attr("style",T.style({"background-color":l+"!important",color:f+"!important"}),!0,!0))+">")+T.escape(null==(w=d)?"":w)+"</a></div>"},C.title=w=function(){this&&this.block,this&&this.attributes;k=(k+='<h2 class="abtasty-modal__title" style="text-align:center;">')+(null==(w=_)?"":w)+"</h2>"},C.imageOnly=w=function(){this&&this.block,this&&this.attributes;k=k+"<img"+(T.attr("src",y,!0,!0)+T.attr("style",T.style({"border-radius":i+"px!important","border-width":s+"px!important","border-color":o+"!important"}),!0,!0))+">"},C.scratchOnly=w=function(){this&&this.block,this&&this.attributes;k=k+'<div class="abtasty-modal__image" id="abtasty-modal__scratchcard"'+T.attr("style",T.style({"border-radius":i+"px!important"}),!0,!0)+"></div>"},C.imageWithText=w=function(){this&&this.block,this&&this.attributes;k+='<div class="abtasty-modal__image">',y&&(k=k+"<img"+(T.attr("src",y,!0,!0)+T.attr("style",T.style({"border-radius":r+"px!important"}),!0,!0))+">"),k+="</div>"},C.scratchImage=w=function(){this&&this.block,this&&this.attributes;k=k+'<div class="abtasty-modal__image" id="abtasty-modal__scratchcard"'+T.attr("style",T.style({"border-radius":r+"px!important"}),!0,!0)+"></div>"},C.content=w=function(){this&&this.block,this&&this.attributes;k+='<div class="abtasty-modal__innertext">',k=(k+="<p>")+(null==(w=b)?"":w)+"</p></div>"},C.closeButton=w=function(){this&&this.block,this&&this.attributes;k=k+"<div"+T.attr("class",T.classes(["abtasty-modal__close",m?"abtasty-modal__close--"+m:""],[!1,!0]),!1,!0)+" data-abtasty-actionnable"+T.attr("style",T.style("outside"===m?{"background-color":t}:""),!0,!0)+">",k+='<svg viewbox="0 0 40 40">',k+='<path class="close-x" d="M 10,10 L 30,30 M 30,10 L 10,30"></path></svg></div>'},C.contentWrapper=w=function(){var t=this&&this.block;this&&this.attributes;k=k+'<div class="abtasty-modal__content"'+T.attr("style",T.style({"border-radius":i+"px!important","border-width":s+"px!important","border-color":o+"!important","background-color":a+"!important","background-image":'url("'+n+'")!important'}),!0,!0)+">",t&&t&&t(),k+="</div>"},C.modalWrapper=w=function(){var t=this&&this.block;this&&this.attributes;k=(k=k+"<abtasty-modal__underlay"+T.attr("style",T.style({"background-color":"rgba(0, 0, 0, "+v/100+")"}),!0,!0)+"></abtasty-modal__underlay>")+"<div"+(T.attr("class",T.classes(["abtasty-animation-"+e+" abtasty-modal__area abtasty-modal__area-width--"+x+" abtasty-modal__area-type--"+g+" abtasty-modal__area-layout--"+p],[!0]),!1,!0)+T.attr("style",T.style({width:"custom"===x&&h+"%","margin-left":"custom"===x&&(100-h)/2+"% !important"}),!0,!0))+">",t&&t&&t(),k+="</div>"},C.modalWrapper.call({block:function(){C.closeButton(),"image"===g&&"imageOnly"===p&&(C.imageOnly(),c&&C.button()),"scratch"===g&&"imageOnly"===p?(C.scratchOnly(),c&&C.button()):C.contentWrapper.call({block:function(){"simple"===g?(k+='<div class="abtasty-modal__text">',"center"===p||"left"===p?(C.title(),C.content()):(C.content(),C.title()),k+='<div style="clear:both;"></div>',k+="</div>",c&&C.button()):"image"===g?("top"!==p&&"left"!==p||C.imageWithText(),k+='<div class="abtasty-modal__text">',C.title(),C.content(),c&&C.button(),k+="</div>","right"!==p&&"bottom"!==p||C.imageWithText(),k+='<div style="clear:both;"></div>'):"scratch"===g?("top"!==p&&"left"!==p||C.scratchImage(),k+='<div class="abtasty-modal__text">',C.title(),C.content(),c&&C.button(),k+="</div>","right"!==p&&"bottom"!==p||C.scratchImage(),k+='<div style="clear:both;"></div>'):"video"===g&&("top"===p&&C.title(),k+=null==(w=b)?"":w,"bottom"===p&&C.title(),c&&C.button())}})}})}).call(this,"animation"in a?a.animation:"undefined"!=typeof animation?animation:void 0,"backgroundCloseButtonColor"in a?a.backgroundCloseButtonColor:"undefined"!=typeof backgroundCloseButtonColor?backgroundCloseButtonColor:void 0,"backgroundColor"in a?a.backgroundColor:"undefined"!=typeof backgroundColor?backgroundColor:void 0,"backgroundImage"in a?a.backgroundImage:"undefined"!=typeof backgroundImage?backgroundImage:void 0,"borderColor"in a?a.borderColor:"undefined"!=typeof borderColor?borderColor:void 0,"borderRadius"in a?a.borderRadius:"undefined"!=typeof borderRadius?borderRadius:void 0,"borderRadiusImage"in a?a.borderRadiusImage:"undefined"!=typeof borderRadiusImage?borderRadiusImage:void 0,"borderWidth"in a?a.borderWidth:"undefined"!=typeof borderWidth?borderWidth:void 0,"button"in a?a.button:"undefined"!=typeof button?button:void 0,"buttonBackgroundColor"in a?a.buttonBackgroundColor:"undefined"!=typeof buttonBackgroundColor?buttonBackgroundColor:void 0,"buttonLink"in a?a.buttonLink:"undefined"!=typeof buttonLink?buttonLink:void 0,"buttonText"in a?a.buttonText:"undefined"!=typeof buttonText?buttonText:void 0,"buttonTextColor"in a?a.buttonTextColor:"undefined"!=typeof buttonTextColor?buttonTextColor:void 0,"closeButtonPosition"in a?a.closeButtonPosition:"undefined"!=typeof closeButtonPosition?closeButtonPosition:void 0,"customWidth"in a?a.customWidth:"undefined"!=typeof customWidth?customWidth:void 0,"image"in a?a.image:"undefined"!=typeof image?image:void 0,"layout"in a?a.layout:"undefined"!=typeof layout?layout:void 0,"modalContent"in a?a.modalContent:"undefined"!=typeof modalContent?modalContent:void 0,"overlayOpacity"in a?a.overlayOpacity:"undefined"!=typeof overlayOpacity?overlayOpacity:void 0,"title"in a?a.title:"undefined"!=typeof title?title:void 0,"type"in a?a.type:"undefined"!=typeof type?type:void 0,"width"in a?a.width:"undefined"!=typeof width?width:void 0)}catch(t){T.rethrow(t,void 0,void 0,e[void 0])}return k};var o=DATA,i=o.type,c=o.animation,l=o.backgroundColor,u=o.overlayOpacity,d=o.backgroundImage,f=o.borderRadius,m=o.borderRadiusImage,h=o.borderWidth,y=o.borderColor,p=o.button,b=o.buttonBackgroundColor,v=o.buttonLink,_=o.buttonText,g=o.buttonTextColor,x=o.backgroundCloseButtonColor,w=o.closeButtonColor,k=o.closeButtonPosition,C=o.content,S=o.customWidth,E=o.title,P=o.layout,O=o.videoLink,I=o.recurrence,L=o.triggerEvent,R=o.triggerEventDelay,A=o.clickEventSelector,M=o.widthImageWithText,j=o.widthImageOnly,B=o.autoPlay,Y="imageOnly"===P?j:M,z=DATA.image||"https://gitlab.com/abtasty/public/storage/raw/master/image-placeholder.png",W=DATA.scratchBackgroundImage||"https://gitlab.com/abtasty/public/storage/raw/master/image-placeholder.png",D=DATA.scratchImage||"https://gitlab.com/abtasty/public/storage/raw/master/image-placeholder.png",H=void 0,F=document.createElement("abtasty-modal"),N="AB Tasty Modal "+i+" "+TEST_ID,q=void 0!==window.ABTastyEditor,U=!!sessionStorage.getItem("ABTastyPreview"),G="abtasty-modal__underlay",X=".abtasty-modal__close",Z=Date.now(),V=void 0;var J,K=void 0;function $(){K&&(document.querySelector("body").style.overflowY=K),F.style.display="none","video"===i&&(F.innerHTML=""),"undefined"!=typeof PLUGIN_ID&&ABTastyEvent(PLUGIN_ID+" "+i+" modal closed",null,TEST_ID)}function Q(){return F.querySelector(G)?(F.querySelector(G).addEventListener("click",$),F.querySelector(X).addEventListener("click",$),0):setTimeout(Q,50)}function tt(t,e){return t.matches?t.matches(e):t.msMatchesSelector(e)}function et(){var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0],e={layout:P,type:i,borderRadius:f,borderRadiusImage:m,borderWidth:h,borderColor:y,button:p,buttonBackgroundColor:b,buttonLink:v,buttonText:_,buttonTextColor:g,backgroundColor:"imageOnly"!==P?l:"initial",overlayOpacity:u,backgroundImage:d,image:z,width:Y,videoLink:O,customWidth:S,animation:c,title:E,closeButtonPosition:k,backgroundCloseButtonColor:x,scratchBackgroundImage:W,modalContent:C||t.outerHTML};(F.className="abtasty-modal abtasty-modal--"+i,F.dataset.testId=TEST_ID,F.innerHTML=n(e),document.body.appendChild(F),V=F.querySelector(".abtasty-modal__area"),w)&&(F.querySelector(X+" .close-x").style.stroke=w)}function at(o,i){var n;(n=D,new Promise(function(t,e){var a=new Image;a.onload=function(){t(a)},a.src=n,a.onerror=function(){var t=new Error("Image "+n+" is not loaded.");e(t)}})).then(function(t){o&&o(t);var e=document.querySelector(".abtasty-modal__image"),a=t.width,n=t.height;e&&(a=e.offsetWidth,n=e.offsetWidth*t.height/t.width),new r("#abtasty-modal__scratchcard",{scratchType:s.CIRCLE,containerWidth:a,containerHeight:n,imageForwardSrc:D,imageBackgroundSrc:W,enabledPercentUpdate:!1,clearZoneRadius:i,callback:function(){}}).init()})}function nt(){var t=(630<window.innerWidth?.5*window.innerWidth:window.innerWidth-40)/16*9;return Math.round(t)}function ot(){var t="abtasty-widget-video-"+Date.now(),e=document.createElement("iframe");e.setAttribute("id",t);var a=function(t){var e=-1<t.indexOf("youtu"),a=-1<t.indexOf("vimeo"),n=void 0;e?(n="//www.youtube.com/embed/"+t.match(/^.*(youtu.be\/|v\/|e\/|u\/\w+\/|embed\/|v=)([^#&?]*).*/)[2]+"?rel=0",B&&(n+="&autoplay=1")):a&&(n="//player.vimeo.com/video/"+t.match(/.*(www\.)?vimeo.com\/(\d+)($|\/)/)[2]);return n}(O),n=nt();e.style.height=n+"px","no-title"===P&&(e.style.border=h+"px solid "+y+"!important",e.style.borderRadius=f+"px!important"),e.src=a,e.frameBorder=0,e.allowfullscreen=!0,et(e),V.style.height=n+"px",window.addEventListener("resize",function(){var t=document.querySelector("abtasty-modal iframe"),e=nt();t.style.height=e+"px",V.style.height=e+"px"})}function it(){if(a=Number(I),!(n=localStorage.getItem(N))||-1===a||q||U||(0===a?!sessionStorage.getItem(N):n<Z-24*a*60*60*1e3)){if("video"===i)ot(),Q();else if("image"===i&&"fit"===Y){var t=new Image;t.src=z,t.className="abtasty-modal__media",t.onload=function(){et(this),V.style.width=this.width+"px",V.style.height=this.height+"px",Q()}}else"scratch"===i&&"fit"===Y?at(function(t){et(t),V.style.width=t.width+"px",V.style.height=t.height+"px",Q()},50):("scratch"===i?(et(),at(null,20)):et(),Q());F.style.display="block",e=document.querySelector("body"),K=window.getComputedStyle(e).overflowY,e.style.overflowY="hidden","undefined"!=typeof PLUGIN_ID&&ABTastyEvent(PLUGIN_ID+" "+i+" modal displayed",null,TEST_ID),q||(localStorage.setItem(N,Z),sessionStorage.setItem(N,Z))}var e,a,n}J=function(){var a,n,o,i,r,t,s,c,l,u,d,f,e=window.top.ABTastyWidgetForm||!1;if(q&&e)it();else if("click"===L)u=A,d=it,f=G+", "+X,document.body.addEventListener("click",function(t){var e=t.target;if(!f||!tt(e,f))for(;e;){if(e!==document&&tt(e,u)){d();break}e=e.parentNode}});else switch(L){case"pageLoad":it();break;case"exitIntent":r=it,t=DATA.exitEventDelay,s=parseFloat(t)||0,c=void 0,l=0,document.addEventListener("mousemove",function(t){l=t.clientY}),document.body.addEventListener("mouseleave",function t(e){e.clientY<=50&&(l=0,clearInterval(c),c=setTimeout(function(){0===l&&(r(),document.body.removeEventListener("mouseleave",t))},1e3*s))},!1);break;case"reengage":a=it,n=DATA.reengageEventDelay,i=void 0,(o=["mousemove","keydown","scroll"]).forEach(function(t){document.addEventListener(t,function e(){clearTimeout(i),i=setTimeout(function(){a(),o.forEach(function(t){return document.removeEventListener(t,e)})},1e3*n)},!1)});break;case"timer":clearTimeout(H),H=setTimeout(it,1e3*R)}},"loading"!==document.readyState?J():document.addEventListener("DOMContentLoaded",J)}(); | ||
!function(){"use strict";function t(){ot&&(document.querySelector("body").style.overflowY=ot),Q.style.display="none","video"===y&&(Q.innerHTML=""),c&&ABTastyEvent(p,null,TEST_ID)}function a(){return Q.querySelector(Z)?(Q.querySelector(Z).addEventListener("click",t),Q.querySelector(tt).addEventListener("click",t),0):setTimeout(a,50)}function e(t,a){return t.matches?t.matches(a):t.msMatchesSelector(a)}function o(t,a,o){document.body.addEventListener("click",function(i){var n=i.target;if(!o||!e(n,o))for(;n;){if(n!==document&&e(n,t)){"buttonAT"===a?ABTastyEvent(g,null,TEST_ID):a();break}n=n.parentNode}})}function i(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],a={layout:N,type:y,borderRadius:w,borderRadiusImage:k,borderWidth:T,borderColor:C,button:E,buttonBackgroundColor:B,buttonLink:I,buttonText:S,buttonTextColor:O,backgroundColor:"imageOnly"!==N?h:"initial",overlayOpacity:v,backgroundImage:x,image:G,width:$,videoLink:R,customWidth:D,animation:f,title:z,closeButtonPosition:W,backgroundCloseButtonColor:A,modalContent:Y||t.outerHTML};if(Q.className="abtasty-modal abtasty-modal--"+y,Q.dataset.testId=TEST_ID,Q.innerHTML=s(a),document.body.appendChild(Q),et=Q.querySelector(".abtasty-modal__area"),L){Q.querySelector(tt+" .close-x").style.stroke=L}}function n(){var t=(window.innerWidth>630?.5*window.innerWidth:window.innerWidth-40)/16*9;return Math.round(t)}function r(){var t="abtasty-widget-video-"+Date.now(),a=document.createElement("iframe");a.setAttribute("id",t);var e=function(t){var a=t.indexOf("youtu")>-1,e=t.indexOf("vimeo")>-1,o=void 0;a?(o="//www.youtube.com/embed/"+t.match(/^.*(youtu.be\/|v\/|e\/|u\/\w+\/|embed\/|v=)([^#&?]*).*/)[2]+"?rel=0",J&&(o+="&autoplay=1")):e&&(o="//player.vimeo.com/video/"+t.match(/.*(www\.)?vimeo.com\/(\d+)($|\/)/)[2]);return o}(R),o=n();a.style.height=o+"px","no-title"===N&&(a.style.border=T+"px solid "+C+"!important",a.style.borderRadius=w+"px!important"),a.src=e,a.frameBorder=0,a.allowfullscreen=!0,i(a),et.style.height=o+"px",window.addEventListener("resize",function(){var t=document.querySelector("abtasty-modal iframe"),a=n();t.style.height=a+"px",et.style.height=a+"px"})}function d(){if(function(){var t=Number(M),a=localStorage.getItem(U);return!(a&&-1!==t&&!V&&!X)||(0===t?!sessionStorage.getItem(U):a<at-24*t*60*60*1e3)}()){if("video"===y)r(),a();else if("image"===y&&"fit"===$){var t=new Image;t.src=G,t.className="abtasty-modal__media",t.onload=function(){i(this),et.style.width=this.width+"px",et.style.height=this.height+"px",a()}}else i(),a();Q.style.display="block",function(){var t=document.querySelector("body");ot=window.getComputedStyle(t).overflowY,t.style.overflowY="hidden"}(),b&&ABTastyEvent(u,null,TEST_ID),V||(localStorage.setItem(U,at),sessionStorage.setItem(U,at)),E&&_&&o(".abtasty-modal__button","buttonAT","")}}!function(t,a){if("undefined"==typeof document)return a;t=t||"";var e=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",e.appendChild(o),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t))}("abtasty-modal{display:none;position:fixed;top:0;left:0;width:100%;height:100%;z-index:2147483647}abtasty-modal:not(.abtasty-modal--video){overflow-y:auto}abtasty-modal__underlay{width:100%;height:100%;position:fixed;top:0;left:0;background-color:rgba(0,0,0,.5);cursor:pointer}.abtasty-modal__area{top:0;left:0;right:0;width:auto;margin:10px!important;z-index:100;position:relative}.abtasty-modal__area-layout--imageOnly{max-width:80%}.abtasty-modal__area-layout--imageOnly img{border-style:solid;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:100%}.abtasty-modal__area-type--video.abtasty-modal__area-layout--no-title .abtasty-modal__content{padding:5px;border-radius:0!important;border-width:0!important;background-color:transparent!important;background-image:none!important}.abtasty-modal__area-type--video.abtasty-modal__area-layout--bottom .abtasty-modal__content{padding:25px 20px 20px}.abtasty-modal .abtasty-modal__content{border-color:#f6f6f6;border-style:solid;padding:20px}.abtasty-modal__area-type--image,.abtasty-modal__area-type--no-title,.abtasty-modal__area-type--simple,.abtasty-modal__area-type--video{margin:0 auto 20px!important;top:10vh;border:none;background:none}.abtasty-modal__area-type--video.abtasty-modal__area-layout--bottom .abtasty-modal__close--inside{top:2px}.abtasty-modal__area-type--video.abtasty-modal__area-layout--top .abtasty-modal__close--inside{right:15px;top:20px}.abtasty-modal__area-type--image .abtasty-modal__close,.abtasty-modal__area-type--simple .abtasty-modal__close{right:10px;top:15px}.abtasty-modal__close{position:absolute;right:5px;top:0;font-size:20px;font-weight:300;background:transparent;border:0;color:#222;font-family:Helvetica Neue,Helvetica,Arial,sans-serif!important;line-height:24px!important;margin-right:5px;cursor:pointer;width:20px;height:20px;padding:0;-webkit-box-sizing:border-box;box-sizing:border-box}.abtasty-modal__close svg{display:block}.abtasty-modal__close svg .close-x{stroke:#5c5c5c;fill:transparent;stroke-linecap:round;stroke-width:3}.abtasty-modal__area-type--video.abtasty-modal__area-layout--no-title .abtasty-modal__close--inside{top:-6px;right:-15px;background:#fff;border-radius:20px;width:20px;height:20px}.abtasty-modal__area-type--image .abtasty-modal__close--outside,.abtasty-modal__area-type--simple .abtasty-modal__close--outside,.abtasty-modal__close--outside,.abtasty-modal__close .abtasty-modal__close--outside{top:-25px;right:-25px;width:20px;height:20px}.abtasty-modal__close--outside{background:#fff;border-radius:20px}.abtasty-modal__media,.abtasty-modal__media-link{max-width:100%;display:block}.abtasty-modal__text{padding:20px;font-family:Open Sans,sans-serif!important;color:#000;overflow:auto}.abtasty-modal__title{width:auto;font-size:20px!important;font-weight:500;line-height:1.1;margin-bottom:10px}.abtasty-modal__text p{margin:0 0 10px!important;font-size:15px;font-weight:300;word-wrap:break-word}.abtasty-modal__button{width:100%;text-align:center;margin-top:20px}.abtasty-modal__button a{padding:10px 20px;border-radius:10px;display:inline-block;font-weight:700}.abtasty-modal__area-type--simple.abtasty-modal__area-layout--center .abtasty-modal__title{text-align:center}.abtasty-modal__area-type--simple.abtasty-modal__area-layout--center .abtasty-modal__innertext{text-align:center;white-space:pre-wrap}.abtasty-modal__area-type--simple.abtasty-modal__area-layout--left .abtasty-modal__title{width:50%;float:left;text-align:center;vertical-align:middle}.abtasty-modal__area-type--simple.abtasty-modal__area-layout--left .abtasty-modal__innertext{width:50%;float:left}.abtasty-modal__area-type--simple.abtasty-modal__area-layout--right .abtasty-modal__title{width:50%;float:left;text-align:center;vertical-align:middle}.abtasty-modal__area-type--simple.abtasty-modal__area-layout--right .abtasty-modal__innertext{width:50%;float:left}.abtasty-modal__area-type--image .abtasty-modal__image img{max-height:400px;max-width:100%;display:inline}.abtasty-modal__area-type--image.abtasty-modal__area-layout--left .abtasty-modal__image{width:50%;display:inline-block;height:auto;vertical-align:middle;text-align:center}.abtasty-modal__area-type--image.abtasty-modal__area-layout--left .abtasty-modal__text{text-align:left;width:50%;display:inline-block;vertical-align:middle;-webkit-box-sizing:border-box;box-sizing:border-box}.abtasty-modal__area-type--image.abtasty-modal__area-layout--right .abtasty-modal__image{width:50%;display:inline-block;height:auto;vertical-align:middle;text-align:center}.abtasty-modal__area-type--image.abtasty-modal__area-layout--right .abtasty-modal__text{text-align:left;width:50%;display:inline-block;vertical-align:middle;-webkit-box-sizing:border-box;box-sizing:border-box}.abtasty-modal__area-type--image.abtasty-modal__area-layout--top .abtasty-modal__image{width:100%;text-align:center}.abtasty-modal__area-type--image.abtasty-modal__area-layout--top .abtasty-modal__text{width:100%;padding:20px 0}.abtasty-modal__area-type--image.abtasty-modal__area-layout--top .abtasty-modal__image img{max-height:300px}.abtasty-modal__area-type--image.abtasty-modal__area-layout--bottom .abtasty-modal__image{width:100%;text-align:center}.abtasty-modal__area-type--image.abtasty-modal__area-layout--bottom .abtasty-modal__text{width:100%;padding:20px 0}.abtasty-modal__area-type--video{text-align:center;width:100%}.abtasty-modal__area-type--video iframe{width:100%}@media (min-width:630px){abtasty-modal:not(.abtasty-modal--video) .abtasty-modal__area-width--medium{width:600px;margin:0 auto 20px!important}.abtasty-modal--video{width:50%;left:25%}}@media (min-width:330px){abtasty-modal:not(.abtasty-modal--video) .abtasty-modal__area-width--small{width:300px;margin:0 auto 20px!important}}@media (min-width:930px){abtasty-modal:not(.abtasty-modal--video) .abtasty-modal__area-width--large{width:900px;margin:0 auto 20px!important}}.abtasty-animation-fadeIn{-webkit-animation-name:a;animation-name:a}.abtasty-animation-fadeIn,.abtasty-animation-fadeOut{-webkit-animation-duration:.5s;animation-duration:.5s}.abtasty-animation-fadeOut{-webkit-animation-name:b;animation-name:b}.abtasty-animation-slideIn{-webkit-animation-name:c;animation-name:c;-webkit-animation-duration:.5s;animation-duration:.5s}.abtasty-animation-slideOut{-webkit-animation-name:d;animation-name:d;-webkit-animation-duration:.5s;animation-duration:.5s}@-webkit-keyframes a{0%{opacity:0}to{opacity:1}}@keyframes a{0%{opacity:0}to{opacity:1}}@-webkit-keyframes b{0%{opacity:1}to{opacity:0}}@keyframes b{0%{opacity:1}to{opacity:0}}@-webkit-keyframes c{0%{-webkit-transform:translateY(-100%);transform:translateY(-100%)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes c{0%{-webkit-transform:translateY(-100%);transform:translateY(-100%)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@-webkit-keyframes d{0%{-webkit-transform:translateY(0);transform:translateY(0)}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}@keyframes d{0%{-webkit-transform:translateY(0);transform:translateY(0)}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}",void 0);var l=function(t){function a(t,e){if(1===arguments.length){for(var i=t[0],n=1;n<t.length;n++)i=a(i,t[n]);return i}for(var r in e)if("class"===r){var d=t[r]||[];t[r]=(Array.isArray(d)?d:[d]).concat(e[r]||[])}else if("style"===r){d=o(t[r]);var l=o(e[r]);t[r]=d+l}else t[r]=e[r];return t}function e(t,a){return Array.isArray(t)?function(t,a){for(var o,i="",r="",d=Array.isArray(a),l=0;l<t.length;l++)(o=e(t[l]))&&(d&&a[l]&&(o=n(o)),i=i+r+o,r=" ");return i}(t,a):t&&"object"==typeof t?function(t){var a="",e="";for(var o in t)o&&t[o]&&d.call(t,o)&&(a=a+e+o,e=" ");return a}(t):t||""}function o(t){if(!t)return"";if("object"==typeof t){var a="";for(var e in t)d.call(t,e)&&(a=a+e+":"+t[e]+";");return a}return";"!==(t+="")[t.length-1]?t+";":t}function i(t,a,e,o){return!1!==a&&null!=a&&(a||"class"!==t&&"style"!==t)?!0===a?" "+(o?t:t+'="'+t+'"'):("function"==typeof a.toJSON&&(a=a.toJSON()),"string"==typeof a||(a=JSON.stringify(a),e||-1===a.indexOf('"'))?(e&&(a=n(a))," "+t+'="'+a+'"'):" "+t+"='"+a.replace(/'/g,"'")+"'"):""}function n(t){var a=""+t,e=l.exec(a);if(!e)return t;var o,i,n,r="";for(o=e.index,i=0;o<a.length;o++){switch(a.charCodeAt(o)){case 34:n=""";break;case 38:n="&";break;case 60:n="<";break;case 62:n=">";break;default:continue}i!==o&&(r+=a.substring(i,o)),i=o+1,r+=n}return i!==o?r+a.substring(i,o):r}function r(t,a,e,o){if(!(t instanceof Error))throw t;if(!("undefined"==typeof window&&a||o))throw t.message+=" on line "+e,t;try{o=o||require("fs").readFileSync(a,"utf8")}catch(a){r(t,null,e)}var i=3,n=o.split("\n"),d=Math.max(e-i,0),l=Math.min(n.length,e+i);i=n.slice(d,l).map(function(t,a){var o=a+d+1;return(o==e?" > ":" ")+o+"| "+t}).join("\n");throw t.path=a,t.message=(a||"Pug")+":"+e+"\n"+i+"\n\n"+t.message,t}var d=Object.prototype.hasOwnProperty;t.merge=a,t.classes=e,t.style=o,t.attr=i,t.attrs=function(t,a){var n="";for(var r in t)if(d.call(t,r)){var l=t[r];if("class"===r){n=i(r,l=e(l),!1,a)+n;continue}"style"===r&&(l=o(l)),n+=i(r,l,!1,a)}return n};var l=/["&<>]/;return t.escape=n,t.rethrow=r,t}({}),s=function(t){var a,e="",o={};try{var i={},n=t||{};(function(t,i,n,r,d,s,m,y,b,u,c,p,_,g,f,h,v,x,w,k,T,C){o.button=a=function(){this&&this.block,this&&this.attributes;e=(e=(e+='<div class="abtasty-modal__button">')+"<a"+(l.attr("href",c,!0,!0)+l.attr("style",l.style({"background-color":u+"!important",color:_+"!important"}),!0,!0))+">")+l.escape(null==(a=p)?"":a)+"</a></div>"},o.title=a=function(){this&&this.block,this&&this.attributes;e=(e+='<h2 class="abtasty-modal__title" style="text-align:center;">')+(null==(a=k)?"":a)+"</h2>"},o.imageOnly=a=function(){this&&this.block,this&&this.attributes;e=e+"<img"+(l.attr("src",h,!0,!0)+l.attr("style",l.style({"border-radius":s+"px!important","border-width":y+"px!important","border-color":d+"!important"}),!0,!0))+">"},o.imageWithText=a=function(){this&&this.block,this&&this.attributes;e+='<div class="abtasty-modal__image">',h&&(e=e+"<img"+(l.attr("src",h,!0,!0)+l.attr("style",l.style({"border-radius":m+"px!important"}),!0,!0))+">"),e+="</div>"},o.content=a=function(){this&&this.block,this&&this.attributes;e+='<div class="abtasty-modal__innertext">',e=(e+="<p>")+(null==(a=x)?"":a)+"</p></div>"},o.closeButton=a=function(){this&&this.block,this&&this.attributes;e=e+"<div"+l.attr("class",l.classes(["abtasty-modal__close",g?"abtasty-modal__close--"+g:""],[!1,!0]),!1,!0)+" data-abtasty-actionnable"+l.attr("style",l.style("outside"===g?{"background-color":i}:""),!0,!0)+">",e+='<svg viewbox="0 0 40 40">',e+='<path class="close-x" d="M 10,10 L 30,30 M 30,10 L 10,30"></path></svg></div>'},o.contentWrapper=a=function(){var t=this&&this.block;this&&this.attributes;e=e+'<div class="abtasty-modal__content"'+l.attr("style",l.style({"border-radius":s+"px!important","border-width":y+"px!important","border-color":d+"!important","background-color":n+"!important","background-image":'url("'+r+'")!important'}),!0,!0)+">",t&&t&&t(),e+="</div>"},o.modalWrapper=a=function(){var a=this&&this.block;this&&this.attributes;e=(e=e+"<abtasty-modal__underlay"+l.attr("style",l.style({"background-color":"rgba(0, 0, 0, "+w/100+")"}),!0,!0)+"></abtasty-modal__underlay>")+"<div"+(l.attr("class",l.classes(["abtasty-animation-"+t+" abtasty-modal__area abtasty-modal__area-width--"+C+" abtasty-modal__area-type--"+T+" abtasty-modal__area-layout--"+v],[!0]),!1,!0)+l.attr("style",l.style({width:"custom"===C&&f+"%","margin-left":"custom"===C&&(100-f)/2+"% !important"}),!0,!0))+">",a&&a&&a(),e+="</div>"},o.modalWrapper.call({block:function(){o.closeButton(),"image"===T&&"imageOnly"===v?(o.imageOnly(),b&&o.button()):o.contentWrapper.call({block:function(){"simple"===T?(e+='<div class="abtasty-modal__text">',"center"===v||"left"===v?(o.title(),o.content(),e+='<div style="clear:both;"></div>'):(o.content(),o.title(),e+='<div style="clear:both;"></div>'),e+="</div>",b&&o.button()):"image"===T?("top"!==v&&"left"!==v||o.imageWithText(),e+='<div class="abtasty-modal__text">',o.title(),o.content(),b&&o.button(),e+="</div>","right"!==v&&"bottom"!==v||o.imageWithText(),e+='<div style="clear:both;"></div>'):"video"===T&&("top"===v&&o.title(),e+=null==(a=x)?"":a,"bottom"===v&&o.title(),b&&o.button())}})}})}).call(this,"animation"in n?n.animation:"undefined"!=typeof animation?animation:void 0,"backgroundCloseButtonColor"in n?n.backgroundCloseButtonColor:"undefined"!=typeof backgroundCloseButtonColor?backgroundCloseButtonColor:void 0,"backgroundColor"in n?n.backgroundColor:"undefined"!=typeof backgroundColor?backgroundColor:void 0,"backgroundImage"in n?n.backgroundImage:"undefined"!=typeof backgroundImage?backgroundImage:void 0,"borderColor"in n?n.borderColor:"undefined"!=typeof borderColor?borderColor:void 0,"borderRadius"in n?n.borderRadius:"undefined"!=typeof borderRadius?borderRadius:void 0,"borderRadiusImage"in n?n.borderRadiusImage:"undefined"!=typeof borderRadiusImage?borderRadiusImage:void 0,"borderWidth"in n?n.borderWidth:"undefined"!=typeof borderWidth?borderWidth:void 0,"button"in n?n.button:"undefined"!=typeof button?button:void 0,"buttonBackgroundColor"in n?n.buttonBackgroundColor:"undefined"!=typeof buttonBackgroundColor?buttonBackgroundColor:void 0,"buttonLink"in n?n.buttonLink:"undefined"!=typeof buttonLink?buttonLink:void 0,"buttonText"in n?n.buttonText:"undefined"!=typeof buttonText?buttonText:void 0,"buttonTextColor"in n?n.buttonTextColor:"undefined"!=typeof buttonTextColor?buttonTextColor:void 0,"closeButtonPosition"in n?n.closeButtonPosition:"undefined"!=typeof closeButtonPosition?closeButtonPosition:void 0,"customWidth"in n?n.customWidth:"undefined"!=typeof customWidth?customWidth:void 0,"image"in n?n.image:"undefined"!=typeof image?image:void 0,"layout"in n?n.layout:"undefined"!=typeof layout?layout:void 0,"modalContent"in n?n.modalContent:"undefined"!=typeof modalContent?modalContent:void 0,"overlayOpacity"in n?n.overlayOpacity:"undefined"!=typeof overlayOpacity?overlayOpacity:void 0,"title"in n?n.title:"undefined"!=typeof title?title:void 0,"type"in n?n.type:"undefined"!=typeof type?type:void 0,"width"in n?n.width:"undefined"!=typeof width?width:void 0)}catch(t){l.rethrow(t,void 0,void 0,i[void 0])}return e},m=DATA,y=m.type,b=m.actionTrackingEventDisplay,u=m.actionTrackingDisplayName,c=m.actionTrackingEventClose,p=m.actionTrackingCloseName,_=m.actionTrackingEventButton,g=m.actionTrackingButtonName,f=m.animation,h=m.backgroundColor,v=m.overlayOpacity,x=m.backgroundImage,w=m.borderRadius,k=m.borderRadiusImage,T=m.borderWidth,C=m.borderColor,E=m.button,B=m.buttonBackgroundColor,I=m.buttonLink,S=m.buttonText,O=m.buttonTextColor,A=m.backgroundCloseButtonColor,L=m.closeButtonColor,W=m.closeButtonPosition,Y=m.content,D=m.customWidth,z=m.title,N=m.layout,R=m.videoLink,M=m.recurrence,q=m.triggerEvent,P=m.triggerEventDelay,H=m.clickEventSelector,j=m.widthImageWithText,F=m.widthImageOnly,J=m.autoPlay,$="imageOnly"===N?F:j,G=DATA.image||"https://gitlab.com/abtasty/public/storage/raw/master/image-placeholder.png",K=void 0,Q=document.createElement("abtasty-modal"),U="AB Tasty Modal "+y+" "+TEST_ID,V=void 0!==window.ABTastyEditor,X=!!sessionStorage.getItem("ABTastyPreview"),Z="abtasty-modal__underlay",tt=".abtasty-modal__close",at=Date.now(),et=void 0,ot=void 0;!function(t){"loading"!==document.readyState?t():document.addEventListener("DOMContentLoaded",t)}(function(){var t=window.top.ABTastyWidgetForm||!1;if(V&&t)d();else if("click"===q)o(H,d,Z+", "+tt);else switch(q){case"pageLoad":d();break;case"exitIntent":!function(t){var a=DATA.exitEventDelay,e=parseFloat(a)||0,o=void 0,i=0;document.addEventListener("mousemove",function(t){i=t.clientY}),document.body.addEventListener("mouseleave",function a(n){n.clientY<=50&&(i=0,clearInterval(o),o=setTimeout(function(){0===i&&(t(),document.body.removeEventListener("mouseleave",a))},1e3*e))},!1)}(d);break;case"reengage":!function(t){var a=DATA.reengageEventDelay,e=["mousemove","keydown","scroll"],o=void 0;e.forEach(function(i){document.addEventListener(i,function i(){clearTimeout(o),o=setTimeout(function(){t(),e.forEach(function(t){return document.removeEventListener(t,i)})},1e3*a)},!1)})}(d);break;case"timer":clearTimeout(K),K=setTimeout(d,1e3*P)}})}(); |
{ | ||
"name": "@abtasty/modal", | ||
"description": "Widget for AB Tasty", | ||
"version": "2.5.5-10", | ||
"version": "2.5.5-11", | ||
"icon": "icon.png", | ||
@@ -36,3 +36,3 @@ "form": "dist/form.js", | ||
"rollup-plugin-buble": "^0.17.0", | ||
"rollup-plugin-commonjs": "^8.3.0", | ||
"rollup-plugin-commonjs": "^8.2.6", | ||
"rollup-plugin-eslint": "^4.0.0", | ||
@@ -47,5 +47,4 @@ "rollup-plugin-node-resolve": "^3.0.0", | ||
"dependencies": { | ||
"@abtasty/widget-utils": "^1.12.0", | ||
"scratchcard-js": "1.3.4" | ||
"@abtasty/widget-utils": "^1.10.0" | ||
} | ||
} |
@@ -0,0 +0,0 @@ # Modal |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
1
1
36568
131
- Removedscratchcard-js@1.3.4
- Removedscratchcard-js@1.3.4(transitive)