Crowdsignal Forms - Version 1.4.3

Version Description

Download this release

Release Info

Developer cgastrell
Plugin Icon wp plugin Crowdsignal Forms
Version 1.4.3
Comparing to
See all releases

Code changes from version 1.3.5 to 1.4.3

README.TXT CHANGED
@@ -4,7 +4,7 @@ Tags: polls, forms, surveys, gutenberg, block
4
  Requires at least: 5.0
5
  Requires PHP: 5.6.20
6
  Tested up to: 5.6
7
- Stable tag: 1.3.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -67,6 +67,10 @@ Compare our [simple and affordable plans](https://crowdsignal.com/pricing/) or t
67
 
68
  == Changelog ==
69
 
 
 
 
 
70
  = 1.3.5 =
71
  * Show branding on editor and a message when free signals are exhausted (#11)
72
  * Remove redirect URL feature (#12)
@@ -81,37 +85,10 @@ Compare our [simple and affordable plans](https://crowdsignal.com/pricing/) or t
81
  * Use default theme font for Applause count (#3)
82
  * Fix applause branding styles (#4)
83
 
84
- = 1.3.0 =
85
- * Track vote to be able to tell when user has already "clapped" (#355)
86
- * Fix undefined warnings (#349)
87
- * Fix applause icon sizes (#352)
88
- * Update hover effects (#353)
89
- * Fixes for missing vote props (#348)
90
- * Update Applause block meta (#341)
91
- * Make disabled state not react to hover nor click (#345)
92
- * Fix block paddings (#346)
93
- * Add border controls for applause block (#344)
94
- * Update composer libs (#347)
95
- * Pass required attribute to vote-item component (#343)
96
- * Add correct applause icon & animation (#337)
97
- * Update/referral link applause block (#333)
98
- * Update applause count parameter (#331)
99
- * Make clap text and count not selectable (#327)
100
- * Allow the colours of the applause block to be changed (#322)
101
- * Add branding to Applause Block (#326)
102
- * Display the applause claps from the API (#325)
103
- * Queue Claps On Click (#324)
104
- * Check for applause block when deciding if a poll block
105
- * Add close status to sidebar and close visual effect.
106
- * Add/block sizes (#316)
107
- * Add a thumbs up icon (placeholder) and some margin around it.
108
- * add support for syncing applause block type to crowdsignal (#318)
109
- * Add skeleton of applause block (#314)
110
-
111
  == Upgrade Notice ==
112
 
113
- = 1.3.5 =
114
- Stability and security fixes. Please update.
115
 
116
  = 0.9 =
117
  Initial release
4
  Requires at least: 5.0
5
  Requires PHP: 5.6.20
6
  Tested up to: 5.6
7
+ Stable tag: 1.4.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
67
 
68
  == Changelog ==
69
 
70
+ = 1.4.3 =
71
+ * Add NPS block
72
+ * Fixed redirect logic for the poll block
73
+
74
  = 1.3.5 =
75
  * Show branding on editor and a message when free signals are exhausted (#11)
76
  * Remove redirect URL feature (#12)
85
  * Use default theme font for Applause count (#3)
86
  * Fix applause branding styles (#4)
87
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
88
  == Upgrade Notice ==
89
 
90
+ = 1.4.3 =
91
+ Introduce new NPS block
92
 
93
  = 0.9 =
94
  Initial release
build/apifetch.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => 'a67b4035c2c5ab289ad85a0ea4436959');
build/apifetch.js ADDED
@@ -0,0 +1 @@
 
1
+ window.crowdsignalForms=window.crowdsignalForms||{},window.crowdsignalForms.apiFetch=function(r){var e={};function t(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return r[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=r,t.c=e,t.d=function(r,e,n){t.o(r,e)||Object.defineProperty(r,e,{enumerable:!0,get:n})},t.r=function(r){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},t.t=function(r,e){if(1&e&&(r=t(r)),8&e)return r;if(4&e&&"object"==typeof r&&r&&r.__esModule)return r;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:r}),2&e&&"string"!=typeof r)for(var o in r)t.d(n,o,function(e){return r[e]}.bind(null,o));return n},t.n=function(r){var e=r&&r.__esModule?function(){return r.default}:function(){return r};return t.d(e,"a",e),e},t.o=function(r,e){return Object.prototype.hasOwnProperty.call(r,e)},t.p="",t(t.s=12)}([function(r,e){!function(){r.exports=this.regeneratorRuntime}()},function(r,e){r.exports=function(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}},function(r,e,t){var n=t(11);r.exports=function(r,e){if(null==r)return{};var t,o,i=n(r,e);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(r);for(o=0;o<u.length;o++)t=u[o],e.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(r,t)&&(i[t]=r[t])}return i}},function(r,e){function t(r,e,t,n,o,i,u){try{var c=r[i](u),a=c.value}catch(f){return void t(f)}c.done?e(a):Promise.resolve(a).then(n,o)}r.exports=function(r){return function(){var e=this,n=arguments;return new Promise((function(o,i){var u=r.apply(e,n);function c(r){t(u,o,i,c,a,"next",r)}function a(r){t(u,o,i,c,a,"throw",r)}c(void 0)}))}}},function(r,e){!function(){r.exports=this.lodash}()},function(r,e,t){var n=t(6),o=t(7),i=t(8),u=t(10);r.exports=function(r){return n(r)||o(r)||i(r)||u()}},function(r,e){r.exports=function(r){if(Array.isArray(r))return r}},function(r,e){r.exports=function(r){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(r))return Array.from(r)}},function(r,e,t){var n=t(9);r.exports=function(r,e){if(r){if("string"==typeof r)return n(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?n(r,e):void 0}}},function(r,e){r.exports=function(r,e){(null==e||e>r.length)&&(e=r.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=r[t];return n}},function(r,e){r.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(r,e){r.exports=function(r,e){if(null==r)return{};var t,n,o={},i=Object.keys(r);for(n=0;n<i.length;n++)t=i[n],e.indexOf(t)>=0||(o[t]=r[t]);return o}},function(r,e,t){"use strict";t.r(e);var n=t(0),o=t.n(n),i=t(1),u=t.n(i),c=t(5),a=t.n(c),f=t(2),s=t.n(f),p=t(3),l=t.n(p),d=t(4);function b(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.push.apply(t,n)}return t}function y(r){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?b(Object(t),!0).forEach((function(e){u()(r,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):b(Object(t)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(t,e))}))}return r}function O(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.push.apply(t,n)}return t}function w(r){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?O(Object(t),!0).forEach((function(e){u()(r,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):O(Object(t)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(t,e))}))}return r}var m=[],v=function(){var r=l()(o.a.mark((function r(e,t){var n,i,u,c,f,p;return o.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(n=e.path,i=s()(e,["path"]),u=a()(t),c=u[0],f=u.slice(1),c){r.next=7;break}return r.next=5,window.fetch(n,i);case 5:return p=r.sent,r.abrupt("return",p.json());case 7:return r.abrupt("return",c(w({path:n},i),(function(r){return v(r,f)})));case 8:case"end":return r.stop()}}),r)})));return function(e,t){return r.apply(this,arguments)}}(),h=function(){var r=l()(o.a.mark((function r(e){return o.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",v(e,m));case 1:case"end":return r.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}();h.use=function(r){return m.push(r)},h.disable=function(r){var e=Object(d.findIndex)(m,(function(e){return e===r}));e&&m.splice(e,1)},h.middleware={defaultHeaders:function(r,e){return e(y({},r,{headers:y({},r.headers||{},{Accept:"application/json, */*;q=0.1"})}))},formatURL:function(r,e){return 0===r.path.indexOf("/crowdsignal-forms/v1")&&(r.path="/wp-json".concat(r.path)),e(r)},formatRequest:function(r,e){var t=r.data,n=s()(r,["data"]);return e(t?y({},n,{headers:y({},n.headers,{"Content-Type":"application/json"}),body:JSON.stringify(t)}):n)},wpAuth:function(r,e){return window._crowdsignalFormsWpNonce?e(y({credentials:"same-origin",mode:"same-origin"},r,{headers:y({"X-WP-Nonce":window._crowdsignalFormsWpNonce},r.headers)})):e(r)}},Object(d.forEach)(h.middleware,h.use);e.default=h}]).default;
build/applause.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '581cb364c6c2de8b4147042e4bbe4eba');
1
+ <?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '0ff75d4f028ce1ff905eb17ff4fb5764');
build/applause.js CHANGED
@@ -10,4 +10,4 @@
10
  *
11
  * Copyright 2006, 2015 Klaus Hartl & Fagner Brack
12
  * Released under the MIT license
13
- */!function(a){if(void 0===(o="function"==typeof(r=a)?r.call(t,n,t,e):r)||(e.exports=o),!0,e.exports=a(),!!0){var i=window.Cookies,c=window.Cookies=a();c.noConflict=function(){return window.Cookies=i,c}}}((function(){function e(){for(var e=0,t={};e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}function t(e){return e.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function n(r){function o(){}function a(t,n,a){if("undefined"!=typeof document){"number"==typeof(a=e({path:"/"},o.defaults,a)).expires&&(a.expires=new Date(1*new Date+864e5*a.expires)),a.expires=a.expires?a.expires.toUTCString():"";try{var i=JSON.stringify(n);/^[\{\[]/.test(i)&&(n=i)}catch(u){}n=r.write?r.write(n,t):encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var c="";for(var s in a)a[s]&&(c+="; "+s,!0!==a[s]&&(c+="="+a[s].split(";")[0]));return document.cookie=t+"="+n+c}}function i(e,n){if("undefined"!=typeof document){for(var o={},a=document.cookie?document.cookie.split("; "):[],i=0;i<a.length;i++){var c=a[i].split("="),s=c.slice(1).join("=");n||'"'!==s.charAt(0)||(s=s.slice(1,-1));try{var u=t(c[0]);if(s=(r.read||r)(s,u)||t(s),n)try{s=JSON.parse(s)}catch(l){}if(o[u]=s,e===u)break}catch(l){}}return e?o[e]:o}}return o.set=a,o.get=function(e){return i(e,!1)},o.getJSON=function(e){return i(e,!0)},o.remove=function(t,n){a(t,"",e(n,{expires:-1}))},o.defaults={},o.withConverter=n,o}((function(){}))}))},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t){!function(){e.exports=this.wp.blocks}()},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){var r=n(12);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},function(e,t){!function(){e.exports=this.wp.apiFetch}()},function(e,t,n){var r=n(18);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}},function(e,t,n){var r=n(31),o=n(32),a=n(17),i=n(33);e.exports=function(e){return r(e)||o(e)||a(e)||i()}},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n.apply(this,arguments)}e.exports=n},function(e,t,n){var r=n(34);e.exports=function(e,t){if(null==e)return{};var n,o,a=r(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}},function(e,t){!function(){e.exports=this.wp.components}()},function(e,t,n){var r=n(35),o=n(36);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t}},function(e,t,n){var r=n(10),o=n(12),a=n(37),i=n(38);function c(t){var n="function"==typeof Map?new Map:void 0;return e.exports=c=function(e){if(null===e||!a(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return i(e,arguments,r(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),o(t,e)},c(t)}e.exports=c},function(e,t){!function(){e.exports=this.ReactDOM}()},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,a=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(s){o=!0,a=s}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return n}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,n){"use strict";var r=n(30);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){var r=n(18);e.exports=function(e){if(Array.isArray(e))return r(e)}},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){e.exports=function(e){return-1!==Function.toString.call(e).indexOf("[native code]")}},function(e,t,n){var r=n(12),o=n(39);function a(t,n,i){return o()?e.exports=a=Reflect.construct:e.exports=a=function(e,t,n){var o=[null];o.push.apply(o,t);var a=new(Function.bind.apply(e,o));return n&&r(a,n.prototype),a},a.apply(null,arguments)}e.exports=a},function(e,t){e.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}},function(e,t,n){"use strict";n.r(t);var r,o=n(0),a=n(2),i=n(5),c=n.n(i),s=n(9),u=n.n(s),l=n(3),f=(n(19),n(7)),p=n.n(f),d=(n(13),n(8)),b=n(1),m=n.n(b),O=(Object.freeze({THANK_YOU:"thank-you",CUSTOM_TEXT:"custom-text",REDIRECT:"redirect",RESULTS:"results"}),Object.freeze({THEME_DEFAULT:"theme-default",GEORGIA:"georgia",PALATINO:"palatino",TIMES_NEW_ROMAN:"times-new-roman",ARIAL:"arial",IMPACT:"impact",LUCIDA:"lucida",TAHOMA:"tahoma",TREBUCHET:"trebuchet",VERDANA:"verdana",COURIER:"courier",CABIN:"Cabin",CHIVO:"Chivo",OPEN_SANS:"Open+Sans",FIRA_SANS:"Fira+Sans",ROBOTO:"Roboto",NUNITO:"Nunito",OVERPASS:"Overpass",LATO:"Lato",LIBRE_FRANKLIN:"Libre+Franklin",MONTSERRAT:"Montserrat",POPPINS:"Poppins",RUBIK:"Rubik",RALEWAY:"Raleway",JOSEFIN_SANS:"Josefin+Sans",ALEGREYA_SANS:"Alegreya+Sans",OSWALD:"Oswald"})),h=(Object.freeze([O.CABIN,O.CHIVO,O.OPEN_SANS,O.FIRA_SANS,O.ROBOTO,O.NUNITO,O.OVERPASS,O.LATO,O.LIBRE_FRANKLIN,O.MONTSERRAT,O.POPPINS,O.RUBIK,O.RALEWAY,O.JOSEFIN_SANS,O.ALEGREYA_SANS,O.OSWALD]),Object.freeze((r={},m()(r,O.THEME_DEFAULT,null),m()(r,O.GEORGIA,"Georgia, serif"),m()(r,O.PALATINO,'"Palatino Linotype", "Book Antiqua", Palatino, serif'),m()(r,O.TIMES_NEW_ROMAN,'"Times New Roman", Times, serif'),m()(r,O.ARIAL,"Arial, Helvetica, sans-serif"),m()(r,O.IMPACT,"Impact, Charcoal, sans-serif"),m()(r,O.LUCIDA,'"Lucida Sans Unicode", "Lucida Grande", sans-serif'),m()(r,O.TAHOMA,"Tahoma, Geneva, sans-serif"),m()(r,O.TREBUCHET,'"Trebuchet MS", Helvetica, sans-serif'),m()(r,O.VERDANA,"Verdana, Geneva, sans-serif"),m()(r,O.COURIER,'"Courier New", Courier, monospace'),m()(r,O.CABIN,'"Cabin", sans-serif'),m()(r,O.CHIVO,'"Chivo", sans-serif'),m()(r,O.OPEN_SANS,'"Open Sans", sans-serif'),m()(r,O.FIRA_SANS,'"Fira Sans", sans-serif'),m()(r,O.ROBOTO,'"Roboto", sans-serif'),m()(r,O.NUNITO,'"Nunito", sans-serif'),m()(r,O.OVERPASS,'"Overpass", sans-serif'),m()(r,O.LATO,'"Lato", sans-serif'),m()(r,O.LIBRE_FRANKLIN,'"Libre Franklin", sans-serif'),m()(r,O.MONTSERRAT,'"Montserrat", sans-serif'),m()(r,O.POPPINS,'"Poppins", sans-serif'),m()(r,O.RUBIK,'"Rubik", sans-serif'),m()(r,O.RALEWAY,'"Raleway", sans-serif'),m()(r,O.JOSEFIN_SANS,'"Josefin Sans", sans-serif'),m()(r,O.ALEGREYA_SANS,'"Alegreya Sans", sans-serif'),m()(r,O.OSWALD,'"Oswald", sans-serif'),r)),Object.freeze({OPEN:"open",CLOSED:"closed",CLOSED_AFTER:"closed-after"})),y=(Object.freeze({SHOW_RESULTS:"show-results",SHOW_CLOSED_BANNER:"show-closed-banner",HIDDEN:"hidden"}),Object.freeze({CONNECTED:"connected",NOT_CONNECTED:"not-connected",NOT_VERIFIED:"not-verified"}),Object.freeze({RADIO:"radio",BUTTON:"button"}),Object.freeze({LIST:"list",INLINE:"inline"}),function(e){for(var t=window.getComputedStyle(e).backgroundColor;"rgba(0, 0, 0, 0)"===t&&e.parentNode&&e.parentNode.nodeType===window.Node.ELEMENT_NODE;)e=e.parentNode,t=window.getComputedStyle(e).backgroundColor;return t}),v=n(20),w=n.n(v),C=n(21),g=n.n(C),S=n(22),E=function(e){var t=e.children;return Object(o.createElement)("div",{className:"crowdsignal-forms__style-probe"},t)},x=n(4),j=n.n(x),L=n(6),A=n.n(L),R=n(11),N=n.n(R),_=n(14),T=n.n(_),I=n(15),P=n.n(I),k=n(23),D=n.n(k),M=n(10),F=n.n(M),U=n(24),B=n.n(U);n(16);function H(e){return function(){var t,n=F()(e);if(W()){var r=F()(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return D()(this,t)}}function W(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var V=function(){var e=A()(j.a.mark((function e(t){var n,r,o=arguments;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=!(o.length>1&&void 0!==o[1])||o[1],r="https://api.crowdsignal.com/v3/polls",n){e.next=4;break}return e.abrupt("return",null);case 4:return e.abrupt("return",window.fetch("".concat(r,"/").concat(t,"/results"),{method:"GET",headers:{"content-type":"application/json"}}).then((function(e){if(e.status>=200&&e.status<300)return e.json();throw e})).then((function(e){if(404===e.status)return{};if(e.error)throw new Error(e.message);return e.results.votes_by_answer})));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),G=function(){var e=A()(j.a.mark((function e(t){var n,r,o;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"5430eeac3911395001d731d9702fc38b",n=(new Date).getTime(),e.next=4,window.fetch("https://polldaddy.com/n/".concat("5430eeac3911395001d731d9702fc38b","/").concat(t,"?").concat(n,"&format=json"));case 4:if((r=e.sent).ok){e.next=7;break}throw new J;case 7:return e.next=9,r.json();case 9:if((o=e.sent).nonce){e.next=12;break}throw new J;case 12:return e.abrupt("return",o.nonce);case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),z=function(){var e=A()(j.a.mark((function e(t,n,r,o){var a,i,c;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=r.join(","),e.next=3,window.fetch("https://polls.polldaddy.com/vote-js.php?format=json&p=".concat(n,"&b=1&a=").concat(a,"&o=&va=16&cookie=0&n=").concat(t,"&url=").concat(encodeURIComponent(window.location),"&vi=").concat(o));case 3:if((i=e.sent).ok){e.next=6;break}throw new J;case 6:return e.next=8,i.json();case 8:if("error"!==(c=e.sent).status){e.next=11;break}throw new K(c.error);case 11:case"end":return e.stop()}}),e)})));return function(t,n,r,o){return e.apply(this,arguments)}}(),K=function(e){P()(n,e);var t=H(n);function n(){return T()(this,n),t.apply(this,arguments)}return n}(B()(Error)),J=function(e){P()(n,e);var t=H(n);function n(){return T()(this,n),t.call(this,Object(d.__)("Server error. Please try again.","crowdsignal-forms"))}return n}(K),Y=function(e,t){var n=Object(a.useState)(null),r=c()(n,2),o=r[0],i=r[1],s=Object(a.useState)(null),u=c()(s,2),l=u[0],f=u[1],p=Object(a.useState)(!0),d=c()(p,2),b=d[0],m=d[1];return Object(a.useEffect)((function(){m(!0),f(null),i(null),e().then(i).catch(f).finally((function(){return m(!1)}))}),t),{data:o,error:l,loading:b}},q=function(e){var t=e.showBranding,n=e.referralCode;return Object(o.createElement)("div",{className:"crowdsignal-forms__branding"},t&&Object(o.createElement)("a",{className:"crowdsignal-forms__branding-link with-external-icon",href:"https://crowdsignal.com?ref=".concat(n),target:"blank",rel:"noopener noreferrer"},Object(d.__)("Powered by Crowdsignal","crowdsignal-forms")),!t&&Object(o.createElement)("span",{className:"crowdsignal-forms__branding-link"}," "))};q.propTypes={showBranding:u.a.bool,referralCode:u.a.string.isRequired};var Z=q,X=function(e){var t=e.active,n=e.className,r=p()("crowdsignal-forms-applause__animation",n,{"is-active":t});return Object(o.createElement)("svg",{className:r,width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)("g",{className:"crowdsignal-forms-applause__animation-right"},Object(o.createElement)("path",{className:"crowdsignal-forms-applause__animation-inner-fill",fillRule:"evenodd",clipRule:"evenodd",d:"M24.5287 18.5813L21.719 22.432C20.771 23.7312 18.9509 24.0157 17.6517 23.0676L9.50948 17.1265C8.6982 16.5345 8.52021 15.3957 9.11218 14.5844C9.18511 14.4845 9.26979 14.3931 9.35606 14.3119L9.19145 14.1918C8.38017 13.5998 8.20218 12.461 8.79415 11.6497C8.93571 11.4557 9.10825 11.2933 9.30319 11.1743C9.10822 10.6266 9.17716 10.0013 9.54606 9.49567C10.1123 8.71967 11.1811 8.52659 11.9839 9.03133C12.0392 8.91852 12.1004 8.81 12.1733 8.71006C12.7653 7.89878 13.9042 7.72079 14.7154 8.31276L20.3297 12.4094L20.611 10.4435C20.6949 9.84704 21.1499 9.35925 21.7392 9.23069L23.703 8.79878L25.0454 16.3547C25.1822 17.1302 24.992 17.9464 24.5287 18.5813Z"}),Object(o.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M24.5287 18.5813L21.719 22.432C20.771 23.7312 18.9509 24.0157 17.6517 23.0676L9.50948 17.1265C8.6982 16.5345 8.52021 15.3957 9.11218 14.5844C9.18511 14.4845 9.26979 14.3931 9.35606 14.3119L9.19145 14.1918C8.38017 13.5998 8.20218 12.461 8.79415 11.6497C8.93571 11.4557 9.10825 11.2933 9.30319 11.1743C9.10822 10.6266 9.17716 10.0013 9.54606 9.49567C10.1123 8.71967 11.1811 8.52659 11.9839 9.03133C12.0392 8.91852 12.1004 8.81 12.1733 8.71006C12.7653 7.89878 13.9042 7.72079 14.7154 8.31276L20.3297 12.4094L20.611 10.4435C20.6949 9.84704 21.1499 9.35925 21.7392 9.23069L23.703 8.79878L25.0454 16.3547C25.1822 17.1302 24.992 17.9464 24.5287 18.5813ZM23.6104 16.605L22.538 10.5434L22.0547 10.6502L21.4234 15.0093L13.8574 9.48855C13.8574 9.48855 13.4691 9.4034 13.349 9.56801C13.2288 9.73262 13.2638 9.95632 13.4284 10.0764L17.667 13.1693L16.8091 14.345L11.2301 10.2742C11.0655 10.1541 10.8418 10.189 10.7217 10.3536C10.6016 10.5182 10.6365 10.7419 10.8012 10.862L16.3802 14.9329L15.5222 16.1087L10.4782 12.4282C10.3136 12.3081 10.0899 12.343 9.96978 12.5076C9.84967 12.6722 9.88463 12.8959 10.0492 13.0161L15.0933 16.6966L14.2353 17.8723L10.7962 15.3629C10.6316 15.2428 10.4079 15.2777 10.2878 15.4423C10.1677 15.607 10.2027 15.8307 10.3673 15.9508L18.5094 21.8919C19.1561 22.3638 20.0713 22.2207 20.5431 21.5741L23.3571 17.7175C23.5888 17.4001 23.6766 16.9957 23.6104 16.605Z"})),Object(o.createElement)("g",{className:"crowdsignal-forms-applause__animation-left"},Object(o.createElement)("path",{className:"crowdsignal-forms-applause__animation-inner-fill",fillRule:"evenodd",clipRule:"evenodd",d:"M21.2292 18.7813L18.4195 22.632C17.4715 23.9312 15.6513 24.2157 14.3521 23.2676L6.20992 17.3265C5.39864 16.7345 5.22065 15.5957 5.81262 14.7844C5.88554 14.6845 5.97023 14.5931 6.0565 14.5119L5.89189 14.3918C5.08061 13.7998 4.90262 12.661 5.49459 11.8497C5.63615 11.6557 5.80869 11.4933 6.00363 11.3743C5.80866 10.8266 5.8776 10.2013 6.2465 9.69567C6.81274 8.91967 7.88153 8.72658 8.68439 9.23133C8.73968 9.11852 8.80084 9.01 8.87377 8.91006C9.46573 8.09878 10.6046 7.92079 11.4159 8.51276L17.0302 12.6094L17.3115 10.6435C17.3953 10.047 17.8504 9.55925 18.4397 9.43069L20.4034 8.99877L21.7458 16.5547C21.8826 17.3302 21.6925 18.1464 21.2292 18.7813Z"}),Object(o.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21.2292 18.7813L18.4195 22.632C17.4715 23.9312 15.6513 24.2157 14.3521 23.2676L6.20992 17.3265C5.39864 16.7345 5.22065 15.5957 5.81262 14.7844C5.88554 14.6845 5.97023 14.5931 6.0565 14.5119L5.89189 14.3918C5.08061 13.7998 4.90262 12.661 5.49459 11.8497C5.63615 11.6557 5.80869 11.4933 6.00363 11.3743C5.80866 10.8266 5.8776 10.2013 6.2465 9.69567C6.81274 8.91967 7.88153 8.72658 8.68439 9.23133C8.73968 9.11852 8.80084 9.01 8.87377 8.91006C9.46573 8.09878 10.6046 7.92079 11.4159 8.51276L17.0302 12.6094L17.3115 10.6435C17.3953 10.047 17.8504 9.55925 18.4397 9.43069L20.4034 8.99877L21.7458 16.5547C21.8826 17.3302 21.6925 18.1464 21.2292 18.7813ZM20.3108 16.805L19.2384 10.7434L18.7551 10.8502L18.1239 15.2093L10.5578 9.68854C10.5578 9.68854 10.1695 9.6034 10.0494 9.76801C9.92928 9.93261 9.96425 10.1563 10.1289 10.2764L14.3675 13.3692L13.5096 14.545L7.93056 10.4742C7.76595 10.354 7.54224 10.389 7.42213 10.5536C7.30202 10.7182 7.33699 10.9419 7.50159 11.062L13.0806 15.1329L12.2227 16.3087L7.17864 12.6282C7.01403 12.5081 6.79033 12.543 6.67022 12.7076C6.55011 12.8722 6.58507 13.0959 6.74968 13.216L11.7937 16.8965L10.9358 18.0723L7.49667 15.5629C7.33206 15.4428 7.10836 15.4777 6.98825 15.6423C6.86814 15.8069 6.9031 16.0307 7.06771 16.1508L15.2099 22.0919C15.8566 22.5638 16.7717 22.4207 17.2436 21.7741L20.0576 17.9175C20.2892 17.6001 20.3771 17.1957 20.3108 16.805Z"})),Object(o.createElement)("g",{className:"crowdsignal-forms-applause__animation-wave-small"},Object(o.createElement)("rect",{x:"15.4854",y:"4.42176",width:"1.5",height:"3",transform:"rotate(8 15.4854 4.42176)"}),Object(o.createElement)("rect",{x:"19.9369",y:"5.15548",width:"1.5",height:"3",transform:"rotate(43 19.9369 5.15548)"}),Object(o.createElement)("rect",{x:"11.1523",y:"4.78963",width:"1.5",height:"3",transform:"rotate(-27 11.1523 4.78963)"})),Object(o.createElement)("g",{className:"crowdsignal-forms-applause__animation-wave-large"},Object(o.createElement)("rect",{x:"23.453",y:"2.41095",width:"1.5",height:"3",transform:"rotate(38 23.453 2.41095)"}),Object(o.createElement)("rect",{x:"26.9413",y:"5.27211",width:"1.5",height:"3",transform:"rotate(73 26.9413 5.27211)"}),Object(o.createElement)("rect",{x:"19.5165",y:"0.562988",width:"1.5",height:"3",transform:"rotate(3 19.5165 0.562988)"}),Object(o.createElement)("rect",{width:"1.5",height:"3",transform:"matrix(-0.788011 0.615662 0.615662 0.788011 8.52597 2.41095)"}),Object(o.createElement)("rect",{width:"1.5",height:"3",transform:"matrix(-0.292372 0.956305 0.956305 0.292372 5.03775 5.27211)"}),Object(o.createElement)("rect",{width:"1.5",height:"3",transform:"matrix(-0.99863 0.052336 0.052336 0.99863 12.4625 0.562988)"})))},$=function(e){var t,n=e.attributes,r=e.fallbackStyles,i=e.renderStyleProbe,s=n.apiPollData?n.apiPollData.id:null,u=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r="cs-poll-".concat(e),o=Object(a.useState)(!1),i=c()(o,2),s=i[0],u=i[1],l=Object(a.useState)(!1),f=c()(l,2),p=f[0],d=f[1],b=Object(a.useState)(""),m=c()(b,2),O=m[0],h=m[1];Object(a.useEffect)((function(){t&&void 0!==N.a.get(r)&&(d(!0),h(N.a.get(r)))}),[]);var y=function(){var o=A()(j.a.mark((function o(a){var i,c,s,l=arguments;return j.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return i=l.length>1&&void 0!==l[1]?l[1]:1,o.prev=1,u(!0),o.next=5,G(e);case 5:return c=o.sent,o.next=8,z(c,e,a,i);case 8:d(!0),t&&(s=n?a.join(","):(new Date).getTime(),N.a.set(r,s,{sameSite:"Strict",expires:365}),h(s));case 10:return o.prev=10,u(!1),o.finish(10);case 13:case"end":return o.stop()}}),o,null,[[1,,10,13]])})));return function(e){return o.apply(this,arguments)}}();return{hasVoted:p,isVoting:s,vote:y,storedCookieValue:O}}(s,!0),f=u.hasVoted,d=u.vote,b=Object(a.useState)(0),m=c()(b,2),O=m[0],y=m[1],v=Object(a.useState)(0),w=c()(v,2),C=w[0],g=w[1],S=Object(a.useState)(null),E=c()(S,2),x=E[0],L=E[1],R=Object(a.useState)(!1),_=c()(R,2),T=_[0],I=_[1],P=Object(a.useState)(null),k=c()(P,2),D=k[0],M=k[1],F=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=Y((function(){return V(e,t)}),[e]),r=n.data,o=n.error,a=n.loading;return{error:o,loading:a,results:r}}(s).results,U=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Date;if(h.CLOSED===e)return!0;if(h.CLOSED_AFTER===e){var r=new Date(t);return r<n}return!1}(n.pollStatus,n.closedAfterDateTime),B=function(){if(null!==s&&!U){D&&clearTimeout(D),I(!0),M(setTimeout((function(){I(!1)}),200));var e=C+1;g(e),y(O+1);var t=n.apiPollData.answers[0].id;null!==x&&clearTimeout(x);var r=setTimeout((function(){d([t],e),L(null),g(0)}),1e3);L(r)}},H=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return p()({"has-bg-color":e.backgroundColor,"has-text-color":e.textColor,"has-border-color":e.borderColor},n)}(n,"crowdsignal-forms-applause",n.className,"size-".concat(n.size),{"is-closed":U}),W=function(e,t){var n=Object(l.isEmpty)(e.textColor)?t.text:e.textColor;return Object(l.mapKeys)({bgColor:e.backgroundColor||t.surface,textColor:n,hoverColor:t.accent,borderRadius:"".concat(e.borderRadius||0,"px"),borderWidth:"".concat(e.borderWidth||0,"px"),borderColor:e.borderColor},(function(e,t){return"--crowdsignal-forms-applause-".concat(Object(l.kebabCase)(t))}))}(n,r),K=(null!==F?Object(l.values)(F)[0]:0)+O;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)("div",{className:H,style:W,onClick:B,onKeyPress:B,role:"button",tabIndex:0},Object(o.createElement)(X,{active:T}),Object(o.createElement)("p",{className:"crowdsignal-forms-applause__count"},(t=K)?t>=1e7?"".concat(Object(l.round)(t/1e6),"M"):t>=1e6?"".concat((t/1e6).toFixed(1),"M"):t>=1e4?"".concat(Object(l.round)(t/1e3),"K"):t>=1e3?"".concat((t/1e3).toFixed(1),"K"):t.toString():"0"," Claps"),i()),Object(o.createElement)(Z,{showBranding:f&&!n.hideBranding,referralCode:"cs-forms-applause"}))};$.propTypes={className:u.a.string};var Q,ee,te=(Q=function(){return Object(o.createElement)(o.Fragment,null,Object(o.createElement)("p",null),Object(o.createElement)("div",{className:"wp-block-button"},Object(o.createElement)("div",{className:"wp-block-button__link"})))},ee=function(e){if(null===e)return{};var t,n=e.querySelector(".wp-block-button__link"),r=e.querySelector("p"),o=y(r),a=window.getComputedStyle(r).color,i=y(n),c=(t=n,"0px"!==window.getComputedStyle(t).borderBlockStartWidth?window.getComputedStyle(t).borderBlockStartColor:null),s=i;return s===o&&(s=c||a),{accent:s,surface:o,text:a}},function(e){return Object(S.withFallbackStyles)((function(e){return{fallbackStyles:ee(e.querySelector(".crowdsignal-forms__style-probe"))}}))((function(t){var n=t.fallbackStyles,r=g()(t,["fallbackStyles"]);return Object(o.createElement)(e,w()({fallbackStyles:n||{},renderStyleProbe:function(){return n?null:Object(o.createElement)(E,null,Object(o.createElement)(Q,null))}},r))}))})($),ne=n(25),re=function(e,t){return Object(l.forEach)(document.querySelectorAll("div[".concat(e,"]")),(function(n){try{var r=JSON.parse(n.dataset[Object(l.camelCase)(e.substr("data-".length))]),o=t(r,n);n.removeAttribute(e),Object(ne.render)(o,n)}catch(a){console.error("Crowdsignal Forms: Failed to parse block data for: %s",e)}}))},oe=function(e,t){(Object(l.isEmpty)(window.CrowdsignalMutationObservers)||!0!==window.CrowdsignalMutationObservers[e])&&(new window.MutationObserver((function(){return re(e,t)})).observe(document.body,{attributes:!0,attributeFilter:[e],childList:!0,subtree:!0}),Object(l.isEmpty)(window.CrowdsignalMutationObservers)&&(window.CrowdsignalMutationObservers=[]),window.CrowdsignalMutationObservers[e]=!0,re(e,t))};(function(e,t){if("complete"===document.readyState)return oe(e,t);window.addEventListener("load",(function(){return oe(e,t)}))})("data-crowdsignal-applause",(function(e){return Object(o.createElement)(te,{attributes:e})}))}]));
10
  *
11
  * Copyright 2006, 2015 Klaus Hartl & Fagner Brack
12
  * Released under the MIT license
13
+ */!function(a){if(void 0===(o="function"==typeof(r=a)?r.call(t,n,t,e):r)||(e.exports=o),!0,e.exports=a(),!!0){var i=window.Cookies,c=window.Cookies=a();c.noConflict=function(){return window.Cookies=i,c}}}((function(){function e(){for(var e=0,t={};e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}function t(e){return e.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function n(r){function o(){}function a(t,n,a){if("undefined"!=typeof document){"number"==typeof(a=e({path:"/"},o.defaults,a)).expires&&(a.expires=new Date(1*new Date+864e5*a.expires)),a.expires=a.expires?a.expires.toUTCString():"";try{var i=JSON.stringify(n);/^[\{\[]/.test(i)&&(n=i)}catch(u){}n=r.write?r.write(n,t):encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var c="";for(var s in a)a[s]&&(c+="; "+s,!0!==a[s]&&(c+="="+a[s].split(";")[0]));return document.cookie=t+"="+n+c}}function i(e,n){if("undefined"!=typeof document){for(var o={},a=document.cookie?document.cookie.split("; "):[],i=0;i<a.length;i++){var c=a[i].split("="),s=c.slice(1).join("=");n||'"'!==s.charAt(0)||(s=s.slice(1,-1));try{var u=t(c[0]);if(s=(r.read||r)(s,u)||t(s),n)try{s=JSON.parse(s)}catch(l){}if(o[u]=s,e===u)break}catch(l){}}return e?o[e]:o}}return o.set=a,o.get=function(e){return i(e,!1)},o.getJSON=function(e){return i(e,!0)},o.remove=function(t,n){a(t,"",e(n,{expires:-1}))},o.defaults={},o.withConverter=n,o}((function(){}))}))},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t){!function(){e.exports=this.wp.blocks}()},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){var r=n(12);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},function(e,t){!function(){e.exports=this.wp.apiFetch}()},function(e,t,n){var r=n(18);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}},function(e,t,n){var r=n(31),o=n(32),a=n(17),i=n(33);e.exports=function(e){return r(e)||o(e)||a(e)||i()}},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n.apply(this,arguments)}e.exports=n},function(e,t,n){var r=n(34);e.exports=function(e,t){if(null==e)return{};var n,o,a=r(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}},function(e,t){!function(){e.exports=this.wp.components}()},function(e,t,n){var r=n(35),o=n(36);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t}},function(e,t,n){var r=n(10),o=n(12),a=n(37),i=n(38);function c(t){var n="function"==typeof Map?new Map:void 0;return e.exports=c=function(e){if(null===e||!a(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return i(e,arguments,r(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),o(t,e)},c(t)}e.exports=c},function(e,t){!function(){e.exports=this.ReactDOM}()},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,a=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(s){o=!0,a=s}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return n}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,n){"use strict";var r=n(30);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){var r=n(18);e.exports=function(e){if(Array.isArray(e))return r(e)}},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){e.exports=function(e){return-1!==Function.toString.call(e).indexOf("[native code]")}},function(e,t,n){var r=n(12),o=n(39);function a(t,n,i){return o()?e.exports=a=Reflect.construct:e.exports=a=function(e,t,n){var o=[null];o.push.apply(o,t);var a=new(Function.bind.apply(e,o));return n&&r(a,n.prototype),a},a.apply(null,arguments)}e.exports=a},function(e,t){e.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}},function(e,t,n){"use strict";n.r(t);var r,o=n(0),a=n(2),i=n(5),c=n.n(i),s=n(9),u=n.n(s),l=n(3),f=(n(19),n(7)),p=n.n(f),d=(n(13),n(8)),b=n(1),m=n.n(b),O=(Object.freeze({THANK_YOU:"thank-you",CUSTOM_TEXT:"custom-text",REDIRECT:"redirect",RESULTS:"results"}),Object.freeze({THEME_DEFAULT:"theme-default",GEORGIA:"georgia",PALATINO:"palatino",TIMES_NEW_ROMAN:"times-new-roman",ARIAL:"arial",IMPACT:"impact",LUCIDA:"lucida",TAHOMA:"tahoma",TREBUCHET:"trebuchet",VERDANA:"verdana",COURIER:"courier",CABIN:"Cabin",CHIVO:"Chivo",OPEN_SANS:"Open+Sans",FIRA_SANS:"Fira+Sans",ROBOTO:"Roboto",NUNITO:"Nunito",OVERPASS:"Overpass",LATO:"Lato",LIBRE_FRANKLIN:"Libre+Franklin",MONTSERRAT:"Montserrat",POPPINS:"Poppins",RUBIK:"Rubik",RALEWAY:"Raleway",JOSEFIN_SANS:"Josefin+Sans",ALEGREYA_SANS:"Alegreya+Sans",OSWALD:"Oswald"})),y=(Object.freeze([O.CABIN,O.CHIVO,O.OPEN_SANS,O.FIRA_SANS,O.ROBOTO,O.NUNITO,O.OVERPASS,O.LATO,O.LIBRE_FRANKLIN,O.MONTSERRAT,O.POPPINS,O.RUBIK,O.RALEWAY,O.JOSEFIN_SANS,O.ALEGREYA_SANS,O.OSWALD]),Object.freeze((r={},m()(r,O.THEME_DEFAULT,null),m()(r,O.GEORGIA,"Georgia, serif"),m()(r,O.PALATINO,'"Palatino Linotype", "Book Antiqua", Palatino, serif'),m()(r,O.TIMES_NEW_ROMAN,'"Times New Roman", Times, serif'),m()(r,O.ARIAL,"Arial, Helvetica, sans-serif"),m()(r,O.IMPACT,"Impact, Charcoal, sans-serif"),m()(r,O.LUCIDA,'"Lucida Sans Unicode", "Lucida Grande", sans-serif'),m()(r,O.TAHOMA,"Tahoma, Geneva, sans-serif"),m()(r,O.TREBUCHET,'"Trebuchet MS", Helvetica, sans-serif'),m()(r,O.VERDANA,"Verdana, Geneva, sans-serif"),m()(r,O.COURIER,'"Courier New", Courier, monospace'),m()(r,O.CABIN,'"Cabin", sans-serif'),m()(r,O.CHIVO,'"Chivo", sans-serif'),m()(r,O.OPEN_SANS,'"Open Sans", sans-serif'),m()(r,O.FIRA_SANS,'"Fira Sans", sans-serif'),m()(r,O.ROBOTO,'"Roboto", sans-serif'),m()(r,O.NUNITO,'"Nunito", sans-serif'),m()(r,O.OVERPASS,'"Overpass", sans-serif'),m()(r,O.LATO,'"Lato", sans-serif'),m()(r,O.LIBRE_FRANKLIN,'"Libre Franklin", sans-serif'),m()(r,O.MONTSERRAT,'"Montserrat", sans-serif'),m()(r,O.POPPINS,'"Poppins", sans-serif'),m()(r,O.RUBIK,'"Rubik", sans-serif'),m()(r,O.RALEWAY,'"Raleway", sans-serif'),m()(r,O.JOSEFIN_SANS,'"Josefin Sans", sans-serif'),m()(r,O.ALEGREYA_SANS,'"Alegreya Sans", sans-serif'),m()(r,O.OSWALD,'"Oswald", sans-serif'),r)),Object.freeze({OPEN:"open",CLOSED:"closed",CLOSED_AFTER:"closed-after"})),h=(Object.freeze({SHOW_RESULTS:"show-results",SHOW_CLOSED_BANNER:"show-closed-banner",HIDDEN:"hidden"}),Object.freeze({CONNECTED:"connected",NOT_CONNECTED:"not-connected",NOT_VERIFIED:"not-verified"}),Object.freeze({RADIO:"radio",BUTTON:"button"}),Object.freeze({LIST:"list",INLINE:"inline"}),n(20)),v=n.n(h),w=n(21),C=n.n(w),g=n(22),S=function(e){for(var t=window.getComputedStyle(e).backgroundColor;"rgba(0, 0, 0, 0)"===t&&e.parentNode&&e.parentNode.nodeType===window.Node.ELEMENT_NODE;)e=e.parentNode,t=window.getComputedStyle(e).backgroundColor;return t},E=function(){return Object(o.createElement)("div",{className:"crowdsignal-forms__style-probe"},Object(o.createElement)("p",null),Object(o.createElement)("h3",null,"Text"),Object(o.createElement)("div",{className:"wp-block-button"},Object(o.createElement)("div",{className:"wp-block-button__link"})),Object(o.createElement)("div",{className:"entry-content"},Object(o.createElement)("div",{className:"alignwide"})))},x=function(e){if(null===e)return{};var t,n=e.querySelector(".wp-block-button__link"),r=e.querySelector("p"),o=e.querySelector("h3"),a=e.querySelector(".alignwide"),i=S(n),c=S(r),s=window.getComputedStyle(r).color;if(i===c){var u=(t=n,"0px"!==window.getComputedStyle(t).borderBlockStartWidth?window.getComputedStyle(t).borderBlockStartColor:null);i=u||s}return{accentColor:i,backgroundColor:c,textColor:s,textColorInverted:window.getComputedStyle(n).color,textFont:window.getComputedStyle(r).fontFamily,textSize:window.getComputedStyle(r).fontSize,headingFont:window.getComputedStyle(o).fontFamily,contentWideWidth:window.getComputedStyle(a).maxWidth}},j=n(4),L=n.n(j),A=n(6),N=n.n(A),R=n(11),_=n.n(R),T=n(14),I=n.n(T),k=n(15),P=n.n(k),D=n(23),M=n.n(D),F=n(10),U=n.n(F),B=n(24),W=n.n(B);n(16);function H(e){return function(){var t,n=U()(e);if(V()){var r=U()(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return M()(this,t)}}function V(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var z=function(){var e=N()(L.a.mark((function e(t){var n,r,o=arguments;return L.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=!(o.length>1&&void 0!==o[1])||o[1],r="https://api.crowdsignal.com/v3/polls",n){e.next=4;break}return e.abrupt("return",null);case 4:return e.abrupt("return",window.fetch("".concat(r,"/").concat(t,"/results"),{method:"GET",headers:{"content-type":"application/json"}}).then((function(e){if(e.status>=200&&e.status<300)return e.json();throw e})).then((function(e){if(404===e.status)return{};if(e.error)throw new Error(e.message);return e.results.votes_by_answer})));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),G=function(){var e=N()(L.a.mark((function e(t){var n,r,o;return L.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"5430eeac3911395001d731d9702fc38b",n=(new Date).getTime(),e.next=4,window.fetch("https://polldaddy.com/n/".concat("5430eeac3911395001d731d9702fc38b","/").concat(t,"?").concat(n,"&format=json"));case 4:if((r=e.sent).ok){e.next=7;break}throw new J;case 7:return e.next=9,r.json();case 9:if((o=e.sent).nonce){e.next=12;break}throw new J;case 12:return e.abrupt("return",o.nonce);case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),K=function(){var e=N()(L.a.mark((function e(t,n,r,o){var a,i,c;return L.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=r.join(","),e.next=3,window.fetch("https://polls.polldaddy.com/vote-js.php?format=json&p=".concat(n,"&b=1&a=").concat(a,"&o=&va=16&cookie=0&n=").concat(t,"&url=").concat(encodeURIComponent(window.location),"&vi=").concat(o));case 3:if((i=e.sent).ok){e.next=6;break}throw new J;case 6:return e.next=8,i.json();case 8:if("error"!==(c=e.sent).status){e.next=11;break}throw new q(c.error);case 11:case"end":return e.stop()}}),e)})));return function(t,n,r,o){return e.apply(this,arguments)}}(),q=function(e){P()(n,e);var t=H(n);function n(){return I()(this,n),t.apply(this,arguments)}return n}(W()(Error)),J=function(e){P()(n,e);var t=H(n);function n(){return I()(this,n),t.call(this,Object(d.__)("Server error. Please try again.","crowdsignal-forms"))}return n}(q),Y=function(e,t){var n=Object(a.useState)(null),r=c()(n,2),o=r[0],i=r[1],s=Object(a.useState)(null),u=c()(s,2),l=u[0],f=u[1],p=Object(a.useState)(!0),d=c()(p,2),b=d[0],m=d[1];return Object(a.useEffect)((function(){m(!0),f(null),i(null),e().then(i).catch(f).finally((function(){return m(!1)}))}),t),{data:o,error:l,loading:b}},Z=function(e){var t=e.showBranding,n=e.referralCode;return Object(o.createElement)("div",{className:"crowdsignal-forms__branding"},t&&Object(o.createElement)("a",{className:"crowdsignal-forms__branding-link with-external-icon",href:"https://crowdsignal.com?ref=".concat(n),target:"blank",rel:"noopener noreferrer"},Object(d.__)("Powered by Crowdsignal","crowdsignal-forms")),!t&&Object(o.createElement)("span",{className:"crowdsignal-forms__branding-link"}," "))};Z.propTypes={showBranding:u.a.bool,referralCode:u.a.string.isRequired};var X=Z,$=function(e){var t=e.active,n=e.className,r=p()("crowdsignal-forms-applause__animation",n,{"is-active":t});return Object(o.createElement)("svg",{className:r,width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)("g",{className:"crowdsignal-forms-applause__animation-right"},Object(o.createElement)("path",{className:"crowdsignal-forms-applause__animation-inner-fill",fillRule:"evenodd",clipRule:"evenodd",d:"M24.5287 18.5813L21.719 22.432C20.771 23.7312 18.9509 24.0157 17.6517 23.0676L9.50948 17.1265C8.6982 16.5345 8.52021 15.3957 9.11218 14.5844C9.18511 14.4845 9.26979 14.3931 9.35606 14.3119L9.19145 14.1918C8.38017 13.5998 8.20218 12.461 8.79415 11.6497C8.93571 11.4557 9.10825 11.2933 9.30319 11.1743C9.10822 10.6266 9.17716 10.0013 9.54606 9.49567C10.1123 8.71967 11.1811 8.52659 11.9839 9.03133C12.0392 8.91852 12.1004 8.81 12.1733 8.71006C12.7653 7.89878 13.9042 7.72079 14.7154 8.31276L20.3297 12.4094L20.611 10.4435C20.6949 9.84704 21.1499 9.35925 21.7392 9.23069L23.703 8.79878L25.0454 16.3547C25.1822 17.1302 24.992 17.9464 24.5287 18.5813Z"}),Object(o.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M24.5287 18.5813L21.719 22.432C20.771 23.7312 18.9509 24.0157 17.6517 23.0676L9.50948 17.1265C8.6982 16.5345 8.52021 15.3957 9.11218 14.5844C9.18511 14.4845 9.26979 14.3931 9.35606 14.3119L9.19145 14.1918C8.38017 13.5998 8.20218 12.461 8.79415 11.6497C8.93571 11.4557 9.10825 11.2933 9.30319 11.1743C9.10822 10.6266 9.17716 10.0013 9.54606 9.49567C10.1123 8.71967 11.1811 8.52659 11.9839 9.03133C12.0392 8.91852 12.1004 8.81 12.1733 8.71006C12.7653 7.89878 13.9042 7.72079 14.7154 8.31276L20.3297 12.4094L20.611 10.4435C20.6949 9.84704 21.1499 9.35925 21.7392 9.23069L23.703 8.79878L25.0454 16.3547C25.1822 17.1302 24.992 17.9464 24.5287 18.5813ZM23.6104 16.605L22.538 10.5434L22.0547 10.6502L21.4234 15.0093L13.8574 9.48855C13.8574 9.48855 13.4691 9.4034 13.349 9.56801C13.2288 9.73262 13.2638 9.95632 13.4284 10.0764L17.667 13.1693L16.8091 14.345L11.2301 10.2742C11.0655 10.1541 10.8418 10.189 10.7217 10.3536C10.6016 10.5182 10.6365 10.7419 10.8012 10.862L16.3802 14.9329L15.5222 16.1087L10.4782 12.4282C10.3136 12.3081 10.0899 12.343 9.96978 12.5076C9.84967 12.6722 9.88463 12.8959 10.0492 13.0161L15.0933 16.6966L14.2353 17.8723L10.7962 15.3629C10.6316 15.2428 10.4079 15.2777 10.2878 15.4423C10.1677 15.607 10.2027 15.8307 10.3673 15.9508L18.5094 21.8919C19.1561 22.3638 20.0713 22.2207 20.5431 21.5741L23.3571 17.7175C23.5888 17.4001 23.6766 16.9957 23.6104 16.605Z"})),Object(o.createElement)("g",{className:"crowdsignal-forms-applause__animation-left"},Object(o.createElement)("path",{className:"crowdsignal-forms-applause__animation-inner-fill",fillRule:"evenodd",clipRule:"evenodd",d:"M21.2292 18.7813L18.4195 22.632C17.4715 23.9312 15.6513 24.2157 14.3521 23.2676L6.20992 17.3265C5.39864 16.7345 5.22065 15.5957 5.81262 14.7844C5.88554 14.6845 5.97023 14.5931 6.0565 14.5119L5.89189 14.3918C5.08061 13.7998 4.90262 12.661 5.49459 11.8497C5.63615 11.6557 5.80869 11.4933 6.00363 11.3743C5.80866 10.8266 5.8776 10.2013 6.2465 9.69567C6.81274 8.91967 7.88153 8.72658 8.68439 9.23133C8.73968 9.11852 8.80084 9.01 8.87377 8.91006C9.46573 8.09878 10.6046 7.92079 11.4159 8.51276L17.0302 12.6094L17.3115 10.6435C17.3953 10.047 17.8504 9.55925 18.4397 9.43069L20.4034 8.99877L21.7458 16.5547C21.8826 17.3302 21.6925 18.1464 21.2292 18.7813Z"}),Object(o.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21.2292 18.7813L18.4195 22.632C17.4715 23.9312 15.6513 24.2157 14.3521 23.2676L6.20992 17.3265C5.39864 16.7345 5.22065 15.5957 5.81262 14.7844C5.88554 14.6845 5.97023 14.5931 6.0565 14.5119L5.89189 14.3918C5.08061 13.7998 4.90262 12.661 5.49459 11.8497C5.63615 11.6557 5.80869 11.4933 6.00363 11.3743C5.80866 10.8266 5.8776 10.2013 6.2465 9.69567C6.81274 8.91967 7.88153 8.72658 8.68439 9.23133C8.73968 9.11852 8.80084 9.01 8.87377 8.91006C9.46573 8.09878 10.6046 7.92079 11.4159 8.51276L17.0302 12.6094L17.3115 10.6435C17.3953 10.047 17.8504 9.55925 18.4397 9.43069L20.4034 8.99877L21.7458 16.5547C21.8826 17.3302 21.6925 18.1464 21.2292 18.7813ZM20.3108 16.805L19.2384 10.7434L18.7551 10.8502L18.1239 15.2093L10.5578 9.68854C10.5578 9.68854 10.1695 9.6034 10.0494 9.76801C9.92928 9.93261 9.96425 10.1563 10.1289 10.2764L14.3675 13.3692L13.5096 14.545L7.93056 10.4742C7.76595 10.354 7.54224 10.389 7.42213 10.5536C7.30202 10.7182 7.33699 10.9419 7.50159 11.062L13.0806 15.1329L12.2227 16.3087L7.17864 12.6282C7.01403 12.5081 6.79033 12.543 6.67022 12.7076C6.55011 12.8722 6.58507 13.0959 6.74968 13.216L11.7937 16.8965L10.9358 18.0723L7.49667 15.5629C7.33206 15.4428 7.10836 15.4777 6.98825 15.6423C6.86814 15.8069 6.9031 16.0307 7.06771 16.1508L15.2099 22.0919C15.8566 22.5638 16.7717 22.4207 17.2436 21.7741L20.0576 17.9175C20.2892 17.6001 20.3771 17.1957 20.3108 16.805Z"})),Object(o.createElement)("g",{className:"crowdsignal-forms-applause__animation-wave-small"},Object(o.createElement)("rect",{x:"15.4854",y:"4.42176",width:"1.5",height:"3",transform:"rotate(8 15.4854 4.42176)"}),Object(o.createElement)("rect",{x:"19.9369",y:"5.15548",width:"1.5",height:"3",transform:"rotate(43 19.9369 5.15548)"}),Object(o.createElement)("rect",{x:"11.1523",y:"4.78963",width:"1.5",height:"3",transform:"rotate(-27 11.1523 4.78963)"})),Object(o.createElement)("g",{className:"crowdsignal-forms-applause__animation-wave-large"},Object(o.createElement)("rect",{x:"23.453",y:"2.41095",width:"1.5",height:"3",transform:"rotate(38 23.453 2.41095)"}),Object(o.createElement)("rect",{x:"26.9413",y:"5.27211",width:"1.5",height:"3",transform:"rotate(73 26.9413 5.27211)"}),Object(o.createElement)("rect",{x:"19.5165",y:"0.562988",width:"1.5",height:"3",transform:"rotate(3 19.5165 0.562988)"}),Object(o.createElement)("rect",{width:"1.5",height:"3",transform:"matrix(-0.788011 0.615662 0.615662 0.788011 8.52597 2.41095)"}),Object(o.createElement)("rect",{width:"1.5",height:"3",transform:"matrix(-0.292372 0.956305 0.956305 0.292372 5.03775 5.27211)"}),Object(o.createElement)("rect",{width:"1.5",height:"3",transform:"matrix(-0.99863 0.052336 0.052336 0.99863 12.4625 0.562988)"})))},Q=function(e){var t,n=e.attributes,r=e.fallbackStyles,i=e.renderStyleProbe,s=n.apiPollData?n.apiPollData.id:null,u=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r="cs-poll-".concat(e),o=Object(a.useState)(!1),i=c()(o,2),s=i[0],u=i[1],l=Object(a.useState)(!1),f=c()(l,2),p=f[0],d=f[1],b=Object(a.useState)(""),m=c()(b,2),O=m[0],y=m[1];Object(a.useEffect)((function(){t&&void 0!==_.a.get(r)&&(d(!0),y(_.a.get(r)))}),[]);var h=function(){var o=N()(L.a.mark((function o(a){var i,c,s,l=arguments;return L.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return i=l.length>1&&void 0!==l[1]?l[1]:1,o.prev=1,u(!0),o.next=5,G(e);case 5:return c=o.sent,o.next=8,K(c,e,a,i);case 8:d(!0),t&&(s=n?a.join(","):(new Date).getTime(),_.a.set(r,s,{sameSite:"Strict",expires:365}),y(s));case 10:return o.prev=10,u(!1),o.finish(10);case 13:case"end":return o.stop()}}),o,null,[[1,,10,13]])})));return function(e){return o.apply(this,arguments)}}();return{hasVoted:p,isVoting:s,vote:h,storedCookieValue:O}}(s,!0),f=u.hasVoted,d=u.vote,b=Object(a.useState)(0),m=c()(b,2),O=m[0],h=m[1],v=Object(a.useState)(0),w=c()(v,2),C=w[0],g=w[1],S=Object(a.useState)(null),E=c()(S,2),x=E[0],j=E[1],A=Object(a.useState)(!1),R=c()(A,2),T=R[0],I=R[1],k=Object(a.useState)(null),P=c()(k,2),D=P[0],M=P[1],F=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=Y((function(){return z(e,t)}),[e]),r=n.data,o=n.error,a=n.loading;return{error:o,loading:a,results:r}}(s).results,U=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Date;if(y.CLOSED===e)return!0;if(y.CLOSED_AFTER===e){var r=new Date(t);return r<n}return!1}(n.pollStatus,n.closedAfterDateTime),B=function(){if(null!==s&&!U){D&&clearTimeout(D),I(!0),M(setTimeout((function(){I(!1)}),200));var e=C+1;g(e),h(O+1);var t=n.apiPollData.answers[0].id;null!==x&&clearTimeout(x);var r=setTimeout((function(){d([t],e),j(null),g(0)}),1e3);j(r)}},W=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return p()({"has-bg-color":e.backgroundColor,"has-text-color":e.textColor,"has-border-color":e.borderColor},n)}(n,"crowdsignal-forms-applause",n.className,"size-".concat(n.size),{"is-closed":U}),H=function(e,t){var n=Object(l.isEmpty)(e.textColor)?t.textColor:e.textColor;return Object(l.mapKeys)({bgColor:e.backgroundColor||t.backgroundColor,textColor:n,hoverColor:t.accentColor,borderRadius:"".concat(e.borderRadius||0,"px"),borderWidth:"".concat(e.borderWidth||0,"px"),borderColor:e.borderColor},(function(e,t){return"--crowdsignal-forms-applause-".concat(Object(l.kebabCase)(t))}))}(n,r),V=(null!==F?Object(l.values)(F)[0]:0)+O;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)("div",{className:W,style:H,onClick:B,onKeyPress:B,role:"button",tabIndex:0},Object(o.createElement)($,{active:T}),Object(o.createElement)("p",{className:"crowdsignal-forms-applause__count"},(t=V)?t>=1e7?"".concat(Object(l.round)(t/1e6),"M"):t>=1e6?"".concat((t/1e6).toFixed(1),"M"):t>=1e4?"".concat(Object(l.round)(t/1e3),"K"):t>=1e3?"".concat((t/1e3).toFixed(1),"K"):t.toString():"0"," Claps"),i()),Object(o.createElement)(X,{showBranding:f&&!n.hideBranding,referralCode:"cs-forms-applause"}))};Q.propTypes={className:u.a.string};var ee,te=(ee=Q,Object(g.withFallbackStyles)((function(e){return{fallbackStyles:x(e.querySelector(".crowdsignal-forms__style-probe"))}}))((function(e){var t=e.fallbackStyles,n=C()(e,["fallbackStyles"]);return Object(o.createElement)(ee,v()({fallbackStyles:t||{},renderStyleProbe:function(){return t?null:Object(o.createElement)(E,null)}},n))}))),ne=n(25),re=function(e,t){return Object(l.forEach)(document.querySelectorAll("div[".concat(e,"]")),(function(n){try{var r=JSON.parse(n.dataset[Object(l.camelCase)(e.substr("data-".length))]),o=t(r,n);n.removeAttribute(e),Object(ne.render)(o,n)}catch(a){console.error("Crowdsignal Forms: Failed to parse block data for: %s",e)}}))},oe=function(e,t){(Object(l.isEmpty)(window.CrowdsignalMutationObservers)||!0!==window.CrowdsignalMutationObservers[e])&&(new window.MutationObserver((function(){return re(e,t)})).observe(document.body,{attributes:!0,attributeFilter:[e],childList:!0,subtree:!0}),Object(l.isEmpty)(window.CrowdsignalMutationObservers)&&(window.CrowdsignalMutationObservers=[]),window.CrowdsignalMutationObservers[e]=!0,re(e,t))};(function(e,t){if("complete"===document.readyState)return oe(e,t);window.addEventListener("load",(function(){return oe(e,t)}))})("data-crowdsignal-applause",(function(e){return Object(o.createElement)(te,{attributes:e})}))}]));
build/editor.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-polyfill'), 'version' => '4fb5b92160884864cf5f01209953acb6');
1
+ <?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-polyfill'), 'version' => '2efd4ac5aafbd810b3809c5da8f11440');
build/editor.css CHANGED
@@ -1 +1 @@
1
- .crowdsignal-forms__connect-to-crowdsignal{border:1px solid #000;font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;padding:24px;text-align:initial}.crowdsignal-forms__connect-to-crowdsignal-header{display:flex;flex-direction:row;align-items:center}.crowdsignal-forms__connect-to-crowdsignal-body{font-size:13px;margin-top:24px;margin-bottom:16px}.crowdsignal-forms__connect-to-crowdsignal-title{font-size:24pt;margin-inline-start:16px}.crowdsignal-forms__signal-warning{font-family:-apple-system, blinkmacsystemfont, "Segoe UI", roboto, oxygen-sans, ubuntu, cantarell, "Helvetica Neue", sans-serif;font-size:13px;line-height:23.4px;border:1px solid #444;border-left:8px solid var(--wp-admin-theme-color);border-radius:4px;padding:8px;display:flex;flex-direction:row;align-items:center;margin-bottom:16px}.crowdsignal-forms__signal-warning-icon{line-height:0;padding:8px 16px 8px 8px}.crowdsignal-forms__signal-warning-message a{text-decoration:underline}.crowdsignal-forms__sidebar-promote{margin-left:16px;flex-grow:1}#editor .editor-styles-wrapper .crowdsignal-forms-poll{margin-left:0;margin-right:0}#editor .editor-styles-wrapper .block-editor-block-list__block[data-type="crowdsignal-forms/poll"][data-align="full"] .crowdsignal-forms-poll{border-left-width:0;border-right-width:0}@media screen and (min-width: 660px){#editor .editor-styles-wrapper .block-editor-block-list__block[data-type="crowdsignal-forms/poll"][data-align="wide"] .crowdsignal-forms-poll__content,#editor .editor-styles-wrapper .block-editor-block-list__block[data-type="crowdsignal-forms/poll"][data-align="full"] .crowdsignal-forms-poll__content{padding:80px}}#editor .editor-styles-wrapper .crowdsignal-forms-poll__answer{cursor:text}#editor .editor-styles-wrapper .crowdsignal-forms-poll__answer:hover,#editor .editor-styles-wrapper .crowdsignal-forms-poll__answer.is-focused{color:inherit}#editor .editor-styles-wrapper .wp-block-button .crowdsignal-forms-poll__submit-button.wp-block-button__link{cursor:text}#editor .editor-styles-wrapper .wp-block-button .crowdsignal-forms-poll__submit-button.wp-block-button__link:hover{opacity:inherit}.crowdsignal-forms-poll__resize-wrapper{margin-left:auto;margin-right:auto}.crowdsignal-forms__redirect-url input[type="text"]{width:100%}.crowdsignal-forms__redirect-url__suggestions{width:260px}.crowdsignal-forms__row{display:flex;flex-direction:row}.crowdsignal-forms__row .crowdsignal-forms__small-text-input input[type="text"]{width:40px}.crowdsignal-forms__row .crowdsignal-forms__small-text-input input[type="number"]{width:50px}.crowdsignal-forms__reset-width-button{margin-left:auto;margin-top:25px}.crowdsignal-forms-poll__edit-bar{font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:13px;margin-top:24px;padding:18px 24px;color:#d82e20;border-left:4px solid #d82e20;background:#f8dad8;display:flex;flex-direction:row;justify-content:space-between;align-items:center}.crowdsignal-forms-poll__edit-bar .crowdsignal-forms-poll__edit-bar-message{padding-inline-end:24px}.crowdsignal-forms-poll__edit-bar button.crowdsignal-forms-poll__edit-bar-button{border:2px solid #d82e20;border-radius:4px;color:#d82e20;background:transparent;padding:8px 16px;cursor:pointer}.crowdsignal-poll-wrapper:not(:first-child),[data-type="crowdsignal-forms/poll"]:not(:first-child){margin-top:3em}.crowdsignal-poll-wrapper:not(:last-child),[data-type="crowdsignal-forms/poll"]:not(:last-child){margin-bottom:3em}.crowdsignal-forms-poll{border-color:var(--crowdsignal-forms-border-color);border-style:solid;border-width:var(--crowdsignal-forms-border-width);margin-left:auto;margin-right:auto;margin-top:5px;position:relative;text-align:left}.entry-content .alignfull.crowdsignal-poll-wrapper .crowdsignal-forms-poll{border-left-width:0;border-right-width:0}.crowdsignal-forms-poll h3.crowdsignal-forms-poll__question{margin:0 0 28px}.crowdsignal-forms-poll h3.crowdsignal-forms-poll__question:first-child{margin-top:0}.crowdsignal-forms-poll p.crowdsignal-forms-poll__note{font-style:italic;margin:0 0 32px}.crowdsignal-forms-poll .crowdsignal-forms-poll__content{padding:40px 24px 16px 24px}.crowdsignal-forms-poll .crowdsignal-forms-poll__content .crowdsignal-forms-poll__question{font-family:var(--crowdsignal-forms-question-font-family)}.crowdsignal-forms-poll .crowdsignal-forms-poll__content .crowdsignal-forms-poll__answer-label,.crowdsignal-forms-poll .crowdsignal-forms-poll__content .crowdsignal-forms-poll__answer-results-answer,.crowdsignal-forms-poll .crowdsignal-forms-poll__content .crowdsignal-forms-poll__note{font-family:var(--crowdsignal-forms-body-font-family)}.entry-content .alignfull.crowdsignal-poll-wrapper .crowdsignal-forms-poll .crowdsignal-forms-poll__content{margin:0 auto;max-width:var(--crowdsignal-forms-content-wide-width)}@media screen and (min-width: 660px){.alignwide.crowdsignal-poll-wrapper .crowdsignal-forms-poll .crowdsignal-forms-poll__content,.alignfull.crowdsignal-poll-wrapper .crowdsignal-forms-poll .crowdsignal-forms-poll__content{padding:80px}}.crowdsignal-forms-poll.is-closed .crowdsignal-forms-poll__form{opacity:0.5}.crowdsignal-forms-poll.is-hidden{opacity:0.5}.crowdsignal-forms-poll.has-text-color{color:var(--crowdsignal-forms-text-color)}.crowdsignal-forms-poll.has-bg-color{background-color:var(--crowdsignal-forms-bg-color)}.crowdsignal-forms-poll.has-border-radius{border-radius:var(--crowdsignal-forms-border-radius);overflow:hidden}.crowdsignal-forms-poll.has-box-shadow{box-shadow:0 3px 6px rgba(0,0,0,0.16),0 3px 6px rgba(0,0,0,0.23)}.crowdsignal-forms-poll .is-transparent{opacity:0;pointer-events:none}.crowdsignal-forms-poll__block-button .crowdsignal-forms-poll__submit-button{-webkit-appearance:initial}.crowdsignal-forms-poll__block-button .crowdsignal-forms-poll__submit-button:disabled{opacity:0.7}.crowdsignal-forms-poll.has-submit-button-text-color .crowdsignal-forms-poll__block-button .crowdsignal-forms-poll__submit-button.wp-block-button__link{color:var(--crowdsignal-forms-submit-button-text-color)}.crowdsignal-forms-poll.has-submit-button-bg-color .crowdsignal-forms-poll__block-button .crowdsignal-forms-poll__submit-button.wp-block-button__link{background-color:var(--crowdsignal-forms-submit-button-bg-color)}.crowdsignal-forms-poll.has-submit-button-bg-color .crowdsignal-forms-poll__block-button .crowdsignal-forms-poll__submit-button.wp-block-button__link:hover{opacity:0.9}.crowdsignal-forms-poll__options.is-button{display:flex;flex-direction:column;flex-wrap:wrap}.crowdsignal-forms-poll__options.is-button.is-inline-button-alignment{flex-direction:row}.crowdsignal-forms-poll__answer{cursor:pointer;display:flex;font-size:inherit;font-weight:600;margin:0;padding:0 2px;position:relative}.crowdsignal-forms-poll__answer.is-button{margin-inline-end:20px;margin-block-end:20px;max-width:100%}.crowdsignal-forms-poll__answer.is-button .wp-block-button.crowdsignal-forms-poll__block-button,.crowdsignal-forms-poll__answer.is-button .crowdsignal-forms-poll__submit-button{max-width:100%}.crowdsignal-forms-poll__answer.is-button .crowdsignal-forms-poll__submit-button{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.crowdsignal-forms-poll__answer:not(.is-button){margin-block-end:16px}.crowdsignal-forms-poll__answer:hover,.crowdsignal-forms-poll__answer.is-focused{color:var(--crowdsignal-forms-submit-button-bg-color)}.has-voted .crowdsignal-forms-poll__answer{opacity:0.5}input[type="checkbox"].crowdsignal-forms-poll__input,input[type="radio"].crowdsignal-forms-poll__input{height:0;opacity:0;position:absolute;width:0}.crowdsignal-forms-poll__check{display:inline-block;height:1em;margin:0 10px 0 0;position:relative;width:1em}.crowdsignal-forms-poll__check::before{background-color:transparent;border:1.5px solid var(--crowdsignal-forms-text-color);border-radius:50%;box-sizing:border-box;content:"";display:block;height:100%;transition:background-color 0.3s, border-color 0.3s;width:100%}.crowdsignal-forms-poll__answer.is-multiple-choice .crowdsignal-forms-poll__check::before{border-radius:3px}.crowdsignal-forms-poll__answer.is-multiple-choice.is-selected .crowdsignal-forms-poll__check::before{border-color:var(--crowdsignal-forms-text-color);background-color:var(--crowdsignal-forms-text-color)}.crowdsignal-forms-poll__answer.is-selected:not(.is-multiple-choice) .crowdsignal-forms-poll__check::after{animation-duration:0.3s;animation-name:crowdsignal-forms-animation__pop;animation-iteration-count:1;background-clip:padding-box;background-color:var(--crowdsignal-forms-text-color);border:4.5px solid transparent;border-radius:50%;box-sizing:border-box;content:"";display:block;height:100%;position:absolute;left:0;top:0;width:100%}.crowdsignal-forms-poll__answer.is-selected.is-multiple-choice .crowdsignal-forms-poll__check::after{border-color:var(--crowdsignal-forms-submit-button-text-color);border-style:solid;border-width:0 0 2px 2px;box-sizing:border-box;content:"";display:block;height:25%;margin:-0.1em 0 0 -0.2em;position:absolute;left:50%;top:50%;transform:rotateZ(-45deg);width:50%}div.crowdsignal-forms-poll__answer-label-wrapper{flex:1;word-break:break-word}div.crowdsignal-forms-poll__answer-label-wrapper span.crowdsignal-forms-poll__answer-label{line-height:1;vertical-align:top}div.crowdsignal-forms-poll__answer-label-wrapper span.crowdsignal-forms-poll__answer-label span::after{vertical-align:top}.crowdsignal-forms-poll__button{border:0;padding:0}.crowdsignal-forms-poll__actions .wp-block-button,.crowdsignal-forms-poll__options .wp-block-button{margin:0}.crowdsignal-forms-poll__actions{display:flex;justify-content:flex-end}.editor-styles-wrapper .crowdsignal-forms-poll .crowdsignal-forms-poll__actions .wp-block-button.crowdsignal-forms-poll__block-button,.editor-styles-wrapper .crowdsignal-forms-poll .crowdsignal-forms-poll__options .wp-block-button.crowdsignal-forms-poll__block-button{margin:0}.crowdsignal-forms-poll__closed-banner{background-color:var(--crowdsignal-forms-border-color);box-sizing:border-box;display:flex;color:var(--crowdsignal-forms-submit-button-text-color);font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;justify-content:center;padding:calc(var(--crowdsignal-forms-border-width) + 0.2em) 0 0.2em;width:100%}.is-hidden .crowdsignal-forms-poll__closed-banner{font-style:italic}.crowdsignal-forms-poll__error{color:red}.crowdsignal-forms-poll__results-list{margin:0 0 1em;position:relative}.crowdsignal-forms-poll__answer-results{display:flex;flex-direction:column;margin:0 0 16px;width:100%}.crowdsignal-forms-poll__answer-results:last-child{margin:0}.crowdsignal-forms-poll__answer-results-labels{align-items:flex-end;display:flex;margin:0 0 8px;width:100%;word-break:break-word}.crowdsignal-forms-poll__answer-results-answer{flex:1;font-size:1em;font-weight:600}.crowdsignal-forms-poll__answer-results-votes{font-size:0.75em;line-height:2}.crowdsignal-forms-poll__answer-results-percent{font-weight:600;line-height:1.6}.crowdsignal-forms-poll__answer-results-votes,.crowdsignal-forms-poll__answer-results-percent{font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;margin-left:20px;transition:opacity 0.3s}.crowdsignal-forms-poll__answer-results.is-error .crowdsignal-forms-poll__answer-results-votes,.crowdsignal-forms-poll__answer-results.is-error .crowdsignal-forms-poll__answer-results-percent{display:none}.crowdsignal-forms-poll__answer-results.is-loading .crowdsignal-forms-poll__answer-results-votes,.crowdsignal-forms-poll__answer-results.is-loading .crowdsignal-forms-poll__answer-results-percent{animation-duration:1.5s;animation-iteration-count:infinite;animation-name:crowdsignal-forms-animation__pulse;background-color:var(--crowdsignal-forms-text-color);font-size:0.7em;height:1em;width:50px}.crowdsignal-forms-poll__answer-results.is-loading .crowdsignal-forms-poll__answer-results-votes:last-child,.crowdsignal-forms-poll__answer-results.is-loading .crowdsignal-forms-poll__answer-results-percent:last-child{width:40px}.crowdsignal-forms-poll__answer-results-progress-track{border:1px solid;border-color:rgba(var(--crowdsignal-forms-text-color-properties), 0.3);box-sizing:border-box;height:1em;width:100%}.crowdsignal-forms-poll__answer-results.is-loading .crowdsignal-forms-poll__answer-results-progress-track{animation-duration:1.5s;animation-iteration-count:infinite;animation-name:crowdsignal-forms-animation__pulse}.crowdsignal-forms-poll__answer-results-progress-bar{animation-fill-mode:forwards;background-color:var(--crowdsignal-forms-submit-button-bg-color);height:100%;transition:background-color 0.3s, width 0.3s}.crowdsignal-forms-poll__answer-results.is-error .crowdsignal-forms-poll__answer-results-progress-bar{width:0}.crowdsignal-forms-poll__answer-results.is-loading .crowdsignal-forms-poll__answer-results-progress-bar{background-color:var(--crowdsignal-forms-text-color);width:25%}.crowdsignal-forms-poll__answer-results.is-loading:nth-child(5n+1) .crowdsignal-forms-poll__answer-results-progress-bar{width:40%}.crowdsignal-forms-poll__answer-results.is-loading:nth-child(5n+2) .crowdsignal-forms-poll__answer-results-progress-bar{width:75%}.crowdsignal-forms-poll__answer-results.is-loading:nth-child(5n+3) .crowdsignal-forms-poll__answer-results-progress-bar{width:50%}.crowdsignal-forms-poll__answer-results.is-loading:nth-child(5n+4) .crowdsignal-forms-poll__answer-results-progress-bar{width:60%}.crowdsignal-forms-poll__results-footer{display:flex;flex-direction:column;justify-content:space-between;width:100%;font-size:0.9em}.crowdsignal-forms-poll__results-total{font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;position:relative;text-align:right;width:100%;margin-bottom:1em}.crowdsignal-forms-poll__results.is-loading .crowdsignal-forms-poll__results-total{color:transparent}.crowdsignal-forms-poll__results.is-loading .crowdsignal-forms-poll__results-total::before{animation-name:crowdsignal-forms-animation__pulse;animation-duration:1.5s;animation-iteration-count:infinite;background-color:var(--crowdsignal-forms-text-color);content:"";display:block;position:absolute;right:0;height:1em;width:150px}.crowdsignal-forms-poll__footer-branding{display:flex;justify-content:space-between;align-items:center;width:100%;margin-top:16px}.crowdsignal-forms-poll__footer-branding img.crowdsignal-forms-poll__footer-branding-logo{width:50px;height:50px;margin-left:0;margin-right:0}.crowdsignal-forms-poll__footer-branding .crowdsignal-forms__branding-promote{font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:10px;text-decoration:none !important;box-shadow:none;border:0;background-color:#a4a4a4a4;color:#fff;cursor:pointer;padding-right:8px;padding-left:8px;margin-left:16px;border-radius:2px;padding-top:4px;padding-bottom:4px;vertical-align:middle}.crowdsignal-forms-poll__footer-cs-link{font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:16px;text-decoration:none;text-transform:uppercase;vertical-align:middle;border-bottom:0px solid var(--crowdsignal-forms-text-color) !important}.crowdsignal-forms-poll__footer-cs-link:not(:hover){color:var(--crowdsignal-forms-text-color);opacity:0.4}.has-default-thankyou .crowdsignal-forms-poll__footer-cs-link{color:#333}.crowdsignal-forms-poll__error-banner{font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:13px;margin-top:24px;padding:18px 24px;color:#d82e20;border-left:4px solid #d82e20;background:#f8dad8}.crowdsignal-forms-poll__submit-message-container{position:absolute;background-color:var(--crowdsignal-forms-bg-color);left:0;top:0;width:100%;height:100%;overflow:hidden}.has-default-thankyou .crowdsignal-forms-poll__submit-message-container{background-color:#fff}.crowdsignal-forms-poll__submit-message{position:relative}.crowdsignal-forms-poll__submit-message button.crowdsignal-forms-poll__dismiss-submit-message{position:absolute;right:0;top:0;background-color:transparent;color:#000;text-decoration:none;border:none}.crowdsignal-forms-poll__submit-message button.crowdsignal-forms-poll__dismiss-submit-message:hover{background:inherit}.crowdsignal-forms-poll__submit-message-footer{position:absolute;bottom:0;left:0;padding:16px 24px;width:100%;background-color:inherit}.crowdsignal-forms-poll__thank-you-cs-sticker{right:25px;top:66px}.crowdsignal-forms-poll__thank-you-sticker{right:132px;top:12px}.crowdsignal-forms-poll__thank-you-cs-sticker,.crowdsignal-forms-poll__thank-you-sticker{filter:drop-shadow(0 1px 2px rgba(0,0,0,0.2));width:100px;height:100px;position:absolute}.crowdsignal-forms-poll__custom-message-check{color:var(--crowdsignal-forms-text-color);padding-left:24px;padding-top:24px}.crowdsignal-forms-poll__custom-message{font-family:var(--crowdsignal-forms-question-font-family);font-weight:600;padding:16px 24px}.wp_block-crowdsignal-forms-poll__vote-branding{margin-top:16px}.crowdsignal-forms__style-probe{display:none}.crowdsignal-forms-vote .block-editor-block-list__layout{display:flex;flex-direction:row}.crowdsignal-forms__border-popover .crowdsignal-forms__row{padding:10px}.crowdsignal-forms-vote.no-results .crowdsignal-forms-vote-item__count{display:none}.crowdsignal-forms-vote__size-dropdown .components-button.components-dropdown-menu__menu-item.is-active::after{content:"\2713";margin-inline-start:auto;margin-inline-end:0}.crowdsignal-vote-wrapper:not(:first-child),[data-type="crowdsignal-forms/vote"]:not(:first-child){margin-top:3em}.crowdsignal-vote-wrapper:not(:last-child),[data-type="crowdsignal-forms/vote"]:not(:last-child){margin-bottom:3em}.crowdsignal-forms-vote{align-items:center;display:inline-flex;flex-direction:column}.crowdsignal-forms-vote.crowdsignal-forms-vote__example{align-items:center}[data-type="crowdsignal-forms/vote-item"]{margin-top:28px !important;margin-bottom:0 !important}.crowdsignal-forms-vote__items{display:flex;flex-direction:row}.crowdsignal-forms-vote-item{border:var(--crowdsignal-forms-vote-border-width) solid #d2d2d2;border-radius:var(--crowdsignal-forms-vote-border-radius);cursor:pointer;display:flex;flex-direction:row;align-items:center;position:relative;user-select:none;-webkit-user-select:none}.crowdsignal-forms-vote-item:not(:last-child){margin-inline-end:8px !important}.crowdsignal-forms-vote-item.has-bg-color{background-color:var(--crowdsignal-forms-vote-bg-color)}.crowdsignal-forms-vote-item.has-border-color{border-color:var(--crowdsignal-forms-vote-border-color)}.crowdsignal-forms-vote-item.has-text-color{color:var(--crowdsignal-forms-vote-text-color)}.is-closed .crowdsignal-forms-vote-item,.crowdsignal-forms-vote-item.is-disabled{cursor:inherit}.is-closed .crowdsignal-forms-vote-item,.crowdsignal-forms-vote-item.is-disabled:not(.is-voted-on){opacity:0.5}.size-small .crowdsignal-forms-vote-item{padding:18px 10px;height:0.7em}.size-small .crowdsignal-forms-vote-item.is-type-down{padding-left:9px}.size-medium .crowdsignal-forms-vote-item{height:1em;padding:20px 10px}.size-medium .crowdsignal-forms-vote-item.is-type-down{padding-left:9px}.size-large .crowdsignal-forms-vote-item{height:1.2em;padding:22px 16px}.size-large .crowdsignal-forms-vote-item:not(:last-child){margin-inline-end:16px !important}.size-large .crowdsignal-forms-vote-item.is-type-down{padding-left:15px}.crowdsignal-forms-vote-item.is-voted-on,.crowdsignal-forms-vote-item:hover:not(.is-disabled),.crowdsignal-forms-vote-item:focus:not(.is-disabled):not(.is-in-editor){border-color:var(--crowdsignal-forms-vote-voted-color);color:var(--crowdsignal-forms-vote-voted-color)}.crowdsignal-forms-vote-item.is-voted-on.has-bg-color,.crowdsignal-forms-vote-item.is-voted-on.has-text-color,.crowdsignal-forms-vote-item:hover:not(.is-disabled).has-bg-color,.crowdsignal-forms-vote-item:hover:not(.is-disabled).has-text-color,.crowdsignal-forms-vote-item:focus:not(.is-disabled):not(.is-in-editor).has-bg-color,.crowdsignal-forms-vote-item:focus:not(.is-disabled):not(.is-in-editor).has-text-color{background-color:var(--crowdsignal-forms-vote-text-color);border-color:var(--crowdsignal-forms-vote-bg-color);color:var(--crowdsignal-forms-vote-bg-color)}.size-small .crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__icon{width:0.7em;height:0.7em;max-height:0.7em}.size-medium .crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__icon{width:1em;height:1em;max-height:1em}.size-large .crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__icon{width:1.2em;height:1.2em;max-height:1.2em}.crowdsignal-forms-vote-item.is-voted-on .crowdsignal-forms-vote-item__icon{animation-duration:0.4s;animation-name:crowdsignal-forms-animation__grow;animation-iteration-count:1;animation-timing-function:ease-out}.crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count{font-size:14pt;font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;margin-inline-start:10px;font-variant-numeric:tabular-nums;transform:rotateX(0deg);transform-origin:50% 50% 10px;transition:transform 0.3s}.size-small .crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count{font-size:0.6em}.size-medium .crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count{font-size:0.8em}.size-large .crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count{font-size:1em}.crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count-enter,.crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count-enter-active{margin:0;position:absolute;right:0}.crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count-enter{transform:rotateX(-90deg)}.crowdsignal-forms-vote-item.is-voted-on .crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count-enter{transform:rotateX(90deg)}.crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count-exit,.crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count-exit-active{margin:0;position:absolute;right:10px;top:4px;transform:rotateX(90deg)}.crowdsignal-forms-vote-item.is-voted-on .crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count-exit,.crowdsignal-forms-vote-item.is-voted-on .crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count-exit-active{transform:rotateX(-90deg)}.crowdsignal-forms-vote__branding{display:flex}.crowdsignal-forms-vote__branding .crowdsignal-forms-vote__branding-link{font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:8px;padding:8px 4px 0;text-decoration:none !important;text-transform:uppercase;border:0 !important}.crowdsignal-forms-vote__branding .crowdsignal-forms-vote__branding-link.with-external-icon::after{content:"\2197";display:inline;font-size:6px;vertical-align:super}.crowdsignal-forms-vote__branding .crowdsignal-forms-vote__branding-link:not(:hover){color:var(--crowdsignal-forms-text-color)}.crowdsignal-applause-wrapper{margin-bottom:3em}.crowdsignal-forms-applause{display:flex;flex-direction:row;align-items:center;outline:0;width:max-content;cursor:pointer;border:var(--crowdsignal-forms-applause-border-width) solid #d2d2d2;border-radius:var(--crowdsignal-forms-applause-border-radius);user-select:none;--webkit-user-select: none}.crowdsignal-forms-applause .crowdsignal-forms-applause__count{margin:unset !important}.crowdsignal-forms-applause.size-small{padding:20px 16px 18px 12px;height:0.7em}.crowdsignal-forms-applause.size-small .crowdsignal-forms-applause__count{font-size:14px;padding-bottom:2px}.crowdsignal-forms-applause.size-medium{height:1em;padding:24px 16px 20px 8px}.crowdsignal-forms-applause.size-medium .crowdsignal-forms-applause__count{font-size:16px;padding-bottom:4px}.crowdsignal-forms-applause.size-large{height:1.2em;padding:28px 18px 22px 8px}.crowdsignal-forms-applause.size-large .crowdsignal-forms-applause__count{font-size:19px;padding-bottom:6px}.crowdsignal-forms-applause.is-closed{opacity:0.5}.crowdsignal-forms-applause.has-text-color{color:var(--crowdsignal-forms-applause-text-color)}.crowdsignal-forms-applause.has-border-color{border:var(--crowdsignal-forms-applause-border-width) solid var(--crowdsignal-forms-applause-border-color)}.crowdsignal-forms-applause.has-bg-color{background-color:var(--crowdsignal-forms-applause-bg-color)}.crowdsignal-forms-applause:not(.is-closed):hover{color:var(--crowdsignal-forms-applause-hover-color);border-color:var(--crowdsignal-forms-applause-hover-color)}.crowdsignal-forms-applause:not(.is-closed):hover.has-bg-color{color:var(--crowdsignal-forms-applause-bg-color);background-color:var(--crowdsignal-forms-applause-text-color);border-color:var(--crowdsignal-forms-applause-bg-color)}.crowdsignal-forms-applause__animation{fill:var(--crowdsignal-forms-applause-text-color);margin-inline-end:5px}.crowdsignal-forms-applause.size-small .crowdsignal-forms-applause__animation{width:33px;height:33px;max-height:33px}.crowdsignal-forms-applause.size-medium .crowdsignal-forms-applause__animation{width:50px;height:50px;max-height:50px}.crowdsignal-forms-applause.size-large .crowdsignal-forms-applause__animation{width:60px;height:60px;max-height:60px}.crowdsignal-forms-applause__animation .crowdsignal-forms-applause__animation-inner-fill{fill:var(--crowdsignal-forms-applause-bg-color)}.crowdsignal-forms-applause:not(.is-closed):hover .crowdsignal-forms-applause__animation{fill:var(--crowdsignal-forms-applause-hover-color)}.crowdsignal-forms-applause.has-bg-color:not(.is-closed):hover .crowdsignal-forms-applause__animation{fill:var(--crowdsignal-forms-applause-bg-color)}.crowdsignal-forms-applause.has-bg-color:not(.is-closed):hover .crowdsignal-forms-applause__animation .crowdsignal-forms-applause__animation-inner-fill{fill:var(--crowdsignal-forms-applause-text-color)}.crowdsignal-forms-applause__animation-right{transition:transform 0.3s}.crowdsignal-forms-applause:not(.is-closed):hover .crowdsignal-forms-applause__animation-right{transform:translateX(3%) translateY(-3%)}.crowdsignal-forms-applause__animation-left{transition:transform 0.3s}.crowdsignal-forms-applause:not(.is-closed):hover .crowdsignal-forms-applause__animation-left{transform:translateX(-3%) translateY(0)}.crowdsignal-forms-applause__animation-wave-small{opacity:1}.crowdsignal-forms-applause:not(.is-closed):hover .crowdsignal-forms-applause__animation-wave-small{animation:crowdsignal-forms-animation__fade-out 0.3s forwards;transform:translateY(-5%);transition:transform 0.3s}.crowdsignal-forms-applause__animation-wave-large{opacity:0}.crowdsignal-forms-applause .crowdsignal-forms-applause__animation.is-active .crowdsignal-forms-applause__animation-right{transform:translateX(-3%) translateY(0);transition:transform 0.1s}.crowdsignal-forms-applause .crowdsignal-forms-applause__animation.is-active .crowdsignal-forms-applause__animation-left{transform:translateX(3%) translateY(0);transition:transform 0.1s}.crowdsignal-forms-applause .crowdsignal-forms-applause__animation.is-active .crowdsignal-forms-applause__animation-wave-small{animation:crowdsignal-forms-animation__fade-out 0.3s forwards;transform:translateY(-5%);transition:transform 0.3s}.crowdsignal-forms-applause .crowdsignal-forms-applause__animation.is-active .crowdsignal-forms-applause__animation-wave-large{animation:crowdsignal-forms-animation__fade-in 0.03s forwards;animation-delay:0.07s}
1
+ .crowdsignal-forms__connect-to-crowdsignal{border:1px solid #000;font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;padding:24px;text-align:initial}.crowdsignal-forms__connect-to-crowdsignal-header{display:flex;flex-direction:row;align-items:center}.crowdsignal-forms__connect-to-crowdsignal-body{font-size:13px;margin-top:24px;margin-bottom:16px}.crowdsignal-forms__connect-to-crowdsignal-title{font-size:24pt;margin-inline-start:16px}.crowdsignal-forms__editor-notice{margin:0 0 15px !important}.crowdsignal-forms__editor-notice .components-notice__content{display:flex;flex-direction:row;align-items:center}.crowdsignal-forms__editor-notice-icon{line-height:0;padding:8px 16px 8px 8px}.crowdsignal-forms__editor-notice-text{flex-grow:1}.crowdsignal-forms__editor-notice-text a{text-decoration:underline}.crowdsignal-forms__sidebar-promote{margin-left:16px;flex-grow:1}.crowdsignal-forms__footer-branding{align-items:flex-end;display:flex;margin-top:16px;width:100%}.crowdsignal-forms__footer-branding img.crowdsignal-forms__footer-branding-logo{height:50px;margin-left:auto;margin-right:0;width:50px}.crowdsignal-forms__footer-branding .crowdsignal-forms__branding-promote{display:inline-flex;font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:10px;text-decoration:none !important;box-shadow:none;border:0;background-color:#a4a4a4a4;color:#fff;cursor:pointer;padding-right:8px;padding-left:8px;margin-left:16px;border-radius:2px;padding-top:2px;padding-bottom:2px;vertical-align:middle}.crowdsignal-forms__footer-cs-link{display:inline-flex;font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:16px;line-height:18px;text-decoration:none;text-transform:uppercase;vertical-align:middle;border-bottom:0 solid var(--crowdsignal-forms-text-color) !important}.crowdsignal-forms__footer-cs-link:not(:hover){color:var(--crowdsignal-forms-text-color);opacity:0.4}.has-default-thankyou .crowdsignal-forms__footer-cs-link{color:#333}#editor .editor-styles-wrapper .crowdsignal-forms-poll{margin-left:0;margin-right:0}#editor .editor-styles-wrapper .block-editor-block-list__block[data-type="crowdsignal-forms/poll"][data-align="full"] .crowdsignal-forms-poll{border-left-width:0;border-right-width:0}@media screen and (min-width: 660px){#editor .editor-styles-wrapper .block-editor-block-list__block[data-type="crowdsignal-forms/poll"][data-align="wide"] .crowdsignal-forms-poll__content,#editor .editor-styles-wrapper .block-editor-block-list__block[data-type="crowdsignal-forms/poll"][data-align="full"] .crowdsignal-forms-poll__content{padding:80px}}#editor .editor-styles-wrapper .crowdsignal-forms-poll__answer{cursor:text}#editor .editor-styles-wrapper .crowdsignal-forms-poll__answer:hover,#editor .editor-styles-wrapper .crowdsignal-forms-poll__answer.is-focused{color:inherit}#editor .editor-styles-wrapper .wp-block-button .crowdsignal-forms-poll__submit-button.wp-block-button__link{cursor:text}#editor .editor-styles-wrapper .wp-block-button .crowdsignal-forms-poll__submit-button.wp-block-button__link:hover{opacity:inherit}.crowdsignal-forms-poll__resize-wrapper{margin-left:auto;margin-right:auto}.crowdsignal-forms__redirect-url input[type="text"]{width:100%}.crowdsignal-forms__redirect-url__suggestions{width:260px}.crowdsignal-forms__row{display:flex;flex-direction:row}.crowdsignal-forms__row .crowdsignal-forms__small-text-input input[type="text"]{width:40px}.crowdsignal-forms__row .crowdsignal-forms__small-text-input input[type="number"]{width:50px}.crowdsignal-forms__reset-width-button{margin-left:auto;margin-top:25px}.crowdsignal-forms-poll__edit-bar{font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:13px;margin-top:24px;padding:18px 24px;color:#d82e20;border-left:4px solid #d82e20;background:#f8dad8;display:flex;flex-direction:row;justify-content:space-between;align-items:center}.crowdsignal-forms-poll__edit-bar .crowdsignal-forms-poll__edit-bar-message{padding-inline-end:24px}.crowdsignal-forms-poll__edit-bar button.crowdsignal-forms-poll__edit-bar-button{border:2px solid #d82e20;border-radius:4px;color:#d82e20;background:transparent;padding:8px 16px;cursor:pointer}.crowdsignal-poll-wrapper:not(:first-child),[data-type="crowdsignal-forms/poll"]:not(:first-child){margin-top:3em}.crowdsignal-poll-wrapper:not(:last-child),[data-type="crowdsignal-forms/poll"]:not(:last-child){margin-bottom:3em}.crowdsignal-forms-poll{border-color:var(--crowdsignal-forms-border-color);border-style:solid;border-width:var(--crowdsignal-forms-border-width);margin-left:auto;margin-right:auto;margin-top:5px;position:relative;text-align:left}.entry-content .alignfull.crowdsignal-poll-wrapper .crowdsignal-forms-poll{border-left-width:0;border-right-width:0}.crowdsignal-forms-poll h3.crowdsignal-forms-poll__question{margin:0 0 28px}.crowdsignal-forms-poll h3.crowdsignal-forms-poll__question:first-child{margin-top:0}.crowdsignal-forms-poll p.crowdsignal-forms-poll__note{font-style:italic;margin:0 0 32px}.crowdsignal-forms-poll .crowdsignal-forms-poll__content{padding:40px 24px 16px 24px}.crowdsignal-forms-poll .crowdsignal-forms-poll__content .crowdsignal-forms-poll__question{font-family:var(--crowdsignal-forms-question-font-family)}.crowdsignal-forms-poll .crowdsignal-forms-poll__content .crowdsignal-forms-poll__answer-label,.crowdsignal-forms-poll .crowdsignal-forms-poll__content .crowdsignal-forms-poll__answer-results-answer,.crowdsignal-forms-poll .crowdsignal-forms-poll__content .crowdsignal-forms-poll__note{font-family:var(--crowdsignal-forms-body-font-family)}.entry-content .alignfull.crowdsignal-poll-wrapper .crowdsignal-forms-poll .crowdsignal-forms-poll__content{margin:0 auto;max-width:var(--crowdsignal-forms-content-wide-width)}@media screen and (min-width: 660px){.alignwide.crowdsignal-poll-wrapper .crowdsignal-forms-poll .crowdsignal-forms-poll__content,.alignfull.crowdsignal-poll-wrapper .crowdsignal-forms-poll .crowdsignal-forms-poll__content{padding:80px}}.crowdsignal-forms-poll.is-closed .crowdsignal-forms-poll__form{opacity:0.5}.crowdsignal-forms-poll.is-hidden{opacity:0.5}.crowdsignal-forms-poll.has-text-color{color:var(--crowdsignal-forms-text-color)}.crowdsignal-forms-poll.has-bg-color{background-color:var(--crowdsignal-forms-bg-color)}.crowdsignal-forms-poll.has-border-radius{border-radius:var(--crowdsignal-forms-border-radius);overflow:hidden}.crowdsignal-forms-poll.has-box-shadow{box-shadow:0 3px 6px rgba(0,0,0,0.16),0 3px 6px rgba(0,0,0,0.23)}.crowdsignal-forms-poll .is-transparent{opacity:0;pointer-events:none}.crowdsignal-forms-poll__block-button .crowdsignal-forms-poll__submit-button{-webkit-appearance:initial}.crowdsignal-forms-poll__block-button .crowdsignal-forms-poll__submit-button:disabled{opacity:0.7}.crowdsignal-forms-poll.has-submit-button-text-color .crowdsignal-forms-poll__block-button .crowdsignal-forms-poll__submit-button.wp-block-button__link{color:var(--crowdsignal-forms-submit-button-text-color)}.crowdsignal-forms-poll.has-submit-button-bg-color .crowdsignal-forms-poll__block-button .crowdsignal-forms-poll__submit-button.wp-block-button__link{background-color:var(--crowdsignal-forms-submit-button-bg-color)}.crowdsignal-forms-poll.has-submit-button-bg-color .crowdsignal-forms-poll__block-button .crowdsignal-forms-poll__submit-button.wp-block-button__link:hover{opacity:0.9}.crowdsignal-forms-poll__options.is-button{display:flex;flex-direction:column;flex-wrap:wrap}.crowdsignal-forms-poll__options.is-button.is-inline-button-alignment{flex-direction:row}.crowdsignal-forms-poll__answer{cursor:pointer;display:flex;font-size:inherit;font-weight:600;margin:0;padding:0 2px;position:relative}.crowdsignal-forms-poll__answer.is-button{margin-inline-end:20px;margin-block-end:20px;max-width:100%}.crowdsignal-forms-poll__answer.is-button .wp-block-button.crowdsignal-forms-poll__block-button,.crowdsignal-forms-poll__answer.is-button .crowdsignal-forms-poll__submit-button{max-width:100%}.crowdsignal-forms-poll__answer.is-button .crowdsignal-forms-poll__submit-button{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.crowdsignal-forms-poll__answer:not(.is-button){margin-block-end:16px}.crowdsignal-forms-poll__answer:hover,.crowdsignal-forms-poll__answer.is-focused{color:var(--crowdsignal-forms-submit-button-bg-color)}.has-voted .crowdsignal-forms-poll__answer{opacity:0.5}input[type="checkbox"].crowdsignal-forms-poll__input,input[type="radio"].crowdsignal-forms-poll__input{height:0;opacity:0;position:absolute;width:0}.crowdsignal-forms-poll__check{display:inline-block;height:1em;margin:0 10px 0 0;position:relative;width:1em}.crowdsignal-forms-poll__check::before{background-color:transparent;border:1.5px solid var(--crowdsignal-forms-text-color);border-radius:50%;box-sizing:border-box;content:"";display:block;height:100%;transition:background-color 0.3s, border-color 0.3s;width:100%}.crowdsignal-forms-poll__answer.is-multiple-choice .crowdsignal-forms-poll__check::before{border-radius:3px}.crowdsignal-forms-poll__answer.is-multiple-choice.is-selected .crowdsignal-forms-poll__check::before{border-color:var(--crowdsignal-forms-text-color);background-color:var(--crowdsignal-forms-text-color)}.crowdsignal-forms-poll__answer.is-selected:not(.is-multiple-choice) .crowdsignal-forms-poll__check::after{animation-duration:0.3s;animation-name:crowdsignal-forms-animation__pop;animation-iteration-count:1;background-clip:padding-box;background-color:var(--crowdsignal-forms-text-color);border:4.5px solid transparent;border-radius:50%;box-sizing:border-box;content:"";display:block;height:100%;position:absolute;left:0;top:0;width:100%}.crowdsignal-forms-poll__answer.is-selected.is-multiple-choice .crowdsignal-forms-poll__check::after{border-color:var(--crowdsignal-forms-submit-button-text-color);border-style:solid;border-width:0 0 2px 2px;box-sizing:border-box;content:"";display:block;height:25%;margin:-0.1em 0 0 -0.2em;position:absolute;left:50%;top:50%;transform:rotateZ(-45deg);width:50%}div.crowdsignal-forms-poll__answer-label-wrapper{flex:1;word-break:break-word}div.crowdsignal-forms-poll__answer-label-wrapper span.crowdsignal-forms-poll__answer-label{line-height:1;vertical-align:top}div.crowdsignal-forms-poll__answer-label-wrapper span.crowdsignal-forms-poll__answer-label span::after{vertical-align:top}.crowdsignal-forms-poll__button{border:0;padding:0}.crowdsignal-forms-poll__actions .wp-block-button,.crowdsignal-forms-poll__options .wp-block-button{margin:0}.crowdsignal-forms-poll__actions{display:flex;justify-content:flex-end}.editor-styles-wrapper .crowdsignal-forms-poll .crowdsignal-forms-poll__actions .wp-block-button.crowdsignal-forms-poll__block-button,.editor-styles-wrapper .crowdsignal-forms-poll .crowdsignal-forms-poll__options .wp-block-button.crowdsignal-forms-poll__block-button{margin:0}.crowdsignal-forms-poll__closed-banner{background-color:var(--crowdsignal-forms-border-color);box-sizing:border-box;display:flex;color:var(--crowdsignal-forms-submit-button-text-color);font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;justify-content:center;padding:calc(var(--crowdsignal-forms-border-width) + 0.2em) 0 0.2em;width:100%}.is-hidden .crowdsignal-forms-poll__closed-banner{font-style:italic}.crowdsignal-forms-poll__error{color:red}.crowdsignal-forms-poll__results-list{margin:0 0 1em;position:relative}.crowdsignal-forms-poll__answer-results{display:flex;flex-direction:column;margin:0 0 16px;width:100%}.crowdsignal-forms-poll__answer-results:last-child{margin:0}.crowdsignal-forms-poll__answer-results-labels{align-items:flex-end;display:flex;margin:0 0 8px;width:100%;word-break:break-word}.crowdsignal-forms-poll__answer-results-answer{flex:1;font-size:1em;font-weight:600}.crowdsignal-forms-poll__answer-results-votes{font-size:0.75em;line-height:2}.crowdsignal-forms-poll__answer-results-percent{font-weight:600;line-height:1.6}.crowdsignal-forms-poll__answer-results-votes,.crowdsignal-forms-poll__answer-results-percent{font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;margin-left:20px;transition:opacity 0.3s}.crowdsignal-forms-poll__answer-results.is-error .crowdsignal-forms-poll__answer-results-votes,.crowdsignal-forms-poll__answer-results.is-error .crowdsignal-forms-poll__answer-results-percent{display:none}.crowdsignal-forms-poll__answer-results.is-loading .crowdsignal-forms-poll__answer-results-votes,.crowdsignal-forms-poll__answer-results.is-loading .crowdsignal-forms-poll__answer-results-percent{animation-duration:1.5s;animation-iteration-count:infinite;animation-name:crowdsignal-forms-animation__pulse;background-color:var(--crowdsignal-forms-text-color);font-size:0.7em;height:1em;width:50px}.crowdsignal-forms-poll__answer-results.is-loading .crowdsignal-forms-poll__answer-results-votes:last-child,.crowdsignal-forms-poll__answer-results.is-loading .crowdsignal-forms-poll__answer-results-percent:last-child{width:40px}.crowdsignal-forms-poll__answer-results-progress-track{border:1px solid;border-color:rgba(var(--crowdsignal-forms-text-color-properties), 0.3);box-sizing:border-box;height:1em;width:100%}.crowdsignal-forms-poll__answer-results.is-loading .crowdsignal-forms-poll__answer-results-progress-track{animation-duration:1.5s;animation-iteration-count:infinite;animation-name:crowdsignal-forms-animation__pulse}.crowdsignal-forms-poll__answer-results-progress-bar{animation-fill-mode:forwards;background-color:var(--crowdsignal-forms-submit-button-bg-color);height:100%;transition:background-color 0.3s, width 0.3s}.crowdsignal-forms-poll__answer-results.is-error .crowdsignal-forms-poll__answer-results-progress-bar{width:0}.crowdsignal-forms-poll__answer-results.is-loading .crowdsignal-forms-poll__answer-results-progress-bar{background-color:var(--crowdsignal-forms-text-color);width:25%}.crowdsignal-forms-poll__answer-results.is-loading:nth-child(5n+1) .crowdsignal-forms-poll__answer-results-progress-bar{width:40%}.crowdsignal-forms-poll__answer-results.is-loading:nth-child(5n+2) .crowdsignal-forms-poll__answer-results-progress-bar{width:75%}.crowdsignal-forms-poll__answer-results.is-loading:nth-child(5n+3) .crowdsignal-forms-poll__answer-results-progress-bar{width:50%}.crowdsignal-forms-poll__answer-results.is-loading:nth-child(5n+4) .crowdsignal-forms-poll__answer-results-progress-bar{width:60%}.crowdsignal-forms-poll__results-footer{display:flex;flex-direction:column;justify-content:space-between;width:100%;font-size:0.9em}.crowdsignal-forms-poll__results-total{font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;position:relative;text-align:right;width:100%;margin-bottom:1em}.crowdsignal-forms-poll__results.is-loading .crowdsignal-forms-poll__results-total{color:transparent}.crowdsignal-forms-poll__results.is-loading .crowdsignal-forms-poll__results-total::before{animation-name:crowdsignal-forms-animation__pulse;animation-duration:1.5s;animation-iteration-count:infinite;background-color:var(--crowdsignal-forms-text-color);content:"";display:block;position:absolute;right:0;height:1em;width:150px}.crowdsignal-forms-poll__error-banner{font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:13px;margin-top:24px;padding:18px 24px;color:#d82e20;border-left:4px solid #d82e20;background:#f8dad8}.crowdsignal-forms-poll__submit-message-container{position:absolute;background-color:var(--crowdsignal-forms-bg-color);left:0;top:0;width:100%;height:100%;overflow:hidden}.has-default-thankyou .crowdsignal-forms-poll__submit-message-container{background-color:#fff}.crowdsignal-forms-poll__submit-message{position:relative}.crowdsignal-forms-poll__submit-message button.crowdsignal-forms-poll__dismiss-submit-message{position:absolute;right:0;top:0;background-color:transparent;color:#000;text-decoration:none;border:none}.crowdsignal-forms-poll__submit-message button.crowdsignal-forms-poll__dismiss-submit-message:hover{background:inherit}.crowdsignal-forms-poll__submit-message-footer{position:absolute;bottom:0;left:0;padding:16px 24px;width:100%;background-color:inherit}.crowdsignal-forms-poll__thank-you-cs-sticker{right:25px;top:66px}.crowdsignal-forms-poll__thank-you-sticker{right:132px;top:12px}.crowdsignal-forms-poll__thank-you-cs-sticker,.crowdsignal-forms-poll__thank-you-sticker{filter:drop-shadow(0 1px 2px rgba(0,0,0,0.2));width:100px;height:100px;position:absolute}.crowdsignal-forms-poll__custom-message-check{color:var(--crowdsignal-forms-text-color);padding-left:24px;padding-top:24px}.crowdsignal-forms-poll__custom-message{font-family:var(--crowdsignal-forms-question-font-family);font-weight:600;padding:16px 24px}.wp_block-crowdsignal-forms-poll__vote-branding{margin-top:16px}.crowdsignal-forms__style-probe{display:none}.crowdsignal-forms-vote .block-editor-block-list__layout{display:flex;flex-direction:row}.crowdsignal-forms__border-popover .crowdsignal-forms__row{padding:10px}.crowdsignal-forms-vote.no-results .crowdsignal-forms-vote-item__count{display:none}.crowdsignal-forms-vote__size-dropdown .components-button.components-dropdown-menu__menu-item.is-active::after{content:"\2713";margin-inline-start:auto;margin-inline-end:0}.crowdsignal-vote-wrapper:not(:first-child),[data-type="crowdsignal-forms/vote"]:not(:first-child){margin-top:3em}.crowdsignal-vote-wrapper:not(:last-child),[data-type="crowdsignal-forms/vote"]:not(:last-child){margin-bottom:3em}.crowdsignal-forms-vote{align-items:center;display:inline-flex;flex-direction:column}.crowdsignal-forms-vote.crowdsignal-forms-vote__example{align-items:center}[data-type="crowdsignal-forms/vote-item"]{margin-top:28px !important;margin-bottom:0 !important}.crowdsignal-forms-vote__items{display:flex;flex-direction:row}.crowdsignal-forms-vote-item{border:var(--crowdsignal-forms-vote-border-width) solid #d2d2d2;border-radius:var(--crowdsignal-forms-vote-border-radius);cursor:pointer;display:flex;flex-direction:row;align-items:center;position:relative;user-select:none;-webkit-user-select:none}.crowdsignal-forms-vote-item:not(:last-child){margin-inline-end:8px !important}.crowdsignal-forms-vote-item.has-bg-color{background-color:var(--crowdsignal-forms-vote-bg-color)}.crowdsignal-forms-vote-item.has-border-color{border-color:var(--crowdsignal-forms-vote-border-color)}.crowdsignal-forms-vote-item.has-text-color{color:var(--crowdsignal-forms-vote-text-color)}.is-closed .crowdsignal-forms-vote-item,.crowdsignal-forms-vote-item.is-disabled{cursor:inherit}.is-closed .crowdsignal-forms-vote-item,.crowdsignal-forms-vote-item.is-disabled:not(.is-voted-on){opacity:0.5}.size-small .crowdsignal-forms-vote-item{padding:18px 10px;height:0.7em}.size-small .crowdsignal-forms-vote-item.is-type-down{padding-left:9px}.size-medium .crowdsignal-forms-vote-item{height:1em;padding:20px 10px}.size-medium .crowdsignal-forms-vote-item.is-type-down{padding-left:9px}.size-large .crowdsignal-forms-vote-item{height:1.2em;padding:22px 16px}.size-large .crowdsignal-forms-vote-item:not(:last-child){margin-inline-end:16px !important}.size-large .crowdsignal-forms-vote-item.is-type-down{padding-left:15px}.crowdsignal-forms-vote-item.is-voted-on,.crowdsignal-forms-vote-item:hover:not(.is-disabled),.crowdsignal-forms-vote-item:focus:not(.is-disabled):not(.is-in-editor){border-color:var(--crowdsignal-forms-vote-voted-color);color:var(--crowdsignal-forms-vote-voted-color)}.crowdsignal-forms-vote-item.is-voted-on.has-bg-color,.crowdsignal-forms-vote-item.is-voted-on.has-text-color,.crowdsignal-forms-vote-item:hover:not(.is-disabled).has-bg-color,.crowdsignal-forms-vote-item:hover:not(.is-disabled).has-text-color,.crowdsignal-forms-vote-item:focus:not(.is-disabled):not(.is-in-editor).has-bg-color,.crowdsignal-forms-vote-item:focus:not(.is-disabled):not(.is-in-editor).has-text-color{background-color:var(--crowdsignal-forms-vote-text-color);border-color:var(--crowdsignal-forms-vote-bg-color);color:var(--crowdsignal-forms-vote-bg-color)}.size-small .crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__icon{width:0.7em;height:0.7em;max-height:0.7em}.size-medium .crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__icon{width:1em;height:1em;max-height:1em}.size-large .crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__icon{width:1.2em;height:1.2em;max-height:1.2em}.crowdsignal-forms-vote-item.is-voted-on .crowdsignal-forms-vote-item__icon{animation-duration:0.4s;animation-name:crowdsignal-forms-animation__grow;animation-iteration-count:1;animation-timing-function:ease-out}.crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count{font-size:14pt;font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;margin-inline-start:10px;font-variant-numeric:tabular-nums;transform:rotateX(0deg);transform-origin:50% 50% 10px;transition:transform 0.3s}.size-small .crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count{font-size:0.6em}.size-medium .crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count{font-size:0.8em}.size-large .crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count{font-size:1em}.crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count-enter,.crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count-enter-active{margin:0;position:absolute;right:0}.crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count-enter{transform:rotateX(-90deg)}.crowdsignal-forms-vote-item.is-voted-on .crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count-enter{transform:rotateX(90deg)}.crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count-exit,.crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count-exit-active{margin:0;position:absolute;right:10px;top:4px;transform:rotateX(90deg)}.crowdsignal-forms-vote-item.is-voted-on .crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count-exit,.crowdsignal-forms-vote-item.is-voted-on .crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count-exit-active{transform:rotateX(-90deg)}.crowdsignal-forms-vote__branding{display:flex}.crowdsignal-forms-vote__branding .crowdsignal-forms-vote__branding-link{font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:8px;padding:8px 4px 0;text-decoration:none !important;text-transform:uppercase;border:0 !important}.crowdsignal-forms-vote__branding .crowdsignal-forms-vote__branding-link.with-external-icon::after{content:"\2197";display:inline;font-size:6px;vertical-align:super}.crowdsignal-forms-vote__branding .crowdsignal-forms-vote__branding-link:not(:hover){color:var(--crowdsignal-forms-text-color)}.crowdsignal-applause-wrapper{margin-bottom:3em}.crowdsignal-forms-applause{display:flex;flex-direction:row;align-items:center;outline:0;width:max-content;cursor:pointer;border:var(--crowdsignal-forms-applause-border-width) solid #d2d2d2;border-radius:var(--crowdsignal-forms-applause-border-radius);user-select:none;--webkit-user-select: none}.crowdsignal-forms-applause .crowdsignal-forms-applause__count{margin:unset !important}.crowdsignal-forms-applause.size-small{padding:20px 16px 18px 12px;height:0.7em}.crowdsignal-forms-applause.size-small .crowdsignal-forms-applause__count{font-size:14px;padding-bottom:2px}.crowdsignal-forms-applause.size-medium{height:1em;padding:24px 16px 20px 8px}.crowdsignal-forms-applause.size-medium .crowdsignal-forms-applause__count{font-size:16px;padding-bottom:4px}.crowdsignal-forms-applause.size-large{height:1.2em;padding:28px 18px 22px 8px}.crowdsignal-forms-applause.size-large .crowdsignal-forms-applause__count{font-size:19px;padding-bottom:6px}.crowdsignal-forms-applause.is-closed{opacity:0.5}.crowdsignal-forms-applause.has-text-color{color:var(--crowdsignal-forms-applause-text-color)}.crowdsignal-forms-applause.has-border-color{border:var(--crowdsignal-forms-applause-border-width) solid var(--crowdsignal-forms-applause-border-color)}.crowdsignal-forms-applause.has-bg-color{background-color:var(--crowdsignal-forms-applause-bg-color)}.crowdsignal-forms-applause:not(.is-closed):hover{color:var(--crowdsignal-forms-applause-hover-color);border-color:var(--crowdsignal-forms-applause-hover-color)}.crowdsignal-forms-applause:not(.is-closed):hover.has-bg-color{color:var(--crowdsignal-forms-applause-bg-color);background-color:var(--crowdsignal-forms-applause-text-color);border-color:var(--crowdsignal-forms-applause-bg-color)}.crowdsignal-forms-applause__animation{fill:var(--crowdsignal-forms-applause-text-color);margin-inline-end:5px}.crowdsignal-forms-applause.size-small .crowdsignal-forms-applause__animation{width:33px;height:33px;max-height:33px}.crowdsignal-forms-applause.size-medium .crowdsignal-forms-applause__animation{width:50px;height:50px;max-height:50px}.crowdsignal-forms-applause.size-large .crowdsignal-forms-applause__animation{width:60px;height:60px;max-height:60px}.crowdsignal-forms-applause__animation .crowdsignal-forms-applause__animation-inner-fill{fill:var(--crowdsignal-forms-applause-bg-color)}.crowdsignal-forms-applause:not(.is-closed):hover .crowdsignal-forms-applause__animation{fill:var(--crowdsignal-forms-applause-hover-color)}.crowdsignal-forms-applause.has-bg-color:not(.is-closed):hover .crowdsignal-forms-applause__animation{fill:var(--crowdsignal-forms-applause-bg-color)}.crowdsignal-forms-applause.has-bg-color:not(.is-closed):hover .crowdsignal-forms-applause__animation .crowdsignal-forms-applause__animation-inner-fill{fill:var(--crowdsignal-forms-applause-text-color)}.crowdsignal-forms-applause__animation-right{transition:transform 0.3s}.crowdsignal-forms-applause:not(.is-closed):hover .crowdsignal-forms-applause__animation-right{transform:translateX(3%) translateY(-3%)}.crowdsignal-forms-applause__animation-left{transition:transform 0.3s}.crowdsignal-forms-applause:not(.is-closed):hover .crowdsignal-forms-applause__animation-left{transform:translateX(-3%) translateY(0)}.crowdsignal-forms-applause__animation-wave-small{opacity:1}.crowdsignal-forms-applause:not(.is-closed):hover .crowdsignal-forms-applause__animation-wave-small{animation:crowdsignal-forms-animation__fade-out 0.3s forwards;transform:translateY(-5%);transition:transform 0.3s}.crowdsignal-forms-applause__animation-wave-large{opacity:0}.crowdsignal-forms-applause .crowdsignal-forms-applause__animation.is-active .crowdsignal-forms-applause__animation-right{transform:translateX(-3%) translateY(0);transition:transform 0.1s}.crowdsignal-forms-applause .crowdsignal-forms-applause__animation.is-active .crowdsignal-forms-applause__animation-left{transform:translateX(3%) translateY(0);transition:transform 0.1s}.crowdsignal-forms-applause .crowdsignal-forms-applause__animation.is-active .crowdsignal-forms-applause__animation-wave-small{animation:crowdsignal-forms-animation__fade-out 0.3s forwards;transform:translateY(-5%);transition:transform 0.3s}.crowdsignal-forms-applause .crowdsignal-forms-applause__animation.is-active .crowdsignal-forms-applause__animation-wave-large{animation:crowdsignal-forms-animation__fade-in 0.03s forwards;animation-delay:0.07s}.crowdsignal-forms-nps.is-inactive{opacity:0.6}.crowdsignal-forms-nps__toolbar-toggle{font-weight:600;padding-left:16px !important;padding-right:16px !important}.crowdsignal-forms-nps__toolbar-popover{padding:15px;min-width:280px}.crowdsignal-forms-nps__toolbar-popover .components-base-control__field{display:flex;flex-direction:row;align-items:center;margin-bottom:0}.crowdsignal-forms-nps__toolbar-popover .components-base-control__label{display:block;flex-grow:1;line-height:30px;margin-bottom:0}.crowdsignal-forms-nps__toolbar-popover .components-text-control__input{width:5em}.crowdsignal-forms-nps__toolbar-popover-button svg{margin-right:0 !important}.crowdsignal-forms-nps__toolbar-popover-button.components-button.has-icon .dashicon{margin-right:2px}.crowdsignal-forms-nps__rating-button:hover{background-color:var(--crowdsignal-forms-button-text-color);border-color:var(--crowdsignal-forms-button-color);color:var(--crowdsignal-forms-button-color)}.crowdsignal-forms-nps{border:0;border-top:10px solid var(--crowdsignal-forms-button-color);background-color:var(--crowdsignal-forms-background-color);color:var(--crowdsignal-forms-text-color);height:auto;padding:24px 16px;position:relative}@media screen and (min-width: 670px){.crowdsignal-forms-nps{padding:32px 32px 24px 32px}}.crowdsignal-forms-nps .crowdsignal-forms__footer-branding{margin-top:40px}.crowdsignal-forms-nps__close-button{align-items:center;background-color:var(--crowdsignal-forms-button-color);border:0;border-radius:20px;color:var(--crowdsignal-forms-button-text-color);display:flex;height:40px;justify-content:center;outline:0;padding:0;position:absolute;right:-20px;top:-25px;width:40px}.crowdsignal-forms-nps__close-button:hover{background-color:var(--crowdsignal-forms-button-text-color);color:var(--crowdsignal-forms-button-color)}.crowdsignal-forms-nps__question{margin-top:0 !important;margin-bottom:32px !important}.crowdsignal-forms-nps__rating{display:flex;flex-direction:column}.crowdsignal-forms-nps__rating-labels{display:flex;flex-direction:row;font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:14px;justify-content:space-between;margin-top:8px}.crowdsignal-forms-nps__rating-scale{display:flex;margin:10px auto 0;width:100%}.crowdsignal-forms-nps__rating-button{background-color:var(--crowdsignal-forms-button-color);border:1px solid var(--crowdsignal-forms-button-color);border-radius:2px;color:var(--crowdsignal-forms-button-text-color);cursor:pointer;display:inline-flex;flex:1;font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:15px;font-weight:600;height:50px;justify-content:center;line-height:50px;margin:0 0 0 0.4em;padding:0;text-align:center;text-decoration:none;transition:background-color 0.2s, color 0.2s}.crowdsignal-forms-nps__rating-button:first-child{margin:0}.crowdsignal-forms-nps__rating-button:hover:enabled{background-color:var(--crowdsignal-forms-button-text-color);color:var(--crowdsignal-forms-button-color);text-decoration:none}.crowdsignal-forms-nps__rating-button:disabled:not(.is-active){background-color:transparent;color:var(--crowdsignal-forms-button-color)}@media screen and (min-width: 670px){.crowdsignal-forms-nps__rating-button{margin:0 0 0 0.7em}}.crowdsignal-forms-nps__feedback{display:flex;flex-direction:column}.crowdsignal-forms-nps__feedback-text{margin-top:16px;margin-bottom:25px;width:100%}.crowdsignal-forms-nps__feedback-text textarea{font-size:var(--crowdsignal-forms-text-size)}.crowdsignal-forms-nps__feedback-button-wrapper{align-self:flex-end}.crowdsignal-forms-nps__feedback-button{align-self:flex-end;background-color:var(--crowdsignal-forms-button-color) !important;border:1px solid var(--crowdsignal-forms-button-color);color:var(--crowdsignal-forms-button-text-color) !important;text-decoration:none}.crowdsignal-forms-nps__feedback-button:hover{background-color:var(--crowdsignal-forms-button-text-color) !important;color:var(--crowdsignal-forms-button-color) !important;text-decoration:none}
build/editor.js CHANGED
@@ -1,13 +1,13 @@
1
- !function(e,t){for(var n in t)e[n]=t[n]}(window,function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=46)}([function(e,t){!function(){e.exports=this.wp.element}()},function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t){!function(){e.exports=this.lodash}()},function(e,t){!function(){e.exports=this.React}()},function(e,t){!function(){e.exports=this.wp.components}()},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){!function(){e.exports=this.wp.blockEditor}()},function(e,t,n){e.exports=n(38)()},function(e,t,n){var r=n(35),o=n(36),l=n(26),a=n(37);e.exports=function(e,t){return r(e)||o(e,t)||l(e,t)||a()}},function(e,t){!function(){e.exports=this.regeneratorRuntime}()},function(e,t,n){var r;
2
  /*!
3
  Copyright (c) 2017 Jed Watson.
4
  Licensed under the MIT License (MIT), see
5
  http://jedwatson.github.io/classnames
6
- */!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var l=typeof r;if("string"===l||"number"===l)e.push(r);else if(Array.isArray(r)&&r.length){var a=o.apply(null,r);a&&e.push(a)}else if("object"===l)for(var c in r)n.call(r,c)&&r[c]&&e.push(c)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},function(e,t){function n(e,t,n,r,o,l,a){try{var c=e[l](a),s=c.value}catch(i){return void n(i)}c.done?t(s):Promise.resolve(s).then(r,o)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise((function(o,l){var a=e.apply(t,r);function c(e){n(a,o,l,c,s,"next",e)}function s(e){n(a,o,l,c,s,"throw",e)}c(void 0)}))}}},function(e,t){!function(){e.exports=this.wp.data}()},function(e,t){!function(){e.exports=this.wp.compose}()},function(e,t){!function(){e.exports=this.wp.htmlEntities}()},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n.apply(this,arguments)}e.exports=n},function(e,t,n){var r=n(32),o=n(33),l=n(26),a=n(34);e.exports=function(e){return r(e)||o(e)||l(e)||a()}},function(e,t){!function(){e.exports=this.wp.blocks}()},function(e,t){!function(){e.exports=this.wp.apiFetch}()},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t,n){var r,o;
7
  /*!
8
  * JavaScript Cookie v2.2.1
9
  * https://github.com/js-cookie/js-cookie
10
  *
11
  * Copyright 2006, 2015 Klaus Hartl & Fagner Brack
12
  * Released under the MIT license
13
- */!function(l){if(void 0===(o="function"==typeof(r=l)?r.call(t,n,t,e):r)||(e.exports=o),!0,e.exports=l(),!!0){var a=window.Cookies,c=window.Cookies=l();c.noConflict=function(){return window.Cookies=a,c}}}((function(){function e(){for(var e=0,t={};e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}function t(e){return e.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function n(r){function o(){}function l(t,n,l){if("undefined"!=typeof document){"number"==typeof(l=e({path:"/"},o.defaults,l)).expires&&(l.expires=new Date(1*new Date+864e5*l.expires)),l.expires=l.expires?l.expires.toUTCString():"";try{var a=JSON.stringify(n);/^[\{\[]/.test(a)&&(n=a)}catch(i){}n=r.write?r.write(n,t):encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var c="";for(var s in l)l[s]&&(c+="; "+s,!0!==l[s]&&(c+="="+l[s].split(";")[0]));return document.cookie=t+"="+n+c}}function a(e,n){if("undefined"!=typeof document){for(var o={},l=document.cookie?document.cookie.split("; "):[],a=0;a<l.length;a++){var c=l[a].split("="),s=c.slice(1).join("=");n||'"'!==s.charAt(0)||(s=s.slice(1,-1));try{var i=t(c[0]);if(s=(r.read||r)(s,i)||t(s),n)try{s=JSON.parse(s)}catch(u){}if(o[i]=s,e===i)break}catch(u){}}return e?o[e]:o}}return o.set=l,o.get=function(e){return a(e,!1)},o.getJSON=function(e){return a(e,!0)},o.remove=function(t,n){l(t,"",e(n,{expires:-1}))},o.defaults={},o.withConverter=n,o}((function(){}))}))},function(e,t){!function(){e.exports=this.ReactDOM}()},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){var r=n(22);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}},function(e,t,n){var r=n(25);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}},function(e,t,n){var r=n(40),o=n(41);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t}},function(e,t,n){var r=n(19),o=n(22),l=n(42),a=n(43);function c(t){var n="function"==typeof Map?new Map:void 0;return e.exports=c=function(e){if(null===e||!l(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return a(e,arguments,r(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),o(t,e)},c(t)}e.exports=c},function(e,t,n){var r=n(45);e.exports=function(e,t){if(null==e)return{};var n,o,l=r(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(l[n]=e[n])}return l}},,,function(e,t,n){var r=n(25);e.exports=function(e){if(Array.isArray(e))return r(e)}},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,l=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(s){o=!0,l=s}finally{try{r||null==c.return||c.return()}finally{if(o)throw l}}return n}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,n){"use strict";var r=n(39);function o(){}function l(){}l.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,l,a){if(a!==r){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:l,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){e.exports=function(e){return-1!==Function.toString.call(e).indexOf("[native code]")}},function(e,t,n){var r=n(22),o=n(44);function l(t,n,a){return o()?e.exports=l=Reflect.construct:e.exports=l=function(e,t,n){var o=[null];o.push.apply(o,t);var l=new(Function.bind.apply(e,o));return n&&r(l,n.prototype),l},l.apply(null,arguments)}e.exports=l},function(e,t){e.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}},function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}},function(e,t,n){"use strict";n.r(t);var r=n(17),o=n(0),l=n(1),a=function(){return Object(o.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.5 6L5.5 18C5.5 18.2761 5.72386 18.5 6 18.5L18 18.5C18.2761 18.5 18.5 18.2761 18.5 18L18.5 6C18.5 5.72386 18.2761 5.5 18 5.5L6 5.5C5.72386 5.5 5.5 5.72386 5.5 6ZM4 18L4 6C4 4.89543 4.89543 4 6 4L18 4C19.1046 4 20 4.89543 20 6L20 18C20 19.1046 19.1046 20 18 20L6 20C4.89543 20 4 19.1046 4 18Z"}),Object(o.createElement)("rect",{x:"15",y:"17",width:"6",height:"1.5",transform:"rotate(-90 15 17)"}),Object(o.createElement)("rect",{x:"11.5",y:"17",width:"9",height:"1.5",transform:"rotate(-90 11.5 17)"}),Object(o.createElement)("rect",{x:"8",y:"17",width:"5",height:"1.5",transform:"rotate(-90 8 17)"}))},c=n(16),s=n.n(c),i=n(5),u=n.n(i),d=n(12),f=n(2);function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){u()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var p={tryFetch:!1,isFetching:!1,pollsByClientId:{},pollClientIds:[]},g={setTryFetchPollData:function(e){return{type:"SET_TRY_FETCH",tryFetch:e}},setIsFetchingPollData:function(e){return{type:"IS_FETCHING",isFetching:e}},setPollApiDataForClientId:function(e,t){return{type:"SET_POLL",clientId:e,pollData:t}},addPollClientId:function(e){return{type:"ADD_POLL_CLIENT_ID",clientId:e}},removePollClientId:function(e){return{type:"REMOVE_POLL_CLIENT_ID",clientId:e}}},O=(Object(d.registerStore)("crowdsignal-forms/polls",{reducer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_TRY_FETCH":return m({},e,{tryFetch:!!t.tryFetch});case"IS_FETCHING":return m({},e,{isFetching:!!t.isFetching});case"SET_POLL":return m({},e,{pollsByClientId:m({},e.pollsByClientId,u()({},t.clientId,t.pollData))});case"ADD_POLL_CLIENT_ID":return m({},e,{pollClientIds:e.pollClientIds.indexOf(t.clientId)<0?[].concat(s()(e.pollClientIds),[t.clientId]):e.pollClientIds});case"REMOVE_POLL_CLIENT_ID":return m({},e,{pollClientIds:Object(f.filter)(e.pollClientIds,(function(e){return e!==t.clientId}))});default:return e}},actions:g,selectors:{shouldTryFetchingPollData:function(e){return!!e.tryFetch},getPollDataByClientId:function(e,t){return e.pollsByClientId[t]||null},getPollClientIds:function(e){return e.pollClientIds},isFetchingPollData:function(e){return!!e.isFetching}},controls:{},resolvers:{}}),n(15)),w=n.n(O),h=n(8),j=n.n(h),_=n(3),C=n.n(_),E=n(6),v=n(4),y=n(14),x=n(13),S=n(10),N=n.n(S),k=function(e){var t=e.hasVoted,n=e.isPollClosed,r=e.isPollHidden,a=e.showSubmitMessage,c=N()({"is-transparent":a},"crowdsignal-forms-poll__closed-banner");return Object(o.createElement)("div",{className:c},r&&Object(l.__)("This Poll is Hidden","crowdsignal-forms"),n&&!r&&Object(l.__)("This Poll is Closed","crowdsignal-forms"),t&&Object(l.__)("Thanks For Voting!","crowdsignal-forms"))},L=function(e){for(var t=window.getComputedStyle(e).backgroundColor;"rgba(0, 0, 0, 0)"===t&&e.parentNode&&e.parentNode.nodeType===window.Node.ELEMENT_NODE;)e=e.parentNode,t=window.getComputedStyle(e).backgroundColor;return t},T=function(e){return"0px"!==window.getComputedStyle(e).borderBlockStartWidth?window.getComputedStyle(e).borderBlockStartColor:null},P=n(7),R=n.n(P),A=n(9),I=n.n(A),D=n(11),B=n.n(D),F=n(20),M=n.n(F),V=n(23),H=n.n(V),U=n(24),W=n.n(U),z=n(27),Z=n.n(z),q=n(19),G=n.n(q),K=n(28),Y=n.n(K),J=n(18),X=n.n(J);function $(e){return function(){var t,n=G()(e);if(Q()){var r=G()(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return Z()(this,t)}}function Q(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var ee,te=function(){var e=B()(I.a.mark((function e(t){var n,r,o=arguments;return I.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=!(o.length>1&&void 0!==o[1])||o[1],r="https://api.crowdsignal.com/v3/polls",n){e.next=4;break}return e.abrupt("return",null);case 4:return e.abrupt("return",window.fetch("".concat(r,"/").concat(t,"/results"),{method:"GET",headers:{"content-type":"application/json"}}).then((function(e){if(e.status>=200&&e.status<300)return e.json();throw e})).then((function(e){if(404===e.status)return{};if(e.error)throw new Error(e.message);return e.results.votes_by_answer})));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ne=function(){var e=B()(I.a.mark((function e(t){var n,r,o;return I.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"5430eeac3911395001d731d9702fc38b",n=(new Date).getTime(),e.next=4,window.fetch("https://polldaddy.com/n/".concat("5430eeac3911395001d731d9702fc38b","/").concat(t,"?").concat(n,"&format=json"));case 4:if((r=e.sent).ok){e.next=7;break}throw new le;case 7:return e.next=9,r.json();case 9:if((o=e.sent).nonce){e.next=12;break}throw new le;case 12:return e.abrupt("return",o.nonce);case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),re=function(){var e=B()(I.a.mark((function e(t,n,r,o){var l,a,c;return I.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l=r.join(","),e.next=3,window.fetch("https://polls.polldaddy.com/vote-js.php?format=json&p=".concat(n,"&b=1&a=").concat(l,"&o=&va=16&cookie=0&n=").concat(t,"&url=").concat(encodeURIComponent(window.location),"&vi=").concat(o));case 3:if((a=e.sent).ok){e.next=6;break}throw new le;case 6:return e.next=8,a.json();case 8:if("error"!==(c=e.sent).status){e.next=11;break}throw new oe(c.error);case 11:case"end":return e.stop()}}),e)})));return function(t,n,r,o){return e.apply(this,arguments)}}(),oe=function(e){W()(n,e);var t=$(n);function n(){return H()(this,n),t.apply(this,arguments)}return n}(Y()(Error)),le=function(e){W()(n,e);var t=$(n);function n(){return H()(this,n),t.call(this,Object(l.__)("Server error. Please try again.","crowdsignal-forms"))}return n}(oe),ae=function(){var e=B()(I.a.mark((function e(){return I.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,X()({path:"/crowdsignal-forms/v1/account/connected",method:"GET"});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ce=function(){var e=B()(I.a.mark((function e(){return I.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,X()({path:"/crowdsignal-forms/v1/account/info",method:"GET"});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),se=function(e,t){var n=Object(_.useState)(null),r=j()(n,2),o=r[0],l=r[1],a=Object(_.useState)(null),c=j()(a,2),s=c[0],i=c[1],u=Object(_.useState)(!0),d=j()(u,2),f=d[0],b=d[1];return Object(_.useEffect)((function(){b(!0),i(null),l(null),e().then(l).catch(i).finally((function(){return b(!1)}))}),t),{data:o,error:s,loading:f}},ie=Object.freeze({THANK_YOU:"thank-you",CUSTOM_TEXT:"custom-text",REDIRECT:"redirect",RESULTS:"results"}),ue=Object.freeze({THEME_DEFAULT:"theme-default",GEORGIA:"georgia",PALATINO:"palatino",TIMES_NEW_ROMAN:"times-new-roman",ARIAL:"arial",IMPACT:"impact",LUCIDA:"lucida",TAHOMA:"tahoma",TREBUCHET:"trebuchet",VERDANA:"verdana",COURIER:"courier",CABIN:"Cabin",CHIVO:"Chivo",OPEN_SANS:"Open+Sans",FIRA_SANS:"Fira+Sans",ROBOTO:"Roboto",NUNITO:"Nunito",OVERPASS:"Overpass",LATO:"Lato",LIBRE_FRANKLIN:"Libre+Franklin",MONTSERRAT:"Montserrat",POPPINS:"Poppins",RUBIK:"Rubik",RALEWAY:"Raleway",JOSEFIN_SANS:"Josefin+Sans",ALEGREYA_SANS:"Alegreya+Sans",OSWALD:"Oswald"}),de=Object.freeze([ue.CABIN,ue.CHIVO,ue.OPEN_SANS,ue.FIRA_SANS,ue.ROBOTO,ue.NUNITO,ue.OVERPASS,ue.LATO,ue.LIBRE_FRANKLIN,ue.MONTSERRAT,ue.POPPINS,ue.RUBIK,ue.RALEWAY,ue.JOSEFIN_SANS,ue.ALEGREYA_SANS,ue.OSWALD]),fe=Object.freeze((ee={},u()(ee,ue.THEME_DEFAULT,null),u()(ee,ue.GEORGIA,"Georgia, serif"),u()(ee,ue.PALATINO,'"Palatino Linotype", "Book Antiqua", Palatino, serif'),u()(ee,ue.TIMES_NEW_ROMAN,'"Times New Roman", Times, serif'),u()(ee,ue.ARIAL,"Arial, Helvetica, sans-serif"),u()(ee,ue.IMPACT,"Impact, Charcoal, sans-serif"),u()(ee,ue.LUCIDA,'"Lucida Sans Unicode", "Lucida Grande", sans-serif'),u()(ee,ue.TAHOMA,"Tahoma, Geneva, sans-serif"),u()(ee,ue.TREBUCHET,'"Trebuchet MS", Helvetica, sans-serif'),u()(ee,ue.VERDANA,"Verdana, Geneva, sans-serif"),u()(ee,ue.COURIER,'"Courier New", Courier, monospace'),u()(ee,ue.CABIN,'"Cabin", sans-serif'),u()(ee,ue.CHIVO,'"Chivo", sans-serif'),u()(ee,ue.OPEN_SANS,'"Open Sans", sans-serif'),u()(ee,ue.FIRA_SANS,'"Fira Sans", sans-serif'),u()(ee,ue.ROBOTO,'"Roboto", sans-serif'),u()(ee,ue.NUNITO,'"Nunito", sans-serif'),u()(ee,ue.OVERPASS,'"Overpass", sans-serif'),u()(ee,ue.LATO,'"Lato", sans-serif'),u()(ee,ue.LIBRE_FRANKLIN,'"Libre Franklin", sans-serif'),u()(ee,ue.MONTSERRAT,'"Montserrat", sans-serif'),u()(ee,ue.POPPINS,'"Poppins", sans-serif'),u()(ee,ue.RUBIK,'"Rubik", sans-serif'),u()(ee,ue.RALEWAY,'"Raleway", sans-serif'),u()(ee,ue.JOSEFIN_SANS,'"Josefin Sans", sans-serif'),u()(ee,ue.ALEGREYA_SANS,'"Alegreya Sans", sans-serif'),u()(ee,ue.OSWALD,'"Oswald", sans-serif'),ee)),be=Object.freeze({OPEN:"open",CLOSED:"closed",CLOSED_AFTER:"closed-after"}),me=Object.freeze({SHOW_RESULTS:"show-results",SHOW_CLOSED_BANNER:"show-closed-banner",HIDDEN:"hidden"}),pe=Object.freeze({CONNECTED:"connected",NOT_CONNECTED:"not-connected",NOT_VERIFIED:"not-verified"}),ge=Object.freeze({RADIO:"radio",BUTTON:"button"}),Oe=Object.freeze({LIST:"list",INLINE:"inline"}),we=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=se((function(){return te(e,t)}),[e]),r=n.data,o=n.error,l=n.loading;return{error:o,loading:l,results:r}},he={is_verified:!0,capabilities:["hide-branding"],signal_count:{count:0,userLimit:2500,shouldDisplay:!1}},je=function(){var e=Object(_.useState)(he),t=j()(e,2),n=t[0],r=t[1],o=function(){var e=B()(I.a.mark((function e(){var t;return I.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ce();case 2:t=e.sent,r(t);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return Object(_.useEffect)((function(){o()}),[]),n},_e=function(e){var t=e.error,n=e.loading,r=e.text,a=e.totalVotes,c=e.votes,s=N()("crowdsignal-forms-poll__answer-results",{"is-error":t,"is-loading":n}),i=!n&&!t,u=0===a?0:100*c/a,d={width:"".concat(parseInt(u,10),"%")};return Object(o.createElement)("div",{className:s},Object(o.createElement)("div",{className:"crowdsignal-forms-poll__answer-results-labels"},Object(o.createElement)("span",{className:"crowdsignal-forms-poll__answer-results-answer"},Object(y.decodeEntities)(r)),Object(o.createElement)("span",{className:"crowdsignal-forms-poll__answer-results-votes"},i&&Object(l.sprintf)(Object(l._n)("%s vote","%s votes",c,"crowdsignal-forms"),c.toLocaleString())),Object(o.createElement)("span",{className:"crowdsignal-forms-poll__answer-results-percent"},i&&"".concat(u.toFixed(2),"%"))),Object(o.createElement)("div",{className:"crowdsignal-forms-poll__answer-results-progress-track"},Object(o.createElement)("div",{className:"crowdsignal-forms-poll__answer-results-progress-bar",style:d})))};_e.propTypes={loading:R.a.bool,text:R.a.string.isRequired,totalVotes:R.a.number,votes:R.a.number};var Ce=_e,Ee=Object(o.createElement)("span",null,"Hide Crowdsignal ads",Object(o.createElement)("br",null),"and get unlimited",Object(o.createElement)("br",null),"signals -"," ",Object(o.createElement)("a",{href:"https://crowdsignal.com/pricing",target:"_blank",rel:"noopener noreferrer"},"Upgrade")),ve=function(e){var t=e.showLogo,n=e.editing;return Object(o.createElement)("div",{className:"crowdsignal-forms-poll__footer-branding"},Object(o.createElement)("div",null,Object(o.createElement)("a",{className:"crowdsignal-forms-poll__footer-cs-link",href:"https://crowdsignal.com?ref=cs-forms-poll",target:"_blank",rel:"noopener noreferrer"},Object(l.__)("Create your own poll with Crowdsignal","crowdsignal-forms")),n&&Object(o.createElement)(v.Tooltip,{text:Ee,position:"top center"},Object(o.createElement)("a",{href:"https://crowdsignal.com/pricing",target:"_blank",rel:"noopener noreferrer",className:"crowdsignal-forms__branding-promote"},Object(l.__)("Hide","crowdsignal-forms")))),t&&Object(o.createElement)("img",{className:"crowdsignal-forms-poll__footer-branding-logo",src:"https://app.crowdsignal.com/images/svg/cs-logo-dots.svg",alt:"Crowdsignal sticker"}))};function ye(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var xe=function(e,t){return Object(f.map)(e,(function(e){return void 0!==e.answerIdFromApi?e:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ye(Object(n),!0).forEach((function(t){u()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ye(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e,{answerIdFromApi:t[e.answerId]})}))},Se=function(e){return Object(f.isEmpty)(e)||void 0===e.text||null===e.text||""===e.text},Ne=function(e){var t=e.answers,n=e.pollIdFromApi,r=e.setErrorMessage,a=e.hideBranding,c=we(n),s=c.error,i=c.loading,u=c.results;Object(_.useEffect)((function(){r(s?Object(l.__)("Unfortunately, we're having some trouble retrieving the results for this poll at this time.","crowdsignal-forms"):"")}),[s]);var d=N()("crowdsignal-forms-poll__results",{"is-error":!!s,"is-loading":i}),b=Object(f.sum)(Object(f.values)(u));return Object(o.createElement)("div",{className:d},Object(o.createElement)("div",{className:"crowdsignal-forms-poll__results-list"},Object(f.map)(t,(function(e){var t;return!Se(e)&&Object(o.createElement)(Ce,{key:e.answerId,error:!!s,loading:i,text:e.text,totalVotes:b,votes:u&&null!==(t=u[e.answerIdFromApi])&&void 0!==t?t:0})}))),Object(o.createElement)("div",{className:"crowdsignal-forms-poll__results-footer"},Object(o.createElement)("span",{className:"crowdsignal-forms-poll__results-total"},Object(l.sprintf)(Object(l._n)("%s total vote","%s total votes",b,"crowdsignal-forms"),b?b.toLocaleString():0)),!a&&Object(o.createElement)(ve,null)))};Ne.propTypes={pollIdFromApi:R.a.number,answers:R.a.arrayOf(R.a.shape({answerId:R.a.string.isRequired,answerIdFromApi:R.a.number,text:R.a.string})).isRequired,setErrorMessage:R.a.func.isRequired,hideBranding:R.a.bool};var ke=Ne,Le=n(29),Te=n.n(Le),Pe=function(e){var t=e.children;return Object(o.createElement)("div",{className:"crowdsignal-forms__style-probe"},t)},Re=function(e,t){return function(n){return Object(v.withFallbackStyles)((function(e){return{fallbackStyles:t(e.querySelector(".crowdsignal-forms__style-probe"))}}))((function(t){var r=t.fallbackStyles,l=Te()(t,["fallbackStyles"]);return Object(o.createElement)(n,w()({fallbackStyles:r||{},renderStyleProbe:function(){return r?null:Object(o.createElement)(Pe,null,Object(o.createElement)(e,null))}},l))}))}};function Ae(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Ie=function(e){var t=e.answer,n=e.answerStyle,r=e.index,a=e.isMultipleChoice,c=e.onChange,s=e.onDelete,i=e.onNewAnswer,d=e.disabled,b=function(e){return c(r,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ae(Object(n),!0).forEach((function(t){u()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ae(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},t,{text:e}))},m=function(){return s(r)},p=function(){return i(r+1)},g=N()("crowdsignal-forms-poll__answer",{"is-multiple-choice":a,"is-button":ge.BUTTON===n});return Object(o.createElement)("div",{className:g},ge.RADIO===n&&Object(o.createElement)(o.Fragment,null,Object(o.createElement)("span",{className:"crowdsignal-forms-poll__check"}),Object(o.createElement)("div",{className:"crowdsignal-forms-poll__answer-label-wrapper"},d?Object(o.createElement)("span",{className:"crowdsignal-forms-poll__answer-label"},t.text?Object(y.decodeEntities)(t.text):Object(l.__)("Enter an answer","crowdsignal-forms")):Object(o.createElement)(E.RichText,{className:"crowdsignal-forms-poll__answer-label",tagName:"span",placeholder:Object(l.__)("Enter an answer","crowdsignal-forms"),multiline:!1,preserveWhiteSpace:!1,onChange:b,onSplit:p,onReplace:f.noop,onRemove:m,value:t.text,allowedFormats:[],withoutInteractiveFormatting:!0}))),ge.BUTTON===n&&Object(o.createElement)("div",{className:"wp-block-button crowdsignal-forms-poll__block-button"},d?Object(o.createElement)("div",{className:"wp-block-button__link crowdsignal-forms-poll__submit-button"},t.text?Object(y.decodeEntities)(t.text):Object(l.__)("Enter an answer","crowdsignal-forms")):Object(o.createElement)(E.RichText,{className:"wp-block-button__link crowdsignal-forms-poll__submit-button",placeholder:Object(l.__)("Enter an answer","crowdsignal-forms"),multiline:!1,preserveWhiteSpace:!1,onChange:b,onSplit:p,onReplace:f.noop,onRemove:m,value:t.text,allowedFormats:[],withoutInteractiveFormatting:!0,keepPlaceholderOnFocus:!0})))},De=function(e,t){return Object(f.tap)(e.querySelectorAll("[role=textbox]")[t],(function(e){return e&&e.focus()}))},Be=function(e){var t=e.attributes,n=e.isSelected,r=e.setAttributes,l=e.disabled,a=e.answerStyle,c=e.buttonAlignment,i=Object(_.useRef)(),u=function(e,n){return r({answers:Object(f.tap)(s()(t.answers),(function(t){t[e]=n}))})},d=function(e){De(i.current,Math.max(e-1,0)),r({answers:Object(f.filter)(t.answers,(function(n){return t.answers.length<=2||n!==t.answers[e]}))})},b=function(e){e<t.answers.length&&r({answers:[].concat(s()(Object(f.slice)(t.answers,0,e)),[{}],s()(Object(f.slice)(t.answers,e,t.answers.length)))}),De(i.current,Math.min(e,t.answers.length))},m=n&&Object(f.last)(t.answers).text?[].concat(s()(t.answers),[{}]):t.answers,p=N()({"is-button":ge.BUTTON===a,"is-inline-button-alignment":Oe.INLINE===c},"crowdsignal-forms-poll__options"),g=ge.RADIO===a;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)("div",{ref:i,className:p},Object(f.map)(m,(function(e,r){return function(e){return n&&!l||!Se(e)}(e)&&Object(o.createElement)(Ie,{key:"poll-answer-".concat(r),answer:e,answerStyle:a,index:r,isMultipleChoice:t.isMultipleChoice,onChange:u,onDelete:d,onNewAnswer:b,disabled:l})}))),g&&Object(o.createElement)("div",{className:"crowdsignal-forms-poll__actions"},Object(o.createElement)("div",{className:"wp-block-button crowdsignal-forms-poll__block-button"},l?Object(o.createElement)("div",{className:"wp-block-button__link crowdsignal-forms-poll__submit-button"},t.submitButtonLabel):Object(o.createElement)(E.RichText,{className:"wp-block-button__link crowdsignal-forms-poll__submit-button",onChange:function(e){return r({submitButtonLabel:e})},value:t.submitButtonLabel,allowedFormats:[]}))))},Fe=function(e){return Object(f.includes)(ue,e)?fe[e]:null},Me=function(e,t){var n,r,o,l,a=Object(f.isEmpty)(e.textColor)?t.text:e.textColor;return Object(f.mapKeys)({borderColor:null!==(n=e.borderColor)&&void 0!==n?n:t.accent,borderRadius:"".concat(e.borderRadius,"px"),borderWidth:"".concat(e.borderWidth,"px"),bgColor:e.backgroundColor,bodyFontFamily:null!==(r=Fe(e.fontFamily))&&void 0!==r?r:t.bodyFontFamily,questionFontFamily:null!==(o=Fe(e.fontFamily))&&void 0!==o?o:t.questionFontFamily,submitButtonBgColor:e.submitButtonBackgroundColor||t.accent,submitButtonTextColor:e.submitButtonTextColor||t.textInverted,textColor:a,textColorProperties:null!==(l=Ve(a))&&void 0!==l?l:"0, 0, 0",contentWideWidth:t.contentWideWidth},(function(e,t){return"--crowdsignal-forms-".concat(Object(f.kebabCase)(t))}))},Ve=function(e){return!e||"string"!=typeof e||-1===e.indexOf("rgb")&&0!==e.indexOf("#")||-1<e.indexOf("rgba")?null:(0===e.indexOf("#")&&(e=He(e)),e.match(/\((.*?)\)/)[1])},He=function(e){var t=0,n=0,r=0,o=4===e.length?"#".concat(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]):e;return 7===o.length&&(t=parseInt(o.substr(1,2),16)||0,n=parseInt(o.substr(3,2),16)||0,r=parseInt(o.substr(5,2),16)||0),"rgb(".concat(t,", ").concat(n,", ").concat(r,")")},Ue=function(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return N()({"has-bg-color":e.backgroundColor,"has-text-color":e.textColor,"has-submit-button-bg-color":e.submitButtonBackgroundColor,"has-submit-button-text-color":e.submitButtonTextColor,"has-border-radius":null!==(t=e.borderRadius)&&void 0!==t&&t,"has-box-shadow":e.hasBoxShadow},r)},We=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Date;if(be.CLOSED===e)return!0;if(be.CLOSED_AFTER===e){var r=new Date(t);return r<n}return!1},ze=function(e,t){return e.isMultipleChoice?ge.RADIO:!Object(f.isEmpty)(t)&&t.indexOf("is-style-buttons")>-1?ge.BUTTON:ge.RADIO},Ze=function(e){e?Object(r.registerBlockStyle)("crowdsignal-forms/poll",{name:"buttons",label:Object(l.__)("Buttons","crowdsignal-forms")}):Object(r.unregisterBlockStyle)("crowdsignal-forms/poll","buttons")},qe=function(e){var t=e.signalWarning;return Object(o.createElement)("div",{className:"crowdsignal-forms__row"},Object(o.createElement)(v.Button,{href:"https://crowdsignal.com/pricing",isSecondary:!0,target:"_blank"},Object(l.__)("Upgrade","crowdsignal-forms")),t?Object(o.createElement)("div",{className:"crowdsignal-forms__sidebar-promote"},Object(o.createElement)("em",null,Object(l.__)("Your free Crowdsignal account has ","crowdsignal-forms"),Object(o.createElement)("strong",null,Object(o.createElement)(v.ExternalLink,{href:"https://crowdsignal.com/support/what-is-a-signal/"},Object(l.__)("reached the signals limit.","crowdsignal-forms"))))):Object(o.createElement)("div",{className:"crowdsignal-forms__sidebar-promote"},Object(o.createElement)("em",null,Object(l.__)("Hide Crowdsignal branding and get ","crowdsignal-forms"),Object(o.createElement)(v.ExternalLink,{href:"https://crowdsignal.com/support/what-is-a-signal/"},Object(l.__)("unlimited signals","crowdsignal-forms")))))},Ge=function(e){var t,n=e.attributes,r=e.className,a=e.setAttributes,c=e.fallbackBackgroundColor,s=e.fallbackTextColor,i=e.fallbackSubmitButtonBackgroundColor,u=e.fallbackSubmitButtonTextColor,d=e.viewResultsUrl,b=e.shouldPromote,m=e.signalWarning,p=""!==d,g=ze(n,r);return ie.REDIRECT===n.confirmMessageType&&(n.confirmMessageType=ie.THANK_YOU),Object(o.createElement)(E.InspectorControls,null,Object(o.createElement)(v.PanelBody,{title:Object(l.__)("Results","crowdsignal-forms"),initialOpen:!0},Object(o.createElement)("p",null,p?Object(l.__)("Manage results on ","crowdsignal-forms"):Object(l.__)("Publish this post to enable results on ","crowdsignal-forms"),Object(o.createElement)(v.ExternalLink,{href:p?d:"https://www.crowdsignal.com"},"crowdsignal.com")),Object(o.createElement)("p",null,Object(o.createElement)(v.Button,{href:d,isSecondary:!0,target:"_blank",disabled:!p},Object(l.__)("View results","crowdsignal-forms"))),Object(o.createElement)(v.TextControl,{value:Object(y.decodeEntities)(null!==(t=n.title)&&void 0!==t?t:n.question),label:Object(l.__)("Title of the poll block","crowdsignal-forms"),onChange:function(e){return a({title:e})}}),b&&Object(o.createElement)(qe,{signalWarning:m})),Object(o.createElement)(v.PanelBody,{title:Object(l.__)("Confirmation message","crowdsignal-forms"),initialOpen:!1},Object(o.createElement)(v.SelectControl,{value:n.confirmMessageType,label:Object(l.__)("On submission","crowdsignal-forms"),options:[{label:Object(l.__)("Show results","crowdsignal-forms"),value:ie.RESULTS},{label:Object(l.__)('Show "Thank You" message',"crowdsignal-forms"),value:ie.THANK_YOU},{label:Object(l.__)("Show a custom text message","crowdsignal-forms"),value:ie.CUSTOM_TEXT}],onChange:function(e){return Object(f.includes)(ie,e)&&a({confirmMessageType:e})}}),ie.CUSTOM_TEXT===n.confirmMessageType&&Object(o.createElement)(v.TextareaControl,{value:n.customConfirmMessage,label:Object(l.__)("Message text","crowdsignal-forms"),placeholder:Object(l.__)("Thanks for voting!","crowdsignal-forms"),onChange:function(e){return a({customConfirmMessage:e})}}),ie.REDIRECT===n.confirmMessageType&&Object(o.createElement)(E.URLInput,{className:"crowdsignal-forms__redirect-url",value:n.redirectAddress,label:Object(l.__)("Redirect address","crowdsignal-forms"),onChange:function(e){return a({redirectAddress:e})}})),Object(o.createElement)(v.PanelBody,{title:Object(l.__)("Poll status","crowdsignal-forms"),initialOpen:!1},Object(o.createElement)(v.SelectControl,{value:n.pollStatus,label:Object(l.__)("Currently","crowdsignal-forms"),options:[{label:Object(l.__)("Open","crowdsignal-forms"),value:be.OPEN},{label:Object(l.__)("Closed after","crowdsignal-forms"),value:be.CLOSED_AFTER},{label:Object(l.__)("Closed","crowdsignal-forms"),value:be.CLOSED}],onChange:function(e){Object(f.includes)(be,e)&&a({closedAfterDateTime:e===be.CLOSED_AFTER?new Date((new Date).getTime()+864e5).toISOString():null,pollStatus:e})}}),be.CLOSED_AFTER===n.pollStatus&&Object(o.createElement)(v.TimePicker,{currentTime:n.closedAfterDateTime,label:Object(l.__)("Close poll on","crowdsignal-forms"),onChange:function(e){var t=new Date(e);a({closedAfterDateTime:t.toISOString()})},is12Hour:!0}),be.OPEN!==n.pollStatus&&Object(o.createElement)(v.SelectControl,{value:n.closedPollState,label:Object(l.__)("When poll is closed","crowdsignal-forms"),options:[{label:Object(l.__)("Show results","crowdsignal-forms"),value:me.SHOW_RESULTS},{label:Object(l.__)('Show poll with "Closed" banner',"crowdsignal-forms"),value:me.SHOW_CLOSED_BANNER},{label:Object(l.__)("Hide poll","crowdsignal-forms"),value:me.HIDDEN}],onChange:function(e){return Object(f.includes)(me,e)&&a({closedPollState:e})}})),Object(o.createElement)(E.PanelColorSettings,{title:Object(l.__)("Block styling","crowdsignal-forms"),initialOpen:!1,colorSettings:[{value:n.textColor,onChange:function(e){return a({textColor:e})},label:Object(l.__)("Text color","crowdsignal-forms")},{value:n.backgroundColor,onChange:function(e){return a({backgroundColor:e})},label:Object(l.__)("Background color","crowdsignal-forms")},{value:n.borderColor,onChange:function(e){return a({borderColor:e})},label:Object(l.__)("Border color","crowdsignal-forms")}]},Object(o.createElement)(E.ContrastChecker,{textColor:n.textColor,backgroundColor:n.backgroundColor,fallbackBackgroundColor:c,fallbackTextColor:s}),Object(o.createElement)(v.SelectControl,{value:n.fontFamily,label:Object(l.__)("Choose font","crowdsignal-forms"),options:[{label:Object(l.__)("Default theme font","crowdsignal-forms"),value:ue.THEME_DEFAULT},{label:"Alegreya Sans",value:ue.ALEGREYA_SANS},{label:"Arial",value:ue.ARIAL},{label:"Cabin",value:ue.CABIN},{label:"Chivo",value:ue.CHIVO},{label:"Courier",value:ue.COURIER},{label:"Fira Sans",value:ue.FIRA_SANS},{label:"Georgia",value:ue.GEORGIA},{label:"Impact",value:ue.IMPACT},{label:"Josefin Sans",value:ue.JOSEFIN_SANS},{label:"Lato",value:ue.LATO},{label:"Libre Franklin",value:ue.LIBRE_FRANKLIN},{label:"Lucida",value:ue.LUCIDA},{label:"Montserrat",value:ue.MONTSERRAT},{label:"Nunito",value:ue.NUNITO},{label:"Open Sans",value:ue.OPEN_SANS},{label:"Oswald",value:ue.OSWALD},{label:"Overpass",value:ue.OVERPASS},{label:"Palatino",value:ue.PALATINO},{label:"Poppins",value:ue.POPPINS},{label:"Raleway",value:ue.RALEWAY},{label:"Roboto",value:ue.ROBOTO},{label:"Rubik",value:ue.RUBIK},{label:"Tahoma",value:ue.TAHOMA},{label:"Times New Roman",value:ue.TIMES_NEW_ROMAN},{label:"Trebuchet",value:ue.TREBUCHET},{label:"Verdana",value:ue.VERDANA}],onChange:function(e){return Object(f.includes)(ue,e)&&a({fontFamily:e})}}),"full"!==n.align&&Object(o.createElement)("div",{className:"crowdsignal-forms__row"},Object(o.createElement)(v.TextControl,{type:"number",label:Object(l.__)("Width (%)","crowdsignal-forms"),value:n.width,onChange:function(e){return a({width:parseInt(e,10)})}}),Object(o.createElement)(v.Button,{isSmall:!0,className:"crowdsignal-forms__reset-width-button",onClick:function(){return a({width:100})}},Object(l.__)("Reset","crowdsignal-forms"))),Object(o.createElement)("div",{className:"crowdsignal-forms__row"},Object(o.createElement)(v.TextControl,{label:Object(l.__)("Border thickness","crowdsignal-forms"),value:n.borderWidth,onChange:function(e){a({borderWidth:parseInt(e,10)||0})},type:"number",className:"crowdsignal-forms__small-text-input"}),Object(o.createElement)(v.TextControl,{label:Object(l.__)("Corner radius","crowdsignal-forms"),value:n.borderRadius,onChange:function(e){a({borderRadius:parseInt(e,10)||0})},type:"number",className:"crowdsignal-forms__small-text-input"})),Object(o.createElement)(v.ToggleControl,{label:Object(l.__)("Drop shadow","crowdsignal-forms"),checked:n.hasBoxShadow,onChange:function(e){a({hasBoxShadow:e})}})),Object(o.createElement)(E.PanelColorSettings,{title:Object(l.__)("Button styling","crowdsignal-forms"),initialOpen:!1,colorSettings:[{value:n.submitButtonTextColor,onChange:function(e){return a({submitButtonTextColor:e})},label:Object(l.__)("Text color","crowdsignal-forms")},{value:n.submitButtonBackgroundColor,onChange:function(e){return a({submitButtonBackgroundColor:e})},label:Object(l.__)("Background color","crowdsignal-forms")}]},Object(o.createElement)(E.ContrastChecker,{textColor:n.submitButtonTextColor,backgroundColor:n.submitButtonBackgroundColor,fallbackBackgroundColor:i,fallbackTextColor:u}),ge.BUTTON===g&&Object(o.createElement)(v.SelectControl,{value:n.buttonAlignment,label:Object(l.__)("Alignment","crowdsignal-forms"),options:[{value:Oe.LIST,label:Object(l.__)("List","crowdsignal-forms")},{value:Oe.INLINE,label:Object(l.__)("Inline","crowdsignal-forms")}],onChange:function(e){return a({buttonAlignment:e})}})),Object(o.createElement)(v.PanelBody,{title:Object(l.__)("Answer settings","crowdsignal-forms"),initialOpen:!0},Object(o.createElement)(v.CheckboxControl,{checked:n.hasOneResponsePerComputer,label:Object(l.__)("One response per computer","crowdsignal-forms"),onChange:function(e){return a({hasOneResponsePerComputer:e})}}),Object(o.createElement)(v.CheckboxControl,{checked:n.randomizeAnswers,label:Object(l.__)("Randomize answer order","crowdsignal-forms"),onChange:function(e){return a({randomizeAnswers:e})}})))};function Ke(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Ye=[{icon:function(){return Object(o.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)("path",{d:"M20 6.75H12V5.25H20V6.75Z"}),Object(o.createElement)("path",{d:"M20 12.5H12V11H20V12.5Z"}),Object(o.createElement)("path",{d:"M20 18.75H12V17.25H20V18.75Z"}),Object(o.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6 7C6.55228 7 7 6.55228 7 6C7 5.44772 6.55228 5 6 5C5.44772 5 5 5.44772 5 6C5 6.55228 5.44772 7 6 7ZM6 8C7.10457 8 8 7.10457 8 6C8 4.89543 7.10457 4 6 4C4.89543 4 4 4.89543 4 6C4 7.10457 4.89543 8 6 8Z"}),Object(o.createElement)("path",{d:"M6 12.75C6.55228 12.75 7 12.3023 7 11.75C7 11.1977 6.55228 10.75 6 10.75C5.44772 10.75 5 11.1977 5 11.75C5 12.3023 5.44772 12.75 6 12.75ZM6 13.75C7.10457 13.75 8 12.8546 8 11.75C8 10.6454 7.10457 9.75 6 9.75C4.89543 9.75 4 10.6454 4 11.75C4 12.8546 4.89543 13.75 6 13.75Z"}),Object(o.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6 19C6.55228 19 7 18.5523 7 18C7 17.4477 6.55228 17 6 17C5.44772 17 5 17.4477 5 18C5 18.5523 5.44772 19 6 19ZM6 20C7.10457 20 8 19.1046 8 18C8 16.8954 7.10457 16 6 16C4.89543 16 4 16.8954 4 18C4 19.1046 4.89543 20 6 20Z"}))},title:Object(l.__)("Choose one answer","crowdsignal-forms"),value:!1},{icon:function(){return Object(o.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7 10.75H5V12.75H7V10.75ZM4 9.75V13.75H8V9.75H4Z"}),Object(o.createElement)("path",{d:"M4 4H8V8H4V4Z"}),Object(o.createElement)("path",{d:"M4 16H8V20H4V16Z"}),Object(o.createElement)("path",{d:"M20 6.75H12V5.25H20V6.75Z"}),Object(o.createElement)("path",{d:"M20 12.5H12V11H20V12.5Z"}),Object(o.createElement)("path",{d:"M20 18.75H12V17.25H20V18.75Z"}))},title:Object(l.__)("Choose multiple answers","crowdsignal-forms"),value:!0}],Je=function(e){var t=e.attributes,n=e.setAttributes,r=Object(f.map)(Ye,(function(e){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ke(Object(n),!0).forEach((function(t){u()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ke(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e,{isActive:e.value===t.isMultipleChoice,onClick:function(){n({isMultipleChoice:e.value}),Ze(e.value)}})}));return Object(o.createElement)(E.BlockControls,null,Object(o.createElement)(v.Toolbar,{controls:r}))},Xe=function(e){var t=e.children;return Object(o.createElement)("div",{className:"crowdsignal-forms-poll__error-banner"},t)},$e="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),Qe=new Uint8Array(16);function et(){if(!$e)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return $e(Qe)}for(var tt=[],nt=0;nt<256;++nt)tt.push((nt+256).toString(16).substr(1));var rt=function(e,t){var n=t||0;return(tt[e[n+0]]+tt[e[n+1]]+tt[e[n+2]]+tt[e[n+3]]+"-"+tt[e[n+4]]+tt[e[n+5]]+"-"+tt[e[n+6]]+tt[e[n+7]]+"-"+tt[e[n+8]]+tt[e[n+9]]+"-"+tt[e[n+10]]+tt[e[n+11]]+tt[e[n+12]]+tt[e[n+13]]+tt[e[n+14]]+tt[e[n+15]]).toLowerCase()};var ot=function(e,t,n){var r=(e=e||{}).random||(e.rng||et)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return rt(r)},lt=function(e){var t=e.onEditClick;return Object(o.createElement)("div",{className:"crowdsignal-forms-poll__edit-bar"},Object(o.createElement)("div",{className:"crowdsignal-forms-poll__edit-bar-message"},Object(l.__)("Warning! This poll is published. Deleting or reordering answers may cause the loss of existing responses.","crowdsignal-forms")),Object(o.createElement)("button",{className:"crowdsignal-forms-poll__edit-bar-button",onClick:function(){t()}},Object(l.__)("Edit","crowdsignal-forms")))},at=function(e){var t=e.blockIcon,n=e.blockName,r=e.children,a=function(){var e=Object(_.useState)(!0),t=j()(e,2),n=t[0],r=t[1],o=Object(_.useState)(!0),l=j()(o,2),a=l[0],c=l[1],s=function(){var e=B()(I.a.mark((function e(){var t,n,o;return I.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ae();case 2:return t=e.sent,n=pe.CONNECTED===t||pe.NOT_VERIFIED===t,o=pe.CONNECTED===t,r(n),c(o),e.abrupt("return",{isNowConnected:n,isNowVerified:o});case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return Object(_.useEffect)((function(){s()}),[]),{isConnected:n,isAccountVerified:a,checkIsConnected:s}}(),c=a.isConnected,s=a.isAccountVerified,i=a.checkIsConnected,u=function(){var e=B()(I.a.mark((function e(){var t,n,r,o;return I.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=c,e.next=3,i();case 3:n=e.sent,r=n.isNowConnected,o=n.isNowVerified,r||window.open("/wp-admin/admin.php?page=crowdsignal-forms-setup"),t&&!o&&window.open("https://wordpress.com/me/account");case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();if(c&&s)return r;var d=!c,f=c&&!s;return Object(o.createElement)("div",{className:"crowdsignal-forms__connect-to-crowdsignal"},Object(o.createElement)("div",{className:"crowdsignal-forms__connect-to-crowdsignal-header"},t,Object(o.createElement)("div",{className:"crowdsignal-forms__connect-to-crowdsignal-title"},n)),Object(o.createElement)("div",{className:"crowdsignal-forms__connect-to-crowdsignal-body"},d&&Object(l.__)("You need to connect to a Crowdsignal account to collect and manage your results.","crowdsignal-forms"),f&&Object(l.__)("Please verify your WordPress.com email address in order to publish your poll.","crowdsignal-forms")),Object(o.createElement)(v.Button,{isPrimary:!0,onClick:u},d&&Object(l.__)("Connect to Crowdsignal","crowdsignal-forms"),f&&Object(l.__)("Verify or Change your Email Address","crowdsignal-forms")))};function ct(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function st(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ct(Object(n),!0).forEach((function(t){u()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ct(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var it=function(e){return"crowdsignal-forms/poll"===e.name||"crowdsignal-forms/applause"===e.name||"crowdsignal-forms/vote"===e.name},ut=!1,dt=!1;!function(){if(!ut){ut=!0;var e=Object(d.select)("core/editor"),t=e.isEditedPostDirty,n=e.isEditedPostNew,r=e.isSavingPost,o=e.isCleanNewPost,l=e.getCurrentPostId,a=Object(d.dispatch)("crowdsignal-forms/polls"),c=a.setTryFetchPollData,s=a.setPollApiDataForClientId,i=a.setIsFetchingPollData,u=Object(d.select)("crowdsignal-forms/polls"),b=u.shouldTryFetchingPollData,m=u.getPollDataByClientId,p=u.isFetchingPollData;Object(d.subscribe)((function(){var e=Object(f.filter)(Object(d.select)("core/block-editor").getBlocks(),it);if(!(e.length<1)&&(!p()&&!(o()||n()||r()||t())&&l())){var a=Object(f.filter)(e,(function(e){var t=e.attributes;return t.pollId&&null===m(t.pollId)}));a.length<1||(b()?p()||(i(!0),Promise.all(Object(f.map)(a,(function(e){var t=e.attributes.pollId;return X()({path:"/crowdsignal-forms/v1/polls/".concat(t,"?cached=1"),method:"GET"}).then((function(e){return s(t,st({},e,{viewResultsUrl:"https://app.crowdsignal.com/polls/".concat(e.id,"/results")}))}),(function(){return s(t,null)}))}))).finally((function(){return i(!1)}))):c(!0))}}))}}();var ft=function(e){return function(t){var n=t.attributes,r=t.setAttributes,l=t.addPollClientId,a=t.removePollClientId;return Object(_.useEffect)((function(){return"p2tenberg"in window&&function(){if(!dt){dt=!0;var e=null,t=function(){null!==e&&clearTimeout(e),e=setTimeout((function(){return n()}),1e3+1e3*Math.random())},n=function(){var e=Object(d.select)("crowdsignal-forms/polls"),n=e.getPollClientIds,r=e.getPollDataByClientId,o=e.shouldTryFetchingPollData,l=e.isFetchingPollData,a=Object(f.filter)(n(),(function(e){return null===r(e)}));if(a.length<1)return t();var c=Object(d.dispatch)("crowdsignal-forms/polls"),s=c.setTryFetchPollData,i=c.setPollApiDataForClientId,u=c.setIsFetchingPollData;return o()?l()||(u(!0),Promise.all(Object(f.map)(a,(function(e){return X()({path:"/crowdsignal-forms/v1/polls/".concat(e,"?cached=1"),method:"GET"}).then((function(t){return i(e,st({},t,{viewResultsUrl:"https://app.crowdsignal.com/polls/".concat(t.id,"/results")}))}),(function(){return i(e,null)}))}))).finally((function(){return u(!1)}))):s(!0),t()};n()}}(),n.pollId&&l(n.pollId),function(){n.pollId&&a(n.pollId)}}),[]),function(e,t,n,r){Object(_.useEffect)((function(){if(!Object(f.isEmpty)(t))if(window.csPolls||(window.csPolls={}),window.csPolls[t])if(window.csPolls[t].indexOf(e)>-1);else{var o=Object(f.map)(n,(function(e){return Object(f.omit)(e,["answerId"])}));r({pollId:null,answers:o})}else window.csPolls[t]=[e]}),[t])}(t.clientId,n.pollId,n.answers,r),Object(o.createElement)(e,t)}},bt=function(e){return Object(x.compose)([Object(d.withSelect)((function(e,t){var n=e("crowdsignal-forms/polls"),r=n.getPollDataByClientId,o=n.shouldTryFetchingPollData,l=n.isFetchingPollData,a=t.attributes;return{pollDataFromApi:a.pollId?r(a.pollId):null,getPollDataByClientId:r,shouldTryFetchingPollData:o,isFetchingPollData:l}})),Object(d.withDispatch)((function(e){var t=e("crowdsignal-forms/polls");return{setTryFetchPollData:t.setTryFetchPollData,setPollApiDataForClientId:t.setPollApiDataForClientId,setIsFetchingPollData:t.setIsFetchingPollData,addPollClientId:t.addPollClientId,removePollClientId:t.removePollClientId}})),ft])(e)},mt=function(){return Object(o.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 23C18.0751 23 23 18.0751 23 12C23 5.92487 18.0751 1 12 1C5.92487 1 1 5.92487 1 12C1 18.0751 5.92487 23 12 23ZM12 6C12.5523 6 13 6.44772 13 7V13C13 13.5523 12.5523 14 12 14C11.4477 14 11 13.5523 11 13V7C11 6.44772 11.4477 6 12 6ZM12 16C12.5523 16 13 16.4477 13 17C13 17.5523 12.5523 18 12 18C11.4477 18 11 17.5523 11 17C11 16.4477 11.4477 16 12 16Z",fill:"var(--wp-admin-theme-color)"}))},pt=function(){return Object(o.createElement)("div",{className:"crowdsignal-forms__signal-warning"},Object(o.createElement)("div",{className:"crowdsignal-forms__signal-warning-icon"},Object(o.createElement)(mt,null)),Object(o.createElement)("div",{className:"crowdsignal-forms__signal-warning-message"},Object(l.__)("Your free Crowdsignal account has exceeded ","crowdsignal-forms"),Object(o.createElement)(v.ExternalLink,{href:"https://crowdsignal.com/support/what-is-a-signal/"},Object(l.__)("the limit of 2500 signals.","crowdsignal-forms")),Object(o.createElement)("br",null),Object(o.createElement)("strong",null,Object(o.createElement)(v.ExternalLink,{href:"https://crowdsignal.com/pricing"},Object(l.__)("Please upgrade.","crowdsignal-forms")))))};function gt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Ot=Object(x.compose)([Re((function(){return Object(o.createElement)(o.Fragment,null,Object(o.createElement)("p",null),Object(o.createElement)("h3",null,"Question"),Object(o.createElement)("div",{className:"wp-block-button"},Object(o.createElement)("div",{className:"wp-block-button__link"})),Object(o.createElement)("div",{className:"entry-content"},Object(o.createElement)("div",{className:"alignwide"})))}),(function(e){if(null===e)return{};var t=e.querySelector(".wp-block-button__link"),n=e.querySelector("p"),r=e.querySelector("h3"),o=e.querySelector(".alignwide"),l=L(t),a=L(n),c=window.getComputedStyle(n).color;if(l===a){var s=T(t);l=s||c}return{accent:l,surface:a,text:c,bodyFontFamily:window.getComputedStyle(n).fontFamily,questionFontFamily:window.getComputedStyle(r).fontFamily,textInverted:window.getComputedStyle(t).color,contentWideWidth:window.getComputedStyle(o).maxWidth}})),bt,function(e){return function(t){var n=t.attributes,r=t.setAttributes;return Object(_.useEffect)((function(){if(!n.pollId){var e=ot();r({pollId:e})}if(Object(f.some)(n.answers,(function(e){return!e.answerId&&e.text}))){var t=Object(f.map)(n.answers,(function(e){return e.answerId||!e.text?e:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gt(Object(n),!0).forEach((function(t){u()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e,{answerId:ot()})}));r({answers:t})}})),Object(o.createElement)(e,t)}}])((function(e){var t=e.attributes,n=e.className,r=e.fallbackStyles,c=e.isSelected,s=e.setAttributes,i=e.renderStyleProbe,u=e.pollDataFromApi,d=Object(_.useState)(!0),b=j()(d,2),m=b[0],p=b[1],g=Object(_.useState)(""),O=j()(g,2),h=O[0],C=O[1],x=!Object(f.isEmpty)(u),S=u?u.viewResultsUrl:"",N=u?u.id:null,L={};u&&Object(f.map)(u.answers,(function(e){L[e.client_id]=e.id}));var T=c&&"full"!==t.align,P="full"!==t.align?"".concat(t.width,"%"):"auto",R=We(t.pollStatus,t.closedAfterDateTime),A=t.note||c&&m,I=R&&me.SHOW_RESULTS===t.closedPollState,D=R&&me.HIDDEN===t.closedPollState,B=je(),F=Object(f.get)(B,"capabilities").includes("hide-branding");Object(_.useEffect)((function(){return p(!x)}),[c]),Object(_.useEffect)((function(){c&&Ze(!t.isMultipleChoice)}),[t.isMultipleChoice,c]);var M=c&&x&&!m,V=ze(t,n);t.fontFamily&&function(e){if(!Object(f.isEmpty)(e)&&ue.THEME_DEFAULT!==e&&-1!==de.indexOf(e)){var t="https://fonts.googleapis.com/css2?family=".concat(e,":wght@400;600;700&display=swap");0===Object(f.filter)(Array.from(document.head.childNodes),(function(e){return"link"===e.nodeName.toLowerCase()&&e.href===t})).length&&document.head.appendChild(Object(f.tap)(document.createElement("link"),(function(e){e.type="text/css",e.rel="stylesheet",e.href=t})))}}(t.fontFamily);var H=Object(f.get)(B,["signalCount","shouldDisplay"]),U=H&&Object(f.get)(B,["signalCount","count"])>=Object(f.get)(B,["signalCount","userLimit"]);return Object(o.createElement)(at,{blockIcon:Object(o.createElement)(a,null),blockName:Object(l.__)("Crowdsignal Poll","crowdsignal-forms")},Object(o.createElement)(Je,e),Object(o.createElement)(Ge,w()({},e,{viewResultsUrl:S,shouldPromote:H,signalWarning:U})),U&&Object(o.createElement)(pt,null),Object(o.createElement)(v.ResizableBox,{className:"crowdsignal-forms-poll__resize-wrapper",size:{height:"auto",width:P},minWidth:"25%",maxWidth:"100%",enable:{left:!0,right:!0},onResizeStop:function(e,t,n){"right"!==t&&"left"!==t||s({width:Object(f.round)(n.offsetWidth/n.parentNode.offsetWidth*100)})},showHandle:T,resizeRatio:2},Object(o.createElement)("div",{className:Ue(t,n,{"is-selected-in-editor":c,"is-closed":R,"is-hidden":D},"crowdsignal-forms-poll"),style:Me(t,r)},M&&Object(o.createElement)(lt,{onEditClick:function(){p(!0)}}),h&&Object(o.createElement)(Xe,null,h),Object(o.createElement)("div",{className:"crowdsignal-forms-poll__content"},m?Object(o.createElement)(E.RichText,{tagName:"h3",className:"crowdsignal-forms-poll__question",placeholder:Object(l.__)("Enter your question","crowdsignal-forms"),onChange:function(e){return s({question:e})},value:t.question,allowedFormats:[]}):Object(o.createElement)("h3",{className:"crowdsignal-forms-poll__question"},t.question?Object(y.decodeEntities)(t.question):Object(l.__)("Enter your question","crowdsignal-forms")),A&&(m?Object(o.createElement)(E.RichText,{tagName:"p",className:"crowdsignal-forms-poll__note",placeholder:Object(l.__)("Add a note (optional)","crowdsignal-forms"),onChange:function(e){return s({note:e})},value:t.note,allowedFormats:[]}):Object(o.createElement)("p",{className:"crowdsignal-forms-poll__note"},t.note?Object(y.decodeEntities)(t.note):Object(l.__)("Add a note (optional)","crowdsignal-forms"))),!I&&Object(o.createElement)(Be,w()({},e,{setAttributes:s,disabled:!m,answerStyle:V,buttonAlignment:t.buttonAlignment})),I&&Object(o.createElement)(ke,{answers:xe(Object(f.filter)(t.answers,(function(e){return!Se(e)})),L),pollIdFromApi:N,hideBranding:F,setErrorMessage:C}),!F&&Object(o.createElement)(ve,{editing:!0})),R&&Object(o.createElement)(k,{isPollHidden:D,isPollClosed:R}),i())))})),wt={pollId:{type:"string",default:null},isMultipleChoice:{type:"boolean",default:!1},title:{type:"string",default:null},question:{type:"string",default:""},note:{type:"string",default:""},answers:{type:"array",default:[{},{},{}],items:{type:"object",properties:{answerId:{type:"string",default:null},text:{type:"string",default:""}}}},submitButtonLabel:{type:"string",default:Object(l.__)("Submit","crowdsignal-forms")},submitButtonTextColor:{type:"string"},submitButtonBackgroundColor:{type:"string"},confirmMessageType:{type:"string",default:ie.RESULTS},customConfirmMessage:{type:"string"},redirectAddress:{type:"string"},textColor:{type:"string"},backgroundColor:{type:"string"},borderColor:{type:"string"},borderWidth:{type:"number",default:2},borderRadius:{type:"number",default:0},hasBoxShadow:{type:"boolean",default:!1},fontFamily:{type:"string",default:ue.THEME_DEFAULT},hasOneResponsePerComputer:{type:"boolean",default:!1},randomizeAnswers:{type:"boolean",default:!1},align:{type:"string"},width:{type:"number",default:100},pollStatus:{type:"string",default:be.OPEN},closedPollState:{type:"string",default:me.SHOW_RESULTS},closedAfterDateTime:{type:"string",default:null},hideBranding:{type:"boolean",default:!1},buttonAlignment:{type:"string",default:Oe.LIST}},ht={title:Object(l.__)("Poll","crowdsignal-forms"),description:Object(l.__)("Create polls and get your audience’s opinion — powered by Crowdsignal.","crowdsignal-forms"),category:"crowdsignal-forms",keywords:[Object(l.__)("ask","crowdsignal-forms"),"crowdsignal",Object(l.__)("feedback","crowdsignal-forms"),Object(l.__)("form","crowdsignal-forms"),Object(l.__)("opinion","crowdsignal-forms"),Object(l.__)("poll","crowdsignal-forms"),Object(l.__)("pop","crowdsignal-forms"),Object(l.__)("question","crowdsignal-forms"),Object(l.__)("quiz","crowdsignal-forms"),Object(l.__)("research","crowdsignal-forms"),Object(l.__)("survey","crowdsignal-forms"),Object(l.__)("vote","crowdsignal-forms")],icon:Object(o.createElement)(a,null),edit:Ot,attributes:wt,supports:{align:["center","wide","full"]},getEditWrapperProps:function(e){return{"data-align":e.align}},example:{attributes:{question:Object(l.__)("How did you hear about us?","crowdsignal-forms"),answers:[{text:Object(l.__)("Search","crowdsignal-forms")},{text:Object(l.__)("Friend","crowdsignal-forms")},{text:Object(l.__)("Email","crowdsignal-forms")}]}},styles:[{name:"default",label:Object(l.__)("Default","crowdsignal-forms"),isDefault:!0}]},jt=function(){return Object(o.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)("mask",{id:"maskVote","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:"3",y:"3",width:"18",height:"18"},Object(o.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.5999 9.525H13.3942L14.1779 5.75475L14.2027 5.49075C14.2027 5.1525 14.0624 4.839 13.8397 4.61625L12.9652 3.75L7.53666 9.18675C7.23142 9.48374 7.04992 9.89621 7.04991 10.3499H3.75V18.6824H7.05V18.6178C7.05963 19.5172 7.79834 20.25 8.69991 20.25H16.1249C16.8097 20.25 17.3954 19.8375 17.6429 19.2435L20.1344 13.4273C20.2087 13.2375 20.2499 13.0395 20.2499 12.825V11.175C20.2499 10.2675 19.5074 9.525 18.5999 9.525ZM7.05 18.6178V10.3499H7.04991C7.04991 10.35 7.04991 10.35 7.04991 10.35V18.6C7.04991 18.6059 7.04994 18.6119 7.05 18.6178ZM18.5999 12.825L16.1249 18.6H8.69986V10.35L12.2804 6.76952L11.3646 11.175H18.5999V12.825Z",fill:"white"})),Object(o.createElement)("g",{mask:"url(#maskVote)"},Object(o.createElement)("rect",{x:"1.00024",y:"1.25",width:"22",height:"22",fill:"#1E1E1E"})))},_t=Object.freeze({OPEN:"open",CLOSED:"closed",CLOSED_AFTER:"closed-after"}),Ct=(Object.freeze({CONNECTED:"connected",NOT_CONNECTED:"not-connected",NOT_VERIFIED:"not-verified"}),[{title:Object(l.__)("Small","crowdsignal-forms"),size:"small"},{title:Object(l.__)("Medium","crowdsignal-forms"),size:"medium"},{title:Object(l.__)("Large","crowdsignal-forms"),size:"large"}]),Et={position:"bottom right",isAlternate:!0,className:"crowdsignal-forms-vote__size-dropdown"},vt=function(e){var t=e.attributes,n=e.setAttributes,r=e.viewResultsUrl,a=e.signalWarning,c=e.shouldPromote,s=""!==r;return Object(o.createElement)(E.InspectorControls,null,Object(o.createElement)(v.PanelBody,{title:Object(l.__)("Results","crowdsignal-forms"),initialOpen:!0},Object(o.createElement)("p",null,s?Object(l.__)("Manage results on ","crowdsignal-forms"):Object(l.__)("Publish this post to enable results on ","crowdsignal-forms"),Object(o.createElement)(v.ExternalLink,{href:s?r:"https://www.crowdsignal.com"},"crowdsignal.com")),Object(o.createElement)("p",null,Object(o.createElement)(v.Button,{href:r,isSecondary:!0,target:"_blank",disabled:!s},Object(l.__)("View results","crowdsignal-forms"))),Object(o.createElement)(v.TextControl,{value:t.title,label:Object(l.__)("Title of the vote block","crowdsignal-forms"),onChange:function(e){return n({title:e})}}),c&&Object(o.createElement)(qe,{signalWarning:a})),Object(o.createElement)(v.PanelBody,{title:Object(l.__)("Status","crowdsignal-forms")},Object(o.createElement)(v.SelectControl,{value:t.pollStatus,label:Object(l.__)("Currently","crowdsignal-forms"),options:[{label:Object(l.__)("Open","crowdsignal-forms"),value:_t.OPEN},{label:Object(l.__)("Closed after","crowdsignal-forms"),value:_t.CLOSED_AFTER},{label:Object(l.__)("Closed","crowdsignal-forms"),value:_t.CLOSED}],onChange:function(e){Object(f.includes)(_t,e)&&n({closedAfterDateTime:e===_t.CLOSED_AFTER?new Date((new Date).getTime()+864e5).toISOString():null,pollStatus:e})}}),_t.CLOSED_AFTER===t.pollStatus&&Object(o.createElement)(v.TimePicker,{currentTime:t.closedAfterDateTime,label:Object(l.__)("Close vote block on","crowdsignal-forms"),onChange:function(e){var t=new Date(e);n({closedAfterDateTime:t.toISOString()})},is12Hour:!0})))},yt=function(){return Object(o.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.1894 5.75L13.6668 5.75L13.6668 4.25H19.0002H19.7502L19.7502 5V10.3333H18.2502V6.81054L6.81072 18.25L10.3333 18.25V19.75L5 19.75H4.25V19V13.6666L5.75 13.6666L5.75 17.1894L17.1894 5.75Z"}))},xt=function(){return Object(o.createElement)("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)("line",{x1:"8",y1:"8.5",x2:"24",y2:"8.5",stroke:"currentColor"}),Object(o.createElement)("line",{x1:"8",y1:"15",x2:"24",y2:"15",stroke:"currentColor",strokeWidth:"2"}),Object(o.createElement)("line",{x1:"8",y1:"22.5",x2:"24",y2:"22.5",stroke:"currentColor",strokeWidth:"3"}))},St=function(){return Object(o.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)("path",{d:"M12.0078 18.2266C14.7656 18.2266 16.4062 15.9531 16.4062 12.3438C16.4062 8.73438 14.75 6.5 12.0078 6.5C9.25781 6.5 7.59375 8.75 7.59375 12.3516C7.59375 15.9688 9.24219 18.2266 12.0078 18.2266ZM12.0078 16.5781C10.5078 16.5781 9.625 15 9.625 12.3438C9.625 9.73438 10.5234 8.14844 12.0078 8.14844C13.4844 8.14844 14.3672 9.71875 14.3672 12.3516C14.3672 15.0078 13.5 16.5781 12.0078 16.5781Z"}))};function Nt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var kt=function(e){var t=e.attributes,n=e.setAttributes,r=Object(f.get)(t,"size","medium"),a=Ct,c=Object(_.useState)(!1),s=j()(c,2),i=s[0],d=s[1],b=function(){return d(!i)},m=t.hideResults?Object(l.__)("Show vote counters","crowdsignal-forms"):Object(l.__)("Hide vote counters","crowdsignal-forms");return Object(o.createElement)(E.BlockControls,null,Object(o.createElement)(v.ToolbarGroup,{isCollapsed:!0,icon:yt,label:Object(l.__)("Change block size","crowdsignal-forms"),popoverProps:Et,controls:a.map((function(e){var t=e.size;return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Nt(Object(n),!0).forEach((function(t){u()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e,{isActive:r===t,role:"menuitemradio",onClick:function(){return n({size:t})}})}))}),Object(o.createElement)(v.Toolbar,{controls:[{icon:xt,onClick:b},{icon:St,label:m,onClick:function(){return n({hideResults:!t.hideResults})},isActive:!t.hideResults,isPressed:!t.hideResults}]}),i&&Object(o.createElement)(v.Popover,{className:"crowdsignal-forms__border-popover",onFocusOutside:b},Object(o.createElement)("div",{className:"crowdsignal-forms__row"},Object(o.createElement)(v.TextControl,{label:Object(l.__)("Border thickness","crowdsignal-forms"),type:"number",className:"crowdsignal-forms__small-text-input",onChange:function(e){n({borderWidth:parseInt(e,10)||0})},value:t.borderWidth||0}),Object(o.createElement)(v.TextControl,{label:Object(l.__)("Corner radius","crowdsignal-forms"),type:"number",className:"crowdsignal-forms__small-text-input",onChange:function(e){n({borderRadius:parseInt(e,10)||0})},value:t.borderRadius||0}))))},Lt=function(e,t){return function(n){var r=n.attributes,l=n.setAttributes,a=Object(f.isArray)(t)?t:[t];return Object(_.useEffect)((function(){Object(f.map)(a,(function(e){if(!r[e]){var t=ot(),n={};n[e]=t,l(n)}}))})),Object(o.createElement)(e,n)}},Tt=function(e,t,n,r){return Object(_.useEffect)((function(){Object(f.isEmpty)(window.csBlockTypeCount)&&(window.csBlockTypeCount={}),Object(f.isNil)(window.csBlockTypeCount[e])&&(window.csBlockTypeCount[e]=0),window.csBlockTypeCount[e]++,null===n.title&&(1===window.csBlockTypeCount[e]?r({title:t}):r({title:"".concat(t," ").concat(window.csBlockTypeCount[e])}))}),[])},Pt=Object(x.compose)([bt])(Lt((function(e){var t=e.attributes,n=e.setAttributes,r=e.className,a=e.pollDataFromApi;Tt(e.name,Object(l.__)("Untitled Vote","crowdsignal-forms"),t,n);var c=a?a.viewResultsUrl:"",s=We(t.pollStatus,t.closedAfterDateTime),i=N()(r,"crowdsignal-forms-vote","size-".concat(t.size),{"no-results":t.hideResults,"is-closed":s}),u=function(e){return Object(f.mapKeys)({borderRadius:"".concat(e.borderRadius,"px"),borderWidth:"".concat(e.borderWidth,"px")},(function(e,t){return"--crowdsignal-forms-vote-".concat(Object(f.kebabCase)(t))}))}(t),d=je(),b=Object(f.get)(d,["signalCount","shouldDisplay"]),m=b&&Object(f.get)(d,["signalCount","count"])>=Object(f.get)(d,["signalCount","userLimit"]);return Object(o.createElement)(at,{blockIcon:null,blockName:Object(l.__)("Crowdsignal Vote","crowdsignal-forms")},Object(o.createElement)(vt,w()({},e,{shouldPromote:b,signalWarning:m,viewResultsUrl:c})),Object(o.createElement)(kt,e),Object(o.createElement)("div",{className:i,style:u},Object(o.createElement)("div",{className:"crowdsignal-forms-vote__items"},Object(o.createElement)(E.InnerBlocks,{template:[["crowdsignal-forms/vote-item",{type:"up"}],["crowdsignal-forms/vote-item",{type:"down"}]],templateInsertUpdatesSelection:!1,templateLock:"insert",allowedBlocks:["crowdsignal-forms/vote-item"],orientation:"horizontal",__experimentalMoverDirection:"horizontal"}))))}),"pollId")),Rt={pollId:{type:"string",default:null},hideBranding:{type:"boolean",default:!1},title:{type:"string",default:null},pollStatus:{type:"string",default:_t.OPEN},closedAfterDateTime:{type:"string",default:null},size:{type:"string",default:"medium"},borderWidth:{type:"number",default:1},borderRadius:{type:"number",default:5},hideResults:{type:"boolean",default:!1}},At={title:Object(l.__)("Vote","crowdsignal-forms"),description:Object(l.__)("Allow your audience to rate your work or express their opinion — powered by Crowdsignal.","crowdsignal-forms"),category:"crowdsignal-forms",keywords:[Object(l.__)("ballot","crowdsignal-forms"),Object(l.__)("button","crowdsignal-forms"),Object(l.__)("count","crowdsignal-forms"),"crowdsignal",Object(l.__)("deciding","crowdsignal-forms"),Object(l.__)("decision","crowdsignal-forms"),Object(l.__)("elect","crowdsignal-forms"),Object(l.__)("election","crowdsignal-forms"),Object(l.__)("feedback","crowdsignal-forms"),Object(l.__)("form","crowdsignal-forms"),Object(l.__)("like","crowdsignal-forms"),Object(l.__)("nero","crowdsignal-forms"),Object(l.__)("opinion","crowdsignal-forms"),Object(l.__)("poll","crowdsignal-forms"),Object(l.__)("polling","crowdsignal-forms"),Object(l.__)("rate","crowdsignal-forms"),Object(l.__)("rating","crowdsignal-forms"),Object(l.__)("research","crowdsignal-forms"),Object(l.__)("survey","crowdsignal-forms"),Object(l.__)("thumb down","crowdsignal-forms"),Object(l.__)("thumb up","crowdsignal-forms"),Object(l.__)("thumbs","crowdsignal-forms"),Object(l.__)("vote","crowdsignal-forms"),Object(l.__)("voting","crowdsignal-forms")],icon:Object(o.createElement)(jt,null),edit:Pt,save:function(){return Object(o.createElement)(E.InnerBlocks.Content,null)},attributes:Rt,example:{attributes:{className:"crowdsignal-forms-vote__example",size:"large"}}},It=function(e){var t=e.attributes,n=e.setAttributes;return Object(o.createElement)(E.InspectorControls,null,Object(o.createElement)(E.PanelColorSettings,{title:Object(l.__)("Styling","crowdsignal-forms"),initialOpen:!0,colorSettings:[{value:t.textColor,onChange:function(e){return n({textColor:e})},label:Object(l.__)("Text color","crowdsignal-forms")},{value:t.backgroundColor,onChange:function(e){return n({backgroundColor:e})},label:Object(l.__)("Background color","crowdsignal-forms")},{value:t.borderColor,onChange:function(e){return n({borderColor:e})},label:Object(l.__)("Border color","crowdsignal-forms")}]}))};function Dt(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function Bt(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}var Ft=n(21),Mt=n.n(Ft),Vt=!1,Ht=C.a.createContext(null),Ut="entering",Wt="entered",zt=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var o,l=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?l?(o="exited",r.appearStatus=Ut):o=Wt:o=t.unmountOnExit||t.mountOnEnter?"unmounted":"exited",r.state={status:o},r.nextCallback=null,r}Dt(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&"unmounted"===t.status?{status:"exited"}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==Ut&&n!==Wt&&(t=Ut):n!==Ut&&n!==Wt||(t="exiting")}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){void 0===e&&(e=!1),null!==t?(this.cancelNextCallback(),t===Ut?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&"exited"===this.state.status&&this.setState({status:"unmounted"})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,o=this.props.nodeRef?[r]:[Mt.a.findDOMNode(this),r],l=o[0],a=o[1],c=this.getTimeouts(),s=r?c.appear:c.enter;!e&&!n||Vt?this.safeSetState({status:Wt},(function(){t.props.onEntered(l)})):(this.props.onEnter(l,a),this.safeSetState({status:Ut},(function(){t.props.onEntering(l,a),t.onTransitionEnd(s,(function(){t.safeSetState({status:Wt},(function(){t.props.onEntered(l,a)}))}))})))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:Mt.a.findDOMNode(this);t&&!Vt?(this.props.onExit(r),this.safeSetState({status:"exiting"},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:"exited"},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:"exited"},(function(){e.props.onExited(r)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:Mt.a.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var o=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],l=o[0],a=o[1];this.props.addEndListener(l,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if("unmounted"===e)return null;var t=this.props,n=t.children,r=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,Bt(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return C.a.createElement(Ht.Provider,{value:null},"function"==typeof n?n(e,r):C.a.cloneElement(C.a.Children.only(n),r))},t}(C.a.Component);function Zt(){}zt.contextType=Ht,zt.propTypes={},zt.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Zt,onEntering:Zt,onEntered:Zt,onExit:Zt,onExiting:Zt,onExited:Zt},zt.UNMOUNTED="unmounted",zt.EXITED="exited",zt.ENTERING=Ut,zt.ENTERED=Wt,zt.EXITING="exiting";var qt,Gt,Kt=zt;var Yt="out-in",Jt="in-out",Xt=function(e,t,n){return function(){var r;e.props[t]&&(r=e.props)[t].apply(r,arguments),n()}},$t=((qt={})[Yt]=function(e){var t=e.current,n=e.changeState;return C.a.cloneElement(t,{in:!1,onExited:Xt(t,"onExited",(function(){n(Ut,null)}))})},qt[Jt]=function(e){var t=e.current,n=e.changeState,r=e.children;return[t,C.a.cloneElement(r,{in:!0,onEntered:Xt(r,"onEntered",(function(){n(Ut)}))})]},qt),Qt=((Gt={})[Yt]=function(e){var t=e.children,n=e.changeState;return C.a.cloneElement(t,{in:!0,onEntered:Xt(t,"onEntered",(function(){n(Wt,C.a.cloneElement(t,{in:!0}))}))})},Gt[Jt]=function(e){var t=e.current,n=e.children,r=e.changeState;return[C.a.cloneElement(t,{in:!1,onExited:Xt(t,"onExited",(function(){r(Wt,C.a.cloneElement(n,{in:!0}))}))}),C.a.cloneElement(n,{in:!0})]},Gt),en=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).state={status:Wt,current:null},t.appeared=!1,t.changeState=function(e,n){void 0===n&&(n=t.state.current),t.setState({status:e,current:n})},t}Dt(t,e);var n=t.prototype;return n.componentDidMount=function(){this.appeared=!0},t.getDerivedStateFromProps=function(e,t){return null==e.children?{current:null}:t.status===Ut&&e.mode===Jt?{status:Ut}:!t.current||(n=t.current,r=e.children,n===r||C.a.isValidElement(n)&&C.a.isValidElement(r)&&null!=n.key&&n.key===r.key)?{current:C.a.cloneElement(e.children,{in:!0})}:{status:"exiting"};var n,r},n.render=function(){var e,t=this.props,n=t.children,r=t.mode,o=this.state,l=o.status,a=o.current,c={children:n,current:a,changeState:this.changeState,status:l};switch(l){case Ut:e=Qt[r](c);break;case"exiting":e=$t[r](c);break;case Wt:e=a}return C.a.createElement(Ht.Provider,{value:{isMounting:!this.appeared}},e)},t}(C.a.Component);en.propTypes={},en.defaultProps={mode:Yt};var tn=en;function nn(){return(nn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function rn(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}var on=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return r=t,void((n=e).classList?n.classList.remove(r):"string"==typeof n.className?n.className=rn(n.className,r):n.setAttribute("class",rn(n.className&&n.className.baseVal||"",r)));var n,r}))},ln=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var r=t.resolveArguments(e,n),o=r[0],l=r[1];t.removeClasses(o,"exit"),t.addClass(o,l?"appear":"enter","base"),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.resolveArguments(e,n),o=r[0],l=r[1]?"appear":"enter";t.addClass(o,l,"active"),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.resolveArguments(e,n),o=r[0],l=r[1]?"appear":"enter";t.removeClasses(o,l),t.addClass(o,l,"done"),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"appear"),t.removeClasses(n,"enter"),t.addClass(n,"exit","base"),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.resolveArguments(e)[0];t.addClass(n,"exit","active"),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"exit"),t.addClass(n,"exit","done"),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,n){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,n]},t.getClassNames=function(e){var n=t.props.classNames,r="string"==typeof n,o=r?""+(r&&n?n+"-":"")+e:n[e];return{baseClassName:o,activeClassName:r?o+"-active":n[e+"Active"],doneClassName:r?o+"-done":n[e+"Done"]}},t}Dt(t,e);var n=t.prototype;return n.addClass=function(e,t,n){var r=this.getClassNames(t)[n+"ClassName"],o=this.getClassNames("enter").doneClassName;"appear"===t&&"done"===n&&o&&(r+=" "+o),"active"===n&&e&&e.scrollTop,r&&(this.appliedClasses[t][n]=r,function(e,t){e&&t&&t.split(" ").forEach((function(t){return r=t,void((n=e).classList?n.classList.add(r):function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}(n,r)||("string"==typeof n.className?n.className=n.className+" "+r:n.setAttribute("class",(n.className&&n.className.baseVal||"")+" "+r)));var n,r}))}(e,r))},n.removeClasses=function(e,t){var n=this.appliedClasses[t],r=n.base,o=n.active,l=n.done;this.appliedClasses[t]={},r&&on(e,r),o&&on(e,o),l&&on(e,l)},n.render=function(){var e=this.props,t=(e.classNames,Bt(e,["classNames"]));return C.a.createElement(Kt,nn({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(C.a.Component);ln.defaultProps={classNames:""},ln.propTypes={};var an=ln,cn=function(e){var t=e.className,n=e.fillColor,r=void 0===n?"black":n;return Object(o.createElement)("svg",{className:t,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)("g",{clipPath:"url(#clipThumbsUp)"},Object(o.createElement)("mask",{id:"maskThumbsUp","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:"2",y:"-1",width:"20",height:"20"},Object(o.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19.35 6.24998H13.5658L14.4366 2.06081L14.4641 1.76748C14.4641 1.39165 14.3083 1.04331 14.0608 0.795813L13.0891 -0.166687L7.05748 5.87415C6.71831 6.20415 6.51664 6.66248 6.51664 7.16665L2.84998 7.16665V16.425H6.51664V16.3333C6.51664 17.3416 7.34164 18.1666 8.34998 18.1666H16.6C17.3608 18.1666 18.0116 17.7083 18.2866 17.0483L21.055 10.5858C21.1375 10.375 21.1833 10.155 21.1833 9.91665V8.08331C21.1833 7.07498 20.3583 6.24998 19.35 6.24998ZM19.35 9.91665L16.6 16.3333H8.34998V7.16665L12.3283 3.18831L11.3108 8.08331H19.35V9.91665Z",fill:"white"})),Object(o.createElement)("g",{mask:"url(#maskThumbsUp)"},Object(o.createElement)("rect",{x:"0.999878",y:"-3.05176e-05",width:"22",height:"22",fill:r}))),Object(o.createElement)("defs",null,Object(o.createElement)("clipPath",{id:"clipThumbsUp"},Object(o.createElement)("rect",{width:"24",height:"24",fill:"white"}))))},sn=function(e){var t=e.className,n=e.fillColor,r=void 0===n?"black":n;return Object(o.createElement)("svg",{className:t,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)("g",{clipPath:"url(#clipThumbsDown)"},Object(o.createElement)("mask",{id:"maskThumbsDown","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:"2",y:"5",width:"20",height:"20"},Object(o.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.65002 17.75H10.4342L9.56336 21.9392L9.53586 22.2325C9.53586 22.6083 9.69169 22.9567 9.93919 23.2042L10.9109 24.1667L16.9425 18.1258C17.2817 17.7958 17.4834 17.3375 17.4834 16.8333L21.15 16.8333L21.15 7.57499H17.4834V7.66666C17.4834 6.65832 16.6584 5.83332 15.65 5.83332H7.40003C6.63919 5.83332 5.98836 6.29165 5.71336 6.95166L2.94503 13.4142C2.86253 13.625 2.81669 13.845 2.81669 14.0833V15.9167C2.81669 16.925 3.64169 17.75 4.65002 17.75ZM4.65002 14.0833L7.40002 7.66666H15.65L15.65 16.8333L11.6717 20.8117L12.6892 15.9167H4.65002V14.0833Z",fill:"white"})),Object(o.createElement)("g",{mask:"url(#maskThumbsDown)"},Object(o.createElement)("rect",{x:"23.0001",y:"24",width:"22",height:"22",transform:"rotate(-180 23.0001 24)",fill:r}))),Object(o.createElement)("defs",null,Object(o.createElement)("clipPath",{id:"clipThumbsDown"},Object(o.createElement)("rect",{width:"24",height:"24",fill:"white"}))))},un=function(e){return e?e>=1e7?"".concat(Object(f.round)(e/1e6),"M"):e>=1e6?"".concat((e/1e6).toFixed(1),"M"):e>=1e4?"".concat(Object(f.round)(e/1e3),"K"):e>=1e3?"".concat((e/1e3).toFixed(1),"K"):e.toString():"0"},dn=function(e){var t=e.attributes,n=e.voteCount,r=e.apiAnswerId,l=e.onVote,a=e.disabled,c=e.isVotedOn,s=e.hideCount,i=e.fallbackStyles,u=e.isInEditor,d=t.className,b=t.type,m=Object(_.useState)(0),p=j()(m,2),g=p[0],O=p[1],w=function(){!a&&l&&(O(1),l(r))},h="up"===b?cn:sn,C="is-type-".concat(b),E=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return N()({"has-bg-color":e.backgroundColor,"has-text-color":e.textColor,"has-border-color":e.borderColor},n)}(t,"crowdsignal-forms-vote-item",d,{"is-voted-on":c,"is-disabled":a,"is-in-editor":u},C),v=function(e,t){var n=Object(f.isEmpty)(e.textColor)?t.textColor:e.textColor,r=Object(f.isEmpty)(e.backgroundColor)?t.backgroundColor:e.backgroundColor;return Object(f.mapKeys)({borderColor:e.borderColor,bgColor:r,textColor:n,votedColor:t.accentColor},(function(e,t){return"--crowdsignal-forms-vote-".concat(Object(f.kebabCase)(t))}))}(t,i),y=n+g;return Object(o.createElement)("div",{className:E,onClick:w,onKeyPress:w,role:"button",style:v,tabIndex:0},Object(o.createElement)(h,{className:"crowdsignal-forms-vote-item__icon",fillColor:"currentColor"}),!s&&Object(o.createElement)(tn,{mode:"in-out"},Object(o.createElement)(an,{key:g,classNames:"crowdsignal-forms-vote-item__count",timeout:300},Object(o.createElement)("div",{className:"crowdsignal-forms-vote-item__count"},un(y)))))};dn.propTypes={apiAnswerId:R.a.number,className:R.a.string,disabled:R.a.bool,isVotedOn:R.a.bool,onVote:R.a.func,type:R.a.string.isRequired,voteCount:R.a.number.isRequired};var fn=dn,bn=Object(x.compose)([Re((function(){return Object(o.createElement)(o.Fragment,null,Object(o.createElement)("p",null),Object(o.createElement)("div",{className:"wp-block-button"},Object(o.createElement)("div",{className:"wp-block-button__link"})))}),(function(e){if(null===e)return{};var t=e.querySelector(".wp-block-button__link"),n=e.querySelector("p"),r=L(t),o=L(n),l=window.getComputedStyle(n).color;if(r===o){var a=T(t);r=a||l}return{accentColor:r,textColor:l,backgroundColor:o}}))])(Lt((function(e){var t=e.attributes,n=e.className,r=e.fallbackStyles,l=e.renderStyleProbe;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(It,e),Object(o.createElement)(fn,{attributes:t,fallbackStyles:r,className:n,voteCount:0,isInEditor:!0,type:t.type}),l())}),"answerId")),mn={title:Object(l.__)("Vote Item","crowdsignal-forms"),description:Object(l.__)("Allow your audience to rate your work or express their opinion — powered by Crowdsignal.","crowdsignal-forms"),category:"crowdsignal-forms",parent:["crowdsignal-forms/vote"],icon:Object(o.createElement)(jt,null),edit:bn,attributes:{answerId:{type:"string",default:null},type:{type:"string"},textColor:{type:"string"},backgroundColor:{type:"string"},borderColor:{type:"string"}}},pn=function(e){var t=e.showBranding,n=e.referralCode;return Object(o.createElement)("div",{className:"crowdsignal-forms__branding"},t&&Object(o.createElement)("a",{className:"crowdsignal-forms__branding-link with-external-icon",href:"https://crowdsignal.com?ref=".concat(n),target:"blank",rel:"noopener noreferrer"},Object(l.__)("Powered by Crowdsignal","crowdsignal-forms")),!t&&Object(o.createElement)("span",{className:"crowdsignal-forms__branding-link"}," "))};pn.propTypes={showBranding:R.a.bool,referralCode:R.a.string.isRequired};var gn=pn,On=function(e){var t=e.active,n=e.className,r=N()("crowdsignal-forms-applause__animation",n,{"is-active":t});return Object(o.createElement)("svg",{className:r,width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)("g",{className:"crowdsignal-forms-applause__animation-right"},Object(o.createElement)("path",{className:"crowdsignal-forms-applause__animation-inner-fill",fillRule:"evenodd",clipRule:"evenodd",d:"M24.5287 18.5813L21.719 22.432C20.771 23.7312 18.9509 24.0157 17.6517 23.0676L9.50948 17.1265C8.6982 16.5345 8.52021 15.3957 9.11218 14.5844C9.18511 14.4845 9.26979 14.3931 9.35606 14.3119L9.19145 14.1918C8.38017 13.5998 8.20218 12.461 8.79415 11.6497C8.93571 11.4557 9.10825 11.2933 9.30319 11.1743C9.10822 10.6266 9.17716 10.0013 9.54606 9.49567C10.1123 8.71967 11.1811 8.52659 11.9839 9.03133C12.0392 8.91852 12.1004 8.81 12.1733 8.71006C12.7653 7.89878 13.9042 7.72079 14.7154 8.31276L20.3297 12.4094L20.611 10.4435C20.6949 9.84704 21.1499 9.35925 21.7392 9.23069L23.703 8.79878L25.0454 16.3547C25.1822 17.1302 24.992 17.9464 24.5287 18.5813Z"}),Object(o.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M24.5287 18.5813L21.719 22.432C20.771 23.7312 18.9509 24.0157 17.6517 23.0676L9.50948 17.1265C8.6982 16.5345 8.52021 15.3957 9.11218 14.5844C9.18511 14.4845 9.26979 14.3931 9.35606 14.3119L9.19145 14.1918C8.38017 13.5998 8.20218 12.461 8.79415 11.6497C8.93571 11.4557 9.10825 11.2933 9.30319 11.1743C9.10822 10.6266 9.17716 10.0013 9.54606 9.49567C10.1123 8.71967 11.1811 8.52659 11.9839 9.03133C12.0392 8.91852 12.1004 8.81 12.1733 8.71006C12.7653 7.89878 13.9042 7.72079 14.7154 8.31276L20.3297 12.4094L20.611 10.4435C20.6949 9.84704 21.1499 9.35925 21.7392 9.23069L23.703 8.79878L25.0454 16.3547C25.1822 17.1302 24.992 17.9464 24.5287 18.5813ZM23.6104 16.605L22.538 10.5434L22.0547 10.6502L21.4234 15.0093L13.8574 9.48855C13.8574 9.48855 13.4691 9.4034 13.349 9.56801C13.2288 9.73262 13.2638 9.95632 13.4284 10.0764L17.667 13.1693L16.8091 14.345L11.2301 10.2742C11.0655 10.1541 10.8418 10.189 10.7217 10.3536C10.6016 10.5182 10.6365 10.7419 10.8012 10.862L16.3802 14.9329L15.5222 16.1087L10.4782 12.4282C10.3136 12.3081 10.0899 12.343 9.96978 12.5076C9.84967 12.6722 9.88463 12.8959 10.0492 13.0161L15.0933 16.6966L14.2353 17.8723L10.7962 15.3629C10.6316 15.2428 10.4079 15.2777 10.2878 15.4423C10.1677 15.607 10.2027 15.8307 10.3673 15.9508L18.5094 21.8919C19.1561 22.3638 20.0713 22.2207 20.5431 21.5741L23.3571 17.7175C23.5888 17.4001 23.6766 16.9957 23.6104 16.605Z"})),Object(o.createElement)("g",{className:"crowdsignal-forms-applause__animation-left"},Object(o.createElement)("path",{className:"crowdsignal-forms-applause__animation-inner-fill",fillRule:"evenodd",clipRule:"evenodd",d:"M21.2292 18.7813L18.4195 22.632C17.4715 23.9312 15.6513 24.2157 14.3521 23.2676L6.20992 17.3265C5.39864 16.7345 5.22065 15.5957 5.81262 14.7844C5.88554 14.6845 5.97023 14.5931 6.0565 14.5119L5.89189 14.3918C5.08061 13.7998 4.90262 12.661 5.49459 11.8497C5.63615 11.6557 5.80869 11.4933 6.00363 11.3743C5.80866 10.8266 5.8776 10.2013 6.2465 9.69567C6.81274 8.91967 7.88153 8.72658 8.68439 9.23133C8.73968 9.11852 8.80084 9.01 8.87377 8.91006C9.46573 8.09878 10.6046 7.92079 11.4159 8.51276L17.0302 12.6094L17.3115 10.6435C17.3953 10.047 17.8504 9.55925 18.4397 9.43069L20.4034 8.99877L21.7458 16.5547C21.8826 17.3302 21.6925 18.1464 21.2292 18.7813Z"}),Object(o.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21.2292 18.7813L18.4195 22.632C17.4715 23.9312 15.6513 24.2157 14.3521 23.2676L6.20992 17.3265C5.39864 16.7345 5.22065 15.5957 5.81262 14.7844C5.88554 14.6845 5.97023 14.5931 6.0565 14.5119L5.89189 14.3918C5.08061 13.7998 4.90262 12.661 5.49459 11.8497C5.63615 11.6557 5.80869 11.4933 6.00363 11.3743C5.80866 10.8266 5.8776 10.2013 6.2465 9.69567C6.81274 8.91967 7.88153 8.72658 8.68439 9.23133C8.73968 9.11852 8.80084 9.01 8.87377 8.91006C9.46573 8.09878 10.6046 7.92079 11.4159 8.51276L17.0302 12.6094L17.3115 10.6435C17.3953 10.047 17.8504 9.55925 18.4397 9.43069L20.4034 8.99877L21.7458 16.5547C21.8826 17.3302 21.6925 18.1464 21.2292 18.7813ZM20.3108 16.805L19.2384 10.7434L18.7551 10.8502L18.1239 15.2093L10.5578 9.68854C10.5578 9.68854 10.1695 9.6034 10.0494 9.76801C9.92928 9.93261 9.96425 10.1563 10.1289 10.2764L14.3675 13.3692L13.5096 14.545L7.93056 10.4742C7.76595 10.354 7.54224 10.389 7.42213 10.5536C7.30202 10.7182 7.33699 10.9419 7.50159 11.062L13.0806 15.1329L12.2227 16.3087L7.17864 12.6282C7.01403 12.5081 6.79033 12.543 6.67022 12.7076C6.55011 12.8722 6.58507 13.0959 6.74968 13.216L11.7937 16.8965L10.9358 18.0723L7.49667 15.5629C7.33206 15.4428 7.10836 15.4777 6.98825 15.6423C6.86814 15.8069 6.9031 16.0307 7.06771 16.1508L15.2099 22.0919C15.8566 22.5638 16.7717 22.4207 17.2436 21.7741L20.0576 17.9175C20.2892 17.6001 20.3771 17.1957 20.3108 16.805Z"})),Object(o.createElement)("g",{className:"crowdsignal-forms-applause__animation-wave-small"},Object(o.createElement)("rect",{x:"15.4854",y:"4.42176",width:"1.5",height:"3",transform:"rotate(8 15.4854 4.42176)"}),Object(o.createElement)("rect",{x:"19.9369",y:"5.15548",width:"1.5",height:"3",transform:"rotate(43 19.9369 5.15548)"}),Object(o.createElement)("rect",{x:"11.1523",y:"4.78963",width:"1.5",height:"3",transform:"rotate(-27 11.1523 4.78963)"})),Object(o.createElement)("g",{className:"crowdsignal-forms-applause__animation-wave-large"},Object(o.createElement)("rect",{x:"23.453",y:"2.41095",width:"1.5",height:"3",transform:"rotate(38 23.453 2.41095)"}),Object(o.createElement)("rect",{x:"26.9413",y:"5.27211",width:"1.5",height:"3",transform:"rotate(73 26.9413 5.27211)"}),Object(o.createElement)("rect",{x:"19.5165",y:"0.562988",width:"1.5",height:"3",transform:"rotate(3 19.5165 0.562988)"}),Object(o.createElement)("rect",{width:"1.5",height:"3",transform:"matrix(-0.788011 0.615662 0.615662 0.788011 8.52597 2.41095)"}),Object(o.createElement)("rect",{width:"1.5",height:"3",transform:"matrix(-0.292372 0.956305 0.956305 0.292372 5.03775 5.27211)"}),Object(o.createElement)("rect",{width:"1.5",height:"3",transform:"matrix(-0.99863 0.052336 0.052336 0.99863 12.4625 0.562988)"})))},wn=function(e){var t=e.attributes,n=e.fallbackStyles,r=e.renderStyleProbe,l=t.apiPollData?t.apiPollData.id:null,a=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r="cs-poll-".concat(e),o=Object(_.useState)(!1),l=j()(o,2),a=l[0],c=l[1],s=Object(_.useState)(!1),i=j()(s,2),u=i[0],d=i[1],f=Object(_.useState)(""),b=j()(f,2),m=b[0],p=b[1];Object(_.useEffect)((function(){t&&void 0!==M.a.get(r)&&(d(!0),p(M.a.get(r)))}),[]);var g=function(){var o=B()(I.a.mark((function o(l){var a,s,i,u=arguments;return I.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return a=u.length>1&&void 0!==u[1]?u[1]:1,o.prev=1,c(!0),o.next=5,ne(e);case 5:return s=o.sent,o.next=8,re(s,e,l,a);case 8:d(!0),t&&(i=n?l.join(","):(new Date).getTime(),M.a.set(r,i,{sameSite:"Strict",expires:365}),p(i));case 10:return o.prev=10,c(!1),o.finish(10);case 13:case"end":return o.stop()}}),o,null,[[1,,10,13]])})));return function(e){return o.apply(this,arguments)}}();return{hasVoted:u,isVoting:a,vote:g,storedCookieValue:m}}(l,!0),c=a.hasVoted,s=a.vote,i=Object(_.useState)(0),u=j()(i,2),d=u[0],b=u[1],m=Object(_.useState)(0),p=j()(m,2),g=p[0],O=p[1],w=Object(_.useState)(null),h=j()(w,2),C=h[0],E=h[1],v=Object(_.useState)(!1),y=j()(v,2),x=y[0],S=y[1],k=Object(_.useState)(null),L=j()(k,2),T=L[0],P=L[1],R=we(l).results,A=We(t.pollStatus,t.closedAfterDateTime),D=function(){if(null!==l&&!A){T&&clearTimeout(T),S(!0),P(setTimeout((function(){S(!1)}),200));var e=g+1;O(e),b(d+1);var n=t.apiPollData.answers[0].id;null!==C&&clearTimeout(C);var r=setTimeout((function(){s([n],e),E(null),O(0)}),1e3);E(r)}},F=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return N()({"has-bg-color":e.backgroundColor,"has-text-color":e.textColor,"has-border-color":e.borderColor},n)}(t,"crowdsignal-forms-applause",t.className,"size-".concat(t.size),{"is-closed":A}),V=function(e,t){var n=Object(f.isEmpty)(e.textColor)?t.text:e.textColor;return Object(f.mapKeys)({bgColor:e.backgroundColor||t.surface,textColor:n,hoverColor:t.accent,borderRadius:"".concat(e.borderRadius||0,"px"),borderWidth:"".concat(e.borderWidth||0,"px"),borderColor:e.borderColor},(function(e,t){return"--crowdsignal-forms-applause-".concat(Object(f.kebabCase)(t))}))}(t,n),H=(null!==R?Object(f.values)(R)[0]:0)+d;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)("div",{className:F,style:V,onClick:D,onKeyPress:D,role:"button",tabIndex:0},Object(o.createElement)(On,{active:x}),Object(o.createElement)("p",{className:"crowdsignal-forms-applause__count"},un(H)," Claps"),r()),Object(o.createElement)(gn,{showBranding:c&&!t.hideBranding,referralCode:"cs-forms-applause"}))};wn.propTypes={className:R.a.string};var hn=Re((function(){return Object(o.createElement)(o.Fragment,null,Object(o.createElement)("p",null),Object(o.createElement)("div",{className:"wp-block-button"},Object(o.createElement)("div",{className:"wp-block-button__link"})))}),(function(e){if(null===e)return{};var t=e.querySelector(".wp-block-button__link"),n=e.querySelector("p"),r=L(n),o=window.getComputedStyle(n).color,l=L(t),a=T(t),c=l;return c===r&&(c=a||o),{accent:c,surface:r,text:o}}))(wn),jn=Object.freeze({OPEN:"open",CLOSED:"closed",CLOSED_AFTER:"closed-after"}),_n=[{title:Object(l.__)("Small","crowdsignal-forms"),size:"small"},{title:Object(l.__)("Medium","crowdsignal-forms"),size:"medium"},{title:Object(l.__)("Large","crowdsignal-forms"),size:"large"}],Cn={position:"bottom right",isAlternate:!0,className:"crowdsignal-forms-vote__size-dropdown"};function En(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var vn=function(e){var t=e.attributes,n=e.setAttributes,r=Object(f.get)(t,"size","medium"),a=_n,c=Object(_.useState)(!1),s=j()(c,2),i=s[0],d=s[1],b=function(){return d(!i)};return Object(o.createElement)(E.BlockControls,null,Object(o.createElement)(v.ToolbarGroup,{isCollapsed:!0,icon:yt,label:Object(l.__)("Change block size","crowdsignal-forms"),popoverProps:Cn,controls:a.map((function(e){var t=e.size;return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?En(Object(n),!0).forEach((function(t){u()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):En(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e,{isActive:r===t,role:"menuitemradio",onClick:function(){return n({size:t})}})}))}),Object(o.createElement)(v.Toolbar,{controls:[{icon:xt,onClick:b}]}),i&&Object(o.createElement)(v.Popover,{className:"crowdsignal-forms__border-popover",onFocusOutside:b},Object(o.createElement)("div",{className:"crowdsignal-forms__row"},Object(o.createElement)(v.TextControl,{label:Object(l.__)("Border thickness","crowdsignal-forms"),type:"number",className:"crowdsignal-forms__small-text-input",onChange:function(e){n({borderWidth:parseInt(e,10)||0})},value:t.borderWidth}),Object(o.createElement)(v.TextControl,{label:Object(l.__)("Corner radius","crowdsignal-forms"),type:"number",className:"crowdsignal-forms__small-text-input",onChange:function(e){n({borderRadius:parseInt(e,10)||0})},value:t.borderRadius}))))},yn=function(e){var t=e.attributes,n=e.setAttributes,r=e.viewResultsUrl,a=e.shouldPromote,c=e.signalWarning,s=""!==r;return Object(o.createElement)(E.InspectorControls,null,Object(o.createElement)(v.PanelBody,{title:Object(l.__)("Results","crowdsignal-forms"),initialOpen:!0},Object(o.createElement)("p",null,s?Object(l.__)("Manage results on ","crowdsignal-forms"):Object(l.__)("Publish this post to enable results on ","crowdsignal-forms"),Object(o.createElement)(v.ExternalLink,{href:s?r:"https://www.crowdsignal.com"},"crowdsignal.com")),Object(o.createElement)("p",null,Object(o.createElement)(v.Button,{href:r,isSecondary:!0,target:"_blank",disabled:!s},Object(l.__)("View results","crowdsignal-forms"))),Object(o.createElement)(v.TextControl,{value:t.title,label:Object(l.__)("Title of the applause block","crowdsignal-forms"),onChange:function(e){return n({title:e})}}),a&&Object(o.createElement)(qe,{signalWarning:c})),Object(o.createElement)(v.PanelBody,{title:Object(l.__)("Status","crowdsignal-forms")},Object(o.createElement)(v.SelectControl,{value:t.pollStatus,label:Object(l.__)("Currently","crowdsignal-forms"),options:[{label:Object(l.__)("Open","crowdsignal-forms"),value:jn.OPEN},{label:Object(l.__)("Closed after","crowdsignal-forms"),value:jn.CLOSED_AFTER},{label:Object(l.__)("Closed","crowdsignal-forms"),value:jn.CLOSED}],onChange:function(e){Object(f.includes)(jn,e)&&n({closedAfterDateTime:e===jn.CLOSED_AFTER?new Date((new Date).getTime()+864e5).toISOString():null,pollStatus:e})}}),jn.CLOSED_AFTER===t.pollStatus&&Object(o.createElement)(v.TimePicker,{currentTime:t.closedAfterDateTime,label:Object(l.__)("Close applause block on","crowdsignal-forms"),onChange:function(e){var t=new Date(e);n({closedAfterDateTime:t.toISOString()})},is12Hour:!0})),Object(o.createElement)(E.PanelColorSettings,{title:Object(l.__)("Styling","crowdsignal-forms"),initialOpen:!0,colorSettings:[{value:t.textColor,onChange:function(e){return n({textColor:e})},label:Object(l.__)("Text color","crowdsignal-forms")},{value:t.backgroundColor,onChange:function(e){return n({backgroundColor:e})},label:Object(l.__)("Background color","crowdsignal-forms")},{value:t.borderColor,onChange:function(e){return n({borderColor:e})},label:Object(l.__)("Border color","crowdsignal-forms")}]}))},xn=Object(x.compose)([bt])(Lt((function(e){var t=e.attributes,n=e.setAttributes,r=e.pollDataFromApi,a=r?r.viewResultsUrl:"";Tt(e.name,Object(l.__)("Untitled Applause","crowdsignal-forms"),t,n);var c=je(),s=Object(f.get)(c,["signalCount","shouldDisplay"]),i=s&&Object(f.get)(c,["signalCount","count"])>=Object(f.get)(c,["signalCount","userLimit"]);return Object(o.createElement)(at,{blockIcon:null,blockName:Object(l.__)("Crowdsignal Applause","crowdsignal-forms")},Object(o.createElement)(yn,w()({},e,{shouldPromote:s,signalWarning:i,viewResultsUrl:a})),Object(o.createElement)(vn,e),Object(o.createElement)(hn,e))}),["pollId","answerId"])),Sn={pollId:{type:"string",default:null},hideBranding:{type:"boolean",default:!1},title:{type:"string",default:null},answerId:{type:"string",default:null},size:{type:"string",default:"medium"},pollStatus:{type:"string",default:jn.OPEN},closedAfterDateTime:{type:"string",default:null},textColor:{type:"string"},backgroundColor:{type:"string"},borderColor:{type:"string"},borderWidth:{type:"number",default:0},borderRadius:{type:"number",default:0}},Nn={title:Object(l.__)("Applause","crowdsignal-forms"),description:Object(l.__)("Let your audience cheer with a big round of applause — powered by Crowdsignal.","crowdsignal-forms"),category:"crowdsignal-forms",keywords:["crowdsignal",Object(l.__)("applause","crowdsignal-forms"),Object(l.__)("cheer","crowdsignal-forms"),Object(l.__)("cheering","crowdsignal-forms"),Object(l.__)("clap","crowdsignal-forms"),Object(l.__)("feedback","crowdsignal-forms"),Object(l.__)("kudos","crowdsignal-forms"),Object(l.__)("like","crowdsignal-forms"),Object(l.__)("opinion","crowdsignal-forms"),Object(l.__)("praise","crowdsignal-forms"),Object(l.__)("rating","crowdsignal-forms"),Object(l.__)("upvote","crowdsignal-forms"),Object(l.__)("upvoting","crowdsignal-forms"),Object(l.__)("votes","crowdsignal-forms"),Object(l.__)("voting","crowdsignal-forms")],icon:Object(o.createElement)((function(){return Object(o.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)("g",{clipPath:"url(#clip0)"},Object(o.createElement)("rect",{width:"24",height:"24",fill:"white"}),Object(o.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21.5284 16.5813L18.7187 20.432C17.7707 21.7312 15.9506 22.0157 14.6513 21.0676L6.50915 15.1265C5.69788 14.5345 5.51988 13.3957 6.11185 12.5844C6.18478 12.4845 6.26946 12.3931 6.35573 12.3119L6.19112 12.1918C5.37984 11.5998 5.20185 10.461 5.79382 9.64968C5.93538 9.45568 6.10792 9.29329 6.30287 9.17428C6.1079 8.62662 6.17683 8.00125 6.54574 7.49567C7.11197 6.71967 8.18077 6.52659 8.98362 7.03133C9.03891 6.91852 9.10007 6.81 9.173 6.71006C9.76497 5.89878 10.9038 5.72079 11.7151 6.31276L17.3294 10.4094L17.6107 8.44349C17.6946 7.84704 18.1496 7.35925 18.7389 7.23069L20.7027 6.79878L22.045 14.3547C22.1819 15.1302 21.9917 15.9464 21.5284 16.5813ZM20.61 14.605L19.5377 8.54337L19.0543 8.65016L18.4231 13.0093L10.857 7.48855C10.857 7.48855 10.4687 7.4034 10.3486 7.56801C10.2285 7.73262 10.2635 7.95632 10.4281 8.07643L14.6667 11.1693L13.8088 12.345L8.22979 8.27416C8.06518 8.15405 7.84147 8.18902 7.72136 8.35362C7.60126 8.51823 7.63622 8.74194 7.80082 8.86204L13.3798 12.9329L12.5219 14.1087L7.47787 10.4282C7.31327 10.3081 7.08956 10.343 6.96945 10.5076C6.84934 10.6722 6.8843 10.8959 7.04891 11.0161L12.0929 14.6966L11.235 15.8723L7.7959 13.3629C7.6313 13.2428 7.40759 13.2777 7.28748 13.4423C7.16737 13.607 7.20233 13.8307 7.36694 13.9508L15.5091 19.8919C16.1558 20.3638 17.0709 20.2207 17.5428 19.5741L20.3568 15.7175C20.5884 15.4001 20.6763 14.9957 20.61 14.605Z",fill:"black"}),Object(o.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.2289 16.7813L15.4192 20.632C14.4711 21.9312 12.651 22.2157 11.3518 21.2676L3.20959 15.3265C2.39831 14.7345 2.22032 13.5957 2.81229 12.7844C2.88522 12.6845 2.9699 12.5931 3.05617 12.5119L2.89156 12.3918C2.08028 11.7998 1.90229 10.661 2.49426 9.84968C2.63582 9.65567 2.80836 9.49329 3.0033 9.37428C2.80834 8.82662 2.87727 8.20125 3.24618 7.69567C3.81241 6.91967 4.88121 6.72658 5.68406 7.23133C5.73935 7.11852 5.80051 7.01 5.87344 6.91006C6.46541 6.09878 7.60427 5.92079 8.41555 6.51276L14.0298 10.6094L14.3111 8.64348C14.395 8.04703 14.85 7.55925 15.4393 7.43069L17.4031 6.99877L18.7455 14.5547C18.8823 15.3302 18.6921 16.1464 18.2289 16.7813Z",fill:"white"}),Object(o.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.2289 16.7813L15.4192 20.632C14.4711 21.9312 12.651 22.2157 11.3518 21.2676L3.20959 15.3265C2.39831 14.7345 2.22032 13.5957 2.81229 12.7844C2.88522 12.6845 2.9699 12.5931 3.05617 12.5119L2.89156 12.3918C2.08028 11.7998 1.90229 10.661 2.49426 9.84968C2.63582 9.65567 2.80836 9.49329 3.0033 9.37428C2.80834 8.82662 2.87727 8.20125 3.24618 7.69567C3.81241 6.91967 4.88121 6.72658 5.68406 7.23133C5.73935 7.11852 5.80051 7.01 5.87344 6.91006C6.46541 6.09878 7.60427 5.92079 8.41555 6.51276L14.0298 10.6094L14.3111 8.64348C14.395 8.04703 14.85 7.55925 15.4393 7.43069L17.4031 6.99877L18.7455 14.5547C18.8823 15.3302 18.6921 16.1464 18.2289 16.7813ZM17.3105 14.805L16.2381 8.74337L15.7548 8.85016L15.1235 13.2093L7.55749 7.68854C7.55749 7.68854 7.16918 7.6034 7.04907 7.76801C6.92896 7.93261 6.96392 8.15632 7.12853 8.27643L11.3672 11.3692L10.5092 12.545L4.93023 8.47416C4.76562 8.35405 4.54191 8.38901 4.4218 8.55362C4.3017 8.71823 4.33666 8.94193 4.50126 9.06204L10.0803 13.1329L9.22235 14.3087L4.17831 10.6282C4.0137 10.5081 3.79 10.543 3.66989 10.7076C3.54978 10.8722 3.58474 11.0959 3.74935 11.216L8.79338 14.8965L7.93546 16.0723L4.49634 13.5629C4.33173 13.4428 4.10803 13.4777 3.98792 13.6423C3.86781 13.8069 3.90277 14.0307 4.06738 14.1508L12.2096 20.0919C12.8562 20.5638 13.7714 20.4207 14.2432 19.7741L17.0572 15.9175C17.2889 15.6001 17.3767 15.1957 17.3105 14.805Z",fill:"black"}),Object(o.createElement)("rect",{x:"12.4851",y:"1.42175",width:"1.5",height:"3",transform:"rotate(8 12.4851 1.42175)",fill:"black"}),Object(o.createElement)("rect",{x:"16.9365",y:"2.15547",width:"1.5",height:"3",transform:"rotate(43 16.9365 2.15547)",fill:"black"}),Object(o.createElement)("rect",{x:"8.15195",y:"1.78963",width:"1.5",height:"3",transform:"rotate(-27 8.15195 1.78963)",fill:"black"})),Object(o.createElement)("defs",null,Object(o.createElement)("clipPath",{id:"clip0"},Object(o.createElement)("rect",{width:"24",height:"24",fill:"white"}))))}),null),edit:xn,attributes:Sn,example:{attributes:{size:"large"}}};Object(r.registerBlockType)("crowdsignal-forms/poll",ht),Object(r.registerBlockType)("crowdsignal-forms/vote",At),Object(r.registerBlockType)("crowdsignal-forms/vote-item",mn),Object(r.registerBlockType)("crowdsignal-forms/applause",Nn)}]));
1
+ !function(e,t){for(var n in t)e[n]=t[n]}(window,function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=46)}([function(e,t){!function(){e.exports=this.wp.element}()},function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t){!function(){e.exports=this.lodash}()},function(e,t){!function(){e.exports=this.React}()},function(e,t){!function(){e.exports=this.wp.components}()},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){!function(){e.exports=this.wp.blockEditor}()},function(e,t,n){var r=n(35),o=n(36),a=n(27),l=n(37);e.exports=function(e,t){return r(e)||o(e,t)||a(e,t)||l()}},function(e,t,n){e.exports=n(38)()},function(e,t){!function(){e.exports=this.regeneratorRuntime}()},function(e,t,n){var r;
2
  /*!
3
  Copyright (c) 2017 Jed Watson.
4
  Licensed under the MIT License (MIT), see
5
  http://jedwatson.github.io/classnames
6
+ */!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var a=typeof r;if("string"===a||"number"===a)e.push(r);else if(Array.isArray(r)&&r.length){var l=o.apply(null,r);l&&e.push(l)}else if("object"===a)for(var s in r)n.call(r,s)&&r[s]&&e.push(s)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},function(e,t){!function(){e.exports=this.wp.data}()},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n.apply(this,arguments)}e.exports=n},function(e,t){function n(e,t,n,r,o,a,l){try{var s=e[a](l),c=s.value}catch(i){return void n(i)}s.done?t(c):Promise.resolve(c).then(r,o)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise((function(o,a){var l=e.apply(t,r);function s(e){n(l,o,a,s,c,"next",e)}function c(e){n(l,o,a,s,c,"throw",e)}s(void 0)}))}}},function(e,t){!function(){e.exports=this.wp.compose}()},function(e,t){!function(){e.exports=this.wp.htmlEntities}()},function(e,t,n){var r=n(32),o=n(33),a=n(27),l=n(34);e.exports=function(e){return r(e)||o(e)||a(e)||l()}},function(e,t){!function(){e.exports=this.wp.blocks}()},function(e,t){!function(){e.exports=this.wp.apiFetch}()},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t,n){var r=n(45);e.exports=function(e,t){if(null==e)return{};var n,o,a=r(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(o=0;o<l.length;o++)n=l[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}},function(e,t,n){var r,o;
7
  /*!
8
  * JavaScript Cookie v2.2.1
9
  * https://github.com/js-cookie/js-cookie
10
  *
11
  * Copyright 2006, 2015 Klaus Hartl & Fagner Brack
12
  * Released under the MIT license
13
+ */!function(a){if(void 0===(o="function"==typeof(r=a)?r.call(t,n,t,e):r)||(e.exports=o),!0,e.exports=a(),!!0){var l=window.Cookies,s=window.Cookies=a();s.noConflict=function(){return window.Cookies=l,s}}}((function(){function e(){for(var e=0,t={};e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}function t(e){return e.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function n(r){function o(){}function a(t,n,a){if("undefined"!=typeof document){"number"==typeof(a=e({path:"/"},o.defaults,a)).expires&&(a.expires=new Date(1*new Date+864e5*a.expires)),a.expires=a.expires?a.expires.toUTCString():"";try{var l=JSON.stringify(n);/^[\{\[]/.test(l)&&(n=l)}catch(i){}n=r.write?r.write(n,t):encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var s="";for(var c in a)a[c]&&(s+="; "+c,!0!==a[c]&&(s+="="+a[c].split(";")[0]));return document.cookie=t+"="+n+s}}function l(e,n){if("undefined"!=typeof document){for(var o={},a=document.cookie?document.cookie.split("; "):[],l=0;l<a.length;l++){var s=a[l].split("="),c=s.slice(1).join("=");n||'"'!==c.charAt(0)||(c=c.slice(1,-1));try{var i=t(s[0]);if(c=(r.read||r)(c,i)||t(c),n)try{c=JSON.parse(c)}catch(u){}if(o[i]=c,e===i)break}catch(u){}}return e?o[e]:o}}return o.set=a,o.get=function(e){return l(e,!1)},o.getJSON=function(e){return l(e,!0)},o.remove=function(t,n){a(t,"",e(n,{expires:-1}))},o.defaults={},o.withConverter=n,o}((function(){}))}))},function(e,t){!function(){e.exports=this.ReactDOM}()},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){var r=n(23);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}},function(e,t,n){var r=n(26);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}},function(e,t,n){var r=n(40),o=n(41);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t}},function(e,t,n){var r=n(19),o=n(23),a=n(42),l=n(43);function s(t){var n="function"==typeof Map?new Map:void 0;return e.exports=s=function(e){if(null===e||!a(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return l(e,arguments,r(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),o(t,e)},s(t)}e.exports=s},,,function(e,t,n){var r=n(26);e.exports=function(e){if(Array.isArray(e))return r(e)}},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,a=void 0;try{for(var l,s=e[Symbol.iterator]();!(r=(l=s.next()).done)&&(n.push(l.value),!t||n.length!==t);r=!0);}catch(c){o=!0,a=c}finally{try{r||null==s.return||s.return()}finally{if(o)throw a}}return n}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,n){"use strict";var r=n(39);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,a,l){if(l!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){e.exports=function(e){return-1!==Function.toString.call(e).indexOf("[native code]")}},function(e,t,n){var r=n(23),o=n(44);function a(t,n,l){return o()?e.exports=a=Reflect.construct:e.exports=a=function(e,t,n){var o=[null];o.push.apply(o,t);var a=new(Function.bind.apply(e,o));return n&&r(a,n.prototype),a},a.apply(null,arguments)}e.exports=a},function(e,t){e.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}},function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}},function(e,t,n){"use strict";n.r(t);var r=n(17),o=n(0),a=n(1),l=function(){return Object(o.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.5 6L5.5 18C5.5 18.2761 5.72386 18.5 6 18.5L18 18.5C18.2761 18.5 18.5 18.2761 18.5 18L18.5 6C18.5 5.72386 18.2761 5.5 18 5.5L6 5.5C5.72386 5.5 5.5 5.72386 5.5 6ZM4 18L4 6C4 4.89543 4.89543 4 6 4L18 4C19.1046 4 20 4.89543 20 6L20 18C20 19.1046 19.1046 20 18 20L6 20C4.89543 20 4 19.1046 4 18Z"}),Object(o.createElement)("rect",{x:"15",y:"17",width:"6",height:"1.5",transform:"rotate(-90 15 17)"}),Object(o.createElement)("rect",{x:"11.5",y:"17",width:"9",height:"1.5",transform:"rotate(-90 11.5 17)"}),Object(o.createElement)("rect",{x:"8",y:"17",width:"5",height:"1.5",transform:"rotate(-90 8 17)"}))},s=n(16),c=n.n(s),i=n(5),u=n.n(i),d=n(11),f=n(2);function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){u()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var p={tryFetch:!1,isFetching:!1,pollsByClientId:{},pollClientIds:[]},g={setTryFetchPollData:function(e){return{type:"SET_TRY_FETCH",tryFetch:e}},setIsFetchingPollData:function(e){return{type:"IS_FETCHING",isFetching:e}},setPollApiDataForClientId:function(e,t){return{type:"SET_POLL",clientId:e,pollData:t}},addPollClientId:function(e){return{type:"ADD_POLL_CLIENT_ID",clientId:e}},removePollClientId:function(e){return{type:"REMOVE_POLL_CLIENT_ID",clientId:e}}},O=(Object(d.registerStore)("crowdsignal-forms/polls",{reducer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_TRY_FETCH":return m({},e,{tryFetch:!!t.tryFetch});case"IS_FETCHING":return m({},e,{isFetching:!!t.isFetching});case"SET_POLL":return m({},e,{pollsByClientId:m({},e.pollsByClientId,u()({},t.clientId,t.pollData))});case"ADD_POLL_CLIENT_ID":return m({},e,{pollClientIds:e.pollClientIds.indexOf(t.clientId)<0?[].concat(c()(e.pollClientIds),[t.clientId]):e.pollClientIds});case"REMOVE_POLL_CLIENT_ID":return m({},e,{pollClientIds:Object(f.filter)(e.pollClientIds,(function(e){return e!==t.clientId}))});default:return e}},actions:g,selectors:{shouldTryFetchingPollData:function(e){return!!e.tryFetch},getPollDataByClientId:function(e,t){return e.pollsByClientId[t]||null},getPollClientIds:function(e){return e.pollClientIds},isFetchingPollData:function(e){return!!e.isFetching}},controls:{},resolvers:{}}),n(12)),w=n.n(O),h=n(7),j=n.n(h),_=n(3),C=n.n(_),v=n(6),E=n(4),y=n(15),x=n(14),S=n(10),k=n.n(S),T=function(e){var t=e.hasVoted,n=e.isPollClosed,r=e.isPollHidden,l=e.showSubmitMessage,s=k()({"is-transparent":l},"crowdsignal-forms-poll__closed-banner");return Object(o.createElement)("div",{className:s},r&&Object(a.__)("This Poll is Hidden","crowdsignal-forms"),n&&!r&&Object(a.__)("This Poll is Closed","crowdsignal-forms"),t&&Object(a.__)("Thanks For Voting!","crowdsignal-forms"))},N=n(8),L=n.n(N),P=n(9),R=n.n(P),I=n(13),A=n.n(I),D=n(21),B=n.n(D),F=n(24),M=n.n(F),V=n(25),H=n.n(V),U=n(28),W=n.n(U),z=n(19),Z=n.n(z),q=n(29),G=n.n(q),K=n(18),Y=n.n(K);function Q(e){return function(){var t,n=Z()(e);if(J()){var r=Z()(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return W()(this,t)}}function J(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var X,$=function(){var e=A()(R.a.mark((function e(t){var n,r,o=arguments;return R.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=!(o.length>1&&void 0!==o[1])||o[1],r="https://api.crowdsignal.com/v3/polls",n){e.next=4;break}return e.abrupt("return",null);case 4:return e.abrupt("return",window.fetch("".concat(r,"/").concat(t,"/results"),{method:"GET",headers:{"content-type":"application/json"}}).then((function(e){if(e.status>=200&&e.status<300)return e.json();throw e})).then((function(e){if(404===e.status)return{};if(e.error)throw new Error(e.message);return e.results.votes_by_answer})));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ee=function(){var e=A()(R.a.mark((function e(t){var n,r,o;return R.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"5430eeac3911395001d731d9702fc38b",n=(new Date).getTime(),e.next=4,window.fetch("https://polldaddy.com/n/".concat("5430eeac3911395001d731d9702fc38b","/").concat(t,"?").concat(n,"&format=json"));case 4:if((r=e.sent).ok){e.next=7;break}throw new re;case 7:return e.next=9,r.json();case 9:if((o=e.sent).nonce){e.next=12;break}throw new re;case 12:return e.abrupt("return",o.nonce);case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),te=function(){var e=A()(R.a.mark((function e(t,n,r,o){var a,l,s;return R.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=r.join(","),e.next=3,window.fetch("https://polls.polldaddy.com/vote-js.php?format=json&p=".concat(n,"&b=1&a=").concat(a,"&o=&va=16&cookie=0&n=").concat(t,"&url=").concat(encodeURIComponent(window.location),"&vi=").concat(o));case 3:if((l=e.sent).ok){e.next=6;break}throw new re;case 6:return e.next=8,l.json();case 8:if("error"!==(s=e.sent).status){e.next=11;break}throw new ne(s.error);case 11:case"end":return e.stop()}}),e)})));return function(t,n,r,o){return e.apply(this,arguments)}}(),ne=function(e){H()(n,e);var t=Q(n);function n(){return M()(this,n),t.apply(this,arguments)}return n}(G()(Error)),re=function(e){H()(n,e);var t=Q(n);function n(){return M()(this,n),t.call(this,Object(a.__)("Server error. Please try again.","crowdsignal-forms"))}return n}(ne),oe=function(){var e=A()(R.a.mark((function e(){return R.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Y()({path:"/crowdsignal-forms/v1/account/connected",method:"GET"});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ae=function(){var e=A()(R.a.mark((function e(){return R.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Y()({path:"/crowdsignal-forms/v1/account/info",method:"GET"});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),le=function(e,t){var n=Object(_.useState)(null),r=j()(n,2),o=r[0],a=r[1],l=Object(_.useState)(null),s=j()(l,2),c=s[0],i=s[1],u=Object(_.useState)(!0),d=j()(u,2),f=d[0],b=d[1];return Object(_.useEffect)((function(){b(!0),i(null),a(null),e().then(a).catch(i).finally((function(){return b(!1)}))}),t),{data:o,error:c,loading:f}},se=Object.freeze({THANK_YOU:"thank-you",CUSTOM_TEXT:"custom-text",REDIRECT:"redirect",RESULTS:"results"}),ce=Object.freeze({THEME_DEFAULT:"theme-default",GEORGIA:"georgia",PALATINO:"palatino",TIMES_NEW_ROMAN:"times-new-roman",ARIAL:"arial",IMPACT:"impact",LUCIDA:"lucida",TAHOMA:"tahoma",TREBUCHET:"trebuchet",VERDANA:"verdana",COURIER:"courier",CABIN:"Cabin",CHIVO:"Chivo",OPEN_SANS:"Open+Sans",FIRA_SANS:"Fira+Sans",ROBOTO:"Roboto",NUNITO:"Nunito",OVERPASS:"Overpass",LATO:"Lato",LIBRE_FRANKLIN:"Libre+Franklin",MONTSERRAT:"Montserrat",POPPINS:"Poppins",RUBIK:"Rubik",RALEWAY:"Raleway",JOSEFIN_SANS:"Josefin+Sans",ALEGREYA_SANS:"Alegreya+Sans",OSWALD:"Oswald"}),ie=Object.freeze([ce.CABIN,ce.CHIVO,ce.OPEN_SANS,ce.FIRA_SANS,ce.ROBOTO,ce.NUNITO,ce.OVERPASS,ce.LATO,ce.LIBRE_FRANKLIN,ce.MONTSERRAT,ce.POPPINS,ce.RUBIK,ce.RALEWAY,ce.JOSEFIN_SANS,ce.ALEGREYA_SANS,ce.OSWALD]),ue=Object.freeze((X={},u()(X,ce.THEME_DEFAULT,null),u()(X,ce.GEORGIA,"Georgia, serif"),u()(X,ce.PALATINO,'"Palatino Linotype", "Book Antiqua", Palatino, serif'),u()(X,ce.TIMES_NEW_ROMAN,'"Times New Roman", Times, serif'),u()(X,ce.ARIAL,"Arial, Helvetica, sans-serif"),u()(X,ce.IMPACT,"Impact, Charcoal, sans-serif"),u()(X,ce.LUCIDA,'"Lucida Sans Unicode", "Lucida Grande", sans-serif'),u()(X,ce.TAHOMA,"Tahoma, Geneva, sans-serif"),u()(X,ce.TREBUCHET,'"Trebuchet MS", Helvetica, sans-serif'),u()(X,ce.VERDANA,"Verdana, Geneva, sans-serif"),u()(X,ce.COURIER,'"Courier New", Courier, monospace'),u()(X,ce.CABIN,'"Cabin", sans-serif'),u()(X,ce.CHIVO,'"Chivo", sans-serif'),u()(X,ce.OPEN_SANS,'"Open Sans", sans-serif'),u()(X,ce.FIRA_SANS,'"Fira Sans", sans-serif'),u()(X,ce.ROBOTO,'"Roboto", sans-serif'),u()(X,ce.NUNITO,'"Nunito", sans-serif'),u()(X,ce.OVERPASS,'"Overpass", sans-serif'),u()(X,ce.LATO,'"Lato", sans-serif'),u()(X,ce.LIBRE_FRANKLIN,'"Libre Franklin", sans-serif'),u()(X,ce.MONTSERRAT,'"Montserrat", sans-serif'),u()(X,ce.POPPINS,'"Poppins", sans-serif'),u()(X,ce.RUBIK,'"Rubik", sans-serif'),u()(X,ce.RALEWAY,'"Raleway", sans-serif'),u()(X,ce.JOSEFIN_SANS,'"Josefin Sans", sans-serif'),u()(X,ce.ALEGREYA_SANS,'"Alegreya Sans", sans-serif'),u()(X,ce.OSWALD,'"Oswald", sans-serif'),X)),de=Object.freeze({OPEN:"open",CLOSED:"closed",CLOSED_AFTER:"closed-after"}),fe=Object.freeze({SHOW_RESULTS:"show-results",SHOW_CLOSED_BANNER:"show-closed-banner",HIDDEN:"hidden"}),be=Object.freeze({CONNECTED:"connected",NOT_CONNECTED:"not-connected",NOT_VERIFIED:"not-verified"}),me=Object.freeze({RADIO:"radio",BUTTON:"button"}),pe=Object.freeze({LIST:"list",INLINE:"inline"}),ge=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=le((function(){return $(e,t)}),[e]),r=n.data,o=n.error,a=n.loading;return{error:o,loading:a,results:r}},Oe={is_verified:!0,capabilities:["hide-branding"],signal_count:{count:0,userLimit:2500,shouldDisplay:!1}},we=function(){var e=Object(_.useState)(Oe),t=j()(e,2),n=t[0],r=t[1],o=function(){var e=A()(R.a.mark((function e(){var t;return R.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ae();case 2:t=e.sent,r(t);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return Object(_.useEffect)((function(){o()}),[]),n},he=function(e){var t=e.error,n=e.loading,r=e.text,l=e.totalVotes,s=e.votes,c=k()("crowdsignal-forms-poll__answer-results",{"is-error":t,"is-loading":n}),i=!n&&!t,u=0===l?0:100*s/l,d={width:"".concat(parseInt(u,10),"%")};return Object(o.createElement)("div",{className:c},Object(o.createElement)("div",{className:"crowdsignal-forms-poll__answer-results-labels"},Object(o.createElement)("span",{className:"crowdsignal-forms-poll__answer-results-answer"},Object(y.decodeEntities)(r)),Object(o.createElement)("span",{className:"crowdsignal-forms-poll__answer-results-votes"},i&&Object(a.sprintf)(Object(a._n)("%s vote","%s votes",s,"crowdsignal-forms"),s.toLocaleString())),Object(o.createElement)("span",{className:"crowdsignal-forms-poll__answer-results-percent"},i&&"".concat(u.toFixed(2),"%"))),Object(o.createElement)("div",{className:"crowdsignal-forms-poll__answer-results-progress-track"},Object(o.createElement)("div",{className:"crowdsignal-forms-poll__answer-results-progress-bar",style:d})))};he.propTypes={loading:L.a.bool,text:L.a.string.isRequired,totalVotes:L.a.number,votes:L.a.number};var je=he,_e=Object(o.createElement)("span",null,"Hide Crowdsignal ads",Object(o.createElement)("br",null),"and get unlimited",Object(o.createElement)("br",null),"signals -"," ",Object(o.createElement)("a",{href:"https://crowdsignal.com/pricing",target:"_blank",rel:"noopener noreferrer"},"Upgrade")),Ce=function(e){var t=e.showLogo,n=e.editing,r=e.message;return Object(o.createElement)("div",{className:"crowdsignal-forms__footer-branding"},Object(o.createElement)("a",{className:"crowdsignal-forms__footer-cs-link",href:"https://crowdsignal.com?ref=cs-forms-poll",target:"_blank",rel:"noopener noreferrer"},r||Object(a.__)("Create your own poll with Crowdsignal","crowdsignal-forms")),n&&Object(o.createElement)(E.Tooltip,{text:_e,position:"top center"},Object(o.createElement)("a",{href:"https://crowdsignal.com/pricing",target:"_blank",rel:"noopener noreferrer",className:"crowdsignal-forms__branding-promote"},Object(a.__)("Hide","crowdsignal-forms"))),t&&Object(o.createElement)("img",{className:"crowdsignal-forms__footer-branding-logo",src:"https://app.crowdsignal.com/images/svg/cs-logo-dots.svg",alt:"Crowdsignal sticker"}))};function ve(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Ee=function(e,t){return Object(f.map)(e,(function(e){return void 0!==e.answerIdFromApi?e:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ve(Object(n),!0).forEach((function(t){u()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ve(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e,{answerIdFromApi:t[e.answerId]})}))},ye=function(e){return Object(f.isEmpty)(e)||void 0===e.text||null===e.text||""===e.text},xe=function(e){var t=e.answers,n=e.pollIdFromApi,r=e.setErrorMessage,l=e.hideBranding,s=ge(n),c=s.error,i=s.loading,u=s.results;Object(_.useEffect)((function(){r(c?Object(a.__)("Unfortunately, we're having some trouble retrieving the results for this poll at this time.","crowdsignal-forms"):"")}),[c]);var d=k()("crowdsignal-forms-poll__results",{"is-error":!!c,"is-loading":i}),b=Object(f.sum)(Object(f.values)(u));return Object(o.createElement)("div",{className:d},Object(o.createElement)("div",{className:"crowdsignal-forms-poll__results-list"},Object(f.map)(t,(function(e){var t;return!ye(e)&&Object(o.createElement)(je,{key:e.answerId,error:!!c,loading:i,text:e.text,totalVotes:b,votes:u&&null!==(t=u[e.answerIdFromApi])&&void 0!==t?t:0})}))),Object(o.createElement)("div",{className:"crowdsignal-forms-poll__results-footer"},Object(o.createElement)("span",{className:"crowdsignal-forms-poll__results-total"},Object(a.sprintf)(Object(a._n)("%s total vote","%s total votes",b,"crowdsignal-forms"),b?b.toLocaleString():0)),!l&&Object(o.createElement)(Ce,null)))};xe.propTypes={pollIdFromApi:L.a.number,answers:L.a.arrayOf(L.a.shape({answerId:L.a.string.isRequired,answerIdFromApi:L.a.number,text:L.a.string})).isRequired,setErrorMessage:L.a.func.isRequired,hideBranding:L.a.bool};var Se=xe,ke=n(20),Te=n.n(ke),Ne=function(e){for(var t=window.getComputedStyle(e).backgroundColor;"rgba(0, 0, 0, 0)"===t&&e.parentNode&&e.parentNode.nodeType===window.Node.ELEMENT_NODE;)e=e.parentNode,t=window.getComputedStyle(e).backgroundColor;return t},Le=function(){return Object(o.createElement)("div",{className:"crowdsignal-forms__style-probe"},Object(o.createElement)("p",null),Object(o.createElement)("h3",null,"Text"),Object(o.createElement)("div",{className:"wp-block-button"},Object(o.createElement)("div",{className:"wp-block-button__link"})),Object(o.createElement)("div",{className:"entry-content"},Object(o.createElement)("div",{className:"alignwide"})))},Pe=function(e){if(null===e)return{};var t,n=e.querySelector(".wp-block-button__link"),r=e.querySelector("p"),o=e.querySelector("h3"),a=e.querySelector(".alignwide"),l=Ne(n),s=Ne(r),c=window.getComputedStyle(r).color;if(l===s){var i=(t=n,"0px"!==window.getComputedStyle(t).borderBlockStartWidth?window.getComputedStyle(t).borderBlockStartColor:null);l=i||c}return{accentColor:l,backgroundColor:s,textColor:c,textColorInverted:window.getComputedStyle(n).color,textFont:window.getComputedStyle(r).fontFamily,textSize:window.getComputedStyle(r).fontSize,headingFont:window.getComputedStyle(o).fontFamily,contentWideWidth:window.getComputedStyle(a).maxWidth}},Re=function(e){return Object(E.withFallbackStyles)((function(e){return{fallbackStyles:Pe(e.querySelector(".crowdsignal-forms__style-probe"))}}))((function(t){var n=t.fallbackStyles,r=Te()(t,["fallbackStyles"]);return Object(o.createElement)(e,w()({fallbackStyles:n||{},renderStyleProbe:function(){return n?null:Object(o.createElement)(Le,null)}},r))}))};function Ie(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Ae=function(e){var t=e.answer,n=e.answerStyle,r=e.index,l=e.isMultipleChoice,s=e.onChange,c=e.onDelete,i=e.onNewAnswer,d=e.disabled,b=function(e){return s(r,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ie(Object(n),!0).forEach((function(t){u()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ie(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},t,{text:e}))},m=function(){return c(r)},p=function(){return i(r+1)},g=k()("crowdsignal-forms-poll__answer",{"is-multiple-choice":l,"is-button":me.BUTTON===n});return Object(o.createElement)("div",{className:g},me.RADIO===n&&Object(o.createElement)(o.Fragment,null,Object(o.createElement)("span",{className:"crowdsignal-forms-poll__check"}),Object(o.createElement)("div",{className:"crowdsignal-forms-poll__answer-label-wrapper"},d?Object(o.createElement)("span",{className:"crowdsignal-forms-poll__answer-label"},t.text?Object(y.decodeEntities)(t.text):Object(a.__)("Enter an answer","crowdsignal-forms")):Object(o.createElement)(v.RichText,{className:"crowdsignal-forms-poll__answer-label",tagName:"span",placeholder:Object(a.__)("Enter an answer","crowdsignal-forms"),multiline:!1,preserveWhiteSpace:!1,onChange:b,onSplit:p,onReplace:f.noop,onRemove:m,value:t.text,allowedFormats:[],withoutInteractiveFormatting:!0}))),me.BUTTON===n&&Object(o.createElement)("div",{className:"wp-block-button crowdsignal-forms-poll__block-button"},d?Object(o.createElement)("div",{className:"wp-block-button__link crowdsignal-forms-poll__submit-button"},t.text?Object(y.decodeEntities)(t.text):Object(a.__)("Enter an answer","crowdsignal-forms")):Object(o.createElement)(v.RichText,{className:"wp-block-button__link crowdsignal-forms-poll__submit-button",placeholder:Object(a.__)("Enter an answer","crowdsignal-forms"),multiline:!1,preserveWhiteSpace:!1,onChange:b,onSplit:p,onReplace:f.noop,onRemove:m,value:t.text,allowedFormats:[],withoutInteractiveFormatting:!0,keepPlaceholderOnFocus:!0})))},De=function(e,t){return Object(f.tap)(e.querySelectorAll("[role=textbox]")[t],(function(e){return e&&e.focus()}))},Be=function(e){var t=e.attributes,n=e.isSelected,r=e.setAttributes,a=e.disabled,l=e.answerStyle,s=e.buttonAlignment,i=Object(_.useRef)(),u=function(e,n){return r({answers:Object(f.tap)(c()(t.answers),(function(t){t[e]=n}))})},d=function(e){De(i.current,Math.max(e-1,0)),r({answers:Object(f.filter)(t.answers,(function(n){return t.answers.length<=2||n!==t.answers[e]}))})},b=function(e){e<t.answers.length&&r({answers:[].concat(c()(Object(f.slice)(t.answers,0,e)),[{}],c()(Object(f.slice)(t.answers,e,t.answers.length)))}),De(i.current,Math.min(e,t.answers.length))},m=n&&Object(f.last)(t.answers).text?[].concat(c()(t.answers),[{}]):t.answers,p=k()({"is-button":me.BUTTON===l,"is-inline-button-alignment":pe.INLINE===s},"crowdsignal-forms-poll__options"),g=me.RADIO===l;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)("div",{ref:i,className:p},Object(f.map)(m,(function(e,r){return function(e){return n&&!a||!ye(e)}(e)&&Object(o.createElement)(Ae,{key:"poll-answer-".concat(r),answer:e,answerStyle:l,index:r,isMultipleChoice:t.isMultipleChoice,onChange:u,onDelete:d,onNewAnswer:b,disabled:a})}))),g&&Object(o.createElement)("div",{className:"crowdsignal-forms-poll__actions"},Object(o.createElement)("div",{className:"wp-block-button crowdsignal-forms-poll__block-button"},a?Object(o.createElement)("div",{className:"wp-block-button__link crowdsignal-forms-poll__submit-button"},t.submitButtonLabel):Object(o.createElement)(v.RichText,{className:"wp-block-button__link crowdsignal-forms-poll__submit-button",onChange:function(e){return r({submitButtonLabel:e})},value:t.submitButtonLabel,allowedFormats:[]}))))},Fe=function(e){return Object(f.includes)(ce,e)?ue[e]:null},Me=function(e,t){var n,r,o,a,l=Object(f.isEmpty)(e.textColor)?t.textColor:e.textColor;return Object(f.mapKeys)({borderColor:null!==(n=e.borderColor)&&void 0!==n?n:t.accentColor,borderRadius:"".concat(e.borderRadius,"px"),borderWidth:"".concat(e.borderWidth,"px"),bgColor:e.backgroundColor,bodyFontFamily:null!==(r=Fe(e.fontFamily))&&void 0!==r?r:t.textFont,questionFontFamily:null!==(o=Fe(e.fontFamily))&&void 0!==o?o:t.headingFont,submitButtonBgColor:e.submitButtonBackgroundColor||t.accentColor,submitButtonTextColor:e.submitButtonTextColor||t.textColorInverted,textColor:l,textColorProperties:null!==(a=Ve(l))&&void 0!==a?a:"0, 0, 0",contentWideWidth:t.contentWideWidth},(function(e,t){return"--crowdsignal-forms-".concat(Object(f.kebabCase)(t))}))},Ve=function(e){return!e||"string"!=typeof e||-1===e.indexOf("rgb")&&0!==e.indexOf("#")||-1<e.indexOf("rgba")?null:(0===e.indexOf("#")&&(e=He(e)),e.match(/\((.*?)\)/)[1])},He=function(e){var t=0,n=0,r=0,o=4===e.length?"#".concat(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]):e;return 7===o.length&&(t=parseInt(o.substr(1,2),16)||0,n=parseInt(o.substr(3,2),16)||0,r=parseInt(o.substr(5,2),16)||0),"rgb(".concat(t,", ").concat(n,", ").concat(r,")")},Ue=function(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return k()({"has-bg-color":e.backgroundColor,"has-text-color":e.textColor,"has-submit-button-bg-color":e.submitButtonBackgroundColor,"has-submit-button-text-color":e.submitButtonTextColor,"has-border-radius":null!==(t=e.borderRadius)&&void 0!==t&&t,"has-box-shadow":e.hasBoxShadow},r)},We=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Date;if(de.CLOSED===e)return!0;if(de.CLOSED_AFTER===e){var r=new Date(t);return r<n}return!1},ze=function(e,t){return e.isMultipleChoice?me.RADIO:!Object(f.isEmpty)(t)&&t.indexOf("is-style-buttons")>-1?me.BUTTON:me.RADIO},Ze=function(e){e?Object(r.registerBlockStyle)("crowdsignal-forms/poll",{name:"buttons",label:Object(a.__)("Buttons","crowdsignal-forms")}):Object(r.unregisterBlockStyle)("crowdsignal-forms/poll","buttons")},qe=function(e){var t=e.signalWarning;return Object(o.createElement)("div",{className:"crowdsignal-forms__row"},Object(o.createElement)(E.Button,{href:"https://crowdsignal.com/pricing",isSecondary:!0,target:"_blank"},Object(a.__)("Upgrade","crowdsignal-forms")),t?Object(o.createElement)("div",{className:"crowdsignal-forms__sidebar-promote"},Object(o.createElement)("em",null,Object(a.__)("Your free Crowdsignal account has ","crowdsignal-forms"),Object(o.createElement)("strong",null,Object(o.createElement)(E.ExternalLink,{href:"https://crowdsignal.com/support/what-is-a-signal/"},Object(a.__)("reached the signals limit.","crowdsignal-forms"))))):Object(o.createElement)("div",{className:"crowdsignal-forms__sidebar-promote"},Object(o.createElement)("em",null,Object(a.__)("Hide Crowdsignal branding and get ","crowdsignal-forms"),Object(o.createElement)(E.ExternalLink,{href:"https://crowdsignal.com/support/what-is-a-signal/"},Object(a.__)("unlimited signals","crowdsignal-forms")))))},Ge=function(e){var t,n=e.attributes,r=e.className,l=e.setAttributes,s=e.fallbackBackgroundColor,c=e.fallbackTextColor,i=e.fallbackSubmitButtonBackgroundColor,u=e.fallbackSubmitButtonTextColor,d=e.viewResultsUrl,b=e.shouldPromote,m=e.signalWarning,p=""!==d,g=ze(n,r);return se.REDIRECT===n.confirmMessageType&&(n.confirmMessageType=se.THANK_YOU),Object(o.createElement)(v.InspectorControls,null,Object(o.createElement)(E.PanelBody,{title:Object(a.__)("Results","crowdsignal-forms"),initialOpen:!0},Object(o.createElement)("p",null,p?Object(a.__)("Manage results on ","crowdsignal-forms"):Object(a.__)("Publish this post to enable results on ","crowdsignal-forms"),Object(o.createElement)(E.ExternalLink,{href:p?d:"https://www.crowdsignal.com"},"crowdsignal.com")),Object(o.createElement)("p",null,Object(o.createElement)(E.Button,{href:d,isSecondary:!0,target:"_blank",disabled:!p},Object(a.__)("View results","crowdsignal-forms"))),Object(o.createElement)(E.TextControl,{value:Object(y.decodeEntities)(null!==(t=n.title)&&void 0!==t?t:n.question),label:Object(a.__)("Title of the poll block","crowdsignal-forms"),onChange:function(e){return l({title:e})}}),b&&Object(o.createElement)(qe,{signalWarning:m})),Object(o.createElement)(E.PanelBody,{title:Object(a.__)("Confirmation message","crowdsignal-forms"),initialOpen:!1},Object(o.createElement)(E.SelectControl,{value:n.confirmMessageType,label:Object(a.__)("On submission","crowdsignal-forms"),options:[{label:Object(a.__)("Show results","crowdsignal-forms"),value:se.RESULTS},{label:Object(a.__)('Show "Thank You" message',"crowdsignal-forms"),value:se.THANK_YOU},{label:Object(a.__)("Show a custom text message","crowdsignal-forms"),value:se.CUSTOM_TEXT}],onChange:function(e){return Object(f.includes)(se,e)&&l({confirmMessageType:e})}}),se.CUSTOM_TEXT===n.confirmMessageType&&Object(o.createElement)(E.TextareaControl,{value:n.customConfirmMessage,label:Object(a.__)("Message text","crowdsignal-forms"),placeholder:Object(a.__)("Thanks for voting!","crowdsignal-forms"),onChange:function(e){return l({customConfirmMessage:e})}}),se.REDIRECT===n.confirmMessageType&&Object(o.createElement)(v.URLInput,{className:"crowdsignal-forms__redirect-url",value:n.redirectAddress,label:Object(a.__)("Redirect address","crowdsignal-forms"),onChange:function(e){return l({redirectAddress:e})}})),Object(o.createElement)(E.PanelBody,{title:Object(a.__)("Poll status","crowdsignal-forms"),initialOpen:!1},Object(o.createElement)(E.SelectControl,{value:n.pollStatus,label:Object(a.__)("Currently","crowdsignal-forms"),options:[{label:Object(a.__)("Open","crowdsignal-forms"),value:de.OPEN},{label:Object(a.__)("Closed after","crowdsignal-forms"),value:de.CLOSED_AFTER},{label:Object(a.__)("Closed","crowdsignal-forms"),value:de.CLOSED}],onChange:function(e){Object(f.includes)(de,e)&&l({closedAfterDateTime:e===de.CLOSED_AFTER?new Date((new Date).getTime()+864e5).toISOString():null,pollStatus:e})}}),de.CLOSED_AFTER===n.pollStatus&&Object(o.createElement)(E.TimePicker,{currentTime:n.closedAfterDateTime,label:Object(a.__)("Close poll on","crowdsignal-forms"),onChange:function(e){var t=new Date(e);l({closedAfterDateTime:t.toISOString()})},is12Hour:!0}),de.OPEN!==n.pollStatus&&Object(o.createElement)(E.SelectControl,{value:n.closedPollState,label:Object(a.__)("When poll is closed","crowdsignal-forms"),options:[{label:Object(a.__)("Show results","crowdsignal-forms"),value:fe.SHOW_RESULTS},{label:Object(a.__)('Show poll with "Closed" banner',"crowdsignal-forms"),value:fe.SHOW_CLOSED_BANNER},{label:Object(a.__)("Hide poll","crowdsignal-forms"),value:fe.HIDDEN}],onChange:function(e){return Object(f.includes)(fe,e)&&l({closedPollState:e})}})),Object(o.createElement)(v.PanelColorSettings,{title:Object(a.__)("Block styling","crowdsignal-forms"),initialOpen:!1,colorSettings:[{value:n.textColor,onChange:function(e){return l({textColor:e})},label:Object(a.__)("Text color","crowdsignal-forms")},{value:n.backgroundColor,onChange:function(e){return l({backgroundColor:e})},label:Object(a.__)("Background color","crowdsignal-forms")},{value:n.borderColor,onChange:function(e){return l({borderColor:e})},label:Object(a.__)("Border color","crowdsignal-forms")}]},Object(o.createElement)(v.ContrastChecker,{textColor:n.textColor,backgroundColor:n.backgroundColor,fallbackBackgroundColor:s,fallbackTextColor:c}),Object(o.createElement)(E.SelectControl,{value:n.fontFamily,label:Object(a.__)("Choose font","crowdsignal-forms"),options:[{label:Object(a.__)("Default theme font","crowdsignal-forms"),value:ce.THEME_DEFAULT},{label:"Alegreya Sans",value:ce.ALEGREYA_SANS},{label:"Arial",value:ce.ARIAL},{label:"Cabin",value:ce.CABIN},{label:"Chivo",value:ce.CHIVO},{label:"Courier",value:ce.COURIER},{label:"Fira Sans",value:ce.FIRA_SANS},{label:"Georgia",value:ce.GEORGIA},{label:"Impact",value:ce.IMPACT},{label:"Josefin Sans",value:ce.JOSEFIN_SANS},{label:"Lato",value:ce.LATO},{label:"Libre Franklin",value:ce.LIBRE_FRANKLIN},{label:"Lucida",value:ce.LUCIDA},{label:"Montserrat",value:ce.MONTSERRAT},{label:"Nunito",value:ce.NUNITO},{label:"Open Sans",value:ce.OPEN_SANS},{label:"Oswald",value:ce.OSWALD},{label:"Overpass",value:ce.OVERPASS},{label:"Palatino",value:ce.PALATINO},{label:"Poppins",value:ce.POPPINS},{label:"Raleway",value:ce.RALEWAY},{label:"Roboto",value:ce.ROBOTO},{label:"Rubik",value:ce.RUBIK},{label:"Tahoma",value:ce.TAHOMA},{label:"Times New Roman",value:ce.TIMES_NEW_ROMAN},{label:"Trebuchet",value:ce.TREBUCHET},{label:"Verdana",value:ce.VERDANA}],onChange:function(e){return Object(f.includes)(ce,e)&&l({fontFamily:e})}}),"full"!==n.align&&Object(o.createElement)("div",{className:"crowdsignal-forms__row"},Object(o.createElement)(E.TextControl,{type:"number",label:Object(a.__)("Width (%)","crowdsignal-forms"),value:n.width,onChange:function(e){return l({width:parseInt(e,10)})}}),Object(o.createElement)(E.Button,{isSmall:!0,className:"crowdsignal-forms__reset-width-button",onClick:function(){return l({width:100})}},Object(a.__)("Reset","crowdsignal-forms"))),Object(o.createElement)("div",{className:"crowdsignal-forms__row"},Object(o.createElement)(E.TextControl,{label:Object(a.__)("Border thickness","crowdsignal-forms"),value:n.borderWidth,onChange:function(e){l({borderWidth:parseInt(e,10)||0})},type:"number",className:"crowdsignal-forms__small-text-input"}),Object(o.createElement)(E.TextControl,{label:Object(a.__)("Corner radius","crowdsignal-forms"),value:n.borderRadius,onChange:function(e){l({borderRadius:parseInt(e,10)||0})},type:"number",className:"crowdsignal-forms__small-text-input"})),Object(o.createElement)(E.ToggleControl,{label:Object(a.__)("Drop shadow","crowdsignal-forms"),checked:n.hasBoxShadow,onChange:function(e){l({hasBoxShadow:e})}})),Object(o.createElement)(v.PanelColorSettings,{title:Object(a.__)("Button styling","crowdsignal-forms"),initialOpen:!1,colorSettings:[{value:n.submitButtonTextColor,onChange:function(e){return l({submitButtonTextColor:e})},label:Object(a.__)("Text color","crowdsignal-forms")},{value:n.submitButtonBackgroundColor,onChange:function(e){return l({submitButtonBackgroundColor:e})},label:Object(a.__)("Background color","crowdsignal-forms")}]},Object(o.createElement)(v.ContrastChecker,{textColor:n.submitButtonTextColor,backgroundColor:n.submitButtonBackgroundColor,fallbackBackgroundColor:i,fallbackTextColor:u}),me.BUTTON===g&&Object(o.createElement)(E.SelectControl,{value:n.buttonAlignment,label:Object(a.__)("Alignment","crowdsignal-forms"),options:[{value:pe.LIST,label:Object(a.__)("List","crowdsignal-forms")},{value:pe.INLINE,label:Object(a.__)("Inline","crowdsignal-forms")}],onChange:function(e){return l({buttonAlignment:e})}})),Object(o.createElement)(E.PanelBody,{title:Object(a.__)("Answer settings","crowdsignal-forms"),initialOpen:!0},Object(o.createElement)(E.CheckboxControl,{checked:n.hasOneResponsePerComputer,label:Object(a.__)("One response per computer","crowdsignal-forms"),onChange:function(e){return l({hasOneResponsePerComputer:e})}}),Object(o.createElement)(E.CheckboxControl,{checked:n.randomizeAnswers,label:Object(a.__)("Randomize answer order","crowdsignal-forms"),onChange:function(e){return l({randomizeAnswers:e})}})))};function Ke(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Ye=[{icon:function(){return Object(o.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)("path",{d:"M20 6.75H12V5.25H20V6.75Z"}),Object(o.createElement)("path",{d:"M20 12.5H12V11H20V12.5Z"}),Object(o.createElement)("path",{d:"M20 18.75H12V17.25H20V18.75Z"}),Object(o.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6 7C6.55228 7 7 6.55228 7 6C7 5.44772 6.55228 5 6 5C5.44772 5 5 5.44772 5 6C5 6.55228 5.44772 7 6 7ZM6 8C7.10457 8 8 7.10457 8 6C8 4.89543 7.10457 4 6 4C4.89543 4 4 4.89543 4 6C4 7.10457 4.89543 8 6 8Z"}),Object(o.createElement)("path",{d:"M6 12.75C6.55228 12.75 7 12.3023 7 11.75C7 11.1977 6.55228 10.75 6 10.75C5.44772 10.75 5 11.1977 5 11.75C5 12.3023 5.44772 12.75 6 12.75ZM6 13.75C7.10457 13.75 8 12.8546 8 11.75C8 10.6454 7.10457 9.75 6 9.75C4.89543 9.75 4 10.6454 4 11.75C4 12.8546 4.89543 13.75 6 13.75Z"}),Object(o.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6 19C6.55228 19 7 18.5523 7 18C7 17.4477 6.55228 17 6 17C5.44772 17 5 17.4477 5 18C5 18.5523 5.44772 19 6 19ZM6 20C7.10457 20 8 19.1046 8 18C8 16.8954 7.10457 16 6 16C4.89543 16 4 16.8954 4 18C4 19.1046 4.89543 20 6 20Z"}))},title:Object(a.__)("Choose one answer","crowdsignal-forms"),value:!1},{icon:function(){return Object(o.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7 10.75H5V12.75H7V10.75ZM4 9.75V13.75H8V9.75H4Z"}),Object(o.createElement)("path",{d:"M4 4H8V8H4V4Z"}),Object(o.createElement)("path",{d:"M4 16H8V20H4V16Z"}),Object(o.createElement)("path",{d:"M20 6.75H12V5.25H20V6.75Z"}),Object(o.createElement)("path",{d:"M20 12.5H12V11H20V12.5Z"}),Object(o.createElement)("path",{d:"M20 18.75H12V17.25H20V18.75Z"}))},title:Object(a.__)("Choose multiple answers","crowdsignal-forms"),value:!0}],Qe=function(e){var t=e.attributes,n=e.setAttributes,r=Object(f.map)(Ye,(function(e){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ke(Object(n),!0).forEach((function(t){u()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ke(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e,{isActive:e.value===t.isMultipleChoice,onClick:function(){n({isMultipleChoice:e.value}),Ze(e.value)}})}));return Object(o.createElement)(v.BlockControls,null,Object(o.createElement)(E.Toolbar,{controls:r}))},Je=function(e){var t=e.children;return Object(o.createElement)("div",{className:"crowdsignal-forms-poll__error-banner"},t)},Xe="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),$e=new Uint8Array(16);function et(){if(!Xe)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Xe($e)}for(var tt=[],nt=0;nt<256;++nt)tt.push((nt+256).toString(16).substr(1));var rt=function(e,t){var n=t||0;return(tt[e[n+0]]+tt[e[n+1]]+tt[e[n+2]]+tt[e[n+3]]+"-"+tt[e[n+4]]+tt[e[n+5]]+"-"+tt[e[n+6]]+tt[e[n+7]]+"-"+tt[e[n+8]]+tt[e[n+9]]+"-"+tt[e[n+10]]+tt[e[n+11]]+tt[e[n+12]]+tt[e[n+13]]+tt[e[n+14]]+tt[e[n+15]]).toLowerCase()};var ot=function(e,t,n){var r=(e=e||{}).random||(e.rng||et)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return rt(r)},at=function(e){var t=e.onEditClick;return Object(o.createElement)("div",{className:"crowdsignal-forms-poll__edit-bar"},Object(o.createElement)("div",{className:"crowdsignal-forms-poll__edit-bar-message"},Object(a.__)("Warning! This poll is published. Deleting or reordering answers may cause the loss of existing responses.","crowdsignal-forms")),Object(o.createElement)("button",{className:"crowdsignal-forms-poll__edit-bar-button",onClick:function(){t()}},Object(a.__)("Edit","crowdsignal-forms")))},lt=function(e){var t=e.blockIcon,n=e.blockName,r=e.children,l=function(){var e=Object(_.useState)(!0),t=j()(e,2),n=t[0],r=t[1],o=Object(_.useState)(!0),a=j()(o,2),l=a[0],s=a[1],c=function(){var e=A()(R.a.mark((function e(){var t,n,o;return R.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,oe();case 2:return t=e.sent,n=be.CONNECTED===t||be.NOT_VERIFIED===t,o=be.CONNECTED===t,r(n),s(o),e.abrupt("return",{isNowConnected:n,isNowVerified:o});case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return Object(_.useEffect)((function(){c()}),[]),{isConnected:n,isAccountVerified:l,checkIsConnected:c}}(),s=l.isConnected,c=l.isAccountVerified,i=l.checkIsConnected,u=function(){var e=A()(R.a.mark((function e(){var t,n,r,o;return R.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=s,e.next=3,i();case 3:n=e.sent,r=n.isNowConnected,o=n.isNowVerified,r||window.open("/wp-admin/admin.php?page=crowdsignal-forms-setup"),t&&!o&&window.open("https://wordpress.com/me/account");case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();if(s&&c)return r;var d=!s,f=s&&!c;return Object(o.createElement)("div",{className:"crowdsignal-forms__connect-to-crowdsignal"},Object(o.createElement)("div",{className:"crowdsignal-forms__connect-to-crowdsignal-header"},t,Object(o.createElement)("div",{className:"crowdsignal-forms__connect-to-crowdsignal-title"},n)),Object(o.createElement)("div",{className:"crowdsignal-forms__connect-to-crowdsignal-body"},d&&Object(a.__)("You need to connect to a Crowdsignal account to collect and manage your results.","crowdsignal-forms"),f&&Object(a.__)("Please verify your WordPress.com email address in order to publish your poll.","crowdsignal-forms")),Object(o.createElement)(E.Button,{isPrimary:!0,onClick:u},d&&Object(a.__)("Connect to Crowdsignal","crowdsignal-forms"),f&&Object(a.__)("Verify or Change your Email Address","crowdsignal-forms")))};function st(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ct(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?st(Object(n),!0).forEach((function(t){u()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):st(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var it=function(e){return"crowdsignal-forms/poll"===e.name||"crowdsignal-forms/applause"===e.name||"crowdsignal-forms/vote"===e.name},ut=!1,dt=!1;!function(){if(!ut){ut=!0;var e=Object(d.select)("core/editor"),t=e.isEditedPostDirty,n=e.isEditedPostNew,r=e.isSavingPost,o=e.isCleanNewPost,a=e.getCurrentPostId,l=Object(d.dispatch)("crowdsignal-forms/polls"),s=l.setTryFetchPollData,c=l.setPollApiDataForClientId,i=l.setIsFetchingPollData,u=Object(d.select)("crowdsignal-forms/polls"),b=u.shouldTryFetchingPollData,m=u.getPollDataByClientId,p=u.isFetchingPollData;Object(d.subscribe)((function(){var e=Object(f.filter)(Object(d.select)("core/block-editor").getBlocks(),it);if(!(e.length<1)&&(!p()&&!(o()||n()||r()||t())&&a())){var l=Object(f.filter)(e,(function(e){var t=e.attributes;return t.pollId&&null===m(t.pollId)}));l.length<1||(b()?p()||(i(!0),Promise.all(Object(f.map)(l,(function(e){var t=e.attributes.pollId;return Y()({path:"/crowdsignal-forms/v1/polls/".concat(t,"?cached=1"),method:"GET"}).then((function(e){return c(t,ct({},e,{viewResultsUrl:"https://app.crowdsignal.com/polls/".concat(e.id,"/results")}))}),(function(){return c(t,null)}))}))).finally((function(){return i(!1)}))):s(!0))}}))}}();var ft=function(e){return function(t){var n=t.attributes,r=t.setAttributes,a=t.addPollClientId,l=t.removePollClientId;return Object(_.useEffect)((function(){return("p2tenberg"in window||"p2editor"in window)&&function(){if(!dt){dt=!0;var e=null,t=function(){null!==e&&clearTimeout(e),e=setTimeout((function(){return n()}),1e3+1e3*Math.random())},n=function(){var e=Object(d.select)("crowdsignal-forms/polls"),n=e.getPollClientIds,r=e.getPollDataByClientId,o=e.shouldTryFetchingPollData,a=e.isFetchingPollData,l=Object(f.filter)(n(),(function(e){return null===r(e)}));if(l.length<1)return t();var s=Object(d.dispatch)("crowdsignal-forms/polls"),c=s.setTryFetchPollData,i=s.setPollApiDataForClientId,u=s.setIsFetchingPollData;return o()?a()||(u(!0),Promise.all(Object(f.map)(l,(function(e){return Y()({path:"/crowdsignal-forms/v1/polls/".concat(e,"?cached=1"),method:"GET"}).then((function(t){return i(e,ct({},t,{viewResultsUrl:"https://app.crowdsignal.com/polls/".concat(t.id,"/results")}))}),(function(){return i(e,null)}))}))).finally((function(){return u(!1)}))):c(!0),t()};n()}}(),n.pollId&&a(n.pollId),function(){n.pollId&&l(n.pollId)}}),[]),function(e,t,n,r){Object(_.useEffect)((function(){if(!Object(f.isEmpty)(t))if(window.csPolls||(window.csPolls={}),window.csPolls[t])if(window.csPolls[t].indexOf(e)>-1);else{var o=Object(f.map)(n,(function(e){return Object(f.omit)(e,["answerId"])}));r({pollId:null,answers:o})}else window.csPolls[t]=[e]}),[t])}(t.clientId,n.pollId,n.answers,r),Object(o.createElement)(e,t)}},bt=function(e){return Object(x.compose)([Object(d.withSelect)((function(e,t){var n=e("crowdsignal-forms/polls"),r=n.getPollDataByClientId,o=n.shouldTryFetchingPollData,a=n.isFetchingPollData,l=t.attributes;return{pollDataFromApi:l.pollId?r(l.pollId):null,getPollDataByClientId:r,shouldTryFetchingPollData:o,isFetchingPollData:a}})),Object(d.withDispatch)((function(e){var t=e("crowdsignal-forms/polls");return{setTryFetchPollData:t.setTryFetchPollData,setPollApiDataForClientId:t.setPollApiDataForClientId,setIsFetchingPollData:t.setIsFetchingPollData,addPollClientId:t.addPollClientId,removePollClientId:t.removePollClientId}})),ft])(e)},mt=function(e){var t=e.icon,n=e.children,r=Te()(e,["icon","children"]);return Object(o.createElement)(E.Notice,w()({className:"crowdsignal-forms__editor-notice"},r),t&&Object(o.createElement)("div",{className:"crowdsignal-forms__editor-notice-icon"},Object(o.createElement)(E.Icon,{icon:t})),Object(o.createElement)("div",{className:"crowdsignal-forms__editor-notice-text"},n))},pt=function(){return Object(o.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 23C18.0751 23 23 18.0751 23 12C23 5.92487 18.0751 1 12 1C5.92487 1 1 5.92487 1 12C1 18.0751 5.92487 23 12 23ZM12 6C12.5523 6 13 6.44772 13 7V13C13 13.5523 12.5523 14 12 14C11.4477 14 11 13.5523 11 13V7C11 6.44772 11.4477 6 12 6ZM12 16C12.5523 16 13 16.4477 13 17C13 17.5523 12.5523 18 12 18C11.4477 18 11 17.5523 11 17C11 16.4477 11.4477 16 12 16Z",fill:"var(--wp-admin-theme-color)"}))},gt=function(){return Object(o.createElement)(mt,{icon:Object(o.createElement)(pt,null),status:"warn",isDismissible:!1},Object(a.__)("Your free Crowdsignal account has exceeded ","crowdsignal-forms"),Object(o.createElement)(E.ExternalLink,{href:"https://crowdsignal.com/support/what-is-a-signal/"},Object(a.__)("the limit of 2500 signals.","crowdsignal-forms")),Object(o.createElement)("br",null),Object(o.createElement)("strong",null,Object(o.createElement)(E.ExternalLink,{href:"https://crowdsignal.com/pricing"},Object(a.__)("Please upgrade.","crowdsignal-forms"))))};function Ot(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var wt=Object(x.compose)([Re,bt,function(e){return function(t){var n=t.attributes,r=t.setAttributes;return Object(_.useEffect)((function(){if(!n.pollId){var e=ot();r({pollId:e})}if(Object(f.some)(n.answers,(function(e){return!e.answerId&&e.text}))){var t=Object(f.map)(n.answers,(function(e){return e.answerId||!e.text?e:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ot(Object(n),!0).forEach((function(t){u()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ot(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e,{answerId:ot()})}));r({answers:t})}})),Object(o.createElement)(e,t)}}])((function(e){var t=e.attributes,n=e.className,r=e.fallbackStyles,s=e.isSelected,c=e.setAttributes,i=e.renderStyleProbe,u=e.pollDataFromApi,d=Object(_.useState)(!0),b=j()(d,2),m=b[0],p=b[1],g=Object(_.useState)(""),O=j()(g,2),h=O[0],C=O[1],x=!Object(f.isEmpty)(u),S=u?u.viewResultsUrl:"",k=u?u.id:null,N={};u&&Object(f.map)(u.answers,(function(e){N[e.client_id]=e.id}));var L=s&&"full"!==t.align,P="full"!==t.align?"".concat(t.width,"%"):"auto",R=We(t.pollStatus,t.closedAfterDateTime),I=t.note||s&&m,A=R&&fe.SHOW_RESULTS===t.closedPollState,D=R&&fe.HIDDEN===t.closedPollState,B=we(),F=Object(f.get)(B,"capabilities").includes("hide-branding");Object(_.useEffect)((function(){return p(!x)}),[s]),Object(_.useEffect)((function(){s&&Ze(!t.isMultipleChoice)}),[t.isMultipleChoice,s]);var M=s&&x&&!m,V=ze(t,n);t.fontFamily&&function(e){if(!Object(f.isEmpty)(e)&&ce.THEME_DEFAULT!==e&&-1!==ie.indexOf(e)){var t="https://fonts.googleapis.com/css2?family=".concat(e,":wght@400;600;700&display=swap");0===Object(f.filter)(Array.from(document.head.childNodes),(function(e){return"link"===e.nodeName.toLowerCase()&&e.href===t})).length&&document.head.appendChild(Object(f.tap)(document.createElement("link"),(function(e){e.type="text/css",e.rel="stylesheet",e.href=t})))}}(t.fontFamily);var H=Object(f.get)(B,["signalCount","shouldDisplay"]),U=H&&Object(f.get)(B,["signalCount","count"])>=Object(f.get)(B,["signalCount","userLimit"]);return Object(o.createElement)(lt,{blockIcon:Object(o.createElement)(l,null),blockName:Object(a.__)("Crowdsignal Poll","crowdsignal-forms")},Object(o.createElement)(Qe,e),Object(o.createElement)(Ge,w()({},e,{viewResultsUrl:S,shouldPromote:H,signalWarning:U})),U&&Object(o.createElement)(gt,null),Object(o.createElement)(E.ResizableBox,{className:"crowdsignal-forms-poll__resize-wrapper",size:{height:"auto",width:P},minWidth:"25%",maxWidth:"100%",enable:{left:!0,right:!0},onResizeStop:function(e,t,n){"right"!==t&&"left"!==t||c({width:Object(f.round)(n.offsetWidth/n.parentNode.offsetWidth*100)})},showHandle:L,resizeRatio:2},Object(o.createElement)("div",{className:Ue(t,n,{"is-selected-in-editor":s,"is-closed":R,"is-hidden":D},"crowdsignal-forms-poll"),style:Me(t,r)},M&&Object(o.createElement)(at,{onEditClick:function(){p(!0)}}),h&&Object(o.createElement)(Je,null,h),Object(o.createElement)("div",{className:"crowdsignal-forms-poll__content"},m?Object(o.createElement)(v.RichText,{tagName:"h3",className:"crowdsignal-forms-poll__question",placeholder:Object(a.__)("Enter your question","crowdsignal-forms"),onChange:function(e){return c({question:e})},value:t.question,allowedFormats:[]}):Object(o.createElement)("h3",{className:"crowdsignal-forms-poll__question"},t.question?Object(y.decodeEntities)(t.question):Object(a.__)("Enter your question","crowdsignal-forms")),I&&(m?Object(o.createElement)(v.RichText,{tagName:"p",className:"crowdsignal-forms-poll__note",placeholder:Object(a.__)("Add a note (optional)","crowdsignal-forms"),onChange:function(e){return c({note:e})},value:t.note,allowedFormats:[]}):Object(o.createElement)("p",{className:"crowdsignal-forms-poll__note"},t.note?Object(y.decodeEntities)(t.note):Object(a.__)("Add a note (optional)","crowdsignal-forms"))),!A&&Object(o.createElement)(Be,w()({},e,{setAttributes:c,disabled:!m,answerStyle:V,buttonAlignment:t.buttonAlignment})),A&&Object(o.createElement)(Se,{answers:Ee(Object(f.filter)(t.answers,(function(e){return!ye(e)})),N),pollIdFromApi:k,hideBranding:F,setErrorMessage:C}),!F&&Object(o.createElement)(Ce,{editing:!0})),R&&Object(o.createElement)(T,{isPollHidden:D,isPollClosed:R}),i())))})),ht={pollId:{type:"string",default:null},isMultipleChoice:{type:"boolean",default:!1},title:{type:"string",default:null},question:{type:"string",default:""},note:{type:"string",default:""},answers:{type:"array",default:[{},{},{}],items:{type:"object",properties:{answerId:{type:"string",default:null},text:{type:"string",default:""}}}},submitButtonLabel:{type:"string",default:Object(a.__)("Submit","crowdsignal-forms")},submitButtonTextColor:{type:"string"},submitButtonBackgroundColor:{type:"string"},confirmMessageType:{type:"string",default:se.RESULTS},customConfirmMessage:{type:"string"},redirectAddress:{type:"string"},textColor:{type:"string"},backgroundColor:{type:"string"},borderColor:{type:"string"},borderWidth:{type:"number",default:2},borderRadius:{type:"number",default:0},hasBoxShadow:{type:"boolean",default:!1},fontFamily:{type:"string",default:ce.THEME_DEFAULT},hasOneResponsePerComputer:{type:"boolean",default:!1},randomizeAnswers:{type:"boolean",default:!1},align:{type:"string"},width:{type:"number",default:100},pollStatus:{type:"string",default:de.OPEN},closedPollState:{type:"string",default:fe.SHOW_RESULTS},closedAfterDateTime:{type:"string",default:null},hideBranding:{type:"boolean",default:!1},buttonAlignment:{type:"string",default:pe.LIST}},jt={title:Object(a.__)("Poll","crowdsignal-forms"),description:Object(a.__)("Create polls and get your audience’s opinion — powered by Crowdsignal.","crowdsignal-forms"),category:"crowdsignal-forms",keywords:[Object(a.__)("ask","crowdsignal-forms"),"crowdsignal",Object(a.__)("feedback","crowdsignal-forms"),Object(a.__)("form","crowdsignal-forms"),Object(a.__)("opinion","crowdsignal-forms"),Object(a.__)("poll","crowdsignal-forms"),Object(a.__)("pop","crowdsignal-forms"),Object(a.__)("question","crowdsignal-forms"),Object(a.__)("quiz","crowdsignal-forms"),Object(a.__)("research","crowdsignal-forms"),Object(a.__)("survey","crowdsignal-forms"),Object(a.__)("vote","crowdsignal-forms")],icon:Object(o.createElement)(l,null),edit:wt,attributes:ht,supports:{align:["center","wide","full"]},getEditWrapperProps:function(e){return{"data-align":e.align}},example:{attributes:{question:Object(a.__)("How did you hear about us?","crowdsignal-forms"),answers:[{text:Object(a.__)("Search","crowdsignal-forms")},{text:Object(a.__)("Friend","crowdsignal-forms")},{text:Object(a.__)("Email","crowdsignal-forms")}]}},styles:[{name:"default",label:Object(a.__)("Default","crowdsignal-forms"),isDefault:!0}]},_t=function(){return Object(o.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)("mask",{id:"maskVote","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:"3",y:"3",width:"18",height:"18"},Object(o.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.5999 9.525H13.3942L14.1779 5.75475L14.2027 5.49075C14.2027 5.1525 14.0624 4.839 13.8397 4.61625L12.9652 3.75L7.53666 9.18675C7.23142 9.48374 7.04992 9.89621 7.04991 10.3499H3.75V18.6824H7.05V18.6178C7.05963 19.5172 7.79834 20.25 8.69991 20.25H16.1249C16.8097 20.25 17.3954 19.8375 17.6429 19.2435L20.1344 13.4273C20.2087 13.2375 20.2499 13.0395 20.2499 12.825V11.175C20.2499 10.2675 19.5074 9.525 18.5999 9.525ZM7.05 18.6178V10.3499H7.04991C7.04991 10.35 7.04991 10.35 7.04991 10.35V18.6C7.04991 18.6059 7.04994 18.6119 7.05 18.6178ZM18.5999 12.825L16.1249 18.6H8.69986V10.35L12.2804 6.76952L11.3646 11.175H18.5999V12.825Z",fill:"white"})),Object(o.createElement)("g",{mask:"url(#maskVote)"},Object(o.createElement)("rect",{x:"1.00024",y:"1.25",width:"22",height:"22",fill:"#1E1E1E"})))},Ct=Object.freeze({OPEN:"open",CLOSED:"closed",CLOSED_AFTER:"closed-after"}),vt=(Object.freeze({CONNECTED:"connected",NOT_CONNECTED:"not-connected",NOT_VERIFIED:"not-verified"}),[{title:Object(a.__)("Small","crowdsignal-forms"),size:"small"},{title:Object(a.__)("Medium","crowdsignal-forms"),size:"medium"},{title:Object(a.__)("Large","crowdsignal-forms"),size:"large"}]),Et={position:"bottom right",isAlternate:!0,className:"crowdsignal-forms-vote__size-dropdown"},yt=function(e){var t=e.attributes,n=e.setAttributes,r=e.viewResultsUrl,l=e.signalWarning,s=e.shouldPromote,c=""!==r;return Object(o.createElement)(v.InspectorControls,null,Object(o.createElement)(E.PanelBody,{title:Object(a.__)("Results","crowdsignal-forms"),initialOpen:!0},Object(o.createElement)("p",null,c?Object(a.__)("Manage results on ","crowdsignal-forms"):Object(a.__)("Publish this post to enable results on ","crowdsignal-forms"),Object(o.createElement)(E.ExternalLink,{href:c?r:"https://www.crowdsignal.com"},"crowdsignal.com")),Object(o.createElement)("p",null,Object(o.createElement)(E.Button,{href:r,isSecondary:!0,target:"_blank",disabled:!c},Object(a.__)("View results","crowdsignal-forms"))),Object(o.createElement)(E.TextControl,{value:t.title,label:Object(a.__)("Title of the vote block","crowdsignal-forms"),onChange:function(e){return n({title:e})}}),s&&Object(o.createElement)(qe,{signalWarning:l})),Object(o.createElement)(E.PanelBody,{title:Object(a.__)("Status","crowdsignal-forms")},Object(o.createElement)(E.SelectControl,{value:t.pollStatus,label:Object(a.__)("Currently","crowdsignal-forms"),options:[{label:Object(a.__)("Open","crowdsignal-forms"),value:Ct.OPEN},{label:Object(a.__)("Closed after","crowdsignal-forms"),value:Ct.CLOSED_AFTER},{label:Object(a.__)("Closed","crowdsignal-forms"),value:Ct.CLOSED}],onChange:function(e){Object(f.includes)(Ct,e)&&n({closedAfterDateTime:e===Ct.CLOSED_AFTER?new Date((new Date).getTime()+864e5).toISOString():null,pollStatus:e})}}),Ct.CLOSED_AFTER===t.pollStatus&&Object(o.createElement)(E.TimePicker,{currentTime:t.closedAfterDateTime,label:Object(a.__)("Close vote block on","crowdsignal-forms"),onChange:function(e){var t=new Date(e);n({closedAfterDateTime:t.toISOString()})},is12Hour:!0})))},xt=function(){return Object(o.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.1894 5.75L13.6668 5.75L13.6668 4.25H19.0002H19.7502L19.7502 5V10.3333H18.2502V6.81054L6.81072 18.25L10.3333 18.25V19.75L5 19.75H4.25V19V13.6666L5.75 13.6666L5.75 17.1894L17.1894 5.75Z"}))},St=function(){return Object(o.createElement)("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)("line",{x1:"8",y1:"8.5",x2:"24",y2:"8.5",stroke:"currentColor"}),Object(o.createElement)("line",{x1:"8",y1:"15",x2:"24",y2:"15",stroke:"currentColor",strokeWidth:"2"}),Object(o.createElement)("line",{x1:"8",y1:"22.5",x2:"24",y2:"22.5",stroke:"currentColor",strokeWidth:"3"}))},kt=function(){return Object(o.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)("path",{d:"M12.0078 18.2266C14.7656 18.2266 16.4062 15.9531 16.4062 12.3438C16.4062 8.73438 14.75 6.5 12.0078 6.5C9.25781 6.5 7.59375 8.75 7.59375 12.3516C7.59375 15.9688 9.24219 18.2266 12.0078 18.2266ZM12.0078 16.5781C10.5078 16.5781 9.625 15 9.625 12.3438C9.625 9.73438 10.5234 8.14844 12.0078 8.14844C13.4844 8.14844 14.3672 9.71875 14.3672 12.3516C14.3672 15.0078 13.5 16.5781 12.0078 16.5781Z"}))};function Tt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Nt=function(e){var t=e.attributes,n=e.setAttributes,r=Object(f.get)(t,"size","medium"),l=vt,s=Object(_.useState)(!1),c=j()(s,2),i=c[0],d=c[1],b=function(){return d(!i)},m=t.hideResults?Object(a.__)("Show vote counters","crowdsignal-forms"):Object(a.__)("Hide vote counters","crowdsignal-forms");return Object(o.createElement)(v.BlockControls,null,Object(o.createElement)(E.ToolbarGroup,{isCollapsed:!0,icon:xt,label:Object(a.__)("Change block size","crowdsignal-forms"),popoverProps:Et,controls:l.map((function(e){var t=e.size;return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Tt(Object(n),!0).forEach((function(t){u()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e,{isActive:r===t,role:"menuitemradio",onClick:function(){return n({size:t})}})}))}),Object(o.createElement)(E.Toolbar,{controls:[{icon:St,onClick:b},{icon:kt,label:m,onClick:function(){return n({hideResults:!t.hideResults})},isActive:!t.hideResults,isPressed:!t.hideResults}]}),i&&Object(o.createElement)(E.Popover,{className:"crowdsignal-forms__border-popover",onFocusOutside:b},Object(o.createElement)("div",{className:"crowdsignal-forms__row"},Object(o.createElement)(E.TextControl,{label:Object(a.__)("Border thickness","crowdsignal-forms"),type:"number",className:"crowdsignal-forms__small-text-input",onChange:function(e){n({borderWidth:parseInt(e,10)||0})},value:t.borderWidth||0}),Object(o.createElement)(E.TextControl,{label:Object(a.__)("Corner radius","crowdsignal-forms"),type:"number",className:"crowdsignal-forms__small-text-input",onChange:function(e){n({borderRadius:parseInt(e,10)||0})},value:t.borderRadius||0}))))},Lt=function(e){return function(t){return function(n){var r=n.attributes,a=n.setAttributes;return Object(_.useEffect)((function(){Object(f.forEach)(e,(function(e){r[e]||a(u()({},e,ot()))}))}),[]),Object(o.createElement)(t,n)}}},Pt=function(e,t,n,r){return Object(_.useEffect)((function(){Object(f.isEmpty)(window.csBlockTypeCount)&&(window.csBlockTypeCount={}),Object(f.isNil)(window.csBlockTypeCount[e])&&(window.csBlockTypeCount[e]=0),window.csBlockTypeCount[e]++,null===n.title&&(1===window.csBlockTypeCount[e]?r({title:t}):r({title:"".concat(t," ").concat(window.csBlockTypeCount[e])}))}),[])},Rt=Object(x.compose)([bt,Lt(["pollId"])])((function(e){var t=e.attributes,n=e.setAttributes,r=e.className,l=e.pollDataFromApi;Pt(e.name,Object(a.__)("Untitled Vote","crowdsignal-forms"),t,n);var s=l?l.viewResultsUrl:"",c=We(t.pollStatus,t.closedAfterDateTime),i=k()(r,"crowdsignal-forms-vote","size-".concat(t.size),{"no-results":t.hideResults,"is-closed":c}),u=function(e){return Object(f.mapKeys)({borderRadius:"".concat(e.borderRadius,"px"),borderWidth:"".concat(e.borderWidth,"px")},(function(e,t){return"--crowdsignal-forms-vote-".concat(Object(f.kebabCase)(t))}))}(t),d=we(),b=Object(f.get)(d,["signalCount","shouldDisplay"]),m=b&&Object(f.get)(d,["signalCount","count"])>=Object(f.get)(d,["signalCount","userLimit"]);return Object(o.createElement)(lt,{blockIcon:null,blockName:Object(a.__)("Crowdsignal Vote","crowdsignal-forms")},Object(o.createElement)(yt,w()({},e,{shouldPromote:b,signalWarning:m,viewResultsUrl:s})),Object(o.createElement)(Nt,e),Object(o.createElement)("div",{className:i,style:u},Object(o.createElement)("div",{className:"crowdsignal-forms-vote__items"},Object(o.createElement)(v.InnerBlocks,{template:[["crowdsignal-forms/vote-item",{type:"up"}],["crowdsignal-forms/vote-item",{type:"down"}]],templateInsertUpdatesSelection:!1,templateLock:"insert",allowedBlocks:["crowdsignal-forms/vote-item"],orientation:"horizontal",__experimentalMoverDirection:"horizontal"}))))})),It={pollId:{type:"string",default:null},hideBranding:{type:"boolean",default:!1},title:{type:"string",default:null},pollStatus:{type:"string",default:Ct.OPEN},closedAfterDateTime:{type:"string",default:null},size:{type:"string",default:"medium"},borderWidth:{type:"number",default:1},borderRadius:{type:"number",default:5},hideResults:{type:"boolean",default:!1}},At={title:Object(a.__)("Vote","crowdsignal-forms"),description:Object(a.__)("Allow your audience to rate your work or express their opinion — powered by Crowdsignal.","crowdsignal-forms"),category:"crowdsignal-forms",keywords:[Object(a.__)("ballot","crowdsignal-forms"),Object(a.__)("button","crowdsignal-forms"),Object(a.__)("count","crowdsignal-forms"),"crowdsignal",Object(a.__)("deciding","crowdsignal-forms"),Object(a.__)("decision","crowdsignal-forms"),Object(a.__)("elect","crowdsignal-forms"),Object(a.__)("election","crowdsignal-forms"),Object(a.__)("feedback","crowdsignal-forms"),Object(a.__)("form","crowdsignal-forms"),Object(a.__)("like","crowdsignal-forms"),Object(a.__)("nero","crowdsignal-forms"),Object(a.__)("opinion","crowdsignal-forms"),Object(a.__)("poll","crowdsignal-forms"),Object(a.__)("polling","crowdsignal-forms"),Object(a.__)("rate","crowdsignal-forms"),Object(a.__)("rating","crowdsignal-forms"),Object(a.__)("research","crowdsignal-forms"),Object(a.__)("survey","crowdsignal-forms"),Object(a.__)("thumb down","crowdsignal-forms"),Object(a.__)("thumb up","crowdsignal-forms"),Object(a.__)("thumbs","crowdsignal-forms"),Object(a.__)("vote","crowdsignal-forms"),Object(a.__)("voting","crowdsignal-forms")],icon:Object(o.createElement)(_t,null),edit:Rt,save:function(){return Object(o.createElement)(v.InnerBlocks.Content,null)},attributes:It,example:{attributes:{className:"crowdsignal-forms-vote__example",size:"large"}}},Dt=function(e){var t=e.attributes,n=e.setAttributes;return Object(o.createElement)(v.InspectorControls,null,Object(o.createElement)(v.PanelColorSettings,{title:Object(a.__)("Styling","crowdsignal-forms"),initialOpen:!0,colorSettings:[{value:t.textColor,onChange:function(e){return n({textColor:e})},label:Object(a.__)("Text color","crowdsignal-forms")},{value:t.backgroundColor,onChange:function(e){return n({backgroundColor:e})},label:Object(a.__)("Background color","crowdsignal-forms")},{value:t.borderColor,onChange:function(e){return n({borderColor:e})},label:Object(a.__)("Border color","crowdsignal-forms")}]}))};function Bt(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function Ft(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}var Mt=n(22),Vt=n.n(Mt),Ht=!1,Ut=C.a.createContext(null),Wt="entering",zt="entered",Zt=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var o,a=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?a?(o="exited",r.appearStatus=Wt):o=zt:o=t.unmountOnExit||t.mountOnEnter?"unmounted":"exited",r.state={status:o},r.nextCallback=null,r}Bt(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&"unmounted"===t.status?{status:"exited"}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==Wt&&n!==zt&&(t=Wt):n!==Wt&&n!==zt||(t="exiting")}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){void 0===e&&(e=!1),null!==t?(this.cancelNextCallback(),t===Wt?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&"exited"===this.state.status&&this.setState({status:"unmounted"})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,o=this.props.nodeRef?[r]:[Vt.a.findDOMNode(this),r],a=o[0],l=o[1],s=this.getTimeouts(),c=r?s.appear:s.enter;!e&&!n||Ht?this.safeSetState({status:zt},(function(){t.props.onEntered(a)})):(this.props.onEnter(a,l),this.safeSetState({status:Wt},(function(){t.props.onEntering(a,l),t.onTransitionEnd(c,(function(){t.safeSetState({status:zt},(function(){t.props.onEntered(a,l)}))}))})))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:Vt.a.findDOMNode(this);t&&!Ht?(this.props.onExit(r),this.safeSetState({status:"exiting"},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:"exited"},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:"exited"},(function(){e.props.onExited(r)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:Vt.a.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var o=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],a=o[0],l=o[1];this.props.addEndListener(a,l)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if("unmounted"===e)return null;var t=this.props,n=t.children,r=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,Ft(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return C.a.createElement(Ut.Provider,{value:null},"function"==typeof n?n(e,r):C.a.cloneElement(C.a.Children.only(n),r))},t}(C.a.Component);function qt(){}Zt.contextType=Ut,Zt.propTypes={},Zt.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:qt,onEntering:qt,onEntered:qt,onExit:qt,onExiting:qt,onExited:qt},Zt.UNMOUNTED="unmounted",Zt.EXITED="exited",Zt.ENTERING=Wt,Zt.ENTERED=zt,Zt.EXITING="exiting";var Gt,Kt,Yt=Zt;var Qt="out-in",Jt="in-out",Xt=function(e,t,n){return function(){var r;e.props[t]&&(r=e.props)[t].apply(r,arguments),n()}},$t=((Gt={})[Qt]=function(e){var t=e.current,n=e.changeState;return C.a.cloneElement(t,{in:!1,onExited:Xt(t,"onExited",(function(){n(Wt,null)}))})},Gt[Jt]=function(e){var t=e.current,n=e.changeState,r=e.children;return[t,C.a.cloneElement(r,{in:!0,onEntered:Xt(r,"onEntered",(function(){n(Wt)}))})]},Gt),en=((Kt={})[Qt]=function(e){var t=e.children,n=e.changeState;return C.a.cloneElement(t,{in:!0,onEntered:Xt(t,"onEntered",(function(){n(zt,C.a.cloneElement(t,{in:!0}))}))})},Kt[Jt]=function(e){var t=e.current,n=e.children,r=e.changeState;return[C.a.cloneElement(t,{in:!1,onExited:Xt(t,"onExited",(function(){r(zt,C.a.cloneElement(n,{in:!0}))}))}),C.a.cloneElement(n,{in:!0})]},Kt),tn=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).state={status:zt,current:null},t.appeared=!1,t.changeState=function(e,n){void 0===n&&(n=t.state.current),t.setState({status:e,current:n})},t}Bt(t,e);var n=t.prototype;return n.componentDidMount=function(){this.appeared=!0},t.getDerivedStateFromProps=function(e,t){return null==e.children?{current:null}:t.status===Wt&&e.mode===Jt?{status:Wt}:!t.current||(n=t.current,r=e.children,n===r||C.a.isValidElement(n)&&C.a.isValidElement(r)&&null!=n.key&&n.key===r.key)?{current:C.a.cloneElement(e.children,{in:!0})}:{status:"exiting"};var n,r},n.render=function(){var e,t=this.props,n=t.children,r=t.mode,o=this.state,a=o.status,l=o.current,s={children:n,current:l,changeState:this.changeState,status:a};switch(a){case Wt:e=en[r](s);break;case"exiting":e=$t[r](s);break;case zt:e=l}return C.a.createElement(Ut.Provider,{value:{isMounting:!this.appeared}},e)},t}(C.a.Component);tn.propTypes={},tn.defaultProps={mode:Qt};var nn=tn;function rn(){return(rn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function on(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}var an=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return r=t,void((n=e).classList?n.classList.remove(r):"string"==typeof n.className?n.className=on(n.className,r):n.setAttribute("class",on(n.className&&n.className.baseVal||"",r)));var n,r}))},ln=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var r=t.resolveArguments(e,n),o=r[0],a=r[1];t.removeClasses(o,"exit"),t.addClass(o,a?"appear":"enter","base"),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.resolveArguments(e,n),o=r[0],a=r[1]?"appear":"enter";t.addClass(o,a,"active"),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.resolveArguments(e,n),o=r[0],a=r[1]?"appear":"enter";t.removeClasses(o,a),t.addClass(o,a,"done"),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"appear"),t.removeClasses(n,"enter"),t.addClass(n,"exit","base"),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.resolveArguments(e)[0];t.addClass(n,"exit","active"),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"exit"),t.addClass(n,"exit","done"),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,n){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,n]},t.getClassNames=function(e){var n=t.props.classNames,r="string"==typeof n,o=r?""+(r&&n?n+"-":"")+e:n[e];return{baseClassName:o,activeClassName:r?o+"-active":n[e+"Active"],doneClassName:r?o+"-done":n[e+"Done"]}},t}Bt(t,e);var n=t.prototype;return n.addClass=function(e,t,n){var r=this.getClassNames(t)[n+"ClassName"],o=this.getClassNames("enter").doneClassName;"appear"===t&&"done"===n&&o&&(r+=" "+o),"active"===n&&e&&e.scrollTop,r&&(this.appliedClasses[t][n]=r,function(e,t){e&&t&&t.split(" ").forEach((function(t){return r=t,void((n=e).classList?n.classList.add(r):function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}(n,r)||("string"==typeof n.className?n.className=n.className+" "+r:n.setAttribute("class",(n.className&&n.className.baseVal||"")+" "+r)));var n,r}))}(e,r))},n.removeClasses=function(e,t){var n=this.appliedClasses[t],r=n.base,o=n.active,a=n.done;this.appliedClasses[t]={},r&&an(e,r),o&&an(e,o),a&&an(e,a)},n.render=function(){var e=this.props,t=(e.classNames,Ft(e,["classNames"]));return C.a.createElement(Yt,rn({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(C.a.Component);ln.defaultProps={classNames:""},ln.propTypes={};var sn=ln,cn=function(e){var t=e.className,n=e.fillColor,r=void 0===n?"black":n;return Object(o.createElement)("svg",{className:t,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)("g",{clipPath:"url(#clipThumbsUp)"},Object(o.createElement)("mask",{id:"maskThumbsUp","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:"2",y:"-1",width:"20",height:"20"},Object(o.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19.35 6.24998H13.5658L14.4366 2.06081L14.4641 1.76748C14.4641 1.39165 14.3083 1.04331 14.0608 0.795813L13.0891 -0.166687L7.05748 5.87415C6.71831 6.20415 6.51664 6.66248 6.51664 7.16665L2.84998 7.16665V16.425H6.51664V16.3333C6.51664 17.3416 7.34164 18.1666 8.34998 18.1666H16.6C17.3608 18.1666 18.0116 17.7083 18.2866 17.0483L21.055 10.5858C21.1375 10.375 21.1833 10.155 21.1833 9.91665V8.08331C21.1833 7.07498 20.3583 6.24998 19.35 6.24998ZM19.35 9.91665L16.6 16.3333H8.34998V7.16665L12.3283 3.18831L11.3108 8.08331H19.35V9.91665Z",fill:"white"})),Object(o.createElement)("g",{mask:"url(#maskThumbsUp)"},Object(o.createElement)("rect",{x:"0.999878",y:"-3.05176e-05",width:"22",height:"22",fill:r}))),Object(o.createElement)("defs",null,Object(o.createElement)("clipPath",{id:"clipThumbsUp"},Object(o.createElement)("rect",{width:"24",height:"24",fill:"white"}))))},un=function(e){var t=e.className,n=e.fillColor,r=void 0===n?"black":n;return Object(o.createElement)("svg",{className:t,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)("g",{clipPath:"url(#clipThumbsDown)"},Object(o.createElement)("mask",{id:"maskThumbsDown","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:"2",y:"5",width:"20",height:"20"},Object(o.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.65002 17.75H10.4342L9.56336 21.9392L9.53586 22.2325C9.53586 22.6083 9.69169 22.9567 9.93919 23.2042L10.9109 24.1667L16.9425 18.1258C17.2817 17.7958 17.4834 17.3375 17.4834 16.8333L21.15 16.8333L21.15 7.57499H17.4834V7.66666C17.4834 6.65832 16.6584 5.83332 15.65 5.83332H7.40003C6.63919 5.83332 5.98836 6.29165 5.71336 6.95166L2.94503 13.4142C2.86253 13.625 2.81669 13.845 2.81669 14.0833V15.9167C2.81669 16.925 3.64169 17.75 4.65002 17.75ZM4.65002 14.0833L7.40002 7.66666H15.65L15.65 16.8333L11.6717 20.8117L12.6892 15.9167H4.65002V14.0833Z",fill:"white"})),Object(o.createElement)("g",{mask:"url(#maskThumbsDown)"},Object(o.createElement)("rect",{x:"23.0001",y:"24",width:"22",height:"22",transform:"rotate(-180 23.0001 24)",fill:r}))),Object(o.createElement)("defs",null,Object(o.createElement)("clipPath",{id:"clipThumbsDown"},Object(o.createElement)("rect",{width:"24",height:"24",fill:"white"}))))},dn=function(e){return e?e>=1e7?"".concat(Object(f.round)(e/1e6),"M"):e>=1e6?"".concat((e/1e6).toFixed(1),"M"):e>=1e4?"".concat(Object(f.round)(e/1e3),"K"):e>=1e3?"".concat((e/1e3).toFixed(1),"K"):e.toString():"0"},fn=function(e){var t=e.attributes,n=e.voteCount,r=e.apiAnswerId,a=e.onVote,l=e.disabled,s=e.isVotedOn,c=e.hideCount,i=e.fallbackStyles,u=e.isInEditor,d=t.className,b=t.type,m=Object(_.useState)(0),p=j()(m,2),g=p[0],O=p[1],w=function(){!l&&a&&(O(1),a(r))},h="up"===b?cn:un,C="is-type-".concat(b),v=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return k()({"has-bg-color":e.backgroundColor,"has-text-color":e.textColor,"has-border-color":e.borderColor},n)}(t,"crowdsignal-forms-vote-item",d,{"is-voted-on":s,"is-disabled":l,"is-in-editor":u},C),E=function(e,t){var n=Object(f.isEmpty)(e.textColor)?t.textColor:e.textColor,r=Object(f.isEmpty)(e.backgroundColor)?t.backgroundColor:e.backgroundColor;return Object(f.mapKeys)({borderColor:e.borderColor,bgColor:r,textColor:n,votedColor:t.accentColor},(function(e,t){return"--crowdsignal-forms-vote-".concat(Object(f.kebabCase)(t))}))}(t,i),y=n+g;return Object(o.createElement)("div",{className:v,onClick:w,onKeyPress:w,role:"button",style:E,tabIndex:0},Object(o.createElement)(h,{className:"crowdsignal-forms-vote-item__icon",fillColor:"currentColor"}),!c&&Object(o.createElement)(nn,{mode:"in-out"},Object(o.createElement)(sn,{key:g,classNames:"crowdsignal-forms-vote-item__count",timeout:300},Object(o.createElement)("div",{className:"crowdsignal-forms-vote-item__count"},dn(y)))))};fn.propTypes={apiAnswerId:L.a.number,className:L.a.string,disabled:L.a.bool,isVotedOn:L.a.bool,onVote:L.a.func,type:L.a.string.isRequired,voteCount:L.a.number.isRequired};var bn=fn,mn=Object(x.compose)([Re,Lt(["answerId"])])((function(e){var t=e.attributes,n=e.className,r=e.fallbackStyles,a=e.renderStyleProbe;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(Dt,e),Object(o.createElement)(bn,{attributes:t,fallbackStyles:r,className:n,voteCount:0,isInEditor:!0,type:t.type}),a())})),pn={title:Object(a.__)("Vote Item","crowdsignal-forms"),description:Object(a.__)("Allow your audience to rate your work or express their opinion — powered by Crowdsignal.","crowdsignal-forms"),category:"crowdsignal-forms",parent:["crowdsignal-forms/vote"],icon:Object(o.createElement)(_t,null),edit:mn,attributes:{answerId:{type:"string",default:null},type:{type:"string"},textColor:{type:"string"},backgroundColor:{type:"string"},borderColor:{type:"string"}}},gn=function(e){var t=e.showBranding,n=e.referralCode;return Object(o.createElement)("div",{className:"crowdsignal-forms__branding"},t&&Object(o.createElement)("a",{className:"crowdsignal-forms__branding-link with-external-icon",href:"https://crowdsignal.com?ref=".concat(n),target:"blank",rel:"noopener noreferrer"},Object(a.__)("Powered by Crowdsignal","crowdsignal-forms")),!t&&Object(o.createElement)("span",{className:"crowdsignal-forms__branding-link"}," "))};gn.propTypes={showBranding:L.a.bool,referralCode:L.a.string.isRequired};var On=gn,wn=function(e){var t=e.active,n=e.className,r=k()("crowdsignal-forms-applause__animation",n,{"is-active":t});return Object(o.createElement)("svg",{className:r,width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)("g",{className:"crowdsignal-forms-applause__animation-right"},Object(o.createElement)("path",{className:"crowdsignal-forms-applause__animation-inner-fill",fillRule:"evenodd",clipRule:"evenodd",d:"M24.5287 18.5813L21.719 22.432C20.771 23.7312 18.9509 24.0157 17.6517 23.0676L9.50948 17.1265C8.6982 16.5345 8.52021 15.3957 9.11218 14.5844C9.18511 14.4845 9.26979 14.3931 9.35606 14.3119L9.19145 14.1918C8.38017 13.5998 8.20218 12.461 8.79415 11.6497C8.93571 11.4557 9.10825 11.2933 9.30319 11.1743C9.10822 10.6266 9.17716 10.0013 9.54606 9.49567C10.1123 8.71967 11.1811 8.52659 11.9839 9.03133C12.0392 8.91852 12.1004 8.81 12.1733 8.71006C12.7653 7.89878 13.9042 7.72079 14.7154 8.31276L20.3297 12.4094L20.611 10.4435C20.6949 9.84704 21.1499 9.35925 21.7392 9.23069L23.703 8.79878L25.0454 16.3547C25.1822 17.1302 24.992 17.9464 24.5287 18.5813Z"}),Object(o.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M24.5287 18.5813L21.719 22.432C20.771 23.7312 18.9509 24.0157 17.6517 23.0676L9.50948 17.1265C8.6982 16.5345 8.52021 15.3957 9.11218 14.5844C9.18511 14.4845 9.26979 14.3931 9.35606 14.3119L9.19145 14.1918C8.38017 13.5998 8.20218 12.461 8.79415 11.6497C8.93571 11.4557 9.10825 11.2933 9.30319 11.1743C9.10822 10.6266 9.17716 10.0013 9.54606 9.49567C10.1123 8.71967 11.1811 8.52659 11.9839 9.03133C12.0392 8.91852 12.1004 8.81 12.1733 8.71006C12.7653 7.89878 13.9042 7.72079 14.7154 8.31276L20.3297 12.4094L20.611 10.4435C20.6949 9.84704 21.1499 9.35925 21.7392 9.23069L23.703 8.79878L25.0454 16.3547C25.1822 17.1302 24.992 17.9464 24.5287 18.5813ZM23.6104 16.605L22.538 10.5434L22.0547 10.6502L21.4234 15.0093L13.8574 9.48855C13.8574 9.48855 13.4691 9.4034 13.349 9.56801C13.2288 9.73262 13.2638 9.95632 13.4284 10.0764L17.667 13.1693L16.8091 14.345L11.2301 10.2742C11.0655 10.1541 10.8418 10.189 10.7217 10.3536C10.6016 10.5182 10.6365 10.7419 10.8012 10.862L16.3802 14.9329L15.5222 16.1087L10.4782 12.4282C10.3136 12.3081 10.0899 12.343 9.96978 12.5076C9.84967 12.6722 9.88463 12.8959 10.0492 13.0161L15.0933 16.6966L14.2353 17.8723L10.7962 15.3629C10.6316 15.2428 10.4079 15.2777 10.2878 15.4423C10.1677 15.607 10.2027 15.8307 10.3673 15.9508L18.5094 21.8919C19.1561 22.3638 20.0713 22.2207 20.5431 21.5741L23.3571 17.7175C23.5888 17.4001 23.6766 16.9957 23.6104 16.605Z"})),Object(o.createElement)("g",{className:"crowdsignal-forms-applause__animation-left"},Object(o.createElement)("path",{className:"crowdsignal-forms-applause__animation-inner-fill",fillRule:"evenodd",clipRule:"evenodd",d:"M21.2292 18.7813L18.4195 22.632C17.4715 23.9312 15.6513 24.2157 14.3521 23.2676L6.20992 17.3265C5.39864 16.7345 5.22065 15.5957 5.81262 14.7844C5.88554 14.6845 5.97023 14.5931 6.0565 14.5119L5.89189 14.3918C5.08061 13.7998 4.90262 12.661 5.49459 11.8497C5.63615 11.6557 5.80869 11.4933 6.00363 11.3743C5.80866 10.8266 5.8776 10.2013 6.2465 9.69567C6.81274 8.91967 7.88153 8.72658 8.68439 9.23133C8.73968 9.11852 8.80084 9.01 8.87377 8.91006C9.46573 8.09878 10.6046 7.92079 11.4159 8.51276L17.0302 12.6094L17.3115 10.6435C17.3953 10.047 17.8504 9.55925 18.4397 9.43069L20.4034 8.99877L21.7458 16.5547C21.8826 17.3302 21.6925 18.1464 21.2292 18.7813Z"}),Object(o.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21.2292 18.7813L18.4195 22.632C17.4715 23.9312 15.6513 24.2157 14.3521 23.2676L6.20992 17.3265C5.39864 16.7345 5.22065 15.5957 5.81262 14.7844C5.88554 14.6845 5.97023 14.5931 6.0565 14.5119L5.89189 14.3918C5.08061 13.7998 4.90262 12.661 5.49459 11.8497C5.63615 11.6557 5.80869 11.4933 6.00363 11.3743C5.80866 10.8266 5.8776 10.2013 6.2465 9.69567C6.81274 8.91967 7.88153 8.72658 8.68439 9.23133C8.73968 9.11852 8.80084 9.01 8.87377 8.91006C9.46573 8.09878 10.6046 7.92079 11.4159 8.51276L17.0302 12.6094L17.3115 10.6435C17.3953 10.047 17.8504 9.55925 18.4397 9.43069L20.4034 8.99877L21.7458 16.5547C21.8826 17.3302 21.6925 18.1464 21.2292 18.7813ZM20.3108 16.805L19.2384 10.7434L18.7551 10.8502L18.1239 15.2093L10.5578 9.68854C10.5578 9.68854 10.1695 9.6034 10.0494 9.76801C9.92928 9.93261 9.96425 10.1563 10.1289 10.2764L14.3675 13.3692L13.5096 14.545L7.93056 10.4742C7.76595 10.354 7.54224 10.389 7.42213 10.5536C7.30202 10.7182 7.33699 10.9419 7.50159 11.062L13.0806 15.1329L12.2227 16.3087L7.17864 12.6282C7.01403 12.5081 6.79033 12.543 6.67022 12.7076C6.55011 12.8722 6.58507 13.0959 6.74968 13.216L11.7937 16.8965L10.9358 18.0723L7.49667 15.5629C7.33206 15.4428 7.10836 15.4777 6.98825 15.6423C6.86814 15.8069 6.9031 16.0307 7.06771 16.1508L15.2099 22.0919C15.8566 22.5638 16.7717 22.4207 17.2436 21.7741L20.0576 17.9175C20.2892 17.6001 20.3771 17.1957 20.3108 16.805Z"})),Object(o.createElement)("g",{className:"crowdsignal-forms-applause__animation-wave-small"},Object(o.createElement)("rect",{x:"15.4854",y:"4.42176",width:"1.5",height:"3",transform:"rotate(8 15.4854 4.42176)"}),Object(o.createElement)("rect",{x:"19.9369",y:"5.15548",width:"1.5",height:"3",transform:"rotate(43 19.9369 5.15548)"}),Object(o.createElement)("rect",{x:"11.1523",y:"4.78963",width:"1.5",height:"3",transform:"rotate(-27 11.1523 4.78963)"})),Object(o.createElement)("g",{className:"crowdsignal-forms-applause__animation-wave-large"},Object(o.createElement)("rect",{x:"23.453",y:"2.41095",width:"1.5",height:"3",transform:"rotate(38 23.453 2.41095)"}),Object(o.createElement)("rect",{x:"26.9413",y:"5.27211",width:"1.5",height:"3",transform:"rotate(73 26.9413 5.27211)"}),Object(o.createElement)("rect",{x:"19.5165",y:"0.562988",width:"1.5",height:"3",transform:"rotate(3 19.5165 0.562988)"}),Object(o.createElement)("rect",{width:"1.5",height:"3",transform:"matrix(-0.788011 0.615662 0.615662 0.788011 8.52597 2.41095)"}),Object(o.createElement)("rect",{width:"1.5",height:"3",transform:"matrix(-0.292372 0.956305 0.956305 0.292372 5.03775 5.27211)"}),Object(o.createElement)("rect",{width:"1.5",height:"3",transform:"matrix(-0.99863 0.052336 0.052336 0.99863 12.4625 0.562988)"})))},hn=function(e){var t=e.attributes,n=e.fallbackStyles,r=e.renderStyleProbe,a=t.apiPollData?t.apiPollData.id:null,l=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r="cs-poll-".concat(e),o=Object(_.useState)(!1),a=j()(o,2),l=a[0],s=a[1],c=Object(_.useState)(!1),i=j()(c,2),u=i[0],d=i[1],f=Object(_.useState)(""),b=j()(f,2),m=b[0],p=b[1];Object(_.useEffect)((function(){t&&void 0!==B.a.get(r)&&(d(!0),p(B.a.get(r)))}),[]);var g=function(){var o=A()(R.a.mark((function o(a){var l,c,i,u=arguments;return R.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return l=u.length>1&&void 0!==u[1]?u[1]:1,o.prev=1,s(!0),o.next=5,ee(e);case 5:return c=o.sent,o.next=8,te(c,e,a,l);case 8:d(!0),t&&(i=n?a.join(","):(new Date).getTime(),B.a.set(r,i,{sameSite:"Strict",expires:365}),p(i));case 10:return o.prev=10,s(!1),o.finish(10);case 13:case"end":return o.stop()}}),o,null,[[1,,10,13]])})));return function(e){return o.apply(this,arguments)}}();return{hasVoted:u,isVoting:l,vote:g,storedCookieValue:m}}(a,!0),s=l.hasVoted,c=l.vote,i=Object(_.useState)(0),u=j()(i,2),d=u[0],b=u[1],m=Object(_.useState)(0),p=j()(m,2),g=p[0],O=p[1],w=Object(_.useState)(null),h=j()(w,2),C=h[0],v=h[1],E=Object(_.useState)(!1),y=j()(E,2),x=y[0],S=y[1],T=Object(_.useState)(null),N=j()(T,2),L=N[0],P=N[1],I=ge(a).results,D=We(t.pollStatus,t.closedAfterDateTime),F=function(){if(null!==a&&!D){L&&clearTimeout(L),S(!0),P(setTimeout((function(){S(!1)}),200));var e=g+1;O(e),b(d+1);var n=t.apiPollData.answers[0].id;null!==C&&clearTimeout(C);var r=setTimeout((function(){c([n],e),v(null),O(0)}),1e3);v(r)}},M=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return k()({"has-bg-color":e.backgroundColor,"has-text-color":e.textColor,"has-border-color":e.borderColor},n)}(t,"crowdsignal-forms-applause",t.className,"size-".concat(t.size),{"is-closed":D}),V=function(e,t){var n=Object(f.isEmpty)(e.textColor)?t.textColor:e.textColor;return Object(f.mapKeys)({bgColor:e.backgroundColor||t.backgroundColor,textColor:n,hoverColor:t.accentColor,borderRadius:"".concat(e.borderRadius||0,"px"),borderWidth:"".concat(e.borderWidth||0,"px"),borderColor:e.borderColor},(function(e,t){return"--crowdsignal-forms-applause-".concat(Object(f.kebabCase)(t))}))}(t,n),H=(null!==I?Object(f.values)(I)[0]:0)+d;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)("div",{className:M,style:V,onClick:F,onKeyPress:F,role:"button",tabIndex:0},Object(o.createElement)(wn,{active:x}),Object(o.createElement)("p",{className:"crowdsignal-forms-applause__count"},dn(H)," Claps"),r()),Object(o.createElement)(On,{showBranding:s&&!t.hideBranding,referralCode:"cs-forms-applause"}))};hn.propTypes={className:L.a.string};var jn=Re(hn),_n=Object.freeze({OPEN:"open",CLOSED:"closed",CLOSED_AFTER:"closed-after"}),Cn=[{title:Object(a.__)("Small","crowdsignal-forms"),size:"small"},{title:Object(a.__)("Medium","crowdsignal-forms"),size:"medium"},{title:Object(a.__)("Large","crowdsignal-forms"),size:"large"}],vn={position:"bottom right",isAlternate:!0,className:"crowdsignal-forms-vote__size-dropdown"};function En(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var yn=function(e){var t=e.attributes,n=e.setAttributes,r=Object(f.get)(t,"size","medium"),l=Cn,s=Object(_.useState)(!1),c=j()(s,2),i=c[0],d=c[1],b=function(){return d(!i)};return Object(o.createElement)(v.BlockControls,null,Object(o.createElement)(E.ToolbarGroup,{isCollapsed:!0,icon:xt,label:Object(a.__)("Change block size","crowdsignal-forms"),popoverProps:vn,controls:l.map((function(e){var t=e.size;return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?En(Object(n),!0).forEach((function(t){u()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):En(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e,{isActive:r===t,role:"menuitemradio",onClick:function(){return n({size:t})}})}))}),Object(o.createElement)(E.Toolbar,{controls:[{icon:St,onClick:b}]}),i&&Object(o.createElement)(E.Popover,{className:"crowdsignal-forms__border-popover",onFocusOutside:b},Object(o.createElement)("div",{className:"crowdsignal-forms__row"},Object(o.createElement)(E.TextControl,{label:Object(a.__)("Border thickness","crowdsignal-forms"),type:"number",className:"crowdsignal-forms__small-text-input",onChange:function(e){n({borderWidth:parseInt(e,10)||0})},value:t.borderWidth}),Object(o.createElement)(E.TextControl,{label:Object(a.__)("Corner radius","crowdsignal-forms"),type:"number",className:"crowdsignal-forms__small-text-input",onChange:function(e){n({borderRadius:parseInt(e,10)||0})},value:t.borderRadius}))))},xn=function(e){var t=e.attributes,n=e.setAttributes,r=e.viewResultsUrl,l=e.shouldPromote,s=e.signalWarning,c=""!==r;return Object(o.createElement)(v.InspectorControls,null,Object(o.createElement)(E.PanelBody,{title:Object(a.__)("Results","crowdsignal-forms"),initialOpen:!0},Object(o.createElement)("p",null,c?Object(a.__)("Manage results on ","crowdsignal-forms"):Object(a.__)("Publish this post to enable results on ","crowdsignal-forms"),Object(o.createElement)(E.ExternalLink,{href:c?r:"https://www.crowdsignal.com"},"crowdsignal.com")),Object(o.createElement)("p",null,Object(o.createElement)(E.Button,{href:r,isSecondary:!0,target:"_blank",disabled:!c},Object(a.__)("View results","crowdsignal-forms"))),Object(o.createElement)(E.TextControl,{value:t.title,label:Object(a.__)("Title of the applause block","crowdsignal-forms"),onChange:function(e){return n({title:e})}}),l&&Object(o.createElement)(qe,{signalWarning:s})),Object(o.createElement)(E.PanelBody,{title:Object(a.__)("Status","crowdsignal-forms")},Object(o.createElement)(E.SelectControl,{value:t.pollStatus,label:Object(a.__)("Currently","crowdsignal-forms"),options:[{label:Object(a.__)("Open","crowdsignal-forms"),value:_n.OPEN},{label:Object(a.__)("Closed after","crowdsignal-forms"),value:_n.CLOSED_AFTER},{label:Object(a.__)("Closed","crowdsignal-forms"),value:_n.CLOSED}],onChange:function(e){Object(f.includes)(_n,e)&&n({closedAfterDateTime:e===_n.CLOSED_AFTER?new Date((new Date).getTime()+864e5).toISOString():null,pollStatus:e})}}),_n.CLOSED_AFTER===t.pollStatus&&Object(o.createElement)(E.TimePicker,{currentTime:t.closedAfterDateTime,label:Object(a.__)("Close applause block on","crowdsignal-forms"),onChange:function(e){var t=new Date(e);n({closedAfterDateTime:t.toISOString()})},is12Hour:!0})),Object(o.createElement)(v.PanelColorSettings,{title:Object(a.__)("Styling","crowdsignal-forms"),initialOpen:!0,colorSettings:[{value:t.textColor,onChange:function(e){return n({textColor:e})},label:Object(a.__)("Text color","crowdsignal-forms")},{value:t.backgroundColor,onChange:function(e){return n({backgroundColor:e})},label:Object(a.__)("Background color","crowdsignal-forms")},{value:t.borderColor,onChange:function(e){return n({borderColor:e})},label:Object(a.__)("Border color","crowdsignal-forms")}]}))},Sn=Object(x.compose)([bt,Lt(["pollId","answerId"])])((function(e){var t=e.attributes,n=e.setAttributes,r=e.pollDataFromApi,l=r?r.viewResultsUrl:"";Pt(e.name,Object(a.__)("Untitled Applause","crowdsignal-forms"),t,n);var s=we(),c=Object(f.get)(s,["signalCount","shouldDisplay"]),i=c&&Object(f.get)(s,["signalCount","count"])>=Object(f.get)(s,["signalCount","userLimit"]);return Object(o.createElement)(lt,{blockIcon:null,blockName:Object(a.__)("Crowdsignal Applause","crowdsignal-forms")},Object(o.createElement)(xn,w()({},e,{shouldPromote:c,signalWarning:i,viewResultsUrl:l})),Object(o.createElement)(yn,e),Object(o.createElement)(jn,e))})),kn={pollId:{type:"string",default:null},hideBranding:{type:"boolean",default:!1},title:{type:"string",default:null},answerId:{type:"string",default:null},size:{type:"string",default:"medium"},pollStatus:{type:"string",default:_n.OPEN},closedAfterDateTime:{type:"string",default:null},textColor:{type:"string"},backgroundColor:{type:"string"},borderColor:{type:"string"},borderWidth:{type:"number",default:0},borderRadius:{type:"number",default:0}},Tn={title:Object(a.__)("Applause","crowdsignal-forms"),description:Object(a.__)("Let your audience cheer with a big round of applause — powered by Crowdsignal.","crowdsignal-forms"),category:"crowdsignal-forms",keywords:["crowdsignal",Object(a.__)("applause","crowdsignal-forms"),Object(a.__)("cheer","crowdsignal-forms"),Object(a.__)("cheering","crowdsignal-forms"),Object(a.__)("clap","crowdsignal-forms"),Object(a.__)("feedback","crowdsignal-forms"),Object(a.__)("kudos","crowdsignal-forms"),Object(a.__)("like","crowdsignal-forms"),Object(a.__)("opinion","crowdsignal-forms"),Object(a.__)("praise","crowdsignal-forms"),Object(a.__)("rating","crowdsignal-forms"),Object(a.__)("upvote","crowdsignal-forms"),Object(a.__)("upvoting","crowdsignal-forms"),Object(a.__)("votes","crowdsignal-forms"),Object(a.__)("voting","crowdsignal-forms")],icon:Object(o.createElement)((function(){return Object(o.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)("g",{clipPath:"url(#clip0)"},Object(o.createElement)("rect",{width:"24",height:"24",fill:"white"}),Object(o.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21.5284 16.5813L18.7187 20.432C17.7707 21.7312 15.9506 22.0157 14.6513 21.0676L6.50915 15.1265C5.69788 14.5345 5.51988 13.3957 6.11185 12.5844C6.18478 12.4845 6.26946 12.3931 6.35573 12.3119L6.19112 12.1918C5.37984 11.5998 5.20185 10.461 5.79382 9.64968C5.93538 9.45568 6.10792 9.29329 6.30287 9.17428C6.1079 8.62662 6.17683 8.00125 6.54574 7.49567C7.11197 6.71967 8.18077 6.52659 8.98362 7.03133C9.03891 6.91852 9.10007 6.81 9.173 6.71006C9.76497 5.89878 10.9038 5.72079 11.7151 6.31276L17.3294 10.4094L17.6107 8.44349C17.6946 7.84704 18.1496 7.35925 18.7389 7.23069L20.7027 6.79878L22.045 14.3547C22.1819 15.1302 21.9917 15.9464 21.5284 16.5813ZM20.61 14.605L19.5377 8.54337L19.0543 8.65016L18.4231 13.0093L10.857 7.48855C10.857 7.48855 10.4687 7.4034 10.3486 7.56801C10.2285 7.73262 10.2635 7.95632 10.4281 8.07643L14.6667 11.1693L13.8088 12.345L8.22979 8.27416C8.06518 8.15405 7.84147 8.18902 7.72136 8.35362C7.60126 8.51823 7.63622 8.74194 7.80082 8.86204L13.3798 12.9329L12.5219 14.1087L7.47787 10.4282C7.31327 10.3081 7.08956 10.343 6.96945 10.5076C6.84934 10.6722 6.8843 10.8959 7.04891 11.0161L12.0929 14.6966L11.235 15.8723L7.7959 13.3629C7.6313 13.2428 7.40759 13.2777 7.28748 13.4423C7.16737 13.607 7.20233 13.8307 7.36694 13.9508L15.5091 19.8919C16.1558 20.3638 17.0709 20.2207 17.5428 19.5741L20.3568 15.7175C20.5884 15.4001 20.6763 14.9957 20.61 14.605Z",fill:"black"}),Object(o.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.2289 16.7813L15.4192 20.632C14.4711 21.9312 12.651 22.2157 11.3518 21.2676L3.20959 15.3265C2.39831 14.7345 2.22032 13.5957 2.81229 12.7844C2.88522 12.6845 2.9699 12.5931 3.05617 12.5119L2.89156 12.3918C2.08028 11.7998 1.90229 10.661 2.49426 9.84968C2.63582 9.65567 2.80836 9.49329 3.0033 9.37428C2.80834 8.82662 2.87727 8.20125 3.24618 7.69567C3.81241 6.91967 4.88121 6.72658 5.68406 7.23133C5.73935 7.11852 5.80051 7.01 5.87344 6.91006C6.46541 6.09878 7.60427 5.92079 8.41555 6.51276L14.0298 10.6094L14.3111 8.64348C14.395 8.04703 14.85 7.55925 15.4393 7.43069L17.4031 6.99877L18.7455 14.5547C18.8823 15.3302 18.6921 16.1464 18.2289 16.7813Z",fill:"white"}),Object(o.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.2289 16.7813L15.4192 20.632C14.4711 21.9312 12.651 22.2157 11.3518 21.2676L3.20959 15.3265C2.39831 14.7345 2.22032 13.5957 2.81229 12.7844C2.88522 12.6845 2.9699 12.5931 3.05617 12.5119L2.89156 12.3918C2.08028 11.7998 1.90229 10.661 2.49426 9.84968C2.63582 9.65567 2.80836 9.49329 3.0033 9.37428C2.80834 8.82662 2.87727 8.20125 3.24618 7.69567C3.81241 6.91967 4.88121 6.72658 5.68406 7.23133C5.73935 7.11852 5.80051 7.01 5.87344 6.91006C6.46541 6.09878 7.60427 5.92079 8.41555 6.51276L14.0298 10.6094L14.3111 8.64348C14.395 8.04703 14.85 7.55925 15.4393 7.43069L17.4031 6.99877L18.7455 14.5547C18.8823 15.3302 18.6921 16.1464 18.2289 16.7813ZM17.3105 14.805L16.2381 8.74337L15.7548 8.85016L15.1235 13.2093L7.55749 7.68854C7.55749 7.68854 7.16918 7.6034 7.04907 7.76801C6.92896 7.93261 6.96392 8.15632 7.12853 8.27643L11.3672 11.3692L10.5092 12.545L4.93023 8.47416C4.76562 8.35405 4.54191 8.38901 4.4218 8.55362C4.3017 8.71823 4.33666 8.94193 4.50126 9.06204L10.0803 13.1329L9.22235 14.3087L4.17831 10.6282C4.0137 10.5081 3.79 10.543 3.66989 10.7076C3.54978 10.8722 3.58474 11.0959 3.74935 11.216L8.79338 14.8965L7.93546 16.0723L4.49634 13.5629C4.33173 13.4428 4.10803 13.4777 3.98792 13.6423C3.86781 13.8069 3.90277 14.0307 4.06738 14.1508L12.2096 20.0919C12.8562 20.5638 13.7714 20.4207 14.2432 19.7741L17.0572 15.9175C17.2889 15.6001 17.3767 15.1957 17.3105 14.805Z",fill:"black"}),Object(o.createElement)("rect",{x:"12.4851",y:"1.42175",width:"1.5",height:"3",transform:"rotate(8 12.4851 1.42175)",fill:"black"}),Object(o.createElement)("rect",{x:"16.9365",y:"2.15547",width:"1.5",height:"3",transform:"rotate(43 16.9365 2.15547)",fill:"black"}),Object(o.createElement)("rect",{x:"8.15195",y:"1.78963",width:"1.5",height:"3",transform:"rotate(-27 8.15195 1.78963)",fill:"black"})),Object(o.createElement)("defs",null,Object(o.createElement)("clipPath",{id:"clip0"},Object(o.createElement)("rect",{width:"24",height:"24",fill:"white"}))))}),null),edit:Sn,attributes:kn,example:{attributes:{size:"large"}}},Nn="rating",Ln="feedback",Pn=Object.freeze({OPEN:"open",CLOSED:"closed",CLOSED_AFTER:"closed-after"}),Rn={backgroundColor:{type:"string"},buttonColor:{type:"string"},buttonTextColor:{type:"string"},feedbackPlaceholder:{type:"string",default:Object(a.__)("Please help us understand your rating","crowdsignal-forms")},feedbackQuestion:{type:"string",default:Object(a.__)("Thanks so much for your response! How could we do better?","crowdsignal-forms")},hideBranding:{type:"boolean",default:!1},highRatingLabel:{type:"string",default:Object(a.__)("Extremely likely","crowdsignal-forms")},lowRatingLabel:{type:"string",default:Object(a.__)("Not likely at all","crowdsignal-forms")},ratingQuestion:{type:"string",default:Object(a.__)("How likely is it that you would recommend this project to a friend or colleague?","crowdsignal-forms")},submitButtonLabel:{type:"string",default:Object(a.__)("Submit","crowdsignal-forms")},surveyId:{type:"number",default:null},textColor:{type:"string"},title:{type:"string",default:""},viewThreshold:{type:"string",default:2},status:{type:"string",default:Pn.OPEN},closedAfterDateTime:{type:"string",default:null},isExample:{type:"boolean",default:!1}},In=function(e){return t=Y()({path:Object(f.trimEnd)("/crowdsignal-forms/v1/nps/".concat(e.surveyId||""),"/"),method:"POST",data:e}),new Promise((function(e,n){var r=setTimeout((function(){return n(new Error("Request timed out"))}),1e4);t.then(e,n).finally((function(){return clearTimeout(r)}))}));var t},An=function(e){var t,n=e.attributes,r=e.setAttributes,l=e.shouldPromote,s=e.signalWarning,c="https://app.crowdsignal.com/surveys/".concat(n.surveyId,"/report/overview"),i=function(e){return function(t){return r(u()({},e,t))}};return Object(o.createElement)(v.InspectorControls,null,Object(o.createElement)(E.PanelBody,{title:Object(a.__)("Results","crowdsignal-forms"),initialOpen:!0},Object(o.createElement)("p",null,n.surveyId?Object(a.__)("Manage results on ","crowdsignal-forms"):Object(a.__)("Save the block to track results on ","crowdsignal-forms"),Object(o.createElement)(E.ExternalLink,{href:n.surveyId?c:"https://www.crowdsignal.com"},"crowdsignal.com")),Object(o.createElement)("p",null,Object(o.createElement)(E.Button,{isSecondary:!0,disabled:!n.surveyId,href:c,target:"blank"},Object(a.__)("View results","crowdsignal-forms"))),Object(o.createElement)(E.TextControl,{label:Object(a.__)("Title (optional)","crowdsignal-forms"),onChange:function(e){return r({title:e})},value:Object(y.decodeEntities)(null!==(t=n.title)&&void 0!==t?t:n.ratingQuestion)}),l&&Object(o.createElement)(qe,{signalWarning:s})),Object(o.createElement)(v.PanelColorSettings,{title:Object(a.__)("Block styling","crowdsignal-forms"),initialOpen:!1,colorSettings:[{label:Object(a.__)("Background color","crowdsignal-forms"),onChange:i("backgroundColor"),value:n.backgroundColor},{label:Object(a.__)("Text color","crowdsignal-forms"),onChange:i("textColor"),value:n.textColor},{label:Object(a.__)("Button color","crowdsignal-forms"),onChange:i("buttonColor"),value:n.buttonColor},{label:Object(a.__)("Button text color","crowdsignal-forms"),onChange:i("buttonTextColor"),value:n.buttonTextColor}]}),Object(o.createElement)(E.PanelBody,{title:Object(a.__)("Settings","crowdsignal-forms"),initialOpen:!1},Object(o.createElement)(E.SelectControl,{value:n.status,label:Object(a.__)("Status","crowdsignal-forms"),options:[{label:Object(a.__)("Open","crowdsignal-forms"),value:Pn.OPEN},{label:Object(a.__)("Closed after","crowdsignal-forms"),value:Pn.CLOSED_AFTER},{label:Object(a.__)("Closed","crowdsignal-forms"),value:Pn.CLOSED}],onChange:function(e){return r({status:e})},help:Pn.CLOSED_AFTER===n.status&&null!==n.closedAfterDateTime&&(new Date).toISOString()>n.closedAfterDateTime?"Currently closed as date has passed":""}),Pn.CLOSED_AFTER===n.status&&Object(o.createElement)(E.DateTimePicker,{currentDate:n.closedAfterDateTime&&new Date(n.closedAfterDateTime)||new Date,label:Object(a.__)("Close on","crowdsignal-forms"),onChange:function(e){var t=new Date(e);r({closedAfterDateTime:t.toISOString()})},is12Hour:!0})))},Dn=function(e){var t=e.attributes,n=e.currentView,r=e.onViewChange,l=e.setAttributes,s=Object(_.useState)(!1),c=j()(s,2),i=c[0],u=c[1],d=function(e){return function(){return r(e)}};return Object(o.createElement)(v.BlockControls,null,Object(o.createElement)(E.ToolbarGroup,{label:Object(a.__)("Current view","crowdsignal-forms")},Object(o.createElement)(E.ToolbarButton,{className:"crowdsignal-forms-nps__toolbar-toggle",isActive:n===Nn,label:Object(a.__)("Rating","crowdsignal-forms"),onClick:d(Nn)},Object(a.__)("Rating","crowdsignal-forms")),Object(o.createElement)(E.ToolbarButton,{className:"crowdsignal-forms-nps__toolbar-toggle",isActive:n===Ln,label:Object(a.__)("Feedback","crowdsignal-forms"),onClick:d(Ln)},Object(a.__)("Feedback","crowdsignal-forms"))),Object(o.createElement)(E.ToolbarGroup,null,Object(o.createElement)(E.ToolbarButton,{className:"crowdsignal-forms-nps__toolbar-popover-button",icon:"visibility",label:Object(a.__)("Set view threshold","crowdsignal-forms"),onClick:function(){return u(!0)}},i&&Object(o.createElement)(E.Popover,{onClose:function(){return u(!1)}},Object(o.createElement)("div",{className:"crowdsignal-forms-nps__toolbar-popover"},Object(o.createElement)(E.TextControl,{label:Object(a.__)("Show this block after n visits:","crowdsignal-forms"),value:t.viewThreshold,onChange:function(e){return l({viewThreshold:e})},type:"number",min:"1"}))))))},Bn=function(e,t){return Object(f.mapKeys)({backgroundColor:e.backgroundColor||"#ffffff",buttonColor:e.buttonColor||t.accentColor,buttonTextColor:e.buttonTextColor||t.textColorInverted,textColor:e.textColor||t.textColor,textSize:t.textSize},(function(e,t){return"--crowdsignal-forms-".concat(Object(f.kebabCase)(t))}))},Fn=Object(x.compose)([Object(d.withSelect)((function(e){return{postPreviewLink:e("core/editor").getEditedPostPreviewLink(),sourceLink:e("core/editor").getPermalink()}})),Re])((function(e){var t=Object(_.useState)(Nn),n=j()(t,2),r=n[0],l=n[1],s=e.attributes,c=e.clientId,i=e.fallbackStyles,b=e.isSelected,m=e.postPreviewLink,p=e.setAttributes,g=e.renderStyleProbe,O=e.sourceLink,h=s.feedbackQuestion,C=s.ratingQuestion,y=s.surveyId,x=s.title,S=s.isExample,T=s.viewThreshold,N=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object(_.useState)(!1),r=j()(n,2),o=r[0],a=r[1],l=Object(_.useRef)(0),s=Object(_.useCallback)(Object(f.debounce)((function(t,n){return e(t).catch(n)}),1500),[]),c=Object(_.useCallback)((function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;a(!1),s(t,(function(){e===l.current&&(n<3?c(e,n+1):a(!0))}))}),Object(f.values)(t));return Object(_.useEffect)((function(){0!=l.current++&&c(l.current)}),Object(f.values)(t)),{error:o,save:function(){return c(l.current)}}}(function(){var e=A()(R.a.mark((function e(t){var n;return R.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Object(d.dispatch)("core/editor").lockPostSaving(c),e.prev=1,e.next=4,In({feedbackQuestion:t.feedbackQuestion,ratingQuestion:t.ratingQuestion,sourceLink:t.sourceLink,surveyId:t.surveyId,title:t.title||t.ratingQuestion});case 4:n=e.sent,t.surveyId||p({surveyId:n.surveyId});case 6:return e.prev=6,Object(d.dispatch)("core/editor").unlockPostSaving(c),e.finish(6);case 9:case"end":return e.stop()}}),e,null,[[1,,6,9]])})));return function(t){return e.apply(this,arguments)}}(),{feedbackQuestion:h,ratingQuestion:C,sourceLink:O,surveyId:y,title:x}),L=N.error,P=N.save;Object(_.useEffect)((function(){S||s.surveyId||P()}),[]),Object(_.useEffect)((function(){b||l(Nn)}),[b]);var I=function(e){return function(t){return p(u()({},e,t))}},D=k()("crowdsignal-forms-nps",{"is-inactive":!S&&!b}),B=we(),F=Object(f.get)(B,"capabilities").includes("hide-branding"),M=Object(f.get)(B,["signalCount","shouldDisplay"]),V=M&&Object(f.get)(B,["signalCount","count"])>=Object(f.get)(B,["signalCount","userLimit"]);return Object(o.createElement)(lt,{blockIcon:null,blockName:Object(a.__)("Crowdsignal NPS","crowdsignal-forms")},Object(o.createElement)(Dn,w()({currentView:r,onViewChange:l},e)),Object(o.createElement)(An,w()({shouldPromote:M,signalWarning:V},e)),!S&&V&&Object(o.createElement)(gt,null),!S&&L&&Object(o.createElement)(mt,{status:"error",icon:"warning",isDismissible:!1,actions:[{className:"is-destructive",label:Object(a.__)("Retry","crowdsignal-forms"),onClick:P}]},Object(a.__)("Unfortunately, the block couldn't be saved to Crowdsignal.com.","crowdsignal-forms")),!S&&Object(o.createElement)(mt,{isDismissible:!1,icon:"visibility",actions:s.surveyId?[{label:Object(a.__)("Preview","crowdsignal-forms"),onClick:function(){return window.open(m,"blank")}}]:[]},Object(a.sprintf)(Object(a._n)("This block will appear as a popup window to people who have visited this page at least %d time.","This block will appear as a popup window to people who have visited this page at least %d times.",T,"crowdsignal-forms"),T)),(r===Nn||!b)&&Object(o.createElement)("div",{className:D,style:Bn(s,i)},Object(o.createElement)(v.RichText,{tagName:"h3",className:"crowdsignal-forms-nps__question",placeholder:Object(a.__)("Enter your rating question","crowdsignal-forms"),onChange:I("ratingQuestion"),value:C,allowedFormats:[]}),Object(o.createElement)("div",{className:"crowdsignal-forms-nps__rating"},Object(o.createElement)("div",{className:"crowdsignal-forms-nps__rating-labels"},Object(o.createElement)(v.RichText,{tagName:"span",placeholder:Object(a.__)("Not likely","crowdsignal-forms"),onChange:I("lowRatingLabel"),value:s.lowRatingLabel,allowedFormats:[]}),Object(o.createElement)(v.RichText,{tagName:"span",placeholder:Object(a.__)("Very likely","crowdsignal-forms"),onChange:I("highRatingLabel"),value:s.highRatingLabel,allowedFormats:[]})),Object(o.createElement)("div",{className:"crowdsignal-forms-nps__rating-scale"},Object(f.times)(11,(function(e){return Object(o.createElement)("div",{key:"rating-".concat(e),className:"crowdsignal-forms-nps__rating-button"},e)}))),!F&&Object(o.createElement)(Ce,{editing:!0,message:Object(a.__)("Collect your own feedback with Crowdsignal","crowdsignal-forms")}))),r===Ln&&b&&Object(o.createElement)("div",{className:D,style:Bn(s,i)},Object(o.createElement)("div",{className:"crowdsignal-forms-nps__feedback"},Object(o.createElement)(v.RichText,{tagName:"h3",className:"crowdsignal-forms-nps__question",placeholder:Object(a.__)("Enter your feedback question","crowdsignal-forms"),onChange:I("feedbackQuestion"),value:h,allowedFormats:[]}),Object(o.createElement)(E.TextareaControl,{className:"crowdsignal-forms-nps__feedback-text",rows:6,onChange:I("feedbackPlaceholder"),value:s.feedbackPlaceholder}),Object(o.createElement)("div",{className:"wp-block-button crowdsignal-forms-nps__feedback-button-wrapper"},Object(o.createElement)(v.RichText,{className:"wp-block-button__link crowdsignal-forms-nps__feedback-button",onChange:I("submitButtonLabel"),value:s.submitButtonLabel,allowedFormats:[]})),!F&&Object(o.createElement)(Ce,{editing:!0,message:Object(a.__)("Collect your own feedback with Crowdsignal","crowdsignal-forms")}))),g())})),Mn={title:Object(a.__)("Measure NPS","crowdsignal-forms"),description:Object(a.__)("Calculate your Net Promoter Score! Collect feedback and track customer satisfaction over time. — powered by Crowdsignal.","crowdsignal-forms"),category:"crowdsignal-forms",attributes:Rn,supports:{multiple:!1},icon:Object(o.createElement)((function(){return Object(o.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)("path",{fill:"black",d:"M4.49707 15V10.3857H4.54102L7.83691 15H9.05762V7.9541H7.64648V12.5439H7.60742L4.31641 7.9541H3.08594V15H4.49707ZM9.73438 7.9541V15H11.209V12.7783H12.5273C14.0117 12.7783 15.042 11.8115 15.042 10.3662C15.042 8.91602 14.0459 7.9541 12.6006 7.9541H9.73438ZM11.209 9.12109H12.21C13.0547 9.12109 13.543 9.57031 13.543 10.3711C13.543 11.1768 13.0498 11.626 12.2051 11.626H11.209V9.12109ZM15.1523 12.9932C15.1963 14.3164 16.2754 15.1221 17.9697 15.1221C19.7178 15.1221 20.8262 14.2578 20.8262 12.8906C20.8262 11.8164 20.2109 11.2109 18.7998 10.9082L17.9453 10.7275C17.1348 10.542 16.793 10.2979 16.793 9.86328C16.793 9.34082 17.2812 8.99414 18.0088 8.99414C18.7461 8.99414 19.2686 9.35547 19.3174 9.95117H20.6992C20.6748 8.67676 19.6445 7.83203 18.0039 7.83203C16.4316 7.83203 15.3086 8.69141 15.3086 9.99023C15.3086 11.0205 15.9482 11.6797 17.2471 11.958L18.165 12.1582C19.0146 12.3486 19.3516 12.6025 19.3516 13.0615C19.3516 13.5791 18.8145 13.9551 18.0283 13.9551C17.2471 13.9551 16.6416 13.5742 16.5732 12.9932H15.1523Z"}))}),null),edit:Fn,keywords:[Object(a.__)("ask","crowdsignal-forms"),"crowdsignal",Object(a.__)("CSAT","crowdsignal-forms"),Object(a.__)("customer experience","crowdsignal-forms"),Object(a.__)("customer satisfaction","crowdsignal-forms"),Object(a.__)("feedback","crowdsignal-forms"),Object(a.__)("form","crowdsignal-forms"),Object(a.__)("loyalty","crowdsignal-forms"),Object(a.__)("net promoter score","crowdsignal-forms"),Object(a.__)("nps","crowdsignal-forms"),Object(a.__)("opinion","crowdsignal-forms"),Object(a.__)("poll","crowdsignal-forms"),Object(a.__)("promoter","crowdsignal-forms"),Object(a.__)("research","crowdsignal-forms"),Object(a.__)("rating","crowdsignal-forms"),Object(a.__)("review","crowdsignal-forms"),Object(a.__)("score","crowdsignal-forms"),Object(a.__)("survey","crowdsignal-forms")],example:{attributes:{isExample:!0,ratingQuestion:Object(a.__)("How satisfied are you with the content of the site?","crowdsignal-forms"),feedbackQuestion:Object(a.__)("Any advise on how we could improve your experience?","crowdsignal-forms"),lowRatingLabel:Object(a.__)("Not satisfied","crowdsignal-forms"),highRatingLabel:Object(a.__)("Very satisfied","crowdsignal-forms")}}};Object(r.registerBlockType)("crowdsignal-forms/poll",jt),Object(r.registerBlockType)("crowdsignal-forms/vote",At),Object(r.registerBlockType)("crowdsignal-forms/vote-item",pn),Object(r.registerBlockType)("crowdsignal-forms/applause",Tn),Object(r.registerBlockType)("crowdsignal-forms/nps",Mn)}]));
build/nps.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array('crowdsignal-forms-apifetch', 'lodash', 'react', 'react-dom', 'wp-components', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => 'eab5588792a0dc22d96609afda229cd4');
build/nps.css ADDED
@@ -0,0 +1 @@
 
1
+ @keyframes crowdsignal-forms-animation__pop{0%{transform:scale(0)}50%{transform:scale(1.2)}100%{transform:scale(1)}}@keyframes crowdsignal-forms-animation__pulse{0%{opacity:0.4}50%{opacity:0.7}100%{opacity:0.4}}@keyframes crowdsignal-forms-animation__grow{0%{transform:scale(1)}50%{transform:scale(1.4)}100%{transform:scale(1)}}@keyframes crowdsignal-forms-animation__fade-in{0%{opacity:0}100%{opacity:1}}@keyframes crowdsignal-forms-animation__fade-out{0%{opacity:1}100%{opacity:0}}.crowdsignal-forms-dialog-wrapper{align-items:center;background:rgba(0,0,0,0.3);display:flex;justify-content:center;position:fixed;bottom:0;left:0;right:0;top:0;z-index:10000}.crowdsignal-forms-nps{border:0;border-top:10px solid var(--crowdsignal-forms-button-color);background-color:var(--crowdsignal-forms-background-color);color:var(--crowdsignal-forms-text-color);height:auto;padding:24px 16px;position:relative}@media screen and (min-width: 670px){.crowdsignal-forms-nps{padding:32px 32px 24px 32px}}.crowdsignal-forms-nps .crowdsignal-forms__footer-branding{margin-top:40px}.crowdsignal-forms-nps__close-button{align-items:center;background-color:var(--crowdsignal-forms-button-color);border:0;border-radius:20px;color:var(--crowdsignal-forms-button-text-color);display:flex;height:40px;justify-content:center;outline:0;padding:0;position:absolute;right:-20px;top:-25px;width:40px}.crowdsignal-forms-nps__close-button:hover{background-color:var(--crowdsignal-forms-button-text-color);color:var(--crowdsignal-forms-button-color)}.crowdsignal-forms-nps__question{margin-top:0 !important;margin-bottom:32px !important}.crowdsignal-forms-nps__rating{display:flex;flex-direction:column}.crowdsignal-forms-nps__rating-labels{display:flex;flex-direction:row;font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:14px;justify-content:space-between;margin-top:8px}.crowdsignal-forms-nps__rating-scale{display:flex;margin:10px auto 0;width:100%}.crowdsignal-forms-nps__rating-button{background-color:var(--crowdsignal-forms-button-color);border:1px solid var(--crowdsignal-forms-button-color);border-radius:2px;color:var(--crowdsignal-forms-button-text-color);cursor:pointer;display:inline-flex;flex:1;font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:15px;font-weight:600;height:50px;justify-content:center;line-height:50px;margin:0 0 0 0.4em;padding:0;text-align:center;text-decoration:none;transition:background-color 0.2s, color 0.2s}.crowdsignal-forms-nps__rating-button:first-child{margin:0}.crowdsignal-forms-nps__rating-button:hover:enabled{background-color:var(--crowdsignal-forms-button-text-color);color:var(--crowdsignal-forms-button-color);text-decoration:none}.crowdsignal-forms-nps__rating-button:disabled:not(.is-active){background-color:transparent;color:var(--crowdsignal-forms-button-color)}@media screen and (min-width: 670px){.crowdsignal-forms-nps__rating-button{margin:0 0 0 0.7em}}.crowdsignal-forms-nps__feedback{display:flex;flex-direction:column}.crowdsignal-forms-nps__feedback-text{margin-top:16px;margin-bottom:25px;width:100%}.crowdsignal-forms-nps__feedback-text textarea{font-size:var(--crowdsignal-forms-text-size)}.crowdsignal-forms-nps__feedback-button-wrapper{align-self:flex-end}.crowdsignal-forms-nps__feedback-button{align-self:flex-end;background-color:var(--crowdsignal-forms-button-color) !important;border:1px solid var(--crowdsignal-forms-button-color);color:var(--crowdsignal-forms-button-text-color) !important;text-decoration:none}.crowdsignal-forms-nps__feedback-button:hover{background-color:var(--crowdsignal-forms-button-text-color) !important;color:var(--crowdsignal-forms-button-color) !important;text-decoration:none}.crowdsignal-forms__footer-branding{align-items:flex-end;display:flex;margin-top:16px;width:100%}.crowdsignal-forms__footer-branding img.crowdsignal-forms__footer-branding-logo{height:50px;margin-left:auto;margin-right:0;width:50px}.crowdsignal-forms__footer-branding .crowdsignal-forms__branding-promote{display:inline-flex;font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:10px;text-decoration:none !important;box-shadow:none;border:0;background-color:#a4a4a4a4;color:#fff;cursor:pointer;padding-right:8px;padding-left:8px;margin-left:16px;border-radius:2px;padding-top:2px;padding-bottom:2px;vertical-align:middle}.crowdsignal-forms__footer-cs-link{display:inline-flex;font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:16px;line-height:18px;text-decoration:none;text-transform:uppercase;vertical-align:middle;border-bottom:0 solid var(--crowdsignal-forms-text-color) !important}.crowdsignal-forms__footer-cs-link:not(:hover){color:var(--crowdsignal-forms-text-color);opacity:0.4}.has-default-thankyou .crowdsignal-forms__footer-cs-link{color:#333}
build/nps.js ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ !function(e,t){for(var r in t)e[r]=t[r]}(window,function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=20)}([function(e,t){!function(){e.exports=this.wp.element}()},function(e,t){!function(){e.exports=this.React}()},function(e,t){!function(){e.exports=this.lodash}()},function(e,t){!function(){e.exports=this.wp.components}()},function(e,t,r){var n=r(14),o=r(15),c=r(16),a=r(18);e.exports=function(e,t){return n(e)||o(e,t)||c(e,t)||a()}},function(e,t){e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}},function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t){!function(){e.exports=this.regeneratorRuntime}()},function(e,t){function r(e,t,r,n,o,c,a){try{var i=e[c](a),l=i.value}catch(s){return void r(s)}i.done?t(l):Promise.resolve(l).then(n,o)}e.exports=function(e){return function(){var t=this,n=arguments;return new Promise((function(o,c){var a=e.apply(t,n);function i(e){r(a,o,c,i,l,"next",e)}function l(e){r(a,o,c,i,l,"throw",e)}i(void 0)}))}}},function(e,t){!function(){e.exports=this.ReactDOM}()},function(e,t){function r(){return e.exports=r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},r.apply(this,arguments)}e.exports=r},function(e,t,r){var n=r(19);e.exports=function(e,t){if(null==e)return{};var r,o,c=n(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(c[r]=e[r])}return c}},function(e,t){!function(){e.exports=this.crowdsignalForms.apiFetch}()},function(e,t,r){var n;
2
+ /*!
3
+ Copyright (c) 2017 Jed Watson.
4
+ Licensed under the MIT License (MIT), see
5
+ http://jedwatson.github.io/classnames
6
+ */!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var c=typeof n;if("string"===c||"number"===c)e.push(n);else if(Array.isArray(n)&&n.length){var a=o.apply(null,n);a&&e.push(a)}else if("object"===c)for(var i in n)r.call(n,i)&&n[i]&&e.push(i)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,o=!1,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(n=(a=i.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(l){o=!0,c=l}finally{try{n||null==i.return||i.return()}finally{if(o)throw c}}return r}}},function(e,t,r){var n=r(17);e.exports=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t){e.exports=function(e,t){if(null==e)return{};var r,n,o={},c=Object.keys(e);for(n=0;n<c.length;n++)r=c[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}},function(e,t,r){"use strict";r.r(t);var n=r(0),o=r(1),c=r(9),a=r(2),i=function(e){var t=e.children,r=e.onClose,c=Object(o.useRef)(null);return Object(n.createElement)("div",{ref:c,role:"dialog","aria-modal":"true",className:"crowdsignal-forms-dialog-wrapper",onClick:function(e){return e.target===c.current&&r()}},t)},l=r(5),s=r.n(l),u=r(4),f=r.n(u),b=r(3),d=r(6),p="rating",m="feedback",g="submit",O=Object.freeze({OPEN:"open",CLOSED:"closed",CLOSED_AFTER:"closed-after"}),w=Object(n.createElement)("span",null,"Hide Crowdsignal ads",Object(n.createElement)("br",null),"and get unlimited",Object(n.createElement)("br",null),"signals -"," ",Object(n.createElement)("a",{href:"https://crowdsignal.com/pricing",target:"_blank",rel:"noopener noreferrer"},"Upgrade")),y=function(e){var t=e.showLogo,r=e.editing,o=e.message;return Object(n.createElement)("div",{className:"crowdsignal-forms__footer-branding"},Object(n.createElement)("a",{className:"crowdsignal-forms__footer-cs-link",href:"https://crowdsignal.com?ref=cs-forms-poll",target:"_blank",rel:"noopener noreferrer"},o||Object(d.__)("Create your own poll with Crowdsignal","crowdsignal-forms")),r&&Object(n.createElement)(b.Tooltip,{text:w,position:"top center"},Object(n.createElement)("a",{href:"https://crowdsignal.com/pricing",target:"_blank",rel:"noopener noreferrer",className:"crowdsignal-forms__branding-promote"},Object(d.__)("Hide","crowdsignal-forms"))),t&&Object(n.createElement)("img",{className:"crowdsignal-forms__footer-branding-logo",src:"https://app.crowdsignal.com/images/svg/cs-logo-dots.svg",alt:"Crowdsignal sticker"}))},v=r(10),j=r.n(v),h=r(11),S=r.n(h),E=function(e){for(var t=window.getComputedStyle(e).backgroundColor;"rgba(0, 0, 0, 0)"===t&&e.parentNode&&e.parentNode.nodeType===window.Node.ELEMENT_NODE;)e=e.parentNode,t=window.getComputedStyle(e).backgroundColor;return t},_=function(){return Object(n.createElement)("div",{className:"crowdsignal-forms__style-probe"},Object(n.createElement)("p",null),Object(n.createElement)("h3",null,"Text"),Object(n.createElement)("div",{className:"wp-block-button"},Object(n.createElement)("div",{className:"wp-block-button__link"})),Object(n.createElement)("div",{className:"entry-content"},Object(n.createElement)("div",{className:"alignwide"})))},x=function(e){if(null===e)return{};var t,r=e.querySelector(".wp-block-button__link"),n=e.querySelector("p"),o=e.querySelector("h3"),c=e.querySelector(".alignwide"),a=E(r),i=E(n),l=window.getComputedStyle(n).color;if(a===i){var s=(t=r,"0px"!==window.getComputedStyle(t).borderBlockStartWidth?window.getComputedStyle(t).borderBlockStartColor:null);a=s||l}return{accentColor:a,backgroundColor:i,textColor:l,textColorInverted:window.getComputedStyle(r).color,textFont:window.getComputedStyle(n).fontFamily,textSize:window.getComputedStyle(n).fontSize,headingFont:window.getComputedStyle(o).fontFamily,contentWideWidth:window.getComputedStyle(c).maxWidth}},k=r(7),C=r.n(k),P=r(8),N=r.n(P),T=r(12),D=r.n(T),I=function(e,t){return r=D()({path:Object(a.trimEnd)("/crowdsignal-forms/v1/nps/".concat(e||"","/response")),method:"POST",data:t}),new Promise((function(e,t){var n=setTimeout((function(){return t(new Error("Request timed out"))}),1e4);r.then(e,t).finally((function(){return clearTimeout(n)}))}));var r};function A(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function F(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?A(Object(r),!0).forEach((function(t){s()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):A(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var L=function(e){var t=e.attributes,r=e.onFailure,c=e.onSubmit,a=e.responseMeta,i=Object(o.useState)(""),l=f()(i,2),s=l[0],u=l[1],d=Object(o.useState)(!1),p=f()(d,2),m=p[0],g=p[1],O=function(){var e=N()(C.a.mark((function e(){return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return g(!0),e.prev=1,e.next=4,I(t.surveyId,F({nonce:t.nonce,feedback:s},a));case 4:c(),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(1),r();case 10:case"end":return e.stop()}}),e,null,[[1,7]])})));return function(){return e.apply(this,arguments)}}();return Object(n.createElement)("div",{className:"crowdsignal-forms-nps__feedback"},Object(n.createElement)(b.TextareaControl,{className:"crowdsignal-forms-nps__feedback-text",disabled:m,rows:6,placeholder:t.feedbackPlaceholder,onChange:u,value:s}),Object(n.createElement)("div",{className:"wp-block-button crowdsignal-forms-nps__feedback-button-wrapper"},Object(n.createElement)("button",{className:"wp-block-button__link crowdsignal-forms-nps__feedback-button",disabled:m,onClick:O,type:"button"},t.submitButtonLabel)))},M=r(13),R=r.n(M),q=function(e){var t=e.attributes,r=e.onFailure,c=e.onSubmit,i=Object(o.useState)(-1),l=f()(i,2),s=l[0],u=l[1];return Object(n.createElement)("div",{className:"crowdsignal-forms-nps__rating"},Object(n.createElement)("div",{className:"crowdsignal-forms-nps__rating-labels"},Object(n.createElement)("span",null,t.lowRatingLabel),Object(n.createElement)("span",null,t.highRatingLabel)),Object(n.createElement)("div",{className:"crowdsignal-forms-nps__rating-scale"},Object(a.times)(11,(function(e){var o,i=R()("crowdsignal-forms-nps__rating-button",{"is-active":e===s});return Object(n.createElement)("button",{key:"rating-".concat(e),disabled:0<=s,className:i,onClick:(o=e,N()(C.a.mark((function e(){var n;return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return u(o),e.prev=1,e.next=4,I(t.surveyId,{nonce:t.nonce,score:o});case 4:n=e.sent,c(Object(a.pick)(n,["r","checksum"])),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),r();case 11:case"end":return e.stop()}}),e,null,[[1,8]])}))))},e)}))))};function W(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var z,B=(z=function(e){var t,r=e.attributes,c=e.contentWidth,i=e.fallbackStyles,l=e.onClose,u=e.renderStyleProbe,O=Object(o.useState)(null),w=f()(O,2),v=w[0],j=w[1],h=Object(o.useState)(p),S=f()(h,2),E=S[0],_=S[1],x=Object(a.get)((t={},s()(t,m,r.feedbackQuestion),s()(t,p,r.ratingQuestion),s()(t,g,Object(d.__)("Thanks so much for your feedback!","crowdsignal-forms")),t),[E]),k=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?W(Object(r),!0).forEach((function(t){s()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):W(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({width:"".concat(c,"px")},function(e,t){return Object(a.mapKeys)({backgroundColor:e.backgroundColor||"#ffffff",buttonColor:e.buttonColor||t.accentColor,buttonTextColor:e.buttonTextColor||t.textColorInverted,textColor:e.textColor||t.textColor,textSize:t.textSize},(function(e,t){return"--crowdsignal-forms-".concat(Object(a.kebabCase)(t))}))}(r,i));return Object(n.createElement)(n.Fragment,null,Object(n.createElement)("div",{className:"crowdsignal-forms-nps",style:k},Object(n.createElement)("h3",{className:"crowdsignal-forms-nps__question"},x),Object(n.createElement)("button",{className:"crowdsignal-forms-nps__close-button",onClick:l},Object(n.createElement)(b.Icon,{icon:"no-alt"})),E===p&&Object(n.createElement)(q,{attributes:r,onFailure:l,onSubmit:function(e){j(e),_(m)}}),E===m&&Object(n.createElement)(L,{attributes:r,responseMeta:v,onFailure:l,onSubmit:function(){return _(g)}}),!r.hideBranding&&Object(n.createElement)(y,{showLogo:E===g,message:Object(d.__)("Collect your own feedback with Crowdsignal","crowdsignal-forms")})),u())},Object(b.withFallbackStyles)((function(e){return{fallbackStyles:x(e.querySelector(".crowdsignal-forms__style-probe"))}}))((function(e){var t=e.fallbackStyles,r=S()(e,["fallbackStyles"]);return Object(n.createElement)(z,j()({fallbackStyles:t||{},renderStyleProbe:function(){return t?null:Object(n.createElement)(_,null)}},r))})));window.addEventListener("load",(function(){return Object(a.forEach)(document.querySelectorAll("div[data-crowdsignal-nps]"),(function(e){try{var t=JSON.parse(e.dataset.crowdsignalNps),r=parseInt(t.viewThreshold,10);if(e.removeAttribute("data-crowdsignal-nps"),O.CLOSED===t.status)return;if(O.CLOSED_AFTER===t.status&&null!==t.closedAfterDateTime&&(new Date).toISOString()>t.closedAfterDateTime)return;if(!t.isPreview){var o="".concat("cs-nps-views-").concat(t.surveyId),a=1+parseInt(window.localStorage.getItem(o)||0,10);if(window.localStorage.setItem(o,a),a!==r)return}var l=function(){return e.remove()};Object(c.render)(Object(n.createElement)(i,{onClose:l},Object(n.createElement)(B,{attributes:t,contentWidth:e.scrollWidth,onClose:l})),e)}catch(s){console.error(s)}}))}))}]));
build/poll.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-polyfill'), 'version' => '7a4d0103098c4a99a2049a5153502890');
1
+ <?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-polyfill'), 'version' => 'c6e75f3cd23de0b0048f3354fbf17fe2');
build/poll.css CHANGED
@@ -1 +1 @@
1
- @keyframes crowdsignal-forms-animation__pop{0%{transform:scale(0)}50%{transform:scale(1.2)}100%{transform:scale(1)}}@keyframes crowdsignal-forms-animation__pulse{0%{opacity:0.4}50%{opacity:0.7}100%{opacity:0.4}}@keyframes crowdsignal-forms-animation__grow{0%{transform:scale(1)}50%{transform:scale(1.4)}100%{transform:scale(1)}}@keyframes crowdsignal-forms-animation__fade-in{0%{opacity:0}100%{opacity:1}}@keyframes crowdsignal-forms-animation__fade-out{0%{opacity:1}100%{opacity:0}}.crowdsignal-poll-wrapper:not(:first-child),[data-type="crowdsignal-forms/poll"]:not(:first-child){margin-top:3em}.crowdsignal-poll-wrapper:not(:last-child),[data-type="crowdsignal-forms/poll"]:not(:last-child){margin-bottom:3em}.crowdsignal-forms-poll{border-color:var(--crowdsignal-forms-border-color);border-style:solid;border-width:var(--crowdsignal-forms-border-width);margin-left:auto;margin-right:auto;margin-top:5px;position:relative;text-align:left}.entry-content .alignfull.crowdsignal-poll-wrapper .crowdsignal-forms-poll{border-left-width:0;border-right-width:0}.crowdsignal-forms-poll h3.crowdsignal-forms-poll__question{margin:0 0 28px}.crowdsignal-forms-poll h3.crowdsignal-forms-poll__question:first-child{margin-top:0}.crowdsignal-forms-poll p.crowdsignal-forms-poll__note{font-style:italic;margin:0 0 32px}.crowdsignal-forms-poll .crowdsignal-forms-poll__content{padding:40px 24px 16px 24px}.crowdsignal-forms-poll .crowdsignal-forms-poll__content .crowdsignal-forms-poll__question{font-family:var(--crowdsignal-forms-question-font-family)}.crowdsignal-forms-poll .crowdsignal-forms-poll__content .crowdsignal-forms-poll__answer-label,.crowdsignal-forms-poll .crowdsignal-forms-poll__content .crowdsignal-forms-poll__answer-results-answer,.crowdsignal-forms-poll .crowdsignal-forms-poll__content .crowdsignal-forms-poll__note{font-family:var(--crowdsignal-forms-body-font-family)}.entry-content .alignfull.crowdsignal-poll-wrapper .crowdsignal-forms-poll .crowdsignal-forms-poll__content{margin:0 auto;max-width:var(--crowdsignal-forms-content-wide-width)}@media screen and (min-width: 660px){.alignwide.crowdsignal-poll-wrapper .crowdsignal-forms-poll .crowdsignal-forms-poll__content,.alignfull.crowdsignal-poll-wrapper .crowdsignal-forms-poll .crowdsignal-forms-poll__content{padding:80px}}.crowdsignal-forms-poll.is-closed .crowdsignal-forms-poll__form{opacity:0.5}.crowdsignal-forms-poll.is-hidden{opacity:0.5}.crowdsignal-forms-poll.has-text-color{color:var(--crowdsignal-forms-text-color)}.crowdsignal-forms-poll.has-bg-color{background-color:var(--crowdsignal-forms-bg-color)}.crowdsignal-forms-poll.has-border-radius{border-radius:var(--crowdsignal-forms-border-radius);overflow:hidden}.crowdsignal-forms-poll.has-box-shadow{box-shadow:0 3px 6px rgba(0,0,0,0.16),0 3px 6px rgba(0,0,0,0.23)}.crowdsignal-forms-poll .is-transparent{opacity:0;pointer-events:none}.crowdsignal-forms-poll__block-button .crowdsignal-forms-poll__submit-button{-webkit-appearance:initial}.crowdsignal-forms-poll__block-button .crowdsignal-forms-poll__submit-button:disabled{opacity:0.7}.crowdsignal-forms-poll.has-submit-button-text-color .crowdsignal-forms-poll__block-button .crowdsignal-forms-poll__submit-button.wp-block-button__link{color:var(--crowdsignal-forms-submit-button-text-color)}.crowdsignal-forms-poll.has-submit-button-bg-color .crowdsignal-forms-poll__block-button .crowdsignal-forms-poll__submit-button.wp-block-button__link{background-color:var(--crowdsignal-forms-submit-button-bg-color)}.crowdsignal-forms-poll.has-submit-button-bg-color .crowdsignal-forms-poll__block-button .crowdsignal-forms-poll__submit-button.wp-block-button__link:hover{opacity:0.9}.crowdsignal-forms-poll__options.is-button{display:flex;flex-direction:column;flex-wrap:wrap}.crowdsignal-forms-poll__options.is-button.is-inline-button-alignment{flex-direction:row}.crowdsignal-forms-poll__answer{cursor:pointer;display:flex;font-size:inherit;font-weight:600;margin:0;padding:0 2px;position:relative}.crowdsignal-forms-poll__answer.is-button{margin-inline-end:20px;margin-block-end:20px;max-width:100%}.crowdsignal-forms-poll__answer.is-button .wp-block-button.crowdsignal-forms-poll__block-button,.crowdsignal-forms-poll__answer.is-button .crowdsignal-forms-poll__submit-button{max-width:100%}.crowdsignal-forms-poll__answer.is-button .crowdsignal-forms-poll__submit-button{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.crowdsignal-forms-poll__answer:not(.is-button){margin-block-end:16px}.crowdsignal-forms-poll__answer:hover,.crowdsignal-forms-poll__answer.is-focused{color:var(--crowdsignal-forms-submit-button-bg-color)}.has-voted .crowdsignal-forms-poll__answer{opacity:0.5}input[type="checkbox"].crowdsignal-forms-poll__input,input[type="radio"].crowdsignal-forms-poll__input{height:0;opacity:0;position:absolute;width:0}.crowdsignal-forms-poll__check{display:inline-block;height:1em;margin:0 10px 0 0;position:relative;width:1em}.crowdsignal-forms-poll__check::before{background-color:transparent;border:1.5px solid var(--crowdsignal-forms-text-color);border-radius:50%;box-sizing:border-box;content:"";display:block;height:100%;transition:background-color 0.3s, border-color 0.3s;width:100%}.crowdsignal-forms-poll__answer.is-multiple-choice .crowdsignal-forms-poll__check::before{border-radius:3px}.crowdsignal-forms-poll__answer.is-multiple-choice.is-selected .crowdsignal-forms-poll__check::before{border-color:var(--crowdsignal-forms-text-color);background-color:var(--crowdsignal-forms-text-color)}.crowdsignal-forms-poll__answer.is-selected:not(.is-multiple-choice) .crowdsignal-forms-poll__check::after{animation-duration:0.3s;animation-name:crowdsignal-forms-animation__pop;animation-iteration-count:1;background-clip:padding-box;background-color:var(--crowdsignal-forms-text-color);border:4.5px solid transparent;border-radius:50%;box-sizing:border-box;content:"";display:block;height:100%;position:absolute;left:0;top:0;width:100%}.crowdsignal-forms-poll__answer.is-selected.is-multiple-choice .crowdsignal-forms-poll__check::after{border-color:var(--crowdsignal-forms-submit-button-text-color);border-style:solid;border-width:0 0 2px 2px;box-sizing:border-box;content:"";display:block;height:25%;margin:-0.1em 0 0 -0.2em;position:absolute;left:50%;top:50%;transform:rotateZ(-45deg);width:50%}div.crowdsignal-forms-poll__answer-label-wrapper{flex:1;word-break:break-word}div.crowdsignal-forms-poll__answer-label-wrapper span.crowdsignal-forms-poll__answer-label{line-height:1;vertical-align:top}div.crowdsignal-forms-poll__answer-label-wrapper span.crowdsignal-forms-poll__answer-label span::after{vertical-align:top}.crowdsignal-forms-poll__button{border:0;padding:0}.crowdsignal-forms-poll__actions .wp-block-button,.crowdsignal-forms-poll__options .wp-block-button{margin:0}.crowdsignal-forms-poll__actions{display:flex;justify-content:flex-end}.editor-styles-wrapper .crowdsignal-forms-poll .crowdsignal-forms-poll__actions .wp-block-button.crowdsignal-forms-poll__block-button,.editor-styles-wrapper .crowdsignal-forms-poll .crowdsignal-forms-poll__options .wp-block-button.crowdsignal-forms-poll__block-button{margin:0}.crowdsignal-forms-poll__closed-banner{background-color:var(--crowdsignal-forms-border-color);box-sizing:border-box;display:flex;color:var(--crowdsignal-forms-submit-button-text-color);font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;justify-content:center;padding:calc(var(--crowdsignal-forms-border-width) + 0.2em) 0 0.2em;width:100%}.is-hidden .crowdsignal-forms-poll__closed-banner{font-style:italic}.crowdsignal-forms-poll__error{color:red}.crowdsignal-forms-poll__results-list{margin:0 0 1em;position:relative}.crowdsignal-forms-poll__answer-results{display:flex;flex-direction:column;margin:0 0 16px;width:100%}.crowdsignal-forms-poll__answer-results:last-child{margin:0}.crowdsignal-forms-poll__answer-results-labels{align-items:flex-end;display:flex;margin:0 0 8px;width:100%;word-break:break-word}.crowdsignal-forms-poll__answer-results-answer{flex:1;font-size:1em;font-weight:600}.crowdsignal-forms-poll__answer-results-votes{font-size:0.75em;line-height:2}.crowdsignal-forms-poll__answer-results-percent{font-weight:600;line-height:1.6}.crowdsignal-forms-poll__answer-results-votes,.crowdsignal-forms-poll__answer-results-percent{font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;margin-left:20px;transition:opacity 0.3s}.crowdsignal-forms-poll__answer-results.is-error .crowdsignal-forms-poll__answer-results-votes,.crowdsignal-forms-poll__answer-results.is-error .crowdsignal-forms-poll__answer-results-percent{display:none}.crowdsignal-forms-poll__answer-results.is-loading .crowdsignal-forms-poll__answer-results-votes,.crowdsignal-forms-poll__answer-results.is-loading .crowdsignal-forms-poll__answer-results-percent{animation-duration:1.5s;animation-iteration-count:infinite;animation-name:crowdsignal-forms-animation__pulse;background-color:var(--crowdsignal-forms-text-color);font-size:0.7em;height:1em;width:50px}.crowdsignal-forms-poll__answer-results.is-loading .crowdsignal-forms-poll__answer-results-votes:last-child,.crowdsignal-forms-poll__answer-results.is-loading .crowdsignal-forms-poll__answer-results-percent:last-child{width:40px}.crowdsignal-forms-poll__answer-results-progress-track{border:1px solid;border-color:rgba(var(--crowdsignal-forms-text-color-properties), 0.3);box-sizing:border-box;height:1em;width:100%}.crowdsignal-forms-poll__answer-results.is-loading .crowdsignal-forms-poll__answer-results-progress-track{animation-duration:1.5s;animation-iteration-count:infinite;animation-name:crowdsignal-forms-animation__pulse}.crowdsignal-forms-poll__answer-results-progress-bar{animation-fill-mode:forwards;background-color:var(--crowdsignal-forms-submit-button-bg-color);height:100%;transition:background-color 0.3s, width 0.3s}.crowdsignal-forms-poll__answer-results.is-error .crowdsignal-forms-poll__answer-results-progress-bar{width:0}.crowdsignal-forms-poll__answer-results.is-loading .crowdsignal-forms-poll__answer-results-progress-bar{background-color:var(--crowdsignal-forms-text-color);width:25%}.crowdsignal-forms-poll__answer-results.is-loading:nth-child(5n+1) .crowdsignal-forms-poll__answer-results-progress-bar{width:40%}.crowdsignal-forms-poll__answer-results.is-loading:nth-child(5n+2) .crowdsignal-forms-poll__answer-results-progress-bar{width:75%}.crowdsignal-forms-poll__answer-results.is-loading:nth-child(5n+3) .crowdsignal-forms-poll__answer-results-progress-bar{width:50%}.crowdsignal-forms-poll__answer-results.is-loading:nth-child(5n+4) .crowdsignal-forms-poll__answer-results-progress-bar{width:60%}.crowdsignal-forms-poll__results-footer{display:flex;flex-direction:column;justify-content:space-between;width:100%;font-size:0.9em}.crowdsignal-forms-poll__results-total{font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;position:relative;text-align:right;width:100%;margin-bottom:1em}.crowdsignal-forms-poll__results.is-loading .crowdsignal-forms-poll__results-total{color:transparent}.crowdsignal-forms-poll__results.is-loading .crowdsignal-forms-poll__results-total::before{animation-name:crowdsignal-forms-animation__pulse;animation-duration:1.5s;animation-iteration-count:infinite;background-color:var(--crowdsignal-forms-text-color);content:"";display:block;position:absolute;right:0;height:1em;width:150px}.crowdsignal-forms-poll__footer-branding{display:flex;justify-content:space-between;align-items:center;width:100%;margin-top:16px}.crowdsignal-forms-poll__footer-branding img.crowdsignal-forms-poll__footer-branding-logo{width:50px;height:50px;margin-left:0;margin-right:0}.crowdsignal-forms-poll__footer-branding .crowdsignal-forms__branding-promote{font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:10px;text-decoration:none !important;box-shadow:none;border:0;background-color:#a4a4a4a4;color:#fff;cursor:pointer;padding-right:8px;padding-left:8px;margin-left:16px;border-radius:2px;padding-top:4px;padding-bottom:4px;vertical-align:middle}.crowdsignal-forms-poll__footer-cs-link{font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:16px;text-decoration:none;text-transform:uppercase;vertical-align:middle;border-bottom:0px solid var(--crowdsignal-forms-text-color) !important}.crowdsignal-forms-poll__footer-cs-link:not(:hover){color:var(--crowdsignal-forms-text-color);opacity:0.4}.has-default-thankyou .crowdsignal-forms-poll__footer-cs-link{color:#333}.crowdsignal-forms-poll__error-banner{font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:13px;margin-top:24px;padding:18px 24px;color:#d82e20;border-left:4px solid #d82e20;background:#f8dad8}.crowdsignal-forms-poll__submit-message-container{position:absolute;background-color:var(--crowdsignal-forms-bg-color);left:0;top:0;width:100%;height:100%;overflow:hidden}.has-default-thankyou .crowdsignal-forms-poll__submit-message-container{background-color:#fff}.crowdsignal-forms-poll__submit-message{position:relative}.crowdsignal-forms-poll__submit-message button.crowdsignal-forms-poll__dismiss-submit-message{position:absolute;right:0;top:0;background-color:transparent;color:#000;text-decoration:none;border:none}.crowdsignal-forms-poll__submit-message button.crowdsignal-forms-poll__dismiss-submit-message:hover{background:inherit}.crowdsignal-forms-poll__submit-message-footer{position:absolute;bottom:0;left:0;padding:16px 24px;width:100%;background-color:inherit}.crowdsignal-forms-poll__thank-you-cs-sticker{right:25px;top:66px}.crowdsignal-forms-poll__thank-you-sticker{right:132px;top:12px}.crowdsignal-forms-poll__thank-you-cs-sticker,.crowdsignal-forms-poll__thank-you-sticker{filter:drop-shadow(0 1px 2px rgba(0,0,0,0.2));width:100px;height:100px;position:absolute}.crowdsignal-forms-poll__custom-message-check{color:var(--crowdsignal-forms-text-color);padding-left:24px;padding-top:24px}.crowdsignal-forms-poll__custom-message{font-family:var(--crowdsignal-forms-question-font-family);font-weight:600;padding:16px 24px}.wp_block-crowdsignal-forms-poll__vote-branding{margin-top:16px}.crowdsignal-forms__style-probe{display:none}
1
+ @keyframes crowdsignal-forms-animation__pop{0%{transform:scale(0)}50%{transform:scale(1.2)}100%{transform:scale(1)}}@keyframes crowdsignal-forms-animation__pulse{0%{opacity:0.4}50%{opacity:0.7}100%{opacity:0.4}}@keyframes crowdsignal-forms-animation__grow{0%{transform:scale(1)}50%{transform:scale(1.4)}100%{transform:scale(1)}}@keyframes crowdsignal-forms-animation__fade-in{0%{opacity:0}100%{opacity:1}}@keyframes crowdsignal-forms-animation__fade-out{0%{opacity:1}100%{opacity:0}}.crowdsignal-poll-wrapper:not(:first-child),[data-type="crowdsignal-forms/poll"]:not(:first-child){margin-top:3em}.crowdsignal-poll-wrapper:not(:last-child),[data-type="crowdsignal-forms/poll"]:not(:last-child){margin-bottom:3em}.crowdsignal-forms-poll{border-color:var(--crowdsignal-forms-border-color);border-style:solid;border-width:var(--crowdsignal-forms-border-width);margin-left:auto;margin-right:auto;margin-top:5px;position:relative;text-align:left}.entry-content .alignfull.crowdsignal-poll-wrapper .crowdsignal-forms-poll{border-left-width:0;border-right-width:0}.crowdsignal-forms-poll h3.crowdsignal-forms-poll__question{margin:0 0 28px}.crowdsignal-forms-poll h3.crowdsignal-forms-poll__question:first-child{margin-top:0}.crowdsignal-forms-poll p.crowdsignal-forms-poll__note{font-style:italic;margin:0 0 32px}.crowdsignal-forms-poll .crowdsignal-forms-poll__content{padding:40px 24px 16px 24px}.crowdsignal-forms-poll .crowdsignal-forms-poll__content .crowdsignal-forms-poll__question{font-family:var(--crowdsignal-forms-question-font-family)}.crowdsignal-forms-poll .crowdsignal-forms-poll__content .crowdsignal-forms-poll__answer-label,.crowdsignal-forms-poll .crowdsignal-forms-poll__content .crowdsignal-forms-poll__answer-results-answer,.crowdsignal-forms-poll .crowdsignal-forms-poll__content .crowdsignal-forms-poll__note{font-family:var(--crowdsignal-forms-body-font-family)}.entry-content .alignfull.crowdsignal-poll-wrapper .crowdsignal-forms-poll .crowdsignal-forms-poll__content{margin:0 auto;max-width:var(--crowdsignal-forms-content-wide-width)}@media screen and (min-width: 660px){.alignwide.crowdsignal-poll-wrapper .crowdsignal-forms-poll .crowdsignal-forms-poll__content,.alignfull.crowdsignal-poll-wrapper .crowdsignal-forms-poll .crowdsignal-forms-poll__content{padding:80px}}.crowdsignal-forms-poll.is-closed .crowdsignal-forms-poll__form{opacity:0.5}.crowdsignal-forms-poll.is-hidden{opacity:0.5}.crowdsignal-forms-poll.has-text-color{color:var(--crowdsignal-forms-text-color)}.crowdsignal-forms-poll.has-bg-color{background-color:var(--crowdsignal-forms-bg-color)}.crowdsignal-forms-poll.has-border-radius{border-radius:var(--crowdsignal-forms-border-radius);overflow:hidden}.crowdsignal-forms-poll.has-box-shadow{box-shadow:0 3px 6px rgba(0,0,0,0.16),0 3px 6px rgba(0,0,0,0.23)}.crowdsignal-forms-poll .is-transparent{opacity:0;pointer-events:none}.crowdsignal-forms-poll__block-button .crowdsignal-forms-poll__submit-button{-webkit-appearance:initial}.crowdsignal-forms-poll__block-button .crowdsignal-forms-poll__submit-button:disabled{opacity:0.7}.crowdsignal-forms-poll.has-submit-button-text-color .crowdsignal-forms-poll__block-button .crowdsignal-forms-poll__submit-button.wp-block-button__link{color:var(--crowdsignal-forms-submit-button-text-color)}.crowdsignal-forms-poll.has-submit-button-bg-color .crowdsignal-forms-poll__block-button .crowdsignal-forms-poll__submit-button.wp-block-button__link{background-color:var(--crowdsignal-forms-submit-button-bg-color)}.crowdsignal-forms-poll.has-submit-button-bg-color .crowdsignal-forms-poll__block-button .crowdsignal-forms-poll__submit-button.wp-block-button__link:hover{opacity:0.9}.crowdsignal-forms-poll__options.is-button{display:flex;flex-direction:column;flex-wrap:wrap}.crowdsignal-forms-poll__options.is-button.is-inline-button-alignment{flex-direction:row}.crowdsignal-forms-poll__answer{cursor:pointer;display:flex;font-size:inherit;font-weight:600;margin:0;padding:0 2px;position:relative}.crowdsignal-forms-poll__answer.is-button{margin-inline-end:20px;margin-block-end:20px;max-width:100%}.crowdsignal-forms-poll__answer.is-button .wp-block-button.crowdsignal-forms-poll__block-button,.crowdsignal-forms-poll__answer.is-button .crowdsignal-forms-poll__submit-button{max-width:100%}.crowdsignal-forms-poll__answer.is-button .crowdsignal-forms-poll__submit-button{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.crowdsignal-forms-poll__answer:not(.is-button){margin-block-end:16px}.crowdsignal-forms-poll__answer:hover,.crowdsignal-forms-poll__answer.is-focused{color:var(--crowdsignal-forms-submit-button-bg-color)}.has-voted .crowdsignal-forms-poll__answer{opacity:0.5}input[type="checkbox"].crowdsignal-forms-poll__input,input[type="radio"].crowdsignal-forms-poll__input{height:0;opacity:0;position:absolute;width:0}.crowdsignal-forms-poll__check{display:inline-block;height:1em;margin:0 10px 0 0;position:relative;width:1em}.crowdsignal-forms-poll__check::before{background-color:transparent;border:1.5px solid var(--crowdsignal-forms-text-color);border-radius:50%;box-sizing:border-box;content:"";display:block;height:100%;transition:background-color 0.3s, border-color 0.3s;width:100%}.crowdsignal-forms-poll__answer.is-multiple-choice .crowdsignal-forms-poll__check::before{border-radius:3px}.crowdsignal-forms-poll__answer.is-multiple-choice.is-selected .crowdsignal-forms-poll__check::before{border-color:var(--crowdsignal-forms-text-color);background-color:var(--crowdsignal-forms-text-color)}.crowdsignal-forms-poll__answer.is-selected:not(.is-multiple-choice) .crowdsignal-forms-poll__check::after{animation-duration:0.3s;animation-name:crowdsignal-forms-animation__pop;animation-iteration-count:1;background-clip:padding-box;background-color:var(--crowdsignal-forms-text-color);border:4.5px solid transparent;border-radius:50%;box-sizing:border-box;content:"";display:block;height:100%;position:absolute;left:0;top:0;width:100%}.crowdsignal-forms-poll__answer.is-selected.is-multiple-choice .crowdsignal-forms-poll__check::after{border-color:var(--crowdsignal-forms-submit-button-text-color);border-style:solid;border-width:0 0 2px 2px;box-sizing:border-box;content:"";display:block;height:25%;margin:-0.1em 0 0 -0.2em;position:absolute;left:50%;top:50%;transform:rotateZ(-45deg);width:50%}div.crowdsignal-forms-poll__answer-label-wrapper{flex:1;word-break:break-word}div.crowdsignal-forms-poll__answer-label-wrapper span.crowdsignal-forms-poll__answer-label{line-height:1;vertical-align:top}div.crowdsignal-forms-poll__answer-label-wrapper span.crowdsignal-forms-poll__answer-label span::after{vertical-align:top}.crowdsignal-forms-poll__button{border:0;padding:0}.crowdsignal-forms-poll__actions .wp-block-button,.crowdsignal-forms-poll__options .wp-block-button{margin:0}.crowdsignal-forms-poll__actions{display:flex;justify-content:flex-end}.editor-styles-wrapper .crowdsignal-forms-poll .crowdsignal-forms-poll__actions .wp-block-button.crowdsignal-forms-poll__block-button,.editor-styles-wrapper .crowdsignal-forms-poll .crowdsignal-forms-poll__options .wp-block-button.crowdsignal-forms-poll__block-button{margin:0}.crowdsignal-forms-poll__closed-banner{background-color:var(--crowdsignal-forms-border-color);box-sizing:border-box;display:flex;color:var(--crowdsignal-forms-submit-button-text-color);font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;justify-content:center;padding:calc(var(--crowdsignal-forms-border-width) + 0.2em) 0 0.2em;width:100%}.is-hidden .crowdsignal-forms-poll__closed-banner{font-style:italic}.crowdsignal-forms-poll__error{color:red}.crowdsignal-forms-poll__results-list{margin:0 0 1em;position:relative}.crowdsignal-forms-poll__answer-results{display:flex;flex-direction:column;margin:0 0 16px;width:100%}.crowdsignal-forms-poll__answer-results:last-child{margin:0}.crowdsignal-forms-poll__answer-results-labels{align-items:flex-end;display:flex;margin:0 0 8px;width:100%;word-break:break-word}.crowdsignal-forms-poll__answer-results-answer{flex:1;font-size:1em;font-weight:600}.crowdsignal-forms-poll__answer-results-votes{font-size:0.75em;line-height:2}.crowdsignal-forms-poll__answer-results-percent{font-weight:600;line-height:1.6}.crowdsignal-forms-poll__answer-results-votes,.crowdsignal-forms-poll__answer-results-percent{font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;margin-left:20px;transition:opacity 0.3s}.crowdsignal-forms-poll__answer-results.is-error .crowdsignal-forms-poll__answer-results-votes,.crowdsignal-forms-poll__answer-results.is-error .crowdsignal-forms-poll__answer-results-percent{display:none}.crowdsignal-forms-poll__answer-results.is-loading .crowdsignal-forms-poll__answer-results-votes,.crowdsignal-forms-poll__answer-results.is-loading .crowdsignal-forms-poll__answer-results-percent{animation-duration:1.5s;animation-iteration-count:infinite;animation-name:crowdsignal-forms-animation__pulse;background-color:var(--crowdsignal-forms-text-color);font-size:0.7em;height:1em;width:50px}.crowdsignal-forms-poll__answer-results.is-loading .crowdsignal-forms-poll__answer-results-votes:last-child,.crowdsignal-forms-poll__answer-results.is-loading .crowdsignal-forms-poll__answer-results-percent:last-child{width:40px}.crowdsignal-forms-poll__answer-results-progress-track{border:1px solid;border-color:rgba(var(--crowdsignal-forms-text-color-properties), 0.3);box-sizing:border-box;height:1em;width:100%}.crowdsignal-forms-poll__answer-results.is-loading .crowdsignal-forms-poll__answer-results-progress-track{animation-duration:1.5s;animation-iteration-count:infinite;animation-name:crowdsignal-forms-animation__pulse}.crowdsignal-forms-poll__answer-results-progress-bar{animation-fill-mode:forwards;background-color:var(--crowdsignal-forms-submit-button-bg-color);height:100%;transition:background-color 0.3s, width 0.3s}.crowdsignal-forms-poll__answer-results.is-error .crowdsignal-forms-poll__answer-results-progress-bar{width:0}.crowdsignal-forms-poll__answer-results.is-loading .crowdsignal-forms-poll__answer-results-progress-bar{background-color:var(--crowdsignal-forms-text-color);width:25%}.crowdsignal-forms-poll__answer-results.is-loading:nth-child(5n+1) .crowdsignal-forms-poll__answer-results-progress-bar{width:40%}.crowdsignal-forms-poll__answer-results.is-loading:nth-child(5n+2) .crowdsignal-forms-poll__answer-results-progress-bar{width:75%}.crowdsignal-forms-poll__answer-results.is-loading:nth-child(5n+3) .crowdsignal-forms-poll__answer-results-progress-bar{width:50%}.crowdsignal-forms-poll__answer-results.is-loading:nth-child(5n+4) .crowdsignal-forms-poll__answer-results-progress-bar{width:60%}.crowdsignal-forms-poll__results-footer{display:flex;flex-direction:column;justify-content:space-between;width:100%;font-size:0.9em}.crowdsignal-forms-poll__results-total{font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;position:relative;text-align:right;width:100%;margin-bottom:1em}.crowdsignal-forms-poll__results.is-loading .crowdsignal-forms-poll__results-total{color:transparent}.crowdsignal-forms-poll__results.is-loading .crowdsignal-forms-poll__results-total::before{animation-name:crowdsignal-forms-animation__pulse;animation-duration:1.5s;animation-iteration-count:infinite;background-color:var(--crowdsignal-forms-text-color);content:"";display:block;position:absolute;right:0;height:1em;width:150px}.crowdsignal-forms-poll__error-banner{font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:13px;margin-top:24px;padding:18px 24px;color:#d82e20;border-left:4px solid #d82e20;background:#f8dad8}.crowdsignal-forms-poll__submit-message-container{position:absolute;background-color:var(--crowdsignal-forms-bg-color);left:0;top:0;width:100%;height:100%;overflow:hidden}.has-default-thankyou .crowdsignal-forms-poll__submit-message-container{background-color:#fff}.crowdsignal-forms-poll__submit-message{position:relative}.crowdsignal-forms-poll__submit-message button.crowdsignal-forms-poll__dismiss-submit-message{position:absolute;right:0;top:0;background-color:transparent;color:#000;text-decoration:none;border:none}.crowdsignal-forms-poll__submit-message button.crowdsignal-forms-poll__dismiss-submit-message:hover{background:inherit}.crowdsignal-forms-poll__submit-message-footer{position:absolute;bottom:0;left:0;padding:16px 24px;width:100%;background-color:inherit}.crowdsignal-forms-poll__thank-you-cs-sticker{right:25px;top:66px}.crowdsignal-forms-poll__thank-you-sticker{right:132px;top:12px}.crowdsignal-forms-poll__thank-you-cs-sticker,.crowdsignal-forms-poll__thank-you-sticker{filter:drop-shadow(0 1px 2px rgba(0,0,0,0.2));width:100px;height:100px;position:absolute}.crowdsignal-forms-poll__custom-message-check{color:var(--crowdsignal-forms-text-color);padding-left:24px;padding-top:24px}.crowdsignal-forms-poll__custom-message{font-family:var(--crowdsignal-forms-question-font-family);font-weight:600;padding:16px 24px}.wp_block-crowdsignal-forms-poll__vote-branding{margin-top:16px}.crowdsignal-forms__style-probe{display:none}.crowdsignal-forms__footer-branding{align-items:flex-end;display:flex;margin-top:16px;width:100%}.crowdsignal-forms__footer-branding img.crowdsignal-forms__footer-branding-logo{height:50px;margin-left:auto;margin-right:0;width:50px}.crowdsignal-forms__footer-branding .crowdsignal-forms__branding-promote{display:inline-flex;font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:10px;text-decoration:none !important;box-shadow:none;border:0;background-color:#a4a4a4a4;color:#fff;cursor:pointer;padding-right:8px;padding-left:8px;margin-left:16px;border-radius:2px;padding-top:2px;padding-bottom:2px;vertical-align:middle}.crowdsignal-forms__footer-cs-link{display:inline-flex;font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:16px;line-height:18px;text-decoration:none;text-transform:uppercase;vertical-align:middle;border-bottom:0 solid var(--crowdsignal-forms-text-color) !important}.crowdsignal-forms__footer-cs-link:not(:hover){color:var(--crowdsignal-forms-text-color);opacity:0.4}.has-default-thankyou .crowdsignal-forms__footer-cs-link{color:#333}
build/poll.js CHANGED
@@ -10,4 +10,4 @@
10
  *
11
  * Copyright 2006, 2015 Klaus Hartl & Fagner Brack
12
  * Released under the MIT license
13
- */!function(i){if(void 0===(o="function"==typeof(r=i)?r.call(t,n,t,e):r)||(e.exports=o),!0,e.exports=i(),!!0){var a=window.Cookies,c=window.Cookies=i();c.noConflict=function(){return window.Cookies=a,c}}}((function(){function e(){for(var e=0,t={};e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}function t(e){return e.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function n(r){function o(){}function i(t,n,i){if("undefined"!=typeof document){"number"==typeof(i=e({path:"/"},o.defaults,i)).expires&&(i.expires=new Date(1*new Date+864e5*i.expires)),i.expires=i.expires?i.expires.toUTCString():"";try{var a=JSON.stringify(n);/^[\{\[]/.test(a)&&(n=a)}catch(l){}n=r.write?r.write(n,t):encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var c="";for(var s in i)i[s]&&(c+="; "+s,!0!==i[s]&&(c+="="+i[s].split(";")[0]));return document.cookie=t+"="+n+c}}function a(e,n){if("undefined"!=typeof document){for(var o={},i=document.cookie?document.cookie.split("; "):[],a=0;a<i.length;a++){var c=i[a].split("="),s=c.slice(1).join("=");n||'"'!==s.charAt(0)||(s=s.slice(1,-1));try{var l=t(c[0]);if(s=(r.read||r)(s,l)||t(s),n)try{s=JSON.parse(s)}catch(u){}if(o[l]=s,e===l)break}catch(u){}}return e?o[e]:o}}return o.set=i,o.get=function(e){return a(e,!1)},o.getJSON=function(e){return a(e,!0)},o.remove=function(t,n){i(t,"",e(n,{expires:-1}))},o.defaults={},o.withConverter=n,o}((function(){}))}))},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t){!function(){e.exports=this.wp.blocks}()},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){var r=n(19);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},function(e,t){!function(){e.exports=this.wp.apiFetch}()},function(e,t,n){var r=n(25);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}},function(e,t,n){var r=n(34),o=n(35),i=n(36),a=n(37),c=n(38),s=n(39),l=n(40);l.alea=r,l.xor128=o,l.xorwow=i,l.xorshift7=a,l.xor4096=c,l.tychei=s,e.exports=l},function(e,t,n){var r=n(45);e.exports=function(e,t){if(null==e)return{};var n,o,i=r(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}},function(e,t,n){var r=n(48),o=n(49);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t}},function(e,t,n){var r=n(17),o=n(19),i=n(50),a=n(51);function c(t){var n="function"==typeof Map?new Map:void 0;return e.exports=c=function(e){if(null===e||!i(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return a(e,arguments,r(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),o(t,e)},c(t)}e.exports=c},function(e,t){!function(){e.exports=this.ReactDOM}()},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(s){o=!0,i=s}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,n){(function(e){var r;!function(e,o,i){function a(e){var t,n=this,r=(t=4022871197,function(e){e=String(e);for(var n=0;n<e.length;n++){var r=.02519603282416938*(t+=e.charCodeAt(n));r-=t=r>>>0,t=(r*=t)>>>0,t+=4294967296*(r-=t)}return 2.3283064365386963e-10*(t>>>0)});n.next=function(){var e=2091639*n.s0+2.3283064365386963e-10*n.c;return n.s0=n.s1,n.s1=n.s2,n.s2=e-(n.c=0|e)},n.c=1,n.s0=r(" "),n.s1=r(" "),n.s2=r(" "),n.s0-=r(e),n.s0<0&&(n.s0+=1),n.s1-=r(e),n.s1<0&&(n.s1+=1),n.s2-=r(e),n.s2<0&&(n.s2+=1),r=null}function c(e,t){return t.c=e.c,t.s0=e.s0,t.s1=e.s1,t.s2=e.s2,t}function s(e,t){var n=new a(e),r=t&&t.state,o=n.next;return o.int32=function(){return 4294967296*n.next()|0},o.double=function(){return o()+11102230246251565e-32*(2097152*o()|0)},o.quick=o,r&&("object"==typeof r&&c(r,n),o.state=function(){return c(n,{})}),o}o&&o.exports?o.exports=s:n(9)&&n(13)?void 0===(r=function(){return s}.call(t,n,t,o))||(o.exports=r):this.alea=s}(0,e,n(9))}).call(this,n(12)(e))},function(e,t,n){(function(e){var r;!function(e,o,i){function a(e){var t=this,n="";t.x=0,t.y=0,t.z=0,t.w=0,t.next=function(){var e=t.x^t.x<<11;return t.x=t.y,t.y=t.z,t.z=t.w,t.w^=t.w>>>19^e^e>>>8},e===(0|e)?t.x=e:n+=e;for(var r=0;r<n.length+64;r++)t.x^=0|n.charCodeAt(r),t.next()}function c(e,t){return t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t}function s(e,t){var n=new a(e),r=t&&t.state,o=function(){return(n.next()>>>0)/4294967296};return o.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},o.int32=n.next,o.quick=o,r&&("object"==typeof r&&c(r,n),o.state=function(){return c(n,{})}),o}o&&o.exports?o.exports=s:n(9)&&n(13)?void 0===(r=function(){return s}.call(t,n,t,o))||(o.exports=r):this.xor128=s}(0,e,n(9))}).call(this,n(12)(e))},function(e,t,n){(function(e){var r;!function(e,o,i){function a(e){var t=this,n="";t.next=function(){var e=t.x^t.x>>>2;return t.x=t.y,t.y=t.z,t.z=t.w,t.w=t.v,(t.d=t.d+362437|0)+(t.v=t.v^t.v<<4^e^e<<1)|0},t.x=0,t.y=0,t.z=0,t.w=0,t.v=0,e===(0|e)?t.x=e:n+=e;for(var r=0;r<n.length+64;r++)t.x^=0|n.charCodeAt(r),r==n.length&&(t.d=t.x<<10^t.x>>>4),t.next()}function c(e,t){return t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t.v=e.v,t.d=e.d,t}function s(e,t){var n=new a(e),r=t&&t.state,o=function(){return(n.next()>>>0)/4294967296};return o.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},o.int32=n.next,o.quick=o,r&&("object"==typeof r&&c(r,n),o.state=function(){return c(n,{})}),o}o&&o.exports?o.exports=s:n(9)&&n(13)?void 0===(r=function(){return s}.call(t,n,t,o))||(o.exports=r):this.xorwow=s}(0,e,n(9))}).call(this,n(12)(e))},function(e,t,n){(function(e){var r;!function(e,o,i){function a(e){var t=this;t.next=function(){var e,n,r=t.x,o=t.i;return e=r[o],n=(e^=e>>>7)^e<<24,n^=(e=r[o+1&7])^e>>>10,n^=(e=r[o+3&7])^e>>>3,n^=(e=r[o+4&7])^e<<7,e=r[o+7&7],n^=(e^=e<<13)^e<<9,r[o]=n,t.i=o+1&7,n},function(e,t){var n,r=[];if(t===(0|t))r[0]=t;else for(t=""+t,n=0;n<t.length;++n)r[7&n]=r[7&n]<<15^t.charCodeAt(n)+r[n+1&7]<<13;for(;r.length<8;)r.push(0);for(n=0;n<8&&0===r[n];++n);for(8==n?r[7]=-1:r[n],e.x=r,e.i=0,n=256;n>0;--n)e.next()}(t,e)}function c(e,t){return t.x=e.x.slice(),t.i=e.i,t}function s(e,t){null==e&&(e=+new Date);var n=new a(e),r=t&&t.state,o=function(){return(n.next()>>>0)/4294967296};return o.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},o.int32=n.next,o.quick=o,r&&(r.x&&c(r,n),o.state=function(){return c(n,{})}),o}o&&o.exports?o.exports=s:n(9)&&n(13)?void 0===(r=function(){return s}.call(t,n,t,o))||(o.exports=r):this.xorshift7=s}(0,e,n(9))}).call(this,n(12)(e))},function(e,t,n){(function(e){var r;!function(e,o,i){function a(e){var t=this;t.next=function(){var e,n,r=t.w,o=t.X,i=t.i;return t.w=r=r+1640531527|0,n=o[i+34&127],e=o[i=i+1&127],n^=n<<13,e^=e<<17,n^=n>>>15,e^=e>>>12,n=o[i]=n^e,t.i=i,n+(r^r>>>16)|0},function(e,t){var n,r,o,i,a,c=[],s=128;for(t===(0|t)?(r=t,t=null):(t+="\0",r=0,s=Math.max(s,t.length)),o=0,i=-32;i<s;++i)t&&(r^=t.charCodeAt((i+32)%t.length)),0===i&&(a=r),r^=r<<10,r^=r>>>15,r^=r<<4,r^=r>>>13,i>=0&&(a=a+1640531527|0,o=0==(n=c[127&i]^=r+a)?o+1:0);for(o>=128&&(c[127&(t&&t.length||0)]=-1),o=127,i=512;i>0;--i)r=c[o+34&127],n=c[o=o+1&127],r^=r<<13,n^=n<<17,r^=r>>>15,n^=n>>>12,c[o]=r^n;e.w=a,e.X=c,e.i=o}(t,e)}function c(e,t){return t.i=e.i,t.w=e.w,t.X=e.X.slice(),t}function s(e,t){null==e&&(e=+new Date);var n=new a(e),r=t&&t.state,o=function(){return(n.next()>>>0)/4294967296};return o.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},o.int32=n.next,o.quick=o,r&&(r.X&&c(r,n),o.state=function(){return c(n,{})}),o}o&&o.exports?o.exports=s:n(9)&&n(13)?void 0===(r=function(){return s}.call(t,n,t,o))||(o.exports=r):this.xor4096=s}(0,e,n(9))}).call(this,n(12)(e))},function(e,t,n){(function(e){var r;!function(e,o,i){function a(e){var t=this,n="";t.next=function(){var e=t.b,n=t.c,r=t.d,o=t.a;return e=e<<25^e>>>7^n,n=n-r|0,r=r<<24^r>>>8^o,o=o-e|0,t.b=e=e<<20^e>>>12^n,t.c=n=n-r|0,t.d=r<<16^n>>>16^o,t.a=o-e|0},t.a=0,t.b=0,t.c=-1640531527,t.d=1367130551,e===Math.floor(e)?(t.a=e/4294967296|0,t.b=0|e):n+=e;for(var r=0;r<n.length+20;r++)t.b^=0|n.charCodeAt(r),t.next()}function c(e,t){return t.a=e.a,t.b=e.b,t.c=e.c,t.d=e.d,t}function s(e,t){var n=new a(e),r=t&&t.state,o=function(){return(n.next()>>>0)/4294967296};return o.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},o.int32=n.next,o.quick=o,r&&("object"==typeof r&&c(r,n),o.state=function(){return c(n,{})}),o}o&&o.exports?o.exports=s:n(9)&&n(13)?void 0===(r=function(){return s}.call(t,n,t,o))||(o.exports=r):this.tychei=s}(0,e,n(9))}).call(this,n(12)(e))},function(e,t,n){var r;!function(o,i,a){var c,s=a.pow(256,6),l=a.pow(2,52),u=2*l;function f(e,t,n){var r=[],f=m(function e(t,n){var r,o=[],i=typeof t;if(n&&"object"==i)for(r in t)try{o.push(e(t[r],n-1))}catch(a){}return o.length?o:"string"==i?t:t+"\0"}((t=1==t?{entropy:!0}:t||{}).entropy?[e,b(i)]:null==e?function(){try{var e;return c&&(e=c.randomBytes)?e=e(256):(e=new Uint8Array(256),(o.crypto||o.msCrypto).getRandomValues(e)),b(e)}catch(r){var t=o.navigator,n=t&&t.plugins;return[+new Date,o,n,o.screen,b(i)]}}():e,3),r),h=new d(r),w=function(){for(var e=h.g(6),t=s,n=0;e<l;)e=256*(e+n),t*=256,n=h.g(1);for(;e>=u;)e/=2,t/=2,n>>>=1;return(e+n)/t};return w.int32=function(){return 0|h.g(4)},w.quick=function(){return h.g(4)/4294967296},w.double=w,m(b(h.S),i),(t.pass||n||function(e,t,n,r){return r&&(r.S&&p(r,h),e.state=function(){return p(h,{})}),n?(a.random=e,t):e})(w,f,"global"in t?t.global:this==a,t.state)}function d(e){var t,n=e.length,r=this,o=0,i=r.i=r.j=0,a=r.S=[];for(n||(e=[n++]);o<256;)a[o]=o++;for(o=0;o<256;o++)a[o]=a[i=255&i+e[o%n]+(t=a[o])],a[i]=t;(r.g=function(e){for(var t,n=0,o=r.i,i=r.j,a=r.S;e--;)t=a[o=255&o+1],n=256*n+a[255&(a[o]=a[i=255&i+t])+(a[i]=t)];return r.i=o,r.j=i,n})(256)}function p(e,t){return t.i=e.i,t.j=e.j,t.S=e.S.slice(),t}function m(e,t){for(var n,r=e+"",o=0;o<r.length;)t[255&o]=255&(n^=19*t[255&o])+r.charCodeAt(o++);return b(t)}function b(e){return String.fromCharCode.apply(0,e)}if(m(a.random(),i),e.exports){e.exports=f;try{c=n(41)}catch(h){}}else void 0===(r=function(){return f}.call(t,n,t,e))||(e.exports=r)}("undefined"!=typeof self?self:this,[],Math)},function(e,t){},function(e,t,n){var r=n(25);e.exports=function(e){if(Array.isArray(e))return r(e)}},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}},function(e,t,n){"use strict";var r=n(47);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){e.exports=function(e){return-1!==Function.toString.call(e).indexOf("[native code]")}},function(e,t,n){var r=n(19),o=n(52);function i(t,n,a){return o()?e.exports=i=Reflect.construct:e.exports=i=function(e,t,n){var o=[null];o.push.apply(o,t);var i=new(Function.bind.apply(e,o));return n&&r(i,n.prototype),i},i.apply(null,arguments)}e.exports=i},function(e,t){e.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}},function(e,t,n){"use strict";n.r(t);var r,o=n(0),i=n(3),a=n(14),c=n.n(a),s=n(2),l=n.n(s),u=n(6),f=n.n(u),d=n(10),p=n.n(d),m=n(7),b=n.n(m),h=n(26),w=n.n(h),O=n(1),g=n(8),v=n.n(g),y=n(11),x=n(5),j=n(15),E=n.n(j),L=(n(20),Object.freeze({THANK_YOU:"thank-you",CUSTOM_TEXT:"custom-text",REDIRECT:"redirect",RESULTS:"results"})),C=Object.freeze({THEME_DEFAULT:"theme-default",GEORGIA:"georgia",PALATINO:"palatino",TIMES_NEW_ROMAN:"times-new-roman",ARIAL:"arial",IMPACT:"impact",LUCIDA:"lucida",TAHOMA:"tahoma",TREBUCHET:"trebuchet",VERDANA:"verdana",COURIER:"courier",CABIN:"Cabin",CHIVO:"Chivo",OPEN_SANS:"Open+Sans",FIRA_SANS:"Fira+Sans",ROBOTO:"Roboto",NUNITO:"Nunito",OVERPASS:"Overpass",LATO:"Lato",LIBRE_FRANKLIN:"Libre+Franklin",MONTSERRAT:"Montserrat",POPPINS:"Poppins",RUBIK:"Rubik",RALEWAY:"Raleway",JOSEFIN_SANS:"Josefin+Sans",ALEGREYA_SANS:"Alegreya+Sans",OSWALD:"Oswald"}),S=Object.freeze([C.CABIN,C.CHIVO,C.OPEN_SANS,C.FIRA_SANS,C.ROBOTO,C.NUNITO,C.OVERPASS,C.LATO,C.LIBRE_FRANKLIN,C.MONTSERRAT,C.POPPINS,C.RUBIK,C.RALEWAY,C.JOSEFIN_SANS,C.ALEGREYA_SANS,C.OSWALD]),_=Object.freeze((r={},l()(r,C.THEME_DEFAULT,null),l()(r,C.GEORGIA,"Georgia, serif"),l()(r,C.PALATINO,'"Palatino Linotype", "Book Antiqua", Palatino, serif'),l()(r,C.TIMES_NEW_ROMAN,'"Times New Roman", Times, serif'),l()(r,C.ARIAL,"Arial, Helvetica, sans-serif"),l()(r,C.IMPACT,"Impact, Charcoal, sans-serif"),l()(r,C.LUCIDA,'"Lucida Sans Unicode", "Lucida Grande", sans-serif'),l()(r,C.TAHOMA,"Tahoma, Geneva, sans-serif"),l()(r,C.TREBUCHET,'"Trebuchet MS", Helvetica, sans-serif'),l()(r,C.VERDANA,"Verdana, Geneva, sans-serif"),l()(r,C.COURIER,'"Courier New", Courier, monospace'),l()(r,C.CABIN,'"Cabin", sans-serif'),l()(r,C.CHIVO,'"Chivo", sans-serif'),l()(r,C.OPEN_SANS,'"Open Sans", sans-serif'),l()(r,C.FIRA_SANS,'"Fira Sans", sans-serif'),l()(r,C.ROBOTO,'"Roboto", sans-serif'),l()(r,C.NUNITO,'"Nunito", sans-serif'),l()(r,C.OVERPASS,'"Overpass", sans-serif'),l()(r,C.LATO,'"Lato", sans-serif'),l()(r,C.LIBRE_FRANKLIN,'"Libre Franklin", sans-serif'),l()(r,C.MONTSERRAT,'"Montserrat", sans-serif'),l()(r,C.POPPINS,'"Poppins", sans-serif'),l()(r,C.RUBIK,'"Rubik", sans-serif'),l()(r,C.RALEWAY,'"Raleway", sans-serif'),l()(r,C.JOSEFIN_SANS,'"Josefin Sans", sans-serif'),l()(r,C.ALEGREYA_SANS,'"Alegreya Sans", sans-serif'),l()(r,C.OSWALD,'"Oswald", sans-serif'),r)),N=Object.freeze({OPEN:"open",CLOSED:"closed",CLOSED_AFTER:"closed-after"}),A=Object.freeze({SHOW_RESULTS:"show-results",SHOW_CLOSED_BANNER:"show-closed-banner",HIDDEN:"hidden"}),k=(Object.freeze({CONNECTED:"connected",NOT_CONNECTED:"not-connected",NOT_VERIFIED:"not-verified"}),Object.freeze({RADIO:"radio",BUTTON:"button"})),T=Object.freeze({LIST:"list",INLINE:"inline"}),R=function(e){return Object(O.includes)(C,e)?_[e]:null},I=function(e){return!e||"string"!=typeof e||-1===e.indexOf("rgb")&&0!==e.indexOf("#")||-1<e.indexOf("rgba")?null:(0===e.indexOf("#")&&(e=M(e)),e.match(/\((.*?)\)/)[1])},M=function(e){var t=0,n=0,r=0,o=4===e.length?"#".concat(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]):e;return 7===o.length&&(t=parseInt(o.substr(1,2),16)||0,n=parseInt(o.substr(3,2),16)||0,r=parseInt(o.substr(5,2),16)||0),"rgb(".concat(t,", ").concat(n,", ").concat(r,")")},P=n(27),F=n.n(P),B=n(16),D=function(e){var t=e.children;return Object(o.createElement)("div",{className:"crowdsignal-forms__style-probe"},t)},U=function(e){var t=e.hasVoted,n=e.isPollClosed,r=e.isPollHidden,i=e.showSubmitMessage,a=v()({"is-transparent":i},"crowdsignal-forms-poll__closed-banner");return Object(o.createElement)("div",{className:a},r&&Object(x.__)("This Poll is Hidden","crowdsignal-forms"),n&&!r&&Object(x.__)("This Poll is Closed","crowdsignal-forms"),t&&Object(x.__)("Thanks For Voting!","crowdsignal-forms"))},Z=n(4),V=n.n(Z),q=n(18),H=n.n(q),W=n(21),z=n.n(W),G=n(22),Y=n.n(G),K=n(28),J=n.n(K),X=n(17),Q=n.n(X),$=n(29),ee=n.n($);n(23);function te(e){return function(){var t,n=Q()(e);if(ne()){var r=Q()(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return J()(this,t)}}function ne(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var re=function(){var e=p()(f.a.mark((function e(t){var n,r,o=arguments;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=!(o.length>1&&void 0!==o[1])||o[1],r="https://api.crowdsignal.com/v3/polls",n){e.next=4;break}return e.abrupt("return",null);case 4:return e.abrupt("return",window.fetch("".concat(r,"/").concat(t,"/results"),{method:"GET",headers:{"content-type":"application/json"}}).then((function(e){if(e.status>=200&&e.status<300)return e.json();throw e})).then((function(e){if(404===e.status)return{};if(e.error)throw new Error(e.message);return e.results.votes_by_answer})));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),oe=function(){var e=p()(f.a.mark((function e(t){var n,r,o;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"5430eeac3911395001d731d9702fc38b",n=(new Date).getTime(),e.next=4,window.fetch("https://polldaddy.com/n/".concat("5430eeac3911395001d731d9702fc38b","/").concat(t,"?").concat(n,"&format=json"));case 4:if((r=e.sent).ok){e.next=7;break}throw new ce;case 7:return e.next=9,r.json();case 9:if((o=e.sent).nonce){e.next=12;break}throw new ce;case 12:return e.abrupt("return",o.nonce);case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ie=function(){var e=p()(f.a.mark((function e(t,n,r,o){var i,a,c;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=r.join(","),e.next=3,window.fetch("https://polls.polldaddy.com/vote-js.php?format=json&p=".concat(n,"&b=1&a=").concat(i,"&o=&va=16&cookie=0&n=").concat(t,"&url=").concat(encodeURIComponent(window.location),"&vi=").concat(o));case 3:if((a=e.sent).ok){e.next=6;break}throw new ce;case 6:return e.next=8,a.json();case 8:if("error"!==(c=e.sent).status){e.next=11;break}throw new ae(c.error);case 11:case"end":return e.stop()}}),e)})));return function(t,n,r,o){return e.apply(this,arguments)}}(),ae=function(e){Y()(n,e);var t=te(n);function n(){return z()(this,n),t.apply(this,arguments)}return n}(ee()(Error)),ce=function(e){Y()(n,e);var t=te(n);function n(){return z()(this,n),t.call(this,Object(x.__)("Server error. Please try again.","crowdsignal-forms"))}return n}(ae),se=function(e,t){var n=Object(i.useState)(null),r=b()(n,2),o=r[0],a=r[1],c=Object(i.useState)(null),s=b()(c,2),l=s[0],u=s[1],f=Object(i.useState)(!0),d=b()(f,2),p=d[0],m=d[1];return Object(i.useEffect)((function(){m(!0),u(null),a(null),e().then(a).catch(u).finally((function(){return m(!1)}))}),t),{data:o,error:l,loading:p}},le=function(e){var t=e.error,n=e.loading,r=e.text,i=e.totalVotes,a=e.votes,c=v()("crowdsignal-forms-poll__answer-results",{"is-error":t,"is-loading":n}),s=!n&&!t,l=0===i?0:100*a/i,u={width:"".concat(parseInt(l,10),"%")};return Object(o.createElement)("div",{className:c},Object(o.createElement)("div",{className:"crowdsignal-forms-poll__answer-results-labels"},Object(o.createElement)("span",{className:"crowdsignal-forms-poll__answer-results-answer"},Object(y.decodeEntities)(r)),Object(o.createElement)("span",{className:"crowdsignal-forms-poll__answer-results-votes"},s&&Object(x.sprintf)(Object(x._n)("%s vote","%s votes",a,"crowdsignal-forms"),a.toLocaleString())),Object(o.createElement)("span",{className:"crowdsignal-forms-poll__answer-results-percent"},s&&"".concat(l.toFixed(2),"%"))),Object(o.createElement)("div",{className:"crowdsignal-forms-poll__answer-results-progress-track"},Object(o.createElement)("div",{className:"crowdsignal-forms-poll__answer-results-progress-bar",style:u})))};le.propTypes={loading:V.a.bool,text:V.a.string.isRequired,totalVotes:V.a.number,votes:V.a.number};var ue=le,fe=Object(o.createElement)("span",null,"Hide Crowdsignal ads",Object(o.createElement)("br",null),"and get unlimited",Object(o.createElement)("br",null),"signals -"," ",Object(o.createElement)("a",{href:"https://crowdsignal.com/pricing",target:"_blank",rel:"noopener noreferrer"},"Upgrade")),de=function(e){var t=e.showLogo,n=e.editing;return Object(o.createElement)("div",{className:"crowdsignal-forms-poll__footer-branding"},Object(o.createElement)("div",null,Object(o.createElement)("a",{className:"crowdsignal-forms-poll__footer-cs-link",href:"https://crowdsignal.com?ref=cs-forms-poll",target:"_blank",rel:"noopener noreferrer"},Object(x.__)("Create your own poll with Crowdsignal","crowdsignal-forms")),n&&Object(o.createElement)(B.Tooltip,{text:fe,position:"top center"},Object(o.createElement)("a",{href:"https://crowdsignal.com/pricing",target:"_blank",rel:"noopener noreferrer",className:"crowdsignal-forms__branding-promote"},Object(x.__)("Hide","crowdsignal-forms")))),t&&Object(o.createElement)("img",{className:"crowdsignal-forms-poll__footer-branding-logo",src:"https://app.crowdsignal.com/images/svg/cs-logo-dots.svg",alt:"Crowdsignal sticker"}))};var pe=function(e){var t=e.answers,n=e.pollIdFromApi,r=e.setErrorMessage,a=e.hideBranding,c=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=se((function(){return re(e,t)}),[e]),r=n.data,o=n.error,i=n.loading;return{error:o,loading:i,results:r}}(n),s=c.error,l=c.loading,u=c.results;Object(i.useEffect)((function(){r(s?Object(x.__)("Unfortunately, we're having some trouble retrieving the results for this poll at this time.","crowdsignal-forms"):"")}),[s]);var f=v()("crowdsignal-forms-poll__results",{"is-error":!!s,"is-loading":l}),d=Object(O.sum)(Object(O.values)(u));return Object(o.createElement)("div",{className:f},Object(o.createElement)("div",{className:"crowdsignal-forms-poll__results-list"},Object(O.map)(t,(function(e){var t;return!function(e){return Object(O.isEmpty)(e)||void 0===e.text||null===e.text||""===e.text}(e)&&Object(o.createElement)(ue,{key:e.answerId,error:!!s,loading:l,text:e.text,totalVotes:d,votes:u&&null!==(t=u[e.answerIdFromApi])&&void 0!==t?t:0})}))),Object(o.createElement)("div",{className:"crowdsignal-forms-poll__results-footer"},Object(o.createElement)("span",{className:"crowdsignal-forms-poll__results-total"},Object(x.sprintf)(Object(x._n)("%s total vote","%s total votes",d,"crowdsignal-forms"),d?d.toLocaleString():0)),!a&&Object(o.createElement)(de,null)))};pe.propTypes={pollIdFromApi:V.a.number,answers:V.a.arrayOf(V.a.shape({answerId:V.a.string.isRequired,answerIdFromApi:V.a.number,text:V.a.string})).isRequired,setErrorMessage:V.a.func.isRequired,hideBranding:V.a.bool};var me=pe,be=function(e){var t=e.answerIdFromApi,n=e.answerStyle,r=e.hasVoted,i=e.isMultipleChoice,a=e.isSelected,c=e.isVoting,s=e.isFocused,l=e.onSelect,u=e.onFocus,f=e.text,d=function(e){return l(parseInt(e.target.attributes.answerid.value,10))},p=function(e){return u(parseInt(e.target.attributes.answerid.value,10))},m=function(e){e.preventDefault(),d(e)},b=v()("crowdsignal-forms-poll__answer",{"is-multiple-choice":i,"is-selected":a,"is-focused":s,"is-button":k.BUTTON===n}),h="poll-answer-".concat(t);return Object(o.createElement)("div",{className:b},k.RADIO===n&&Object(o.createElement)("label",{className:b,htmlFor:h,tabIndex:"-1"},Object(o.createElement)("input",{className:"crowdsignal-forms-poll__input",id:h,name:"answer",onChange:d,selected:a,type:i?"checkbox":"radio",answerid:t,disabled:r||c,tabIndex:"0","aria-label":f,onFocus:p}),Object(o.createElement)("span",{className:"crowdsignal-forms-poll__check"}),Object(o.createElement)("div",{className:"crowdsignal-forms-poll__answer-label-wrapper"},Object(o.createElement)("span",{className:"crowdsignal-forms-poll__answer-label"},Object(y.decodeEntities)(f)))),k.BUTTON===n&&Object(o.createElement)("div",{className:"wp-block-button crowdsignal-forms-poll__block-button"},Object(o.createElement)("input",{type:"submit",className:"wp-block-button__link crowdsignal-forms-poll__submit-button",value:Object(y.decodeEntities)(f),answerid:t,onClick:m})))};be.propTypes={answerIdFromApi:V.a.number.isRequired,hasVoted:V.a.bool,isMultipleChoice:V.a.bool,isSelected:V.a.bool,isVoting:V.a.bool,onSelect:V.a.func.isRequired,text:V.a.string.isRequired};var he=be,we=function(e){var t=e.answers,n=e.answerStyle,r=e.buttonAlignment,a=e.hasVoted,s=e.isMultipleChoice,l=e.isVoting,u=e.onSubmit,f=e.submitButtonLabel,d=e.hideBranding,p=Object(i.useState)([]),m=b()(p,2),h=m[0],w=m[1],g=function(e){return k.BUTTON===n?(w([e]),u([e])):s?Object(O.includes)(h,e)?w(Object(O.without)(h,e)):void w([].concat(E()(h),[e])):w([e])},y=Object(i.useState)([]),x=b()(y,2),j=x[0],L=x[1],C=function(e){return L([e])},S=v()({"is-button":k.BUTTON===n,"is-inline-button-alignment":T.INLINE===r},"crowdsignal-forms-poll__options");return Object(o.createElement)("form",{className:"crowdsignal-forms-poll__form",onSubmit:function(e){e.preventDefault(),u(h)}},Object(o.createElement)("div",{className:S},Object(O.map)(t,(function(e,t){return Object(o.createElement)(he,c()({key:"poll-answer-".concat(t),answerStyle:n,isMultipleChoice:s,isSelected:Object(O.includes)(h,e.answerIdFromApi),isFocused:Object(O.includes)(j,e.answerIdFromApi),onSelect:g,onFocus:C,hasVoted:a,isVoting:l},e))}))),!a&&k.RADIO===n&&Object(o.createElement)("div",{className:"crowdsignal-forms-poll__actions"},Object(o.createElement)("div",{className:"wp-block-button crowdsignal-forms-poll__block-button"},Object(o.createElement)("input",{type:"submit",className:"wp-block-button__link crowdsignal-forms-poll__submit-button",disabled:l||!h.length,value:f}))),!d&&Object(o.createElement)("div",{className:"wp_block-crowdsignal-forms-poll__vote-branding"},Object(o.createElement)(de,{showLogo:!1})))};we.propTypes={answers:V.a.array.isRequired,isMultipleChoice:V.a.bool,onSubmit:V.a.func.isRequired,submitButtonLabel:V.a.string.isRequired};var Oe=we,ge=function(e){for(var t=window.getComputedStyle(e).backgroundColor;"rgba(0, 0, 0, 0)"===t&&e.parentNode&&e.parentNode.nodeType===window.Node.ELEMENT_NODE;)e=e.parentNode,t=window.getComputedStyle(e).backgroundColor;return t},ve=function(e){var t=e.children;return Object(o.createElement)("div",{className:"crowdsignal-forms-poll__error-banner"},t)},ye=function(){return Object(o.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)("path",{d:"M0 12C0 5.37258 5.37258 0 12 0C18.6274 0 24 5.37258 24 12C24 18.6274 18.6274 24 12 24C5.37258 24 0 18.6274 0 12Z",fill:"white"}),Object(o.createElement)("mask",{id:"maskClose","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:"5",y:"5",width:"14",height:"14"},Object(o.createElement)("path",{d:"M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41Z",fill:"white"})),Object(o.createElement)("g",{mask:"url(#maskClose)"},Object(o.createElement)("rect",{width:"24",height:"24",fill:"black"})))},xe=function(){return Object(o.createElement)("svg",{width:"34",height:"34",viewBox:"0 0 34 34",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.6667 0C7.46667 0 0 7.46667 0 16.6667C0 25.8667 7.46667 33.3333 16.6667 33.3333C25.8667 33.3333 33.3333 25.8667 33.3333 16.6667C33.3333 7.46667 25.8667 0 16.6667 0ZM16.6667 30C9.31667 30 3.33333 24.0167 3.33333 16.6667C3.33333 9.31667 9.31667 3.33333 16.6667 3.33333C24.0167 3.33333 30 9.31667 30 16.6667C30 24.0167 24.0167 30 16.6667 30ZM13.3333 20.2833L24.3167 9.3L26.6667 11.6667L13.3333 25L6.66667 18.3333L9.01667 15.9833L13.3333 20.2833Z",fill:"var(--crowdsignal-forms-submit-button-bg-color)"}),Object(o.createElement)("mask",{id:"maskCheck","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"34",height:"34"},Object(o.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.6667 0C7.46667 0 0 7.46667 0 16.6667C0 25.8667 7.46667 33.3333 16.6667 33.3333C25.8667 33.3333 33.3333 25.8667 33.3333 16.6667C33.3333 7.46667 25.8667 0 16.6667 0ZM16.6667 30C9.31667 30 3.33333 24.0167 3.33333 16.6667C3.33333 9.31667 9.31667 3.33333 16.6667 3.33333C24.0167 3.33333 30 9.31667 30 16.6667C30 24.0167 24.0167 30 16.6667 30ZM13.3333 20.2833L24.3167 9.3L26.6667 11.6667L13.3333 25L6.66667 18.3333L9.01667 15.9833L13.3333 20.2833Z"})),Object(o.createElement)("g",{mask:"url(#maskCheck)"}))},je=function(e){var t=e.className;return Object(o.createElement)("svg",{width:"88",height:"88",viewBox:"0 0 88 88",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t},Object(o.createElement)("g",{filter:"url(#filterThankYou)"},Object(o.createElement)("path",{d:"M44 80C66.0914 80 84 62.0914 84 40C84 17.9086 66.0914 0 44 0C21.9086 0 4 17.9086 4 40C4 62.0914 21.9086 80 44 80Z",fill:"#384869"}),Object(o.createElement)("path",{d:"M26.0226 27.1047L27.2135 22.9517L28.6403 23.3609L29.0032 22.0954L24.5573 20.8206L24.1945 22.086L25.6214 22.4952L24.4305 26.6481L26.0226 27.1047ZM33.0856 29.1299L34.6393 23.7116L33.0472 23.2551L32.4572 25.3128L30.5497 24.7658L31.1397 22.7081L29.5476 22.2516L27.9939 27.6699L29.586 28.1265L30.1868 26.0312L32.0943 26.5782L31.4935 28.6734L33.0856 29.1299ZM37.4113 30.3703L39.1085 30.857L38.8937 24.9315L36.896 24.3587L33.5738 29.2699L35.1959 29.7351L35.7865 28.7381L37.4387 29.2119L37.4113 30.3703ZM37.4837 25.8804L37.5138 25.889L37.4715 28.0063L36.3976 27.6983L37.4837 25.8804ZM41.0986 31.4276L41.9169 28.5739L41.947 28.5825L43.2352 32.0403L44.4556 32.3902L46.0092 26.9719L44.5073 26.5412L43.7019 29.3499L43.6719 29.3412L42.3857 25.9328L41.1504 25.5786L39.5967 30.997L41.0986 31.4276ZM46.7986 33.0621L47.2056 31.6427L47.7936 31.1936L48.4057 33.5229L50.2569 34.0537L49.2542 30.5072L51.728 28.6117L50.0571 28.1325L47.7234 29.9504L47.6934 29.9417L48.3523 27.6437L46.7602 27.1872L45.2065 32.6056L46.7986 33.0621ZM55.281 35.4944L55.7731 33.7784L58.6859 30.6068L57.0225 30.1298L55.4426 32.0541L55.4125 32.0455L55.0924 29.5764L53.3914 29.0887L54.181 33.3218L53.6889 35.0378L55.281 35.4944ZM61.4239 31.2903C59.7492 30.8101 58.3861 31.5815 57.8897 33.3125C57.3934 35.0435 58.1379 36.4152 59.8163 36.8964C61.491 37.3767 62.853 36.6091 63.3494 34.878C63.8458 33.147 63.0986 31.7705 61.4239 31.2903ZM61.0599 32.5595C61.7246 32.7501 61.9964 33.4742 61.7273 34.4129C61.4592 35.3479 60.8486 35.8189 60.1803 35.6273C59.5119 35.4356 59.2438 34.7126 59.5119 33.7776C59.781 32.8389 60.3953 32.3689 61.0599 32.5595ZM66.3384 32.8012L64.7463 32.3446L63.7461 35.833C63.3918 37.0683 64.1232 38.1314 65.5539 38.5417C66.9845 38.9519 68.1681 38.4379 68.5223 37.2025L69.5226 33.7142L67.9305 33.2577L66.9809 36.5695C66.8172 37.1403 66.4462 37.3712 65.9318 37.2237C65.4174 37.0762 65.2251 36.6838 65.3888 36.113L66.3384 32.8012ZM36.4693 42.5838L37.0195 40.665L39.0246 41.24L39.367 40.0459L37.3619 39.4709L37.6601 38.4308L39.8755 39.0661L40.2384 37.8007L36.4309 36.7089L34.8772 42.1273L36.4693 42.5838ZM43.4269 38.6134C41.7522 38.1332 40.3892 38.9045 39.8928 40.6356C39.3964 42.3666 40.141 43.7382 41.8194 44.2195C43.4941 44.6997 44.8561 43.9321 45.3525 42.2011C45.8488 40.4701 45.1016 39.0936 43.4269 38.6134ZM43.063 39.8826C43.7276 40.0731 43.9995 40.7972 43.7303 41.7359C43.4622 42.6709 42.8517 43.142 42.1833 42.9503C41.515 42.7587 41.2468 42.0357 41.5149 41.1007C41.7841 40.162 42.3984 39.692 43.063 39.8826ZM48.0045 41.2995L48.6654 41.489C49.0934 41.6117 49.2996 41.9838 49.1844 42.3856C49.0671 42.7948 48.7144 42.9904 48.2675 42.8622L47.6104 42.6738L48.0045 41.2995ZM47.3089 43.7252L47.8309 43.8748L48.1659 45.9377L49.9457 46.4481L49.5058 44.0991C50.1503 43.9913 50.6348 43.4638 50.8179 42.8255C51.1506 41.6652 50.602 40.7724 49.1563 40.3579L46.7494 39.6677L45.1957 45.086L46.7878 45.5426L47.3089 43.7252ZM26.5905 52.2347L29.7888 47.2879L28.0315 46.784L26.0433 50.4442L26.0133 50.4356L26.2667 46.278L24.4343 45.7525L24.5253 51.6425L26.5905 52.2347ZM32.7521 48.036C31.0774 47.5558 29.7143 48.3272 29.218 50.0582C28.7216 51.7892 29.4661 53.1608 31.1446 53.6421C32.8193 54.1223 34.1813 53.3547 34.6776 51.6237C35.174 49.8927 34.4268 48.5162 32.7521 48.036ZM32.3882 49.3052C33.0528 49.4958 33.3247 50.2199 33.0555 51.1586C32.7874 52.0936 32.1769 52.5646 31.5085 52.373C30.8401 52.1813 30.572 51.4583 30.8401 50.5233C31.1093 49.5846 31.7236 49.1146 32.3882 49.3052ZM37.0705 55.2398L38.2613 51.0868L39.6882 51.496L40.0511 50.2306L35.6052 48.9557L35.2424 50.2211L36.6692 50.6303L35.4784 54.7832L37.0705 55.2398ZM40.6339 56.2616L42.1876 50.8432L40.5955 50.3867L39.0418 55.805L40.6339 56.2616ZM42.8869 56.9076L43.7052 54.0538L43.7352 54.0625L45.0234 57.5202L46.2438 57.8702L47.7975 52.4518L46.2955 52.0211L45.4901 54.8298L45.4601 54.8212L44.174 51.4128L42.9386 51.0585L41.3849 56.4769L42.8869 56.9076ZM52.7701 57.2465L52.9747 56.533L50.6166 55.8569L50.3129 56.9157L51.139 57.1526L51.11 57.2256C50.94 57.6482 50.4891 57.8318 49.9709 57.6832C49.2725 57.483 48.9872 56.7632 49.2704 55.7756C49.5471 54.8106 50.1045 54.369 50.7804 54.5628C51.2385 54.6942 51.5209 55.0556 51.5119 55.4837L53.0777 55.9327C53.2763 54.7868 52.4918 53.6963 51.1325 53.3065C49.4615 52.8274 48.1511 53.5569 47.6418 55.333C47.1261 57.1316 47.854 58.4335 49.5738 58.9266C51.1471 59.3778 52.3448 58.7297 52.7701 57.2465ZM54.5376 54.3845L53.6262 58.0731L54.9329 58.4477L56.1146 54.8367L54.5376 54.3845ZM53.7294 60.1792C54.1649 60.3041 54.6201 60.077 54.7407 59.6564C54.8603 59.2396 54.5945 58.8058 54.159 58.681C53.7159 58.5539 53.2644 58.782 53.1449 59.1988C53.0243 59.6194 53.2863 60.0521 53.7294 60.1792Z",fill:"white"}),Object(o.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M44 75.2C63.4405 75.2 79.2 59.4404 79.2 40C79.2 20.5596 63.4405 4.80002 44 4.80002C24.5596 4.80002 8.80005 20.5596 8.80005 40C8.80005 59.4404 24.5596 75.2 44 75.2Z",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeDasharray:"0.1 4"})),Object(o.createElement)("defs",null,Object(o.createElement)("filter",{id:"filterThankYou",x:"0",y:"0",width:"88",height:"88",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},Object(o.createElement)("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),Object(o.createElement)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),Object(o.createElement)("feOffset",{dy:"4"}),Object(o.createElement)("feGaussianBlur",{stdDeviation:"2"}),Object(o.createElement)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"}),Object(o.createElement)("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),Object(o.createElement)("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"}))))},Ee=function(e){var t=e.target;t&&(t.paused?t.play():t.pause())},Le=function(e){var t=e.confirmMessageType,n=e.customConfirmMessage,r=e.setDismissSubmitMessage,i=e.hideBranding;return Object(o.createElement)("div",{className:"crowdsignal-forms-poll__submit-message-container"},Object(o.createElement)("div",{className:"crowdsignal-forms-poll__submit-message"},L.THANK_YOU===t&&Object(o.createElement)(o.Fragment,null,Object(o.createElement)("video",{muted:!0,autoPlay:!0,loop:!0,playsInline:!0,poster:"https://crowdsignal.files.wordpress.com/2020/02/thumbs-up-video-placeholder.jpg",width:"100%",onClick:Ee},Object(o.createElement)("source",{src:"https://crowdsignal.files.wordpress.com/2019/08/thumbs-up-cs.mp4",type:"video/mp4"})),Object(o.createElement)(je,{className:"crowdsignal-forms-poll__thank-you-sticker"}),!i&&Object(o.createElement)("img",{className:"crowdsignal-forms-poll__thank-you-cs-sticker",src:"https://app.crowdsignal.com/images/svg/cs-logo-dots.svg",alt:"Crowdsignal sticker"})),L.CUSTOM_TEXT===t&&Object(o.createElement)(o.Fragment,null,Object(o.createElement)("div",{className:"crowdsignal-forms-poll__custom-message-check"},Object(o.createElement)(xe,null)),Object(o.createElement)("div",{className:"crowdsignal-forms-poll__custom-message"},Object(O.isEmpty)(n)?Object(x.__)("Thanks for voting!","crowdsignal-forms"):n)),Object(o.createElement)("button",{className:"crowdsignal-forms-poll__dismiss-submit-message",onClick:function(){return r(!0)}},Object(o.createElement)(ye,null))),Object(o.createElement)("div",{className:"crowdsignal-forms-poll__submit-message-footer"},!i&&Object(o.createElement)(de,{showLogo:L.THANK_YOU!==t})))};function Ce(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Se(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ce(Object(n),!0).forEach((function(t){l()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ce(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var _e,Ne,Ae=(_e=function(){return Object(o.createElement)(o.Fragment,null,Object(o.createElement)("p",null),Object(o.createElement)("h3",null,"Question"),Object(o.createElement)("div",{className:"wp-block-button"},Object(o.createElement)("div",{className:"wp-block-button__link"})),Object(o.createElement)("div",{className:"entry-content"},Object(o.createElement)("div",{className:"alignwide"})))},Ne=function(e){if(null===e)return{};var t,n=e.querySelector(".wp-block-button__link"),r=e.querySelector("p"),o=e.querySelector("h3"),i=e.querySelector(".alignwide"),a=ge(n),c=ge(r),s=window.getComputedStyle(r).color;if(a===c){var l=(t=n,"0px"!==window.getComputedStyle(t).borderBlockStartWidth?window.getComputedStyle(t).borderBlockStartColor:null);a=l||s}return{accent:a,surface:c,text:s,bodyFontFamily:window.getComputedStyle(r).fontFamily,questionFontFamily:window.getComputedStyle(o).fontFamily,textInverted:window.getComputedStyle(n).color,contentWideWidth:window.getComputedStyle(i).maxWidth}},function(e){return Object(B.withFallbackStyles)((function(e){return{fallbackStyles:Ne(e.querySelector(".crowdsignal-forms__style-probe"))}}))((function(t){var n=t.fallbackStyles,r=F()(t,["fallbackStyles"]);return Object(o.createElement)(e,c()({fallbackStyles:n||{},renderStyleProbe:function(){return n?null:Object(o.createElement)(D,null,Object(o.createElement)(_e,null))}},r))}))})((function(e){var t=e.attributes,n=e.fallbackStyles,r=e.renderStyleProbe,a=Object(i.useState)(Math.random()),s=b()(a,1)[0],l=Object(i.useState)(""),u=b()(l,2),d=u[0],m=u[1],h=Object(i.useState)(!1),g=b()(h,2),j=g[0],E=g[1],_=t.apiPollData,T=_.id,M=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r="cs-poll-".concat(e),o=Object(i.useState)(!1),a=b()(o,2),c=a[0],s=a[1],l=Object(i.useState)(!1),u=b()(l,2),d=u[0],m=u[1],h=Object(i.useState)(""),w=b()(h,2),O=w[0],g=w[1];Object(i.useEffect)((function(){t&&void 0!==H.a.get(r)&&(m(!0),g(H.a.get(r)))}),[]);var v=function(){var o=p()(f.a.mark((function o(i){var a,c,l,u=arguments;return f.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return a=u.length>1&&void 0!==u[1]?u[1]:1,o.prev=1,s(!0),o.next=5,oe(e);case 5:return c=o.sent,o.next=8,ie(c,e,i,a);case 8:m(!0),t&&(l=n?i.join(","):(new Date).getTime(),H.a.set(r,l,{sameSite:"Strict",expires:365}),g(l));case 10:return o.prev=10,s(!1),o.finish(10);case 13:case"end":return o.stop()}}),o,null,[[1,,10,13]])})));return function(e){return o.apply(this,arguments)}}();return{hasVoted:d,isVoting:c,vote:v,storedCookieValue:O}}(T,t.hasOneResponsePerComputer),P=M.hasVoted,F=M.isVoting,B=M.vote;L.REDIRECT===t.confirmMessageType&&(t.confirmMessageType=L.THANK_YOU);var D=function(){var e=p()(f.a.mark((function e(t){return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,m(""),E(!1),e.next=5,B(t);case 5:e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),e.t0 instanceof ae?m(e.t0.message):m(Object(x.__)("Server error. Please try again.","crowdsignal-forms"));case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}(),Z=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Date;if(N.CLOSED===e)return!0;if(N.CLOSED_AFTER===e){var r=new Date(t);return r<n}return!1}(t.pollStatus,t.closedAfterDateTime);if(Z&&A.HIDDEN===t.closedPollState)return null;var V=Z&&A.SHOW_RESULTS===t.closedPollState||P&&L.RESULTS===t.confirmMessageType,q=P&&!V&&!j,W=L.THANK_YOU===t.confirmMessageType,z=function(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return v()({"has-bg-color":e.backgroundColor,"has-text-color":e.textColor,"has-submit-button-bg-color":e.submitButtonBackgroundColor,"has-submit-button-text-color":e.submitButtonTextColor,"has-border-radius":null!==(t=e.borderRadius)&&void 0!==t&&t,"has-box-shadow":e.hasBoxShadow},r)}(t,t.className,"crowdsignal-forms-poll",{"has-voted":P,"is-closed":Z,"is-voting":F,"has-default-thankyou":W}),G=Se({width:"full"!==t.align?"".concat(t.width,"%"):"auto"},function(e,t){var n,r,o,i,a=Object(O.isEmpty)(e.textColor)?t.text:e.textColor;return Object(O.mapKeys)({borderColor:null!==(n=e.borderColor)&&void 0!==n?n:t.accent,borderRadius:"".concat(e.borderRadius,"px"),borderWidth:"".concat(e.borderWidth,"px"),bgColor:e.backgroundColor,bodyFontFamily:null!==(r=R(e.fontFamily))&&void 0!==r?r:t.bodyFontFamily,questionFontFamily:null!==(o=R(e.fontFamily))&&void 0!==o?o:t.questionFontFamily,submitButtonBgColor:e.submitButtonBackgroundColor||t.accent,submitButtonTextColor:e.submitButtonTextColor||t.textInverted,textColor:a,textColorProperties:null!==(i=I(a))&&void 0!==i?i:"0, 0, 0",contentWideWidth:t.contentWideWidth},(function(e,t){return"--crowdsignal-forms-".concat(Object(O.kebabCase)(t))}))}(t,n)),Y=Object(O.reduce)(_.answers,(function(e,t){return e[t.client_id]=t.id,e}),{}),K=Object(O.map)(t.answers,(function(e){return Se({},e,{answerIdFromApi:Y[e.answerId]})})),J=function(e,t){for(var n=e.slice(),r=n.length-1;r>0;r--){var o=Math.floor(t()*r),i=n[r];n[r]=n[o],n[o]=i}return n}(Object(O.filter)(K,(function(e){return!!e.text})),t.randomizeAnswers?new w.a(s):function(){return 1}),X=v()({"is-transparent":q},"crowdsignal-forms-poll__content"),Q=function(e,t){return e.isMultipleChoice?k.RADIO:!Object(O.isEmpty)(t)&&t.indexOf("is-style-buttons")>-1?k.BUTTON:k.RADIO}(t,t.className);return t.fontFamily&&function(e){if(!Object(O.isEmpty)(e)&&C.THEME_DEFAULT!==e&&-1!==S.indexOf(e)){var t="https://fonts.googleapis.com/css2?family=".concat(e,":wght@400;600;700&display=swap");0===Object(O.filter)(Array.from(document.head.childNodes),(function(e){return"link"===e.nodeName.toLowerCase()&&e.href===t})).length&&document.head.appendChild(Object(O.tap)(document.createElement("link"),(function(e){e.type="text/css",e.rel="stylesheet",e.href=t})))}}(t.fontFamily),Object(o.createElement)("div",{className:z,style:G},d&&Object(o.createElement)(ve,null,d),Object(o.createElement)("div",{className:X},Object(o.createElement)("h3",{className:"crowdsignal-forms-poll__question"},Object(y.decodeEntities)(t.question)),t.note&&Object(o.createElement)("p",{className:"crowdsignal-forms-poll__note"},Object(y.decodeEntities)(t.note)),!V&&Object(o.createElement)(Oe,{answers:J,answerStyle:Q,buttonAlignment:t.buttonAlignment,isMultipleChoice:t.isMultipleChoice,onSubmit:D,submitButtonLabel:t.submitButtonLabel,hasVoted:P,isVoting:F,hideBranding:t.hideBranding}),V&&Object(o.createElement)(me,{pollIdFromApi:T,answers:J,setErrorMessage:m,hideBranding:t.hideBranding})),q&&Object(o.createElement)(Le,c()({},t,{setDismissSubmitMessage:E})),(Z||P)&&Object(o.createElement)(U,{showSubmitMessage:q,isPollClosed:Z,hasVoted:P}),r())})),ke=n(30),Te=function(e,t){return Object(O.forEach)(document.querySelectorAll("div[".concat(e,"]")),(function(n){try{var r=JSON.parse(n.dataset[Object(O.camelCase)(e.substr("data-".length))]),o=t(r,n);n.removeAttribute(e),Object(ke.render)(o,n)}catch(i){console.error("Crowdsignal Forms: Failed to parse block data for: %s",e)}}))},Re=function(e,t){(Object(O.isEmpty)(window.CrowdsignalMutationObservers)||!0!==window.CrowdsignalMutationObservers[e])&&(new window.MutationObserver((function(){return Te(e,t)})).observe(document.body,{attributes:!0,attributeFilter:[e],childList:!0,subtree:!0}),Object(O.isEmpty)(window.CrowdsignalMutationObservers)&&(window.CrowdsignalMutationObservers=[]),window.CrowdsignalMutationObservers[e]=!0,Te(e,t))};(function(e,t){if("complete"===document.readyState)return Re(e,t);window.addEventListener("load",(function(){return Re(e,t)}))})("data-crowdsignal-poll",(function(e){return Object(o.createElement)(Ae,{attributes:e})}))}]));
10
  *
11
  * Copyright 2006, 2015 Klaus Hartl & Fagner Brack
12
  * Released under the MIT license
13
+ */!function(i){if(void 0===(o="function"==typeof(r=i)?r.call(t,n,t,e):r)||(e.exports=o),!0,e.exports=i(),!!0){var a=window.Cookies,c=window.Cookies=i();c.noConflict=function(){return window.Cookies=a,c}}}((function(){function e(){for(var e=0,t={};e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}function t(e){return e.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function n(r){function o(){}function i(t,n,i){if("undefined"!=typeof document){"number"==typeof(i=e({path:"/"},o.defaults,i)).expires&&(i.expires=new Date(1*new Date+864e5*i.expires)),i.expires=i.expires?i.expires.toUTCString():"";try{var a=JSON.stringify(n);/^[\{\[]/.test(a)&&(n=a)}catch(l){}n=r.write?r.write(n,t):encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var c="";for(var s in i)i[s]&&(c+="; "+s,!0!==i[s]&&(c+="="+i[s].split(";")[0]));return document.cookie=t+"="+n+c}}function a(e,n){if("undefined"!=typeof document){for(var o={},i=document.cookie?document.cookie.split("; "):[],a=0;a<i.length;a++){var c=i[a].split("="),s=c.slice(1).join("=");n||'"'!==s.charAt(0)||(s=s.slice(1,-1));try{var l=t(c[0]);if(s=(r.read||r)(s,l)||t(s),n)try{s=JSON.parse(s)}catch(u){}if(o[l]=s,e===l)break}catch(u){}}return e?o[e]:o}}return o.set=i,o.get=function(e){return a(e,!1)},o.getJSON=function(e){return a(e,!0)},o.remove=function(t,n){i(t,"",e(n,{expires:-1}))},o.defaults={},o.withConverter=n,o}((function(){}))}))},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t){!function(){e.exports=this.wp.blocks}()},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){var r=n(19);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},function(e,t){!function(){e.exports=this.wp.apiFetch}()},function(e,t,n){var r=n(25);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}},function(e,t,n){var r=n(34),o=n(35),i=n(36),a=n(37),c=n(38),s=n(39),l=n(40);l.alea=r,l.xor128=o,l.xorwow=i,l.xorshift7=a,l.xor4096=c,l.tychei=s,e.exports=l},function(e,t,n){var r=n(45);e.exports=function(e,t){if(null==e)return{};var n,o,i=r(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}},function(e,t,n){var r=n(48),o=n(49);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t}},function(e,t,n){var r=n(17),o=n(19),i=n(50),a=n(51);function c(t){var n="function"==typeof Map?new Map:void 0;return e.exports=c=function(e){if(null===e||!i(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return a(e,arguments,r(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),o(t,e)},c(t)}e.exports=c},function(e,t){!function(){e.exports=this.ReactDOM}()},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(s){o=!0,i=s}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,n){(function(e){var r;!function(e,o,i){function a(e){var t,n=this,r=(t=4022871197,function(e){e=String(e);for(var n=0;n<e.length;n++){var r=.02519603282416938*(t+=e.charCodeAt(n));r-=t=r>>>0,t=(r*=t)>>>0,t+=4294967296*(r-=t)}return 2.3283064365386963e-10*(t>>>0)});n.next=function(){var e=2091639*n.s0+2.3283064365386963e-10*n.c;return n.s0=n.s1,n.s1=n.s2,n.s2=e-(n.c=0|e)},n.c=1,n.s0=r(" "),n.s1=r(" "),n.s2=r(" "),n.s0-=r(e),n.s0<0&&(n.s0+=1),n.s1-=r(e),n.s1<0&&(n.s1+=1),n.s2-=r(e),n.s2<0&&(n.s2+=1),r=null}function c(e,t){return t.c=e.c,t.s0=e.s0,t.s1=e.s1,t.s2=e.s2,t}function s(e,t){var n=new a(e),r=t&&t.state,o=n.next;return o.int32=function(){return 4294967296*n.next()|0},o.double=function(){return o()+11102230246251565e-32*(2097152*o()|0)},o.quick=o,r&&("object"==typeof r&&c(r,n),o.state=function(){return c(n,{})}),o}o&&o.exports?o.exports=s:n(9)&&n(13)?void 0===(r=function(){return s}.call(t,n,t,o))||(o.exports=r):this.alea=s}(0,e,n(9))}).call(this,n(12)(e))},function(e,t,n){(function(e){var r;!function(e,o,i){function a(e){var t=this,n="";t.x=0,t.y=0,t.z=0,t.w=0,t.next=function(){var e=t.x^t.x<<11;return t.x=t.y,t.y=t.z,t.z=t.w,t.w^=t.w>>>19^e^e>>>8},e===(0|e)?t.x=e:n+=e;for(var r=0;r<n.length+64;r++)t.x^=0|n.charCodeAt(r),t.next()}function c(e,t){return t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t}function s(e,t){var n=new a(e),r=t&&t.state,o=function(){return(n.next()>>>0)/4294967296};return o.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},o.int32=n.next,o.quick=o,r&&("object"==typeof r&&c(r,n),o.state=function(){return c(n,{})}),o}o&&o.exports?o.exports=s:n(9)&&n(13)?void 0===(r=function(){return s}.call(t,n,t,o))||(o.exports=r):this.xor128=s}(0,e,n(9))}).call(this,n(12)(e))},function(e,t,n){(function(e){var r;!function(e,o,i){function a(e){var t=this,n="";t.next=function(){var e=t.x^t.x>>>2;return t.x=t.y,t.y=t.z,t.z=t.w,t.w=t.v,(t.d=t.d+362437|0)+(t.v=t.v^t.v<<4^e^e<<1)|0},t.x=0,t.y=0,t.z=0,t.w=0,t.v=0,e===(0|e)?t.x=e:n+=e;for(var r=0;r<n.length+64;r++)t.x^=0|n.charCodeAt(r),r==n.length&&(t.d=t.x<<10^t.x>>>4),t.next()}function c(e,t){return t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t.v=e.v,t.d=e.d,t}function s(e,t){var n=new a(e),r=t&&t.state,o=function(){return(n.next()>>>0)/4294967296};return o.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},o.int32=n.next,o.quick=o,r&&("object"==typeof r&&c(r,n),o.state=function(){return c(n,{})}),o}o&&o.exports?o.exports=s:n(9)&&n(13)?void 0===(r=function(){return s}.call(t,n,t,o))||(o.exports=r):this.xorwow=s}(0,e,n(9))}).call(this,n(12)(e))},function(e,t,n){(function(e){var r;!function(e,o,i){function a(e){var t=this;t.next=function(){var e,n,r=t.x,o=t.i;return e=r[o],n=(e^=e>>>7)^e<<24,n^=(e=r[o+1&7])^e>>>10,n^=(e=r[o+3&7])^e>>>3,n^=(e=r[o+4&7])^e<<7,e=r[o+7&7],n^=(e^=e<<13)^e<<9,r[o]=n,t.i=o+1&7,n},function(e,t){var n,r=[];if(t===(0|t))r[0]=t;else for(t=""+t,n=0;n<t.length;++n)r[7&n]=r[7&n]<<15^t.charCodeAt(n)+r[n+1&7]<<13;for(;r.length<8;)r.push(0);for(n=0;n<8&&0===r[n];++n);for(8==n?r[7]=-1:r[n],e.x=r,e.i=0,n=256;n>0;--n)e.next()}(t,e)}function c(e,t){return t.x=e.x.slice(),t.i=e.i,t}function s(e,t){null==e&&(e=+new Date);var n=new a(e),r=t&&t.state,o=function(){return(n.next()>>>0)/4294967296};return o.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},o.int32=n.next,o.quick=o,r&&(r.x&&c(r,n),o.state=function(){return c(n,{})}),o}o&&o.exports?o.exports=s:n(9)&&n(13)?void 0===(r=function(){return s}.call(t,n,t,o))||(o.exports=r):this.xorshift7=s}(0,e,n(9))}).call(this,n(12)(e))},function(e,t,n){(function(e){var r;!function(e,o,i){function a(e){var t=this;t.next=function(){var e,n,r=t.w,o=t.X,i=t.i;return t.w=r=r+1640531527|0,n=o[i+34&127],e=o[i=i+1&127],n^=n<<13,e^=e<<17,n^=n>>>15,e^=e>>>12,n=o[i]=n^e,t.i=i,n+(r^r>>>16)|0},function(e,t){var n,r,o,i,a,c=[],s=128;for(t===(0|t)?(r=t,t=null):(t+="\0",r=0,s=Math.max(s,t.length)),o=0,i=-32;i<s;++i)t&&(r^=t.charCodeAt((i+32)%t.length)),0===i&&(a=r),r^=r<<10,r^=r>>>15,r^=r<<4,r^=r>>>13,i>=0&&(a=a+1640531527|0,o=0==(n=c[127&i]^=r+a)?o+1:0);for(o>=128&&(c[127&(t&&t.length||0)]=-1),o=127,i=512;i>0;--i)r=c[o+34&127],n=c[o=o+1&127],r^=r<<13,n^=n<<17,r^=r>>>15,n^=n>>>12,c[o]=r^n;e.w=a,e.X=c,e.i=o}(t,e)}function c(e,t){return t.i=e.i,t.w=e.w,t.X=e.X.slice(),t}function s(e,t){null==e&&(e=+new Date);var n=new a(e),r=t&&t.state,o=function(){return(n.next()>>>0)/4294967296};return o.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},o.int32=n.next,o.quick=o,r&&(r.X&&c(r,n),o.state=function(){return c(n,{})}),o}o&&o.exports?o.exports=s:n(9)&&n(13)?void 0===(r=function(){return s}.call(t,n,t,o))||(o.exports=r):this.xor4096=s}(0,e,n(9))}).call(this,n(12)(e))},function(e,t,n){(function(e){var r;!function(e,o,i){function a(e){var t=this,n="";t.next=function(){var e=t.b,n=t.c,r=t.d,o=t.a;return e=e<<25^e>>>7^n,n=n-r|0,r=r<<24^r>>>8^o,o=o-e|0,t.b=e=e<<20^e>>>12^n,t.c=n=n-r|0,t.d=r<<16^n>>>16^o,t.a=o-e|0},t.a=0,t.b=0,t.c=-1640531527,t.d=1367130551,e===Math.floor(e)?(t.a=e/4294967296|0,t.b=0|e):n+=e;for(var r=0;r<n.length+20;r++)t.b^=0|n.charCodeAt(r),t.next()}function c(e,t){return t.a=e.a,t.b=e.b,t.c=e.c,t.d=e.d,t}function s(e,t){var n=new a(e),r=t&&t.state,o=function(){return(n.next()>>>0)/4294967296};return o.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},o.int32=n.next,o.quick=o,r&&("object"==typeof r&&c(r,n),o.state=function(){return c(n,{})}),o}o&&o.exports?o.exports=s:n(9)&&n(13)?void 0===(r=function(){return s}.call(t,n,t,o))||(o.exports=r):this.tychei=s}(0,e,n(9))}).call(this,n(12)(e))},function(e,t,n){var r;!function(o,i,a){var c,s=a.pow(256,6),l=a.pow(2,52),u=2*l;function f(e,t,n){var r=[],f=m(function e(t,n){var r,o=[],i=typeof t;if(n&&"object"==i)for(r in t)try{o.push(e(t[r],n-1))}catch(a){}return o.length?o:"string"==i?t:t+"\0"}((t=1==t?{entropy:!0}:t||{}).entropy?[e,b(i)]:null==e?function(){try{var e;return c&&(e=c.randomBytes)?e=e(256):(e=new Uint8Array(256),(o.crypto||o.msCrypto).getRandomValues(e)),b(e)}catch(r){var t=o.navigator,n=t&&t.plugins;return[+new Date,o,n,o.screen,b(i)]}}():e,3),r),h=new d(r),w=function(){for(var e=h.g(6),t=s,n=0;e<l;)e=256*(e+n),t*=256,n=h.g(1);for(;e>=u;)e/=2,t/=2,n>>>=1;return(e+n)/t};return w.int32=function(){return 0|h.g(4)},w.quick=function(){return h.g(4)/4294967296},w.double=w,m(b(h.S),i),(t.pass||n||function(e,t,n,r){return r&&(r.S&&p(r,h),e.state=function(){return p(h,{})}),n?(a.random=e,t):e})(w,f,"global"in t?t.global:this==a,t.state)}function d(e){var t,n=e.length,r=this,o=0,i=r.i=r.j=0,a=r.S=[];for(n||(e=[n++]);o<256;)a[o]=o++;for(o=0;o<256;o++)a[o]=a[i=255&i+e[o%n]+(t=a[o])],a[i]=t;(r.g=function(e){for(var t,n=0,o=r.i,i=r.j,a=r.S;e--;)t=a[o=255&o+1],n=256*n+a[255&(a[o]=a[i=255&i+t])+(a[i]=t)];return r.i=o,r.j=i,n})(256)}function p(e,t){return t.i=e.i,t.j=e.j,t.S=e.S.slice(),t}function m(e,t){for(var n,r=e+"",o=0;o<r.length;)t[255&o]=255&(n^=19*t[255&o])+r.charCodeAt(o++);return b(t)}function b(e){return String.fromCharCode.apply(0,e)}if(m(a.random(),i),e.exports){e.exports=f;try{c=n(41)}catch(h){}}else void 0===(r=function(){return f}.call(t,n,t,e))||(e.exports=r)}("undefined"!=typeof self?self:this,[],Math)},function(e,t){},function(e,t,n){var r=n(25);e.exports=function(e){if(Array.isArray(e))return r(e)}},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}},function(e,t,n){"use strict";var r=n(47);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){e.exports=function(e){return-1!==Function.toString.call(e).indexOf("[native code]")}},function(e,t,n){var r=n(19),o=n(52);function i(t,n,a){return o()?e.exports=i=Reflect.construct:e.exports=i=function(e,t,n){var o=[null];o.push.apply(o,t);var i=new(Function.bind.apply(e,o));return n&&r(i,n.prototype),i},i.apply(null,arguments)}e.exports=i},function(e,t){e.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}},function(e,t,n){"use strict";n.r(t);var r,o=n(0),i=n(3),a=n(14),c=n.n(a),s=n(2),l=n.n(s),u=n(6),f=n.n(u),d=n(10),p=n.n(d),m=n(7),b=n.n(m),h=n(26),w=n.n(h),g=n(1),O=n(8),v=n.n(O),y=n(11),x=n(5),j=n(15),E=n.n(j),L=(n(20),Object.freeze({THANK_YOU:"thank-you",CUSTOM_TEXT:"custom-text",REDIRECT:"redirect",RESULTS:"results"})),C=Object.freeze({THEME_DEFAULT:"theme-default",GEORGIA:"georgia",PALATINO:"palatino",TIMES_NEW_ROMAN:"times-new-roman",ARIAL:"arial",IMPACT:"impact",LUCIDA:"lucida",TAHOMA:"tahoma",TREBUCHET:"trebuchet",VERDANA:"verdana",COURIER:"courier",CABIN:"Cabin",CHIVO:"Chivo",OPEN_SANS:"Open+Sans",FIRA_SANS:"Fira+Sans",ROBOTO:"Roboto",NUNITO:"Nunito",OVERPASS:"Overpass",LATO:"Lato",LIBRE_FRANKLIN:"Libre+Franklin",MONTSERRAT:"Montserrat",POPPINS:"Poppins",RUBIK:"Rubik",RALEWAY:"Raleway",JOSEFIN_SANS:"Josefin+Sans",ALEGREYA_SANS:"Alegreya+Sans",OSWALD:"Oswald"}),S=Object.freeze([C.CABIN,C.CHIVO,C.OPEN_SANS,C.FIRA_SANS,C.ROBOTO,C.NUNITO,C.OVERPASS,C.LATO,C.LIBRE_FRANKLIN,C.MONTSERRAT,C.POPPINS,C.RUBIK,C.RALEWAY,C.JOSEFIN_SANS,C.ALEGREYA_SANS,C.OSWALD]),_=Object.freeze((r={},l()(r,C.THEME_DEFAULT,null),l()(r,C.GEORGIA,"Georgia, serif"),l()(r,C.PALATINO,'"Palatino Linotype", "Book Antiqua", Palatino, serif'),l()(r,C.TIMES_NEW_ROMAN,'"Times New Roman", Times, serif'),l()(r,C.ARIAL,"Arial, Helvetica, sans-serif"),l()(r,C.IMPACT,"Impact, Charcoal, sans-serif"),l()(r,C.LUCIDA,'"Lucida Sans Unicode", "Lucida Grande", sans-serif'),l()(r,C.TAHOMA,"Tahoma, Geneva, sans-serif"),l()(r,C.TREBUCHET,'"Trebuchet MS", Helvetica, sans-serif'),l()(r,C.VERDANA,"Verdana, Geneva, sans-serif"),l()(r,C.COURIER,'"Courier New", Courier, monospace'),l()(r,C.CABIN,'"Cabin", sans-serif'),l()(r,C.CHIVO,'"Chivo", sans-serif'),l()(r,C.OPEN_SANS,'"Open Sans", sans-serif'),l()(r,C.FIRA_SANS,'"Fira Sans", sans-serif'),l()(r,C.ROBOTO,'"Roboto", sans-serif'),l()(r,C.NUNITO,'"Nunito", sans-serif'),l()(r,C.OVERPASS,'"Overpass", sans-serif'),l()(r,C.LATO,'"Lato", sans-serif'),l()(r,C.LIBRE_FRANKLIN,'"Libre Franklin", sans-serif'),l()(r,C.MONTSERRAT,'"Montserrat", sans-serif'),l()(r,C.POPPINS,'"Poppins", sans-serif'),l()(r,C.RUBIK,'"Rubik", sans-serif'),l()(r,C.RALEWAY,'"Raleway", sans-serif'),l()(r,C.JOSEFIN_SANS,'"Josefin Sans", sans-serif'),l()(r,C.ALEGREYA_SANS,'"Alegreya Sans", sans-serif'),l()(r,C.OSWALD,'"Oswald", sans-serif'),r)),N=Object.freeze({OPEN:"open",CLOSED:"closed",CLOSED_AFTER:"closed-after"}),A=Object.freeze({SHOW_RESULTS:"show-results",SHOW_CLOSED_BANNER:"show-closed-banner",HIDDEN:"hidden"}),k=(Object.freeze({CONNECTED:"connected",NOT_CONNECTED:"not-connected",NOT_VERIFIED:"not-verified"}),Object.freeze({RADIO:"radio",BUTTON:"button"})),T=Object.freeze({LIST:"list",INLINE:"inline"}),R=function(e){return Object(g.includes)(C,e)?_[e]:null},I=function(e){return!e||"string"!=typeof e||-1===e.indexOf("rgb")&&0!==e.indexOf("#")||-1<e.indexOf("rgba")?null:(0===e.indexOf("#")&&(e=M(e)),e.match(/\((.*?)\)/)[1])},M=function(e){var t=0,n=0,r=0,o=4===e.length?"#".concat(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]):e;return 7===o.length&&(t=parseInt(o.substr(1,2),16)||0,n=parseInt(o.substr(3,2),16)||0,r=parseInt(o.substr(5,2),16)||0),"rgb(".concat(t,", ").concat(n,", ").concat(r,")")},P=n(27),F=n.n(P),B=n(16),D=function(e){for(var t=window.getComputedStyle(e).backgroundColor;"rgba(0, 0, 0, 0)"===t&&e.parentNode&&e.parentNode.nodeType===window.Node.ELEMENT_NODE;)e=e.parentNode,t=window.getComputedStyle(e).backgroundColor;return t},U=function(){return Object(o.createElement)("div",{className:"crowdsignal-forms__style-probe"},Object(o.createElement)("p",null),Object(o.createElement)("h3",null,"Text"),Object(o.createElement)("div",{className:"wp-block-button"},Object(o.createElement)("div",{className:"wp-block-button__link"})),Object(o.createElement)("div",{className:"entry-content"},Object(o.createElement)("div",{className:"alignwide"})))},Z=function(e){if(null===e)return{};var t,n=e.querySelector(".wp-block-button__link"),r=e.querySelector("p"),o=e.querySelector("h3"),i=e.querySelector(".alignwide"),a=D(n),c=D(r),s=window.getComputedStyle(r).color;if(a===c){var l=(t=n,"0px"!==window.getComputedStyle(t).borderBlockStartWidth?window.getComputedStyle(t).borderBlockStartColor:null);a=l||s}return{accentColor:a,backgroundColor:c,textColor:s,textColorInverted:window.getComputedStyle(n).color,textFont:window.getComputedStyle(r).fontFamily,textSize:window.getComputedStyle(r).fontSize,headingFont:window.getComputedStyle(o).fontFamily,contentWideWidth:window.getComputedStyle(i).maxWidth}},V=function(e){var t=e.hasVoted,n=e.isPollClosed,r=e.isPollHidden,i=e.showSubmitMessage,a=v()({"is-transparent":i},"crowdsignal-forms-poll__closed-banner");return Object(o.createElement)("div",{className:a},r&&Object(x.__)("This Poll is Hidden","crowdsignal-forms"),n&&!r&&Object(x.__)("This Poll is Closed","crowdsignal-forms"),t&&Object(x.__)("Thanks For Voting!","crowdsignal-forms"))},q=n(4),H=n.n(q),W=n(18),z=n.n(W),G=n(21),Y=n.n(G),K=n(22),J=n.n(K),X=n(28),$=n.n(X),Q=n(17),ee=n.n(Q),te=n(29),ne=n.n(te);n(23);function re(e){return function(){var t,n=ee()(e);if(oe()){var r=ee()(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return $()(this,t)}}function oe(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var ie=function(){var e=p()(f.a.mark((function e(t){var n,r,o=arguments;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=!(o.length>1&&void 0!==o[1])||o[1],r="https://api.crowdsignal.com/v3/polls",n){e.next=4;break}return e.abrupt("return",null);case 4:return e.abrupt("return",window.fetch("".concat(r,"/").concat(t,"/results"),{method:"GET",headers:{"content-type":"application/json"}}).then((function(e){if(e.status>=200&&e.status<300)return e.json();throw e})).then((function(e){if(404===e.status)return{};if(e.error)throw new Error(e.message);return e.results.votes_by_answer})));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ae=function(){var e=p()(f.a.mark((function e(t){var n,r,o;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"5430eeac3911395001d731d9702fc38b",n=(new Date).getTime(),e.next=4,window.fetch("https://polldaddy.com/n/".concat("5430eeac3911395001d731d9702fc38b","/").concat(t,"?").concat(n,"&format=json"));case 4:if((r=e.sent).ok){e.next=7;break}throw new le;case 7:return e.next=9,r.json();case 9:if((o=e.sent).nonce){e.next=12;break}throw new le;case 12:return e.abrupt("return",o.nonce);case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ce=function(){var e=p()(f.a.mark((function e(t,n,r,o){var i,a,c;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=r.join(","),e.next=3,window.fetch("https://polls.polldaddy.com/vote-js.php?format=json&p=".concat(n,"&b=1&a=").concat(i,"&o=&va=16&cookie=0&n=").concat(t,"&url=").concat(encodeURIComponent(window.location),"&vi=").concat(o));case 3:if((a=e.sent).ok){e.next=6;break}throw new le;case 6:return e.next=8,a.json();case 8:if("error"!==(c=e.sent).status){e.next=11;break}throw new se(c.error);case 11:case"end":return e.stop()}}),e)})));return function(t,n,r,o){return e.apply(this,arguments)}}(),se=function(e){J()(n,e);var t=re(n);function n(){return Y()(this,n),t.apply(this,arguments)}return n}(ne()(Error)),le=function(e){J()(n,e);var t=re(n);function n(){return Y()(this,n),t.call(this,Object(x.__)("Server error. Please try again.","crowdsignal-forms"))}return n}(se),ue=function(e,t){var n=Object(i.useState)(null),r=b()(n,2),o=r[0],a=r[1],c=Object(i.useState)(null),s=b()(c,2),l=s[0],u=s[1],f=Object(i.useState)(!0),d=b()(f,2),p=d[0],m=d[1];return Object(i.useEffect)((function(){m(!0),u(null),a(null),e().then(a).catch(u).finally((function(){return m(!1)}))}),t),{data:o,error:l,loading:p}},fe=function(e){var t=e.error,n=e.loading,r=e.text,i=e.totalVotes,a=e.votes,c=v()("crowdsignal-forms-poll__answer-results",{"is-error":t,"is-loading":n}),s=!n&&!t,l=0===i?0:100*a/i,u={width:"".concat(parseInt(l,10),"%")};return Object(o.createElement)("div",{className:c},Object(o.createElement)("div",{className:"crowdsignal-forms-poll__answer-results-labels"},Object(o.createElement)("span",{className:"crowdsignal-forms-poll__answer-results-answer"},Object(y.decodeEntities)(r)),Object(o.createElement)("span",{className:"crowdsignal-forms-poll__answer-results-votes"},s&&Object(x.sprintf)(Object(x._n)("%s vote","%s votes",a,"crowdsignal-forms"),a.toLocaleString())),Object(o.createElement)("span",{className:"crowdsignal-forms-poll__answer-results-percent"},s&&"".concat(l.toFixed(2),"%"))),Object(o.createElement)("div",{className:"crowdsignal-forms-poll__answer-results-progress-track"},Object(o.createElement)("div",{className:"crowdsignal-forms-poll__answer-results-progress-bar",style:u})))};fe.propTypes={loading:H.a.bool,text:H.a.string.isRequired,totalVotes:H.a.number,votes:H.a.number};var de=fe,pe=Object(o.createElement)("span",null,"Hide Crowdsignal ads",Object(o.createElement)("br",null),"and get unlimited",Object(o.createElement)("br",null),"signals -"," ",Object(o.createElement)("a",{href:"https://crowdsignal.com/pricing",target:"_blank",rel:"noopener noreferrer"},"Upgrade")),me=function(e){var t=e.showLogo,n=e.editing,r=e.message;return Object(o.createElement)("div",{className:"crowdsignal-forms__footer-branding"},Object(o.createElement)("a",{className:"crowdsignal-forms__footer-cs-link",href:"https://crowdsignal.com?ref=cs-forms-poll",target:"_blank",rel:"noopener noreferrer"},r||Object(x.__)("Create your own poll with Crowdsignal","crowdsignal-forms")),n&&Object(o.createElement)(B.Tooltip,{text:pe,position:"top center"},Object(o.createElement)("a",{href:"https://crowdsignal.com/pricing",target:"_blank",rel:"noopener noreferrer",className:"crowdsignal-forms__branding-promote"},Object(x.__)("Hide","crowdsignal-forms"))),t&&Object(o.createElement)("img",{className:"crowdsignal-forms__footer-branding-logo",src:"https://app.crowdsignal.com/images/svg/cs-logo-dots.svg",alt:"Crowdsignal sticker"}))};var be=function(e){var t=e.answers,n=e.pollIdFromApi,r=e.setErrorMessage,a=e.hideBranding,c=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=ue((function(){return ie(e,t)}),[e]),r=n.data,o=n.error,i=n.loading;return{error:o,loading:i,results:r}}(n),s=c.error,l=c.loading,u=c.results;Object(i.useEffect)((function(){r(s?Object(x.__)("Unfortunately, we're having some trouble retrieving the results for this poll at this time.","crowdsignal-forms"):"")}),[s]);var f=v()("crowdsignal-forms-poll__results",{"is-error":!!s,"is-loading":l}),d=Object(g.sum)(Object(g.values)(u));return Object(o.createElement)("div",{className:f},Object(o.createElement)("div",{className:"crowdsignal-forms-poll__results-list"},Object(g.map)(t,(function(e){var t;return!function(e){return Object(g.isEmpty)(e)||void 0===e.text||null===e.text||""===e.text}(e)&&Object(o.createElement)(de,{key:e.answerId,error:!!s,loading:l,text:e.text,totalVotes:d,votes:u&&null!==(t=u[e.answerIdFromApi])&&void 0!==t?t:0})}))),Object(o.createElement)("div",{className:"crowdsignal-forms-poll__results-footer"},Object(o.createElement)("span",{className:"crowdsignal-forms-poll__results-total"},Object(x.sprintf)(Object(x._n)("%s total vote","%s total votes",d,"crowdsignal-forms"),d?d.toLocaleString():0)),!a&&Object(o.createElement)(me,null)))};be.propTypes={pollIdFromApi:H.a.number,answers:H.a.arrayOf(H.a.shape({answerId:H.a.string.isRequired,answerIdFromApi:H.a.number,text:H.a.string})).isRequired,setErrorMessage:H.a.func.isRequired,hideBranding:H.a.bool};var he=be,we=function(e){var t=e.answerIdFromApi,n=e.answerStyle,r=e.hasVoted,i=e.isMultipleChoice,a=e.isSelected,c=e.isVoting,s=e.isFocused,l=e.onSelect,u=e.onFocus,f=e.text,d=function(e){return l(parseInt(e.target.attributes.answerid.value,10))},p=function(e){return u(parseInt(e.target.attributes.answerid.value,10))},m=function(e){e.preventDefault(),d(e)},b=v()("crowdsignal-forms-poll__answer",{"is-multiple-choice":i,"is-selected":a,"is-focused":s,"is-button":k.BUTTON===n}),h="poll-answer-".concat(t);return Object(o.createElement)("div",{className:b},k.RADIO===n&&Object(o.createElement)("label",{className:b,htmlFor:h,tabIndex:"-1"},Object(o.createElement)("input",{className:"crowdsignal-forms-poll__input",id:h,name:"answer",onChange:d,selected:a,type:i?"checkbox":"radio",answerid:t,disabled:r||c,tabIndex:"0","aria-label":f,onFocus:p}),Object(o.createElement)("span",{className:"crowdsignal-forms-poll__check"}),Object(o.createElement)("div",{className:"crowdsignal-forms-poll__answer-label-wrapper"},Object(o.createElement)("span",{className:"crowdsignal-forms-poll__answer-label"},Object(y.decodeEntities)(f)))),k.BUTTON===n&&Object(o.createElement)("div",{className:"wp-block-button crowdsignal-forms-poll__block-button"},Object(o.createElement)("input",{type:"submit",className:"wp-block-button__link crowdsignal-forms-poll__submit-button",value:Object(y.decodeEntities)(f),answerid:t,onClick:m})))};we.propTypes={answerIdFromApi:H.a.number.isRequired,hasVoted:H.a.bool,isMultipleChoice:H.a.bool,isSelected:H.a.bool,isVoting:H.a.bool,onSelect:H.a.func.isRequired,text:H.a.string.isRequired};var ge=we,Oe=function(e){var t=e.answers,n=e.answerStyle,r=e.buttonAlignment,a=e.hasVoted,s=e.isMultipleChoice,l=e.isVoting,u=e.onSubmit,f=e.submitButtonLabel,d=e.hideBranding,p=Object(i.useState)([]),m=b()(p,2),h=m[0],w=m[1],O=function(e){return k.BUTTON===n?(w([e]),u([e])):s?Object(g.includes)(h,e)?w(Object(g.without)(h,e)):void w([].concat(E()(h),[e])):w([e])},y=Object(i.useState)([]),x=b()(y,2),j=x[0],L=x[1],C=function(e){return L([e])},S=v()({"is-button":k.BUTTON===n,"is-inline-button-alignment":T.INLINE===r},"crowdsignal-forms-poll__options");return Object(o.createElement)("form",{className:"crowdsignal-forms-poll__form",onSubmit:function(e){e.preventDefault(),u(h)}},Object(o.createElement)("div",{className:S},Object(g.map)(t,(function(e,t){return Object(o.createElement)(ge,c()({key:"poll-answer-".concat(t),answerStyle:n,isMultipleChoice:s,isSelected:Object(g.includes)(h,e.answerIdFromApi),isFocused:Object(g.includes)(j,e.answerIdFromApi),onSelect:O,onFocus:C,hasVoted:a,isVoting:l},e))}))),!a&&k.RADIO===n&&Object(o.createElement)("div",{className:"crowdsignal-forms-poll__actions"},Object(o.createElement)("div",{className:"wp-block-button crowdsignal-forms-poll__block-button"},Object(o.createElement)("input",{type:"submit",className:"wp-block-button__link crowdsignal-forms-poll__submit-button",disabled:l||!h.length,value:f}))),!d&&Object(o.createElement)("div",{className:"wp_block-crowdsignal-forms-poll__vote-branding"},Object(o.createElement)(me,{showLogo:!1})))};Oe.propTypes={answers:H.a.array.isRequired,isMultipleChoice:H.a.bool,onSubmit:H.a.func.isRequired,submitButtonLabel:H.a.string.isRequired};var ve=Oe,ye=function(e){var t=e.children;return Object(o.createElement)("div",{className:"crowdsignal-forms-poll__error-banner"},t)},xe=function(){return Object(o.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)("path",{d:"M0 12C0 5.37258 5.37258 0 12 0C18.6274 0 24 5.37258 24 12C24 18.6274 18.6274 24 12 24C5.37258 24 0 18.6274 0 12Z",fill:"white"}),Object(o.createElement)("mask",{id:"maskClose","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:"5",y:"5",width:"14",height:"14"},Object(o.createElement)("path",{d:"M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41Z",fill:"white"})),Object(o.createElement)("g",{mask:"url(#maskClose)"},Object(o.createElement)("rect",{width:"24",height:"24",fill:"black"})))},je=function(){return Object(o.createElement)("svg",{width:"34",height:"34",viewBox:"0 0 34 34",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.6667 0C7.46667 0 0 7.46667 0 16.6667C0 25.8667 7.46667 33.3333 16.6667 33.3333C25.8667 33.3333 33.3333 25.8667 33.3333 16.6667C33.3333 7.46667 25.8667 0 16.6667 0ZM16.6667 30C9.31667 30 3.33333 24.0167 3.33333 16.6667C3.33333 9.31667 9.31667 3.33333 16.6667 3.33333C24.0167 3.33333 30 9.31667 30 16.6667C30 24.0167 24.0167 30 16.6667 30ZM13.3333 20.2833L24.3167 9.3L26.6667 11.6667L13.3333 25L6.66667 18.3333L9.01667 15.9833L13.3333 20.2833Z",fill:"var(--crowdsignal-forms-submit-button-bg-color)"}),Object(o.createElement)("mask",{id:"maskCheck","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"34",height:"34"},Object(o.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.6667 0C7.46667 0 0 7.46667 0 16.6667C0 25.8667 7.46667 33.3333 16.6667 33.3333C25.8667 33.3333 33.3333 25.8667 33.3333 16.6667C33.3333 7.46667 25.8667 0 16.6667 0ZM16.6667 30C9.31667 30 3.33333 24.0167 3.33333 16.6667C3.33333 9.31667 9.31667 3.33333 16.6667 3.33333C24.0167 3.33333 30 9.31667 30 16.6667C30 24.0167 24.0167 30 16.6667 30ZM13.3333 20.2833L24.3167 9.3L26.6667 11.6667L13.3333 25L6.66667 18.3333L9.01667 15.9833L13.3333 20.2833Z"})),Object(o.createElement)("g",{mask:"url(#maskCheck)"}))},Ee=function(e){var t=e.className;return Object(o.createElement)("svg",{width:"88",height:"88",viewBox:"0 0 88 88",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t},Object(o.createElement)("g",{filter:"url(#filterThankYou)"},Object(o.createElement)("path",{d:"M44 80C66.0914 80 84 62.0914 84 40C84 17.9086 66.0914 0 44 0C21.9086 0 4 17.9086 4 40C4 62.0914 21.9086 80 44 80Z",fill:"#384869"}),Object(o.createElement)("path",{d:"M26.0226 27.1047L27.2135 22.9517L28.6403 23.3609L29.0032 22.0954L24.5573 20.8206L24.1945 22.086L25.6214 22.4952L24.4305 26.6481L26.0226 27.1047ZM33.0856 29.1299L34.6393 23.7116L33.0472 23.2551L32.4572 25.3128L30.5497 24.7658L31.1397 22.7081L29.5476 22.2516L27.9939 27.6699L29.586 28.1265L30.1868 26.0312L32.0943 26.5782L31.4935 28.6734L33.0856 29.1299ZM37.4113 30.3703L39.1085 30.857L38.8937 24.9315L36.896 24.3587L33.5738 29.2699L35.1959 29.7351L35.7865 28.7381L37.4387 29.2119L37.4113 30.3703ZM37.4837 25.8804L37.5138 25.889L37.4715 28.0063L36.3976 27.6983L37.4837 25.8804ZM41.0986 31.4276L41.9169 28.5739L41.947 28.5825L43.2352 32.0403L44.4556 32.3902L46.0092 26.9719L44.5073 26.5412L43.7019 29.3499L43.6719 29.3412L42.3857 25.9328L41.1504 25.5786L39.5967 30.997L41.0986 31.4276ZM46.7986 33.0621L47.2056 31.6427L47.7936 31.1936L48.4057 33.5229L50.2569 34.0537L49.2542 30.5072L51.728 28.6117L50.0571 28.1325L47.7234 29.9504L47.6934 29.9417L48.3523 27.6437L46.7602 27.1872L45.2065 32.6056L46.7986 33.0621ZM55.281 35.4944L55.7731 33.7784L58.6859 30.6068L57.0225 30.1298L55.4426 32.0541L55.4125 32.0455L55.0924 29.5764L53.3914 29.0887L54.181 33.3218L53.6889 35.0378L55.281 35.4944ZM61.4239 31.2903C59.7492 30.8101 58.3861 31.5815 57.8897 33.3125C57.3934 35.0435 58.1379 36.4152 59.8163 36.8964C61.491 37.3767 62.853 36.6091 63.3494 34.878C63.8458 33.147 63.0986 31.7705 61.4239 31.2903ZM61.0599 32.5595C61.7246 32.7501 61.9964 33.4742 61.7273 34.4129C61.4592 35.3479 60.8486 35.8189 60.1803 35.6273C59.5119 35.4356 59.2438 34.7126 59.5119 33.7776C59.781 32.8389 60.3953 32.3689 61.0599 32.5595ZM66.3384 32.8012L64.7463 32.3446L63.7461 35.833C63.3918 37.0683 64.1232 38.1314 65.5539 38.5417C66.9845 38.9519 68.1681 38.4379 68.5223 37.2025L69.5226 33.7142L67.9305 33.2577L66.9809 36.5695C66.8172 37.1403 66.4462 37.3712 65.9318 37.2237C65.4174 37.0762 65.2251 36.6838 65.3888 36.113L66.3384 32.8012ZM36.4693 42.5838L37.0195 40.665L39.0246 41.24L39.367 40.0459L37.3619 39.4709L37.6601 38.4308L39.8755 39.0661L40.2384 37.8007L36.4309 36.7089L34.8772 42.1273L36.4693 42.5838ZM43.4269 38.6134C41.7522 38.1332 40.3892 38.9045 39.8928 40.6356C39.3964 42.3666 40.141 43.7382 41.8194 44.2195C43.4941 44.6997 44.8561 43.9321 45.3525 42.2011C45.8488 40.4701 45.1016 39.0936 43.4269 38.6134ZM43.063 39.8826C43.7276 40.0731 43.9995 40.7972 43.7303 41.7359C43.4622 42.6709 42.8517 43.142 42.1833 42.9503C41.515 42.7587 41.2468 42.0357 41.5149 41.1007C41.7841 40.162 42.3984 39.692 43.063 39.8826ZM48.0045 41.2995L48.6654 41.489C49.0934 41.6117 49.2996 41.9838 49.1844 42.3856C49.0671 42.7948 48.7144 42.9904 48.2675 42.8622L47.6104 42.6738L48.0045 41.2995ZM47.3089 43.7252L47.8309 43.8748L48.1659 45.9377L49.9457 46.4481L49.5058 44.0991C50.1503 43.9913 50.6348 43.4638 50.8179 42.8255C51.1506 41.6652 50.602 40.7724 49.1563 40.3579L46.7494 39.6677L45.1957 45.086L46.7878 45.5426L47.3089 43.7252ZM26.5905 52.2347L29.7888 47.2879L28.0315 46.784L26.0433 50.4442L26.0133 50.4356L26.2667 46.278L24.4343 45.7525L24.5253 51.6425L26.5905 52.2347ZM32.7521 48.036C31.0774 47.5558 29.7143 48.3272 29.218 50.0582C28.7216 51.7892 29.4661 53.1608 31.1446 53.6421C32.8193 54.1223 34.1813 53.3547 34.6776 51.6237C35.174 49.8927 34.4268 48.5162 32.7521 48.036ZM32.3882 49.3052C33.0528 49.4958 33.3247 50.2199 33.0555 51.1586C32.7874 52.0936 32.1769 52.5646 31.5085 52.373C30.8401 52.1813 30.572 51.4583 30.8401 50.5233C31.1093 49.5846 31.7236 49.1146 32.3882 49.3052ZM37.0705 55.2398L38.2613 51.0868L39.6882 51.496L40.0511 50.2306L35.6052 48.9557L35.2424 50.2211L36.6692 50.6303L35.4784 54.7832L37.0705 55.2398ZM40.6339 56.2616L42.1876 50.8432L40.5955 50.3867L39.0418 55.805L40.6339 56.2616ZM42.8869 56.9076L43.7052 54.0538L43.7352 54.0625L45.0234 57.5202L46.2438 57.8702L47.7975 52.4518L46.2955 52.0211L45.4901 54.8298L45.4601 54.8212L44.174 51.4128L42.9386 51.0585L41.3849 56.4769L42.8869 56.9076ZM52.7701 57.2465L52.9747 56.533L50.6166 55.8569L50.3129 56.9157L51.139 57.1526L51.11 57.2256C50.94 57.6482 50.4891 57.8318 49.9709 57.6832C49.2725 57.483 48.9872 56.7632 49.2704 55.7756C49.5471 54.8106 50.1045 54.369 50.7804 54.5628C51.2385 54.6942 51.5209 55.0556 51.5119 55.4837L53.0777 55.9327C53.2763 54.7868 52.4918 53.6963 51.1325 53.3065C49.4615 52.8274 48.1511 53.5569 47.6418 55.333C47.1261 57.1316 47.854 58.4335 49.5738 58.9266C51.1471 59.3778 52.3448 58.7297 52.7701 57.2465ZM54.5376 54.3845L53.6262 58.0731L54.9329 58.4477L56.1146 54.8367L54.5376 54.3845ZM53.7294 60.1792C54.1649 60.3041 54.6201 60.077 54.7407 59.6564C54.8603 59.2396 54.5945 58.8058 54.159 58.681C53.7159 58.5539 53.2644 58.782 53.1449 59.1988C53.0243 59.6194 53.2863 60.0521 53.7294 60.1792Z",fill:"white"}),Object(o.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M44 75.2C63.4405 75.2 79.2 59.4404 79.2 40C79.2 20.5596 63.4405 4.80002 44 4.80002C24.5596 4.80002 8.80005 20.5596 8.80005 40C8.80005 59.4404 24.5596 75.2 44 75.2Z",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeDasharray:"0.1 4"})),Object(o.createElement)("defs",null,Object(o.createElement)("filter",{id:"filterThankYou",x:"0",y:"0",width:"88",height:"88",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},Object(o.createElement)("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),Object(o.createElement)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),Object(o.createElement)("feOffset",{dy:"4"}),Object(o.createElement)("feGaussianBlur",{stdDeviation:"2"}),Object(o.createElement)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"}),Object(o.createElement)("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),Object(o.createElement)("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"}))))},Le=function(e){var t=e.target;t&&(t.paused?t.play():t.pause())},Ce=function(e){var t=e.confirmMessageType,n=e.customConfirmMessage,r=e.setDismissSubmitMessage,i=e.hideBranding;return Object(o.createElement)("div",{className:"crowdsignal-forms-poll__submit-message-container"},Object(o.createElement)("div",{className:"crowdsignal-forms-poll__submit-message"},L.THANK_YOU===t&&Object(o.createElement)(o.Fragment,null,Object(o.createElement)("video",{muted:!0,autoPlay:!0,loop:!0,playsInline:!0,poster:"https://crowdsignal.files.wordpress.com/2020/02/thumbs-up-video-placeholder.jpg",width:"100%",onClick:Le},Object(o.createElement)("source",{src:"https://crowdsignal.files.wordpress.com/2019/08/thumbs-up-cs.mp4",type:"video/mp4"})),Object(o.createElement)(Ee,{className:"crowdsignal-forms-poll__thank-you-sticker"}),!i&&Object(o.createElement)("img",{className:"crowdsignal-forms-poll__thank-you-cs-sticker",src:"https://app.crowdsignal.com/images/svg/cs-logo-dots.svg",alt:"Crowdsignal sticker"})),L.CUSTOM_TEXT===t&&Object(o.createElement)(o.Fragment,null,Object(o.createElement)("div",{className:"crowdsignal-forms-poll__custom-message-check"},Object(o.createElement)(je,null)),Object(o.createElement)("div",{className:"crowdsignal-forms-poll__custom-message"},Object(g.isEmpty)(n)?Object(x.__)("Thanks for voting!","crowdsignal-forms"):n)),Object(o.createElement)("button",{className:"crowdsignal-forms-poll__dismiss-submit-message",onClick:function(){return r(!0)}},Object(o.createElement)(xe,null))),Object(o.createElement)("div",{className:"crowdsignal-forms-poll__submit-message-footer"},!i&&Object(o.createElement)(me,{showLogo:L.THANK_YOU!==t})))};function Se(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _e(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Se(Object(n),!0).forEach((function(t){l()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Se(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ne,Ae=(Ne=function(e){var t=e.attributes,n=e.fallbackStyles,r=e.renderStyleProbe,a=Object(i.useState)(Math.random()),s=b()(a,1)[0],l=Object(i.useState)(""),u=b()(l,2),d=u[0],m=u[1],h=Object(i.useState)(!1),O=b()(h,2),j=O[0],E=O[1],_=t.apiPollData,T=_.id,M=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r="cs-poll-".concat(e),o=Object(i.useState)(!1),a=b()(o,2),c=a[0],s=a[1],l=Object(i.useState)(!1),u=b()(l,2),d=u[0],m=u[1],h=Object(i.useState)(""),w=b()(h,2),g=w[0],O=w[1];Object(i.useEffect)((function(){t&&void 0!==z.a.get(r)&&(m(!0),O(z.a.get(r)))}),[]);var v=function(){var o=p()(f.a.mark((function o(i){var a,c,l,u=arguments;return f.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return a=u.length>1&&void 0!==u[1]?u[1]:1,o.prev=1,s(!0),o.next=5,ae(e);case 5:return c=o.sent,o.next=8,ce(c,e,i,a);case 8:m(!0),t&&(l=n?i.join(","):(new Date).getTime(),z.a.set(r,l,{sameSite:"Strict",expires:365}),O(l));case 10:return o.prev=10,s(!1),o.finish(10);case 13:case"end":return o.stop()}}),o,null,[[1,,10,13]])})));return function(e){return o.apply(this,arguments)}}();return{hasVoted:d,isVoting:c,vote:v,storedCookieValue:g}}(T,t.hasOneResponsePerComputer),P=M.hasVoted,F=M.isVoting,B=M.vote;L.REDIRECT===t.confirmMessageType&&(t.confirmMessageType=L.THANK_YOU);var D=function(){var e=p()(f.a.mark((function e(t){return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,m(""),E(!1),e.next=5,B(t);case 5:e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),e.t0 instanceof se?m(e.t0.message):m(Object(x.__)("Server error. Please try again.","crowdsignal-forms"));case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}(),U=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Date;if(N.CLOSED===e)return!0;if(N.CLOSED_AFTER===e){var r=new Date(t);return r<n}return!1}(t.pollStatus,t.closedAfterDateTime);if(U&&A.HIDDEN===t.closedPollState)return null;var Z=U&&A.SHOW_RESULTS===t.closedPollState||P&&L.RESULTS===t.confirmMessageType,q=P&&!Z&&!j,H=L.THANK_YOU===t.confirmMessageType,W=function(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return v()({"has-bg-color":e.backgroundColor,"has-text-color":e.textColor,"has-submit-button-bg-color":e.submitButtonBackgroundColor,"has-submit-button-text-color":e.submitButtonTextColor,"has-border-radius":null!==(t=e.borderRadius)&&void 0!==t&&t,"has-box-shadow":e.hasBoxShadow},r)}(t,t.className,"crowdsignal-forms-poll",{"has-voted":P,"is-closed":U,"is-voting":F,"has-default-thankyou":H}),G=_e({width:"full"!==t.align?"".concat(t.width,"%"):"auto"},function(e,t){var n,r,o,i,a=Object(g.isEmpty)(e.textColor)?t.textColor:e.textColor;return Object(g.mapKeys)({borderColor:null!==(n=e.borderColor)&&void 0!==n?n:t.accentColor,borderRadius:"".concat(e.borderRadius,"px"),borderWidth:"".concat(e.borderWidth,"px"),bgColor:e.backgroundColor,bodyFontFamily:null!==(r=R(e.fontFamily))&&void 0!==r?r:t.textFont,questionFontFamily:null!==(o=R(e.fontFamily))&&void 0!==o?o:t.headingFont,submitButtonBgColor:e.submitButtonBackgroundColor||t.accentColor,submitButtonTextColor:e.submitButtonTextColor||t.textColorInverted,textColor:a,textColorProperties:null!==(i=I(a))&&void 0!==i?i:"0, 0, 0",contentWideWidth:t.contentWideWidth},(function(e,t){return"--crowdsignal-forms-".concat(Object(g.kebabCase)(t))}))}(t,n)),Y=Object(g.reduce)(_.answers,(function(e,t){return e[t.client_id]=t.id,e}),{}),K=Object(g.map)(t.answers,(function(e){return _e({},e,{answerIdFromApi:Y[e.answerId]})})),J=function(e,t){for(var n=e.slice(),r=n.length-1;r>0;r--){var o=Math.floor(t()*r),i=n[r];n[r]=n[o],n[o]=i}return n}(Object(g.filter)(K,(function(e){return!!e.text})),t.randomizeAnswers?new w.a(s):function(){return 1}),X=v()({"is-transparent":q},"crowdsignal-forms-poll__content"),$=function(e,t){return e.isMultipleChoice?k.RADIO:!Object(g.isEmpty)(t)&&t.indexOf("is-style-buttons")>-1?k.BUTTON:k.RADIO}(t,t.className);return t.fontFamily&&function(e){if(!Object(g.isEmpty)(e)&&C.THEME_DEFAULT!==e&&-1!==S.indexOf(e)){var t="https://fonts.googleapis.com/css2?family=".concat(e,":wght@400;600;700&display=swap");0===Object(g.filter)(Array.from(document.head.childNodes),(function(e){return"link"===e.nodeName.toLowerCase()&&e.href===t})).length&&document.head.appendChild(Object(g.tap)(document.createElement("link"),(function(e){e.type="text/css",e.rel="stylesheet",e.href=t})))}}(t.fontFamily),Object(o.createElement)("div",{className:W,style:G},d&&Object(o.createElement)(ye,null,d),Object(o.createElement)("div",{className:X},Object(o.createElement)("h3",{className:"crowdsignal-forms-poll__question"},Object(y.decodeEntities)(t.question)),t.note&&Object(o.createElement)("p",{className:"crowdsignal-forms-poll__note"},Object(y.decodeEntities)(t.note)),!Z&&Object(o.createElement)(ve,{answers:J,answerStyle:$,buttonAlignment:t.buttonAlignment,isMultipleChoice:t.isMultipleChoice,onSubmit:D,submitButtonLabel:t.submitButtonLabel,hasVoted:P,isVoting:F,hideBranding:t.hideBranding}),Z&&Object(o.createElement)(he,{pollIdFromApi:T,answers:J,setErrorMessage:m,hideBranding:t.hideBranding})),q&&Object(o.createElement)(Ce,c()({},t,{setDismissSubmitMessage:E})),(U||P)&&Object(o.createElement)(V,{showSubmitMessage:q,isPollClosed:U,hasVoted:P}),r())},Object(B.withFallbackStyles)((function(e){return{fallbackStyles:Z(e.querySelector(".crowdsignal-forms__style-probe"))}}))((function(e){var t=e.fallbackStyles,n=F()(e,["fallbackStyles"]);return Object(o.createElement)(Ne,c()({fallbackStyles:t||{},renderStyleProbe:function(){return t?null:Object(o.createElement)(U,null)}},n))}))),ke=n(30),Te=function(e,t){return Object(g.forEach)(document.querySelectorAll("div[".concat(e,"]")),(function(n){try{var r=JSON.parse(n.dataset[Object(g.camelCase)(e.substr("data-".length))]),o=t(r,n);n.removeAttribute(e),Object(ke.render)(o,n)}catch(i){console.error("Crowdsignal Forms: Failed to parse block data for: %s",e)}}))},Re=function(e,t){(Object(g.isEmpty)(window.CrowdsignalMutationObservers)||!0!==window.CrowdsignalMutationObservers[e])&&(new window.MutationObserver((function(){return Te(e,t)})).observe(document.body,{attributes:!0,attributeFilter:[e],childList:!0,subtree:!0}),Object(g.isEmpty)(window.CrowdsignalMutationObservers)&&(window.CrowdsignalMutationObservers=[]),window.CrowdsignalMutationObservers[e]=!0,Te(e,t))};(function(e,t){if("complete"===document.readyState)return Re(e,t);window.addEventListener("load",(function(){return Re(e,t)}))})("data-crowdsignal-poll",(function(e){return Object(o.createElement)(Ae,{attributes:e})}))}]));
build/rtl/editor-rtl.css CHANGED
@@ -1,3 +1,3 @@
1
- /* This file was automatically generated on Dec 29 2020 20:45:26 */
2
 
3
- .crowdsignal-forms__connect-to-crowdsignal{border:1px solid #000;font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;padding:24px;text-align:initial}.crowdsignal-forms__connect-to-crowdsignal-header{display:flex;flex-direction:row;align-items:center}.crowdsignal-forms__connect-to-crowdsignal-body{font-size:13px;margin-top:24px;margin-bottom:16px}.crowdsignal-forms__connect-to-crowdsignal-title{font-size:24pt;margin-inline-start:16px}.crowdsignal-forms__signal-warning{font-family:-apple-system, blinkmacsystemfont, "Segoe UI", roboto, oxygen-sans, ubuntu, cantarell, "Helvetica Neue", sans-serif;font-size:13px;line-height:23.4px;border:1px solid #444;border-right:8px solid var(--wp-admin-theme-color);border-radius:4px;padding:8px;display:flex;flex-direction:row;align-items:center;margin-bottom:16px}.crowdsignal-forms__signal-warning-icon{line-height:0;padding:8px 8px 8px 16px}.crowdsignal-forms__signal-warning-message a{text-decoration:underline}.crowdsignal-forms__sidebar-promote{margin-right:16px;flex-grow:1}#editor .editor-styles-wrapper .crowdsignal-forms-poll{margin-right:0;margin-left:0}#editor .editor-styles-wrapper .block-editor-block-list__block[data-type="crowdsignal-forms/poll"][data-align="full"] .crowdsignal-forms-poll{border-right-width:0;border-left-width:0}@media screen and (min-width: 660px){#editor .editor-styles-wrapper .block-editor-block-list__block[data-type="crowdsignal-forms/poll"][data-align="wide"] .crowdsignal-forms-poll__content,#editor .editor-styles-wrapper .block-editor-block-list__block[data-type="crowdsignal-forms/poll"][data-align="full"] .crowdsignal-forms-poll__content{padding:80px}}#editor .editor-styles-wrapper .crowdsignal-forms-poll__answer{cursor:text}#editor .editor-styles-wrapper .crowdsignal-forms-poll__answer:hover,#editor .editor-styles-wrapper .crowdsignal-forms-poll__answer.is-focused{color:inherit}#editor .editor-styles-wrapper .wp-block-button .crowdsignal-forms-poll__submit-button.wp-block-button__link{cursor:text}#editor .editor-styles-wrapper .wp-block-button .crowdsignal-forms-poll__submit-button.wp-block-button__link:hover{opacity:inherit}.crowdsignal-forms-poll__resize-wrapper{margin-right:auto;margin-left:auto}.crowdsignal-forms__redirect-url input[type="text"]{width:100%}.crowdsignal-forms__redirect-url__suggestions{width:260px}.crowdsignal-forms__row{display:flex;flex-direction:row}.crowdsignal-forms__row .crowdsignal-forms__small-text-input input[type="text"]{width:40px}.crowdsignal-forms__row .crowdsignal-forms__small-text-input input[type="number"]{width:50px}.crowdsignal-forms__reset-width-button{margin-right:auto;margin-top:25px}.crowdsignal-forms-poll__edit-bar{font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:13px;margin-top:24px;padding:18px 24px;color:#d82e20;border-right:4px solid #d82e20;background:#f8dad8;display:flex;flex-direction:row;justify-content:space-between;align-items:center}.crowdsignal-forms-poll__edit-bar .crowdsignal-forms-poll__edit-bar-message{padding-inline-end:24px}.crowdsignal-forms-poll__edit-bar button.crowdsignal-forms-poll__edit-bar-button{border:2px solid #d82e20;border-radius:4px;color:#d82e20;background:transparent;padding:8px 16px;cursor:pointer}.crowdsignal-poll-wrapper:not(:first-child),[data-type="crowdsignal-forms/poll"]:not(:first-child){margin-top:3em}.crowdsignal-poll-wrapper:not(:last-child),[data-type="crowdsignal-forms/poll"]:not(:last-child){margin-bottom:3em}.crowdsignal-forms-poll{border-color:var(--crowdsignal-forms-border-color);border-style:solid;border-width:var(--crowdsignal-forms-border-width);margin-right:auto;margin-left:auto;margin-top:5px;position:relative;text-align:right}.entry-content .alignfull.crowdsignal-poll-wrapper .crowdsignal-forms-poll{border-right-width:0;border-left-width:0}.crowdsignal-forms-poll h3.crowdsignal-forms-poll__question{margin:0 0 28px}.crowdsignal-forms-poll h3.crowdsignal-forms-poll__question:first-child{margin-top:0}.crowdsignal-forms-poll p.crowdsignal-forms-poll__note{font-style:italic;margin:0 0 32px}.crowdsignal-forms-poll .crowdsignal-forms-poll__content{padding:40px 24px 16px 24px}.crowdsignal-forms-poll .crowdsignal-forms-poll__content .crowdsignal-forms-poll__question{font-family:var(--crowdsignal-forms-question-font-family)}.crowdsignal-forms-poll .crowdsignal-forms-poll__content .crowdsignal-forms-poll__answer-label,.crowdsignal-forms-poll .crowdsignal-forms-poll__content .crowdsignal-forms-poll__answer-results-answer,.crowdsignal-forms-poll .crowdsignal-forms-poll__content .crowdsignal-forms-poll__note{font-family:var(--crowdsignal-forms-body-font-family)}.entry-content .alignfull.crowdsignal-poll-wrapper .crowdsignal-forms-poll .crowdsignal-forms-poll__content{margin:0 auto;max-width:var(--crowdsignal-forms-content-wide-width)}@media screen and (min-width: 660px){.alignwide.crowdsignal-poll-wrapper .crowdsignal-forms-poll .crowdsignal-forms-poll__content,.alignfull.crowdsignal-poll-wrapper .crowdsignal-forms-poll .crowdsignal-forms-poll__content{padding:80px}}.crowdsignal-forms-poll.is-closed .crowdsignal-forms-poll__form{opacity:0.5}.crowdsignal-forms-poll.is-hidden{opacity:0.5}.crowdsignal-forms-poll.has-text-color{color:var(--crowdsignal-forms-text-color)}.crowdsignal-forms-poll.has-bg-color{background-color:var(--crowdsignal-forms-bg-color)}.crowdsignal-forms-poll.has-border-radius{border-radius:var(--crowdsignal-forms-border-radius);overflow:hidden}.crowdsignal-forms-poll.has-box-shadow{box-shadow:0 3px 6px rgba(0,0,0,0.16),0 3px 6px rgba(0,0,0,0.23)}.crowdsignal-forms-poll .is-transparent{opacity:0;pointer-events:none}.crowdsignal-forms-poll__block-button .crowdsignal-forms-poll__submit-button{-webkit-appearance:initial}.crowdsignal-forms-poll__block-button .crowdsignal-forms-poll__submit-button:disabled{opacity:0.7}.crowdsignal-forms-poll.has-submit-button-text-color .crowdsignal-forms-poll__block-button .crowdsignal-forms-poll__submit-button.wp-block-button__link{color:var(--crowdsignal-forms-submit-button-text-color)}.crowdsignal-forms-poll.has-submit-button-bg-color .crowdsignal-forms-poll__block-button .crowdsignal-forms-poll__submit-button.wp-block-button__link{background-color:var(--crowdsignal-forms-submit-button-bg-color)}.crowdsignal-forms-poll.has-submit-button-bg-color .crowdsignal-forms-poll__block-button .crowdsignal-forms-poll__submit-button.wp-block-button__link:hover{opacity:0.9}.crowdsignal-forms-poll__options.is-button{display:flex;flex-direction:column;flex-wrap:wrap}.crowdsignal-forms-poll__options.is-button.is-inline-button-alignment{flex-direction:row}.crowdsignal-forms-poll__answer{cursor:pointer;display:flex;font-size:inherit;font-weight:600;margin:0;padding:0 2px;position:relative}.crowdsignal-forms-poll__answer.is-button{margin-inline-end:20px;margin-block-end:20px;max-width:100%}.crowdsignal-forms-poll__answer.is-button .wp-block-button.crowdsignal-forms-poll__block-button,.crowdsignal-forms-poll__answer.is-button .crowdsignal-forms-poll__submit-button{max-width:100%}.crowdsignal-forms-poll__answer.is-button .crowdsignal-forms-poll__submit-button{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.crowdsignal-forms-poll__answer:not(.is-button){margin-block-end:16px}.crowdsignal-forms-poll__answer:hover,.crowdsignal-forms-poll__answer.is-focused{color:var(--crowdsignal-forms-submit-button-bg-color)}.has-voted .crowdsignal-forms-poll__answer{opacity:0.5}input[type="checkbox"].crowdsignal-forms-poll__input,input[type="radio"].crowdsignal-forms-poll__input{height:0;opacity:0;position:absolute;width:0}.crowdsignal-forms-poll__check{display:inline-block;height:1em;margin:0 0 0 10px;position:relative;width:1em}.crowdsignal-forms-poll__check::before{background-color:transparent;border:1.5px solid var(--crowdsignal-forms-text-color);border-radius:50%;box-sizing:border-box;content:"";display:block;height:100%;transition:background-color 0.3s, border-color 0.3s;width:100%}.crowdsignal-forms-poll__answer.is-multiple-choice .crowdsignal-forms-poll__check::before{border-radius:3px}.crowdsignal-forms-poll__answer.is-multiple-choice.is-selected .crowdsignal-forms-poll__check::before{border-color:var(--crowdsignal-forms-text-color);background-color:var(--crowdsignal-forms-text-color)}.crowdsignal-forms-poll__answer.is-selected:not(.is-multiple-choice) .crowdsignal-forms-poll__check::after{animation-duration:0.3s;animation-name:crowdsignal-forms-animation__pop;animation-iteration-count:1;background-clip:padding-box;background-color:var(--crowdsignal-forms-text-color);border:4.5px solid transparent;border-radius:50%;box-sizing:border-box;content:"";display:block;height:100%;position:absolute;right:0;top:0;width:100%}.crowdsignal-forms-poll__answer.is-selected.is-multiple-choice .crowdsignal-forms-poll__check::after{border-color:var(--crowdsignal-forms-submit-button-text-color);border-style:solid;border-width:0 2px 2px 0;box-sizing:border-box;content:"";display:block;height:25%;margin:-0.1em -0.2em 0 0;position:absolute;right:50%;top:50%;transform:rotateZ(45deg);width:50%}div.crowdsignal-forms-poll__answer-label-wrapper{flex:1;word-break:break-word}div.crowdsignal-forms-poll__answer-label-wrapper span.crowdsignal-forms-poll__answer-label{line-height:1;vertical-align:top}div.crowdsignal-forms-poll__answer-label-wrapper span.crowdsignal-forms-poll__answer-label span::after{vertical-align:top}.crowdsignal-forms-poll__button{border:0;padding:0}.crowdsignal-forms-poll__actions .wp-block-button,.crowdsignal-forms-poll__options .wp-block-button{margin:0}.crowdsignal-forms-poll__actions{display:flex;justify-content:flex-end}.editor-styles-wrapper .crowdsignal-forms-poll .crowdsignal-forms-poll__actions .wp-block-button.crowdsignal-forms-poll__block-button,.editor-styles-wrapper .crowdsignal-forms-poll .crowdsignal-forms-poll__options .wp-block-button.crowdsignal-forms-poll__block-button{margin:0}.crowdsignal-forms-poll__closed-banner{background-color:var(--crowdsignal-forms-border-color);box-sizing:border-box;display:flex;color:var(--crowdsignal-forms-submit-button-text-color);font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;justify-content:center;padding:calc(var(--crowdsignal-forms-border-width) + 0.2em) 0 0.2em;width:100%}.is-hidden .crowdsignal-forms-poll__closed-banner{font-style:italic}.crowdsignal-forms-poll__error{color:red}.crowdsignal-forms-poll__results-list{margin:0 0 1em;position:relative}.crowdsignal-forms-poll__answer-results{display:flex;flex-direction:column;margin:0 0 16px;width:100%}.crowdsignal-forms-poll__answer-results:last-child{margin:0}.crowdsignal-forms-poll__answer-results-labels{align-items:flex-end;display:flex;margin:0 0 8px;width:100%;word-break:break-word}.crowdsignal-forms-poll__answer-results-answer{flex:1;font-size:1em;font-weight:600}.crowdsignal-forms-poll__answer-results-votes{font-size:0.75em;line-height:2}.crowdsignal-forms-poll__answer-results-percent{font-weight:600;line-height:1.6}.crowdsignal-forms-poll__answer-results-votes,.crowdsignal-forms-poll__answer-results-percent{font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;margin-right:20px;transition:opacity 0.3s}.crowdsignal-forms-poll__answer-results.is-error .crowdsignal-forms-poll__answer-results-votes,.crowdsignal-forms-poll__answer-results.is-error .crowdsignal-forms-poll__answer-results-percent{display:none}.crowdsignal-forms-poll__answer-results.is-loading .crowdsignal-forms-poll__answer-results-votes,.crowdsignal-forms-poll__answer-results.is-loading .crowdsignal-forms-poll__answer-results-percent{animation-duration:1.5s;animation-iteration-count:infinite;animation-name:crowdsignal-forms-animation__pulse;background-color:var(--crowdsignal-forms-text-color);font-size:0.7em;height:1em;width:50px}.crowdsignal-forms-poll__answer-results.is-loading .crowdsignal-forms-poll__answer-results-votes:last-child,.crowdsignal-forms-poll__answer-results.is-loading .crowdsignal-forms-poll__answer-results-percent:last-child{width:40px}.crowdsignal-forms-poll__answer-results-progress-track{border:1px solid;border-color:rgba(var(--crowdsignal-forms-text-color-properties), 0.3);box-sizing:border-box;height:1em;width:100%}.crowdsignal-forms-poll__answer-results.is-loading .crowdsignal-forms-poll__answer-results-progress-track{animation-duration:1.5s;animation-iteration-count:infinite;animation-name:crowdsignal-forms-animation__pulse}.crowdsignal-forms-poll__answer-results-progress-bar{animation-fill-mode:forwards;background-color:var(--crowdsignal-forms-submit-button-bg-color);height:100%;transition:background-color 0.3s, width 0.3s}.crowdsignal-forms-poll__answer-results.is-error .crowdsignal-forms-poll__answer-results-progress-bar{width:0}.crowdsignal-forms-poll__answer-results.is-loading .crowdsignal-forms-poll__answer-results-progress-bar{background-color:var(--crowdsignal-forms-text-color);width:25%}.crowdsignal-forms-poll__answer-results.is-loading:nth-child(5n+1) .crowdsignal-forms-poll__answer-results-progress-bar{width:40%}.crowdsignal-forms-poll__answer-results.is-loading:nth-child(5n+2) .crowdsignal-forms-poll__answer-results-progress-bar{width:75%}.crowdsignal-forms-poll__answer-results.is-loading:nth-child(5n+3) .crowdsignal-forms-poll__answer-results-progress-bar{width:50%}.crowdsignal-forms-poll__answer-results.is-loading:nth-child(5n+4) .crowdsignal-forms-poll__answer-results-progress-bar{width:60%}.crowdsignal-forms-poll__results-footer{display:flex;flex-direction:column;justify-content:space-between;width:100%;font-size:0.9em}.crowdsignal-forms-poll__results-total{font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;position:relative;text-align:left;width:100%;margin-bottom:1em}.crowdsignal-forms-poll__results.is-loading .crowdsignal-forms-poll__results-total{color:transparent}.crowdsignal-forms-poll__results.is-loading .crowdsignal-forms-poll__results-total::before{animation-name:crowdsignal-forms-animation__pulse;animation-duration:1.5s;animation-iteration-count:infinite;background-color:var(--crowdsignal-forms-text-color);content:"";display:block;position:absolute;left:0;height:1em;width:150px}.crowdsignal-forms-poll__footer-branding{display:flex;justify-content:space-between;align-items:center;width:100%;margin-top:16px}.crowdsignal-forms-poll__footer-branding img.crowdsignal-forms-poll__footer-branding-logo{width:50px;height:50px;margin-right:0;margin-left:0}.crowdsignal-forms-poll__footer-branding .crowdsignal-forms__branding-promote{font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:10px;text-decoration:none !important;box-shadow:none;border:0;background-color:#a4a4a4a4;color:#fff;cursor:pointer;padding-left:8px;padding-right:8px;margin-right:16px;border-radius:2px;padding-top:4px;padding-bottom:4px;vertical-align:middle}.crowdsignal-forms-poll__footer-cs-link{font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:16px;text-decoration:none;text-transform:uppercase;vertical-align:middle;border-bottom:0px solid var(--crowdsignal-forms-text-color) !important}.crowdsignal-forms-poll__footer-cs-link:not(:hover){color:var(--crowdsignal-forms-text-color);opacity:0.4}.has-default-thankyou .crowdsignal-forms-poll__footer-cs-link{color:#333}.crowdsignal-forms-poll__error-banner{font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:13px;margin-top:24px;padding:18px 24px;color:#d82e20;border-right:4px solid #d82e20;background:#f8dad8}.crowdsignal-forms-poll__submit-message-container{position:absolute;background-color:var(--crowdsignal-forms-bg-color);right:0;top:0;width:100%;height:100%;overflow:hidden}.has-default-thankyou .crowdsignal-forms-poll__submit-message-container{background-color:#fff}.crowdsignal-forms-poll__submit-message{position:relative}.crowdsignal-forms-poll__submit-message button.crowdsignal-forms-poll__dismiss-submit-message{position:absolute;left:0;top:0;background-color:transparent;color:#000;text-decoration:none;border:none}.crowdsignal-forms-poll__submit-message button.crowdsignal-forms-poll__dismiss-submit-message:hover{background:inherit}.crowdsignal-forms-poll__submit-message-footer{position:absolute;bottom:0;right:0;padding:16px 24px;width:100%;background-color:inherit}.crowdsignal-forms-poll__thank-you-cs-sticker{left:25px;top:66px}.crowdsignal-forms-poll__thank-you-sticker{left:132px;top:12px}.crowdsignal-forms-poll__thank-you-cs-sticker,.crowdsignal-forms-poll__thank-you-sticker{filter:drop-shadow(0 1px 2px rgba(0,0,0,0.2));width:100px;height:100px;position:absolute}.crowdsignal-forms-poll__custom-message-check{color:var(--crowdsignal-forms-text-color);padding-right:24px;padding-top:24px}.crowdsignal-forms-poll__custom-message{font-family:var(--crowdsignal-forms-question-font-family);font-weight:600;padding:16px 24px}.wp_block-crowdsignal-forms-poll__vote-branding{margin-top:16px}.crowdsignal-forms__style-probe{display:none}.crowdsignal-forms-vote .block-editor-block-list__layout{display:flex;flex-direction:row}.crowdsignal-forms__border-popover .crowdsignal-forms__row{padding:10px}.crowdsignal-forms-vote.no-results .crowdsignal-forms-vote-item__count{display:none}.crowdsignal-forms-vote__size-dropdown .components-button.components-dropdown-menu__menu-item.is-active::after{content:"\2713";margin-inline-start:auto;margin-inline-end:0}.crowdsignal-vote-wrapper:not(:first-child),[data-type="crowdsignal-forms/vote"]:not(:first-child){margin-top:3em}.crowdsignal-vote-wrapper:not(:last-child),[data-type="crowdsignal-forms/vote"]:not(:last-child){margin-bottom:3em}.crowdsignal-forms-vote{align-items:center;display:inline-flex;flex-direction:column}.crowdsignal-forms-vote.crowdsignal-forms-vote__example{align-items:center}[data-type="crowdsignal-forms/vote-item"]{margin-top:28px !important;margin-bottom:0 !important}.crowdsignal-forms-vote__items{display:flex;flex-direction:row}.crowdsignal-forms-vote-item{border:var(--crowdsignal-forms-vote-border-width) solid #d2d2d2;border-radius:var(--crowdsignal-forms-vote-border-radius);cursor:pointer;display:flex;flex-direction:row;align-items:center;position:relative;user-select:none;-webkit-user-select:none}.crowdsignal-forms-vote-item:not(:last-child){margin-inline-end:8px !important}.crowdsignal-forms-vote-item.has-bg-color{background-color:var(--crowdsignal-forms-vote-bg-color)}.crowdsignal-forms-vote-item.has-border-color{border-color:var(--crowdsignal-forms-vote-border-color)}.crowdsignal-forms-vote-item.has-text-color{color:var(--crowdsignal-forms-vote-text-color)}.is-closed .crowdsignal-forms-vote-item,.crowdsignal-forms-vote-item.is-disabled{cursor:inherit}.is-closed .crowdsignal-forms-vote-item,.crowdsignal-forms-vote-item.is-disabled:not(.is-voted-on){opacity:0.5}.size-small .crowdsignal-forms-vote-item{padding:18px 10px;height:0.7em}.size-small .crowdsignal-forms-vote-item.is-type-down{padding-right:9px}.size-medium .crowdsignal-forms-vote-item{height:1em;padding:20px 10px}.size-medium .crowdsignal-forms-vote-item.is-type-down{padding-right:9px}.size-large .crowdsignal-forms-vote-item{height:1.2em;padding:22px 16px}.size-large .crowdsignal-forms-vote-item:not(:last-child){margin-inline-end:16px !important}.size-large .crowdsignal-forms-vote-item.is-type-down{padding-right:15px}.crowdsignal-forms-vote-item.is-voted-on,.crowdsignal-forms-vote-item:hover:not(.is-disabled),.crowdsignal-forms-vote-item:focus:not(.is-disabled):not(.is-in-editor){border-color:var(--crowdsignal-forms-vote-voted-color);color:var(--crowdsignal-forms-vote-voted-color)}.crowdsignal-forms-vote-item.is-voted-on.has-bg-color,.crowdsignal-forms-vote-item.is-voted-on.has-text-color,.crowdsignal-forms-vote-item:hover:not(.is-disabled).has-bg-color,.crowdsignal-forms-vote-item:hover:not(.is-disabled).has-text-color,.crowdsignal-forms-vote-item:focus:not(.is-disabled):not(.is-in-editor).has-bg-color,.crowdsignal-forms-vote-item:focus:not(.is-disabled):not(.is-in-editor).has-text-color{background-color:var(--crowdsignal-forms-vote-text-color);border-color:var(--crowdsignal-forms-vote-bg-color);color:var(--crowdsignal-forms-vote-bg-color)}.size-small .crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__icon{width:0.7em;height:0.7em;max-height:0.7em}.size-medium .crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__icon{width:1em;height:1em;max-height:1em}.size-large .crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__icon{width:1.2em;height:1.2em;max-height:1.2em}.crowdsignal-forms-vote-item.is-voted-on .crowdsignal-forms-vote-item__icon{animation-duration:0.4s;animation-name:crowdsignal-forms-animation__grow;animation-iteration-count:1;animation-timing-function:ease-out}.crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count{font-size:14pt;font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;margin-inline-start:10px;font-variant-numeric:tabular-nums;transform:rotateX(0deg);transform-origin:50% 50% 10px;transition:transform 0.3s}.size-small .crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count{font-size:0.6em}.size-medium .crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count{font-size:0.8em}.size-large .crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count{font-size:1em}.crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count-enter,.crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count-enter-active{margin:0;position:absolute;left:0}.crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count-enter{transform:rotateX(-90deg)}.crowdsignal-forms-vote-item.is-voted-on .crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count-enter{transform:rotateX(90deg)}.crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count-exit,.crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count-exit-active{margin:0;position:absolute;left:10px;top:4px;transform:rotateX(90deg)}.crowdsignal-forms-vote-item.is-voted-on .crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count-exit,.crowdsignal-forms-vote-item.is-voted-on .crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count-exit-active{transform:rotateX(-90deg)}.crowdsignal-forms-vote__branding{display:flex}.crowdsignal-forms-vote__branding .crowdsignal-forms-vote__branding-link{font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:8px;padding:8px 4px 0;text-decoration:none !important;text-transform:uppercase;border:0 !important}.crowdsignal-forms-vote__branding .crowdsignal-forms-vote__branding-link.with-external-icon::after{content:"\2197";display:inline;font-size:6px;vertical-align:super}.crowdsignal-forms-vote__branding .crowdsignal-forms-vote__branding-link:not(:hover){color:var(--crowdsignal-forms-text-color)}.crowdsignal-applause-wrapper{margin-bottom:3em}.crowdsignal-forms-applause{display:flex;flex-direction:row;align-items:center;outline:0;width:max-content;cursor:pointer;border:var(--crowdsignal-forms-applause-border-width) solid #d2d2d2;border-radius:var(--crowdsignal-forms-applause-border-radius);user-select:none;--webkit-user-select: none}.crowdsignal-forms-applause .crowdsignal-forms-applause__count{margin:unset !important}.crowdsignal-forms-applause.size-small{padding:20px 12px 18px 16px;height:0.7em}.crowdsignal-forms-applause.size-small .crowdsignal-forms-applause__count{font-size:14px;padding-bottom:2px}.crowdsignal-forms-applause.size-medium{height:1em;padding:24px 8px 20px 16px}.crowdsignal-forms-applause.size-medium .crowdsignal-forms-applause__count{font-size:16px;padding-bottom:4px}.crowdsignal-forms-applause.size-large{height:1.2em;padding:28px 8px 22px 18px}.crowdsignal-forms-applause.size-large .crowdsignal-forms-applause__count{font-size:19px;padding-bottom:6px}.crowdsignal-forms-applause.is-closed{opacity:0.5}.crowdsignal-forms-applause.has-text-color{color:var(--crowdsignal-forms-applause-text-color)}.crowdsignal-forms-applause.has-border-color{border:var(--crowdsignal-forms-applause-border-width) solid var(--crowdsignal-forms-applause-border-color)}.crowdsignal-forms-applause.has-bg-color{background-color:var(--crowdsignal-forms-applause-bg-color)}.crowdsignal-forms-applause:not(.is-closed):hover{color:var(--crowdsignal-forms-applause-hover-color);border-color:var(--crowdsignal-forms-applause-hover-color)}.crowdsignal-forms-applause:not(.is-closed):hover.has-bg-color{color:var(--crowdsignal-forms-applause-bg-color);background-color:var(--crowdsignal-forms-applause-text-color);border-color:var(--crowdsignal-forms-applause-bg-color)}.crowdsignal-forms-applause__animation{fill:var(--crowdsignal-forms-applause-text-color);margin-inline-end:5px}.crowdsignal-forms-applause.size-small .crowdsignal-forms-applause__animation{width:33px;height:33px;max-height:33px}.crowdsignal-forms-applause.size-medium .crowdsignal-forms-applause__animation{width:50px;height:50px;max-height:50px}.crowdsignal-forms-applause.size-large .crowdsignal-forms-applause__animation{width:60px;height:60px;max-height:60px}.crowdsignal-forms-applause__animation .crowdsignal-forms-applause__animation-inner-fill{fill:var(--crowdsignal-forms-applause-bg-color)}.crowdsignal-forms-applause:not(.is-closed):hover .crowdsignal-forms-applause__animation{fill:var(--crowdsignal-forms-applause-hover-color)}.crowdsignal-forms-applause.has-bg-color:not(.is-closed):hover .crowdsignal-forms-applause__animation{fill:var(--crowdsignal-forms-applause-bg-color)}.crowdsignal-forms-applause.has-bg-color:not(.is-closed):hover .crowdsignal-forms-applause__animation .crowdsignal-forms-applause__animation-inner-fill{fill:var(--crowdsignal-forms-applause-text-color)}.crowdsignal-forms-applause__animation-right{transition:transform 0.3s}.crowdsignal-forms-applause:not(.is-closed):hover .crowdsignal-forms-applause__animation-right{transform:translateX(-3%) translateY(-3%)}.crowdsignal-forms-applause__animation-left{transition:transform 0.3s}.crowdsignal-forms-applause:not(.is-closed):hover .crowdsignal-forms-applause__animation-left{transform:translateX(3%) translateY(0)}.crowdsignal-forms-applause__animation-wave-small{opacity:1}.crowdsignal-forms-applause:not(.is-closed):hover .crowdsignal-forms-applause__animation-wave-small{animation:crowdsignal-forms-animation__fade-out 0.3s forwards;transform:translateY(-5%);transition:transform 0.3s}.crowdsignal-forms-applause__animation-wave-large{opacity:0}.crowdsignal-forms-applause .crowdsignal-forms-applause__animation.is-active .crowdsignal-forms-applause__animation-right{transform:translateX(3%) translateY(0);transition:transform 0.1s}.crowdsignal-forms-applause .crowdsignal-forms-applause__animation.is-active .crowdsignal-forms-applause__animation-left{transform:translateX(-3%) translateY(0);transition:transform 0.1s}.crowdsignal-forms-applause .crowdsignal-forms-applause__animation.is-active .crowdsignal-forms-applause__animation-wave-small{animation:crowdsignal-forms-animation__fade-out 0.3s forwards;transform:translateY(-5%);transition:transform 0.3s}.crowdsignal-forms-applause .crowdsignal-forms-applause__animation.is-active .crowdsignal-forms-applause__animation-wave-large{animation:crowdsignal-forms-animation__fade-in 0.03s forwards;animation-delay:0.07s}
1
+ /* This file was automatically generated on Feb 26 2021 21:51:53 */
2
 
3
+ .crowdsignal-forms__connect-to-crowdsignal{border:1px solid #000;font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;padding:24px;text-align:initial}.crowdsignal-forms__connect-to-crowdsignal-header{display:flex;flex-direction:row;align-items:center}.crowdsignal-forms__connect-to-crowdsignal-body{font-size:13px;margin-top:24px;margin-bottom:16px}.crowdsignal-forms__connect-to-crowdsignal-title{font-size:24pt;margin-inline-start:16px}.crowdsignal-forms__editor-notice{margin:0 0 15px !important}.crowdsignal-forms__editor-notice .components-notice__content{display:flex;flex-direction:row;align-items:center}.crowdsignal-forms__editor-notice-icon{line-height:0;padding:8px 8px 8px 16px}.crowdsignal-forms__editor-notice-text{flex-grow:1}.crowdsignal-forms__editor-notice-text a{text-decoration:underline}.crowdsignal-forms__sidebar-promote{margin-right:16px;flex-grow:1}.crowdsignal-forms__footer-branding{align-items:flex-end;display:flex;margin-top:16px;width:100%}.crowdsignal-forms__footer-branding img.crowdsignal-forms__footer-branding-logo{height:50px;margin-right:auto;margin-left:0;width:50px}.crowdsignal-forms__footer-branding .crowdsignal-forms__branding-promote{display:inline-flex;font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:10px;text-decoration:none !important;box-shadow:none;border:0;background-color:#a4a4a4a4;color:#fff;cursor:pointer;padding-left:8px;padding-right:8px;margin-right:16px;border-radius:2px;padding-top:2px;padding-bottom:2px;vertical-align:middle}.crowdsignal-forms__footer-cs-link{display:inline-flex;font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:16px;line-height:18px;text-decoration:none;text-transform:uppercase;vertical-align:middle;border-bottom:0 solid var(--crowdsignal-forms-text-color) !important}.crowdsignal-forms__footer-cs-link:not(:hover){color:var(--crowdsignal-forms-text-color);opacity:0.4}.has-default-thankyou .crowdsignal-forms__footer-cs-link{color:#333}#editor .editor-styles-wrapper .crowdsignal-forms-poll{margin-right:0;margin-left:0}#editor .editor-styles-wrapper .block-editor-block-list__block[data-type="crowdsignal-forms/poll"][data-align="full"] .crowdsignal-forms-poll{border-right-width:0;border-left-width:0}@media screen and (min-width: 660px){#editor .editor-styles-wrapper .block-editor-block-list__block[data-type="crowdsignal-forms/poll"][data-align="wide"] .crowdsignal-forms-poll__content,#editor .editor-styles-wrapper .block-editor-block-list__block[data-type="crowdsignal-forms/poll"][data-align="full"] .crowdsignal-forms-poll__content{padding:80px}}#editor .editor-styles-wrapper .crowdsignal-forms-poll__answer{cursor:text}#editor .editor-styles-wrapper .crowdsignal-forms-poll__answer:hover,#editor .editor-styles-wrapper .crowdsignal-forms-poll__answer.is-focused{color:inherit}#editor .editor-styles-wrapper .wp-block-button .crowdsignal-forms-poll__submit-button.wp-block-button__link{cursor:text}#editor .editor-styles-wrapper .wp-block-button .crowdsignal-forms-poll__submit-button.wp-block-button__link:hover{opacity:inherit}.crowdsignal-forms-poll__resize-wrapper{margin-right:auto;margin-left:auto}.crowdsignal-forms__redirect-url input[type="text"]{width:100%}.crowdsignal-forms__redirect-url__suggestions{width:260px}.crowdsignal-forms__row{display:flex;flex-direction:row}.crowdsignal-forms__row .crowdsignal-forms__small-text-input input[type="text"]{width:40px}.crowdsignal-forms__row .crowdsignal-forms__small-text-input input[type="number"]{width:50px}.crowdsignal-forms__reset-width-button{margin-right:auto;margin-top:25px}.crowdsignal-forms-poll__edit-bar{font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:13px;margin-top:24px;padding:18px 24px;color:#d82e20;border-right:4px solid #d82e20;background:#f8dad8;display:flex;flex-direction:row;justify-content:space-between;align-items:center}.crowdsignal-forms-poll__edit-bar .crowdsignal-forms-poll__edit-bar-message{padding-inline-end:24px}.crowdsignal-forms-poll__edit-bar button.crowdsignal-forms-poll__edit-bar-button{border:2px solid #d82e20;border-radius:4px;color:#d82e20;background:transparent;padding:8px 16px;cursor:pointer}.crowdsignal-poll-wrapper:not(:first-child),[data-type="crowdsignal-forms/poll"]:not(:first-child){margin-top:3em}.crowdsignal-poll-wrapper:not(:last-child),[data-type="crowdsignal-forms/poll"]:not(:last-child){margin-bottom:3em}.crowdsignal-forms-poll{border-color:var(--crowdsignal-forms-border-color);border-style:solid;border-width:var(--crowdsignal-forms-border-width);margin-right:auto;margin-left:auto;margin-top:5px;position:relative;text-align:right}.entry-content .alignfull.crowdsignal-poll-wrapper .crowdsignal-forms-poll{border-right-width:0;border-left-width:0}.crowdsignal-forms-poll h3.crowdsignal-forms-poll__question{margin:0 0 28px}.crowdsignal-forms-poll h3.crowdsignal-forms-poll__question:first-child{margin-top:0}.crowdsignal-forms-poll p.crowdsignal-forms-poll__note{font-style:italic;margin:0 0 32px}.crowdsignal-forms-poll .crowdsignal-forms-poll__content{padding:40px 24px 16px 24px}.crowdsignal-forms-poll .crowdsignal-forms-poll__content .crowdsignal-forms-poll__question{font-family:var(--crowdsignal-forms-question-font-family)}.crowdsignal-forms-poll .crowdsignal-forms-poll__content .crowdsignal-forms-poll__answer-label,.crowdsignal-forms-poll .crowdsignal-forms-poll__content .crowdsignal-forms-poll__answer-results-answer,.crowdsignal-forms-poll .crowdsignal-forms-poll__content .crowdsignal-forms-poll__note{font-family:var(--crowdsignal-forms-body-font-family)}.entry-content .alignfull.crowdsignal-poll-wrapper .crowdsignal-forms-poll .crowdsignal-forms-poll__content{margin:0 auto;max-width:var(--crowdsignal-forms-content-wide-width)}@media screen and (min-width: 660px){.alignwide.crowdsignal-poll-wrapper .crowdsignal-forms-poll .crowdsignal-forms-poll__content,.alignfull.crowdsignal-poll-wrapper .crowdsignal-forms-poll .crowdsignal-forms-poll__content{padding:80px}}.crowdsignal-forms-poll.is-closed .crowdsignal-forms-poll__form{opacity:0.5}.crowdsignal-forms-poll.is-hidden{opacity:0.5}.crowdsignal-forms-poll.has-text-color{color:var(--crowdsignal-forms-text-color)}.crowdsignal-forms-poll.has-bg-color{background-color:var(--crowdsignal-forms-bg-color)}.crowdsignal-forms-poll.has-border-radius{border-radius:var(--crowdsignal-forms-border-radius);overflow:hidden}.crowdsignal-forms-poll.has-box-shadow{box-shadow:0 3px 6px rgba(0,0,0,0.16),0 3px 6px rgba(0,0,0,0.23)}.crowdsignal-forms-poll .is-transparent{opacity:0;pointer-events:none}.crowdsignal-forms-poll__block-button .crowdsignal-forms-poll__submit-button{-webkit-appearance:initial}.crowdsignal-forms-poll__block-button .crowdsignal-forms-poll__submit-button:disabled{opacity:0.7}.crowdsignal-forms-poll.has-submit-button-text-color .crowdsignal-forms-poll__block-button .crowdsignal-forms-poll__submit-button.wp-block-button__link{color:var(--crowdsignal-forms-submit-button-text-color)}.crowdsignal-forms-poll.has-submit-button-bg-color .crowdsignal-forms-poll__block-button .crowdsignal-forms-poll__submit-button.wp-block-button__link{background-color:var(--crowdsignal-forms-submit-button-bg-color)}.crowdsignal-forms-poll.has-submit-button-bg-color .crowdsignal-forms-poll__block-button .crowdsignal-forms-poll__submit-button.wp-block-button__link:hover{opacity:0.9}.crowdsignal-forms-poll__options.is-button{display:flex;flex-direction:column;flex-wrap:wrap}.crowdsignal-forms-poll__options.is-button.is-inline-button-alignment{flex-direction:row}.crowdsignal-forms-poll__answer{cursor:pointer;display:flex;font-size:inherit;font-weight:600;margin:0;padding:0 2px;position:relative}.crowdsignal-forms-poll__answer.is-button{margin-inline-end:20px;margin-block-end:20px;max-width:100%}.crowdsignal-forms-poll__answer.is-button .wp-block-button.crowdsignal-forms-poll__block-button,.crowdsignal-forms-poll__answer.is-button .crowdsignal-forms-poll__submit-button{max-width:100%}.crowdsignal-forms-poll__answer.is-button .crowdsignal-forms-poll__submit-button{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.crowdsignal-forms-poll__answer:not(.is-button){margin-block-end:16px}.crowdsignal-forms-poll__answer:hover,.crowdsignal-forms-poll__answer.is-focused{color:var(--crowdsignal-forms-submit-button-bg-color)}.has-voted .crowdsignal-forms-poll__answer{opacity:0.5}input[type="checkbox"].crowdsignal-forms-poll__input,input[type="radio"].crowdsignal-forms-poll__input{height:0;opacity:0;position:absolute;width:0}.crowdsignal-forms-poll__check{display:inline-block;height:1em;margin:0 0 0 10px;position:relative;width:1em}.crowdsignal-forms-poll__check::before{background-color:transparent;border:1.5px solid var(--crowdsignal-forms-text-color);border-radius:50%;box-sizing:border-box;content:"";display:block;height:100%;transition:background-color 0.3s, border-color 0.3s;width:100%}.crowdsignal-forms-poll__answer.is-multiple-choice .crowdsignal-forms-poll__check::before{border-radius:3px}.crowdsignal-forms-poll__answer.is-multiple-choice.is-selected .crowdsignal-forms-poll__check::before{border-color:var(--crowdsignal-forms-text-color);background-color:var(--crowdsignal-forms-text-color)}.crowdsignal-forms-poll__answer.is-selected:not(.is-multiple-choice) .crowdsignal-forms-poll__check::after{animation-duration:0.3s;animation-name:crowdsignal-forms-animation__pop;animation-iteration-count:1;background-clip:padding-box;background-color:var(--crowdsignal-forms-text-color);border:4.5px solid transparent;border-radius:50%;box-sizing:border-box;content:"";display:block;height:100%;position:absolute;right:0;top:0;width:100%}.crowdsignal-forms-poll__answer.is-selected.is-multiple-choice .crowdsignal-forms-poll__check::after{border-color:var(--crowdsignal-forms-submit-button-text-color);border-style:solid;border-width:0 2px 2px 0;box-sizing:border-box;content:"";display:block;height:25%;margin:-0.1em -0.2em 0 0;position:absolute;right:50%;top:50%;transform:rotateZ(45deg);width:50%}div.crowdsignal-forms-poll__answer-label-wrapper{flex:1;word-break:break-word}div.crowdsignal-forms-poll__answer-label-wrapper span.crowdsignal-forms-poll__answer-label{line-height:1;vertical-align:top}div.crowdsignal-forms-poll__answer-label-wrapper span.crowdsignal-forms-poll__answer-label span::after{vertical-align:top}.crowdsignal-forms-poll__button{border:0;padding:0}.crowdsignal-forms-poll__actions .wp-block-button,.crowdsignal-forms-poll__options .wp-block-button{margin:0}.crowdsignal-forms-poll__actions{display:flex;justify-content:flex-end}.editor-styles-wrapper .crowdsignal-forms-poll .crowdsignal-forms-poll__actions .wp-block-button.crowdsignal-forms-poll__block-button,.editor-styles-wrapper .crowdsignal-forms-poll .crowdsignal-forms-poll__options .wp-block-button.crowdsignal-forms-poll__block-button{margin:0}.crowdsignal-forms-poll__closed-banner{background-color:var(--crowdsignal-forms-border-color);box-sizing:border-box;display:flex;color:var(--crowdsignal-forms-submit-button-text-color);font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;justify-content:center;padding:calc(var(--crowdsignal-forms-border-width) + 0.2em) 0 0.2em;width:100%}.is-hidden .crowdsignal-forms-poll__closed-banner{font-style:italic}.crowdsignal-forms-poll__error{color:red}.crowdsignal-forms-poll__results-list{margin:0 0 1em;position:relative}.crowdsignal-forms-poll__answer-results{display:flex;flex-direction:column;margin:0 0 16px;width:100%}.crowdsignal-forms-poll__answer-results:last-child{margin:0}.crowdsignal-forms-poll__answer-results-labels{align-items:flex-end;display:flex;margin:0 0 8px;width:100%;word-break:break-word}.crowdsignal-forms-poll__answer-results-answer{flex:1;font-size:1em;font-weight:600}.crowdsignal-forms-poll__answer-results-votes{font-size:0.75em;line-height:2}.crowdsignal-forms-poll__answer-results-percent{font-weight:600;line-height:1.6}.crowdsignal-forms-poll__answer-results-votes,.crowdsignal-forms-poll__answer-results-percent{font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;margin-right:20px;transition:opacity 0.3s}.crowdsignal-forms-poll__answer-results.is-error .crowdsignal-forms-poll__answer-results-votes,.crowdsignal-forms-poll__answer-results.is-error .crowdsignal-forms-poll__answer-results-percent{display:none}.crowdsignal-forms-poll__answer-results.is-loading .crowdsignal-forms-poll__answer-results-votes,.crowdsignal-forms-poll__answer-results.is-loading .crowdsignal-forms-poll__answer-results-percent{animation-duration:1.5s;animation-iteration-count:infinite;animation-name:crowdsignal-forms-animation__pulse;background-color:var(--crowdsignal-forms-text-color);font-size:0.7em;height:1em;width:50px}.crowdsignal-forms-poll__answer-results.is-loading .crowdsignal-forms-poll__answer-results-votes:last-child,.crowdsignal-forms-poll__answer-results.is-loading .crowdsignal-forms-poll__answer-results-percent:last-child{width:40px}.crowdsignal-forms-poll__answer-results-progress-track{border:1px solid;border-color:rgba(var(--crowdsignal-forms-text-color-properties), 0.3);box-sizing:border-box;height:1em;width:100%}.crowdsignal-forms-poll__answer-results.is-loading .crowdsignal-forms-poll__answer-results-progress-track{animation-duration:1.5s;animation-iteration-count:infinite;animation-name:crowdsignal-forms-animation__pulse}.crowdsignal-forms-poll__answer-results-progress-bar{animation-fill-mode:forwards;background-color:var(--crowdsignal-forms-submit-button-bg-color);height:100%;transition:background-color 0.3s, width 0.3s}.crowdsignal-forms-poll__answer-results.is-error .crowdsignal-forms-poll__answer-results-progress-bar{width:0}.crowdsignal-forms-poll__answer-results.is-loading .crowdsignal-forms-poll__answer-results-progress-bar{background-color:var(--crowdsignal-forms-text-color);width:25%}.crowdsignal-forms-poll__answer-results.is-loading:nth-child(5n+1) .crowdsignal-forms-poll__answer-results-progress-bar{width:40%}.crowdsignal-forms-poll__answer-results.is-loading:nth-child(5n+2) .crowdsignal-forms-poll__answer-results-progress-bar{width:75%}.crowdsignal-forms-poll__answer-results.is-loading:nth-child(5n+3) .crowdsignal-forms-poll__answer-results-progress-bar{width:50%}.crowdsignal-forms-poll__answer-results.is-loading:nth-child(5n+4) .crowdsignal-forms-poll__answer-results-progress-bar{width:60%}.crowdsignal-forms-poll__results-footer{display:flex;flex-direction:column;justify-content:space-between;width:100%;font-size:0.9em}.crowdsignal-forms-poll__results-total{font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;position:relative;text-align:left;width:100%;margin-bottom:1em}.crowdsignal-forms-poll__results.is-loading .crowdsignal-forms-poll__results-total{color:transparent}.crowdsignal-forms-poll__results.is-loading .crowdsignal-forms-poll__results-total::before{animation-name:crowdsignal-forms-animation__pulse;animation-duration:1.5s;animation-iteration-count:infinite;background-color:var(--crowdsignal-forms-text-color);content:"";display:block;position:absolute;left:0;height:1em;width:150px}.crowdsignal-forms-poll__error-banner{font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:13px;margin-top:24px;padding:18px 24px;color:#d82e20;border-right:4px solid #d82e20;background:#f8dad8}.crowdsignal-forms-poll__submit-message-container{position:absolute;background-color:var(--crowdsignal-forms-bg-color);right:0;top:0;width:100%;height:100%;overflow:hidden}.has-default-thankyou .crowdsignal-forms-poll__submit-message-container{background-color:#fff}.crowdsignal-forms-poll__submit-message{position:relative}.crowdsignal-forms-poll__submit-message button.crowdsignal-forms-poll__dismiss-submit-message{position:absolute;left:0;top:0;background-color:transparent;color:#000;text-decoration:none;border:none}.crowdsignal-forms-poll__submit-message button.crowdsignal-forms-poll__dismiss-submit-message:hover{background:inherit}.crowdsignal-forms-poll__submit-message-footer{position:absolute;bottom:0;right:0;padding:16px 24px;width:100%;background-color:inherit}.crowdsignal-forms-poll__thank-you-cs-sticker{left:25px;top:66px}.crowdsignal-forms-poll__thank-you-sticker{left:132px;top:12px}.crowdsignal-forms-poll__thank-you-cs-sticker,.crowdsignal-forms-poll__thank-you-sticker{filter:drop-shadow(0 1px 2px rgba(0,0,0,0.2));width:100px;height:100px;position:absolute}.crowdsignal-forms-poll__custom-message-check{color:var(--crowdsignal-forms-text-color);padding-right:24px;padding-top:24px}.crowdsignal-forms-poll__custom-message{font-family:var(--crowdsignal-forms-question-font-family);font-weight:600;padding:16px 24px}.wp_block-crowdsignal-forms-poll__vote-branding{margin-top:16px}.crowdsignal-forms__style-probe{display:none}.crowdsignal-forms-vote .block-editor-block-list__layout{display:flex;flex-direction:row}.crowdsignal-forms__border-popover .crowdsignal-forms__row{padding:10px}.crowdsignal-forms-vote.no-results .crowdsignal-forms-vote-item__count{display:none}.crowdsignal-forms-vote__size-dropdown .components-button.components-dropdown-menu__menu-item.is-active::after{content:"\2713";margin-inline-start:auto;margin-inline-end:0}.crowdsignal-vote-wrapper:not(:first-child),[data-type="crowdsignal-forms/vote"]:not(:first-child){margin-top:3em}.crowdsignal-vote-wrapper:not(:last-child),[data-type="crowdsignal-forms/vote"]:not(:last-child){margin-bottom:3em}.crowdsignal-forms-vote{align-items:center;display:inline-flex;flex-direction:column}.crowdsignal-forms-vote.crowdsignal-forms-vote__example{align-items:center}[data-type="crowdsignal-forms/vote-item"]{margin-top:28px !important;margin-bottom:0 !important}.crowdsignal-forms-vote__items{display:flex;flex-direction:row}.crowdsignal-forms-vote-item{border:var(--crowdsignal-forms-vote-border-width) solid #d2d2d2;border-radius:var(--crowdsignal-forms-vote-border-radius);cursor:pointer;display:flex;flex-direction:row;align-items:center;position:relative;user-select:none;-webkit-user-select:none}.crowdsignal-forms-vote-item:not(:last-child){margin-inline-end:8px !important}.crowdsignal-forms-vote-item.has-bg-color{background-color:var(--crowdsignal-forms-vote-bg-color)}.crowdsignal-forms-vote-item.has-border-color{border-color:var(--crowdsignal-forms-vote-border-color)}.crowdsignal-forms-vote-item.has-text-color{color:var(--crowdsignal-forms-vote-text-color)}.is-closed .crowdsignal-forms-vote-item,.crowdsignal-forms-vote-item.is-disabled{cursor:inherit}.is-closed .crowdsignal-forms-vote-item,.crowdsignal-forms-vote-item.is-disabled:not(.is-voted-on){opacity:0.5}.size-small .crowdsignal-forms-vote-item{padding:18px 10px;height:0.7em}.size-small .crowdsignal-forms-vote-item.is-type-down{padding-right:9px}.size-medium .crowdsignal-forms-vote-item{height:1em;padding:20px 10px}.size-medium .crowdsignal-forms-vote-item.is-type-down{padding-right:9px}.size-large .crowdsignal-forms-vote-item{height:1.2em;padding:22px 16px}.size-large .crowdsignal-forms-vote-item:not(:last-child){margin-inline-end:16px !important}.size-large .crowdsignal-forms-vote-item.is-type-down{padding-right:15px}.crowdsignal-forms-vote-item.is-voted-on,.crowdsignal-forms-vote-item:hover:not(.is-disabled),.crowdsignal-forms-vote-item:focus:not(.is-disabled):not(.is-in-editor){border-color:var(--crowdsignal-forms-vote-voted-color);color:var(--crowdsignal-forms-vote-voted-color)}.crowdsignal-forms-vote-item.is-voted-on.has-bg-color,.crowdsignal-forms-vote-item.is-voted-on.has-text-color,.crowdsignal-forms-vote-item:hover:not(.is-disabled).has-bg-color,.crowdsignal-forms-vote-item:hover:not(.is-disabled).has-text-color,.crowdsignal-forms-vote-item:focus:not(.is-disabled):not(.is-in-editor).has-bg-color,.crowdsignal-forms-vote-item:focus:not(.is-disabled):not(.is-in-editor).has-text-color{background-color:var(--crowdsignal-forms-vote-text-color);border-color:var(--crowdsignal-forms-vote-bg-color);color:var(--crowdsignal-forms-vote-bg-color)}.size-small .crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__icon{width:0.7em;height:0.7em;max-height:0.7em}.size-medium .crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__icon{width:1em;height:1em;max-height:1em}.size-large .crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__icon{width:1.2em;height:1.2em;max-height:1.2em}.crowdsignal-forms-vote-item.is-voted-on .crowdsignal-forms-vote-item__icon{animation-duration:0.4s;animation-name:crowdsignal-forms-animation__grow;animation-iteration-count:1;animation-timing-function:ease-out}.crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count{font-size:14pt;font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;margin-inline-start:10px;font-variant-numeric:tabular-nums;transform:rotateX(0deg);transform-origin:50% 50% 10px;transition:transform 0.3s}.size-small .crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count{font-size:0.6em}.size-medium .crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count{font-size:0.8em}.size-large .crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count{font-size:1em}.crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count-enter,.crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count-enter-active{margin:0;position:absolute;left:0}.crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count-enter{transform:rotateX(-90deg)}.crowdsignal-forms-vote-item.is-voted-on .crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count-enter{transform:rotateX(90deg)}.crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count-exit,.crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count-exit-active{margin:0;position:absolute;left:10px;top:4px;transform:rotateX(90deg)}.crowdsignal-forms-vote-item.is-voted-on .crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count-exit,.crowdsignal-forms-vote-item.is-voted-on .crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count-exit-active{transform:rotateX(-90deg)}.crowdsignal-forms-vote__branding{display:flex}.crowdsignal-forms-vote__branding .crowdsignal-forms-vote__branding-link{font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:8px;padding:8px 4px 0;text-decoration:none !important;text-transform:uppercase;border:0 !important}.crowdsignal-forms-vote__branding .crowdsignal-forms-vote__branding-link.with-external-icon::after{content:"\2197";display:inline;font-size:6px;vertical-align:super}.crowdsignal-forms-vote__branding .crowdsignal-forms-vote__branding-link:not(:hover){color:var(--crowdsignal-forms-text-color)}.crowdsignal-applause-wrapper{margin-bottom:3em}.crowdsignal-forms-applause{display:flex;flex-direction:row;align-items:center;outline:0;width:max-content;cursor:pointer;border:var(--crowdsignal-forms-applause-border-width) solid #d2d2d2;border-radius:var(--crowdsignal-forms-applause-border-radius);user-select:none;--webkit-user-select: none}.crowdsignal-forms-applause .crowdsignal-forms-applause__count{margin:unset !important}.crowdsignal-forms-applause.size-small{padding:20px 12px 18px 16px;height:0.7em}.crowdsignal-forms-applause.size-small .crowdsignal-forms-applause__count{font-size:14px;padding-bottom:2px}.crowdsignal-forms-applause.size-medium{height:1em;padding:24px 8px 20px 16px}.crowdsignal-forms-applause.size-medium .crowdsignal-forms-applause__count{font-size:16px;padding-bottom:4px}.crowdsignal-forms-applause.size-large{height:1.2em;padding:28px 8px 22px 18px}.crowdsignal-forms-applause.size-large .crowdsignal-forms-applause__count{font-size:19px;padding-bottom:6px}.crowdsignal-forms-applause.is-closed{opacity:0.5}.crowdsignal-forms-applause.has-text-color{color:var(--crowdsignal-forms-applause-text-color)}.crowdsignal-forms-applause.has-border-color{border:var(--crowdsignal-forms-applause-border-width) solid var(--crowdsignal-forms-applause-border-color)}.crowdsignal-forms-applause.has-bg-color{background-color:var(--crowdsignal-forms-applause-bg-color)}.crowdsignal-forms-applause:not(.is-closed):hover{color:var(--crowdsignal-forms-applause-hover-color);border-color:var(--crowdsignal-forms-applause-hover-color)}.crowdsignal-forms-applause:not(.is-closed):hover.has-bg-color{color:var(--crowdsignal-forms-applause-bg-color);background-color:var(--crowdsignal-forms-applause-text-color);border-color:var(--crowdsignal-forms-applause-bg-color)}.crowdsignal-forms-applause__animation{fill:var(--crowdsignal-forms-applause-text-color);margin-inline-end:5px}.crowdsignal-forms-applause.size-small .crowdsignal-forms-applause__animation{width:33px;height:33px;max-height:33px}.crowdsignal-forms-applause.size-medium .crowdsignal-forms-applause__animation{width:50px;height:50px;max-height:50px}.crowdsignal-forms-applause.size-large .crowdsignal-forms-applause__animation{width:60px;height:60px;max-height:60px}.crowdsignal-forms-applause__animation .crowdsignal-forms-applause__animation-inner-fill{fill:var(--crowdsignal-forms-applause-bg-color)}.crowdsignal-forms-applause:not(.is-closed):hover .crowdsignal-forms-applause__animation{fill:var(--crowdsignal-forms-applause-hover-color)}.crowdsignal-forms-applause.has-bg-color:not(.is-closed):hover .crowdsignal-forms-applause__animation{fill:var(--crowdsignal-forms-applause-bg-color)}.crowdsignal-forms-applause.has-bg-color:not(.is-closed):hover .crowdsignal-forms-applause__animation .crowdsignal-forms-applause__animation-inner-fill{fill:var(--crowdsignal-forms-applause-text-color)}.crowdsignal-forms-applause__animation-right{transition:transform 0.3s}.crowdsignal-forms-applause:not(.is-closed):hover .crowdsignal-forms-applause__animation-right{transform:translateX(-3%) translateY(-3%)}.crowdsignal-forms-applause__animation-left{transition:transform 0.3s}.crowdsignal-forms-applause:not(.is-closed):hover .crowdsignal-forms-applause__animation-left{transform:translateX(3%) translateY(0)}.crowdsignal-forms-applause__animation-wave-small{opacity:1}.crowdsignal-forms-applause:not(.is-closed):hover .crowdsignal-forms-applause__animation-wave-small{animation:crowdsignal-forms-animation__fade-out 0.3s forwards;transform:translateY(-5%);transition:transform 0.3s}.crowdsignal-forms-applause__animation-wave-large{opacity:0}.crowdsignal-forms-applause .crowdsignal-forms-applause__animation.is-active .crowdsignal-forms-applause__animation-right{transform:translateX(3%) translateY(0);transition:transform 0.1s}.crowdsignal-forms-applause .crowdsignal-forms-applause__animation.is-active .crowdsignal-forms-applause__animation-left{transform:translateX(-3%) translateY(0);transition:transform 0.1s}.crowdsignal-forms-applause .crowdsignal-forms-applause__animation.is-active .crowdsignal-forms-applause__animation-wave-small{animation:crowdsignal-forms-animation__fade-out 0.3s forwards;transform:translateY(-5%);transition:transform 0.3s}.crowdsignal-forms-applause .crowdsignal-forms-applause__animation.is-active .crowdsignal-forms-applause__animation-wave-large{animation:crowdsignal-forms-animation__fade-in 0.03s forwards;animation-delay:0.07s}.crowdsignal-forms-nps.is-inactive{opacity:0.6}.crowdsignal-forms-nps__toolbar-toggle{font-weight:600;padding-right:16px !important;padding-left:16px !important}.crowdsignal-forms-nps__toolbar-popover{padding:15px;min-width:280px}.crowdsignal-forms-nps__toolbar-popover .components-base-control__field{display:flex;flex-direction:row;align-items:center;margin-bottom:0}.crowdsignal-forms-nps__toolbar-popover .components-base-control__label{display:block;flex-grow:1;line-height:30px;margin-bottom:0}.crowdsignal-forms-nps__toolbar-popover .components-text-control__input{width:5em}.crowdsignal-forms-nps__toolbar-popover-button svg{margin-left:0 !important}.crowdsignal-forms-nps__toolbar-popover-button.components-button.has-icon .dashicon{margin-left:2px}.crowdsignal-forms-nps__rating-button:hover{background-color:var(--crowdsignal-forms-button-text-color);border-color:var(--crowdsignal-forms-button-color);color:var(--crowdsignal-forms-button-color)}.crowdsignal-forms-nps{border:0;border-top:10px solid var(--crowdsignal-forms-button-color);background-color:var(--crowdsignal-forms-background-color);color:var(--crowdsignal-forms-text-color);height:auto;padding:24px 16px;position:relative}@media screen and (min-width: 670px){.crowdsignal-forms-nps{padding:32px 32px 24px 32px}}.crowdsignal-forms-nps .crowdsignal-forms__footer-branding{margin-top:40px}.crowdsignal-forms-nps__close-button{align-items:center;background-color:var(--crowdsignal-forms-button-color);border:0;border-radius:20px;color:var(--crowdsignal-forms-button-text-color);display:flex;height:40px;justify-content:center;outline:0;padding:0;position:absolute;left:-20px;top:-25px;width:40px}.crowdsignal-forms-nps__close-button:hover{background-color:var(--crowdsignal-forms-button-text-color);color:var(--crowdsignal-forms-button-color)}.crowdsignal-forms-nps__question{margin-top:0 !important;margin-bottom:32px !important}.crowdsignal-forms-nps__rating{display:flex;flex-direction:column}.crowdsignal-forms-nps__rating-labels{display:flex;flex-direction:row;font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:14px;justify-content:space-between;margin-top:8px}.crowdsignal-forms-nps__rating-scale{display:flex;margin:10px auto 0;width:100%}.crowdsignal-forms-nps__rating-button{background-color:var(--crowdsignal-forms-button-color);border:1px solid var(--crowdsignal-forms-button-color);border-radius:2px;color:var(--crowdsignal-forms-button-text-color);cursor:pointer;display:inline-flex;flex:1;font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:15px;font-weight:600;height:50px;justify-content:center;line-height:50px;margin:0 0.4em 0 0;padding:0;text-align:center;text-decoration:none;transition:background-color 0.2s, color 0.2s}.crowdsignal-forms-nps__rating-button:first-child{margin:0}.crowdsignal-forms-nps__rating-button:hover:enabled{background-color:var(--crowdsignal-forms-button-text-color);color:var(--crowdsignal-forms-button-color);text-decoration:none}.crowdsignal-forms-nps__rating-button:disabled:not(.is-active){background-color:transparent;color:var(--crowdsignal-forms-button-color)}@media screen and (min-width: 670px){.crowdsignal-forms-nps__rating-button{margin:0 0.7em 0 0}}.crowdsignal-forms-nps__feedback{display:flex;flex-direction:column}.crowdsignal-forms-nps__feedback-text{margin-top:16px;margin-bottom:25px;width:100%}.crowdsignal-forms-nps__feedback-text textarea{font-size:var(--crowdsignal-forms-text-size)}.crowdsignal-forms-nps__feedback-button-wrapper{align-self:flex-end}.crowdsignal-forms-nps__feedback-button{align-self:flex-end;background-color:var(--crowdsignal-forms-button-color) !important;border:1px solid var(--crowdsignal-forms-button-color);color:var(--crowdsignal-forms-button-text-color) !important;text-decoration:none}.crowdsignal-forms-nps__feedback-button:hover{background-color:var(--crowdsignal-forms-button-text-color) !important;color:var(--crowdsignal-forms-button-color) !important;text-decoration:none}
build/rtl/nps-rtl.css ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /* This file was automatically generated on Feb 24 2021 01:33:47 */
2
+
3
+ @keyframes crowdsignal-forms-animation__pop{0%{transform:scale(0)}50%{transform:scale(1.2)}100%{transform:scale(1)}}@keyframes crowdsignal-forms-animation__pulse{0%{opacity:0.4}50%{opacity:0.7}100%{opacity:0.4}}@keyframes crowdsignal-forms-animation__grow{0%{transform:scale(1)}50%{transform:scale(1.4)}100%{transform:scale(1)}}@keyframes crowdsignal-forms-animation__fade-in{0%{opacity:0}100%{opacity:1}}@keyframes crowdsignal-forms-animation__fade-out{0%{opacity:1}100%{opacity:0}}.crowdsignal-forms-dialog-wrapper{align-items:center;background:rgba(0,0,0,0.3);display:flex;justify-content:center;position:fixed;bottom:0;right:0;left:0;top:0;z-index:10000}.crowdsignal-forms-nps{border:0;border-top:10px solid var(--crowdsignal-forms-button-color);background-color:var(--crowdsignal-forms-background-color);color:var(--crowdsignal-forms-text-color);height:auto;padding:24px 16px;position:relative}@media screen and (min-width: 670px){.crowdsignal-forms-nps{padding:32px 32px 24px 32px}}.crowdsignal-forms-nps .crowdsignal-forms__footer-branding{margin-top:40px}.crowdsignal-forms-nps__close-button{align-items:center;background-color:var(--crowdsignal-forms-button-color);border:0;border-radius:20px;color:var(--crowdsignal-forms-button-text-color);display:flex;height:40px;justify-content:center;outline:0;padding:0;position:absolute;left:-20px;top:-25px;width:40px}.crowdsignal-forms-nps__close-button:hover{background-color:var(--crowdsignal-forms-button-text-color);color:var(--crowdsignal-forms-button-color)}.crowdsignal-forms-nps__question{margin-top:0 !important;margin-bottom:32px !important}.crowdsignal-forms-nps__rating{display:flex;flex-direction:column}.crowdsignal-forms-nps__rating-labels{display:flex;flex-direction:row;font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:14px;justify-content:space-between;margin-top:8px}.crowdsignal-forms-nps__rating-scale{display:flex;margin:10px auto 0;width:100%}.crowdsignal-forms-nps__rating-button{background-color:var(--crowdsignal-forms-button-color);border:1px solid var(--crowdsignal-forms-button-color);border-radius:2px;color:var(--crowdsignal-forms-button-text-color);cursor:pointer;display:inline-flex;flex:1;font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:15px;font-weight:600;height:50px;justify-content:center;line-height:50px;margin:0 0.4em 0 0;padding:0;text-align:center;text-decoration:none;transition:background-color 0.2s, color 0.2s}.crowdsignal-forms-nps__rating-button:first-child{margin:0}.crowdsignal-forms-nps__rating-button:hover:enabled{background-color:var(--crowdsignal-forms-button-text-color);color:var(--crowdsignal-forms-button-color);text-decoration:none}.crowdsignal-forms-nps__rating-button:disabled:not(.is-active){background-color:transparent;color:var(--crowdsignal-forms-button-color)}@media screen and (min-width: 670px){.crowdsignal-forms-nps__rating-button{margin:0 0.7em 0 0}}.crowdsignal-forms-nps__feedback{display:flex;flex-direction:column}.crowdsignal-forms-nps__feedback-text{margin-top:16px;margin-bottom:25px;width:100%}.crowdsignal-forms-nps__feedback-text textarea{font-size:var(--crowdsignal-forms-text-size)}.crowdsignal-forms-nps__feedback-button-wrapper{align-self:flex-end}.crowdsignal-forms-nps__feedback-button{align-self:flex-end;background-color:var(--crowdsignal-forms-button-color) !important;border:1px solid var(--crowdsignal-forms-button-color);color:var(--crowdsignal-forms-button-text-color) !important;text-decoration:none}.crowdsignal-forms-nps__feedback-button:hover{background-color:var(--crowdsignal-forms-button-text-color) !important;color:var(--crowdsignal-forms-button-color) !important;text-decoration:none}.crowdsignal-forms__footer-branding{align-items:flex-end;display:flex;margin-top:16px;width:100%}.crowdsignal-forms__footer-branding img.crowdsignal-forms__footer-branding-logo{height:50px;margin-right:auto;margin-left:0;width:50px}.crowdsignal-forms__footer-branding .crowdsignal-forms__branding-promote{display:inline-flex;font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:10px;text-decoration:none !important;box-shadow:none;border:0;background-color:#a4a4a4a4;color:#fff;cursor:pointer;padding-left:8px;padding-right:8px;margin-right:16px;border-radius:2px;padding-top:2px;padding-bottom:2px;vertical-align:middle}.crowdsignal-forms__footer-cs-link{display:inline-flex;font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:16px;line-height:18px;text-decoration:none;text-transform:uppercase;vertical-align:middle;border-bottom:0 solid var(--crowdsignal-forms-text-color) !important}.crowdsignal-forms__footer-cs-link:not(:hover){color:var(--crowdsignal-forms-text-color);opacity:0.4}.has-default-thankyou .crowdsignal-forms__footer-cs-link{color:#333}
build/rtl/poll-rtl.css CHANGED
@@ -1,3 +1,3 @@
1
- /* This file was automatically generated on Dec 29 2020 20:45:26 */
2
 
3
- @keyframes crowdsignal-forms-animation__pop{0%{transform:scale(0)}50%{transform:scale(1.2)}100%{transform:scale(1)}}@keyframes crowdsignal-forms-animation__pulse{0%{opacity:0.4}50%{opacity:0.7}100%{opacity:0.4}}@keyframes crowdsignal-forms-animation__grow{0%{transform:scale(1)}50%{transform:scale(1.4)}100%{transform:scale(1)}}@keyframes crowdsignal-forms-animation__fade-in{0%{opacity:0}100%{opacity:1}}@keyframes crowdsignal-forms-animation__fade-out{0%{opacity:1}100%{opacity:0}}.crowdsignal-poll-wrapper:not(:first-child),[data-type="crowdsignal-forms/poll"]:not(:first-child){margin-top:3em}.crowdsignal-poll-wrapper:not(:last-child),[data-type="crowdsignal-forms/poll"]:not(:last-child){margin-bottom:3em}.crowdsignal-forms-poll{border-color:var(--crowdsignal-forms-border-color);border-style:solid;border-width:var(--crowdsignal-forms-border-width);margin-right:auto;margin-left:auto;margin-top:5px;position:relative;text-align:right}.entry-content .alignfull.crowdsignal-poll-wrapper .crowdsignal-forms-poll{border-right-width:0;border-left-width:0}.crowdsignal-forms-poll h3.crowdsignal-forms-poll__question{margin:0 0 28px}.crowdsignal-forms-poll h3.crowdsignal-forms-poll__question:first-child{margin-top:0}.crowdsignal-forms-poll p.crowdsignal-forms-poll__note{font-style:italic;margin:0 0 32px}.crowdsignal-forms-poll .crowdsignal-forms-poll__content{padding:40px 24px 16px 24px}.crowdsignal-forms-poll .crowdsignal-forms-poll__content .crowdsignal-forms-poll__question{font-family:var(--crowdsignal-forms-question-font-family)}.crowdsignal-forms-poll .crowdsignal-forms-poll__content .crowdsignal-forms-poll__answer-label,.crowdsignal-forms-poll .crowdsignal-forms-poll__content .crowdsignal-forms-poll__answer-results-answer,.crowdsignal-forms-poll .crowdsignal-forms-poll__content .crowdsignal-forms-poll__note{font-family:var(--crowdsignal-forms-body-font-family)}.entry-content .alignfull.crowdsignal-poll-wrapper .crowdsignal-forms-poll .crowdsignal-forms-poll__content{margin:0 auto;max-width:var(--crowdsignal-forms-content-wide-width)}@media screen and (min-width: 660px){.alignwide.crowdsignal-poll-wrapper .crowdsignal-forms-poll .crowdsignal-forms-poll__content,.alignfull.crowdsignal-poll-wrapper .crowdsignal-forms-poll .crowdsignal-forms-poll__content{padding:80px}}.crowdsignal-forms-poll.is-closed .crowdsignal-forms-poll__form{opacity:0.5}.crowdsignal-forms-poll.is-hidden{opacity:0.5}.crowdsignal-forms-poll.has-text-color{color:var(--crowdsignal-forms-text-color)}.crowdsignal-forms-poll.has-bg-color{background-color:var(--crowdsignal-forms-bg-color)}.crowdsignal-forms-poll.has-border-radius{border-radius:var(--crowdsignal-forms-border-radius);overflow:hidden}.crowdsignal-forms-poll.has-box-shadow{box-shadow:0 3px 6px rgba(0,0,0,0.16),0 3px 6px rgba(0,0,0,0.23)}.crowdsignal-forms-poll .is-transparent{opacity:0;pointer-events:none}.crowdsignal-forms-poll__block-button .crowdsignal-forms-poll__submit-button{-webkit-appearance:initial}.crowdsignal-forms-poll__block-button .crowdsignal-forms-poll__submit-button:disabled{opacity:0.7}.crowdsignal-forms-poll.has-submit-button-text-color .crowdsignal-forms-poll__block-button .crowdsignal-forms-poll__submit-button.wp-block-button__link{color:var(--crowdsignal-forms-submit-button-text-color)}.crowdsignal-forms-poll.has-submit-button-bg-color .crowdsignal-forms-poll__block-button .crowdsignal-forms-poll__submit-button.wp-block-button__link{background-color:var(--crowdsignal-forms-submit-button-bg-color)}.crowdsignal-forms-poll.has-submit-button-bg-color .crowdsignal-forms-poll__block-button .crowdsignal-forms-poll__submit-button.wp-block-button__link:hover{opacity:0.9}.crowdsignal-forms-poll__options.is-button{display:flex;flex-direction:column;flex-wrap:wrap}.crowdsignal-forms-poll__options.is-button.is-inline-button-alignment{flex-direction:row}.crowdsignal-forms-poll__answer{cursor:pointer;display:flex;font-size:inherit;font-weight:600;margin:0;padding:0 2px;position:relative}.crowdsignal-forms-poll__answer.is-button{margin-inline-end:20px;margin-block-end:20px;max-width:100%}.crowdsignal-forms-poll__answer.is-button .wp-block-button.crowdsignal-forms-poll__block-button,.crowdsignal-forms-poll__answer.is-button .crowdsignal-forms-poll__submit-button{max-width:100%}.crowdsignal-forms-poll__answer.is-button .crowdsignal-forms-poll__submit-button{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.crowdsignal-forms-poll__answer:not(.is-button){margin-block-end:16px}.crowdsignal-forms-poll__answer:hover,.crowdsignal-forms-poll__answer.is-focused{color:var(--crowdsignal-forms-submit-button-bg-color)}.has-voted .crowdsignal-forms-poll__answer{opacity:0.5}input[type="checkbox"].crowdsignal-forms-poll__input,input[type="radio"].crowdsignal-forms-poll__input{height:0;opacity:0;position:absolute;width:0}.crowdsignal-forms-poll__check{display:inline-block;height:1em;margin:0 0 0 10px;position:relative;width:1em}.crowdsignal-forms-poll__check::before{background-color:transparent;border:1.5px solid var(--crowdsignal-forms-text-color);border-radius:50%;box-sizing:border-box;content:"";display:block;height:100%;transition:background-color 0.3s, border-color 0.3s;width:100%}.crowdsignal-forms-poll__answer.is-multiple-choice .crowdsignal-forms-poll__check::before{border-radius:3px}.crowdsignal-forms-poll__answer.is-multiple-choice.is-selected .crowdsignal-forms-poll__check::before{border-color:var(--crowdsignal-forms-text-color);background-color:var(--crowdsignal-forms-text-color)}.crowdsignal-forms-poll__answer.is-selected:not(.is-multiple-choice) .crowdsignal-forms-poll__check::after{animation-duration:0.3s;animation-name:crowdsignal-forms-animation__pop;animation-iteration-count:1;background-clip:padding-box;background-color:var(--crowdsignal-forms-text-color);border:4.5px solid transparent;border-radius:50%;box-sizing:border-box;content:"";display:block;height:100%;position:absolute;right:0;top:0;width:100%}.crowdsignal-forms-poll__answer.is-selected.is-multiple-choice .crowdsignal-forms-poll__check::after{border-color:var(--crowdsignal-forms-submit-button-text-color);border-style:solid;border-width:0 2px 2px 0;box-sizing:border-box;content:"";display:block;height:25%;margin:-0.1em -0.2em 0 0;position:absolute;right:50%;top:50%;transform:rotateZ(45deg);width:50%}div.crowdsignal-forms-poll__answer-label-wrapper{flex:1;word-break:break-word}div.crowdsignal-forms-poll__answer-label-wrapper span.crowdsignal-forms-poll__answer-label{line-height:1;vertical-align:top}div.crowdsignal-forms-poll__answer-label-wrapper span.crowdsignal-forms-poll__answer-label span::after{vertical-align:top}.crowdsignal-forms-poll__button{border:0;padding:0}.crowdsignal-forms-poll__actions .wp-block-button,.crowdsignal-forms-poll__options .wp-block-button{margin:0}.crowdsignal-forms-poll__actions{display:flex;justify-content:flex-end}.editor-styles-wrapper .crowdsignal-forms-poll .crowdsignal-forms-poll__actions .wp-block-button.crowdsignal-forms-poll__block-button,.editor-styles-wrapper .crowdsignal-forms-poll .crowdsignal-forms-poll__options .wp-block-button.crowdsignal-forms-poll__block-button{margin:0}.crowdsignal-forms-poll__closed-banner{background-color:var(--crowdsignal-forms-border-color);box-sizing:border-box;display:flex;color:var(--crowdsignal-forms-submit-button-text-color);font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;justify-content:center;padding:calc(var(--crowdsignal-forms-border-width) + 0.2em) 0 0.2em;width:100%}.is-hidden .crowdsignal-forms-poll__closed-banner{font-style:italic}.crowdsignal-forms-poll__error{color:red}.crowdsignal-forms-poll__results-list{margin:0 0 1em;position:relative}.crowdsignal-forms-poll__answer-results{display:flex;flex-direction:column;margin:0 0 16px;width:100%}.crowdsignal-forms-poll__answer-results:last-child{margin:0}.crowdsignal-forms-poll__answer-results-labels{align-items:flex-end;display:flex;margin:0 0 8px;width:100%;word-break:break-word}.crowdsignal-forms-poll__answer-results-answer{flex:1;font-size:1em;font-weight:600}.crowdsignal-forms-poll__answer-results-votes{font-size:0.75em;line-height:2}.crowdsignal-forms-poll__answer-results-percent{font-weight:600;line-height:1.6}.crowdsignal-forms-poll__answer-results-votes,.crowdsignal-forms-poll__answer-results-percent{font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;margin-right:20px;transition:opacity 0.3s}.crowdsignal-forms-poll__answer-results.is-error .crowdsignal-forms-poll__answer-results-votes,.crowdsignal-forms-poll__answer-results.is-error .crowdsignal-forms-poll__answer-results-percent{display:none}.crowdsignal-forms-poll__answer-results.is-loading .crowdsignal-forms-poll__answer-results-votes,.crowdsignal-forms-poll__answer-results.is-loading .crowdsignal-forms-poll__answer-results-percent{animation-duration:1.5s;animation-iteration-count:infinite;animation-name:crowdsignal-forms-animation__pulse;background-color:var(--crowdsignal-forms-text-color);font-size:0.7em;height:1em;width:50px}.crowdsignal-forms-poll__answer-results.is-loading .crowdsignal-forms-poll__answer-results-votes:last-child,.crowdsignal-forms-poll__answer-results.is-loading .crowdsignal-forms-poll__answer-results-percent:last-child{width:40px}.crowdsignal-forms-poll__answer-results-progress-track{border:1px solid;border-color:rgba(var(--crowdsignal-forms-text-color-properties), 0.3);box-sizing:border-box;height:1em;width:100%}.crowdsignal-forms-poll__answer-results.is-loading .crowdsignal-forms-poll__answer-results-progress-track{animation-duration:1.5s;animation-iteration-count:infinite;animation-name:crowdsignal-forms-animation__pulse}.crowdsignal-forms-poll__answer-results-progress-bar{animation-fill-mode:forwards;background-color:var(--crowdsignal-forms-submit-button-bg-color);height:100%;transition:background-color 0.3s, width 0.3s}.crowdsignal-forms-poll__answer-results.is-error .crowdsignal-forms-poll__answer-results-progress-bar{width:0}.crowdsignal-forms-poll__answer-results.is-loading .crowdsignal-forms-poll__answer-results-progress-bar{background-color:var(--crowdsignal-forms-text-color);width:25%}.crowdsignal-forms-poll__answer-results.is-loading:nth-child(5n+1) .crowdsignal-forms-poll__answer-results-progress-bar{width:40%}.crowdsignal-forms-poll__answer-results.is-loading:nth-child(5n+2) .crowdsignal-forms-poll__answer-results-progress-bar{width:75%}.crowdsignal-forms-poll__answer-results.is-loading:nth-child(5n+3) .crowdsignal-forms-poll__answer-results-progress-bar{width:50%}.crowdsignal-forms-poll__answer-results.is-loading:nth-child(5n+4) .crowdsignal-forms-poll__answer-results-progress-bar{width:60%}.crowdsignal-forms-poll__results-footer{display:flex;flex-direction:column;justify-content:space-between;width:100%;font-size:0.9em}.crowdsignal-forms-poll__results-total{font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;position:relative;text-align:left;width:100%;margin-bottom:1em}.crowdsignal-forms-poll__results.is-loading .crowdsignal-forms-poll__results-total{color:transparent}.crowdsignal-forms-poll__results.is-loading .crowdsignal-forms-poll__results-total::before{animation-name:crowdsignal-forms-animation__pulse;animation-duration:1.5s;animation-iteration-count:infinite;background-color:var(--crowdsignal-forms-text-color);content:"";display:block;position:absolute;left:0;height:1em;width:150px}.crowdsignal-forms-poll__footer-branding{display:flex;justify-content:space-between;align-items:center;width:100%;margin-top:16px}.crowdsignal-forms-poll__footer-branding img.crowdsignal-forms-poll__footer-branding-logo{width:50px;height:50px;margin-right:0;margin-left:0}.crowdsignal-forms-poll__footer-branding .crowdsignal-forms__branding-promote{font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:10px;text-decoration:none !important;box-shadow:none;border:0;background-color:#a4a4a4a4;color:#fff;cursor:pointer;padding-left:8px;padding-right:8px;margin-right:16px;border-radius:2px;padding-top:4px;padding-bottom:4px;vertical-align:middle}.crowdsignal-forms-poll__footer-cs-link{font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:16px;text-decoration:none;text-transform:uppercase;vertical-align:middle;border-bottom:0px solid var(--crowdsignal-forms-text-color) !important}.crowdsignal-forms-poll__footer-cs-link:not(:hover){color:var(--crowdsignal-forms-text-color);opacity:0.4}.has-default-thankyou .crowdsignal-forms-poll__footer-cs-link{color:#333}.crowdsignal-forms-poll__error-banner{font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:13px;margin-top:24px;padding:18px 24px;color:#d82e20;border-right:4px solid #d82e20;background:#f8dad8}.crowdsignal-forms-poll__submit-message-container{position:absolute;background-color:var(--crowdsignal-forms-bg-color);right:0;top:0;width:100%;height:100%;overflow:hidden}.has-default-thankyou .crowdsignal-forms-poll__submit-message-container{background-color:#fff}.crowdsignal-forms-poll__submit-message{position:relative}.crowdsignal-forms-poll__submit-message button.crowdsignal-forms-poll__dismiss-submit-message{position:absolute;left:0;top:0;background-color:transparent;color:#000;text-decoration:none;border:none}.crowdsignal-forms-poll__submit-message button.crowdsignal-forms-poll__dismiss-submit-message:hover{background:inherit}.crowdsignal-forms-poll__submit-message-footer{position:absolute;bottom:0;right:0;padding:16px 24px;width:100%;background-color:inherit}.crowdsignal-forms-poll__thank-you-cs-sticker{left:25px;top:66px}.crowdsignal-forms-poll__thank-you-sticker{left:132px;top:12px}.crowdsignal-forms-poll__thank-you-cs-sticker,.crowdsignal-forms-poll__thank-you-sticker{filter:drop-shadow(0 1px 2px rgba(0,0,0,0.2));width:100px;height:100px;position:absolute}.crowdsignal-forms-poll__custom-message-check{color:var(--crowdsignal-forms-text-color);padding-right:24px;padding-top:24px}.crowdsignal-forms-poll__custom-message{font-family:var(--crowdsignal-forms-question-font-family);font-weight:600;padding:16px 24px}.wp_block-crowdsignal-forms-poll__vote-branding{margin-top:16px}.crowdsignal-forms__style-probe{display:none}
1
+ /* This file was automatically generated on Feb 22 2021 20:04:26 */
2
 
3
+ @keyframes crowdsignal-forms-animation__pop{0%{transform:scale(0)}50%{transform:scale(1.2)}100%{transform:scale(1)}}@keyframes crowdsignal-forms-animation__pulse{0%{opacity:0.4}50%{opacity:0.7}100%{opacity:0.4}}@keyframes crowdsignal-forms-animation__grow{0%{transform:scale(1)}50%{transform:scale(1.4)}100%{transform:scale(1)}}@keyframes crowdsignal-forms-animation__fade-in{0%{opacity:0}100%{opacity:1}}@keyframes crowdsignal-forms-animation__fade-out{0%{opacity:1}100%{opacity:0}}.crowdsignal-poll-wrapper:not(:first-child),[data-type="crowdsignal-forms/poll"]:not(:first-child){margin-top:3em}.crowdsignal-poll-wrapper:not(:last-child),[data-type="crowdsignal-forms/poll"]:not(:last-child){margin-bottom:3em}.crowdsignal-forms-poll{border-color:var(--crowdsignal-forms-border-color);border-style:solid;border-width:var(--crowdsignal-forms-border-width);margin-right:auto;margin-left:auto;margin-top:5px;position:relative;text-align:right}.entry-content .alignfull.crowdsignal-poll-wrapper .crowdsignal-forms-poll{border-right-width:0;border-left-width:0}.crowdsignal-forms-poll h3.crowdsignal-forms-poll__question{margin:0 0 28px}.crowdsignal-forms-poll h3.crowdsignal-forms-poll__question:first-child{margin-top:0}.crowdsignal-forms-poll p.crowdsignal-forms-poll__note{font-style:italic;margin:0 0 32px}.crowdsignal-forms-poll .crowdsignal-forms-poll__content{padding:40px 24px 16px 24px}.crowdsignal-forms-poll .crowdsignal-forms-poll__content .crowdsignal-forms-poll__question{font-family:var(--crowdsignal-forms-question-font-family)}.crowdsignal-forms-poll .crowdsignal-forms-poll__content .crowdsignal-forms-poll__answer-label,.crowdsignal-forms-poll .crowdsignal-forms-poll__content .crowdsignal-forms-poll__answer-results-answer,.crowdsignal-forms-poll .crowdsignal-forms-poll__content .crowdsignal-forms-poll__note{font-family:var(--crowdsignal-forms-body-font-family)}.entry-content .alignfull.crowdsignal-poll-wrapper .crowdsignal-forms-poll .crowdsignal-forms-poll__content{margin:0 auto;max-width:var(--crowdsignal-forms-content-wide-width)}@media screen and (min-width: 660px){.alignwide.crowdsignal-poll-wrapper .crowdsignal-forms-poll .crowdsignal-forms-poll__content,.alignfull.crowdsignal-poll-wrapper .crowdsignal-forms-poll .crowdsignal-forms-poll__content{padding:80px}}.crowdsignal-forms-poll.is-closed .crowdsignal-forms-poll__form{opacity:0.5}.crowdsignal-forms-poll.is-hidden{opacity:0.5}.crowdsignal-forms-poll.has-text-color{color:var(--crowdsignal-forms-text-color)}.crowdsignal-forms-poll.has-bg-color{background-color:var(--crowdsignal-forms-bg-color)}.crowdsignal-forms-poll.has-border-radius{border-radius:var(--crowdsignal-forms-border-radius);overflow:hidden}.crowdsignal-forms-poll.has-box-shadow{box-shadow:0 3px 6px rgba(0,0,0,0.16),0 3px 6px rgba(0,0,0,0.23)}.crowdsignal-forms-poll .is-transparent{opacity:0;pointer-events:none}.crowdsignal-forms-poll__block-button .crowdsignal-forms-poll__submit-button{-webkit-appearance:initial}.crowdsignal-forms-poll__block-button .crowdsignal-forms-poll__submit-button:disabled{opacity:0.7}.crowdsignal-forms-poll.has-submit-button-text-color .crowdsignal-forms-poll__block-button .crowdsignal-forms-poll__submit-button.wp-block-button__link{color:var(--crowdsignal-forms-submit-button-text-color)}.crowdsignal-forms-poll.has-submit-button-bg-color .crowdsignal-forms-poll__block-button .crowdsignal-forms-poll__submit-button.wp-block-button__link{background-color:var(--crowdsignal-forms-submit-button-bg-color)}.crowdsignal-forms-poll.has-submit-button-bg-color .crowdsignal-forms-poll__block-button .crowdsignal-forms-poll__submit-button.wp-block-button__link:hover{opacity:0.9}.crowdsignal-forms-poll__options.is-button{display:flex;flex-direction:column;flex-wrap:wrap}.crowdsignal-forms-poll__options.is-button.is-inline-button-alignment{flex-direction:row}.crowdsignal-forms-poll__answer{cursor:pointer;display:flex;font-size:inherit;font-weight:600;margin:0;padding:0 2px;position:relative}.crowdsignal-forms-poll__answer.is-button{margin-inline-end:20px;margin-block-end:20px;max-width:100%}.crowdsignal-forms-poll__answer.is-button .wp-block-button.crowdsignal-forms-poll__block-button,.crowdsignal-forms-poll__answer.is-button .crowdsignal-forms-poll__submit-button{max-width:100%}.crowdsignal-forms-poll__answer.is-button .crowdsignal-forms-poll__submit-button{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.crowdsignal-forms-poll__answer:not(.is-button){margin-block-end:16px}.crowdsignal-forms-poll__answer:hover,.crowdsignal-forms-poll__answer.is-focused{color:var(--crowdsignal-forms-submit-button-bg-color)}.has-voted .crowdsignal-forms-poll__answer{opacity:0.5}input[type="checkbox"].crowdsignal-forms-poll__input,input[type="radio"].crowdsignal-forms-poll__input{height:0;opacity:0;position:absolute;width:0}.crowdsignal-forms-poll__check{display:inline-block;height:1em;margin:0 0 0 10px;position:relative;width:1em}.crowdsignal-forms-poll__check::before{background-color:transparent;border:1.5px solid var(--crowdsignal-forms-text-color);border-radius:50%;box-sizing:border-box;content:"";display:block;height:100%;transition:background-color 0.3s, border-color 0.3s;width:100%}.crowdsignal-forms-poll__answer.is-multiple-choice .crowdsignal-forms-poll__check::before{border-radius:3px}.crowdsignal-forms-poll__answer.is-multiple-choice.is-selected .crowdsignal-forms-poll__check::before{border-color:var(--crowdsignal-forms-text-color);background-color:var(--crowdsignal-forms-text-color)}.crowdsignal-forms-poll__answer.is-selected:not(.is-multiple-choice) .crowdsignal-forms-poll__check::after{animation-duration:0.3s;animation-name:crowdsignal-forms-animation__pop;animation-iteration-count:1;background-clip:padding-box;background-color:var(--crowdsignal-forms-text-color);border:4.5px solid transparent;border-radius:50%;box-sizing:border-box;content:"";display:block;height:100%;position:absolute;right:0;top:0;width:100%}.crowdsignal-forms-poll__answer.is-selected.is-multiple-choice .crowdsignal-forms-poll__check::after{border-color:var(--crowdsignal-forms-submit-button-text-color);border-style:solid;border-width:0 2px 2px 0;box-sizing:border-box;content:"";display:block;height:25%;margin:-0.1em -0.2em 0 0;position:absolute;right:50%;top:50%;transform:rotateZ(45deg);width:50%}div.crowdsignal-forms-poll__answer-label-wrapper{flex:1;word-break:break-word}div.crowdsignal-forms-poll__answer-label-wrapper span.crowdsignal-forms-poll__answer-label{line-height:1;vertical-align:top}div.crowdsignal-forms-poll__answer-label-wrapper span.crowdsignal-forms-poll__answer-label span::after{vertical-align:top}.crowdsignal-forms-poll__button{border:0;padding:0}.crowdsignal-forms-poll__actions .wp-block-button,.crowdsignal-forms-poll__options .wp-block-button{margin:0}.crowdsignal-forms-poll__actions{display:flex;justify-content:flex-end}.editor-styles-wrapper .crowdsignal-forms-poll .crowdsignal-forms-poll__actions .wp-block-button.crowdsignal-forms-poll__block-button,.editor-styles-wrapper .crowdsignal-forms-poll .crowdsignal-forms-poll__options .wp-block-button.crowdsignal-forms-poll__block-button{margin:0}.crowdsignal-forms-poll__closed-banner{background-color:var(--crowdsignal-forms-border-color);box-sizing:border-box;display:flex;color:var(--crowdsignal-forms-submit-button-text-color);font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;justify-content:center;padding:calc(var(--crowdsignal-forms-border-width) + 0.2em) 0 0.2em;width:100%}.is-hidden .crowdsignal-forms-poll__closed-banner{font-style:italic}.crowdsignal-forms-poll__error{color:red}.crowdsignal-forms-poll__results-list{margin:0 0 1em;position:relative}.crowdsignal-forms-poll__answer-results{display:flex;flex-direction:column;margin:0 0 16px;width:100%}.crowdsignal-forms-poll__answer-results:last-child{margin:0}.crowdsignal-forms-poll__answer-results-labels{align-items:flex-end;display:flex;margin:0 0 8px;width:100%;word-break:break-word}.crowdsignal-forms-poll__answer-results-answer{flex:1;font-size:1em;font-weight:600}.crowdsignal-forms-poll__answer-results-votes{font-size:0.75em;line-height:2}.crowdsignal-forms-poll__answer-results-percent{font-weight:600;line-height:1.6}.crowdsignal-forms-poll__answer-results-votes,.crowdsignal-forms-poll__answer-results-percent{font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;margin-right:20px;transition:opacity 0.3s}.crowdsignal-forms-poll__answer-results.is-error .crowdsignal-forms-poll__answer-results-votes,.crowdsignal-forms-poll__answer-results.is-error .crowdsignal-forms-poll__answer-results-percent{display:none}.crowdsignal-forms-poll__answer-results.is-loading .crowdsignal-forms-poll__answer-results-votes,.crowdsignal-forms-poll__answer-results.is-loading .crowdsignal-forms-poll__answer-results-percent{animation-duration:1.5s;animation-iteration-count:infinite;animation-name:crowdsignal-forms-animation__pulse;background-color:var(--crowdsignal-forms-text-color);font-size:0.7em;height:1em;width:50px}.crowdsignal-forms-poll__answer-results.is-loading .crowdsignal-forms-poll__answer-results-votes:last-child,.crowdsignal-forms-poll__answer-results.is-loading .crowdsignal-forms-poll__answer-results-percent:last-child{width:40px}.crowdsignal-forms-poll__answer-results-progress-track{border:1px solid;border-color:rgba(var(--crowdsignal-forms-text-color-properties), 0.3);box-sizing:border-box;height:1em;width:100%}.crowdsignal-forms-poll__answer-results.is-loading .crowdsignal-forms-poll__answer-results-progress-track{animation-duration:1.5s;animation-iteration-count:infinite;animation-name:crowdsignal-forms-animation__pulse}.crowdsignal-forms-poll__answer-results-progress-bar{animation-fill-mode:forwards;background-color:var(--crowdsignal-forms-submit-button-bg-color);height:100%;transition:background-color 0.3s, width 0.3s}.crowdsignal-forms-poll__answer-results.is-error .crowdsignal-forms-poll__answer-results-progress-bar{width:0}.crowdsignal-forms-poll__answer-results.is-loading .crowdsignal-forms-poll__answer-results-progress-bar{background-color:var(--crowdsignal-forms-text-color);width:25%}.crowdsignal-forms-poll__answer-results.is-loading:nth-child(5n+1) .crowdsignal-forms-poll__answer-results-progress-bar{width:40%}.crowdsignal-forms-poll__answer-results.is-loading:nth-child(5n+2) .crowdsignal-forms-poll__answer-results-progress-bar{width:75%}.crowdsignal-forms-poll__answer-results.is-loading:nth-child(5n+3) .crowdsignal-forms-poll__answer-results-progress-bar{width:50%}.crowdsignal-forms-poll__answer-results.is-loading:nth-child(5n+4) .crowdsignal-forms-poll__answer-results-progress-bar{width:60%}.crowdsignal-forms-poll__results-footer{display:flex;flex-direction:column;justify-content:space-between;width:100%;font-size:0.9em}.crowdsignal-forms-poll__results-total{font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;position:relative;text-align:left;width:100%;margin-bottom:1em}.crowdsignal-forms-poll__results.is-loading .crowdsignal-forms-poll__results-total{color:transparent}.crowdsignal-forms-poll__results.is-loading .crowdsignal-forms-poll__results-total::before{animation-name:crowdsignal-forms-animation__pulse;animation-duration:1.5s;animation-iteration-count:infinite;background-color:var(--crowdsignal-forms-text-color);content:"";display:block;position:absolute;left:0;height:1em;width:150px}.crowdsignal-forms-poll__error-banner{font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:13px;margin-top:24px;padding:18px 24px;color:#d82e20;border-right:4px solid #d82e20;background:#f8dad8}.crowdsignal-forms-poll__submit-message-container{position:absolute;background-color:var(--crowdsignal-forms-bg-color);right:0;top:0;width:100%;height:100%;overflow:hidden}.has-default-thankyou .crowdsignal-forms-poll__submit-message-container{background-color:#fff}.crowdsignal-forms-poll__submit-message{position:relative}.crowdsignal-forms-poll__submit-message button.crowdsignal-forms-poll__dismiss-submit-message{position:absolute;left:0;top:0;background-color:transparent;color:#000;text-decoration:none;border:none}.crowdsignal-forms-poll__submit-message button.crowdsignal-forms-poll__dismiss-submit-message:hover{background:inherit}.crowdsignal-forms-poll__submit-message-footer{position:absolute;bottom:0;right:0;padding:16px 24px;width:100%;background-color:inherit}.crowdsignal-forms-poll__thank-you-cs-sticker{left:25px;top:66px}.crowdsignal-forms-poll__thank-you-sticker{left:132px;top:12px}.crowdsignal-forms-poll__thank-you-cs-sticker,.crowdsignal-forms-poll__thank-you-sticker{filter:drop-shadow(0 1px 2px rgba(0,0,0,0.2));width:100px;height:100px;position:absolute}.crowdsignal-forms-poll__custom-message-check{color:var(--crowdsignal-forms-text-color);padding-right:24px;padding-top:24px}.crowdsignal-forms-poll__custom-message{font-family:var(--crowdsignal-forms-question-font-family);font-weight:600;padding:16px 24px}.wp_block-crowdsignal-forms-poll__vote-branding{margin-top:16px}.crowdsignal-forms__style-probe{display:none}.crowdsignal-forms__footer-branding{align-items:flex-end;display:flex;margin-top:16px;width:100%}.crowdsignal-forms__footer-branding img.crowdsignal-forms__footer-branding-logo{height:50px;margin-right:auto;margin-left:0;width:50px}.crowdsignal-forms__footer-branding .crowdsignal-forms__branding-promote{display:inline-flex;font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:10px;text-decoration:none !important;box-shadow:none;border:0;background-color:#a4a4a4a4;color:#fff;cursor:pointer;padding-left:8px;padding-right:8px;margin-right:16px;border-radius:2px;padding-top:2px;padding-bottom:2px;vertical-align:middle}.crowdsignal-forms__footer-cs-link{display:inline-flex;font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:16px;line-height:18px;text-decoration:none;text-transform:uppercase;vertical-align:middle;border-bottom:0 solid var(--crowdsignal-forms-text-color) !important}.crowdsignal-forms__footer-cs-link:not(:hover){color:var(--crowdsignal-forms-text-color);opacity:0.4}.has-default-thankyou .crowdsignal-forms__footer-cs-link{color:#333}
build/vote.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => 'ee509abd2fb601cdbf54a3b8ccb83db7');
1
+ <?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '15d979e4761cb74e40661edacb196b59');
build/vote.js CHANGED
@@ -10,4 +10,4 @@
10
  *
11
  * Copyright 2006, 2015 Klaus Hartl & Fagner Brack
12
  * Released under the MIT license
13
- */!function(a){if(void 0===(o="function"==typeof(r=a)?r.call(t,n,t,e):r)||(e.exports=o),!0,e.exports=a(),!!0){var i=window.Cookies,s=window.Cookies=a();s.noConflict=function(){return window.Cookies=i,s}}}((function(){function e(){for(var e=0,t={};e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}function t(e){return e.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function n(r){function o(){}function a(t,n,a){if("undefined"!=typeof document){"number"==typeof(a=e({path:"/"},o.defaults,a)).expires&&(a.expires=new Date(1*new Date+864e5*a.expires)),a.expires=a.expires?a.expires.toUTCString():"";try{var i=JSON.stringify(n);/^[\{\[]/.test(i)&&(n=i)}catch(u){}n=r.write?r.write(n,t):encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var s="";for(var c in a)a[c]&&(s+="; "+c,!0!==a[c]&&(s+="="+a[c].split(";")[0]));return document.cookie=t+"="+n+s}}function i(e,n){if("undefined"!=typeof document){for(var o={},a=document.cookie?document.cookie.split("; "):[],i=0;i<a.length;i++){var s=a[i].split("="),c=s.slice(1).join("=");n||'"'!==c.charAt(0)||(c=c.slice(1,-1));try{var u=t(s[0]);if(c=(r.read||r)(c,u)||t(c),n)try{c=JSON.parse(c)}catch(l){}if(o[u]=c,e===u)break}catch(l){}}return e?o[e]:o}}return o.set=a,o.get=function(e){return i(e,!1)},o.getJSON=function(e){return i(e,!0)},o.remove=function(t,n){a(t,"",e(n,{expires:-1}))},o.defaults={},o.withConverter=n,o}((function(){}))}))},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){var r=n(13);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},function(e,t){!function(){e.exports=this.wp.apiFetch}()},function(e,t){!function(){e.exports=this.wp.blocks}()},function(e,t,n){var r=n(19);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}},function(e,t,n){var r=n(32),o=n(33);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t}},function(e,t,n){var r=n(11),o=n(13),a=n(34),i=n(35);function s(t){var n="function"==typeof Map?new Map:void 0;return e.exports=s=function(e){if(null===e||!a(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return i(e,arguments,r(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),o(t,e)},s(t)}e.exports=s},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n.apply(this,arguments)}e.exports=n},function(e,t,n){var r=n(37);e.exports=function(e,t){if(null==e)return{};var n,o,a=r(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}},function(e,t){!function(){e.exports=this.wp.components}()},function(e,t,n){var r=n(38),o=n(39),a=n(18),i=n(40);e.exports=function(e){return r(e)||o(e)||a(e)||i()}},,function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(r=(i=s.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(c){o=!0,a=c}finally{try{r||null==s.return||s.return()}finally{if(o)throw a}}return n}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,n){"use strict";var r=n(31);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){e.exports=function(e){return-1!==Function.toString.call(e).indexOf("[native code]")}},function(e,t,n){var r=n(13),o=n(36);function a(t,n,i){return o()?e.exports=a=Reflect.construct:e.exports=a=function(e,t,n){var o=[null];o.push.apply(o,t);var a=new(Function.bind.apply(e,o));return n&&r(a,n.prototype),a},a.apply(null,arguments)}e.exports=a},function(e,t){e.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}},function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}},function(e,t,n){var r=n(19);e.exports=function(e){if(Array.isArray(e))return r(e)}},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,n){"use strict";n.r(t);var r=n(2),o=n.n(r),a=n(0),i=n(1),s=n.n(i),c=n(3),u=n(4),l=n.n(u),f=n(7),p=n.n(f),d=n(5),m=n.n(d),b=n(8),h=n.n(b),v=n(6),E=n.n(v);function O(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function y(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}var g=n(10),x=n.n(g),w=!1,S=s.a.createContext(null),C="entering",j="entered",N=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var o,a=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?a?(o="exited",r.appearStatus=C):o=j:o=t.unmountOnExit||t.mountOnEnter?"unmounted":"exited",r.state={status:o},r.nextCallback=null,r}O(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&"unmounted"===t.status?{status:"exited"}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==C&&n!==j&&(t=C):n!==C&&n!==j||(t="exiting")}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){void 0===e&&(e=!1),null!==t?(this.cancelNextCallback(),t===C?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&"exited"===this.state.status&&this.setState({status:"unmounted"})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,o=this.props.nodeRef?[r]:[x.a.findDOMNode(this),r],a=o[0],i=o[1],s=this.getTimeouts(),c=r?s.appear:s.enter;!e&&!n||w?this.safeSetState({status:j},(function(){t.props.onEntered(a)})):(this.props.onEnter(a,i),this.safeSetState({status:C},(function(){t.props.onEntering(a,i),t.onTransitionEnd(c,(function(){t.safeSetState({status:j},(function(){t.props.onEntered(a,i)}))}))})))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:x.a.findDOMNode(this);t&&!w?(this.props.onExit(r),this.safeSetState({status:"exiting"},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:"exited"},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:"exited"},(function(){e.props.onExited(r)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:x.a.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var o=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],a=o[0],i=o[1];this.props.addEndListener(a,i)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if("unmounted"===e)return null;var t=this.props,n=t.children,r=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,y(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return s.a.createElement(S.Provider,{value:null},"function"==typeof n?n(e,r):s.a.cloneElement(s.a.Children.only(n),r))},t}(s.a.Component);function A(){}N.contextType=S,N.propTypes={},N.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:A,onEntering:A,onEntered:A,onExit:A,onExiting:A,onExited:A},N.UNMOUNTED="unmounted",N.EXITED="exited",N.ENTERING=C,N.ENTERED=j,N.EXITING="exiting";var R,k,T=N;var _="out-in",I="in-out",L=function(e,t,n){return function(){var r;e.props[t]&&(r=e.props)[t].apply(r,arguments),n()}},P=((R={})[_]=function(e){var t=e.current,n=e.changeState;return s.a.cloneElement(t,{in:!1,onExited:L(t,"onExited",(function(){n(C,null)}))})},R[I]=function(e){var t=e.current,n=e.changeState,r=e.children;return[t,s.a.cloneElement(r,{in:!0,onEntered:L(r,"onEntered",(function(){n(C)}))})]},R),D=((k={})[_]=function(e){var t=e.children,n=e.changeState;return s.a.cloneElement(t,{in:!0,onEntered:L(t,"onEntered",(function(){n(j,s.a.cloneElement(t,{in:!0}))}))})},k[I]=function(e){var t=e.current,n=e.children,r=e.changeState;return[s.a.cloneElement(t,{in:!1,onExited:L(t,"onExited",(function(){r(j,s.a.cloneElement(n,{in:!0}))}))}),s.a.cloneElement(n,{in:!0})]},k),M=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).state={status:j,current:null},t.appeared=!1,t.changeState=function(e,n){void 0===n&&(n=t.state.current),t.setState({status:e,current:n})},t}O(t,e);var n=t.prototype;return n.componentDidMount=function(){this.appeared=!0},t.getDerivedStateFromProps=function(e,t){return null==e.children?{current:null}:t.status===C&&e.mode===I?{status:C}:!t.current||(n=t.current,r=e.children,n===r||s.a.isValidElement(n)&&s.a.isValidElement(r)&&null!=n.key&&n.key===r.key)?{current:s.a.cloneElement(e.children,{in:!0})}:{status:"exiting"};var n,r},n.render=function(){var e,t=this.props,n=t.children,r=t.mode,o=this.state,a=o.status,i=o.current,c={children:n,current:i,changeState:this.changeState,status:a};switch(a){case C:e=D[r](c);break;case"exiting":e=P[r](c);break;case j:e=i}return s.a.createElement(S.Provider,{value:{isMounting:!this.appeared}},e)},t}(s.a.Component);M.propTypes={},M.defaultProps={mode:_};var U=M;function V(){return(V=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function F(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}var B=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return r=t,void((n=e).classList?n.classList.remove(r):"string"==typeof n.className?n.className=F(n.className,r):n.setAttribute("class",F(n.className&&n.className.baseVal||"",r)));var n,r}))},H=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var r=t.resolveArguments(e,n),o=r[0],a=r[1];t.removeClasses(o,"exit"),t.addClass(o,a?"appear":"enter","base"),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.resolveArguments(e,n),o=r[0],a=r[1]?"appear":"enter";t.addClass(o,a,"active"),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.resolveArguments(e,n),o=r[0],a=r[1]?"appear":"enter";t.removeClasses(o,a),t.addClass(o,a,"done"),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"appear"),t.removeClasses(n,"enter"),t.addClass(n,"exit","base"),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.resolveArguments(e)[0];t.addClass(n,"exit","active"),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"exit"),t.addClass(n,"exit","done"),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,n){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,n]},t.getClassNames=function(e){var n=t.props.classNames,r="string"==typeof n,o=r?""+(r&&n?n+"-":"")+e:n[e];return{baseClassName:o,activeClassName:r?o+"-active":n[e+"Active"],doneClassName:r?o+"-done":n[e+"Done"]}},t}O(t,e);var n=t.prototype;return n.addClass=function(e,t,n){var r=this.getClassNames(t)[n+"ClassName"],o=this.getClassNames("enter").doneClassName;"appear"===t&&"done"===n&&o&&(r+=" "+o),"active"===n&&e&&e.scrollTop,r&&(this.appliedClasses[t][n]=r,function(e,t){e&&t&&t.split(" ").forEach((function(t){return r=t,void((n=e).classList?n.classList.add(r):function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}(n,r)||("string"==typeof n.className?n.className=n.className+" "+r:n.setAttribute("class",(n.className&&n.className.baseVal||"")+" "+r)));var n,r}))}(e,r))},n.removeClasses=function(e,t){var n=this.appliedClasses[t],r=n.base,o=n.active,a=n.done;this.appliedClasses[t]={},r&&B(e,r),o&&B(e,o),a&&B(e,a)},n.render=function(){var e=this.props,t=(e.classNames,y(e,["classNames"]));return s.a.createElement(T,V({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(s.a.Component);H.defaultProps={classNames:""},H.propTypes={};var W=H,G=function(e){var t=e.className,n=e.fillColor,r=void 0===n?"black":n;return Object(a.createElement)("svg",{className:t,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(a.createElement)("g",{clipPath:"url(#clipThumbsUp)"},Object(a.createElement)("mask",{id:"maskThumbsUp","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:"2",y:"-1",width:"20",height:"20"},Object(a.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19.35 6.24998H13.5658L14.4366 2.06081L14.4641 1.76748C14.4641 1.39165 14.3083 1.04331 14.0608 0.795813L13.0891 -0.166687L7.05748 5.87415C6.71831 6.20415 6.51664 6.66248 6.51664 7.16665L2.84998 7.16665V16.425H6.51664V16.3333C6.51664 17.3416 7.34164 18.1666 8.34998 18.1666H16.6C17.3608 18.1666 18.0116 17.7083 18.2866 17.0483L21.055 10.5858C21.1375 10.375 21.1833 10.155 21.1833 9.91665V8.08331C21.1833 7.07498 20.3583 6.24998 19.35 6.24998ZM19.35 9.91665L16.6 16.3333H8.34998V7.16665L12.3283 3.18831L11.3108 8.08331H19.35V9.91665Z",fill:"white"})),Object(a.createElement)("g",{mask:"url(#maskThumbsUp)"},Object(a.createElement)("rect",{x:"0.999878",y:"-3.05176e-05",width:"22",height:"22",fill:r}))),Object(a.createElement)("defs",null,Object(a.createElement)("clipPath",{id:"clipThumbsUp"},Object(a.createElement)("rect",{width:"24",height:"24",fill:"white"}))))},z=function(e){var t=e.className,n=e.fillColor,r=void 0===n?"black":n;return Object(a.createElement)("svg",{className:t,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(a.createElement)("g",{clipPath:"url(#clipThumbsDown)"},Object(a.createElement)("mask",{id:"maskThumbsDown","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:"2",y:"5",width:"20",height:"20"},Object(a.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.65002 17.75H10.4342L9.56336 21.9392L9.53586 22.2325C9.53586 22.6083 9.69169 22.9567 9.93919 23.2042L10.9109 24.1667L16.9425 18.1258C17.2817 17.7958 17.4834 17.3375 17.4834 16.8333L21.15 16.8333L21.15 7.57499H17.4834V7.66666C17.4834 6.65832 16.6584 5.83332 15.65 5.83332H7.40003C6.63919 5.83332 5.98836 6.29165 5.71336 6.95166L2.94503 13.4142C2.86253 13.625 2.81669 13.845 2.81669 14.0833V15.9167C2.81669 16.925 3.64169 17.75 4.65002 17.75ZM4.65002 14.0833L7.40002 7.66666H15.65L15.65 16.8333L11.6717 20.8117L12.6892 15.9167H4.65002V14.0833Z",fill:"white"})),Object(a.createElement)("g",{mask:"url(#maskThumbsDown)"},Object(a.createElement)("rect",{x:"23.0001",y:"24",width:"22",height:"22",transform:"rotate(-180 23.0001 24)",fill:r}))),Object(a.createElement)("defs",null,Object(a.createElement)("clipPath",{id:"clipThumbsDown"},Object(a.createElement)("rect",{width:"24",height:"24",fill:"white"}))))},K=function(e){var t,n=e.attributes,r=e.voteCount,o=e.apiAnswerId,s=e.onVote,u=e.disabled,l=e.isVotedOn,f=e.hideCount,p=e.fallbackStyles,d=e.isInEditor,b=n.className,v=n.type,E=Object(i.useState)(0),O=m()(E,2),y=O[0],g=O[1],x=function(){!u&&s&&(g(1),s(o))},w="up"===v?G:z,S="is-type-".concat(v),C=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return h()({"has-bg-color":e.backgroundColor,"has-text-color":e.textColor,"has-border-color":e.borderColor},n)}(n,"crowdsignal-forms-vote-item",b,{"is-voted-on":l,"is-disabled":u,"is-in-editor":d},S),j=function(e,t){var n=Object(c.isEmpty)(e.textColor)?t.textColor:e.textColor,r=Object(c.isEmpty)(e.backgroundColor)?t.backgroundColor:e.backgroundColor;return Object(c.mapKeys)({borderColor:e.borderColor,bgColor:r,textColor:n,votedColor:t.accentColor},(function(e,t){return"--crowdsignal-forms-vote-".concat(Object(c.kebabCase)(t))}))}(n,p),N=r+y;return Object(a.createElement)("div",{className:C,onClick:x,onKeyPress:x,role:"button",style:j,tabIndex:0},Object(a.createElement)(w,{className:"crowdsignal-forms-vote-item__icon",fillColor:"currentColor"}),!f&&Object(a.createElement)(U,{mode:"in-out"},Object(a.createElement)(W,{key:y,classNames:"crowdsignal-forms-vote-item__count",timeout:300},Object(a.createElement)("div",{className:"crowdsignal-forms-vote-item__count"},(t=N)?t>=1e7?"".concat(Object(c.round)(t/1e6),"M"):t>=1e6?"".concat((t/1e6).toFixed(1),"M"):t>=1e4?"".concat(Object(c.round)(t/1e3),"K"):t>=1e3?"".concat((t/1e3).toFixed(1),"K"):t.toString():"0"))))};K.propTypes={apiAnswerId:E.a.number,className:E.a.string,disabled:E.a.bool,isVotedOn:E.a.bool,onVote:E.a.func,type:E.a.string.isRequired,voteCount:E.a.number.isRequired};var J=K,q=n(12),Y=n.n(q),Z=n(14),$=n.n(Z),X=n(15),Q=n.n(X),ee=n(20),te=n.n(ee),ne=n(11),re=n.n(ne),oe=n(21),ae=n.n(oe),ie=(n(16),n(9));function se(e){return function(){var t,n=re()(e);if(ce()){var r=re()(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return te()(this,t)}}function ce(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var ue,le=function(){var e=p()(l.a.mark((function e(t){var n,r,o=arguments;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=!(o.length>1&&void 0!==o[1])||o[1],r="https://api.crowdsignal.com/v3/polls",n){e.next=4;break}return e.abrupt("return",null);case 4:return e.abrupt("return",window.fetch("".concat(r,"/").concat(t,"/results"),{method:"GET",headers:{"content-type":"application/json"}}).then((function(e){if(e.status>=200&&e.status<300)return e.json();throw e})).then((function(e){if(404===e.status)return{};if(e.error)throw new Error(e.message);return e.results.votes_by_answer})));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),fe=function(){var e=p()(l.a.mark((function e(t){var n,r,o;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"5430eeac3911395001d731d9702fc38b",n=(new Date).getTime(),e.next=4,window.fetch("https://polldaddy.com/n/".concat("5430eeac3911395001d731d9702fc38b","/").concat(t,"?").concat(n,"&format=json"));case 4:if((r=e.sent).ok){e.next=7;break}throw new me;case 7:return e.next=9,r.json();case 9:if((o=e.sent).nonce){e.next=12;break}throw new me;case 12:return e.abrupt("return",o.nonce);case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),pe=function(){var e=p()(l.a.mark((function e(t,n,r,o){var a,i,s;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=r.join(","),e.next=3,window.fetch("https://polls.polldaddy.com/vote-js.php?format=json&p=".concat(n,"&b=1&a=").concat(a,"&o=&va=16&cookie=0&n=").concat(t,"&url=").concat(encodeURIComponent(window.location),"&vi=").concat(o));case 3:if((i=e.sent).ok){e.next=6;break}throw new me;case 6:return e.next=8,i.json();case 8:if("error"!==(s=e.sent).status){e.next=11;break}throw new de(s.error);case 11:case"end":return e.stop()}}),e)})));return function(t,n,r,o){return e.apply(this,arguments)}}(),de=function(e){Q()(n,e);var t=se(n);function n(){return $()(this,n),t.apply(this,arguments)}return n}(ae()(Error)),me=function(e){Q()(n,e);var t=se(n);function n(){return $()(this,n),t.call(this,Object(ie.__)("Server error. Please try again.","crowdsignal-forms"))}return n}(de),be=function(e,t){var n=Object(i.useState)(null),r=m()(n,2),o=r[0],a=r[1],s=Object(i.useState)(null),c=m()(s,2),u=c[0],l=c[1],f=Object(i.useState)(!0),p=m()(f,2),d=p[0],b=p[1];return Object(i.useEffect)((function(){b(!0),l(null),a(null),e().then(a).catch(l).finally((function(){return b(!1)}))}),t),{data:o,error:u,loading:d}},he=(Object.freeze({THANK_YOU:"thank-you",CUSTOM_TEXT:"custom-text",REDIRECT:"redirect",RESULTS:"results"}),Object.freeze({THEME_DEFAULT:"theme-default",GEORGIA:"georgia",PALATINO:"palatino",TIMES_NEW_ROMAN:"times-new-roman",ARIAL:"arial",IMPACT:"impact",LUCIDA:"lucida",TAHOMA:"tahoma",TREBUCHET:"trebuchet",VERDANA:"verdana",COURIER:"courier",CABIN:"Cabin",CHIVO:"Chivo",OPEN_SANS:"Open+Sans",FIRA_SANS:"Fira+Sans",ROBOTO:"Roboto",NUNITO:"Nunito",OVERPASS:"Overpass",LATO:"Lato",LIBRE_FRANKLIN:"Libre+Franklin",MONTSERRAT:"Montserrat",POPPINS:"Poppins",RUBIK:"Rubik",RALEWAY:"Raleway",JOSEFIN_SANS:"Josefin+Sans",ALEGREYA_SANS:"Alegreya+Sans",OSWALD:"Oswald"})),ve=(Object.freeze([he.CABIN,he.CHIVO,he.OPEN_SANS,he.FIRA_SANS,he.ROBOTO,he.NUNITO,he.OVERPASS,he.LATO,he.LIBRE_FRANKLIN,he.MONTSERRAT,he.POPPINS,he.RUBIK,he.RALEWAY,he.JOSEFIN_SANS,he.ALEGREYA_SANS,he.OSWALD]),Object.freeze((ue={},o()(ue,he.THEME_DEFAULT,null),o()(ue,he.GEORGIA,"Georgia, serif"),o()(ue,he.PALATINO,'"Palatino Linotype", "Book Antiqua", Palatino, serif'),o()(ue,he.TIMES_NEW_ROMAN,'"Times New Roman", Times, serif'),o()(ue,he.ARIAL,"Arial, Helvetica, sans-serif"),o()(ue,he.IMPACT,"Impact, Charcoal, sans-serif"),o()(ue,he.LUCIDA,'"Lucida Sans Unicode", "Lucida Grande", sans-serif'),o()(ue,he.TAHOMA,"Tahoma, Geneva, sans-serif"),o()(ue,he.TREBUCHET,'"Trebuchet MS", Helvetica, sans-serif'),o()(ue,he.VERDANA,"Verdana, Geneva, sans-serif"),o()(ue,he.COURIER,'"Courier New", Courier, monospace'),o()(ue,he.CABIN,'"Cabin", sans-serif'),o()(ue,he.CHIVO,'"Chivo", sans-serif'),o()(ue,he.OPEN_SANS,'"Open Sans", sans-serif'),o()(ue,he.FIRA_SANS,'"Fira Sans", sans-serif'),o()(ue,he.ROBOTO,'"Roboto", sans-serif'),o()(ue,he.NUNITO,'"Nunito", sans-serif'),o()(ue,he.OVERPASS,'"Overpass", sans-serif'),o()(ue,he.LATO,'"Lato", sans-serif'),o()(ue,he.LIBRE_FRANKLIN,'"Libre Franklin", sans-serif'),o()(ue,he.MONTSERRAT,'"Montserrat", sans-serif'),o()(ue,he.POPPINS,'"Poppins", sans-serif'),o()(ue,he.RUBIK,'"Rubik", sans-serif'),o()(ue,he.RALEWAY,'"Raleway", sans-serif'),o()(ue,he.JOSEFIN_SANS,'"Josefin Sans", sans-serif'),o()(ue,he.ALEGREYA_SANS,'"Alegreya Sans", sans-serif'),o()(ue,he.OSWALD,'"Oswald", sans-serif'),ue)),Object.freeze({OPEN:"open",CLOSED:"closed",CLOSED_AFTER:"closed-after"})),Ee=(Object.freeze({SHOW_RESULTS:"show-results",SHOW_CLOSED_BANNER:"show-closed-banner",HIDDEN:"hidden"}),Object.freeze({CONNECTED:"connected",NOT_CONNECTED:"not-connected",NOT_VERIFIED:"not-verified"}),Object.freeze({RADIO:"radio",BUTTON:"button"}),Object.freeze({LIST:"list",INLINE:"inline"}),function(e){for(var t=window.getComputedStyle(e).backgroundColor;"rgba(0, 0, 0, 0)"===t&&e.parentNode&&e.parentNode.nodeType===window.Node.ELEMENT_NODE;)e=e.parentNode,t=window.getComputedStyle(e).backgroundColor;return t}),Oe=n(22),ye=n.n(Oe),ge=n(23),xe=n.n(ge),we=n(24),Se=function(e){var t=e.children;return Object(a.createElement)("div",{className:"crowdsignal-forms__style-probe"},t)},Ce=function(e){var t=e.showBranding,n=e.referralCode;return Object(a.createElement)("div",{className:"crowdsignal-forms__branding"},t&&Object(a.createElement)("a",{className:"crowdsignal-forms__branding-link with-external-icon",href:"https://crowdsignal.com?ref=".concat(n),target:"blank",rel:"noopener noreferrer"},Object(ie.__)("Powered by Crowdsignal","crowdsignal-forms")),!t&&Object(a.createElement)("span",{className:"crowdsignal-forms__branding-link"}," "))};Ce.propTypes={showBranding:E.a.bool,referralCode:E.a.string.isRequired};var je,Ne,Ae=Ce,Re=(n(25),n(17),(je=function(){return Object(a.createElement)(a.Fragment,null,Object(a.createElement)("p",null),Object(a.createElement)("div",{className:"wp-block-button"},Object(a.createElement)("div",{className:"wp-block-button__link"})))},Ne=function(e){if(null===e)return{};var t,n=e.querySelector(".wp-block-button__link"),r=e.querySelector("p"),o=Ee(n),a=Ee(r),i=window.getComputedStyle(r).color;if(o===a){var s=(t=n,"0px"!==window.getComputedStyle(t).borderBlockStartWidth?window.getComputedStyle(t).borderBlockStartColor:null);o=s||i}return{accentColor:o,textColor:i,backgroundColor:a}},function(e){return Object(we.withFallbackStyles)((function(e){return{fallbackStyles:Ne(e.querySelector(".crowdsignal-forms__style-probe"))}}))((function(t){var n=t.fallbackStyles,r=xe()(t,["fallbackStyles"]);return Object(a.createElement)(e,ye()({fallbackStyles:n||{},renderStyleProbe:function(){return n?null:Object(a.createElement)(Se,null,Object(a.createElement)(je,null))}},r))}))})((function(e){var t=e.attributes,n=e.fallbackStyles,r=e.renderStyleProbe,o=t.apiPollData.id,s=Object(i.useState)(0),u=m()(s,2),f=u[0],d=u[1],b=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r="cs-poll-".concat(e),o=Object(i.useState)(!1),a=m()(o,2),s=a[0],c=a[1],u=Object(i.useState)(!1),f=m()(u,2),d=f[0],b=f[1],h=Object(i.useState)(""),v=m()(h,2),E=v[0],O=v[1];Object(i.useEffect)((function(){t&&void 0!==Y.a.get(r)&&(b(!0),O(Y.a.get(r)))}),[]);var y=function(){var o=p()(l.a.mark((function o(a){var i,s,u,f=arguments;return l.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return i=f.length>1&&void 0!==f[1]?f[1]:1,o.prev=1,c(!0),o.next=5,fe(e);case 5:return s=o.sent,o.next=8,pe(s,e,a,i);case 8:b(!0),t&&(u=n?a.join(","):(new Date).getTime(),Y.a.set(r,u,{sameSite:"Strict",expires:365}),O(u));case 10:return o.prev=10,c(!1),o.finish(10);case 13:case"end":return o.stop()}}),o,null,[[1,,10,13]])})));return function(e){return o.apply(this,arguments)}}();return{hasVoted:d,isVoting:s,vote:y,storedCookieValue:E}}(o,!0,!0),v=b.hasVoted,E=b.vote,O=b.storedCookieValue,y=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=be((function(){return le(e,t)}),[e]),r=n.data,o=n.error,a=n.loading;return{error:o,loading:a,results:r}}(o,!t.hideResults).results;Object(i.useEffect)((function(){""!==O&&d(parseInt(O.split(",")[0],10))}),[O]);var g=function(){var e=p()(l.a.mark((function e(t){return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return d(t),e.next=3,E([t]);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),x=h()("crowdsignal-forms-vote",t.className,"size-".concat(t.size)),w=Object(c.zipObject)(Object(c.map)(t.apiPollData.answers,"client_id"),Object(c.map)(t.apiPollData.answers,"id")),S=function(e){return Object(c.mapKeys)({borderRadius:"".concat(e.borderRadius,"px"),borderWidth:"".concat(e.borderWidth,"px")},(function(e,t){return"--crowdsignal-forms-vote-".concat(Object(c.kebabCase)(t))}))}(t),C=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Date;if(ve.CLOSED===e)return!0;if(ve.CLOSED_AFTER===e){var r=new Date(t);return r<n}return!1}(t.pollStatus,t.closedAfterDateTime);return Object(a.createElement)("div",{className:x,style:S},Object(a.createElement)("div",{className:"crowdsignal-forms-vote__items"},Object(c.map)(t.innerBlocks,(function(e){var r=w[e.answerId];return Object(a.createElement)(J,{attributes:e,fallbackStyles:n,key:e.answerId,apiAnswerId:r,onVote:g,disabled:v||0!==f||C,isVotedOn:r===f,voteCount:y?y[r]:0,hideCount:t.hideResults,type:e.type})}))),Object(a.createElement)(Ae,{showBranding:v&&!t.hideBranding,referralCode:"cs-forms-vote"}),r())}))),ke=function(e,t){return Object(c.forEach)(document.querySelectorAll("div[".concat(e,"]")),(function(n){try{var r=JSON.parse(n.dataset[Object(c.camelCase)(e.substr("data-".length))]),o=t(r,n);n.removeAttribute(e),Object(g.render)(o,n)}catch(a){console.error("Crowdsignal Forms: Failed to parse block data for: %s",e)}}))},Te=function(e,t){(Object(c.isEmpty)(window.CrowdsignalMutationObservers)||!0!==window.CrowdsignalMutationObservers[e])&&(new window.MutationObserver((function(){return ke(e,t)})).observe(document.body,{attributes:!0,attributeFilter:[e],childList:!0,subtree:!0}),Object(c.isEmpty)(window.CrowdsignalMutationObservers)&&(window.CrowdsignalMutationObservers=[]),window.CrowdsignalMutationObservers[e]=!0,ke(e,t))};function _e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}(function(e,t){if("complete"===document.readyState)return Te(e,t);window.addEventListener("load",(function(){return Te(e,t)}))})("data-crowdsignal-vote",(function(e,t){var n=[];Object(c.forEach)(t.children,(function(e){Object(c.isEmpty)(e.dataset.crowdsignalVoteItem)||n.push(JSON.parse(e.dataset.crowdsignalVoteItem))}));var r=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_e(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_e(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e,{innerBlocks:n});return Object(a.createElement)(Re,{attributes:r})}))}]));
10
  *
11
  * Copyright 2006, 2015 Klaus Hartl & Fagner Brack
12
  * Released under the MIT license
13
+ */!function(a){if(void 0===(o="function"==typeof(r=a)?r.call(t,n,t,e):r)||(e.exports=o),!0,e.exports=a(),!!0){var i=window.Cookies,s=window.Cookies=a();s.noConflict=function(){return window.Cookies=i,s}}}((function(){function e(){for(var e=0,t={};e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}function t(e){return e.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function n(r){function o(){}function a(t,n,a){if("undefined"!=typeof document){"number"==typeof(a=e({path:"/"},o.defaults,a)).expires&&(a.expires=new Date(1*new Date+864e5*a.expires)),a.expires=a.expires?a.expires.toUTCString():"";try{var i=JSON.stringify(n);/^[\{\[]/.test(i)&&(n=i)}catch(u){}n=r.write?r.write(n,t):encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var s="";for(var c in a)a[c]&&(s+="; "+c,!0!==a[c]&&(s+="="+a[c].split(";")[0]));return document.cookie=t+"="+n+s}}function i(e,n){if("undefined"!=typeof document){for(var o={},a=document.cookie?document.cookie.split("; "):[],i=0;i<a.length;i++){var s=a[i].split("="),c=s.slice(1).join("=");n||'"'!==c.charAt(0)||(c=c.slice(1,-1));try{var u=t(s[0]);if(c=(r.read||r)(c,u)||t(c),n)try{c=JSON.parse(c)}catch(l){}if(o[u]=c,e===u)break}catch(l){}}return e?o[e]:o}}return o.set=a,o.get=function(e){return i(e,!1)},o.getJSON=function(e){return i(e,!0)},o.remove=function(t,n){a(t,"",e(n,{expires:-1}))},o.defaults={},o.withConverter=n,o}((function(){}))}))},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){var r=n(13);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},function(e,t){!function(){e.exports=this.wp.apiFetch}()},function(e,t){!function(){e.exports=this.wp.blocks}()},function(e,t,n){var r=n(19);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}},function(e,t,n){var r=n(32),o=n(33);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t}},function(e,t,n){var r=n(11),o=n(13),a=n(34),i=n(35);function s(t){var n="function"==typeof Map?new Map:void 0;return e.exports=s=function(e){if(null===e||!a(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return i(e,arguments,r(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),o(t,e)},s(t)}e.exports=s},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n.apply(this,arguments)}e.exports=n},function(e,t,n){var r=n(37);e.exports=function(e,t){if(null==e)return{};var n,o,a=r(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}},function(e,t){!function(){e.exports=this.wp.components}()},function(e,t,n){var r=n(38),o=n(39),a=n(18),i=n(40);e.exports=function(e){return r(e)||o(e)||a(e)||i()}},,function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(r=(i=s.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(c){o=!0,a=c}finally{try{r||null==s.return||s.return()}finally{if(o)throw a}}return n}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,n){"use strict";var r=n(31);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){e.exports=function(e){return-1!==Function.toString.call(e).indexOf("[native code]")}},function(e,t,n){var r=n(13),o=n(36);function a(t,n,i){return o()?e.exports=a=Reflect.construct:e.exports=a=function(e,t,n){var o=[null];o.push.apply(o,t);var a=new(Function.bind.apply(e,o));return n&&r(a,n.prototype),a},a.apply(null,arguments)}e.exports=a},function(e,t){e.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}},function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}},function(e,t,n){var r=n(19);e.exports=function(e){if(Array.isArray(e))return r(e)}},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,n){"use strict";n.r(t);var r=n(2),o=n.n(r),a=n(0),i=n(1),s=n.n(i),c=n(3),u=n(4),l=n.n(u),f=n(7),p=n.n(f),d=n(5),m=n.n(d),b=n(8),h=n.n(b),v=n(6),E=n.n(v);function O(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function y(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}var g=n(10),w=n.n(g),x=!1,S=s.a.createContext(null),C="entering",j="entered",N=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var o,a=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?a?(o="exited",r.appearStatus=C):o=j:o=t.unmountOnExit||t.mountOnEnter?"unmounted":"exited",r.state={status:o},r.nextCallback=null,r}O(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&"unmounted"===t.status?{status:"exited"}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==C&&n!==j&&(t=C):n!==C&&n!==j||(t="exiting")}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){void 0===e&&(e=!1),null!==t?(this.cancelNextCallback(),t===C?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&"exited"===this.state.status&&this.setState({status:"unmounted"})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,o=this.props.nodeRef?[r]:[w.a.findDOMNode(this),r],a=o[0],i=o[1],s=this.getTimeouts(),c=r?s.appear:s.enter;!e&&!n||x?this.safeSetState({status:j},(function(){t.props.onEntered(a)})):(this.props.onEnter(a,i),this.safeSetState({status:C},(function(){t.props.onEntering(a,i),t.onTransitionEnd(c,(function(){t.safeSetState({status:j},(function(){t.props.onEntered(a,i)}))}))})))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:w.a.findDOMNode(this);t&&!x?(this.props.onExit(r),this.safeSetState({status:"exiting"},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:"exited"},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:"exited"},(function(){e.props.onExited(r)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:w.a.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var o=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],a=o[0],i=o[1];this.props.addEndListener(a,i)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if("unmounted"===e)return null;var t=this.props,n=t.children,r=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,y(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return s.a.createElement(S.Provider,{value:null},"function"==typeof n?n(e,r):s.a.cloneElement(s.a.Children.only(n),r))},t}(s.a.Component);function A(){}N.contextType=S,N.propTypes={},N.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:A,onEntering:A,onEntered:A,onExit:A,onExiting:A,onExited:A},N.UNMOUNTED="unmounted",N.EXITED="exited",N.ENTERING=C,N.ENTERED=j,N.EXITING="exiting";var R,k,T=N;var _="out-in",I="in-out",L=function(e,t,n){return function(){var r;e.props[t]&&(r=e.props)[t].apply(r,arguments),n()}},P=((R={})[_]=function(e){var t=e.current,n=e.changeState;return s.a.cloneElement(t,{in:!1,onExited:L(t,"onExited",(function(){n(C,null)}))})},R[I]=function(e){var t=e.current,n=e.changeState,r=e.children;return[t,s.a.cloneElement(r,{in:!0,onEntered:L(r,"onEntered",(function(){n(C)}))})]},R),D=((k={})[_]=function(e){var t=e.children,n=e.changeState;return s.a.cloneElement(t,{in:!0,onEntered:L(t,"onEntered",(function(){n(j,s.a.cloneElement(t,{in:!0}))}))})},k[I]=function(e){var t=e.current,n=e.children,r=e.changeState;return[s.a.cloneElement(t,{in:!1,onExited:L(t,"onExited",(function(){r(j,s.a.cloneElement(n,{in:!0}))}))}),s.a.cloneElement(n,{in:!0})]},k),M=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).state={status:j,current:null},t.appeared=!1,t.changeState=function(e,n){void 0===n&&(n=t.state.current),t.setState({status:e,current:n})},t}O(t,e);var n=t.prototype;return n.componentDidMount=function(){this.appeared=!0},t.getDerivedStateFromProps=function(e,t){return null==e.children?{current:null}:t.status===C&&e.mode===I?{status:C}:!t.current||(n=t.current,r=e.children,n===r||s.a.isValidElement(n)&&s.a.isValidElement(r)&&null!=n.key&&n.key===r.key)?{current:s.a.cloneElement(e.children,{in:!0})}:{status:"exiting"};var n,r},n.render=function(){var e,t=this.props,n=t.children,r=t.mode,o=this.state,a=o.status,i=o.current,c={children:n,current:i,changeState:this.changeState,status:a};switch(a){case C:e=D[r](c);break;case"exiting":e=P[r](c);break;case j:e=i}return s.a.createElement(S.Provider,{value:{isMounting:!this.appeared}},e)},t}(s.a.Component);M.propTypes={},M.defaultProps={mode:_};var U=M;function V(){return(V=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function F(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}var B=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return r=t,void((n=e).classList?n.classList.remove(r):"string"==typeof n.className?n.className=F(n.className,r):n.setAttribute("class",F(n.className&&n.className.baseVal||"",r)));var n,r}))},H=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var r=t.resolveArguments(e,n),o=r[0],a=r[1];t.removeClasses(o,"exit"),t.addClass(o,a?"appear":"enter","base"),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.resolveArguments(e,n),o=r[0],a=r[1]?"appear":"enter";t.addClass(o,a,"active"),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.resolveArguments(e,n),o=r[0],a=r[1]?"appear":"enter";t.removeClasses(o,a),t.addClass(o,a,"done"),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"appear"),t.removeClasses(n,"enter"),t.addClass(n,"exit","base"),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.resolveArguments(e)[0];t.addClass(n,"exit","active"),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"exit"),t.addClass(n,"exit","done"),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,n){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,n]},t.getClassNames=function(e){var n=t.props.classNames,r="string"==typeof n,o=r?""+(r&&n?n+"-":"")+e:n[e];return{baseClassName:o,activeClassName:r?o+"-active":n[e+"Active"],doneClassName:r?o+"-done":n[e+"Done"]}},t}O(t,e);var n=t.prototype;return n.addClass=function(e,t,n){var r=this.getClassNames(t)[n+"ClassName"],o=this.getClassNames("enter").doneClassName;"appear"===t&&"done"===n&&o&&(r+=" "+o),"active"===n&&e&&e.scrollTop,r&&(this.appliedClasses[t][n]=r,function(e,t){e&&t&&t.split(" ").forEach((function(t){return r=t,void((n=e).classList?n.classList.add(r):function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}(n,r)||("string"==typeof n.className?n.className=n.className+" "+r:n.setAttribute("class",(n.className&&n.className.baseVal||"")+" "+r)));var n,r}))}(e,r))},n.removeClasses=function(e,t){var n=this.appliedClasses[t],r=n.base,o=n.active,a=n.done;this.appliedClasses[t]={},r&&B(e,r),o&&B(e,o),a&&B(e,a)},n.render=function(){var e=this.props,t=(e.classNames,y(e,["classNames"]));return s.a.createElement(T,V({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(s.a.Component);H.defaultProps={classNames:""},H.propTypes={};var W=H,z=function(e){var t=e.className,n=e.fillColor,r=void 0===n?"black":n;return Object(a.createElement)("svg",{className:t,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(a.createElement)("g",{clipPath:"url(#clipThumbsUp)"},Object(a.createElement)("mask",{id:"maskThumbsUp","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:"2",y:"-1",width:"20",height:"20"},Object(a.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19.35 6.24998H13.5658L14.4366 2.06081L14.4641 1.76748C14.4641 1.39165 14.3083 1.04331 14.0608 0.795813L13.0891 -0.166687L7.05748 5.87415C6.71831 6.20415 6.51664 6.66248 6.51664 7.16665L2.84998 7.16665V16.425H6.51664V16.3333C6.51664 17.3416 7.34164 18.1666 8.34998 18.1666H16.6C17.3608 18.1666 18.0116 17.7083 18.2866 17.0483L21.055 10.5858C21.1375 10.375 21.1833 10.155 21.1833 9.91665V8.08331C21.1833 7.07498 20.3583 6.24998 19.35 6.24998ZM19.35 9.91665L16.6 16.3333H8.34998V7.16665L12.3283 3.18831L11.3108 8.08331H19.35V9.91665Z",fill:"white"})),Object(a.createElement)("g",{mask:"url(#maskThumbsUp)"},Object(a.createElement)("rect",{x:"0.999878",y:"-3.05176e-05",width:"22",height:"22",fill:r}))),Object(a.createElement)("defs",null,Object(a.createElement)("clipPath",{id:"clipThumbsUp"},Object(a.createElement)("rect",{width:"24",height:"24",fill:"white"}))))},G=function(e){var t=e.className,n=e.fillColor,r=void 0===n?"black":n;return Object(a.createElement)("svg",{className:t,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(a.createElement)("g",{clipPath:"url(#clipThumbsDown)"},Object(a.createElement)("mask",{id:"maskThumbsDown","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:"2",y:"5",width:"20",height:"20"},Object(a.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.65002 17.75H10.4342L9.56336 21.9392L9.53586 22.2325C9.53586 22.6083 9.69169 22.9567 9.93919 23.2042L10.9109 24.1667L16.9425 18.1258C17.2817 17.7958 17.4834 17.3375 17.4834 16.8333L21.15 16.8333L21.15 7.57499H17.4834V7.66666C17.4834 6.65832 16.6584 5.83332 15.65 5.83332H7.40003C6.63919 5.83332 5.98836 6.29165 5.71336 6.95166L2.94503 13.4142C2.86253 13.625 2.81669 13.845 2.81669 14.0833V15.9167C2.81669 16.925 3.64169 17.75 4.65002 17.75ZM4.65002 14.0833L7.40002 7.66666H15.65L15.65 16.8333L11.6717 20.8117L12.6892 15.9167H4.65002V14.0833Z",fill:"white"})),Object(a.createElement)("g",{mask:"url(#maskThumbsDown)"},Object(a.createElement)("rect",{x:"23.0001",y:"24",width:"22",height:"22",transform:"rotate(-180 23.0001 24)",fill:r}))),Object(a.createElement)("defs",null,Object(a.createElement)("clipPath",{id:"clipThumbsDown"},Object(a.createElement)("rect",{width:"24",height:"24",fill:"white"}))))},K=function(e){var t,n=e.attributes,r=e.voteCount,o=e.apiAnswerId,s=e.onVote,u=e.disabled,l=e.isVotedOn,f=e.hideCount,p=e.fallbackStyles,d=e.isInEditor,b=n.className,v=n.type,E=Object(i.useState)(0),O=m()(E,2),y=O[0],g=O[1],w=function(){!u&&s&&(g(1),s(o))},x="up"===v?z:G,S="is-type-".concat(v),C=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return h()({"has-bg-color":e.backgroundColor,"has-text-color":e.textColor,"has-border-color":e.borderColor},n)}(n,"crowdsignal-forms-vote-item",b,{"is-voted-on":l,"is-disabled":u,"is-in-editor":d},S),j=function(e,t){var n=Object(c.isEmpty)(e.textColor)?t.textColor:e.textColor,r=Object(c.isEmpty)(e.backgroundColor)?t.backgroundColor:e.backgroundColor;return Object(c.mapKeys)({borderColor:e.borderColor,bgColor:r,textColor:n,votedColor:t.accentColor},(function(e,t){return"--crowdsignal-forms-vote-".concat(Object(c.kebabCase)(t))}))}(n,p),N=r+y;return Object(a.createElement)("div",{className:C,onClick:w,onKeyPress:w,role:"button",style:j,tabIndex:0},Object(a.createElement)(x,{className:"crowdsignal-forms-vote-item__icon",fillColor:"currentColor"}),!f&&Object(a.createElement)(U,{mode:"in-out"},Object(a.createElement)(W,{key:y,classNames:"crowdsignal-forms-vote-item__count",timeout:300},Object(a.createElement)("div",{className:"crowdsignal-forms-vote-item__count"},(t=N)?t>=1e7?"".concat(Object(c.round)(t/1e6),"M"):t>=1e6?"".concat((t/1e6).toFixed(1),"M"):t>=1e4?"".concat(Object(c.round)(t/1e3),"K"):t>=1e3?"".concat((t/1e3).toFixed(1),"K"):t.toString():"0"))))};K.propTypes={apiAnswerId:E.a.number,className:E.a.string,disabled:E.a.bool,isVotedOn:E.a.bool,onVote:E.a.func,type:E.a.string.isRequired,voteCount:E.a.number.isRequired};var q=K,J=n(12),Y=n.n(J),Z=n(14),$=n.n(Z),X=n(15),Q=n.n(X),ee=n(20),te=n.n(ee),ne=n(11),re=n.n(ne),oe=n(21),ae=n.n(oe),ie=(n(16),n(9));function se(e){return function(){var t,n=re()(e);if(ce()){var r=re()(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return te()(this,t)}}function ce(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var ue,le=function(){var e=p()(l.a.mark((function e(t){var n,r,o=arguments;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=!(o.length>1&&void 0!==o[1])||o[1],r="https://api.crowdsignal.com/v3/polls",n){e.next=4;break}return e.abrupt("return",null);case 4:return e.abrupt("return",window.fetch("".concat(r,"/").concat(t,"/results"),{method:"GET",headers:{"content-type":"application/json"}}).then((function(e){if(e.status>=200&&e.status<300)return e.json();throw e})).then((function(e){if(404===e.status)return{};if(e.error)throw new Error(e.message);return e.results.votes_by_answer})));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),fe=function(){var e=p()(l.a.mark((function e(t){var n,r,o;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"5430eeac3911395001d731d9702fc38b",n=(new Date).getTime(),e.next=4,window.fetch("https://polldaddy.com/n/".concat("5430eeac3911395001d731d9702fc38b","/").concat(t,"?").concat(n,"&format=json"));case 4:if((r=e.sent).ok){e.next=7;break}throw new me;case 7:return e.next=9,r.json();case 9:if((o=e.sent).nonce){e.next=12;break}throw new me;case 12:return e.abrupt("return",o.nonce);case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),pe=function(){var e=p()(l.a.mark((function e(t,n,r,o){var a,i,s;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=r.join(","),e.next=3,window.fetch("https://polls.polldaddy.com/vote-js.php?format=json&p=".concat(n,"&b=1&a=").concat(a,"&o=&va=16&cookie=0&n=").concat(t,"&url=").concat(encodeURIComponent(window.location),"&vi=").concat(o));case 3:if((i=e.sent).ok){e.next=6;break}throw new me;case 6:return e.next=8,i.json();case 8:if("error"!==(s=e.sent).status){e.next=11;break}throw new de(s.error);case 11:case"end":return e.stop()}}),e)})));return function(t,n,r,o){return e.apply(this,arguments)}}(),de=function(e){Q()(n,e);var t=se(n);function n(){return $()(this,n),t.apply(this,arguments)}return n}(ae()(Error)),me=function(e){Q()(n,e);var t=se(n);function n(){return $()(this,n),t.call(this,Object(ie.__)("Server error. Please try again.","crowdsignal-forms"))}return n}(de),be=function(e,t){var n=Object(i.useState)(null),r=m()(n,2),o=r[0],a=r[1],s=Object(i.useState)(null),c=m()(s,2),u=c[0],l=c[1],f=Object(i.useState)(!0),p=m()(f,2),d=p[0],b=p[1];return Object(i.useEffect)((function(){b(!0),l(null),a(null),e().then(a).catch(l).finally((function(){return b(!1)}))}),t),{data:o,error:u,loading:d}},he=(Object.freeze({THANK_YOU:"thank-you",CUSTOM_TEXT:"custom-text",REDIRECT:"redirect",RESULTS:"results"}),Object.freeze({THEME_DEFAULT:"theme-default",GEORGIA:"georgia",PALATINO:"palatino",TIMES_NEW_ROMAN:"times-new-roman",ARIAL:"arial",IMPACT:"impact",LUCIDA:"lucida",TAHOMA:"tahoma",TREBUCHET:"trebuchet",VERDANA:"verdana",COURIER:"courier",CABIN:"Cabin",CHIVO:"Chivo",OPEN_SANS:"Open+Sans",FIRA_SANS:"Fira+Sans",ROBOTO:"Roboto",NUNITO:"Nunito",OVERPASS:"Overpass",LATO:"Lato",LIBRE_FRANKLIN:"Libre+Franklin",MONTSERRAT:"Montserrat",POPPINS:"Poppins",RUBIK:"Rubik",RALEWAY:"Raleway",JOSEFIN_SANS:"Josefin+Sans",ALEGREYA_SANS:"Alegreya+Sans",OSWALD:"Oswald"})),ve=(Object.freeze([he.CABIN,he.CHIVO,he.OPEN_SANS,he.FIRA_SANS,he.ROBOTO,he.NUNITO,he.OVERPASS,he.LATO,he.LIBRE_FRANKLIN,he.MONTSERRAT,he.POPPINS,he.RUBIK,he.RALEWAY,he.JOSEFIN_SANS,he.ALEGREYA_SANS,he.OSWALD]),Object.freeze((ue={},o()(ue,he.THEME_DEFAULT,null),o()(ue,he.GEORGIA,"Georgia, serif"),o()(ue,he.PALATINO,'"Palatino Linotype", "Book Antiqua", Palatino, serif'),o()(ue,he.TIMES_NEW_ROMAN,'"Times New Roman", Times, serif'),o()(ue,he.ARIAL,"Arial, Helvetica, sans-serif"),o()(ue,he.IMPACT,"Impact, Charcoal, sans-serif"),o()(ue,he.LUCIDA,'"Lucida Sans Unicode", "Lucida Grande", sans-serif'),o()(ue,he.TAHOMA,"Tahoma, Geneva, sans-serif"),o()(ue,he.TREBUCHET,'"Trebuchet MS", Helvetica, sans-serif'),o()(ue,he.VERDANA,"Verdana, Geneva, sans-serif"),o()(ue,he.COURIER,'"Courier New", Courier, monospace'),o()(ue,he.CABIN,'"Cabin", sans-serif'),o()(ue,he.CHIVO,'"Chivo", sans-serif'),o()(ue,he.OPEN_SANS,'"Open Sans", sans-serif'),o()(ue,he.FIRA_SANS,'"Fira Sans", sans-serif'),o()(ue,he.ROBOTO,'"Roboto", sans-serif'),o()(ue,he.NUNITO,'"Nunito", sans-serif'),o()(ue,he.OVERPASS,'"Overpass", sans-serif'),o()(ue,he.LATO,'"Lato", sans-serif'),o()(ue,he.LIBRE_FRANKLIN,'"Libre Franklin", sans-serif'),o()(ue,he.MONTSERRAT,'"Montserrat", sans-serif'),o()(ue,he.POPPINS,'"Poppins", sans-serif'),o()(ue,he.RUBIK,'"Rubik", sans-serif'),o()(ue,he.RALEWAY,'"Raleway", sans-serif'),o()(ue,he.JOSEFIN_SANS,'"Josefin Sans", sans-serif'),o()(ue,he.ALEGREYA_SANS,'"Alegreya Sans", sans-serif'),o()(ue,he.OSWALD,'"Oswald", sans-serif'),ue)),Object.freeze({OPEN:"open",CLOSED:"closed",CLOSED_AFTER:"closed-after"})),Ee=(Object.freeze({SHOW_RESULTS:"show-results",SHOW_CLOSED_BANNER:"show-closed-banner",HIDDEN:"hidden"}),Object.freeze({CONNECTED:"connected",NOT_CONNECTED:"not-connected",NOT_VERIFIED:"not-verified"}),Object.freeze({RADIO:"radio",BUTTON:"button"}),Object.freeze({LIST:"list",INLINE:"inline"}),n(22)),Oe=n.n(Ee),ye=n(23),ge=n.n(ye),we=n(24),xe=function(e){for(var t=window.getComputedStyle(e).backgroundColor;"rgba(0, 0, 0, 0)"===t&&e.parentNode&&e.parentNode.nodeType===window.Node.ELEMENT_NODE;)e=e.parentNode,t=window.getComputedStyle(e).backgroundColor;return t},Se=function(){return Object(a.createElement)("div",{className:"crowdsignal-forms__style-probe"},Object(a.createElement)("p",null),Object(a.createElement)("h3",null,"Text"),Object(a.createElement)("div",{className:"wp-block-button"},Object(a.createElement)("div",{className:"wp-block-button__link"})),Object(a.createElement)("div",{className:"entry-content"},Object(a.createElement)("div",{className:"alignwide"})))},Ce=function(e){if(null===e)return{};var t,n=e.querySelector(".wp-block-button__link"),r=e.querySelector("p"),o=e.querySelector("h3"),a=e.querySelector(".alignwide"),i=xe(n),s=xe(r),c=window.getComputedStyle(r).color;if(i===s){var u=(t=n,"0px"!==window.getComputedStyle(t).borderBlockStartWidth?window.getComputedStyle(t).borderBlockStartColor:null);i=u||c}return{accentColor:i,backgroundColor:s,textColor:c,textColorInverted:window.getComputedStyle(n).color,textFont:window.getComputedStyle(r).fontFamily,textSize:window.getComputedStyle(r).fontSize,headingFont:window.getComputedStyle(o).fontFamily,contentWideWidth:window.getComputedStyle(a).maxWidth}},je=function(e){var t=e.showBranding,n=e.referralCode;return Object(a.createElement)("div",{className:"crowdsignal-forms__branding"},t&&Object(a.createElement)("a",{className:"crowdsignal-forms__branding-link with-external-icon",href:"https://crowdsignal.com?ref=".concat(n),target:"blank",rel:"noopener noreferrer"},Object(ie.__)("Powered by Crowdsignal","crowdsignal-forms")),!t&&Object(a.createElement)("span",{className:"crowdsignal-forms__branding-link"}," "))};je.propTypes={showBranding:E.a.bool,referralCode:E.a.string.isRequired};var Ne,Ae=je,Re=(n(25),n(17),Ne=function(e){var t=e.attributes,n=e.fallbackStyles,r=e.renderStyleProbe,o=t.apiPollData.id,s=Object(i.useState)(0),u=m()(s,2),f=u[0],d=u[1],b=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r="cs-poll-".concat(e),o=Object(i.useState)(!1),a=m()(o,2),s=a[0],c=a[1],u=Object(i.useState)(!1),f=m()(u,2),d=f[0],b=f[1],h=Object(i.useState)(""),v=m()(h,2),E=v[0],O=v[1];Object(i.useEffect)((function(){t&&void 0!==Y.a.get(r)&&(b(!0),O(Y.a.get(r)))}),[]);var y=function(){var o=p()(l.a.mark((function o(a){var i,s,u,f=arguments;return l.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return i=f.length>1&&void 0!==f[1]?f[1]:1,o.prev=1,c(!0),o.next=5,fe(e);case 5:return s=o.sent,o.next=8,pe(s,e,a,i);case 8:b(!0),t&&(u=n?a.join(","):(new Date).getTime(),Y.a.set(r,u,{sameSite:"Strict",expires:365}),O(u));case 10:return o.prev=10,c(!1),o.finish(10);case 13:case"end":return o.stop()}}),o,null,[[1,,10,13]])})));return function(e){return o.apply(this,arguments)}}();return{hasVoted:d,isVoting:s,vote:y,storedCookieValue:E}}(o,!0,!0),v=b.hasVoted,E=b.vote,O=b.storedCookieValue,y=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=be((function(){return le(e,t)}),[e]),r=n.data,o=n.error,a=n.loading;return{error:o,loading:a,results:r}}(o,!t.hideResults).results;Object(i.useEffect)((function(){""!==O&&d(parseInt(O.split(",")[0],10))}),[O]);var g=function(){var e=p()(l.a.mark((function e(t){return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return d(t),e.next=3,E([t]);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),w=h()("crowdsignal-forms-vote",t.className,"size-".concat(t.size)),x=Object(c.zipObject)(Object(c.map)(t.apiPollData.answers,"client_id"),Object(c.map)(t.apiPollData.answers,"id")),S=function(e){return Object(c.mapKeys)({borderRadius:"".concat(e.borderRadius,"px"),borderWidth:"".concat(e.borderWidth,"px")},(function(e,t){return"--crowdsignal-forms-vote-".concat(Object(c.kebabCase)(t))}))}(t),C=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Date;if(ve.CLOSED===e)return!0;if(ve.CLOSED_AFTER===e){var r=new Date(t);return r<n}return!1}(t.pollStatus,t.closedAfterDateTime);return Object(a.createElement)("div",{className:w,style:S},Object(a.createElement)("div",{className:"crowdsignal-forms-vote__items"},Object(c.map)(t.innerBlocks,(function(e){var r=x[e.answerId];return Object(a.createElement)(q,{attributes:e,fallbackStyles:n,key:e.answerId,apiAnswerId:r,onVote:g,disabled:v||0!==f||C,isVotedOn:r===f,voteCount:y?y[r]:0,hideCount:t.hideResults,type:e.type})}))),Object(a.createElement)(Ae,{showBranding:v&&!t.hideBranding,referralCode:"cs-forms-vote"}),r())},Object(we.withFallbackStyles)((function(e){return{fallbackStyles:Ce(e.querySelector(".crowdsignal-forms__style-probe"))}}))((function(e){var t=e.fallbackStyles,n=ge()(e,["fallbackStyles"]);return Object(a.createElement)(Ne,Oe()({fallbackStyles:t||{},renderStyleProbe:function(){return t?null:Object(a.createElement)(Se,null)}},n))}))),ke=function(e,t){return Object(c.forEach)(document.querySelectorAll("div[".concat(e,"]")),(function(n){try{var r=JSON.parse(n.dataset[Object(c.camelCase)(e.substr("data-".length))]),o=t(r,n);n.removeAttribute(e),Object(g.render)(o,n)}catch(a){console.error("Crowdsignal Forms: Failed to parse block data for: %s",e)}}))},Te=function(e,t){(Object(c.isEmpty)(window.CrowdsignalMutationObservers)||!0!==window.CrowdsignalMutationObservers[e])&&(new window.MutationObserver((function(){return ke(e,t)})).observe(document.body,{attributes:!0,attributeFilter:[e],childList:!0,subtree:!0}),Object(c.isEmpty)(window.CrowdsignalMutationObservers)&&(window.CrowdsignalMutationObservers=[]),window.CrowdsignalMutationObservers[e]=!0,ke(e,t))};function _e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}(function(e,t){if("complete"===document.readyState)return Te(e,t);window.addEventListener("load",(function(){return Te(e,t)}))})("data-crowdsignal-vote",(function(e,t){var n=[];Object(c.forEach)(t.children,(function(e){Object(c.isEmpty)(e.dataset.crowdsignalVoteItem)||n.push(JSON.parse(e.dataset.crowdsignalVoteItem))}));var r=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_e(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_e(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e,{innerBlocks:n});return Object(a.createElement)(Re,{attributes:r})}))}]));
changelog.txt CHANGED
@@ -1,3 +1,7 @@
 
 
 
 
1
  = 1.3.5 =
2
  * Show branding on editor and a message when free signals are exhausted (#11)
3
  * Remove redirect URL feature (#12)
1
+ = 1.4.3 =
2
+ * Add NPS block
3
+ * Fixed redirect logic for the poll block
4
+
5
  = 1.3.5 =
6
  * Show branding on editor and a message when free signals are exhausted (#11)
7
  * Remove redirect URL feature (#12)
crowdsignal-forms.php CHANGED
@@ -15,7 +15,7 @@
15
  * Plugin Name: Crowdsignal Forms
16
  * Plugin URI: https://crowdsignal.com/crowdsignal-forms/
17
  * Description: Crowdsignal Form Blocks
18
- * Version: 1.3.5
19
  * Author: Automattic
20
  * Author URI: https://automattic.com/
21
  * License: GPL-2.0+
@@ -28,7 +28,7 @@ if ( ! defined( 'ABSPATH' ) ) {
28
  die;
29
  }
30
 
31
- define( 'CROWDSIGNAL_FORMS_VERSION', '1.3.5' );
32
  define( 'CROWDSIGNAL_FORMS_PLUGIN_FILE', __FILE__ );
33
  define( 'CROWDSIGNAL_FORMS_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
34
 
15
  * Plugin Name: Crowdsignal Forms
16
  * Plugin URI: https://crowdsignal.com/crowdsignal-forms/
17
  * Description: Crowdsignal Form Blocks
18
+ * Version: 1.4.3
19
  * Author: Automattic
20
  * Author URI: https://automattic.com/
21
  * License: GPL-2.0+
28
  die;
29
  }
30
 
31
+ define( 'CROWDSIGNAL_FORMS_VERSION', '1.4.3' );
32
  define( 'CROWDSIGNAL_FORMS_PLUGIN_FILE', __FILE__ );
33
  define( 'CROWDSIGNAL_FORMS_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
34
 
includes/admin/class-crowdsignal-forms-settings.php CHANGED
@@ -42,7 +42,7 @@ class Crowdsignal_Forms_Settings {
42
  * Enqueues scripts for setup page.
43
  */
44
  public function admin_enqueue_scripts() {
45
- wp_enqueue_style( 'admin-styles', plugin_dir_url( __FILE__ ) . '/admin-styles.css', array(), '1.3.5' );
46
  }
47
 
48
  /**
42
  * Enqueues scripts for setup page.
43
  */
44
  public function admin_enqueue_scripts() {
45
+ wp_enqueue_style( 'admin-styles', plugin_dir_url( __FILE__ ) . '/admin-styles.css', array(), '1.4.3' );
46
  }
47
 
48
  /**
includes/admin/class-crowdsignal-forms-setup.php CHANGED
@@ -65,7 +65,7 @@ class Crowdsignal_Forms_Setup {
65
  * Enqueues scripts for setup page.
66
  */
67
  public function admin_enqueue_scripts() {
68
- wp_enqueue_style( 'admin-styles', plugin_dir_url( __FILE__ ) . '/admin-styles.css', array(), '1.3.5' );
69
  wp_enqueue_script( 'videopress', 'https://videopress.com/videopress-iframe.js', array(), '1.0', false );
70
  }
71
 
65
  * Enqueues scripts for setup page.
66
  */
67
  public function admin_enqueue_scripts() {
68
+ wp_enqueue_style( 'admin-styles', plugin_dir_url( __FILE__ ) . '/admin-styles.css', array(), '1.4.3' );
69
  wp_enqueue_script( 'videopress', 'https://videopress.com/videopress-iframe.js', array(), '1.0', false );
70
  }
71
 
includes/class-crowdsignal-forms.php CHANGED
@@ -14,6 +14,7 @@ use Crowdsignal_Forms\Gateways\Api_Gateway_Interface;
14
  use Crowdsignal_Forms\Gateways\Api_Gateway;
15
  use Crowdsignal_Forms\Gateways\Post_Poll_Meta_Gateway;
16
  use Crowdsignal_Forms\Logging\Webservice_Logger;
 
17
  use Crowdsignal_Forms\Rest_Api\Controllers\Polls_Controller;
18
  use Crowdsignal_Forms\Rest_Api\Controllers\Account_Controller;
19
  use Crowdsignal_Forms\Admin\Admin_Hooks;
@@ -73,6 +74,13 @@ final class Crowdsignal_Forms {
73
  */
74
  public $rest_api_polls_controller;
75
 
 
 
 
 
 
 
 
76
  /**
77
  * The api gateway.
78
  *
@@ -200,8 +208,9 @@ final class Crowdsignal_Forms {
200
  public function bootstrap() {
201
  $this->blocks = new Crowdsignal_Forms_Blocks();
202
  $this->blocks_assets = new Crowdsignal_Forms_Blocks_Assets();
203
- $this->rest_api_polls_controller = new Polls_Controller();
204
  $this->rest_api_account_controller = new Account_Controller();
 
 
205
  $this->admin_hooks = new Admin_Hooks();
206
  $this->webservice_logger = new Webservice_Logger();
207
 
@@ -245,8 +254,9 @@ final class Crowdsignal_Forms {
245
  * @since 0.9.0
246
  */
247
  public function register_rest_api_routes() {
248
- $this->rest_api_polls_controller->register_routes();
249
  $this->rest_api_account_controller->register_routes();
 
 
250
 
251
  /**
252
  * Any additional controllers from companion plugins can be registered using this hook.
14
  use Crowdsignal_Forms\Gateways\Api_Gateway;
15
  use Crowdsignal_Forms\Gateways\Post_Poll_Meta_Gateway;
16
  use Crowdsignal_Forms\Logging\Webservice_Logger;
17
+ use Crowdsignal_Forms\Rest_Api\Controllers\Nps_Controller;
18
  use Crowdsignal_Forms\Rest_Api\Controllers\Polls_Controller;
19
  use Crowdsignal_Forms\Rest_Api\Controllers\Account_Controller;
20
  use Crowdsignal_Forms\Admin\Admin_Hooks;
74
  */
75
  public $rest_api_polls_controller;
76
 
77
+ /**
78
+ * The nps controller.
79
+ *
80
+ * @var Nps_Controller
81
+ */
82
+ public $rest_api_nps_controller;
83
+
84
  /**
85
  * The api gateway.
86
  *
208
  public function bootstrap() {
209
  $this->blocks = new Crowdsignal_Forms_Blocks();
210
  $this->blocks_assets = new Crowdsignal_Forms_Blocks_Assets();
 
211
  $this->rest_api_account_controller = new Account_Controller();
212
+ $this->rest_api_nps_controller = new Nps_Controller();
213
+ $this->rest_api_polls_controller = new Polls_Controller();
214
  $this->admin_hooks = new Admin_Hooks();
215
  $this->webservice_logger = new Webservice_Logger();
216
 
254
  * @since 0.9.0
255
  */
256
  public function register_rest_api_routes() {
 
257
  $this->rest_api_account_controller->register_routes();
258
+ $this->rest_api_nps_controller->register_routes();
259
+ $this->rest_api_polls_controller->register_routes();
260
 
261
  /**
262
  * Any additional controllers from companion plugins can be registered using this hook.
includes/frontend/blocks/class-crowdsignal-forms-nps-block.php ADDED
@@ -0,0 +1,214 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Contains Crowdsignal_Forms\Frontend\Blocks\Crowdsignal_Forms_Nps_block
4
+ *
5
+ * @package Crowdsignal_Forms\Frontend\Blocks
6
+ * @since 1.4.0
7
+ */
8
+
9
+ namespace Crowdsignal_Forms\Frontend\Blocks;
10
+
11
+ use Crowdsignal_Forms\Frontend\Crowdsignal_Forms_Blocks_Assets;
12
+ use Crowdsignal_Forms\Frontend\Crowdsignal_Forms_Block;
13
+
14
+ if ( ! defined( 'ABSPATH' ) ) {
15
+ exit;
16
+ }
17
+
18
+ /**
19
+ * Handles Crowdsignal Forms' NPS block.
20
+ *
21
+ * @package Crowdsignal_Forms\Frontend\Blocks
22
+ * @since 1.4.0
23
+ */
24
+ class Crowdsignal_Forms_Nps_Block extends Crowdsignal_Forms_Block {
25
+
26
+ /**
27
+ * The nonce identifier string for NPS vote submittion.
28
+ *
29
+ * @since 1.4.0
30
+ * @var string
31
+ */
32
+ const NONCE = 'crowdsignal-forms-nps__submit';
33
+
34
+ /**
35
+ * {@inheritDoc}
36
+ */
37
+ public function asset_identifier() {
38
+ return 'crowdsignal-forms-nps';
39
+ }
40
+
41
+ /**
42
+ * {@inheritDoc}
43
+ */
44
+ public function assets() {
45
+ return array(
46
+ 'config' => '/build/nps.asset.php',
47
+ 'script' => '/build/nps.js',
48
+ 'style' => '/build/nps.css',
49
+ );
50
+ }
51
+
52
+ /**
53
+ * {@inheritDoc}
54
+ */
55
+ public function register() {
56
+ register_block_type(
57
+ 'crowdsignal-forms/nps',
58
+ array(
59
+ 'attributes' => $this->attributes(),
60
+ 'editor_script' => Crowdsignal_Forms_Blocks_Assets::EDITOR,
61
+ 'editor_style' => Crowdsignal_Forms_Blocks_Assets::EDITOR,
62
+ 'render_callback' => array( $this, 'render' ),
63
+ )
64
+ );
65
+ }
66
+
67
+ /**
68
+ * Renders the NPS dynamic block
69
+ *
70
+ * @param array $attributes The block's attributes.
71
+ * @return string
72
+ */
73
+ public function render( $attributes ) {
74
+ if ( $this->should_hide_block() ) {
75
+ return '';
76
+ }
77
+
78
+ wp_enqueue_script( $this->asset_identifier() );
79
+ wp_enqueue_style( $this->asset_identifier() );
80
+
81
+ $attributes['hideBranding'] = $this->should_hide_branding();
82
+ $attributes['isPreview'] = is_preview();
83
+ $attributes['nonce'] = $this->create_nonce();
84
+
85
+ return sprintf(
86
+ '<div class="crowdsignal-nps-wrapper" data-crowdsignal-nps="%s"></div>',
87
+ htmlentities( wp_json_encode( $attributes ) )
88
+ );
89
+ }
90
+
91
+ /**
92
+ * Determines if the NPS block should be rendered or not.
93
+ *
94
+ * @return bool
95
+ */
96
+ private function should_hide_block() {
97
+ return ! $this->is_cs_connected() || ! is_singular();
98
+ }
99
+
100
+ /**
101
+ * Returns the attributes definition array for register_block_type
102
+ *
103
+ * Note: Any changes to the array returned by this function need to be
104
+ * duplicated in client/blocks/nps/attributes.js.
105
+ *
106
+ * @return array
107
+ */
108
+ private function attributes() {
109
+ return array(
110
+ 'backgroundColor' => array(
111
+ 'type' => 'string',
112
+ ),
113
+ 'buttonColor' => array(
114
+ 'type' => 'string',
115
+ ),
116
+ 'buttonTextColor' => array(
117
+ 'type' => 'string',
118
+ ),
119
+ 'feedbackPlaceholder' => array(
120
+ 'type' => 'string',
121
+ 'default' => __(
122
+ 'Please help us understand your rating',
123
+ 'crowdsignal-forms'
124
+ ),
125
+ ),
126
+ 'feedbackQuestion' => array(
127
+ 'type' => 'string',
128
+ 'default' => __(
129
+ 'Thanks so much for your response! How could we do better?',
130
+ 'crowdsignal-forms'
131
+ ),
132
+ ),
133
+ 'hideBranding' => array(
134
+ 'type' => 'boolean',
135
+ 'default' => false,
136
+ ),
137
+ 'highRatingLabel' => array(
138
+ 'type' => 'string',
139
+ 'default' => __( 'Extremely likely', 'crowdsignal-forms' ),
140
+ ),
141
+ 'lowRatingLabel' => array(
142
+ 'type' => 'string',
143
+ 'default' => __( 'Not likely at all', 'crowdsignal-forms' ),
144
+ ),
145
+ 'ratingQuestion' => array(
146
+ 'type' => 'string',
147
+ 'default' => __(
148
+ 'How likely is it that you would recommend this project to a friend or colleague?',
149
+ 'crowdsignal-forms'
150
+ ),
151
+ ),
152
+ 'submitButtonLabel' => array(
153
+ 'type' => 'string',
154
+ 'default' => __( 'Submit', 'crowdsignal-forms' ),
155
+ ),
156
+ 'surveyId' => array(
157
+ 'type' => 'number',
158
+ 'default' => null,
159
+ ),
160
+ 'textColor' => array(
161
+ 'type' => 'string',
162
+ ),
163
+ 'title' => array(
164
+ 'type' => 'string',
165
+ 'default' => '',
166
+ ),
167
+ 'viewThreshold' => array(
168
+ 'type' => 'string',
169
+ 'default' => 3,
170
+ ),
171
+ 'status' => array(
172
+ 'type' => 'string',
173
+ 'default' => 'open', // See: client/blocks/nps/constants.js.
174
+ ),
175
+ 'closedAfterDateTime' => array(
176
+ 'type' => 'string',
177
+ 'default' => null,
178
+ ),
179
+ );
180
+ }
181
+
182
+ /**
183
+ * Returns a nonce based on the NONCE.
184
+ * The nonce creation is first attempted through crowdsignal_forms_nps_nonce filter.
185
+ *
186
+ * @since 1.4.3
187
+ * @return string
188
+ */
189
+ private function create_nonce() {
190
+ $nonce = apply_filters( 'crowdsignal_forms_nps_nonce', self::NONCE );
191
+
192
+ if ( self::NONCE === $nonce ) { // returned unfiltered.
193
+ $nonce = wp_create_nonce( self::NONCE );
194
+ }
195
+ return $nonce;
196
+ }
197
+
198
+ /**
199
+ * Verifies a nonce based on the NONCE.
200
+ * The nonce creation is first attempted through crowdsignal_forms_nps_nonce filter.
201
+ *
202
+ * @since 1.4.3
203
+ * @param string $nonce
204
+ * @return bool
205
+ */
206
+ public static function verify_nonce( $nonce ) {
207
+ $verifies = apply_filters( 'crowdsignal_forms_nps_nonce_check', $nonce, self::NONCE );
208
+
209
+ if ( $verifies === $nonce ) { // returned unfiltered.
210
+ $verifies = wp_verify_nonce( $nonce, self::NONCE );
211
+ }
212
+ return $verifies;
213
+ }
214
+ }
includes/frontend/blocks/class-crowdsignal-forms-poll-block.php CHANGED
@@ -71,9 +71,11 @@ class Crowdsignal_Forms_Poll_Block extends Crowdsignal_Forms_Block {
71
  wp_enqueue_script( $this->asset_identifier() );
72
  wp_enqueue_style( $this->asset_identifier() );
73
 
74
- $attributes['redirectAddress'] = esc_url( $attributes['redirectAddress'] );
75
- $attributes['hideBranding'] = $this->should_hide_branding();
76
- $platform_poll_data = $this->get_platform_poll_data( $attributes['pollId'] );
 
 
77
  if ( ! empty( $platform_poll_data ) ) {
78
  $attributes['apiPollData'] = $platform_poll_data;
79
  }
71
  wp_enqueue_script( $this->asset_identifier() );
72
  wp_enqueue_style( $this->asset_identifier() );
73
 
74
+ if ( isset( $attributes['redirectAddress'] ) ) {
75
+ $attributes['redirectAddress'] = esc_url( $attributes['redirectAddress'] );
76
+ }
77
+ $attributes['hideBranding'] = $this->should_hide_branding();
78
+ $platform_poll_data = $this->get_platform_poll_data( $attributes['pollId'] );
79
  if ( ! empty( $platform_poll_data ) ) {
80
  $attributes['apiPollData'] = $platform_poll_data;
81
  }
includes/frontend/class-crowdsignal-forms-blocks-assets.php CHANGED
@@ -20,7 +20,8 @@ if ( ! defined( 'ABSPATH' ) ) {
20
  */
21
  class Crowdsignal_Forms_Blocks_Assets {
22
 
23
- const EDITOR = 'crowdsignal-forms-editor';
 
24
 
25
  /**
26
  * Returns an array containing js and css targets
@@ -35,6 +36,11 @@ class Crowdsignal_Forms_Blocks_Assets {
35
  $assets[ $block->asset_identifier() ] = $block->assets();
36
  }
37
 
 
 
 
 
 
38
  $assets[ self::EDITOR ] = array(
39
  'config' => '/build/editor.asset.php',
40
  'script' => '/build/editor.js',
@@ -82,6 +88,18 @@ class Crowdsignal_Forms_Blocks_Assets {
82
  $config['version']
83
  );
84
  }
 
 
 
 
 
 
 
 
 
 
 
 
85
  }
86
 
87
  /**
20
  */
21
  class Crowdsignal_Forms_Blocks_Assets {
22
 
23
+ const APIFETCH = 'crowdsignal-forms-apifetch';
24
+ const EDITOR = 'crowdsignal-forms-editor';
25
 
26
  /**
27
  * Returns an array containing js and css targets
36
  $assets[ $block->asset_identifier() ] = $block->assets();
37
  }
38
 
39
+ $assets[ self::APIFETCH ] = array(
40
+ 'config' => '/build/apifetch.asset.php',
41
+ 'script' => '/build/apifetch.js',
42
+ );
43
+
44
  $assets[ self::EDITOR ] = array(
45
  'config' => '/build/editor.asset.php',
46
  'script' => '/build/editor.js',
88
  $config['version']
89
  );
90
  }
91
+
92
+ // REST API Requires a nonce to be present on each request for logged in users.
93
+ if (
94
+ self::APIFETCH === $id &&
95
+ is_user_logged_in()
96
+ ) {
97
+ wp_add_inline_script(
98
+ self::APIFETCH,
99
+ sprintf( "_crowdsignalFormsWpNonce='%s';", wp_create_nonce( 'wp_rest' ) ),
100
+ 'before'
101
+ );
102
+ }
103
  }
104
 
105
  /**
includes/frontend/class-crowdsignal-forms-blocks.php CHANGED
@@ -44,6 +44,7 @@ class Crowdsignal_Forms_Blocks {
44
  new Blocks\Crowdsignal_Forms_Vote_Block(),
45
  new Blocks\Crowdsignal_Forms_Vote_Item_Block(),
46
  new Blocks\Crowdsignal_Forms_Applause_Block(),
 
47
  );
48
 
49
  return self::$blocks;
44
  new Blocks\Crowdsignal_Forms_Vote_Block(),
45
  new Blocks\Crowdsignal_Forms_Vote_Item_Block(),
46
  new Blocks\Crowdsignal_Forms_Applause_Block(),
47
+ new Blocks\Crowdsignal_Forms_Nps_Block(),
48
  );
49
 
50
  return self::$blocks;
includes/gateways/class-api-gateway.php CHANGED
@@ -9,6 +9,7 @@
9
  namespace Crowdsignal_Forms\Gateways;
10
 
11
  use Crowdsignal_Forms\Crowdsignal_Forms;
 
12
  use Crowdsignal_Forms\Models\Poll;
13
 
14
  if ( ! defined( 'ABSPATH' ) ) {
@@ -161,6 +162,90 @@ class Api_Gateway implements Api_Gateway_Interface {
161
  return $this->handle_api_response( $response );
162
  }
163
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
164
  /**
165
  * Common method for either creating or updating a Poll.
166
  *
9
  namespace Crowdsignal_Forms\Gateways;
10
 
11
  use Crowdsignal_Forms\Crowdsignal_Forms;
12
+ use Crowdsignal_Forms\Models\Nps_Survey;
13
  use Crowdsignal_Forms\Models\Poll;
14
 
15
  if ( ! defined( 'ABSPATH' ) ) {
162
  return $this->handle_api_response( $response );
163
  }
164
 
165
+ /**
166
+ * Fires a call to the Crowdsignal API to update the survey.
167
+ *
168
+ * @since 1.4.0
169
+ *
170
+ * @param Nps_Survey $survey Survey.
171
+ * @return Nps_Survey|WP_Error
172
+ */
173
+ public function update_nps( Nps_Survey $survey ) {
174
+ $survey_array = $survey->to_array();
175
+
176
+ // Inject source attribute.
177
+ $survey_array['source'] = 'crowdsignal-forms';
178
+
179
+ $response = $this->perform_request(
180
+ 'POST',
181
+ $survey->get_id() ? '/nps/' . $survey->get_id() : '/nps',
182
+ $survey_array
183
+ );
184
+
185
+ if ( is_wp_error( $response ) ) {
186
+ $this->log_webservice_event(
187
+ 'response_error',
188
+ array(
189
+ 'error' => $response,
190
+ )
191
+ );
192
+
193
+ return $response;
194
+ }
195
+
196
+ $body = wp_remote_retrieve_body( $response );
197
+ $data = json_decode( $body, true );
198
+
199
+ $this->log_webservice_event(
200
+ 'response_success',
201
+ array(
202
+ 'data' => $data,
203
+ )
204
+ );
205
+
206
+ return Nps_Survey::from_array( $data );
207
+ }
208
+
209
+ /**
210
+ * Fires a proxy call to the Crowdsignal API NPS response endpoint
211
+ * passing $data as is and returns the response body as an array or
212
+ * a WP_Error.
213
+ *
214
+ * @param int $survey_id Survey ID.
215
+ * @param array $data Request data.
216
+ * @return array|WP_Error
217
+ */
218
+ public function update_nps_response( $survey_id, array $data ) {
219
+ $response = $this->perform_request(
220
+ 'POST',
221
+ '/nps/' . $survey_id . '/response',
222
+ $data
223
+ );
224
+
225
+ if ( is_wp_error( $response ) ) {
226
+ $this->log_webservice_event(
227
+ 'response_error',
228
+ array(
229
+ 'error' => $response,
230
+ )
231
+ );
232
+
233
+ return $response;
234
+ }
235
+
236
+ $body = wp_remote_retrieve_body( $response );
237
+ $data = json_decode( $body, true );
238
+
239
+ $this->log_webservice_event(
240
+ 'response_success',
241
+ array(
242
+ 'data' => $data,
243
+ )
244
+ );
245
+
246
+ return $data;
247
+ }
248
+
249
  /**
250
  * Common method for either creating or updating a Poll.
251
  *
includes/models/class-nps-survey.php ADDED
@@ -0,0 +1,161 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * File containing the model \Crowdsignal_Forms\Models\Nps_Survey.
4
+ *
5
+ * @package crowdsignal-forms/Models
6
+ * @since 1.4.0
7
+ */
8
+
9
+ namespace Crowdsignal_Forms\Models;
10
+
11
+ if ( ! defined( 'ABSPATH' ) ) {
12
+ exit;
13
+ }
14
+
15
+ /**
16
+ * Class Nps_Survey
17
+ */
18
+ class Nps_Survey {
19
+
20
+ /**
21
+ * Survey Id.
22
+ *
23
+ * @since 1.4.0
24
+ * @var int
25
+ */
26
+ private $id = 0;
27
+
28
+ /**
29
+ * Title.
30
+ *
31
+ * @since 1.4.0
32
+ * @var string
33
+ */
34
+ private $title = '';
35
+
36
+ /**
37
+ * Rating question.
38
+ *
39
+ * @since 1.4.0
40
+ * @var string
41
+ */
42
+ private $rating_question = '';
43
+
44
+ /**
45
+ * Feedback question.
46
+ *
47
+ * @since 1.4.0
48
+ * @var string
49
+ */
50
+ private $feedback_question = '';
51
+
52
+ /**
53
+ * Permalink URL where the NPS is published.
54
+ *
55
+ * @since 1.4.3
56
+ * @var string
57
+ */
58
+ private $source_link = '';
59
+
60
+ /**
61
+ * Creates a new Nps_Survey object from an array of params.
62
+ *
63
+ * @param array $data An array containing the survey data.
64
+ * @return Nps_Survey
65
+ */
66
+ public static function from_array( $data ) {
67
+ return new Nps_Survey(
68
+ $data['id'],
69
+ $data['title'],
70
+ $data['rating_text'],
71
+ $data['feedback_text'],
72
+ ! empty( $data['source_link'] ) ? $data['source_link'] : ''
73
+ );
74
+ }
75
+
76
+ /**
77
+ * Creates a new Nps_Survey object from an array of NPS block attributes.
78
+ *
79
+ * @param array $attributes An array containing the block attributes.
80
+ * @return Nps_Survey
81
+ */
82
+ public static function from_block_attributes( $attributes ) {
83
+ return new Nps_Survey(
84
+ $attributes['surveyId'],
85
+ $attributes['title'],
86
+ $attributes['ratingQuestion'],
87
+ $attributes['feedbackQuestion'],
88
+ ! empty( $attributes['sourceLink'] ) ? $attributes['sourceLink'] : ''
89
+ );
90
+ }
91
+
92
+
93
+ /**
94
+ * NPS Survey constructor.
95
+ *
96
+ * @since 1.4.0
97
+ *
98
+ * @param int $id Survey ID.
99
+ * @param string $title Survey title.
100
+ * @param string $rating_question Rating question.
101
+ * @param string $feedback_question Feedback question.
102
+ * @param string $source_link Blog post/page permalink.
103
+ */
104
+ public function __construct( $id, $title, $rating_question, $feedback_question, $source_link = '' ) {
105
+ $this->id = $id;
106
+ $this->title = $title;
107
+ $this->rating_question = $rating_question;
108
+ $this->feedback_question = $feedback_question;
109
+ $this->source_link = $source_link;
110
+ }
111
+
112
+ /**
113
+ * Returns the survey ID.
114
+ *
115
+ * @since 1.4.0
116
+ *
117
+ * @return int
118
+ */
119
+ public function get_id() {
120
+ return $this->id;
121
+ }
122
+
123
+ /**
124
+ * Transform the NPS survey to an array for the API.
125
+ *
126
+ * @since 1.4.0
127
+ *
128
+ * @return array
129
+ */
130
+ public function to_array() {
131
+ $data = array(
132
+ 'title' => $this->title,
133
+ 'rating_text' => $this->rating_question,
134
+ 'feedback_text' => $this->feedback_question,
135
+ 'source_link' => $this->source_link,
136
+ );
137
+
138
+ if ( $this->id ) {
139
+ $data['id'] = $this->id;
140
+ }
141
+
142
+ return $data;
143
+ }
144
+
145
+ /**
146
+ * Transforms the NPS Survey to an array matching NPS block attributes.
147
+ *
148
+ * @since 1.4.0
149
+ *
150
+ * @return array
151
+ */
152
+ public function to_block_attributes() {
153
+ return array(
154
+ 'surveyId' => $this->id,
155
+ 'title' => $this->title,
156
+ 'ratingQuestion' => $this->rating_question,
157
+ 'feedbackQuestion' => $this->feedback_question,
158
+ 'sourceLink' => $this->source_link,
159
+ );
160
+ }
161
+ }
includes/rest-api/controllers/class-nps-controller.php ADDED
@@ -0,0 +1,196 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Contains the NPS Controller Class
4
+ *
5
+ * @since 1.4.0
6
+ * @package Crowdsignal_Forms\Rest_Api
7
+ */
8
+
9
+ namespace Crowdsignal_Forms\Rest_Api\Controllers;
10
+
11
+ use Crowdsignal_Forms\Crowdsignal_Forms;
12
+ use Crowdsignal_Forms\Models\Nps_Survey;
13
+ use Crowdsignal_Forms\Frontend\Blocks\Crowdsignal_Forms_Nps_Block;
14
+
15
+ if ( ! defined( 'ABSPATH' ) ) {
16
+ die;
17
+ }
18
+
19
+ /**
20
+ * NPS Controller Class
21
+ *
22
+ * @since 1.4.0
23
+ */
24
+ class Nps_Controller {
25
+ /**
26
+ * The namespace
27
+ *
28
+ * @var string
29
+ */
30
+ protected $namespace = 'crowdsignal-forms/v1';
31
+
32
+ /**
33
+ * The rest api base.
34
+ *
35
+ * @var string
36
+ */
37
+ protected $rest_base = 'nps';
38
+
39
+ /**
40
+ * Register the routes for manipulating NPS blocks
41
+ *
42
+ * @since 1.4.0
43
+ */
44
+ public function register_routes() {
45
+ register_rest_route(
46
+ $this->namespace,
47
+ '/' . $this->rest_base,
48
+ array(
49
+ array(
50
+ 'methods' => \WP_REST_Server::CREATABLE,
51
+ 'callback' => array( $this, 'upsert_nps' ),
52
+ 'permission_callback' => array( $this, 'create_or_update_nps_permissions_check' ),
53
+ ),
54
+ )
55
+ );
56
+ register_rest_route(
57
+ $this->namespace,
58
+ '/' . $this->rest_base . '/(?P<survey_id>\d+)',
59
+ array(
60
+ array(
61
+ 'methods' => \WP_REST_Server::EDITABLE,
62
+ 'callback' => array( $this, 'upsert_nps' ),
63
+ 'permission_callback' => array( $this, 'create_or_update_nps_permissions_check' ),
64
+ 'args' => $this->get_nps_fetch_params(),
65
+ ),
66
+ )
67
+ );
68
+ register_rest_route(
69
+ $this->namespace,
70
+ '/' . $this->rest_base . '/(?P<survey_id>\d+)/response',
71
+ array(
72
+ array(
73
+ 'methods' => \WP_REST_Server::EDITABLE,
74
+ 'callback' => array( $this, 'upsert_nps_response' ),
75
+ 'permission_callback' => array( $this, 'create_or_update_nps_response_permissions_check' ),
76
+ 'args' => $this->get_nps_fetch_params(),
77
+ ),
78
+ )
79
+ );
80
+ }
81
+
82
+ /**
83
+ * Updates an NPS Survey. Creates one if no ID is given.
84
+ *
85
+ * @since 1.4.0
86
+ *
87
+ * @param \WP_REST_Request $request The API Request.
88
+ * @return \WP_REST_Response|WP_Error
89
+ */
90
+ public function upsert_nps( \WP_REST_Request $request ) {
91
+ $data = $request->get_json_params();
92
+ $survey = Nps_Survey::from_block_attributes( $data );
93
+
94
+ $result = Crowdsignal_Forms::instance()->get_api_gateway()->update_nps( $survey );
95
+
96
+ if ( is_wp_error( $result ) ) {
97
+ return $result;
98
+ }
99
+
100
+ return rest_ensure_response( $result->to_block_attributes() );
101
+ }
102
+
103
+ /**
104
+ * This route acts as a proxy for Crowdsignal's NPS response endpoint,
105
+ * which allows recording and updating responses.
106
+ *
107
+ * @since 1.4.0
108
+ *
109
+ * @todo The nonce helps but it's still possible for someone to generate their own nonce and
110
+ * submit someone else's response id.
111
+ * The nonce needs to be tied to the response ID.
112
+ *
113
+ * @param \WP_REST_Request $request The API Request.
114
+ * @return \WP_REST_Response|WP_ERROR
115
+ */
116
+ public function upsert_nps_response( \WP_REST_Request $request ) {
117
+ $data = $request->get_json_params();
118
+ $survey_id = $request->get_param( 'survey_id' );
119
+
120
+ $verifies = Crowdsignal_Forms_Nps_Block::verify_nonce( $data['nonce'] );
121
+
122
+ if (
123
+ ! $verifies ||
124
+ (
125
+ $data['r'] &&
126
+ $data['checksum'] !== $this->get_response_checksum( $data['r'], $data['nonce'] )
127
+ )
128
+ ) {
129
+ return new \WP_Error( 'Forbidden' );
130
+ }
131
+
132
+ $result = Crowdsignal_Forms::instance()->get_api_gateway()->update_nps_response(
133
+ $survey_id,
134
+ $data
135
+ );
136
+
137
+ if ( is_wp_error( $result ) ) {
138
+ return $result;
139
+ }
140
+
141
+ $result['checksum'] = $this->get_response_checksum( $result['r'], $data['nonce'] );
142
+
143
+ return rest_ensure_response( $result );
144
+ }
145
+
146
+ /**
147
+ * The permission check for creating a new poll.
148
+ *
149
+ * @since 1.4.0
150
+ *
151
+ * @return bool
152
+ */
153
+ public function create_or_update_nps_permissions_check() {
154
+ return current_user_can( 'publish_posts' );
155
+ }
156
+
157
+ /**
158
+ * The permission check for creating/updating nps responses.
159
+ *
160
+ * @since 1.4.0
161
+ *
162
+ * @return bool
163
+ */
164
+ public function create_or_update_nps_response_permissions_check() {
165
+ return true;
166
+ }
167
+
168
+ /**
169
+ * Returns a validator array for the NPS endpoints params.
170
+ *
171
+ * @since 1.4.0
172
+ * @see https://developer.wordpress.org/rest-api/extending-the-rest-api/adding-custom-endpoints/
173
+ *
174
+ * @return array
175
+ */
176
+ protected function get_nps_fetch_params() {
177
+ return array(
178
+ 'survey_id' => array(
179
+ 'validate_callback' => function ( $param, $request, $key ) {
180
+ return is_numeric( $param );
181
+ },
182
+ ),
183
+ );
184
+ }
185
+
186
+ /**
187
+ * Creates a checksum hash for a response ID and nonce combination.
188
+ *
189
+ * @param string $response_id Response ID.
190
+ * @param string $nonce Nonce.
191
+ * @return string
192
+ */
193
+ private function get_response_checksum( $response_id, $nonce ) {
194
+ return hash( 'sha1', $response_id . $nonce );
195
+ }
196
+ }
languages/crowdsignal-forms.pot CHANGED
@@ -1,15 +1,15 @@
1
- # Copyright (C) 2020 Automattic
2
  # This file is distributed under the GPL-2.0+.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Crowdsignal Forms 1.3.5\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/crowdsignal-forms\n"
7
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
  "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "POT-Creation-Date: 2020-12-28T21:46:24+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.5.0-alpha-59d879d\n"
15
  "X-Domain: crowdsignal-forms\n"
@@ -43,12 +43,13 @@ msgid "You don&#8217;t have permission to do this."
43
  msgstr ""
44
 
45
  #: includes/admin/class-crowdsignal-forms-admin.php:70
46
- #: includes/class-crowdsignal-forms.php:419
47
  msgid "Crowdsignal"
48
  msgstr ""
49
 
50
  #: includes/admin/class-crowdsignal-forms-admin.php:71
51
  #: includes/admin/class-crowdsignal-forms-admin.php:86
 
52
  msgid "Settings"
53
  msgstr ""
54
 
@@ -181,7 +182,34 @@ msgstr ""
181
  msgid "<a href=\"%1s\" target=\"_blank\">Read more about us here.</a>"
182
  msgstr ""
183
 
184
- #: includes/frontend/blocks/class-crowdsignal-forms-poll-block.php:153
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
185
  #: client/blocks/poll/attributes.js:62
186
  msgid "Submit"
187
  msgstr ""
@@ -257,6 +285,7 @@ msgid "clap"
257
  msgstr ""
258
 
259
  #: client/blocks/applause/index.js:26
 
260
  #: client/blocks/poll/index.js:24
261
  #: client/blocks/vote/index.js:31
262
  msgid "feedback"
@@ -272,6 +301,7 @@ msgid "like"
272
  msgstr ""
273
 
274
  #: client/blocks/applause/index.js:29
 
275
  #: client/blocks/poll/index.js:26
276
  #: client/blocks/vote/index.js:35
277
  msgid "opinion"
@@ -282,6 +312,7 @@ msgid "praise"
282
  msgstr ""
283
 
284
  #: client/blocks/applause/index.js:31
 
285
  #: client/blocks/vote/index.js:39
286
  msgid "rating"
287
  msgstr ""
@@ -304,12 +335,14 @@ msgid "voting"
304
  msgstr ""
305
 
306
  #: client/blocks/applause/sidebar.js:72
 
307
  #: client/blocks/poll/sidebar.js:160
308
  #: client/blocks/vote/sidebar.js:63
309
  msgid "Results"
310
  msgstr ""
311
 
312
  #: client/blocks/applause/sidebar.js:77
 
313
  #: client/blocks/poll/sidebar.js:165
314
  #: client/blocks/vote/sidebar.js:68
315
  msgid "Manage results on "
@@ -322,6 +355,7 @@ msgid "Publish this post to enable results on "
322
  msgstr ""
323
 
324
  #: client/blocks/applause/sidebar.js:99
 
325
  #: client/blocks/poll/sidebar.js:187
326
  #: client/blocks/vote/sidebar.js:90
327
  msgid "View results"
@@ -332,6 +366,7 @@ msgid "Title of the applause block"
332
  msgstr ""
333
 
334
  #: client/blocks/applause/sidebar.js:115
 
335
  #: client/blocks/vote/sidebar.js:106
336
  msgid "Status"
337
  msgstr ""
@@ -343,18 +378,21 @@ msgid "Currently"
343
  msgstr ""
344
 
345
  #: client/blocks/applause/sidebar.js:121
 
346
  #: client/blocks/poll/sidebar.js:275
347
  #: client/blocks/vote/sidebar.js:112
348
  msgid "Open"
349
  msgstr ""
350
 
351
  #: client/blocks/applause/sidebar.js:125
 
352
  #: client/blocks/poll/sidebar.js:279
353
  #: client/blocks/vote/sidebar.js:116
354
  msgid "Closed after"
355
  msgstr ""
356
 
357
  #: client/blocks/applause/sidebar.js:129
 
358
  #: client/blocks/poll/sidebar.js:283
359
  #: client/blocks/vote/sidebar.js:120
360
  msgid "Closed"
@@ -370,6 +408,7 @@ msgid "Styling"
370
  msgstr ""
371
 
372
  #: client/blocks/applause/sidebar.js:154
 
373
  #: client/blocks/poll/sidebar.js:337
374
  #: client/blocks/poll/sidebar.js:521
375
  #: client/blocks/vote-item/sidebar.js:30
@@ -377,6 +416,7 @@ msgid "Text color"
377
  msgstr ""
378
 
379
  #: client/blocks/applause/sidebar.js:159
 
380
  #: client/blocks/poll/sidebar.js:342
381
  #: client/blocks/poll/sidebar.js:526
382
  #: client/blocks/vote-item/sidebar.js:35
@@ -406,6 +446,183 @@ msgstr ""
406
  msgid "Corner radius"
407
  msgstr ""
408
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
409
  #: client/blocks/poll/edit-answer.js:53
410
  #: client/blocks/poll/edit-answer.js:71
411
  #: client/blocks/poll/edit-answer.js:83
@@ -421,17 +638,17 @@ msgstr ""
421
  msgid "Edit"
422
  msgstr ""
423
 
424
- #: client/blocks/poll/edit.js:162
425
  msgid "Crowdsignal Poll"
426
  msgstr ""
427
 
428
- #: client/blocks/poll/edit.js:210
429
- #: client/blocks/poll/edit.js:222
430
  msgid "Enter your question"
431
  msgstr ""
432
 
433
- #: client/blocks/poll/edit.js:234
434
- #: client/blocks/poll/edit.js:246
435
  msgid "Add a note (optional)"
436
  msgstr ""
437
 
@@ -443,20 +660,6 @@ msgstr ""
443
  msgid "Create polls and get your audience’s opinion — powered by Crowdsignal."
444
  msgstr ""
445
 
446
- #: client/blocks/poll/index.js:22
447
- msgid "ask"
448
- msgstr ""
449
-
450
- #: client/blocks/poll/index.js:25
451
- #: client/blocks/vote/index.js:32
452
- msgid "form"
453
- msgstr ""
454
-
455
- #: client/blocks/poll/index.js:27
456
- #: client/blocks/vote/index.js:36
457
- msgid "poll"
458
- msgstr ""
459
-
460
  #: client/blocks/poll/index.js:28
461
  msgid "pop"
462
  msgstr ""
@@ -469,16 +672,6 @@ msgstr ""
469
  msgid "quiz"
470
  msgstr ""
471
 
472
- #: client/blocks/poll/index.js:31
473
- #: client/blocks/vote/index.js:40
474
- msgid "research"
475
- msgstr ""
476
-
477
- #: client/blocks/poll/index.js:32
478
- #: client/blocks/vote/index.js:41
479
- msgid "survey"
480
- msgstr ""
481
-
482
  #: client/blocks/poll/index.js:33
483
  #: client/blocks/vote/index.js:45
484
  msgid "vote"
@@ -562,10 +755,6 @@ msgstr ""
562
  msgid "Hide poll"
563
  msgstr ""
564
 
565
- #: client/blocks/poll/sidebar.js:331
566
- msgid "Block styling"
567
- msgstr ""
568
-
569
  #: client/blocks/poll/sidebar.js:359
570
  msgid "Choose font"
571
  msgstr ""
@@ -622,7 +811,7 @@ msgstr ""
622
  msgid "Choose multiple answers"
623
  msgstr ""
624
 
625
- #: client/blocks/poll/util.js:201
626
  msgid "Buttons"
627
  msgstr ""
628
 
@@ -735,6 +924,18 @@ msgstr ""
735
  msgid "Verify or Change your Email Address"
736
  msgstr ""
737
 
 
 
 
 
 
 
 
 
 
 
 
 
738
  #. translators: %s: Number of votes.
739
  #: client/components/poll/answer-results.js:39
740
  msgid "%s vote"
@@ -754,15 +955,7 @@ msgstr ""
754
  msgid "Thanks For Voting!"
755
  msgstr ""
756
 
757
- #: client/components/poll/footer-branding.js:33
758
- msgid "Create your own poll with Crowdsignal"
759
- msgstr ""
760
-
761
- #: client/components/poll/footer-branding.js:46
762
- msgid "Hide"
763
- msgstr ""
764
-
765
- #: client/components/poll/index.js:71
766
  #: client/data/poll/index.js:90
767
  msgid "Server error. Please try again."
768
  msgstr ""
@@ -794,14 +987,14 @@ msgstr ""
794
  msgid "unlimited signals"
795
  msgstr ""
796
 
797
- #: client/components/signal-warning/index.js:19
798
  msgid "Your free Crowdsignal account has exceeded "
799
  msgstr ""
800
 
801
- #: client/components/signal-warning/index.js:24
802
  msgid "the limit of 2500 signals."
803
  msgstr ""
804
 
805
- #: client/components/signal-warning/index.js:29
806
  msgid "Please upgrade."
807
  msgstr ""
1
+ # Copyright (C) 2021 Automattic
2
  # This file is distributed under the GPL-2.0+.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Crowdsignal Forms 1.4.3\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/crowdsignal-forms\n"
7
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
  "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "POT-Creation-Date: 2021-02-26T19:31:22+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.5.0-alpha-59d879d\n"
15
  "X-Domain: crowdsignal-forms\n"
43
  msgstr ""
44
 
45
  #: includes/admin/class-crowdsignal-forms-admin.php:70
46
+ #: includes/class-crowdsignal-forms.php:429
47
  msgid "Crowdsignal"
48
  msgstr ""
49
 
50
  #: includes/admin/class-crowdsignal-forms-admin.php:71
51
  #: includes/admin/class-crowdsignal-forms-admin.php:86
52
+ #: client/blocks/nps/sidebar.js:121
53
  msgid "Settings"
54
  msgstr ""
55
 
182
  msgid "<a href=\"%1s\" target=\"_blank\">Read more about us here.</a>"
183
  msgstr ""
184
 
185
+ #: includes/frontend/blocks/class-crowdsignal-forms-nps-block.php:121
186
+ #: client/blocks/nps/attributes.js:28
187
+ msgid "Please help us understand your rating"
188
+ msgstr ""
189
+
190
+ #: includes/frontend/blocks/class-crowdsignal-forms-nps-block.php:128
191
+ #: client/blocks/nps/attributes.js:35
192
+ msgid "Thanks so much for your response! How could we do better?"
193
+ msgstr ""
194
+
195
+ #: includes/frontend/blocks/class-crowdsignal-forms-nps-block.php:139
196
+ #: client/blocks/nps/attributes.js:46
197
+ msgid "Extremely likely"
198
+ msgstr ""
199
+
200
+ #: includes/frontend/blocks/class-crowdsignal-forms-nps-block.php:143
201
+ #: client/blocks/nps/attributes.js:50
202
+ msgid "Not likely at all"
203
+ msgstr ""
204
+
205
+ #: includes/frontend/blocks/class-crowdsignal-forms-nps-block.php:147
206
+ #: client/blocks/nps/attributes.js:54
207
+ msgid "How likely is it that you would recommend this project to a friend or colleague?"
208
+ msgstr ""
209
+
210
+ #: includes/frontend/blocks/class-crowdsignal-forms-nps-block.php:154
211
+ #: includes/frontend/blocks/class-crowdsignal-forms-poll-block.php:155
212
+ #: client/blocks/nps/attributes.js:61
213
  #: client/blocks/poll/attributes.js:62
214
  msgid "Submit"
215
  msgstr ""
285
  msgstr ""
286
 
287
  #: client/blocks/applause/index.js:26
288
+ #: client/blocks/nps/index.js:32
289
  #: client/blocks/poll/index.js:24
290
  #: client/blocks/vote/index.js:31
291
  msgid "feedback"
301
  msgstr ""
302
 
303
  #: client/blocks/applause/index.js:29
304
+ #: client/blocks/nps/index.js:37
305
  #: client/blocks/poll/index.js:26
306
  #: client/blocks/vote/index.js:35
307
  msgid "opinion"
312
  msgstr ""
313
 
314
  #: client/blocks/applause/index.js:31
315
+ #: client/blocks/nps/index.js:41
316
  #: client/blocks/vote/index.js:39
317
  msgid "rating"
318
  msgstr ""
335
  msgstr ""
336
 
337
  #: client/blocks/applause/sidebar.js:72
338
+ #: client/blocks/nps/sidebar.js:52
339
  #: client/blocks/poll/sidebar.js:160
340
  #: client/blocks/vote/sidebar.js:63
341
  msgid "Results"
342
  msgstr ""
343
 
344
  #: client/blocks/applause/sidebar.js:77
345
+ #: client/blocks/nps/sidebar.js:57
346
  #: client/blocks/poll/sidebar.js:165
347
  #: client/blocks/vote/sidebar.js:68
348
  msgid "Manage results on "
355
  msgstr ""
356
 
357
  #: client/blocks/applause/sidebar.js:99
358
+ #: client/blocks/nps/sidebar.js:79
359
  #: client/blocks/poll/sidebar.js:187
360
  #: client/blocks/vote/sidebar.js:90
361
  msgid "View results"
366
  msgstr ""
367
 
368
  #: client/blocks/applause/sidebar.js:115
369
+ #: client/blocks/nps/sidebar.js:126
370
  #: client/blocks/vote/sidebar.js:106
371
  msgid "Status"
372
  msgstr ""
378
  msgstr ""
379
 
380
  #: client/blocks/applause/sidebar.js:121
381
+ #: client/blocks/nps/sidebar.js:129
382
  #: client/blocks/poll/sidebar.js:275
383
  #: client/blocks/vote/sidebar.js:112
384
  msgid "Open"
385
  msgstr ""
386
 
387
  #: client/blocks/applause/sidebar.js:125
388
+ #: client/blocks/nps/sidebar.js:133
389
  #: client/blocks/poll/sidebar.js:279
390
  #: client/blocks/vote/sidebar.js:116
391
  msgid "Closed after"
392
  msgstr ""
393
 
394
  #: client/blocks/applause/sidebar.js:129
395
+ #: client/blocks/nps/sidebar.js:137
396
  #: client/blocks/poll/sidebar.js:283
397
  #: client/blocks/vote/sidebar.js:120
398
  msgid "Closed"
408
  msgstr ""
409
 
410
  #: client/blocks/applause/sidebar.js:154
411
+ #: client/blocks/nps/sidebar.js:104
412
  #: client/blocks/poll/sidebar.js:337
413
  #: client/blocks/poll/sidebar.js:521
414
  #: client/blocks/vote-item/sidebar.js:30
416
  msgstr ""
417
 
418
  #: client/blocks/applause/sidebar.js:159
419
+ #: client/blocks/nps/sidebar.js:99
420
  #: client/blocks/poll/sidebar.js:342
421
  #: client/blocks/poll/sidebar.js:526
422
  #: client/blocks/vote-item/sidebar.js:35
446
  msgid "Corner radius"
447
  msgstr ""
448
 
449
+ #: client/blocks/nps/edit.js:129
450
+ msgid "Crowdsignal NPS"
451
+ msgstr ""
452
+
453
+ #: client/blocks/nps/edit.js:150
454
+ msgid "Retry"
455
+ msgstr ""
456
+
457
+ #: client/blocks/nps/edit.js:170
458
+ msgid "Preview"
459
+ msgstr ""
460
+
461
+ #. translators: %d: number of pageviews
462
+ #: client/blocks/nps/edit.js:186
463
+ msgid "This block will appear as a popup window to people who have visited this page at least %d time."
464
+ msgid_plural "This block will appear as a popup window to people who have visited this page at least %d times."
465
+ msgstr[0] ""
466
+ msgstr[1] ""
467
+
468
+ #: client/blocks/nps/edit.js:205
469
+ msgid "Enter your rating question"
470
+ msgstr ""
471
+
472
+ #: client/blocks/nps/edit.js:218
473
+ msgid "Not likely"
474
+ msgstr ""
475
+
476
+ #: client/blocks/nps/edit.js:230
477
+ msgid "Very likely"
478
+ msgstr ""
479
+
480
+ #: client/blocks/nps/edit.js:256
481
+ #: client/blocks/nps/edit.js:309
482
+ #: client/components/nps/index.js:91
483
+ msgid "Collect your own feedback with Crowdsignal"
484
+ msgstr ""
485
+
486
+ #: client/blocks/nps/edit.js:275
487
+ msgid "Enter your feedback question"
488
+ msgstr ""
489
+
490
+ #: client/blocks/nps/index.js:14
491
+ msgid "Measure NPS"
492
+ msgstr ""
493
+
494
+ #: client/blocks/nps/index.js:15
495
+ msgid "Calculate your Net Promoter Score! Collect feedback and track customer satisfaction over time. — powered by Crowdsignal."
496
+ msgstr ""
497
+
498
+ #: client/blocks/nps/index.js:27
499
+ #: client/blocks/poll/index.js:22
500
+ msgid "ask"
501
+ msgstr ""
502
+
503
+ #: client/blocks/nps/index.js:29
504
+ msgid "CSAT"
505
+ msgstr ""
506
+
507
+ #: client/blocks/nps/index.js:30
508
+ msgid "customer experience"
509
+ msgstr ""
510
+
511
+ #: client/blocks/nps/index.js:31
512
+ msgid "customer satisfaction"
513
+ msgstr ""
514
+
515
+ #: client/blocks/nps/index.js:33
516
+ #: client/blocks/poll/index.js:25
517
+ #: client/blocks/vote/index.js:32
518
+ msgid "form"
519
+ msgstr ""
520
+
521
+ #: client/blocks/nps/index.js:34
522
+ msgid "loyalty"
523
+ msgstr ""
524
+
525
+ #: client/blocks/nps/index.js:35
526
+ msgid "net promoter score"
527
+ msgstr ""
528
+
529
+ #: client/blocks/nps/index.js:36
530
+ msgid "nps"
531
+ msgstr ""
532
+
533
+ #: client/blocks/nps/index.js:38
534
+ #: client/blocks/poll/index.js:27
535
+ #: client/blocks/vote/index.js:36
536
+ msgid "poll"
537
+ msgstr ""
538
+
539
+ #: client/blocks/nps/index.js:39
540
+ msgid "promoter"
541
+ msgstr ""
542
+
543
+ #: client/blocks/nps/index.js:40
544
+ #: client/blocks/poll/index.js:31
545
+ #: client/blocks/vote/index.js:40
546
+ msgid "research"
547
+ msgstr ""
548
+
549
+ #: client/blocks/nps/index.js:42
550
+ msgid "review"
551
+ msgstr ""
552
+
553
+ #: client/blocks/nps/index.js:43
554
+ msgid "score"
555
+ msgstr ""
556
+
557
+ #: client/blocks/nps/index.js:44
558
+ #: client/blocks/poll/index.js:32
559
+ #: client/blocks/vote/index.js:41
560
+ msgid "survey"
561
+ msgstr ""
562
+
563
+ #: client/blocks/nps/index.js:49
564
+ msgid "How satisfied are you with the content of the site?"
565
+ msgstr ""
566
+
567
+ #: client/blocks/nps/index.js:53
568
+ msgid "Any advise on how we could improve your experience?"
569
+ msgstr ""
570
+
571
+ #: client/blocks/nps/index.js:57
572
+ msgid "Not satisfied"
573
+ msgstr ""
574
+
575
+ #: client/blocks/nps/index.js:58
576
+ msgid "Very satisfied"
577
+ msgstr ""
578
+
579
+ #: client/blocks/nps/sidebar.js:58
580
+ msgid "Save the block to track results on "
581
+ msgstr ""
582
+
583
+ #: client/blocks/nps/sidebar.js:84
584
+ msgid "Title (optional)"
585
+ msgstr ""
586
+
587
+ #: client/blocks/nps/sidebar.js:95
588
+ #: client/blocks/poll/sidebar.js:331
589
+ msgid "Block styling"
590
+ msgstr ""
591
+
592
+ #: client/blocks/nps/sidebar.js:109
593
+ msgid "Button color"
594
+ msgstr ""
595
+
596
+ #: client/blocks/nps/sidebar.js:114
597
+ msgid "Button text color"
598
+ msgstr ""
599
+
600
+ #: client/blocks/nps/sidebar.js:159
601
+ msgid "Close on"
602
+ msgstr ""
603
+
604
+ #: client/blocks/nps/toolbar.js:43
605
+ msgid "Current view"
606
+ msgstr ""
607
+
608
+ #: client/blocks/nps/toolbar.js:47
609
+ #: client/blocks/nps/toolbar.js:50
610
+ msgid "Rating"
611
+ msgstr ""
612
+
613
+ #: client/blocks/nps/toolbar.js:55
614
+ #: client/blocks/nps/toolbar.js:58
615
+ msgid "Feedback"
616
+ msgstr ""
617
+
618
+ #: client/blocks/nps/toolbar.js:65
619
+ msgid "Set view threshold"
620
+ msgstr ""
621
+
622
+ #: client/blocks/nps/toolbar.js:72
623
+ msgid "Show this block after n visits:"
624
+ msgstr ""
625
+
626
  #: client/blocks/poll/edit-answer.js:53
627
  #: client/blocks/poll/edit-answer.js:71
628
  #: client/blocks/poll/edit-answer.js:83
638
  msgid "Edit"
639
  msgstr ""
640
 
641
+ #: client/blocks/poll/edit.js:161
642
  msgid "Crowdsignal Poll"
643
  msgstr ""
644
 
645
+ #: client/blocks/poll/edit.js:209
646
+ #: client/blocks/poll/edit.js:221
647
  msgid "Enter your question"
648
  msgstr ""
649
 
650
+ #: client/blocks/poll/edit.js:233
651
+ #: client/blocks/poll/edit.js:245
652
  msgid "Add a note (optional)"
653
  msgstr ""
654
 
660
  msgid "Create polls and get your audience’s opinion — powered by Crowdsignal."
661
  msgstr ""
662
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
663
  #: client/blocks/poll/index.js:28
664
  msgid "pop"
665
  msgstr ""
672
  msgid "quiz"
673
  msgstr ""
674
 
 
 
 
 
 
 
 
 
 
 
675
  #: client/blocks/poll/index.js:33
676
  #: client/blocks/vote/index.js:45
677
  msgid "vote"
755
  msgid "Hide poll"
756
  msgstr ""
757
 
 
 
 
 
758
  #: client/blocks/poll/sidebar.js:359
759
  msgid "Choose font"
760
  msgstr ""
811
  msgid "Choose multiple answers"
812
  msgstr ""
813
 
814
+ #: client/blocks/poll/util.js:203
815
  msgid "Buttons"
816
  msgstr ""
817
 
924
  msgid "Verify or Change your Email Address"
925
  msgstr ""
926
 
927
+ #: client/components/footer-branding/index.js:33
928
+ msgid "Create your own poll with Crowdsignal"
929
+ msgstr ""
930
+
931
+ #: client/components/footer-branding/index.js:47
932
+ msgid "Hide"
933
+ msgstr ""
934
+
935
+ #: client/components/nps/index.js:44
936
+ msgid "Thanks so much for your feedback!"
937
+ msgstr ""
938
+
939
  #. translators: %s: Number of votes.
940
  #: client/components/poll/answer-results.js:39
941
  msgid "%s vote"
955
  msgid "Thanks For Voting!"
956
  msgstr ""
957
 
958
+ #: client/components/poll/index.js:70
 
 
 
 
 
 
 
 
959
  #: client/data/poll/index.js:90
960
  msgid "Server error. Please try again."
961
  msgstr ""
987
  msgid "unlimited signals"
988
  msgstr ""
989
 
990
+ #: client/components/signal-warning/index.js:20
991
  msgid "Your free Crowdsignal account has exceeded "
992
  msgstr ""
993
 
994
+ #: client/components/signal-warning/index.js:25
995
  msgid "the limit of 2500 signals."
996
  msgstr ""
997
 
998
+ #: client/components/signal-warning/index.js:30
999
  msgid "Please upgrade."
1000
  msgstr ""