Poll, Survey, Quiz, Slideshow, Form, Story & Landing Page - Version 19.7.6

Version Description

  • UI update
    • internal code improvements
Download this release

Release Info

Developer artemopinionstage
Plugin Icon 128x128 Poll, Survey, Quiz, Slideshow, Form, Story & Landing Page
Version 19.7.6
Comparing to
See all releases

Code changes from version 19.7.5 to 19.7.6

admin/content-popup-template.html.php CHANGED
@@ -1,5 +1,10 @@
1
  <?php
2
- // block direct access to plugin PHP files:
 
 
 
 
 
3
  defined( 'ABSPATH' ) || die();
4
 
5
  require_once plugin_dir_path( __FILE__ ) . '../includes/opinionstage-client-session.php';
@@ -95,7 +100,17 @@ $opinionstage_user_logged_in = opinionstage_user_logged_in();
95
  <span class="os-search__icon icon-os-common-tip"></span>
96
  </div>
97
  <div class="content-actions__sep"></div>
98
- <a href="<?php echo esc_url( admin_url( 'admin.php?page=' . OPINIONSTAGE_MENU_SLUG ) ); ?>" target='_blank' class="btn-create"><?php esc_html_e( 'CREATE', 'social-polls-by-opinionstage' ); ?></a>
 
 
 
 
 
 
 
 
 
 
99
  </div>
100
  </div>
101
  <div class='content__list'>
@@ -157,7 +172,7 @@ $opinionstage_user_logged_in = opinionstage_user_logged_in();
157
  </div>
158
  <div class='page-content' v-else>
159
  <h1 class='main-title'>
160
- <b><?php esc_html_e( 'all items', 'social-polls-by-opinionstage' ); ?></b>
161
  </h1>
162
  <a id="os-start-login" data-os-login="" href="<?php echo esc_url( admin_url( 'admin.php?page=opinionstage-getting-started' ) ); ?>" class="opinionstage-blue-btn"><?php esc_html_e( 'CONNECT', 'social-polls-by-opinionstage' ); ?></a>
163
  </div>
1
  <?php
2
+ /**
3
+ * Content Popup Template
4
+ *
5
+ * @package OpinionStageWordPressPlugin
6
+ */
7
+
8
  defined( 'ABSPATH' ) || die();
9
 
10
  require_once plugin_dir_path( __FILE__ ) . '../includes/opinionstage-client-session.php';
100
  <span class="os-search__icon icon-os-common-tip"></span>
101
  </div>
102
  <div class="content-actions__sep"></div>
103
+
104
+ <div class="dropdown dropdown_items">
105
+ <button class="dropbtn"><span><?php esc_html_e( 'Create', 'social-polls-by-opinionstage' ); ?></span></button>
106
+ <div class="dropdown-content opinionstage-anchors-list">
107
+ <div class='filter__itm'><?php echo opinionstage_create_poll_link( '', __( 'POLL', 'social-polls-by-opinionstage' ) ); ?></div>
108
+ <div class='filter__itm'><?php echo opinionstage_create_survey_link( '', __( 'SURVEY', 'social-polls-by-opinionstage' ) ); ?></div>
109
+ <div class='filter__itm'><?php echo opinionstage_create_trivia_link( '', __( 'TRIVIA QUIZ', 'social-polls-by-opinionstage' ) ); ?></div>
110
+ <div class='filter__itm'><?php echo opinionstage_create_personality_link( '', __( 'PERSONALITY QUIZ', 'social-polls-by-opinionstage' ) ); ?></div>
111
+ <div class='filter__itm'><?php echo opinionstage_create_form_link( '', __( 'CLASSIC FORM', 'social-polls-by-opinionstage' ) ); ?></div>
112
+ </div>
113
+ </div>
114
  </div>
115
  </div>
116
  <div class='content__list'>
172
  </div>
173
  <div class='page-content' v-else>
174
  <h1 class='main-title'>
175
+ <b><?php esc_html_e( 'Connect WordPress with Opinion Stage to get started', 'social-polls-by-opinionstage' ); ?></b>
176
  </h1>
177
  <a id="os-start-login" data-os-login="" href="<?php echo esc_url( admin_url( 'admin.php?page=opinionstage-getting-started' ) ); ?>" class="opinionstage-blue-btn"><?php esc_html_e( 'CONNECT', 'social-polls-by-opinionstage' ); ?></a>
178
  </div>
admin/css/menu-page.css CHANGED
@@ -146,7 +146,7 @@
146
  overflow: hidden;
147
  }
148
  #opinionstage-content .opinionstage-dashboard-left .opinionstage-section-header .opinionstage-section-title {
149
- float: left;
150
  font-size: 30px;
151
  padding: 0;
152
  }
@@ -205,7 +205,7 @@
205
  padding: 0 10px;
206
  }
207
  #opinionstage-content .opinionstage-dashboard-section .opinionstage-section-content .opinionstage-section-raw {
208
- border: 1px solid #c8c8c9;
209
  display: table-row;
210
  }
211
  #opinionstage-content .opinionstage-dashboard-section .opinionstage-section-content-wrapper .opinionstage-section-content .opinionstage-section-raw {
@@ -228,10 +228,10 @@
228
  width: 7%;
229
  }
230
  #opinionstage-section-create .opinionstage-section-cell.opinionstage-description-cell {
231
- width: 50%;
232
  }
233
  #opinionstage-section-create .opinionstage-section-cell.opinionstage-btn-cell {
234
- width: 24%;
235
  }
236
  #opinionstage-section-create .opinionstage-section-cell.opinionstage-description-cell .title, #opinionstage-section-placements .opinionstage-section-cell.opinionstage-description-cell .title {
237
  font-size: 22px;
@@ -367,7 +367,7 @@
367
  /* Getting started */
368
  .gettingStartedSection {
369
  background: #fff;
370
- margin-right: 20px;
371
  min-height: 500px;
372
  overflow: hidden;
373
  padding: 30px;
@@ -583,7 +583,28 @@ tr.settingBorderOs {
583
  .opinionstage-section-header {
584
  font-size: 23px;
585
  height: 40px;
586
- overflow: hidden;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
587
  }
588
  div#container .opinionstage-section-header {
589
  width: 100%;
@@ -608,7 +629,7 @@ div#container .opinionstage-section-header {
608
  }
609
 
610
  /* Load More */
611
- div#loadMore {
612
  cursor:pointer;
613
  -webkit-box-sizing: border-box;
614
  box-sizing: border-box;
@@ -644,7 +665,7 @@ div#loadMore {
644
  margin-bottom: 20px;
645
  margin-left: 20px;
646
  }
647
- div#loadMore:hover {
648
  text-decoration: none;
649
  opacity: 0.8;
650
  }
@@ -710,14 +731,14 @@ td.image {
710
  .search-container {
711
  background-color: transparent;
712
  display: inline-block;
713
- width: 150px;
714
  }
715
  .search.search-container:before {
716
  right: 30px;
717
  }
718
  .opinionstage-section-header #itemList {
719
  font-size: 12px;
720
- font-weight: bold;
721
  height: auto;
722
  padding: 10px;
723
  width: 100%;
@@ -744,7 +765,7 @@ td.image {
744
  font-weight: bold;
745
  padding: 13px 17px !important;
746
  }
747
- div#loadMore {
748
  background-color: #f1f1f1;
749
  border-color: #f1f1f1;
750
  color: #444;
@@ -855,7 +876,7 @@ div#loadMore {
855
  top: 0;
856
  }
857
  #opinionstage-content .opinionstage-item-view-dashboard .opinionstage-dashboard-section{
858
- margin-bottom: 5px;
859
  }
860
  .help-center-os{
861
  border: 2px solid #32adbc;
@@ -888,7 +909,7 @@ a.help-center-os.help-link:focus {
888
  display: block !important;
889
  }
890
  .opinionstage-dashboard-section .opinionstage-btn-cell .os_create_new_btn {
891
- margin-bottom: 10px;
892
  margin-right: 0;
893
  }
894
  .opinionstage-item-view-dashboard, .opinionstage-placement-dashboard {
@@ -898,7 +919,7 @@ a.help-center-os.help-link:focus {
898
  padding: 25px 0;
899
  }
900
  #opinionstage-content .opinionstage-dashboard {
901
- overflow-y: scroll;
902
  }
903
  .opinionstage-item-action-container {
904
  float: none;
@@ -929,11 +950,22 @@ a.help-center-os.help-link:focus {
929
  top: 36px;
930
  }
931
  #opinionstage-content .opinionstage-dashboard-section .opinionstage-section-header .opinionstage-header-inner-container .opinionstage-item-create {
932
- margin-bottom: 20px;
933
- margin-top: 20px;
934
  }
 
 
 
 
 
 
935
  }
936
 
 
 
 
 
 
937
  @media only screen and (max-width: 768px) {
938
  .gettingStartedSection {
939
  width: auto;
146
  overflow: hidden;
147
  }
148
  #opinionstage-content .opinionstage-dashboard-left .opinionstage-section-header .opinionstage-section-title {
149
+ float: left;
150
  font-size: 30px;
151
  padding: 0;
152
  }
205
  padding: 0 10px;
206
  }
207
  #opinionstage-content .opinionstage-dashboard-section .opinionstage-section-content .opinionstage-section-raw {
208
+ border: 1px solid #c8c8c9;
209
  display: table-row;
210
  }
211
  #opinionstage-content .opinionstage-dashboard-section .opinionstage-section-content-wrapper .opinionstage-section-content .opinionstage-section-raw {
228
  width: 7%;
229
  }
230
  #opinionstage-section-create .opinionstage-section-cell.opinionstage-description-cell {
231
+ width: 83%;
232
  }
233
  #opinionstage-section-create .opinionstage-section-cell.opinionstage-btn-cell {
234
+ width: 10%;
235
  }
236
  #opinionstage-section-create .opinionstage-section-cell.opinionstage-description-cell .title, #opinionstage-section-placements .opinionstage-section-cell.opinionstage-description-cell .title {
237
  font-size: 22px;
367
  /* Getting started */
368
  .gettingStartedSection {
369
  background: #fff;
370
+ margin-right: 20px;
371
  min-height: 500px;
372
  overflow: hidden;
373
  padding: 30px;
583
  .opinionstage-section-header {
584
  font-size: 23px;
585
  height: 40px;
586
+ overflow: visible;
587
+ }
588
+ .opinionstage-anchors-list {
589
+ position: absolute;
590
+ z-index: 10;
591
+ top: 100%;
592
+ left: 0;
593
+ width: 100%;
594
+ background: white;
595
+ border: 1px solid #e5e5e5;
596
+ opacity: 0;
597
+ visibility: hidden;
598
+ transition: all .5s ease;
599
+ margin-top: 17px;
600
+ margin-bottom: 0;
601
+ }
602
+ .opinionstage-anchors-list.opened {
603
+ opacity: 1;
604
+ visibility: visible;
605
+ }
606
+ .opinionstage-anchors-list a {
607
+ width: 100%;
608
  }
609
  div#container .opinionstage-section-header {
610
  width: 100%;
629
  }
630
 
631
  /* Load More */
632
+ div#opinionstage-load-more {
633
  cursor:pointer;
634
  -webkit-box-sizing: border-box;
635
  box-sizing: border-box;
665
  margin-bottom: 20px;
666
  margin-left: 20px;
667
  }
668
+ div#opinionstage-load-more:hover {
669
  text-decoration: none;
670
  opacity: 0.8;
671
  }
731
  .search-container {
732
  background-color: transparent;
733
  display: inline-block;
734
+ width: 150px;
735
  }
736
  .search.search-container:before {
737
  right: 30px;
738
  }
739
  .opinionstage-section-header #itemList {
740
  font-size: 12px;
741
+ font-weight: bold;
742
  height: auto;
743
  padding: 10px;
744
  width: 100%;
765
  font-weight: bold;
766
  padding: 13px 17px !important;
767
  }
768
+ div#opinionstage-load-more {
769
  background-color: #f1f1f1;
770
  border-color: #f1f1f1;
771
  color: #444;
876
  top: 0;
877
  }
878
  #opinionstage-content .opinionstage-item-view-dashboard .opinionstage-dashboard-section{
879
+ margin-bottom: 5px;
880
  }
881
  .help-center-os{
882
  border: 2px solid #32adbc;
909
  display: block !important;
910
  }
911
  .opinionstage-dashboard-section .opinionstage-btn-cell .os_create_new_btn {
912
+ margin-bottom: 10px;
913
  margin-right: 0;
914
  }
915
  .opinionstage-item-view-dashboard, .opinionstage-placement-dashboard {
919
  padding: 25px 0;
920
  }
921
  #opinionstage-content .opinionstage-dashboard {
922
+ overflow-y: scroll;
923
  }
924
  .opinionstage-item-action-container {
925
  float: none;
950
  top: 36px;
951
  }
952
  #opinionstage-content .opinionstage-dashboard-section .opinionstage-section-header .opinionstage-header-inner-container .opinionstage-item-create {
953
+ margin-top: 36px;
954
+ }
955
  }
956
+
957
+
958
+ .opinionstage-no-items {
959
+ font-weight: 600;
960
+ font-size: 15px;
961
+ color: #212120;
962
  }
963
 
