ably-ui 4.2.0.dev.1a5533f

Sign up to get free protection for your applications and to get access to all the features.
Files changed (150) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +8 -0
  3. data/Gemfile.lock +34 -0
  4. data/LICENSE +13 -0
  5. data/README.md +419 -0
  6. data/ably-ui.gemspec +22 -0
  7. data/lib/ably_ui/core/code/code.html.erb +3 -0
  8. data/lib/ably_ui/core/code/code.rb +11 -0
  9. data/lib/ably_ui/core/code/component.css +70 -0
  10. data/lib/ably_ui/core/code/component.js +1 -0
  11. data/lib/ably_ui/core/connect_state_wrapper/component.js +1 -0
  12. data/lib/ably_ui/core/contact_footer/component.css +12 -0
  13. data/lib/ably_ui/core/contact_footer/component.js +1 -0
  14. data/lib/ably_ui/core/contact_footer/contact_footer.html.erb +32 -0
  15. data/lib/ably_ui/core/contact_footer/contact_footer.rb +13 -0
  16. data/lib/ably_ui/core/cookie_message/component.css +14 -0
  17. data/lib/ably_ui/core/cookie_message/component.js +1 -0
  18. data/lib/ably_ui/core/core.rb +65 -0
  19. data/lib/ably_ui/core/feature_footer/component.css +13 -0
  20. data/lib/ably_ui/core/feature_footer/component.js +1 -0
  21. data/lib/ably_ui/core/feature_footer/feature_footer.html.erb +54 -0
  22. data/lib/ably_ui/core/feature_footer/feature_footer.rb +30 -0
  23. data/lib/ably_ui/core/featured_link/component.css +17 -0
  24. data/lib/ably_ui/core/featured_link/component.js +1 -0
  25. data/lib/ably_ui/core/featured_link/featured_link.html.erb +6 -0
  26. data/lib/ably_ui/core/featured_link/featured_link.rb +17 -0
  27. data/lib/ably_ui/core/flash/component.css +30 -0
  28. data/lib/ably_ui/core/flash/component.js +1 -0
  29. data/lib/ably_ui/core/fonts/NEXT-Book-Light-Italic.eot +0 -0
  30. data/lib/ably_ui/core/fonts/NEXT-Book-Light-Italic.otf +0 -0
  31. data/lib/ably_ui/core/fonts/NEXT-Book-Light-Italic.woff +0 -0
  32. data/lib/ably_ui/core/fonts/NEXT-Book-Light-Italic.woff2 +0 -0
  33. data/lib/ably_ui/core/fonts/NEXT-Book-Light.eot +0 -0
  34. data/lib/ably_ui/core/fonts/NEXT-Book-Light.otf +0 -0
  35. data/lib/ably_ui/core/fonts/NEXT-Book-Light.woff +0 -0
  36. data/lib/ably_ui/core/fonts/NEXT-Book-Light.woff2 +0 -0
  37. data/lib/ably_ui/core/fonts/NEXT-Book-Medium-Italic.eot +0 -0
  38. data/lib/ably_ui/core/fonts/NEXT-Book-Medium-Italic.otf +0 -0
  39. data/lib/ably_ui/core/fonts/NEXT-Book-Medium-Italic.woff +0 -0
  40. data/lib/ably_ui/core/fonts/NEXT-Book-Medium-Italic.woff2 +0 -0
  41. data/lib/ably_ui/core/fonts/NEXT-Book-Medium.eot +0 -0
  42. data/lib/ably_ui/core/fonts/NEXT-Book-Medium.otf +0 -0
  43. data/lib/ably_ui/core/fonts/NEXT-Book-Medium.woff +0 -0
  44. data/lib/ably_ui/core/fonts/NEXT-Book-Medium.woff2 +0 -0
  45. data/lib/ably_ui/core/fonts/next.css +59 -0
  46. data/lib/ably_ui/core/footer/component.css +14 -0
  47. data/lib/ably_ui/core/footer/component.js +1 -0
  48. data/lib/ably_ui/core/footer/footer.html.erb +190 -0
  49. data/lib/ably_ui/core/footer/footer.rb +14 -0
  50. data/lib/ably_ui/core/icon/component.css +1 -0
  51. data/lib/ably_ui/core/icon/component.js +1 -0
  52. data/lib/ably_ui/core/icon/icon.html.erb +3 -0
  53. data/lib/ably_ui/core/icon/icon.rb +25 -0
  54. data/lib/ably_ui/core/images/ably-logo.svg +15 -0
  55. data/lib/ably_ui/core/images/ably-stack.svg +14 -0
  56. data/lib/ably_ui/core/images/blog-thumb1.jpg +0 -0
  57. data/lib/ably_ui/core/images/blog-thumb2.jpg +0 -0
  58. data/lib/ably_ui/core/images/blog-thumb3.jpg +0 -0
  59. data/lib/ably_ui/core/images/cust-logo-ao-col-pos.png +0 -0
  60. data/lib/ably_ui/core/images/cust-logo-ao-col-pos@2x.png +0 -0
  61. data/lib/ably_ui/core/images/cust-logo-ausopen-col-pos.png +0 -0
  62. data/lib/ably_ui/core/images/cust-logo-ausopen-col-pos@2x.png +0 -0
  63. data/lib/ably_ui/core/images/cust-logo-hubspot-col-pos.png +0 -0
  64. data/lib/ably_ui/core/images/cust-logo-hubspot-col-pos@2x.png +0 -0
  65. data/lib/ably_ui/core/images/cust-logo-lightspeed-col-pos.png +0 -0
  66. data/lib/ably_ui/core/images/cust-logo-lightspeed-col-pos@2x.png +0 -0
  67. data/lib/ably_ui/core/images/cust-logo-lightspeed-syst-col-pos.png +0 -0
  68. data/lib/ably_ui/core/images/cust-logo-lightspeed-syst-col-pos@2x.png +0 -0
  69. data/lib/ably_ui/core/images/cust-logo-split-col-pos.png +0 -0
  70. data/lib/ably_ui/core/images/cust-logo-split-col-pos@2x.png +0 -0
  71. data/lib/ably_ui/core/images/cust-logo-vitac-col-pos.png +0 -0
  72. data/lib/ably_ui/core/images/cust-logo-vitac-col-pos@2x.png +0 -0
  73. data/lib/ably_ui/core/images/cust-photo-hubspot-max-freiert.jpg +0 -0
  74. data/lib/ably_ui/core/images/cust-photo-split-pato-echague.jpg +0 -0
  75. data/lib/ably_ui/core/images/cust-photo-vitac-joe-antonio.jpg +0 -0
  76. data/lib/ably_ui/core/images/flexible-companies.png +0 -0
  77. data/lib/ably_ui/core/images/rocket-list-2021.png +0 -0
  78. data/lib/ably_ui/core/images/scale-motif-open-empathetic.svg +1 -0
  79. data/lib/ably_ui/core/images/technical-support-01-800x533.jpg +0 -0
  80. data/lib/ably_ui/core/logo/component.js +1 -0
  81. data/lib/ably_ui/core/logo/logo.html.erb +28 -0
  82. data/lib/ably_ui/core/logo/logo.rb +19 -0
  83. data/lib/ably_ui/core/meganav/component.css +103 -0
  84. data/lib/ably_ui/core/meganav/component.js +1 -0
  85. data/lib/ably_ui/core/meganav/component.json +37 -0
  86. data/lib/ably_ui/core/meganav/meganav.html.erb +26 -0
  87. data/lib/ably_ui/core/meganav/meganav.rb +53 -0
  88. data/lib/ably_ui/core/meganav_blog_posts_list/component.js +1 -0
  89. data/lib/ably_ui/core/meganav_blog_posts_list/meganav_blog_posts_list.html.erb +5 -0
  90. data/lib/ably_ui/core/meganav_blog_posts_list/meganav_blog_posts_list.rb +13 -0
  91. data/lib/ably_ui/core/meganav_content_developers/component.js +1 -0
  92. data/lib/ably_ui/core/meganav_content_developers/meganav_content_developers.html.erb +77 -0
  93. data/lib/ably_ui/core/meganav_content_developers/meganav_content_developers.rb +13 -0
  94. data/lib/ably_ui/core/meganav_content_platform/component.js +1 -0
  95. data/lib/ably_ui/core/meganav_content_platform/meganav_content_platform.html.erb +91 -0
  96. data/lib/ably_ui/core/meganav_content_platform/meganav_content_platform.rb +14 -0
  97. data/lib/ably_ui/core/meganav_content_use_cases/component.js +1 -0
  98. data/lib/ably_ui/core/meganav_content_use_cases/meganav_content_use_cases.html.erb +72 -0
  99. data/lib/ably_ui/core/meganav_content_use_cases/meganav_content_use_cases.rb +13 -0
  100. data/lib/ably_ui/core/meganav_content_why_ably/component.js +1 -0
  101. data/lib/ably_ui/core/meganav_content_why_ably/meganav_content_why_ably.html.erb +70 -0
  102. data/lib/ably_ui/core/meganav_content_why_ably/meganav_content_why_ably.rb +13 -0
  103. data/lib/ably_ui/core/meganav_control/component.js +1 -0
  104. data/lib/ably_ui/core/meganav_control/meganav_control.html.erb +6 -0
  105. data/lib/ably_ui/core/meganav_control/meganav_control.rb +12 -0
  106. data/lib/ably_ui/core/meganav_control_mobile_dropdown/component.js +1 -0
  107. data/lib/ably_ui/core/meganav_control_mobile_dropdown/meganav_control_mobile_dropdown.html.erb +7 -0
  108. data/lib/ably_ui/core/meganav_control_mobile_dropdown/meganav_control_mobile_dropdown.rb +11 -0
  109. data/lib/ably_ui/core/meganav_control_mobile_panel_close/component.js +1 -0
  110. data/lib/ably_ui/core/meganav_control_mobile_panel_close/meganav_control_mobile_panel_close.html.erb +10 -0
  111. data/lib/ably_ui/core/meganav_control_mobile_panel_close/meganav_control_mobile_panel_close.rb +9 -0
  112. data/lib/ably_ui/core/meganav_control_mobile_panel_open/component.js +1 -0
  113. data/lib/ably_ui/core/meganav_control_mobile_panel_open/meganav_control_mobile_panel_open.html.erb +7 -0
  114. data/lib/ably_ui/core/meganav_control_mobile_panel_open/meganav_control_mobile_panel_open.rb +9 -0
  115. data/lib/ably_ui/core/meganav_items_desktop/component.js +1 -0
  116. data/lib/ably_ui/core/meganav_items_desktop/meganav_items_desktop.html.erb +16 -0
  117. data/lib/ably_ui/core/meganav_items_desktop/meganav_items_desktop.rb +15 -0
  118. data/lib/ably_ui/core/meganav_items_mobile/component.js +1 -0
  119. data/lib/ably_ui/core/meganav_items_mobile/meganav_items_mobile.html.erb +47 -0
  120. data/lib/ably_ui/core/meganav_items_mobile/meganav_items_mobile.rb +17 -0
  121. data/lib/ably_ui/core/meganav_items_signed_in/component.js +1 -0
  122. data/lib/ably_ui/core/meganav_items_signed_in/meganav_items_signed_in.html.erb +49 -0
  123. data/lib/ably_ui/core/meganav_items_signed_in/meganav_items_signed_in.rb +33 -0
  124. data/lib/ably_ui/core/notice/component.css +8 -0
  125. data/lib/ably_ui/core/notice/component.js +2 -0
  126. data/lib/ably_ui/core/notice/notice.html.erb +16 -0
  127. data/lib/ably_ui/core/notice/notice.rb +29 -0
  128. data/lib/ably_ui/core/scripts.js +1 -0
  129. data/lib/ably_ui/core/showcase/component.css +31 -0
  130. data/lib/ably_ui/core/showcase/component.js +1 -0
  131. data/lib/ably_ui/core/showcase/showcase.html.erb +76 -0
  132. data/lib/ably_ui/core/showcase/showcase.rb +190 -0
  133. data/lib/ably_ui/core/sign_out_link/component.js +1 -0
  134. data/lib/ably_ui/core/sign_out_link/sign_out_link.html.erb +1 -0
  135. data/lib/ably_ui/core/sign_out_link/sign_out_link.rb +17 -0
  136. data/lib/ably_ui/core/slider/component.css +9 -0
  137. data/lib/ably_ui/core/slider/component.js +1 -0
  138. data/lib/ably_ui/core/slider/slider.html.erb +28 -0
  139. data/lib/ably_ui/core/slider/slider.rb +38 -0
  140. data/lib/ably_ui/core/sprites.svg +113 -0
  141. data/lib/ably_ui/core/styles.css +332 -0
  142. data/lib/ably_ui/core/uptime/component.css +129 -0
  143. data/lib/ably_ui/core/uptime/component.js +1 -0
  144. data/lib/ably_ui/core/uptime/uptime.html.erb +0 -0
  145. data/lib/ably_ui/core/uptime/uptime.rb +7 -0
  146. data/lib/ably_ui/reset/scripts.js +1 -0
  147. data/lib/ably_ui/reset/styles.css +487 -0
  148. data/lib/ably_ui/version.rb +3 -0
  149. data/lib/ably_ui.rb +27 -0
  150. metadata +210 -0
@@ -0,0 +1,6 @@
1
+ <%= button_tag(type: "button",
2
+ class: ["ui-meganav-link", "h-64", "flex", "items-center", "group", theme(:text_color)],
3
+ data: { id: "meganav-control" },
4
+ aria: { expanded: false, controls: @aria_controls, label: "Show #{content}" }) do -%>
5
+ <%= content -%><%= render(AblyUi::Core::Icon.new(name: "icon-gui-disclosure-arrow", size: "1.5rem", color: "text-cool-black", additional_css: "transform rotate-90 group-hover:text-gui-hover group-focus:text-gui-focus")) %>
6
+ <% end %>
@@ -0,0 +1,12 @@
1
+ module AblyUi
2
+ module Core
3
+ class MeganavControl < ViewComponent::Base
4
+ include AblyUi::Core::MeganavConfig
5
+
6
+ def initialize(aria_controls:, theme_name:)
7
+ @aria_controls = aria_controls
8
+ theme_setup(theme_name)
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1 @@
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.AblyUi=t():(e.AblyUi=e.AblyUi||{},e.AblyUi.Core=e.AblyUi.Core||{},e.AblyUi.Core.MeganavControlMobileDropdown=t())}(this,(function(){return(()=>{var e={9581:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var l=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return t.querySelector("[data-id=".concat(e,"]"))}},6265:function(e){var t;t=function(){return function(e){var t={};function r(l){if(t[l])return t[l].exports;var o=t[l]={i:l,l:!1,exports:{}};return e[l].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,l){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:l})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var l=Object.create(null);if(r.r(l),Object.defineProperty(l,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(l,o,function(t){return e[t]}.bind(null,o));return l},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=0)}([function(e,t,r){"use strict";r.r(t);var l=function(e){return Array.isArray(e)?e:[e]},o=function(e){return e instanceof Node},n=function(e,t){if(e&&t){e=function(e){return e instanceof NodeList}(e)?e:[e];for(var r=0;r<e.length&&!0!==t(e[r],r,e.length);r++);}},c=function(e){return console.error("[scroll-lock] ".concat(e))},a=function(e){if(Array.isArray(e))return e.join(", ")},i=function(e){var t=[];return n(e,(function(e){return t.push(e)})),t},u=function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:document;if(r&&-1!==i(l.querySelectorAll(t)).indexOf(e))return e;for(;(e=e.parentElement)&&-1===i(l.querySelectorAll(t)).indexOf(e););return e},d=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document,l=-1!==i(r.querySelectorAll(t)).indexOf(e);return l},s=function(e){if(e)return"hidden"===getComputedStyle(e).overflow},f=function(e){if(e)return!!s(e)||e.scrollTop<=0},p=function(e){if(e){if(s(e))return!0;var t=e.scrollTop,r=e.scrollHeight;return t+e.offsetHeight>=r}},g=function(e){if(e)return!!s(e)||e.scrollLeft<=0},b=function(e){if(e){if(s(e))return!0;var t=e.scrollLeft,r=e.scrollWidth;return t+e.offsetWidth>=r}},v=function(e){return d(e,'textarea, [contenteditable="true"]')},h=function(e){return d(e,'input[type="range"]')};function m(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.d(t,"disablePageScroll",(function(){return k})),r.d(t,"enablePageScroll",(function(){return w})),r.d(t,"getScrollState",(function(){return A})),r.d(t,"clearQueueScrollLocks",(function(){return x})),r.d(t,"getTargetScrollBarWidth",(function(){return L})),r.d(t,"getCurrentTargetScrollBarWidth",(function(){return G})),r.d(t,"getPageScrollBarWidth",(function(){return T})),r.d(t,"getCurrentPageScrollBarWidth",(function(){return P})),r.d(t,"addScrollableTarget",(function(){return W})),r.d(t,"removeScrollableTarget",(function(){return F})),r.d(t,"addScrollableSelector",(function(){return O})),r.d(t,"removeScrollableSelector",(function(){return E})),r.d(t,"addLockableTarget",(function(){return Y})),r.d(t,"addLockableSelector",(function(){return j})),r.d(t,"setFillGapMethod",(function(){return q})),r.d(t,"addFillGapTarget",(function(){return M})),r.d(t,"removeFillGapTarget",(function(){return U})),r.d(t,"addFillGapSelector",(function(){return C})),r.d(t,"removeFillGapSelector",(function(){return N})),r.d(t,"refillGaps",(function(){return B}));var y=["padding","margin","width","max-width","none"],S={scroll:!0,queue:0,scrollableSelectors:["[data-scroll-lock-scrollable]"],lockableSelectors:["body","[data-scroll-lock-lockable]"],fillGapSelectors:["body","[data-scroll-lock-fill-gap]","[data-scroll-lock-lockable]"],fillGapMethod:y[0],startTouchY:0,startTouchX:0},k=function(e){S.queue<=0&&(S.scroll=!1,K(),H()),W(e),S.queue++},w=function(e){S.queue>0&&S.queue--,S.queue<=0&&(S.scroll=!0,R(),z()),F(e)},A=function(){return S.scroll},x=function(){S.queue=0},L=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(o(e)){var r=e.style.overflowY;t?A()||(e.style.overflowY=e.getAttribute("data-scroll-lock-saved-overflow-y-property")):e.style.overflowY="scroll";var l=G(e);return e.style.overflowY=r,l}return 0},G=function(e){if(o(e)){if(e===document.body){var t=document.documentElement.clientWidth;return window.innerWidth-t}var r=e.style.borderLeftWidth,l=e.style.borderRightWidth;e.style.borderLeftWidth="0px",e.style.borderRightWidth="0px";var n=e.offsetWidth-e.clientWidth;return e.style.borderLeftWidth=r,e.style.borderRightWidth=l,n}return 0},T=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return L(document.body,e)},P=function(){return G(document.body)},W=function(e){e&&l(e).map((function(e){n(e,(function(e){o(e)?e.setAttribute("data-scroll-lock-scrollable",""):c('"'.concat(e,'" is not a Element.'))}))}))},F=function(e){e&&l(e).map((function(e){n(e,(function(e){o(e)?e.removeAttribute("data-scroll-lock-scrollable"):c('"'.concat(e,'" is not a Element.'))}))}))},O=function(e){e&&l(e).map((function(e){S.scrollableSelectors.push(e)}))},E=function(e){e&&l(e).map((function(e){S.scrollableSelectors=S.scrollableSelectors.filter((function(t){return t!==e}))}))},Y=function(e){e&&(l(e).map((function(e){n(e,(function(e){o(e)?e.setAttribute("data-scroll-lock-lockable",""):c('"'.concat(e,'" is not a Element.'))}))})),A()||K())},j=function(e){e&&(l(e).map((function(e){S.lockableSelectors.push(e)})),A()||K(),C(e))},q=function(e){if(e)if(-1!==y.indexOf(e))S.fillGapMethod=e,B();else{var t=y.join(", ");c('"'.concat(e,'" method is not available!\nAvailable fill gap methods: ').concat(t,"."))}},M=function(e){e&&l(e).map((function(e){n(e,(function(e){o(e)?(e.setAttribute("data-scroll-lock-fill-gap",""),S.scroll||J(e)):c('"'.concat(e,'" is not a Element.'))}))}))},U=function(e){e&&l(e).map((function(e){n(e,(function(e){o(e)?(e.removeAttribute("data-scroll-lock-fill-gap"),S.scroll||Z(e)):c('"'.concat(e,'" is not a Element.'))}))}))},C=function(e){e&&l(e).map((function(e){-1===S.fillGapSelectors.indexOf(e)&&(S.fillGapSelectors.push(e),S.scroll||I(e))}))},N=function(e){e&&l(e).map((function(e){S.fillGapSelectors=S.fillGapSelectors.filter((function(t){return t!==e})),S.scroll||V(e)}))},B=function(){S.scroll||H()},K=function(){var e=a(S.lockableSelectors);_(e)},R=function(){var e=a(S.lockableSelectors);X(e)},_=function(e){var t=document.querySelectorAll(e);n(t,(function(e){D(e)}))},X=function(e){var t=document.querySelectorAll(e);n(t,(function(e){Q(e)}))},D=function(e){if(o(e)&&"true"!==e.getAttribute("data-scroll-lock-locked")){var t=window.getComputedStyle(e);e.setAttribute("data-scroll-lock-saved-overflow-y-property",t.overflowY),e.setAttribute("data-scroll-lock-saved-inline-overflow-property",e.style.overflow),e.setAttribute("data-scroll-lock-saved-inline-overflow-y-property",e.style.overflowY),e.style.overflow="hidden",e.setAttribute("data-scroll-lock-locked","true")}},Q=function(e){o(e)&&"true"===e.getAttribute("data-scroll-lock-locked")&&(e.style.overflow=e.getAttribute("data-scroll-lock-saved-inline-overflow-property"),e.style.overflowY=e.getAttribute("data-scroll-lock-saved-inline-overflow-y-property"),e.removeAttribute("data-scroll-lock-saved-overflow-property"),e.removeAttribute("data-scroll-lock-saved-inline-overflow-property"),e.removeAttribute("data-scroll-lock-saved-inline-overflow-y-property"),e.removeAttribute("data-scroll-lock-locked"))},H=function(){S.fillGapSelectors.map((function(e){I(e)}))},z=function(){S.fillGapSelectors.map((function(e){V(e)}))},I=function(e){var t=document.querySelectorAll(e),r=-1!==S.lockableSelectors.indexOf(e);n(t,(function(e){J(e,r)}))},J=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(o(e)){var r;if(""===e.getAttribute("data-scroll-lock-lockable")||t)r=L(e,!0);else{var l=u(e,a(S.lockableSelectors));r=L(l,!0)}"true"===e.getAttribute("data-scroll-lock-filled-gap")&&Z(e);var n=window.getComputedStyle(e);if(e.setAttribute("data-scroll-lock-filled-gap","true"),e.setAttribute("data-scroll-lock-current-fill-gap-method",S.fillGapMethod),"margin"===S.fillGapMethod){var c=parseFloat(n.marginRight);e.style.marginRight="".concat(c+r,"px")}else if("width"===S.fillGapMethod)e.style.width="calc(100% - ".concat(r,"px)");else if("max-width"===S.fillGapMethod)e.style.maxWidth="calc(100% - ".concat(r,"px)");else if("padding"===S.fillGapMethod){var i=parseFloat(n.paddingRight);e.style.paddingRight="".concat(i+r,"px")}}},V=function(e){var t=document.querySelectorAll(e);n(t,(function(e){Z(e)}))},Z=function(e){if(o(e)&&"true"===e.getAttribute("data-scroll-lock-filled-gap")){var t=e.getAttribute("data-scroll-lock-current-fill-gap-method");e.removeAttribute("data-scroll-lock-filled-gap"),e.removeAttribute("data-scroll-lock-current-fill-gap-method"),"margin"===t?e.style.marginRight="":"width"===t?e.style.width="":"max-width"===t?e.style.maxWidth="":"padding"===t&&(e.style.paddingRight="")}};"undefined"!=typeof window&&window.addEventListener("resize",(function(e){B()})),"undefined"!=typeof document&&(document.addEventListener("touchstart",(function(e){S.scroll||(S.startTouchY=e.touches[0].clientY,S.startTouchX=e.touches[0].clientX)})),document.addEventListener("touchmove",(function(e){if(!S.scroll){var t=S.startTouchY,r=S.startTouchX,l=e.touches[0].clientY,o=e.touches[0].clientX;if(e.touches.length<2){var n=a(S.scrollableSelectors),c={up:t<l,down:t>l,left:r<o,right:r>o},i={up:t+3<l,down:t-3>l,left:r+3<o,right:r-3>o};!function t(r){var l=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(r){var o=u(r,n,!1);if(h(r))return!1;if(l||v(r)&&u(r,n)||d(r,n)){var a=!1;g(r)&&b(r)?(c.up&&f(r)||c.down&&p(r))&&(a=!0):f(r)&&p(r)?(c.left&&g(r)||c.right&&b(r))&&(a=!0):(i.up&&f(r)||i.down&&p(r)||i.left&&g(r)||i.right&&b(r))&&(a=!0),a&&(o?t(o,!0):e.cancelable&&e.preventDefault())}else t(o)}else e.cancelable&&e.preventDefault()}(e.target)}}}),{passive:!1}),document.addEventListener("touchend",(function(e){S.scroll||(S.startTouchY=0,S.startTouchX=0)})));var $={hide:function(e){c('"hide" is deprecated! Use "disablePageScroll" instead. \n https://github.com/FL3NKEY/scroll-lock#disablepagescrollscrollabletarget'),k(e)},show:function(e){c('"show" is deprecated! Use "enablePageScroll" instead. \n https://github.com/FL3NKEY/scroll-lock#enablepagescrollscrollabletarget'),w(e)},toggle:function(e){c('"toggle" is deprecated! Do not use it.'),A()?k():w(e)},getState:function(){return c('"getState" is deprecated! Use "getScrollState" instead. \n https://github.com/FL3NKEY/scroll-lock#getscrollstate'),A()},getWidth:function(){return c('"getWidth" is deprecated! Use "getPageScrollBarWidth" instead. \n https://github.com/FL3NKEY/scroll-lock#getpagescrollbarwidth'),T()},getCurrentWidth:function(){return c('"getCurrentWidth" is deprecated! Use "getCurrentPageScrollBarWidth" instead. \n https://github.com/FL3NKEY/scroll-lock#getcurrentpagescrollbarwidth'),P()},setScrollableTargets:function(e){c('"setScrollableTargets" is deprecated! Use "addScrollableTarget" instead. \n https://github.com/FL3NKEY/scroll-lock#addscrollabletargetscrollabletarget'),W(e)},setFillGapSelectors:function(e){c('"setFillGapSelectors" is deprecated! Use "addFillGapSelector" instead. \n https://github.com/FL3NKEY/scroll-lock#addfillgapselectorfillgapselector'),C(e)},setFillGapTargets:function(e){c('"setFillGapTargets" is deprecated! Use "addFillGapTarget" instead. \n https://github.com/FL3NKEY/scroll-lock#addfillgaptargetfillgaptarget'),M(e)},clearQueue:function(){c('"clearQueue" is deprecated! Use "clearQueueScrollLocks" instead. \n https://github.com/FL3NKEY/scroll-lock#clearqueuescrolllocks'),x()}},ee=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},l=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(l=l.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),l.forEach((function(t){m(e,t,r[t])}))}return e}({disablePageScroll:k,enablePageScroll:w,getScrollState:A,clearQueueScrollLocks:x,getTargetScrollBarWidth:L,getCurrentTargetScrollBarWidth:G,getPageScrollBarWidth:T,getCurrentPageScrollBarWidth:P,addScrollableSelector:O,removeScrollableSelector:E,addScrollableTarget:W,removeScrollableTarget:F,addLockableSelector:j,addLockableTarget:Y,addFillGapSelector:C,removeFillGapSelector:N,addFillGapTarget:M,removeFillGapTarget:U,setFillGapMethod:q,refillGaps:B,_state:S},$);t.default=ee}]).default},e.exports=t()}},t={};function r(l){var o=t[l];if(void 0!==o)return o.exports;var n=t[l]={exports:{}};return e[l].call(n.exports,n,n.exports,r),n.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var l in t)r.o(t,l)&&!r.o(e,l)&&Object.defineProperty(e,l,{enumerable:!0,get:t[l]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var l={};return(()=>{"use strict";r.d(l,{default:()=>n});var e=r(6265),t=r.n(e),o=r(9581);const n=function(e){var r=e.clearPanels,l=(0,o.A)("meganav-control-mobile-dropdown"),n=(0,o.A)("meganav-mobile-dropdown"),c=(0,o.A)("meganav-control-mobile-dropdown-menu"),a=(0,o.A)("meganav-control-mobile-dropdown-close"),i=function(){"false"===l.getAttribute("aria-expanded")?(n.classList.replace("invisible","visible"),l.setAttribute("aria-expanded",!0),t().disablePageScroll()):(n.classList.replace("visible","invisible"),l.setAttribute("aria-expanded",!1),t().enablePageScroll(),r()),c.classList.toggle("hidden"),a.classList.toggle("hidden")};return l.addEventListener("click",i),{teardown:function(){l.removeEventListener("click",i),t().enablePageScroll()},clear:function(){n.classList.replace("visible","invisible"),l.setAttribute("aria-expanded",!1),c.classList.remove("hidden"),a.classList.add("hidden"),t().enablePageScroll()}}}})(),l.default})()}));
@@ -0,0 +1,7 @@
1
+ <%= button_tag(type: "button",
2
+ class: "block ml-24 mr-0 px-0 py-16 hover:text-gui-hover focus:text-gui-focus focus:outline-none",
3
+ data: { id: "meganav-control-mobile-dropdown" },
4
+ aria: { expanded: false, controls: "meganav-mobile-dropdown" }) do %>
5
+ <%= render(AblyUi::Core::Icon.new(name: "icon-gui-burger-menu", size: "1.5rem", color: theme(:mobile_menu_color), additional_css: "transition-colors", data: { id: "meganav-control-mobile-dropdown-menu" })) %>
6
+ <%= render(AblyUi::Core::Icon.new(name: "icon-gui-close", size: "1.5rem", color: theme(:mobile_menu_color), additional_css: "transition-colors hidden", data: { id: "meganav-control-mobile-dropdown-close" })) %>
7
+ <% end %>
@@ -0,0 +1,11 @@
1
+ module AblyUi
2
+ module Core
3
+ class MeganavControlMobileDropdown < ViewComponent::Base
4
+ include AblyUi::Core::MeganavConfig
5
+
6
+ def initialize(theme_name:)
7
+ theme_setup(theme_name)
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1 @@
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.AblyUi=t():(e.AblyUi=e.AblyUi||{},e.AblyUi.Core=e.AblyUi.Core||{},e.AblyUi.Core.MeganavControlMobilePanelClose=t())}(this,(function(){return(()=>{"use strict";var e={9581:(e,t,r)=>{r.d(t,{n:()=>n});var n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return t.querySelectorAll("[data-id=".concat(e,"]"))}}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,r),a.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var n={};return(()=>{r.d(n,{default:()=>t});var e=r(9581);const t=function(){var t=Array.from((0,e.n)("meganav-control-mobile-panel-close")),r=Array.from((0,e.n)("meganav-control-mobile-panel-open"));return t.map((function(e){var t=r.find((function(t){return t.getAttribute("aria-controls")===e.getAttribute("aria-controls")})),n=document.querySelector("#".concat(e.getAttribute("aria-controls"))),o=function(e,t,r){return function(){e.setAttribute("aria-expanded",!1),t.setAttribute("aria-expanded",!1),r.classList.replace("block","hidden"),r.style.height=null}}(e,t,n);return e.addEventListener("click",o),{teardown:function(){return e.removeEventListener("click",o)},clear:function(){return e.setAttribute("aria-expanded",!1)}}}))}})(),n.default})()}));
@@ -0,0 +1,10 @@
1
+ <div class="mx-24 md:mx-32">
2
+ <%= button_tag(type: "button",
3
+ class: "ui-meganav-mobile-link text-gui-default mb-16",
4
+ data: { id: "meganav-control-mobile-panel-close" },
5
+ aria: { expanded: false, controls: @aria_controls, label: "Hide panel" }) do -%>
6
+ <%= render(AblyUi::Core::Icon.new(name: "icon-gui-disclosure-arrow", size: "1.5rem", color: "text-cool-black", additional_css: "relative -top-1 transform rotate-180")) %>
7
+ Back
8
+ <% end %>
9
+ <hr class="ui-meganav-hr" />
10
+ </div>
@@ -0,0 +1,9 @@
1
+ module AblyUi
2
+ module Core
3
+ class MeganavControlMobilePanelClose < ViewComponent::Base
4
+ def initialize(aria_controls:)
5
+ @aria_controls = aria_controls
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1 @@
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.AblyUi=t():(e.AblyUi=e.AblyUi||{},e.AblyUi.Core=e.AblyUi.Core||{},e.AblyUi.Core.MeganavControlMobilePanelOpen=t())}(this,(function(){return(()=>{"use strict";var e={9581:(e,t,n)=>{n.d(t,{A:()=>o,n:()=>r});var o=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return t.querySelector("[data-id=".concat(e,"]"))},r=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return t.querySelectorAll("[data-id=".concat(e,"]"))}}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o](i,i.exports,n),i.exports}n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var o={};return(()=>{n.d(o,{default:()=>t});var e=n(9581);const t=function(){var t,n=Array.from((0,e.n)("meganav-control-mobile-panel-close")),o=Array.from((0,e.n)("meganav-control-mobile-panel-open")),r=(0,e.A)("meganav-mobile-dropdown"),i=(t=getComputedStyle(document.documentElement).getPropertyValue("--ui-meganav-height"),parseFloat(t)*parseFloat(getComputedStyle(document.documentElement).fontSize));return o.map((function(e){var t=n.find((function(t){return t.getAttribute("aria-controls")===e.getAttribute("aria-controls")})),o=document.querySelector("#".concat(e.getAttribute("aria-controls"))),a=function(e,t,n){return function(){e.setAttribute("aria-expanded",!0),t.setAttribute("aria-expanded",!0),n.classList.replace("hidden","block"),n.style.height="".concat(window.innerHeight-i>n.offsetHeight?n.offsetHeight:window.innerHeight-i,"px")}}(e,t,o);return e.addEventListener("click",a),{teardown:function(){return e.removeEventListener("click",a)},clear:function(){o.classList.replace("block","hidden"),r.classList.remove("ui-meganav-mobile-dropdown-expand"),e.setAttribute("aria-expanded",!1),o.style.height=null}}}))}})(),o.default})()}));
@@ -0,0 +1,7 @@
1
+ <%= button_tag(type: "button",
2
+ class: "ui-meganav-mobile-link",
3
+ data: { id: "meganav-control-mobile-panel-open" },
4
+ aria: { expanded: false, controls: @aria_controls, label: "Show #{content}" }) do %>
5
+ <%= content %>
6
+ <%= render(AblyUi::Core::Icon.new(name: "icon-gui-disclosure-arrow", size: "1.5rem", color: "text-cool-black", additional_css: "relative -top-1 ml-auto float-right")) %>
7
+ <% end %>
@@ -0,0 +1,9 @@
1
+ module AblyUi
2
+ module Core
3
+ class MeganavControlMobilePanelOpen < ViewComponent::Base
4
+ def initialize(aria_controls:)
5
+ @aria_controls = aria_controls
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1 @@
1
+ !function(e,o){"object"==typeof exports&&"object"==typeof module?module.exports=o():"function"==typeof define&&define.amd?define([],o):"object"==typeof exports?exports.AblyUi=o():(e.AblyUi=e.AblyUi||{},e.AblyUi.Core=e.AblyUi.Core||{},e.AblyUi.Core.MeganavItemsDesktop=o())}(this,(function(){return{}.default}));
@@ -0,0 +1,16 @@
1
+ <ul class="hidden md:flex" data-id="meganav-items-desktop">
2
+ <% panels.each do |panel| %>
3
+ <li class="ui-meganav-item">
4
+ <%= render(AblyUi::Core::MeganavControl.new(aria_controls: panel[:id], theme_name: @theme_name)) do %>
5
+ <%= panel[:label] %>
6
+ <% end %>
7
+
8
+ <%= content_tag :div, class: 'ui-meganav-panel invisible', data: { id: "meganav-panel" }, id: panel[:id] do %>
9
+ <%= render("AblyUi::Core::#{panel[:component]}".constantize.new(url_base: url_base)) %>
10
+ <% end %>
11
+ </li>
12
+ <% end %>
13
+ <li>
14
+ <%= link_to "Pricing", abs_url("/pricing"), data: { id: "meganav-link" }, class: ["ui-meganav-link", "h-64", "items-center", "flex", theme(:text_color)] %>
15
+ </li>
16
+ </ul>
@@ -0,0 +1,15 @@
1
+ module AblyUi
2
+ module Core
3
+ class MeganavItemsDesktop < ViewComponent::Base
4
+ include MeganavConfig
5
+ include Util
6
+
7
+ attr_reader :url_base
8
+
9
+ def initialize(theme_name:, url_base:)
10
+ @theme_name = theme_name
11
+ @url_base = url_base
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1 @@
1
+ !function(e,o){"object"==typeof exports&&"object"==typeof module?module.exports=o():"function"==typeof define&&define.amd?define([],o):"object"==typeof exports?exports.AblyUi=o():(e.AblyUi=e.AblyUi||{},e.AblyUi.Core=e.AblyUi.Core||{},e.AblyUi.Core.MeganavItemsMobile=o())}(this,(function(){return{}.default}));
@@ -0,0 +1,47 @@
1
+ <ul class="flex md:hidden" data-id="meganav-items-mobile">
2
+ <li>
3
+ <% if @session_data[:signedIn] && @session_data[:logOut] %>
4
+ <%= render(AblyUi::Core::SignOutLink.new(session_data: @session_data, classes: ["ui-meganav-link", theme(:text_color)], url_base: url_base)) %>
5
+ <% else %>
6
+ <%= link_to "Login", abs_url(login_link), data: { id: "meganav-link" }, class: ["ui-meganav-link", theme(:text_color)] %>
7
+ <% end %>
8
+ </li>
9
+
10
+ <li class="ui-meganav-item">
11
+ <%= render(AblyUi::Core::MeganavControlMobileDropdown.new(theme_name: @theme_name)) %>
12
+
13
+ <div class="ui-meganav-mobile-dropdown invisible" id="meganav-mobile-dropdown" data-id="meganav-mobile-dropdown">
14
+ <div class="py-16 ui-grid-px bg-white">
15
+ <ul class="mb-16">
16
+ <% panels.each do |panel| %>
17
+ <li class="ui-meganav-mobile-item">
18
+ <%= render(AblyUi::Core::MeganavControlMobilePanelOpen.new(aria_controls: "#{panel[:id]}-mobile")) do %>
19
+ <%= panel[:label] %>
20
+ <% end %>
21
+
22
+ <%= content_tag(:div, class: "ui-meganav-panel-mobile hidden", id: "#{panel[:id]}-mobile", data: { scroll_lock_scrollable: true }) do %>
23
+ <%= render(AblyUi::Core::MeganavControlMobilePanelClose.new(aria_controls: "#{panel[:id]}-mobile")) %>
24
+ <%= render("AblyUi::Core::#{panel[:component]}".constantize.new(url_base: url_base)) %>
25
+ <% end %>
26
+ </li>
27
+ <% end %>
28
+ <li>
29
+ <%= link_to "Pricing", abs_url("/pricing"), class: "ui-meganav-mobile-link" %>
30
+ </li>
31
+ </ul>
32
+
33
+ <hr class="ui-meganav-hr mb-20" />
34
+
35
+ <div class="flex justify-between items-center mb-16">
36
+ <%= link_to "Contact us", abs_url("/contact"), class: "text-menu2 font-medium block ml-0 mr-8 lg:mx-12 p-0 hover:text-gui-hover focus:text-gui-focus focus:outline-none" %>
37
+
38
+ <% if @session_data[:signedIn] && @session_data[:account] %>
39
+ <%= link_to "Dashboard", abs_url(@session_data[:account][:links][:dashboard][:href]), class: "ui-btn-secondary" %>
40
+ <% else %>
41
+ <%= link_to "Sign up free", abs_url("/sign-up"), class: "ui-btn" %>
42
+ <% end %>
43
+ </div>
44
+ </div>
45
+ </div>
46
+ </li>
47
+ </ul>
@@ -0,0 +1,17 @@
1
+ module AblyUi
2
+ module Core
3
+ class MeganavItemsMobile < ViewComponent::Base
4
+ include MeganavConfig
5
+ include Util
6
+
7
+ attr_reader :options, :login_link, :url_base
8
+
9
+ def initialize(session_data:, theme_name:, login_link:, url_base:)
10
+ @theme_name = theme_name
11
+ @session_data = session_data
12
+ @login_link = login_link
13
+ @url_base = url_base
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1 @@
1
+ !function(e,o){"object"==typeof exports&&"object"==typeof module?module.exports=o():"function"==typeof define&&define.amd?define([],o):"object"==typeof exports?exports.AblyUi=o():(e.AblyUi=e.AblyUi||{},e.AblyUi.Core=e.AblyUi.Core||{},e.AblyUi.Core.MeganavItemsSignedIn=o())}(this,(function(){return{}.default}));
@@ -0,0 +1,49 @@
1
+ <ul class="hidden md:flex items-center">
2
+ <li class="ui-meganav-item relative">
3
+ <%= render(AblyUi::Core::MeganavControl.new(aria_controls: "account-panel", theme_name: @theme_name)) do %>
4
+ <%= account_name %>
5
+ <% end %>
6
+
7
+ <div class="ui-meganav-panel-account invisible" id="account-panel" data-id="meganav-panel">
8
+ <% if account? %>
9
+ <p class="ui-meganav-overline mt-16 mx-16">Your account</p>
10
+ <ul class="mb-16 mx-16">
11
+ <% @session_data[:account][:links].each do |key, link| %>
12
+ <li>
13
+ <%= link_to link[:text], link[:href], class: "ui-meganav-account-link" %>
14
+ </li>
15
+ <% end %>
16
+ </ul>
17
+ <% end %>
18
+
19
+ <p class="ui-meganav-overline mx-16"><%= preferred_email %></p>
20
+ <ul class="mb-8 mx-16">
21
+ <li>
22
+ <%= link_to @session_data[:mySettings][:text], @session_data[:mySettings][:href], class: "ui-meganav-account-link" %>
23
+ </li>
24
+
25
+ <% if access_tokens? %>
26
+ <li>
27
+ <%= link_to @session_data[:myAccessTokens][:href], class: "ui-meganav-account-link" do %>
28
+ <%= @session_data[:myAccessTokens][:text] %><span class="ui-version-tag">beta</span>
29
+ <% end %>
30
+ </li>
31
+ <% end %>
32
+ </ul>
33
+
34
+ <hr class="ui-meganav-hr mb-16" />
35
+
36
+ <div class="mb-16 px-16">
37
+ <% if @session_data[:logOut] %>
38
+ <%= render(AblyUi::Core::SignOutLink.new(session_data: @session_data, classes: "ui-meganav-account-link", url_base: url_base)) %>
39
+ <% end %>
40
+ </div>
41
+ </div>
42
+ </li>
43
+
44
+ <% if account? %>
45
+ <li class="ml-16">
46
+ <%= link_to "Dashboard", @session_data[:account][:links][:dashboard][:href], class: "ui-btn-secondary p-btn-small" %>
47
+ </li>
48
+ <% end %>
49
+ </ul>
@@ -0,0 +1,33 @@
1
+ module AblyUi
2
+ module Core
3
+ class MeganavItemsSignedIn < ViewComponent::Base
4
+ include MeganavConfig
5
+ include Util
6
+
7
+ attr_reader :url_base
8
+
9
+ def initialize(session_data:, theme_name:, url_base:)
10
+ @theme_name = theme_name
11
+ @session_data = session_data
12
+ @url_base = url_base
13
+ end
14
+
15
+ def account?
16
+ @session_data[:account].present?
17
+ end
18
+
19
+ # Access tokens are behind a feature flag
20
+ def access_tokens?
21
+ @session_data[:myAccessTokens].present?
22
+ end
23
+
24
+ def account_name
25
+ truncate(@session_data[:accountName], length: 20)
26
+ end
27
+
28
+ def preferred_email
29
+ truncate(@session_data[:preferredEmail], length: 20)
30
+ end
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,8 @@
1
+ @layer components {
2
+ .ui-announcement {
3
+ @apply font-sans;
4
+ max-height: 37.5rem;
5
+ transition: max-height 300ms;
6
+ }
7
+ }
8
+
@@ -0,0 +1,2 @@
1
+ /*! For license information please see component.js.LICENSE.txt */
2
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.AblyUi=t(require("react")):(e.AblyUi=e.AblyUi||{},e.AblyUi.Core=e.AblyUi.Core||{},e.AblyUi.Core.Notice=t(e[void 0]))}(this,(function(e){return(()=>{var t={7856:function(e){e.exports=function(){"use strict";var e=Object.hasOwnProperty,t=Object.setPrototypeOf,n=Object.isFrozen,r=Object.getPrototypeOf,o=Object.getOwnPropertyDescriptor,i=Object.freeze,a=Object.seal,c=Object.create,l="undefined"!=typeof Reflect&&Reflect,u=l.apply,s=l.construct;u||(u=function(e,t,n){return e.apply(t,n)}),i||(i=function(e){return e}),a||(a=function(e){return e}),s||(s=function(e,t){return new(Function.prototype.bind.apply(e,[null].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(t))))});var f,p=x(Array.prototype.forEach),d=x(Array.prototype.pop),m=x(Array.prototype.push),y=x(String.prototype.toLowerCase),g=x(String.prototype.match),h=x(String.prototype.replace),v=x(String.prototype.indexOf),b=x(String.prototype.trim),w=x(RegExp.prototype.test),O=(f=TypeError,function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return s(f,t)});function x(e){return function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return u(e,t,r)}}function T(e,r){t&&t(e,null);for(var o=r.length;o--;){var i=r[o];if("string"==typeof i){var a=y(i);a!==i&&(n(r)||(r[o]=a),i=a)}e[i]=!0}return e}function A(t){var n=c(null),r=void 0;for(r in t)u(e,t,[r])&&(n[r]=t[r]);return n}function S(e,t){for(;null!==e;){var n=o(e,t);if(n){if(n.get)return x(n.get);if("function"==typeof n.value)return x(n.value)}e=r(e)}return function(e){return console.warn("fallback value for",e),null}}var E=i(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),k=i(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),j=i(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),D=i(["animate","color-profile","cursor","discard","fedropshadow","feimage","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),N=i(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),_=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),R=i(["#text"]),L=i(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),M=i(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),C=i(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),I=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),P=a(/\{\{[\s\S]*|[\s\S]*\}\}/gm),U=a(/<%[\s\S]*|[\s\S]*%>/gm),F=a(/^data-[\-\w.\u00B7-\uFFFF]/),z=a(/^aria-[\-\w]+$/),H=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),B=a(/^(?:\w+script|data):/i),W=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function G(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var $=function(){return"undefined"==typeof window?null:window},Y=function(e,t){if("object"!==(void 0===e?"undefined":q(e))||"function"!=typeof e.createPolicy)return null;var n=null,r="data-tt-policy-suffix";t.currentScript&&t.currentScript.hasAttribute(r)&&(n=t.currentScript.getAttribute(r));var o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}};return function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:$(),n=function(t){return e(t)};if(n.version="2.2.9",n.removed=[],!t||!t.document||9!==t.document.nodeType)return n.isSupported=!1,n;var r=t.document,o=t.document,a=t.DocumentFragment,c=t.HTMLTemplateElement,l=t.Node,u=t.Element,s=t.NodeFilter,f=t.NamedNodeMap,x=void 0===f?t.NamedNodeMap||t.MozNamedAttrMap:f,V=t.Text,K=t.Comment,J=t.DOMParser,X=t.trustedTypes,Z=u.prototype,Q=S(Z,"cloneNode"),ee=S(Z,"nextSibling"),te=S(Z,"childNodes"),ne=S(Z,"parentNode");if("function"==typeof c){var re=o.createElement("template");re.content&&re.content.ownerDocument&&(o=re.content.ownerDocument)}var oe=Y(X,r),ie=oe&&Ie?oe.createHTML(""):"",ae=o,ce=ae.implementation,le=ae.createNodeIterator,ue=ae.createDocumentFragment,se=r.importNode,fe={};try{fe=A(o).documentMode?o.documentMode:{}}catch(e){}var pe={};n.isSupported="function"==typeof ne&&ce&&void 0!==ce.createHTMLDocument&&9!==fe;var de=P,me=U,ye=F,ge=z,he=B,ve=W,be=H,we=null,Oe=T({},[].concat(G(E),G(k),G(j),G(N),G(R))),xe=null,Te=T({},[].concat(G(L),G(M),G(C),G(I))),Ae=null,Se=null,Ee=!0,ke=!0,je=!1,De=!1,Ne=!1,_e=!1,Re=!1,Le=!1,Me=!1,Ce=!0,Ie=!1,Pe=!0,Ue=!0,Fe=!1,ze={},He=T({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Be=null,We=T({},["audio","video","img","source","image","track"]),qe=null,Ge=T({},["alt","class","for","id","label","name","pattern","placeholder","summary","title","value","style","xmlns"]),$e="http://www.w3.org/1998/Math/MathML",Ye="http://www.w3.org/2000/svg",Ve="http://www.w3.org/1999/xhtml",Ke=Ve,Je=!1,Xe=null,Ze=o.createElement("form"),Qe=function(e){Xe&&Xe===e||(e&&"object"===(void 0===e?"undefined":q(e))||(e={}),e=A(e),we="ALLOWED_TAGS"in e?T({},e.ALLOWED_TAGS):Oe,xe="ALLOWED_ATTR"in e?T({},e.ALLOWED_ATTR):Te,qe="ADD_URI_SAFE_ATTR"in e?T(A(Ge),e.ADD_URI_SAFE_ATTR):Ge,Be="ADD_DATA_URI_TAGS"in e?T(A(We),e.ADD_DATA_URI_TAGS):We,Ae="FORBID_TAGS"in e?T({},e.FORBID_TAGS):{},Se="FORBID_ATTR"in e?T({},e.FORBID_ATTR):{},ze="USE_PROFILES"in e&&e.USE_PROFILES,Ee=!1!==e.ALLOW_ARIA_ATTR,ke=!1!==e.ALLOW_DATA_ATTR,je=e.ALLOW_UNKNOWN_PROTOCOLS||!1,De=e.SAFE_FOR_TEMPLATES||!1,Ne=e.WHOLE_DOCUMENT||!1,Le=e.RETURN_DOM||!1,Me=e.RETURN_DOM_FRAGMENT||!1,Ce=!1!==e.RETURN_DOM_IMPORT,Ie=e.RETURN_TRUSTED_TYPE||!1,Re=e.FORCE_BODY||!1,Pe=!1!==e.SANITIZE_DOM,Ue=!1!==e.KEEP_CONTENT,Fe=e.IN_PLACE||!1,be=e.ALLOWED_URI_REGEXP||be,Ke=e.NAMESPACE||Ve,De&&(ke=!1),Me&&(Le=!0),ze&&(we=T({},[].concat(G(R))),xe=[],!0===ze.html&&(T(we,E),T(xe,L)),!0===ze.svg&&(T(we,k),T(xe,M),T(xe,I)),!0===ze.svgFilters&&(T(we,j),T(xe,M),T(xe,I)),!0===ze.mathMl&&(T(we,N),T(xe,C),T(xe,I))),e.ADD_TAGS&&(we===Oe&&(we=A(we)),T(we,e.ADD_TAGS)),e.ADD_ATTR&&(xe===Te&&(xe=A(xe)),T(xe,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&T(qe,e.ADD_URI_SAFE_ATTR),Ue&&(we["#text"]=!0),Ne&&T(we,["html","head","body"]),we.table&&(T(we,["tbody"]),delete Ae.tbody),i&&i(e),Xe=e)},et=T({},["mi","mo","mn","ms","mtext"]),tt=T({},["foreignobject","desc","title","annotation-xml"]),nt=T({},k);T(nt,j),T(nt,D);var rt=T({},N);T(rt,_);var ot=function(e){var t=ne(e);t&&t.tagName||(t={namespaceURI:Ve,tagName:"template"});var n=y(e.tagName),r=y(t.tagName);if(e.namespaceURI===Ye)return t.namespaceURI===Ve?"svg"===n:t.namespaceURI===$e?"svg"===n&&("annotation-xml"===r||et[r]):Boolean(nt[n]);if(e.namespaceURI===$e)return t.namespaceURI===Ve?"math"===n:t.namespaceURI===Ye?"math"===n&&tt[r]:Boolean(rt[n]);if(e.namespaceURI===Ve){if(t.namespaceURI===Ye&&!tt[r])return!1;if(t.namespaceURI===$e&&!et[r])return!1;var o=T({},["title","style","font","a","script"]);return!rt[n]&&(o[n]||!nt[n])}return!1},it=function(e){m(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=ie}catch(t){e.remove()}}},at=function(e,t){try{m(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){m(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!xe[e])if(Le||Me)try{it(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},ct=function(e){var t=void 0,n=void 0;if(Re)e="<remove></remove>"+e;else{var r=g(e,/^[\r\n\t ]+/);n=r&&r[0]}var i=oe?oe.createHTML(e):e;if(Ke===Ve)try{t=(new J).parseFromString(i,"text/html")}catch(e){}if(!t||!t.documentElement){t=ce.createDocument(Ke,"template",null);try{t.documentElement.innerHTML=Je?"":i}catch(e){}}var a=t.body||t.documentElement;return e&&n&&a.insertBefore(o.createTextNode(n),a.childNodes[0]||null),Ne?t.documentElement:a},lt=function(e){return le.call(e.ownerDocument||e,e,s.SHOW_ELEMENT|s.SHOW_COMMENT|s.SHOW_TEXT,null,!1)},ut=function(e){return!(e instanceof V||e instanceof K||"string"==typeof e.nodeName&&"string"==typeof e.textContent&&"function"==typeof e.removeChild&&e.attributes instanceof x&&"function"==typeof e.removeAttribute&&"function"==typeof e.setAttribute&&"string"==typeof e.namespaceURI&&"function"==typeof e.insertBefore)},st=function(e){return"object"===(void 0===l?"undefined":q(l))?e instanceof l:e&&"object"===(void 0===e?"undefined":q(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},ft=function(e,t,r){pe[e]&&p(pe[e],(function(e){e.call(n,t,r,Xe)}))},pt=function(e){var t=void 0;if(ft("beforeSanitizeElements",e,null),ut(e))return it(e),!0;if(g(e.nodeName,/[\u0080-\uFFFF]/))return it(e),!0;var r=y(e.nodeName);if(ft("uponSanitizeElement",e,{tagName:r,allowedTags:we}),!st(e.firstElementChild)&&(!st(e.content)||!st(e.content.firstElementChild))&&w(/<[/\w]/g,e.innerHTML)&&w(/<[/\w]/g,e.textContent))return it(e),!0;if(!we[r]||Ae[r]){if(Ue&&!He[r]){var o=ne(e)||e.parentNode,i=te(e)||e.childNodes;if(i&&o)for(var a=i.length-1;a>=0;--a)o.insertBefore(Q(i[a],!0),ee(e))}return it(e),!0}return e instanceof u&&!ot(e)?(it(e),!0):"noscript"!==r&&"noembed"!==r||!w(/<\/no(script|embed)/i,e.innerHTML)?(De&&3===e.nodeType&&(t=e.textContent,t=h(t,de," "),t=h(t,me," "),e.textContent!==t&&(m(n.removed,{element:e.cloneNode()}),e.textContent=t)),ft("afterSanitizeElements",e,null),!1):(it(e),!0)},dt=function(e,t,n){if(Pe&&("id"===t||"name"===t)&&(n in o||n in Ze))return!1;if(ke&&w(ye,t));else if(Ee&&w(ge,t));else{if(!xe[t]||Se[t])return!1;if(qe[t]);else if(w(be,h(n,ve,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==v(n,"data:")||!Be[e])if(je&&!w(he,h(n,ve,"")));else if(n)return!1}return!0},mt=function(e){var t=void 0,r=void 0,o=void 0,i=void 0;ft("beforeSanitizeAttributes",e,null);var a=e.attributes;if(a){var c={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:xe};for(i=a.length;i--;){var l=t=a[i],u=l.name,s=l.namespaceURI;if(r=b(t.value),o=y(u),c.attrName=o,c.attrValue=r,c.keepAttr=!0,c.forceKeepAttr=void 0,ft("uponSanitizeAttribute",e,c),r=c.attrValue,!c.forceKeepAttr&&(at(u,e),c.keepAttr))if(w(/\/>/i,r))at(u,e);else{De&&(r=h(r,de," "),r=h(r,me," "));var f=e.nodeName.toLowerCase();if(dt(f,o,r))try{s?e.setAttributeNS(s,u,r):e.setAttribute(u,r),d(n.removed)}catch(e){}}}ft("afterSanitizeAttributes",e,null)}},yt=function e(t){var n=void 0,r=lt(t);for(ft("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)ft("uponSanitizeShadowNode",n,null),pt(n)||(n.content instanceof a&&e(n.content),mt(n));ft("afterSanitizeShadowDOM",t,null)};return n.sanitize=function(e,o){var i=void 0,c=void 0,u=void 0,s=void 0,f=void 0;if((Je=!e)&&(e="\x3c!--\x3e"),"string"!=typeof e&&!st(e)){if("function"!=typeof e.toString)throw O("toString is not a function");if("string"!=typeof(e=e.toString()))throw O("dirty is not a string, aborting")}if(!n.isSupported){if("object"===q(t.toStaticHTML)||"function"==typeof t.toStaticHTML){if("string"==typeof e)return t.toStaticHTML(e);if(st(e))return t.toStaticHTML(e.outerHTML)}return e}if(_e||Qe(o),n.removed=[],"string"==typeof e&&(Fe=!1),Fe);else if(e instanceof l)1===(c=(i=ct("\x3c!----\x3e")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===c.nodeName||"HTML"===c.nodeName?i=c:i.appendChild(c);else{if(!Le&&!De&&!Ne&&-1===e.indexOf("<"))return oe&&Ie?oe.createHTML(e):e;if(!(i=ct(e)))return Le?null:ie}i&&Re&&it(i.firstChild);for(var p=lt(Fe?e:i);u=p.nextNode();)3===u.nodeType&&u===s||pt(u)||(u.content instanceof a&&yt(u.content),mt(u),s=u);if(s=null,Fe)return e;if(Le){if(Me)for(f=ue.call(i.ownerDocument);i.firstChild;)f.appendChild(i.firstChild);else f=i;return Ce&&(f=se.call(r,f,!0)),f}var d=Ne?i.outerHTML:i.innerHTML;return De&&(d=h(d,de," "),d=h(d,me," ")),oe&&Ie?oe.createHTML(d):d},n.setConfig=function(e){Qe(e),_e=!0},n.clearConfig=function(){Xe=null,_e=!1},n.isValidAttribute=function(e,t,n){Xe||Qe({});var r=y(e),o=y(t);return dt(r,o,n)},n.addHook=function(e,t){"function"==typeof t&&(pe[e]=pe[e]||[],m(pe[e],t))},n.removeHook=function(e){pe[e]&&d(pe[e])},n.removeHooks=function(e){pe[e]&&(pe[e]=[])},n.removeAllHooks=function(){pe={}},n}()}()},6808:(e,t,n)=>{var r,o,i;void 0===(o="function"==typeof(r=i=function(){function e(){for(var e=0,t={};e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}function t(e){return e.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function n(r){function o(){}function i(t,n,i){if("undefined"!=typeof document){"number"==typeof(i=e({path:"/"},o.defaults,i)).expires&&(i.expires=new Date(1*new Date+864e5*i.expires)),i.expires=i.expires?i.expires.toUTCString():"";try{var a=JSON.stringify(n);/^[\{\[]/.test(a)&&(n=a)}catch(e){}n=r.write?r.write(n,t):encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var c="";for(var l in i)i[l]&&(c+="; "+l,!0!==i[l]&&(c+="="+i[l].split(";")[0]));return document.cookie=t+"="+n+c}}function a(e,n){if("undefined"!=typeof document){for(var o={},i=document.cookie?document.cookie.split("; "):[],a=0;a<i.length;a++){var c=i[a].split("="),l=c.slice(1).join("=");n||'"'!==l.charAt(0)||(l=l.slice(1,-1));try{var u=t(c[0]);if(l=(r.read||r)(l,u)||t(l),n)try{l=JSON.parse(l)}catch(e){}if(o[u]=l,e===u)break}catch(e){}}return e?o[e]:o}}return o.set=i,o.get=function(e){return a(e,!1)},o.getJSON=function(e){return a(e,!0)},o.remove=function(t,n){i(t,"",e(n,{expires:-1}))},o.defaults={},o.withConverter=n,o}((function(){}))})?r.call(t,n,t,e):r)||(e.exports=o),e.exports=i()},3096:(e,t,n)=>{var r="Expected a function",o=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,c=/^0o[0-7]+$/i,l=parseInt,u="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,s="object"==typeof self&&self&&self.Object===Object&&self,f=u||s||Function("return this")(),p=Object.prototype.toString,d=Math.max,m=Math.min,y=function(){return f.Date.now()};function g(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function h(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==p.call(e)}(e))return NaN;if(g(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=g(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(o,"");var n=a.test(e);return n||c.test(e)?l(e.slice(2),n?2:8):i.test(e)?NaN:+e}e.exports=function(e,t,n){var o=!0,i=!0;if("function"!=typeof e)throw new TypeError(r);return g(n)&&(o="leading"in n?!!n.leading:o,i="trailing"in n?!!n.trailing:i),function(e,t,n){var o,i,a,c,l,u,s=0,f=!1,p=!1,v=!0;if("function"!=typeof e)throw new TypeError(r);function b(t){var n=o,r=i;return o=i=void 0,s=t,c=e.apply(r,n)}function w(e){return s=e,l=setTimeout(x,t),f?b(e):c}function O(e){var n=e-u;return void 0===u||n>=t||n<0||p&&e-s>=a}function x(){var e=y();if(O(e))return T(e);l=setTimeout(x,function(e){var n=t-(e-u);return p?m(n,a-(e-s)):n}(e))}function T(e){return l=void 0,v&&o?b(e):(o=i=void 0,c)}function A(){var e=y(),n=O(e);if(o=arguments,i=this,u=e,n){if(void 0===l)return w(u);if(p)return l=setTimeout(x,t),b(u)}return void 0===l&&(l=setTimeout(x,t)),c}return t=h(t)||0,g(n)&&(f=!!n.leading,a=(p="maxWait"in n)?d(h(n.maxWait)||0,t):a,v="trailing"in n?!!n.trailing:v),A.cancel=function(){void 0!==l&&clearTimeout(l),s=0,o=u=i=l=void 0},A.flush=function(){return void 0===l?c:T(y())},A}(e,t,{leading:o,maxWait:t,trailing:i})}},2703:(e,t,n)=>{"use strict";var r=n(414);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},5697:(e,t,n)=>{e.exports=n(2703)()},414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},9281:t=>{"use strict";t.exports=e}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e].call(i.exports,i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var o={};return(()=>{"use strict";r.d(o,{default:()=>P});var e=r(6808),t=r.n(e),n=r(3096),i=r.n(n),a=r(9281),c=r.n(a),l=r(7856),u=r.n(l),s=r(5697),f=r.n(s);var p=["name","size","color","additionalCSS"];function d(){return(d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var m=function(e){var t=e.name,n=e.size,r=void 0===n?"0.75rem":n,o=e.color,i=void 0===o?"":o,a=e.additionalCSS,l=void 0===a?"":a,u=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,p);return c().createElement("svg",d({className:"".concat(i," ").concat(l),style:{width:r,height:r}},u),c().createElement("use",{xlinkHref:"#sprite-".concat(t)}))};m.propTypes={name:f().string.isRequired,size:f().string,color:f().string,additionalCSS:f().string};const y=m;function g(){return(g=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=n){var r,o,i=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){c=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(c)throw o}}return i}}(e,t)||O(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function w(e){return function(e){if(Array.isArray(e))return x(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||O(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function O(e,t){if(e){if("string"==typeof e)return x(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?x(e,t):void 0}}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var T="ui-flashes",A={items:[]},S=(b({},"flashes",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:A,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"flash/push":var n=Array.isArray(t.payload)?t.payload:[t.payload];return{items:[].concat(w(e.items),w(n))};default:return e}})),{type:f().oneOf(["error","success","notice","info","alert"]),content:f().string}),E={error:"bg-gui-error",success:"bg-zingy-green",notice:"bg-electric-cyan",info:"bg-electric-cyan",alert:"bg-active-orange"},k={error:"text-white",success:"text-cool-black",notice:"text-cool-black",info:"text-cool-black",alert:"text-white"},j=["success","info","notice"],D=function(e){var t=e.type,n=e.content,r=(0,a.useRef)(null),o=v((0,a.useState)(!1),2),i=o[0],l=o[1],s=v((0,a.useState)(0),2),f=s[0],p=s[1],d=v((0,a.useState)(!1),2),m=d[0],g=d[1];(0,a.useEffect)((function(){return g(!0)}),[]),(0,a.useEffect)((function(){j.includes(t)&&setTimeout((function(){b()}),8e3)}),[i]);var h,b=function(){r.current&&p(r.current.getBoundingClientRect().height),setTimeout((function(){return l(!0)}),0)},w=m&&!i;h=f&&!i?{height:"".concat(f,"px")}:i?{height:0,marginTop:0,zIndex:-1}:{};var O=u().sanitize(n,{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","data-method","rel"]}),x={notice:"icon-gui-ably-badge",success:"icon-gui-tick",error:"icon-gui-warning",alert:"icon-gui-warning"};return c().createElement("div",{className:"ui-flash-message ui-grid-px ".concat(w?"ui-flash-message-enter":""),style:h,ref:r,"data-id":"ui-flash"},c().createElement("div",{className:"".concat(E[t]," p-32 flex align-center rounded shadow-container-subtle")},x[t]&&c().createElement(y,{name:x[t],color:{notice:"text-cool-black",success:"text-cool-black",error:"text-white",alert:"text-white"}[t],size:"1.5rem",additionalCSS:"mr-16 self-baseline"}),c().createElement("p",{className:"ui-flash-text ".concat(k[t]),dangerouslySetInnerHTML:{__html:O}}),c().createElement("button",{type:"button",className:"p-0 ml-auto self-start",onClick:b},c().createElement("svg",{className:"h-24 w-24 transition-colors ui-icon-cool-black"},c().createElement("use",{xlinkHref:"#sprite-close"})))))};D.propTypes=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){b(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},S);var N=function(e){var t=e.flashes,n=(null==t?void 0:t.items)||[];return c().createElement("div",{className:"ui-flash","data-id":T},n.map((function(e){return c().createElement(D,g({key:e.type},e))})))};N.propTypes={flashes:f().shape({items:f().arrayOf(f().shape(S))})};function _(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function R(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}f().arrayOf(f().arrayOf(f().string));var L=function(e){var t=function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:document).querySelector("[data-id=".concat(e,"]"))}(T);t&&(t.style.marginTop=e?"4rem":null)},M=function(e){window.matchMedia("(min-width: 65rem)").matches?e.style.display=null:e.style.display="none"},C=function(e){e.style.maxHeight=0,e.style.overflow="hidden",L(!1)},I=function(e){e.style.maxHeight=null,e.style.overflow=null,L(!0)};const P=function(e){var n=e.bannerContainer,r=e.cookieId,o=e.noticeId,a=e.options;if("undefined"==typeof window)return function(){};if(!n)return console.warn("A Notice component was initited but no notice container was found."),function(){};if(function(e,n){return(t().get(e)||"").includes(n)}(r,o))return function(){};M(n),I(n);var c=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_(Object(n),!0).forEach((function(t){R(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({collapse:!0},a).collapse?function(e){window.scrollY>5&&C(e);var t=i()((function(){window.scrollY>5?C(e):e.style.overflow&&I(e)}),100);return document.addEventListener("scroll",t),function(){return document.removeEventListener("scroll",t)}}(n):function(){},l=function(e,n,r,o){var i=e.querySelector("button");if(!i)return function(){};var a=function(){n&&r&&function(e,n){var r=t().get(e)||"";t().set(e,"".concat(r.replace("".concat(n,","),"")+n,","),{expires:90})}(n,r),C(e),o()};return i.addEventListener("click",a),function(){return document.removeEventListener("click",a)}}(n,r,o,c),u=function(e){var t=i()((function(){M(e)}),100);return window.addEventListener("resize",t),function(){return window.removeEventListener("resize",t)}}(n);return function(){[l,c,u].forEach((function(e){return e()}))}}})(),o.default})()}));
@@ -0,0 +1,16 @@
1
+ <%# Note the style attribute is used for entry animation %>
2
+ <%= tag.div class: "ui-announcement #{bg_color} #{text_color}", data: { id: "ui-notice" }, style: "max-height: 0; overflow: hidden" do %>
3
+ <div class="ui-grid-px py-16 max-w-screen-xl mx-auto flex items-start">
4
+ <%= content_wrapper class: "font-light w-full pr-8 text-p3 self-center" do %>
5
+ <strong class="font-medium whitespace-nowrap pr-4"><%= @contents[:title] %></strong>
6
+ <span class="pr-4"><%= @contents[:body_text] %></span>
7
+ <span class="underline cursor-pointer whitespace-nowrap"><%= @contents[:button_label] %></span>
8
+ <% end %>
9
+
10
+ <% if close_btn? %>
11
+ <%= button_tag type: 'button', class: 'h-20 w-20 mt-4 ml-auto border-none bg-none self-baseline' do %>
12
+ <%= render(AblyUi::Core::Icon.new(name: "icon-gui-close", size: "1.25rem", color: "text-white")) %>
13
+ <% end %>
14
+ <% end %>
15
+ </div>
16
+ <% end %>
@@ -0,0 +1,29 @@
1
+ module AblyUi
2
+ module Core
3
+ class Notice < ViewComponent::Base
4
+ def initialize(contents)
5
+ @contents = contents
6
+ end
7
+
8
+ def close_btn?
9
+ @contents[:close_btn]
10
+ end
11
+
12
+ def bg_color
13
+ @contents[:bg_color] || 'bg-gradient-active-orange'
14
+ end
15
+
16
+ def text_color
17
+ @contents[:text_color] || 'text-white'
18
+ end
19
+
20
+ def content_wrapper(*args, &block)
21
+ if @contents[:button_link].present?
22
+ link_to(@contents[:button_link], *args, &block)
23
+ else
24
+ tag.div(*args, &block)
25
+ end
26
+ end
27
+ end
28
+ end
29
+ end
@@ -0,0 +1 @@
1
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define([,],e):"object"==typeof exports?exports.AblyUi=e(require("react"),require("react-dom")):(t.AblyUi=t.AblyUi||{},t.AblyUi.Core=e(t[void 0],t[void 0]))}(this,(function(t,e){return(()=>{var r={757:(t,e,r)=>{t.exports=r(666)},666:t=>{var e=function(t){"use strict";var e,r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof v?e:v,i=Object.create(o.prototype),a=new L(n||[]);return i._invoke=function(t,e,r){var n=l;return function(o,i){if(n===h)throw new Error("Generator is already running");if(n===y){if("throw"===o)throw i;return k()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=P(a,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===l)throw n=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=h;var u=s(t,e,r);if("normal"===u.type){if(n=r.done?y:p,u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n=y,r.method="throw",r.arg=u.arg)}}}(t,r,a),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var l="suspendedStart",p="suspendedYield",h="executing",y="completed",d={};function v(){}function b(){}function g(){}var w={};w[i]=function(){return this};var m=Object.getPrototypeOf,O=m&&m(m(N([])));O&&O!==r&&n.call(O,i)&&(w=O);var x=g.prototype=v.prototype=Object.create(w);function j(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(o,i,a,c){var u=s(t[o],t,i);if("throw"!==u.type){var f=u.arg,l=f.value;return l&&"object"==typeof l&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(l).then((function(t){f.value=t,a(f)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var o;this._invoke=function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}}function P(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,P(t,r),"throw"===r.method))return d;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var o=s(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,d;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,d):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function N(t){if(t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}return{next:k}}function k(){return{value:e,done:!0}}return b.prototype=x.constructor=g,g.constructor=b,b.displayName=u(g,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,u(t,c,"GeneratorFunction")),t.prototype=Object.create(x),t},t.awrap=function(t){return{__await:t}},j(E.prototype),E.prototype[a]=function(){return this},t.AsyncIterator=E,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new E(f(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},j(x),u(x,c,"Generator"),x[i]=function(){return this},x.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=N,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(A),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return c.type="throw",c.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),f=n.call(a,"finallyLoc");if(u&&f){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!f)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),A(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:N(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),d}},t}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}},281:e=>{"use strict";e.exports=t},645:t=>{"use strict";t.exports=e}},n={};function o(t){var e=n[t];if(void 0!==e)return e.exports;var i=n[t]={exports:{}};return r[t](i,i.exports,o),i.exports}o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var r in e)o.o(e,r)&&!o.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};return(()=>{"use strict";o.r(i),o.d(i,{attachStoreToWindow:()=>y,connectState:()=>v,createRemoteDataStore:()=>b,fetchBlogPosts:()=>P,fetchSessionData:()=>D,getRemoteDataStore:()=>d,loadSprites:()=>c,queryId:()=>C,queryIdAll:()=>q,reactRenderer:()=>a,reducerBlogPosts:()=>A,reducerSessionData:()=>T,selectRecentBlogPosts:()=>L,selectSessionData:()=>U}),Array.prototype.flat||Object.defineProperty(Array.prototype,"flat",{configurable:!0,value:function t(){var e=isNaN(arguments[0])?1:Number(arguments[0]);return e?Array.prototype.reduce.call(this,(function(r,n){return Array.isArray(n)?r.push.apply(r,t.call(n,e-1)):r.push(n),r}),[]):Array.prototype.slice.call(this)},writable:!0}),Array.prototype.flatMap||Object.defineProperty(Array.prototype,"flatMap",{configurable:!0,value:function(t){return Array.prototype.map.apply(this,arguments).flat()},writable:!0});var t=o(281),e=o.n(t),r=o(645),n=o.n(r);function a(t){var r=document.querySelectorAll("[data-react]");Array.from(r).forEach((function(r){var o=r.getAttribute("data-react"),i=t[o];if(i){var a=r.getAttribute("data-react-props"),c=a&&JSON.parse(a||{});n().render(e().createElement(i,c),r),r.removeAttribute("data-react"),r.removeAttribute("data-react-props")}}))}const c=function(t){fetch(t).then((function(t){return t.text()})).then((function(t){var e=document.createElement("div");e.style.display="none",e.innerHTML=t,document.body.appendChild(e)})).catch((function(t){return console.error(t)}))};function u(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var f="function"==typeof Symbol&&Symbol.observable||"@@observable",s=function(){return Math.random().toString(36).substring(7).split("").join(".")},l={INIT:"@@redux/INIT"+s(),REPLACE:"@@redux/REPLACE"+s(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+s()}};function p(t){if("object"!=typeof t||null===t)return!1;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function h(t,e,r){var n;if("function"==typeof e&&"function"==typeof r||"function"==typeof r&&"function"==typeof arguments[3])throw new Error(u(0));if("function"==typeof e&&void 0===r&&(r=e,e=void 0),void 0!==r){if("function"!=typeof r)throw new Error(u(1));return r(h)(t,e)}if("function"!=typeof t)throw new Error(u(2));var o=t,i=e,a=[],c=a,s=!1;function y(){c===a&&(c=a.slice())}function d(){if(s)throw new Error(u(3));return i}function v(t){if("function"!=typeof t)throw new Error(u(4));if(s)throw new Error(u(5));var e=!0;return y(),c.push(t),function(){if(e){if(s)throw new Error(u(6));e=!1,y();var r=c.indexOf(t);c.splice(r,1),a=null}}}function b(t){if(!p(t))throw new Error(u(7));if(void 0===t.type)throw new Error(u(8));if(s)throw new Error(u(9));try{s=!0,i=o(i,t)}finally{s=!1}for(var e=a=c,r=0;r<e.length;r++)(0,e[r])();return t}function g(t){if("function"!=typeof t)throw new Error(u(10));o=t,b({type:l.REPLACE})}function w(){var t,e=v;return(t={subscribe:function(t){if("object"!=typeof t||null===t)throw new Error(u(11));function r(){t.next&&t.next(d())}return r(),{unsubscribe:e(r)}}})[f]=function(){return this},t}return b({type:l.INIT}),(n={dispatch:b,subscribe:v,getState:d,replaceReducer:g})[f]=w,n}var y=function(t){window.AblyUi=window.AblyUi||{},window.AblyUi.RemoteDataStore=t},d=function(){if(!window.AblyUi.RemoteDataStore)throw new Error("Remote store was called before one was created");return window.AblyUi.RemoteDataStore},v=function(t,e){var r=d(),n=t(r);r.subscribe((function(){var o=t(r);o!==n&&(n=o,e(o))}))},b=function(t){return h(function(t){for(var e=Object.keys(t),r={},n=0;n<e.length;n++){var o=e[n];"function"==typeof t[o]&&(r[o]=t[o])}var i,a=Object.keys(r);try{!function(t){Object.keys(t).forEach((function(e){var r=t[e];if(void 0===r(void 0,{type:l.INIT}))throw new Error(u(12));if(void 0===r(void 0,{type:l.PROBE_UNKNOWN_ACTION()}))throw new Error(u(13))}))}(r)}catch(t){i=t}return function(t,e){if(void 0===t&&(t={}),i)throw i;for(var n=!1,o={},c=0;c<a.length;c++){var f=a[c],s=r[f],l=t[f],p=s(l,e);if(void 0===p)throw e&&e.type,new Error(u(14));o[f]=p,n=n||p!==l}return(n=n||a.length!==Object.keys(t).length)?o:t}}(t))},g=o(757),w=o.n(g),m=function(t){return t&&t.includes("application/json")};function O(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function x(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?O(Object(r),!0).forEach((function(e){j(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):O(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function j(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function E(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}var P=function(){var t,e=(t=w().mark((function t(e,r){var n,o;return w().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,r){t.next=4;break}return console.warn('Skipping fetching blog posts, invalid blogUrl: "'.concat(r,'"')),t.abrupt("return");case 4:return t.next=6,fetch(r);case 6:if(n=t.sent,!m(n.headers.get("content-type"))){t.next=14;break}return t.next=10,n.json();case 10:o=t.sent,e.dispatch({type:"blog/loaded",payload:o}),t.next=15;break;case 14:throw new Error("Blog posts url is not serving json");case 15:t.next=20;break;case 17:t.prev=17,t.t0=t.catch(0),console.warn("Could not fetch blog posts due to error:",t.t0);case 20:case"end":return t.stop()}}),t,null,[[0,17]])})),function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){E(i,n,o,a,c,"next",t)}function c(t){E(i,n,o,a,c,"throw",t)}a(void 0)}))});return function(t,r){return e.apply(this,arguments)}}(),S={recent:null},A=j({},"blogPosts",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:S,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"blog/loaded":return x(x({},t),{},{recent:e.payload});default:return t}})),L=function(t){var e;return null===(e=t.getState().blogPosts)||void 0===e?void 0:e.recent};function N(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function k(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?N(Object(r),!0).forEach((function(e){_(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):N(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function _(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function R(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}var D=function(){var t,e=(t=w().mark((function t(e,r){var n,o,i;return w().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.dispatch({type:"session/loaded",payload:t})},t.prev=1,r){t.next=6;break}return console.warn('Skipping fetching session, invalid sessionUrl: "'.concat(r,'"')),n(),t.abrupt("return");case 6:return t.next=8,fetch(r,{cache:"no-cache"});case 8:if(o=t.sent,m(o.headers.get("content-type"))){t.next=12;break}throw new Error("Session endpoint is not serving json");case 12:return t.next=14,o.json();case 14:"not-found"===(i=t.sent).error?n():n(i),t.next=22;break;case 18:t.prev=18,t.t0=t.catch(1),n(),console.warn("Could not fetch session data due to error:",t.t0);case 22:case"end":return t.stop()}}),t,null,[[1,18]])})),function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){R(i,n,o,a,c,"next",t)}function c(t){R(i,n,o,a,c,"throw",t)}a(void 0)}))});return function(t,r){return e.apply(this,arguments)}}(),I={data:null},T=_({},"session",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:I,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"session/loaded":return k(k({},t),{},{data:e.payload});default:return t}})),U=function(t){var e;return null===(e=t.getState().session)||void 0===e?void 0:e.data},C=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return e.querySelector("[data-id=".concat(t,"]"))},q=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return e.querySelectorAll("[data-id=".concat(t,"]"))}})(),i})()}));
@@ -0,0 +1,31 @@
1
+ @layer components {
2
+ .ui-showcase-overflow-container {
3
+ -ms-overflow-style: none; /* Internet Explorer 10+ */
4
+ scrollbar-width: none; /* Firefox */
5
+
6
+ @apply overflow-x-auto;
7
+ }
8
+
9
+ .ui-showcase-overflow-container::-webkit-scrollbar {
10
+ @apply hidden; /* Safari and Chrome */
11
+ }
12
+
13
+ .ui-showcase-logo-wrapper {
14
+ @apply flex bg-white;
15
+ }
16
+
17
+ .ui-showcase-logo {
18
+ min-width: var(--ui-showcase-client-logo-min-width);
19
+ @apply w-full py-16 px-12 flex items-center justify-center;
20
+ }
21
+
22
+ .ui-showcase-logo-img {
23
+ max-width: var(--ui-showcase-client-logo-max-width);
24
+ @apply w-full;
25
+ }
26
+
27
+ .ui-showcase-index-bar {
28
+ @apply bg-mid-grey;
29
+ }
30
+ }
31
+
@@ -0,0 +1 @@
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.AblyUi=t():(e.AblyUi=e.AblyUi||{},e.AblyUi.Core=e.AblyUi.Core||{},e.AblyUi.Core.Showcase=t())}(this,(function(){return(()=>{"use strict";var e={d:(t,n)=>{for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},t={};e.d(t,{default:()=>c});var n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return t.querySelector("[data-id=".concat(e,"]"))};function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var o=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=100*t*n;e.style.transform="translateX(".concat(r,"%)")},i=function(e){if("undefined"==typeof window)return!1;var t="".concat(e+64,"px");return!window.matchMedia("(min-width: ".concat(t,")")).matches};const c=function(e,t){var c=e||n("showcase"),u=Array.from(function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:document).querySelectorAll("[data-id=".concat(e,"]"))}("showcase-control",c)),a=u.map((function(e){return e.querySelector("img")})),l=n("showcase-controls",c),f=n("showcase-index-bar",c),s=n("showcase-slides",c),d=s.children.length,m=("--ui-showcase-client-logo-min-width",window.getComputedStyle(document.documentElement).getPropertyValue("--ui-showcase-client-logo-min-width")),v=parseFloat(m)*parseFloat(getComputedStyle(document.documentElement).fontSize)*d;[".ui-showcase-logo-wrapper",".ui-showcase-index-bar"].forEach((function(e){var t=c.querySelector(e),n="".concat(v,"px");t.style.minWidth=n}));var p,h,y,w=0,b=!1,g=function(e){o(s,e,-1),o(f,e,1),function(e,t){var n=["filter-grayscale","filter-none"],o=[].concat(n).reverse();e.forEach((function(e,i){var c,u;(c=e.classList).replace.apply(c,function(e){if(Array.isArray(e))return r(e)}(u=i===t?n:o)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(u)||function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}(u)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}))}(a,e),i(v)&&function(e,t){var n=e.parentNode,r=e.children,o=n.clientWidth/2,i=r.length,c=Array.from(r).map((function(e){return e.clientWidth})).reduce((function(e,t){return e+t}))/i,u=t*c-((t&&i-t-1?o-c/2:0)>>0);n.scrollTo({left:u,behavior:"smooth"})}(l,e)},A=function e(){return p=setTimeout((function(){b||i(v)||(w=(w+1)%u.length,g(w),e())}),5e3)},E=function(){var e=function(){b=!0,clearTimeout(p)};return c.addEventListener("mouseover",e),function(){return c.removeEventListener("mouseover",e)}},S=function(){var e=function(){b=!1,A()};return c.addEventListener("mouseleave",e),function(){return c.removeEventListener("mouseleave",e)}},L=function(){var e=function(){clearTimeout(p),A()};return document.addEventListener("resize",e),function(){return document.removeEventListener("resize",e)}},j=(h=u.map((function(e,t){var n=function(e){return function(){g(w=e)}}(t);return e.addEventListener("click",n),n})),function(){h.forEach((function(e,t){return u[t].removeEventListener("click",e)}))}),x=(y=function(e){return e.preventDefault()},l.parentNode.addEventListener("wheel",y),function(){return l.parentNode.removeEventListener("wheel",y)}),U=function(){if(t){A(),c.setAttribute("aria-live","polite");var e=[E(),S(),L()];return function(){return e.forEach((function(e){return e()}))}}return function(){}}();return function(){g(0),clearTimeout(p),j(),U(),x()}};return t.default})()}));