964
+ a.opinionstage-add-our-first-item {
965
+ font-weight: 600;
966
+ font-size: 15px;
967
+ color: #3499c2;
968
+ }
969
  @media only screen and (max-width: 768px) {
970
  .gettingStartedSection {
971
  width: auto;
admin/js/content-popup.js CHANGED
@@ -10,9 +10,9 @@ var Ei=Object.freeze({}),Ci=Object.prototype.toString,Oi=v("slot,component",!0),
10
  * See https://raw.githubusercontent.com/tildeio/rsvp.js/master/LICENSE
11
  * @version 3.6.2
12
  */
13
- function i(t,e){for(var n=0,o=t.length;n<o;n++)if(t[n]===e)return n;return-1}function a(t){var e=t._promiseCallbacks;return e||(e=t._promiseCallbacks={}),e}function s(t,e){if(2!==arguments.length)return xt[t];xt[t]=e}function c(t){var e=typeof t;return null!==t&&("object"===e||"function"===e)}function u(t){return"function"==typeof t}function l(t){return null!==t&&"object"==typeof t}function f(t){return null!==t&&"object"==typeof t}function p(){setTimeout(function(){for(var t=0;t<Ot.length;t++){var e=Ot[t],n=e.payload;n.guid=n.key+n.id,n.childGuid=n.key+n.childId,n.error&&(n.stack=n.error.stack),xt.trigger(e.name,e.payload)}Ot.length=0},50)}function d(t,e,n){1===Ot.push({name:t,payload:{key:e._guidKey,id:e._id,eventName:t,detail:e._result,childId:n&&n._id,label:e._label,timeStamp:Ct(),error:xt["instrument-with-stack"]?new Error(e._label):null}})&&p()}function h(t,e){var n=this;if(t&&"object"==typeof t&&t.constructor===n)return t;var o=new n(m,e);return x(o,t),o}function v(){return new TypeError("A promises callback cannot return that same promise.")}function m(){}function g(t){try{return t.then}catch(t){return At.error=t,At}}function y(t,e,n,o){try{t.call(e,n,o)}catch(t){return t}}function b(t,e,n){xt.async(function(t){var o=!1,r=y(n,e,function(n){o||(o=!0,e!==n?x(t,n,void 0):E(t,n))},function(e){o||(o=!0,C(t,e))},"Settle: "+(t._label||" unknown promise"));!o&&r&&(o=!0,C(t,r))},t)}function _(t,e){e._state===$t?E(t,e._result):e._state===St?(e._onError=null,C(t,e._result)):O(e,void 0,function(n){e!==n?x(t,n,void 0):E(t,n)},function(e){return C(t,e)})}function w(t,e,n){e.constructor===t.constructor&&n===I&&t.constructor.resolve===h?_(t,e):n===At?(C(t,At.error),At.error=null):u(n)?b(t,e,n):E(t,e)}function x(t,e){t===e?E(t,e):c(e)?w(t,e,g(e)):E(t,e)}function k(t){t._onError&&t._onError(t._result),T(t)}function E(t,e){t._state===Tt&&(t._result=e,t._state=$t,0===t._subscribers.length?xt.instrument&&d("fulfilled",t):xt.async(T,t))}function C(t,e){t._state===Tt&&(t._state=St,t._result=e,xt.async(k,t))}function O(t,e,n,o){var r=t._subscribers,i=r.length;t._onError=null,r[i]=e,r[i+$t]=n,r[i+St]=o,0===i&&t._state&&xt.async(T,t)}function T(t){var e=t._subscribers,n=t._state;if(xt.instrument&&d(n===$t?"fulfilled":"rejected",t),0!==e.length){for(var o=void 0,r=void 0,i=t._result,a=0;a<e.length;a+=3)o=e[a],r=e[a+n],o?A(n,o,r,i):r(i);t._subscribers.length=0}}function $(){this.error=null}function S(t,e){try{return t(e)}catch(t){return jt.error=t,jt}}function A(t,e,n,o){var r=u(n),i=void 0,a=void 0;if(r){if((i=S(n,o))===jt)a=i.error,i.error=null;else if(i===e)return void C(e,v())}else i=o;e._state!==Tt||(r&&void 0===a?x(e,i):void 0!==a?C(e,a):t===$t?E(e,i):t===St&&C(e,i))}function j(t,e){var n=!1;try{e(function(e){n||(n=!0,x(t,e))},function(e){n||(n=!0,C(t,e))})}catch(e){C(t,e)}}function I(t,e,n){var o=this,r=o._state;if(r===$t&&!t||r===St&&!e)return xt.instrument&&d("chained",o,o),o;o._onError=null;var i=new o.constructor(m,n),a=o._result;if(xt.instrument&&d("chained",o,i),r===Tt)O(o,i,t,e);else{var s=r===$t?t:e;xt.async(function(){return A(r,i,s,a)})}return i}function L(t,e,n){return t===$t?{state:"fulfilled",value:n}:{state:"rejected",reason:n}}function M(t,e){return Et(t)?new It(this,t,!0,e).promise:this.reject(new TypeError("Promise.all must be called with an array"),e)}function P(t,e){var n=this,o=new n(m,e);if(!Et(t))return C(o,new TypeError("Promise.race must be called with an array")),o;for(var r=0;o._state===Tt&&r<t.length;r++)O(n.resolve(t[r]),void 0,function(t){return x(o,t)},function(t){return C(o,t)});return o}function D(t,e){var n=this,o=new n(m,e);return C(o,t),o}function N(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function F(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function R(){this.value=void 0}function B(t){try{return t.then}catch(t){return Dt.value=t,Dt}}function W(t,e,n){try{t.apply(e,n)}catch(t){return Dt.value=t,Dt}}function U(t,e){for(var n={},o=t.length,r=new Array(o),i=0;i<o;i++)r[i]=t[i];for(var a=0;a<e.length;a++){n[e[a]]=r[a+1]}return n}function z(t){for(var e=t.length,n=new Array(e-1),o=1;o<e;o++)n[o-1]=t[o];return n}function H(t,e){return{then:function(n,o){return t.call(e,n,o)}}}function G(t,e){var n=function(){for(var n=this,o=arguments.length,r=new Array(o+1),i=!1,a=0;a<o;++a){var s=arguments[a];if(!i){if((i=q(s))===Nt){var c=new Pt(m);return C(c,Nt.value),c}i&&!0!==i&&(s=H(i,s))}r[a]=s}var u=new Pt(m);return r[o]=function(t,n){t?C(u,t):void 0===e?x(u,n):!0===e?x(u,z(arguments)):Et(e)?x(u,U(arguments,e)):x(u,n)},i?K(u,r,t,n):V(u,r,t,n)};return n.__proto__=t,n}function V(t,e,n,o){var r=W(n,o,e);return r===Dt&&C(t,r.value),t}function K(t,e,n,o){return Pt.all(e).then(function(e){var r=W(n,o,e);return r===Dt&&C(t,r.value),t})}function q(t){return!(!t||"object"!=typeof t)&&(t.constructor===Pt||B(t))}function J(t,e){return Pt.all(t,e)}function Z(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function Y(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function Q(t,e){return Et(t)?new Ft(Pt,t,e).promise:Pt.reject(new TypeError("Promise.allSettled must be called with an array"),e)}function X(t,e){return Pt.race(t,e)}function tt(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function et(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function nt(t,e){return l(t)?new Bt(Pt,t,e).promise:Pt.reject(new TypeError("Promise.hash must be called with an object"),e)}function ot(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function rt(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function it(t,e){return l(t)?new Wt(Pt,t,!1,e).promise:Pt.reject(new TypeError("RSVP.hashSettled must be called with an object"),e)}function at(t){throw setTimeout(function(){throw t}),t}function st(t){var e={resolve:void 0,reject:void 0};return e.promise=new Pt(function(t,n){e.resolve=t,e.reject=n},t),e}function ct(t,e,n){return Et(t)?u(e)?Pt.all(t,n).then(function(t){for(var o=t.length,r=new Array(o),i=0;i<o;i++)r[i]=e(t[i]);return Pt.all(r,n)}):Pt.reject(new TypeError("RSVP.map expects a function as a second argument"),n):Pt.reject(new TypeError("RSVP.map must be called with an array"),n)}function ut(t,e){return Pt.resolve(t,e)}function lt(t,e){return Pt.reject(t,e)}function ft(t,e){return Pt.all(t,e)}function pt(t,e){return Pt.resolve(t,e).then(function(t){return ft(t,e)})}function dt(t,e,n){return Et(t)||l(t)&&void 0!==t.then?u(e)?(Et(t)?ft(t,n):pt(t,n)).then(function(t){for(var o=t.length,r=new Array(o),i=0;i<o;i++)r[i]=e(t[i]);return ft(r,n).then(function(e){for(var n=new Array(o),r=0,i=0;i<o;i++)e[i]&&(n[r]=t[i],r++);return n.length=r,n})}):Pt.reject(new TypeError("RSVP.filter expects function as a second argument"),n):Pt.reject(new TypeError("RSVP.filter must be called with an array or promise"),n)}function ht(t,e){Jt[Ut]=t,Jt[Ut+1]=e,2===(Ut+=2)&&Zt()}function vt(){return void 0!==zt?function(){zt(gt)}:mt()}function mt(){return function(){return setTimeout(gt,1)}}function gt(){for(var t=0;t<Ut;t+=2){(0,Jt[t])(Jt[t+1]),Jt[t]=void 0,Jt[t+1]=void 0}Ut=0}function yt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function bt(){xt.on.apply(xt,arguments)}function _t(){xt.off.apply(xt,arguments)}n.d(e,"asap",function(){return ht}),n.d(e,"cast",function(){return Qt}),n.d(e,"Promise",function(){return Pt}),n.d(e,"EventTarget",function(){return wt}),n.d(e,"all",function(){return J}),n.d(e,"allSettled",function(){return Q}),n.d(e,"race",function(){return X}),n.d(e,"hash",function(){return nt}),n.d(e,"hashSettled",function(){return it}),n.d(e,"rethrow",function(){return at}),n.d(e,"defer",function(){return st}),n.d(e,"denodeify",function(){return G}),n.d(e,"configure",function(){return s}),n.d(e,"on",function(){return bt}),n.d(e,"off",function(){return _t}),n.d(e,"resolve",function(){return ut}),n.d(e,"reject",function(){return lt}),n.d(e,"map",function(){return ct}),n.d(e,"async",function(){return Xt}),n.d(e,"filter",function(){return dt});var wt={mixin:function(t){return t.on=this.on,t.off=this.off,t.trigger=this.trigger,t._promiseCallbacks=void 0,t},on:function(t,e){if("function"!=typeof e)throw new TypeError("Callback must be a function");var n=a(this),o=void 0;o=n[t],o||(o=n[t]=[]),-1===i(o,e)&&o.push(e)},off:function(t,e){var n=a(this),o=void 0,r=void 0;if(!e)return void(n[t]=[]);o=n[t],-1!==(r=i(o,e))&&o.splice(r,1)},trigger:function(t,e,n){var o=a(this),r=void 0;if(r=o[t])for(var i=0;i<r.length;i++)(0,r[i])(e,n)}},xt={instrument:!1};wt.mixin(xt);var kt=void 0;kt=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)};var Et=kt,Ct=Date.now||function(){return(new Date).getTime()},Ot=[],Tt=void 0,$t=1,St=2,At=new $,jt=new $,It=function(){function t(t,e,n,o){this._instanceConstructor=t,this.promise=new t(m,o),this._abortOnReject=n,this._init.apply(this,arguments)}return t.prototype._init=function(t,e){var n=e.length||0;this.length=n,this._remaining=n,this._result=new Array(n),this._enumerate(e),0===this._remaining&&E(this.promise,this._result)},t.prototype._enumerate=function(t){for(var e=this.length,n=this.promise,o=0;n._state===Tt&&o<e;o++)this._eachEntry(t[o],o)},t.prototype._settleMaybeThenable=function(t,e){var n=this._instanceConstructor,o=n.resolve;if(o===h){var r=g(t);if(r===I&&t._state!==Tt)t._onError=null,this._settledAt(t._state,e,t._result);else if("function"!=typeof r)this._remaining--,this._result[e]=this._makeResult($t,e,t);else if(n===Pt){var i=new n(m);w(i,t,r),this._willSettleAt(i,e)}else this._willSettleAt(new n(function(e){return e(t)}),e)}else this._willSettleAt(o(t),e)},t.prototype._eachEntry=function(t,e){f(t)?this._settleMaybeThenable(t,e):(this._remaining--,this._result[e]=this._makeResult($t,e,t))},t.prototype._settledAt=function(t,e,n){var o=this.promise;o._state===Tt&&(this._abortOnReject&&t===St?C(o,n):(this._remaining--,this._result[e]=this._makeResult(t,e,n),0===this._remaining&&E(o,this._result)))},t.prototype._makeResult=function(t,e,n){return n},t.prototype._willSettleAt=function(t,e){var n=this;O(t,void 0,function(t){return n._settledAt($t,e,t)},function(t){return n._settledAt(St,e,t)})},t}(),Lt="rsvp_"+Ct()+"-",Mt=0,Pt=function(){function t(e,n){this._id=Mt++,this._label=n,this._state=void 0,this._result=void 0,this._subscribers=[],xt.instrument&&d("created",this),m!==e&&("function"!=typeof e&&N(),this instanceof t?j(this,e):F())}return t.prototype._onError=function(t){var e=this;xt.after(function(){e._onError&&xt.trigger("error",t,e._label)})},t.prototype.catch=function(t,e){return this.then(void 0,t,e)},t.prototype.finally=function(t,e){var n=this,o=n.constructor;return n.then(function(e){return o.resolve(t()).then(function(){return e})},function(e){return o.resolve(t()).then(function(){throw e})},e)},t}();Pt.cast=h,Pt.all=M,Pt.race=P,Pt.resolve=h,Pt.reject=D,Pt.prototype._guidKey=Lt,Pt.prototype.then=I;var Dt=new R,Nt=new R,Ft=function(t){function e(e,n,o){return Z(this,t.call(this,e,n,!1,o))}return Y(e,t),e}(It);Ft.prototype._makeResult=L;var Rt=Object.prototype.hasOwnProperty,Bt=function(t){function e(e,n){var o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments[3];return tt(this,t.call(this,e,n,o,r))}return et(e,t),e.prototype._init=function(t,e){this._result={},this._enumerate(e),0===this._remaining&&E(this.promise,this._result)},e.prototype._enumerate=function(t){var e=this.promise,n=[];for(var o in t)Rt.call(t,o)&&n.push({position:o,entry:t[o]});var r=n.length;this._remaining=r;for(var i=void 0,a=0;e._state===Tt&&a<r;a++)i=n[a],this._eachEntry(i.entry,i.position)},e}(It),Wt=function(t){function e(e,n,o){return ot(this,t.call(this,e,n,!1,o))}return rt(e,t),e}(Bt);Wt.prototype._makeResult=L;var Ut=0,zt=void 0,Ht="undefined"!=typeof window?window:void 0,Gt=Ht||{},Vt=Gt.MutationObserver||Gt.WebKitMutationObserver,Kt="undefined"==typeof self&&void 0!==t&&"[object process]"==={}.toString.call(t),qt="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,Jt=new Array(1e3),Zt=void 0;Zt=Kt?function(){var e=t.nextTick,n=t.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/);return Array.isArray(n)&&"0"===n[1]&&"10"===n[2]&&(e=o),function(){return e(gt)}}():Vt?function(){var t=0,e=new Vt(gt),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){return n.data=t=++t%2}}():qt?function(){var t=new MessageChannel;return t.port1.onmessage=gt,function(){return t.port2.postMessage(0)}}():void 0===Ht?function(){try{var t=n(20);return zt=t.runOnLoop||t.runOnContext,vt()}catch(t){return mt()}}():mt();if("object"==typeof self)self;else{if("object"!=typeof r)throw new Error("no global: `self` or `global` found");r}var Yt;xt.async=ht,xt.after=function(t){return setTimeout(t,0)};var Qt=ut,Xt=function(t,e){return xt.async(t,e)};if("undefined"!=typeof window&&"object"==typeof window.__PROMISE_INSTRUMENTATION__){var te=window.__PROMISE_INSTRUMENTATION__;s("instrument",!0);for(var ee in te)te.hasOwnProperty(ee)&&bt(ee,te[ee])}var ne=(Yt={asap:ht,cast:Qt,Promise:Pt,EventTarget:wt,all:J,allSettled:Q,race:X,hash:nt,hashSettled:it,rethrow:at,defer:st,denodeify:G,configure:s,on:bt,off:_t,resolve:ut,reject:lt,map:ct},yt(Yt,"async",Xt),yt(Yt,"filter",dt),Yt);e.default=ne}.call(e,n(6),n(5).setImmediate,n(0))},function(t,e,n){(function(t,n){function o(t,e){return null==t?void 0:t[e]}function r(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}function i(t){return B.call(t)}function a(t){return!(!g(t)||c(t))&&(v(t)||r(t)?W:T).test(l(t))}function s(t,e){var n=o(t,e);return a(n)?n:void 0}function c(t){return!!N&&N in t}function u(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||P)}function l(t){if(null!=t){try{return F.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function f(t){return d(t)&&R.call(t,"callee")&&(!z.call(t,"callee")||B.call(t)==w)}function p(t){return null!=t&&m(t.length)&&!v(t)}function d(t){return y(t)&&p(t)}function h(t){if(p(t)&&(rt(t)||"string"==typeof t||"function"==typeof t.splice||it(t)||f(t)))return!t.length;var e=ot(t);if(e==E||e==C)return!t.size;if(Y||u(t))return!G(t).length;for(var n in t)if(R.call(t,n))return!1;return!0}function v(t){var e=g(t)?B.call(t):"";return e==x||e==k}function m(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=_}function g(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function y(t){return!!t&&"object"==typeof t}function b(){return!1}var _=9007199254740991,w="[object Arguments]",x="[object Function]",k="[object GeneratorFunction]",E="[object Map]",C="[object Set]",O=/[\\^$.*+?()[\]{}|]/g,T=/^\[object .+?Constructor\]$/,$="object"==typeof t&&t&&t.Object===Object&&t,S="object"==typeof self&&self&&self.Object===Object&&self,A=$||S||Function("return this")(),j="object"==typeof e&&e&&!e.nodeType&&e,I=j&&"object"==typeof n&&n&&!n.nodeType&&n,L=I&&I.exports===j,M=Function.prototype,P=Object.prototype,D=A["__core-js_shared__"],N=function(){var t=/[^.]+$/.exec(D&&D.keys&&D.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),F=M.toString,R=P.hasOwnProperty,B=P.toString,W=RegExp("^"+F.call(R).replace(O,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),U=L?A.Buffer:void 0,z=P.propertyIsEnumerable,H=U?U.isBuffer:void 0,G=function(t,e){return function(n){return t(e(n))}}(Object.keys,Object),V=s(A,"DataView"),K=s(A,"Map"),q=s(A,"Promise"),J=s(A,"Set"),Z=s(A,"WeakMap"),Y=!z.call({valueOf:1},"valueOf"),Q=l(V),X=l(K),tt=l(q),et=l(J),nt=l(Z),ot=i;(V&&"[object DataView]"!=ot(new V(new ArrayBuffer(1)))||K&&ot(new K)!=E||q&&"[object Promise]"!=ot(q.resolve())||J&&ot(new J)!=C||Z&&"[object WeakMap]"!=ot(new Z))&&(ot=function(t){var e=B.call(t),n="[object Object]"==e?t.constructor:void 0,o=n?l(n):void 0;if(o)switch(o){case Q:return"[object DataView]";case X:return E;case tt:return"[object Promise]";case et:return C;case nt:return"[object WeakMap]"}return e});var rt=Array.isArray,it=H||b;n.exports=h}).call(e,n(0),n(21)(t))},function(t,e){function n(t,e){return t?r.call(t,e):""}var o=Array.prototype,r=o.join;t.exports=n},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(7),r=jQuery;e.default={get:function(t,e,n){return new o.Promise(function(o,i){r.getJSON({url:t,beforeSend:function(t){t.setRequestHeader("Accept","application/vnd.api+json"),t.setRequestHeader("Content-Type","application/vnd.api+json"),t.setRequestHeader("OSWP-Plugin-Version",e),n&&t.setRequestHeader("OSWP-Client-Token",n)}}).done(o).fail(i)})}}},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),a=n(12),s=o(a),c=n(17),u=o(c),l=n(2);window.OpinionStage&&void 0!==OpinionStage.contentPopup&&console.warn("[OpinionStage] content-popup APIs was already included"),function(t,e){function n(){console.log("createModal");var t=this;t.modal=new s.default({content:e("[data-opinionstage-content-popup-template]").html(),onCreate:function(e){t.app=new u.default(e)},onClose:function(e){t.app.isModalOpened=!1},onOpen:function(e){t.app.isModalOpened=!0}})}var o=function(){function t(){r(this,t),this.app=void 0,this.modal=void 0}return i(t,[{key:"open",value:function(t){var o=this,r=t.preselectWidgetType,i=t.onWidgetSelect;if("function"!=typeof i)throw new Error("onWidgetSelect must be a function");e(function(){o.app||n.call(o),o.app.widgetType=r||l.WIDGET_ALL,console.log("111: selected widget type:",o.app.widgetType),o.app.widgetSelectCb=i,o.modal.open()})}}]),t}();t.contentPopup=new o,t.contentPopup.WIDGET_ALL=l.WIDGET_ALL,t.contentPopup.WIDGET_POLL=l.WIDGET_POLL,t.contentPopup.WIDGET_SET=l.WIDGET_SET,t.contentPopup.WIDGET_SURVEY=l.WIDGET_SURVEY,t.contentPopup.WIDGET_SLIDESHOW=l.WIDGET_SLIDESHOW,t.contentPopup.WIDGET_TRIVIA_QUIZ=l.WIDGET_TRIVIA_QUIZ,t.contentPopup.WIDGET_PERSONALITY_QUIZ=l.WIDGET_PERSONALITY_QUIZ,t.contentPopup.WIDGET_LIST=l.WIDGET_LIST,t.contentPopup.WIDGET_FORM=l.WIDGET_FORM,t.contentPopup.WIDGET_STORY=l.WIDGET_STORY}(window.OpinionStage=window.OpinionStage||{},jQuery),jQuery(function(t){function e(t){wp.media.editor.insert(t.shortcode)}window.location.href.indexOf("modal_is_open")>-1&&(OpinionStage.contentPopup.open({onWidgetSelect:e}),modal.open()),t("body").on("click","[data-opinionstage-content-launch]",function(t){t.preventDefault(),OpinionStage.contentPopup.open({onWidgetSelect:e})})})},function(t,e,n){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),i=n(13),a=function(t){return t&&t.__esModule?t:{default:t}}(i);n(14);var s=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(this,t),this.modal=new a.default.modal({closeMethods:["overlay","escape"],cssClass:["opinionstage-content-popup"],onClose:e.onClose,onOpen:e.onOpen}),this.modal.setContent(e.content),"function"==typeof e.onCreate&&e.onCreate(this)}return r(t,[{key:"open",value:function(){this.modal.open()}},{key:"close",value:function(){this.modal.close()}},{key:"checkOverflow",value:function(){this.modal.checkOverflow()}}]),t}();e.default=s},function(t,e,n){var o,r;!function(i,a){o=a,void 0!==(r="function"==typeof o?o.call(e,n,e,t):o)&&(t.exports=r)}(0,function(){function t(t){var e={onClose:null,onOpen:null,beforeClose:null,stickyFooter:!1,footer:!1,cssClass:[],closeLabel:"Close",closeMethods:["overlay","button","escape"]};this.opts=u({},e,t),this.init()}function e(){this.modalBoxFooter&&(this.modalBoxFooter.style.width=this.modalBox.clientWidth+"px",this.modalBoxFooter.style.left=this.modalBox.offsetLeft+"px")}function n(){this.modal=document.createElement("div"),this.modal.classList.add("tingle-modal"),0!==this.opts.closeMethods.length&&-1!==this.opts.closeMethods.indexOf("overlay")||this.modal.classList.add("tingle-modal--noOverlayClose"),this.modal.style.display="none",this.opts.cssClass.forEach(function(t){"string"==typeof t&&this.modal.classList.add(t)},this),-1!==this.opts.closeMethods.indexOf("button")&&(this.modalCloseBtn=document.createElement("button"),this.modalCloseBtn.classList.add("tingle-modal__close"),this.modalCloseBtnIcon=document.createElement("span"),this.modalCloseBtnIcon.classList.add("tingle-modal__closeIcon"),this.modalCloseBtnIcon.innerHTML="×",this.modalCloseBtnLabel=document.createElement("span"),this.modalCloseBtnLabel.classList.add("tingle-modal__closeLabel"),this.modalCloseBtnLabel.innerHTML=this.opts.closeLabel,this.modalCloseBtn.appendChild(this.modalCloseBtnIcon),this.modalCloseBtn.appendChild(this.modalCloseBtnLabel)),this.modalBox=document.createElement("div"),this.modalBox.classList.add("tingle-modal-box"),this.modalBoxContent=document.createElement("div"),this.modalBoxContent.classList.add("tingle-modal-box__content"),this.modalBox.appendChild(this.modalBoxContent),-1!==this.opts.closeMethods.indexOf("button")&&this.modal.appendChild(this.modalCloseBtn),this.modal.appendChild(this.modalBox)}function o(){this.modalBoxFooter=document.createElement("div"),this.modalBoxFooter.classList.add("tingle-modal-box__footer"),this.modalBox.appendChild(this.modalBoxFooter)}function r(){this._events={clickCloseBtn:this.close.bind(this),clickOverlay:a.bind(this),resize:this.checkOverflow.bind(this),keyboardNav:i.bind(this)},-1!==this.opts.closeMethods.indexOf("button")&&this.modalCloseBtn.addEventListener("click",this._events.clickCloseBtn),this.modal.addEventListener("mousedown",this._events.clickOverlay),window.addEventListener("resize",this._events.resize),document.addEventListener("keydown",this._events.keyboardNav)}function i(t){-1!==this.opts.closeMethods.indexOf("escape")&&27===t.which&&this.isOpen()&&this.close()}function a(t){-1!==this.opts.closeMethods.indexOf("overlay")&&!s(t.target,"tingle-modal")&&t.clientX<this.modal.clientWidth&&this.close()}function s(t,e){for(;(t=t.parentElement)&&!t.classList.contains(e););return t}function c(){-1!==this.opts.closeMethods.indexOf("button")&&this.modalCloseBtn.removeEventListener("click",this._events.clickCloseBtn),this.modal.removeEventListener("mousedown",this._events.clickOverlay),window.removeEventListener("resize",this._events.resize),document.removeEventListener("keydown",this._events.keyboardNav)}function u(){for(var t=1;t<arguments.length;t++)for(var e in arguments[t])arguments[t].hasOwnProperty(e)&&(arguments[0][e]=arguments[t][e]);return arguments[0]}var l=function(){var t,e=document.createElement("tingle-test-transition"),n={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(t in n)if(void 0!==e.style[t])return n[t]}();return t.prototype.init=function(){this.modal||(n.call(this),r.call(this),document.body.insertBefore(this.modal,document.body.firstChild),this.opts.footer&&this.addFooter())},t.prototype.destroy=function(){null!==this.modal&&(c.call(this),this.modal.parentNode.removeChild(this.modal),this.modal=null)},t.prototype.open=function(){this.modal.style.removeProperty?this.modal.style.removeProperty("display"):this.modal.style.removeAttribute("display"),document.body.classList.add("tingle-enabled"),this.setStickyFooter(this.opts.stickyFooter),this.modal.classList.add("tingle-modal--visible");var t=this;l?this.modal.addEventListener(l,function e(){"function"==typeof t.opts.onOpen&&t.opts.onOpen.call(t),t.modal.removeEventListener(l,e,!1)},!1):"function"==typeof t.opts.onOpen&&t.opts.onOpen.call(t),this.checkOverflow()},t.prototype.isOpen=function(){return!!this.modal.classList.contains("tingle-modal--visible")},t.prototype.close=function(){if("function"==typeof this.opts.beforeClose){if(!this.opts.beforeClose.call(this))return}document.body.classList.remove("tingle-enabled"),this.modal.classList.remove("tingle-modal--visible");var t=this;l?this.modal.addEventListener(l,function e(){t.modal.removeEventListener(l,e,!1),t.modal.style.display="none","function"==typeof t.opts.onClose&&t.opts.onClose.call(this)},!1):(t.modal.style.display="none","function"==typeof t.opts.onClose&&t.opts.onClose.call(this))},t.prototype.setContent=function(t){"string"==typeof t?this.modalBoxContent.innerHTML=t:(this.modalBoxContent.innerHTML="",this.modalBoxContent.appendChild(t))},t.prototype.getContent=function(){return this.modalBoxContent},t.prototype.addFooter=function(){o.call(this)},t.prototype.setFooterContent=function(t){this.modalBoxFooter.innerHTML=t},t.prototype.getFooterContent=function(){return this.modalBoxFooter},t.prototype.setStickyFooter=function(t){this.isOverflow()||(t=!1),t?this.modalBox.contains(this.modalBoxFooter)&&(this.modalBox.removeChild(this.modalBoxFooter),this.modal.appendChild(this.modalBoxFooter),this.modalBoxFooter.classList.add("tingle-modal-box__footer--sticky"),e.call(this),this.modalBoxContent.style["padding-bottom"]=this.modalBoxFooter.clientHeight+20+"px"):this.modalBoxFooter&&(this.modalBox.contains(this.modalBoxFooter)||(this.modal.removeChild(this.modalBoxFooter),this.modalBox.appendChild(this.modalBoxFooter),this.modalBoxFooter.style.width="auto",this.modalBoxFooter.style.left="",this.modalBoxContent.style["padding-bottom"]="",this.modalBoxFooter.classList.remove("tingle-modal-box__footer--sticky")))},t.prototype.addFooterBtn=function(t,e,n){var o=document.createElement("button");return o.innerHTML=t,o.addEventListener("click",n),"string"==typeof e&&e.length&&e.split(" ").forEach(function(t){o.classList.add(t)}),this.modalBoxFooter.appendChild(o),o},t.prototype.resize=function(){console.warn("Resize is deprecated and will be removed in version 1.0")},t.prototype.isOverflow=function(){var t=window.innerHeight;return this.modalBox.clientHeight>=t},t.prototype.checkOverflow=function(){this.modal.classList.contains("tingle-modal--visible")&&(this.isOverflow()?this.modal.classList.add("tingle-modal--overflow"):this.modal.classList.remove("tingle-modal--overflow"),!this.isOverflow()&&this.opts.stickyFooter?this.setStickyFooter(!1):this.isOverflow()&&this.opts.stickyFooter&&(e.call(this),this.setStickyFooter(!0)))},{modal:t}})},function(t,e,n){var o=n(15);"string"==typeof o&&(o=[[t.i,o,""]]);var r={};r.transform=void 0;n(4)(o,r);o.locals&&(t.exports=o.locals)},function(t,e,n){e=t.exports=n(3)(!1),e.push([t.i,".opinionstage-content-popup.tingle-modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:159900;display:flex;visibility:hidden;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;overflow:auto;background:rgba(0,0,0,.8);opacity:0;cursor:pointer;-webkit-transition:-webkit-transform .2s ease;transition:-webkit-transform .2s ease;transition:transform .2s ease;transition:transform .2s ease,-webkit-transform .2s ease}.opinionstage-content-popup.tingle-modal *{-webkit-box-sizing:border-box;box-sizing:border-box}.opinionstage-content-popup .tingle-modal-box{position:relative;-ms-flex-negative:0;flex-shrink:0;margin-top:auto;margin-bottom:auto;max-width:945px;min-width:875px;width:70%;background:#fff;opacity:1;cursor:auto;-webkit-transition:-webkit-transform .3s cubic-bezier(.175,.885,.32,1.275);transition:-webkit-transform .3s cubic-bezier(.175,.885,.32,1.275);transition:transform .3s cubic-bezier(.175,.885,.32,1.275);transition:transform .3s cubic-bezier(.175,.885,.32,1.275),-webkit-transform .3s cubic-bezier(.175,.885,.32,1.275);-webkit-transform:scale(.8);transform:scale(.8)}@media only screen and (max-width:875px){.opinionstage-content-popup .tingle-modal-box{min-width:100%;overflow:hidden;width:100%}}.opinionstage-content-popup .tingle-modal-box__content{padding:0}.opinionstage-content-popup.tingle-modal--visible{visibility:visible;opacity:1}.opinionstage-content-popup.tingle-modal--visible .tingle-modal-box{-webkit-transform:scale(1);transform:scale(1)}@media (max-width:540px){.opinionstage-content-popup .tingle-modal-box{width:auto}.opinionstage-content-popup.tingle-modal{top:60px;display:block;width:100%}.opinionstage-content-popup.tingle-modal--overflow{padding:0}}.tingle-enabled{overflow:hidden;height:100%}.tingle-enabled .tingle-content-wrapper{-webkit-filter:blur(15px);filter:blur(15px)}",""])},function(t,e){t.exports=function(t){var e="undefined"!=typeof window&&window.location;if(!e)throw new Error("fixUrls requires window.location");if(!t||"string"!=typeof t)return t;var n=e.protocol+"//"+e.host,o=n+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(t,e){var r=e.trim().replace(/^"(.*)"$/,function(t,e){return e}).replace(/^'(.*)'$/,function(t,e){return e});if(/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/)/i.test(r))return t;var i;return i=0===r.indexOf("//")?r:0===r.indexOf("/")?n+r:o+r.replace(/^\.\//,""),"url("+JSON.stringify(i)+")"})}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return new r.default({el:"[data-opinionstage-content-popup]",data:{widgetType:i.WIDGET_ALL,widgetSelectCb:function(t){console.log("dumb widget insert callback, widget:",t)},showClientContent:!0,isClientLoggedIn:null,isModalOpened:!1},beforeMount:function(){this.isClientLoggedIn="1"===this.$el.dataset.opinionstageClientLoggedIn},methods:{closePopup:function(){t.close()},selectWidgetAndExit:function(t){this.widgetSelectCb(t),this.closePopup()}}})};var o=n(1),r=function(t){return t&&t.__esModule?t:{default:t}}(o);n(19),n(25),n(27),n(28);var i=n(2)},function(t,e,n){(function(t,e){!function(t,n){"use strict";function o(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n<e.length;n++)e[n]=arguments[n+1];var o={callback:t,args:e};return u[c]=o,s(c),c++}function r(t){delete u[t]}function i(t){var e=t.callback,o=t.args;switch(o.length){case 0:e();break;case 1:e(o[0]);break;case 2:e(o[0],o[1]);break;case 3:e(o[0],o[1],o[2]);break;default:e.apply(n,o)}}function a(t){if(l)setTimeout(a,0,t);else{var e=u[t];if(e){l=!0;try{i(e)}finally{r(t),l=!1}}}}if(!t.setImmediate){var s,c=1,u={},l=!1,f=t.document,p=Object.getPrototypeOf&&Object.getPrototypeOf(t);p=p&&p.setTimeout?p:t,"[object process]"==={}.toString.call(t.process)?function(){s=function(t){e.nextTick(function(){a(t)})}}():function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?function(){var e="setImmediate$"+Math.random()+"$",n=function(n){n.source===t&&"string"==typeof n.data&&0===n.data.indexOf(e)&&a(+n.data.slice(e.length))};t.addEventListener?t.addEventListener("message",n,!1):t.attachEvent("onmessage",n),s=function(n){t.postMessage(e+n,"*")}}():t.MessageChannel?function(){var t=new MessageChannel;t.port1.onmessage=function(t){a(t.data)},s=function(e){t.port2.postMessage(e)}}():f&&"onreadystatechange"in f.createElement("script")?function(){var t=f.documentElement;s=function(e){var n=f.createElement("script");n.onreadystatechange=function(){a(e),n.onreadystatechange=null,t.removeChild(n),n=null},t.appendChild(n)}}():function(){s=function(t){setTimeout(a,0,t)}}(),p.setImmediate=o,p.clearImmediate=r}}("undefined"==typeof self?void 0===t?this:t:self)}).call(e,n(0),n(6))},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function r(){var t=this;return this.dataLoading=!0,(this.showClientContent?i:a).call(this,this.searchCriteria).then(function(){t.noMoreData=!u(t.$store.state.nextPageNumber),t.dataLoading=!1})}function i(t){return this.clientIsLoggedIn?this.$store.dispatch({type:"loadClientWidgets",widgetsUrl:this.clientWidgetsUrl,pluginVersion:this.pluginVersion,accessToken:this.accessKey,filtering:t}):g.default.resolve()}function a(t){return this.$store.dispatch({type:"loadTemplateWidgets",widgetsUrl:this.sharedWidgetsUrl,pluginVersion:this.pluginVersion,filtering:t})}function s(t,e,n){var o=[];return e&&o.push("type="+e),n&&o.push("updated_at="+n),(0,b.default)(o)?t:t+"?"+(0,w.default)(o,"&")}function c(t,e){var n=this,o=s(this.clientWidgetsHasNewUrl,t,e);return C.default.get(o,this.pluginVersion,this.accessKey).then(function(t){n.newWidgetsAvailable=t.data["has-new-widgets"]}).catch(function(t){console.error("[social-polls-by-opinionstage][content-popup] can't load widgets:",t.statusText)})}function u(t){return t>1}function l(){var t=this;c.call(this,this.searchCriteria.type,this.lastUpdateTime).then(function(){t.newWidgetsAvailable&&p.call(t)})}function f(){this.clientIsLoggedIn&&(this.isCheckingWidgetUpdates=!0,this.widgetUpdatesChecker=setInterval(l.bind(this),3e3))}function p(){this.isCheckingWidgetUpdates=!1,clearInterval(this.widgetUpdatesChecker)}function d(){void 0!==this.widgets[0]?this.lastUpdateTime=this.widgets[0].updatedAt:this.lastUpdateTime=null}Object.defineProperty(e,"__esModule",{value:!0});var h=n(1),v=o(h),m=n(7),g=o(m),y=n(8),b=o(y),_=n(9),w=o(_),x=n(22),k=o(x),E=n(10),C=o(E),O=n(2);e.default=v.default.component("popup-content",{template:"#opinionstage-popup-content",props:["showClientContent","clientIsLoggedIn","modalIsOpened","widgetType","clientWidgetsUrl","sharedWidgetsUrl","clientWidgetsHasNewUrl","accessKey","pluginVersion"],data:function(){return{dataLoading:!1,widgets:[],searchCriteria:{},noMoreData:!0,newWidgetsAvailable:!1,lastUpdateTime:null,isCheckingWidgetUpdates:!1,widgetUpdatesChecker:null}},store:k.default,methods:{reloadData:function(t){var e=this;t||(t={});var n=t.widgetType||this.widgetType||this.searchCriteria.type||O.WIDGET_ALL,o=t.widgetTitle||"";this.newWidgetsAvailable=!1,p.call(this),this.searchCriteria={page:1,perPage:9,type:n,title:o},this.$store.commit("clearWidgets"),r.call(this).then(function(){e.widgets=e.$store.state.widgets[0],e.searchCriteria.title||d.call(e),f.call(e)})},reloadAndRestartCheckingForUpdates:function(){this.reloadData({widgetType:this.searchCriteria.type,widgetTitle:""})},appendData:function(){var t=this;this.searchCriteria.page+=1,r.call(this).then(function(){var e=t.$store.state.widgets[t.searchCriteria.page-1];t.widgets=t.widgets.concat(e)})},widgetSelected:function(t){this.$emit("widget-selected",t)}},watch:{modalIsOpened:function(t){t&&this.showClientContent&&this.clientIsLoggedIn?this.reloadData():(this.newWidgetsAvailable=!1,p.call(this))},showClientContent:function(t){t&&this.modalIsOpened&&this.clientIsLoggedIn?f.call(this):p.call(this)}}})},function(t,e){},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function r(t){return t.data.map(function(t){return{id:t.id,type:t.attributes.type,title:t.attributes.title,imageUrl:t.attributes["image-url"],updatedAt:t.attributes["updated-at"],landingPageUrl:t.attributes["landing-page-url"],editUrl:t.attributes["edit-url"],statsUrl:t.attributes["stats-url"],shortcode:t.attributes.shortcode}})}function i(t){return t.meta.nextPage}function a(t,e){var n=e.type,o=e.title,r=e.page,i=e.perPage,a=[];if(n&&a.push("type="+n),!(0,h.default)(o)){var s=(0,p.default)(o);(0,h.default)(s)||a.push("title_like="+s)}return r&&a.push("page="+r),i&&a.push("per_page="+i),(0,h.default)(a)?t:t+"?"+(0,m.default)(a,"&")}Object.defineProperty(e,"__esModule",{value:!0});var s=n(1),c=o(s),u=n(23),l=o(u),f=n(24),p=o(f),d=n(8),h=o(d),v=n(9),m=o(v),g=n(10),y=o(g);c.default.use(l.default),e.default=new l.default.Store({state:{widgets:[],nextPageNumber:null},mutations:{loadWidgets:function(t,e){var n=e.widgetsData;t.widgets.push(r(n)),t.nextPageNumber=i(n)},loadTemplateWidgets:function(t,e){var n=e.widgetsData;t.widgets.push(r(n).map(function(t){return t.template=!0,t})),t.nextPageNumber=i(n)},clearWidgets:function(t){t.widgets=[],t.nextPageNumber=null}},actions:{loadClientWidgets:function(t,e){return(0,t.dispatch)("load",{commitType:"loadWidgets",widgetsUrl:e.widgetsUrl,pluginVersion:e.pluginVersion,accessToken:e.accessToken,filtering:e.filtering})},loadTemplateWidgets:function(t,e){return(0,t.dispatch)("load",{commitType:"loadTemplateWidgets",widgetsUrl:e.widgetsUrl,pluginVersion:e.pluginVersion,filtering:e.filtering})},load:function(t,e){var n=t.commit,o=e.commitType,r=e.widgetsUrl,i=e.filtering,s=e.pluginVersion,c=e.accessToken,u=a(r,i);return y.default.get(u,s,c).then(function(t){n({type:o,widgetsData:t})}).catch(function(t){console.error("[social-polls-by-opinionstage][content-popup] can't load widgets:",t.statusText)})}}})},function(t,e,n){"use strict";function o(t){C&&(t._devtoolHook=C,C.emit("vuex:init",t),C.on("vuex:travel-to-state",function(e){t.replaceState(e)}),t.subscribe(function(t,e){C.emit("vuex:mutation",t,e)}))}function r(t,e){Object.keys(t).forEach(function(n){return e(t[n],n)})}function i(t){return null!==t&&"object"==typeof t}function a(t){return t&&"function"==typeof t.then}function s(t,e,n){if(e.update(n),n.modules)for(var o in n.modules){if(!e.getChild(o))return;s(t.concat(o),e.getChild(o),n.modules[o])}}function c(t,e){return e.indexOf(t)<0&&e.push(t),function(){var n=e.indexOf(t);n>-1&&e.splice(n,1)}}function u(t,e){t._actions=Object.create(null),t._mutations=Object.create(null),t._wrappedGetters=Object.create(null),t._modulesNamespaceMap=Object.create(null);var n=t.state;f(t,n,[],t._modules.root,!0),l(t,n,e)}function l(t,e,n){var o=t._vm;t.getters={};var i=t._wrappedGetters,a={};r(i,function(e,n){a[n]=function(){return e(t)},Object.defineProperty(t.getters,n,{get:function(){return t._vm[n]},enumerable:!0})});var s=S.config.silent;S.config.silent=!0,t._vm=new S({data:{$$state:e},computed:a}),S.config.silent=s,t.strict&&g(t),o&&(n&&t._withCommit(function(){o._data.$$state=null}),S.nextTick(function(){return o.$destroy()}))}function f(t,e,n,o,r){var i=!n.length,a=t._modules.getNamespace(n);if(o.namespaced&&(t._modulesNamespaceMap[a]=o),!i&&!r){var s=y(e,n.slice(0,-1)),c=n[n.length-1];t._withCommit(function(){S.set(s,c,o.state)})}var u=o.context=p(t,a,n);o.forEachMutation(function(e,n){h(t,a+n,e,u)}),o.forEachAction(function(e,n){var o=e.root?n:a+n,r=e.handler||e;v(t,o,r,u)}),o.forEachGetter(function(e,n){m(t,a+n,e,u)}),o.forEachChild(function(o,i){f(t,e,n.concat(i),o,r)})}function p(t,e,n){var o=""===e,r={dispatch:o?t.dispatch:function(n,o,r){var i=b(n,o,r),a=i.payload,s=i.options,c=i.type;return s&&s.root||(c=e+c),t.dispatch(c,a)},commit:o?t.commit:function(n,o,r){var i=b(n,o,r),a=i.payload,s=i.options,c=i.type;s&&s.root||(c=e+c),t.commit(c,a,s)}};return Object.defineProperties(r,{getters:{get:o?function(){return t.getters}:function(){return d(t,e)}},state:{get:function(){return y(t.state,n)}}}),r}function d(t,e){var n={},o=e.length;return Object.keys(t.getters).forEach(function(r){if(r.slice(0,o)===e){var i=r.slice(o);Object.defineProperty(n,i,{get:function(){return t.getters[r]},enumerable:!0})}}),n}function h(t,e,n,o){(t._mutations[e]||(t._mutations[e]=[])).push(function(e){n.call(t,o.state,e)})}function v(t,e,n,o){(t._actions[e]||(t._actions[e]=[])).push(function(e,r){var i=n.call(t,{dispatch:o.dispatch,commit:o.commit,getters:o.getters,state:o.state,rootGetters:t.getters,rootState:t.state},e,r);return a(i)||(i=Promise.resolve(i)),t._devtoolHook?i.catch(function(e){throw t._devtoolHook.emit("vuex:error",e),e}):i})}function m(t,e,n,o){t._wrappedGetters[e]||(t._wrappedGetters[e]=function(t){return n(o.state,o.getters,t.state,t.getters)})}function g(t){t._vm.$watch(function(){return this._data.$$state},function(){},{deep:!0,sync:!0})}function y(t,e){return e.length?e.reduce(function(t,e){return t[e]},t):t}function b(t,e,n){return i(t)&&t.type&&(n=e,e=t,t=t.type),{type:t,payload:e,options:n}}function _(t){S&&t===S||(S=t,E(S))}function w(t){return Array.isArray(t)?t.map(function(t){return{key:t,val:t}}):Object.keys(t).map(function(e){return{key:e,val:t[e]}})}function x(t){return function(e,n){return"string"!=typeof e?(n=e,e=""):"/"!==e.charAt(e.length-1)&&(e+="/"),t(e,n)}}function k(t,e,n){return t._modulesNamespaceMap[n]}Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"Store",function(){return A}),n.d(e,"install",function(){return _}),n.d(e,"mapState",function(){return I}),n.d(e,"mapMutations",function(){return L}),n.d(e,"mapGetters",function(){return M}),n.d(e,"mapActions",function(){return P}),n.d(e,"createNamespacedHelpers",function(){return D});/**
14
  * vuex v2.5.0
15
  * (c) 2017 Evan You
16
  * @license MIT
17
  */
18
- var E=function(t){function e(){var t=this.$options;t.store?this.$store="function"==typeof t.store?t.store():t.store:t.parent&&t.parent.$store&&(this.$store=t.parent.$store)}if(Number(t.version.split(".")[0])>=2)t.mixin({beforeCreate:e});else{var n=t.prototype._init;t.prototype._init=function(t){void 0===t&&(t={}),t.init=t.init?[e].concat(t.init):e,n.call(this,t)}}},C="undefined"!=typeof window&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__,O=function(t,e){this.runtime=e,this._children=Object.create(null),this._rawModule=t;var n=t.state;this.state=("function"==typeof n?n():n)||{}},T={namespaced:{configurable:!0}};T.namespaced.get=function(){return!!this._rawModule.namespaced},O.prototype.addChild=function(t,e){this._children[t]=e},O.prototype.removeChild=function(t){delete this._children[t]},O.prototype.getChild=function(t){return this._children[t]},O.prototype.update=function(t){this._rawModule.namespaced=t.namespaced,t.actions&&(this._rawModule.actions=t.actions),t.mutations&&(this._rawModule.mutations=t.mutations),t.getters&&(this._rawModule.getters=t.getters)},O.prototype.forEachChild=function(t){r(this._children,t)},O.prototype.forEachGetter=function(t){this._rawModule.getters&&r(this._rawModule.getters,t)},O.prototype.forEachAction=function(t){this._rawModule.actions&&r(this._rawModule.actions,t)},O.prototype.forEachMutation=function(t){this._rawModule.mutations&&r(this._rawModule.mutations,t)},Object.defineProperties(O.prototype,T);var $=function(t){this.register([],t,!1)};$.prototype.get=function(t){return t.reduce(function(t,e){return t.getChild(e)},this.root)},$.prototype.getNamespace=function(t){var e=this.root;return t.reduce(function(t,n){return e=e.getChild(n),t+(e.namespaced?n+"/":"")},"")},$.prototype.update=function(t){s([],this.root,t)},$.prototype.register=function(t,e,n){var o=this;void 0===n&&(n=!0);var i=new O(e,n);if(0===t.length)this.root=i;else{this.get(t.slice(0,-1)).addChild(t[t.length-1],i)}e.modules&&r(e.modules,function(e,r){o.register(t.concat(r),e,n)})},$.prototype.unregister=function(t){var e=this.get(t.slice(0,-1)),n=t[t.length-1];e.getChild(n).runtime&&e.removeChild(n)};var S,A=function(t){var e=this;void 0===t&&(t={}),!S&&"undefined"!=typeof window&&window.Vue&&_(window.Vue);var n=t.plugins;void 0===n&&(n=[]);var r=t.strict;void 0===r&&(r=!1);var i=t.state;void 0===i&&(i={}),"function"==typeof i&&(i=i()||{}),this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new $(t),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._watcherVM=new S;var a=this,s=this,c=s.dispatch,u=s.commit;this.dispatch=function(t,e){return c.call(a,t,e)},this.commit=function(t,e,n){return u.call(a,t,e,n)},this.strict=r,f(this,i,[],this._modules.root),l(this,i),n.forEach(function(t){return t(e)}),S.config.devtools&&o(this)},j={state:{configurable:!0}};j.state.get=function(){return this._vm._data.$$state},j.state.set=function(t){},A.prototype.commit=function(t,e,n){var o=this,r=b(t,e,n),i=r.type,a=r.payload,s=(r.options,{type:i,payload:a}),c=this._mutations[i];c&&(this._withCommit(function(){c.forEach(function(t){t(a)})}),this._subscribers.forEach(function(t){return t(s,o.state)}))},A.prototype.dispatch=function(t,e){var n=this,o=b(t,e),r=o.type,i=o.payload,a={type:r,payload:i},s=this._actions[r];if(s)return this._actionSubscribers.forEach(function(t){return t(a,n.state)}),s.length>1?Promise.all(s.map(function(t){return t(i)})):s[0](i)},A.prototype.subscribe=function(t){return c(t,this._subscribers)},A.prototype.subscribeAction=function(t){return c(t,this._actionSubscribers)},A.prototype.watch=function(t,e,n){var o=this;return this._watcherVM.$watch(function(){return t(o.state,o.getters)},e,n)},A.prototype.replaceState=function(t){var e=this;this._withCommit(function(){e._vm._data.$$state=t})},A.prototype.registerModule=function(t,e,n){void 0===n&&(n={}),"string"==typeof t&&(t=[t]),this._modules.register(t,e),f(this,this.state,t,this._modules.get(t),n.preserveState),l(this,this.state)},A.prototype.unregisterModule=function(t){var e=this;"string"==typeof t&&(t=[t]),this._modules.unregister(t),this._withCommit(function(){var n=y(e.state,t.slice(0,-1));S.delete(n,t[t.length-1])}),u(this)},A.prototype.hotUpdate=function(t){this._modules.update(t),u(this,!0)},A.prototype._withCommit=function(t){var e=this._committing;this._committing=!0,t(),this._committing=e},Object.defineProperties(A.prototype,j);var I=x(function(t,e){var n={};return w(e).forEach(function(e){var o=e.key,r=e.val;n[o]=function(){var e=this.$store.state,n=this.$store.getters;if(t){var o=k(this.$store,"mapState",t);if(!o)return;e=o.context.state,n=o.context.getters}return"function"==typeof r?r.call(this,e,n):e[r]},n[o].vuex=!0}),n}),L=x(function(t,e){var n={};return w(e).forEach(function(e){var o=e.key,r=e.val;n[o]=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];var o=this.$store.commit;if(t){var i=k(this.$store,"mapMutations",t);if(!i)return;o=i.context.commit}return"function"==typeof r?r.apply(this,[o].concat(e)):o.apply(this.$store,[r].concat(e))}}),n}),M=x(function(t,e){var n={};return w(e).forEach(function(e){var o=e.key,r=e.val;r=t+r,n[o]=function(){if(!t||k(this.$store,"mapGetters",t))return this.$store.getters[r]},n[o].vuex=!0}),n}),P=x(function(t,e){var n={};return w(e).forEach(function(e){var o=e.key,r=e.val;n[o]=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];var o=this.$store.dispatch;if(t){var i=k(this.$store,"mapActions",t);if(!i)return;o=i.context.dispatch}return"function"==typeof r?r.apply(this,[o].concat(e)):o.apply(this.$store,[r].concat(e))}}),n}),D=function(t){return{mapState:I.bind(null,t),mapGetters:M.bind(null,t),mapMutations:L.bind(null,t),mapActions:P.bind(null,t)}},N={Store:A,install:_,version:"2.5.0",mapState:I,mapMutations:L,mapGetters:M,mapActions:P,createNamespacedHelpers:D};e.default=N},function(t,e,n){(function(e){function n(t){return t.split("")}function o(t,e,n,o){for(var r=t.length,i=n+(o?1:-1);o?i--:++i<r;)if(e(t[i],i,t))return i;return-1}function r(t,e,n){if(e!==e)return o(t,i,n);for(var r=n-1,a=t.length;++r<a;)if(t[r]===e)return r;return-1}function i(t){return t!==t}function a(t,e){for(var n=-1,o=t.length;++n<o&&r(e,t[n],0)>-1;);return n}function s(t,e){for(var n=t.length;n--&&r(e,t[n],0)>-1;);return n}function c(t){return A.test(t)}function u(t){return c(t)?l(t):n(t)}function l(t){return t.match(S)||[]}function f(t,e,n){var o=-1,r=t.length;e<0&&(e=-e>r?0:r+e),n=n>r?r:n,n<0&&(n+=r),r=e>n?0:n-e>>>0,e>>>=0;for(var i=Array(r);++o<r;)i[o]=t[o+e];return i}function p(t){if("string"==typeof t)return t;if(v(t))return F?F.call(t):"";var e=t+"";return"0"==e&&1/t==-y?"-0":e}function d(t,e,n){var o=t.length;return n=void 0===n?o:n,!e&&n>=o?t:f(t,e,n)}function h(t){return!!t&&"object"==typeof t}function v(t){return"symbol"==typeof t||h(t)&&P.call(t)==b}function m(t){return null==t?"":p(t)}function g(t,e,n){if((t=m(t))&&(n||void 0===e))return t.replace(_,"");if(!t||!(e=p(e)))return t;var o=u(t),r=u(e);return d(o,a(o,r),s(o,r)+1).join("")}var y=1/0,b="[object Symbol]",_=/^\s+|\s+$/g,w="[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]",x="\\ud83c[\\udffb-\\udfff]",k="(?:\\ud83c[\\udde6-\\uddff]){2}",E="[\\ud800-\\udbff][\\udc00-\\udfff]",C="(?:[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|\\ud83c[\\udffb-\\udfff])?",O="(?:\\u200d(?:"+["[^\\ud800-\\udfff]",k,E].join("|")+")[\\ufe0e\\ufe0f]?"+C+")*",T="[\\ufe0e\\ufe0f]?"+C+O,$="(?:"+["[^\\ud800-\\udfff]"+w+"?",w,k,E,"[\\ud800-\\udfff]"].join("|")+")",S=RegExp(x+"(?="+x+")|"+$+T,"g"),A=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0\\ufe0e\\ufe0f]"),j="object"==typeof e&&e&&e.Object===Object&&e,I="object"==typeof self&&self&&self.Object===Object&&self,L=j||I||Function("return this")(),M=Object.prototype,P=M.toString,D=L.Symbol,N=D?D.prototype:void 0,F=N?N.toString:void 0;t.exports=g}).call(e,n(0))},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function r(){this.$emit("widgets-search-update",{widgetType:this.selectedWidgetType,widgetTitle:this.widgetTitleSearch})}Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),a=o(i),s=n(26),c=o(s),u=n(2),l={};l[u.WIDGET_ALL]="All ITEMS",l[u.WIDGET_POLL]="poll",l[u.WIDGET_SET]="multi poll set",l[u.WIDGET_SURVEY]="survey",l[u.WIDGET_SLIDESHOW]="slideshow",l[u.WIDGET_TRIVIA_QUIZ]="trivia quiz",l[u.WIDGET_PERSONALITY_QUIZ]="personality quiz",l[u.WIDGET_LIST]="list",l[u.WIDGET_FORM]="form",l[u.WIDGET_STORY]="story article",e.default=a.default.component("widget-list",{template:"#opinionstage-widget-list",props:["widgets","preSelectedWidgetType","dataLoading","noMoreData","showSearch"],data:function(){return{selectedWidgetType:null,widgetTitleSearch:"",showMoreBtn:!0,hasData:!0}},computed:{selectedWidgetTitle:function(){return l[this.selectedWidgetType||this.preSelectedWidgetType]}},watch:{widgetTitleSearch:(0,c.default)(function(){r.call(this)},500),widgets:function(){this.hasData=this.dataLoading||this.widgets.length>0}},methods:{select:function(t){this.$emit("widget-selected",t)},selectWidgetType:function(t){this.selectedWidgetType=t,this.widgetTitleSearch="",r.call(this)},showMore:function(){this.$emit("load-more-widgets")}}})},function(t,e,n){(function(e){function n(t,e,n){function r(e){var n=v,o=m;return v=m=void 0,E=e,y=t.apply(o,n)}function i(t){return E=t,b=setTimeout(l,e),C?r(t):y}function c(t){var n=t-k,o=t-E,r=e-n;return O?w(r,g-o):r}function u(t){var n=t-k,o=t-E;return void 0===k||n>=e||n<0||O&&o>=g}function l(){var t=x();if(u(t))return f(t);b=setTimeout(l,c(t))}function f(t){return b=void 0,T&&v?r(t):(v=m=void 0,y)}function p(){void 0!==b&&clearTimeout(b),E=0,v=k=m=b=void 0}function d(){return void 0===b?y:f(x())}function h(){var t=x(),n=u(t);if(v=arguments,m=this,k=t,n){if(void 0===b)return i(k);if(O)return b=setTimeout(l,e),r(k)}return void 0===b&&(b=setTimeout(l,e)),y}var v,m,g,y,b,k,E=0,C=!1,O=!1,T=!0;if("function"!=typeof t)throw new TypeError(s);return e=a(e)||0,o(n)&&(C=!!n.leading,O="maxWait"in n,g=O?_(a(n.maxWait)||0,e):g,T="trailing"in n?!!n.trailing:T),h.cancel=p,h.flush=d,h}function o(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function r(t){return!!t&&"object"==typeof t}function i(t){return"symbol"==typeof t||r(t)&&b.call(t)==u}function a(t){if("number"==typeof t)return t;if(i(t))return c;if(o(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=o(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(l,"");var n=p.test(t);return n||d.test(t)?h(t.slice(2),n?2:8):f.test(t)?c:+t}var s="Expected a function",c=NaN,u="[object Symbol]",l=/^\s+|\s+$/g,f=/^[-+]0x[0-9a-f]+$/i,p=/^0b[01]+$/i,d=/^0o[0-7]+$/i,h=parseInt,v="object"==typeof e&&e&&e.Object===Object&&e,m="object"==typeof self&&self&&self.Object===Object&&self,g=v||m||Function("return this")(),y=Object.prototype,b=y.toString,_=Math.max,w=Math.min,x=function(){return g.Date.now()};t.exports=n}).call(e,n(0))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),r=function(t){return t&&t.__esModule?t:{default:t}}(o);e.default=r.default.component("notification",{template:"#opinionstage-notification",methods:{initiateUpdate:function(){this.$emit("update-btn-click")}}})},function(t,e,n){var o=n(29);"string"==typeof o&&(o=[[t.i,o,""]]);var r={};r.transform=void 0;n(4)(o,r);o.locals&&(t.exports=o.locals)},function(t,e,n){e=t.exports=n(3)(!1),e.push([t.i,'@font-face{font-family:os-icon-font;font-style:normal;font-weight:400;src:url("https://assets.opinionstage.com/assets/os-icon-font-244a07d2da0691f4423dac8a542a9bb9df3797ca19f2d0c67c04a8789c9f6afb.eot#iefix") format("embedded-opentype"),url("https://assets.opinionstage.com/assets/os-icon-font-244a07d2da0691f4423dac8a542a9bb9df3797ca19f2d0c67c04a8789c9f6afb.ttf") format("truetype"),url("https://assets.opinionstage.com/assets/os-icon-font-244a07d2da0691f4423dac8a542a9bb9df3797ca19f2d0c67c04a8789c9f6afb.woff") format("woff"),url("https://assets.opinionstage.com/assets/os-icon-font-244a07d2da0691f4423dac8a542a9bb9df3797ca19f2d0c67c04a8789c9f6afb.svg#os-icon-font") format("svg")}[class*=" icon-"],[class^=icon-]{font-family:os-icon-font!important;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-os-form-address:before{content:"\\E900"}.icon-os-form-email:before{content:"\\E901"}.icon-os-form-name:before{content:"\\E902"}.icon-os-form-phone:before{content:"\\E903"}.icon-os-common-arrow-left2:before{content:"\\E904"}.icon-os-common-arrow-right2:before{content:"\\E905"}.icon-os-reports-list:before{content:"\\E906"}.icon-os-reports-personality:before{content:"\\E907"}.icon-os-reports-poll:before{content:"\\E908"}.icon-os-reports-set:before{content:"\\E909"}.icon-os-widget-slideshow:before{content:"\\E90A"}.icon-os-reports-trivia:before{content:"\\E90B"}.icon-os-widget-form:before{content:"\\E963"}.icon-os-common-up:before{content:"\\E90C"}.icon-os-layout-image-poll:before{content:"\\E90D"}.icon-os-common-arrow-left:before{content:"\\E90E"}.icon-os-common-arrow-right:before{content:"\\E90F"}.icon-os-form-user:before{content:"\\E910"}.icon-os-sn-pinterest:before{content:"\\E911"}.icon-os-sn-reddit:before{content:"\\E912"}.icon-os-sn-whatsapp:before{content:"\\E913"}.icon-os-brand-logo-small:before{content:"\\E914"}.icon-os-brand-logo:before{content:"\\E915"}.icon-os-common-addnew:before{content:"\\E916"}.icon-os-common-checkbox-blank:before{content:"\\E917"}.icon-os-common-checkbox-checked:before{content:"\\E918"}.icon-os-common-close:before{content:"\\E919"}.icon-os-common-date:before{content:"\\E91A"}.icon-os-common-dot:before{content:"\\E91B"}.icon-os-common-down:before{content:"\\E91C"}.icon-os-common-help:before{content:"\\E91D"}.icon-os-common-link:before{content:"\\E91E"}.icon-os-common-menu-dd-closed:before{content:"\\E91F"}.icon-os-common-menu-dd-open:before{content:"\\E920"}.icon-os-common-menu-medium:before{content:"\\E921"}.icon-os-common-menu:before{content:"\\E922"}.icon-os-common-minimize:before{content:"\\E923"}.icon-os-common-more:before{content:"\\E924"}.icon-os-common-plus:before{content:"\\E925"}.icon-os-common-poll:before{content:"\\E926"}.icon-os-common-search:before{content:"\\E927"}.icon-os-common-settings:before{content:"\\E928"}.icon-os-common-tip:before{content:"\\E929"}.icon-os-filter-all:before{content:"\\E92A"}.icon-os-filter-facebook:before{content:"\\E92B"}.icon-os-filter-female:before{content:"\\E92C"}.icon-os-filter-friends:before{content:"\\E92D"}.icon-os-filter-gplus:before{content:"\\E92E"}.icon-os-filter-hidden:before{content:"\\E92F"}.icon-os-filter-male:before{content:"\\E930"}.icon-os-filter-public:before{content:"\\E931"}.icon-os-filter-seperator:before{content:"\\E932"}.icon-os-filter-twitter:before{content:"\\E933"}.icon-os-form-check:before{content:"\\E934"}.icon-os-form-drag:before{content:"\\E935"}.icon-os-form-error:before{content:"\\E936"}.icon-os-form-image:before{content:"\\E937"}.icon-os-form-success:before{content:"\\E938"}.icon-os-form-video:before{content:"\\E939"}.icon-os-hp-engagement:before{content:"\\E93A"}.icon-os-hp-insights:before{content:"\\E93B"}.icon-os-hp-revenue:before{content:"\\E93C"}.icon-os-hp-traffic:before{content:"\\E93D"}.icon-os-layout-h2h:before{content:"\\E93E"}.icon-os-layout-mc:before{content:"\\E93F"}.icon-os-layout-thumbnails:before{content:"\\E940"}.icon-os-menu-content:before{content:"\\E941"}.icon-os-menu-placements:before{content:"\\E942"}.icon-os-menu-reports:before{content:"\\E943"}.icon-os-menu-revenue:before{content:"\\E944"}.icon-os-pinterest:before{content:"\\E945"}.icon-os-poll-client:before{content:"\\E946"}.icon-os-poll-voter:before{content:"\\E947"}.icon-os-quiz-correct:before{content:"\\E948"}.icon-os-quiz-restart:before{content:"\\E949"}.icon-os-quiz-wrong:before{content:"\\E94A"}.icon-os-report-contacts:before{content:"\\E94B"}.icon-os-report-discovery:before{content:"\\E94C"}.icon-os-report-revenue:before{content:"\\E94D"}.icon-os-report-stats:before{content:"\\E94E"}.icon-os-report-time:before{content:"\\E94F"}.icon-os-report-views:before{content:"\\E950"}.icon-os-reports-emails:before{content:"\\E951"}.icon-os-reports-polls:before{content:"\\E952"}.icon-os-reports-revenue:before{content:"\\E953"}.icon-os-reports-sets:before{content:"\\E954"}.icon-os-reports-time:before{content:"\\E955"}.icon-os-reports-traffic:before{content:"\\E956"}.icon-os-reports-votes:before{content:"\\E957"}.icon-os-set-arrow-left:before{content:"\\E958"}.icon-os-set-arrow-right:before{content:"\\E959"}.icon-os-sn-embed:before{content:"\\E95A"}.icon-os-sn-facebook:before{content:"\\E95B"}.icon-os-sn-gplus:before{content:"\\E95C"}.icon-os-sn-tumblr:before{content:"\\E95D"}.icon-os-sn-twitter:before{content:"\\E95E"}.icon-os-status-closed:before{content:"\\E95F"}.icon-os-status-draft:before{content:"\\E960"}.icon-os-status-open:before{content:"\\E961"}.icon-os-status-published:before{content:"\\E962"}.icon-os-icon-story:before{content:"\\E964"}.opinionstage-content-popup-contents *{margin:0;padding:0;color:#222120;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:Open Sans,Helvetica,sans-serif}.opinionstage-content-popup-contents .header{background-color:#222120;width:100%}.opinionstage-content-popup-contents .header__container{color:#fff;margin:auto;padding:0 10px}.opinionstage-content-popup-contents .header__logo{display:inline-block}.opinionstage-content-popup-contents .header__logo a:active,.opinionstage-content-popup-contents .header__logo a:focus,.opinionstage-content-popup-contents .header__logo a:hover,.opinionstage-content-popup-contents .header__logo a:visited{border:none;background:none;-webkit-box-shadow:none;box-shadow:none}.opinionstage-content-popup-contents .header__logo img{margin:15px 10px;width:150px}.opinionstage-content-popup-contents .header__nav{display:inline-block;font-size:0;vertical-align:bottom}.opinionstage-content-popup-contents .header__action{display:block;float:right;font-size:0;margin-top:10px}.opinionstage-content-popup-contents .page-content{margin:0 auto;padding:25px 15px 15px}.opinionstage-content-popup-contents .main-title{font-size:30px;font-weight:400;line-height:normal}.opinionstage-content-popup-contents .conect-form{text-align:center;margin-top:20px}.opinionstage-content-popup-contents .content-actions{height:40px;margin-bottom:20px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.opinionstage-content-popup-contents .content-actions__left,.opinionstage-content-popup-contents .content-actions__right{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex}.opinionstage-content-popup-contents .content-actions__left{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}.opinionstage-content-popup-contents .content-actions__right{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.opinionstage-content-popup-contents .content-actions__sep{border-right:1px solid #e5e5e5;margin:0 20px}.opinionstage-content-popup-contents .content-actions:after{content:"";clear:both;display:block}.opinionstage-content-popup-contents .filter__itm{display:inline-block;cursor:pointer;font-size:12px;margin-right:0;line-height:25px;text-transform:uppercase;width:100%}.opinionstage-content-popup-contents .filter__itm:first-child{border-top:1px solid #3487fa}.opinionstage-content-popup-contents .filter__itm:last-child{border-bottom:1px solid #3487fa}.opinionstage-content-popup-contents .filter__itm.active{color:#fff;background:#5299fb;font-weight:400;pointer-events:none}.opinionstage-content-popup-contents .filter{display:inline-block;margin:0;width:auto}.opinionstage-content-popup-contents .content__list{height:calc(92vh - 160px);overflow-y:scroll}.opinionstage-content-popup-contents .content__loading{text-align:center}.opinionstage-content-popup-contents .content__itm{display:block;margin:0;padding-bottom:6px;padding-top:10px;position:relative;width:100%;border-bottom:1px solid #e5e5e5}.opinionstage-content-popup-contents .content__itm:first-child{border-top:1px solid #e5e5e5}.opinionstage-content-popup-contents .content__itm:hover .content__links{display:inline-block;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.opinionstage-content-popup-contents .content__image{display:inline-block;height:90px;position:relative;width:15%}.opinionstage-content-popup-contents .content__image img{display:block;height:100%;-o-object-fit:cover;object-fit:cover;width:100%}.opinionstage-content-popup-contents .content__info{display:inline-block;background:transparent;font-size:16px;height:85px;width:50%;line-height:normal;margin:0;overflow:hidden;padding:0 10px;text-overflow:ellipsis;white-space:nowrap}.opinionstage-content-popup-contents .content__info a{color:inherit;text-decoration:none}.opinionstage-content-popup-contents .content__links{background:none;display:inline-block;float:right;text-align:right;height:100%;padding:20px 10px;left:0;position:relative;top:0;width:30%}@media only screen and (max-width:767px){.opinionstage-content-popup-contents .content__links{padding-left:0;padding-right:0}}.opinionstage-content-popup-contents .content__links-itm{border-radius:5px;border:1px solid #fff;color:#fff;background:transparent;cursor:pointer;display:block;line-height:1;margin:5px auto;padding:14px 8px;text-align:center;text-decoration:none;text-transform:uppercase;width:200px}.opinionstage-content-popup-contents .content__links-itm:hover{background-color:hsla(0,0%,100%,.1)}.opinionstage-content-popup-contents .popup-content-btn{border:1px solid #32adbc;border-radius:2px;color:#32adbc;display:inline;font-size:15px;font-weight:600;padding:13px 14px;text-align:center;text-decoration:none;width:auto}.opinionstage-content-popup-contents .content__label{background-color:#222120;bottom:auto;color:#fff;font-size:12px;top:0;left:0;padding:1px 5px;position:absolute;text-transform:uppercase;z-index:2}.opinionstage-content-popup-contents .std-btn{background-color:rgba(123,91,167,.4);border-radius:5px 5px 0 0;cursor:pointer;color:#fff;display:inline-block;font:16px/50px Open Sans,Helvetica,sans-serif;margin:0;text-align:center;text-transform:uppercase;vertical-align:bottom;width:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.opinionstage-content-popup-contents .std-btn.active{background-color:#fff;color:#222120}.opinionstage-content-popup-contents .btn-create{background-color:#32adbc;border-radius:3px;border-style:hidden;color:#fff;cursor:pointer;display:inline-block;font-size:15px;font-weight:600;line-height:normal;padding:10px 11px;text-decoration:none;outline:none}.opinionstage-content-popup-contents .btn-create:hover{color:#fff;opacity:.9;text-decoration:none}.opinionstage-content-popup-contents .btn-create:before{bottom:0;content:"+";font-family:os-icon-font;font-size:17px;font-weight:700;height:18px;margin-right:8px;pointer-events:none;top:0}.opinionstage-content-popup-contents .create-new-menu-box{display:inline-block;position:relative}.opinionstage-content-popup-contents .create-new-menu-box:hover .create-new-menu{display:block}.opinionstage-content-popup-contents .create-new-menu{display:none;position:absolute;width:100%;top:39px;left:0;border:1px solid #3aaebd;background-color:#fff;z-index:3}.opinionstage-content-popup-contents .create-menu__itm{display:block;color:#3aaebd;border-bottom:1px solid #3aaebd;padding:8px 12px;background-color:#fff;font-size:14px;text-decoration:none;text-transform:uppercase}.opinionstage-content-popup-contents .create-menu__itm:hover{text-decoration:none;color:#fff;background-color:#44a9d2}.opinionstage-content-popup-contents .btn-close{border:1px solid #fff;border-radius:5px;color:#fff;cursor:pointer;display:inline-block;font:16px/38px Open Sans,Helvetica,sans-serif;margin-left:20px;opacity:.5;text-align:center;width:42px}.opinionstage-content-popup-contents .btn-close:hover{opacity:.8}.opinionstage-content-popup-contents .btn-blue{display:inline-block;background-color:#3499c2;border:medium none;border-radius:5px;color:#fff;cursor:pointer;font-size:16px;line-height:36px;outline:medium none;text-transform:uppercase;text-decoration:none;width:140px}.opinionstage-content-popup-contents .btn-blue:hover{background-color:#55a6cc}.opinionstage-content-popup-contents .btn-show-more{padding:15px 0;border:none;background-color:#e6e6e6;width:100%}.opinionstage-content-popup-contents .std-inp{background-color:#fff;border:1px solid #c1c1c1;border-radius:5px;height:36px;outline:medium none;padding:0 15px;width:450px}.opinionstage-content-popup-contents .os-search{width:180px;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;border:1px solid #ccc;border-radius:2px;-webkit-box-shadow:0 0;box-shadow:0 0}.opinionstage-content-popup-contents .os-search__input{color:#797979;padding-left:10px;width:100%;border:none;border-radius:0;outline:none}.opinionstage-content-popup-contents .os-search__input:focus{border:none;border-radius:0;-webkit-box-shadow:none;box-shadow:none;outline:none}.opinionstage-content-popup-contents .os-search__icon{color:#3aaebd;line-height:normal;font-size:18px;padding:10px 9px;margin:0}.opinionstage-content-popup-contents .hidden{visibility:hidden}.opinionstage-content-popup-contents .opinionstage-blue-btn{cursor:pointer;text-align:center;color:#fff;text-decoration:none;display:inline-block;padding:11px 10px;font-weight:400;background-color:#3499c2;border-radius:3px;border-style:hidden;width:95px}.opinionstage-content-popup-contents .opinionstage-blue-btn:hover{opacity:.9}.opinionstage-content-popup-contents .opinionstage-section-notification{background-color:rgba(0,0,0,.7);width:100%;padding:20px 25px;z-index:3;text-align:center;-webkit-box-shadow:0 2px 5px rgba(0,0,0,.6);box-shadow:0 2px 5px rgba(0,0,0,.6)}.opinionstage-content-popup-contents .opinionstage-section-notification__title{color:#fff;font-size:15px;margin-bottom:15px}.opinionstage-content-popup-contents .opinionstage-section-notification__controls{position:relative;font-size:0}.opinionstage-content-popup-contents .notification-container~div>.page-content .content__list{max-height:calc(92vh - 270px)}.opinionstage-content-popup-contents .bordered-container{border:1px solid #e5e5e5;text-align:center;padding:40px}.opinionstage-content-popup-contents .opinionstage-introduction-video{text-align:center;padding:20px}.opinionstage-content-popup-contents .opinionstage-connect-form{margin-top:20px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.opinionstage-content-popup-contents .opinionstage-connect-form .opinionstage-conect-input{border:1px solid #e5e5e5;height:40px;padding:0 15px;width:420px;border-radius:3px;margin-right:10px;-webkit-box-shadow:none!important;box-shadow:none!important;outline:none!important}.opinionstage-content-popup-contents .dropbtn{background-color:#fff;border:1px solid #e4e4e4;border-right:0!important;-webkit-box-shadow:0 0 0!important;box-shadow:0 0 0!important;cursor:pointer;display:inline-block;font:12px/38px Open Sans,Helvetica,sans-serif;outline:none!important;padding-left:10px;position:relative;text-align:left;text-decoration:none;width:140px;margin-right:50px}.opinionstage-content-popup-contents .dropbtn span{color:#555454;font-size:12px;font-weight:700;text-transform:uppercase}.opinionstage-content-popup-contents .dropbtn:before{color:#000;content:"\\E922";display:block;font-family:os-icon-font!important;font-size:9px;position:absolute;right:-25px;top:0;z-index:3;font-weight:700}.opinionstage-content-popup-contents .dropbtn:after{border:1px solid #e4e4e4;border-left:0!important;content:"";height:45px;position:absolute;right:-40px;top:-1px;width:40px;height:38px}.opinionstage-content-popup-contents .dropdown{display:inline-block;position:relative}.opinionstage-content-popup-contents .dropdown:hover .popup-action-dropdown.dropdown-content{width:130px}.opinionstage-content-popup-contents .dropdown:hover .popup-action.popup-content-btn{background-color:#32adbc}.opinionstage-content-popup-contents .dropdown:hover .popup-action.popup-content-btn:before{color:#fff}.opinionstage-content-popup-contents .dropdown-popup-action{height:45px}.opinionstage-content-popup-contents .dropdown-content{background-color:#f9f9f9;-webkit-box-shadow:0 8px 16px 0 rgba(0,0,0,.2);box-shadow:0 8px 16px 0 rgba(0,0,0,.2);display:none;left:1px;position:absolute;top:40px;z-index:9}.opinionstage-content-popup-contents .dropdown-content div{background-color:#fff;border:1px solid #3487fa;border-bottom:0;border-top:0;color:#555454;display:block;padding:5px 10px 5px 20px;text-decoration:none}.opinionstage-content-popup-contents .dropdown-content div:hover{background-color:#3487fa;color:#fff!important}.opinionstage-content-popup-contents .dropdown_items .dropdown-content{width:180px}.opinionstage-content-popup-contents .dropdown:hover .dropdown-content{display:block!important;width:180px}.opinionstage-content-popup-contents .dropdown:hover .dropbtn{background-color:#fff}.opinionstage-content-popup-contents .popup-action:before{color:#32adbc;padding:0;position:absolute;right:18px;content:"\\E922";display:block;font-family:os-icon-font!important;font-size:9px;top:15px;z-index:3;font-weight:700}.opinionstage-content-popup-contents .popup-action.popup-content-btn{margin-left:10px;padding:12px 25px;position:relative}.opinionstage-content-popup-contents .popup-action-dropdown{background:#fff;border:1px solid #32adbc;border-radius:3px}.opinionstage-content-popup-contents .popup-action-dropdown .content__links-itm{border:none;border-bottom:1px solid #32adbc;border-radius:0;color:#32adbc;font-size:14px;font-weight:400;margin:0;padding:10px;width:auto;text-align:left!important;letter-spacing:1px}.opinionstage-content-popup-contents .popup-action-dropdown .content__links-itm:hover{background-color:#32adbc!important;color:#fff}.opinionstage-content-popup-contents .popup-action-dropdown .content__links-itm:last-child{border:none}.opinionstage-content-popup-contents .popup-action-dropdown.dropdown-content{left:auto;right:0;top:20px;z-index:10}',""])}]);
10
  * See https://raw.githubusercontent.com/tildeio/rsvp.js/master/LICENSE
11
  * @version 3.6.2
12
  */
13
+ function i(t,e){for(var n=0,o=t.length;n<o;n++)if(t[n]===e)return n;return-1}function a(t){var e=t._promiseCallbacks;return e||(e=t._promiseCallbacks={}),e}function s(t,e){if(2!==arguments.length)return xt[t];xt[t]=e}function c(t){var e=typeof t;return null!==t&&("object"===e||"function"===e)}function u(t){return"function"==typeof t}function l(t){return null!==t&&"object"==typeof t}function f(t){return null!==t&&"object"==typeof t}function p(){setTimeout(function(){for(var t=0;t<Ot.length;t++){var e=Ot[t],n=e.payload;n.guid=n.key+n.id,n.childGuid=n.key+n.childId,n.error&&(n.stack=n.error.stack),xt.trigger(e.name,e.payload)}Ot.length=0},50)}function d(t,e,n){1===Ot.push({name:t,payload:{key:e._guidKey,id:e._id,eventName:t,detail:e._result,childId:n&&n._id,label:e._label,timeStamp:Ct(),error:xt["instrument-with-stack"]?new Error(e._label):null}})&&p()}function h(t,e){var n=this;if(t&&"object"==typeof t&&t.constructor===n)return t;var o=new n(m,e);return x(o,t),o}function v(){return new TypeError("A promises callback cannot return that same promise.")}function m(){}function g(t){try{return t.then}catch(t){return At.error=t,At}}function y(t,e,n,o){try{t.call(e,n,o)}catch(t){return t}}function b(t,e,n){xt.async(function(t){var o=!1,r=y(n,e,function(n){o||(o=!0,e!==n?x(t,n,void 0):E(t,n))},function(e){o||(o=!0,C(t,e))},"Settle: "+(t._label||" unknown promise"));!o&&r&&(o=!0,C(t,r))},t)}function _(t,e){e._state===$t?E(t,e._result):e._state===St?(e._onError=null,C(t,e._result)):O(e,void 0,function(n){e!==n?x(t,n,void 0):E(t,n)},function(e){return C(t,e)})}function w(t,e,n){e.constructor===t.constructor&&n===I&&t.constructor.resolve===h?_(t,e):n===At?(C(t,At.error),At.error=null):u(n)?b(t,e,n):E(t,e)}function x(t,e){t===e?E(t,e):c(e)?w(t,e,g(e)):E(t,e)}function k(t){t._onError&&t._onError(t._result),T(t)}function E(t,e){t._state===Tt&&(t._result=e,t._state=$t,0===t._subscribers.length?xt.instrument&&d("fulfilled",t):xt.async(T,t))}function C(t,e){t._state===Tt&&(t._state=St,t._result=e,xt.async(k,t))}function O(t,e,n,o){var r=t._subscribers,i=r.length;t._onError=null,r[i]=e,r[i+$t]=n,r[i+St]=o,0===i&&t._state&&xt.async(T,t)}function T(t){var e=t._subscribers,n=t._state;if(xt.instrument&&d(n===$t?"fulfilled":"rejected",t),0!==e.length){for(var o=void 0,r=void 0,i=t._result,a=0;a<e.length;a+=3)o=e[a],r=e[a+n],o?A(n,o,r,i):r(i);t._subscribers.length=0}}function $(){this.error=null}function S(t,e){try{return t(e)}catch(t){return jt.error=t,jt}}function A(t,e,n,o){var r=u(n),i=void 0,a=void 0;if(r){if((i=S(n,o))===jt)a=i.error,i.error=null;else if(i===e)return void C(e,v())}else i=o;e._state!==Tt||(r&&void 0===a?x(e,i):void 0!==a?C(e,a):t===$t?E(e,i):t===St&&C(e,i))}function j(t,e){var n=!1;try{e(function(e){n||(n=!0,x(t,e))},function(e){n||(n=!0,C(t,e))})}catch(e){C(t,e)}}function I(t,e,n){var o=this,r=o._state;if(r===$t&&!t||r===St&&!e)return xt.instrument&&d("chained",o,o),o;o._onError=null;var i=new o.constructor(m,n),a=o._result;if(xt.instrument&&d("chained",o,i),r===Tt)O(o,i,t,e);else{var s=r===$t?t:e;xt.async(function(){return A(r,i,s,a)})}return i}function L(t,e,n){return t===$t?{state:"fulfilled",value:n}:{state:"rejected",reason:n}}function M(t,e){return Et(t)?new It(this,t,!0,e).promise:this.reject(new TypeError("Promise.all must be called with an array"),e)}function P(t,e){var n=this,o=new n(m,e);if(!Et(t))return C(o,new TypeError("Promise.race must be called with an array")),o;for(var r=0;o._state===Tt&&r<t.length;r++)O(n.resolve(t[r]),void 0,function(t){return x(o,t)},function(t){return C(o,t)});return o}function D(t,e){var n=this,o=new n(m,e);return C(o,t),o}function N(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function F(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function R(){this.value=void 0}function B(t){try{return t.then}catch(t){return Dt.value=t,Dt}}function W(t,e,n){try{t.apply(e,n)}catch(t){return Dt.value=t,Dt}}function U(t,e){for(var n={},o=t.length,r=new Array(o),i=0;i<o;i++)r[i]=t[i];for(var a=0;a<e.length;a++){n[e[a]]=r[a+1]}return n}function z(t){for(var e=t.length,n=new Array(e-1),o=1;o<e;o++)n[o-1]=t[o];return n}function H(t,e){return{then:function(n,o){return t.call(e,n,o)}}}function G(t,e){var n=function(){for(var n=this,o=arguments.length,r=new Array(o+1),i=!1,a=0;a<o;++a){var s=arguments[a];if(!i){if((i=q(s))===Nt){var c=new Pt(m);return C(c,Nt.value),c}i&&!0!==i&&(s=H(i,s))}r[a]=s}var u=new Pt(m);return r[o]=function(t,n){t?C(u,t):void 0===e?x(u,n):!0===e?x(u,z(arguments)):Et(e)?x(u,U(arguments,e)):x(u,n)},i?K(u,r,t,n):V(u,r,t,n)};return n.__proto__=t,n}function V(t,e,n,o){var r=W(n,o,e);return r===Dt&&C(t,r.value),t}function K(t,e,n,o){return Pt.all(e).then(function(e){var r=W(n,o,e);return r===Dt&&C(t,r.value),t})}function q(t){return!(!t||"object"!=typeof t)&&(t.constructor===Pt||B(t))}function J(t,e){return Pt.all(t,e)}function Z(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function Y(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function Q(t,e){return Et(t)?new Ft(Pt,t,e).promise:Pt.reject(new TypeError("Promise.allSettled must be called with an array"),e)}function X(t,e){return Pt.race(t,e)}function tt(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function et(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function nt(t,e){return l(t)?new Bt(Pt,t,e).promise:Pt.reject(new TypeError("Promise.hash must be called with an object"),e)}function ot(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function rt(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function it(t,e){return l(t)?new Wt(Pt,t,!1,e).promise:Pt.reject(new TypeError("RSVP.hashSettled must be called with an object"),e)}function at(t){throw setTimeout(function(){throw t}),t}function st(t){var e={resolve:void 0,reject:void 0};return e.promise=new Pt(function(t,n){e.resolve=t,e.reject=n},t),e}function ct(t,e,n){return Et(t)?u(e)?Pt.all(t,n).then(function(t){for(var o=t.length,r=new Array(o),i=0;i<o;i++)r[i]=e(t[i]);return Pt.all(r,n)}):Pt.reject(new TypeError("RSVP.map expects a function as a second argument"),n):Pt.reject(new TypeError("RSVP.map must be called with an array"),n)}function ut(t,e){return Pt.resolve(t,e)}function lt(t,e){return Pt.reject(t,e)}function ft(t,e){return Pt.all(t,e)}function pt(t,e){return Pt.resolve(t,e).then(function(t){return ft(t,e)})}function dt(t,e,n){return Et(t)||l(t)&&void 0!==t.then?u(e)?(Et(t)?ft(t,n):pt(t,n)).then(function(t){for(var o=t.length,r=new Array(o),i=0;i<o;i++)r[i]=e(t[i]);return ft(r,n).then(function(e){for(var n=new Array(o),r=0,i=0;i<o;i++)e[i]&&(n[r]=t[i],r++);return n.length=r,n})}):Pt.reject(new TypeError("RSVP.filter expects function as a second argument"),n):Pt.reject(new TypeError("RSVP.filter must be called with an array or promise"),n)}function ht(t,e){Jt[Ut]=t,Jt[Ut+1]=e,2===(Ut+=2)&&Zt()}function vt(){return void 0!==zt?function(){zt(gt)}:mt()}function mt(){return function(){return setTimeout(gt,1)}}function gt(){for(var t=0;t<Ut;t+=2){(0,Jt[t])(Jt[t+1]),Jt[t]=void 0,Jt[t+1]=void 0}Ut=0}function yt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function bt(){xt.on.apply(xt,arguments)}function _t(){xt.off.apply(xt,arguments)}n.d(e,"asap",function(){return ht}),n.d(e,"cast",function(){return Qt}),n.d(e,"Promise",function(){return Pt}),n.d(e,"EventTarget",function(){return wt}),n.d(e,"all",function(){return J}),n.d(e,"allSettled",function(){return Q}),n.d(e,"race",function(){return X}),n.d(e,"hash",function(){return nt}),n.d(e,"hashSettled",function(){return it}),n.d(e,"rethrow",function(){return at}),n.d(e,"defer",function(){return st}),n.d(e,"denodeify",function(){return G}),n.d(e,"configure",function(){return s}),n.d(e,"on",function(){return bt}),n.d(e,"off",function(){return _t}),n.d(e,"resolve",function(){return ut}),n.d(e,"reject",function(){return lt}),n.d(e,"map",function(){return ct}),n.d(e,"async",function(){return Xt}),n.d(e,"filter",function(){return dt});var wt={mixin:function(t){return t.on=this.on,t.off=this.off,t.trigger=this.trigger,t._promiseCallbacks=void 0,t},on:function(t,e){if("function"!=typeof e)throw new TypeError("Callback must be a function");var n=a(this),o=void 0;o=n[t],o||(o=n[t]=[]),-1===i(o,e)&&o.push(e)},off:function(t,e){var n=a(this),o=void 0,r=void 0;if(!e)return void(n[t]=[]);o=n[t],-1!==(r=i(o,e))&&o.splice(r,1)},trigger:function(t,e,n){var o=a(this),r=void 0;if(r=o[t])for(var i=0;i<r.length;i++)(0,r[i])(e,n)}},xt={instrument:!1};wt.mixin(xt);var kt=void 0;kt=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)};var Et=kt,Ct=Date.now||function(){return(new Date).getTime()},Ot=[],Tt=void 0,$t=1,St=2,At=new $,jt=new $,It=function(){function t(t,e,n,o){this._instanceConstructor=t,this.promise=new t(m,o),this._abortOnReject=n,this._init.apply(this,arguments)}return t.prototype._init=function(t,e){var n=e.length||0;this.length=n,this._remaining=n,this._result=new Array(n),this._enumerate(e),0===this._remaining&&E(this.promise,this._result)},t.prototype._enumerate=function(t){for(var e=this.length,n=this.promise,o=0;n._state===Tt&&o<e;o++)this._eachEntry(t[o],o)},t.prototype._settleMaybeThenable=function(t,e){var n=this._instanceConstructor,o=n.resolve;if(o===h){var r=g(t);if(r===I&&t._state!==Tt)t._onError=null,this._settledAt(t._state,e,t._result);else if("function"!=typeof r)this._remaining--,this._result[e]=this._makeResult($t,e,t);else if(n===Pt){var i=new n(m);w(i,t,r),this._willSettleAt(i,e)}else this._willSettleAt(new n(function(e){return e(t)}),e)}else this._willSettleAt(o(t),e)},t.prototype._eachEntry=function(t,e){f(t)?this._settleMaybeThenable(t,e):(this._remaining--,this._result[e]=this._makeResult($t,e,t))},t.prototype._settledAt=function(t,e,n){var o=this.promise;o._state===Tt&&(this._abortOnReject&&t===St?C(o,n):(this._remaining--,this._result[e]=this._makeResult(t,e,n),0===this._remaining&&E(o,this._result)))},t.prototype._makeResult=function(t,e,n){return n},t.prototype._willSettleAt=function(t,e){var n=this;O(t,void 0,function(t){return n._settledAt($t,e,t)},function(t){return n._settledAt(St,e,t)})},t}(),Lt="rsvp_"+Ct()+"-",Mt=0,Pt=function(){function t(e,n){this._id=Mt++,this._label=n,this._state=void 0,this._result=void 0,this._subscribers=[],xt.instrument&&d("created",this),m!==e&&("function"!=typeof e&&N(),this instanceof t?j(this,e):F())}return t.prototype._onError=function(t){var e=this;xt.after(function(){e._onError&&xt.trigger("error",t,e._label)})},t.prototype.catch=function(t,e){return this.then(void 0,t,e)},t.prototype.finally=function(t,e){var n=this,o=n.constructor;return n.then(function(e){return o.resolve(t()).then(function(){return e})},function(e){return o.resolve(t()).then(function(){throw e})},e)},t}();Pt.cast=h,Pt.all=M,Pt.race=P,Pt.resolve=h,Pt.reject=D,Pt.prototype._guidKey=Lt,Pt.prototype.then=I;var Dt=new R,Nt=new R,Ft=function(t){function e(e,n,o){return Z(this,t.call(this,e,n,!1,o))}return Y(e,t),e}(It);Ft.prototype._makeResult=L;var Rt=Object.prototype.hasOwnProperty,Bt=function(t){function e(e,n){var o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments[3];return tt(this,t.call(this,e,n,o,r))}return et(e,t),e.prototype._init=function(t,e){this._result={},this._enumerate(e),0===this._remaining&&E(this.promise,this._result)},e.prototype._enumerate=function(t){var e=this.promise,n=[];for(var o in t)Rt.call(t,o)&&n.push({position:o,entry:t[o]});var r=n.length;this._remaining=r;for(var i=void 0,a=0;e._state===Tt&&a<r;a++)i=n[a],this._eachEntry(i.entry,i.position)},e}(It),Wt=function(t){function e(e,n,o){return ot(this,t.call(this,e,n,!1,o))}return rt(e,t),e}(Bt);Wt.prototype._makeResult=L;var Ut=0,zt=void 0,Ht="undefined"!=typeof window?window:void 0,Gt=Ht||{},Vt=Gt.MutationObserver||Gt.WebKitMutationObserver,Kt="undefined"==typeof self&&void 0!==t&&"[object process]"==={}.toString.call(t),qt="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,Jt=new Array(1e3),Zt=void 0;Zt=Kt?function(){var e=t.nextTick,n=t.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/);return Array.isArray(n)&&"0"===n[1]&&"10"===n[2]&&(e=o),function(){return e(gt)}}():Vt?function(){var t=0,e=new Vt(gt),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){return n.data=t=++t%2}}():qt?function(){var t=new MessageChannel;return t.port1.onmessage=gt,function(){return t.port2.postMessage(0)}}():void 0===Ht?function(){try{var t=n(20);return zt=t.runOnLoop||t.runOnContext,vt()}catch(t){return mt()}}():mt();if("object"==typeof self)self;else{if("object"!=typeof r)throw new Error("no global: `self` or `global` found");r}var Yt;xt.async=ht,xt.after=function(t){return setTimeout(t,0)};var Qt=ut,Xt=function(t,e){return xt.async(t,e)};if("undefined"!=typeof window&&"object"==typeof window.__PROMISE_INSTRUMENTATION__){var te=window.__PROMISE_INSTRUMENTATION__;s("instrument",!0);for(var ee in te)te.hasOwnProperty(ee)&&bt(ee,te[ee])}var ne=(Yt={asap:ht,cast:Qt,Promise:Pt,EventTarget:wt,all:J,allSettled:Q,race:X,hash:nt,hashSettled:it,rethrow:at,defer:st,denodeify:G,configure:s,on:bt,off:_t,resolve:ut,reject:lt,map:ct},yt(Yt,"async",Xt),yt(Yt,"filter",dt),Yt);e.default=ne}.call(e,n(6),n(5).setImmediate,n(0))},function(t,e,n){(function(t,n){function o(t,e){return null==t?void 0:t[e]}function r(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}function i(t){return B.call(t)}function a(t){return!(!g(t)||c(t))&&(v(t)||r(t)?W:T).test(l(t))}function s(t,e){var n=o(t,e);return a(n)?n:void 0}function c(t){return!!N&&N in t}function u(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||P)}function l(t){if(null!=t){try{return F.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function f(t){return d(t)&&R.call(t,"callee")&&(!z.call(t,"callee")||B.call(t)==w)}function p(t){return null!=t&&m(t.length)&&!v(t)}function d(t){return y(t)&&p(t)}function h(t){if(p(t)&&(rt(t)||"string"==typeof t||"function"==typeof t.splice||it(t)||f(t)))return!t.length;var e=ot(t);if(e==E||e==C)return!t.size;if(Y||u(t))return!G(t).length;for(var n in t)if(R.call(t,n))return!1;return!0}function v(t){var e=g(t)?B.call(t):"";return e==x||e==k}function m(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=_}function g(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function y(t){return!!t&&"object"==typeof t}function b(){return!1}var _=9007199254740991,w="[object Arguments]",x="[object Function]",k="[object GeneratorFunction]",E="[object Map]",C="[object Set]",O=/[\\^$.*+?()[\]{}|]/g,T=/^\[object .+?Constructor\]$/,$="object"==typeof t&&t&&t.Object===Object&&t,S="object"==typeof self&&self&&self.Object===Object&&self,A=$||S||Function("return this")(),j="object"==typeof e&&e&&!e.nodeType&&e,I=j&&"object"==typeof n&&n&&!n.nodeType&&n,L=I&&I.exports===j,M=Function.prototype,P=Object.prototype,D=A["__core-js_shared__"],N=function(){var t=/[^.]+$/.exec(D&&D.keys&&D.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),F=M.toString,R=P.hasOwnProperty,B=P.toString,W=RegExp("^"+F.call(R).replace(O,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),U=L?A.Buffer:void 0,z=P.propertyIsEnumerable,H=U?U.isBuffer:void 0,G=function(t,e){return function(n){return t(e(n))}}(Object.keys,Object),V=s(A,"DataView"),K=s(A,"Map"),q=s(A,"Promise"),J=s(A,"Set"),Z=s(A,"WeakMap"),Y=!z.call({valueOf:1},"valueOf"),Q=l(V),X=l(K),tt=l(q),et=l(J),nt=l(Z),ot=i;(V&&"[object DataView]"!=ot(new V(new ArrayBuffer(1)))||K&&ot(new K)!=E||q&&"[object Promise]"!=ot(q.resolve())||J&&ot(new J)!=C||Z&&"[object WeakMap]"!=ot(new Z))&&(ot=function(t){var e=B.call(t),n="[object Object]"==e?t.constructor:void 0,o=n?l(n):void 0;if(o)switch(o){case Q:return"[object DataView]";case X:return E;case tt:return"[object Promise]";case et:return C;case nt:return"[object WeakMap]"}return e});var rt=Array.isArray,it=H||b;n.exports=h}).call(e,n(0),n(21)(t))},function(t,e){function n(t,e){return t?r.call(t,e):""}var o=Array.prototype,r=o.join;t.exports=n},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(7),r=jQuery;e.default={get:function(t,e,n){return new o.Promise(function(o,i){r.getJSON({url:t,beforeSend:function(t){t.setRequestHeader("Accept","application/vnd.api+json"),t.setRequestHeader("Content-Type","application/vnd.api+json"),t.setRequestHeader("OSWP-Plugin-Version",e),n&&t.setRequestHeader("OSWP-Client-Token",n)}}).done(o).fail(i)})}}},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),a=n(12),s=o(a),c=n(17),u=o(c),l=n(2);window.OpinionStage&&void 0!==OpinionStage.contentPopup&&console.warn("[OpinionStage] content-popup APIs was already included"),function(t,e){function n(){var t=this;t.modal=new s.default({content:e("[data-opinionstage-content-popup-template]").html(),onCreate:function(e){t.app=new u.default(e)},onClose:function(e){t.app.isModalOpened=!1},onOpen:function(e){t.app.isModalOpened=!0}})}var o=function(){function t(){r(this,t),this.app=void 0,this.modal=void 0}return i(t,[{key:"open",value:function(t){var o=this,r=t.preselectWidgetType,i=t.onWidgetSelect;if("function"!=typeof i)throw new Error("onWidgetSelect must be a function");e(function(){o.app||n.call(o),o.app.widgetType=r||l.WIDGET_ALL,o.app.widgetSelectCb=i,o.modal.open()})}}]),t}();t.contentPopup=new o,t.contentPopup.WIDGET_ALL=l.WIDGET_ALL,t.contentPopup.WIDGET_POLL=l.WIDGET_POLL,t.contentPopup.WIDGET_SET=l.WIDGET_SET,t.contentPopup.WIDGET_SURVEY=l.WIDGET_SURVEY,t.contentPopup.WIDGET_SLIDESHOW=l.WIDGET_SLIDESHOW,t.contentPopup.WIDGET_TRIVIA_QUIZ=l.WIDGET_TRIVIA_QUIZ,t.contentPopup.WIDGET_PERSONALITY_QUIZ=l.WIDGET_PERSONALITY_QUIZ,t.contentPopup.WIDGET_LIST=l.WIDGET_LIST,t.contentPopup.WIDGET_FORM=l.WIDGET_FORM,t.contentPopup.WIDGET_STORY=l.WIDGET_STORY}(window.OpinionStage=window.OpinionStage||{},jQuery),jQuery(function(t){function e(t){wp.media.editor.insert(t.shortcode)}window.location.href.indexOf("modal_is_open")>-1&&(OpinionStage.contentPopup.open({onWidgetSelect:e}),modal.open()),t("body").on("click","[data-opinionstage-content-launch]",function(t){t.preventDefault(),OpinionStage.contentPopup.open({onWidgetSelect:e})})})},function(t,e,n){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),i=n(13),a=function(t){return t&&t.__esModule?t:{default:t}}(i);n(14);var s=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(this,t),this.modal=new a.default.modal({closeMethods:["overlay","escape"],cssClass:["opinionstage-content-popup"],onClose:e.onClose,onOpen:e.onOpen}),this.modal.setContent(e.content),"function"==typeof e.onCreate&&e.onCreate(this)}return r(t,[{key:"open",value:function(){this.modal.open()}},{key:"close",value:function(){this.modal.close()}},{key:"checkOverflow",value:function(){this.modal.checkOverflow()}}]),t}();e.default=s},function(t,e,n){var o,r;!function(i,a){o=a,void 0!==(r="function"==typeof o?o.call(e,n,e,t):o)&&(t.exports=r)}(0,function(){function t(t){var e={onClose:null,onOpen:null,beforeClose:null,stickyFooter:!1,footer:!1,cssClass:[],closeLabel:"Close",closeMethods:["overlay","button","escape"]};this.opts=u({},e,t),this.init()}function e(){this.modalBoxFooter&&(this.modalBoxFooter.style.width=this.modalBox.clientWidth+"px",this.modalBoxFooter.style.left=this.modalBox.offsetLeft+"px")}function n(){this.modal=document.createElement("div"),this.modal.classList.add("tingle-modal"),0!==this.opts.closeMethods.length&&-1!==this.opts.closeMethods.indexOf("overlay")||this.modal.classList.add("tingle-modal--noOverlayClose"),this.modal.style.display="none",this.opts.cssClass.forEach(function(t){"string"==typeof t&&this.modal.classList.add(t)},this),-1!==this.opts.closeMethods.indexOf("button")&&(this.modalCloseBtn=document.createElement("button"),this.modalCloseBtn.classList.add("tingle-modal__close"),this.modalCloseBtnIcon=document.createElement("span"),this.modalCloseBtnIcon.classList.add("tingle-modal__closeIcon"),this.modalCloseBtnIcon.innerHTML="×",this.modalCloseBtnLabel=document.createElement("span"),this.modalCloseBtnLabel.classList.add("tingle-modal__closeLabel"),this.modalCloseBtnLabel.innerHTML=this.opts.closeLabel,this.modalCloseBtn.appendChild(this.modalCloseBtnIcon),this.modalCloseBtn.appendChild(this.modalCloseBtnLabel)),this.modalBox=document.createElement("div"),this.modalBox.classList.add("tingle-modal-box"),this.modalBoxContent=document.createElement("div"),this.modalBoxContent.classList.add("tingle-modal-box__content"),this.modalBox.appendChild(this.modalBoxContent),-1!==this.opts.closeMethods.indexOf("button")&&this.modal.appendChild(this.modalCloseBtn),this.modal.appendChild(this.modalBox)}function o(){this.modalBoxFooter=document.createElement("div"),this.modalBoxFooter.classList.add("tingle-modal-box__footer"),this.modalBox.appendChild(this.modalBoxFooter)}function r(){this._events={clickCloseBtn:this.close.bind(this),clickOverlay:a.bind(this),resize:this.checkOverflow.bind(this),keyboardNav:i.bind(this)},-1!==this.opts.closeMethods.indexOf("button")&&this.modalCloseBtn.addEventListener("click",this._events.clickCloseBtn),this.modal.addEventListener("mousedown",this._events.clickOverlay),window.addEventListener("resize",this._events.resize),document.addEventListener("keydown",this._events.keyboardNav)}function i(t){-1!==this.opts.closeMethods.indexOf("escape")&&27===t.which&&this.isOpen()&&this.close()}function a(t){-1!==this.opts.closeMethods.indexOf("overlay")&&!s(t.target,"tingle-modal")&&t.clientX<this.modal.clientWidth&&this.close()}function s(t,e){for(;(t=t.parentElement)&&!t.classList.contains(e););return t}function c(){-1!==this.opts.closeMethods.indexOf("button")&&this.modalCloseBtn.removeEventListener("click",this._events.clickCloseBtn),this.modal.removeEventListener("mousedown",this._events.clickOverlay),window.removeEventListener("resize",this._events.resize),document.removeEventListener("keydown",this._events.keyboardNav)}function u(){for(var t=1;t<arguments.length;t++)for(var e in arguments[t])arguments[t].hasOwnProperty(e)&&(arguments[0][e]=arguments[t][e]);return arguments[0]}var l=function(){var t,e=document.createElement("tingle-test-transition"),n={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(t in n)if(void 0!==e.style[t])return n[t]}();return t.prototype.init=function(){this.modal||(n.call(this),r.call(this),document.body.insertBefore(this.modal,document.body.firstChild),this.opts.footer&&this.addFooter())},t.prototype.destroy=function(){null!==this.modal&&(c.call(this),this.modal.parentNode.removeChild(this.modal),this.modal=null)},t.prototype.open=function(){this.modal.style.removeProperty?this.modal.style.removeProperty("display"):this.modal.style.removeAttribute("display"),document.body.classList.add("tingle-enabled"),this.setStickyFooter(this.opts.stickyFooter),this.modal.classList.add("tingle-modal--visible");var t=this;l?this.modal.addEventListener(l,function e(){"function"==typeof t.opts.onOpen&&t.opts.onOpen.call(t),t.modal.removeEventListener(l,e,!1)},!1):"function"==typeof t.opts.onOpen&&t.opts.onOpen.call(t),this.checkOverflow()},t.prototype.isOpen=function(){return!!this.modal.classList.contains("tingle-modal--visible")},t.prototype.close=function(){if("function"==typeof this.opts.beforeClose){if(!this.opts.beforeClose.call(this))return}document.body.classList.remove("tingle-enabled"),this.modal.classList.remove("tingle-modal--visible");var t=this;l?this.modal.addEventListener(l,function e(){t.modal.removeEventListener(l,e,!1),t.modal.style.display="none","function"==typeof t.opts.onClose&&t.opts.onClose.call(this)},!1):(t.modal.style.display="none","function"==typeof t.opts.onClose&&t.opts.onClose.call(this))},t.prototype.setContent=function(t){"string"==typeof t?this.modalBoxContent.innerHTML=t:(this.modalBoxContent.innerHTML="",this.modalBoxContent.appendChild(t))},t.prototype.getContent=function(){return this.modalBoxContent},t.prototype.addFooter=function(){o.call(this)},t.prototype.setFooterContent=function(t){this.modalBoxFooter.innerHTML=t},t.prototype.getFooterContent=function(){return this.modalBoxFooter},t.prototype.setStickyFooter=function(t){this.isOverflow()||(t=!1),t?this.modalBox.contains(this.modalBoxFooter)&&(this.modalBox.removeChild(this.modalBoxFooter),this.modal.appendChild(this.modalBoxFooter),this.modalBoxFooter.classList.add("tingle-modal-box__footer--sticky"),e.call(this),this.modalBoxContent.style["padding-bottom"]=this.modalBoxFooter.clientHeight+20+"px"):this.modalBoxFooter&&(this.modalBox.contains(this.modalBoxFooter)||(this.modal.removeChild(this.modalBoxFooter),this.modalBox.appendChild(this.modalBoxFooter),this.modalBoxFooter.style.width="auto",this.modalBoxFooter.style.left="",this.modalBoxContent.style["padding-bottom"]="",this.modalBoxFooter.classList.remove("tingle-modal-box__footer--sticky")))},t.prototype.addFooterBtn=function(t,e,n){var o=document.createElement("button");return o.innerHTML=t,o.addEventListener("click",n),"string"==typeof e&&e.length&&e.split(" ").forEach(function(t){o.classList.add(t)}),this.modalBoxFooter.appendChild(o),o},t.prototype.resize=function(){console.warn("Resize is deprecated and will be removed in version 1.0")},t.prototype.isOverflow=function(){var t=window.innerHeight;return this.modalBox.clientHeight>=t},t.prototype.checkOverflow=function(){this.modal.classList.contains("tingle-modal--visible")&&(this.isOverflow()?this.modal.classList.add("tingle-modal--overflow"):this.modal.classList.remove("tingle-modal--overflow"),!this.isOverflow()&&this.opts.stickyFooter?this.setStickyFooter(!1):this.isOverflow()&&this.opts.stickyFooter&&(e.call(this),this.setStickyFooter(!0)))},{modal:t}})},function(t,e,n){var o=n(15);"string"==typeof o&&(o=[[t.i,o,""]]);var r={};r.transform=void 0;n(4)(o,r);o.locals&&(t.exports=o.locals)},function(t,e,n){e=t.exports=n(3)(!1),e.push([t.i,".opinionstage-content-popup.tingle-modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:159900;display:flex;visibility:hidden;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;overflow:auto;background:rgba(0,0,0,.8);opacity:0;cursor:pointer;-webkit-transition:-webkit-transform .2s ease;transition:-webkit-transform .2s ease;transition:transform .2s ease;transition:transform .2s ease,-webkit-transform .2s ease}.opinionstage-content-popup.tingle-modal *{-webkit-box-sizing:border-box;box-sizing:border-box}.opinionstage-content-popup .tingle-modal-box{position:relative;-ms-flex-negative:0;flex-shrink:0;margin-top:auto;margin-bottom:auto;background:#fff;opacity:1;cursor:auto;-webkit-transition:-webkit-transform .3s cubic-bezier(.175,.885,.32,1.275);transition:-webkit-transform .3s cubic-bezier(.175,.885,.32,1.275);transition:transform .3s cubic-bezier(.175,.885,.32,1.275);transition:transform .3s cubic-bezier(.175,.885,.32,1.275),-webkit-transform .3s cubic-bezier(.175,.885,.32,1.275);-webkit-transform:scale(.8);transform:scale(.8)}@media only screen and (max-width:875px){.opinionstage-content-popup .tingle-modal-box{min-width:100%;overflow:hidden;width:100%}}.opinionstage-content-popup .tingle-modal-box__content{padding:0}.opinionstage-content-popup.tingle-modal--visible{visibility:visible;opacity:1}.opinionstage-content-popup.tingle-modal--visible .tingle-modal-box{-webkit-transform:scale(1);transform:scale(1)}@media (max-width:540px){.opinionstage-content-popup .tingle-modal-box{width:auto}.opinionstage-content-popup.tingle-modal{top:60px;display:block;width:100%}.opinionstage-content-popup.tingle-modal--overflow{padding:0}}.tingle-enabled{overflow:hidden;height:100%}.tingle-enabled .tingle-content-wrapper{-webkit-filter:blur(15px);filter:blur(15px)}",""])},function(t,e){t.exports=function(t){var e="undefined"!=typeof window&&window.location;if(!e)throw new Error("fixUrls requires window.location");if(!t||"string"!=typeof t)return t;var n=e.protocol+"//"+e.host,o=n+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(t,e){var r=e.trim().replace(/^"(.*)"$/,function(t,e){return e}).replace(/^'(.*)'$/,function(t,e){return e});if(/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/)/i.test(r))return t;var i;return i=0===r.indexOf("//")?r:0===r.indexOf("/")?n+r:o+r.replace(/^\.\//,""),"url("+JSON.stringify(i)+")"})}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return new r.default({el:"[data-opinionstage-content-popup]",data:{widgetType:i.WIDGET_ALL,widgetSelectCb:function(t){console.log("dumb widget insert callback, widget:",t)},showClientContent:!0,isClientLoggedIn:null,isModalOpened:!1},beforeMount:function(){this.isClientLoggedIn="1"===this.$el.dataset.opinionstageClientLoggedIn},methods:{closePopup:function(){t.close()},selectWidgetAndExit:function(t){this.widgetSelectCb(t),this.closePopup()}}})};var o=n(1),r=function(t){return t&&t.__esModule?t:{default:t}}(o);n(19),n(25),n(27),n(28);var i=n(2)},function(t,e,n){(function(t,e){!function(t,n){"use strict";function o(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n<e.length;n++)e[n]=arguments[n+1];var o={callback:t,args:e};return u[c]=o,s(c),c++}function r(t){delete u[t]}function i(t){var e=t.callback,o=t.args;switch(o.length){case 0:e();break;case 1:e(o[0]);break;case 2:e(o[0],o[1]);break;case 3:e(o[0],o[1],o[2]);break;default:e.apply(n,o)}}function a(t){if(l)setTimeout(a,0,t);else{var e=u[t];if(e){l=!0;try{i(e)}finally{r(t),l=!1}}}}if(!t.setImmediate){var s,c=1,u={},l=!1,f=t.document,p=Object.getPrototypeOf&&Object.getPrototypeOf(t);p=p&&p.setTimeout?p:t,"[object process]"==={}.toString.call(t.process)?function(){s=function(t){e.nextTick(function(){a(t)})}}():function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?function(){var e="setImmediate$"+Math.random()+"$",n=function(n){n.source===t&&"string"==typeof n.data&&0===n.data.indexOf(e)&&a(+n.data.slice(e.length))};t.addEventListener?t.addEventListener("message",n,!1):t.attachEvent("onmessage",n),s=function(n){t.postMessage(e+n,"*")}}():t.MessageChannel?function(){var t=new MessageChannel;t.port1.onmessage=function(t){a(t.data)},s=function(e){t.port2.postMessage(e)}}():f&&"onreadystatechange"in f.createElement("script")?function(){var t=f.documentElement;s=function(e){var n=f.createElement("script");n.onreadystatechange=function(){a(e),n.onreadystatechange=null,t.removeChild(n),n=null},t.appendChild(n)}}():function(){s=function(t){setTimeout(a,0,t)}}(),p.setImmediate=o,p.clearImmediate=r}}("undefined"==typeof self?void 0===t?this:t:self)}).call(e,n(0),n(6))},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function r(){var t=this;return this.dataLoading=!0,(this.showClientContent?i:a).call(this,this.searchCriteria).then(function(){t.noMoreData=!u(t.$store.state.nextPageNumber),t.dataLoading=!1})}function i(t){return this.clientIsLoggedIn?this.$store.dispatch({type:"loadClientWidgets",widgetsUrl:this.clientWidgetsUrl,pluginVersion:this.pluginVersion,accessToken:this.accessKey,filtering:t}):g.default.resolve()}function a(t){return this.$store.dispatch({type:"loadTemplateWidgets",widgetsUrl:this.sharedWidgetsUrl,pluginVersion:this.pluginVersion,filtering:t})}function s(t,e,n){var o=[];return e&&o.push("type="+e),n&&o.push("updated_at="+n),(0,b.default)(o)?t:t+"?"+(0,w.default)(o,"&")}function c(t,e){var n=this,o=s(this.clientWidgetsHasNewUrl,t,e);return C.default.get(o,this.pluginVersion,this.accessKey).then(function(t){n.newWidgetsAvailable=t.data["has-new-widgets"]}).catch(function(t){console.error("[social-polls-by-opinionstage][content-popup] can't load widgets:",t.statusText)})}function u(t){return t>1}function l(){var t=this;c.call(this,this.searchCriteria.type,this.lastUpdateTime).then(function(){t.newWidgetsAvailable&&p.call(t)})}function f(){this.clientIsLoggedIn&&(this.isCheckingWidgetUpdates=!0,this.widgetUpdatesChecker=setInterval(l.bind(this),3e3))}function p(){this.isCheckingWidgetUpdates=!1,clearInterval(this.widgetUpdatesChecker)}function d(){void 0!==this.widgets[0]?this.lastUpdateTime=this.widgets[0].updatedAt:this.lastUpdateTime=null}Object.defineProperty(e,"__esModule",{value:!0});var h=n(1),v=o(h),m=n(7),g=o(m),y=n(8),b=o(y),_=n(9),w=o(_),x=n(22),k=o(x),E=n(10),C=o(E),O=n(2);e.default=v.default.component("popup-content",{template:"#opinionstage-popup-content",props:["showClientContent","clientIsLoggedIn","modalIsOpened","widgetType","clientWidgetsUrl","sharedWidgetsUrl","clientWidgetsHasNewUrl","accessKey","pluginVersion"],data:function(){return{dataLoading:!1,widgets:[],searchCriteria:{},noMoreData:!0,newWidgetsAvailable:!1,lastUpdateTime:null,isCheckingWidgetUpdates:!1,widgetUpdatesChecker:null}},store:k.default,methods:{reloadData:function(t){var e=this;t||(t={});var n=t.widgetType||this.widgetType||this.searchCriteria.type||O.WIDGET_ALL,o=t.widgetTitle||"";this.newWidgetsAvailable=!1,p.call(this),this.searchCriteria={page:1,perPage:9,type:n,title:o},this.$store.commit("clearWidgets"),r.call(this).then(function(){e.widgets=e.$store.state.widgets[0],e.searchCriteria.title||d.call(e),f.call(e)})},reloadAndRestartCheckingForUpdates:function(){this.reloadData({widgetType:this.searchCriteria.type,widgetTitle:""})},appendData:function(){var t=this;this.searchCriteria.page+=1,r.call(this).then(function(){var e=t.$store.state.widgets[t.searchCriteria.page-1];t.widgets=t.widgets.concat(e)})},widgetSelected:function(t){this.$emit("widget-selected",t)}},watch:{modalIsOpened:function(t){t&&this.showClientContent&&this.clientIsLoggedIn?this.reloadData():(this.newWidgetsAvailable=!1,p.call(this))},showClientContent:function(t){t&&this.modalIsOpened&&this.clientIsLoggedIn?f.call(this):p.call(this)}}})},function(t,e){},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function r(t){return t.data.map(function(t){return{id:t.id,type:t.attributes.type,title:t.attributes.title,imageUrl:t.attributes["image-url"],updatedAt:t.attributes["updated-at"],landingPageUrl:t.attributes["landing-page-url"],editUrl:t.attributes["edit-url"],statsUrl:t.attributes["stats-url"],shortcode:t.attributes.shortcode}})}function i(t){return t.meta.nextPage}function a(t,e){var n=e.type,o=e.title,r=e.page,i=e.perPage,a=[];if(n&&a.push("type="+n),!(0,h.default)(o)){var s=(0,p.default)(o);(0,h.default)(s)||a.push("title_like="+s)}return r&&a.push("page="+r),i&&a.push("per_page="+i),(0,h.default)(a)?t:t+"?"+(0,m.default)(a,"&")}Object.defineProperty(e,"__esModule",{value:!0});var s=n(1),c=o(s),u=n(23),l=o(u),f=n(24),p=o(f),d=n(8),h=o(d),v=n(9),m=o(v),g=n(10),y=o(g);c.default.use(l.default),e.default=new l.default.Store({state:{widgets:[],nextPageNumber:null},mutations:{loadWidgets:function(t,e){var n=e.widgetsData;t.widgets.push(r(n)),t.nextPageNumber=i(n)},loadTemplateWidgets:function(t,e){var n=e.widgetsData;t.widgets.push(r(n).map(function(t){return t.template=!0,t})),t.nextPageNumber=i(n)},clearWidgets:function(t){t.widgets=[],t.nextPageNumber=null}},actions:{loadClientWidgets:function(t,e){return(0,t.dispatch)("load",{commitType:"loadWidgets",widgetsUrl:e.widgetsUrl,pluginVersion:e.pluginVersion,accessToken:e.accessToken,filtering:e.filtering})},loadTemplateWidgets:function(t,e){return(0,t.dispatch)("load",{commitType:"loadTemplateWidgets",widgetsUrl:e.widgetsUrl,pluginVersion:e.pluginVersion,filtering:e.filtering})},load:function(t,e){var n=t.commit,o=e.commitType,r=e.widgetsUrl,i=e.filtering,s=e.pluginVersion,c=e.accessToken,u=a(r,i);return y.default.get(u,s,c).then(function(t){n({type:o,widgetsData:t})}).catch(function(t){console.error("[social-polls-by-opinionstage][content-popup] can't load widgets:",t.statusText)})}}})},function(t,e,n){"use strict";function o(t){C&&(t._devtoolHook=C,C.emit("vuex:init",t),C.on("vuex:travel-to-state",function(e){t.replaceState(e)}),t.subscribe(function(t,e){C.emit("vuex:mutation",t,e)}))}function r(t,e){Object.keys(t).forEach(function(n){return e(t[n],n)})}function i(t){return null!==t&&"object"==typeof t}function a(t){return t&&"function"==typeof t.then}function s(t,e,n){if(e.update(n),n.modules)for(var o in n.modules){if(!e.getChild(o))return;s(t.concat(o),e.getChild(o),n.modules[o])}}function c(t,e){return e.indexOf(t)<0&&e.push(t),function(){var n=e.indexOf(t);n>-1&&e.splice(n,1)}}function u(t,e){t._actions=Object.create(null),t._mutations=Object.create(null),t._wrappedGetters=Object.create(null),t._modulesNamespaceMap=Object.create(null);var n=t.state;f(t,n,[],t._modules.root,!0),l(t,n,e)}function l(t,e,n){var o=t._vm;t.getters={};var i=t._wrappedGetters,a={};r(i,function(e,n){a[n]=function(){return e(t)},Object.defineProperty(t.getters,n,{get:function(){return t._vm[n]},enumerable:!0})});var s=S.config.silent;S.config.silent=!0,t._vm=new S({data:{$$state:e},computed:a}),S.config.silent=s,t.strict&&g(t),o&&(n&&t._withCommit(function(){o._data.$$state=null}),S.nextTick(function(){return o.$destroy()}))}function f(t,e,n,o,r){var i=!n.length,a=t._modules.getNamespace(n);if(o.namespaced&&(t._modulesNamespaceMap[a]=o),!i&&!r){var s=y(e,n.slice(0,-1)),c=n[n.length-1];t._withCommit(function(){S.set(s,c,o.state)})}var u=o.context=p(t,a,n);o.forEachMutation(function(e,n){h(t,a+n,e,u)}),o.forEachAction(function(e,n){var o=e.root?n:a+n,r=e.handler||e;v(t,o,r,u)}),o.forEachGetter(function(e,n){m(t,a+n,e,u)}),o.forEachChild(function(o,i){f(t,e,n.concat(i),o,r)})}function p(t,e,n){var o=""===e,r={dispatch:o?t.dispatch:function(n,o,r){var i=b(n,o,r),a=i.payload,s=i.options,c=i.type;return s&&s.root||(c=e+c),t.dispatch(c,a)},commit:o?t.commit:function(n,o,r){var i=b(n,o,r),a=i.payload,s=i.options,c=i.type;s&&s.root||(c=e+c),t.commit(c,a,s)}};return Object.defineProperties(r,{getters:{get:o?function(){return t.getters}:function(){return d(t,e)}},state:{get:function(){return y(t.state,n)}}}),r}function d(t,e){var n={},o=e.length;return Object.keys(t.getters).forEach(function(r){if(r.slice(0,o)===e){var i=r.slice(o);Object.defineProperty(n,i,{get:function(){return t.getters[r]},enumerable:!0})}}),n}function h(t,e,n,o){(t._mutations[e]||(t._mutations[e]=[])).push(function(e){n.call(t,o.state,e)})}function v(t,e,n,o){(t._actions[e]||(t._actions[e]=[])).push(function(e,r){var i=n.call(t,{dispatch:o.dispatch,commit:o.commit,getters:o.getters,state:o.state,rootGetters:t.getters,rootState:t.state},e,r);return a(i)||(i=Promise.resolve(i)),t._devtoolHook?i.catch(function(e){throw t._devtoolHook.emit("vuex:error",e),e}):i})}function m(t,e,n,o){t._wrappedGetters[e]||(t._wrappedGetters[e]=function(t){return n(o.state,o.getters,t.state,t.getters)})}function g(t){t._vm.$watch(function(){return this._data.$$state},function(){},{deep:!0,sync:!0})}function y(t,e){return e.length?e.reduce(function(t,e){return t[e]},t):t}function b(t,e,n){return i(t)&&t.type&&(n=e,e=t,t=t.type),{type:t,payload:e,options:n}}function _(t){S&&t===S||(S=t,E(S))}function w(t){return Array.isArray(t)?t.map(function(t){return{key:t,val:t}}):Object.keys(t).map(function(e){return{key:e,val:t[e]}})}function x(t){return function(e,n){return"string"!=typeof e?(n=e,e=""):"/"!==e.charAt(e.length-1)&&(e+="/"),t(e,n)}}function k(t,e,n){return t._modulesNamespaceMap[n]}Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"Store",function(){return A}),n.d(e,"install",function(){return _}),n.d(e,"mapState",function(){return I}),n.d(e,"mapMutations",function(){return L}),n.d(e,"mapGetters",function(){return M}),n.d(e,"mapActions",function(){return P}),n.d(e,"createNamespacedHelpers",function(){return D});/**
14
  * vuex v2.5.0
15
  * (c) 2017 Evan You
16
  * @license MIT
17
  */
18
+ var E=function(t){function e(){var t=this.$options;t.store?this.$store="function"==typeof t.store?t.store():t.store:t.parent&&t.parent.$store&&(this.$store=t.parent.$store)}if(Number(t.version.split(".")[0])>=2)t.mixin({beforeCreate:e});else{var n=t.prototype._init;t.prototype._init=function(t){void 0===t&&(t={}),t.init=t.init?[e].concat(t.init):e,n.call(this,t)}}},C="undefined"!=typeof window&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__,O=function(t,e){this.runtime=e,this._children=Object.create(null),this._rawModule=t;var n=t.state;this.state=("function"==typeof n?n():n)||{}},T={namespaced:{configurable:!0}};T.namespaced.get=function(){return!!this._rawModule.namespaced},O.prototype.addChild=function(t,e){this._children[t]=e},O.prototype.removeChild=function(t){delete this._children[t]},O.prototype.getChild=function(t){return this._children[t]},O.prototype.update=function(t){this._rawModule.namespaced=t.namespaced,t.actions&&(this._rawModule.actions=t.actions),t.mutations&&(this._rawModule.mutations=t.mutations),t.getters&&(this._rawModule.getters=t.getters)},O.prototype.forEachChild=function(t){r(this._children,t)},O.prototype.forEachGetter=function(t){this._rawModule.getters&&r(this._rawModule.getters,t)},O.prototype.forEachAction=function(t){this._rawModule.actions&&r(this._rawModule.actions,t)},O.prototype.forEachMutation=function(t){this._rawModule.mutations&&r(this._rawModule.mutations,t)},Object.defineProperties(O.prototype,T);var $=function(t){this.register([],t,!1)};$.prototype.get=function(t){return t.reduce(function(t,e){return t.getChild(e)},this.root)},$.prototype.getNamespace=function(t){var e=this.root;return t.reduce(function(t,n){return e=e.getChild(n),t+(e.namespaced?n+"/":"")},"")},$.prototype.update=function(t){s([],this.root,t)},$.prototype.register=function(t,e,n){var o=this;void 0===n&&(n=!0);var i=new O(e,n);if(0===t.length)this.root=i;else{this.get(t.slice(0,-1)).addChild(t[t.length-1],i)}e.modules&&r(e.modules,function(e,r){o.register(t.concat(r),e,n)})},$.prototype.unregister=function(t){var e=this.get(t.slice(0,-1)),n=t[t.length-1];e.getChild(n).runtime&&e.removeChild(n)};var S,A=function(t){var e=this;void 0===t&&(t={}),!S&&"undefined"!=typeof window&&window.Vue&&_(window.Vue);var n=t.plugins;void 0===n&&(n=[]);var r=t.strict;void 0===r&&(r=!1);var i=t.state;void 0===i&&(i={}),"function"==typeof i&&(i=i()||{}),this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new $(t),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._watcherVM=new S;var a=this,s=this,c=s.dispatch,u=s.commit;this.dispatch=function(t,e){return c.call(a,t,e)},this.commit=function(t,e,n){return u.call(a,t,e,n)},this.strict=r,f(this,i,[],this._modules.root),l(this,i),n.forEach(function(t){return t(e)}),S.config.devtools&&o(this)},j={state:{configurable:!0}};j.state.get=function(){return this._vm._data.$$state},j.state.set=function(t){},A.prototype.commit=function(t,e,n){var o=this,r=b(t,e,n),i=r.type,a=r.payload,s=(r.options,{type:i,payload:a}),c=this._mutations[i];c&&(this._withCommit(function(){c.forEach(function(t){t(a)})}),this._subscribers.forEach(function(t){return t(s,o.state)}))},A.prototype.dispatch=function(t,e){var n=this,o=b(t,e),r=o.type,i=o.payload,a={type:r,payload:i},s=this._actions[r];if(s)return this._actionSubscribers.forEach(function(t){return t(a,n.state)}),s.length>1?Promise.all(s.map(function(t){return t(i)})):s[0](i)},A.prototype.subscribe=function(t){return c(t,this._subscribers)},A.prototype.subscribeAction=function(t){return c(t,this._actionSubscribers)},A.prototype.watch=function(t,e,n){var o=this;return this._watcherVM.$watch(function(){return t(o.state,o.getters)},e,n)},A.prototype.replaceState=function(t){var e=this;this._withCommit(function(){e._vm._data.$$state=t})},A.prototype.registerModule=function(t,e,n){void 0===n&&(n={}),"string"==typeof t&&(t=[t]),this._modules.register(t,e),f(this,this.state,t,this._modules.get(t),n.preserveState),l(this,this.state)},A.prototype.unregisterModule=function(t){var e=this;"string"==typeof t&&(t=[t]),this._modules.unregister(t),this._withCommit(function(){var n=y(e.state,t.slice(0,-1));S.delete(n,t[t.length-1])}),u(this)},A.prototype.hotUpdate=function(t){this._modules.update(t),u(this,!0)},A.prototype._withCommit=function(t){var e=this._committing;this._committing=!0,t(),this._committing=e},Object.defineProperties(A.prototype,j);var I=x(function(t,e){var n={};return w(e).forEach(function(e){var o=e.key,r=e.val;n[o]=function(){var e=this.$store.state,n=this.$store.getters;if(t){var o=k(this.$store,"mapState",t);if(!o)return;e=o.context.state,n=o.context.getters}return"function"==typeof r?r.call(this,e,n):e[r]},n[o].vuex=!0}),n}),L=x(function(t,e){var n={};return w(e).forEach(function(e){var o=e.key,r=e.val;n[o]=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];var o=this.$store.commit;if(t){var i=k(this.$store,"mapMutations",t);if(!i)return;o=i.context.commit}return"function"==typeof r?r.apply(this,[o].concat(e)):o.apply(this.$store,[r].concat(e))}}),n}),M=x(function(t,e){var n={};return w(e).forEach(function(e){var o=e.key,r=e.val;r=t+r,n[o]=function(){if(!t||k(this.$store,"mapGetters",t))return this.$store.getters[r]},n[o].vuex=!0}),n}),P=x(function(t,e){var n={};return w(e).forEach(function(e){var o=e.key,r=e.val;n[o]=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];var o=this.$store.dispatch;if(t){var i=k(this.$store,"mapActions",t);if(!i)return;o=i.context.dispatch}return"function"==typeof r?r.apply(this,[o].concat(e)):o.apply(this.$store,[r].concat(e))}}),n}),D=function(t){return{mapState:I.bind(null,t),mapGetters:M.bind(null,t),mapMutations:L.bind(null,t),mapActions:P.bind(null,t)}},N={Store:A,install:_,version:"2.5.0",mapState:I,mapMutations:L,mapGetters:M,mapActions:P,createNamespacedHelpers:D};e.default=N},function(t,e,n){(function(e){function n(t){return t.split("")}function o(t,e,n,o){for(var r=t.length,i=n+(o?1:-1);o?i--:++i<r;)if(e(t[i],i,t))return i;return-1}function r(t,e,n){if(e!==e)return o(t,i,n);for(var r=n-1,a=t.length;++r<a;)if(t[r]===e)return r;return-1}function i(t){return t!==t}function a(t,e){for(var n=-1,o=t.length;++n<o&&r(e,t[n],0)>-1;);return n}function s(t,e){for(var n=t.length;n--&&r(e,t[n],0)>-1;);return n}function c(t){return A.test(t)}function u(t){return c(t)?l(t):n(t)}function l(t){return t.match(S)||[]}function f(t,e,n){var o=-1,r=t.length;e<0&&(e=-e>r?0:r+e),n=n>r?r:n,n<0&&(n+=r),r=e>n?0:n-e>>>0,e>>>=0;for(var i=Array(r);++o<r;)i[o]=t[o+e];return i}function p(t){if("string"==typeof t)return t;if(v(t))return F?F.call(t):"";var e=t+"";return"0"==e&&1/t==-y?"-0":e}function d(t,e,n){var o=t.length;return n=void 0===n?o:n,!e&&n>=o?t:f(t,e,n)}function h(t){return!!t&&"object"==typeof t}function v(t){return"symbol"==typeof t||h(t)&&P.call(t)==b}function m(t){return null==t?"":p(t)}function g(t,e,n){if((t=m(t))&&(n||void 0===e))return t.replace(_,"");if(!t||!(e=p(e)))return t;var o=u(t),r=u(e);return d(o,a(o,r),s(o,r)+1).join("")}var y=1/0,b="[object Symbol]",_=/^\s+|\s+$/g,w="[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]",x="\\ud83c[\\udffb-\\udfff]",k="(?:\\ud83c[\\udde6-\\uddff]){2}",E="[\\ud800-\\udbff][\\udc00-\\udfff]",C="(?:[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|\\ud83c[\\udffb-\\udfff])?",O="(?:\\u200d(?:"+["[^\\ud800-\\udfff]",k,E].join("|")+")[\\ufe0e\\ufe0f]?"+C+")*",T="[\\ufe0e\\ufe0f]?"+C+O,$="(?:"+["[^\\ud800-\\udfff]"+w+"?",w,k,E,"[\\ud800-\\udfff]"].join("|")+")",S=RegExp(x+"(?="+x+")|"+$+T,"g"),A=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0\\ufe0e\\ufe0f]"),j="object"==typeof e&&e&&e.Object===Object&&e,I="object"==typeof self&&self&&self.Object===Object&&self,L=j||I||Function("return this")(),M=Object.prototype,P=M.toString,D=L.Symbol,N=D?D.prototype:void 0,F=N?N.toString:void 0;t.exports=g}).call(e,n(0))},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function r(){this.$emit("widgets-search-update",{widgetType:this.selectedWidgetType,widgetTitle:this.widgetTitleSearch})}Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),a=o(i),s=n(26),c=o(s),u=n(2),l={};l[u.WIDGET_ALL]="All ITEMS",l[u.WIDGET_POLL]="poll",l[u.WIDGET_SET]="multi poll set",l[u.WIDGET_SURVEY]="survey",l[u.WIDGET_SLIDESHOW]="slideshow",l[u.WIDGET_TRIVIA_QUIZ]="trivia quiz",l[u.WIDGET_PERSONALITY_QUIZ]="personality quiz",l[u.WIDGET_LIST]="list",l[u.WIDGET_FORM]="form",l[u.WIDGET_STORY]="story article",e.default=a.default.component("widget-list",{template:"#opinionstage-widget-list",props:["widgets","preSelectedWidgetType","dataLoading","noMoreData","showSearch"],data:function(){return{selectedWidgetType:null,widgetTitleSearch:"",showMoreBtn:!0,hasData:!0}},computed:{selectedWidgetTitle:function(){return l[this.selectedWidgetType||this.preSelectedWidgetType]}},watch:{widgetTitleSearch:(0,c.default)(function(){r.call(this)},500),widgets:function(){this.hasData=this.dataLoading||this.widgets.length>0}},methods:{select:function(t){this.$emit("widget-selected",t)},selectWidgetType:function(t){this.selectedWidgetType=t,this.widgetTitleSearch="",r.call(this)},showMore:function(){this.$emit("load-more-widgets")}}})},function(t,e,n){(function(e){function n(t,e,n){function r(e){var n=v,o=m;return v=m=void 0,E=e,y=t.apply(o,n)}function i(t){return E=t,b=setTimeout(l,e),C?r(t):y}function c(t){var n=t-k,o=t-E,r=e-n;return O?w(r,g-o):r}function u(t){var n=t-k,o=t-E;return void 0===k||n>=e||n<0||O&&o>=g}function l(){var t=x();if(u(t))return f(t);b=setTimeout(l,c(t))}function f(t){return b=void 0,T&&v?r(t):(v=m=void 0,y)}function p(){void 0!==b&&clearTimeout(b),E=0,v=k=m=b=void 0}function d(){return void 0===b?y:f(x())}function h(){var t=x(),n=u(t);if(v=arguments,m=this,k=t,n){if(void 0===b)return i(k);if(O)return b=setTimeout(l,e),r(k)}return void 0===b&&(b=setTimeout(l,e)),y}var v,m,g,y,b,k,E=0,C=!1,O=!1,T=!0;if("function"!=typeof t)throw new TypeError(s);return e=a(e)||0,o(n)&&(C=!!n.leading,O="maxWait"in n,g=O?_(a(n.maxWait)||0,e):g,T="trailing"in n?!!n.trailing:T),h.cancel=p,h.flush=d,h}function o(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function r(t){return!!t&&"object"==typeof t}function i(t){return"symbol"==typeof t||r(t)&&b.call(t)==u}function a(t){if("number"==typeof t)return t;if(i(t))return c;if(o(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=o(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(l,"");var n=p.test(t);return n||d.test(t)?h(t.slice(2),n?2:8):f.test(t)?c:+t}var s="Expected a function",c=NaN,u="[object Symbol]",l=/^\s+|\s+$/g,f=/^[-+]0x[0-9a-f]+$/i,p=/^0b[01]+$/i,d=/^0o[0-7]+$/i,h=parseInt,v="object"==typeof e&&e&&e.Object===Object&&e,m="object"==typeof self&&self&&self.Object===Object&&self,g=v||m||Function("return this")(),y=Object.prototype,b=y.toString,_=Math.max,w=Math.min,x=function(){return g.Date.now()};t.exports=n}).call(e,n(0))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),r=function(t){return t&&t.__esModule?t:{default:t}}(o);e.default=r.default.component("notification",{template:"#opinionstage-notification",methods:{initiateUpdate:function(){this.$emit("update-btn-click")}}})},function(t,e,n){var o=n(29);"string"==typeof o&&(o=[[t.i,o,""]]);var r={};r.transform=void 0;n(4)(o,r);o.locals&&(t.exports=o.locals)},function(t,e,n){e=t.exports=n(3)(!1),e.push([t.i,'@font-face{font-family:os-icon-font;font-style:normal;font-weight:400;src:url("https://assets.opinionstage.com/assets/os-icon-font-244a07d2da0691f4423dac8a542a9bb9df3797ca19f2d0c67c04a8789c9f6afb.eot#iefix") format("embedded-opentype"),url("https://assets.opinionstage.com/assets/os-icon-font-244a07d2da0691f4423dac8a542a9bb9df3797ca19f2d0c67c04a8789c9f6afb.ttf") format("truetype"),url("https://assets.opinionstage.com/assets/os-icon-font-244a07d2da0691f4423dac8a542a9bb9df3797ca19f2d0c67c04a8789c9f6afb.woff") format("woff"),url("https://assets.opinionstage.com/assets/os-icon-font-244a07d2da0691f4423dac8a542a9bb9df3797ca19f2d0c67c04a8789c9f6afb.svg#os-icon-font") format("svg")}[class*=" icon-"],[class^=icon-]{font-family:os-icon-font!important;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-os-form-address:before{content:"\\E900"}.icon-os-form-email:before{content:"\\E901"}.icon-os-form-name:before{content:"\\E902"}.icon-os-form-phone:before{content:"\\E903"}.icon-os-common-arrow-left2:before{content:"\\E904"}.icon-os-common-arrow-right2:before{content:"\\E905"}.icon-os-reports-list:before{content:"\\E906"}.icon-os-reports-personality:before{content:"\\E907"}.icon-os-reports-poll:before{content:"\\E908"}.icon-os-reports-set:before{content:"\\E909"}.icon-os-widget-slideshow:before{content:"\\E90A"}.icon-os-reports-trivia:before{content:"\\E90B"}.icon-os-widget-form:before{content:"\\E963"}.icon-os-common-up:before{content:"\\E90C"}.icon-os-layout-image-poll:before{content:"\\E90D"}.icon-os-common-arrow-left:before{content:"\\E90E"}.icon-os-common-arrow-right:before{content:"\\E90F"}.icon-os-form-user:before{content:"\\E910"}.icon-os-sn-pinterest:before{content:"\\E911"}.icon-os-sn-reddit:before{content:"\\E912"}.icon-os-sn-whatsapp:before{content:"\\E913"}.icon-os-brand-logo-small:before{content:"\\E914"}.icon-os-brand-logo:before{content:"\\E915"}.icon-os-common-addnew:before{content:"\\E916"}.icon-os-common-checkbox-blank:before{content:"\\E917"}.icon-os-common-checkbox-checked:before{content:"\\E918"}.icon-os-common-close:before{content:"\\E919"}.icon-os-common-date:before{content:"\\E91A"}.icon-os-common-dot:before{content:"\\E91B"}.icon-os-common-down:before{content:"\\E91C"}.icon-os-common-help:before{content:"\\E91D"}.icon-os-common-link:before{content:"\\E91E"}.icon-os-common-menu-dd-closed:before{content:"\\E91F"}.icon-os-common-menu-dd-open:before{content:"\\E920"}.icon-os-common-menu-medium:before{content:"\\E921"}.icon-os-common-menu:before{content:"\\E922"}.icon-os-common-minimize:before{content:"\\E923"}.icon-os-common-more:before{content:"\\E924"}.icon-os-common-plus:before{content:"\\E925"}.icon-os-common-poll:before{content:"\\E926"}.icon-os-common-search:before{content:"\\E927"}.icon-os-common-settings:before{content:"\\E928"}.icon-os-common-tip:before{content:"\\E929"}.icon-os-filter-all:before{content:"\\E92A"}.icon-os-filter-facebook:before{content:"\\E92B"}.icon-os-filter-female:before{content:"\\E92C"}.icon-os-filter-friends:before{content:"\\E92D"}.icon-os-filter-gplus:before{content:"\\E92E"}.icon-os-filter-hidden:before{content:"\\E92F"}.icon-os-filter-male:before{content:"\\E930"}.icon-os-filter-public:before{content:"\\E931"}.icon-os-filter-seperator:before{content:"\\E932"}.icon-os-filter-twitter:before{content:"\\E933"}.icon-os-form-check:before{content:"\\E934"}.icon-os-form-drag:before{content:"\\E935"}.icon-os-form-error:before{content:"\\E936"}.icon-os-form-image:before{content:"\\E937"}.icon-os-form-success:before{content:"\\E938"}.icon-os-form-video:before{content:"\\E939"}.icon-os-hp-engagement:before{content:"\\E93A"}.icon-os-hp-insights:before{content:"\\E93B"}.icon-os-hp-revenue:before{content:"\\E93C"}.icon-os-hp-traffic:before{content:"\\E93D"}.icon-os-layout-h2h:before{content:"\\E93E"}.icon-os-layout-mc:before{content:"\\E93F"}.icon-os-layout-thumbnails:before{content:"\\E940"}.icon-os-menu-content:before{content:"\\E941"}.icon-os-menu-placements:before{content:"\\E942"}.icon-os-menu-reports:before{content:"\\E943"}.icon-os-menu-revenue:before{content:"\\E944"}.icon-os-pinterest:before{content:"\\E945"}.icon-os-poll-client:before{content:"\\E946"}.icon-os-poll-voter:before{content:"\\E947"}.icon-os-quiz-correct:before{content:"\\E948"}.icon-os-quiz-restart:before{content:"\\E949"}.icon-os-quiz-wrong:before{content:"\\E94A"}.icon-os-report-contacts:before{content:"\\E94B"}.icon-os-report-discovery:before{content:"\\E94C"}.icon-os-report-revenue:before{content:"\\E94D"}.icon-os-report-stats:before{content:"\\E94E"}.icon-os-report-time:before{content:"\\E94F"}.icon-os-report-views:before{content:"\\E950"}.icon-os-reports-emails:before{content:"\\E951"}.icon-os-reports-polls:before{content:"\\E952"}.icon-os-reports-revenue:before{content:"\\E953"}.icon-os-reports-sets:before{content:"\\E954"}.icon-os-reports-time:before{content:"\\E955"}.icon-os-reports-traffic:before{content:"\\E956"}.icon-os-reports-votes:before{content:"\\E957"}.icon-os-set-arrow-left:before{content:"\\E958"}.icon-os-set-arrow-right:before{content:"\\E959"}.icon-os-sn-embed:before{content:"\\E95A"}.icon-os-sn-facebook:before{content:"\\E95B"}.icon-os-sn-gplus:before{content:"\\E95C"}.icon-os-sn-tumblr:before{content:"\\E95D"}.icon-os-sn-twitter:before{content:"\\E95E"}.icon-os-status-closed:before{content:"\\E95F"}.icon-os-status-draft:before{content:"\\E960"}.icon-os-status-open:before{content:"\\E961"}.icon-os-status-published:before{content:"\\E962"}.icon-os-icon-story:before{content:"\\E964"}.opinionstage-content-popup-contents{min-width:960px}.opinionstage-content-popup-contents[data-opinionstage-client-logged-in=""]{max-width:680px;min-width:680px}.opinionstage-content-popup-contents[data-opinionstage-client-logged-in=""] .main-title{font-size:20px}.opinionstage-content-popup-contents[data-opinionstage-client-logged-in=""] .page-content{margin:0 auto;padding:40px 30px}.opinionstage-content-popup-contents[data-opinionstage-client-logged-in=""] .page-content #os-start-login{margin-top:30px}.opinionstage-content-popup-contents *{margin:0;padding:0;color:#222120;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:Open Sans,Helvetica,sans-serif}.opinionstage-content-popup-contents .header{background-color:#222120;width:100%}.opinionstage-content-popup-contents .header__container{color:#fff;margin:auto;padding:0 10px}.opinionstage-content-popup-contents .header__logo{display:inline-block}.opinionstage-content-popup-contents .header__logo a:active,.opinionstage-content-popup-contents .header__logo a:focus,.opinionstage-content-popup-contents .header__logo a:hover,.opinionstage-content-popup-contents .header__logo a:visited{border:none;background:none;-webkit-box-shadow:none;box-shadow:none}.opinionstage-content-popup-contents .header__logo img{margin:15px 10px;width:150px}.opinionstage-content-popup-contents .header__nav{display:inline-block;font-size:0;vertical-align:bottom}.opinionstage-content-popup-contents .header__action{display:block;float:right;font-size:0;margin-top:10px}.opinionstage-content-popup-contents .page-content{margin:0 auto;padding:25px 15px 15px}.opinionstage-content-popup-contents .main-title{font-size:30px;font-weight:400;line-height:normal}.opinionstage-content-popup-contents .conect-form{text-align:center;margin-top:20px}.opinionstage-content-popup-contents .content-actions{height:40px;margin-bottom:20px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.opinionstage-content-popup-contents .content-actions__left,.opinionstage-content-popup-contents .content-actions__right{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex}.opinionstage-content-popup-contents .content-actions__left{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}.opinionstage-content-popup-contents .content-actions__right{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.opinionstage-content-popup-contents .content-actions__sep{border-right:1px solid #e5e5e5;margin:0 20px}.opinionstage-content-popup-contents .content-actions:after{content:"";clear:both;display:block}.opinionstage-content-popup-contents .filter__itm{display:inline-block;cursor:pointer;font-size:12px;margin-right:0;line-height:25px;text-transform:uppercase;width:100%}.opinionstage-content-popup-contents .filter__itm:first-child{border-top:1px solid #3487fa}.opinionstage-content-popup-contents .filter__itm:last-child{border-bottom:1px solid #3487fa}.opinionstage-content-popup-contents .filter__itm.active{color:#fff;background:#5299fb;font-weight:400;pointer-events:none}.opinionstage-content-popup-contents .filter{display:inline-block;margin:0;width:auto}.opinionstage-content-popup-contents .content__list{height:calc(92vh - 160px);overflow-y:scroll}.opinionstage-content-popup-contents .content__loading{text-align:center}.opinionstage-content-popup-contents .content__itm{display:block;margin:0;padding-bottom:6px;padding-top:10px;position:relative;width:100%;border-bottom:1px solid #e5e5e5}.opinionstage-content-popup-contents .content__itm:first-child{border-top:1px solid #e5e5e5}.opinionstage-content-popup-contents .content__itm:hover .content__links{display:inline-block;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.opinionstage-content-popup-contents .content__image{display:inline-block;height:90px;position:relative;width:15%}.opinionstage-content-popup-contents .content__image img{display:block;height:100%;-o-object-fit:cover;object-fit:cover;width:100%}.opinionstage-content-popup-contents .content__info{display:inline-block;background:transparent;font-size:16px;height:85px;width:50%;line-height:normal;margin:0;overflow:hidden;padding:0 10px;text-overflow:ellipsis;white-space:nowrap}.opinionstage-content-popup-contents .content__info a{color:inherit;text-decoration:none}.opinionstage-content-popup-contents .content__links{background:none;display:inline-block;float:right;text-align:right;height:100%;padding:20px 10px;left:0;position:relative;top:0;width:30%}@media only screen and (max-width:767px){.opinionstage-content-popup-contents .content__links{padding-left:0;padding-right:0}}.opinionstage-content-popup-contents .content__links-itm{border-radius:5px;border:1px solid #fff;color:#fff;background:transparent;cursor:pointer;display:block;line-height:1;margin:5px auto;padding:14px 8px;text-align:center;text-decoration:none;text-transform:uppercase;width:200px}.opinionstage-content-popup-contents .content__links-itm:hover{background-color:hsla(0,0%,100%,.1)}.opinionstage-content-popup-contents .popup-content-btn{border:1px solid #32adbc;border-radius:2px;color:#32adbc;display:inline;font-size:15px;font-weight:600;padding:13px 14px;text-align:center;text-decoration:none;width:auto}.opinionstage-content-popup-contents .content__label{background-color:#222120;bottom:auto;color:#fff;font-size:12px;top:0;left:0;padding:1px 5px;position:absolute;text-transform:uppercase;z-index:2}.opinionstage-content-popup-contents .std-btn{background-color:rgba(123,91,167,.4);border-radius:5px 5px 0 0;cursor:pointer;color:#fff;display:inline-block;font:16px/50px Open Sans,Helvetica,sans-serif;margin:0;text-align:center;text-transform:uppercase;vertical-align:bottom;width:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.opinionstage-content-popup-contents .std-btn.active{background-color:#fff;color:#222120}.opinionstage-content-popup-contents .btn-create{background-color:#32adbc;border-radius:3px;border-style:hidden;color:#fff;cursor:pointer;display:inline-block;font-size:15px;font-weight:600;line-height:normal;padding:10px 11px;text-decoration:none;outline:none}.opinionstage-content-popup-contents .btn-create:hover{color:#fff;opacity:.9;text-decoration:none}.opinionstage-content-popup-contents .btn-create:before{bottom:0;content:"+";font-family:os-icon-font;font-size:17px;font-weight:700;height:18px;margin-right:8px;pointer-events:none;top:0}.opinionstage-content-popup-contents .create-new-menu-box{display:inline-block;position:relative}.opinionstage-content-popup-contents .create-new-menu-box:hover .create-new-menu{display:block}.opinionstage-content-popup-contents .create-new-menu{display:none;position:absolute;width:100%;top:39px;left:0;border:1px solid #3aaebd;background-color:#fff;z-index:3}.opinionstage-content-popup-contents .create-menu__itm{display:block;color:#3aaebd;border-bottom:1px solid #3aaebd;padding:8px 12px;background-color:#fff;font-size:14px;text-decoration:none;text-transform:uppercase}.opinionstage-content-popup-contents .create-menu__itm:hover{text-decoration:none;color:#fff;background-color:#44a9d2}.opinionstage-content-popup-contents .btn-close{border-radius:5px;color:#fff;cursor:pointer;display:inline-block;font:27px/48px Open Sans,Helvetica,sans-serif;margin-left:20px;text-align:center;width:42px}.opinionstage-content-popup-contents .btn-close:hover{opacity:.8}.opinionstage-content-popup-contents .btn-blue{display:inline-block;background-color:#38aebd;border:medium none;border-radius:5px;color:#fff;cursor:pointer;font-size:16px;line-height:36px;outline:medium none;text-transform:uppercase;text-decoration:none;width:140px}.opinionstage-content-popup-contents .btn-blue:hover{background-color:#55a6cc}.opinionstage-content-popup-contents .btn-show-more{padding:15px 0;border:none;background-color:#e6e6e6;width:100%}.opinionstage-content-popup-contents .std-inp{background-color:#fff;border:1px solid #c1c1c1;border-radius:5px;height:36px;outline:medium none;padding:0 15px;width:450px}.opinionstage-content-popup-contents .os-search{width:180px;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;border:1px solid #ccc;border-radius:2px;-webkit-box-shadow:0 0;box-shadow:0 0}.opinionstage-content-popup-contents .os-search__input{color:#797979;padding-left:10px;width:100%;border:none;border-radius:0;outline:none}.opinionstage-content-popup-contents .os-search__input:focus{border:none;border-radius:0;-webkit-box-shadow:none;box-shadow:none;outline:none}.opinionstage-content-popup-contents .os-search__icon{color:#3aaebd;line-height:normal;font-size:18px;padding:10px 9px;margin:0}.opinionstage-content-popup-contents .hidden{visibility:hidden}.opinionstage-content-popup-contents .opinionstage-blue-btn{cursor:pointer;text-align:center;color:#fff;text-decoration:none;display:inline-block;padding:11px 10px;font-weight:400;background-color:#38aebd;border-radius:3px;border-style:hidden;width:95px}.opinionstage-content-popup-contents .opinionstage-blue-btn:hover{opacity:.9}.opinionstage-content-popup-contents .opinionstage-section-notification{background-color:rgba(0,0,0,.7);width:100%;padding:20px 25px;z-index:3;text-align:center;-webkit-box-shadow:0 2px 5px rgba(0,0,0,.6);box-shadow:0 2px 5px rgba(0,0,0,.6)}.opinionstage-content-popup-contents .opinionstage-section-notification__title{color:#fff;font-size:15px;margin-bottom:15px}.opinionstage-content-popup-contents .opinionstage-section-notification__controls{position:relative;font-size:0}.opinionstage-content-popup-contents .notification-container~div>.page-content .content__list{max-height:calc(92vh - 270px)}.opinionstage-content-popup-contents .bordered-container{border:1px solid #e5e5e5;text-align:center;padding:40px}.opinionstage-content-popup-contents .opinionstage-introduction-video{text-align:center;padding:20px}.opinionstage-content-popup-contents .opinionstage-connect-form{margin-top:20px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.opinionstage-content-popup-contents .opinionstage-connect-form .opinionstage-conect-input{border:1px solid #e5e5e5;height:40px;padding:0 15px;width:420px;border-radius:3px;margin-right:10px;-webkit-box-shadow:none!important;box-shadow:none!important;outline:none!important}.opinionstage-content-popup-contents .dropbtn{background-color:#fff;border:1px solid #e4e4e4;border-right:0!important;-webkit-box-shadow:0 0 0!important;box-shadow:0 0 0!important;cursor:pointer;display:inline-block;font:12px/38px Open Sans,Helvetica,sans-serif;outline:none!important;padding-left:10px;position:relative;text-align:left;text-decoration:none;width:140px;margin-right:50px}.opinionstage-content-popup-contents .dropbtn span{color:#555454;font-size:12px;font-weight:700;text-transform:uppercase}.opinionstage-content-popup-contents .dropbtn:before{color:#000;content:"\\E922";display:block;font-family:os-icon-font!important;font-size:9px;position:absolute;right:-25px;top:0;z-index:3;font-weight:700}.opinionstage-content-popup-contents .dropbtn:after{border:1px solid #e4e4e4;border-left:0!important;content:"";height:45px;position:absolute;right:-40px;top:-1px;width:40px;height:38px}.opinionstage-content-popup-contents .dropdown{display:inline-block;position:relative}.opinionstage-content-popup-contents .dropdown:hover .popup-action-dropdown.dropdown-content{width:130px}.opinionstage-content-popup-contents .dropdown:hover .popup-action.popup-content-btn{background-color:#32adbc}.opinionstage-content-popup-contents .dropdown:hover .popup-action.popup-content-btn:before{color:#fff}.opinionstage-content-popup-contents .dropdown-popup-action{height:45px}.opinionstage-content-popup-contents .dropdown-content{background-color:#f9f9f9;-webkit-box-shadow:0 8px 16px 0 rgba(0,0,0,.2);box-shadow:0 8px 16px 0 rgba(0,0,0,.2);display:none;left:1px;position:absolute;top:40px;z-index:9}.opinionstage-content-popup-contents .dropdown-content div{background-color:#fff;border:1px solid #3487fa;border-bottom:0;border-top:0;color:#555454;display:block;padding:5px 10px 5px 20px;text-decoration:none}.opinionstage-content-popup-contents .dropdown-content div:hover{background-color:#3487fa;color:#fff!important}.opinionstage-content-popup-contents .dropdown_items .dropdown-content{width:180px}.opinionstage-content-popup-contents .dropdown:hover .dropdown-content{display:block!important;width:180px}.opinionstage-content-popup-contents .dropdown:hover .dropbtn{background-color:#fff}.opinionstage-content-popup-contents .popup-action:before{color:#32adbc;padding:0;position:absolute;right:18px;content:"\\E922";display:block;font-family:os-icon-font!important;font-size:9px;top:15px;z-index:3;font-weight:700}.opinionstage-content-popup-contents .popup-action.popup-content-btn{margin-left:10px;padding:12px 25px;position:relative}.opinionstage-content-popup-contents .popup-action-dropdown{background:#fff;border:1px solid #32adbc;border-radius:3px}.opinionstage-content-popup-contents .popup-action-dropdown .content__links-itm{border:none;border-bottom:1px solid #32adbc;border-radius:0;color:#32adbc;font-size:14px;font-weight:400;margin:0;padding:10px;width:auto;text-align:left!important;letter-spacing:1px}.opinionstage-content-popup-contents .popup-action-dropdown .content__links-itm:hover{background-color:#32adbc!important;color:#fff}.opinionstage-content-popup-contents .popup-action-dropdown .content__links-itm:last-child{border:none}.opinionstage-content-popup-contents .popup-action-dropdown.dropdown-content{left:auto;right:0;top:20px;z-index:10}.opinionstage-content-popup-contents .opinionstage-anchors-list .filter__itm{padding:0}.opinionstage-content-popup-contents .opinionstage-anchors-list .filter__itm:hover a{color:#fff}.opinionstage-content-popup-contents .opinionstage-anchors-list a{padding:5px 10px 5px 20px;display:block;text-decoration:none;width:100%}',""])}]);
admin/js/menu-page.js CHANGED
@@ -1,17 +1,185 @@
1
- jQuery(function($) {
2
- var toggleSettingsAjax = function(currObject, action) {
3
- $.post(ajaxurl, {action: action, activate: currObject.is(':checked')}, function(response) { });
4
- };
5
-
6
- $('#fly-out-switch').change(function(){
7
- toggleSettingsAjax($(this), "opinionstage_ajax_toggle_flyout");
8
- });
9
-
10
- $('#article-placement-switch').change(function(){
11
- toggleSettingsAjax($(this), "opinionstage_ajax_toggle_article_placement");
12
- });
13
-
14
- $('#sidebar-placement-switch').change(function(){
15
- toggleSettingsAjax($(this), "opinionstage_ajax_toggle_sidebar_placement");
16
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  });
1
+ jQuery(document).ready(function ($) {
2
+ var toggleSettingsAjax = function (currObject, action) {
3
+ $.post(ajaxurl, {action: action, activate: currObject.is(':checked')}, function (response) {
4
+ });
5
+ };
6
+
7
+ $('#fly-out-switch').change(function () {
8
+ toggleSettingsAjax($(this), "opinionstage_ajax_toggle_flyout");
9
+ });
10
+
11
+ $('#article-placement-switch').change(function () {
12
+ toggleSettingsAjax($(this), "opinionstage_ajax_toggle_article_placement");
13
+ });
14
+
15
+ $('#sidebar-placement-switch').change(function () {
16
+ toggleSettingsAjax($(this), "opinionstage_ajax_toggle_sidebar_placement");
17
+ });
18
+
19
+
20
+ $.ajax({
21
+ url: OPINIONSTAGE.WidgetApiUrl,
22
+ headers: {
23
+ 'Accept': 'application/vnd.api+json',
24
+ 'Content-Type': 'application/vnd.api+json',
25
+ 'OSWP-Plugin-Version': OPINIONSTAGE.OswpPluginVersion,
26
+ 'OSWP-Client-Token': OPINIONSTAGE.OswpClientToken
27
+ },
28
+ method: 'GET',
29
+ dataType: 'json',
30
+ success: function (data) {
31
+ dropdownOptions = data;
32
+ if (dropdownOptions.data.length == 0) {
33
+ var adminUrlCreateLink = OPINIONSTAGE.adminUrlCreateLink;
34
+ var viewtext = '<tbody><tr><td><p><span class="opinionstage-no-items">No items yet..., </span><a href="' + adminUrlCreateLink + '" class="opinionstage-add-our-first-item">Add your first item</a></p></td></tr></tbody>';
35
+ $('.result_progress').css('display', 'none');
36
+ $(viewtext).appendTo('#container table#check');
37
+ } else {
38
+ for (var i = 0; i < dropdownOptions.data.length; i++) {
39
+ var previewBlockOsTitle = dropdownOptions.data[i].attributes['title'];
40
+ var previewBlockOsType = dropdownOptions.data[i].attributes['type'];
41
+ var previewBlockOsDate = dropdownOptions.data[i].attributes['updated-at'];
42
+ previewBlockOsDate = new Date(previewBlockOsDate);
43
+ previewBlockOsDate = previewBlockOsDate.toDateString();
44
+ var resDateOs = previewBlockOsDate.split(" ");
45
+ previewBlockOsDate = resDateOs[2] + ' ' + resDateOs[1] + ' ' + resDateOs[3];
46
+ var previewBlockOsImageUrl = dropdownOptions.data[i].attributes['image-url'];
47
+ var previewBlockOsView = dropdownOptions.data[i].attributes['landing-page-url'];
48
+ var previewBlockOsEdit = dropdownOptions.data[i].attributes['edit-url'];
49
+ var previewBlockOsStatistics = dropdownOptions.data[i].attributes['stats-url'];
50
+ var viewtext = '<tbody id="count"><tr class="settingBorderOs"><td class="image"><a href="' + previewBlockOsView + '" target="_blank"><div class="content-item-image quiz"><img height="90" src="' + previewBlockOsImageUrl + '" width="120"><div class="content-item-label">' + previewBlockOsType + '</div></div></a></td><td class="long"><div style="position: relative;height: 85px;"><a href="' + previewBlockOsEdit + '" class="opinionstage-item-title" target="_blank">' + previewBlockOsTitle + '</a><table><tbody><tr><td><span class="os-icon-plugin icon-os-common-date"></span><div class="label">' + previewBlockOsDate + '</div></td></tr></tbody></table></div></td><td class="action"><div class="opinionstage-item-action-container"><a href="' + previewBlockOsView + '" class="opinionstage-blue-bordered-btn opinionstage-edit-content " target="_blank"> View </a><a href="' + previewBlockOsEdit + '" class="opinionstage-blue-bordered-btn opinionstage-edit-content " target="_blank"> Edit </a><a href="' + previewBlockOsStatistics + '" class="opinionstage-blue-bordered-btn opinionstage-edit-content " target="_blank"> Results </div></a></td></tr></tbody>';
51
+ $('.result_progress').css('display', 'none');
52
+ $(viewtext).appendTo('#container table#check');
53
+ }
54
+ }
55
+ },
56
+ complete: function () {
57
+ size_li = $("table#check tbody#count").size();
58
+ dropdownDataLength = dropdownOptions.data.length;
59
+
60
+ loadMore(size_li, dropdownDataLength, "all");
61
+ var data = {
62
+ 'action': 'opinionstage_ajax_item_count',
63
+ 'oswp_item_count': dropdownOptions.data.length
64
+ };
65
+ // todo - move it to main ajax call
66
+ jQuery.post(ajaxurl, data);
67
+
68
+ jQuery('#itemList').on('change', function () {
69
+ var selectedValue = this.value;
70
+ var contentLabel = jQuery(".content-item-label");
71
+ var item_count = 0;
72
+
73
+ jQuery('.no_item').css('display', 'none');
74
+ contentLabel.each(function () {
75
+ getContainer = jQuery(this).parent().parent().parent().parent();
76
+ if (selectedValue != 'all' && selectedValue != jQuery(this).text().toLowerCase()) {
77
+ getContainer.parent().css('display', 'none');
78
+ getContainer.parent().removeClass('countItem');
79
+ } else {
80
+ jQuery("#searchItem").val('');
81
+ getContainer.parent().css('display', 'table-row-group');
82
+ getContainer.parent().addClass('countItem');
83
+ item_count = item_count + 1;
84
+ }
85
+ });
86
+
87
+ if (item_count == 0) {
88
+ jQuery('.no_item').css('display', 'block');
89
+ }
90
+
91
+ size = $("table#check tbody.countItem").size();
92
+ $("#opinionstage-load-more").fadeOut(500);
93
+ loadMore(size, item_count, "filter");
94
+ });
95
+
96
+ $("#searchItem").on("keyup", function search(e) {
97
+ if (e.keyCode == 13) {
98
+ var searchItem = $(this).val();
99
+ var listTitle = jQuery('td.long a');
100
+ var dropdownValue = jQuery('#itemList').val();
101
+ var contentList = jQuery(".content-item-label");
102
+
103
+ listTitle.each(function () {
104
+ var title = jQuery(this).text().toLowerCase();
105
+ outerContainer = jQuery(this).parent().parent().parent().parent();
106
+
107
+ if (dropdownValue == 'all') {
108
+ if (!title.includes(searchItem)) {
109
+ outerContainer.css('display', 'none');
110
+ } else {
111
+ outerContainer.css('display', 'table-row-group');
112
+ }
113
+ } else {
114
+ contentList.each(function () {
115
+ if (dropdownValue == jQuery(this).text().toLowerCase()) {
116
+ if (outerContainer.hasClass('countItem')) {
117
+ if (!title.includes(searchItem)) {
118
+ outerContainer.css('display', 'none');
119
+ } else {
120
+ outerContainer.css('display', 'table-row-group');
121
+ }
122
+ }
123
+ }
124
+ });
125
+ }
126
+ });
127
+ }
128
+ });
129
+ },
130
+ error: function () {
131
+ console.log(data.statusText);
132
+ }
133
+ });
134
+
135
+
136
+ function loadMore(size, dataLength, item) {
137
+
138
+ if (dataLength == size && dataLength > 10) {
139
+ setTimeout(function () {
140
+
141
+ x = (x - 0 < 0) ? 10 : x - 0;
142
+ if (item == 'all') {
143
+ $('table#check tbody#count').not(':lt(' + x + ')').hide();
144
+ } else {
145
+ $('table#check tbody#countItem').not(':lt(' + x + ')').hide();
146
+ }
147
+ }, 500);
148
+ }
149
+ // Show the div in 5s
150
+ var countItemOS = 10;
151
+ if (dataLength > countItemOS) {
152
+ $("#opinionstage-load-more").delay(2000).fadeIn(500);
153
+ }
154
+
155
+ x = 10;
156
+ $('table#check ttbody#count:lt(' + x + ')').show();
157
+ $('#opinionstage-load-more').click(function () {
158
+ x = (x + 10 <= size) ? x + 10 : size;
159
+
160
+ if (item == 'all') {
161
+ $('table#check tbody#count:lt(' + x + ')').show(500);
162
+ } else {
163
+ $('table#check tbody#countItem:lt(' + x + ')').show(500);
164
+ }
165
+
166
+ if (size == x) {
167
+ $("#opinionstage-load-more").hide(500);
168
+ }
169
+ });
170
+ }
171
+
172
+ if ($('.opinionstage-show-anchor-list').length > 0) {
173
+
174
+ $('.opinionstage-show-anchor-list').click(function (e){
175
+ e.preventDefault();
176
+ $('.opinionstage-anchors-list').toggleClass('opened');
177
+ })
178
+
179
+ $(document).click(function (e) {
180
+ if ( ! $(e.target).is('.opinionstage-show-anchor-list') && $('.opinionstage-anchors-list').hasClass('opened') ) {
181
+ $('.opinionstage-anchors-list').removeClass('opened');
182
+ }
183
+ })
184
+ }
185
  });
admin/menu-page.php CHANGED
@@ -1,62 +1,72 @@
1
  <?php
2
- // block direct access to plugin PHP files:
3
- defined( 'ABSPATH' ) or die();
4
- require_once( plugin_dir_path( __FILE__ ).'../includes/opinionstage-client-session.php' );
 
 
 
 
 
5
  add_action( 'admin_menu', 'opinionstage_register_menu_page' );
 
 
 
 
6
  function opinionstage_register_menu_page() {
7
- if (function_exists('add_menu_page')) {
8
- $os_options = (array) get_option(OPINIONSTAGE_OPTIONS_KEY);
9
  $os_client_logged_in = opinionstage_user_logged_in();
10
- if ($os_client_logged_in) {
11
- if ( isset($os_options['item_count']) && $os_options['item_count'] > 0) {
12
- add_menu_page(
13
- __('Opinion Stage', OPINIONSTAGE_TEXT_DOMAIN),
14
- __('Opinion Stage', OPINIONSTAGE_TEXT_DOMAIN),
15
- 'edit_posts',
16
- OPINIONSTAGE_VIEW_ITEM_SLUG,
17
- 'opinionstage_load_template',
18
- plugins_url('admin/images/os-icon.png', plugin_dir_path( __FILE__ )),
19
- '25.234323221'
20
- );
21
- add_submenu_page(OPINIONSTAGE_VIEW_ITEM_SLUG, 'View My Items', 'My Items', 'edit_posts', OPINIONSTAGE_VIEW_ITEM_SLUG);
22
- add_submenu_page(OPINIONSTAGE_VIEW_ITEM_SLUG, 'Create...', 'Create...', 'edit_posts', OPINIONSTAGE_MENU_SLUG, 'opinionstage_load_template');
23
- add_submenu_page(OPINIONSTAGE_VIEW_ITEM_SLUG, 'Placements', 'Placements', 'edit_posts', OPINIONSTAGE_PLACEMENT_SLUG , 'opinionstage_load_template' );
24
- add_submenu_page(OPINIONSTAGE_VIEW_ITEM_SLUG, 'Help Resources', 'Help Resources', 'edit_posts', OPINIONSTAGE_HELP_RESOURCE_SLUG,'opinionstage_load_template' );
25
- }
26
- else {
27
- add_menu_page(
28
- __('Opinion Stage', OPINIONSTAGE_TEXT_DOMAIN),
29
- __('Opinion Stage', OPINIONSTAGE_TEXT_DOMAIN),
30
- 'edit_posts',
31
- OPINIONSTAGE_MENU_SLUG,
32
- 'opinionstage_load_template',
33
- plugins_url('admin/images/os-icon.png', plugin_dir_path( __FILE__ )),
34
- '25.234323221'
35
- );
36
- add_submenu_page(OPINIONSTAGE_MENU_SLUG, 'Create...', 'Create...', 'edit_posts', OPINIONSTAGE_MENU_SLUG);
37
- add_submenu_page(OPINIONSTAGE_MENU_SLUG, 'View My Items', 'My Items', 'edit_posts','opinionstage-view-my-items','opinionstage_load_template');
38
- add_submenu_page(OPINIONSTAGE_MENU_SLUG, 'Placements', 'Placements', 'edit_posts', OPINIONSTAGE_PLACEMENT_SLUG , 'opinionstage_load_template' );
39
- add_submenu_page(OPINIONSTAGE_MENU_SLUG, 'Help Resources', 'Help Resources', 'edit_posts', OPINIONSTAGE_HELP_RESOURCE_SLUG,'opinionstage_load_template' );
40
- }
41
- }else{
42
  add_menu_page(
43
- __('Opinion Stage', OPINIONSTAGE_TEXT_DOMAIN),
44
- __('Opinion Stage', OPINIONSTAGE_TEXT_DOMAIN),
45
  'edit_posts',
46
  OPINIONSTAGE_GETTING_STARTED_SLUG,
47
  'opinionstage_load_template',
48
- plugins_url('admin/images/os-icon.png', plugin_dir_path( __FILE__ )),
49
  '25.234323221'
50
  );
51
- add_submenu_page(OPINIONSTAGE_GETTING_STARTED_SLUG, 'Getting Started', 'Getting Started', 'edit_posts', OPINIONSTAGE_GETTING_STARTED_SLUG,'opinionstage_load_template' );
52
- add_submenu_page(OPINIONSTAGE_GETTING_STARTED_SLUG, 'Create...', 'Create...', 'edit_posts', OPINIONSTAGE_MENU_SLUG, 'opinionstage_load_template');
53
- add_submenu_page(OPINIONSTAGE_GETTING_STARTED_SLUG, 'Placements', 'Placements', 'edit_posts', OPINIONSTAGE_PLACEMENT_SLUG , 'opinionstage_load_template' );
54
  }
55
  }
56
  }
57
 
58
- function opinionstage_load_template() {
59
- $OSAPL = OpinionStageAdminPageLoader::getInstance();
60
- $OSAPL->OSAPL_LoadTemplateFile();
61
- }
62
- ?>
 
 
1
  <?php
2
+ /**
3
+ * Registers admin pages
4
+ *
5
+ * @package OpinionStageWordPressPlugin
6
+ */
7
+
8
+ defined( 'ABSPATH' ) || die();
9
+ require_once plugin_dir_path( __FILE__ ) . '../includes/opinionstage-client-session.php';
10
  add_action( 'admin_menu', 'opinionstage_register_menu_page' );
11
+
12
+ /**
13
+ * Registers admin pages
14
+ */
15
  function opinionstage_register_menu_page() {
16
+ if ( function_exists( 'add_menu_page' ) ) {
17
+ $os_options = (array) get_option( OPINIONSTAGE_OPTIONS_KEY );
18
  $os_client_logged_in = opinionstage_user_logged_in();
19
+ if ( $os_client_logged_in ) {
20
+ if ( isset( $os_options['item_count'] ) && $os_options['item_count'] > 0 ) {
21
+ add_menu_page(
22
+ __( 'Opinion Stage', 'social-polls-by-opinionstage' ),
23
+ __( 'Opinion Stage', 'social-polls-by-opinionstage' ),
24
+ 'edit_posts',
25
+ OPINIONSTAGE_VIEW_ITEM_SLUG,
26
+ 'opinionstage_load_template',
27
+ plugins_url( 'admin/images/os-icon.png', plugin_dir_path( __FILE__ ) ),
28
+ '25.234323221'
29
+ );
30
+ add_submenu_page( OPINIONSTAGE_VIEW_ITEM_SLUG, 'View My Items', 'My Items', 'edit_posts', OPINIONSTAGE_VIEW_ITEM_SLUG );
31
+ add_submenu_page( OPINIONSTAGE_VIEW_ITEM_SLUG, 'Create...', 'Create...', 'edit_posts', OPINIONSTAGE_MENU_SLUG, 'opinionstage_load_template' );
32
+ add_submenu_page( OPINIONSTAGE_VIEW_ITEM_SLUG, 'Placements', 'Placements', 'edit_posts', OPINIONSTAGE_PLACEMENT_SLUG, 'opinionstage_load_template' );
33
+ add_submenu_page( OPINIONSTAGE_VIEW_ITEM_SLUG, 'Help Resources', 'Help Resources', 'edit_posts', OPINIONSTAGE_HELP_RESOURCE_SLUG, 'opinionstage_load_template' );
34
+ } else {
35
+ add_menu_page(
36
+ __( 'Opinion Stage', 'social-polls-by-opinionstage' ),
37
+ __( 'Opinion Stage', 'social-polls-by-opinionstage' ),
38
+ 'edit_posts',
39
+ OPINIONSTAGE_MENU_SLUG,
40
+ 'opinionstage_load_template',
41
+ plugins_url( 'admin/images/os-icon.png', plugin_dir_path( __FILE__ ) ),
42
+ '25.234323221'
43
+ );
44
+ add_submenu_page( OPINIONSTAGE_MENU_SLUG, 'Create...', 'Create...', 'edit_posts', OPINIONSTAGE_MENU_SLUG );
45
+ add_submenu_page( OPINIONSTAGE_MENU_SLUG, 'View My Items', 'My Items', 'edit_posts', 'opinionstage-view-my-items', 'opinionstage_load_template' );
46
+ add_submenu_page( OPINIONSTAGE_MENU_SLUG, 'Placements', 'Placements', 'edit_posts', OPINIONSTAGE_PLACEMENT_SLUG, 'opinionstage_load_template' );
47
+ add_submenu_page( OPINIONSTAGE_MENU_SLUG, 'Help Resources', 'Help Resources', 'edit_posts', OPINIONSTAGE_HELP_RESOURCE_SLUG, 'opinionstage_load_template' );
48
+ }
49
+ } else {
 
50
  add_menu_page(
51
+ __( 'Opinion Stage', 'social-polls-by-opinionstage' ),
52
+ __( 'Opinion Stage', 'social-polls-by-opinionstage' ),
53
  'edit_posts',
54
  OPINIONSTAGE_GETTING_STARTED_SLUG,
55
  'opinionstage_load_template',
56
+ plugins_url( 'admin/images/os-icon.png', plugin_dir_path( __FILE__ ) ),
57
  '25.234323221'
58
  );
59
+ add_submenu_page( OPINIONSTAGE_GETTING_STARTED_SLUG, 'Getting Started', 'Getting Started', 'edit_posts', OPINIONSTAGE_GETTING_STARTED_SLUG, 'opinionstage_load_template' );
60
+ add_submenu_page( OPINIONSTAGE_GETTING_STARTED_SLUG, 'Create...', 'Create...', 'edit_posts', OPINIONSTAGE_MENU_SLUG, 'opinionstage_load_template' );
61
+ add_submenu_page( OPINIONSTAGE_GETTING_STARTED_SLUG, 'Placements', 'Placements', 'edit_posts', OPINIONSTAGE_PLACEMENT_SLUG, 'opinionstage_load_template' );
62
  }
63
  }
64
  }
65
 
66
+ /**
67
+ * Loads admin pages
68
+ */
69
+ function opinionstage_load_template() {
70
+ $OSAPL = OpinionStageAdminPageLoader::getInstance();
71
+ $OSAPL->OSAPL_LoadTemplateFile();
72
+ }
admin/resources/common.php CHANGED
@@ -1,24 +1,39 @@
1
  <?php
2
- // block direct access to plugin PHP files:
3
- defined( 'ABSPATH' ) or die();
 
 
 
4
 
5
- function opinionstage_common_load_resources(){
6
-
7
- // Register common assets for admin pages
 
 
 
8
  opinionstage_register_css_asset( 'menu-page', 'menu-page.css' );
9
  opinionstage_register_css_asset( 'icon-font', 'icon-font.css' );
10
- opinionstage_register_javascript_asset( 'menu-page', 'menu-page.js', array('jquery') );
 
 
 
 
 
 
 
 
 
 
 
11
 
12
- // Load common assets
13
- opinionstage_enqueue_css_asset('menu-page');
14
- opinionstage_enqueue_css_asset('icon-font');
15
- opinionstage_enqueue_js_asset('menu-page'); ?>
16
- <?php }
17
 
18
- function opinionstage_common_load_header(){
19
 
20
  }
21
- function opinionstage_common_load_footer(){
22
 
23
- }
24
- ?>
1
  <?php
2
+ /**
3
+ * Resources
4
+ *
5
+ * @package OpinionStageWordPressPlugin
6
+ */
7
 
8
+ defined( 'ABSPATH' ) || die();
9
+
10
+ /**
11
+ * Registers common assets
12
+ */
13
+ function opinionstage_common_load_resources() {
14
  opinionstage_register_css_asset( 'menu-page', 'menu-page.css' );
15
  opinionstage_register_css_asset( 'icon-font', 'icon-font.css' );
16
+ opinionstage_register_javascript_asset( 'menu-page', 'menu-page.js', array( 'jquery' ) );
17
+
18
+ wp_localize_script(
19
+ opinionstage_asset_name( 'menu-page' ),
20
+ 'OPINIONSTAGE',
21
+ array(
22
+ 'WidgetApiUrl' => esc_url( OPINIONSTAGE_CONTENT_POPUP_CLIENT_WIDGETS_API . '?type=all&page=1&per_page=99' ),
23
+ 'OswpPluginVersion' => OPINIONSTAGE_WIDGET_VERSION,
24
+ 'OswpClientToken' => opinionstage_user_access_token(),
25
+ 'adminUrlCreateLink' => esc_url( admin_url( 'admin.php?page=opinionstage-settings' ) ),
26
+ )
27
+ );
28
 
29
+ opinionstage_enqueue_css_asset( 'menu-page' );
30
+ opinionstage_enqueue_css_asset( 'icon-font' );
31
+ opinionstage_enqueue_js_asset( 'menu-page' );
32
+ }
 
33
 
34
+ function opinionstage_common_load_header() {
35
 
36
  }
37
+ function opinionstage_common_load_footer() {
38
 
39
+ }
 
admin/views/settings.php CHANGED
@@ -1,7 +1,10 @@
1
  <?php
2
  /**
 
3
  *
 
4
  */
 
5
  defined( 'ABSPATH' ) || die();
6
  ?>
7
  <div id="opinionstage-content">
@@ -47,24 +50,22 @@ defined( 'ABSPATH' ) || die();
47
  </div>
48
  <div class="opinionstage-section-cell opinionstage-description-cell">
49
  <div class="title"><?php esc_html_e( 'Poll', 'social-polls-by-opinionstage' ); ?></div>
50
- <div class="example"><?php esc_html_e( 'Get opinions, run contests & competitions', 'social-polls-by-opinionstage' ); ?></div>
51
  </div>
52
  <div class="opinionstage-section-cell opinionstage-btn-cell">
53
- <?php echo opinionstage_create_poll_link( 'opinionstage-blue-btn opinionstage-create-btn os_create_new_btn template' ); ?>
54
- <?php echo opinionstage_template_poll_link( 'opinionstage-blue-bordered-btn opinionstage-create-btn os_use_template_btn template' ); ?>
55
  </div>
56
  </div>
57
  <div class="opinionstage-section-raw">
58
  <div class="opinionstage-section-cell opinionstage-icon-cell">
59
- <div class="os-icon-plugin"><img src="<?php echo esc_url( plugins_url( 'images/personality.png', dirname( __FILE__ ) ) ); ?>" ></div>
60
  </div>
61
  <div class="opinionstage-section-cell opinionstage-description-cell">
62
- <div class="title"><?php esc_html_e( 'Personality Quiz', 'social-polls-by-opinionstage' ); ?></div>
63
- <div class="example"><?php esc_html_e( 'Create a personality test or a product/service selector', 'social-polls-by-opinionstage' ); ?></div>
64
  </div>
65
  <div class="opinionstage-section-cell opinionstage-btn-cell">
66
- <?php echo opinionstage_create_personality_link( 'opinionstage-blue-btn opinionstage-create-btn os_create_new_btn template' ); ?>
67
- <?php echo opinionstage_template_personality_quiz_link( 'opinionstage-blue-bordered-btn opinionstage-create-btn os_use_template_btn template' ); ?>
68
  </div>
69
  </div>
70
  <div class="opinionstage-section-raw">
@@ -76,21 +77,19 @@ defined( 'ABSPATH' ) || die();
76
  <div class="example"><?php esc_html_e( 'Create a knowledge test or assessment', 'social-polls-by-opinionstage' ); ?></div>
77
  </div>
78
  <div class="opinionstage-section-cell opinionstage-btn-cell">
79
- <?php echo opinionstage_create_trivia_link( 'opinionstage-blue-btn opinionstage-create-btn os_create_new_btn template' ); ?>
80
- <?php echo opinionstage_template_trivia_link( 'opinionstage-blue-bordered-btn opinionstage-create-btn os_use_template_btn template' ); ?>
81
  </div>
82
  </div>
83
  <div class="opinionstage-section-raw">
84
  <div class="opinionstage-section-cell opinionstage-icon-cell">
85
- <div class="os-icon-plugin"><img src="<?php echo esc_url( plugins_url( 'images/survey.png', dirname( __FILE__ ) ) ); ?>" ></div>
86
  </div>
87
  <div class="opinionstage-section-cell opinionstage-description-cell">
88
- <div class="title"><?php esc_html_e( 'Survey', 'social-polls-by-opinionstage' ); ?></div>
89
- <div class="example"><?php esc_html_e( 'Gather feedback from your users', 'social-polls-by-opinionstage' ); ?></div>
90
  </div>
91
  <div class="opinionstage-section-cell opinionstage-btn-cell">
92
- <?php echo opinionstage_create_survey_link( 'opinionstage-blue-btn opinionstage-create-btn os_create_new_btn template' ); ?>
93
- <?php echo opinionstage_template_survey_link( 'opinionstage-blue-bordered-btn opinionstage-create-btn os_use_template_btn template' ); ?>
94
  </div>
95
  </div>
96
  <div class="opinionstage-section-raw">
@@ -102,8 +101,7 @@ defined( 'ABSPATH' ) || die();
102
  <div class="example"><?php esc_html_e( 'Gather information from your users', 'social-polls-by-opinionstage' ); ?></div>
103
  </div>
104
  <div class="opinionstage-section-cell opinionstage-btn-cell">
105
- <?php echo opinionstage_create_form_link( 'opinionstage-blue-btn opinionstage-create-btn os_create_new_btn template' ); ?>
106
- <?php echo opinionstage_template_form_link( 'opinionstage-blue-bordered-btn opinionstage-create-btn os_use_template_btn template' ); ?>
107
  </div>
108
  </div>
109
  </div>
1
  <?php
2
  /**
3
+ * Opinionstage Create Admin page
4
  *
5
+ * @package OpinionStageWordPressPlugin
6
  */
7
+
8
  defined( 'ABSPATH' ) || die();
9
  ?>
10
  <div id="opinionstage-content">
50
  </div>
51
  <div class="opinionstage-section-cell opinionstage-description-cell">
52
  <div class="title"><?php esc_html_e( 'Poll', 'social-polls-by-opinionstage' ); ?></div>
53
+ <div class="example"><?php esc_html_e( 'Let users vote to influence & discover what others voted', 'social-polls-by-opinionstage' ); ?></div>
54
  </div>
55
  <div class="opinionstage-section-cell opinionstage-btn-cell">
56
+ <?php echo opinionstage_create_poll_link( 'opinionstage-blue-btn opinionstage-create-btn os_create_new_btn template', __( 'CREATE', 'social-polls-by-opinionstage' ) ); ?>
 
57
  </div>
58
  </div>
59
  <div class="opinionstage-section-raw">
60
  <div class="opinionstage-section-cell opinionstage-icon-cell">
61
+ <div class="os-icon-plugin"><img src="<?php echo esc_url( plugins_url( 'images/survey.png', dirname( __FILE__ ) ) ); ?>" ></div>
62
  </div>
63
  <div class="opinionstage-section-cell opinionstage-description-cell">
64
+ <div class="title"><?php esc_html_e( 'Survey', 'social-polls-by-opinionstage' ); ?></div>
65
+ <div class="example"><?php esc_html_e( 'Ask your audience multiple open-ended & close-ended questions', 'social-polls-by-opinionstage' ); ?></div>
66
  </div>
67
  <div class="opinionstage-section-cell opinionstage-btn-cell">
68
+ <?php echo opinionstage_create_survey_link( 'opinionstage-blue-btn opinionstage-create-btn os_create_new_btn template', __( 'CREATE', 'social-polls-by-opinionstage' ) ); ?>
 
69
  </div>
70
  </div>
71
  <div class="opinionstage-section-raw">
77
  <div class="example"><?php esc_html_e( 'Create a knowledge test or assessment', 'social-polls-by-opinionstage' ); ?></div>
78
  </div>
79
  <div class="opinionstage-section-cell opinionstage-btn-cell">
80
+ <?php echo opinionstage_create_trivia_link( 'opinionstage-blue-btn opinionstage-create-btn os_create_new_btn template', __( 'CREATE', 'social-polls-by-opinionstage' ) ); ?>
 
81
  </div>
82
  </div>
83
  <div class="opinionstage-section-raw">
84
  <div class="opinionstage-section-cell opinionstage-icon-cell">
85
+ <div class="os-icon-plugin"><img src="<?php echo esc_url( plugins_url( 'images/personality.png', dirname( __FILE__ ) ) ); ?>" ></div>
86
  </div>
87
  <div class="opinionstage-section-cell opinionstage-description-cell">
88
+ <div class="title"><?php esc_html_e( 'Personality Quiz', 'social-polls-by-opinionstage' ); ?></div>
89
+ <div class="example"><?php esc_html_e( 'Create a personality test or a product/service selector', 'social-polls-by-opinionstage' ); ?></div>
90
  </div>
91
  <div class="opinionstage-section-cell opinionstage-btn-cell">
92
+ <?php echo opinionstage_create_personality_link( 'opinionstage-blue-btn opinionstage-create-btn os_create_new_btn template', __( 'CREATE', 'social-polls-by-opinionstage' ) ); ?>
 
93
  </div>
94
  </div>
95
  <div class="opinionstage-section-raw">
101
  <div class="example"><?php esc_html_e( 'Gather information from your users', 'social-polls-by-opinionstage' ); ?></div>
102
  </div>
103
  <div class="opinionstage-section-cell opinionstage-btn-cell">
104
+ <?php echo opinionstage_create_form_link( 'opinionstage-blue-btn opinionstage-create-btn os_create_new_btn template', __( 'CREATE', 'social-polls-by-opinionstage' ) ); ?>
 
105
  </div>
106
  </div>
107
  </div>
admin/views/view_my_items.php CHANGED
@@ -1,5 +1,12 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die(); ?>
 
 
 
 
 
 
 
3
  <style type="text/css">
4
  .content-item-image.quiz{
5
  background-image: url(<?php echo esc_url( plugins_url( '', dirname( __FILE__ ) ) . '/images/form-not-found.png' ); ?>);
@@ -7,213 +14,59 @@ defined( 'ABSPATH' ) || die(); ?>
7
  background-size: cover;
8
  }
9
  </style>
10
- <div id="opinionstage-content">
11
- <div class="opinionstage-header-wrapper">
12
- <?php if ( $os_client_logged_in ) { ?>
13
- <div class="opinionstage-logo-wrapper">
14
  <div class="opinionstage-logo"></div>
15
  <div class="opinionstage-connectivity-status"><?php echo esc_html( $os_options['email'] ); ?>
16
  <form method="POST" action="<?php echo esc_url( get_admin_url( null, 'admin.php?page=' . OPINIONSTAGE_DISCONNECT_PAGE ) ); ?>" class="opinionstage-connect-form">
17
- <button class="opinionstage-disconnect" type="submit" ><?php esc_html_e( 'Disconnect', 'social-polls-by-opinionstage' ); ?></button>
18
  </form>
19
  </div>
20
- </div>
21
- <?php } ?>
22
- </div>
23
  <div id="container" class="opinionstage-dashboard">
24
  <div class="opinionstage-item-view-dashboard">
25
- <div id="opinionstage-section-create" class="opinionstage-dashboard-section">
26
- <div class="opinionstage-section-header">
27
- <div class="opinionstage-section-title"><?php esc_html_e( 'My Items', 'social-polls-by-opinionstage' ); ?></div>
28
- <div class="opinionstage-header-inner-container">
29
- <div class="opinionstage-header-inner-section">
30
- <a href="https://help.opinionstage.com/wordpress-plugin/how-to-add-items-to-your-wordpress-site" target="_blank" ><?php esc_html_e( 'Need help adding items to your site?', 'social-polls-by-opinionstage' ); ?></a>
31
- <div style="padding: 0 9px; width: 150px; display: inline-block;">
32
- <select id="itemList">
33
- <option value="all"><?php esc_html_e( 'ALL ITEMS', 'social-polls-by-opinionstage' ); ?></option>
34
- <option value="poll"><?php esc_html_e( 'POLL', 'social-polls-by-opinionstage' ); ?></option>
35
- <option value="survey"><?php esc_html_e( 'SURVEY', 'social-polls-by-opinionstage' ); ?></option>
36
- <option value="trivia"><?php esc_html_e( 'TRIVIA QUIZ', 'social-polls-by-opinionstage' ); ?></option>
37
- <option value="personality"><?php esc_html_e( 'PERSONALITY QUIZ', 'social-polls-by-opinionstage' ); ?></option>
38
- <option value="form"><?php esc_html_e( 'CLASSIC FORM', 'social-polls-by-opinionstage' ); ?></option>
39
- </select>
40
- </div>
41
- <div class="search search-container">
42
- <input id="searchItem" class="std-input" name="search" placeholder="Search" type="text">
43
- </div>
44
- </div>
45
- <a href="<?php echo esc_url( admin_url( 'admin.php?page=opinionstage-settings' ) ); ?>" class="opinionstage-connect-btn opinionstage-blue-btn opinionstage-item-create" style="margin-left: 20px; font-weight: 600; padding-left: 0; padding-right: 0;"><?php esc_html_e( 'CREATE', 'social-polls-by-opinionstage' ); ?></a>
 
 
 
 
 
 
 
 
 
 
 
 
46
  </div>
47
- </div>
48
- </div>
49
- <p class="result_progress" style="display: block; font-size: 16px; text-align: center;"><?php esc_html_e( 'Loading...', 'social-polls-by-opinionstage' ); ?></p>
50
- <table id="check"></table>
51
- <p class="no_item" style="display: none; font-size: 15px; text-align: center;"><?php esc_html_e( 'No items found', 'social-polls-by-opinionstage' ); ?></p>
52
- <div id="loadMore" class="btn btn_aqua btn_full-width" style="display: none;"><?php esc_html_e( 'Click for more', 'social-polls-by-opinionstage' ); ?></div>
53
- <div id="showLess" style="display: none;"><?php esc_html_e( 'Show less', 'social-polls-by-opinionstage' ); ?></div>
54
  </div>
55
  </div>
56
- </div>
57
- <script type="text/javascript">
58
- jQuery(document).ready(function($){
59
- $.ajax({
60
- url: '<?php echo esc_url( OPINIONSTAGE_CONTENT_POPUP_CLIENT_WIDGETS_API ); ?>?type=all&page=1&per_page=99',
61
- headers: {
62
- 'Accept':'application/vnd.api+json',
63
- 'Content-Type':'application/vnd.api+json',
64
- 'OSWP-Plugin-Version':'<?php echo esc_js( OPINIONSTAGE_WIDGET_VERSION ); ?>',
65
- 'OSWP-Client-Token': '<?php echo esc_js( opinionstage_user_access_token() ); ?>'
66
- },
67
- method: 'GET',
68
- dataType: 'json',
69
- success: function(data){
70
- dropdownOptions = data;
71
- if(dropdownOptions.data.length == 0){
72
- var adminUrlCreateLink = "<?php echo esc_url( admin_url( 'admin.php?page=opinionstage-settings' ) ); ?>";
73
- var viewtext = '<tbody><tr><td><p><span style="font-weight: 600; font-size: 15px; color:#212120;">No items yet..., </span><a href="'+adminUrlCreateLink+'" style="font-weight: 600; font-size: 15px; color:#3499c2;">Add your first item</a></p></td></tr></tbody>';
74
- $('.result_progress').css('display', 'none');
75
- $(viewtext).appendTo('#container table#check');
76
- }else{
77
- for (var i = 0; i < dropdownOptions.data.length; i++) {
78
- var previewBlockOsTitle = dropdownOptions.data[i].attributes['title'];
79
- var previewBlockOsType = dropdownOptions.data[i].attributes['type'];
80
- var previewBlockOsDate = dropdownOptions.data[i].attributes['updated-at'];
81
- previewBlockOsDate = new Date(previewBlockOsDate);
82
- previewBlockOsDate = previewBlockOsDate.toDateString();
83
- var resDateOs = previewBlockOsDate.split(" ");
84
- previewBlockOsDate = resDateOs[2]+' '+resDateOs[1]+' '+resDateOs[3];
85
- var previewBlockOsImageUrl = dropdownOptions.data[i].attributes['image-url'];
86
- var previewBlockOsView = dropdownOptions.data[i].attributes['landing-page-url'];
87
- var previewBlockOsEdit = dropdownOptions.data[i].attributes['edit-url'];
88
- var previewBlockOsStatistics = dropdownOptions.data[i].attributes['stats-url'];
89
- var viewtext = '<tbody id="count"><tr class="settingBorderOs"><td class="image"><a href="'+previewBlockOsView+'" target="_blank"><div class="content-item-image quiz"><img height="90" src="'+previewBlockOsImageUrl+'" width="120"><div class="content-item-label">'+previewBlockOsType+'</div></div></a></td><td class="long"><div style="position: relative;height: 85px;"><a href="'+previewBlockOsEdit+'" class="opinionstage-item-title" target="_blank">'+previewBlockOsTitle+'</a><table><tbody><tr><td><span class="os-icon-plugin icon-os-common-date"></span><div class="label">'+previewBlockOsDate+'</div></td></tr></tbody></table></div></td><td class="action"><div class="opinionstage-item-action-container"><a href="'+previewBlockOsView+'" class="opinionstage-blue-bordered-btn opinionstage-edit-content " target="_blank"> View </a><a href="'+previewBlockOsEdit+'" class="opinionstage-blue-bordered-btn opinionstage-edit-content " target="_blank"> Edit </a><a href="'+previewBlockOsStatistics+'" class="opinionstage-blue-bordered-btn opinionstage-edit-content " target="_blank"> Results </div></a></td></tr></tbody>';
90
- $('.result_progress').css('display', 'none');
91
- $(viewtext).appendTo('#container table#check');
92
- }
93
- }
94
- },
95
- complete: function(data) {
96
- size_li = $("table#check tbody#count").size();
97
- dropdownDataLength = dropdownOptions.data.length;
98
-
99
- loadMore(size_li, dropdownDataLength, "all");
100
- var data = {
101
- 'action': 'opinionstage_ajax_item_count',
102
- 'oswp_item_count' : dropdownOptions.data.length
103
- };
104
-
105
- jQuery.post(ajaxurl, data, function(response) {
106
- if(response){
107
-
108
- }
109
- });
110
-
111
- jQuery('#itemList').on('change', function() {
112
- var selectedValue = this.value;
113
- var contentLabel = jQuery(".content-item-label");
114
- var item_count = 0;
115
-
116
- jQuery('.no_item').css('display', 'none');
117
- contentLabel.each(function () {
118
- getContainer = jQuery(this).parent().parent().parent().parent();
119
- if (selectedValue != 'all' && selectedValue != jQuery(this).text().toLowerCase()) {
120
- getContainer.parent().css('display', 'none');
121
- getContainer.parent().removeClass('countItem');
122
- } else {
123
- jQuery("#searchItem").val('');
124
- getContainer.parent().css('display', 'table-row-group');
125
- getContainer.parent().addClass('countItem');
126
- item_count = item_count + 1;
127
- }
128
- });
129
-
130
- if (item_count == 0) {
131
- jQuery('.no_item').css('display', 'block');
132
- }
133
-
134
- size = $("table#check tbody.countItem").size();
135
- $("#loadMore").fadeOut(500);
136
- loadMore(size, item_count, "filter");
137
- });
138
-
139
- $("#searchItem").on("keyup",function search(e) {
140
- if(e.keyCode == 13) {
141
- var searchItem = $(this).val();
142
- var listTitle = jQuery('td.long a');
143
- var dropdownValue = jQuery('#itemList').val();
144
- var contentList = jQuery(".content-item-label");
145
-
146
- listTitle.each(function() {
147
- var title = jQuery( this ).text().toLowerCase();
148
- outerContainer = jQuery( this ).parent().parent().parent().parent();
149
-
150
- if ( dropdownValue == 'all' ) {
151
- if(!title.includes(searchItem)) {
152
- outerContainer.css('display', 'none');
153
- }
154
- else {
155
- outerContainer.css('display', 'table-row-group');
156
- }
157
- }
158
- else {
159
- contentList.each(function() {
160
- if(dropdownValue == jQuery( this ).text().toLowerCase()){
161
- if (outerContainer.hasClass('countItem')) {
162
- if(!title.includes(searchItem)) {
163
- outerContainer.css('display', 'none');
164
- }
165
- else {
166
- outerContainer.css('display', 'table-row-group');
167
- }
168
- }
169
- }
170
- });
171
- }
172
- });
173
- }
174
- });
175
- },
176
- error: function(){
177
- console.log(data.statusText);
178
- }
179
- });
180
-
181
-
182
- function loadMore(size, dataLength, item) {
183
- if(dataLength == size && dataLength > 10){
184
- setTimeout(function(){$('#showLess').trigger('click');},500);
185
- }
186
- // Show the div in 5s
187
- var countItemOS = 10;
188
- if(dataLength > countItemOS){
189
- $("#loadMore").delay(2000).fadeIn(500);
190
- }
191
-
192
- x=10;
193
- $('table#check ttbody#count:lt('+x+')').show();
194
- $('#loadMore').click(function () {
195
- x= (x+10 <= size) ? x+10 : size;
196
-
197
- if (item == 'all') {
198
- $('table#check tbody#count:lt('+x+')').show(500);
199
- }
200
- else {
201
- $('table#check tbody#countItem:lt('+x+')').show(500);
202
- }
203
-
204
- if(size == x){
205
- $("#loadMore").hide(500);
206
- }
207
- });
208
- $('#showLess').on('click', null, function () {
209
- x=(x-0<0) ? 10 : x-0;
210
- if (item == 'all') {
211
- $('table#check tbody#count').not(':lt('+x+')').hide();
212
- }
213
- else {
214
- $('table#check tbody#countItem').not(':lt('+x+')').hide();
215
- }
216
- });
217
- }
218
- });
219
- </script>
1
  <?php
2
+ /**
3
+ * My Items Settings page
4
+ *
5
+ * @package OpinionStageWordPressPlugin
6
+ */
7
+
8
+ defined( 'ABSPATH' ) || die();
9
+ ?>
10
  <style type="text/css">
11
  .content-item-image.quiz{
12
  background-image: url(<?php echo esc_url( plugins_url( '', dirname( __FILE__ ) ) . '/images/form-not-found.png' ); ?>);
14
  background-size: cover;
15
  }
16
  </style>
17
+ <div id="opinionstage-content">
18
+ <div class="opinionstage-header-wrapper">
19
+ <?php if ( $os_client_logged_in ) { ?>
20
+ <div class="opinionstage-logo-wrapper">
21
  <div class="opinionstage-logo"></div>
22
  <div class="opinionstage-connectivity-status"><?php echo esc_html( $os_options['email'] ); ?>
23
  <form method="POST" action="<?php echo esc_url( get_admin_url( null, 'admin.php?page=' . OPINIONSTAGE_DISCONNECT_PAGE ) ); ?>" class="opinionstage-connect-form">
24
+ <button class="opinionstage-disconnect" type="submit"><?php esc_html_e( 'Disconnect', 'social-polls-by-opinionstage' ); ?></button>
25
  </form>
26
  </div>
27
+ </div>
28
+ <?php } ?>
29
+ </div>
30
  <div id="container" class="opinionstage-dashboard">
31
  <div class="opinionstage-item-view-dashboard">
32
+ <div id="opinionstage-section-create" class="opinionstage-dashboard-section">
33
+ <div class="opinionstage-section-header" style="overflow: visible">
34
+ <div class="opinionstage-section-title"><?php esc_html_e( 'My Items', 'social-polls-by-opinionstage' ); ?></div>
35
+ <div class="opinionstage-header-inner-container">
36
+ <div class="opinionstage-header-inner-section">
37
+ <a href="https://help.opinionstage.com/wordpress-plugin/how-to-add-items-to-your-wordpress-site" target="_blank"><?php esc_html_e( 'Need help adding items to your site?', 'social-polls-by-opinionstage' ); ?></a>
38
+ <div style="padding: 0 9px; width: 150px; display: inline-block;">
39
+ <select id="itemList">
40
+ <option value="all"><?php esc_html_e( 'ALL ITEMS', 'social-polls-by-opinionstage' ); ?></option>
41
+ <option value="poll"><?php esc_html_e( 'POLL', 'social-polls-by-opinionstage' ); ?></option>
42
+ <option value="survey"><?php esc_html_e( 'SURVEY', 'social-polls-by-opinionstage' ); ?></option>
43
+ <option value="trivia"><?php esc_html_e( 'TRIVIA QUIZ', 'social-polls-by-opinionstage' ); ?></option>
44
+ <option value="personality"><?php esc_html_e( 'PERSONALITY QUIZ', 'social-polls-by-opinionstage' ); ?></option>
45
+ <option value="form"><?php esc_html_e( 'CLASSIC FORM', 'social-polls-by-opinionstage' ); ?></option>
46
+ </select>
47
+ </div>
48
+ <div class="search search-container">
49
+ <input id="searchItem" class="std-input" name="search" placeholder="Search" type="text">
50
+ </div>
51
+ </div>
52
+
53
+ <div style="padding: 0 9px; width: 150px; display: inline-block;position: relative;">
54
+ <button class="opinionstage-connect-btn opinionstage-blue-btn opinionstage-item-create opinionstage-show-anchor-list"><?php esc_html_e( 'Create', 'social-polls-by-opinionstage' ); ?></button>
55
+ <ul class="opinionstage-anchors-list">
56
+ <li><?php echo opinionstage_create_poll_link( '', __( 'POLL', 'social-polls-by-opinionstage' ) ); ?></li>
57
+ <li><?php echo opinionstage_create_survey_link( '', __( 'SURVEY', 'social-polls-by-opinionstage' ) ); ?></li>
58
+ <li><?php echo opinionstage_create_trivia_link( '', __( 'TRIVIA QUIZ', 'social-polls-by-opinionstage' ) ); ?></li>
59
+ <li><?php echo opinionstage_create_personality_link( '', __( 'PERSONALITY QUIZ', 'social-polls-by-opinionstage' ) ); ?></li>
60
+ <li><?php echo opinionstage_create_form_link( '', __( 'CLASSIC FORM', 'social-polls-by-opinionstage' ) ); ?></li>
61
+ </ul>
62
+ </div>
63
+ </div>
64
+ </div>
65
  </div>
66
+ <p class="result_progress" style="display: block; font-size: 16px; text-align: center;"><?php esc_html_e( 'Loading...', 'social-polls-by-opinionstage' ); ?></p>
67
+ <table id="check"></table>
68
+ <p class="no_item" style="display: none; font-size: 15px; text-align: center;"><?php esc_html_e( 'No items found', 'social-polls-by-opinionstage' ); ?></p>
69
+ <div id="opinionstage-load-more" class="btn btn_aqua btn_full-width" style="display: none;"><?php esc_html_e( 'Click for more', 'social-polls-by-opinionstage' ); ?></div>
 
 
 
70
  </div>
71
  </div>
72
+ </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/content-popup/index.js CHANGED
@@ -45,7 +45,6 @@ if ( window.OpinionStage && typeof(OpinionStage.contentPopup) !== 'undefined' )
45
  if ( !this.app ) { createModal.call(this) }
46
 
47
  this.app.widgetType = preselectWidgetType || WIDGET_ALL
48
- console.log('111: selected widget type:', this.app.widgetType)
49
  this.app.widgetSelectCb = onWidgetSelect
50
  this.modal.open()
51
  })
@@ -53,7 +52,6 @@ if ( window.OpinionStage && typeof(OpinionStage.contentPopup) !== 'undefined' )
53
  }
54
 
55
  function createModal () {
56
- console.log('createModal')
57
  const self = this
58
 
59
  self.modal = new Modal({
45
  if ( !this.app ) { createModal.call(this) }
46
 
47
  this.app.widgetType = preselectWidgetType || WIDGET_ALL
 
48
  this.app.widgetSelectCb = onWidgetSelect
49
  this.modal.open()
50
  })
52
  }
53
 
54
  function createModal () {
 
55
  const self = this
56
 
57
  self.modal = new Modal({
assets/content-popup/styles/content-popup.scss CHANGED
@@ -6,6 +6,26 @@ $brand-blue: #3aaebd;
6
  $inputs-border-color: #cccccc;
7
 
8
  .opinionstage-content-popup-contents {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  * {
10
  margin: 0;
11
  padding: 0;
@@ -330,14 +350,12 @@ $inputs-border-color: #cccccc;
330
  }
331
 
332
  .btn-close {
333
- border: 1px solid #ffffff;
334
  border-radius: 5px;
335
  color: white;
336
  cursor: pointer;
337
  display: inline-block;
338
- font: 16px/38px "Open Sans",Helvetica,sans-serif;
339
  margin-left: 20px;
340
- opacity: 0.5;
341
  text-align: center;
342
  width: 42px;
343
  &:hover {
@@ -347,7 +365,7 @@ $inputs-border-color: #cccccc;
347
 
348
  .btn-blue {
349
  display: inline-block;
350
- background-color: #3499c2;
351
  border: medium none;
352
  border-radius: 5px;
353
  color: #ffffff;
@@ -421,7 +439,7 @@ $inputs-border-color: #cccccc;
421
  display: inline-block;
422
  padding: 11px 10px;
423
  font-weight: normal;
424
- background-color: #3499c2;
425
  border-radius: 3px;
426
  border-style: hidden;
427
  width: 95px;
@@ -640,4 +658,21 @@ $inputs-border-color: #cccccc;
640
  z-index: 10;
641
  }
642
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
643
  }
6
  $inputs-border-color: #cccccc;
7
 
8
  .opinionstage-content-popup-contents {
9
+ min-width: 960px;
10
+
11
+ &[data-opinionstage-client-logged-in=''] {
12
+ max-width: 680px;
13
+ min-width: 680px;
14
+
15
+ .main-title {
16
+ font-size: 20px;
17
+ }
18
+
19
+ .page-content {
20
+ margin: 0 auto;
21
+ padding: 40px 30px 40px 30px;
22
+ #os-start-login {
23
+ margin-top: 30px;
24
+ }
25
+ }
26
+ }
27
+
28
+
29
  * {
30
  margin: 0;
31
  padding: 0;
350
  }
351
 
352
  .btn-close {
 
353
  border-radius: 5px;
354
  color: white;
355
  cursor: pointer;
356
  display: inline-block;
357
+ font: 27px/48px Open Sans,Helvetica,sans-serif;
358
  margin-left: 20px;
 
359
  text-align: center;
360
  width: 42px;
361
  &:hover {
365
 
366
  .btn-blue {
367
  display: inline-block;
368
+ background-color: #38aebd;
369
  border: medium none;
370
  border-radius: 5px;
371
  color: #ffffff;
439
  display: inline-block;
440
  padding: 11px 10px;
441
  font-weight: normal;
442
+ background-color: #38aebd;
443
  border-radius: 3px;
444
  border-style: hidden;
445
  width: 95px;
658
  z-index: 10;
659
  }
660
  }
661
+ .opinionstage-anchors-list {
662
+ .filter__itm {
663
+ padding: 0;
664
+ &:hover {
665
+ a {
666
+ color: #fff;
667
+ }
668
+ }
669
+ }
670
+ a {
671
+ padding: 5px 10px 5px 20px;
672
+ display: block;
673
+ text-decoration: none;
674
+ width: 100%;
675
+ }
676
+ }
677
+
678
  }
assets/content-popup/styles/modal-window.scss CHANGED
@@ -31,9 +31,6 @@
31
  flex-shrink: 0;
32
  margin-top: auto;
33
  margin-bottom: auto;
34
- max-width: 945px;
35
- min-width: 875px;
36
- width: 70%;
37
  background: #fff;
38
  opacity: 1;
39
  cursor: auto;
31
  flex-shrink: 0;
32
  margin-top: auto;
33
  margin-bottom: auto;
 
 
 
34
  background: #fff;
35
  opacity: 1;
36
  cursor: auto;
assets/gutenberg/package-lock.json CHANGED
@@ -2770,43 +2770,6 @@
2770
  "webpack-bundle-analyzer": "^3.6.1",
2771
  "webpack-cli": "^3.3.11",
2772
  "webpack-livereload-plugin": "^2.3.0"
2773
- },
2774
- "dependencies": {
2775
- "prettier": {
2776
- "version": "npm:wp-prettier@2.0.5",
2777
- "resolved": "https://registry.npmjs.org/wp-prettier/-/wp-prettier-2.0.5.tgz",
2778
- "integrity": "sha512-5GCgdeevIXwR3cW4Qj5XWC5MO1iSCz8+IPn0mMw6awAt/PBiey8yyO7MhePRsaMqghJAhg6Q3QLYWSnUHWkG6A==",
2779
- "dev": true
2780
- },
2781
- "puppeteer": {
2782
- "version": "npm:puppeteer-core@3.0.0",
2783
- "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-3.0.0.tgz",
2784
- "integrity": "sha512-oWjZFGMc0q2ak+8OxdmMffS79LIT0UEtmpV4h1/AARvESIqqKljf8mrfP+dQ2kas7XttsAZIxRBuWu7Y5JH8KQ==",
2785
- "dev": true,
2786
- "requires": {
2787
- "@types/mime-types": "^2.1.0",
2788
- "debug": "^4.1.0",
2789
- "extract-zip": "^2.0.0",
2790
- "https-proxy-agent": "^4.0.0",
2791
- "mime": "^2.0.3",
2792
- "mime-types": "^2.1.25",
2793
- "progress": "^2.0.1",
2794
- "proxy-from-env": "^1.0.0",
2795
- "rimraf": "^3.0.2",
2796
- "tar-fs": "^2.0.0",
2797
- "unbzip2-stream": "^1.3.3",
2798
- "ws": "^7.2.3"
2799
- }
2800
- },
2801
- "rimraf": {
2802
- "version": "3.0.2",
2803
- "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
2804
- "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
2805
- "dev": true,
2806
- "requires": {
2807
- "glob": "^7.1.3"
2808
- }
2809
- }
2810
  }
2811
  },
2812
  "@wordpress/warning": {
@@ -3615,9 +3578,9 @@
3615
  }
3616
  },
3617
  "bl": {
3618
- "version": "4.0.3",
3619
- "resolved": "https://registry.npmjs.org/bl/-/bl-4.0.3.tgz",
3620
- "integrity": "sha512-fs4G6/Hu4/EE+F75J8DuN/0IpQqNjAdC7aEQv7Qt8MHGUH7Ckv2MwTEEeN9QehD0pfIDkMI1bkHYkKy7xHyKIg==",
3621
  "dev": true,
3622
  "requires": {
3623
  "buffer": "^5.5.0",
@@ -3626,13 +3589,13 @@
3626
  },
3627
  "dependencies": {
3628
  "buffer": {
3629
- "version": "5.6.0",
3630
- "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.6.0.tgz",
3631
- "integrity": "sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw==",
3632
  "dev": true,
3633
  "requires": {
3634
- "base64-js": "^1.0.2",
3635
- "ieee754": "^1.1.4"
3636
  }
3637
  },
3638
  "readable-stream": {
@@ -12223,6 +12186,12 @@
12223
  "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=",
12224
  "dev": true
12225
  },
 
 
 
 
 
 
12226
  "prettier-linter-helpers": {
12227
  "version": "1.0.0",
12228
  "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz",
@@ -12428,6 +12397,37 @@
12428
  "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==",
12429
  "dev": true
12430
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12431
  "q": {
12432
  "version": "1.5.1",
12433
  "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz",
@@ -14865,24 +14865,24 @@
14865
  }
14866
  },
14867
  "tar-fs": {
14868
- "version": "2.1.0",
14869
- "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.0.tgz",
14870
- "integrity": "sha512-9uW5iDvrIMCVpvasdFHW0wJPez0K4JnMZtsuIeDI7HyMGJNxmDZDOCQROr7lXyS+iL/QMpj07qcjGYTSdRFXUg==",
14871
  "dev": true,
14872
  "requires": {
14873
  "chownr": "^1.1.1",
14874
  "mkdirp-classic": "^0.5.2",
14875
  "pump": "^3.0.0",
14876
- "tar-stream": "^2.0.0"
14877
  }
14878
  },
14879
  "tar-stream": {
14880
- "version": "2.1.3",
14881
- "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.1.3.tgz",
14882
- "integrity": "sha512-Z9yri56Dih8IaK8gncVPx4Wqt86NDmQTSh49XLZgjWpGZL9GK9HKParS2scqHCC4w6X9Gh2jwaU45V47XTKwVA==",
14883
  "dev": true,
14884
  "requires": {
14885
- "bl": "^4.0.1",
14886
  "end-of-stream": "^1.4.1",
14887
  "fs-constants": "^1.0.0",
14888
  "inherits": "^2.0.3",
@@ -15514,13 +15514,13 @@
15514
  },
15515
  "dependencies": {
15516
  "buffer": {
15517
- "version": "5.6.0",
15518
- "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.6.0.tgz",
15519
- "integrity": "sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw==",
15520
  "dev": true,
15521
  "requires": {
15522
- "base64-js": "^1.0.2",
15523
- "ieee754": "^1.1.4"
15524
  }
15525
  }
15526
  }
2770
  "webpack-bundle-analyzer": "^3.6.1",
2771
  "webpack-cli": "^3.3.11",
2772
  "webpack-livereload-plugin": "^2.3.0"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2773
  }
2774
  },
2775
  "@wordpress/warning": {
3578
  }
3579
  },
3580
  "bl": {
3581
+ "version": "4.1.0",
3582
+ "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz",
3583
+ "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==",
3584
  "dev": true,
3585
  "requires": {
3586
  "buffer": "^5.5.0",
3589
  },
3590
  "dependencies": {
3591
  "buffer": {
3592
+ "version": "5.7.1",
3593
+ "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
3594
+ "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
3595
  "dev": true,
3596
  "requires": {
3597
+ "base64-js": "^1.3.1",
3598
+ "ieee754": "^1.1.13"
3599
  }
3600
  },
3601
  "readable-stream": {
12186
  "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=",
12187
  "dev": true
12188
  },
12189
+ "prettier": {
12190
+ "version": "npm:wp-prettier@2.0.5",
12191
+ "resolved": "https://registry.npmjs.org/wp-prettier/-/wp-prettier-2.0.5.tgz",
12192
+ "integrity": "sha512-5GCgdeevIXwR3cW4Qj5XWC5MO1iSCz8+IPn0mMw6awAt/PBiey8yyO7MhePRsaMqghJAhg6Q3QLYWSnUHWkG6A==",
12193
+ "dev": true
12194
+ },
12195
  "prettier-linter-helpers": {
12196
  "version": "1.0.0",
12197
  "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz",
12397
  "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==",
12398
  "dev": true
12399
  },
12400
+ "puppeteer": {
12401
+ "version": "npm:puppeteer-core@3.0.0",
12402
+ "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-3.0.0.tgz",
12403
+ "integrity": "sha512-oWjZFGMc0q2ak+8OxdmMffS79LIT0UEtmpV4h1/AARvESIqqKljf8mrfP+dQ2kas7XttsAZIxRBuWu7Y5JH8KQ==",
12404
+ "dev": true,
12405
+ "requires": {
12406
+ "@types/mime-types": "^2.1.0",
12407
+ "debug": "^4.1.0",
12408
+ "extract-zip": "^2.0.0",
12409
+ "https-proxy-agent": "^4.0.0",
12410
+ "mime": "^2.0.3",
12411
+ "mime-types": "^2.1.25",
12412
+ "progress": "^2.0.1",
12413
+ "proxy-from-env": "^1.0.0",
12414
+ "rimraf": "^3.0.2",
12415
+ "tar-fs": "^2.0.0",
12416
+ "unbzip2-stream": "^1.3.3",
12417
+ "ws": "^7.2.3"
12418
+ },
12419
+ "dependencies": {
12420
+ "rimraf": {
12421
+ "version": "3.0.2",
12422
+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
12423
+ "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
12424
+ "dev": true,
12425
+ "requires": {
12426
+ "glob": "^7.1.3"
12427
+ }
12428
+ }
12429
+ }
12430
+ },
12431
  "q": {
12432
  "version": "1.5.1",
12433
  "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz",
14865
  }
14866
  },
14867
  "tar-fs": {
14868
+ "version": "2.1.1",
14869
+ "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz",
14870
+ "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==",
14871
  "dev": true,
14872
  "requires": {
14873
  "chownr": "^1.1.1",
14874
  "mkdirp-classic": "^0.5.2",
14875
  "pump": "^3.0.0",
14876
+ "tar-stream": "^2.1.4"
14877
  }
14878
  },
14879
  "tar-stream": {
14880
+ "version": "2.2.0",
14881
+ "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz",
14882
+ "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==",
14883
  "dev": true,
14884
  "requires": {
14885
+ "bl": "^4.0.3",
14886
  "end-of-stream": "^1.4.1",
14887
  "fs-constants": "^1.0.0",
14888
  "inherits": "^2.0.3",
15514
  },
15515
  "dependencies": {
15516
  "buffer": {
15517
+ "version": "5.7.1",
15518
+ "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
15519
+ "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
15520
  "dev": true,
15521
  "requires": {
15522
+ "base64-js": "^1.3.1",
15523
+ "ieee754": "^1.1.13"
15524
  }
15525
  }
15526
  }
includes/gutenberg.php CHANGED
@@ -34,8 +34,8 @@ function opinionstage_register_gutenberg_assets() {
34
 
35
  $script_asset = require $script_asset_path;
36
 
37
- $index_js = 'assets/gutenberg/build/index.js';
38
- $index_js_dependencies = $script_asset['dependencies'];
39
  $index_js_dependencies[] = opinionstage_asset_name( 'content-popup' );
40
  wp_register_script(
41
  'opinionstage-gutenberg-block-editor',
@@ -54,7 +54,6 @@ function opinionstage_register_gutenberg_assets() {
54
  false
55
  );
56
 
57
-
58
  register_block_type(
59
  'opinion-stage/block-os-poll',
60
  array(
34
 
35
  $script_asset = require $script_asset_path;
36
 
37
+ $index_js = 'assets/gutenberg/build/index.js';
38
+ $index_js_dependencies = $script_asset['dependencies'];
39
  $index_js_dependencies[] = opinionstage_asset_name( 'content-popup' );
40
  wp_register_script(
41
  'opinionstage-gutenberg-block-editor',
54
  false
55
  );
56
 
 
57
  register_block_type(
58
  'opinion-stage/block-os-poll',
59
  array(
includes/opinionstage-utility-functions.php CHANGED
@@ -1,10 +1,21 @@
1
  <?php
 
 
 
 
 
2
 
3
- // block direct access to plugin PHP files:
4
- defined( 'ABSPATH' ) or die();
5
 
6
  require_once OPINIONSTAGE_PLUGIN_DIR . 'includes/logging.php';
7
 
 
 
 
 
 
 
 
8
  function opinionstage_utm_query( $query = array() ) {
9
  $utm_query = array(
10
  'utm_source' => OPINIONSTAGE_UTM_SOURCE,
@@ -16,12 +27,25 @@ function opinionstage_utm_query( $query = array() ) {
16
  return http_build_query( array_merge( $query, $utm_query ) );
17
  }
18
 
 
 
 
 
 
 
 
19
  function opinionstage_utm_url( $path, $query = array() ) {
20
  return OPINIONSTAGE_SERVER_BASE . '/' . $path . '?' . opinionstage_utm_query( $query );
21
  }
22
 
23
  /**
24
  * Utility function to create a link with the correct host and all the required information.
 
 
 
 
 
 
25
  */
26
  function opinionstage_link( $caption, $path, $css_class = '', $query = array() ) {
27
  $link = opinionstage_utm_url( $path, $query );
@@ -29,12 +53,30 @@ function opinionstage_link( $caption, $path, $css_class = '', $query = array() )
29
  return "<a href='{$link}' target='_blank' class='{$css_class}'>{$caption}</a>";
30
  }
31
 
 
 
 
 
 
 
 
 
 
 
32
  function opinionstage_help_links( $caption, $path, $css_class = '', $style = '', $query_data = array() ) {
33
  $link = $path . '?' . opinionstage_utm_query( $query_data );
34
 
35
  return "<a href='{$link}' target='_blank' class='{$css_class}' style='{$style}'>{$caption}</a>";
36
  }
37
 
 
 
 
 
 
 
 
 
38
  function opinionstage_register_javascript_asset( $name, $relative_path, $deps = array(), $in_footer = true ) {
39
  $registered = wp_register_script(
40
  opinionstage_asset_name( $name ),
@@ -49,6 +91,12 @@ function opinionstage_register_javascript_asset( $name, $relative_path, $deps =
49
  }
50
  }
51
 
 
 
 
 
 
 
52
  function opinionstage_register_css_asset( $name, $relative_path ) {
53
  wp_register_style(
54
  opinionstage_asset_name( $name ),
@@ -58,24 +106,48 @@ function opinionstage_register_css_asset( $name, $relative_path ) {
58
  );
59
  }
60
 
 
 
 
 
 
61
  function opinionstage_enqueue_js_asset( $name ) {
62
  wp_enqueue_script( opinionstage_asset_name( $name ) );
63
  }
64
 
 
 
 
 
 
65
  function opinionstage_enqueue_css_asset( $name ) {
66
  wp_enqueue_style( opinionstage_asset_name( $name ) );
67
  }
68
 
 
 
 
 
 
 
69
  function opinionstage_asset_name( $name ) {
70
  return 'opinionstage-' . $name;
71
  }
72
 
 
 
 
 
 
73
  function opinionstage_asset_path() {
74
  return is_admin() ? 'admin' : 'public';
75
  }
76
 
77
  /**
78
  * Generates a link for editing the flyout placement on Opinion Stage site
 
 
 
79
  */
80
  function opinionstage_flyout_edit_url( $tab ) {
81
  $os_options = (array) get_option( OPINIONSTAGE_OPTIONS_KEY );
@@ -84,6 +156,9 @@ function opinionstage_flyout_edit_url( $tab ) {
84
 
85
  /**
86
  * Generates a link for editing the article placement on Opinion Stage site
 
 
 
87
  */
88
  function opinionstage_article_placement_edit_url( $tab ) {
89
  $os_options = (array) get_option( OPINIONSTAGE_OPTIONS_KEY );
@@ -92,64 +167,86 @@ function opinionstage_article_placement_edit_url( $tab ) {
92
 
93
  /**
94
  * Generates a link for editing the sidebar placement on Opinion Stage site
 
 
 
95
  */
96
  function opinionstage_sidebar_placement_edit_url( $tab ) {
97
  $os_options = (array) get_option( OPINIONSTAGE_OPTIONS_KEY );
98
  return OPINIONSTAGE_SERVER_BASE . '/containers/' . $os_options['sidebar_placement_id'] . '/edit?selected_tab=' . $tab;
99
  }
100
 
101
- function opinionstage_template_poll_link( $css_class, $title = 'USE A TEMPLATE' ) {
102
- return opinionstage_link( $title, 'dashboard/content/templates', $css_class, array('types[]' => 1) );
103
- }
104
-
105
- function opinionstage_template_survey_link( $css_class, $title = 'USE A TEMPLATE' ) {
106
- return opinionstage_link( $title, 'dashboard/content/templates', $css_class, array('types[]' => 7) );
107
- }
108
-
109
- function opinionstage_template_trivia_link( $css_class, $title = 'USE A TEMPLATE' ) {
110
- return opinionstage_link( $title, 'dashboard/content/templates', $css_class, array('types[]' => 4) );
111
- }
112
-
113
- function opinionstage_template_personality_quiz_link( $css_class, $title = 'USE A TEMPLATE' ) {
114
- return opinionstage_link( $title, 'dashboard/content/templates', $css_class, array('types[]' => 5) );
115
- }
116
-
117
- function opinionstage_template_form_link( $css_class, $title = 'USE A TEMPLATE' ) {
118
- return opinionstage_link( $title, 'dashboard/content/templates', $css_class, array('types[]' => 8) );
119
- }
120
-
121
  function opinionstage_create_widget_link( $w_type, $css_class, $title = 'CREATE NEW' ) {
122
  return opinionstage_link( $title, 'api/wp/redirects/widgets/new', $css_class, array( 'w_type' => $w_type ) );
123
  }
124
 
 
 
 
 
 
 
 
125
  function opinionstage_create_poll_link( $css_class, $title = 'CREATE NEW' ) {
126
  return opinionstage_create_widget_link( 'poll', $css_class, $title );
127
  }
128
 
 
 
 
 
 
 
 
129
  function opinionstage_create_personality_link( $css_class, $title = 'CREATE NEW' ) {
130
  return opinionstage_create_widget_link( 'outcome', $css_class, $title );
131
  }
132
 
 
 
 
 
 
 
 
133
  function opinionstage_create_trivia_link( $css_class, $title = 'CREATE NEW' ) {
134
  return opinionstage_create_widget_link( 'quiz', $css_class, $title );
135
  }
136
 
 
 
 
 
 
 
 
137
  function opinionstage_create_survey_link( $css_class, $title = 'CREATE NEW' ) {
138
  return opinionstage_create_widget_link( 'survey', $css_class, $title );
139
  }
140
 
 
 
 
 
 
 
 
141
  function opinionstage_create_form_link( $css_class, $title = 'CREATE NEW' ) {
142
  return opinionstage_create_widget_link( 'contact_form', $css_class, $title );
143
  }
144
 
145
- function opinionstage_create_slideshow_link( $css_class, $title = 'CREATE NEW' ) {
146
- return opinionstage_create_widget_link( 'slideshow', $css_class, $title );
147
- }
148
-
149
  /**
150
  * Generates a to the callback page used to connect the plugin to the Opinion Stage account
151
  */
152
  function opinionstage_callback_url() {
153
- return menu_page_url(OPINIONSTAGE_LOGIN_CALLBACK_SLUG, false);
154
  }
155
 
1
  <?php
2
+ /**
3
+ * Utility Functions
4
+ *
5
+ * @package OpinionStageWordPressPlugin
6
+ */
7
 
8
+ defined( 'ABSPATH' ) || die();
 
9
 
10
  require_once OPINIONSTAGE_PLUGIN_DIR . 'includes/logging.php';
11
 
12
+ /**
13
+ * Returns default UTM parameters and merges passed ones
14
+ *
15
+ * @param array $query array of url parameters.
16
+ *
17
+ * @return string
18
+ */
19
  function opinionstage_utm_query( $query = array() ) {
20
  $utm_query = array(
21
  'utm_source' => OPINIONSTAGE_UTM_SOURCE,
27
  return http_build_query( array_merge( $query, $utm_query ) );
28
  }
29
 
30
+ /**
31
+ * Returns UTM url
32
+ *
33
+ * @param string $path api path.
34
+ * @param array $query query args.
35
+ * @return string
36
+ */
37
  function opinionstage_utm_url( $path, $query = array() ) {
38
  return OPINIONSTAGE_SERVER_BASE . '/' . $path . '?' . opinionstage_utm_query( $query );
39
  }
40
 
41
  /**
42
  * Utility function to create a link with the correct host and all the required information.
43
+ *
44
+ * @param string $caption anchors caption.
45
+ * @param string $path path.
46
+ * @param string $css_class class.
47
+ * @param array $query list of parameters.
48
+ * @return string
49
  */
50
  function opinionstage_link( $caption, $path, $css_class = '', $query = array() ) {
51
  $link = opinionstage_utm_url( $path, $query );
53
  return "<a href='{$link}' target='_blank' class='{$css_class}'>{$caption}</a>";
54
  }
55
 
56
+ /**
57
+ * Returns Help links anchors
58
+ *
59
+ * @param string $caption anchors caption.
60
+ * @param string $path path.
61
+ * @param string $css_class class.
62
+ * @param string $style inline styles.
63
+ * @param array $query_data list of parameters.
64
+ * @return string
65
+ */
66
  function opinionstage_help_links( $caption, $path, $css_class = '', $style = '', $query_data = array() ) {
67
  $link = $path . '?' . opinionstage_utm_query( $query_data );
68
 
69
  return "<a href='{$link}' target='_blank' class='{$css_class}' style='{$style}'>{$caption}</a>";
70
  }
71
 
72
+ /**
73
+ * Registers JS on admin pages
74
+ *
75
+ * @param string $name asset name.
76
+ * @param string $relative_path relative path.
77
+ * @param array $deps list of dependencies.
78
+ * @param bool $in_footer footer.
79
+ */
80
  function opinionstage_register_javascript_asset( $name, $relative_path, $deps = array(), $in_footer = true ) {
81
  $registered = wp_register_script(
82
  opinionstage_asset_name( $name ),
91
  }
92
  }
93
 
94
+ /**
95
+ * Registers CSS on admin pages
96
+ *
97
+ * @param string $name name.
98
+ * @param string $relative_path relative path.
99
+ */
100
  function opinionstage_register_css_asset( $name, $relative_path ) {
101
  wp_register_style(
102
  opinionstage_asset_name( $name ),
106
  );
107
  }
108
 
109
+ /**
110
+ * Enqueue JS
111
+ *
112
+ * @param string $name name.
113
+ */
114
  function opinionstage_enqueue_js_asset( $name ) {
115
  wp_enqueue_script( opinionstage_asset_name( $name ) );
116
  }
117
 
118
+ /**
119
+ * Enqueue CSS
120
+ *
121
+ * @param string $name name.
122
+ */
123
  function opinionstage_enqueue_css_asset( $name ) {
124
  wp_enqueue_style( opinionstage_asset_name( $name ) );
125
  }
126
 
127
+ /**
128
+ * Generates name of asset
129
+ *
130
+ * @param string $name name.
131
+ * @return string
132
+ */
133
  function opinionstage_asset_name( $name ) {
134
  return 'opinionstage-' . $name;
135
  }
136
 
137
+ /**
138
+ * Returns path of asset
139
+ *
140
+ * @return string
141
+ */
142
  function opinionstage_asset_path() {
143
  return is_admin() ? 'admin' : 'public';
144
  }
145
 
146
  /**
147
  * Generates a link for editing the flyout placement on Opinion Stage site
148
+ *
149
+ * @param string $tab tab.
150
+ * @return string
151
  */
152
  function opinionstage_flyout_edit_url( $tab ) {
153
  $os_options = (array) get_option( OPINIONSTAGE_OPTIONS_KEY );
156
 
157
  /**
158
  * Generates a link for editing the article placement on Opinion Stage site
159
+ *
160
+ * @param string $tab tab.
161
+ * @return string
162
  */
163
  function opinionstage_article_placement_edit_url( $tab ) {
164
  $os_options = (array) get_option( OPINIONSTAGE_OPTIONS_KEY );
167
 
168
  /**
169
  * Generates a link for editing the sidebar placement on Opinion Stage site
170
+ *
171
+ * @param string $tab tab.
172
+ * @return string
173
  */
174
  function opinionstage_sidebar_placement_edit_url( $tab ) {
175
  $os_options = (array) get_option( OPINIONSTAGE_OPTIONS_KEY );
176
  return OPINIONSTAGE_SERVER_BASE . '/containers/' . $os_options['sidebar_placement_id'] . '/edit?selected_tab=' . $tab;
177
  }
178
 
179
+ /**
180
+ * Returns create widget url
181
+ *
182
+ * @param string $w_type widget type.
183
+ * @param string $css_class class.
184
+ * @param string $title anchors caption.
185
+ * @return string
186
+ */
 
 
 
 
 
 
 
 
 
 
 
 
187
  function opinionstage_create_widget_link( $w_type, $css_class, $title = 'CREATE NEW' ) {
188
  return opinionstage_link( $title, 'api/wp/redirects/widgets/new', $css_class, array( 'w_type' => $w_type ) );
189
  }
190
 
191
+ /**
192
+ * Returns create poll anchor
193
+ *
194
+ * @param string $css_class class.
195
+ * @param string $title anchors caption.
196
+ * @return string
197
+ */
198
  function opinionstage_create_poll_link( $css_class, $title = 'CREATE NEW' ) {
199
  return opinionstage_create_widget_link( 'poll', $css_class, $title );
200
  }
201
 
202
+ /**
203
+ * Returns create personality quiz anchor
204
+ *
205
+ * @param string $css_class class.
206
+ * @param string $title anchors caption.
207
+ * @return string
208
+ */
209
  function opinionstage_create_personality_link( $css_class, $title = 'CREATE NEW' ) {
210
  return opinionstage_create_widget_link( 'outcome', $css_class, $title );
211
  }
212
 
213
+ /**
214
+ * Returns create trivia anchor
215
+ *
216
+ * @param string $css_class class.
217
+ * @param string $title anchors caption.
218
+ * @return string
219
+ */
220
  function opinionstage_create_trivia_link( $css_class, $title = 'CREATE NEW' ) {
221
  return opinionstage_create_widget_link( 'quiz', $css_class, $title );
222
  }
223
 
224
+ /**
225
+ * Returns create survey anchor
226
+ *
227
+ * @param string $css_class class.
228
+ * @param string $title anchors caption.
229
+ * @return string
230
+ */
231
  function opinionstage_create_survey_link( $css_class, $title = 'CREATE NEW' ) {
232
  return opinionstage_create_widget_link( 'survey', $css_class, $title );
233
  }
234
 
235
+ /**
236
+ * Returns create classic form anchor
237
+ *
238
+ * @param string $css_class class.
239
+ * @param string $title anchors caption.
240
+ * @return string
241
+ */
242
  function opinionstage_create_form_link( $css_class, $title = 'CREATE NEW' ) {
243
  return opinionstage_create_widget_link( 'contact_form', $css_class, $title );
244
  }
245
 
 
 
 
 
246
  /**
247
  * Generates a to the callback page used to connect the plugin to the Opinion Stage account
248
  */
249
  function opinionstage_callback_url() {
250
+ return menu_page_url( OPINIONSTAGE_LOGIN_CALLBACK_SLUG, false );
251
  }
252
 
opinionstage-polls.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Poll, Survey, Form & Quiz Maker by OpinionStage (Deprecated)
4
  Plugin URI: https://www.opinionstage.com
5
  Description: Add a highly engaging poll, survey, quiz or contact form builder to your site. You can add the poll, survey, quiz or form to any post/page or to the sidebar.
6
- Version: 19.7.5
7
  Author: OpinionStage.com
8
  Author URI: https://www.opinionstage.com
9
  Text Domain: social-polls-by-opinionstage
3
  Plugin Name: Poll, Survey, Form & Quiz Maker by OpinionStage (Deprecated)
4
  Plugin URI: https://www.opinionstage.com
5
  Description: Add a highly engaging poll, survey, quiz or contact form builder to your site. You can add the poll, survey, quiz or form to any post/page or to the sidebar.
6
+ Version: 19.7.6
7
  Author: OpinionStage.com
8
  Author URI: https://www.opinionstage.com
9
  Text Domain: social-polls-by-opinionstage
plugin.php CHANGED
@@ -8,7 +8,7 @@
8
  * Plugin Name: Poll, Survey & Quiz by OpinionStage
9
  * Plugin URI: https://www.opinionstage.com
10
  * Description: Add a highly engaging poll, survey, quiz or contact form builder to your site. You can add the poll, survey, quiz or form to any post/page or to the sidebar.
11
- * Version: 19.7.5
12
  * Author: OpinionStage.com
13
  * Author URI: https://www.opinionstage.com
14
  * Text Domain: social-polls-by-opinionstage
@@ -34,7 +34,7 @@ if ( defined( 'WP_DEBUG' ) && true === WP_DEBUG ) {
34
  }
35
  }
36
 
37
- define( 'OPINIONSTAGE_WIDGET_VERSION', '19.7.5' );
38
 
39
  define( 'OPINIONSTAGE_TEXT_DOMAIN', 'social-polls-by-opinionstage' );
40
 
8
  * Plugin Name: Poll, Survey & Quiz by OpinionStage
9
  * Plugin URI: https://www.opinionstage.com
10
  * Description: Add a highly engaging poll, survey, quiz or contact form builder to your site. You can add the poll, survey, quiz or form to any post/page or to the sidebar.
11
+ * Version: 19.7.6
12
  * Author: OpinionStage.com
13
  * Author URI: https://www.opinionstage.com
14
  * Text Domain: social-polls-by-opinionstage
34
  }
35
  }
36
 
37
+ define( 'OPINIONSTAGE_WIDGET_VERSION', '19.7.6' );
38
 
39
  define( 'OPINIONSTAGE_TEXT_DOMAIN', 'social-polls-by-opinionstage' );
40
 
readme.txt CHANGED
@@ -4,19 +4,21 @@ Donate link: https://www.opinionstage.com
4
  Tags: poll, quiz, survey, poll plugin, quiz plugin, survey plugin
5
  Requires at least: 2.8
6
  Tested up to: 5.6
7
- Stable tag: 19.7.5
8
  Requires PHP: 5.2
9
 
10
  Add a Poll, Survey, or Quiz to your Wordpress site. Create a poll, quiz, or survey from scratch or based on templates.
11
 
12
  == Description ==
13
 
14
- Opinion Stage is a poll, survey, form and quiz maker plugin for WordPress. It's the easiest way to create anything from opinion polls, feedback surveys, buzzfeed-syle quizzes to contact forms.
15
- You can create the items from scratch or using hundreds of optimized templates.
 
16
 
17
- <a href="https://www.opinionstage.com/templates?o=wp35e8" target="_blank">Check out our Quiz, Poll, Survey and Form Examples</a>
 
18
 
19
- == Main Poll, Survey, Form & Quiz WordPress Plugin Features: ==
20
 
21
  * Easy and fast to create polls, surveys and quizzes either from scratch or using one of the hundreds of free templates.
22
  * Integrate images & videos into the polls, quizzes and surveys.
@@ -38,7 +40,7 @@ https://www.youtube.com/watch?v=EDtpm6zVKvk
38
 
39
  == Templates & Examples ==
40
 
41
- Start form scratch or use one of the hundreds of templates to get up and going super fast with an optimized item.
42
 
43
  == Integrations ==
44
 
@@ -100,11 +102,11 @@ Opinion Stage is a powerful & easy-to-use interactive content (e.g. poll, quiz,
100
 
101
  = Are Opinion Stage items responsive? =
102
 
103
- Yes, all item formats (e.g. poll, quiz, survey, form, etc) created with Opinion Stage are fully responsive, and designed to optimally display on mobile, tablet and desktop
104
 
105
  = What interactive item formats does Opinion Stage support? =
106
 
107
- With Opinion Stage you can create the following item formats: Poll, Poll Sets, Personality Quiz, Trivia Quiz, Survey, Slideshow, Form, Story Article, List. We are constantly adding additional interactive formats so stay tuned!
108
 
109
  = What is the difference between a poll and a survey =
110
 
@@ -138,6 +140,9 @@ Opinion Stage makes it easy for you to comply with the GDPR regulation. For more
138
  N/A
139
 
140
  == Changelog ==
 
 
 
141
  = 19.7.5 =
142
  * fixed html render issue on create items page
143
  = 19.7.4 =
4
  Tags: poll, quiz, survey, poll plugin, quiz plugin, survey plugin
5
  Requires at least: 2.8
6
  Tested up to: 5.6
7
+ Stable tag: 19.7.6
8
  Requires PHP: 5.2
9
 
10
  Add a Poll, Survey, or Quiz to your Wordpress site. Create a poll, quiz, or survey from scratch or based on templates.
11
 
12
  == Description ==
13
 
14
+ * <a href="https://www.opinionstage.com/templates/c/surveys?o=wp35e8" target="_blank">Survey Templates & Examples</a>
15
+ * <a href="https://www.opinionstage.com/templates/c/quizzes?o=wp35e8" target="_blank">Quiz Templates & Examples</a>
16
+ * <a href="https://www.opinionstage.com/templates/c/polls?o=wp35e8" target="_blank">Poll Templates & Examples</a>
17
 
18
+ Opinion Stage is a poll, survey and quiz maker plugin for WordPress. It's the easiest way to create anything from opinion polls, feedback surveys, buzzfeed-syle quizzes to contact forms.
19
+ You can create the items from scratch or using hundreds of optimized templates.
20
 
21
+ == Main Poll, Survey & Quiz WordPress Plugin Features: ==
22
 
23
  * Easy and fast to create polls, surveys and quizzes either from scratch or using one of the hundreds of free templates.
24
  * Integrate images & videos into the polls, quizzes and surveys.
40
 
41
  == Templates & Examples ==
42
 
43
+ Start from scratch or use one of the hundreds of templates to get up and going super fast with an optimized item.
44
 
45
  == Integrations ==
46
 
102
 
103
  = Are Opinion Stage items responsive? =
104
 
105
+ Yes, all item formats (poll, quiz, survey & form) created with Opinion Stage are fully responsive, and designed to optimally display on mobile, tablet and desktop
106
 
107
  = What interactive item formats does Opinion Stage support? =
108
 
109
+ With Opinion Stage you can create the following item formats: Poll, Poll Sets, Personality Quiz, Trivia Quiz, Survey, Form & Story.
110
 
111
  = What is the difference between a poll and a survey =
112
 
140
  N/A
141
 
142
  == Changelog ==
143
+ = 19.7.6 =
144
+ * UI update
145
+ * internal code improvements
146
  = 19.7.5 =
147
  * fixed html render issue on create items page
148
  = 19.7.4 =