diff --git a/README.md b/README.md index b3c9e0b..69a35ea 100644 --- a/README.md +++ b/README.md @@ -447,13 +447,26 @@ Builds the template and runs the SDK viewer in your web browser. If `dir_name` i While it’s running it watches the template directory for changes: * if you edit any static template files (`index.html`, `template.yml`, `data/*`, `static/*`) the SDK will refresh the page in the browser; -* if you edit a file that is the source for a [build rule](#build-configuration), the SDK will run that build rule and then refresh the page. +* if you edit a file that is the source for a [build rule](#build-configuration), the SDK will run that build rule and then refresh the page; +* when the page has been refreshed, your previously applied settings in the same tab will be automatically restored (see below for more details). Options: * `--open` or `-o` Try to open the SDK in your web browser once the server is running. At present this only works on macOS. * `--port` Specify a particular port; defaults to [1685](https://en.wikipedia.org/wiki/Johann_Sebastian_Bach) * `--no-build` Skip the build process +### Settings restore and reset + +Your previously applied settings in your SDK browser tab will be automatically restored by the SDK on each page refresh (from version `5.0.0`). + +Template settings when using the SDK are therefore: + +- stored locally in your browser's session storage per window +- are restored on page load before the template `draw` call +- do not include restore of template state other than settings + +You can click the "Reset" button on the top right hand side of the SDK interface to refresh the tab and start from template default settings, or alternatively you can close and open a new SDK browser tab. + ### Publish a template ```sh flourish publish [dir_name] diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index f8c248b..eadbebe 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,3 +1,7 @@ +# 5.0.0 +* Add automatic SDK local settings restore on template reload +* Upgrade node-fetch dependency to avoid annoying deprecation warning. #91 + # 4.2.1 * Fix bug with OR conditions for imported module settings diff --git a/common/embed/credit.d.ts b/common/embed/credit.d.ts new file mode 100644 index 0000000..ce3206d --- /dev/null +++ b/common/embed/credit.d.ts @@ -0,0 +1,5 @@ +export function createFlourishCredit(credit_url: any, query_string: any, public_url: any, credit_text: any): any; +export function getLocalizedCreditTextAndUrl(lang: any, credit_key: any): { + credit_text: any; + credit_url: any; +}; diff --git a/common/embed/credit.js b/common/embed/credit.js new file mode 100644 index 0000000..dcbf596 --- /dev/null +++ b/common/embed/credit.js @@ -0,0 +1,47 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getLocalizedCreditTextAndUrl = exports.createFlourishCredit = void 0; +const localizations_1 = __importDefault(require("./localizations")); +function createFlourishCredit(credit_url, query_string, public_url, credit_text) { + credit_url = credit_url || "https://flourish.studio", + query_string = query_string || "?utm_source=api&utm_campaign=" + window.location.href, + public_url = public_url || "https://public.flourish.studio/", + credit_text = credit_text || "A Flourish data visualization"; + var credit = document.createElement("div"); + credit.setAttribute("class", "flourish-credit"); + credit.setAttribute("style", "width:100%!important;margin:0 0 4px!important;text-align:right!important;font-family:Helvetica,sans-serif!important;color:#888!important;font-size:11px!important;font-weight:bold!important;font-style:normal!important;-webkit-font-smoothing:antialiased!important;box-shadow:none!important;"); + var a = document.createElement("a"); + a.setAttribute("href", credit_url + query_string); + a.setAttribute("target", "_top"); + a.setAttribute("style", "display:inline-block!important;text-decoration:none!important;font:inherit!important;color:inherit!important;border:none!important;margin:0 5px!important;box-shadow:none!important;"); + credit.appendChild(a); + var img = document.createElement("img"); + img.setAttribute("alt", "Flourish logo"); + img.setAttribute("src", public_url + "resources/bosh.svg"); + img.setAttribute("style", "font:inherit!important;width:auto!important;height:12px!important;border:none!important;margin:0 2px 0!important;vertical-align:middle!important;display:inline-block!important;box-shadow:none!important;"); + a.appendChild(img); + var span = document.createElement("span"); + span.setAttribute("style", "font:inherit!important;color:#888!important;vertical-align:middle!important;display:inline-block!important;box-shadow:none!important;"); + span.appendChild(document.createTextNode(credit_text)); + a.appendChild(span); + return credit; +} +exports.createFlourishCredit = createFlourishCredit; +function getLocalizedCreditTextAndUrl(lang, credit_key) { + var credit_text, credit_url; + lang = lang || "en", credit_key = credit_key || ""; + credit_text = localizations_1.default[lang].credits[credit_key] || localizations_1.default.en.credits[credit_key] || localizations_1.default.en.credits.default; + if (typeof credit_text == "object") { + if (credit_text.url) + credit_url = credit_text.url; + credit_text = credit_text.text; + } + return { + credit_text: credit_text, + credit_url: credit_url + }; +} +exports.getLocalizedCreditTextAndUrl = getLocalizedCreditTextAndUrl; diff --git a/common/embed/customer_analytics.d.ts b/common/embed/customer_analytics.d.ts new file mode 100644 index 0000000..f6e162d --- /dev/null +++ b/common/embed/customer_analytics.d.ts @@ -0,0 +1,5 @@ +export function sendCustomerAnalyticsMessage(message: any): void; +export function addAnalyticsListener(callback: any): void; +export function removeAnalyticsListener(callback: any): void; +export function dispatchAnalyticsEvent(message: any): void; +export function initCustomerAnalytics(): void; diff --git a/common/embed/customer_analytics.js b/common/embed/customer_analytics.js new file mode 100644 index 0000000..e75ed0b --- /dev/null +++ b/common/embed/customer_analytics.js @@ -0,0 +1,114 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.initCustomerAnalytics = exports.dispatchAnalyticsEvent = exports.removeAnalyticsListener = exports.addAnalyticsListener = exports.sendCustomerAnalyticsMessage = void 0; +// Embedded code - must work in IE +var enabled = false; +function getLocationData() { + var data = {}; + if (window._Flourish_template_id) { + data.template_id = window._Flourish_template_id; + } + if (window.Flourish && window.Flourish.app && window.Flourish.app.loaded_template_id) { + data.template_id = window.Flourish.app.loaded_template_id; + } + if (window._Flourish_visualisation_id) { + data.visualisation_id = window._Flourish_visualisation_id; + } + if (window.Flourish && window.Flourish.app && window.Flourish.app.loaded_visualisation) { + data.visualisation_id = window.Flourish.app.loaded_visualisation.id; + } + if (window.Flourish && window.Flourish.app && window.Flourish.app.story) { + data.story_id = window.Flourish.app.story.id; + data.slide_count = window.Flourish.app.story.slides.length; + } + if (window.Flourish && window.Flourish.app && window.Flourish.app.current_slide) { + // One indexed + data.slide_index = window.Flourish.app.current_slide.index + 1; + } + return data; +} +function sendCustomerAnalyticsMessage(message) { + if (!enabled) + return; + if (window.top === window.self) + return; + var embedded_window = window; + if (embedded_window.location.pathname === "srcdoc") + embedded_window = embedded_window.parent; + var location_data = getLocationData(); + var message_with_metadata = { + sender: "Flourish", + method: "customerAnalytics" + }; + for (var key in location_data) { + if (location_data.hasOwnProperty(key)) { + message_with_metadata[key] = location_data[key]; + } + } + for (var key in message) { + if (message.hasOwnProperty(key)) { + message_with_metadata[key] = message[key]; + } + } + embedded_window.parent.postMessage(JSON.stringify(message_with_metadata), "*"); +} +exports.sendCustomerAnalyticsMessage = sendCustomerAnalyticsMessage; +function addAnalyticsListener(callback) { + if (typeof callback !== "function") { + throw new Error("Analytics callback is not a function"); + } + window.Flourish._analytics_listeners.push(callback); +} +exports.addAnalyticsListener = addAnalyticsListener; +function removeAnalyticsListener(callback) { + if (typeof callback !== "function") { + throw new Error("Analytics callback is not a function"); + } + window.Flourish._analytics_listeners = window.Flourish._analytics_listeners.filter(function (listener) { + return callback !== listener; + }); +} +exports.removeAnalyticsListener = removeAnalyticsListener; +function dispatchAnalyticsEvent(message) { + // If the window.Flourish object hasn't been created by the customer, they + // can't be listening for analytics events + if (!window.Flourish) + return; + window.Flourish._analytics_listeners.forEach(function (listener) { + listener(message); + }); +} +exports.dispatchAnalyticsEvent = dispatchAnalyticsEvent; +function initCustomerAnalytics() { + enabled = true; + var events = [ + { + event_name: "click", + action_name: "click", + use_capture: true + }, + { + event_name: "keydown", + action_name: "key_down", + use_capture: true + }, + { + event_name: "mouseenter", + action_name: "mouse_enter", + use_capture: false + }, + { + event_name: "mouseleave", + action_name: "mouse_leave", + use_capture: false + } + ]; + events.forEach(function (event) { + document.body.addEventListener(event.event_name, function () { + sendCustomerAnalyticsMessage({ + action: event.action_name + }); + }, event.use_capture); + }); +} +exports.initCustomerAnalytics = initCustomerAnalytics; diff --git a/common/embed/embedding.d.ts b/common/embed/embedding.d.ts new file mode 100644 index 0000000..e2dbb44 --- /dev/null +++ b/common/embed/embedding.d.ts @@ -0,0 +1,25 @@ +export default initEmbedding; +declare function initEmbedding(): { + createEmbedIframe: typeof createEmbedIframe; + isFixedHeight: typeof isFixedHeight; + getHeightForBreakpoint: typeof getHeightForBreakpoint; + startEventListeners: typeof startEventListeners; + notifyParentWindow: typeof notifyParentWindow; + initScrolly: typeof initScrolly; + createScrolly: typeof createScrolly; + isSafari: typeof isSafari; + initCustomerAnalytics: typeof initCustomerAnalytics; + addAnalyticsListener: typeof addAnalyticsListener; + sendCustomerAnalyticsMessage: typeof sendCustomerAnalyticsMessage; +}; +declare function createEmbedIframe(embed_url: any, container: any, width: any, height: any, play_on_load: any): any; +declare function isFixedHeight(): any; +declare function getHeightForBreakpoint(width: any): 650 | 575 | 400; +declare function startEventListeners(callback: any, allowed_methods: any, embed_domain: any): void; +declare function notifyParentWindow(height: any, opts: any): void; +declare function initScrolly(opts: any): void; +declare function createScrolly(iframe: any, captions: any): void; +declare function isSafari(): boolean; +import { initCustomerAnalytics } from "./customer_analytics"; +import { addAnalyticsListener } from "./customer_analytics"; +import { sendCustomerAnalyticsMessage } from "./customer_analytics"; diff --git a/common/embed/embedding.js b/common/embed/embedding.js new file mode 100644 index 0000000..d70bcff --- /dev/null +++ b/common/embed/embedding.js @@ -0,0 +1,459 @@ +"use strict"; +/* This file is used by the story player, and must be IE-compatible */ +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const customer_analytics_1 = require("./customer_analytics"); +const dompurify_1 = __importDefault(require("dompurify")); +const parse_query_params_1 = __importDefault(require("./parse_query_params")); +var is_fixed_height; +var is_amp; +function isFixedHeight() { + if (is_fixed_height == undefined) { + var params = (0, parse_query_params_1.default)(); + // "referrer" in params implies this is an Embedly embed + // Check whether embedding site is known to support dynamic resizing + if ("referrer" in params) + is_fixed_height = /^https:\/\/medium.com\//.test(params.referrer); + else + is_fixed_height = !("auto" in params); + } + return is_fixed_height; +} +function getHeightForBreakpoint(width) { + var breakpoint_width = width || window.innerWidth; + if (breakpoint_width > 999) + return 650; + if (breakpoint_width > 599) + return 575; + return 400; +} +function initScrolly(opts) { + if (!opts) + return; + if (window.top === window.self) + return; + var embedded_window = window; + if (embedded_window.location.pathname == "srcdoc") + embedded_window = embedded_window.parent; + var message = { + sender: "Flourish", + method: "scrolly", + captions: opts.captions + }; + embedded_window.parent.postMessage(JSON.stringify(message), "*"); +} +function notifyParentWindow(height, opts) { + if (window.top === window.self) + return; + var embedded_window = window; + if (embedded_window.location.pathname == "srcdoc") + embedded_window = embedded_window.parent; + if (is_amp) { + // Message is not stringified for AMP + height = parseInt(height, 10); + embedded_window.parent.postMessage({ + sentinel: "amp", + type: "embed-size", + height: height, + }, "*"); + return; + } + var message = { + sender: "Flourish", + context: "iframe.resize", + method: "resize", + height: height, + src: embedded_window.location.toString(), + }; + if (opts) { + for (var name in opts) + message[name] = opts[name]; + } + embedded_window.parent.postMessage(JSON.stringify(message), "*"); +} +function isSafari() { + // Some example user agents: + // Safari iOS: Mozilla/5.0 (iPhone; CPU iPhone OS 12_1_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0 Mobile/15E148 Safari/604.1 + // Chrome OS X: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36 + // Embedded WkWebview on iOS: Mozilla/5.0 (iPhone; CPU iPhone OS 12_1_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/16D5039a + return (navigator.userAgent.indexOf("Safari") !== -1 || navigator.userAgent.indexOf("iPhone") !== -1) && navigator.userAgent.indexOf("Chrome") == -1; +} +function isString(s) { + return typeof s === "string" || s instanceof String; +} +function isPossibleHeight(n) { + if (typeof n === "number") { + return !isNaN(n) && (n >= 0); + } + else if (isString(n)) { + // First regex checks there is at least one digit in n and rejectsedge cases like "" and "px" that would pass second regex + // Given first regex, second regex makes sure that n is either a pure number or a number with a valid CSS unit + // Units based on https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Values_and_units#lengths plus % + return /\d/.test(n) && /^[0-9]*(\.[0-9]*)?(cm|mm|Q|in|pc|pt|px|em|ex|ch|rem|lh|vw|vh|vmin|vmax|%)?$/i.test(n); + } + return false; +} +function validateWarnMessage(message) { + if (message.method !== "warn") { + console.warn("BUG: validateWarnMessage called for method" + message.method); + return false; + } + if ((message.message != null) && !isString(message.message)) + return false; + if ((message.explanation != null) && !isString(message.explanation)) + return false; + return true; +} +function validateResizeMessage(message) { + if (message.method !== "resize") { + console.warn("BUG: validateResizeMessage called for method" + message.method); + return false; + } + if (!isString(message.src)) + return false; + if (!isString(message.context)) + return false; + if (!isPossibleHeight(message.height)) + return false; + return true; +} +function validateSetSettingMessage(_message) { + throw new Error("Validation for setSetting is not implemented yet; see issue #4328"); +} +function validateScrolly(message) { + if (message.method !== "scrolly") { + console.warn("BUG: validateScrolly called for method" + message.method); + return false; + } + if (!Array.isArray(message.captions)) + return false; + return true; +} +function validateCustomerAnalyticsMessage(message) { + if (message.method !== "customerAnalytics") { + console.warn("BUG: validateCustomerAnalyticsMessage called for method" + message.method); + return false; + } + // We don't consume customer analytics messages; they're just passed + // on, and their structure is up to the customer, so there's no + // point in validating them. + return true; +} +function validateRequestUpload(message) { + if (message.method !== "request-upload") { + console.warn("BUG: validateResizeMessage called for method" + message.method); + return false; + } + // FIXME: when adding validation for setSetting (see above) we should + // also validate that this is a valid setting name of appropriate type + if (!isString(message.name)) + return false; + if (!(message.accept == null || isString(message.accept))) + return false; + return true; +} +function getMessageValidators(methods) { + var available_message_validators = { + "warn": validateWarnMessage, + "resize": validateResizeMessage, + "setSetting": validateSetSettingMessage, + "customerAnalytics": validateCustomerAnalyticsMessage, + "request-upload": validateRequestUpload, + "scrolly": validateScrolly + }; + var validators = {}; + for (var i = 0; i < methods.length; i++) { + var method = methods[i]; + if (available_message_validators[method]) { + validators[method] = available_message_validators[method]; + } + else { + throw new Error("No validator found for method " + method); + } + } + return validators; +} +function startEventListeners(callback, allowed_methods, embed_domain) { + var message_validators = getMessageValidators(allowed_methods); + window.addEventListener("message", function (event) { + var is_accepted_event_origin = (function () { + if (event.origin == document.location.origin) { + return true; + } + // If company has configured a custom origin for downloaded projects, allow it + if (embed_domain) { + const origin = event.origin.toLowerCase(); + embed_domain = embed_domain.toLowerCase(); + // Allow the domain itself… + if (origin.endsWith("//" + embed_domain)) + return true; + // and subdomains + if (origin.endsWith("." + embed_domain)) + return true; + } + if (event.origin.match(/\/\/localhost:\d+$|\/\/(?:public|app)\.flourish.devlocal$|\/\/flourish-api\.com$|\.flourish\.(?:local(:\d+)?|net|rocks|studio)$|\.uri\.sh$|\/\/flourish-user-templates\.com$/)) { + return true; + } + return false; + })(); + // event.source is null when the message is sent by an extension + // https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage#Using_window.postMessage_in_extensions + if (event.source == null) + return; + if (!is_accepted_event_origin) + return; + var message; + try { + message = typeof event.data === "object" ? event.data : JSON.parse(event.data); + } + catch (e) { + console.warn("Unexpected non-JSON message: " + JSON.stringify(event.data)); + return; + } + if (message.sender !== "Flourish") + return; + if (!message.method) { + console.warn("The 'method' property was missing from message", message); + return; + } + if (!Object.prototype.hasOwnProperty.call(message_validators, message.method)) { + console.warn("No validator implemented for message", message); + return; + } + if (!message_validators[message.method](message)) { + console.warn("Validation failed for the message", message); + return; + } + var frames = document.querySelectorAll("iframe"); + for (var i = 0; i < frames.length; i++) { + if (frames[i].contentWindow == event.source || frames[i].contentWindow == event.source.parent) { + callback(message, frames[i]); + return; + } + } + console.warn("could not find frame", message); + }); + if (isSafari()) { + window.addEventListener("resize", onSafariWindowResize); + onSafariWindowResize(); + } +} +function onSafariWindowResize() { + // Ensure all iframes without explicit width attribute are sized to fit their container + var containers = document.querySelectorAll(".flourish-embed"); + for (var i = 0; i < containers.length; i++) { + var container = containers[i]; + if (container.getAttribute("data-width")) + continue; + var iframe = container.querySelector("iframe"); + // When embeds are dynamically loaded, we might have a container without a + // loaded iframe yet + if (!iframe) + continue; + var computed_style = window.getComputedStyle(container); + var width = container.offsetWidth - parseFloat(computed_style.paddingLeft) - parseFloat(computed_style.paddingRight); + iframe.style.width = width + "px"; + } +} +function createScrolly(iframe, captions) { + var parent = iframe.parentNode; + // Fallback to avoid any situation where the scrolly gets initialised twice + if (parent.classList.contains("fl-scrolly-wrapper")) { + console.warn("createScrolly is being called more than once per story. This should not happen."); + return; + } + parent.classList.add("fl-scrolly-wrapper"); + parent.style.position = "relative"; + parent.style.paddingBottom = "1px"; + parent.style.transform = "translate3d(0, 0, 0)"; // Workaround for Safari https://stackoverflow.com/questions/50224855/not-respecting-z-index-on-safari-with-position-sticky + iframe.style.position = "sticky"; + var h = parent.getAttribute("data-height") || null; + if (!h) { // Scrollies require fixed height to work well, so if not height set … + h = "80vh"; // … use a sensible fallback + iframe.style.height = h; // And update the iframe height directly + } + iframe.style.top = "calc(50vh - " + h + "/2)"; + var credit = parent.querySelector(".flourish-credit"); + if (credit) { + credit.style.position = "sticky"; + credit.style.top = "calc(50vh + " + h + "/2)"; + } + captions.forEach(function (d, i) { + var has_content = typeof d == "string" && d.trim() != ""; + var step = document.createElement("div"); + step.setAttribute("data-slide", i); + step.classList.add("fl-scrolly-caption"); + step.style.position = "relative"; + step.style.transform = "translate3d(0,0,0)"; // Workaround for Safari https://stackoverflow.com/questions/50224855/not-respecting-z-index-on-safari-with-position-sticky + step.style.textAlign = "center"; + step.style.maxWidth = "500px"; + step.style.height = "auto"; + step.style.marginTop = "0"; + step.style.marginBottom = has_content ? "100vh" : "50vh"; + step.style.marginLeft = "auto"; + step.style.marginRight = "auto"; + var caption = document.createElement("div"); + caption.innerHTML = dompurify_1.default.sanitize(d); + caption.style.visibility = has_content ? "" : "hidden"; + caption.style.display = "inline-block"; + caption.style.paddingTop = "1.25em"; + caption.style.paddingRight = "1.25em"; + caption.style.paddingBottom = "1.25em"; + caption.style.paddingLeft = "1.25em"; + caption.style.background = "rgba(255,255,255,0.9)"; + caption.style.boxShadow = "0px 0px 10px rgba(0,0,0,0.2)"; + caption.style.borderRadius = "10px"; + caption.style.textAlign = "center"; + caption.style.maxWidth = "100%"; + caption.style.margin = "0 20px"; + caption.style.overflowX = "hidden"; + step.appendChild(caption); + parent.appendChild(step); + }); + initIntersection(parent); +} +function initIntersection(container) { + var t = "0%"; // Trigger when hits viewport; could be set by user in the future + var observer = new IntersectionObserver(function (entries) { + entries.forEach(function (entry) { + if (entry.isIntersecting) { + var iframe = container.querySelector("iframe"); + if (iframe) + iframe.src = iframe.src.replace(/#slide-.*/, "") + "#slide-" + entry.target.getAttribute("data-slide"); + } + }); + }, { rootMargin: "0px 0px -" + t + " 0px" }); + var steps = container.querySelectorAll(".fl-scrolly-caption"); + for (var i = 0; i < steps.length; i++) { + observer.observe(steps[i]); + } + // Set a max width on any images in the captions, to avoid ugly overflowing + // in the rare cases where the + // This won't happen much, but it is possible to paste an image into a + // story caption, so better to handle this nicely since there's no other + // way for the user to set it. + var images = container.querySelectorAll(".fl-scrolly-caption img"); + images.forEach(function (img) { img.style.maxWidth = "100%"; }); +} +function createEmbedIframe(embed_url, container, width, height, play_on_load) { + var iframe = document.createElement("iframe"); + iframe.setAttribute("scrolling", "no"); + iframe.setAttribute("frameborder", "0"); + iframe.setAttribute("title", "Interactive or visual content"); + iframe.setAttribute("sandbox", "allow-same-origin allow-forms allow-scripts allow-downloads allow-popups allow-popups-to-escape-sandbox allow-top-navigation-by-user-activation"); + container.appendChild(iframe); + // If the iframe doesn't have an offset parent, either the element or a parent + // is set to display: none. This can cause problems with visualisation loading, so + // we need to poll for the iframe being displayed before loading the visualisation. + // FIXME: In Chrome, fixed position elements also return null for `offsetParent`. + // The chances of an embed which is both position: fixed and display: none are + // pretty small, so fuhgeddaboudit . If it's an issue in the future, we'll have to + // recurse through the parent elements to make sure the iframe is displaying. + if (iframe.offsetParent || getComputedStyle(iframe).position === "fixed") { + setIframeContent(embed_url, container, iframe, width, height, play_on_load); + } + else { + var poll_item = { + embed_url: embed_url, + container: container, + iframe: iframe, + width: width, + height: height, + play_on_load: play_on_load + }; + // If this is the first embed on the page which is isn't displayed, set up a + // list of hidden iframes to poll + if (!window._flourish_poll_items) { + window._flourish_poll_items = [poll_item]; + } + else { + // Otherwise, add this to the list of iframes which are being polled + window._flourish_poll_items.push(poll_item); + } + if (window._flourish_poll_items.length > 1) { + // If there were already items in the array then we have already started + // polling in a different embed script, so we can return. This iframe will + // have its contents set by the other embed script. + return iframe; + } + // Poll to see whether any of the iframes have started displaying + var interval = setInterval(function () { + window._flourish_poll_items = window._flourish_poll_items.filter(function (item) { + if (!item.iframe.offsetParent) { + // It's still not displaying, so return true to leave it in the array + return true; + } + // It's displaying, so set the content, and return false to remove it from + // the array + setIframeContent(item.embed_url, item.container, item.iframe, item.width, item.height, item.play_on_load); + return false; + }); + if (!window._flourish_poll_items.length) { + // All of the iframes are displaying, so we can stop polling. If another + // embed is added later, a new interval will be created by that embed script. + clearInterval(interval); + } + }, 500); + } + return iframe; +} +function setIframeContent(embed_url, container, iframe, width, height, play_on_load) { + var width_in_px; + if (width && typeof width === "number") { + width_in_px = width; + width = "" + width + "px"; + } + // The regular expression below detects widths that have been explicitly + // expressed in px units. (It turns out CSS is more complicated than you may + // have realised.) + else if (width && width.match(/^[ \t\r\n\f]*([+-]?\d+|\d*\.\d+(?:[eE][+-]?\d+)?)(?:\\?[Pp]|\\0{0,4}[57]0(?:\r\n|[ \t\r\n\f])?)(?:\\?[Xx]|\\0{0,4}[57]8(?:\r\n|[ \t\r\n\f])?)[ \t\r\n\f]*$/)) { + width_in_px = parseFloat(width); + } + if (height && typeof height === "number") + height = "" + height + "px"; + // Odd design decision in Safari means need to set fixed width rather than % + // as will try and size iframe to content otherwise. Must also set scrolling=no + if (width) + iframe.style.width = width; + else if (isSafari()) + iframe.style.width = container.offsetWidth + "px"; + else + iframe.style.width = "100%"; + var fixed_height = !!height; + if (!fixed_height) { + if (embed_url.match(/\?/)) + embed_url += "&auto=1"; + else + embed_url += "?auto=1"; + // For initial height, use our standard breakpoints, based on the explicit + // pixel width if we know it, or the iframe's measured width if not. + height = getHeightForBreakpoint(width_in_px || iframe.offsetWidth) + "px"; + } + if (height) { + if (height.charAt(height.length - 1) === "%") { + height = (parseFloat(height) / 100) * container.parentNode.offsetHeight + "px"; + } + iframe.style.height = height; + } + iframe.setAttribute("src", embed_url + (play_on_load ? "#play-on-load" : "")); + return iframe; +} +function initEmbedding() { + is_amp = window.location.hash == "#amp=1"; + return { + createEmbedIframe: createEmbedIframe, + isFixedHeight: isFixedHeight, + getHeightForBreakpoint: getHeightForBreakpoint, + startEventListeners: startEventListeners, + notifyParentWindow: notifyParentWindow, + initScrolly: initScrolly, + createScrolly: createScrolly, + isSafari: isSafari, + initCustomerAnalytics: customer_analytics_1.initCustomerAnalytics, + addAnalyticsListener: customer_analytics_1.addAnalyticsListener, + sendCustomerAnalyticsMessage: customer_analytics_1.sendCustomerAnalyticsMessage + }; +} +exports.default = initEmbedding; diff --git a/common/embed/localizations.d.ts b/common/embed/localizations.d.ts new file mode 100644 index 0000000..fb3dc23 --- /dev/null +++ b/common/embed/localizations.d.ts @@ -0,0 +1,243 @@ +declare namespace _default { + namespace de { + namespace credits { + const _default: string; + export { _default as default }; + } + } + namespace en { + const credits_1: { + default: { + text: string; + url: string; + }; + annotator: { + text: string; + url: string; + }; + "bar-chart-race": { + text: string; + url: string; + }; + "bubble-chart": { + text: string; + url: string; + }; + cards: { + text: string; + url: string; + }; + chart: { + text: string; + url: string; + }; + chord: { + text: string; + url: string; + }; + countdown: { + text: string; + url: string; + }; + "data-explorer": { + text: string; + url: string; + }; + draw: { + text: string; + url: string; + }; + election: { + text: string; + url: string; + }; + gantt: { + text: string; + url: string; + }; + gauge: { + text: string; + url: string; + }; + globe: { + text: string; + url: string; + }; + heatmap: { + text: string; + url: string; + }; + hierarchy: { + text: string; + url: string; + }; + map: { + text: string; + url: string; + }; + marimekko: { + text: string; + url: string; + }; + model: { + text: string; + url: string; + }; + network: { + text: string; + url: string; + }; + "number-ticker": { + text: string; + url: string; + }; + parliament: { + text: string; + url: string; + }; + "photo-slider": { + text: string; + url: string; + }; + pictogram: { + text: string; + url: string; + }; + quiz: { + text: string; + url: string; + }; + radar: { + text: string; + url: string; + }; + ranking: { + text: string; + url: string; + }; + sankey: { + text: string; + url: string; + }; + scatter: { + text: string; + url: string; + }; + slope: { + text: string; + url: string; + }; + sports: { + text: string; + url: string; + }; + survey: { + text: string; + url: string; + }; + table: { + text: string; + url: string; + }; + timeline: { + text: string; + url: string; + }; + "text-annotator": { + text: string; + url: string; + }; + tournament: { + text: string; + url: string; + }; + "word-cloud": { + text: string; + url: string; + }; + }; + export { credits_1 as credits }; + } + namespace es { + const credits_2: { + default: string; + bar_race: { + text: string; + url: string; + }; + "bar-chart-race": { + text: string; + url: string; + }; + }; + export { credits_2 as credits }; + } + namespace fr { + const credits_3: { + default: string; + bar_race: { + text: string; + url: string; + }; + "bar-chart-race": { + text: string; + url: string; + }; + }; + export { credits_3 as credits }; + } + namespace it { + const credits_4: { + default: string; + bar_race: { + text: string; + url: string; + }; + "bar-chart-race": { + text: string; + url: string; + }; + }; + export { credits_4 as credits }; + } + namespace mi { + const credits_5: { + default: string; + bar_race: { + text: string; + url: string; + }; + "bar-chart-race": { + text: string; + url: string; + }; + }; + export { credits_5 as credits }; + } + namespace nl { + const credits_6: { + default: string; + bar_race: { + text: string; + url: string; + }; + "bar-chart-race": { + text: string; + url: string; + }; + }; + export { credits_6 as credits }; + } + const pt: { + default: string; + bar_race: { + text: string; + url: string; + }; + "bar-chart-race": { + text: string; + url: string; + }; + }; +} +export default _default; diff --git a/common/embed/localizations.js b/common/embed/localizations.js new file mode 100644 index 0000000..9bee586 --- /dev/null +++ b/common/embed/localizations.js @@ -0,0 +1,90 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = { + "de": { + credits: { + "default": "Erstellt mit Flourish", + }, + }, + "en": { + credits: { + "default": { text: "A Flourish data visualization", url: "https://flourish.studio/" }, + "annotator": { text: "Interactive content by Flourish", url: "https://app.flourish.studio/@flourish/svg-annotator" }, + "bar-chart-race": { text: "A Flourish bar chart race", url: "https://flourish.studio/visualisations/bar-chart-race/" }, + "bubble-chart": { text: "A Flourish bubble chart", url: "https://flourish.studio/blog/introducing-bubble-chart-template/" }, + "cards": { text: "Interactive content by Flourish", url: "https://flourish.studio/blog/cards-template/" }, + "chart": { text: "A Flourish chart", url: "https://flourish.studio/visualisations/line-bar-pie-charts/" }, + "chord": { text: "A Flourish chord diagram", url: "https://flourish.studio/blog/how-to-make-a-chord-diagram/" }, + "countdown": { text: "Interactive content by Flourish", url: "https://flourish.studio/blog/number-ticker-countdown-templates/" }, + "data-explorer": { text: "A Flourish data explorer", url: "https://flourish.studio/blog/data-explorer-template/" }, + "draw": { text: "Interactive content by Flourish", url: "https://flourish.studio/blog/draw-the-line-chart/" }, + "election": { text: "A Flourish election chart", url: "https://app.flourish.studio/@flourish/election-results-chart" }, + "gantt": { text: "A Flourish gantt chart", url: "https://flourish.studio/blog/gantt-chart-template/" }, + "gauge": { text: "A Flourish gauge visualization", url: "https://flourish.studio/visualisations/gauge/" }, + "globe": { text: "A Flourish connections globe", url: "https://flourish.studio/visualisations/maps/" }, + "heatmap": { text: "A Flourish heatmap", url: "https://flourish.studio/visualisations/heatmaps/" }, + "hierarchy": { text: "A Flourish hierarchy chart", url: "https://flourish.studio/visualisations/treemaps/" }, + "map": { text: "A Flourish map", url: "https://flourish.studio/visualisations/maps/" }, + "marimekko": { text: "A Flourish marimekko chart", url: "https://flourish.studio/visualisations/marimekko-charts/" }, + "model": { text: "Interactive content by Flourish", url: "https://app.flourish.studio/@flourish/3d-viewer" }, + "network": { text: "A Flourish network chart", url: "https://flourish.studio/visualisations/network-charts/" }, + "number-ticker": { text: "Interactive content by Flourish", url: "https://flourish.studio/blog/number-ticker-countdown-templates/" }, + "parliament": { text: "A Flourish election chart", url: "https://flourish.studio/blog/how-to-make-parliament-chart/" }, + "photo-slider": { text: "Interactive content by Flourish", url: "https://app.flourish.studio/@flourish/photo-slider" }, + "pictogram": { text: "A Flourish pictogram", url: "https://flourish.studio/blog/pictogram-isotype/" }, + "quiz": { text: "A Flourish quiz", url: "https://app.flourish.studio/@flourish/quiz" }, + "radar": { text: "A Flourish radar chart", url: "https://flourish.studio/blog/create-online-radar-spider-charts/" }, + "ranking": { text: "A Flourish line chart race", url: "https://flourish.studio/blog/line-chart-race-updates/" }, + "sankey": { text: "A Flourish sankey chart", url: "https://flourish.studio/visualisations/sankey-charts/" }, + "scatter": { text: "A Flourish scatter chart", url: "https://flourish.studio/visualisations/scatter-charts/" }, + "slope": { text: "A Flourish slope chart", url: "https://flourish.studio/visualisations/slope-charts/" }, + "sports": { text: "A Flourish sports visualization", url: "https://app.flourish.studio/@flourish/sports-race" }, + "survey": { text: "A Flourish survey visualization", url: "https://flourish.studio/visualisations/survey-data/" }, + "table": { text: "A Flourish table", url: "https://flourish.studio/visualisations/create-a-table/" }, + "timeline": { text: "Interactive content by Flourish", url: "https://flourish.studio/blog/responsive-interactive-timeline/" }, + "text-annotator": { text: "Interactive content by Flourish", url: "https://flourish.studio/blog/text-annotator-template/" }, + "tournament": { text: "Interactive content by Flourish", url: "https://flourish.studio/visualisations/tournament-chart/" }, + "word-cloud": { text: "A Flourish data visualization", url: "https://flourish.studio/blog/online-wordcloud-custom-fonts/" }, + } + }, + "es": { + credits: { + "default": "Creado con Flourish", + "bar_race": { text: "Creado con Flourish", url: "https://flourish.studio/visualisations/bar-chart-race/" }, + "bar-chart-race": { text: "Creado con Flourish", url: "https://flourish.studio/visualisations/bar-chart-race/" }, + }, + }, + "fr": { + credits: { + "default": "Créé avec Flourish", + "bar_race": { text: "Créé avec Flourish", url: "https://flourish.studio/visualisations/bar-chart-race/" }, + "bar-chart-race": { text: "Créé avec Flourish", url: "https://flourish.studio/visualisations/bar-chart-race/" }, + }, + }, + "it": { + credits: { + "default": "Creato con Flourish", + "bar_race": { text: "Creato con Flourish", url: "https://flourish.studio/visualisations/bar-chart-race/" }, + "bar-chart-race": { text: "Creato con Flourish", url: "https://flourish.studio/visualisations/bar-chart-race/" }, + } + }, + "mi": { + credits: { + "default": "Hangaia ki te Flourish", + "bar_race": { text: "Hangaia ki te Flourish", url: "https://flourish.studio/visualisations/bar-chart-race/" }, + "bar-chart-race": { text: "Hangaia ki te Flourish", url: "https://flourish.studio/visualisations/bar-chart-race/" }, + }, + }, + "nl": { + credits: { + "default": "Gemaakt met Flourish", + "bar_race": { text: "Gemaakt met Flourish", url: "https://flourish.studio/visualisations/bar-chart-race/" }, + "bar-chart-race": { text: "Gemaakt met Flourish", url: "https://flourish.studio/visualisations/bar-chart-race/" }, + }, + }, + "pt": { + "default": "Feito com Flourish", + "bar_race": { text: "Feito com Flourish", url: "https://flourish.studio/visualisations/bar-chart-race/" }, + "bar-chart-race": { text: "Feito com Flourish", url: "https://flourish.studio/visualisations/bar-chart-race/" } + } +}; diff --git a/common/embed/parse_query_params.d.ts b/common/embed/parse_query_params.d.ts new file mode 100644 index 0000000..3fd3317 --- /dev/null +++ b/common/embed/parse_query_params.d.ts @@ -0,0 +1,2 @@ +export default parseQueryParams; +declare function parseQueryParams(): {}; diff --git a/common/embed/parse_query_params.js b/common/embed/parse_query_params.js new file mode 100644 index 0000000..80e006d --- /dev/null +++ b/common/embed/parse_query_params.js @@ -0,0 +1,18 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = parseQueryParams; +function parseQueryParams() { + // Query string parameters + var location = window.location; + // We use srcdoc to load the decrypted content for password-protected projects, + // which creates a nested window. + if (location.href == "about:srcdoc") + location = window.parent.location; + var params = {}; + (function (query, re, match) { + while (match = re.exec(query)) { + params[decodeURIComponent(match[1])] = decodeURIComponent(match[2]); + } + })(location.search.substring(1).replace(/\+/g, "%20"), /([^&=]+)=?([^&]*)/g); + return params; +} diff --git a/common/package.json b/common/package.json new file mode 100644 index 0000000..641c5b2 --- /dev/null +++ b/common/package.json @@ -0,0 +1,9 @@ +{ + "name": "@flourish/common", + "description": "Common shared utilities", + "dependencies": { + "@adobe/css-tools": "^4.3.3", + "@flourish/interpreter": "^8.4.0", + "dompurify": "^3.1.4" + } +} diff --git a/common/tsconfig.sdk.tsbuildinfo b/common/tsconfig.sdk.tsbuildinfo new file mode 100644 index 0000000..19ad43d --- /dev/null +++ b/common/tsconfig.sdk.tsbuildinfo @@ -0,0 +1 @@ +{"program":{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/typescript/lib/lib.es2021.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../common/utils/state.js","../../common/utils/columns.js","../../common/utils/json.js","../../common/utils/polyfills.js","../../common/utils/data.js","../../common/embed/localizations.js","../../common/embed/credit.js","../../common/embed/customer_analytics.js","../../common/embed/parse_query_params.js","../../common/embed/embedding.js","../../common/package.json","../../node_modules/@types/json-schema/index.d.ts","../../node_modules/@types/minimist/index.d.ts","../../node_modules/@types/node/ts4.8/assert.d.ts","../../node_modules/@types/node/ts4.8/assert/strict.d.ts","../../node_modules/undici-types/header.d.ts","../../node_modules/undici-types/readable.d.ts","../../node_modules/undici-types/file.d.ts","../../node_modules/undici-types/fetch.d.ts","../../node_modules/undici-types/formdata.d.ts","../../node_modules/undici-types/connector.d.ts","../../node_modules/undici-types/client.d.ts","../../node_modules/undici-types/errors.d.ts","../../node_modules/undici-types/dispatcher.d.ts","../../node_modules/undici-types/global-dispatcher.d.ts","../../node_modules/undici-types/global-origin.d.ts","../../node_modules/undici-types/pool-stats.d.ts","../../node_modules/undici-types/pool.d.ts","../../node_modules/undici-types/handlers.d.ts","../../node_modules/undici-types/balanced-pool.d.ts","../../node_modules/undici-types/agent.d.ts","../../node_modules/undici-types/mock-interceptor.d.ts","../../node_modules/undici-types/mock-agent.d.ts","../../node_modules/undici-types/mock-client.d.ts","../../node_modules/undici-types/mock-pool.d.ts","../../node_modules/undici-types/mock-errors.d.ts","../../node_modules/undici-types/proxy-agent.d.ts","../../node_modules/undici-types/api.d.ts","../../node_modules/undici-types/cookies.d.ts","../../node_modules/undici-types/patch.d.ts","../../node_modules/undici-types/filereader.d.ts","../../node_modules/undici-types/diagnostics-channel.d.ts","../../node_modules/undici-types/websocket.d.ts","../../node_modules/undici-types/content-type.d.ts","../../node_modules/undici-types/cache.d.ts","../../node_modules/undici-types/interceptors.d.ts","../../node_modules/undici-types/index.d.ts","../../node_modules/@types/node/ts4.8/globals.d.ts","../../node_modules/@types/node/ts4.8/async_hooks.d.ts","../../node_modules/@types/node/ts4.8/buffer.d.ts","../../node_modules/@types/node/ts4.8/child_process.d.ts","../../node_modules/@types/node/ts4.8/cluster.d.ts","../../node_modules/@types/node/ts4.8/console.d.ts","../../node_modules/@types/node/ts4.8/constants.d.ts","../../node_modules/@types/node/ts4.8/crypto.d.ts","../../node_modules/@types/node/ts4.8/dgram.d.ts","../../node_modules/@types/node/ts4.8/diagnostics_channel.d.ts","../../node_modules/@types/node/ts4.8/dns.d.ts","../../node_modules/@types/node/ts4.8/dns/promises.d.ts","../../node_modules/@types/node/ts4.8/domain.d.ts","../../node_modules/@types/node/ts4.8/dom-events.d.ts","../../node_modules/@types/node/ts4.8/events.d.ts","../../node_modules/@types/node/ts4.8/fs.d.ts","../../node_modules/@types/node/ts4.8/fs/promises.d.ts","../../node_modules/@types/node/ts4.8/http.d.ts","../../node_modules/@types/node/ts4.8/http2.d.ts","../../node_modules/@types/node/ts4.8/https.d.ts","../../node_modules/@types/node/ts4.8/inspector.d.ts","../../node_modules/@types/node/ts4.8/module.d.ts","../../node_modules/@types/node/ts4.8/net.d.ts","../../node_modules/@types/node/ts4.8/os.d.ts","../../node_modules/@types/node/ts4.8/path.d.ts","../../node_modules/@types/node/ts4.8/perf_hooks.d.ts","../../node_modules/@types/node/ts4.8/process.d.ts","../../node_modules/@types/node/ts4.8/punycode.d.ts","../../node_modules/@types/node/ts4.8/querystring.d.ts","../../node_modules/@types/node/ts4.8/readline.d.ts","../../node_modules/@types/node/ts4.8/readline/promises.d.ts","../../node_modules/@types/node/ts4.8/repl.d.ts","../../node_modules/@types/node/ts4.8/stream.d.ts","../../node_modules/@types/node/ts4.8/stream/promises.d.ts","../../node_modules/@types/node/ts4.8/stream/consumers.d.ts","../../node_modules/@types/node/ts4.8/stream/web.d.ts","../../node_modules/@types/node/ts4.8/string_decoder.d.ts","../../node_modules/@types/node/ts4.8/test.d.ts","../../node_modules/@types/node/ts4.8/timers.d.ts","../../node_modules/@types/node/ts4.8/timers/promises.d.ts","../../node_modules/@types/node/ts4.8/tls.d.ts","../../node_modules/@types/node/ts4.8/trace_events.d.ts","../../node_modules/@types/node/ts4.8/tty.d.ts","../../node_modules/@types/node/ts4.8/url.d.ts","../../node_modules/@types/node/ts4.8/util.d.ts","../../node_modules/@types/node/ts4.8/v8.d.ts","../../node_modules/@types/node/ts4.8/vm.d.ts","../../node_modules/@types/node/ts4.8/wasi.d.ts","../../node_modules/@types/node/ts4.8/worker_threads.d.ts","../../node_modules/@types/node/ts4.8/zlib.d.ts","../../node_modules/@types/node/ts4.8/globals.global.d.ts","../../node_modules/@types/node/ts4.8/index.d.ts","../../node_modules/@types/normalize-package-data/index.d.ts"],"fileInfos":[{"version":"f20c05dbfe50a208301d2a1da37b9931bce0466eb5a1f4fe240971b4ecc82b67","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9","746d62152361558ea6d6115cf0da4dd10ede041d14882ede3568bce5dc4b4f1f",{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"8cc8c5a3bac513368b0157f3d8b31cfdcfe78b56d3724f30f80ed9715e404af8","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"0d5f52b3174bee6edb81260ebcd792692c32c81fd55499d69531496f3f2b25e7","affectsGlobalScope":true},{"version":"55f400eec64d17e888e278f4def2f254b41b89515d3b88ad75d5e05f019daddd","affectsGlobalScope":true},{"version":"181f1784c6c10b751631b24ce60c7f78b20665db4550b335be179217bacc0d5f","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"81cac4cbc92c0c839c70f8ffb94eb61e2d32dc1c3cf6d95844ca099463cf37ea","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true},{"version":"d7f680a43f8cd12a6b6122c07c54ba40952b0c8aa140dcfcf32eb9e6cb028596","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"775d9c9fd150d5de79e0450f35bc8b8f94ae64e3eb5da12725ff2a649dccc777","affectsGlobalScope":true},{"version":"b248e32ca52e8f5571390a4142558ae4f203ae2f94d5bac38a3084d529ef4e58","affectsGlobalScope":true},{"version":"6c55633c733c8378db65ac3da7a767c3cf2cf3057f0565a9124a16a3a2019e87","affectsGlobalScope":true},{"version":"fb4416144c1bf0323ccbc9afb0ab289c07312214e8820ad17d709498c865a3fe","affectsGlobalScope":true},{"version":"5b0ca94ec819d68d33da516306c15297acec88efeb0ae9e2b39f71dbd9685ef7","affectsGlobalScope":true},{"version":"34c839eaaa6d78c8674ae2c37af2236dee6831b13db7b4ef4df3ec889a04d4f2","affectsGlobalScope":true},{"version":"52d1bb7ab7a3306fd0375c8bff560feed26ed676a5b0457fa8027b563aecb9a4","affectsGlobalScope":true},{"version":"fda3b2d7f1e97e8eef74752073d2239113227eea4bfd8169f28609e5ed19de4c","signature":"12511f2109722b6ce10ffee10e0545d56be400e5ff50f01d968821cfc2969507"},{"version":"59699bfe2bc2c6cd0c2b39f077231497f87789e9402f86d25af5bd1553952ad3","signature":"01ac0acdb218da1dd9d1ed03d33cb55b57c2df478781473b857800eddb3460fd"},{"version":"7b7dbc10ed1adff00c4f4c0d7cfacefa1a2abdc065b1b33ae5d91a08403cad2a","signature":"cd40a81de979e7c9afcce7a3b142ac1c6099e9411153c301479485883340aa3d"},{"version":"35aea7fee5e75f4b111634f1f8eed9f3cec26da2589c0b043b40bd11e0e894a3","signature":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","affectsGlobalScope":true},{"version":"bab03fb5b53c06c863d4db22d31e772066d8dab8db75500ce7f469d1747ce919","signature":"b821c57657b32180f5b611bcc3823845ce6931315bc42eb988b52394b62dcd0d"},{"version":"01d25b10b92ffd08658fe655bb929d9c7bc5e2f22daf8816ec8a2505a22612cc","signature":"5039da289824258f4b4eb90c1c552de3081160fb440d6e67da5ee92ead87e6db"},{"version":"957570920b8ab5529e6be3bff21978036e9b99eddcf5eee1b14fc173a469f6c4","signature":"ab369d6522cc4480179febd57523e5ea502266c06dbcbeaa7cc4a2d74a3b92be"},{"version":"ecd53f20b9368642727fd699d841ca2f94a2e10010405949b9016bf0ace689d0","signature":"7d53f8799f685a263392f5b44289117d99e541ab09a9f6cf2608d2438c39a8fe"},{"version":"a934f462df8ecd7acb231d8d152b2d79f62fb4b9bd7ffad6ad677f29fed08fff","signature":"e2a8347f36e74ee72a5b91e1685372919b967cadc3d48fd5f5fc7435b05826bc"},{"version":"719b6b89ea04c6d5244eca8a1f80643dfab9414328ce1cc1a4d29172c54a7941","signature":"db81b3f9e33c5b9cdbe1ea7831e54dabef28ccb6a3b773054a2ae4db5878bb62"},"adc5a733f500e4a82b5d6247160c443a37931caae44074f61a401deed263e95f","f3e604694b624fa3f83f6684185452992088f5efb2cf136b62474aa106d6f1b6","209e814e8e71aec74f69686a9506dd7610b97ab59dcee9446266446f72a76d05","efc7d584a33fe3422847783d228f315c4cd1afe74bd7cf8e3f0e4c1125129fef","7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","7180c03fd3cb6e22f911ce9ba0f8a7008b1a6ddbe88ccf16a9c8140ef9ac1686","25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","54cb85a47d760da1c13c00add10d26b5118280d44d58e6908d8e89abbd9d7725","3e4825171442666d31c845aeb47fcd34b62e14041bb353ae2b874285d78482aa","c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","a967bfe3ad4e62243eb604bf956101e4c740f5921277c60debaf325c1320bf88","e9775e97ac4877aebf963a0289c81abe76d1ec9a2a7778dbe637e5151f25c5f3","471e1da5a78350bc55ef8cef24eb3aca6174143c281b8b214ca2beda51f5e04a","cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","db3435f3525cd785bf21ec6769bf8da7e8a776be1a99e2e7efb5f244a2ef5fee","c3b170c45fc031db31f782e612adf7314b167e60439d304b49e704010e7bafe5","40383ebef22b943d503c6ce2cb2e060282936b952a01bea5f9f493d5fb487cc7","4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","3a84b7cb891141824bd00ef8a50b6a44596aded4075da937f180c90e362fe5f6","13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","33203609eba548914dc83ddf6cadbc0bcb6e8ef89f6d648ca0908ae887f9fcc5","0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","e53a3c2a9f624d90f24bf4588aacd223e7bec1b9d0d479b68d2f4a9e6011147f","339dc5265ee5ed92e536a93a04c4ebbc2128f45eeec6ed29f379e0085283542c","9f0a92164925aa37d4a5d9dd3e0134cff8177208dba55fd2310cd74beea40ee2","8bfdb79bf1a9d435ec48d9372dc93291161f152c0865b81fc0b2694aedb4578d","2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","d32275be3546f252e3ad33976caf8c5e842c09cb87d468cb40d5f4cf092d1acc","4a0c3504813a3289f7fb1115db13967c8e004aa8e4f8a9021b95285502221bd1",{"version":"4d719cfab49ae4045d15cb6bed0f38ad3d7d6eb7f277d2603502a0f862ca3182","affectsGlobalScope":true},"cce1f5f86974c1e916ec4a8cab6eec9aa8e31e8148845bf07fbaa8e1d97b1a2c",{"version":"185282b122cbca820c297a02a57b89cf5967ab43e220e3e174d872d3f9a94d2c","affectsGlobalScope":true},"16d74fe4d8e183344d3beb15d48b123c5980ff32ff0cc8c3b96614ddcdf9b239","7b43160a49cf2c6082da0465876c4a0b164e160b81187caeb0a6ca7a281e85ba",{"version":"41fb2a1c108fbf46609ce5a451b7ec78eb9b5ada95fd5b94643e4b26397de0b3","affectsGlobalScope":true},"a40826e8476694e90da94aa008283a7de50d1dafd37beada623863f1901cb7fb","af30512288e59acdc5894428be044b5c3bf41921a761a05e494beb0c6c300510","285e512c7a0db217a0599e18c462d565fa35be4a5153dd7b80bee88c83e83ddf","b5b719a47968cd61a6f83f437236bb6fe22a39223b6620da81ef89f5d7a78fb7","8806ae97308ef26363bd7ec8071bca4d07fb575f905ee3d8a91aff226df6d618","af5bf1db6f1804fb0069039ae77a05d60133c77a2158d9635ea27b6bb2828a8f","b7fe70be794e13d1b7940e318b8770cd1fb3eced7707805318a2e3aaac2c3e9e",{"version":"2c71199d1fc83bf17636ad5bf63a945633406b7b94887612bba4ef027c662b3e","affectsGlobalScope":true},{"version":"7ae9dc7dbb58cd843065639707815df85c044babaa0947116f97bdb824d07204","affectsGlobalScope":true},"7aae1df2053572c2cfc2089a77847aadbb38eedbaa837a846c6a49fb37c6e5bd","313a0b063f5188037db113509de1b934a0e286f14e9479af24fada241435e707","1f758340b027b18ae8773ac3d33a60648a2af49eaae9e4fde18d0a0dd608642c","87ef1a23caa071b07157c72077fa42b86d30568f9dc9e31eed24d5d14fc30ba8","396a8939b5e177542bdf9b5262b4eee85d29851b2d57681fa9d7eae30e225830","21773f5ac69ddf5a05636ba1f50b5239f4f2d27e4420db147fc2f76a5ae598ac",{"version":"dea4c00820d4fac5e530d4842aed2fb20d6744d75a674b95502cbd433f88bcb0","affectsGlobalScope":true},"a5fe4cc622c3bf8e09ababde5f4096ceac53163eefcd95e9cd53f062ff9bb67a","45b1053e691c5af9bfe85060a3e1542835f8d84a7e6e2e77ca305251eda0cb3c","0f05c06ff6196958d76b865ae17245b52d8fe01773626ac3c43214a2458ea7b7",{"version":"5c5b70291ce21df19466e6b25108192089e69f6ec1b19e1f1be0b2a99d2dac74","affectsGlobalScope":true},{"version":"b7eadc0b0cba14ab854122810f330314132c5cfdb7800fceb82d521997a1f5b0","affectsGlobalScope":true},"8abd0566d2854c4bd1c5e48e05df5c74927187f1541e6770001d9637ac41542e","d742ed2db6d5425b3b6ac5fb1f2e4b1ed2ae74fbeee8d0030d852121a4b05d2f","d8dba11dc34d50cb4202de5effa9a1b296d7a2f4a029eec871f894bddfb6430d","8b71dd18e7e63b6f991b511a201fad7c3bf8d1e0dd98acb5e3d844f335a73634","01d8e1419c84affad359cc240b2b551fb9812b450b4d3d456b64cda8102d4f60","458b216959c231df388a5de9dcbcafd4b4ca563bc3784d706d0455467d7d4942","269929a24b2816343a178008ac9ae9248304d92a8ba8e233055e0ed6dbe6ef71","93452d394fdd1dc551ec62f5042366f011a00d342d36d50793b3529bfc9bd633","f8c87b19eae111f8720b0345ab301af8d81add39621b63614dfc2d15fd6f140a","831c22d257717bf2cbb03afe9c4bcffc5ccb8a2074344d4238bf16d3a857bb12",{"version":"2225100373ca3d63bcc7f206e1177152d2e2161285a0bd83c8374db1503a0d1f","affectsGlobalScope":true},{"version":"7052b7b0c3829df3b4985bab2fd74531074b4835d5a7b263b75c82f0916ad62f","affectsGlobalScope":true},"aa34c3aa493d1c699601027c441b9664547c3024f9dbab1639df7701d63d18fa","eefcdf86cefff36e5d87de36a3638ab5f7d16c2b68932be4a72c14bb924e43c1","7c651f8dce91a927ab62925e73f190763574c46098f2b11fb8ddc1b147a6709a","7440ab60f4cb031812940cc38166b8bb6fbf2540cfe599f87c41c08011f0c1df",{"version":"4d0405568cf6e0ff36a4861c4a77e641366feaefa751600b0a4d12a5e8f730a8","affectsGlobalScope":true},{"version":"527e6e7c1e60184879fe97517f0d51dbfab72c4625cef50179f27f46d7fd69a1","affectsGlobalScope":true},"e393915d3dc385e69c0e2390739c87b2d296a610662eb0b1cb85224e55992250","79bad8541d5779c85e82a9fb119c1fe06af77a71cc40f869d62ad379473d4b75","4a34b074b11c3597fb2ff890bc8f1484375b3b80793ab01f974534808d5777c7",{"version":"629d20681ca284d9e38c0a019f647108f5fe02f9c59ac164d56f5694fc3faf4d","affectsGlobalScope":true},"e7dbf5716d76846c7522e910896c5747b6df1abd538fee8f5291bdc843461795",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"652ee9c5103e89102d87bc20d167a02a0e3e5e53665674466c8cfea8a9e418c7","6fa0008bf91a4cc9c8963bace4bba0bd6865cbfa29c3e3ccc461155660fb113a"],"options":{"composite":true,"declaration":true,"declarationMap":false,"esModuleInterop":true,"module":1,"noImplicitAny":false,"outDir":"./","rootDir":"../../common","skipLibCheck":true,"strict":true,"target":8},"fileIdsList":[[51,137],[137],[53,54,137],[59,137],[94,137],[95,100,128,137],[96,107,108,115,125,136,137],[96,97,107,115,137],[98,137],[99,100,108,116,137],[100,125,133,137],[101,103,107,115,137],[102,137],[103,104,137],[107,137],[105,107,137],[94,107,137],[107,108,109,125,136,137],[107,108,109,122,125,128,137],[92,137,141],[103,107,110,115,125,136,137],[107,108,110,111,115,125,133,136,137],[110,112,125,133,136,137],[59,60,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143],[107,113,137],[114,136,137,141],[103,107,115,125,137],[116,137],[117,137],[94,118,137],[119,135,137,141],[120,137],[121,137],[107,122,123,137],[122,124,137,139],[95,107,125,126,127,128,137],[95,125,127,137],[125,126,137],[128,137],[129,137],[94,125,137],[107,131,132,137],[131,132,137],[100,115,125,133,137],[134,137],[115,135,137],[95,110,121,136,137],[100,137],[125,137,138],[114,137,139],[137,140],[95,100,107,109,118,125,136,137,139,141],[125,137,142],[69,73,136,137],[69,125,136,137],[64,137],[66,69,133,136,137],[115,133,137],[137,144],[64,137,144],[66,69,115,136,137],[61,62,65,68,95,107,125,136,137],[61,67,137],[65,69,95,128,136,137,144],[95,137,144],[85,95,137,144],[63,64,137,144],[69,137],[63,64,65,66,67,68,69,70,71,73,74,75,76,77,78,79,80,81,82,83,84,86,87,88,89,90,91,137],[69,76,77,137],[67,69,77,78,137],[68,137],[61,64,69,137],[69,73,77,78,137],[73,137],[67,69,72,136,137],[61,66,67,69,73,76,137],[95,125,137],[64,69,85,95,137,141,144]],"referencedMap":[[52,1],[53,2],[55,3],[51,2],[54,2],[56,2],[47,2],[50,2],[48,2],[49,2],[46,2],[57,2],[58,2],[59,4],[60,4],[94,5],[95,6],[96,7],[97,8],[98,9],[99,10],[100,11],[101,12],[102,13],[103,14],[104,14],[106,15],[105,16],[107,17],[108,18],[109,19],[93,20],[143,2],[110,21],[111,22],[112,23],[144,24],[113,25],[114,26],[115,27],[116,28],[117,29],[118,30],[119,31],[120,32],[121,33],[122,34],[123,34],[124,35],[125,36],[127,37],[126,38],[128,39],[129,40],[130,41],[131,42],[132,43],[133,44],[134,45],[135,46],[136,47],[137,48],[138,49],[139,50],[140,51],[141,52],[142,53],[145,2],[10,2],[9,2],[2,2],[11,2],[12,2],[13,2],[14,2],[15,2],[16,2],[17,2],[18,2],[3,2],[4,2],[22,2],[19,2],[20,2],[21,2],[23,2],[24,2],[25,2],[5,2],[26,2],[27,2],[28,2],[29,2],[6,2],[30,2],[31,2],[32,2],[33,2],[7,2],[34,2],[39,2],[40,2],[35,2],[36,2],[37,2],[38,2],[8,2],[44,2],[41,2],[42,2],[43,2],[1,2],[45,2],[76,54],[83,55],[75,54],[90,56],[67,57],[66,58],[89,59],[84,60],[87,61],[69,62],[68,63],[64,64],[63,65],[86,66],[65,67],[70,68],[71,2],[74,68],[61,2],[92,69],[91,68],[78,70],[79,71],[81,72],[77,73],[80,74],[85,59],[72,75],[73,76],[82,77],[62,78],[88,79]],"exportedModulesMap":[[56,2],[57,2],[58,2],[59,4],[60,4],[94,5],[95,6],[96,7],[97,8],[98,9],[99,10],[100,11],[101,12],[102,13],[103,14],[104,14],[106,15],[105,16],[107,17],[108,18],[109,19],[93,20],[143,2],[110,21],[111,22],[112,23],[144,24],[113,25],[114,26],[115,27],[116,28],[117,29],[118,30],[119,31],[120,32],[121,33],[122,34],[123,34],[124,35],[125,36],[127,37],[126,38],[128,39],[129,40],[130,41],[131,42],[132,43],[133,44],[134,45],[135,46],[136,47],[137,48],[138,49],[139,50],[140,51],[141,52],[142,53],[145,2],[10,2],[9,2],[2,2],[11,2],[12,2],[13,2],[14,2],[15,2],[16,2],[17,2],[18,2],[3,2],[4,2],[22,2],[19,2],[20,2],[21,2],[23,2],[24,2],[25,2],[5,2],[26,2],[27,2],[28,2],[29,2],[6,2],[30,2],[31,2],[32,2],[33,2],[7,2],[34,2],[39,2],[40,2],[35,2],[36,2],[37,2],[38,2],[8,2],[44,2],[41,2],[42,2],[43,2],[1,2],[45,2],[76,54],[83,55],[75,54],[90,56],[67,57],[66,58],[89,59],[84,60],[87,61],[69,62],[68,63],[64,64],[63,65],[86,66],[65,67],[70,68],[71,2],[74,68],[61,2],[92,69],[91,68],[78,70],[79,71],[81,72],[77,73],[80,74],[85,59],[72,75],[73,76],[82,77],[62,78],[88,79]],"semanticDiagnosticsPerFile":[52,53,55,51,54,56,47,50,48,49,46,57,58,59,60,94,95,96,97,98,99,100,101,102,103,104,106,105,107,108,109,93,143,110,111,112,144,113,114,115,116,117,118,119,120,121,122,123,124,125,127,126,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,145,10,9,2,11,12,13,14,15,16,17,18,3,4,22,19,20,21,23,24,25,5,26,27,28,29,6,30,31,32,33,7,34,39,40,35,36,37,38,8,44,41,42,43,1,45,76,83,75,90,67,66,89,84,87,69,68,64,63,86,65,70,71,74,61,92,91,78,79,81,77,80,85,72,73,82,62,88],"latestChangedDtsFile":"./embed/embedding.d.ts"},"version":"4.8.4"} \ No newline at end of file diff --git a/common/utils/columns.d.ts b/common/utils/columns.d.ts new file mode 100644 index 0000000..4d9801d --- /dev/null +++ b/common/utils/columns.d.ts @@ -0,0 +1,11 @@ +export function parseColumn(col_spec: any, is_optional: any): number; +export function printColumn(col_ix: any): string; +export function parseRange(col_range: any): number[]; +export function parseColumns(cols_spec: any): number[]; +export function printColumns(indexes: any): string; +export function parseDataBinding(d: any, data_table_ids: any): { + data_table_id: any; + column: number; + columns: number[]; +}; +export function printDataBinding(r: any, data_table_names: any, print_data_table_name: any, optional: any): string; diff --git a/common/utils/columns.js b/common/utils/columns.js new file mode 100644 index 0000000..8e85678 --- /dev/null +++ b/common/utils/columns.js @@ -0,0 +1,175 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.printDataBinding = exports.parseDataBinding = exports.printColumns = exports.parseColumns = exports.parseRange = exports.printColumn = exports.parseColumn = void 0; +const MAX_INTEGER = Math.pow(2, 31) - 1; +const MAX_RANGE_LENGTH = Math.pow(2, 15); +// Attempt to parse col_spec as a columns spec; +// return true if we succeed, and false if not. +function looksLikeMultipleColumns(col_spec) { + try { + parseColumns(col_spec); + } + catch (e) { + return false; + } + return true; +} +function parseColumn(col_spec, is_optional) { + col_spec = col_spec.toUpperCase(); + if (!/^[A-Z]+$/.test(col_spec)) { + if (!col_spec) { + if (is_optional) + return -1; // Use -1 for unassigned optional binding + else + throw new Error("Non-optional data binding must specify column"); + } + if (looksLikeMultipleColumns(col_spec)) { + throw new Error("You can only select one column"); + } + else + throw new Error("Invalid column specification: " + col_spec); + } + var col_ix = 0; + for (var i = 0; i < col_spec.length; i++) { + col_ix = col_ix * 26 + (col_spec.charCodeAt(i) - 64); + } + if (col_ix - 1 > MAX_INTEGER) + console.warn("Column index out of range"); + return Math.min(col_ix - 1, MAX_INTEGER); +} +exports.parseColumn = parseColumn; +function printColumn(col_ix) { + col_ix += 1; + var col_spec = ""; + while (col_ix > 0) { + var q = Math.floor(col_ix / 26), r = col_ix % 26; + if (r == 0) { + q -= 1; + r += 26; + } + col_spec = String.fromCharCode(64 + r) + col_spec; + col_ix = q; + } + return col_spec; +} +exports.printColumn = printColumn; +function parseRange(col_range) { + var dash_mo = col_range.match(/\s*(?:[-–—:]|\.\.)\s*/); + if (!dash_mo) + throw new Error("Failed to parse column range: " + col_range); + var first = col_range.substr(0, dash_mo.index), last = col_range.substr(dash_mo.index + dash_mo[0].length); + var first_ix = parseColumn(first), last_ix = parseColumn(last); + var r = []; + var incrementer = last_ix >= first_ix ? 1 : -1; + var n = Math.abs(last_ix - first_ix) + 1; + if (n > MAX_RANGE_LENGTH) { + console.warn("Truncating excessively long range"); + n = MAX_RANGE_LENGTH; + } + for (var i = 0; i < n; i++) { + r.push(first_ix + i * incrementer); + } + return r; +} +exports.parseRange = parseRange; +function printRange(start, end) { + return printColumn(start) + "-" + printColumn(end); +} +function parseColumns(cols_spec) { + var indexes = []; + cols_spec = cols_spec.replace(/^\s+|\s+$/g, ""); + var split_cols = cols_spec.split(/\s*,\s*/); + if (split_cols.length == 1 && split_cols[0] === "") + split_cols = []; + for (var i = 0; i < split_cols.length; i++) { + var col_or_range = split_cols[i]; + if (/^[A-Za-z]+$/.test(col_or_range)) { + indexes.push(parseColumn(col_or_range)); + } + else { + Array.prototype.push.apply(indexes, parseRange(col_or_range)); + } + } + return indexes; +} +exports.parseColumns = parseColumns; +function splitIntoRanges(indexes) { + if (!indexes.length) { + return []; + } + var ranges = []; + var start = indexes[0], end = indexes[0]; + var direction = null; + for (var i = 0; i < indexes.length - 1; i++) { + var diff = indexes[i + 1] - indexes[i]; + if (direction === null && Math.abs(diff) === 1) { + // It's a range with either ascending columns (direction=1), or descending + // columns (direction=-1) + end = indexes[i + 1]; + direction = diff; + continue; + } + if (diff === direction) { + // The range is continuing in the same direction as before + end = indexes[i + 1]; + continue; + } + // There's nothing more in the range, so add it, and start a new range from the + // next column + ranges.push([start, end]); + start = end = indexes[i + 1]; + direction = null; + } + // There will always be a range which hasn't been added at the end + ranges.push([start, end]); + return ranges; +} +function printColumns(indexes) { + var ranges = splitIntoRanges(indexes); + var r = []; + for (var i = 0; i < ranges.length; i++) { + var range = ranges[i]; + if (range[0] == range[1]) + r.push(printColumn(range[0])); + else + r.push(printRange(range[0], range[1])); + } + return r.join(","); +} +exports.printColumns = printColumns; +function parseDataBinding(d, data_table_ids) { + var r = {}; + if (!(d.type in d)) { + if (d.optional) + return r; + throw new Error("Data binding must specify '" + d.type + "': " + JSON.stringify(d)); + } + var double_colon_ix = d[d.type].indexOf("::"); + if (double_colon_ix == -1) + throw new Error("Invalid data binding: " + d[d.type]); + var data_table_name = d[d.type].substr(0, double_colon_ix); + r.data_table_id = data_table_ids[data_table_name]; + var col_spec = d[d.type].substr(double_colon_ix + 2); + if (d.type == "column") + r.column = parseColumn(col_spec, d.optional); + else if (d.type == "columns") + r.columns = parseColumns(col_spec); + else + throw new Error("Unknown data binding type: " + d.type); + return r; +} +exports.parseDataBinding = parseDataBinding; +function printDataBinding(r, data_table_names, print_data_table_name, optional) { + var data_table_name = print_data_table_name ? data_table_names[r.data_table_id] + "::" : ""; + if ("column" in r) { + return data_table_name + printColumn(r.column); + } + else if ("columns" in r) { + return data_table_name + printColumns(r.columns); + } + else if (optional) { + return ""; + } + throw new Error("Data binding must have .column or .columns"); +} +exports.printDataBinding = printDataBinding; diff --git a/common/utils/data.d.ts b/common/utils/data.d.ts new file mode 100644 index 0000000..08fbb59 --- /dev/null +++ b/common/utils/data.d.ts @@ -0,0 +1,30 @@ +export function extractData(data_binding: any, data_by_id: any, column_types_by_id: any, template_data_binding: any): {}[]; +export function getColumnTypesForData(data: any): { + type_id: any; + index: number; + output_format_id: any; +}[]; +export function getRandomSeededSample(column: any, sample_size: any): any; +export function mulberry32(seed: any): () => number; +export function trimTrailingEmptyRows(data: any): any; +export function dropReturnCharacters(data: any): any; +/** + * Takes an array of arrays (typically tabular data) and rewrites + * it so that: + * - Any trailing empty rows are removed + * - Any cell that was not a string is stringified + * - Any leading or trailing whitespace of a cell is removed + * + * (The potentially modified table is returned to match the convention + * used by functions this is replacing, although (TODO) I think it + * would be more obvious that this function has side-effects if it + * did not return the table and the calling code was changed.) + * + * @param {any[][]} data + * @returns {string[][]} + */ +export function tidyTable(data: any[][]): string[][]; +export function stripCommonFixes(str: any): any; +export function transposeNestedArray(nested_array: any): any[][]; +export function getSlicedData(arr: any): any; +export function interpretColumn(arr: any): any; diff --git a/common/utils/data.js b/common/utils/data.js new file mode 100644 index 0000000..8fd3fad --- /dev/null +++ b/common/utils/data.js @@ -0,0 +1,279 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.interpretColumn = exports.getSlicedData = exports.transposeNestedArray = exports.stripCommonFixes = exports.tidyTable = exports.dropReturnCharacters = exports.trimTrailingEmptyRows = exports.mulberry32 = exports.getRandomSeededSample = exports.getColumnTypesForData = exports.extractData = void 0; +const interpreter_1 = require("@flourish/interpreter"); +require("./polyfills"); +function extractData(data_binding, data_by_id, column_types_by_id, template_data_binding) { + var columns = []; + var data_table_ids = []; + var num_rows = 0; + var dataset = []; + var interpreters_by_id = {}; + dataset.column_names = {}; + dataset.metadata = {}; + function getInterpretationIds(data_table_id, column_index) { + if (!interpreters_by_id[data_table_id]) + return {}; + var by_column_index = interpreters_by_id[data_table_id]; + if (!by_column_index[column_index]) + return {}; + return by_column_index[column_index]; + } + function getInterpreter(data_table_id, column_index) { + const { type_id } = getInterpretationIds(data_table_id, column_index); + if (type_id) + return interpreter_1.createInterpreter.getInterpretation(type_id); + } + for (var data_table_id in column_types_by_id) { + var lookup = {}; + var column_types = column_types_by_id[data_table_id]; + if (!column_types) + continue; + for (let i = 0; i < column_types.length; i++) { + const type_id = column_types[i].type_id; + const of_id = column_types[i].output_format_id; + const output_format_id = (!of_id || of_id === "auto") ? type_id : of_id; + lookup[column_types[i].index] = { type_id, output_format_id }; + } + interpreters_by_id[data_table_id] = lookup; + } + for (var key in data_binding) { + if (data_binding[key] === null) + continue; + if (data_binding[key].columns === undefined && data_binding[key].column === undefined) + continue; + var b = data_binding[key]; + b.template_data_binding = template_data_binding[key]; + b.key = key; + if (!(b.data_table_id in data_by_id)) { + var data_by_id_keys = []; + for (var k in data_by_id) + data_by_id_keys.push(k); + console.error("Data table id " + b.data_table_id + " not in " + JSON.stringify(data_by_id_keys)); + continue; + } + var data_table = data_by_id[b.data_table_id]; + if (data_table.length == 0) { + console.warn("Empty data table"); + continue; + } + if ("columns" in b && b.columns != null) { + var column_count = data_table[0].length; + b.columns = b.columns.filter(function (i) { return i < column_count; }); + dataset.column_names[key] = b.columns.map(function (i) { + return data_table[0][i]; + }); + dataset.metadata[key] = b.columns.map(function (i) { + const { type_id, output_format_id } = getInterpretationIds(b.data_table_id, i); + if (type_id) { + return { + type: type_id.split("$")[0], + type_id, + output_format_id: output_format_id + }; + } + return null; + }); + } + else if ("column" in b && b.column != null) { + dataset.column_names[key] = data_table[0][b.column]; + const { type_id, output_format_id } = getInterpretationIds(b.data_table_id, b.column); + if (type_id) { + dataset.metadata[key] = { + type: type_id.split("$")[0], + type_id, + output_format_id: output_format_id + }; + } + } + else { + throw new Error("Data binding includes no column(s) specification: " + JSON.stringify(b)); + } + if (data_table_ids.indexOf(b.data_table_id) == -1) { + data_table_ids.push(b.data_table_id); + num_rows = Math.max(num_rows, data_table.length - 1); + } + columns.push(b); + } + function parse(b, column_index, string_value) { + if (!b.template_data_binding.data_type) + return string_value; + var interpreter = getInterpreter(b.data_table_id, column_index); + if (interpreter && interpreter.type == "number") + string_value = stripCommonFixes(string_value); + var result = interpreter ? interpreter.parse(string_value) : string_value; + // We require our marshalled data to be JSON-serialisable, + // therefore we convert NaNs to null here. + if (Number.isNaN(result)) + result = null; + return result; + } + for (var i = 0; i < num_rows; i++) { + var o = {}; + for (var j = 0; j < columns.length; j++) { + b = columns[j]; + var table = data_by_id[b.data_table_id]; + if (i + 1 >= table.length) + continue; + if ("columns" in b && b.columns != null) { + o[b.key] = b.columns + .filter(function (c) { return c < table[i + 1].length; }) + .map(function (c) { return parse(b, c, table[i + 1][c]); }); + } + else if ("column" in b && b.column != null) { + if (b.column >= table[i + 1].length) + o[b.key] = parse(b, b.column, ""); + else + o[b.key] = parse(b, b.column, table[i + 1][b.column]); + } + } + dataset.push(o); + } + return dataset; +} +exports.extractData = extractData; +function getColumnTypesForData(data) { + return transposeNestedArray(data) + .map(function (column, i) { + const sliced_column = getSlicedData(column); + const sample_size = 1000; + let sample_data; + if (sliced_column.length > (sample_size * 2)) + sample_data = getRandomSeededSample(sliced_column, sample_size); + else + sample_data = sliced_column; + const type_id = interpretColumn(sample_data)[0].id; + return { type_id: type_id, index: i, output_format_id: type_id }; + }); +} +exports.getColumnTypesForData = getColumnTypesForData; +// Returns a random seeded sample of column values based on the column length. +// The sample is consistent and will update if the length of column changes. +function getRandomSeededSample(column, sample_size) { + if (column.length <= sample_size * 2) + return column; + const rng = mulberry32(column.length); + while (column.length > sample_size) { + const random_index = Math.floor(rng() * column.length); + column.splice(random_index, 1); + } + return column; +} +exports.getRandomSeededSample = getRandomSeededSample; +// Seeded RNG implementation taken from https://github.com/bryc/code/blob/master/jshash/PRNGs.md#mulberry32 +function mulberry32(seed) { + let a = seed; + return function () { + a |= 0; + a = a + 0x6D2B79F5 | 0; + var t = Math.imul(a ^ a >>> 15, 1 | a); + t = t + Math.imul(t ^ t >>> 7, 61 | t) ^ t; + return ((t ^ t >>> 14) >>> 0) / 4294967296; + }; +} +exports.mulberry32 = mulberry32; +function trimTrailingEmptyRows(data) { + for (var i = data.length; i-- > 1;) { + if (!data[i] || !data[i].length || (Array.isArray(data[i]) && data[i].findIndex(function (col) { return col !== null && col !== ""; }) == -1)) { + data.splice(i, 1); + } + else + break; + } + return data; +} +exports.trimTrailingEmptyRows = trimTrailingEmptyRows; +function dropReturnCharacters(data) { + for (const row of data) { + for (let i = 0; i < row.length; i++) { + // Due to a bug in HoT, pasting long lines from Excel can lead to the addition of + // a newline character and a space *before* a space character. + // This leads to a pattern of new line character followed by two spaces. + // Here we identify that pattern and revert it. + row[i] = row[i].replace(/(\r\n|\n|\r) {2}/g, " "); + } + } + return data; +} +exports.dropReturnCharacters = dropReturnCharacters; +/** + * Takes an array of arrays (typically tabular data) and rewrites + * it so that: + * - Any trailing empty rows are removed + * - Any cell that was not a string is stringified + * - Any leading or trailing whitespace of a cell is removed + * + * (The potentially modified table is returned to match the convention + * used by functions this is replacing, although (TODO) I think it + * would be more obvious that this function has side-effects if it + * did not return the table and the calling code was changed.) + * + * @param {any[][]} data + * @returns {string[][]} + */ +function tidyTable(data) { + trimTrailingEmptyRows(data); + for (let row of data) { + for (let i = 0; i < row.length; i++) { + let value = row[i]; + // Convert null or undefined values to the empty string + if (value == null) + value = ""; + // If the value is not a string, convert it to one + if (typeof value !== "string") { + value = "" + value; + } + // Now value is a definitely a string, strip any leading + // or trailing whitespace. + row[i] = value.trim(); + } + } + return data; +} +exports.tidyTable = tidyTable; +var ERROR_STRINGS = ["#DIV/0", "#N/A", "#NAME?", "#NULL!", "#NUM!", "#REF!", "#VALUE!", "#ERROR!"]; +var interpreter = (0, interpreter_1.createInterpreter)().nMax(Infinity).nFailingValues(8).failureFraction(0.1); +function stripCommonFixes(str) { + str = str || ""; + return str.replace(/[€£$¥%º]/g, ""); +} +exports.stripCommonFixes = stripCommonFixes; +function transposeNestedArray(nested_array) { + var n_inner = nested_array.length; + var n_outer = n_inner > 0 ? nested_array[0].length : 0; + var transposed_array = []; + for (var i = 0; i < n_outer; i++) { + var data = []; + for (var j = 0; j < n_inner; j++) { + data.push(nested_array[j][i]); + } + transposed_array.push(data); + } + return transposed_array; +} +exports.transposeNestedArray = transposeNestedArray; +function getSlicedData(arr) { + const n = arr.length; + if (n > 100) + return arr.slice(10, n - 10); + if (n > 50) + return arr.slice(5, n - 5); + if (n > 30) + return arr.slice(4, n - 4); + if (n > 20) + return arr.slice(3, n - 3); + if (n > 10) + return arr.slice(2, n - 2); + if (n > 1) + return arr.slice(1, n); + return arr.slice(0, 1); +} +exports.getSlicedData = getSlicedData; +function interpretColumn(arr) { + var idata = arr.filter(function (d) { + return d && !ERROR_STRINGS.includes(d.trim()); + }) + .map(stripCommonFixes); + return interpreter(idata); +} +exports.interpretColumn = interpretColumn; diff --git a/common/utils/json.d.ts b/common/utils/json.d.ts new file mode 100644 index 0000000..b6806cd --- /dev/null +++ b/common/utils/json.d.ts @@ -0,0 +1,3 @@ +export function safeStringify(obj: any): string | undefined; +export function javaScriptStringify(v: any): any; +export function stringifyPreparedData(data: any): string; diff --git a/common/utils/json.js b/common/utils/json.js new file mode 100644 index 0000000..2f61e10 --- /dev/null +++ b/common/utils/json.js @@ -0,0 +1,60 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.stringifyPreparedData = exports.javaScriptStringify = exports.safeStringify = void 0; +function escapeChar(c) { + var hex = c.charCodeAt(0).toString(16); + while (hex.length < 4) + hex = "0" + hex; + return "\\u" + hex; +} +// Stringify an object (etc.) in a form that can safely be inserted +// into a diff --git a/site/embedded.js b/site/embedded.js index fb0113f..db05c00 100644 --- a/site/embedded.js +++ b/site/embedded.js @@ -1,2 +1,3 @@ -!function(){"use strict";var e,t,i=!1;function n(e){if(i&&window.top!==window.self){var t=window;"srcdoc"===t.location.pathname&&(t=t.parent);var n,o=(n={},window._Flourish_template_id&&(n.template_id=window._Flourish_template_id),window.Flourish&&window.Flourish.app&&window.Flourish.app.loaded_template_id&&(n.template_id=window.Flourish.app.loaded_template_id),window._Flourish_visualisation_id&&(n.visualisation_id=window._Flourish_visualisation_id),window.Flourish&&window.Flourish.app&&window.Flourish.app.loaded_visualisation&&(n.visualisation_id=window.Flourish.app.loaded_visualisation.id),window.Flourish&&window.Flourish.app&&window.Flourish.app.story&&(n.story_id=window.Flourish.app.story.id,n.slide_count=window.Flourish.app.story.slides.length),window.Flourish&&window.Flourish.app&&window.Flourish.app.current_slide&&(n.slide_index=window.Flourish.app.current_slide.index+1),n),r={sender:"Flourish",method:"customerAnalytics"};for(var a in o)o.hasOwnProperty(a)&&(r[a]=o[a]);for(var a in e)e.hasOwnProperty(a)&&(r[a]=e[a]);t.parent.postMessage(JSON.stringify(r),"*")}}function o(e){if("function"!=typeof e)throw new Error("Analytics callback is not a function");window.Flourish._analytics_listeners.push(e)}function r(){i=!0;[{event_name:"click",action_name:"click",use_capture:!0},{event_name:"keydown",action_name:"key_down",use_capture:!0},{event_name:"mouseenter",action_name:"mouse_enter",use_capture:!1},{event_name:"mouseleave",action_name:"mouse_leave",use_capture:!1}].forEach((function(e){document.body.addEventListener(e.event_name,(function(){n({action:e.action_name})}),e.use_capture)}))}function a(){if(null==e){var t=function(){var e=window.location;"about:srcdoc"==e.href&&(e=window.parent.location);var t={};return function(e,i,n){for(;n=i.exec(e);)t[decodeURIComponent(n[1])]=decodeURIComponent(n[2])}(e.search.substring(1).replace(/\+/g,"%20"),/([^&=]+)=?([^&]*)/g),t}();e="referrer"in t?/^https:\/\/medium.com\//.test(t.referrer):!("auto"in t)}return e}function s(e){var t=e||window.innerWidth;return t>999?650:t>599?575:400}function l(e){if(e&&window.top!==window.self){var t=window;"srcdoc"==t.location.pathname&&(t=t.parent);var i={sender:"Flourish",method:"scrolly"};if(e)for(var n in e)i[n]=e[n];t.parent.postMessage(JSON.stringify(i),"*")}}function d(e,i){if(window.top!==window.self){var n=window;if("srcdoc"==n.location.pathname&&(n=n.parent),t)return e=parseInt(e,10),void n.parent.postMessage({sentinel:"amp",type:"embed-size",height:e},"*");var o={sender:"Flourish",context:"iframe.resize",method:"resize",height:e,src:n.location.toString()};if(i)for(var r in i)o[r]=i[r];n.parent.postMessage(JSON.stringify(o),"*")}}function u(){return(-1!==navigator.userAgent.indexOf("Safari")||-1!==navigator.userAgent.indexOf("iPhone"))&&-1==navigator.userAgent.indexOf("Chrome")}function c(e){return"string"==typeof e||e instanceof String}function h(e){return"warn"!==e.method?(console.warn("BUG: validateWarnMessage called for method"+e.method),!1):!(null!=e.message&&!c(e.message))&&!(null!=e.explanation&&!c(e.explanation))}function f(e){return"resize"!==e.method?(console.warn("BUG: validateResizeMessage called for method"+e.method),!1):!!c(e.src)&&(!!c(e.context)&&!!("number"==typeof(t=e.height)?!isNaN(t)&&t>=0:c(t)&&/\d/.test(t)&&/^[0-9]*(\.[0-9]*)?(cm|mm|Q|in|pc|pt|px|em|ex|ch|rem|lh|vw|vh|vmin|vmax|%)?$/i.test(t)));var t}function p(e){throw new Error("Validation for setSetting is not implemented yet; see issue #4328")}function m(e){return"scrolly"!==e.method?(console.warn("BUG: validateScrolly called for method"+e.method),!1):!!Array.isArray(e.slides)}function w(e){return"customerAnalytics"===e.method||(console.warn("BUG: validateCustomerAnalyticsMessage called for method"+e.method),!1)}function g(e){return"request-upload"!==e.method?(console.warn("BUG: validateResizeMessage called for method"+e.method),!1):!!c(e.name)&&!(null!=e.accept&&!c(e.accept))}function y(e,t,i){var n=function(e){for(var t={warn:h,resize:f,setSetting:p,customerAnalytics:w,"request-upload":g,scrolly:m},i={},n=0;n1)return r;var s=setInterval((function(){window._flourish_poll_items=window._flourish_poll_items.filter((function(e){return!e.iframe.offsetParent||(x(e.embed_url,e.container,e.iframe,e.width,e.height,e.play_on_load),!1)})),window._flourish_poll_items.length||clearInterval(s)}),500)}return r}function x(e,t,i,n,o,r){var a;return n&&"number"==typeof n?(a=n,n+="px"):n&&n.match(/^[ \t\r\n\f]*([+-]?\d+|\d*\.\d+(?:[eE][+-]?\d+)?)(?:\\?[Pp]|\\0{0,4}[57]0(?:\r\n|[ \t\r\n\f])?)(?:\\?[Xx]|\\0{0,4}[57]8(?:\r\n|[ \t\r\n\f])?)[ \t\r\n\f]*$/)&&(a=parseFloat(n)),o&&"number"==typeof o&&(o+="px"),n?i.style.width=n:u()?i.style.width=t.offsetWidth+"px":i.style.width="100%",!!o||(e.match(/\?/)?e+="&auto=1":e+="?auto=1",o=s(a||i.offsetWidth)+"px"),o&&("%"===o.charAt(o.length-1)&&(o=parseFloat(o)/100*t.parentNode.offsetHeight+"px"),i.style.height=o),i.setAttribute("src",e+(r?"#play-on-load":"")),i}function b(e){return!Array.isArray(e)&&"object"==typeof e&&null!=e}function A(e,t){for(var i in t)b(e[i])&&b(t[i])?A(e[i],t[i]):e[i]=t[i];return e}!function(){var e,i=window.top===window.self,c=i?null:(t="#amp=1"==window.location.hash,{createEmbedIframe:F,isFixedHeight:a,getHeightForBreakpoint:s,startEventListeners:y,notifyParentWindow:d,initScrolly:l,createScrolly:_,isSafari:u,initCustomerAnalytics:r,addAnalyticsListener:o,sendCustomerAnalyticsMessage:n}),h=!0;function f(){var t;Flourish.fixed_height||(null!=e?t=e:h&&(t=c.getHeightForBreakpoint()),t!==window.innerHeight&&c.notifyParentWindow(t))}function p(){-1!==window.location.search.indexOf("enable_customer_analytics=1")&&Flourish.enableCustomerAnalytics(),f(),window.addEventListener("resize",f)}Flourish.warn=function(e){if("string"==typeof e&&(e={message:e}),i||"editor"!==Flourish.environment)console.warn(e.message);else{var t={sender:"Flourish",method:"warn",message:e.message,explanation:e.explanation};window.parent.postMessage(JSON.stringify(t),"*")}},Flourish.uploadImage=function(e){if(i||"story_editor"!==Flourish.environment)throw"Invalid upload request";var t={sender:"Flourish",method:"request-upload",name:e.name,accept:e.accept};window.parent.postMessage(JSON.stringify(t),"*")},Flourish.setSetting=function(e,t){if("editor"===Flourish.environment||"sdk"===Flourish.environment){var i={sender:"Flourish",method:"setSetting",name:e,value:t};window.parent.postMessage(JSON.stringify(i),"*")}else if("story_editor"===Flourish.environment){var n={};n[e]=t,A(window.template.state,function(e){var t={};for(var i in e){for(var n=t,o=i.indexOf("."),r=0;o>=0;o=i.indexOf(".",r=o+1)){var a=i.substring(r,o);a in n||(n[a]={}),n=n[a]}n[i.substring(r)]=e[i]}return t}(n))}},Flourish.setHeight=function(t){Flourish.fixed_height||(e=t,h=null==t,f())},Flourish.checkHeight=function(){if(!i){var e=Flourish.__container_height;null!=e?(Flourish.fixed_height=!0,c.notifyParentWindow(e)):c.isFixedHeight()?Flourish.fixed_height=!0:(Flourish.fixed_height=!1,f())}},Flourish.fixed_height=i||c.isFixedHeight(),Flourish.enableCustomerAnalytics=function(){c&&c.initCustomerAnalytics()},"loading"===document.readyState?document.addEventListener("DOMContentLoaded",p):p()}()}(); +!function(){"use strict";var e=!1;function t(t){if(e&&window.top!==window.self){var n=window;"srcdoc"===n.location.pathname&&(n=n.parent);var o,i=(o={},window._Flourish_template_id&&(o.template_id=window._Flourish_template_id),window.Flourish&&window.Flourish.app&&window.Flourish.app.loaded_template_id&&(o.template_id=window.Flourish.app.loaded_template_id),window._Flourish_visualisation_id&&(o.visualisation_id=window._Flourish_visualisation_id),window.Flourish&&window.Flourish.app&&window.Flourish.app.loaded_visualisation&&(o.visualisation_id=window.Flourish.app.loaded_visualisation.id),window.Flourish&&window.Flourish.app&&window.Flourish.app.story&&(o.story_id=window.Flourish.app.story.id,o.slide_count=window.Flourish.app.story.slides.length),window.Flourish&&window.Flourish.app&&window.Flourish.app.current_slide&&(o.slide_index=window.Flourish.app.current_slide.index+1),o),r={sender:"Flourish",method:"customerAnalytics"};for(var a in i)i.hasOwnProperty(a)&&(r[a]=i[a]);for(var a in t)t.hasOwnProperty(a)&&(r[a]=t[a]);n.parent.postMessage(JSON.stringify(r),"*")}}function n(e){if("function"!=typeof e)throw new Error("Analytics callback is not a function");window.Flourish._analytics_listeners.push(e)}function o(){e=!0;[{event_name:"click",action_name:"click",use_capture:!0},{event_name:"keydown",action_name:"key_down",use_capture:!0},{event_name:"mouseenter",action_name:"mouse_enter",use_capture:!1},{event_name:"mouseleave",action_name:"mouse_leave",use_capture:!1}].forEach((function(e){document.body.addEventListener(e.event_name,(function(){t({action:e.action_name})}),e.use_capture)}))} +/*! @license DOMPurify 3.1.4 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.4/LICENSE */const{entries:i,setPrototypeOf:r,isFrozen:a,getPrototypeOf:l,getOwnPropertyDescriptor:s}=Object;let{freeze:c,seal:u,create:d}=Object,{apply:p,construct:m}="undefined"!=typeof Reflect&&Reflect;c||(c=function(e){return e}),u||(u=function(e){return e}),p||(p=function(e,t,n){return e.apply(t,n)}),m||(m=function(e,t){return new e(...t)});const f=C(Array.prototype.forEach),h=C(Array.prototype.pop),g=C(Array.prototype.push),y=C(String.prototype.toLowerCase),_=C(String.prototype.toString),w=C(String.prototype.match),v=C(String.prototype.replace),T=C(String.prototype.indexOf),A=C(String.prototype.trim),E=C(Object.prototype.hasOwnProperty),b=C(RegExp.prototype.test),S=(N=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n1?n-1:0),i=1;i2&&void 0!==arguments[2]?arguments[2]:y;r&&r(e,null);let o=t.length;for(;o--;){let i=t[o];if("string"==typeof i){const e=n(i);e!==i&&(a(t)||(t[o]=e),i=e)}e[i]=!0}return e}function L(e){for(let t=0;t/gm),Y=u(/\${[\w\W]*}/gm),$=u(/^data-[\-\w.\u00B7-\uFFFF]/),X=u(/^aria-[\-\w]+$/),J=u(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),V=u(/^(?:\w+script|data):/i),K=u(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Z=u(/^html$/i),Q=u(/^[a-z][.\w]*(-[.\w]+)+$/i);var ee=Object.freeze({__proto__:null,MUSTACHE_EXPR:j,ERB_EXPR:q,TMPLIT_EXPR:Y,DATA_ATTR:$,ARIA_ATTR:X,IS_ALLOWED_URI:J,IS_SCRIPT_OR_DATA:V,ATTR_WHITESPACE:K,DOCTYPE_NAME:Z,CUSTOM_ELEMENT:Q});const te=1,ne=3,oe=7,ie=8,re=9,ae=function(){return"undefined"==typeof window?null:window},le=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const i="dompurify"+(n?"#"+n:"");try{return e.createPolicy(i,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+i+" could not be created."),null}};var se,ce,ue=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ae();const n=t=>e(t);if(n.version="3.1.4",n.removed=[],!t||!t.document||t.document.nodeType!==re)return n.isSupported=!1,n;let{document:o}=t;const r=o,a=r.currentScript,{DocumentFragment:l,HTMLTemplateElement:s,Node:u,Element:p,NodeFilter:m,NamedNodeMap:N=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:C,DOMParser:L,trustedTypes:j}=t,q=p.prototype,Y=k(q,"cloneNode"),$=k(q,"nextSibling"),X=k(q,"childNodes"),V=k(q,"parentNode");if("function"==typeof s){const e=o.createElement("template");e.content&&e.content.ownerDocument&&(o=e.content.ownerDocument)}let K,Q="";const{implementation:se,createNodeIterator:ce,createDocumentFragment:ue,getElementsByTagName:de}=o,{importNode:pe}=r;let me={};n.isSupported="function"==typeof i&&"function"==typeof V&&se&&void 0!==se.createHTMLDocument;const{MUSTACHE_EXPR:fe,ERB_EXPR:he,TMPLIT_EXPR:ge,DATA_ATTR:ye,ARIA_ATTR:_e,IS_SCRIPT_OR_DATA:we,ATTR_WHITESPACE:ve,CUSTOM_ELEMENT:Te}=ee;let{IS_ALLOWED_URI:Ae}=ee,Ee=null;const be=R({},[...F,...D,...M,...U,...H]);let Se=null;const Ne=R({},[...z,...W,...B,...G]);let xe=Object.seal(d(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ce=null,Re=null,Le=!0,Oe=!0,ke=!1,Fe=!0,De=!1,Me=!0,Ie=!1,Ue=!1,Pe=!1,He=!1,ze=!1,We=!1,Be=!0,Ge=!1;const je="user-content-";let qe=!0,Ye=!1,$e={},Xe=null;const Je=R({},["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"]);let Ve=null;const Ke=R({},["audio","video","img","source","image","track"]);let Ze=null;const Qe=R({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),et="http://www.w3.org/1998/Math/MathML",tt="http://www.w3.org/2000/svg",nt="http://www.w3.org/1999/xhtml";let ot=nt,it=!1,rt=null;const at=R({},[et,tt,nt],_);let lt=null;const st=["application/xhtml+xml","text/html"],ct="text/html";let ut=null,dt=null;const pt=255,mt=o.createElement("form"),ft=function(e){return e instanceof RegExp||e instanceof Function},ht=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!dt||dt!==e){if(e&&"object"==typeof e||(e={}),e=O(e),lt=-1===st.indexOf(e.PARSER_MEDIA_TYPE)?ct:e.PARSER_MEDIA_TYPE,ut="application/xhtml+xml"===lt?_:y,Ee=E(e,"ALLOWED_TAGS")?R({},e.ALLOWED_TAGS,ut):be,Se=E(e,"ALLOWED_ATTR")?R({},e.ALLOWED_ATTR,ut):Ne,rt=E(e,"ALLOWED_NAMESPACES")?R({},e.ALLOWED_NAMESPACES,_):at,Ze=E(e,"ADD_URI_SAFE_ATTR")?R(O(Qe),e.ADD_URI_SAFE_ATTR,ut):Qe,Ve=E(e,"ADD_DATA_URI_TAGS")?R(O(Ke),e.ADD_DATA_URI_TAGS,ut):Ke,Xe=E(e,"FORBID_CONTENTS")?R({},e.FORBID_CONTENTS,ut):Je,Ce=E(e,"FORBID_TAGS")?R({},e.FORBID_TAGS,ut):{},Re=E(e,"FORBID_ATTR")?R({},e.FORBID_ATTR,ut):{},$e=!!E(e,"USE_PROFILES")&&e.USE_PROFILES,Le=!1!==e.ALLOW_ARIA_ATTR,Oe=!1!==e.ALLOW_DATA_ATTR,ke=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Fe=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,De=e.SAFE_FOR_TEMPLATES||!1,Me=!1!==e.SAFE_FOR_XML,Ie=e.WHOLE_DOCUMENT||!1,He=e.RETURN_DOM||!1,ze=e.RETURN_DOM_FRAGMENT||!1,We=e.RETURN_TRUSTED_TYPE||!1,Pe=e.FORCE_BODY||!1,Be=!1!==e.SANITIZE_DOM,Ge=e.SANITIZE_NAMED_PROPS||!1,qe=!1!==e.KEEP_CONTENT,Ye=e.IN_PLACE||!1,Ae=e.ALLOWED_URI_REGEXP||J,ot=e.NAMESPACE||nt,xe=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ft(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(xe.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ft(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(xe.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(xe.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),De&&(Oe=!1),ze&&(He=!0),$e&&(Ee=R({},H),Se=[],!0===$e.html&&(R(Ee,F),R(Se,z)),!0===$e.svg&&(R(Ee,D),R(Se,W),R(Se,G)),!0===$e.svgFilters&&(R(Ee,M),R(Se,W),R(Se,G)),!0===$e.mathMl&&(R(Ee,U),R(Se,B),R(Se,G))),e.ADD_TAGS&&(Ee===be&&(Ee=O(Ee)),R(Ee,e.ADD_TAGS,ut)),e.ADD_ATTR&&(Se===Ne&&(Se=O(Se)),R(Se,e.ADD_ATTR,ut)),e.ADD_URI_SAFE_ATTR&&R(Ze,e.ADD_URI_SAFE_ATTR,ut),e.FORBID_CONTENTS&&(Xe===Je&&(Xe=O(Xe)),R(Xe,e.FORBID_CONTENTS,ut)),qe&&(Ee["#text"]=!0),Ie&&R(Ee,["html","head","body"]),Ee.table&&(R(Ee,["tbody"]),delete Ce.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw S('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw S('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');K=e.TRUSTED_TYPES_POLICY,Q=K.createHTML("")}else void 0===K&&(K=le(j,a)),null!==K&&"string"==typeof Q&&(Q=K.createHTML(""));c&&c(e),dt=e}},gt=R({},["mi","mo","mn","ms","mtext"]),yt=R({},["foreignobject","annotation-xml"]),_t=R({},["title","style","font","a","script"]),wt=R({},[...D,...M,...I]),vt=R({},[...U,...P]),Tt=function(e){let t=V(e);t&&t.tagName||(t={namespaceURI:ot,tagName:"template"});const n=y(e.tagName),o=y(t.tagName);return!!rt[e.namespaceURI]&&(e.namespaceURI===tt?t.namespaceURI===nt?"svg"===n:t.namespaceURI===et?"svg"===n&&("annotation-xml"===o||gt[o]):Boolean(wt[n]):e.namespaceURI===et?t.namespaceURI===nt?"math"===n:t.namespaceURI===tt?"math"===n&&yt[o]:Boolean(vt[n]):e.namespaceURI===nt?!(t.namespaceURI===tt&&!yt[o])&&(!(t.namespaceURI===et&&!gt[o])&&(!vt[n]&&(_t[n]||!wt[n]))):!("application/xhtml+xml"!==lt||!rt[e.namespaceURI]))},At=function(e){g(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},Et=function(e,t){try{g(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){g(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!Se[e])if(He||ze)try{At(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},bt=function(e){let t=null,n=null;if(Pe)e=""+e;else{const t=w(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===lt&&ot===nt&&(e=''+e+"");const i=K?K.createHTML(e):e;if(ot===nt)try{t=(new L).parseFromString(i,lt)}catch(e){}if(!t||!t.documentElement){t=se.createDocument(ot,"template",null);try{t.documentElement.innerHTML=it?Q:i}catch(e){}}const r=t.body||t.documentElement;return e&&n&&r.insertBefore(o.createTextNode(n),r.childNodes[0]||null),ot===nt?de.call(t,Ie?"html":"body")[0]:Ie?t.documentElement:r},St=function(e){return ce.call(e.ownerDocument||e,e,m.SHOW_ELEMENT|m.SHOW_COMMENT|m.SHOW_TEXT|m.SHOW_PROCESSING_INSTRUCTION|m.SHOW_CDATA_SECTION,null)},Nt=function(e){return e instanceof C&&(void 0!==e.__depth&&"number"!=typeof e.__depth||void 0!==e.__removalCount&&"number"!=typeof e.__removalCount||"string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof N)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},xt=function(e){return"function"==typeof u&&e instanceof u},Ct=function(e,t,o){me[e]&&f(me[e],(e=>{e.call(n,t,o,dt)}))},Rt=function(e){let t=null;if(Ct("beforeSanitizeElements",e,null),Nt(e))return At(e),!0;const o=ut(e.nodeName);if(Ct("uponSanitizeElement",e,{tagName:o,allowedTags:Ee}),e.hasChildNodes()&&!xt(e.firstElementChild)&&b(/<[/\w]/g,e.innerHTML)&&b(/<[/\w]/g,e.textContent))return At(e),!0;if(e.nodeType===oe)return At(e),!0;if(Me&&e.nodeType===ie&&b(/<[/\w]/g,e.data))return At(e),!0;if(!Ee[o]||Ce[o]){if(!Ce[o]&&Ot(o)){if(xe.tagNameCheck instanceof RegExp&&b(xe.tagNameCheck,o))return!1;if(xe.tagNameCheck instanceof Function&&xe.tagNameCheck(o))return!1}if(qe&&!Xe[o]){const t=V(e)||e.parentNode,n=X(e)||e.childNodes;if(n&&t){for(let o=n.length-1;o>=0;--o){const i=Y(n[o],!0);i.__removalCount=(e.__removalCount||0)+1,t.insertBefore(i,$(e))}}}return At(e),!0}return e instanceof p&&!Tt(e)?(At(e),!0):"noscript"!==o&&"noembed"!==o&&"noframes"!==o||!b(/<\/no(script|embed|frames)/i,e.innerHTML)?(De&&e.nodeType===ne&&(t=e.textContent,f([fe,he,ge],(e=>{t=v(t,e," ")})),e.textContent!==t&&(g(n.removed,{element:e.cloneNode()}),e.textContent=t)),Ct("afterSanitizeElements",e,null),!1):(At(e),!0)},Lt=function(e,t,n){if(Be&&("id"===t||"name"===t)&&(n in o||n in mt||"__depth"===n||"__removalCount"===n))return!1;if(Oe&&!Re[t]&&b(ye,t));else if(Le&&b(_e,t));else if(!Se[t]||Re[t]){if(!(Ot(e)&&(xe.tagNameCheck instanceof RegExp&&b(xe.tagNameCheck,e)||xe.tagNameCheck instanceof Function&&xe.tagNameCheck(e))&&(xe.attributeNameCheck instanceof RegExp&&b(xe.attributeNameCheck,t)||xe.attributeNameCheck instanceof Function&&xe.attributeNameCheck(t))||"is"===t&&xe.allowCustomizedBuiltInElements&&(xe.tagNameCheck instanceof RegExp&&b(xe.tagNameCheck,n)||xe.tagNameCheck instanceof Function&&xe.tagNameCheck(n))))return!1}else if(Ze[t]);else if(b(Ae,v(n,ve,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==T(n,"data:")||!Ve[e]){if(ke&&!b(we,v(n,ve,"")));else if(n)return!1}else;return!0},Ot=function(e){return"annotation-xml"!==e&&w(e,Te)},kt=function(e){Ct("beforeSanitizeAttributes",e,null);const{attributes:t}=e;if(!t)return;const o={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Se};let i=t.length;for(;i--;){const r=t[i],{name:a,namespaceURI:l,value:s}=r,c=ut(a);let u="value"===a?s:A(s);if(o.attrName=c,o.attrValue=u,o.keepAttr=!0,o.forceKeepAttr=void 0,Ct("uponSanitizeAttribute",e,o),u=o.attrValue,o.forceKeepAttr)continue;if(Et(a,e),!o.keepAttr)continue;if(!Fe&&b(/\/>/i,u)){Et(a,e);continue}if(Me&&b(/((--!?|])>)|<\/(style|title)/i,u)){Et(a,e);continue}De&&f([fe,he,ge],(e=>{u=v(u,e," ")}));const d=ut(e.nodeName);if(Lt(d,c,u)){if(!Ge||"id"!==c&&"name"!==c||(Et(a,e),u=je+u),K&&"object"==typeof j&&"function"==typeof j.getAttributeType)if(l);else switch(j.getAttributeType(d,c)){case"TrustedHTML":u=K.createHTML(u);break;case"TrustedScriptURL":u=K.createScriptURL(u)}try{l?e.setAttributeNS(l,a,u):e.setAttribute(a,u),Nt(e)?At(e):h(n.removed)}catch(e){}}}Ct("afterSanitizeAttributes",e,null)},Ft=function e(t){let n=null;const o=St(t);for(Ct("beforeSanitizeShadowDOM",t,null);n=o.nextNode();){if(Ct("uponSanitizeShadowNode",n,null),Rt(n))continue;const t=V(n);n.nodeType===te&&(t&&t.__depth?n.__depth=(n.__removalCount||0)+t.__depth+1:n.__depth=1),(n.__depth>=pt||n.__depth<0||x(n.__depth))&&At(n),n.content instanceof l&&(n.content.__depth=n.__depth,e(n.content)),kt(n)}Ct("afterSanitizeShadowDOM",t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=null,i=null,a=null,s=null;if(it=!e,it&&(e="\x3c!--\x3e"),"string"!=typeof e&&!xt(e)){if("function"!=typeof e.toString)throw S("toString is not a function");if("string"!=typeof(e=e.toString()))throw S("dirty is not a string, aborting")}if(!n.isSupported)return e;if(Ue||ht(t),n.removed=[],"string"==typeof e&&(Ye=!1),Ye){if(e.nodeName){const t=ut(e.nodeName);if(!Ee[t]||Ce[t])throw S("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof u)o=bt("\x3c!----\x3e"),i=o.ownerDocument.importNode(e,!0),i.nodeType===te&&"BODY"===i.nodeName||"HTML"===i.nodeName?o=i:o.appendChild(i);else{if(!He&&!De&&!Ie&&-1===e.indexOf("<"))return K&&We?K.createHTML(e):e;if(o=bt(e),!o)return He?null:We?Q:""}o&&Pe&&At(o.firstChild);const c=St(Ye?e:o);for(;a=c.nextNode();){if(Rt(a))continue;const e=V(a);a.nodeType===te&&(e&&e.__depth?a.__depth=(a.__removalCount||0)+e.__depth+1:a.__depth=1),(a.__depth>=pt||a.__depth<0||x(a.__depth))&&At(a),a.content instanceof l&&(a.content.__depth=a.__depth,Ft(a.content)),kt(a)}if(Ye)return e;if(He){if(ze)for(s=ue.call(o.ownerDocument);o.firstChild;)s.appendChild(o.firstChild);else s=o;return(Se.shadowroot||Se.shadowrootmode)&&(s=pe.call(r,s,!0)),s}let d=Ie?o.outerHTML:o.innerHTML;return Ie&&Ee["!doctype"]&&o.ownerDocument&&o.ownerDocument.doctype&&o.ownerDocument.doctype.name&&b(Z,o.ownerDocument.doctype.name)&&(d="\n"+d),De&&f([fe,he,ge],(e=>{d=v(d,e," ")})),K&&We?K.createHTML(d):d},n.setConfig=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};ht(e),Ue=!0},n.clearConfig=function(){dt=null,Ue=!1},n.isValidAttribute=function(e,t,n){dt||ht({});const o=ut(e),i=ut(t);return Lt(o,i,n)},n.addHook=function(e,t){"function"==typeof t&&(me[e]=me[e]||[],g(me[e],t))},n.removeHook=function(e){if(me[e])return h(me[e])},n.removeHooks=function(e){me[e]&&(me[e]=[])},n.removeAllHooks=function(){me={}},n}();function de(){if(null==se){var e=function(){var e=window.location;"about:srcdoc"==e.href&&(e=window.parent.location);var t={};return function(e,n,o){for(;o=n.exec(e);)t[decodeURIComponent(o[1])]=decodeURIComponent(o[2])}(e.search.substring(1).replace(/\+/g,"%20"),/([^&=]+)=?([^&]*)/g),t}();se="referrer"in e?/^https:\/\/medium.com\//.test(e.referrer):!("auto"in e)}return se}function pe(e){var t=e||window.innerWidth;return t>999?650:t>599?575:400}function me(e){if(e&&window.top!==window.self){var t=window;"srcdoc"==t.location.pathname&&(t=t.parent);var n={sender:"Flourish",method:"scrolly",captions:e.captions};t.parent.postMessage(JSON.stringify(n),"*")}}function fe(e,t){if(window.top!==window.self){var n=window;if("srcdoc"==n.location.pathname&&(n=n.parent),ce)return e=parseInt(e,10),void n.parent.postMessage({sentinel:"amp",type:"embed-size",height:e},"*");var o={sender:"Flourish",context:"iframe.resize",method:"resize",height:e,src:n.location.toString()};if(t)for(var i in t)o[i]=t[i];n.parent.postMessage(JSON.stringify(o),"*")}}function he(){return(-1!==navigator.userAgent.indexOf("Safari")||-1!==navigator.userAgent.indexOf("iPhone"))&&-1==navigator.userAgent.indexOf("Chrome")}function ge(e){return"string"==typeof e||e instanceof String}function ye(e){return"warn"!==e.method?(console.warn("BUG: validateWarnMessage called for method"+e.method),!1):!(null!=e.message&&!ge(e.message))&&!(null!=e.explanation&&!ge(e.explanation))}function _e(e){return"resize"!==e.method?(console.warn("BUG: validateResizeMessage called for method"+e.method),!1):!!ge(e.src)&&(!!ge(e.context)&&!!("number"==typeof(t=e.height)?!isNaN(t)&&t>=0:ge(t)&&/\d/.test(t)&&/^[0-9]*(\.[0-9]*)?(cm|mm|Q|in|pc|pt|px|em|ex|ch|rem|lh|vw|vh|vmin|vmax|%)?$/i.test(t)));var t}function we(e){throw new Error("Validation for setSetting is not implemented yet; see issue #4328")}function ve(e){return"scrolly"!==e.method?(console.warn("BUG: validateScrolly called for method"+e.method),!1):!!Array.isArray(e.captions)}function Te(e){return"customerAnalytics"===e.method||(console.warn("BUG: validateCustomerAnalyticsMessage called for method"+e.method),!1)}function Ae(e){return"request-upload"!==e.method?(console.warn("BUG: validateResizeMessage called for method"+e.method),!1):!!ge(e.name)&&!(null!=e.accept&&!ge(e.accept))}function Ee(e,t,n){var o=function(e){for(var t={warn:ye,resize:_e,setSetting:we,customerAnalytics:Te,"request-upload":Ae,scrolly:ve},n={},o=0;o1)return r;var l=setInterval((function(){window._flourish_poll_items=window._flourish_poll_items.filter((function(e){return!e.iframe.offsetParent||(xe(e.embed_url,e.container,e.iframe,e.width,e.height,e.play_on_load),!1)})),window._flourish_poll_items.length||clearInterval(l)}),500)}return r}function xe(e,t,n,o,i,r){var a;return o&&"number"==typeof o?(a=o,o+="px"):o&&o.match(/^[ \t\r\n\f]*([+-]?\d+|\d*\.\d+(?:[eE][+-]?\d+)?)(?:\\?[Pp]|\\0{0,4}[57]0(?:\r\n|[ \t\r\n\f])?)(?:\\?[Xx]|\\0{0,4}[57]8(?:\r\n|[ \t\r\n\f])?)[ \t\r\n\f]*$/)&&(a=parseFloat(o)),i&&"number"==typeof i&&(i+="px"),o?n.style.width=o:he()?n.style.width=t.offsetWidth+"px":n.style.width="100%",!!i||(e.match(/\?/)?e+="&auto=1":e+="?auto=1",i=pe(a||n.offsetWidth)+"px"),i&&("%"===i.charAt(i.length-1)&&(i=parseFloat(i)/100*t.parentNode.offsetHeight+"px"),n.style.height=i),n.setAttribute("src",e+(r?"#play-on-load":"")),n}function Ce(e){return!Array.isArray(e)&&"object"==typeof e&&null!=e}function Re(e,t){for(var n in t)Ce(e[n])&&Ce(t[n])?Re(e[n],t[n]):e[n]=t[n];return e}!function(){var e,i=window.top===window.self,r=i?null:(ce="#amp=1"==window.location.hash,{createEmbedIframe:Ne,isFixedHeight:de,getHeightForBreakpoint:pe,startEventListeners:Ee,notifyParentWindow:fe,initScrolly:me,createScrolly:Se,isSafari:he,initCustomerAnalytics:o,addAnalyticsListener:n,sendCustomerAnalyticsMessage:t}),a=!0;function l(){var t;Flourish.fixed_height||(null!=e?t=e:a&&(t=r.getHeightForBreakpoint()),t!==window.innerHeight&&r.notifyParentWindow(t))}function s(){-1!==window.location.search.indexOf("enable_customer_analytics=1")&&Flourish.enableCustomerAnalytics(),l(),window.addEventListener("resize",l)}Flourish.warn=function(e){if("string"==typeof e&&(e={message:e}),i||"editor"!==Flourish.environment)console.warn(e.message);else{var t={sender:"Flourish",method:"warn",message:e.message,explanation:e.explanation};window.parent.postMessage(JSON.stringify(t),"*")}},Flourish.uploadImage=function(e){if(i||"story_editor"!==Flourish.environment)throw"Invalid upload request";var t={sender:"Flourish",method:"request-upload",name:e.name,accept:e.accept};window.parent.postMessage(JSON.stringify(t),"*")},Flourish.setSetting=function(e,t){if("editor"===Flourish.environment||"sdk"===Flourish.environment){var n={sender:"Flourish",method:"setSetting",name:e,value:t};window.parent.postMessage(JSON.stringify(n),"*")}else if("story_editor"===Flourish.environment){var o={};o[e]=t,Re(window.template.state,function(e){var t={};for(var n in e){for(var o=t,i=n.indexOf("."),r=0;i>=0;i=n.indexOf(".",r=i+1)){var a=n.substring(r,i);a in o||(o[a]={}),o=o[a]}o[n.substring(r)]=e[n]}return t}(o))}},Flourish.setHeight=function(t){Flourish.fixed_height||(e=t,a=null==t,l())},Flourish.checkHeight=function(){if(!i){var e=Flourish.__container_height;null!=e?(Flourish.fixed_height=!0,r.notifyParentWindow(e)):r.isFixedHeight()?Flourish.fixed_height=!0:(Flourish.fixed_height=!1,l())}},Flourish.fixed_height=i||r.isFixedHeight(),Flourish.enableCustomerAnalytics=function(){r&&r.initCustomerAnalytics()},"loading"===document.readyState?document.addEventListener("DOMContentLoaded",s):s()}()}(); //# sourceMappingURL=embedded.js.map diff --git a/site/images/icon-add-folder.svg b/site/images/icon-add-folder.svg new file mode 100644 index 0000000..823c9f1 --- /dev/null +++ b/site/images/icon-add-folder.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/site/images/icon-all-projects.svg b/site/images/icon-all-projects.svg new file mode 100644 index 0000000..475bb42 --- /dev/null +++ b/site/images/icon-all-projects.svg @@ -0,0 +1,3 @@ + + + diff --git a/site/images/icon-folder.svg b/site/images/icon-folder.svg new file mode 100644 index 0000000..b52d795 --- /dev/null +++ b/site/images/icon-folder.svg @@ -0,0 +1,3 @@ + + + diff --git a/site/images/icon-search.svg b/site/images/icon-search.svg new file mode 100644 index 0000000..2cbbe0a --- /dev/null +++ b/site/images/icon-search.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/site/images/icon-shared-projects.svg b/site/images/icon-shared-projects.svg new file mode 100644 index 0000000..4d4dbe9 --- /dev/null +++ b/site/images/icon-shared-projects.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/site/images/onboarding-tour-story-duplicate-slide.png b/site/images/onboarding-tour-story-duplicate-slide.png new file mode 100644 index 0000000..178fef3 Binary files /dev/null and b/site/images/onboarding-tour-story-duplicate-slide.png differ diff --git a/site/images/onboarding-tour-white-story.gif b/site/images/onboarding-tour-white-story.gif new file mode 100644 index 0000000..8a2c378 Binary files /dev/null and b/site/images/onboarding-tour-white-story.gif differ diff --git a/site/images/story-onboarding-tour-legend.gif b/site/images/story-onboarding-tour-legend.gif new file mode 100644 index 0000000..9fa6183 Binary files /dev/null and b/site/images/story-onboarding-tour-legend.gif differ diff --git a/site/script.js b/site/script.js index adacae1..cfa53d0 100644 --- a/site/script.js +++ b/site/script.js @@ -1,3 +1,4 @@ -var Flourish=function(t){"use strict";function e(t){return parseInt(t).toString()===""+t&&t>=0}function n(t,e,n){return t.map((function(t){var r={};return Object.keys(e).forEach((function(n){r[n]=t[e[n]]})),Object.keys(n).forEach((function(e){var i=n[e];Array.isArray(i)||(i=[i]),r[e]=i.map((function(e){return t[e]}))})),r}))}function r(t,e,r){var i=n(t,e=e||{},r=r||{});return i.column_names={},Object.keys(e).forEach((function(t){i.column_names[t]=e[t]})),Object.keys(r).forEach((function(t){var e=r[t];i.column_names[t]=Array.isArray(e)?e:[e]})),i}function i(t,r,i){!function(t,n){var r;if(!Object.keys(t).every((function(n){return e(t[n])})))throw r="All column_bindings values should be non-negative integers",new TypeError(r);if(!Object.keys(n).every((function(t){var r=n[t];return Array.isArray(r)?r.every(e):e(r)})))throw r="All columns_bindings values should be non-negative integers or arrays thereof",new TypeError(r)}(r=r||{},i=i||{});var o=t[0],a=n(t.slice(1),r,i);return a.column_names={},Object.keys(r).forEach((function(t){a.column_names[t]=o[r[t]]})),Object.keys(i).forEach((function(t){var e=i[t];a.column_names[t]=(Array.isArray(e)?e:[e]).map((function(t){return o[t]}))})),a}function o(t,e,n){return(Array.isArray(t[0])?i:r)(t,e,n)}var a="http://www.w3.org/1999/xhtml",s={svg:"http://www.w3.org/2000/svg",xhtml:a,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function l(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),s.hasOwnProperty(e)?{space:s[e],local:t}:t}function u(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===a&&e.documentElement.namespaceURI===a?e.createElement(t):e.createElementNS(n,t)}}function c(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function d(t){var e=l(t);return(e.local?c:u)(e)}function p(){}function f(t){return null==t?p:function(){return this.querySelector(t)}}function h(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function m(){return[]}function g(t){return null==t?m:function(){return this.querySelectorAll(t)}}function v(t){return function(){return this.matches(t)}}function y(t){return function(e){return e.matches(t)}}var b=Array.prototype.find;function _(){return this.firstElementChild}var w=Array.prototype.filter;function x(){return this.children}function C(t){return new Array(t.length)}function A(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function k(t){return function(){return t}}function E(t,e,n,r,i,o){for(var a,s=0,l=e.length,u=o.length;se?1:t>=e?0:NaN}function F(t){return function(){this.removeAttribute(t)}}function S(t){return function(){this.removeAttributeNS(t.space,t.local)}}function M(t,e){return function(){this.setAttribute(t,e)}}function N(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function U(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function O(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function B(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function H(t){return function(){this.style.removeProperty(t)}}function R(t,e,n){return function(){this.style.setProperty(t,e,n)}}function j(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function I(t,e){return t.style.getPropertyValue(e)||B(t).getComputedStyle(t,null).getPropertyValue(e)}function z(t){return function(){delete this[t]}}function P(t,e){return function(){this[t]=e}}function $(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function q(t){return t.trim().split(/^|\s+/)}function V(t){return t.classList||new Y(t)}function Y(t){this._node=t,this._names=q(t.getAttribute("class")||"")}function W(t,e){for(var n=V(t),r=-1,i=e.length;++r=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function dt(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,o=e.length;r=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var gt,vt,yt,bt,_t,wt=[null];function xt(t,e){this._groups=t,this._parents=e}function Ct(){return new xt([[document.documentElement]],wt)}function At(t){return"string"==typeof t?new xt([[document.querySelector(t)]],[document.documentElement]):new xt([[t]],wt)}function kt(t){return At(d(t).call(document.documentElement))}function Et(t){return"string"==typeof t?new xt([document.querySelectorAll(t)],[document.documentElement]):new xt([null==t?[]:h(t)],wt)}function Tt(){if(!yt)return null;var t=yt.nodes()[1].value;if("custom"===bt&&""!=t){var e=parseInt(t,10);return isNaN(e)?null:e}return null}function Lt(){_t&&_t.preview_pane&&_t.preview_pane.setFixedHeight&&_t.preview_pane.setFixedHeight(Tt())}function Dt(t,e=!1){bt=t,Lt(),"custom"===t?(At("#editor-custom-inputs").style("opacity",1),At(".preview-holder").style("width",yt.nodes()[0].value+"px").select("iframe").style("width",yt.nodes()[0].value+"px")):(At("#editor-custom-inputs").style("opacity",0),At(".preview-holder").attr("style",null).select("iframe").style("width",null)),e||At(".preview-holder").style("max-width","none"),Et("#preview-menu .preview-mode").classed("selected",(function(){return this.id=="editor-"+t})),At("#editor-rotate").classed("active",(function(){return"auto"!==t})),At(".row.editor").classed("mobile",(function(){return"mobile"==t})),At(".row.editor").classed("tablet",(function(){return"tablet"==t})),At(".preview-holder").on("webkitTransitionEnd transitionend oTransitionEnd MSTransitionEnd transitionend",St),gt=t}function Ft(t){return _t=t,yt=Et("#editor-custom-inputs input"),St(),Et("#preview-menu .preview-mode").on("click",(function(){Dt(this.getAttribute("data-target"))})),yt.on("change",(function(){Dt(this.getAttribute("data-target"))})),Dt("auto",!0),function(){var t,e,n=document.querySelector("#resize-handle"),r=document.querySelector(".preview-holder");function i(i){"editor-custom"!==i.target.parentElement.id&&(t=r.getBoundingClientRect().width,n.parentElement.parentElement.querySelector("#resize-overlay").classList.add("dragging"),n.parentElement.classList.add("dragging"),e=i.clientX,At(".preview-holder").style("transition","none"),Dt("custom"),document.addEventListener("mousemove",o),document.addEventListener("mouseup",a),i.preventDefault())}function o(n){var i=n.clientX-e,o=t+2*i;r.style.width=o+"px",r.querySelector("iframe").style.width=o-4+"px",St(),_t.preview_pane.resize()}function a(){t=r.getBoundingClientRect().width,At(".preview-holder").style("transition",null),n.parentElement.parentElement.querySelector("#resize-overlay").classList.remove("dragging"),n.parentElement.classList.remove("dragging"),St(),_t.preview_pane.resize(),document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",a)}n.addEventListener("mousedown",i)} -/*! @license DOMPurify | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.2.2/LICENSE */(),window.innerWidth<=768&&(vt="auto"),window.addEventListener("resize",(function(){gt&&St(),window.innerWidth<=768?vt||(vt=gt,Dt("auto")):vt&&(Dt(vt),vt=null),_t.preview_pane.resize()})),{getHeightSetting:Tt}}function St(){var t=At(".preview-holder").node().getBoundingClientRect();yt.nodes()[0].value=Math.round(t.width),""!==yt.nodes()[1].value&&"custom"===bt&&(yt.nodes()[1].value=Math.round(t.height))}xt.prototype=Ct.prototype={constructor:xt,select:function(t){"function"!=typeof t&&(t=f(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i=x&&(x=w+1);!(_=v[x])&&++x=0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=D);for(var n=this._groups,r=n.length,i=new Array(r),o=0;o1?this.each((null==e?H:"function"==typeof e?j:R)(t,e,null==n?"":n)):I(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?z:"function"==typeof e?$:P)(t,e)):this.node()[t]},classed:function(t,e){var n=q(t+"");if(arguments.length<2){for(var r=V(this.node()),i=-1,o=n.length;++i1?n-1:0),i=1;i/gm),ve=Rt(/^data-[\-\w.\u00B7-\uFFFF]/),ye=Rt(/^aria-[\-\w]+$/),be=Rt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),_e=Rt(/^(?:\w+script|data):/i),we=Rt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),xe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function Ce(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e0&&void 0!==arguments[0]?arguments[0]:Ae(),n=function(e){return t(e)};if(n.version="2.2.8",n.removed=[],!e||!e.document||9!==e.document.nodeType)return n.isSupported=!1,n;var r=e.document,i=e.document,o=e.DocumentFragment,a=e.HTMLTemplateElement,s=e.Node,l=e.Element,u=e.NodeFilter,c=e.NamedNodeMap,d=void 0===c?e.NamedNodeMap||e.MozNamedAttrMap:c,p=e.Text,f=e.Comment,h=e.DOMParser,m=e.trustedTypes,g=l.prototype,v=re(g,"cloneNode"),y=re(g,"nextSibling"),b=re(g,"childNodes"),_=re(g,"parentNode");if("function"==typeof a){var w=i.createElement("template");w.content&&w.content.ownerDocument&&(i=w.content.ownerDocument)}var x=ke(m,r),C=x&&tt?x.createHTML(""):"",A=i,k=A.implementation,E=A.createNodeIterator,T=A.createDocumentFragment,L=r.importNode,D={};try{D=ne(i).documentMode?i.documentMode:{}}catch(t){}var F={};n.isSupported="function"==typeof _&&k&&void 0!==k.createHTMLDocument&&9!==D;var S=me,M=ge,N=ve,U=ye,O=_e,B=we,H=be,R=null,j=ee({},[].concat(Ce(ie),Ce(oe),Ce(ae),Ce(le),Ce(ce))),I=null,z=ee({},[].concat(Ce(de),Ce(pe),Ce(fe),Ce(he))),P=null,$=null,q=!0,V=!0,Y=!1,W=!1,G=!1,Z=!1,X=!1,J=!1,K=!1,Q=!0,tt=!1,et=!0,nt=!0,rt=!1,it={},ot=ee({},["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"]),at=null,st=ee({},["audio","video","img","source","image","track"]),lt=null,ut=ee({},["alt","class","for","id","label","name","pattern","placeholder","summary","title","value","style","xmlns"]),ct="http://www.w3.org/1998/Math/MathML",dt="http://www.w3.org/2000/svg",pt="http://www.w3.org/1999/xhtml",ft=pt,ht=null,mt=i.createElement("form"),gt=function(t){ht&&ht===t||(t&&"object"===(void 0===t?"undefined":xe(t))||(t={}),t=ne(t),R="ALLOWED_TAGS"in t?ee({},t.ALLOWED_TAGS):j,I="ALLOWED_ATTR"in t?ee({},t.ALLOWED_ATTR):z,lt="ADD_URI_SAFE_ATTR"in t?ee(ne(ut),t.ADD_URI_SAFE_ATTR):ut,at="ADD_DATA_URI_TAGS"in t?ee(ne(st),t.ADD_DATA_URI_TAGS):st,P="FORBID_TAGS"in t?ee({},t.FORBID_TAGS):{},$="FORBID_ATTR"in t?ee({},t.FORBID_ATTR):{},it="USE_PROFILES"in t&&t.USE_PROFILES,q=!1!==t.ALLOW_ARIA_ATTR,V=!1!==t.ALLOW_DATA_ATTR,Y=t.ALLOW_UNKNOWN_PROTOCOLS||!1,W=t.SAFE_FOR_TEMPLATES||!1,G=t.WHOLE_DOCUMENT||!1,J=t.RETURN_DOM||!1,K=t.RETURN_DOM_FRAGMENT||!1,Q=!1!==t.RETURN_DOM_IMPORT,tt=t.RETURN_TRUSTED_TYPE||!1,X=t.FORCE_BODY||!1,et=!1!==t.SANITIZE_DOM,nt=!1!==t.KEEP_CONTENT,rt=t.IN_PLACE||!1,H=t.ALLOWED_URI_REGEXP||H,ft=t.NAMESPACE||ft,W&&(V=!1),K&&(J=!0),it&&(R=ee({},[].concat(Ce(ce))),I=[],!0===it.html&&(ee(R,ie),ee(I,de)),!0===it.svg&&(ee(R,oe),ee(I,pe),ee(I,he)),!0===it.svgFilters&&(ee(R,ae),ee(I,pe),ee(I,he)),!0===it.mathMl&&(ee(R,le),ee(I,fe),ee(I,he))),t.ADD_TAGS&&(R===j&&(R=ne(R)),ee(R,t.ADD_TAGS)),t.ADD_ATTR&&(I===z&&(I=ne(I)),ee(I,t.ADD_ATTR)),t.ADD_URI_SAFE_ATTR&&ee(lt,t.ADD_URI_SAFE_ATTR),nt&&(R["#text"]=!0),G&&ee(R,["html","head","body"]),R.table&&(ee(R,["tbody"]),delete P.tbody),Ht&&Ht(t),ht=t)},vt=ee({},["mi","mo","mn","ms","mtext"]),yt=ee({},["foreignobject","desc","title","annotation-xml"]),bt=ee({},oe);ee(bt,ae),ee(bt,se);var _t=ee({},le);ee(_t,ue);var wt=function(t){var e=_(t);e&&e.tagName||(e={namespaceURI:pt,tagName:"template"});var n=Wt(t.tagName),r=Wt(e.tagName);if(t.namespaceURI===dt)return e.namespaceURI===pt?"svg"===n:e.namespaceURI===ct?"svg"===n&&("annotation-xml"===r||vt[r]):Boolean(bt[n]);if(t.namespaceURI===ct)return e.namespaceURI===pt?"math"===n:e.namespaceURI===dt?"math"===n&&yt[r]:Boolean(_t[n]);if(t.namespaceURI===pt){if(e.namespaceURI===dt&&!yt[r])return!1;if(e.namespaceURI===ct&&!vt[r])return!1;var i=ee({},["title","style","font","a","script"]);return!_t[n]&&(i[n]||!bt[n])}return!1},xt=function(t){Yt(n.removed,{element:t});try{t.parentNode.removeChild(t)}catch(e){try{t.outerHTML=C}catch(e){t.remove()}}},Ct=function(t,e){try{Yt(n.removed,{attribute:e.getAttributeNode(t),from:e})}catch(t){Yt(n.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t&&!I[t])if(J||K)try{xt(e)}catch(t){}else try{e.setAttribute(t,"")}catch(t){}},At=function(t){var e=void 0,n=void 0;if(X)t=""+t;else{var r=Gt(t,/^[\r\n\t ]+/);n=r&&r[0]}var o=x?x.createHTML(t):t;if(ft===pt)try{e=(new h).parseFromString(o,"text/html")}catch(t){}e&&e.documentElement||((e=k.createDocument(ft,"template",null)).documentElement.innerHTML=o);var a=e.body||e.documentElement;return t&&n&&a.insertBefore(i.createTextNode(n),a.childNodes[0]||null),G?e.documentElement:a},kt=function(t){return E.call(t.ownerDocument||t,t,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT,(function(){return u.FILTER_ACCEPT}),!1)},Et=function(t){return!(t instanceof p||t instanceof f)&&!("string"==typeof t.nodeName&&"string"==typeof t.textContent&&"function"==typeof t.removeChild&&t.attributes instanceof d&&"function"==typeof t.removeAttribute&&"function"==typeof t.setAttribute&&"string"==typeof t.namespaceURI&&"function"==typeof t.insertBefore)},Tt=function(t){return"object"===(void 0===s?"undefined":xe(s))?t instanceof s:t&&"object"===(void 0===t?"undefined":xe(t))&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName},Lt=function(t,e,r){F[t]&&qt(F[t],(function(t){t.call(n,e,r,ht)}))},Dt=function(t){var e=void 0;if(Lt("beforeSanitizeElements",t,null),Et(t))return xt(t),!0;if(Gt(t.nodeName,/[\u0080-\uFFFF]/))return xt(t),!0;var r=Wt(t.nodeName);if(Lt("uponSanitizeElement",t,{tagName:r,allowedTags:R}),!Tt(t.firstElementChild)&&(!Tt(t.content)||!Tt(t.content.firstElementChild))&&Kt(/<[/\w]/g,t.innerHTML)&&Kt(/<[/\w]/g,t.textContent))return xt(t),!0;if(!R[r]||P[r]){if(nt&&!ot[r]){var i=_(t)||t.parentNode,o=b(t)||t.childNodes;if(o&&i)for(var a=o.length-1;a>=0;--a)i.insertBefore(v(o[a],!0),y(t))}return xt(t),!0}return t instanceof l&&!wt(t)?(xt(t),!0):"noscript"!==r&&"noembed"!==r||!Kt(/<\/no(script|embed)/i,t.innerHTML)?(W&&3===t.nodeType&&(e=t.textContent,e=Zt(e,S," "),e=Zt(e,M," "),t.textContent!==e&&(Yt(n.removed,{element:t.cloneNode()}),t.textContent=e)),Lt("afterSanitizeElements",t,null),!1):(xt(t),!0)},Ft=function(t,e,n){if(et&&("id"===e||"name"===e)&&(n in i||n in mt))return!1;if(V&&Kt(N,e));else if(q&&Kt(U,e));else{if(!I[e]||$[e])return!1;if(lt[e]);else if(Kt(H,Zt(n,B,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==Xt(n,"data:")||!at[t]){if(Y&&!Kt(O,Zt(n,B,"")));else if(n)return!1}else;}return!0},St=function(t){var e=void 0,r=void 0,i=void 0,o=void 0;Lt("beforeSanitizeAttributes",t,null);var a=t.attributes;if(a){var s={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:I};for(o=a.length;o--;){var l=e=a[o],u=l.name,c=l.namespaceURI;if(r=Jt(e.value),i=Wt(u),s.attrName=i,s.attrValue=r,s.keepAttr=!0,s.forceKeepAttr=void 0,Lt("uponSanitizeAttribute",t,s),r=s.attrValue,!s.forceKeepAttr&&(Ct(u,t),s.keepAttr))if(Kt(/\/>/i,r))Ct(u,t);else{W&&(r=Zt(r,S," "),r=Zt(r,M," "));var d=t.nodeName.toLowerCase();if(Ft(d,i,r))try{c?t.setAttributeNS(c,u,r):t.setAttribute(u,r),Vt(n.removed)}catch(t){}}}Lt("afterSanitizeAttributes",t,null)}},Mt=function t(e){var n=void 0,r=kt(e);for(Lt("beforeSanitizeShadowDOM",e,null);n=r.nextNode();)Lt("uponSanitizeShadowNode",n,null),Dt(n)||(n.content instanceof o&&t(n.content),St(n));Lt("afterSanitizeShadowDOM",e,null)};return n.sanitize=function(t,i){var a=void 0,l=void 0,u=void 0,c=void 0,d=void 0;if(t||(t="\x3c!--\x3e"),"string"!=typeof t&&!Tt(t)){if("function"!=typeof t.toString)throw Qt("toString is not a function");if("string"!=typeof(t=t.toString()))throw Qt("dirty is not a string, aborting")}if(!n.isSupported){if("object"===xe(e.toStaticHTML)||"function"==typeof e.toStaticHTML){if("string"==typeof t)return e.toStaticHTML(t);if(Tt(t))return e.toStaticHTML(t.outerHTML)}return t}if(Z||gt(i),n.removed=[],"string"==typeof t&&(rt=!1),rt);else if(t instanceof s)1===(l=(a=At("\x3c!----\x3e")).ownerDocument.importNode(t,!0)).nodeType&&"BODY"===l.nodeName||"HTML"===l.nodeName?a=l:a.appendChild(l);else{if(!J&&!W&&!G&&-1===t.indexOf("<"))return x&&tt?x.createHTML(t):t;if(!(a=At(t)))return J?null:C}a&&X&&xt(a.firstChild);for(var p=kt(rt?t:a);u=p.nextNode();)3===u.nodeType&&u===c||Dt(u)||(u.content instanceof o&&Mt(u.content),St(u),c=u);if(c=null,rt)return t;if(J){if(K)for(d=T.call(a.ownerDocument);a.firstChild;)d.appendChild(a.firstChild);else d=a;return Q&&(d=L.call(r,d,!0)),d}var f=G?a.outerHTML:a.innerHTML;return W&&(f=Zt(f,S," "),f=Zt(f,M," ")),x&&tt?x.createHTML(f):f},n.setConfig=function(t){gt(t),Z=!0},n.clearConfig=function(){ht=null,Z=!1},n.isValidAttribute=function(t,e,n){ht||gt({});var r=Wt(t),i=Wt(e);return Ft(r,i,n)},n.addHook=function(t,e){"function"==typeof e&&(F[t]=F[t]||[],Yt(F[t],e))},n.removeHook=function(t){F[t]&&Vt(F[t])},n.removeHooks=function(t){F[t]&&(F[t]=[])},n.removeAllHooks=function(){F={}},n}(),De=25,Fe=10,Se=10,Me={};function Ne(t,e,n,r,i,o,a){var s=n-t/2-Se,l=n+t/2+Se,u=t/2+Math.min(0,s-i.left)+Math.max(0,l-i.right);return{pos:[u,a],shape:u-Fe<5?[-u,-15*o,Math.max(Fe,5-u),-10*o]:u+Fe>t-5?[Math.min(-10,t-u-5),-10*o,Math.min(Fe,t-u),-15*o]:[-10,-10*o,Fe,-10*o]}}function Ue(t,e,n,r,i,o,a){var s=r-e/2-Se,l=r+e/2+Se,u=e/2+Math.min(0,s-i.top)+Math.max(0,l-i.bottom);return{pos:[a,u],shape:u-Fe<5?[-15*o,-u,-10*o,Math.max(Fe,5-u)]:u+Fe>e-5?[-10*o,Math.min(-10,e-u-5),-15*o,Math.min(Fe,e-u)]:[-10*o,-10,-10*o,Fe]}}function Oe(t,e,n,r,i,o){var a=Me[t](e,n,r,i,o),s=r-De-a.pos[0],l=i-De-a.pos[1];return{left:s,top:l,right:s+e+50,bottom:l+n+50}}function Be(t,e,n){var r,i=document.createElementNS("http://www.w3.org/2000/svg",t);if(e)for(r in e)i.setAttribute(r,e[r]);var o=i.style;if(n)for(r in n)o[r]=n[r];return i}function He(){return Ee||((Ee=document.createElement("div")).id="flourish-popup-constrainer",(Te=Ee.style).overflow="hidden",Te.pointerEvents="none",Te.position="absolute",Te.left="0",Te.top="0",Te.margin="0",Te.padding="0",document.body.appendChild(Ee),this._resizeConstrainer(),Ee)}Me.bottom=function(t,e){return{shape:[-10,-10,Fe,-10],pos:[t/2,e+Se]}},Me.top=function(t,e){return{shape:[-10,Se,Fe,Se],pos:[t/2,-10]}},Me.left=function(t,e){return{shape:[Se,Fe,Se,-10],pos:[-10,e/2]}},Me.right=function(t,e){return{shape:[-10,Fe,-10,-10],pos:[t+Se,e/2]}},Me.topLeft=function(t,e){return{shape:[15,Se,Se,15],pos:[-10,-10]}},Me.bottomLeft=function(t,e){return{shape:[15,-10,Se,-15],pos:[-10,e+Se]}},Me.topRight=function(t,e){return{shape:[-15,Se,-10,15],pos:[t+Se,-10]}},Me.bottomRight=function(t,e){return{shape:[-15,-10,-10,-15],pos:[t+Se,e+Se]}},Me.bottomFlexible=function(t,e,n,r,i){return Ne(t,0,n,0,i,1,e+Se)},Me.topFlexible=function(t,e,n,r,i){return Ne(t,0,n,0,i,-1,-10)},Me.rightFlexible=function(t,e,n,r,i){return Ue(0,e,0,r,i,1,t+Se)},Me.leftFlexible=function(t,e,n,r,i){return Ue(0,e,0,r,i,-1,-10)};var Re,je=1,Ie={container:document.body,maxWidth:"70%",point:null,html:null,directions:["bottom","top","left","right","topLeft","bottomLeft","topRight","bottomRight","bottomFlexible","topFlexible","leftFlexible","rightFlexible"],fallbackFit:"horizontal"};function ze(){for(var t in this.unique_id=je++,this.is_visible=!0,Ie)this["_"+t]=Ie[t];this.handlers={click:[]}}function Pe(t){ze.prototype[t]=function(e){return void 0===e?this["_"+t]:(this["_"+t]=e,this)}}for(var $e in Ie)Pe($e);function qe(){return new ze}function Ve(){Re=qe().container(document.body),function(t){t.each((function(){var t=At(this);if(t.attr("data-popup-allow-interaction")&&!t.select(".popup-content-wrapper").size()){var e=t.append("span").attr("class","popup-content-wrapper").style("display","none").append("span").attr("class","popup-content-outer");e.append("span").attr("class","popup-content-inner"),e.append("span").attr("class","popup-content-arrow")}At(this).on("mouseenter focus",(function(t){Ye.call(this,t,!0)})).on("mouseover",Ye).on("mouseout focusout",We)}))}(Et(".popup"))}function Ye(t,e){if(this.getAttribute("data-popup-head")||this.getAttribute("data-popup-body")){var n=this.getAttribute("data-popup-allow-interaction"),r=this.getAttribute("data-popup-position"),i=this.getBoundingClientRect(),o=i.left+i.width/2,a=i.top+i.height,s=this.getAttribute("data-popup-head")||null,l=this.getAttribute("data-popup-body")||null,u="";if(s&&(u+=kt("span").classed("popup-content-header",!0).html(Le.sanitize(s)).node().outerHTML),l&&(u+=kt("span").classed("popup-content-body",!0).html(Le.sanitize(l)).node().outerHTML),n){r&&["top","bottom"].includes(r)||(r="top");At(this).select(".popup-content-outer").style("display","inline-block"),At(this).select(".popup-content-inner").style("display","inline-block"),At(this).select(".popup-content-wrapper").style("display","block").style("bottom","top"==r?i.height-4+"px":null).style("top","bottom"==r?i.height-4+"px":null),e&&At(this).select(".popup-content-inner").html(u);var c=this.getAttribute("data-popup-constrainer")||"body",d=At(c).size()?At(c).node().getBoundingClientRect():document.body,p=At(this).select(".popup-content-inner").node().getBoundingClientRect().width,f=o,h=-p/2,m=f+p/2-(d.right-15),g=d.left+15-(f-p/2);m>0?h-=m:g>0&&(h+=g),At(this).select(".popup-content-wrapper").style("left",i.width/2+h+"px");At(this).select(".popup-content-arrow").style("left",-5+Math.abs(h)+"px")}else{var v=["top","topFlexible"];r&&("left"===r?(v=["right","rightFlexible"],o=i.left,a=i.top+i.height/2):"right"===r?(v=["left","leftFlexible"],o=i.right,a=i.top+i.height/2):"top"===r?(v=["bottom","bottomFlexible"],o=i.left+i.width/2,a=i.top):"bottom"===r&&(v=["top","topFlexible"],o=i.left+i.width/2,a=i.top+i.height)),Re.point(o,a).html(u).directions(v).draw()}}}function We(t){document.activeElement===this||this.contains(t.relatedTarget)||(this.getAttribute("data-popup-allow-interaction")&&At(this).select(".popup-content-wrapper").style("display","none"),Re.hide())}ze.prototype.point=function(t,e){if(void 0===t)return this._point;if(Array.isArray(t))this._point=[t[0],t[1]];else if(void 0!==e)this._point=[t,e];else if(t instanceof HTMLElement||t instanceof SVGElement){var n=t.getBoundingClientRect();this._point=[Math.floor(n.left+n.width/2),Math.floor(n.top+n.height/2)]}else console.error("Popup: could not understand argument");return this},ze.prototype.directions=function(t){return void 0===t?this._directions:("string"==typeof t&&(t=[t]),this._directions=t.slice(),this)},ze.prototype.text=function(t){return this._html=function(t){return t.replace(/[&<>]/g,(function(t){return{"&":"&","<":"<",">":">"}[t]}))}(t),this},ze.prototype.on=function(t,e){if(!(t in this.handlers))throw new Error("Popup.on: No such event: "+t);return this.handlers[t].push(e),this},ze.prototype.fire=function(t,e){if(!(t in this.handlers))throw new Error("Popup.fire: No such event: "+t);for(var n=this.handlers[t],r=0;ri.right&&(n=i.right),ri.bottom&&(r=i.bottom);var o=n-e.left,a=r-e.top,s=t._getElement(),l=s.style,u=s.querySelector(".flourish-popup-svg"),c=u.querySelector("g"),d=c.querySelector("rect"),p=c.querySelector("path"),f=s.querySelector(".flourish-popup-content");l.display="block",f.style.maxWidth=function(e){return t._maxWidth.match(/^\d+(?:\.\d+)?%$/)?e.width*parseFloat(t._maxWidth)/100:t._maxWidth.match(/^\d+(?:\.\d+)?(?:px)?$/)?parseFloat(t._maxWidth):(null!=t._maxWidth&&console.error("Popup: Unknown value for maxWidth: "+t._maxWidth),e.width)}(i)+"px",t._inner_html!=t._html&&(f.innerHTML=t._inner_html=t._html);var h,m,g=f.getBoundingClientRect();do{h=Math.ceil(g.width),m=Math.ceil(g.height),l.width=h+50+"px",l.height=m+50+"px",g=f.getBoundingClientRect()}while(h!=Math.ceil(g.width)||m!=Math.ceil(g.height));d.setAttribute("width",h),d.setAttribute("height",m),u.setAttribute("width",h+50),u.setAttribute("height",m+50);for(var v,y,b=null,_=null,w=null,x=1/0,C=1/0,A=0;AGe&&console.warn("Column index out of range"),Math.min(n-1,Ge)}function Je(t){t+=1;for(var e="";t>0;){var n=Math.floor(t/26),r=t%26;0==r&&(n-=1,r+=26),e=String.fromCharCode(64+r)+e,t=n}return e}function Ke(t){var e=t.match(/\s*(?:[-–—:]|\.\.)\s*/);if(!e)throw new Error("Failed to parse column range: "+t);var n=t.substr(0,e.index),r=t.substr(e.index+e[0].length),i=Xe(n),o=Xe(r),a=[],s=o>=i?1:-1,l=Math.abs(o-i)+1;l>Ze&&(console.warn("Truncating excessively long range"),l=Ze);for(var u=0;u0))return s;do{s.push(a=new Date(+n)),e(n,o),t(n)}while(a=e)for(;t(e),!n(e);)e.setTime(e-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););}))},n&&(i.count=function(e,r){return rn.setTime(+e),on.setTime(+r),t(rn),t(on),Math.floor(n(rn,on))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(e){return r(e)%t==0}:function(e){return i.count(0,e)%t==0}):i:null}),i}var sn=864e5,ln=6048e5,un=an((function(t){t.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/sn}),(function(t){return t.getDate()-1})),cn=un;function dn(t){return an((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/ln}))}un.range;var pn=dn(0),fn=dn(1),hn=dn(2),mn=dn(3),gn=dn(4),vn=dn(5),yn=dn(6);pn.range,fn.range,hn.range,mn.range,gn.range,vn.range,yn.range;var bn=an((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));bn.every=function(t){return isFinite(t=Math.floor(t))&&t>0?an((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,n){e.setFullYear(e.getFullYear()+n*t)})):null};var _n=bn;bn.range;var wn=an((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/sn}),(function(t){return t.getUTCDate()-1})),xn=wn;function Cn(t){return an((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/ln}))}wn.range;var An=Cn(0),kn=Cn(1),En=Cn(2),Tn=Cn(3),Ln=Cn(4),Dn=Cn(5),Fn=Cn(6);An.range,kn.range,En.range,Tn.range,Ln.range,Dn.range,Fn.range;var Sn=an((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()}));Sn.every=function(t){return isFinite(t=Math.floor(t))&&t>0?an((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null};var Mn=Sn;function Nn(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Un(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function On(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}Sn.range;var Bn,Hn,Rn,jn={"-":"",_:" ",0:"0"},In=/^\s*\d+/,zn=/^%/,Pn=/[\\^$*+?|[\]().{}]/g;function $n(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o68?1900:2e3),n+r[0].length):-1}function tr(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function er(t,e,n){var r=In.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function nr(t,e,n){var r=In.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function rr(t,e,n){var r=In.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function ir(t,e,n){var r=In.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function or(t,e,n){var r=In.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function ar(t,e,n){var r=In.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function sr(t,e,n){var r=In.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function lr(t,e,n){var r=In.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function ur(t,e,n){var r=In.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function cr(t,e,n){var r=zn.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function dr(t,e,n){var r=In.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function pr(t,e,n){var r=In.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function fr(t,e){return $n(t.getDate(),e,2)}function hr(t,e){return $n(t.getHours(),e,2)}function mr(t,e){return $n(t.getHours()%12||12,e,2)}function gr(t,e){return $n(1+cn.count(_n(t),t),e,3)}function vr(t,e){return $n(t.getMilliseconds(),e,3)}function yr(t,e){return vr(t,e)+"000"}function br(t,e){return $n(t.getMonth()+1,e,2)}function _r(t,e){return $n(t.getMinutes(),e,2)}function wr(t,e){return $n(t.getSeconds(),e,2)}function xr(t){var e=t.getDay();return 0===e?7:e}function Cr(t,e){return $n(pn.count(_n(t)-1,t),e,2)}function Ar(t){var e=t.getDay();return e>=4||0===e?gn(t):gn.ceil(t)}function kr(t,e){return t=Ar(t),$n(gn.count(_n(t),t)+(4===_n(t).getDay()),e,2)}function Er(t){return t.getDay()}function Tr(t,e){return $n(fn.count(_n(t)-1,t),e,2)}function Lr(t,e){return $n(t.getFullYear()%100,e,2)}function Dr(t,e){return $n((t=Ar(t)).getFullYear()%100,e,2)}function Fr(t,e){return $n(t.getFullYear()%1e4,e,4)}function Sr(t,e){var n=t.getDay();return $n((t=n>=4||0===n?gn(t):gn.ceil(t)).getFullYear()%1e4,e,4)}function Mr(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+$n(e/60|0,"0",2)+$n(e%60,"0",2)}function Nr(t,e){return $n(t.getUTCDate(),e,2)}function Ur(t,e){return $n(t.getUTCHours(),e,2)}function Or(t,e){return $n(t.getUTCHours()%12||12,e,2)}function Br(t,e){return $n(1+xn.count(Mn(t),t),e,3)}function Hr(t,e){return $n(t.getUTCMilliseconds(),e,3)}function Rr(t,e){return Hr(t,e)+"000"}function jr(t,e){return $n(t.getUTCMonth()+1,e,2)}function Ir(t,e){return $n(t.getUTCMinutes(),e,2)}function zr(t,e){return $n(t.getUTCSeconds(),e,2)}function Pr(t){var e=t.getUTCDay();return 0===e?7:e}function $r(t,e){return $n(An.count(Mn(t)-1,t),e,2)}function qr(t){var e=t.getUTCDay();return e>=4||0===e?Ln(t):Ln.ceil(t)}function Vr(t,e){return t=qr(t),$n(Ln.count(Mn(t),t)+(4===Mn(t).getUTCDay()),e,2)}function Yr(t){return t.getUTCDay()}function Wr(t,e){return $n(kn.count(Mn(t)-1,t),e,2)}function Gr(t,e){return $n(t.getUTCFullYear()%100,e,2)}function Zr(t,e){return $n((t=qr(t)).getUTCFullYear()%100,e,2)}function Xr(t,e){return $n(t.getUTCFullYear()%1e4,e,4)}function Jr(t,e){var n=t.getUTCDay();return $n((t=n>=4||0===n?Ln(t):Ln.ceil(t)).getUTCFullYear()%1e4,e,4)}function Kr(){return"+0000"}function Qr(){return"%"}function ti(t){return+t}function ei(t){return Math.floor(+t/1e3)}function ni(t){throw new TypeError("Expected a value of type string but got a value of type "+typeof t)}function ri(t){return function(e){return"string"!=typeof e&&ni(e),(e=e.trim())?t(e):null}}Bn=function(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,o=t.days,a=t.shortDays,s=t.months,l=t.shortMonths,u=Vn(i),c=Yn(i),d=Vn(o),p=Yn(o),f=Vn(a),h=Yn(a),m=Vn(s),g=Yn(s),v=Vn(l),y=Yn(l),b={a:function(t){return a[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return l[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:null,d:fr,e:fr,f:yr,g:Dr,G:Sr,H:hr,I:mr,j:gr,L:vr,m:br,M:_r,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:ti,s:ei,S:wr,u:xr,U:Cr,V:kr,w:Er,W:Tr,x:null,X:null,y:Lr,Y:Fr,Z:Mr,"%":Qr},_={a:function(t){return a[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return l[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:Nr,e:Nr,f:Rr,g:Zr,G:Jr,H:Ur,I:Or,j:Br,L:Hr,m:jr,M:Ir,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:ti,s:ei,S:zr,u:Pr,U:$r,V:Vr,w:Yr,W:Wr,x:null,X:null,y:Gr,Y:Xr,Z:Kr,"%":Qr},w={a:function(t,e,n){var r=f.exec(e.slice(n));return r?(t.w=h[r[0].toLowerCase()],n+r[0].length):-1},A:function(t,e,n){var r=d.exec(e.slice(n));return r?(t.w=p[r[0].toLowerCase()],n+r[0].length):-1},b:function(t,e,n){var r=v.exec(e.slice(n));return r?(t.m=y[r[0].toLowerCase()],n+r[0].length):-1},B:function(t,e,n){var r=m.exec(e.slice(n));return r?(t.m=g[r[0].toLowerCase()],n+r[0].length):-1},c:function(t,n,r){return A(t,e,n,r)},d:rr,e:rr,f:ur,g:Qn,G:Kn,H:or,I:or,j:ir,L:lr,m:nr,M:ar,p:function(t,e,n){var r=u.exec(e.slice(n));return r?(t.p=c[r[0].toLowerCase()],n+r[0].length):-1},q:er,Q:dr,s:pr,S:sr,u:Gn,U:Zn,V:Xn,w:Wn,W:Jn,x:function(t,e,r){return A(t,n,e,r)},X:function(t,e,n){return A(t,r,e,n)},y:Qn,Y:Kn,Z:tr,"%":cr};function x(t,e){return function(n){var r,i,o,a=[],s=-1,l=0,u=t.length;for(n instanceof Date||(n=new Date(+n));++s53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=Un(On(o.y,0,1))).getUTCDay(),r=i>4||0===i?kn.ceil(r):kn(r),r=xn.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=Nn(On(o.y,0,1))).getDay(),r=i>4||0===i?fn.ceil(r):fn(r),r=cn.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?Un(On(o.y,0,1)).getUTCDay():Nn(On(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,Un(o)):Nn(o)}}function A(t,e,n,r){for(var i,o,a=0,s=e.length,l=n.length;a=l)return-1;if(37===(i=e.charCodeAt(a++))){if(i=e.charAt(a++),!(o=w[i in jn?e.charAt(a++):i])||(r=o(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return b.x=x(n,b),b.X=x(r,b),b.c=x(e,b),_.x=x(n,_),_.X=x(r,_),_.c=x(e,_),{format:function(t){var e=x(t+="",b);return e.toString=function(){return t},e},parse:function(t){var e=C(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=x(t+="",_);return e.toString=function(){return t},e},utcParse:function(t){var e=C(t+="",!0);return e.toString=function(){return t},e}}}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),Bn.format,Bn.parse,Hn=Bn.utcFormat,Rn=Bn.utcParse;var ii=new Date(1972,3,27,19,45,5),oi={"%b %d":[{regex:/^june\s(30|[12][0-9]|0?[1-9])$/i,toDate:function(t){return new Date(null,5,t.split(/\s/)[1])}},{regex:/^july\s(3[01]|[12][0-9]|0?[1-9])$/i,toDate:function(t){return new Date(null,6,t.split(/\s/)[1])}},{regex:/^sept\s(30|[12][0-9]|0?[1-9])$/i,toDate:function(t){return new Date(null,8,t.split(/\s/)[1])}}],"%d %b":[{regex:/^(0?[1-9]|[1-9][0-9])\sjune$/i,toDate:function(t){return new Date(null,5,t.split(/\s/)[0])}},{regex:/^(0?[1-9]|[1-9][0-9])\sjuly$/i,toDate:function(t){return new Date(null,6,t.split(/\s/)[0])}},{regex:/^(0?[1-9]|[1-9][0-9])\ssept$/i,toDate:function(t){return new Date(null,8,t.split(/\s/)[0])}}]};function ai(t){return function(e){var n=null;return t.forEach((function(t){e.match(t.regex)&&(n=t.toDate(e))})),n}}function si(t,e){var n,r=Rn(t),i=Hn(t);return n=ri("function"==typeof e?function(t){return e(t,null!==r(t))}:function(t){return null!==r(t)}),Object.freeze({test:n,parse:ri((function(e){return r(e)||(oi[t]?ai(oi[t])(e):null)})),format:function(t){return i(t)},type:"datetime",description:t,id:"datetime$"+t,example:i(ii)})}var li=Object.freeze([si("%Y-%m-%dT%H:%M:%S.%LZ"),si("%Y-%m-%d %H:%M:%S"),si("%Y-%m-%dT%H:%M:%S"),si("%Y-%m-%dT%H:%M:%SZ"),si("%d/%m/%Y",(function(t,e){if(!e)return!1;var n=t.split("/").map(parseFloat);return n[0]>0&&n[0]<=31&&n[1]>0&&n[1]<=12&&n[2]>=1e3})),si("%d/%m/%Y %H:%M",(function(t,e){if(!e)return!1;var n=t.split(/[/ :]/).map(parseFloat);return n[0]>0&&n[0]<=31&&n[1]>0&&n[1]<=12&&n[2]>=1e3&&n[3]>=0&&n[3]<24&&n[4]>=0&&n[4]<60})),si("%d/%m/%y",(function(t,e){if(!e)return!1;var n=t.split("/").map(parseFloat);return n[0]>0&&n[0]<=31&&n[1]>0&&n[1]<=12&&!isNaN(n[2])})),si("%m/%d/%Y",(function(t,e){if(!e)return!1;var n=t.split("/").map(parseFloat);return n[0]>0&&n[0]<=12&&n[1]>0&&n[1]<=31&&n[2]>=1e3})),si("%m/%d/%Y %H:%M",(function(t,e){if(!e)return!1;var n=t.split(/[/ :]/).map(parseFloat);return n[0]>0&&n[0]<=12&&n[1]>0&&n[1]<=31&&n[2]>=1e3&&n[3]>=0&&n[3]<24&&n[4]>=0&&n[4]<60})),si("%m/%d/%y",(function(t,e){if(!e)return!1;var n=t.split("/").map(parseFloat);return n[0]>0&&n[0]<=12&&n[1]>0&&n[1]<=31&&!isNaN(n[2])})),si("%Y/%m/%d",(function(t,e){if(!e)return!1;var n=t.split("/").map(parseFloat);return n[0]>=1e3&&n[1]>0&&n[1]<=12&&n[2]>0&&n[2]<=31})),si("%d-%m-%Y",(function(t,e){if(!e)return!1;var n=t.split("-").map(parseFloat);return n[0]>0&&n[0]<=31&&n[1]>0&&n[1]<=12&&n[2]>=1e3})),si("%d-%m-%y",(function(t,e){if(!e)return!1;var n=t.split("-").map(parseFloat);return n[0]>0&&n[0]<=31&&n[1]>0&&n[1]<=12&&!isNaN(n[2])})),si("%d.%m.%Y",(function(t,e){if(!e)return!1;var n=t.split(".").map(parseFloat);return n[0]>0&&n[0]<=31&&n[1]>0&&n[1]<=12&&n[2]>=1e3})),si("%m.%d.%y",(function(t,e){if(!e)return!1;var n=t.split(".").map(parseFloat);return n[0]>0&&n[0]<=12&&n[1]>0&&n[1]<=31&&!isNaN(n[2])})),si("%m-%d-%Y",(function(t,e){if(!e)return!1;var n=t.split("-").map(parseFloat);return n[0]>0&&n[0]<=12&&n[1]>0&&n[1]<=31&&n[2]>=1e3})),si("%m-%d-%y",(function(t,e){if(!e)return!1;var n=t.split("-").map(parseFloat);return n[0]>0&&n[0]<=12&&n[1]>0&&n[1]<=31&&!isNaN(n[2])})),si("%Y-%m-%d",(function(t,e){if(!e)return!1;var n=t.split("-").map(parseFloat);return n[0]>=1e3&&n[1]>0&&n[1]<=12&&n[2]>0&&n[2]<=31})),si("%Y-%m",(function(t,e){if(!e)return!1;var n=t.split("-").map(parseFloat);return n[0]>=1e3&&n[1]>0&&n[1]<=12})),si("%d %b %Y",(function(t,e){if(!e)return!1;var n=t.split(" ").map(parseFloat);return n[0]>0&&n[0]<=31&&n[2]>=1e3})),si("%d %B %Y",(function(t,e){if(!e)return!1;var n=t.split(" ").map(parseFloat);return n[0]>0&&n[0]<=31&&n[2]>=1e3})),si("%d %b %y"),si("%-d %b ’%y"),si("%d %B %y"),si("%d-%b-%Y",(function(t,e){if(!e)return!1;var n=t.split("-").map(parseFloat);return n[0]>0&&n[0]<=31&&n[2]>=1e3})),si("%d-%B-%Y",(function(t,e){if(!e)return!1;var n=t.split("-").map(parseFloat);return n[0]>0&&n[0]<=31&&n[2]>=1e3})),si("%d-%b-%y"),si("%d-%B-%y"),si("%m/%Y",(function(t,e){if(!e)return!1;var n=t.split("/").map(parseFloat);return n[0]>0&&n[0]<=12&&n[1]>=1e3})),si("%m/%y"),si("%b %Y",(function(t,e){return!!e&&t.split(" ").map(parseFloat)[1]>=1e3})),si("%B %Y",(function(t,e){return!!e&&t.split(" ").map(parseFloat)[1]>=1e3})),si("%b-%y"),si("%b %y"),si("%B %y"),si("%b '%y"),si("%B %-d %Y"),si("%d %b",(function(t,e){return!!e||!!ai(oi["%d %b"])(t)})),si("%d %B"),si("%b %d",(function(t,e){return!!e||!!ai(oi["%b %d"])(t)})),si("%B %d"),si("%d-%m",(function(t,e){if(!e)return!1;var n=t.split("-").map(parseFloat);return n[0]>0&&n[0]<=31&&n[1]>0&&n[1]<=12})),si("%m-%d"),si("%d/%m"),si("%m/%d"),si("%b %d %Y"),si("%b %d %Y, %-I.%M%p"),si("%Y",(function(t,e){if(!e)return!1;var n=parseFloat(t);return n>1499&&n<2200})),si("%B"),si("%b"),si("%X"),si("%I:%M %p"),si("%-I.%M%p"),si("%H:%M",(function(t,e){if(!e)return!1;var n=t.split(":").map(parseFloat);return n[0]>=0&&n[0]<24})),si("%H:%M:%S"),si("%M:%S"),si("%-I%p"),si("Q%q %Y",(function(t,e){return!!e&&6===t.replace(/\s/g,"").length})),si("%Y Q%q",(function(t,e){return!!e&&6===t.replace(/\s/g,"").length}))]);function ui(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}var ci,di=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function pi(t){if(!(e=di.exec(t)))throw new Error("invalid format: "+t);var e;return new fi({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function fi(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function hi(t,e){var n=ui(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}pi.prototype=fi.prototype,fi.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var mi={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return hi(100*t,e)},r:hi,s:function(t,e){var n=ui(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(ci=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+ui(t,Math.max(0,e+o-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function gi(t){return t}var vi=Array.prototype.map,yi=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function bi(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?gi:(e=vi.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,o=[],a=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(t.substring(i-=s,i+s)),!((l+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(n)}),i=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",a=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?gi:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(vi.call(t.numerals,String)),l=void 0===t.percent?"%":t.percent+"",u=void 0===t.minus?"-":t.minus+"",c=void 0===t.nan?"NaN":t.nan+"";function d(t){var e=(t=pi(t)).fill,n=t.align,d=t.sign,p=t.symbol,f=t.zero,h=t.width,m=t.comma,g=t.precision,v=t.trim,y=t.type;"n"===y?(m=!0,y="g"):mi[y]||(void 0===g&&(g=12),v=!0,y="g"),(f||"0"===e&&"="===n)&&(f=!0,e="0",n="=");var b="$"===p?i:"#"===p&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",_="$"===p?o:/[%p]/.test(y)?l:"",w=mi[y],x=/[defgprs%]/.test(y);function C(t){var i,o,l,p=b,C=_;if("c"===y)C=w(t)+C,t="";else{var A=(t=+t)<0||1/t<0;if(t=isNaN(t)?c:w(Math.abs(t),g),v&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),A&&0==+t&&"+"!==d&&(A=!1),p=(A?"("===d?d:u:"-"===d||"("===d?"":d)+p,C=("s"===y?yi[8+ci/3]:"")+C+(A&&"("===d?")":""),x)for(i=-1,o=t.length;++i(l=t.charCodeAt(i))||l>57){C=(46===l?a+t.slice(i+1):t.slice(i))+C,t=t.slice(0,i);break}}m&&!f&&(t=r(t,1/0));var k=p.length+t.length+C.length,E=k>1)+p+t+C+E.slice(k);break;default:t=E+p+t+C}return s(t)}return g=void 0===g?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),C.toString=function(){return t+""},C}return{format:d,formatPrefix:function(t,e){var n,r=d(((t=pi(t)).type="f",t)),i=3*Math.max(-8,Math.min(8,Math.floor((n=e,((n=ui(Math.abs(n)))?n[1]:NaN)/3)))),o=Math.pow(10,-i),a=yi[8+i/3];return function(t){return r(o*t)+a}}}}var _i={test:ri((function(t){return/^(\+|-)?\d{1,3}(,\d{3})*(\.\d+)?((e|E)(\+|-)?\d+)?$/.test(t.trim())})),parse:ri((function(t){return parseFloat(t.replace(/,/g,""))})),description:"Comma thousand separator, point decimal mark",thousand_separator:",",decimal_mark:".",id:"number$comma_point",example:"12,235.56"},wi={test:ri((function(t){return/^(\+|-)?\d{1,3}(\s\d{3})*(\.\d+)?((e|E)(\+|-)?\d+)?$/.test(t.trim())})),parse:ri((function(t){return parseFloat(t.replace(/\s/g,""))})),description:"Space thousand separator, point decimal mark",thousand_separator:" ",decimal_mark:".",id:"number$space_point",example:"12 235.56"},xi={test:ri((function(t){return/^(\+|-)?\d+(\.\d+)?((e|E)(\+|-)?\d+)?$/.test(t.trim())})),parse:ri((function(t){return parseFloat(t)})),description:"No thousand separator, point decimal mark",thousand_separator:"",decimal_mark:".",id:"number$none_point",example:"12235.56"},Ci={test:ri((function(t){return/^(\+|-)?\d{1,3}(\.\d{3})*(,\d+)?((e|E)(\+|-)?\d+)?$/.test(t.trim())})),parse:ri((function(t){return parseFloat(t.replace(/\./g,"").replace(/,/,"."))})),description:"Point thousand separator, comma decimal mark",thousand_separator:".",decimal_mark:",",id:"number$point_comma",example:"12.235,56"},Ai={test:ri((function(t){return/^(\+|-)?\d{1,3}(\s\d{3})*(,\d+)?((e|E)(\+|-)?\d+)?$/.test(t.trim())})),parse:ri((function(t){return parseFloat(t.replace(/\s/g,"").replace(/,/,"."))})),description:"Space thousand separator, comma decimal mark",thousand_separator:" ",decimal_mark:",",id:"number$space_comma",example:"12 235,56"},ki={test:ri((function(t){return/^(\+|-)?\d+(,\d+)?((e|E)(\+|-)?\d+)?$/.test(t.trim())})),parse:ri((function(t){return parseFloat(t.replace(/,/,"."))})),description:"No thousand separator, comma decimal mark",thousand_separator:"",decimal_mark:",",id:"number$none_comma",example:"12235,56"},Ei=Object.freeze([_i,wi,Ci,Ai,xi,ki]);Ei.forEach((function(t){t.type="number",t.format=function(t){var e,n,r=bi({decimal:t.decimal_mark,thousands:t.thousand_separator,grouping:[3],currency:["",""]});return function(t,i){return null===t?"":(i||(i=",.2f"),i!==n&&(n=i,e=r.format(n)),e(t))}}(t),Object.freeze(t)}));var Ti,Li=Object.freeze({test:function(t){return"string"==typeof t||ni(t)},parse:function(t){return"string"==typeof t?t:ni(t)},format:function(t){if("string"==typeof t)return t},type:"string",description:"Arbitrary string",id:"string$arbitrary_string"}),Di=Object.freeze({datetime:li,number:Ei}),Fi=Object.freeze(["datetime","number","string"]),Si=Object.freeze({n_max:250,n_failing_values:0,failure_fraction:.05,sort:!0}),Mi=Object.freeze(Object.keys(Si));function Ni(t,e){return t.index-e.index}function Ui(t,e){return e.n_success-t.n_success||Ni(t,e)}function Oi(t){return(""+t).trim()}function Bi(t){return void 0===t?function(t){return Oi(t)}:"function"==typeof t?function(e,n){return Oi(t(e,n))}:function(e){return Oi(e[""+t])}}function Hi(t){t?Array.isArray(t)||(t=[t]):t=Fi;var e=t.reduce((function(t,e){var n=Di[e];return n&&Array.prototype.push.apply(t,n),t}),[]),n=-1!==t.indexOf("string"),r=Mi.reduce((function(t,e){return t[e]=Si[e],t}),{}),i=function(t,i){i=Bi(i);var o=t.map(i).filter((function(t){return t}));if(!o.length)return n?[Li]:[];var a=Math.min(r.n_max,o.length),s=Math.floor(a*r.failure_fraction),l=r.n_failing_values,u=r.sort?Ui:Ni,c=e.slice().reduce((function(t,e,n){for(var r=c=0,i=[],u=!1,c=0;cs?u=!0:-1===i.indexOf(d)&&(i.push(d),i.length>l&&(u=!0)),u))break}return u||t.push({interp:e,n_success:a-r,index:n}),t}),[]).sort(u).map((function(t){return t.interp}));return n&&c.push(Li),c};return Mi.forEach((function(t){var e;i[(e=t,e.replace(/_(\w)/g,(function(t,e){return e.toUpperCase()})))]=function(e){return void 0===e?r[t]:(r[t]=e,i)}})),i}function Ri(t,e,n,r){var i=[],o=[],a=0,s=[],l={};function u(t,e){if(!l[t])return{};var n=l[t];return n[e]?n[e]:{}}for(var c in s.column_names={},s.metadata={},n){var d={},p=n[c];if(p){for(let t=0;t=C.length||("columns"in h&&null!=h.columns?w[h.key]=h.columns.filter((function(t){return t=C[_+1].length?w[h.key]=b(h,h.column,""):w[h.key]=b(h,h.column,C[_+1][h.column])))}s.push(w)}return s}function ji(t){return function(t){for(var e=t.length,n=e>0?t[0].length:0,r=[],i=0;i100?t.slice(10,e-10):e>50?t.slice(5,e-5):e>30?t.slice(4,e-4):e>20?t.slice(3,e-3):e>10?t.slice(2,e-2):e>1?t.slice(1,e):t.slice(0,1)}(t);let r;r=n.length>2e3?function(t,e){if(t.length<=2*e)return t;const n=function(t){let e=t;return function(){e|=0,e=e+1831565813|0;var t=Math.imul(e^e>>>15,1|e);return(((t=t+Math.imul(t^t>>>7,61|t)^t)^t>>>14)>>>0)/4294967296}}(t.length);for(;t.length>e;){const e=Math.floor(n()*t.length);t.splice(e,1)}return t}(n,1e3):n;const i=(o=r,a=o.filter((function(t){return t&&!zi.includes(t.trim())})).map($i),Pi(a))[0].id;var o,a;return{type_id:i,index:e,output_format_id:i}}))}function Ii(t){for(var e=t.length;e-- >1&&(!t[e]||!t[e].length||Array.isArray(t[e])&&-1==t[e].findIndex((function(t){return null!==t&&""!==t})));)t.splice(e,1);return t}Hi.DATETIME_IDS=Object.freeze(li.map((function(t){return t.id}))),Hi.NUMBER_IDS=Object.freeze(Ei.map((function(t){return t.id}))),Hi.STRING_IDS=Object.freeze([Li.id]),Hi.getInterpretation=(Ti=li.concat(Ei,Li).reduce((function(t,e){return t[e.id]=e,t}),{}),function(t){return Ti[t]}),Hi._createAccessorFunction=Bi,Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function(t){if(null==this)throw new TypeError("this is null or not defined");var e=Object(this),n=e.length>>>0;if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var r=arguments[1],i=0;i{const e=At(".dialog");if(t.which in Vi){var n=Vi[t.which];n.callback&&n.callback(qi.node().value),e.remove(),t.preventDefault()}};function Wi(t,e,{buttons:n=[{text:"Okay",keyCode:13}],is_html:r=!1,upgrade:i=null,is_loading:o=!1,width:a="420px",on_close:s=null}={}){var l=At("body").append("div").attr("class","dialog").attr("tabindex",0).on("mousedown",(function(t){for(var e=t.target,n=!1;e&&"dialog"!=e.className;)"dialog"==(e=e.parentNode).className&&(n=!0);n||(s&&s(),l.remove())})),u=l.append("div").attr("class","dialog-inner").style("width",a).on("click",(function(t){t.stopPropagation()})),c=u.append("div").attr("class","text"+(o?" loading":""));if("string"==typeof t?c.append("h1").text(t):t instanceof HTMLElement&&c.append("h1").append((()=>t)),"string"==typeof e)qi=r?c.append("div").classed("loading-spinner",o).html(e):c.append("p").text(e);else if(e instanceof HTMLElement)qi=c.append((()=>e));else if("object"==typeof e){if(qi=c.append(e.type),e.value&&(qi.node().value=e.value),e.attributes)for(var d in e.attributes)qi.attr(d,e.attributes[d]);qi.node().focus()}var p=u;null!=i&&"object"==typeof i&&function(t,e,n,r){r&&t.classed("business",!0);var i=t.append("div").attr("class","text");i.append("p").text(e),i.append("ul").selectAll("li").data(n).enter().append("li").html((function(t){return t})).append("i").attr("class","fa fa-check")}(p=p.append("div").attr("class","upgrade"),i.message,i.list,i.is_business);var f=p.append("div").attr("class","btns"+(o?" loading":""));return Vi={},n.forEach((function(t){var e=f.append(t.tag_name||"div").attr("class","btn").attr("data-testid","dialog-button").style("margin-right",o?"0":"0.75em").text(t.text).on("click",(function(){t.callback&&t.callback(qi.node().value,l),l.remove()}));t.class&&e.classed(t.class,!0),t.keyCode&&(Vi[t.keyCode]=t),t.href&&e.attr("href",t.href),t.target&&e.attr("target",t.target),t.fa_icon&&e.append("i").lower().attr("class","fa "+t.fa_icon)})),l.node().addEventListener("keydown",Yi),l.node().focus(),l}const Gi={allow_other_option:!1,match_anywhere:!1,custom_renderer:null,autocomplete:!0};function Zi({input:t,id:e,options:n=[],mode:r="single",options_config:i={}}){if(t&&e){this.input=t,this.id=e,this.mode=["single","multi"].includes(r)?r:"single",this.options=(Array.isArray(n)?n:[n]).map(Ji),this.selected_options=[],this.options_config={...Gi,...i},this.options_config.allow_other_option&&"multi"===this.mode&&(console.warn("Warning for dropdown "+e+": it's not possible to allow other options in multi mode."),this.options_config.allow_other_option=!1),this.options_config.autocomplete&&"multi"===this.mode&&(console.warn("Warning for dropdown "+e+": autocomplete will be disabled in multi mode."),this.options_config.autocomplete=!1),this.autocomplete=this.initAutocomplete(),this.changeCallback=function(){};var o=this;this.input.type="text",this.input.classList.add("multi"==r?"multi-select":"single-select"),this.input.addEventListener("change",(function(t){o.changeCallback.call(o.input,o.getValue(),t)})),this.setOptions(n),this.options_config.autocomplete||(this.input.setAttribute("readonly",!0),this.input.style.cursor="pointer")}else console.error("Can't initialize a dropdown without input or id")}function Xi(t){var e=t.options.filter((e=>t.selected_options.includes(e[1])));return t.selected_options.length&&!e.length&&t.options_config.allow_other_option&&(e=[[t.selected_options[0],t.selected_options[0]]]),e}function Ji(t){return Array.isArray(t)?t.map(String):[String(t),String(t)]}Zi.prototype.setSelectedOptions=function(t){this.selected_options=Array.isArray(t)?t:[t],this.updateInput()},Zi.prototype.setOptions=function(t){this.options=t.map(Ji),this.autocomplete.renderOptions()},Zi.prototype.select=function(t){"multi"==this.mode?this.selected_options.push(t):this.selected_options=[t],this.updateInput()},Zi.prototype.deselect=function(t){if("single"!=this.mode){var e=this.selected_options.indexOf(t);e>-1&&this.selected_options.splice(e,1),this.updateInput()}},Zi.prototype.getValue=function(t){var e=Xi(this).map((t=>t[1]));return"multi"===this.mode?t?e.join(", "):e:e[0]},Zi.prototype.getOptions=function(){return this.options},Zi.prototype.getDisplayValue=function(){return Xi(this).map((t=>t[0])).join(", ")},Zi.prototype.updateInput=function(){this.input.value=this.getDisplayValue(),this.input.setAttribute("data-value",this.getValue(!0))},Zi.prototype.isSelected=function(t){return this.selected_options.includes(t)},Zi.prototype.onChange=function(t){this.changeCallback=t};Zi.prototype.initAutocomplete=function(){var t=this,e=this.options_config,n=this.input;if(n.setAttribute("data-autocomplete",this.id),n.setAttribute("autocomplete","off"),!document.getElementById(this.id)){const t=kt("i").classed("fa fa-chevron-down clickable",!0),e=kt("div").classed("dropdown autocomplete",!0).attr("id",this.id);n.insertAdjacentHTML("afterend",t.node().outerHTML+e.node().outerHTML)}var r=[],i=At(document.getElementById(this.id));i.classed("click-to-open",!0);var o=i.append("div").attr("class","dropdown-list");function a(t){if(1===t.length)return"dropdown-category";var e="dropdown-item";return r.length&&r.includes(t[1])&&(e+=" current"),e}function s(n){var r=n||t.options;o.selectAll("div").remove(),o.selectAll("div").data(r).enter().append("div").attr("class",a).attr("data-value",(function(t){return"string"==typeof t?t||null:t[1]})).each((function(t){const n=At(this);if(!e.custom_renderer){const e=Array.isArray(t)?t[0]:t;return void n.text(e)}let r=e.custom_renderer(t,this);if(r){if(Array.isArray(r)||(r=[r]),r.find((t=>"string"!=typeof t&&!(t instanceof HTMLElement))))throw new Error("Autocomplete elements must be strings or HTMLElements");n.node().append(...r)}})),r.length||o.append("div").attr("class","dropdown-item disabled").text("No matches found")}function l(){i.classed("open",!1)}function u(e,r){if(r.hasAttribute("data-value")){var i=r.getAttribute("data-value");At(r).classed("current")&&"multi"===t.mode?t.deselect(i):t.select(i),l(),At(n).dispatch("change")}else e.preventDefault()}return i.on("mousedown",(function(t){u(t,t.target)})),At(n).on("keydown.autocomplete",(function(t){var e,r;9==t.keyCode||13==t.keyCode?(e=o.select(".selected")).empty()||(u(t,e.node()),n.blur()):40==t.keyCode?((e=o.select(".selected")).empty()||(r=e.node().nextSibling),r||(r=o.select(".dropdown-item[data-value]").node()),o.selectAll(".selected").classed("selected",!1),At(r).classed("selected",!0)):38==t.keyCode&&((e=o.select(".selected")).empty()||(r=e.node().previousSibling),r||(r=o.select(".dropdown-item:last-child").node()),o.selectAll(".selected").classed("selected",!1),At(r).classed("selected",!0))})).on("input.autocomplete",(function(){var r,i,o=n.value,a=o.toLowerCase(),l=!1,u=t.options;if(At(n).attr("data-value",o),i=e.match_anywhere?(t,e)=>t.includes(e):(t,e)=>0===t.indexOf(e),o){r=[];for(var c=0;c0?At(".sheet-tab.selected").datum().id:null;to.html("");var l=null;"string"!=typeof e[0]&&(e=["Data"].concat(e));for(var u,c=[],d=0;d Auto set columns").on("click",(function(){Wi("Automatically choose your columns"," Flourish will interpret your data to determine which columns to visualize",{is_html:!0,buttons:[{text:"Continue",keyCode:13,class:"primary",callback:function(){Qi.spreadsheet.inferDataBindings()}},{text:"Cancel",keyCode:27,class:"secondary"}]})}))}Qi.spreadsheet&&(Qi.spreadsheet.updateHighlights(),Qi.spreadsheet.updateTabs())}))}function so(t,e,n,r,i){no[oo]||(oo=0),t.attr("class","settings-option option-type-"+e.type).style("display",i?"none":null);var o=null==n?"":nn(n,r,!1,e.optional);ro[e.dataset]||(ro[e.dataset]={}),ro[e.dataset][e.key]=oo;var a="column"===e.type&&!e.optional,s=a&&!n;t.classed("empty-required-binding",s);var l=t.append("div").attr("class","data-binding-title").on("click",(function(){At(this).select("input").node().focus()}));l.append("h3").text(e.name).append("i").attr("class","fa fa-question setting-tooltip").style("display",e.description||e.data_type?null:"none"),"column"!=e.type||e.optional||l.select("h3").append("span").attr("class","required").text("Required"),l.append("input").attr("id","data-binding-"+e.dataset+"-"+e.key).attr("name",e.dataset+"-"+e.key).attr("disabled",!Qi.visualisation.can_edit||null).attr("autocomplete","off").attr("title",'Type in column IDs here, for example "A" or "A,B,D" or "A-D"').each((function(){this.value=o})).attr("data-value",o).attr("type","text").call(function(t){return function(e){e.on("change",(function(){Re.hide(),function(t,e){var n=t.parentElement.parentElement.parentElement.getAttribute("data-sheet"),r=t.value.indexOf("::")>-1,i={type:e.type};"column"==i.type?i.column=r?t.value:n+"::"+t.value:i.columns=r?t.value:n+"::"+t.value;var o,a=t.getBoundingClientRect(),s=[a.left-5,a.top+.5*a.height];if(t.value||"column"!=i.type){try{o=function(t,e){var n={};if(!(t.type in t)){if(t.optional)return n;throw new Error("Data binding must specify '"+t.type+"': "+JSON.stringify(t))}var r=t[t.type].indexOf("::");if(-1==r)throw new Error("Invalid data binding: "+t[t.type]);var i=t[t.type].substr(0,r);n.data_table_id=e[i];var o=t[t.type].substr(r+2);if("column"==t.type)n.column=Xe(o,t.optional);else{if("columns"!=t.type)throw new Error("Unknown data binding type: "+t.type);n.columns=tn(o)}return n}(i,Qi.visualisation.getDataTableIds());var l=nn(o,Qi.visualisation.getDataTableNames(),!1,e.optional);t.value.toUpperCase()!==l&&(t.value=l)}catch(e){return console.error("Failed to parse data binding",e),Re.point(s).text(e.message).draw(),t.value=t.getAttribute("data-value"),void(eo=!0)}if(At(t.parentElement.parentElement).classed("empty-required-binding",!1),!o.data_table_id)return t.value=t.getAttribute("data-value"),Re.point(s).text("No such data table").draw(),void(eo=!0);if(e.data_type){const n=Qi.spreadsheet.getTypeAnnotatedColumns();if("column"===i.type){const r=n[o.column];if(!r)return Re.point(s).html(`Column '${t.value}' does not exist

Choose a column from the data table

`).draw(),t.value=t.getAttribute("data-value"),void(eo=!0);if(uo(e,r))return t.value=t.getAttribute("data-value"),Re.point(s).html(`\n\t\t\t\t\t\tThis column selection does not accept ${co([r.type])} columns\n\t\t\t\t\t\t

Choose a different column or check/change the column’s type in the header row with the following types:

\n\t\t\t\t\t\t
${co(e.data_type)}
\n\t\t\t\t\t`).draw(),void(eo=!0)}else{const r=n.filter((t=>o.columns.includes(t.index))).filter((t=>uo(e,t)));if(r.length){t.value=t.getAttribute("data-value");var u=r.map((t=>t.type)).reduce(((t,e)=>t.includes(e)?t:[...t,e]),[]),c=u.reduce(((t,e,n,r)=>1===r.length?co([e]):(n0?",":""} ${co([e])}`:t+=`or ${co([e])}`,t)),"");return Re.point(s).html(`\n\t\t\t\t\t\tThis column selection does not accept ${c} columns\n\t\t\t\t\t\t

Choose a different column or check/change the column’s type in the header row with the following types:

\n\t\t\t\t\t\t
${co(e.data_type)}
\n\t\t\t\t\t`).draw(),void(eo=!0)}}}}else if(o=null,!e.optional)return t.value=t.getAttribute("data-value"),Re.point(s).text("This column selection is required").draw(),void(eo=!0);Qi.spreadsheet.updateTabs();var d={};d[e.dataset]={},d[e.dataset][e.key]=o,lo(d,(function(){t.setAttribute("data-value",t.value);var e=po();e?(At(".publish-btn").classed("disabled",!0),At(".republish-btn").classed("disabled",!0),Et(".download-btn").classed("disabled",!0),At("body").classed("impossible",!0)):(At(".publish-btn").classed("disabled",!1),At(".republish-btn").classed("disabled",!1),Et(".download-btn").classed("disabled",!1),At("body").classed("impossible",!1),Qi.visualisation.getState((function(t){Qi.visualisation.prepareData((function(e,n){e?console.error("Failed to prepare data for template"):Qi.preview_pane.getDrawCalled()?Qi.preview_pane.sync({data:n,state:t,update:!0}):(Qi.preview_pane.sync({data:n,state:t,draw:!0}),Qi.preview_pane.setDrawCalled(!0))}))}))),Qi.spreadsheet&&Qi.spreadsheet.updateHighlights(),Qi.template_settings&&(e?Qi.template_settings.setReadOnly():Qi.template_settings.unsetReadOnly(),Qi.template_settings.populate()),Qi.theme_chooser.enableOrDisable()}))}(this,t)})).on("keydown",(function(){Qi.confirm.blank()})).on("focus",(function(){eo||Re.hide(),eo=!1,Et(".data-bindings .settings-option").classed("open",!1),At(this.parentElement.parentElement).classed("open",!0)}))}}(e)).style("background",no[oo].light).style("border-color",no[oo].full),s&&Qi.template_settings.setReadOnly(),a&&t.append("div").attr("class","data-binding-required").append("p").text("This column selection is required. The visualisation will not update while this field is empty.");var u,c=t.append("div").attr("class","data-binding-description");if(e.description&&c.append("p").html(Le.sanitize(e.description)),e.data_type){var d=c.append("div").attr("class","data-binding-data-types");d.append("p").text("Accepted column types");for(var p=Array.isArray(e.data_type)?e.data_type:[e.data_type],f=0;f"string"==typeof t?t===e.type:t.type===e.type))}function co(t){return t.map((t=>`\n\t\t\n\t\t\n\t\t

${Ki[t].text}

\n\t\t
\n\t\t`)).join("")}function po(){var t=Qi.visualisation.dataBindingsForCurrentTemplate(),e=Qi.template_data_bindings,n={};return e.forEach((function(t){"string"!=typeof t&&(n[t.dataset]||(n[t.dataset]={}),n[t.dataset][t.key]=t)})),e.some((function(e){if("string"!=typeof e&&"column"===e.type&&!n[e.dataset][e.key].optional)return!t[e.dataset]||null==t[e.dataset][e.key]}))}function fo(t=!0){if(po())At("body").classed("impossible",!0),At(".empty-label").html(" Oops! It looks like one of the required column selections is empty."),At(".empty-details").html("Head over to the Data tab to choose a suitable column.");else if(At("body").classed("impossible")){const e=Qi.visualisation?Qi.visualisation:Qi.story;e.status&&e.status.requested_by?Qi.confirm_published.awaitingReview(e.status,e.can_review,Qi.user):Qi.visualisation.embed_url&&t?Qi.confirm_published.edited():(Qi.confirm_published.unpublished(),At("body").classed("impossible",!1),At(".empty-label").text(""),At(".empty-details").text(""))}}var ho,mo,go,vo,yo,bo,_o,wo,xo,Co=!1;function Ao(t){if(Co&&window.top!==window.self){var e=window;"srcdoc"===e.location.pathname&&(e=e.parent);var n,r=(n={},window._Flourish_template_id&&(n.template_id=window._Flourish_template_id),window.Flourish&&window.Flourish.app&&window.Flourish.app.loaded_template_id&&(n.template_id=window.Flourish.app.loaded_template_id),window._Flourish_visualisation_id&&(n.visualisation_id=window._Flourish_visualisation_id),window.Flourish&&window.Flourish.app&&window.Flourish.app.loaded_visualisation&&(n.visualisation_id=window.Flourish.app.loaded_visualisation.id),window.Flourish&&window.Flourish.app&&window.Flourish.app.story&&(n.story_id=window.Flourish.app.story.id,n.slide_count=window.Flourish.app.story.slides.length),window.Flourish&&window.Flourish.app&&window.Flourish.app.current_slide&&(n.slide_index=window.Flourish.app.current_slide.index+1),n),i={sender:"Flourish",method:"customerAnalytics"};for(var o in r)r.hasOwnProperty(o)&&(i[o]=r[o]);for(var o in t)t.hasOwnProperty(o)&&(i[o]=t[o]);e.parent.postMessage(JSON.stringify(i),"*")}}function ko(t){if("function"!=typeof t)throw new Error("Analytics callback is not a function");window.Flourish._analytics_listeners.push(t)}function Eo(){Co=!0;[{event_name:"click",action_name:"click",use_capture:!0},{event_name:"keydown",action_name:"key_down",use_capture:!0},{event_name:"mouseenter",action_name:"mouse_enter",use_capture:!1},{event_name:"mouseleave",action_name:"mouse_leave",use_capture:!1}].forEach((function(t){document.body.addEventListener(t.event_name,(function(){Ao({action:t.action_name})}),t.use_capture)}))}function To(){if(null==ho){var t=function(){var t=window.location;"about:srcdoc"==t.href&&(t=window.parent.location);var e={};return function(t,n,r){for(;r=n.exec(t);)e[decodeURIComponent(r[1])]=decodeURIComponent(r[2])}(t.search.substring(1).replace(/\+/g,"%20"),/([^&=]+)=?([^&]*)/g),e}();ho="referrer"in t?/^https:\/\/medium.com\//.test(t.referrer):!("auto"in t)}return ho}function Lo(t){var e=t||window.innerWidth;return e>999?650:e>599?575:400}function Do(t){if(t&&window.top!==window.self){var e=window;"srcdoc"==e.location.pathname&&(e=e.parent);var n={sender:"Flourish",method:"scrolly"};if(t)for(var r in t)n[r]=t[r];e.parent.postMessage(JSON.stringify(n),"*")}}function Fo(t,e){if(window.top!==window.self){var n=window;if("srcdoc"==n.location.pathname&&(n=n.parent),mo)return t=parseInt(t,10),void n.parent.postMessage({sentinel:"amp",type:"embed-size",height:t},"*");var r={sender:"Flourish",context:"iframe.resize",method:"resize",height:t,src:n.location.toString()};if(e)for(var i in e)r[i]=e[i];n.parent.postMessage(JSON.stringify(r),"*")}}function So(){return(-1!==navigator.userAgent.indexOf("Safari")||-1!==navigator.userAgent.indexOf("iPhone"))&&-1==navigator.userAgent.indexOf("Chrome")}function Mo(t){return"string"==typeof t||t instanceof String}function No(t){return"warn"!==t.method?(console.warn("BUG: validateWarnMessage called for method"+t.method),!1):!(null!=t.message&&!Mo(t.message))&&!(null!=t.explanation&&!Mo(t.explanation))}function Uo(t){return"resize"!==t.method?(console.warn("BUG: validateResizeMessage called for method"+t.method),!1):!!Mo(t.src)&&(!!Mo(t.context)&&!!("number"==typeof(e=t.height)?!isNaN(e)&&e>=0:Mo(e)&&/\d/.test(e)&&/^[0-9]*(\.[0-9]*)?(cm|mm|Q|in|pc|pt|px|em|ex|ch|rem|lh|vw|vh|vmin|vmax|%)?$/i.test(e)));var e}function Oo(t){throw new Error("Validation for setSetting is not implemented yet; see issue #4328")}function Bo(t){return"scrolly"!==t.method?(console.warn("BUG: validateScrolly called for method"+t.method),!1):!!Array.isArray(t.slides)}function Ho(t){return"customerAnalytics"===t.method||(console.warn("BUG: validateCustomerAnalyticsMessage called for method"+t.method),!1)}function Ro(t){return"request-upload"!==t.method?(console.warn("BUG: validateResizeMessage called for method"+t.method),!1):!!Mo(t.name)&&!(null!=t.accept&&!Mo(t.accept))}function jo(t,e,n){var r=function(t){for(var e={warn:No,resize:Uo,setSetting:Oo,customerAnalytics:Ho,"request-upload":Ro,scrolly:Bo},n={},r=0;r1)return o;var s=setInterval((function(){window._flourish_poll_items=window._flourish_poll_items.filter((function(t){return!t.iframe.offsetParent||($o(t.embed_url,t.container,t.iframe,t.width,t.height,t.play_on_load),!1)})),window._flourish_poll_items.length||clearInterval(s)}),500)}return o}function $o(t,e,n,r,i,o){var a;return r&&"number"==typeof r?(a=r,r+="px"):r&&r.match(/^[ \t\r\n\f]*([+-]?\d+|\d*\.\d+(?:[eE][+-]?\d+)?)(?:\\?[Pp]|\\0{0,4}[57]0(?:\r\n|[ \t\r\n\f])?)(?:\\?[Xx]|\\0{0,4}[57]8(?:\r\n|[ \t\r\n\f])?)[ \t\r\n\f]*$/)&&(a=parseFloat(r)),i&&"number"==typeof i&&(i+="px"),r?n.style.width=r:So()?n.style.width=e.offsetWidth+"px":n.style.width="100%",!!i||(t.match(/\?/)?t+="&auto=1":t+="?auto=1",i=Lo(a||n.offsetWidth)+"px"),i&&("%"===i.charAt(i.length-1)&&(i=parseFloat(i)/100*e.parentNode.offsetHeight+"px"),n.style.height=i),n.setAttribute("src",t+(o?"#play-on-load":"")),n}function qo(t,e,n){for(var r in e||(e=[]),n||(n={}),t)e.push(r),"object"==typeof t[r]&&qo(t[r],e,n),n[e.join(".")]=t[r],e.pop();return n}function Vo(t){var e={};for(var n in t){for(var r=e,i=n.indexOf("."),o=0;i>=0;i=n.indexOf(".",o=i+1)){var a=n.substring(o,i);a in r||(r[a]={}),r=r[a]}r[n.substring(o)]=t[n]}return e}function Yo(t){if(null==t)return t;var e,n={};for(var r in t)Array.isArray(t[r])?n[r]=t[r].slice():(e=t[r],Array.isArray(e)||"object"!=typeof e||null==e?n[r]=t[r]:n[r]=Yo(t[r]));return n}var Wo,Go=null;function Zo(){return"MessageChannel"in window}var Xo=null;function Jo(){Xo&&go.removeEventListener("load",Xo),Xo=null}function Ko(t){Jo(),go.addEventListener("load",t),Xo=t}function Qo(t,e,n){return ba(!1),xo=t?t.visualisation?t.visualisation:t.current_slide.visualisation:null,Go=null,xo&&xo.template_id?(Ko(function(t,e,n){var r=t.visualisation?t.visualisation.template_id:t.current_slide.visualisation.template_id,i=t.current_slide?t.current_slide.id:null;return function(){Lt(),!xo||xo.template_id!=r||t.current_slide&&t.current_slide.id!==i||(Jo(),sa((function(o,a){o?console.error("Failed to get default state"):!xo||xo.template_id!=r||t.current_slide&&t.current_slide.id!==i||la((function(o,s){if(o)console.error("Failed to call hasData");else if(xo&&xo.template_id==r&&(!t.current_slide||t.current_slide.id===i)){var l=!1;t.visualisation&&(l=t.data_bindings.requiredBindingsAreUnset()),s?xo.refreshDataBindings((function(o){o?console.error("Failed to refresh data bindings"):!xo||xo.template_id!=r||t.current_slide&&t.current_slide.id!==i||xo.prepareData((function(o,s){o?console.error("Failed to prepare data for template"):!xo||xo.template_id!=r||t.current_slide&&t.current_slide.id!==i||va({data:s,state:e,draw:!l},(function(t,e){Go=a,n(t,e)}))}))})):va({state:e,draw:!l},(function(t,e){Go=a,n(t,e)}))}}))})))}}(t,e,n)),go.src="/template/"+xo.template_id+"/embed/?auto=1&environment="+vo+"&is_read_only="+(t.is_read_only?"1":"0"),go):(Jo(),go.src="about:blank",go)}function ta(t){sa((function(e,n){e?console.error("Failed to get default state"):(Go=n,t())}))}function ea(t,e){var n=t.template_id;t.refreshDataBindings((function(r){r?console.error("Failed to fetch data bindings"):t.prepareData((function(t,r){if(xo&&xo.template_id==n)return t?(console.error("Failed to prepare data for template"),void e(t)):void e(void 0,r)}))}))}function na(t,e){ea(t,(function(t,n){if(t)return e(t);va({data:n,update:!0},e)}))}function ra(t,e){ea(t,(function(t,n){if(t)return e(t);va({data:n,update:!1},e)}))}function ia(t,e,n){ea(t,(function(t,r){if(t)return n(t);va({data:r,state:e,overwrite_state:!0,update:!0},n)}))}function oa(t,e,n,r=go){if(Zo()){var i=new MessageChannel;i.port1.onmessage=function(t){var e=t.data;if("string"==typeof e){if(!n)return;return n(void 0,JSON.parse(e))}if("object"==typeof e){if("result"in e){if(!n)return;return n(void 0,e.result)}if("error"in e){if(!n)return;return n(e.error)}console.error("Unrecognised response to message",e)}else console.error("Unrecognised response to message",e)},r.contentWindow.postMessage({sender:"Flourish",method:t,argument:e},"*",[i.port2])}}function aa(t,e){oa("setState",Vo(t),e)}function sa(t,e){"function"!=typeof t?oa("getState",t,e):oa("getState",void 0,t)}function la(t){oa("hasData",void 0,t)}function ua(t,e){oa("setData",t,e)}function ca(t){oa("getData",void 0,t)}function da(t){oa("draw",void 0,t),ba(!0)}function pa(t){_o&&_o.clear(),ya()&&oa("update",void 0,t)}function fa(t,e,n){oa("snapshot",t,e,n)}function ha(){return Yo(Go)}function ma(t,e){oa("setFixedHeight",t,e)}function ga(t){if(go.parentNode.offsetWidth){if(void 0!==t)Wo=null!=t;else if(Wo)return;var e=t||bo&&bo.responsive_menu&&bo.responsive_menu.getHeightSetting()||yo.getHeightForBreakpoint(go.offsetWidth),n=typeof e;("number"===n||"string"===n&&!isNaN(e))&&(e+="px"),go.style.height=e}}function va(t,e,n=go){ya()?delete t.draw:t.draw&&ba(!0),t.state&&(t.state=Vo(t.state)),_o&&_o.clear(),oa("sync",t,(function(n,r){null!=n||"success"!==r?(t.draw&&ba(!1),function n(r){r?e&&e(r):function(t,e){return t.data?(ua(t.data,e),delete t.data,!1):t.state?(aa(t.state,e),delete t.state,!1):t.draw?(da(e),delete t.draw,!1):!t.update||(pa(e),delete t.update,!1)}(t,n)&&e&&e(void 0)}(n)):e&&e(void 0)}),n)}function ya(){return wo}function ba(t){wo=t}function _a(t,e,n,r,i){return go=document.querySelector(t),vo=e,bo=n,_o=r,i||(i={}),mo="#amp=1"==window.location.hash,yo={createEmbedIframe:Po,isFixedHeight:To,getHeightForBreakpoint:Lo,startEventListeners:jo,notifyParentWindow:Fo,initScrolly:Do,createScrolly:zo,isSafari:So,initCustomerAnalytics:Eo,addAnalyticsListener:ko,sendCustomerAnalyticsMessage:Ao},go.style.height=yo.getHeightForBreakpoint(go.offsetWidth)+"px",yo.startEventListeners((function(t){"resize"==t.method?ga(t.height):"warn"==t.method?(_o&&_o.warn(t),console.warn("Warning from template:",t.message,t.explanation)):t.method in i&&i[t.method](t)}),["resize","warn","customerAnalytics","setSetting","request-upload"]),Zo()||function(t){if(t){var e=document.createElement("div");e.className="unsupported-notice",e.innerHTML="

Please update your browser

This page only works with newer versions of your browser.

",t.appendChild(e)}}(go.parentNode),{loadVisualisation:Qo,updateData:na,updateDataAndState:ia,updateDataNotPreview:ra,setState:aa,getState:sa,getDefaultState:ha,hasData:la,setData:ua,getData:ca,draw:da,update:pa,snapshot:fa,setFixedHeight:ma,resize:ga,sync:va,getDrawCalled:ya,setDrawCalled:ba,setFrameLoadListener:Ko,updateDefaultState:ta}}var wa=function(t=document.body){t.classList.add("loading")},xa=function(t=document.body){t.classList.remove("loading")};const Ca=new Set([1,274,282,283,296,34675,40961,42240]);function Aa(t){let e=0;function n(n){if(e>=t.byteLength)return null;void 0===n&&(n=1);const r=new DataView(t,e,n);return e+=n,r}const r=new Uint8Array(t.byteLength+2);let i=0;function o(t){r.set(new Uint8Array(t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)),i),i+=t.byteLength}const a=(new TextEncoder).encode("Exif\0\0");function*s(t){if(t<32)return;if(!function(t,e){if(t.byteLength!==e.byteLength)return!1;for(let n=0;n12)continue;let c;switch(n){case 1:case 2:case 6:case 7:c=1;break;case 3:case 8:c=2;break;case 4:case 9:case 11:c=4;break;case 5:case 10:case 12:c=8}const d=c*i;let p;if(d<=4)p=new DataView(new ArrayBuffer(4),0,4),p.setUint32(0,a,o);else{p=new DataView(new ArrayBuffer(d));for(let t=0;t4&&(c+=t.byteLength);c+=4;const d=new Uint8Array(c),p=new DataView(d.buffer);d.set((new TextEncoder).encode("MM\0*\0\0\0\b"),0),p.setUint16(8,e.length);let f=10,h=10+12*e.length+4;for(const{code:t,type:n,num_values:r,data:i}of e){if(p.setUint16(f,t),p.setUint16(f+2,n),p.setUint32(f+4,r),i.byteLength<=4)for(let t=0;t0&&255===c.getUint8(c.byteLength-1)}return p||o(u),r}function ka(t){let e=0;function n(n){if(e+n>t.byteLength)return null;const r=new DataView(t,e,n);return e+=n,r}const r=new Uint8Array(t.byteLength);let i=0;function o(t){r.set(new Uint8Array(t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)),i),i+=t.byteLength}const a=n(8);if(80!==a.getUint8(1)||78!==a.getUint8(2)||71!==a.getUint8(3))throw new Error("Not a valid PNG");let s,l;for(o(a);null!=(s=n(4))&&null!=(l=n(4));){const t=s.getUint32(0),e=l.getUint8(0),r=l.getUint8(1);101===e||105===e&&84===r?(n(t),n(4)):(o(s),o(l),o(n(t)),o(n(4)))}return r}var Ea="/api/file/upload";function Ta(t){(t||document).querySelectorAll("input[type=url]").forEach((function(t){La(t)}))}function La(t,e){var n=t.ownerDocument.createElement("button");n.type="button",n.className="upload",n.setAttribute("title","Upload a file from your computer"),n.innerHTML="⬆︎",t.insertAdjacentElement("afterend",n),e||(n.onclick=Da)}function Da(){var t=this.previousSibling,e=t.getAttribute("accept");t.disabled=!0,t.classList.toggle("uploading",!0),Fa({accept:e,success:function(e){var n;t.disabled=!1,t.classList.toggle("uploading",!1),t.value=e,"createEvent"in document?(n=document.createEvent("Event")).initEvent("change",!0,!0):n=new Event("change",{bubbles:!0}),t.dispatchEvent(n)},failure:function(){t.disabled=!1,t.classList.toggle("uploading",!1)}})}function Fa(t){var e=document.getElementById("file-uploader");e||((e=document.createElement("input")).type="file",e.setAttribute("id","file-uploader"),e.style.display="none",document.body.appendChild(e)),t.accept?e.setAttribute("accept",t.accept):e.removeAttribute("accept"),e.onchange=async function(){wa(),await async function(t,e,n){const r=await async function(t){try{if("image/png"===t.type)return new File([ka(await t.arrayBuffer())],t.name,{type:t.type});if("image/jpeg"===t.type)return new File([Aa(await t.arrayBuffer())],t.name,{type:t.type})}catch(t){console.error(t)}return t}(t[0]);!function(t,e){var n={filename:t.name,content_type:t.type,size:t.size};Sa(Ea,n,(function(t,n){return t?e(t):e(null,JSON.parse(n.responseText))}))}(r,(function(t,i){if(t)return xa(),Wi("Upload error","There was a problem uploading your file: "+t.message),void console.error(t);var o=function(t){for(var e=1;e=200&&r.status<300)n(null,r);else try{var e=JSON.parse(r.responseText).error;n(e,r)}catch(e){n(new Error("POST "+t+" received status code: "+r.status),r)}},r.open("POST",t,!0),r.send(i)}var Ma="https://fonts.googleapis.com/css?family=",Na=["Source Sans Pro","Roboto Condensed","Merriweather","Lora","Playfair Display","Coda","Lobster","Cabin Sketch"],Ua="Same as parent",Oa=[],Ba=[],Ha={};function Ra(t){return Ma+t.replace(/ /g,"+")+":400,700"}function ja(t){var e=Ba.concat(Oa,Na.map((function(t){return{name:t,url:Ra(t)}})));return t&&e.unshift({name:Ua}),e}function Ia(t){return ja(!0).find((function(e){return e.name==t}))}var za=!1;function Pa(t){return t.substr(t.lastIndexOf("=")+1).replace(/\+/g," ")}function $a(t){var e=t.target,n=e.value;if(n&&(0==n.indexOf(Ma)&&(n=e.value=Pa(n)),!Ia(n))){if(/^https?:\/\//.test(n)){za||(qa(n),e.value="");var r=n;return n=e.value=Pa(r),Ba.push({name:n,url:r}),void Va()}var i=Ra(n);try{var o=new XMLHttpRequest;if(o.open("HEAD",i,!1),o.send(),404==o.status)throw"Font not found";Ba.push({name:n,url:i}),Va()}catch(t){qa(n),e.value=""}}}function qa(t){Wi("Unrecognised font “"+t+"”","Fonts must be chosen from Google Fonts. Visit fonts.google.com to find more",{is_html:!0})}function Va(){var t,e,n=Object.keys(Ha);for(t=0;tt.name)),mode:"single",options_config:{allow_other_option:!0}});t._dropdown=i,Ha[e.property]={dropdown:i,can_inherit:r},t.addEventListener("change",$a)},update:function(t,e){var n=e?e.name:Ua;t._dropdown.setSelectedOptions(n),Ia(n)||(n!=Ua&&Ba.push({name:n,url:e.url}),Va())},getValue:function(t){if(/^https?:\/\//.test(t.value))return{name:Pa(t.value),url:t.value};var e=t.value;if(e==Ua)return null;var n=Ia(e);return n||{name:e,url:Ra(e)}},replaceThemeFonts:function(t){Oa=(t||[]).map((function(t){return{name:t.name,url:t.url}})),Va()}},Wa="$";function Ga(){}function Za(t,e){var n=new Ga;if(t instanceof Ga)t.each((function(t,e){n.set(e,t)}));else if(Array.isArray(t)){var r,i=-1,o=t.length;if(null==e)for(;++i=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function ns(t,e){for(var n,r=0,i=t.length;r0)for(var n,r,i=new Array(n),o=0;o=200&&r<300||304===r){if(i)try{e=i.call(n,l)}catch(t){return void a.call("error",n,t)}else e=l;a.call("load",n,e)}else a.call("error",n,t)}if("undefined"!=typeof XDomainRequest&&!("withCredentials"in l)&&/^(http(s)?:)?\/\//.test(t)&&(l=new XDomainRequest),"onload"in l?l.onload=l.onerror=l.ontimeout=p:l.onreadystatechange=function(t){l.readyState>3&&p(t)},l.onprogress=function(t){a.call("progress",n,t)},n={header:function(t,e){return t=(t+"").toLowerCase(),arguments.length<2?s.get(t):(null==e?s.remove(t):s.set(t,e+""),n)},mimeType:function(t){return arguments.length?(r=null==t?null:t+"",n):r},responseType:function(t){return arguments.length?(o=t,n):o},timeout:function(t){return arguments.length?(d=+t,n):d},user:function(t){return arguments.length<1?u:(u=null==t?null:t+"",n)},password:function(t){return arguments.length<1?c:(c=null==t?null:t+"",n)},response:function(t){return i=t,n},get:function(t,e){return n.send("GET",t,e)},post:function(t,e){return n.send("POST",t,e)},send:function(e,i,p){return l.open(e,t,!0,u,c),null==r||s.has("accept")||s.set("accept",r+",*/*"),l.setRequestHeader&&s.each((function(t,e){l.setRequestHeader(e,t)})),null!=r&&l.overrideMimeType&&l.overrideMimeType(r),null!=o&&(l.responseType=o),d>0&&(l.timeout=d),null==p&&"function"==typeof i&&(p=i,i=null),null!=p&&1===p.length&&(p=function(t){return function(e,n){t(null==e?n:null)}}(p)),null!=p&&n.on("error",p).on("load",(function(t){p(null,t)})),a.call("beforesend",n,l),l.send(null==i?null:i),n},abort:function(){return l.abort(),n},on:function(){var t=a.on.apply(a,arguments);return t===a?n:t}},null!=e){if("function"!=typeof e)throw new Error("invalid callback: "+e);return n.get(e)}return n}(o);r&&"GET"!==n&&l.header("Content-Type",r);i&&l.mimeType(i);return l.on("error",(function(t){var n;try{n=JSON.parse(t.target.responseText),s(n.error)}catch(e){s("Internal error: "+t.target.responseText)}e()})),l.on("load",(function(t){var n=t.responseText;"application/json"===i&&(n=JSON.parse(n));try{s(void 0,n)}catch(t){console.error(t.stack)}e()})),l.send(n,a),l}(t.items.shift(),(function(){t.request=null,0==t.items.length?e():ss(t,e)}))}function ls(t){return["POST","PUT","DELETE"].includes(t)}function us(t,e){void 0===e&&(e="default"),e in os||(os[e]={items:[],running:!1,name:e}),os[e].items.push(t),as(os[e])}function cs(t,e){for(var n in e)t[n]=e[n];return t}function ds(t,e,n,r){"function"==typeof n&&(r=n,n=!1),n&&cs(t,e),us({url:t.api_prefix+"/"+t.id,payload:function(){return{version_number:t.getVersionNumber(),fields:e}},callback:function(i,o){if(i)return r(i);n||cs(t,e),t.setVersionNumber(o.version_number),r(void 0)}})}function ps(t,e){t.delete_requested=!0,us({url:t.api_prefix+"/"+t.id,method:"DELETE",payload:function(){return{version_number:t.getVersionNumber()}},callback:function(n,r){if(n)return e(n);t.setVersionNumber(r.version_number),t.is_deleted=!0,e(void 0,r)}})}var fs={addApiKey:function(t){us({url:"/api/user/api_keys",method:"PUT",callback:t})},addFolder:function(t,e){us({url:"/api/user/folder/"+encodeURIComponent(t),method:"PUT",callback:e})},addTag:function(t,e){us({url:"/api/user/tag/"+encodeURIComponent(t),method:"PUT",callback:e})},deleteApiKey:function(t,e){us({url:"/api/user/api_keys/"+t,method:"DELETE",callback:e})},fetchFolders:function(t){us({url:"/api/user/folder",method:"GET",callback:t})},fetchProjects:function(t,e,n,r,i,o,a,s){let l="/api/user/projects";const u=[];n&&u.push("sort="+encodeURIComponent(n)),r&&u.push("filter="+encodeURIComponent(r)),i&&u.push("offset="+encodeURIComponent(i)),o&&u.push("limit="+encodeURIComponent(o)),a&&u.push("search="+encodeURIComponent(a)),s&&u.push("is_recent=true"),e&&(l+="/folder/"+encodeURIComponent(e)),u.length&&(l+="?"+u.join("&")),us({url:l,method:"GET",callback:t})},generateSdkToken:function(t){us({url:"/api/user/generate_sdk_token",method:"GET",callback:t})},getApiKeys:function(t){us({url:"/api/user/api_keys",method:"GET",callback:t})},getReviewCount:function(t){us({url:"/api/reviews/count",method:"GET",callback:t})},isUsernameAvailable:function(t,e){us({url:"/api/user/username?u="+encodeURIComponent(t),method:"GET",callback:e})},logHistory:function(t){us({url:"/api/history",method:"POST",payload:function(){return t},callback:function(){}})},removeFolder:function(t,e){us({url:"/api/user/folder/"+encodeURIComponent(t),method:"DELETE",callback:e})},removeTag:function(t,e){us({url:"/api/user/tag/"+encodeURIComponent(t),method:"DELETE",callback:e})},renameFolder:function(t,e,n){us({url:"/api/user/folder/"+encodeURIComponent(t)+"/"+encodeURIComponent(e),method:"PUT",callback:n})},renameTag:function(t,e,n){us({url:"/api/user/tag/"+encodeURIComponent(t)+"/"+encodeURIComponent(e),method:"PUT",callback:n})},revokeSdkToken:function(t,e){us({url:"/api/user/sdk_token/"+encodeURIComponent(t),method:"DELETE",callback:e})},setSamlProviderId:function(t,e,n){us({url:"/api/user/"+encodeURIComponent(t)+"/change_saml_provider_id",method:"POST",payload:function(){return{saml_provider_id:e}},callback:n})},update:function(t,e){us({url:"/api/user",method:"POST",payload:function(){return{fields:t}},callback:e})}};var hs={};function ms(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function gs(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function vs(){}var ys=.7,bs=1/ys,_s="\\s*([+-]?\\d+)\\s*",ws="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",xs="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Cs=/^#([0-9a-f]{3,8})$/,As=new RegExp(`^rgb\\(${_s},${_s},${_s}\\)$`),ks=new RegExp(`^rgb\\(${xs},${xs},${xs}\\)$`),Es=new RegExp(`^rgba\\(${_s},${_s},${_s},${ws}\\)$`),Ts=new RegExp(`^rgba\\(${xs},${xs},${xs},${ws}\\)$`),Ls=new RegExp(`^hsl\\(${ws},${xs},${xs}\\)$`),Ds=new RegExp(`^hsla\\(${ws},${xs},${xs},${ws}\\)$`),Fs={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Ss(){return this.rgb().formatHex()}function Ms(){return this.rgb().formatRgb()}function Ns(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Cs.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Us(e):3===n?new Rs(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?Os(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?Os(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=As.exec(t))?new Rs(e[1],e[2],e[3],1):(e=ks.exec(t))?new Rs(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Es.exec(t))?Os(e[1],e[2],e[3],e[4]):(e=Ts.exec(t))?Os(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Ls.exec(t))?qs(e[1],e[2]/100,e[3]/100,1):(e=Ds.exec(t))?qs(e[1],e[2]/100,e[3]/100,e[4]):Fs.hasOwnProperty(t)?Us(Fs[t]):"transparent"===t?new Rs(NaN,NaN,NaN,0):null}function Us(t){return new Rs(t>>16&255,t>>8&255,255&t,1)}function Os(t,e,n,r){return r<=0&&(t=e=n=NaN),new Rs(t,e,n,r)}function Bs(t){return t instanceof vs||(t=Ns(t)),t?new Rs((t=t.rgb()).r,t.g,t.b,t.opacity):new Rs}function Hs(t,e,n,r){return 1===arguments.length?Bs(t):new Rs(t,e,n,null==r?1:r)}function Rs(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function js(){return`#${$s(this.r)}${$s(this.g)}${$s(this.b)}`}function Is(){const t=zs(this.opacity);return`${1===t?"rgb(":"rgba("}${Ps(this.r)}, ${Ps(this.g)}, ${Ps(this.b)}${1===t?")":`, ${t})`}`}function zs(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Ps(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function $s(t){return((t=Ps(t))<16?"0":"")+t.toString(16)}function qs(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Ys(t,e,n,r)}function Vs(t){if(t instanceof Ys)return new Ys(t.h,t.s,t.l,t.opacity);if(t instanceof vs||(t=Ns(t)),!t)return new Ys;if(t instanceof Ys)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(a=e===o?(n-r)/s+6*(n0&&l<1?0:a,new Ys(a,s,l,t.opacity)}function Ys(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Ws(t){return(t=(t||0)%360)<0?t+360:t}function Gs(t){return Math.max(0,Math.min(1,t||0))}function Zs(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function Xs(t){for(var e=t.length/6|0,n=new Array(e),r=0;r=240?t-240:t+120,i,r),Zs(t,i,r),Zs(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new Ys(Ws(this.h),Gs(this.s),Gs(this.l),zs(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=zs(this.opacity);return`${1===t?"hsl(":"hsla("}${Ws(this.h)}, ${100*Gs(this.s)}%, ${100*Gs(this.l)}%${1===t?")":`, ${t})`}`}}));var Js=Xs("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),Ks=Xs("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),Qs=Xs("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),tl=Xs("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),el=t=>()=>t;function nl(t){return 1==(t=+t)?rl:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):el(isNaN(e)?n:e)}}function rl(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):el(isNaN(t)?e:t)}var il=function t(e){var n=nl(e);function r(t,e){var r=n((t=Hs(t)).r,(e=Hs(e)).r),i=n(t.g,e.g),o=n(t.b,e.b),a=rl(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=o(e),t.opacity=a(e),t+""}}return r.gamma=t,r}(1);function ol(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}var al=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,sl=new RegExp(al.source,"g");function ll(t,e){var n,r,i,o=al.lastIndex=sl.lastIndex=0,a=-1,s=[],l=[];for(t+="",e+="";(n=al.exec(t))&&(r=sl.exec(e));)(i=r.index)>o&&(i=e.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:ol(n,r)})),o=sl.lastIndex;return o180?e+=360:e-t>180&&(t+=360),o.push({i:n.push(i(n)+"rotate(",null,r)-2,x:ol(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(o.rotate,a.rotate,s,l),function(t,e,n,o){t!==e?o.push({i:n.push(i(n)+"skewX(",null,r)-2,x:ol(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(o.skewX,a.skewX,s,l),function(t,e,n,r,o,a){if(t!==n||e!==r){var s=o.push(i(o)+"scale(",null,",",null,")");a.push({i:s-4,x:ol(t,n)},{i:s-2,x:ol(e,r)})}else 1===n&&1===r||o.push(i(o)+"scale("+n+","+r+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,s,l),o=a=null,function(t){for(var e,n=-1,r=l.length;++n=0&&e._call.call(null,t),e=e._next;--yl}()}finally{yl=0,function(){var t,e,n=hl,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:hl=e);ml=t,Ml(r)}(),xl=0}}function Sl(){var t=Al.now(),e=t-wl;e>1e3&&(Cl-=e,wl=t)}function Ml(t){yl||(bl&&(bl=clearTimeout(bl)),t-xl>24?(t<1/0&&(bl=setTimeout(Fl,t-Al.now()-Cl)),_l&&(_l=clearInterval(_l))):(_l||(wl=Al.now(),_l=setInterval(Sl,1e3)),yl=1,kl(Fl)))}function Nl(t,e,n){var r=new Ll;return e=null==e?0:+e,r.restart((n=>{r.stop(),t(n+e)}),e,n),r}Ll.prototype=Dl.prototype={constructor:Ll,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?El():+n)+(null==e?0:+e),this._next||ml===this||(ml?ml._next=this:hl=this,ml=this),this._call=t,this._time=n,Ml()},stop:function(){this._call&&(this._call=null,this._time=1/0,Ml())}};var Ul=Qa("start","end","cancel","interrupt"),Ol=[];function Bl(t,e,n,r,i,o){var a=t.__transition;if(a){if(n in a)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function o(t){n.state=1,n.timer.restart(a,n.delay,n.time),n.delay<=t&&a(t-n.delay)}function a(o){var u,c,d,p;if(1!==n.state)return l();for(u in i)if((p=i[u]).name===n.name){if(3===p.state)return Nl(a);4===p.state?(p.state=6,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete i[u]):+u0)throw new Error("too late; already scheduled");return n}function Rl(t,e){var n=jl(t,e);if(n.state>3)throw new Error("too late; already running");return n}function jl(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Il(t,e){var n,r;return function(){var i=Rl(this,t),o=i.tween;if(o!==n)for(var a=0,s=(r=n=o).length;a=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?Hl:Rl;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}var au=Ct.prototype.constructor;function su(t){return function(){this.style.removeProperty(t)}}function lu(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function uu(t,e,n){var r,i;function o(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&lu(t,o,n)),r}return o._value=e,o}function cu(t){return function(e){this.textContent=t.call(this,e)}}function du(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&cu(r)),e}return r._value=t,r}var pu=0;function fu(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function hu(){return++pu}var mu=Ct.prototype;fu.prototype={constructor:fu,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=f(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete o[i]):a=!1;a&&delete t.__transition}}(this,t)}))},Ct.prototype.transition=function(t){var e,n;t instanceof fu?(e=t._id,t=t._name):(e=hu(),(n=yu).time=El(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,o=0;o2?t.parentNode.removeChild(t):("INPUT"==t.firstChild.tagName?t.firstChild.value="#000000":t.firstChild.style.backgroundColor="#000000",t.firstChild.nextSibling.value="#000000");zu()}(e.parentNode))}function zu(){for(var t=Cu.getAttribute("data-autocomplete"),e=ku[t],n=[],r=xu.querySelectorAll(".palette input[type=text]"),i=0;i

",e.innerHTML=r,e.addEventListener("change",$u),e.addEventListener("dragstart",Bu),e.addEventListener("dragover",Hu),e.addEventListener("drop",Ru),e.addEventListener("dragend",ju),e.addEventListener("click",Iu)}(t)):Ou(t,(t.getAttribute("data-value")||"").split("|"))}))},update:Ou,getValue:function(t){var e=t.getAttribute("data-value");return e?e.split("|"):null},replaceThemeColors:Su},Wu={};const Gu={style:!0,url:!0,flourish_embed:!0};var Zu={h1:{path:"M0.00100708 0.524002V9H1.91201V5.464H4.83701V9H6.76101V0.524002H4.83701V3.787H1.91201V0.524002H0.00100708ZM8.91 7.453V9H14.162V7.453H12.615V0.744995H11.211C10.9163 0.918329 10.613 1.06566 10.301 1.187C9.989 1.30833 9.60767 1.41233 9.157 1.499V2.682H10.704V7.453H8.91Z",width:14,height:9},h2:{path:"M0.00100708 0.524002V9H1.91201V5.464H4.83701V9H6.76101V0.524002H4.83701V3.787H1.91201V0.524002H0.00100708ZM8.24078 7.908V9H14.0518V7.388H12.3878C12.1884 7.388 11.9588 7.401 11.6988 7.427C11.4474 7.44434 11.2178 7.466 11.0098 7.492C11.3478 7.14534 11.6728 6.79434 11.9848 6.439C12.3054 6.07501 12.5871 5.71534 12.8298 5.36C13.0811 4.996 13.2804 4.63634 13.4278 4.281C13.5751 3.917 13.6488 3.56167 13.6488 3.215C13.6488 2.81634 13.5838 2.45667 13.4538 2.136C13.3238 1.81534 13.1374 1.54234 12.8948 1.317C12.6521 1.083 12.3618 0.905338 12.0238 0.784004C11.6944 0.654004 11.3261 0.589005 10.9188 0.589005C10.3294 0.589005 9.82245 0.701671 9.39778 0.927004C8.97311 1.14367 8.55711 1.46867 8.14978 1.902L9.18978 2.929C9.39778 2.70367 9.61878 2.50867 9.85278 2.344C10.0868 2.17067 10.3554 2.084 10.6588 2.084C11.0228 2.084 11.3088 2.19234 11.5168 2.409C11.7248 2.617 11.8288 2.92467 11.8288 3.332C11.8288 3.62667 11.7378 3.93867 11.5558 4.268C11.3824 4.58867 11.1354 4.93967 10.8148 5.321C10.5028 5.69367 10.1258 6.09667 9.68378 6.53C9.25045 6.95467 8.76945 7.414 8.24078 7.908Z",width:15,height:9},bold:{path:"M0.00100708 9V0.524002H2.90001C3.34201 0.524002 3.74934 0.558669 4.12201 0.628002C4.50334 0.688669 4.83267 0.801335 5.11001 0.966002C5.39601 1.13067 5.61701 1.34734 5.77301 1.616C5.93767 1.88467 6.02001 2.22267 6.02001 2.63C6.02001 2.82067 5.99401 3.01134 5.94201 3.202C5.89001 3.39267 5.81634 3.57034 5.72101 3.735C5.62567 3.89967 5.50867 4.047 5.37001 4.177C5.24001 4.307 5.08834 4.40234 4.91501 4.463V4.515C5.13167 4.567 5.33101 4.64934 5.51301 4.762C5.69501 4.866 5.85534 5.00034 5.99401 5.165C6.13267 5.32967 6.24101 5.52467 6.31901 5.75C6.39701 5.96667 6.43601 6.218 6.43601 6.504C6.43601 6.93734 6.34934 7.31 6.17601 7.622C6.01134 7.934 5.77734 8.194 5.47401 8.402C5.17934 8.60134 4.83267 8.753 4.43401 8.857C4.03534 8.95234 3.60634 9 3.14701 9H0.00100708ZM1.91201 3.917H2.80901C3.27701 3.917 3.61501 3.826 3.82301 3.644C4.03967 3.462 4.14801 3.21934 4.14801 2.916C4.14801 2.58667 4.03967 2.35267 3.82301 2.214C3.60634 2.07534 3.27267 2.006 2.82201 2.006H1.91201V3.917ZM1.91201 7.518H2.99101C4.03967 7.518 4.56401 7.13667 4.56401 6.374C4.56401 6.00134 4.43401 5.737 4.17401 5.581C3.91401 5.41634 3.51967 5.334 2.99101 5.334H1.91201V7.518Z",width:7,height:9},italic:{path:"M7 1.44444H5.06656L3.6687 8.05556H5.5V9H0.5V8.05556H2.6547L4.05256 1.44444H2V0.5H7V1.44444Z",width:7,height:9},line_break:{description:"Add line break",path:"M14 0V6H3.83L6.41 3.41L5 2L0 7L5 12L6.41 10.59L3.83 8H16V0H14Z",width:16,height:12},url:{description:"Add URL",path:"M8.03571429,6.69642857 C8.03571429,6.5476183 7.98363147,6.42113147 7.87946429,6.31696429 L6.71875,5.15625 C6.61458281,5.05208281 6.48809598,5 6.33928571,5 C6.18303493,5 6.0491077,5.05952321 5.9375,5.17857143 L6.16350446,5.40178571 L6.16350446,5.40178571 L6.21434766,5.4637896 C6.22447497,5.4770171 6.23542901,5.49169139 6.24720982,5.5078125 C6.28255226,5.55617584 6.30673357,5.6036084 6.31975446,5.65011161 C6.33277536,5.69661482 6.33928571,5.74776758 6.33928571,5.80357143 C6.33928571,5.9523817 6.2872029,6.07886853 6.18303571,6.18303571 C6.07886853,6.2872029 5.9523817,6.33928571 5.80357143,6.33928571 C5.74776758,6.33928571 5.69661482,6.33277536 5.65011161,6.31975446 C5.6036084,6.30673357 5.55617584,6.28255226 5.5078125,6.24720982 L5.42844742,6.18644594 L5.42844742,6.18644594 L5.37357392,6.13653276 L5.37357392,6.13653276 L5.17857143,5.9375 L5.17857143,5.9375 C5.05580296,6.05282796 4.99441964,6.18861529 4.99441964,6.34486607 C4.99441964,6.49367634 5.04650246,6.62016317 5.15066964,6.72433036 L6.30022321,7.87946429 C6.40067015,7.97991122 6.52715698,8.03013393 6.6796875,8.03013393 C6.82849777,8.03013393 6.9549846,7.98177132 7.05915179,7.88504464 L7.87946429,7.0703125 C7.98363147,6.96614531 8.03571429,6.84151858 8.03571429,6.69642857 Z M4.11272321,2.76227679 C4.11272321,2.61346652 4.0606404,2.48697969 3.95647321,2.3828125 L2.80691964,1.22767857 C2.70275246,1.12351138 2.57626562,1.07142857 2.42745536,1.07142857 C2.28236535,1.07142857 2.15587852,1.12165128 2.04799107,1.22209821 L1.22767857,2.03683036 C1.12351138,2.14099754 1.07142857,2.26562427 1.07142857,2.41071429 C1.07142857,2.55952455 1.12351138,2.68601138 1.22767857,2.79017857 L2.38839286,3.95089286 C2.48883979,4.05133979 2.61532662,4.1015625 2.76785714,4.1015625 C2.92410792,4.1015625 3.05803516,4.04389939 3.16964286,3.92857143 L2.94363839,3.70535714 L2.94363839,3.70535714 L2.85993304,3.59933036 L2.85993304,3.59933036 C2.8245906,3.55096702 2.80040929,3.50353446 2.78738839,3.45703125 C2.77436749,3.41052804 2.76785714,3.35937528 2.76785714,3.30357143 C2.76785714,3.15476116 2.81993996,3.02827433 2.92410714,2.92410714 C3.02827433,2.81993996 3.15476116,2.76785714 3.30357143,2.76785714 C3.35937528,2.76785714 3.41052804,2.77436749 3.45703125,2.78738839 C3.50353446,2.80040929 3.55096702,2.8245906 3.59933036,2.85993304 L3.70535714,2.94363839 L3.70535714,2.94363839 L3.92857143,3.16964286 L3.92857143,3.16964286 C4.0513399,3.0543149 4.11272321,2.91852757 4.11272321,2.76227679 Z M8.63839286,5.55803571 C8.95089442,5.87053728 9.10714286,6.24999777 9.10714286,6.69642857 C9.10714286,7.14285938 8.94903432,7.52045977 8.6328125,7.82924107 L7.8125,8.64397321 C7.50371869,8.95275452 7.1261183,9.10714286 6.6796875,9.10714286 C6.22953644,9.10714286 5.85007595,8.94903432 5.54129464,8.6328125 L4.39174107,7.47767857 C4.08295977,7.16889727 3.92857143,6.79129688 3.92857143,6.34486607 C3.92857143,5.8872745 4.09226027,5.4985135 4.41964286,5.17857143 L3.92857143,4.6875 C3.60862935,5.01488259 3.22172846,5.17857143 2.76785714,5.17857143 C2.32142634,5.17857143 1.94196585,5.02232299 1.62946429,4.70982143 L0.46875,3.54910714 C0.156248437,3.23660558 -8.52651283e-14,2.85714509 -8.52651283e-14,2.41071429 C-8.52651283e-14,1.96428348 0.158108538,1.58668309 0.474330357,1.27790179 L1.29464286,0.463169643 C1.60342416,0.154388337 1.98102455,1.42108547e-14 2.42745536,1.42108547e-14 C2.87760642,1.42108547e-14 3.25706691,0.158108538 3.56584821,0.474330357 L4.71540179,1.62946429 C5.02418309,1.93824559 5.17857143,2.31584598 5.17857143,2.76227679 C5.17857143,3.21986836 5.01488259,3.60862935 4.6875,3.92857143 L5.17857143,4.41964286 C5.4985135,4.09226027 5.8854144,3.92857143 6.33928571,3.92857143 C6.78571652,3.92857143 7.16517701,4.08481987 7.47767857,4.39732143 L8.63839286,5.55803571 Z",width:9.5,height:9.5},flourish_embed:{description:"Add Flourish embed",path:"M7.57358 5.28931L10.1281 6.04854L10.0432 6.517L7.37515 6.22624L9.44904 7.9224L9.20119 8.29833L6.86556 7.0207L8.11097 9.37696L7.7504 9.62552L6.06604 7.5604L6.34206 10.2078L5.89578 10.2926L5.11055 7.73772L4.36044 10.2926L3.89331 10.2078L4.16934 7.5604L2.50622 9.62552L2.12402 9.37696L3.38372 7.0207L1.04113 8.29833L0.793673 7.9224L2.88146 6.22624L0.213045 6.517L0.128113 6.04854L2.6479 5.28931L0.128113 4.53667L0.213045 4.06859L2.88146 4.35974L0.793673 2.66319L1.04113 2.28687L3.38372 3.56451L2.12402 1.20824L2.50622 0.960069L4.16934 3.02519L3.89331 0.377778L4.36044 0.292603L5.11055 2.84787L5.89578 0.292603L6.34206 0.377778L6.06604 3.02519L7.7504 0.960069L8.11097 1.20824L6.86556 3.56451L9.20119 2.28687L9.44904 2.66319L7.37515 4.35974L10.0432 4.06859L10.1281 4.53667L7.57358 5.28931Z",width:10,height:10}};function Xu(t,e){Wu=e||Gu;var n=At(Vu=_u({type:"div",attributes:{class:"text-editor-container settings-option"}})).select(".text-editor-container").html("");for(var r in n.append("div").attr("class","text-settings"),n.append("textarea").text(t.value).attr("class","text-input").on("blur",(function(){t.value=this.value,At(t).dispatch("change")})),Wu)Wu[r]&&Ju(r);(Wu.bindings||Wu.bindings_custom)&&(n.append("div").attr("class","text-bindings"),Ku()),Ve()}function Ju(t){if("bindings"!=t&&"bindings_custom"!=t){var e=At(Vu).select(".text-settings").append("div").attr("class","editor-section");if("style"==t){["h1","h2","bold","italic","line_break"].forEach((function(t){var n=Zu[t].description?Zu[t].description:"Add "+t+" text";e.append("div").attr("class","editor-button popup").attr("data-action",t).attr("data-popup-body",n).attr("data-popup-position","top").on("click",Qu).append("svg").attr("height",Zu[t].height).attr("width",Zu[t].width).attr("viewBox","0 0 "+Zu[t].width+" "+Zu[t].height).append("path").attr("fill","#333333").attr("d",Zu[t].path)}))}else{var n=Zu[t].description?Zu[t].description:"Add "+t;e.append("div").attr("class","editor-button popup").attr("data-action",t).attr("data-popup-body",n).attr("data-popup-position","top").on("click",Qu).append("svg").attr("height",Zu[t].height).attr("width",Zu[t].width).attr("viewBox","0 0 "+Zu[t].width+" "+Zu[t].height).append("path").attr("fill","#333333").attr("d",Zu[t].path)}}}function Ku(){if(Wu.bindings||Wu.bindings_custom){var t;if(Array.isArray(Wu.bindings))t={},Wu.bindings.forEach((function(e){var n=e.split("."),r=n[0],i=n.length>1?n[1]:null;i&&(t[r]||(t[r]=[]),t[r].push(i))}));else if(!0===Wu.bindings)t=null;else if(!Array.isArray(Wu.bindings_custom))return;var e=qu.visualisation.data_bindings[qu.visualisation.template_id],n={},r=[];qu.visualisation.data_tables.forEach((function(t){n[t.id]=t.cached_data[0]}));var i=null!==t;for(var o in e)if(!i||t[o]){var a=e[o];for(var s in a)if(!i||t[o].includes(s)){var l=a[s];if(null!=l.column){var u=n[l.data_table_id][l.column];u&&!r.includes(u)&&r.push(u)}else l.columns&&l.columns.forEach((function(t){var e=n[l.data_table_id][t];e&&!r.includes(e)&&r.push(e)}))}}Wu.bindings_custom&&Array.isArray(Wu.bindings_custom)&&Wu.bindings_custom.forEach((function(t){t[0]&&t[1]&&r.push({name:t[0],binding:t[1],type:"dynamic"})})),At(".text-bindings").html("").style("display",r.length?null:"none").append("p").text("Click to add values from your data"),At(".text-bindings").selectAll("button.binding").data(r).enter().append("button").attr("data-action","binding").attr("data-binding",(function(t){return"object"==typeof t?t.binding:t})).attr("data-type",(function(t){return"object"==typeof t?t.type:null})).on("click",Qu).text((function(t){return"object"==typeof t?t.name:t}))}}function Qu(){var t,e=At(".text-editor-container .text-input"),n=e.node().value,r=e.node().selectionStart,i=e.node().selectionEnd,o=i-r,a=n.substr(r,o),s=At(this).attr("data-action"),l="flourish_embed"==s?prompt("Specify the ID of published Flourish project (eg. story/123 or visualisation/124)","visualisation/"):"";if("bold"==s)t=tc(a,"","");else if("italic"==s)t=tc(a,"","");else if("h1"==s)t=tc(a,"

","

");else if("h2"==s)t=tc(a,"

","

");else if("line_break"==s)t=tc(a,"
","");else if("url"==s)t=tc(a,'',"",10);else if("flourish_embed"==s)t=tc(l,'');else if("binding"==s){var u=At(this).attr("data-binding");t=tc(u,"{{","}}",u.length+4)}e.node().setRangeText(t.text,r,i),e.node().focus(),e.node().selectionStart=r+t.cursor,e.node().selectionEnd=r+t.cursor}function tc(t,e,n,r){return e=e||"",n=n||"",t=t||"",{cursor:r||e.length+t.length,text:e+t+n}}var ec,nc,rc,ic={initialize:function(t,e,n){qu=t,At(e.parentElement).append("div").attr("class","text-editor-btn").attr("tabindex","0").on("click",(function(){Xu(e,n.editor)})).on("keydown",(function(t){13==t.keyCode&&Xu(e,n.editor)})).append("i").attr("class","fa fa-paint-brush")},updateDataBindings:Ku},oc=void 0,ac=/fa-(\S*)/g,sc=/^data:image\/(svg|svg\+xml|png|jpg);base64,[A-Z-a-z0-9+/=]*$/,lc=/^gradient:/g;function uc(t){var e=!At(t.parentNode).classed("open");Et(".template-settings .settings-block").classed("open",!1).attr("aria-expanded",!1),e&&At(t.parentNode).classed("open",!0).attr("aria-expanded",!0)}function cc(t){if(t){oc={};for(var e=0,n=null,r=null,i=ec&&ec.user?ec.user.template_settings_overrides:{},o=0;oBranding control: Add custom logos, colors, and styles to keep your projects consistent with your brand identity","Logo removal: Embed your projects without the Flourish logo appended","Team management: Seamlessly manage your team with our collaboration and approval features"]);var a=Math.floor(Math.random()*i.length),s=Math.floor(Math.random()*o.length),l="title"+a+"-list"+s,u=[{text:"Upgrade now",class:"convert",tag_name:"a",href:"https://flourish.studio/pricing",target:"_blank",keyCode:13,callback:function(){t.analytics("event","upgrade-click",{upgrade_id:l}),fs.logHistory({category:"upgrade",action:"clicked",detail:r})}},{text:"Maybe later",keyCode:27,class:"secondary",callback:function(){t.analytics("event","upgrade-close",{upgrade_id:l}),fs.logHistory({category:"upgrade",action:"closed",detail:r})}}];t.analytics("event","upgrade-open",{upgrade_id:l}),fs.logHistory({category:"upgrade",action:"viewed",detail:r}),Wi(e,n,{buttons:u,is_html:!0,upgrade:{message:i[a],list:o[s],is_business:!0}})}(ec,"This is a premium feature","Upgrade your plan to change this setting.","upgrade-settings")})),Ve()}}function dc(t,e,n){e.upgrade=e.property in n;var r="html"==e.type,i=e.choices&&("buttons"==e.style||"boolean"==e.type);t.attr("class","settings-option option-type-"+e.type+(i?" settings-buttons":"")+(r?" text-editor":"")+(e.upgrade?" upgrade-setting":""));var o=t.append("label").attr("for","setting-"+e.property).classed("hidden",null==e.name).append("h3").text(e.name).classed("no-select",!0);(e.upgrade||e.description)&&o.append("i").style("font-family","FontAwesome").classed("fa setting-tooltip popup",!0).classed("fa-star tooltip-upgrade",e.upgrade).classed("fa-question tooltip-help",!e.upgrade).style("background-color",e.upgrade?"#93366e":null).attr("tabindex","0").attr("data-popup-head",e.upgrade?"This is a premium feature":null).attr("data-popup-body",e.description?e.description.replace(/\[\[/g,"").replace(/\]\]/g,""):null).attr("data-popup-allow-interaction",!0).attr("data-popup-constrainer",".settings-block"),e.width&&t.classed("width-"+e.width.replace(/ /g,"-"),!0);var a="input";if(["text","code","html"].includes(e.type)&&(a="textarea"),"code"==e.type){var s=!1;t.append("i").attr("class","popup fa fa-reply clickable wrap-control").attr("data-popup-body","Wrap/unwrap text").attr("data-popup-position","top").on("click",(function(){s=!s,At(this.parentNode).select("textarea").attr("wrap",s?null:"off"),At(this).classed("selected",s)}))}var l=t.append(a).attr("id","setting-"+e.property).attr("class","setting").attr("name",e.property).attr("disabled",!ec.visualisation.can_edit||null),u=l.node();if("colors"==e.type)Yu.initialize(u,e);else if("font"==e.type)Ya.initialize(u,e,ec.user&&null!=ec.user.company_id);else if("number"==e.type)u.setAttribute("type","number"),null!=e.min&&u.setAttribute("min",e.min),null!=e.max&&u.setAttribute("max",e.max),e.step&&u.setAttribute("step",e.step);else if("url"==e.type)u.setAttribute("type","url"),nc.addButton(u,e.upgrade);else if(i){l.remove(),l=t.append("div").attr("id","setting-"+e.property).attr("name",e.property).classed("buttons-container",!0).classed("large","large"==e.size),u=l.node();var c=e.choices.length,d=[3,4,5],p=function(){if(c<=2)return{column_count:c,rows:1};var t=d.map((function(t){return{column_count:t,orphans:c%t/t,rows:c/t}})).filter((function(t){return t.rows>=1})).sort((function(t,e){return t.rows>e.rows?1:t.rows1?e[0]:0===e.length?t.sort((function(t,e){return t.orphans>e.orphans?-1:t.orphans1?0===n?"3px 0 0 0":n===t-1?"0 3px 0 0":n===c-(t-r)?"0 0 0 3px":n===c-1&&0===r?"0 0 3px 0":null:null})).node())}))}else"boolean"==e.type?(u.setAttribute("type","checkbox"),t.classed("slider-container",!0),t.append("label").attr("class","slider").attr("for","setting-"+e.property)):u.setAttribute("type","text");if("code"==e.type&&(u.setAttribute("wrap","off"),l.on("keydown.tab",(function(t){var e=t;if(9===e.keyCode&&!(e.altKey||e.metaKey||e.ctrlKey||e.shiftKey)){e.preventDefault();var n=this.selectionStart;this.value=this.value.substring(0,n)+"\t"+this.value.substring(this.selectionEnd),this.selectionEnd=n+1}}))),r&&(t.append("div").attr("class","text-editor-setting").node().appendChild(u),ic.initialize(ec,u,e)),e.choices&&"string"==e.type&&"buttons"!=e.style&&(u._dropdown=new Zi({input:u,id:e.property+"-dropdown",options:e.choices,options_config:{allow_other_option:e.choices_other,custom_renderer:mc},mode:"single"})),"color"==e.type){At(u).classed("color",!0).style("display","none");var f=At(u.parentNode).append("div").attr("class","color-picker"),h=f.append("div").attr("class","color-wrapper");e.optional&&f.append("div").attr("class","cancel-setting popup").attr("tabindex","0").html("").attr("data-popup-body","If cleared, the color will be set automatically based on the theme or context").on("click keydown",(function(t){t.keyCode&&13!==t.keyCode||(u.value="",l.dispatch("change"),At(this.parentNode).classed("is-null",!0))})),h.append("input").attr("type","color").on("change",(function(){u.value=this.value,l.dispatch("change"),At(this.parentNode.parentNode).classed("is-null",!1)})).on("focus",(function(){At(this.parentNode.parentNode).classed("active",!0)})).on("blur",(function(){At(this.parentNode.parentNode).classed("active",!1)}))}e.placeholder&&u.setAttribute("placeholder",e.placeholder),e.size&&u.classList.add("size-"+e.size),l.call(pc(e))}function pc(t){return function(e){var n=!1;e.on("change",(function(){var e=this;Re.hide(),n=!0,ec.preview_pane.getState(t.property,(function(r,i){return r?(console.error("Failed to get state property "+t.property,r),void(n=!1)):function(t,e){if("number"!==e.type)return!0;if(""===t.value)return!!e.optional||(Re.point(t).text("A value is required").draw(),!1);var n=parseFloat(t.value);return e.hasOwnProperty("min")&&ne.max&&(Re.point(t).text("Value cannot be greater than "+e.max).draw(),t.value=e.max),!0}(e,t)?void function(t,e,n){r=e.property,i=100,o=gc,a=[t,e,n],clearTimeout(hs[r]),hs[r]=setTimeout((function(){o.apply(window,a),delete hs[r]}),i);var r,i,o,a}(e,t,(function(r){if(!r)return n=!1,void("SELECT"==e.tagName&&At(e).dispatch("blur"));var o="radio"==e.type?e.nextSibling:e;Re.point(o).text("Not changed: "+(r.message||r)).draw();var a={};a[t.property]=i,ec.preview_pane.setState(a,(function(r){if(r)return console.error("Failed to revert setting "+t.property+" to value: "+i),void(n=!1);ec.preview_pane.update((function(r){if(r)return console.error("Failed to update after reverting setting "+t.property+" to value: "+i),void(n=!1);hc(e,i),n=!1}))}))})):(e.value=i,void(n=!1))}))})).on("keydown",(function(t){ec.confirm.blank(),13==t.keyCode&&Re.hide()})).on("blur",(function(){if(!n){var e=this;Re.hide(),ec.preview_pane.getState(t.property,(function(n,r){n?console.error("Failed to get state property "+t.property,n):hc(e,r)}))}}))}}function fc(t,e,n){if(t.classList.contains("colors"))return Yu.getValue(t);if(t.classList.contains("font-menu")){var r=Ya.getValue(t);return e&&!r?n?null:"":r}if(t.classList.contains("buttons-container")){for(var i,o=t.querySelectorAll("input[type='radio']"),a=0;a-1){var s=t.querySelectorAll("input[type='radio']");for(r=0;r=4)return;for(var n=null,r=ec.template_data_bindings,i=0;i h2, .settings-option:not(.hidden) h3, .settings-subhead:not(.hidden)");At(".side-panel .template-settings").selectAll(".settings-block:not(.hidden) > h2, .settings-option:not(.hidden), .settings-subhead:not(.hidden), .settings-divider:not(.hidden)").classed("search-filtered-out",!i),i||o.filter((function(){var t=e(this.innerText);return!!t&&t.indexOf(r)>-1})).each((function(){var e=t(this,"settings-block"),n=At(this);if("H2"==this.tagName)e&&At(e).selectAll("h2, .settings-option, .settings-subhead, .settings-divider").classed("search-filtered-out",!1);else if("H3"==this.tagName)if(e&&At(e).select("h2").classed("search-filtered-out",!1),n.classed("settings-subhead")){n.classed("search-filtered-out",!1),this.previousSibling.classList.remove("search-filtered-out");for(var r=this.nextSibling;r&&r.classList.contains("settings-option");)r.classList.remove("search-filtered-out"),r=r.nextSibling}else{var i=t(this,"settings-option");if(i){i.classList.remove("search-filtered-out");for(var o=null,a=i.previousSibling;a&&null==o;)a.classList.contains("settings-subhead")?o=a:a=a.classList.contains("settings-divider")?null:a.previousSibling;o&&(o.classList.remove("search-filtered-out"),o.previousSibling.classList.remove("search-filtered-out"))}}}))}))}(),At(".side-panel-scrollbox").on("scroll",(function(){Re.hide()})),{update:function(t){rc.html(""),At(".current-template").style("opacity","1"),cc(ec.settings=t)},populate:function(){ec.preview_pane.getState((function(t,e){if(t)console.error("Failed to get state",t);else{var n=qo(e);for(var r in n){var i=document.getElementById("setting-"+r);i&&hc(i,n[r])}ic.updateDataBindings(),bc()}}))},getSettingsForCurrentTemplate:function(){return oc},setReadOnly:function(){Et(".setting").each((function(){At(this).attr("disabled",!0)}))},unsetReadOnly:function(){Et(".setting").each((function(){At(this).attr("disabled",null)}))}}}var wc,xc,Cc=!1,Ac=[];function kc(){At(".flourish-warn-list").classed("visible",!1),Cc=!1}function Ec(){return At(".flourish-warn-btn").on("click",(function(){Cc?kc():(At(".flourish-warn-list").classed("visible",!0),Cc=!0)})),{clear:Lc,warn:Dc}}function Tc(){At(".flourish-warn-container").classed("visible",Ac.length),Ac.length>100&&(Ac.length=100);var t=At(".flourish-warn-list ul").selectAll("li").data(Ac),e=t.enter().append("li");e.append("i").attr("class","fa fa-warning"),e.append("p").attr("class","message"),e.append("p").attr("class","explanation");var n=t.merge(e);n.select(".message").text((function(t){return t.message||""})),n.select(".explanation").text((function(t){return t.explanation||""})),t.exit().remove()}function Lc(){Ac=[],Tc(),kc()}function Dc(t){Ac.unshift(t),Tc()}function Fc(t){var e=wc.visualisation,n=e.getTemplate(),r=!1,i=!1,o=!1;function a(){var e=wc.template_settings.getSettingsForCurrentTemplate(),n=wc.visualisation.settingsForCurrentTemplate(),r={};for(var i in n)i in e&&(r[i]=n[i]);xc.loadVisualisation(wc,r,(function(){wc.template_settings.populate(),wc.data_bindings.updateRequiredBindingsOverlay(!1),xa(),t&&t()})),St()}n.getSettings((function(t,e){t?console.error("Failed to get template settings: "+t):(wc.template_settings.update(e),r=!0,i&&o&&a())})),n.getDataBindings((function(t,e){t?console.error("Failed to get template data bindings: "+t):(wc.data_bindings.update(e),i=!0,r&&o&&a())})),e.refreshDataBindings((function(t){t?console.error("Failed to get template data bindings: "+t):(o=!0,i&&r&&a())}))}function Sc(t){xc.updateData(wc.visualisation,t)}function Mc(t){xc.updateDataNotPreview(wc.visualisation,t)}function Nc(t){wc=t;var e=Ec();return{loadTemplate:Fc,updateData:Sc,updateDataNotPreview:Mc,sync:(xc=_a("iframe#preview","editor",wc,e,{setSetting({name:t,value:e}){const n=function(t){return document.getElementById("setting-"+t)}(t);n?(hc(n,e),n.dispatchEvent(new Event("change"))):console.log(`Could not find setting ${t}`)}})).sync,setState:xc.setState,getState:xc.getState,hasData:xc.hasData,setData:xc.setData,getData:xc.getData,draw:xc.draw,update:xc.update,getDefaultState:xc.getDefaultState,snapshot:xc.snapshot,setFixedHeight:xc.setFixedHeight,resize:xc.resize,getDrawCalled:xc.getDrawCalled,setDrawCalled:xc.setDrawCalled}}var Uc={},Oc={};function Bc(t){return new Function("d","return {"+t.map((function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'})).join(",")+"}")}function Hc(t){var e=Object.create(null),n=[];return t.forEach((function(t){for(var r in t)r in e||n.push(e[r]=r)})),n}function Rc(t,e){var n=t+"",r=n.length;return r9999?"+"+Rc(t,6):Rc(t,4)}(t.getUTCFullYear())+"-"+Rc(t.getUTCMonth()+1,2)+"-"+Rc(t.getUTCDate(),2)+(i?"T"+Rc(e,2)+":"+Rc(n,2)+":"+Rc(r,2)+"."+Rc(i,3)+"Z":r?"T"+Rc(e,2)+":"+Rc(n,2)+":"+Rc(r,2)+"Z":n||e?"T"+Rc(e,2)+":"+Rc(n,2)+"Z":"")}var Ic=function(t){var e=new RegExp('["'+t+"\n\r]"),n=t.charCodeAt(0);function r(t,e){var r,i=[],o=t.length,a=0,s=0,l=o<=0,u=!1;function c(){if(l)return Oc;if(u)return u=!1,Uc;var e,r,i=a;if(34===t.charCodeAt(i)){for(;a++=o?l=!0:10===(r=t.charCodeAt(a++))?u=!0:13===r&&(u=!0,10===t.charCodeAt(a)&&++a),t.slice(i+1,e-1).replace(/""/g,'"')}for(;a{if(t)return console.error("Failed to update preview pane: "+t)}))}))},requiredBindingsAreUnset:po,updateRequiredBindingsOverlay:fo}),this.preview_pane=Nc(this),this.responsive_menu=Ft(this),this.confirm={on:i,blank:i,saved:i,saving:i,error:i},this.analytics=i,this.tour={fireEvent:i},window.addEventListener("hashchange",(()=>{this.loadFromUrlHash()}))}$c.prototype.getColumnTypes=function(t){us({url:this.api_prefix+"/"+this.id,method:"GET",callback:function(e,n){if(e)return t(e);t(void 0,qc(n.column_types||[]))}},"load-data")},$c.prototype.csv=function(t,e=null){this.cached_data?t(void 0,qc(this.cached_data)):this.csvPromise(e).then((e=>t(null,e)),(e=>t(e)))},$c.prototype.csvPromise=async function(t=null){if(this.cached_data)return qc(this.cached_data);const e=this;let n=this.api_prefix+"/"+this.id+"/csv";return t&&(n="/api/slide/"+t+"/data_table/"+this.id+"/csv"),new Promise(((t,r)=>{us({url:n,response_type:"text/csv; charset=utf-8",method:"GET",callback(n,i){if(n)return r(n);e.cached_data=zc(i),t(qc(e.cached_data))}},"load-data")}))},$c.prototype.saveData=function(t,e){var n=this,r=Ii(qc(t));us({url:this.api_prefix+"/"+this.id+"/csv",payload:function(){return{version_number:n.getVersionNumber(),data:Pc(r)}},callback:function(t,i){if(t)return e(t);n.setVersionNumber(i.version_number),n.cached_data=r,e(void 0)}})},$c.prototype.updateFromUrl=function(t,e){var n=this;us({url:this.api_prefix+"/"+this.id+"/csv-url",payload:function(){return{live_csv_url:t,version_number:n.getVersionNumber()}},callback:function(r,i){if(r)return e(r);n.setVersionNumber(i.version_number),n.live_csv_url=t,t?n.updateFromLiveCsvUrl((function(t,r){if(t)return n.last_remote_data_error_message=t,e(t);var i=function(t){Ii(t);for(let e of t)for(let t=0;t1||e.getDataTables((function(t,n){if(t){for(var r=0;r{n.call(r,...t,(function(t,n){if(t)return i(t);e(n)}))}))});var n,r;try{const n=await e(t,this.public_url_prefix);this.updateFromJson(n)}catch(t){console.error(t)}},Jc.prototype.updateFromJson=function({state:t,bindings:e,data:n}){const r={};for(const[t,i]of Object.entries(e)){const e={},a={};for(const[t,n]of Object.entries(i))Array.isArray(n)?a[t]=n:e[t]=n;const s=o(n[t],e,a);r[t]=s}const i={};Xc(i,this.preview_pane.getDefaultState()),Xc(i,t),this.preview_pane.sync({state:i,data:r,overwrite_state:!0,update:!0},(()=>this.template_settings.populate()))};var Kc={},Qc={};function td(t){return new Function("d","return {"+t.map((function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'})).join(",")+"}")}function ed(t){var e=Object.create(null),n=[];return t.forEach((function(t){for(var r in t)r in e||n.push(e[r]=r)})),n}function nd(t,e){var n=t+"",r=n.length;return r9999?"+"+nd(t,6):nd(t,4)}(t.getUTCFullYear())+"-"+nd(t.getUTCMonth()+1,2)+"-"+nd(t.getUTCDate(),2)+(i?"T"+nd(e,2)+":"+nd(n,2)+":"+nd(r,2)+"."+nd(i,3)+"Z":r?"T"+nd(e,2)+":"+nd(n,2)+":"+nd(r,2)+"Z":n||e?"T"+nd(e,2)+":"+nd(n,2)+"Z":"")}var id=function(t){var e=new RegExp('["'+t+"\n\r]"),n=t.charCodeAt(0);function r(t,e){var r,i=[],o=t.length,a=0,s=0,l=o<=0,u=!1;function c(){if(l)return Qc;if(u)return u=!1,Kc;var e,r,i=a;if(34===t.charCodeAt(i)){for(;a++=o?l=!0:10===(r=t.charCodeAt(a++))?u=!0:13===r&&(u=!0,10===t.charCodeAt(a)&&++a),t.slice(i+1,e-1).replace(/""/g,'"')}for(;a=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function vd(t,e){for(var n,r=0,i=t.length;r0)for(var n,r,i=new Array(n),o=0;o=200&&r<300||304===r){if(i)try{e=i.call(n,l)}catch(t){return void a.call("error",n,t)}else e=l;a.call("load",n,e)}else a.call("error",n,t)}if("undefined"!=typeof XDomainRequest&&!("withCredentials"in l)&&/^(http(s)?:)?\/\//.test(t)&&(l=new XDomainRequest),"onload"in l?l.onload=l.onerror=l.ontimeout=p:l.onreadystatechange=function(t){l.readyState>3&&p(t)},l.onprogress=function(t){a.call("progress",n,t)},n={header:function(t,e){return t=(t+"").toLowerCase(),arguments.length<2?s.get(t):(null==e?s.remove(t):s.set(t,e+""),n)},mimeType:function(t){return arguments.length?(r=null==t?null:t+"",n):r},responseType:function(t){return arguments.length?(o=t,n):o},timeout:function(t){return arguments.length?(d=+t,n):d},user:function(t){return arguments.length<1?u:(u=null==t?null:t+"",n)},password:function(t){return arguments.length<1?c:(c=null==t?null:t+"",n)},response:function(t){return i=t,n},get:function(t,e){return n.send("GET",t,e)},post:function(t,e){return n.send("POST",t,e)},send:function(e,i,p){return l.open(e,t,!0,u,c),null==r||s.has("accept")||s.set("accept",r+",*/*"),l.setRequestHeader&&s.each((function(t,e){l.setRequestHeader(e,t)})),null!=r&&l.overrideMimeType&&l.overrideMimeType(r),null!=o&&(l.responseType=o),d>0&&(l.timeout=d),null==p&&"function"==typeof i&&(p=i,i=null),null!=p&&1===p.length&&(p=function(t){return function(e,n){t(null==e?n:null)}}(p)),null!=p&&n.on("error",p).on("load",(function(t){p(null,t)})),a.call("beforesend",n,l),l.send(null==i?null:i),n},abort:function(){return l.abort(),n},on:function(){var t=a.on.apply(a,arguments);return t===a?n:t}},null!=e){if("function"!=typeof e)throw new Error("invalid callback: "+e);return n.get(e)}}(this.api_prefix+"/"+this.id+"/csv",(function(n,r){e.cached_data=od(r.response),t(void 0,_d(e.cached_data))}))}},bd.prototype.saveData=function(t,e){e()},bd.prototype.save=function(t,e){e()},bd.prototype.delete=function(t){t()},wd.prototype.getSettings=function(t){t(void 0,window.Flourish.app.settings)},wd.prototype.getDataBindings=function(t){t(void 0,window.Flourish.app.template_data_bindings)},wd.prototype.refreshDataBindings=function(t){t(void 0)},xd.prototype.save=function(t,e){this.version_number++,e(void 0)},xd.prototype.getTemplate=function(){return this.template_id?(this._template&&this.template_id==this._template.id||(this._template=new wd(this.template_id)),this._template):null},xd.prototype.settingsForCurrentTemplate=function(){return this.settings&&this.template_id in this.settings?this.settings[this.template_id]:{}},xd.prototype.dataBindingsForCurrentTemplate=function(){return this.data_bindings&&this.template_id in this.data_bindings?this.data_bindings[this.template_id]:{}},xd.prototype.refreshDataBindings=function(t){t()},xd.prototype.updateDataBindings=function(t,e){var n=this;n.version_number++,n.data_bindings||(n.data_bindings={}),n.template_id in n.data_bindings||(n.data_bindings[n.template_id]={});var r=n.data_bindings[n.template_id];for(var i in t)for(var o in t[i]){var a=t[i][o];r[i][o]=a}e(void 0)},xd.prototype.updateSettings=function(t,e){var n=this;n.version_number++,n.settings||(n.settings={}),n.template_id in n.settings||(n.settings[n.template_id]={});var r=n.settings[n.template_id];for(var i in t){var o=t[i];r[i]=o}e(void 0)},xd.prototype.getDataTables=function(t){t(void 0,window.Flourish.app.data_tables)},xd.prototype.dataTables=function(t){var e=this;e.data_tables?t(void 0,e.data_tables):(e.after_loading_data_tables||(e.after_loading_data_tables=[]),e.after_loading_data_tables.push(t),e.after_loading_data_tables.length>1||e.getDataTables((function(t,n){if(t){for(var r=0;r=0}function n(t,e,n){return t.map((function(t){var r={};return Object.keys(e).forEach((function(n){r[n]=t[e[n]]})),Object.keys(n).forEach((function(e){var i=n[e];Array.isArray(i)||(i=[i]),r[e]=i.map((function(e){return t[e]}))})),r}))}function r(t,e,r){var i=n(t,e=e||{},r=r||{});return i.column_names={},Object.keys(e).forEach((function(t){i.column_names[t]=e[t]})),Object.keys(r).forEach((function(t){var e=r[t];i.column_names[t]=Array.isArray(e)?e:[e]})),i}function i(t,r,i){!function(t,n){var r;if(!Object.keys(t).every((function(n){return e(t[n])})))throw r="All column_bindings values should be non-negative integers",new TypeError(r);if(!Object.keys(n).every((function(t){var r=n[t];return Array.isArray(r)?r.every(e):e(r)})))throw r="All columns_bindings values should be non-negative integers or arrays thereof",new TypeError(r)}(r=r||{},i=i||{});var o=t[0],a=n(t.slice(1),r,i);return a.column_names={},Object.keys(r).forEach((function(t){a.column_names[t]=o[r[t]]})),Object.keys(i).forEach((function(t){var e=i[t];a.column_names[t]=(Array.isArray(e)?e:[e]).map((function(t){return o[t]}))})),a}function o(t,e,n){return(Array.isArray(t[0])?i:r)(t,e,n)}const a=window.sessionStorage;let s,u,l=!1;function c(){const t=document.querySelector(".settings-block[aria-expanded=true] > h2"),e=document.querySelector("#editor-custom"),n=document.querySelector("#editor-custom-width"),r=document.querySelector("#editor-custom-height"),i=e.classList.contains("selected"),o=parseFloat(n.value),a=i?parseFloat(r.value):"auto";return{template_store_key:s.visualisation.template_store_key,setting_expanded:t&&t.innerText,width:o||800,height:a||"auto",settings:s.visualisation.settings}}function f(){return u}function d(){p(!1),a.removeItem(s.store_key)}function p(t){l=t}function h(){const t=s.visualisation.template_store_key,e=a.getItem(s.store_key),n=JSON.parse(e);return n&&n.template_store_key===t?n:null}function m(){const t=f();s.visualisation.settings=t.settings,v()}function g(){const t=Boolean(h());p(!0),function(){const t=document.querySelector("iframe#preview").contentWindow;t.addEventListener("beforeunload",b),t.addEventListener("keyup",b),t.addEventListener("pointerup",b)}(),v(),s.logInfo("Settings restored."),s.showStatusMessage(t?"Settings restored.":"Settings reset to defaults.")}function v(){const t=f(),e=[...document.querySelectorAll(".settings-block[aria-expanded=false] > h2")].find((e=>e.innerText===t.setting_expanded));e&&e.click()}function y(){const t=f();return{width:t.width,height:t.height}}function _(){var t;u=c(),t=u,a.setItem(s.store_key,JSON.stringify(t))}function b(){l&&_()}function w(t){return s=t,u=h()||c(),window.addEventListener("beforeunload",b),window.addEventListener("keyup",b),window.addEventListener("pointerup",b),{getPreviewSize:y,clearSession:d,prepareSession:m,applySession:g}}var x="http://www.w3.org/1999/xhtml",T={svg:"http://www.w3.org/2000/svg",xhtml:x,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function C(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),T.hasOwnProperty(e)?{space:T[e],local:t}:t}function A(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===x&&e.documentElement.namespaceURI===x?e.createElement(t):e.createElementNS(n,t)}}function E(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function D(t){var e=C(t);return(e.local?E:A)(e)}function k(){}function S(t){return null==t?k:function(){return this.querySelector(t)}}function M(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function F(){return[]}function L(t){return null==t?F:function(){return this.querySelectorAll(t)}}function N(t){return function(){return this.matches(t)}}function U(t){return function(e){return e.matches(t)}}var O=Array.prototype.find;function R(){return this.firstElementChild}var H=Array.prototype.filter;function I(){return this.children}function B(t){return new Array(t.length)}function j(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function Y(t,e,n,r,i,o){for(var a,s=0,u=e.length,l=o.length;se?1:t>=e?0:NaN}function q(t){return function(){this.removeAttribute(t)}}function V(t){return function(){this.removeAttributeNS(t.space,t.local)}}function W(t,e){return function(){this.setAttribute(t,e)}}function G(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Z(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function X(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function J(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Q(t){return function(){this.style.removeProperty(t)}}function K(t,e,n){return function(){this.style.setProperty(t,e,n)}}function tt(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function et(t,e){return t.style.getPropertyValue(e)||J(t).getComputedStyle(t,null).getPropertyValue(e)}function nt(t){return function(){delete this[t]}}function rt(t,e){return function(){this[t]=e}}function it(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function ot(t){return t.trim().split(/^|\s+/)}function at(t){return t.classList||new st(t)}function st(t){this._node=t,this._names=ot(t.getAttribute("class")||"")}function ut(t,e){for(var n=at(t),r=-1,i=e.length;++r=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Mt,Ft,Lt,Nt,Ut,Ot=[null];function Rt(t,e){this._groups=t,this._parents=e}function Ht(){return new Rt([[document.documentElement]],Ot)}function It(t){return"string"==typeof t?new Rt([[document.querySelector(t)]],[document.documentElement]):new Rt([[t]],Ot)}function Bt(t){return It(D(t).call(document.documentElement))}function jt(t){return"string"==typeof t?new Rt([document.querySelectorAll(t)],[document.documentElement]):new Rt([null==t?[]:M(t)],Ot)}function Yt(){if(!Lt)return null;var t=Lt.nodes()[1].value;if("custom"===Nt&&""!=t){var e=parseInt(t,10);return isNaN(e)?null:e}return null}function zt(){Ut&&Ut.preview_pane&&Ut.preview_pane.setFixedHeight&&Ut.preview_pane.setFixedHeight(Yt())}function Pt(t,e=!1,n=null){if(Nt=t,n||zt(),"custom"===t){let t=parseFloat(n?.width),e=parseFloat(n?.height);t&&(t=Math.round(t),Lt.nodes()[0].value=t,It(".preview-holder").style("max-width",t+"px")),e?(e=Math.round(e),Lt.nodes()[1].value=e,It("iframe").style("height",e+"px"),Ut.preview_pane.setFixedHeight(e)):zt(),It("#editor-custom-inputs").style("opacity",1),It(".preview-holder").style("width",Lt.nodes()[0].value+"px").select("iframe").style("width",Lt.nodes()[0].value+"px")}else It("#editor-custom-inputs").style("opacity",0),It(".preview-holder").attr("style",null).select("iframe").style("width",null);e||It(".preview-holder").style("max-width","none"),jt("#preview-menu .preview-mode").classed("selected",(function(){return this.id=="editor-"+t})),It("#editor-rotate").classed("active",(function(){return"auto"!==t})),It(".row.editor").classed("mobile",(function(){return"mobile"==t})),It(".row.editor").classed("tablet",(function(){return"tablet"==t})),It(".preview-holder").on("webkitTransitionEnd transitionend oTransitionEnd MSTransitionEnd transitionend",qt),Mt=t}function $t(t,e){return Ut=t,Lt=jt("#editor-custom-inputs input"),qt(),jt("#preview-menu .preview-mode").on("click",(function(){Pt(this.getAttribute("data-target"))})),Lt.on("change",(function(){Pt(this.getAttribute("data-target"))})),e?Pt("custom",!0,e):Pt("auto",!0),function(){var t,e,n=document.querySelector("#resize-handle"),r=document.querySelector(".preview-holder");function i(i){"editor-custom"!==i.target.parentElement.id&&(t=r.getBoundingClientRect().width,n.parentElement.parentElement.querySelector("#resize-overlay").classList.add("dragging"),n.parentElement.classList.add("dragging"),e=i.clientX,It(".preview-holder").style("transition","none"),Pt("custom"),document.addEventListener("mousemove",o),document.addEventListener("mouseup",a),i.preventDefault())}function o(n){var i=n.clientX-e,o=t+2*i;r.style.width=o+"px",r.querySelector("iframe").style.width=o-4+"px",qt(),Ut.preview_pane.resize()}function a(){t=r.getBoundingClientRect().width,It(".preview-holder").style("transition",null),n.parentElement.parentElement.querySelector("#resize-overlay").classList.remove("dragging"),n.parentElement.classList.remove("dragging"),qt(),Ut.preview_pane.resize(),document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",a)}n.addEventListener("mousedown",i)} +/*! @license DOMPurify | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.2.2/LICENSE */(),window.innerWidth<=768&&(Ft="auto"),window.addEventListener("resize",(function(){Mt&&qt(),window.innerWidth<=768?Ft||(Ft=Mt,Pt("auto")):Ft&&(Pt(Ft),Ft=null),Ut.preview_pane.resize()})),{getHeightSetting:Yt,selectPreviewState:Pt}}function qt(){var t=It(".preview-holder").node().getBoundingClientRect();Lt.nodes()[0].value=Math.round(t.width),""!==Lt.nodes()[1].value&&"custom"===Nt&&(Lt.nodes()[1].value=Math.round(t.height))}Rt.prototype=Ht.prototype={constructor:Rt,select:function(t){"function"!=typeof t&&(t=S(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i=w&&(w=b+1);!(_=v[w])&&++w=0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=$);for(var n=this._groups,r=n.length,i=new Array(r),o=0;o1?this.each((null==e?Q:"function"==typeof e?tt:K)(t,e,null==n?"":n)):et(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?nt:"function"==typeof e?it:rt)(t,e)):this.node()[t]},classed:function(t,e){var n=ot(t+"");if(arguments.length<2){for(var r=at(this.node()),i=-1,o=n.length;++i=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}(t+""),a=o.length;if(!(arguments.length<2)){for(s=e?Et:At,r=0;r1?n-1:0),i=1;i/gm),Fe=Qt(/^data-[\-\w.\u00B7-\uFFFF]/),Le=Qt(/^aria-[\-\w]+$/),Ne=Qt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Ue=Qt(/^(?:\w+script|data):/i),Oe=Qt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Re="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function He(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e0&&void 0!==arguments[0]?arguments[0]:Ie(),n=function(e){return t(e)};if(n.version="2.2.8",n.removed=[],!e||!e.document||9!==e.document.nodeType)return n.isSupported=!1,n;var r=e.document,i=e.document,o=e.DocumentFragment,a=e.HTMLTemplateElement,s=e.Node,u=e.Element,l=e.NodeFilter,c=e.NamedNodeMap,f=void 0===c?e.NamedNodeMap||e.MozNamedAttrMap:c,d=e.Text,p=e.Comment,h=e.DOMParser,m=e.trustedTypes,g=u.prototype,v=ve(g,"cloneNode"),y=ve(g,"nextSibling"),_=ve(g,"childNodes"),b=ve(g,"parentNode");if("function"==typeof a){var w=i.createElement("template");w.content&&w.content.ownerDocument&&(i=w.content.ownerDocument)}var x=function(t,e){if("object"!==(void 0===t?"undefined":Re(t))||"function"!=typeof t.createPolicy)return null;var n=null,r="data-tt-policy-suffix";e.currentScript&&e.currentScript.hasAttribute(r)&&(n=e.currentScript.getAttribute(r));var i="dompurify"+(n?"#"+n:"");try{return t.createPolicy(i,{createHTML:function(t){return t}})}catch(t){return console.warn("TrustedTypes policy "+i+" could not be created."),null}}(m,r),T=x&&tt?x.createHTML(""):"",C=i,A=C.implementation,E=C.createNodeIterator,D=C.createDocumentFragment,k=r.importNode,S={};try{S=ge(i).documentMode?i.documentMode:{}}catch(t){}var M={};n.isSupported="function"==typeof b&&A&&void 0!==A.createHTMLDocument&&9!==S;var F=Se,L=Me,N=Fe,U=Le,O=Ue,R=Oe,H=Ne,I=null,B=me({},[].concat(He(ye),He(_e),He(be),He(xe),He(Ce))),j=null,Y=me({},[].concat(He(Ae),He(Ee),He(De),He(ke))),z=null,P=null,$=!0,q=!0,V=!1,W=!1,G=!1,Z=!1,X=!1,J=!1,Q=!1,K=!0,tt=!1,et=!0,nt=!0,rt=!1,it={},ot=me({},["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"]),at=null,st=me({},["audio","video","img","source","image","track"]),ut=null,lt=me({},["alt","class","for","id","label","name","pattern","placeholder","summary","title","value","style","xmlns"]),ct="http://www.w3.org/1998/Math/MathML",ft="http://www.w3.org/2000/svg",dt="http://www.w3.org/1999/xhtml",pt=dt,ht=null,mt=i.createElement("form"),gt=function(t){ht&&ht===t||(t&&"object"===(void 0===t?"undefined":Re(t))||(t={}),t=ge(t),I="ALLOWED_TAGS"in t?me({},t.ALLOWED_TAGS):B,j="ALLOWED_ATTR"in t?me({},t.ALLOWED_ATTR):Y,ut="ADD_URI_SAFE_ATTR"in t?me(ge(lt),t.ADD_URI_SAFE_ATTR):lt,at="ADD_DATA_URI_TAGS"in t?me(ge(st),t.ADD_DATA_URI_TAGS):st,z="FORBID_TAGS"in t?me({},t.FORBID_TAGS):{},P="FORBID_ATTR"in t?me({},t.FORBID_ATTR):{},it="USE_PROFILES"in t&&t.USE_PROFILES,$=!1!==t.ALLOW_ARIA_ATTR,q=!1!==t.ALLOW_DATA_ATTR,V=t.ALLOW_UNKNOWN_PROTOCOLS||!1,W=t.SAFE_FOR_TEMPLATES||!1,G=t.WHOLE_DOCUMENT||!1,J=t.RETURN_DOM||!1,Q=t.RETURN_DOM_FRAGMENT||!1,K=!1!==t.RETURN_DOM_IMPORT,tt=t.RETURN_TRUSTED_TYPE||!1,X=t.FORCE_BODY||!1,et=!1!==t.SANITIZE_DOM,nt=!1!==t.KEEP_CONTENT,rt=t.IN_PLACE||!1,H=t.ALLOWED_URI_REGEXP||H,pt=t.NAMESPACE||pt,W&&(q=!1),Q&&(J=!0),it&&(I=me({},[].concat(He(Ce))),j=[],!0===it.html&&(me(I,ye),me(j,Ae)),!0===it.svg&&(me(I,_e),me(j,Ee),me(j,ke)),!0===it.svgFilters&&(me(I,be),me(j,Ee),me(j,ke)),!0===it.mathMl&&(me(I,xe),me(j,De),me(j,ke))),t.ADD_TAGS&&(I===B&&(I=ge(I)),me(I,t.ADD_TAGS)),t.ADD_ATTR&&(j===Y&&(j=ge(j)),me(j,t.ADD_ATTR)),t.ADD_URI_SAFE_ATTR&&me(ut,t.ADD_URI_SAFE_ATTR),nt&&(I["#text"]=!0),G&&me(I,["html","head","body"]),I.table&&(me(I,["tbody"]),delete z.tbody),Jt&&Jt(t),ht=t)},vt=me({},["mi","mo","mn","ms","mtext"]),yt=me({},["foreignobject","desc","title","annotation-xml"]),_t=me({},_e);me(_t,be),me(_t,we);var bt=me({},xe);me(bt,Te);var wt=function(t){ae(n.removed,{element:t});try{t.parentNode.removeChild(t)}catch(e){try{t.outerHTML=T}catch(e){t.remove()}}},xt=function(t,e){try{ae(n.removed,{attribute:e.getAttributeNode(t),from:e})}catch(t){ae(n.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t&&!j[t])if(J||Q)try{wt(e)}catch(t){}else try{e.setAttribute(t,"")}catch(t){}},Tt=function(t){var e=void 0,n=void 0;if(X)t=""+t;else{var r=ue(t,/^[\r\n\t ]+/);n=r&&r[0]}var o=x?x.createHTML(t):t;if(pt===dt)try{e=(new h).parseFromString(o,"text/html")}catch(t){}e&&e.documentElement||((e=A.createDocument(pt,"template",null)).documentElement.innerHTML=o);var a=e.body||e.documentElement;return t&&n&&a.insertBefore(i.createTextNode(n),a.childNodes[0]||null),G?e.documentElement:a},Ct=function(t){return E.call(t.ownerDocument||t,t,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT,(function(){return l.FILTER_ACCEPT}),!1)},At=function(t){return"object"===(void 0===s?"undefined":Re(s))?t instanceof s:t&&"object"===(void 0===t?"undefined":Re(t))&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName},Et=function(t,e,r){M[t]&&ie(M[t],(function(t){t.call(n,e,r,ht)}))},Dt=function(t){var e,r=void 0;if(Et("beforeSanitizeElements",t,null),!((e=t)instanceof d||e instanceof p||"string"==typeof e.nodeName&&"string"==typeof e.textContent&&"function"==typeof e.removeChild&&e.attributes instanceof f&&"function"==typeof e.removeAttribute&&"function"==typeof e.setAttribute&&"string"==typeof e.namespaceURI&&"function"==typeof e.insertBefore))return wt(t),!0;if(ue(t.nodeName,/[\u0080-\uFFFF]/))return wt(t),!0;var i=se(t.nodeName);if(Et("uponSanitizeElement",t,{tagName:i,allowedTags:I}),!At(t.firstElementChild)&&(!At(t.content)||!At(t.content.firstElementChild))&&de(/<[/\w]/g,t.innerHTML)&&de(/<[/\w]/g,t.textContent))return wt(t),!0;if(!I[i]||z[i]){if(nt&&!ot[i]){var o=b(t)||t.parentNode,a=_(t)||t.childNodes;if(a&&o)for(var s=a.length-1;s>=0;--s)o.insertBefore(v(a[s],!0),y(t))}return wt(t),!0}return t instanceof u&&!function(t){var e=b(t);e&&e.tagName||(e={namespaceURI:dt,tagName:"template"});var n=se(t.tagName),r=se(e.tagName);if(t.namespaceURI===ft)return e.namespaceURI===dt?"svg"===n:e.namespaceURI===ct?"svg"===n&&("annotation-xml"===r||vt[r]):Boolean(_t[n]);if(t.namespaceURI===ct)return e.namespaceURI===dt?"math"===n:e.namespaceURI===ft?"math"===n&&yt[r]:Boolean(bt[n]);if(t.namespaceURI===dt){if(e.namespaceURI===ft&&!yt[r])return!1;if(e.namespaceURI===ct&&!vt[r])return!1;var i=me({},["title","style","font","a","script"]);return!bt[n]&&(i[n]||!_t[n])}return!1}(t)?(wt(t),!0):"noscript"!==i&&"noembed"!==i||!de(/<\/no(script|embed)/i,t.innerHTML)?(W&&3===t.nodeType&&(r=t.textContent,r=le(r,F," "),r=le(r,L," "),t.textContent!==r&&(ae(n.removed,{element:t.cloneNode()}),t.textContent=r)),Et("afterSanitizeElements",t,null),!1):(wt(t),!0)},kt=function(t,e,n){if(et&&("id"===e||"name"===e)&&(n in i||n in mt))return!1;if(q&&de(N,e));else if($&&de(U,e));else{if(!j[e]||P[e])return!1;if(ut[e]);else if(de(H,le(n,R,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==ce(n,"data:")||!at[t]){if(V&&!de(O,le(n,R,"")));else if(n)return!1}else;}return!0},St=function(t){var e=void 0,r=void 0,i=void 0,o=void 0;Et("beforeSanitizeAttributes",t,null);var a=t.attributes;if(a){var s={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:j};for(o=a.length;o--;){var u=e=a[o],l=u.name,c=u.namespaceURI;if(r=fe(e.value),i=se(l),s.attrName=i,s.attrValue=r,s.keepAttr=!0,s.forceKeepAttr=void 0,Et("uponSanitizeAttribute",t,s),r=s.attrValue,!s.forceKeepAttr&&(xt(l,t),s.keepAttr))if(de(/\/>/i,r))xt(l,t);else{W&&(r=le(r,F," "),r=le(r,L," "));var f=t.nodeName.toLowerCase();if(kt(f,i,r))try{c?t.setAttributeNS(c,l,r):t.setAttribute(l,r),oe(n.removed)}catch(t){}}}Et("afterSanitizeAttributes",t,null)}},Mt=function t(e){var n=void 0,r=Ct(e);for(Et("beforeSanitizeShadowDOM",e,null);n=r.nextNode();)Et("uponSanitizeShadowNode",n,null),Dt(n)||(n.content instanceof o&&t(n.content),St(n));Et("afterSanitizeShadowDOM",e,null)};return n.sanitize=function(t,i){var a=void 0,u=void 0,l=void 0,c=void 0,f=void 0;if(t||(t="\x3c!--\x3e"),"string"!=typeof t&&!At(t)){if("function"!=typeof t.toString)throw pe("toString is not a function");if("string"!=typeof(t=t.toString()))throw pe("dirty is not a string, aborting")}if(!n.isSupported){if("object"===Re(e.toStaticHTML)||"function"==typeof e.toStaticHTML){if("string"==typeof t)return e.toStaticHTML(t);if(At(t))return e.toStaticHTML(t.outerHTML)}return t}if(Z||gt(i),n.removed=[],"string"==typeof t&&(rt=!1),rt);else if(t instanceof s)1===(u=(a=Tt("\x3c!----\x3e")).ownerDocument.importNode(t,!0)).nodeType&&"BODY"===u.nodeName||"HTML"===u.nodeName?a=u:a.appendChild(u);else{if(!J&&!W&&!G&&-1===t.indexOf("<"))return x&&tt?x.createHTML(t):t;if(!(a=Tt(t)))return J?null:T}a&&X&&wt(a.firstChild);for(var d=Ct(rt?t:a);l=d.nextNode();)3===l.nodeType&&l===c||Dt(l)||(l.content instanceof o&&Mt(l.content),St(l),c=l);if(c=null,rt)return t;if(J){if(Q)for(f=D.call(a.ownerDocument);a.firstChild;)f.appendChild(a.firstChild);else f=a;return K&&(f=k.call(r,f,!0)),f}var p=G?a.outerHTML:a.innerHTML;return W&&(p=le(p,F," "),p=le(p,L," ")),x&&tt?x.createHTML(p):p},n.setConfig=function(t){gt(t),Z=!0},n.clearConfig=function(){ht=null,Z=!1},n.isValidAttribute=function(t,e,n){ht||gt({});var r=se(t),i=se(e);return kt(r,i,n)},n.addHook=function(t,e){"function"==typeof e&&(M[t]=M[t]||[],ae(M[t],e))},n.removeHook=function(t){M[t]&&oe(M[t])},n.removeHooks=function(t){M[t]&&(M[t]=[])},n.removeAllHooks=function(){M={}},n}(),ze=25,Pe=10,$e=10,qe={};function Ve(t,e,n,r,i,o,a){var s=n-t/2-$e,u=n+t/2+$e,l=t/2+Math.min(0,s-i.left)+Math.max(0,u-i.right);return{pos:[l,a],shape:l-Pe<5?[-l,-15*o,Math.max(Pe,5-l),-10*o]:l+Pe>t-5?[Math.min(-10,t-l-5),-10*o,Math.min(Pe,t-l),-15*o]:[-10,-10*o,Pe,-10*o]}}function We(t,e,n,r,i,o,a){var s=r-e/2-$e,u=r+e/2+$e,l=e/2+Math.min(0,s-i.top)+Math.max(0,u-i.bottom);return{pos:[a,l],shape:l-Pe<5?[-15*o,-l,-10*o,Math.max(Pe,5-l)]:l+Pe>e-5?[-10*o,Math.min(-10,e-l-5),-15*o,Math.min(Pe,e-l)]:[-10*o,-10,-10*o,Pe]}}function Ge(t,e,n,r,i,o){var a=qe[t](e,n,r,i,o),s=r-ze-a.pos[0],u=i-ze-a.pos[1];return{left:s,top:u,right:s+e+2*ze,bottom:u+n+2*ze}}function Ze(t,e,n){var r,i=document.createElementNS("http://www.w3.org/2000/svg",t);if(e)for(r in e)i.setAttribute(r,e[r]);var o=i.style;if(n)for(r in n)o[r]=n[r];return i}function Xe(){return Be||((Be=document.createElement("div")).id="flourish-popup-constrainer",(je=Be.style).overflow="hidden",je.pointerEvents="none",je.position="absolute",je.left="0",je.top="0",je.margin="0",je.padding="0",document.body.appendChild(Be),this._resizeConstrainer(),Be)}qe.bottom=function(t,e){return{shape:[-10,-10,Pe,-10],pos:[t/2,e+$e]}},qe.top=function(t,e){return{shape:[-10,$e,Pe,$e],pos:[t/2,-10]}},qe.left=function(t,e){return{shape:[$e,Pe,$e,-10],pos:[-10,e/2]}},qe.right=function(t,e){return{shape:[-10,Pe,-10,-10],pos:[t+$e,e/2]}},qe.topLeft=function(t,e){return{shape:[15,$e,$e,15],pos:[-10,-10]}},qe.bottomLeft=function(t,e){return{shape:[15,-10,$e,-15],pos:[-10,e+$e]}},qe.topRight=function(t,e){return{shape:[-15,$e,-10,15],pos:[t+$e,-10]}},qe.bottomRight=function(t,e){return{shape:[-15,-10,-10,-15],pos:[t+$e,e+$e]}},qe.bottomFlexible=function(t,e,n,r,i){return Ve(t,0,n,0,i,1,e+$e)},qe.topFlexible=function(t,e,n,r,i){return Ve(t,0,n,0,i,-1,-10)},qe.rightFlexible=function(t,e,n,r,i){return We(0,e,0,r,i,1,t+$e)},qe.leftFlexible=function(t,e,n,r,i){return We(0,e,0,r,i,-1,-10)};var Je,Qe=1,Ke={container:document.body,maxWidth:"70%",point:null,html:null,directions:["bottom","top","left","right","topLeft","bottomLeft","topRight","bottomRight","bottomFlexible","topFlexible","leftFlexible","rightFlexible"],fallbackFit:"horizontal"};function tn(){for(var t in this.unique_id=Qe++,this.is_visible=!0,Ke)this["_"+t]=Ke[t];this.handlers={click:[]}}function en(t){tn.prototype[t]=function(e){return void 0===e?this["_"+t]:(this["_"+t]=e,this)}}for(var nn in Ke)en(nn);function rn(){return new tn}function on(){Je=rn().container(document.body),function(t){t.each((function(){var t=It(this);if(t.attr("data-popup-allow-interaction")&&!t.select(".popup-content-wrapper").size()){var e=t.append("span").attr("class","popup-content-wrapper").style("display","none").append("span").attr("class","popup-content-outer");e.append("span").attr("class","popup-content-inner"),e.append("span").attr("class","popup-content-arrow")}It(this).on("mouseenter focus",(function(t){an.call(this,t,!0)})).on("mouseover",an).on("mouseout focusout",sn)}))}(jt(".popup"))}function an(t,e){if(this.getAttribute("data-popup-head")||this.getAttribute("data-popup-body")){var n=this.getAttribute("data-popup-allow-interaction"),r=this.getAttribute("data-popup-position"),i=this.getBoundingClientRect(),o=i.left+i.width/2,a=i.top+i.height,s=this.getAttribute("data-popup-head")||null,u=this.getAttribute("data-popup-body")||null,l="";if(s&&(l+=Bt("span").classed("popup-content-header",!0).html(Ye.sanitize(s)).node().outerHTML),u&&(l+=Bt("span").classed("popup-content-body",!0).html(Ye.sanitize(u)).node().outerHTML),n){r&&["top","bottom"].includes(r)||(r="top");It(this).select(".popup-content-outer").style("display","inline-block"),It(this).select(".popup-content-inner").style("display","inline-block"),It(this).select(".popup-content-wrapper").style("display","block").style("bottom","top"==r?i.height-4+"px":null).style("top","bottom"==r?i.height-4+"px":null),e&&It(this).select(".popup-content-inner").html(l);var c=this.getAttribute("data-popup-constrainer")||"body",f=It(c).size()?It(c).node().getBoundingClientRect():document.body,d=It(this).select(".popup-content-inner").node().getBoundingClientRect().width,p=o,h=-d/2,m=p+d/2-(f.right-15),g=f.left+15-(p-d/2);m>0?h-=m:g>0&&(h+=g),It(this).select(".popup-content-wrapper").style("left",i.width/2+h+"px");It(this).select(".popup-content-arrow").style("left",-5+Math.abs(h)+"px")}else{var v=["top","topFlexible"];r&&("left"===r?(v=["right","rightFlexible"],o=i.left,a=i.top+i.height/2):"right"===r?(v=["left","leftFlexible"],o=i.right,a=i.top+i.height/2):"top"===r?(v=["bottom","bottomFlexible"],o=i.left+i.width/2,a=i.top):"bottom"===r&&(v=["top","topFlexible"],o=i.left+i.width/2,a=i.top+i.height)),Je.point(o,a).html(l).directions(v).draw()}}}function sn(t){document.activeElement===this||this.contains(t.relatedTarget)||(this.getAttribute("data-popup-allow-interaction")&&It(this).select(".popup-content-wrapper").style("display","none"),Je.hide())}tn.prototype.point=function(t,e){if(void 0===t)return this._point;if(Array.isArray(t))this._point=[t[0],t[1]];else if(void 0!==e)this._point=[t,e];else if(t instanceof HTMLElement||t instanceof SVGElement){var n=t.getBoundingClientRect();this._point=[Math.floor(n.left+n.width/2),Math.floor(n.top+n.height/2)]}else console.error("Popup: could not understand argument");return this},tn.prototype.directions=function(t){return void 0===t?this._directions:("string"==typeof t&&(t=[t]),this._directions=t.slice(),this)},tn.prototype.text=function(t){return this._html=function(t){return t.replace(/[&<>]/g,(function(t){return{"&":"&","<":"<",">":">"}[t]}))}(t),this},tn.prototype.on=function(t,e){if(!(t in this.handlers))throw new Error("Popup.on: No such event: "+t);return this.handlers[t].push(e),this},tn.prototype.fire=function(t,e){if(!(t in this.handlers))throw new Error("Popup.fire: No such event: "+t);for(var n=this.handlers[t],r=0;ri.right&&(n=i.right),ri.bottom&&(r=i.bottom);var o=n-e.left,a=r-e.top,s=t._getElement(),u=s.style,l=s.querySelector(".flourish-popup-svg"),c=l.querySelector("g"),f=c.querySelector("rect"),d=c.querySelector("path"),p=s.querySelector(".flourish-popup-content");u.display="block",p.style.maxWidth=function(e){return t._maxWidth.match(/^\d+(?:\.\d+)?%$/)?e.width*parseFloat(t._maxWidth)/100:t._maxWidth.match(/^\d+(?:\.\d+)?(?:px)?$/)?parseFloat(t._maxWidth):(null!=t._maxWidth&&console.error("Popup: Unknown value for maxWidth: "+t._maxWidth),e.width)}(i)+"px",t._inner_html!=t._html&&(p.innerHTML=t._inner_html=t._html);var h,m,g=p.getBoundingClientRect();do{h=Math.ceil(g.width),m=Math.ceil(g.height),u.width=h+2*ze+"px",u.height=m+2*ze+"px",g=p.getBoundingClientRect()}while(h!=Math.ceil(g.width)||m!=Math.ceil(g.height));f.setAttribute("width",h),f.setAttribute("height",m),l.setAttribute("width",h+2*ze),l.setAttribute("height",m+2*ze);for(var v,y,_=ze-$e,b=null,w=null,x=null,T=1/0,C=1/0,A=0;Aun&&console.warn("Column index out of range"),Math.min(n-1,un)}function fn(t){t+=1;for(var e="";t>0;){var n=Math.floor(t/26),r=t%26;0==r&&(n-=1,r+=26),e=String.fromCharCode(64+r)+e,t=n}return e}function dn(t){var e=t.match(/\s*(?:[-–—:]|\.\.)\s*/);if(!e)throw new Error("Failed to parse column range: "+t);var n=t.substr(0,e.index),r=t.substr(e.index+e[0].length),i=cn(n),o=cn(r),a=[],s=o>=i?1:-1,u=Math.abs(o-i)+1;u>ln&&(console.warn("Truncating excessively long range"),u=ln);for(var l=0;l0))return s;do{s.push(a=new Date(+n)),e(n,o),t(n)}while(a=e)for(;t(e),!n(e);)e.setTime(e-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););}))},n&&(i.count=function(e,r){return vn.setTime(+e),yn.setTime(+r),t(vn),t(yn),Math.floor(n(vn,yn))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(e){return r(e)%t==0}:function(e){return i.count(0,e)%t==0}):i:null}),i}var bn=864e5,wn=6048e5,xn=_n((function(t){t.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/bn}),(function(t){return t.getDate()-1}));function Tn(t){return _n((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/wn}))}xn.range;var Cn=Tn(0),An=Tn(1),En=Tn(2),Dn=Tn(3),kn=Tn(4),Sn=Tn(5),Mn=Tn(6);Cn.range,An.range,En.range,Dn.range,kn.range,Sn.range,Mn.range;var Fn=_n((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));Fn.every=function(t){return isFinite(t=Math.floor(t))&&t>0?_n((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,n){e.setFullYear(e.getFullYear()+n*t)})):null},Fn.range;var Ln=_n((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/bn}),(function(t){return t.getUTCDate()-1}));function Nn(t){return _n((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/wn}))}Ln.range;var Un=Nn(0),On=Nn(1),Rn=Nn(2),Hn=Nn(3),In=Nn(4),Bn=Nn(5),jn=Nn(6);Un.range,On.range,Rn.range,Hn.range,In.range,Bn.range,jn.range;var Yn=_n((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()}));function zn(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Pn(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function $n(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}Yn.every=function(t){return isFinite(t=Math.floor(t))&&t>0?_n((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null},Yn.range;var qn,Vn,Wn,Gn={"-":"",_:" ",0:"0"},Zn=/^\s*\d+/,Xn=/^%/,Jn=/[\\^$*+?|[\]().{}]/g;function Qn(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o68?1900:2e3),n+r[0].length):-1}function lr(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function cr(t,e,n){var r=Zn.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function fr(t,e,n){var r=Zn.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function dr(t,e,n){var r=Zn.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function pr(t,e,n){var r=Zn.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function hr(t,e,n){var r=Zn.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function mr(t,e,n){var r=Zn.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function gr(t,e,n){var r=Zn.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function vr(t,e,n){var r=Zn.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function yr(t,e,n){var r=Zn.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function _r(t,e,n){var r=Xn.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function br(t,e,n){var r=Zn.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function wr(t,e,n){var r=Zn.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function xr(t,e){return Qn(t.getDate(),e,2)}function Tr(t,e){return Qn(t.getHours(),e,2)}function Cr(t,e){return Qn(t.getHours()%12||12,e,2)}function Ar(t,e){return Qn(1+xn.count(Fn(t),t),e,3)}function Er(t,e){return Qn(t.getMilliseconds(),e,3)}function Dr(t,e){return Er(t,e)+"000"}function kr(t,e){return Qn(t.getMonth()+1,e,2)}function Sr(t,e){return Qn(t.getMinutes(),e,2)}function Mr(t,e){return Qn(t.getSeconds(),e,2)}function Fr(t){var e=t.getDay();return 0===e?7:e}function Lr(t,e){return Qn(Cn.count(Fn(t)-1,t),e,2)}function Nr(t){var e=t.getDay();return e>=4||0===e?kn(t):kn.ceil(t)}function Ur(t,e){return t=Nr(t),Qn(kn.count(Fn(t),t)+(4===Fn(t).getDay()),e,2)}function Or(t){return t.getDay()}function Rr(t,e){return Qn(An.count(Fn(t)-1,t),e,2)}function Hr(t,e){return Qn(t.getFullYear()%100,e,2)}function Ir(t,e){return Qn((t=Nr(t)).getFullYear()%100,e,2)}function Br(t,e){return Qn(t.getFullYear()%1e4,e,4)}function jr(t,e){var n=t.getDay();return Qn((t=n>=4||0===n?kn(t):kn.ceil(t)).getFullYear()%1e4,e,4)}function Yr(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Qn(e/60|0,"0",2)+Qn(e%60,"0",2)}function zr(t,e){return Qn(t.getUTCDate(),e,2)}function Pr(t,e){return Qn(t.getUTCHours(),e,2)}function $r(t,e){return Qn(t.getUTCHours()%12||12,e,2)}function qr(t,e){return Qn(1+Ln.count(Yn(t),t),e,3)}function Vr(t,e){return Qn(t.getUTCMilliseconds(),e,3)}function Wr(t,e){return Vr(t,e)+"000"}function Gr(t,e){return Qn(t.getUTCMonth()+1,e,2)}function Zr(t,e){return Qn(t.getUTCMinutes(),e,2)}function Xr(t,e){return Qn(t.getUTCSeconds(),e,2)}function Jr(t){var e=t.getUTCDay();return 0===e?7:e}function Qr(t,e){return Qn(Un.count(Yn(t)-1,t),e,2)}function Kr(t){var e=t.getUTCDay();return e>=4||0===e?In(t):In.ceil(t)}function ti(t,e){return t=Kr(t),Qn(In.count(Yn(t),t)+(4===Yn(t).getUTCDay()),e,2)}function ei(t){return t.getUTCDay()}function ni(t,e){return Qn(On.count(Yn(t)-1,t),e,2)}function ri(t,e){return Qn(t.getUTCFullYear()%100,e,2)}function ii(t,e){return Qn((t=Kr(t)).getUTCFullYear()%100,e,2)}function oi(t,e){return Qn(t.getUTCFullYear()%1e4,e,4)}function ai(t,e){var n=t.getUTCDay();return Qn((t=n>=4||0===n?In(t):In.ceil(t)).getUTCFullYear()%1e4,e,4)}function si(){return"+0000"}function ui(){return"%"}function li(t){return+t}function ci(t){return Math.floor(+t/1e3)}function fi(t){throw new TypeError("Expected a value of type string but got a value of type "+typeof t)}function di(t){return function(e){return"string"!=typeof e&&fi(e),(e=e.trim())?t(e):null}}qn=function(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,o=t.days,a=t.shortDays,s=t.months,u=t.shortMonths,l=tr(i),c=er(i),f=tr(o),d=er(o),p=tr(a),h=er(a),m=tr(s),g=er(s),v=tr(u),y=er(u),_={a:function(t){return a[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return u[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:null,d:xr,e:xr,f:Dr,g:Ir,G:jr,H:Tr,I:Cr,j:Ar,L:Er,m:kr,M:Sr,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:li,s:ci,S:Mr,u:Fr,U:Lr,V:Ur,w:Or,W:Rr,x:null,X:null,y:Hr,Y:Br,Z:Yr,"%":ui},b={a:function(t){return a[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return u[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:zr,e:zr,f:Wr,g:ii,G:ai,H:Pr,I:$r,j:qr,L:Vr,m:Gr,M:Zr,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:li,s:ci,S:Xr,u:Jr,U:Qr,V:ti,w:ei,W:ni,x:null,X:null,y:ri,Y:oi,Z:si,"%":ui},w={a:function(t,e,n){var r=p.exec(e.slice(n));return r?(t.w=h[r[0].toLowerCase()],n+r[0].length):-1},A:function(t,e,n){var r=f.exec(e.slice(n));return r?(t.w=d[r[0].toLowerCase()],n+r[0].length):-1},b:function(t,e,n){var r=v.exec(e.slice(n));return r?(t.m=y[r[0].toLowerCase()],n+r[0].length):-1},B:function(t,e,n){var r=m.exec(e.slice(n));return r?(t.m=g[r[0].toLowerCase()],n+r[0].length):-1},c:function(t,n,r){return C(t,e,n,r)},d:dr,e:dr,f:yr,g:ur,G:sr,H:hr,I:hr,j:pr,L:vr,m:fr,M:mr,p:function(t,e,n){var r=l.exec(e.slice(n));return r?(t.p=c[r[0].toLowerCase()],n+r[0].length):-1},q:cr,Q:br,s:wr,S:gr,u:rr,U:ir,V:or,w:nr,W:ar,x:function(t,e,r){return C(t,n,e,r)},X:function(t,e,n){return C(t,r,e,n)},y:ur,Y:sr,Z:lr,"%":_r};function x(t,e){return function(n){var r,i,o,a=[],s=-1,u=0,l=t.length;for(n instanceof Date||(n=new Date(+n));++s53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=Pn($n(o.y,0,1))).getUTCDay(),r=i>4||0===i?On.ceil(r):On(r),r=Ln.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=zn($n(o.y,0,1))).getDay(),r=i>4||0===i?An.ceil(r):An(r),r=xn.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?Pn($n(o.y,0,1)).getUTCDay():zn($n(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,Pn(o)):zn(o)}}function C(t,e,n,r){for(var i,o,a=0,s=e.length,u=n.length;a=u)return-1;if(37===(i=e.charCodeAt(a++))){if(i=e.charAt(a++),!(o=w[i in Gn?e.charAt(a++):i])||(r=o(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return _.x=x(n,_),_.X=x(r,_),_.c=x(e,_),b.x=x(n,b),b.X=x(r,b),b.c=x(e,b),{format:function(t){var e=x(t+="",_);return e.toString=function(){return t},e},parse:function(t){var e=T(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=x(t+="",b);return e.toString=function(){return t},e},utcParse:function(t){var e=T(t+="",!0);return e.toString=function(){return t},e}}}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),qn.format,qn.parse,Vn=qn.utcFormat,Wn=qn.utcParse;var pi=new Date(1972,3,27,19,45,5),hi={"%b %d":[{regex:/^june\s(30|[12][0-9]|0?[1-9])$/i,toDate:function(t){return new Date(null,5,t.split(/\s/)[1])}},{regex:/^july\s(3[01]|[12][0-9]|0?[1-9])$/i,toDate:function(t){return new Date(null,6,t.split(/\s/)[1])}},{regex:/^sept\s(30|[12][0-9]|0?[1-9])$/i,toDate:function(t){return new Date(null,8,t.split(/\s/)[1])}}],"%d %b":[{regex:/^(0?[1-9]|[1-9][0-9])\sjune$/i,toDate:function(t){return new Date(null,5,t.split(/\s/)[0])}},{regex:/^(0?[1-9]|[1-9][0-9])\sjuly$/i,toDate:function(t){return new Date(null,6,t.split(/\s/)[0])}},{regex:/^(0?[1-9]|[1-9][0-9])\ssept$/i,toDate:function(t){return new Date(null,8,t.split(/\s/)[0])}}]};function mi(t){return function(e){var n=null;return t.forEach((function(t){e.match(t.regex)&&(n=t.toDate(e))})),n}}function gi(t,e){var n,r=Wn(t),i=Vn(t);return n=di("function"==typeof e?function(t){return e(t,null!==r(t))}:function(t){return null!==r(t)}),Object.freeze({test:n,parse:di((function(e){return r(e)||(hi[t]?mi(hi[t])(e):null)})),format:function(t){return i(t)},type:"datetime",description:t,id:"datetime$"+t,example:i(pi)})}var vi=Object.freeze([gi("%Y-%m-%dT%H:%M:%S.%LZ"),gi("%Y-%m-%d %H:%M:%S"),gi("%Y-%m-%dT%H:%M:%S"),gi("%Y-%m-%dT%H:%M:%SZ"),gi("%d/%m/%Y",(function(t,e){if(!e)return!1;var n=t.split("/").map(parseFloat);return n[0]>0&&n[0]<=31&&n[1]>0&&n[1]<=12&&n[2]>=1e3})),gi("%d/%m/%Y %H:%M",(function(t,e){if(!e)return!1;var n=t.split(/[/ :]/).map(parseFloat);return n[0]>0&&n[0]<=31&&n[1]>0&&n[1]<=12&&n[2]>=1e3&&n[3]>=0&&n[3]<24&&n[4]>=0&&n[4]<60})),gi("%d/%m/%y",(function(t,e){if(!e)return!1;var n=t.split("/").map(parseFloat);return n[0]>0&&n[0]<=31&&n[1]>0&&n[1]<=12&&!isNaN(n[2])})),gi("%m/%d/%Y",(function(t,e){if(!e)return!1;var n=t.split("/").map(parseFloat);return n[0]>0&&n[0]<=12&&n[1]>0&&n[1]<=31&&n[2]>=1e3})),gi("%m/%d/%Y %H:%M",(function(t,e){if(!e)return!1;var n=t.split(/[/ :]/).map(parseFloat);return n[0]>0&&n[0]<=12&&n[1]>0&&n[1]<=31&&n[2]>=1e3&&n[3]>=0&&n[3]<24&&n[4]>=0&&n[4]<60})),gi("%m/%d/%y",(function(t,e){if(!e)return!1;var n=t.split("/").map(parseFloat);return n[0]>0&&n[0]<=12&&n[1]>0&&n[1]<=31&&!isNaN(n[2])})),gi("%Y/%m/%d",(function(t,e){if(!e)return!1;var n=t.split("/").map(parseFloat);return n[0]>=1e3&&n[1]>0&&n[1]<=12&&n[2]>0&&n[2]<=31})),gi("%d-%m-%Y",(function(t,e){if(!e)return!1;var n=t.split("-").map(parseFloat);return n[0]>0&&n[0]<=31&&n[1]>0&&n[1]<=12&&n[2]>=1e3})),gi("%d-%m-%y",(function(t,e){if(!e)return!1;var n=t.split("-").map(parseFloat);return n[0]>0&&n[0]<=31&&n[1]>0&&n[1]<=12&&!isNaN(n[2])})),gi("%d.%m.%Y",(function(t,e){if(!e)return!1;var n=t.split(".").map(parseFloat);return n[0]>0&&n[0]<=31&&n[1]>0&&n[1]<=12&&n[2]>=1e3})),gi("%m.%d.%y",(function(t,e){if(!e)return!1;var n=t.split(".").map(parseFloat);return n[0]>0&&n[0]<=12&&n[1]>0&&n[1]<=31&&!isNaN(n[2])})),gi("%m-%d-%Y",(function(t,e){if(!e)return!1;var n=t.split("-").map(parseFloat);return n[0]>0&&n[0]<=12&&n[1]>0&&n[1]<=31&&n[2]>=1e3})),gi("%m-%d-%y",(function(t,e){if(!e)return!1;var n=t.split("-").map(parseFloat);return n[0]>0&&n[0]<=12&&n[1]>0&&n[1]<=31&&!isNaN(n[2])})),gi("%Y-%m-%d",(function(t,e){if(!e)return!1;var n=t.split("-").map(parseFloat);return n[0]>=1e3&&n[1]>0&&n[1]<=12&&n[2]>0&&n[2]<=31})),gi("%Y-%m",(function(t,e){if(!e)return!1;var n=t.split("-").map(parseFloat);return n[0]>=1e3&&n[1]>0&&n[1]<=12})),gi("%d %b %Y",(function(t,e){if(!e)return!1;var n=t.split(" ").map(parseFloat);return n[0]>0&&n[0]<=31&&n[2]>=1e3})),gi("%d %B %Y",(function(t,e){if(!e)return!1;var n=t.split(" ").map(parseFloat);return n[0]>0&&n[0]<=31&&n[2]>=1e3})),gi("%d %b %y"),gi("%-d %b ’%y"),gi("%d %B %y"),gi("%d-%b-%Y",(function(t,e){if(!e)return!1;var n=t.split("-").map(parseFloat);return n[0]>0&&n[0]<=31&&n[2]>=1e3})),gi("%d-%B-%Y",(function(t,e){if(!e)return!1;var n=t.split("-").map(parseFloat);return n[0]>0&&n[0]<=31&&n[2]>=1e3})),gi("%d-%b-%y"),gi("%d-%B-%y"),gi("%m/%Y",(function(t,e){if(!e)return!1;var n=t.split("/").map(parseFloat);return n[0]>0&&n[0]<=12&&n[1]>=1e3})),gi("%m/%y"),gi("%b %Y",(function(t,e){return!!e&&t.split(" ").map(parseFloat)[1]>=1e3})),gi("%B %Y",(function(t,e){return!!e&&t.split(" ").map(parseFloat)[1]>=1e3})),gi("%b-%y"),gi("%b %y"),gi("%B %y"),gi("%b '%y"),gi("%B %-d %Y"),gi("%d %b",(function(t,e){return!!e||!!mi(hi["%d %b"])(t)})),gi("%d %B"),gi("%b %d",(function(t,e){return!!e||!!mi(hi["%b %d"])(t)})),gi("%B %d"),gi("%d-%m",(function(t,e){if(!e)return!1;var n=t.split("-").map(parseFloat);return n[0]>0&&n[0]<=31&&n[1]>0&&n[1]<=12})),gi("%m-%d"),gi("%d/%m"),gi("%m/%d"),gi("%b %d %Y"),gi("%b %d %Y, %-I.%M%p"),gi("%Y",(function(t,e){if(!e)return!1;var n=parseFloat(t);return n>1499&&n<2200})),gi("%B"),gi("%b"),gi("%X"),gi("%I:%M %p"),gi("%-I.%M%p"),gi("%H:%M",(function(t,e){if(!e)return!1;var n=t.split(":").map(parseFloat);return n[0]>=0&&n[0]<24})),gi("%H:%M:%S"),gi("%M:%S"),gi("%-I%p"),gi("Q%q %Y",(function(t,e){return!!e&&6===t.replace(/\s/g,"").length})),gi("%Y Q%q",(function(t,e){return!!e&&6===t.replace(/\s/g,"").length}))]);function yi(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}var _i,bi=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function wi(t){if(!(e=bi.exec(t)))throw new Error("invalid format: "+t);var e;return new xi({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function xi(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function Ti(t,e){var n=yi(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}wi.prototype=xi.prototype,xi.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var Ci={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return Ti(100*t,e)},r:Ti,s:function(t,e){var n=yi(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(_i=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+yi(t,Math.max(0,e+o-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function Ai(t){return t}var Ei=Array.prototype.map,Di=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function ki(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?Ai:(e=Ei.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,o=[],a=0,s=e[0],u=0;i>0&&s>0&&(u+s+1>r&&(s=Math.max(1,r-u)),o.push(t.substring(i-=s,i+s)),!((u+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(n)}),i=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",a=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?Ai:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(Ei.call(t.numerals,String)),u=void 0===t.percent?"%":t.percent+"",l=void 0===t.minus?"-":t.minus+"",c=void 0===t.nan?"NaN":t.nan+"";function f(t){var e=(t=wi(t)).fill,n=t.align,f=t.sign,d=t.symbol,p=t.zero,h=t.width,m=t.comma,g=t.precision,v=t.trim,y=t.type;"n"===y?(m=!0,y="g"):Ci[y]||(void 0===g&&(g=12),v=!0,y="g"),(p||"0"===e&&"="===n)&&(p=!0,e="0",n="=");var _="$"===d?i:"#"===d&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",b="$"===d?o:/[%p]/.test(y)?u:"",w=Ci[y],x=/[defgprs%]/.test(y);function T(t){var i,o,u,d=_,T=b;if("c"===y)T=w(t)+T,t="";else{var C=(t=+t)<0||1/t<0;if(t=isNaN(t)?c:w(Math.abs(t),g),v&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),C&&0==+t&&"+"!==f&&(C=!1),d=(C?"("===f?f:l:"-"===f||"("===f?"":f)+d,T=("s"===y?Di[8+_i/3]:"")+T+(C&&"("===f?")":""),x)for(i=-1,o=t.length;++i(u=t.charCodeAt(i))||u>57){T=(46===u?a+t.slice(i+1):t.slice(i))+T,t=t.slice(0,i);break}}m&&!p&&(t=r(t,1/0));var A=d.length+t.length+T.length,E=A>1)+d+t+T+E.slice(A);break;default:t=E+d+t+T}return s(t)}return g=void 0===g?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),T.toString=function(){return t+""},T}return{format:f,formatPrefix:function(t,e){var n,r=f(((t=wi(t)).type="f",t)),i=3*Math.max(-8,Math.min(8,Math.floor((n=e,((n=yi(Math.abs(n)))?n[1]:NaN)/3)))),o=Math.pow(10,-i),a=Di[8+i/3];return function(t){return r(o*t)+a}}}}var Si={test:di((function(t){return/^(\+|-)?\d{1,3}(,\d{3})*(\.\d+)?((e|E)(\+|-)?\d+)?$/.test(t.trim())})),parse:di((function(t){return parseFloat(t.replace(/,/g,""))})),description:"Comma thousand separator, point decimal mark",thousand_separator:",",decimal_mark:".",id:"number$comma_point",example:"12,235.56"},Mi={test:di((function(t){return/^(\+|-)?\d{1,3}(\s\d{3})*(\.\d+)?((e|E)(\+|-)?\d+)?$/.test(t.trim())})),parse:di((function(t){return parseFloat(t.replace(/\s/g,""))})),description:"Space thousand separator, point decimal mark",thousand_separator:" ",decimal_mark:".",id:"number$space_point",example:"12 235.56"},Fi={test:di((function(t){return/^(\+|-)?\d+(\.\d+)?((e|E)(\+|-)?\d+)?$/.test(t.trim())})),parse:di((function(t){return parseFloat(t)})),description:"No thousand separator, point decimal mark",thousand_separator:"",decimal_mark:".",id:"number$none_point",example:"12235.56"},Li={test:di((function(t){return/^(\+|-)?\d{1,3}(\.\d{3})*(,\d+)?((e|E)(\+|-)?\d+)?$/.test(t.trim())})),parse:di((function(t){return parseFloat(t.replace(/\./g,"").replace(/,/,"."))})),description:"Point thousand separator, comma decimal mark",thousand_separator:".",decimal_mark:",",id:"number$point_comma",example:"12.235,56"},Ni={test:di((function(t){return/^(\+|-)?\d{1,3}(\s\d{3})*(,\d+)?((e|E)(\+|-)?\d+)?$/.test(t.trim())})),parse:di((function(t){return parseFloat(t.replace(/\s/g,"").replace(/,/,"."))})),description:"Space thousand separator, comma decimal mark",thousand_separator:" ",decimal_mark:",",id:"number$space_comma",example:"12 235,56"},Ui={test:di((function(t){return/^(\+|-)?\d+(,\d+)?((e|E)(\+|-)?\d+)?$/.test(t.trim())})),parse:di((function(t){return parseFloat(t.replace(/,/,"."))})),description:"No thousand separator, comma decimal mark",thousand_separator:"",decimal_mark:",",id:"number$none_comma",example:"12235,56"},Oi=Object.freeze([Si,Mi,Li,Ni,Fi,Ui]);Oi.forEach((function(t){t.type="number",t.format=function(t){var e,n,r=ki({decimal:t.decimal_mark,thousands:t.thousand_separator,grouping:[3],currency:["",""]});return function(t,i){return null===t?"":(i||(i=",.2f"),i!==n&&(n=i,e=r.format(n)),e(t))}}(t),Object.freeze(t)}));var Ri,Hi=Object.freeze({test:function(t){return"string"==typeof t||fi(t)},parse:function(t){return"string"==typeof t?t:fi(t)},format:function(t){if("string"==typeof t)return t},type:"string",description:"Arbitrary string",id:"string$arbitrary_string"}),Ii=Object.freeze({datetime:vi,number:Oi}),Bi=Object.freeze(["datetime","number","string"]),ji=Object.freeze({n_max:250,n_failing_values:0,failure_fraction:.05,sort:!0}),Yi=Object.freeze(Object.keys(ji));function zi(t,e){return t.index-e.index}function Pi(t,e){return e.n_success-t.n_success||zi(t,e)}function $i(t){return(""+t).trim()}function qi(t){return void 0===t?function(t){return $i(t)}:"function"==typeof t?function(e,n){return $i(t(e,n))}:function(e){return $i(e[""+t])}}function Vi(t){t?Array.isArray(t)||(t=[t]):t=Bi;var e=t.reduce((function(t,e){var n=Ii[e];return n&&Array.prototype.push.apply(t,n),t}),[]),n=-1!==t.indexOf("string"),r=Yi.reduce((function(t,e){return t[e]=ji[e],t}),{}),i=function(t,i){i=qi(i);var o=t.map(i).filter((function(t){return t}));if(!o.length)return n?[Hi]:[];var a=Math.min(r.n_max,o.length),s=Math.floor(a*r.failure_fraction),u=r.n_failing_values,l=r.sort?Pi:zi,c=e.slice().reduce((function(t,e,n){for(var r=c=0,i=[],l=!1,c=0;cs?l=!0:-1===i.indexOf(f)&&(i.push(f),i.length>u&&(l=!0)),l))break}return l||t.push({interp:e,n_success:a-r,index:n}),t}),[]).sort(l).map((function(t){return t.interp}));return n&&c.push(Hi),c};return Yi.forEach((function(t){var e;i[(e=t,e.replace(/_(\w)/g,(function(t,e){return e.toUpperCase()})))]=function(e){return void 0===e?r[t]:(r[t]=e,i)}})),i}Vi.DATETIME_IDS=Object.freeze(vi.map((function(t){return t.id}))),Vi.NUMBER_IDS=Object.freeze(Oi.map((function(t){return t.id}))),Vi.STRING_IDS=Object.freeze([Hi.id]),Vi.getInterpretation=(Ri=vi.concat(Oi,Hi).reduce((function(t,e){return t[e.id]=e,t}),{}),function(t){return Ri[t]}),Vi._createAccessorFunction=qi;var Wi=new Date,Gi=new Date;function Zi(t,e,n,r){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return i.floor=function(e){return t(e=new Date(+e)),e},i.ceil=function(n){return t(n=new Date(n-1)),e(n,1),t(n),n},i.round=function(t){var e=i(t),n=i.ceil(t);return t-e0))return s;do{s.push(a=new Date(+n)),e(n,o),t(n)}while(a=e)for(;t(e),!n(e);)e.setTime(e-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););}))},n&&(i.count=function(e,r){return Wi.setTime(+e),Gi.setTime(+r),t(Wi),t(Gi),Math.floor(n(Wi,Gi))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(e){return r(e)%t==0}:function(e){return i.count(0,e)%t==0}):i:null}),i}var Xi=864e5,Ji=6048e5,Qi=Zi((function(t){t.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/Xi}),(function(t){return t.getDate()-1}));function Ki(t){return Zi((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/Ji}))}Qi.range;var to=Ki(0),eo=Ki(1),no=Ki(2),ro=Ki(3),io=Ki(4),oo=Ki(5),ao=Ki(6);to.range,eo.range,no.range,ro.range,io.range,oo.range,ao.range;var so=Zi((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));so.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Zi((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,n){e.setFullYear(e.getFullYear()+n*t)})):null},so.range;var uo=Zi((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/Xi}),(function(t){return t.getUTCDate()-1}));function lo(t){return Zi((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/Ji}))}uo.range;var co=lo(0),fo=lo(1),po=lo(2),ho=lo(3),mo=lo(4),go=lo(5),vo=lo(6);co.range,fo.range,po.range,ho.range,mo.range,go.range,vo.range;var yo=Zi((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()}));function _o(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function bo(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function wo(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}yo.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Zi((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null},yo.range;var xo,To,Co,Ao={"-":"",_:" ",0:"0"},Eo=/^\s*\d+/,Do=/^%/,ko=/[\\^$*+?|[\]().{}]/g;function So(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o68?1900:2e3),n+r[0].length):-1}function jo(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Yo(t,e,n){var r=Eo.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function zo(t,e,n){var r=Eo.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Po(t,e,n){var r=Eo.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function $o(t,e,n){var r=Eo.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function qo(t,e,n){var r=Eo.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Vo(t,e,n){var r=Eo.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Wo(t,e,n){var r=Eo.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Go(t,e,n){var r=Eo.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Zo(t,e,n){var r=Eo.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Xo(t,e,n){var r=Do.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Jo(t,e,n){var r=Eo.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function Qo(t,e,n){var r=Eo.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Ko(t,e){return So(t.getDate(),e,2)}function ta(t,e){return So(t.getHours(),e,2)}function ea(t,e){return So(t.getHours()%12||12,e,2)}function na(t,e){return So(1+Qi.count(so(t),t),e,3)}function ra(t,e){return So(t.getMilliseconds(),e,3)}function ia(t,e){return ra(t,e)+"000"}function oa(t,e){return So(t.getMonth()+1,e,2)}function aa(t,e){return So(t.getMinutes(),e,2)}function sa(t,e){return So(t.getSeconds(),e,2)}function ua(t){var e=t.getDay();return 0===e?7:e}function la(t,e){return So(to.count(so(t)-1,t),e,2)}function ca(t){var e=t.getDay();return e>=4||0===e?io(t):io.ceil(t)}function fa(t,e){return t=ca(t),So(io.count(so(t),t)+(4===so(t).getDay()),e,2)}function da(t){return t.getDay()}function pa(t,e){return So(eo.count(so(t)-1,t),e,2)}function ha(t,e){return So(t.getFullYear()%100,e,2)}function ma(t,e){return So((t=ca(t)).getFullYear()%100,e,2)}function ga(t,e){return So(t.getFullYear()%1e4,e,4)}function va(t,e){var n=t.getDay();return So((t=n>=4||0===n?io(t):io.ceil(t)).getFullYear()%1e4,e,4)}function ya(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+So(e/60|0,"0",2)+So(e%60,"0",2)}function _a(t,e){return So(t.getUTCDate(),e,2)}function ba(t,e){return So(t.getUTCHours(),e,2)}function wa(t,e){return So(t.getUTCHours()%12||12,e,2)}function xa(t,e){return So(1+uo.count(yo(t),t),e,3)}function Ta(t,e){return So(t.getUTCMilliseconds(),e,3)}function Ca(t,e){return Ta(t,e)+"000"}function Aa(t,e){return So(t.getUTCMonth()+1,e,2)}function Ea(t,e){return So(t.getUTCMinutes(),e,2)}function Da(t,e){return So(t.getUTCSeconds(),e,2)}function ka(t){var e=t.getUTCDay();return 0===e?7:e}function Sa(t,e){return So(co.count(yo(t)-1,t),e,2)}function Ma(t){var e=t.getUTCDay();return e>=4||0===e?mo(t):mo.ceil(t)}function Fa(t,e){return t=Ma(t),So(mo.count(yo(t),t)+(4===yo(t).getUTCDay()),e,2)}function La(t){return t.getUTCDay()}function Na(t,e){return So(fo.count(yo(t)-1,t),e,2)}function Ua(t,e){return So(t.getUTCFullYear()%100,e,2)}function Oa(t,e){return So((t=Ma(t)).getUTCFullYear()%100,e,2)}function Ra(t,e){return So(t.getUTCFullYear()%1e4,e,4)}function Ha(t,e){var n=t.getUTCDay();return So((t=n>=4||0===n?mo(t):mo.ceil(t)).getUTCFullYear()%1e4,e,4)}function Ia(){return"+0000"}function Ba(){return"%"}function ja(t){return+t}function Ya(t){return Math.floor(+t/1e3)}function za(t){throw new TypeError("Expected a value of type string but got a value of type "+typeof t)}function Pa(t){return function(e){return"string"!=typeof e&&za(e),(e=e.trim())?t(e):null}}!function(t){xo=function(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,o=t.days,a=t.shortDays,s=t.months,u=t.shortMonths,l=Fo(i),c=Lo(i),f=Fo(o),d=Lo(o),p=Fo(a),h=Lo(a),m=Fo(s),g=Lo(s),v=Fo(u),y=Lo(u),_={a:function(t){return a[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return u[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:null,d:Ko,e:Ko,f:ia,g:ma,G:va,H:ta,I:ea,j:na,L:ra,m:oa,M:aa,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:ja,s:Ya,S:sa,u:ua,U:la,V:fa,w:da,W:pa,x:null,X:null,y:ha,Y:ga,Z:ya,"%":Ba},b={a:function(t){return a[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return u[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:_a,e:_a,f:Ca,g:Oa,G:Ha,H:ba,I:wa,j:xa,L:Ta,m:Aa,M:Ea,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:ja,s:Ya,S:Da,u:ka,U:Sa,V:Fa,w:La,W:Na,x:null,X:null,y:Ua,Y:Ra,Z:Ia,"%":Ba},w={a:function(t,e,n){var r=p.exec(e.slice(n));return r?(t.w=h[r[0].toLowerCase()],n+r[0].length):-1},A:function(t,e,n){var r=f.exec(e.slice(n));return r?(t.w=d[r[0].toLowerCase()],n+r[0].length):-1},b:function(t,e,n){var r=v.exec(e.slice(n));return r?(t.m=y[r[0].toLowerCase()],n+r[0].length):-1},B:function(t,e,n){var r=m.exec(e.slice(n));return r?(t.m=g[r[0].toLowerCase()],n+r[0].length):-1},c:function(t,n,r){return C(t,e,n,r)},d:Po,e:Po,f:Zo,g:Bo,G:Io,H:qo,I:qo,j:$o,L:Go,m:zo,M:Vo,p:function(t,e,n){var r=l.exec(e.slice(n));return r?(t.p=c[r[0].toLowerCase()],n+r[0].length):-1},q:Yo,Q:Jo,s:Qo,S:Wo,u:Uo,U:Oo,V:Ro,w:No,W:Ho,x:function(t,e,r){return C(t,n,e,r)},X:function(t,e,n){return C(t,r,e,n)},y:Bo,Y:Io,Z:jo,"%":Xo};function x(t,e){return function(n){var r,i,o,a=[],s=-1,u=0,l=t.length;for(n instanceof Date||(n=new Date(+n));++s53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=bo(wo(o.y,0,1))).getUTCDay(),r=i>4||0===i?fo.ceil(r):fo(r),r=uo.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=_o(wo(o.y,0,1))).getDay(),r=i>4||0===i?eo.ceil(r):eo(r),r=Qi.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?bo(wo(o.y,0,1)).getUTCDay():_o(wo(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,bo(o)):_o(o)}}function C(t,e,n,r){for(var i,o,a=0,s=e.length,u=n.length;a=u)return-1;if(37===(i=e.charCodeAt(a++))){if(i=e.charAt(a++),!(o=w[i in Ao?e.charAt(a++):i])||(r=o(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return _.x=x(n,_),_.X=x(r,_),_.c=x(e,_),b.x=x(n,b),b.X=x(r,b),b.c=x(e,b),{format:function(t){var e=x(t+="",_);return e.toString=function(){return t},e},parse:function(t){var e=T(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=x(t+="",b);return e.toString=function(){return t},e},utcParse:function(t){var e=T(t+="",!0);return e.toString=function(){return t},e}}}(t),xo.format,xo.parse,To=xo.utcFormat,Co=xo.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var $a=new Date(1972,3,27,19,45,5),qa={"%b %d":[{regex:/^june\s(30|[12][0-9]|0?[1-9])$/i,toDate:function(t){return new Date(null,5,t.split(/\s/)[1])}},{regex:/^july\s(3[01]|[12][0-9]|0?[1-9])$/i,toDate:function(t){return new Date(null,6,t.split(/\s/)[1])}},{regex:/^sept\s(30|[12][0-9]|0?[1-9])$/i,toDate:function(t){return new Date(null,8,t.split(/\s/)[1])}}],"%d %b":[{regex:/^(0?[1-9]|[1-9][0-9])\sjune$/i,toDate:function(t){return new Date(null,5,t.split(/\s/)[0])}},{regex:/^(0?[1-9]|[1-9][0-9])\sjuly$/i,toDate:function(t){return new Date(null,6,t.split(/\s/)[0])}},{regex:/^(0?[1-9]|[1-9][0-9])\ssept$/i,toDate:function(t){return new Date(null,8,t.split(/\s/)[0])}}]};function Va(t){return function(e){var n=null;return t.forEach((function(t){e.match(t.regex)&&(n=t.toDate(e))})),n}}function Wa(t,e){var n,r=Co(t),i=To(t);return n=Pa("function"==typeof e?function(t){return e(t,null!==r(t))}:function(t){return null!==r(t)}),Object.freeze({test:n,parse:Pa((function(e){return r(e)||(qa[t]?Va(qa[t])(e):null)})),format:function(t){return i(t)},type:"datetime",description:t,id:"datetime$"+t,example:i($a)})}var Ga=Object.freeze([Wa("%Y-%m-%dT%H:%M:%S.%LZ"),Wa("%Y-%m-%d %H:%M:%S"),Wa("%Y-%m-%dT%H:%M:%S"),Wa("%Y-%m-%dT%H:%M:%SZ"),Wa("%d/%m/%Y",(function(t,e){if(!e)return!1;var n=t.split("/").map(parseFloat);return n[0]>0&&n[0]<=31&&n[1]>0&&n[1]<=12&&n[2]>=1e3})),Wa("%d/%m/%Y %H:%M",(function(t,e){if(!e)return!1;var n=t.split(/[/ :]/).map(parseFloat);return n[0]>0&&n[0]<=31&&n[1]>0&&n[1]<=12&&n[2]>=1e3&&n[3]>=0&&n[3]<24&&n[4]>=0&&n[4]<60})),Wa("%d/%m/%y",(function(t,e){if(!e)return!1;var n=t.split("/").map(parseFloat);return n[0]>0&&n[0]<=31&&n[1]>0&&n[1]<=12&&!isNaN(n[2])})),Wa("%m/%d/%Y",(function(t,e){if(!e)return!1;var n=t.split("/").map(parseFloat);return n[0]>0&&n[0]<=12&&n[1]>0&&n[1]<=31&&n[2]>=1e3})),Wa("%m/%d/%Y %H:%M",(function(t,e){if(!e)return!1;var n=t.split(/[/ :]/).map(parseFloat);return n[0]>0&&n[0]<=12&&n[1]>0&&n[1]<=31&&n[2]>=1e3&&n[3]>=0&&n[3]<24&&n[4]>=0&&n[4]<60})),Wa("%m/%d/%y",(function(t,e){if(!e)return!1;var n=t.split("/").map(parseFloat);return n[0]>0&&n[0]<=12&&n[1]>0&&n[1]<=31&&!isNaN(n[2])})),Wa("%Y/%m/%d",(function(t,e){if(!e)return!1;var n=t.split("/").map(parseFloat);return n[0]>=1e3&&n[1]>0&&n[1]<=12&&n[2]>0&&n[2]<=31})),Wa("%d-%m-%Y",(function(t,e){if(!e)return!1;var n=t.split("-").map(parseFloat);return n[0]>0&&n[0]<=31&&n[1]>0&&n[1]<=12&&n[2]>=1e3})),Wa("%d-%m-%y",(function(t,e){if(!e)return!1;var n=t.split("-").map(parseFloat);return n[0]>0&&n[0]<=31&&n[1]>0&&n[1]<=12&&!isNaN(n[2])})),Wa("%m-%d-%Y",(function(t,e){if(!e)return!1;var n=t.split("-").map(parseFloat);return n[0]>0&&n[0]<=12&&n[1]>0&&n[1]<=31&&n[2]>=1e3})),Wa("%m-%d-%y",(function(t,e){if(!e)return!1;var n=t.split("-").map(parseFloat);return n[0]>0&&n[0]<=12&&n[1]>0&&n[1]<=31&&!isNaN(n[2])})),Wa("%Y-%m-%d",(function(t,e){if(!e)return!1;var n=t.split("-").map(parseFloat);return n[0]>=1e3&&n[1]>0&&n[1]<=12&&n[2]>0&&n[2]<=31})),Wa("%Y-%m",(function(t,e){if(!e)return!1;var n=t.split("-").map(parseFloat);return n[0]>=1e3&&n[1]>0&&n[1]<=12})),Wa("%d %b %Y",(function(t,e){if(!e)return!1;var n=t.split(" ").map(parseFloat);return n[0]>0&&n[0]<=31&&n[2]>=1e3})),Wa("%d %B %Y",(function(t,e){if(!e)return!1;var n=t.split(" ").map(parseFloat);return n[0]>0&&n[0]<=31&&n[2]>=1e3})),Wa("%d %b %y"),Wa("%-d %b ’%y"),Wa("%d %B %y"),Wa("%d-%b-%Y",(function(t,e){if(!e)return!1;var n=t.split("-").map(parseFloat);return n[0]>0&&n[0]<=31&&n[2]>=1e3})),Wa("%d-%B-%Y",(function(t,e){if(!e)return!1;var n=t.split("-").map(parseFloat);return n[0]>0&&n[0]<=31&&n[2]>=1e3})),Wa("%d-%b-%y"),Wa("%d-%B-%y"),Wa("%m/%Y",(function(t,e){if(!e)return!1;var n=t.split("/").map(parseFloat);return n[0]>0&&n[0]<=12&&n[1]>=1e3})),Wa("%m/%y"),Wa("%b %Y",(function(t,e){return!!e&&t.split(" ").map(parseFloat)[1]>=1e3})),Wa("%B %Y",(function(t,e){return!!e&&t.split(" ").map(parseFloat)[1]>=1e3})),Wa("%b-%y"),Wa("%b %y"),Wa("%B %y"),Wa("%b '%y"),Wa("%B %-d %Y"),Wa("%d %b",(function(t,e){return!!e||!!Va(qa["%d %b"])(t)})),Wa("%d %B"),Wa("%b %d",(function(t,e){return!!e||!!Va(qa["%b %d"])(t)})),Wa("%B %d"),Wa("%d-%m",(function(t,e){if(!e)return!1;var n=t.split("-").map(parseFloat);return n[0]>0&&n[0]<=31&&n[1]>0&&n[1]<=12})),Wa("%m-%d"),Wa("%d/%m"),Wa("%m/%d"),Wa("%b %d %Y"),Wa("%b %d %Y, %-I.%M%p"),Wa("%Y",(function(t,e){if(!e)return!1;var n=parseFloat(t);return n>1499&&n<2200})),Wa("%B"),Wa("%b"),Wa("%X"),Wa("%I:%M %p"),Wa("%-I.%M%p"),Wa("%H:%M"),Wa("%H:%M:%S"),Wa("%-I%p"),Wa("Q%q %Y",(function(t,e){return!!e&&6===t.replace(/\s/g,"").length})),Wa("%Y Q%q",(function(t,e){return!!e&&6===t.replace(/\s/g,"").length}))]);function Za(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}var Xa,Ja=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Qa(t){if(!(e=Ja.exec(t)))throw new Error("invalid format: "+t);var e;return new Ka({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function Ka(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function ts(t,e){var n=Za(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}Qa.prototype=Ka.prototype,Ka.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var es={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return ts(100*t,e)},r:ts,s:function(t,e){var n=Za(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(Xa=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Za(t,Math.max(0,e+o-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function ns(t){return t}var rs=Array.prototype.map,is=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function os(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?ns:(e=rs.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,o=[],a=0,s=e[0],u=0;i>0&&s>0&&(u+s+1>r&&(s=Math.max(1,r-u)),o.push(t.substring(i-=s,i+s)),!((u+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(n)}),i=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",a=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?ns:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(rs.call(t.numerals,String)),u=void 0===t.percent?"%":t.percent+"",l=void 0===t.minus?"-":t.minus+"",c=void 0===t.nan?"NaN":t.nan+"";function f(t){var e=(t=Qa(t)).fill,n=t.align,f=t.sign,d=t.symbol,p=t.zero,h=t.width,m=t.comma,g=t.precision,v=t.trim,y=t.type;"n"===y?(m=!0,y="g"):es[y]||(void 0===g&&(g=12),v=!0,y="g"),(p||"0"===e&&"="===n)&&(p=!0,e="0",n="=");var _="$"===d?i:"#"===d&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",b="$"===d?o:/[%p]/.test(y)?u:"",w=es[y],x=/[defgprs%]/.test(y);function T(t){var i,o,u,d=_,T=b;if("c"===y)T=w(t)+T,t="";else{var C=(t=+t)<0||1/t<0;if(t=isNaN(t)?c:w(Math.abs(t),g),v&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),C&&0==+t&&"+"!==f&&(C=!1),d=(C?"("===f?f:l:"-"===f||"("===f?"":f)+d,T=("s"===y?is[8+Xa/3]:"")+T+(C&&"("===f?")":""),x)for(i=-1,o=t.length;++i(u=t.charCodeAt(i))||u>57){T=(46===u?a+t.slice(i+1):t.slice(i))+T,t=t.slice(0,i);break}}m&&!p&&(t=r(t,1/0));var A=d.length+t.length+T.length,E=A>1)+d+t+T+E.slice(A);break;default:t=E+d+t+T}return s(t)}return g=void 0===g?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),T.toString=function(){return t+""},T}return{format:f,formatPrefix:function(t,e){var n,r=f(((t=Qa(t)).type="f",t)),i=3*Math.max(-8,Math.min(8,Math.floor((n=e,((n=Za(Math.abs(n)))?n[1]:NaN)/3)))),o=Math.pow(10,-i),a=is[8+i/3];return function(t){return r(o*t)+a}}}}var as={test:Pa((function(t){return/^(\+|-)?\d{1,3}(,\d{3})*(\.\d+)?((e|E)(\+|-)?\d+)?$/.test(t.trim())})),parse:Pa((function(t){return parseFloat(t.replace(/,/g,""))})),description:"Comma thousand separator, point decimal mark",thousand_separator:",",decimal_mark:".",id:"number$comma_point",example:"12,235.56"},ss={test:Pa((function(t){return/^(\+|-)?\d{1,3}(\s\d{3})*(\.\d+)?((e|E)(\+|-)?\d+)?$/.test(t.trim())})),parse:Pa((function(t){return parseFloat(t.replace(/\s/g,""))})),description:"Space thousand separator, point decimal mark",thousand_separator:" ",decimal_mark:".",id:"number$space_point",example:"12 235.56"},us={test:Pa((function(t){return/^(\+|-)?\d+(\.\d+)?((e|E)(\+|-)?\d+)?$/.test(t.trim())})),parse:Pa((function(t){return parseFloat(t)})),description:"No thousand separator, point decimal mark",thousand_separator:"",decimal_mark:".",id:"number$none_point",example:"12235.56"},ls={test:Pa((function(t){return/^(\+|-)?\d{1,3}(\.\d{3})*(,\d+)?((e|E)(\+|-)?\d+)?$/.test(t.trim())})),parse:Pa((function(t){return parseFloat(t.replace(/\./g,"").replace(/,/,"."))})),description:"Point thousand separator, comma decimal mark",thousand_separator:".",decimal_mark:",",id:"number$point_comma",example:"12.235,56"},cs={test:Pa((function(t){return/^(\+|-)?\d{1,3}(\s\d{3})*(,\d+)?((e|E)(\+|-)?\d+)?$/.test(t.trim())})),parse:Pa((function(t){return parseFloat(t.replace(/\s/g,"").replace(/,/,"."))})),description:"Space thousand separator, comma decimal mark",thousand_separator:" ",decimal_mark:",",id:"number$space_comma",example:"12 235,56"},fs={test:Pa((function(t){return/^(\+|-)?\d+(,\d+)?((e|E)(\+|-)?\d+)?$/.test(t.trim())})),parse:Pa((function(t){return parseFloat(t.replace(/,/,"."))})),description:"No thousand separator, comma decimal mark",thousand_separator:"",decimal_mark:",",id:"number$none_comma",example:"12235,56"},ds=Object.freeze([as,ss,ls,cs,us,fs]);ds.forEach((function(t){t.type="number",t.format=function(t){var e,n,r=os({decimal:t.decimal_mark,thousands:t.thousand_separator,grouping:[3],currency:["",""]});return function(t,i){return null===t?"":(i||(i=",.2f"),i!==n&&(n=i,e=r.format(n)),e(t))}}(t),Object.freeze(t)}));var ps=Object.freeze({test:function(t){return"string"==typeof t||za(t)},parse:function(t){return"string"==typeof t?t:za(t)},format:function(t){if("string"==typeof t)return t},type:"string",description:"Arbitrary string",id:"string$arbitrary_string"}),hs=Object.freeze({datetime:Ga,number:ds}),ms=Object.freeze(["datetime","number","string"]),gs=Object.freeze({n_max:250,n_failing_values:0,failure_fraction:.05,sort:!0}),vs=Object.freeze(Object.keys(gs));function ys(t,e){return t.index-e.index}function _s(t,e){return e.n_success-t.n_success||ys(t,e)}function bs(t){return(""+t).trim()}function ws(t){return void 0===t?function(t){return bs(t)}:"function"==typeof t?function(e,n){return bs(t(e,n))}:function(e){return bs(e[""+t])}}function xs(t){t?Array.isArray(t)||(t=[t]):t=ms;var e=t.reduce((function(t,e){var n=hs[e];return n&&Array.prototype.push.apply(t,n),t}),[]),n=-1!==t.indexOf("string"),r=vs.reduce((function(t,e){return t[e]=gs[e],t}),{}),i=function(t,i){i=ws(i);var o=t.map(i).filter((function(t){return t}));if(!o.length)return n?[ps]:[];var a=Math.min(r.n_max,o.length),s=Math.floor(a*r.failure_fraction),u=r.n_failing_values,l=r.sort?_s:ys,c=e.slice().reduce((function(t,e,n){for(var r=c=0,i=[],l=!1,c=0;cs?l=!0:-1===i.indexOf(f)&&(i.push(f),i.length>u&&(l=!0)),l))break}return l||t.push({interp:e,n_success:a-r,index:n}),t}),[]).sort(l).map((function(t){return t.interp}));return n&&c.push(ps),c};return vs.forEach((function(t){var e;i[(e=t,e.replace(/_(\w)/g,(function(t,e){return e.toUpperCase()})))]=function(e){return void 0===e?r[t]:(r[t]=e,i)}})),i}function Ts(t,e,n,r){var i=[],o=[],a=0,s=[],u={};function l(t,e){if(!u[t])return{};var n=u[t];return n[e]?n[e]:{}}for(var c in s.column_names={},s.metadata={},n){var f={},d=n[c];if(d){for(let t=0;t=T.length||("columns"in h&&null!=h.columns?w[h.key]=h.columns.filter((function(t){return t=T[b+1].length?w[h.key]=_(h,h.column,""):w[h.key]=_(h,h.column,T[b+1][h.column])))}s.push(w)}return s}function Cs(t){for(var e=t.length;e-- >1&&(!t[e]||!t[e].length||Array.isArray(t[e])&&-1==t[e].findIndex((function(t){return null!==t&&""!==t})));)t.splice(e,1);return t}xs.DATETIME_IDS=Object.freeze(Ga.map((function(t){return t.id}))),xs.NUMBER_IDS=Object.freeze(ds.map((function(t){return t.id}))),xs.STRING_IDS=Object.freeze([ps.id]),xs.getInterpretation=function(){var t=Ga.concat(ds,ps).reduce((function(t,e){return t[e.id]=e,t}),{});return function(e){return t[e]}}(),xs._createAccessorFunction=ws,Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function(t){if(null==this)throw new TypeError("this is null or not defined");var e=Object(this),n=e.length>>>0;if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var r=arguments[1],i=0;i{const e=It(".dialog");if(t.which in Es){var n=Es[t.which];n.callback&&n.callback(As.node().value),e.remove(),t.preventDefault()}};function ks(t,e,{buttons:n=[{text:"Okay",keyCode:13}],is_html:r=!1,upgrade:i=null,is_loading:o=!1,width:a="420px",on_close:s=null}={}){var u=It("body").append("div").attr("class","dialog").attr("tabindex",0).on("mousedown",(function(t){for(var e=t.target,n=!1;e&&"dialog"!=e.className;)"dialog"==(e=e.parentNode).className&&(n=!0);n||(s&&s(),u.remove())})),l=u.append("div").attr("class","dialog-inner").style("width",a).on("click",(function(t){t.stopPropagation()})),c=l.append("div").attr("class","text"+(o?" loading":""));if("string"==typeof t?c.append("h1").text(t):t instanceof HTMLElement&&c.append("h1").append((()=>t)),"string"==typeof e)As=r?c.append("div").classed("loading-spinner",o).html(e):c.append("p").text(e);else if(e instanceof HTMLElement)As=c.append((()=>e));else if("object"==typeof e){if(As=c.append(e.type),e.value&&(As.node().value=e.value),e.attributes)for(var f in e.attributes)As.attr(f,e.attributes[f]);As.node().focus()}var d=l;null!=i&&"object"==typeof i&&function(t,e,n,r){r&&t.classed("business",!0);var i=t.append("div").attr("class","text");i.append("p").text(e),i.append("ul").selectAll("li").data(n).enter().append("li").html((function(t){return t})).append("i").attr("class","fa fa-check")}(d=d.append("div").attr("class","upgrade"),i.message,i.list,i.is_business);var p=d.append("div").attr("class","btns"+(o?" loading":""));return Es={},n.forEach((function(t){var e=p.append(t.tag_name||"div").attr("class","btn").attr("data-testid","dialog-button").style("margin-right",o?"0":"0.75em").text(t.text).on("click",(function(){t.callback&&t.callback(As.node().value,u),u.remove()}));t.class&&e.classed(t.class,!0),t.keyCode&&(Es[t.keyCode]=t),t.href&&e.attr("href",t.href),t.target&&e.attr("target",t.target),t.fa_icon&&e.append("i").lower().attr("class","fa "+t.fa_icon)})),u.node().addEventListener("keydown",Ds),u.node().focus(),u}const Ss={allow_other_option:!1,match_anywhere:!1,custom_renderer:null,autocomplete:!0};function Ms({input:t,id:e,options:n=[],mode:r="single",options_config:i={}}){if(t&&e){this.input=t,this.id=e,this.mode=["single","multi"].includes(r)?r:"single",this.options=(Array.isArray(n)?n:[n]).map(Ls),this.selected_options=[],this.options_config={...Ss,...i},this.options_config.allow_other_option&&"multi"===this.mode&&(console.warn("Warning for dropdown "+e+": it's not possible to allow other options in multi mode."),this.options_config.allow_other_option=!1),this.options_config.autocomplete&&"multi"===this.mode&&(console.warn("Warning for dropdown "+e+": autocomplete will be disabled in multi mode."),this.options_config.autocomplete=!1),this.autocomplete=this.initAutocomplete(),this.changeCallback=function(){};var o=this;this.input.type="text",this.input.classList.add("multi"==r?"multi-select":"single-select"),this.input.addEventListener("change",(function(t){o.changeCallback.call(o.input,o.getValue(),t)})),this.setOptions(n),this.options_config.autocomplete||(this.input.setAttribute("readonly",!0),this.input.style.cursor="pointer")}else console.error("Can't initialize a dropdown without input or id")}function Fs(t){var e=t.options.filter((e=>t.selected_options.includes(e[1])));return t.selected_options.length&&!e.length&&t.options_config.allow_other_option&&(e=[[t.selected_options[0],t.selected_options[0]]]),e}function Ls(t){return Array.isArray(t)?t.map(String):[String(t),String(t)]}Ms.prototype.setSelectedOptions=function(t){this.selected_options=Array.isArray(t)?t:[t],this.updateInput()},Ms.prototype.setOptions=function(t){this.options=t.map(Ls),this.autocomplete.renderOptions()},Ms.prototype.select=function(t){"multi"==this.mode?this.selected_options.push(t):this.selected_options=[t],this.updateInput()},Ms.prototype.deselect=function(t){if("single"!=this.mode){var e=this.selected_options.indexOf(t);e>-1&&this.selected_options.splice(e,1),this.updateInput()}},Ms.prototype.getValue=function(t){var e=Fs(this).map((t=>t[1]));return"multi"===this.mode?t?e.join(", "):e:e[0]},Ms.prototype.getOptions=function(){return this.options},Ms.prototype.getDisplayValue=function(){return Fs(this).map((t=>t[0])).join(", ")},Ms.prototype.updateInput=function(){this.input.value=this.getDisplayValue(),this.input.setAttribute("data-value",this.getValue(!0))},Ms.prototype.isSelected=function(t){return this.selected_options.includes(t)},Ms.prototype.onChange=function(t){this.changeCallback=t};Ms.prototype.initAutocomplete=function(){var t=this,e=this.options_config,n=this.input;if(n.setAttribute("data-autocomplete",this.id),n.setAttribute("autocomplete","off"),!document.getElementById(this.id)){const t=Bt("i").classed("fa fa-chevron-down clickable",!0),e=Bt("div").classed("dropdown autocomplete",!0).attr("id",this.id);n.insertAdjacentHTML("afterend",t.node().outerHTML+e.node().outerHTML)}var r=[],i=It(document.getElementById(this.id));i.classed("click-to-open",!0);var o=i.append("div").attr("class","dropdown-list");function a(t){if(1===t.length)return"dropdown-category";var e="dropdown-item";return r.length&&r.includes(t[1])&&(e+=" current"),e}function s(n){var r=n||t.options;o.selectAll("div").remove(),o.selectAll("div").data(r).enter().append("div").attr("class",a).attr("data-value",(function(t){return"string"==typeof t?t||null:t[1]})).each((function(t){const n=It(this);if(!e.custom_renderer){const e=Array.isArray(t)?t[0]:t;return void n.text(e)}let r=e.custom_renderer(t,this);if(r){if(Array.isArray(r)||(r=[r]),r.find((t=>"string"!=typeof t&&!(t instanceof HTMLElement))))throw new Error("Autocomplete elements must be strings or HTMLElements");n.node().append(...r)}})),r.length||o.append("div").attr("class","dropdown-item disabled").text("No matches found")}function u(){i.classed("open",!1)}function l(e,r){if(r.hasAttribute("data-value")){var i=r.getAttribute("data-value");It(r).classed("current")&&"multi"===t.mode?t.deselect(i):t.select(i),u(),It(n).dispatch("change")}else e.preventDefault()}return i.on("mousedown",(function(t){l(t,t.target)})),It(n).on("keydown.autocomplete",(function(t){var e,r;9==t.keyCode||13==t.keyCode?(e=o.select(".selected")).empty()||(l(t,e.node()),n.blur()):40==t.keyCode?((e=o.select(".selected")).empty()||(r=e.node().nextSibling),r||(r=o.select(".dropdown-item[data-value]").node()),o.selectAll(".selected").classed("selected",!1),It(r).classed("selected",!0)):38==t.keyCode&&((e=o.select(".selected")).empty()||(r=e.node().previousSibling),r||(r=o.select(".dropdown-item:last-child").node()),o.selectAll(".selected").classed("selected",!1),It(r).classed("selected",!0))})).on("input.autocomplete",(function(){var r,i,o=n.value,a=o.toLowerCase(),u=!1,l=t.options;if(It(n).attr("data-value",o),i=e.match_anywhere?(t,e)=>t.includes(e):(t,e)=>0===t.indexOf(e),o){r=[];for(var c=0;c0?It(".sheet-tab.selected").datum().id:null;Os.html("");var u=null;"string"!=typeof e[0]&&(e=["Data"].concat(e));for(var l,c=[],f=0;f Auto set columns").on("click",(function(){ks("Automatically choose your columns"," Flourish will interpret your data to determine which columns to visualize",{is_html:!0,buttons:[{text:"Continue",keyCode:13,class:"primary",callback:function(){Us.spreadsheet.inferDataBindings()}},{text:"Cancel",keyCode:27,class:"secondary"}]})}))}Us.spreadsheet&&(Us.spreadsheet.updateHighlights(),Us.spreadsheet.updateTabs())}))}function zs(t,e,n,r,i){Hs[js]||(js=0),t.attr("class","settings-option option-type-"+e.type).style("display",i?"none":null);var o=null==n?"":gn(n,0,0,e.optional);Is[e.dataset]||(Is[e.dataset]={}),Is[e.dataset][e.key]=js;var a="column"===e.type&&!e.optional,s=a&&!n;t.classed("empty-required-binding",s);var u=t.append("div").attr("class","data-binding-title").on("click",(function(){It(this).select("input").node().focus()}));u.append("h3").text(e.name).append("i").attr("class","fa fa-question setting-tooltip").style("display",e.description||e.data_type?null:"none"),"column"!=e.type||e.optional||u.select("h3").append("span").attr("class","required").text("Required"),u.append("input").attr("id","data-binding-"+e.dataset+"-"+e.key).attr("name",e.dataset+"-"+e.key).attr("disabled",!Us.visualisation.can_edit||null).attr("autocomplete","off").attr("title",'Type in column IDs here, for example "A" or "A,B,D" or "A-D"').each((function(){this.value=o})).attr("data-value",o).attr("type","text").call(function(t){return function(e){e.on("change",(function(){Je.hide(),function(t,e){var n=t.parentElement.parentElement.parentElement.getAttribute("data-sheet"),r=t.value.indexOf("::")>-1,i={type:e.type};"column"==i.type?i.column=r?t.value:n+"::"+t.value:i.columns=r?t.value:n+"::"+t.value;var o,a=t.getBoundingClientRect(),s=[a.left-5,a.top+.5*a.height];if(t.value||"column"!=i.type){try{o=function(t,e){var n={};if(!(t.type in t)){if(t.optional)return n;throw new Error("Data binding must specify '"+t.type+"': "+JSON.stringify(t))}var r=t[t.type].indexOf("::");if(-1==r)throw new Error("Invalid data binding: "+t[t.type]);var i=t[t.type].substr(0,r);n.data_table_id=e[i];var o=t[t.type].substr(r+2);if("column"==t.type)n.column=cn(o,t.optional);else{if("columns"!=t.type)throw new Error("Unknown data binding type: "+t.type);n.columns=hn(o)}return n}(i,Us.visualisation.getDataTableIds());var u=gn(o,Us.visualisation.getDataTableNames(),0,e.optional);t.value.toUpperCase()!==u&&(t.value=u)}catch(e){return console.error("Failed to parse data binding",e),Je.point(s).text(e.message).draw(),t.value=t.getAttribute("data-value"),void(Rs=!0)}if(It(t.parentElement.parentElement).classed("empty-required-binding",!1),!o.data_table_id)return t.value=t.getAttribute("data-value"),Je.point(s).text("No such data table").draw(),void(Rs=!0);if(e.data_type){const n=Us.spreadsheet.getTypeAnnotatedColumns();if("column"===i.type){const r=n[o.column];if(!r)return Je.point(s).html(`Column '${t.value}' does not exist

Choose a column from the data table

`).draw(),t.value=t.getAttribute("data-value"),void(Rs=!0);if($s(e,r))return t.value=t.getAttribute("data-value"),Je.point(s).html(`\n\t\t\t\t\t\tThis column selection does not accept ${qs([r.type])} columns\n\t\t\t\t\t\t

Choose a different column or check/change the column’s type in the header row with the following types:

\n\t\t\t\t\t\t
${qs(e.data_type)}
\n\t\t\t\t\t`).draw(),void(Rs=!0)}else{const r=n.filter((t=>o.columns.includes(t.index))).filter((t=>$s(e,t)));if(r.length){t.value=t.getAttribute("data-value");var l=r.map((t=>t.type)).reduce(((t,e)=>t.includes(e)?t:[...t,e]),[]),c=l.reduce(((t,e,n,r)=>1===r.length?qs([e]):(n0?",":""} ${qs([e])}`:t+=`or ${qs([e])}`,t)),"");return Je.point(s).html(`\n\t\t\t\t\t\tThis column selection does not accept ${c} columns\n\t\t\t\t\t\t

Choose a different column or check/change the column’s type in the header row with the following types:

\n\t\t\t\t\t\t
${qs(e.data_type)}
\n\t\t\t\t\t`).draw(),void(Rs=!0)}}}}else if(o=null,!e.optional)return t.value=t.getAttribute("data-value"),Je.point(s).text("This column selection is required").draw(),void(Rs=!0);Us.spreadsheet.updateTabs();var f={};f[e.dataset]={},f[e.dataset][e.key]=o,Ps(f,(function(){t.setAttribute("data-value",t.value);var e=Vs();e?(It(".publish-btn").classed("disabled",!0),It(".republish-btn").classed("disabled",!0),jt(".download-btn").classed("disabled",!0),It("body").classed("impossible",!0)):(It(".publish-btn").classed("disabled",!1),It(".republish-btn").classed("disabled",!1),jt(".download-btn").classed("disabled",!1),It("body").classed("impossible",!1),Us.visualisation.getState((function(t){Us.visualisation.prepareData((function(e,n){e?console.error("Failed to prepare data for template"):Us.preview_pane.getDrawCalled()?Us.preview_pane.sync({data:n,state:t,update:!0}):(Us.preview_pane.sync({data:n,state:t,draw:!0}),Us.preview_pane.setDrawCalled(!0))}))}))),Us.spreadsheet&&Us.spreadsheet.updateHighlights(),Us.template_settings&&(e?Us.template_settings.setReadOnly():Us.template_settings.unsetReadOnly(),Us.template_settings.populate()),Us.theme_chooser.enableOrDisable()}))}(this,t)})).on("keydown",(function(){Us.confirm.blank()})).on("focus",(function(){Rs||Je.hide(),Rs=!1,jt(".data-bindings .settings-option").classed("open",!1),It(this.parentElement.parentElement).classed("open",!0)}))}}(e)).style("background",Hs[js].light).style("border-color",Hs[js].full),s&&Us.template_settings.setReadOnly(),a&&t.append("div").attr("class","data-binding-required").append("p").text("This column selection is required. The visualisation will not update while this field is empty.");var l,c=t.append("div").attr("class","data-binding-description");if(e.description&&c.append("p").html(Ye.sanitize(e.description)),e.data_type){var f=c.append("div").attr("class","data-binding-data-types");f.append("p").text("Accepted column types");for(var d=Array.isArray(e.data_type)?e.data_type:[e.data_type],p=0;p"string"==typeof t?t===e.type:t.type===e.type))}function qs(t){return t.map((t=>`\n\t\t\n\t\t\n\t\t

${Ns[t].text}

\n\t\t
\n\t\t`)).join("")}function Vs(){var t=Us.visualisation.dataBindingsForCurrentTemplate(),e=Us.template_data_bindings,n={};return e.forEach((function(t){"string"!=typeof t&&(n[t.dataset]||(n[t.dataset]={}),n[t.dataset][t.key]=t)})),e.some((function(e){if("string"!=typeof e&&"column"===e.type&&!n[e.dataset][e.key].optional)return!t[e.dataset]||null==t[e.dataset][e.key]}))}function Ws(t=!0){if(Vs())It("body").classed("impossible",!0),It(".empty-label").html(" Oops! It looks like one of the required column selections is empty."),It(".empty-details").html("Head over to the Data tab to choose a suitable column.");else if(It("body").classed("impossible")){const e=Us.visualisation?Us.visualisation:Us.story;e.status&&e.status.requested_by?Us.confirm_published.awaitingReview(e.status,e.can_review,Us.user):Us.visualisation.embed_url&&t?Us.confirm_published.edited():(Us.confirm_published.unpublished(),It("body").classed("impossible",!1),It(".empty-label").text(""),It(".empty-details").text(""))}}var Gs=!1;function Zs(t){if(Gs&&window.top!==window.self){var e=window;"srcdoc"===e.location.pathname&&(e=e.parent);var n=function(){var t={};return window._Flourish_template_id&&(t.template_id=window._Flourish_template_id),window.Flourish&&window.Flourish.app&&window.Flourish.app.loaded_template_id&&(t.template_id=window.Flourish.app.loaded_template_id),window._Flourish_visualisation_id&&(t.visualisation_id=window._Flourish_visualisation_id),window.Flourish&&window.Flourish.app&&window.Flourish.app.loaded_visualisation&&(t.visualisation_id=window.Flourish.app.loaded_visualisation.id),window.Flourish&&window.Flourish.app&&window.Flourish.app.story&&(t.story_id=window.Flourish.app.story.id,t.slide_count=window.Flourish.app.story.slides.length),window.Flourish&&window.Flourish.app&&window.Flourish.app.current_slide&&(t.slide_index=window.Flourish.app.current_slide.index+1),t}(),r={sender:"Flourish",method:"customerAnalytics"};for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i]);for(var i in t)t.hasOwnProperty(i)&&(r[i]=t[i]);e.parent.postMessage(JSON.stringify(r),"*")}}function Xs(t){if("function"!=typeof t)throw new Error("Analytics callback is not a function");window.Flourish._analytics_listeners.push(t)}function Js(){Gs=!0;[{event_name:"click",action_name:"click",use_capture:!0},{event_name:"keydown",action_name:"key_down",use_capture:!0},{event_name:"mouseenter",action_name:"mouse_enter",use_capture:!1},{event_name:"mouseleave",action_name:"mouse_leave",use_capture:!1}].forEach((function(t){document.body.addEventListener(t.event_name,(function(){Zs({action:t.action_name})}),t.use_capture)}))} +/*! @license DOMPurify 3.1.4 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.4/LICENSE */const{entries:Qs,setPrototypeOf:Ks,isFrozen:tu,getPrototypeOf:eu,getOwnPropertyDescriptor:nu}=Object;let{freeze:ru,seal:iu,create:ou}=Object,{apply:au,construct:su}="undefined"!=typeof Reflect&&Reflect;ru||(ru=function(t){return t}),iu||(iu=function(t){return t}),au||(au=function(t,e,n){return t.apply(e,n)}),su||(su=function(t,e){return new t(...e)});const uu=wu(Array.prototype.forEach),lu=wu(Array.prototype.pop),cu=wu(Array.prototype.push),fu=wu(String.prototype.toLowerCase),du=wu(String.prototype.toString),pu=wu(String.prototype.match),hu=wu(String.prototype.replace),mu=wu(String.prototype.indexOf),gu=wu(String.prototype.trim),vu=wu(Object.prototype.hasOwnProperty),yu=wu(RegExp.prototype.test),_u=function(t){return function(){for(var e=arguments.length,n=new Array(e),r=0;r1?n-1:0),i=1;i2&&void 0!==arguments[2]?arguments[2]:fu;Ks&&Ks(t,null);let r=e.length;for(;r--;){let i=e[r];if("string"==typeof i){const t=n(i);t!==i&&(tu(e)||(e[r]=t),i=t)}t[i]=!0}return t}function Tu(t){for(let e=0;e/gm),Bu=iu(/\${[\w\W]*}/gm),ju=iu(/^data-[\-\w.\u00B7-\uFFFF]/),Yu=iu(/^aria-[\-\w]+$/),zu=iu(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Pu=iu(/^(?:\w+script|data):/i),$u=iu(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),qu=iu(/^html$/i),Vu=iu(/^[a-z][.\w]*(-[.\w]+)+$/i);var Wu=Object.freeze({__proto__:null,MUSTACHE_EXPR:Hu,ERB_EXPR:Iu,TMPLIT_EXPR:Bu,DATA_ATTR:ju,ARIA_ATTR:Yu,IS_ALLOWED_URI:zu,IS_SCRIPT_OR_DATA:Pu,ATTR_WHITESPACE:$u,DOCTYPE_NAME:qu,CUSTOM_ELEMENT:Vu});const Gu=1,Zu=3,Xu=7,Ju=8,Qu=9,Ku=function(){return"undefined"==typeof window?null:window};var tl,el,nl,rl,il,ol,al,sl,ul,ll=function t(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ku();const n=e=>t(e);if(n.version="3.1.4",n.removed=[],!e||!e.document||e.document.nodeType!==Qu)return n.isSupported=!1,n;let{document:r}=e;const i=r,o=i.currentScript,{DocumentFragment:a,HTMLTemplateElement:s,Node:u,Element:l,NodeFilter:c,NamedNodeMap:f=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:d,DOMParser:p,trustedTypes:h}=e,m=l.prototype,g=Au(m,"cloneNode"),v=Au(m,"nextSibling"),y=Au(m,"childNodes"),_=Au(m,"parentNode");if("function"==typeof s){const t=r.createElement("template");t.content&&t.content.ownerDocument&&(r=t.content.ownerDocument)}let b,w="";const{implementation:x,createNodeIterator:T,createDocumentFragment:C,getElementsByTagName:A}=r,{importNode:E}=i;let D={};n.isSupported="function"==typeof Qs&&"function"==typeof _&&x&&void 0!==x.createHTMLDocument;const{MUSTACHE_EXPR:k,ERB_EXPR:S,TMPLIT_EXPR:M,DATA_ATTR:F,ARIA_ATTR:L,IS_SCRIPT_OR_DATA:N,ATTR_WHITESPACE:U,CUSTOM_ELEMENT:O}=Wu;let{IS_ALLOWED_URI:R}=Wu,H=null;const I=xu({},[...Eu,...Du,...ku,...Mu,...Lu]);let B=null;const j=xu({},[...Nu,...Uu,...Ou,...Ru]);let Y=Object.seal(ou(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),z=null,P=null,$=!0,q=!0,V=!1,W=!0,G=!1,Z=!0,X=!1,J=!1,Q=!1,K=!1,tt=!1,et=!1,nt=!0,rt=!1,it=!0,ot=!1,at={},st=null;const ut=xu({},["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"]);let lt=null;const ct=xu({},["audio","video","img","source","image","track"]);let ft=null;const dt=xu({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),pt="http://www.w3.org/1998/Math/MathML",ht="http://www.w3.org/2000/svg",mt="http://www.w3.org/1999/xhtml";let gt=mt,vt=!1,yt=null;const _t=xu({},[pt,ht,mt],du);let bt=null;const wt=["application/xhtml+xml","text/html"];let xt=null,Tt=null;const Ct=r.createElement("form"),At=function(t){return t instanceof RegExp||t instanceof Function},Et=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Tt||Tt!==t){if(t&&"object"==typeof t||(t={}),t=Cu(t),bt=-1===wt.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE,xt="application/xhtml+xml"===bt?du:fu,H=vu(t,"ALLOWED_TAGS")?xu({},t.ALLOWED_TAGS,xt):I,B=vu(t,"ALLOWED_ATTR")?xu({},t.ALLOWED_ATTR,xt):j,yt=vu(t,"ALLOWED_NAMESPACES")?xu({},t.ALLOWED_NAMESPACES,du):_t,ft=vu(t,"ADD_URI_SAFE_ATTR")?xu(Cu(dt),t.ADD_URI_SAFE_ATTR,xt):dt,lt=vu(t,"ADD_DATA_URI_TAGS")?xu(Cu(ct),t.ADD_DATA_URI_TAGS,xt):ct,st=vu(t,"FORBID_CONTENTS")?xu({},t.FORBID_CONTENTS,xt):ut,z=vu(t,"FORBID_TAGS")?xu({},t.FORBID_TAGS,xt):{},P=vu(t,"FORBID_ATTR")?xu({},t.FORBID_ATTR,xt):{},at=!!vu(t,"USE_PROFILES")&&t.USE_PROFILES,$=!1!==t.ALLOW_ARIA_ATTR,q=!1!==t.ALLOW_DATA_ATTR,V=t.ALLOW_UNKNOWN_PROTOCOLS||!1,W=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,G=t.SAFE_FOR_TEMPLATES||!1,Z=!1!==t.SAFE_FOR_XML,X=t.WHOLE_DOCUMENT||!1,K=t.RETURN_DOM||!1,tt=t.RETURN_DOM_FRAGMENT||!1,et=t.RETURN_TRUSTED_TYPE||!1,Q=t.FORCE_BODY||!1,nt=!1!==t.SANITIZE_DOM,rt=t.SANITIZE_NAMED_PROPS||!1,it=!1!==t.KEEP_CONTENT,ot=t.IN_PLACE||!1,R=t.ALLOWED_URI_REGEXP||zu,gt=t.NAMESPACE||mt,Y=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&At(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Y.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&At(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Y.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Y.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),G&&(q=!1),tt&&(K=!0),at&&(H=xu({},Lu),B=[],!0===at.html&&(xu(H,Eu),xu(B,Nu)),!0===at.svg&&(xu(H,Du),xu(B,Uu),xu(B,Ru)),!0===at.svgFilters&&(xu(H,ku),xu(B,Uu),xu(B,Ru)),!0===at.mathMl&&(xu(H,Mu),xu(B,Ou),xu(B,Ru))),t.ADD_TAGS&&(H===I&&(H=Cu(H)),xu(H,t.ADD_TAGS,xt)),t.ADD_ATTR&&(B===j&&(B=Cu(B)),xu(B,t.ADD_ATTR,xt)),t.ADD_URI_SAFE_ATTR&&xu(ft,t.ADD_URI_SAFE_ATTR,xt),t.FORBID_CONTENTS&&(st===ut&&(st=Cu(st)),xu(st,t.FORBID_CONTENTS,xt)),it&&(H["#text"]=!0),X&&xu(H,["html","head","body"]),H.table&&(xu(H,["tbody"]),delete z.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw _u('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw _u('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');b=t.TRUSTED_TYPES_POLICY,w=b.createHTML("")}else void 0===b&&(b=function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";e&&e.hasAttribute(r)&&(n=e.getAttribute(r));const i="dompurify"+(n?"#"+n:"");try{return t.createPolicy(i,{createHTML:t=>t,createScriptURL:t=>t})}catch(t){return console.warn("TrustedTypes policy "+i+" could not be created."),null}}(h,o)),null!==b&&"string"==typeof w&&(w=b.createHTML(""));ru&&ru(t),Tt=t}},Dt=xu({},["mi","mo","mn","ms","mtext"]),kt=xu({},["foreignobject","annotation-xml"]),St=xu({},["title","style","font","a","script"]),Mt=xu({},[...Du,...ku,...Su]),Ft=xu({},[...Mu,...Fu]),Lt=function(t){cu(n.removed,{element:t});try{t.parentNode.removeChild(t)}catch(e){t.remove()}},Nt=function(t,e){try{cu(n.removed,{attribute:e.getAttributeNode(t),from:e})}catch(t){cu(n.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t&&!B[t])if(K||tt)try{Lt(e)}catch(t){}else try{e.setAttribute(t,"")}catch(t){}},Ut=function(t){let e=null,n=null;if(Q)t=""+t;else{const e=pu(t,/^[\r\n\t ]+/);n=e&&e[0]}"application/xhtml+xml"===bt&>===mt&&(t=''+t+"");const i=b?b.createHTML(t):t;if(gt===mt)try{e=(new p).parseFromString(i,bt)}catch(t){}if(!e||!e.documentElement){e=x.createDocument(gt,"template",null);try{e.documentElement.innerHTML=vt?w:i}catch(t){}}const o=e.body||e.documentElement;return t&&n&&o.insertBefore(r.createTextNode(n),o.childNodes[0]||null),gt===mt?A.call(e,X?"html":"body")[0]:X?e.documentElement:o},Ot=function(t){return T.call(t.ownerDocument||t,t,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Rt=function(t){return t instanceof d&&(void 0!==t.__depth&&"number"!=typeof t.__depth||void 0!==t.__removalCount&&"number"!=typeof t.__removalCount||"string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof f)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},Ht=function(t){return"function"==typeof u&&t instanceof u},It=function(t,e,r){D[t]&&uu(D[t],(t=>{t.call(n,e,r,Tt)}))},Bt=function(t){let e=null;if(It("beforeSanitizeElements",t,null),Rt(t))return Lt(t),!0;const r=xt(t.nodeName);if(It("uponSanitizeElement",t,{tagName:r,allowedTags:H}),t.hasChildNodes()&&!Ht(t.firstElementChild)&&yu(/<[/\w]/g,t.innerHTML)&&yu(/<[/\w]/g,t.textContent))return Lt(t),!0;if(t.nodeType===Xu)return Lt(t),!0;if(Z&&t.nodeType===Ju&&yu(/<[/\w]/g,t.data))return Lt(t),!0;if(!H[r]||z[r]){if(!z[r]&&Yt(r)){if(Y.tagNameCheck instanceof RegExp&&yu(Y.tagNameCheck,r))return!1;if(Y.tagNameCheck instanceof Function&&Y.tagNameCheck(r))return!1}if(it&&!st[r]){const e=_(t)||t.parentNode,n=y(t)||t.childNodes;if(n&&e){for(let r=n.length-1;r>=0;--r){const i=g(n[r],!0);i.__removalCount=(t.__removalCount||0)+1,e.insertBefore(i,v(t))}}}return Lt(t),!0}return t instanceof l&&!function(t){let e=_(t);e&&e.tagName||(e={namespaceURI:gt,tagName:"template"});const n=fu(t.tagName),r=fu(e.tagName);return!!yt[t.namespaceURI]&&(t.namespaceURI===ht?e.namespaceURI===mt?"svg"===n:e.namespaceURI===pt?"svg"===n&&("annotation-xml"===r||Dt[r]):Boolean(Mt[n]):t.namespaceURI===pt?e.namespaceURI===mt?"math"===n:e.namespaceURI===ht?"math"===n&&kt[r]:Boolean(Ft[n]):t.namespaceURI===mt?!(e.namespaceURI===ht&&!kt[r])&&!(e.namespaceURI===pt&&!Dt[r])&&!Ft[n]&&(St[n]||!Mt[n]):!("application/xhtml+xml"!==bt||!yt[t.namespaceURI]))}(t)?(Lt(t),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!yu(/<\/no(script|embed|frames)/i,t.innerHTML)?(G&&t.nodeType===Zu&&(e=t.textContent,uu([k,S,M],(t=>{e=hu(e,t," ")})),t.textContent!==e&&(cu(n.removed,{element:t.cloneNode()}),t.textContent=e)),It("afterSanitizeElements",t,null),!1):(Lt(t),!0)},jt=function(t,e,n){if(nt&&("id"===e||"name"===e)&&(n in r||n in Ct||"__depth"===n||"__removalCount"===n))return!1;if(q&&!P[e]&&yu(F,e));else if($&&yu(L,e));else if(!B[e]||P[e]){if(!(Yt(t)&&(Y.tagNameCheck instanceof RegExp&&yu(Y.tagNameCheck,t)||Y.tagNameCheck instanceof Function&&Y.tagNameCheck(t))&&(Y.attributeNameCheck instanceof RegExp&&yu(Y.attributeNameCheck,e)||Y.attributeNameCheck instanceof Function&&Y.attributeNameCheck(e))||"is"===e&&Y.allowCustomizedBuiltInElements&&(Y.tagNameCheck instanceof RegExp&&yu(Y.tagNameCheck,n)||Y.tagNameCheck instanceof Function&&Y.tagNameCheck(n))))return!1}else if(ft[e]);else if(yu(R,hu(n,U,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==mu(n,"data:")||!lt[t]){if(V&&!yu(N,hu(n,U,"")));else if(n)return!1}else;return!0},Yt=function(t){return"annotation-xml"!==t&&pu(t,O)},zt=function(t){It("beforeSanitizeAttributes",t,null);const{attributes:e}=t;if(!e)return;const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:B};let i=e.length;for(;i--;){const o=e[i],{name:a,namespaceURI:s,value:u}=o,l=xt(a);let c="value"===a?u:gu(u);if(r.attrName=l,r.attrValue=c,r.keepAttr=!0,r.forceKeepAttr=void 0,It("uponSanitizeAttribute",t,r),c=r.attrValue,r.forceKeepAttr)continue;if(Nt(a,t),!r.keepAttr)continue;if(!W&&yu(/\/>/i,c)){Nt(a,t);continue}if(Z&&yu(/((--!?|])>)|<\/(style|title)/i,c)){Nt(a,t);continue}G&&uu([k,S,M],(t=>{c=hu(c,t," ")}));const f=xt(t.nodeName);if(jt(f,l,c)){if(!rt||"id"!==l&&"name"!==l||(Nt(a,t),c="user-content-"+c),b&&"object"==typeof h&&"function"==typeof h.getAttributeType)if(s);else switch(h.getAttributeType(f,l)){case"TrustedHTML":c=b.createHTML(c);break;case"TrustedScriptURL":c=b.createScriptURL(c)}try{s?t.setAttributeNS(s,a,c):t.setAttribute(a,c),Rt(t)?Lt(t):lu(n.removed)}catch(t){}}}It("afterSanitizeAttributes",t,null)},Pt=function t(e){let n=null;const r=Ot(e);for(It("beforeSanitizeShadowDOM",e,null);n=r.nextNode();){if(It("uponSanitizeShadowNode",n,null),Bt(n))continue;const e=_(n);n.nodeType===Gu&&(e&&e.__depth?n.__depth=(n.__removalCount||0)+e.__depth+1:n.__depth=1),(n.__depth>=255||n.__depth<0||bu(n.__depth))&&Lt(n),n.content instanceof a&&(n.content.__depth=n.__depth,t(n.content)),zt(n)}It("afterSanitizeShadowDOM",e,null)};return n.sanitize=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,o=null,s=null,l=null;if(vt=!t,vt&&(t="\x3c!--\x3e"),"string"!=typeof t&&!Ht(t)){if("function"!=typeof t.toString)throw _u("toString is not a function");if("string"!=typeof(t=t.toString()))throw _u("dirty is not a string, aborting")}if(!n.isSupported)return t;if(J||Et(e),n.removed=[],"string"==typeof t&&(ot=!1),ot){if(t.nodeName){const e=xt(t.nodeName);if(!H[e]||z[e])throw _u("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof u)r=Ut("\x3c!----\x3e"),o=r.ownerDocument.importNode(t,!0),o.nodeType===Gu&&"BODY"===o.nodeName||"HTML"===o.nodeName?r=o:r.appendChild(o);else{if(!K&&!G&&!X&&-1===t.indexOf("<"))return b&&et?b.createHTML(t):t;if(r=Ut(t),!r)return K?null:et?w:""}r&&Q&&Lt(r.firstChild);const c=Ot(ot?t:r);for(;s=c.nextNode();){if(Bt(s))continue;const t=_(s);s.nodeType===Gu&&(t&&t.__depth?s.__depth=(s.__removalCount||0)+t.__depth+1:s.__depth=1),(s.__depth>=255||s.__depth<0||bu(s.__depth))&&Lt(s),s.content instanceof a&&(s.content.__depth=s.__depth,Pt(s.content)),zt(s)}if(ot)return t;if(K){if(tt)for(l=C.call(r.ownerDocument);r.firstChild;)l.appendChild(r.firstChild);else l=r;return(B.shadowroot||B.shadowrootmode)&&(l=E.call(i,l,!0)),l}let f=X?r.outerHTML:r.innerHTML;return X&&H["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&yu(qu,r.ownerDocument.doctype.name)&&(f="\n"+f),G&&uu([k,S,M],(t=>{f=hu(f,t," ")})),b&&et?b.createHTML(f):f},n.setConfig=function(){Et(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),J=!0},n.clearConfig=function(){Tt=null,J=!1},n.isValidAttribute=function(t,e,n){Tt||Et({});const r=xt(t),i=xt(e);return jt(r,i,n)},n.addHook=function(t,e){"function"==typeof e&&(D[t]=D[t]||[],cu(D[t],e))},n.removeHook=function(t){if(D[t])return lu(D[t])},n.removeHooks=function(t){D[t]&&(D[t]=[])},n.removeAllHooks=function(){D={}},n}();function cl(){if(null==tl){var t=function(){var t=window.location;"about:srcdoc"==t.href&&(t=window.parent.location);var e={};return function(t,n,r){for(;r=n.exec(t);)e[decodeURIComponent(r[1])]=decodeURIComponent(r[2])}(t.search.substring(1).replace(/\+/g,"%20"),/([^&=]+)=?([^&]*)/g),e}();tl="referrer"in t?/^https:\/\/medium.com\//.test(t.referrer):!("auto"in t)}return tl}function fl(t){var e=t||window.innerWidth;return e>999?650:e>599?575:400}function dl(t){if(t&&window.top!==window.self){var e=window;"srcdoc"==e.location.pathname&&(e=e.parent);var n={sender:"Flourish",method:"scrolly",captions:t.captions};e.parent.postMessage(JSON.stringify(n),"*")}}function pl(t,e){if(window.top!==window.self){var n=window;if("srcdoc"==n.location.pathname&&(n=n.parent),el)return t=parseInt(t,10),void n.parent.postMessage({sentinel:"amp",type:"embed-size",height:t},"*");var r={sender:"Flourish",context:"iframe.resize",method:"resize",height:t,src:n.location.toString()};if(e)for(var i in e)r[i]=e[i];n.parent.postMessage(JSON.stringify(r),"*")}}function hl(){return(-1!==navigator.userAgent.indexOf("Safari")||-1!==navigator.userAgent.indexOf("iPhone"))&&-1==navigator.userAgent.indexOf("Chrome")}function ml(t){return"string"==typeof t||t instanceof String}function gl(t){return"warn"!==t.method?(console.warn("BUG: validateWarnMessage called for method"+t.method),!1):!(null!=t.message&&!ml(t.message))&&!(null!=t.explanation&&!ml(t.explanation))}function vl(t){return"resize"!==t.method?(console.warn("BUG: validateResizeMessage called for method"+t.method),!1):!!ml(t.src)&&(!!ml(t.context)&&!!("number"==typeof(e=t.height)?!isNaN(e)&&e>=0:ml(e)&&/\d/.test(e)&&/^[0-9]*(\.[0-9]*)?(cm|mm|Q|in|pc|pt|px|em|ex|ch|rem|lh|vw|vh|vmin|vmax|%)?$/i.test(e)));var e}function yl(t){throw new Error("Validation for setSetting is not implemented yet; see issue #4328")}function _l(t){return"scrolly"!==t.method?(console.warn("BUG: validateScrolly called for method"+t.method),!1):!!Array.isArray(t.captions)}function bl(t){return"customerAnalytics"===t.method||(console.warn("BUG: validateCustomerAnalyticsMessage called for method"+t.method),!1)}function wl(t){return"request-upload"!==t.method?(console.warn("BUG: validateResizeMessage called for method"+t.method),!1):!!ml(t.name)&&!(null!=t.accept&&!ml(t.accept))}function xl(t,e,n){var r=function(t){for(var e={warn:gl,resize:vl,setSetting:yl,customerAnalytics:bl,"request-upload":wl,scrolly:_l},n={},r=0;r1)return o;var s=setInterval((function(){window._flourish_poll_items=window._flourish_poll_items.filter((function(t){return!t.iframe.offsetParent||(El(t.embed_url,t.container,t.iframe,t.width,t.height,t.play_on_load),!1)})),window._flourish_poll_items.length||clearInterval(s)}),500)}return o}function El(t,e,n,r,i,o){var a;return r&&"number"==typeof r?(a=r,r+="px"):r&&r.match(/^[ \t\r\n\f]*([+-]?\d+|\d*\.\d+(?:[eE][+-]?\d+)?)(?:\\?[Pp]|\\0{0,4}[57]0(?:\r\n|[ \t\r\n\f])?)(?:\\?[Xx]|\\0{0,4}[57]8(?:\r\n|[ \t\r\n\f])?)[ \t\r\n\f]*$/)&&(a=parseFloat(r)),i&&"number"==typeof i&&(i+="px"),r?n.style.width=r:hl()?n.style.width=e.offsetWidth+"px":n.style.width="100%",!!i||(t.match(/\?/)?t+="&auto=1":t+="?auto=1",i=fl(a||n.offsetWidth)+"px"),i&&("%"===i.charAt(i.length-1)&&(i=parseFloat(i)/100*e.parentNode.offsetHeight+"px"),n.style.height=i),n.setAttribute("src",t+(o?"#play-on-load":"")),n}function Dl(t,e,n){for(var r in e||(e=[]),n||(n={}),t)e.push(r),"object"==typeof t[r]&&Dl(t[r],e,n),n[e.join(".")]=t[r],e.pop();return n}function kl(t){var e={};for(var n in t){for(var r=e,i=n.indexOf("."),o=0;i>=0;i=n.indexOf(".",o=i+1)){var a=n.substring(o,i);a in r||(r[a]={}),r=r[a]}r[n.substring(o)]=t[n]}return e}function Sl(t){if(null==t)return t;var e,n={};for(var r in t)Array.isArray(t[r])?n[r]=t[r].slice():(e=t[r],Array.isArray(e)||"object"!=typeof e||null==e?n[r]=t[r]:n[r]=Sl(t[r]));return n}var Ml,Fl=null;function Ll(){return"MessageChannel"in window}var Nl=null;function Ul(){Nl&&nl.removeEventListener("load",Nl),Nl=null}function Ol(t){Ul(),nl.addEventListener("load",t),Nl=t}function Rl(t,e,n){return nc(!1),ul=t?t.visualisation?t.visualisation:t.current_slide.visualisation:null,Fl=null,ul&&ul.template_id?(Ol(function(t,e,n){var r=t.visualisation?t.visualisation.template_id:t.current_slide.visualisation.template_id,i=t.current_slide?t.current_slide.id:null;return function(){zt(),!ul||ul.template_id!=r||t.current_slide&&t.current_slide.id!==i||(Ul(),$l((function(o,a){o?console.error("Failed to get default state"):!ul||ul.template_id!=r||t.current_slide&&t.current_slide.id!==i||ql((function(o,s){if(o)console.error("Failed to call hasData");else if(ul&&ul.template_id==r&&(!t.current_slide||t.current_slide.id===i)){var u=!1;t.visualisation&&(u=t.data_bindings.requiredBindingsAreUnset()),s?ul.refreshDataBindings((function(o){o?console.error("Failed to refresh data bindings"):!ul||ul.template_id!=r||t.current_slide&&t.current_slide.id!==i||ul.prepareData((function(o,s){o?console.error("Failed to prepare data for template"):!ul||ul.template_id!=r||t.current_slide&&t.current_slide.id!==i||tc({data:s,state:e,draw:!u},(function(t,e){Fl=a,n(t,e)}))}))})):tc({state:e,draw:!u},(function(t,e){Fl=a,n(t,e)}))}}))})))}}(t,e,n)),nl.src="/template/"+ul.template_id+"/embed/?auto=1&environment="+rl+"&is_read_only="+(t.is_read_only?"1":"0"),nl):(Ul(),nl.src="about:blank",nl)}function Hl(t){$l((function(e,n){e?console.error("Failed to get default state"):(Fl=n,t())}))}function Il(t,e){var n=t.template_id;t.refreshDataBindings((function(r){r?console.error("Failed to fetch data bindings"):t.prepareData((function(t,r){if(ul&&ul.template_id==n)return t?(console.error("Failed to prepare data for template"),void e(t)):void e(void 0,r)}))}))}function Bl(t,e){Il(t,(function(t,n){if(t)return e(t);tc({data:n,update:!0},e)}))}function jl(t,e){Il(t,(function(t,n){if(t)return e(t);tc({data:n,update:!1},e)}))}function Yl(t,e,n){Il(t,(function(t,r){if(t)return n(t);tc({data:r,state:e,overwrite_state:!0,update:!0},n)}))}function zl(t,e,n,r=nl){if(Ll()){var i=new MessageChannel;i.port1.onmessage=function(t){var e=t.data;if("string"==typeof e){if(!n)return;return n(void 0,JSON.parse(e))}if("object"==typeof e){if("result"in e){if(!n)return;return n(void 0,e.result)}if("error"in e){if(!n)return;return n(e.error)}console.error("Unrecognised response to message",e)}else console.error("Unrecognised response to message",e)},r.contentWindow.postMessage({sender:"Flourish",method:t,argument:e},"*",[i.port2])}}function Pl(t,e){zl("setState",kl(t),e)}function $l(t,e){"function"!=typeof t?zl("getState",t,e):zl("getState",void 0,t)}function ql(t){zl("hasData",void 0,t)}function Vl(t,e){zl("setData",t,e)}function Wl(t){zl("getData",void 0,t)}function Gl(t){zl("draw",void 0,t),nc(!0)}function Zl(t){al&&al.clear(),ec()&&zl("update",void 0,t)}function Xl(t,e,n){zl("snapshot",t,e,n)}function Jl(){return Sl(Fl)}function Ql(t,e){zl("setFixedHeight",t,e)}function Kl(t){if(nl.parentNode.offsetWidth){if(void 0!==t)Ml=null!=t;else if(Ml)return;var e=t||ol&&ol.responsive_menu&&ol.responsive_menu.getHeightSetting()||il.getHeightForBreakpoint(nl.offsetWidth),n=typeof e;("number"===n||"string"===n&&!isNaN(e))&&(e+="px"),nl.style.height=e}}function tc(t,e,n=nl){ec()?delete t.draw:t.draw&&nc(!0),t.state&&(t.state=kl(t.state)),al&&al.clear(),zl("sync",t,(function(n,r){null!=n||"success"!==r?(t.draw&&nc(!1),function n(r){r?e&&e(r):function(t,e){return t.data?(Vl(t.data,e),delete t.data,!1):t.state?(Pl(t.state,e),delete t.state,!1):t.draw?(Gl(e),delete t.draw,!1):!t.update||(Zl(e),delete t.update,!1)}(t,n)&&e&&e(void 0)}(n)):e&&e(void 0)}),n)}function ec(){return sl}function nc(t){sl=t}function rc(t,e,n,r,i){return nl=document.querySelector(t),rl=e,ol=n,al=r,i||(i={}),el="#amp=1"==window.location.hash,il={createEmbedIframe:Al,isFixedHeight:cl,getHeightForBreakpoint:fl,startEventListeners:xl,notifyParentWindow:pl,initScrolly:dl,createScrolly:Cl,isSafari:hl,initCustomerAnalytics:Js,addAnalyticsListener:Xs,sendCustomerAnalyticsMessage:Zs},nl.style.height=il.getHeightForBreakpoint(nl.offsetWidth)+"px",il.startEventListeners((function(t){"resize"==t.method?Kl(t.height):"warn"==t.method?(al&&al.warn(t),console.warn("Warning from template:",t.message,t.explanation)):t.method in i&&i[t.method](t)}),["resize","warn","customerAnalytics","setSetting","request-upload"]),Ll()||function(t){if(t){var e=document.createElement("div");e.className="unsupported-notice",e.innerHTML="

Please update your browser

This page only works with newer versions of your browser.

",t.appendChild(e)}}(nl.parentNode),{loadVisualisation:Rl,updateData:Bl,updateDataAndState:Yl,updateDataNotPreview:jl,setState:Pl,getState:$l,getDefaultState:Jl,hasData:ql,setData:Vl,getData:Wl,draw:Gl,update:Zl,snapshot:Xl,setFixedHeight:Ql,resize:Kl,sync:tc,getDrawCalled:ec,setDrawCalled:nc,setFrameLoadListener:Ol,updateDefaultState:Hl}}var ic={start:function(t=document.body){t.classList.add("loading")},clear:function(t=document.body){t.classList.remove("loading")}};const oc=new Set([1,274,282,283,296,34675,40961,42240]);function ac(t){let e=0;function n(n){if(e>=t.byteLength)return null;void 0===n&&(n=1);const r=new DataView(t,e,n);return e+=n,r}const r=new Uint8Array(t.byteLength+2);let i=0;function o(t){r.set(new Uint8Array(t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)),i),i+=t.byteLength}const a=(new TextEncoder).encode("Exif\0\0");function*s(t){if(t<32)return;if(!function(t,e){if(t.byteLength!==e.byteLength)return!1;for(let n=0;n12)continue;let c;switch(n){case 1:case 2:case 6:case 7:c=1;break;case 3:case 8:c=2;break;case 4:case 9:case 11:c=4;break;case 5:case 10:case 12:c=8}const f=c*i;let d;if(f<=4)d=new DataView(new ArrayBuffer(4),0,4),d.setUint32(0,a,o);else{d=new DataView(new ArrayBuffer(f));for(let t=0;t4&&(c+=t.byteLength);c+=4;const f=new Uint8Array(c),d=new DataView(f.buffer);f.set((new TextEncoder).encode("MM\0*\0\0\0\b"),0),d.setUint16(8,e.length);let p=10,h=10+12*e.length+4;for(const{code:t,type:n,num_values:r,data:i}of e){if(d.setUint16(p,t),d.setUint16(p+2,n),d.setUint32(p+4,r),i.byteLength<=4)for(let t=0;t0&&255===c.getUint8(c.byteLength-1)}return d||o(l),r}function sc(t){let e=0;function n(n){if(e+n>t.byteLength)return null;const r=new DataView(t,e,n);return e+=n,r}const r=new Uint8Array(t.byteLength);let i=0;function o(t){r.set(new Uint8Array(t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)),i),i+=t.byteLength}const a=n(8);if(80!==a.getUint8(1)||78!==a.getUint8(2)||71!==a.getUint8(3))throw new Error("Not a valid PNG");let s,u;for(o(a);null!=(s=n(4))&&null!=(u=n(4));){const t=s.getUint32(0),e=u.getUint8(0),r=u.getUint8(1);101===e||105===e&&84===r?(n(t),n(4)):(o(s),o(u),o(n(t)),o(n(4)))}return r}var uc="⬆︎",lc="/api/file/upload";function cc(t){(t||document).querySelectorAll("input[type=url]").forEach((function(t){fc(t)}))}function fc(t,e){var n=t.ownerDocument.createElement("button");n.type="button",n.className="upload",n.setAttribute("title","Upload a file from your computer"),n.innerHTML=uc,t.insertAdjacentElement("afterend",n),e||(n.onclick=dc)}function dc(){var t=this.previousSibling,e=t.getAttribute("accept");t.disabled=!0,t.classList.toggle("uploading",!0),pc({accept:e,success:function(e){var n;t.disabled=!1,t.classList.toggle("uploading",!1),t.value=e,"createEvent"in document?(n=document.createEvent("Event")).initEvent("change",!0,!0):n=new Event("change",{bubbles:!0}),t.dispatchEvent(n)},failure:function(){t.disabled=!1,t.classList.toggle("uploading",!1)}})}function pc(t){var e=document.getElementById("file-uploader");e||((e=document.createElement("input")).type="file",e.setAttribute("id","file-uploader"),e.style.display="none",document.body.appendChild(e)),t.accept?e.setAttribute("accept",t.accept):e.removeAttribute("accept"),e.onchange=async function(){ic.start(),await async function(t,e,n){const r=await async function(t){try{if("image/png"===t.type)return new File([sc(await t.arrayBuffer())],t.name,{type:t.type});if("image/jpeg"===t.type)return new File([ac(await t.arrayBuffer())],t.name,{type:t.type})}catch(t){console.error(t)}return t}(t[0]);!function(t,e){var n={filename:t.name,content_type:t.type,size:t.size};hc(lc,n,(function(t,n){return t?e(t):e(null,JSON.parse(n.responseText))}))}(r,(function(t,i){if(t)return ic.clear(),ks("Upload error","There was a problem uploading your file: "+t.message),void console.error(t);var o=function(t){for(var e=1;e=200&&r.status<300)n(null,r);else try{var e=JSON.parse(r.responseText).error;n(e,r)}catch(e){n(new Error("POST "+t+" received status code: "+r.status),r)}},r.open("POST",t,!0),r.send(i)}var mc="https://fonts.googleapis.com/css?family=",gc=["Source Sans Pro","Roboto Condensed","Merriweather","Lora","Playfair Display","Coda","Lobster","Cabin Sketch"],vc="Same as parent",yc=[],_c=[],bc={};function wc(t){return mc+t.replace(/ /g,"+")+":400,700"}function xc(t){var e=_c.concat(yc,gc.map((function(t){return{name:t,url:wc(t)}})));return t&&e.unshift({name:vc}),e}function Tc(t){return xc(!0).find((function(e){return e.name==t}))}var Cc=!1;function Ac(t){return t.substr(t.lastIndexOf("=")+1).replace(/\+/g," ")}function Ec(t){var e=t.target,n=e.value;if(n&&(0==n.indexOf(mc)&&(n=e.value=Ac(n)),!Tc(n))){if(/^https?:\/\//.test(n)){Cc||(Dc(n),e.value="");var r=n;return n=e.value=Ac(r),_c.push({name:n,url:r}),void kc()}var i=wc(n);try{var o=new XMLHttpRequest;if(o.open("HEAD",i,!1),o.send(),404==o.status)throw"Font not found";_c.push({name:n,url:i}),kc()}catch(t){Dc(n),e.value=""}}}function Dc(t){ks("Unrecognised font “"+t+"”","Fonts must be chosen from Google Fonts. Visit fonts.google.com to find more",{is_html:!0})}function kc(){var t,e,n=Object.keys(bc);for(t=0;tt.name)),mode:"single",options_config:{allow_other_option:!0}});t._dropdown=i,bc[e.property]={dropdown:i,can_inherit:r},t.addEventListener("change",Ec)},update:function(t,e){var n=e?e.name:vc;t._dropdown.setSelectedOptions(n),Tc(n)||(n!=vc&&_c.push({name:n,url:e.url}),kc())},getValue:function(t){if(/^https?:\/\//.test(t.value))return{name:Ac(t.value),url:t.value};var e=t.value;if(e==vc)return null;var n=Tc(e);return n||{name:e,url:wc(e)}},replaceThemeFonts:function(t){yc=(t||[]).map((function(t){return{name:t.name,url:t.url}})),kc()}},Mc="$";function Fc(){}function Lc(t,e){var n=new Fc;if(t instanceof Fc)t.each((function(t,e){n.set(e,t)}));else if(Array.isArray(t)){var r,i=-1,o=t.length;if(null==e)for(;++i=0&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!r.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))),a=-1,s=o.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a0)for(var n,r,i=new Array(n),o=0;o=200&&r<300||304===r){if(i)try{e=i.call(n,u)}catch(t){return void a.call("error",n,t)}else e=u;a.call("load",n,e)}else a.call("error",n,t)}return"undefined"!=typeof XDomainRequest&&!("withCredentials"in u)&&/^(http(s)?:)?\/\//.test(t)&&(u=new XDomainRequest),"onload"in u?u.onload=u.onerror=u.ontimeout=d:u.onreadystatechange=function(t){u.readyState>3&&d(t)},u.onprogress=function(t){a.call("progress",n,t)},n={header:function(t,e){return t=(t+"").toLowerCase(),arguments.length<2?s.get(t):(null==e?s.remove(t):s.set(t,e+""),n)},mimeType:function(t){return arguments.length?(r=null==t?null:t+"",n):r},responseType:function(t){return arguments.length?(o=t,n):o},timeout:function(t){return arguments.length?(f=+t,n):f},user:function(t){return arguments.length<1?l:(l=null==t?null:t+"",n)},password:function(t){return arguments.length<1?c:(c=null==t?null:t+"",n)},response:function(t){return i=t,n},get:function(t,e){return n.send("GET",t,e)},post:function(t,e){return n.send("POST",t,e)},send:function(e,i,d){return u.open(e,t,!0,l,c),null==r||s.has("accept")||s.set("accept",r+",*/*"),u.setRequestHeader&&s.each((function(t,e){u.setRequestHeader(e,t)})),null!=r&&u.overrideMimeType&&u.overrideMimeType(r),null!=o&&(u.responseType=o),f>0&&(u.timeout=f),null==d&&"function"==typeof i&&(d=i,i=null),null!=d&&1===d.length&&(d=function(t){return function(e,n){t(null==e?n:null)}}(d)),null!=d&&n.on("error",d).on("load",(function(t){d(null,t)})),a.call("beforesend",n,u),u.send(null==i?null:i),n},abort:function(){return u.abort(),n},on:function(){var t=a.on.apply(a,arguments);return t===a?n:t}},n}(o);r&&"GET"!==n&&u.header("Content-Type",r);i&&u.mimeType(i);return u.on("error",(function(t){var n;try{n=JSON.parse(t.target.responseText),s(n.error)}catch(e){s("Internal error: "+t.target.responseText)}e()})),u.on("load",(function(t){var n=t.responseText;"application/json"===i&&(n=JSON.parse(n));try{s(void 0,n)}catch(t){console.error(t.stack)}e()})),u.send(n,a),u}(t.items.shift(),(function(){t.request=null,0==t.items.length?e():Pc(t,e)}))}function $c(t){return["POST","PUT","DELETE"].includes(t)}function qc(t,e){void 0===e&&(e="default"),e in Yc||(Yc[e]={items:[],running:!1,name:e}),Yc[e].items.push(t),zc(Yc[e])}function Vc(t,e){for(var n in e)t[n]=e[n];return t}function Wc(t,e,n,r){"function"==typeof n&&(r=n,n=!1),n&&Vc(t,e),qc({url:t.api_prefix+"/"+t.id,payload:function(){return{version_number:t.getVersionNumber(),fields:e}},callback:function(i,o){if(i)return r(i);n||Vc(t,e),t.setVersionNumber(o.version_number),r(void 0)}})}function Gc(t,e){t.delete_requested=!0,qc({url:t.api_prefix+"/"+t.id,method:"DELETE",payload:function(){return{version_number:t.getVersionNumber()}},callback:function(n,r){if(n)return e(n);t.setVersionNumber(r.version_number),t.is_deleted=!0,e(void 0,r)}})}function Zc(t){qc({url:"/api/history",method:"POST",payload:function(){return t},callback:function(){}})}var Xc={addApiKey:function(t){qc({url:"/api/user/api_keys",method:"PUT",callback:t})},addFolder:function(t,e,n,r){qc({url:`/api/user/folder/${encodeURIComponent(t)}`,method:"PUT",payload:()=>({share:e,parent_id:n}),callback:r})},addTag:function(t,e){qc({url:"/api/user/tag/"+encodeURIComponent(t),method:"PUT",callback:e})},deleteApiKey:function(t,e){qc({url:"/api/user/api_keys/"+t,method:"DELETE",callback:e})},fetchFolders:function(t){qc({url:"/api/user/folder",method:"GET",callback:t})},fetchProjects:function(t,e,n,r,i,o,a,s){let u="/api/user/projects";const l=[];n&&l.push("filter="+encodeURIComponent(n)),r&&l.push("offset="+encodeURIComponent(r)),i&&l.push("limit="+encodeURIComponent(i)),o&&l.push("search="+encodeURIComponent(o)),a&&l.push("is_recent=true"),s&&l.push("shared=true"),e&&(u+="/folder/"+encodeURIComponent(e)),l.length&&(u+="?"+l.join("&")),qc({url:u,method:"GET",callback:t})},generateSdkToken:function(t){qc({url:"/api/user/generate_sdk_token",method:"GET",callback:t})},getApiKeys:function(t){qc({url:"/api/user/api_keys",method:"GET",callback:t})},getReviewCount:function(t){qc({url:"/api/reviews/count",method:"GET",callback:t})},isUsernameAvailable:function(t,e){qc({url:"/api/user/username?u="+encodeURIComponent(t),method:"GET",callback:e})},logHistory:Zc,removeFolder:function(t,e){qc({url:"/api/user/folder/"+encodeURIComponent(t)+"?use_id=1",method:"DELETE",callback:e})},removeTag:function(t,e){qc({url:"/api/user/tag/"+encodeURIComponent(t),method:"DELETE",callback:e})},renameFolder:function(t,e,n){qc({url:"/api/user/folder/"+encodeURIComponent(t)+"/"+encodeURIComponent(e)+"?use_id=1",method:"PUT",callback:n})},renameTag:function(t,e,n){qc({url:"/api/user/tag/"+encodeURIComponent(t)+"/"+encodeURIComponent(e),method:"PUT",callback:n})},revokeSdkToken:function(t,e){qc({url:"/api/user/sdk_token/"+encodeURIComponent(t),method:"DELETE",callback:e})},setSamlProviderId:function(t,e,n){qc({url:"/api/user/"+encodeURIComponent(t)+"/change_saml_provider_id",method:"POST",payload:function(){return{saml_provider_id:e}},callback:n})},moveFolder:function(t,e=!0,n){return new Promise(((r,i)=>{qc({url:`/api/folder/${t}/nest`,method:"PUT",payload:()=>({share:e,parent_id:n}),callback:(t,o)=>{if(t)return i(t);Zc({category:"folders",action:"nest",detail:{share:e,parent_id:n}}),r(o)}})}))},update:function(t,e){qc({url:"/api/user",method:"POST",payload:function(){return{fields:t}},callback:e})}};var Jc={};function Qc(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Kc(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function tf(){}var ef=.7,nf=1/ef,rf="\\s*([+-]?\\d+)\\s*",of="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",af="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",sf=/^#([0-9a-f]{3,8})$/,uf=new RegExp(`^rgb\\(${rf},${rf},${rf}\\)$`),lf=new RegExp(`^rgb\\(${af},${af},${af}\\)$`),cf=new RegExp(`^rgba\\(${rf},${rf},${rf},${of}\\)$`),ff=new RegExp(`^rgba\\(${af},${af},${af},${of}\\)$`),df=new RegExp(`^hsl\\(${of},${af},${af}\\)$`),pf=new RegExp(`^hsla\\(${of},${af},${af},${of}\\)$`),hf={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function mf(){return this.rgb().formatHex()}function gf(){return this.rgb().formatRgb()}function vf(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=sf.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?yf(e):3===n?new wf(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?_f(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?_f(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=uf.exec(t))?new wf(e[1],e[2],e[3],1):(e=lf.exec(t))?new wf(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=cf.exec(t))?_f(e[1],e[2],e[3],e[4]):(e=ff.exec(t))?_f(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=df.exec(t))?Df(e[1],e[2]/100,e[3]/100,1):(e=pf.exec(t))?Df(e[1],e[2]/100,e[3]/100,e[4]):hf.hasOwnProperty(t)?yf(hf[t]):"transparent"===t?new wf(NaN,NaN,NaN,0):null}function yf(t){return new wf(t>>16&255,t>>8&255,255&t,1)}function _f(t,e,n,r){return r<=0&&(t=e=n=NaN),new wf(t,e,n,r)}function bf(t,e,n,r){return 1===arguments.length?((i=t)instanceof tf||(i=vf(i)),i?new wf((i=i.rgb()).r,i.g,i.b,i.opacity):new wf):new wf(t,e,n,null==r?1:r);var i}function wf(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function xf(){return`#${Ef(this.r)}${Ef(this.g)}${Ef(this.b)}`}function Tf(){const t=Cf(this.opacity);return`${1===t?"rgb(":"rgba("}${Af(this.r)}, ${Af(this.g)}, ${Af(this.b)}${1===t?")":`, ${t})`}`}function Cf(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Af(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Ef(t){return((t=Af(t))<16?"0":"")+t.toString(16)}function Df(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Sf(t,e,n,r)}function kf(t){if(t instanceof Sf)return new Sf(t.h,t.s,t.l,t.opacity);if(t instanceof tf||(t=vf(t)),!t)return new Sf;if(t instanceof Sf)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(a=e===o?(n-r)/s+6*(n0&&u<1?0:a,new Sf(a,s,u,t.opacity)}function Sf(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Mf(t){return(t=(t||0)%360)<0?t+360:t}function Ff(t){return Math.max(0,Math.min(1,t||0))}function Lf(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function Nf(t){for(var e=t.length/6|0,n=new Array(e),r=0;r=240?t-240:t+120,i,r),Lf(t,i,r),Lf(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new Sf(Mf(this.h),Ff(this.s),Ff(this.l),Cf(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Cf(this.opacity);return`${1===t?"hsl(":"hsla("}${Mf(this.h)}, ${100*Ff(this.s)}%, ${100*Ff(this.l)}%${1===t?")":`, ${t})`}`}}));var Uf=Nf("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),Of=Nf("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),Rf=Nf("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),Hf=Nf("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),If=t=>()=>t;function Bf(t){return 1==(t=+t)?jf:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):If(isNaN(e)?n:e)}}function jf(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):If(isNaN(t)?e:t)}var Yf=function t(e){var n=Bf(e);function r(t,e){var r=n((t=bf(t)).r,(e=bf(e)).r),i=n(t.g,e.g),o=n(t.b,e.b),a=jf(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=o(e),t.opacity=a(e),t+""}}return r.gamma=t,r}(1);function zf(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}var Pf=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,$f=new RegExp(Pf.source,"g");function qf(t,e){var n,r,i,o=Pf.lastIndex=$f.lastIndex=0,a=-1,s=[],u=[];for(t+="",e+="";(n=Pf.exec(t))&&(r=$f.exec(e));)(i=r.index)>o&&(i=e.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,u.push({i:a,x:zf(n,r)})),o=$f.lastIndex;return o180?e+=360:e-t>180&&(t+=360),o.push({i:n.push(i(n)+"rotate(",null,r)-2,x:zf(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(o.rotate,a.rotate,s,u),function(t,e,n,o){t!==e?o.push({i:n.push(i(n)+"skewX(",null,r)-2,x:zf(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(o.skewX,a.skewX,s,u),function(t,e,n,r,o,a){if(t!==n||e!==r){var s=o.push(i(o)+"scale(",null,",",null,")");a.push({i:s-4,x:zf(t,n)},{i:s-2,x:zf(e,r)})}else 1===n&&1===r||o.push(i(o)+"scale("+n+","+r+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,s,u),o=a=null,function(t){for(var e,n=-1,r=u.length;++n=0&&e._call.call(null,t),e=e._next;--ed}()}finally{ed=0,function(){var t,e,n=Jf,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Jf=e);Qf=t,gd(r)}(),ad=0}}function md(){var t=ud.now(),e=t-od;e>id&&(sd-=e,od=t)}function gd(t){ed||(nd&&(nd=clearTimeout(nd)),t-ad>24?(t<1/0&&(nd=setTimeout(hd,t-ud.now()-sd)),rd&&(rd=clearInterval(rd))):(rd||(od=ud.now(),rd=setInterval(md,id)),ed=1,ld(hd)))}function vd(t,e,n){var r=new dd;return e=null==e?0:+e,r.restart((n=>{r.stop(),t(n+e)}),e,n),r}dd.prototype=pd.prototype={constructor:dd,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?cd():+n)+(null==e?0:+e),this._next||Qf===this||(Qf?Qf._next=this:Jf=this,Qf=this),this._call=t,this._time=n,gd()},stop:function(){this._call&&(this._call=null,this._time=1/0,gd())}};var yd=Rc("start","end","cancel","interrupt"),_d=[],bd=0,wd=1,xd=2,Td=3,Cd=4,Ad=5,Ed=6;function Dd(t,e,n,r,i,o){var a=t.__transition;if(a){if(n in a)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function o(t){n.state=wd,n.timer.restart(a,n.delay,n.time),n.delay<=t&&a(t-n.delay)}function a(o){var l,c,f,d;if(n.state!==wd)return u();for(l in i)if((d=i[l]).name===n.name){if(d.state===Td)return vd(a);d.state===Cd?(d.state=Ed,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete i[l]):+lbd)throw new Error("too late; already scheduled");return n}function Sd(t,e){var n=Md(t,e);if(n.state>Td)throw new Error("too late; already running");return n}function Md(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Fd(t,e){var n,r;return function(){var i=Sd(this,t),o=i.tween;if(o!==n)for(var a=0,s=(r=n=o).length;a=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?kd:Sd;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}(n,t,e))},attr:function(t,e){var n=C(t),r="transform"===n?td:Ud;return this.attrTween(t,"function"==typeof e?(n.local?jd:Bd)(n,r,Nd(this,"attr."+t,e)):null==e?(n.local?Rd:Od)(n):(n.local?Id:Hd)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=C(t);return this.tween(n,(r.local?Yd:zd)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?Kf:Ud;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var o=et(this,t),a=(this.style.removeProperty(t),et(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}(t,r)).on("end.style."+t,Gd(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,o;return function(){var a=et(this,t),s=n(this),u=s+"";return null==s&&(this.style.removeProperty(t),u=s=et(this,t)),a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s))}}(t,r,Nd(this,"style."+t,e))).each(function(t,e){var n,r,i,o,a="style."+e,s="end."+a;return function(){var u=Sd(this,t),l=u.on,c=null==u.value[a]?o||(o=Gd(e)):void 0;l===n&&i===c||(r=(n=l).copy()).on(s,i=c),u.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,o=n+"";return function(){var a=et(this,t);return a===o?null:a===r?i:i=e(r=a,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,function(t,e,n){var r,i;function o(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&function(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}(t,o,n)),r}return o._value=e,o}(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(Nd(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,function(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&function(t){return function(e){this.textContent=t.call(this,e)}}(r)),e}return r._value=t,r}(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=Md(this.node(),n).tween,o=0,a=i.length;oxd&&n.state2?t.parentNode.removeChild(t):("INPUT"==t.firstChild.tagName?t.firstChild.value="#000000":t.firstChild.style.backgroundColor="#000000",t.firstChild.nextSibling.value="#000000");Cp()}(e.parentNode))}function Cp(){for(var t=ap.getAttribute("data-autocomplete"),e=up[t],n=[],r=op.querySelectorAll(".palette input[type=text]"),i=0;i

",e.innerHTML=r,e.addEventListener("change",Ep),e.addEventListener("dragstart",_p),e.addEventListener("dragover",bp),e.addEventListener("drop",wp),e.addEventListener("dragend",xp),e.addEventListener("click",Tp)}(t)):yp(t,(t.getAttribute("data-value")||"").split("|"))}))},update:yp,getValue:function(t){var e=t.getAttribute("data-value");return e?e.split("|"):null},replaceThemeColors:hp},Mp={};const Fp={style:!0,url:!0,flourish_embed:!0};var Lp={h1:{path:"M0.00100708 0.524002V9H1.91201V5.464H4.83701V9H6.76101V0.524002H4.83701V3.787H1.91201V0.524002H0.00100708ZM8.91 7.453V9H14.162V7.453H12.615V0.744995H11.211C10.9163 0.918329 10.613 1.06566 10.301 1.187C9.989 1.30833 9.60767 1.41233 9.157 1.499V2.682H10.704V7.453H8.91Z",width:14,height:9},h2:{path:"M0.00100708 0.524002V9H1.91201V5.464H4.83701V9H6.76101V0.524002H4.83701V3.787H1.91201V0.524002H0.00100708ZM8.24078 7.908V9H14.0518V7.388H12.3878C12.1884 7.388 11.9588 7.401 11.6988 7.427C11.4474 7.44434 11.2178 7.466 11.0098 7.492C11.3478 7.14534 11.6728 6.79434 11.9848 6.439C12.3054 6.07501 12.5871 5.71534 12.8298 5.36C13.0811 4.996 13.2804 4.63634 13.4278 4.281C13.5751 3.917 13.6488 3.56167 13.6488 3.215C13.6488 2.81634 13.5838 2.45667 13.4538 2.136C13.3238 1.81534 13.1374 1.54234 12.8948 1.317C12.6521 1.083 12.3618 0.905338 12.0238 0.784004C11.6944 0.654004 11.3261 0.589005 10.9188 0.589005C10.3294 0.589005 9.82245 0.701671 9.39778 0.927004C8.97311 1.14367 8.55711 1.46867 8.14978 1.902L9.18978 2.929C9.39778 2.70367 9.61878 2.50867 9.85278 2.344C10.0868 2.17067 10.3554 2.084 10.6588 2.084C11.0228 2.084 11.3088 2.19234 11.5168 2.409C11.7248 2.617 11.8288 2.92467 11.8288 3.332C11.8288 3.62667 11.7378 3.93867 11.5558 4.268C11.3824 4.58867 11.1354 4.93967 10.8148 5.321C10.5028 5.69367 10.1258 6.09667 9.68378 6.53C9.25045 6.95467 8.76945 7.414 8.24078 7.908Z",width:15,height:9},bold:{path:"M0.00100708 9V0.524002H2.90001C3.34201 0.524002 3.74934 0.558669 4.12201 0.628002C4.50334 0.688669 4.83267 0.801335 5.11001 0.966002C5.39601 1.13067 5.61701 1.34734 5.77301 1.616C5.93767 1.88467 6.02001 2.22267 6.02001 2.63C6.02001 2.82067 5.99401 3.01134 5.94201 3.202C5.89001 3.39267 5.81634 3.57034 5.72101 3.735C5.62567 3.89967 5.50867 4.047 5.37001 4.177C5.24001 4.307 5.08834 4.40234 4.91501 4.463V4.515C5.13167 4.567 5.33101 4.64934 5.51301 4.762C5.69501 4.866 5.85534 5.00034 5.99401 5.165C6.13267 5.32967 6.24101 5.52467 6.31901 5.75C6.39701 5.96667 6.43601 6.218 6.43601 6.504C6.43601 6.93734 6.34934 7.31 6.17601 7.622C6.01134 7.934 5.77734 8.194 5.47401 8.402C5.17934 8.60134 4.83267 8.753 4.43401 8.857C4.03534 8.95234 3.60634 9 3.14701 9H0.00100708ZM1.91201 3.917H2.80901C3.27701 3.917 3.61501 3.826 3.82301 3.644C4.03967 3.462 4.14801 3.21934 4.14801 2.916C4.14801 2.58667 4.03967 2.35267 3.82301 2.214C3.60634 2.07534 3.27267 2.006 2.82201 2.006H1.91201V3.917ZM1.91201 7.518H2.99101C4.03967 7.518 4.56401 7.13667 4.56401 6.374C4.56401 6.00134 4.43401 5.737 4.17401 5.581C3.91401 5.41634 3.51967 5.334 2.99101 5.334H1.91201V7.518Z",width:7,height:9},italic:{path:"M7 1.44444H5.06656L3.6687 8.05556H5.5V9H0.5V8.05556H2.6547L4.05256 1.44444H2V0.5H7V1.44444Z",width:7,height:9},line_break:{description:"Add line break",path:"M14 0V6H3.83L6.41 3.41L5 2L0 7L5 12L6.41 10.59L3.83 8H16V0H14Z",width:16,height:12},url:{description:"Add URL",path:"M8.03571429,6.69642857 C8.03571429,6.5476183 7.98363147,6.42113147 7.87946429,6.31696429 L6.71875,5.15625 C6.61458281,5.05208281 6.48809598,5 6.33928571,5 C6.18303493,5 6.0491077,5.05952321 5.9375,5.17857143 L6.16350446,5.40178571 L6.16350446,5.40178571 L6.21434766,5.4637896 C6.22447497,5.4770171 6.23542901,5.49169139 6.24720982,5.5078125 C6.28255226,5.55617584 6.30673357,5.6036084 6.31975446,5.65011161 C6.33277536,5.69661482 6.33928571,5.74776758 6.33928571,5.80357143 C6.33928571,5.9523817 6.2872029,6.07886853 6.18303571,6.18303571 C6.07886853,6.2872029 5.9523817,6.33928571 5.80357143,6.33928571 C5.74776758,6.33928571 5.69661482,6.33277536 5.65011161,6.31975446 C5.6036084,6.30673357 5.55617584,6.28255226 5.5078125,6.24720982 L5.42844742,6.18644594 L5.42844742,6.18644594 L5.37357392,6.13653276 L5.37357392,6.13653276 L5.17857143,5.9375 L5.17857143,5.9375 C5.05580296,6.05282796 4.99441964,6.18861529 4.99441964,6.34486607 C4.99441964,6.49367634 5.04650246,6.62016317 5.15066964,6.72433036 L6.30022321,7.87946429 C6.40067015,7.97991122 6.52715698,8.03013393 6.6796875,8.03013393 C6.82849777,8.03013393 6.9549846,7.98177132 7.05915179,7.88504464 L7.87946429,7.0703125 C7.98363147,6.96614531 8.03571429,6.84151858 8.03571429,6.69642857 Z M4.11272321,2.76227679 C4.11272321,2.61346652 4.0606404,2.48697969 3.95647321,2.3828125 L2.80691964,1.22767857 C2.70275246,1.12351138 2.57626562,1.07142857 2.42745536,1.07142857 C2.28236535,1.07142857 2.15587852,1.12165128 2.04799107,1.22209821 L1.22767857,2.03683036 C1.12351138,2.14099754 1.07142857,2.26562427 1.07142857,2.41071429 C1.07142857,2.55952455 1.12351138,2.68601138 1.22767857,2.79017857 L2.38839286,3.95089286 C2.48883979,4.05133979 2.61532662,4.1015625 2.76785714,4.1015625 C2.92410792,4.1015625 3.05803516,4.04389939 3.16964286,3.92857143 L2.94363839,3.70535714 L2.94363839,3.70535714 L2.85993304,3.59933036 L2.85993304,3.59933036 C2.8245906,3.55096702 2.80040929,3.50353446 2.78738839,3.45703125 C2.77436749,3.41052804 2.76785714,3.35937528 2.76785714,3.30357143 C2.76785714,3.15476116 2.81993996,3.02827433 2.92410714,2.92410714 C3.02827433,2.81993996 3.15476116,2.76785714 3.30357143,2.76785714 C3.35937528,2.76785714 3.41052804,2.77436749 3.45703125,2.78738839 C3.50353446,2.80040929 3.55096702,2.8245906 3.59933036,2.85993304 L3.70535714,2.94363839 L3.70535714,2.94363839 L3.92857143,3.16964286 L3.92857143,3.16964286 C4.0513399,3.0543149 4.11272321,2.91852757 4.11272321,2.76227679 Z M8.63839286,5.55803571 C8.95089442,5.87053728 9.10714286,6.24999777 9.10714286,6.69642857 C9.10714286,7.14285938 8.94903432,7.52045977 8.6328125,7.82924107 L7.8125,8.64397321 C7.50371869,8.95275452 7.1261183,9.10714286 6.6796875,9.10714286 C6.22953644,9.10714286 5.85007595,8.94903432 5.54129464,8.6328125 L4.39174107,7.47767857 C4.08295977,7.16889727 3.92857143,6.79129688 3.92857143,6.34486607 C3.92857143,5.8872745 4.09226027,5.4985135 4.41964286,5.17857143 L3.92857143,4.6875 C3.60862935,5.01488259 3.22172846,5.17857143 2.76785714,5.17857143 C2.32142634,5.17857143 1.94196585,5.02232299 1.62946429,4.70982143 L0.46875,3.54910714 C0.156248437,3.23660558 -8.52651283e-14,2.85714509 -8.52651283e-14,2.41071429 C-8.52651283e-14,1.96428348 0.158108538,1.58668309 0.474330357,1.27790179 L1.29464286,0.463169643 C1.60342416,0.154388337 1.98102455,1.42108547e-14 2.42745536,1.42108547e-14 C2.87760642,1.42108547e-14 3.25706691,0.158108538 3.56584821,0.474330357 L4.71540179,1.62946429 C5.02418309,1.93824559 5.17857143,2.31584598 5.17857143,2.76227679 C5.17857143,3.21986836 5.01488259,3.60862935 4.6875,3.92857143 L5.17857143,4.41964286 C5.4985135,4.09226027 5.8854144,3.92857143 6.33928571,3.92857143 C6.78571652,3.92857143 7.16517701,4.08481987 7.47767857,4.39732143 L8.63839286,5.55803571 Z",width:9.5,height:9.5},flourish_embed:{description:"Add Flourish embed",path:"M7.57358 5.28931L10.1281 6.04854L10.0432 6.517L7.37515 6.22624L9.44904 7.9224L9.20119 8.29833L6.86556 7.0207L8.11097 9.37696L7.7504 9.62552L6.06604 7.5604L6.34206 10.2078L5.89578 10.2926L5.11055 7.73772L4.36044 10.2926L3.89331 10.2078L4.16934 7.5604L2.50622 9.62552L2.12402 9.37696L3.38372 7.0207L1.04113 8.29833L0.793673 7.9224L2.88146 6.22624L0.213045 6.517L0.128113 6.04854L2.6479 5.28931L0.128113 4.53667L0.213045 4.06859L2.88146 4.35974L0.793673 2.66319L1.04113 2.28687L3.38372 3.56451L2.12402 1.20824L2.50622 0.960069L4.16934 3.02519L3.89331 0.377778L4.36044 0.292603L5.11055 2.84787L5.89578 0.292603L6.34206 0.377778L6.06604 3.02519L7.7504 0.960069L8.11097 1.20824L6.86556 3.56451L9.20119 2.28687L9.44904 2.66319L7.37515 4.35974L10.0432 4.06859L10.1281 4.53667L7.57358 5.28931Z",width:10,height:10}};function Np(t,e){Mp=e||Fp;var n=It(kp=rp({type:"div",attributes:{class:"text-editor-container settings-option"}})).select(".text-editor-container").html("");for(var r in n.append("div").attr("class","text-settings"),n.append("textarea").text(t.value).attr("class","text-input").on("blur",(function(){t.value=this.value,It(t).dispatch("change")})),Mp)Mp[r]&&Up(r);(Mp.bindings||Mp.bindings_custom)&&(n.append("div").attr("class","text-bindings"),Op()),on()}function Up(t){if("bindings"!=t&&"bindings_custom"!=t){var e=It(kp).select(".text-settings").append("div").attr("class","editor-section");if("style"==t){["h1","h2","bold","italic","line_break"].forEach((function(t){var n=Lp[t].description?Lp[t].description:"Add "+t+" text";e.append("div").attr("class","editor-button popup").attr("data-action",t).attr("data-popup-body",n).attr("data-popup-position","top").on("click",Rp).append("svg").attr("height",Lp[t].height).attr("width",Lp[t].width).attr("viewBox","0 0 "+Lp[t].width+" "+Lp[t].height).append("path").attr("fill","#333333").attr("d",Lp[t].path)}))}else{var n=Lp[t].description?Lp[t].description:"Add "+t;e.append("div").attr("class","editor-button popup").attr("data-action",t).attr("data-popup-body",n).attr("data-popup-position","top").on("click",Rp).append("svg").attr("height",Lp[t].height).attr("width",Lp[t].width).attr("viewBox","0 0 "+Lp[t].width+" "+Lp[t].height).append("path").attr("fill","#333333").attr("d",Lp[t].path)}}}function Op(){if(Mp.bindings||Mp.bindings_custom){var t;if(Array.isArray(Mp.bindings))t={},Mp.bindings.forEach((function(e){var n=e.split("."),r=n[0],i=n.length>1?n[1]:null;i&&(t[r]||(t[r]=[]),t[r].push(i))}));else if(!0===Mp.bindings)t=null;else if(!Array.isArray(Mp.bindings_custom))return;var e=Dp.visualisation.data_bindings[Dp.visualisation.template_id],n={},r=[];Dp.visualisation.data_tables.forEach((function(t){n[t.id]=t.cached_data[0]}));var i=null!==t;for(var o in e)if(!i||t[o]){var a=e[o];for(var s in a)if(!i||t[o].includes(s)){var u=a[s];if(null!=u.column){var l=n[u.data_table_id][u.column];l&&!r.includes(l)&&r.push(l)}else u.columns&&u.columns.forEach((function(t){var e=n[u.data_table_id][t];e&&!r.includes(e)&&r.push(e)}))}}Mp.bindings_custom&&Array.isArray(Mp.bindings_custom)&&Mp.bindings_custom.forEach((function(t){t[0]&&t[1]&&r.push({name:t[0],binding:t[1],type:"dynamic"})})),It(".text-bindings").html("").style("display",r.length?null:"none").append("p").text("Click to add values from your data"),It(".text-bindings").selectAll("button.binding").data(r).enter().append("button").attr("data-action","binding").attr("data-binding",(function(t){return"object"==typeof t?t.binding:t})).attr("data-type",(function(t){return"object"==typeof t?t.type:null})).on("click",Rp).text((function(t){return"object"==typeof t?t.name:t}))}}function Rp(){var t,e=It(".text-editor-container .text-input"),n=e.node().value,r=e.node().selectionStart,i=e.node().selectionEnd,o=i-r,a=n.substr(r,o),s=It(this).attr("data-action"),u="flourish_embed"==s?prompt("Specify the ID of published Flourish project (eg. story/123 or visualisation/124)","visualisation/"):"";if("bold"==s)t=Hp(a,"","");else if("italic"==s)t=Hp(a,"","");else if("h1"==s)t=Hp(a,"

","

");else if("h2"==s)t=Hp(a,"

","

");else if("line_break"==s)t=Hp(a,"
","");else if("url"==s)t=Hp(a,'',"",10);else if("flourish_embed"==s)t=Hp(u,'');else if("binding"==s){var l=It(this).attr("data-binding");t=Hp(l,"{{","}}",l.length+4)}e.node().setRangeText(t.text,r,i),e.node().focus(),e.node().selectionStart=r+t.cursor,e.node().selectionEnd=r+t.cursor}function Hp(t,e,n,r){return e=e||"",n=n||"",t=t||"",{cursor:r||e.length+t.length,text:e+t+n}}var Ip,Bp,jp,Yp={initialize:function(t,e,n){Dp=t,It(e.parentElement).append("div").attr("class","text-editor-btn").attr("tabindex","0").on("click",(function(){Np(e,n.editor)})).on("keydown",(function(t){13==t.keyCode&&Np(e,n.editor)})).append("i").attr("class","fa fa-paint-brush")},updateDataBindings:Op},zp=void 0,Pp=/fa-(\S*)/g,$p=/^data:image\/(svg|svg\+xml|png|jpg);base64,[A-Z-a-z0-9+/=]*$/,qp=/^gradient:/g;function Vp(t){var e=!It(t.parentNode).classed("open");jt(".template-settings .settings-block").classed("open",!1).attr("aria-expanded",!1),e&&It(t.parentNode).classed("open",!0).attr("aria-expanded",!0)}function Wp(t){if(t){zp={};for(var e=0,n=null,r=null,i=Ip&&Ip.user?Ip.user.template_settings_overrides:{},o=0;oBranding control: Add custom logos, colors, and styles to keep your projects consistent with your brand identity","Logo removal: Embed your projects without the Flourish logo appended","Team management: Seamlessly manage your team with our collaboration and approval features"]);var a=Math.floor(Math.random()*i.length),s=Math.floor(Math.random()*o.length),u="title"+a+"-list"+s,l=[{text:"Upgrade now",class:"convert",tag_name:"a",href:"https://flourish.studio/pricing",target:"_blank",keyCode:13,callback:function(){t.analytics("event","upgrade-click",{upgrade_id:u}),Xc.logHistory({category:"upgrade",action:"clicked",detail:r})}},{text:"Maybe later",keyCode:27,class:"secondary",callback:function(){t.analytics("event","upgrade-close",{upgrade_id:u}),Xc.logHistory({category:"upgrade",action:"closed",detail:r})}}];t.analytics("event","upgrade-open",{upgrade_id:u}),Xc.logHistory({category:"upgrade",action:"viewed",detail:r}),ks(e,n,{buttons:l,is_html:!0,upgrade:{message:i[a],list:o[s],is_business:!0}})}(Ip,"This is a premium feature","Upgrade your plan to change this setting.","upgrade-settings")})),on()}}function Gp(t,e,n){e.upgrade=e.property in n;var r="html"==e.type,i=e.choices&&("buttons"==e.style||"boolean"==e.type);t.attr("class","settings-option option-type-"+e.type+(i?" settings-buttons":"")+(r?" text-editor":"")+(e.upgrade?" upgrade-setting":""));var o=t.append("label").attr("for","setting-"+e.property).classed("hidden",null==e.name).append("h3").text(e.name).classed("no-select",!0);(e.upgrade||e.description)&&o.append("i").style("font-family","FontAwesome").classed("fa setting-tooltip popup",!0).classed("fa-star tooltip-upgrade",e.upgrade).classed("fa-question tooltip-help",!e.upgrade).style("background-color",e.upgrade?"#93366e":null).attr("tabindex","0").attr("data-popup-head",e.upgrade?"This is a premium feature":null).attr("data-popup-body",e.description?e.description.replace(/\[\[/g,"").replace(/\]\]/g,""):null).attr("data-popup-allow-interaction",!0).attr("data-popup-constrainer",".settings-block"),e.width&&t.classed("width-"+e.width.replace(/ /g,"-"),!0);var a="input";if(["text","code","html"].includes(e.type)&&(a="textarea"),"code"==e.type){var s=!1;t.append("i").attr("class","popup fa fa-reply clickable wrap-control").attr("data-popup-body","Wrap/unwrap text").attr("data-popup-position","top").on("click",(function(){s=!s,It(this.parentNode).select("textarea").attr("wrap",s?null:"off"),It(this).classed("selected",s)}))}var u=t.append(a).attr("id","setting-"+e.property).attr("class","setting").attr("name",e.property).attr("disabled",!Ip.visualisation.can_edit||null),l=u.node();if("colors"==e.type)Sp.initialize(l,e);else if("font"==e.type)Sc.initialize(l,e,Ip.user&&null!=Ip.user.company_id);else if("number"==e.type)l.setAttribute("type","number"),null!=e.min&&l.setAttribute("min",e.min),null!=e.max&&l.setAttribute("max",e.max),e.step&&l.setAttribute("step",e.step);else if("url"==e.type)l.setAttribute("type","url"),Bp.addButton(l,e.upgrade);else if(i){u.remove(),u=t.append("div").attr("id","setting-"+e.property).attr("name",e.property).classed("buttons-container",!0).classed("large","large"==e.size),l=u.node();var c=e.choices.length,f=[3,4,5],d=function(){if(c<=2)return{column_count:c,rows:1};var t=f.map((function(t){return{column_count:t,orphans:c%t/t,rows:c/t}})).filter((function(t){return t.rows>=1})).sort((function(t,e){return t.rows>e.rows?1:t.rows1?e[0]:0===e.length?t.sort((function(t,e){return t.orphans>e.orphans?-1:t.orphans1?0===n?"3px 0 0 0":n===t-1?"0 3px 0 0":n===c-(t-r)?"0 0 0 3px":n===c-1&&0===r?"0 0 3px 0":null:null})).node())}))}else"boolean"==e.type?(l.setAttribute("type","checkbox"),t.classed("slider-container",!0),t.append("label").attr("class","slider").attr("for","setting-"+e.property)):l.setAttribute("type","text");if("code"==e.type&&(l.setAttribute("wrap","off"),u.on("keydown.tab",(function(t){var e=t;if(9===e.keyCode&&!(e.altKey||e.metaKey||e.ctrlKey||e.shiftKey)){e.preventDefault();var n=this.selectionStart;this.value=this.value.substring(0,n)+"\t"+this.value.substring(this.selectionEnd),this.selectionEnd=n+1}}))),r&&(t.append("div").attr("class","text-editor-setting").node().appendChild(l),Yp.initialize(Ip,l,e)),e.choices&&"string"==e.type&&"buttons"!=e.style&&(l._dropdown=new Ms({input:l,id:e.property+"-dropdown",options:e.choices,options_config:{allow_other_option:e.choices_other,custom_renderer:Qp},mode:"single"})),"color"==e.type){It(l).classed("color",!0).style("display","none");var p=It(l.parentNode).append("div").attr("class","color-picker"),h=p.append("div").attr("class","color-wrapper");e.optional&&p.append("div").attr("class","cancel-setting popup").attr("tabindex","0").html("").attr("data-popup-body","If cleared, the color will be set automatically based on the theme or context").on("click keydown",(function(t){t.keyCode&&13!==t.keyCode||(l.value="",u.dispatch("change"),It(this.parentNode).classed("is-null",!0))})),h.append("input").attr("type","color").on("change",(function(){l.value=this.value,u.dispatch("change"),It(this.parentNode.parentNode).classed("is-null",!1)})).on("focus",(function(){It(this.parentNode.parentNode).classed("active",!0)})).on("blur",(function(){It(this.parentNode.parentNode).classed("active",!1)}))}e.placeholder&&l.setAttribute("placeholder",e.placeholder),e.size&&l.classList.add("size-"+e.size),u.call(Zp(e))}function Zp(t){return function(e){var n=!1;e.on("change",(function(){var e=this;Je.hide(),n=!0,Ip.preview_pane.getState(t.property,(function(r,i){return r?(console.error("Failed to get state property "+t.property,r),void(n=!1)):function(t,e){if("number"!==e.type)return!0;if(""===t.value)return!!e.optional||(Je.point(t).text("A value is required").draw(),!1);var n=parseFloat(t.value);return e.hasOwnProperty("min")&&ne.max&&(Je.point(t).text("Value cannot be greater than "+e.max).draw(),t.value=e.max),!0}(e,t)?void function(t,e,n){r=e.property,i=100,o=Kp,a=[t,e,n],clearTimeout(Jc[r]),Jc[r]=setTimeout((function(){o.apply(window,a),delete Jc[r]}),i);var r,i,o,a}(e,t,(function(r){if(!r)return n=!1,void("SELECT"==e.tagName&&It(e).dispatch("blur"));var o="radio"==e.type?e.nextSibling:e;Je.point(o).text("Not changed: "+(r.message||r)).draw();var a={};a[t.property]=i,Ip.preview_pane.setState(a,(function(r){if(r)return console.error("Failed to revert setting "+t.property+" to value: "+i),void(n=!1);Ip.preview_pane.update((function(r){if(r)return console.error("Failed to update after reverting setting "+t.property+" to value: "+i),void(n=!1);Jp(e,i),n=!1}))}))})):(e.value=i,void(n=!1))}))})).on("keydown",(function(t){Ip.confirm.blank(),13==t.keyCode&&Je.hide()})).on("blur",(function(){if(!n){var e=this;Je.hide(),Ip.preview_pane.getState(t.property,(function(n,r){n?console.error("Failed to get state property "+t.property,n):Jp(e,r)}))}}))}}function Xp(t,e,n){if(t.classList.contains("colors"))return Sp.getValue(t);if(t.classList.contains("font-menu")){var r=Sc.getValue(t);return e&&!r?n?null:"":r}if(t.classList.contains("buttons-container")){for(var i,o=t.querySelectorAll("input[type='radio']"),a=0;a-1){var s=t.querySelectorAll("input[type='radio']");for(r=0;r=4)return;for(var n=null,r=Ip.template_data_bindings,i=0;i h2, .settings-option:not(.hidden) h3, .settings-subhead:not(.hidden)");It(".side-panel .template-settings").selectAll(".settings-block:not(.hidden) > h2, .settings-option:not(.hidden), .settings-subhead:not(.hidden), .settings-divider:not(.hidden)").classed("search-filtered-out",!i),i||o.filter((function(){var t=e(this.innerText);return!!t&&t.indexOf(r)>-1})).each((function(){var e=t(this,"settings-block"),n=It(this);if("H2"==this.tagName)e&&It(e).selectAll("h2, .settings-option, .settings-subhead, .settings-divider").classed("search-filtered-out",!1);else if("H3"==this.tagName)if(e&&It(e).select("h2").classed("search-filtered-out",!1),n.classed("settings-subhead")){n.classed("search-filtered-out",!1),this.previousSibling.classList.remove("search-filtered-out");for(var r=this.nextSibling;r&&r.classList.contains("settings-option");)r.classList.remove("search-filtered-out"),r=r.nextSibling}else{var i=t(this,"settings-option");if(i){i.classList.remove("search-filtered-out");for(var o=null,a=i.previousSibling;a&&null==o;)a.classList.contains("settings-subhead")?o=a:a=a.classList.contains("settings-divider")?null:a.previousSibling;o&&(o.classList.remove("search-filtered-out"),o.previousSibling.classList.remove("search-filtered-out"))}}}))}))}(),It(".side-panel-scrollbox").on("scroll",(function(){Je.hide()})),{update:function(t){jp.html(""),It(".current-template").style("opacity","1"),Wp(Ip.settings=t)},populate:function(){Ip.preview_pane.getState((function(t,e){if(t)console.error("Failed to get state",t);else{var n=Dl(e);for(var r in n){var i=document.getElementById("setting-"+r);i&&Jp(i,n[r])}Yp.updateDataBindings(),nh()}}))},getSettingsForCurrentTemplate:function(){return zp},setReadOnly:function(){jt(".setting").each((function(){It(this).attr("disabled",!0)}))},unsetReadOnly:function(){jt(".setting").each((function(){It(this).attr("disabled",null)}))}}}var ih,oh,ah=!1,sh=[],uh=100;function lh(){It(".flourish-warn-list").classed("visible",!1),ah=!1}function ch(){return It(".flourish-warn-btn").on("click",(function(){ah?lh():(It(".flourish-warn-list").classed("visible",!0),ah=!0)})),{clear:dh,warn:ph}}function fh(){It(".flourish-warn-container").classed("visible",sh.length),sh.length>uh&&(sh.length=uh);var t=It(".flourish-warn-list ul").selectAll("li").data(sh),e=t.enter().append("li");e.append("i").attr("class","fa fa-warning"),e.append("p").attr("class","message"),e.append("p").attr("class","explanation");var n=t.merge(e);n.select(".message").text((function(t){return t.message||""})),n.select(".explanation").text((function(t){return t.explanation||""})),t.exit().remove()}function dh(){sh=[],fh(),lh()}function ph(t){sh.unshift(t),fh()}function hh(t){var e=ih.visualisation,n=e.getTemplate(),r=!1,i=!1,o=!1;function a(){var e=ih.template_settings.getSettingsForCurrentTemplate(),n=ih.visualisation.settingsForCurrentTemplate(),r={};for(var i in n)i in e&&(r[i]=n[i]);oh.loadVisualisation(ih,r,(function(){ih.template_settings.populate(),ih.data_bindings.updateRequiredBindingsOverlay(!1),ic.clear(),t&&t()})),qt()}n.getSettings((function(t,e){t?console.error("Failed to get template settings: "+t):(ih.template_settings.update(e),r=!0,i&&o&&a())})),n.getDataBindings((function(t,e){t?console.error("Failed to get template data bindings: "+t):(ih.data_bindings.update(e),i=!0,r&&o&&a())})),e.refreshDataBindings((function(t){t?console.error("Failed to get template data bindings: "+t):(o=!0,i&&r&&a())}))}function mh(t){oh.updateData(ih.visualisation,t)}function gh(t){oh.updateDataNotPreview(ih.visualisation,t)}function vh(t){ih=t;var e=ch();return{loadTemplate:hh,updateData:mh,updateDataNotPreview:gh,sync:(oh=rc("iframe#preview","editor",ih,e,{setSetting({name:t,value:e}){const n=function(t){return document.getElementById("setting-"+t)}(t);n?(Jp(n,e),n.dispatchEvent(new Event("change"))):console.log(`Could not find setting ${t}`)}})).sync,setState:oh.setState,getState:oh.getState,hasData:oh.hasData,setData:oh.setData,getData:oh.getData,draw:oh.draw,update:oh.update,getDefaultState:oh.getDefaultState,snapshot:oh.snapshot,setFixedHeight:oh.setFixedHeight,resize:oh.resize,getDrawCalled:oh.getDrawCalled,setDrawCalled:oh.setDrawCalled}}var yh={},_h={};function bh(t){return new Function("d","return {"+t.map((function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'})).join(",")+"}")}function wh(t){var e=Object.create(null),n=[];return t.forEach((function(t){for(var r in t)r in e||n.push(e[r]=r)})),n}function xh(t,e){var n=t+"",r=n.length;return r9999?"+"+xh(t,6):xh(t,4)}(t.getUTCFullYear())+"-"+xh(t.getUTCMonth()+1,2)+"-"+xh(t.getUTCDate(),2)+(i?"T"+xh(e,2)+":"+xh(n,2)+":"+xh(r,2)+"."+xh(i,3)+"Z":r?"T"+xh(e,2)+":"+xh(n,2)+":"+xh(r,2)+"Z":n||e?"T"+xh(e,2)+":"+xh(n,2)+"Z":"")}var Ch=function(t){var e=new RegExp('["'+t+"\n\r]"),n=t.charCodeAt(0);function r(t,e){var r,i=[],o=t.length,a=0,s=0,u=o<=0,l=!1;function c(){if(u)return _h;if(l)return l=!1,yh;var e,r,i=a;if(34===t.charCodeAt(i)){for(;a++=o?u=!0:10===(r=t.charCodeAt(a++))?l=!0:13===r&&(l=!0,10===t.charCodeAt(a)&&++a),t.slice(i+1,e-1).replace(/""/g,'"')}for(;a{if(t)return console.error("Failed to update preview pane: "+t)}))}))},requiredBindingsAreUnset:Vs,updateRequiredBindingsOverlay:Ws}),this.preview_pane=vh(this),this.status_label={status_label:document.querySelector(".sdk-status-label")},this.session_reset_button=function(t){const e=document.querySelector(".sdk-session-reset-button");return e.addEventListener("click",(e=>{t.session_manager.clearSession(),e.preventDefault(),e.stopPropagation(),window.location.reload()})),{session_reset_button:e}}(this),this.responsive_menu=$t(this,this.session_manager.getPreviewSize()),this.confirm={on:i,blank:i,saved:i,saving:i,error:i},this.analytics=i,this.tour={fireEvent:i},window.addEventListener("hashchange",(()=>{this.loadFromUrlHash()}))}let Rh;Dh.prototype.getColumnTypes=function(t){qc({url:this.api_prefix+"/"+this.id,method:"GET",callback:function(e,n){if(e)return t(e);t(void 0,kh(n.column_types||[]))}},"load-data")},Dh.prototype.csv=function(t,e=null){this.cached_data?t(void 0,kh(this.cached_data)):this.csvPromise(e).then((e=>t(null,e)),(e=>t(e)))},Dh.prototype.csvPromise=async function(t=null){if(this.cached_data)return kh(this.cached_data);const e=this;let n=this.api_prefix+"/"+this.id+"/csv";return t&&(n="/api/slide/"+t+"/data_table/"+this.id+"/csv"),new Promise(((t,r)=>{qc({url:n,response_type:"text/csv; charset=utf-8",method:"GET",callback(n,i){if(n)return r(n);e.cached_data=Ah(i),t(kh(e.cached_data))}},"load-data")}))},Dh.prototype.saveData=function(t,e){var n=this,r=Cs(kh(t));qc({url:this.api_prefix+"/"+this.id+"/csv",payload:function(){return{version_number:n.getVersionNumber(),data:Eh(r)}},callback:function(t,i){if(t)return e(t);n.setVersionNumber(i.version_number),n.cached_data=r,e(void 0)}})},Dh.prototype.updateFromUrl=function(t,e){var n=this;qc({url:this.api_prefix+"/"+this.id+"/csv-url",payload:function(){return{live_csv_url:t,version_number:n.getVersionNumber()}},callback:function(r,i){if(r)return e(r);n.setVersionNumber(i.version_number),n.live_csv_url=t,t?n.updateFromLiveCsvUrl((function(t,r){if(t)return n.last_remote_data_error_message=t.message,e(t.message);var i=function(t){Cs(t);for(let e of t)for(let t=0;t1||e.getDataTables((function(t,n){if(t){for(var r=0;r{this.loadFromUrlHash()})):(this.session_manager.prepareSession(),this.preview_pane.loadTemplate((()=>{this.session_manager.applySession()})))},Oh.prototype.showStatusMessage=function(t){const e=this.status_label.status_label;e.innerText=t,e.style.opacity=1,e.style.transform="translate(0, 0)",Rh&&(clearTimeout(Rh),Rh=null),Rh=setTimeout((()=>{e.style.opacity=0,e.style.transform="translate(0, 20%)",Rh=null}),4e3)},Oh.prototype.logInfo=function(...t){const e=new Intl.DateTimeFormat("default",{hour:"numeric",minute:"numeric",second:"numeric"}).format(new Date);console.info("🔹 flourish-sdk:",...t,`[${e}]`)},Oh.prototype.loadFromUrlHash=async function(){if(!window.location.hash)return;this.session_manager.clearSession();const t=window.location.hash.slice(1),e=(n=Mh.getPublishedJson,function(...t){return new Promise(((e,i)=>{n.call(r,...t,(function(t,n){if(t)return i(t);e(n)}))}))});var n,r;try{const n=await e(t,this.public_url_prefix);this.updateFromJson(n)}catch(t){console.error(t)}},Oh.prototype.updateFromJson=function({state:t,bindings:e,data:n}){const r={};for(const[t,i]of Object.entries(e)){const e={},a={};for(const[t,n]of Object.entries(i))Array.isArray(n)?a[t]=n:e[t]=n;const s=o(n[t],e,a);r[t]=s}const i={};Uh(i,this.preview_pane.getDefaultState()),Uh(i,t),this.preview_pane.sync({state:i,data:r,overwrite_state:!0,update:!0},(()=>this.template_settings.populate()))};var Hh={},Ih={};function Bh(t){return new Function("d","return {"+t.map((function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'})).join(",")+"}")}function jh(t){var e=Object.create(null),n=[];return t.forEach((function(t){for(var r in t)r in e||n.push(e[r]=r)})),n}function Yh(t,e){var n=t+"",r=n.length;return r9999?"+"+Yh(t,6):Yh(t,4)}(t.getUTCFullYear())+"-"+Yh(t.getUTCMonth()+1,2)+"-"+Yh(t.getUTCDate(),2)+(i?"T"+Yh(e,2)+":"+Yh(n,2)+":"+Yh(r,2)+"."+Yh(i,3)+"Z":r?"T"+Yh(e,2)+":"+Yh(n,2)+":"+Yh(r,2)+"Z":n||e?"T"+Yh(e,2)+":"+Yh(n,2)+"Z":"")}var Ph=function(t){var e=new RegExp('["'+t+"\n\r]"),n=t.charCodeAt(0);function r(t,e){var r,i=[],o=t.length,a=0,s=0,u=o<=0,l=!1;function c(){if(u)return Ih;if(l)return l=!1,Hh;var e,r,i=a;if(34===t.charCodeAt(i)){for(;a++=o?u=!0:10===(r=t.charCodeAt(a++))?l=!0:13===r&&(l=!0,10===t.charCodeAt(a)&&++a),t.slice(i+1,e-1).replace(/""/g,'"')}for(;a=0&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!r.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))),a=-1,s=o.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a0)for(var n,r,i=new Array(n),o=0;o=200&&r<300||304===r){if(i)try{e=i.call(n,u)}catch(t){return void a.call("error",n,t)}else e=u;a.call("load",n,e)}else a.call("error",n,t)}if("undefined"!=typeof XDomainRequest&&!("withCredentials"in u)&&/^(http(s)?:)?\/\//.test(t)&&(u=new XDomainRequest),"onload"in u?u.onload=u.onerror=u.ontimeout=d:u.onreadystatechange=function(t){u.readyState>3&&d(t)},u.onprogress=function(t){a.call("progress",n,t)},n={header:function(t,e){return t=(t+"").toLowerCase(),arguments.length<2?s.get(t):(null==e?s.remove(t):s.set(t,e+""),n)},mimeType:function(t){return arguments.length?(r=null==t?null:t+"",n):r},responseType:function(t){return arguments.length?(o=t,n):o},timeout:function(t){return arguments.length?(f=+t,n):f},user:function(t){return arguments.length<1?l:(l=null==t?null:t+"",n)},password:function(t){return arguments.length<1?c:(c=null==t?null:t+"",n)},response:function(t){return i=t,n},get:function(t,e){return n.send("GET",t,e)},post:function(t,e){return n.send("POST",t,e)},send:function(e,i,d){return u.open(e,t,!0,l,c),null==r||s.has("accept")||s.set("accept",r+",*/*"),u.setRequestHeader&&s.each((function(t,e){u.setRequestHeader(e,t)})),null!=r&&u.overrideMimeType&&u.overrideMimeType(r),null!=o&&(u.responseType=o),f>0&&(u.timeout=f),null==d&&"function"==typeof i&&(d=i,i=null),null!=d&&1===d.length&&(d=function(t){return function(e,n){t(null==e?n:null)}}(d)),null!=d&&n.on("error",d).on("load",(function(t){d(null,t)})),a.call("beforesend",n,u),u.send(null==i?null:i),n},abort:function(){return u.abort(),n},on:function(){var t=a.on.apply(a,arguments);return t===a?n:t}},null!=e){if("function"!=typeof e)throw new Error("invalid callback: "+e);return n.get(e)}}(this.api_prefix+"/"+this.id+"/csv",(function(n,r){e.cached_data=$h(r.response),t(void 0,nm(e.cached_data))}))}},em.prototype.saveData=function(t,e){e()},em.prototype.save=function(t,e){e()},em.prototype.delete=function(t){t()},rm.prototype.getSettings=function(t){t(void 0,window.Flourish.app.settings)},rm.prototype.getDataBindings=function(t){t(void 0,window.Flourish.app.template_data_bindings)},rm.prototype.refreshDataBindings=function(t){t(void 0)};var om={},am=new Date,sm=new Date;function um(t,e,n,r){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return i.floor=function(e){return t(e=new Date(+e)),e},i.ceil=function(n){return t(n=new Date(n-1)),e(n,1),t(n),n},i.round=function(t){var e=i(t),n=i.ceil(t);return t-e0))return s;do{s.push(a=new Date(+n)),e(n,o),t(n)}while(a=e)for(;t(e),!n(e);)e.setTime(e-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););}))},n&&(i.count=function(e,r){return am.setTime(+e),sm.setTime(+r),t(am),t(sm),Math.floor(n(am,sm))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(e){return r(e)%t==0}:function(e){return i.count(0,e)%t==0}):i:null}),i}var lm=864e5,cm=6048e5,fm=um((function(t){t.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/lm}),(function(t){return t.getDate()-1}));function dm(t){return um((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/cm}))}fm.range;var pm=dm(0),hm=dm(1),mm=dm(2),gm=dm(3),vm=dm(4),ym=dm(5),_m=dm(6);pm.range,hm.range,mm.range,gm.range,vm.range,ym.range,_m.range;var bm=um((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));bm.every=function(t){return isFinite(t=Math.floor(t))&&t>0?um((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,n){e.setFullYear(e.getFullYear()+n*t)})):null},bm.range;var wm=um((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/lm}),(function(t){return t.getUTCDate()-1}));function xm(t){return um((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/cm}))}wm.range;var Tm=xm(0),Cm=xm(1),Am=xm(2),Em=xm(3),Dm=xm(4),km=xm(5),Sm=xm(6);Tm.range,Cm.range,Am.range,Em.range,Dm.range,km.range,Sm.range;var Mm=um((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()}));function Fm(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Lm(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Nm(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}Mm.every=function(t){return isFinite(t=Math.floor(t))&&t>0?um((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null},Mm.range;var Um,Om,Rm,Hm={"-":"",_:" ",0:"0"},Im=/^\s*\d+/,Bm=/^%/,jm=/[\\^$*+?|[\]().{}]/g;function Ym(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o68?1900:2e3),n+r[0].length):-1}function Qm(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Km(t,e,n){var r=Im.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function tg(t,e,n){var r=Im.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function eg(t,e,n){var r=Im.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function ng(t,e,n){var r=Im.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function rg(t,e,n){var r=Im.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function ig(t,e,n){var r=Im.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function og(t,e,n){var r=Im.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function ag(t,e,n){var r=Im.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function sg(t,e,n){var r=Im.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function ug(t,e,n){var r=Bm.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function lg(t,e,n){var r=Im.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function cg(t,e,n){var r=Im.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function fg(t,e){return Ym(t.getDate(),e,2)}function dg(t,e){return Ym(t.getHours(),e,2)}function pg(t,e){return Ym(t.getHours()%12||12,e,2)}function hg(t,e){return Ym(1+fm.count(bm(t),t),e,3)}function mg(t,e){return Ym(t.getMilliseconds(),e,3)}function gg(t,e){return mg(t,e)+"000"}function vg(t,e){return Ym(t.getMonth()+1,e,2)}function yg(t,e){return Ym(t.getMinutes(),e,2)}function _g(t,e){return Ym(t.getSeconds(),e,2)}function bg(t){var e=t.getDay();return 0===e?7:e}function wg(t,e){return Ym(pm.count(bm(t)-1,t),e,2)}function xg(t){var e=t.getDay();return e>=4||0===e?vm(t):vm.ceil(t)}function Tg(t,e){return t=xg(t),Ym(vm.count(bm(t),t)+(4===bm(t).getDay()),e,2)}function Cg(t){return t.getDay()}function Ag(t,e){return Ym(hm.count(bm(t)-1,t),e,2)}function Eg(t,e){return Ym(t.getFullYear()%100,e,2)}function Dg(t,e){return Ym((t=xg(t)).getFullYear()%100,e,2)}function kg(t,e){return Ym(t.getFullYear()%1e4,e,4)}function Sg(t,e){var n=t.getDay();return Ym((t=n>=4||0===n?vm(t):vm.ceil(t)).getFullYear()%1e4,e,4)}function Mg(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Ym(e/60|0,"0",2)+Ym(e%60,"0",2)}function Fg(t,e){return Ym(t.getUTCDate(),e,2)}function Lg(t,e){return Ym(t.getUTCHours(),e,2)}function Ng(t,e){return Ym(t.getUTCHours()%12||12,e,2)}function Ug(t,e){return Ym(1+wm.count(Mm(t),t),e,3)}function Og(t,e){return Ym(t.getUTCMilliseconds(),e,3)}function Rg(t,e){return Og(t,e)+"000"}function Hg(t,e){return Ym(t.getUTCMonth()+1,e,2)}function Ig(t,e){return Ym(t.getUTCMinutes(),e,2)}function Bg(t,e){return Ym(t.getUTCSeconds(),e,2)}function jg(t){var e=t.getUTCDay();return 0===e?7:e}function Yg(t,e){return Ym(Tm.count(Mm(t)-1,t),e,2)}function zg(t){var e=t.getUTCDay();return e>=4||0===e?Dm(t):Dm.ceil(t)}function Pg(t,e){return t=zg(t),Ym(Dm.count(Mm(t),t)+(4===Mm(t).getUTCDay()),e,2)}function $g(t){return t.getUTCDay()}function qg(t,e){return Ym(Cm.count(Mm(t)-1,t),e,2)}function Vg(t,e){return Ym(t.getUTCFullYear()%100,e,2)}function Wg(t,e){return Ym((t=zg(t)).getUTCFullYear()%100,e,2)}function Gg(t,e){return Ym(t.getUTCFullYear()%1e4,e,4)}function Zg(t,e){var n=t.getUTCDay();return Ym((t=n>=4||0===n?Dm(t):Dm.ceil(t)).getUTCFullYear()%1e4,e,4)}function Xg(){return"+0000"}function Jg(){return"%"}function Qg(t){return+t}function Kg(t){return Math.floor(+t/1e3)}function tv(t){throw new TypeError("Expected a value of type string but got a value of type "+typeof t)}function ev(t){return function(e){return"string"!=typeof e&&tv(e),(e=e.trim())?t(e):null}}!function(t){Um=function(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,o=t.days,a=t.shortDays,s=t.months,u=t.shortMonths,l=Pm(i),c=$m(i),f=Pm(o),d=$m(o),p=Pm(a),h=$m(a),m=Pm(s),g=$m(s),v=Pm(u),y=$m(u),_={a:function(t){return a[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return u[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:null,d:fg,e:fg,f:gg,g:Dg,G:Sg,H:dg,I:pg,j:hg,L:mg,m:vg,M:yg,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:Qg,s:Kg,S:_g,u:bg,U:wg,V:Tg,w:Cg,W:Ag,x:null,X:null,y:Eg,Y:kg,Z:Mg,"%":Jg},b={a:function(t){return a[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return u[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:Fg,e:Fg,f:Rg,g:Wg,G:Zg,H:Lg,I:Ng,j:Ug,L:Og,m:Hg,M:Ig,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:Qg,s:Kg,S:Bg,u:jg,U:Yg,V:Pg,w:$g,W:qg,x:null,X:null,y:Vg,Y:Gg,Z:Xg,"%":Jg},w={a:function(t,e,n){var r=p.exec(e.slice(n));return r?(t.w=h[r[0].toLowerCase()],n+r[0].length):-1},A:function(t,e,n){var r=f.exec(e.slice(n));return r?(t.w=d[r[0].toLowerCase()],n+r[0].length):-1},b:function(t,e,n){var r=v.exec(e.slice(n));return r?(t.m=y[r[0].toLowerCase()],n+r[0].length):-1},B:function(t,e,n){var r=m.exec(e.slice(n));return r?(t.m=g[r[0].toLowerCase()],n+r[0].length):-1},c:function(t,n,r){return C(t,e,n,r)},d:eg,e:eg,f:sg,g:Jm,G:Xm,H:rg,I:rg,j:ng,L:ag,m:tg,M:ig,p:function(t,e,n){var r=l.exec(e.slice(n));return r?(t.p=c[r[0].toLowerCase()],n+r[0].length):-1},q:Km,Q:lg,s:cg,S:og,u:Vm,U:Wm,V:Gm,w:qm,W:Zm,x:function(t,e,r){return C(t,n,e,r)},X:function(t,e,n){return C(t,r,e,n)},y:Jm,Y:Xm,Z:Qm,"%":ug};function x(t,e){return function(n){var r,i,o,a=[],s=-1,u=0,l=t.length;for(n instanceof Date||(n=new Date(+n));++s53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=Lm(Nm(o.y,0,1))).getUTCDay(),r=i>4||0===i?Cm.ceil(r):Cm(r),r=wm.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=Fm(Nm(o.y,0,1))).getDay(),r=i>4||0===i?hm.ceil(r):hm(r),r=fm.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?Lm(Nm(o.y,0,1)).getUTCDay():Fm(Nm(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,Lm(o)):Fm(o)}}function C(t,e,n,r){for(var i,o,a=0,s=e.length,u=n.length;a=u)return-1;if(37===(i=e.charCodeAt(a++))){if(i=e.charAt(a++),!(o=w[i in Hm?e.charAt(a++):i])||(r=o(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return _.x=x(n,_),_.X=x(r,_),_.c=x(e,_),b.x=x(n,b),b.X=x(r,b),b.c=x(e,b),{format:function(t){var e=x(t+="",_);return e.toString=function(){return t},e},parse:function(t){var e=T(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=x(t+="",b);return e.toString=function(){return t},e},utcParse:function(t){var e=T(t+="",!0);return e.toString=function(){return t},e}}}(t),Um.format,Um.parse,Om=Um.utcFormat,Rm=Um.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var nv=new Date(1972,3,27,19,45,5),rv={"%b %d":[{regex:/^june\s(30|[12][0-9]|0?[1-9])$/i,toDate:function(t){return new Date(null,5,t.split(/\s/)[1])}},{regex:/^july\s(3[01]|[12][0-9]|0?[1-9])$/i,toDate:function(t){return new Date(null,6,t.split(/\s/)[1])}},{regex:/^sept\s(30|[12][0-9]|0?[1-9])$/i,toDate:function(t){return new Date(null,8,t.split(/\s/)[1])}}],"%d %b":[{regex:/^(0?[1-9]|[1-9][0-9])\sjune$/i,toDate:function(t){return new Date(null,5,t.split(/\s/)[0])}},{regex:/^(0?[1-9]|[1-9][0-9])\sjuly$/i,toDate:function(t){return new Date(null,6,t.split(/\s/)[0])}},{regex:/^(0?[1-9]|[1-9][0-9])\ssept$/i,toDate:function(t){return new Date(null,8,t.split(/\s/)[0])}}]};function iv(t){return function(e){var n=null;return t.forEach((function(t){e.match(t.regex)&&(n=t.toDate(e))})),n}}function ov(t,e){var n,r=Rm(t),i=Om(t);return n=ev("function"==typeof e?function(t){return e(t,null!==r(t))}:function(t){return null!==r(t)}),Object.freeze({test:n,parse:ev((function(e){return r(e)||(rv[t]?iv(rv[t])(e):null)})),format:function(t){return i(t)},type:"datetime",description:t,id:"datetime$"+t,example:i(nv)})}var av=Object.freeze([ov("%Y-%m-%dT%H:%M:%S.%LZ"),ov("%Y-%m-%d %H:%M:%S"),ov("%Y-%m-%dT%H:%M:%S"),ov("%Y-%m-%dT%H:%M:%SZ"),ov("%d/%m/%Y",(function(t,e){if(!e)return!1;var n=t.split("/").map(parseFloat);return n[0]>0&&n[0]<=31&&n[1]>0&&n[1]<=12&&n[2]>=1e3})),ov("%d/%m/%Y %H:%M",(function(t,e){if(!e)return!1;var n=t.split(/[/ :]/).map(parseFloat);return n[0]>0&&n[0]<=31&&n[1]>0&&n[1]<=12&&n[2]>=1e3&&n[3]>=0&&n[3]<24&&n[4]>=0&&n[4]<60})),ov("%d/%m/%y",(function(t,e){if(!e)return!1;var n=t.split("/").map(parseFloat);return n[0]>0&&n[0]<=31&&n[1]>0&&n[1]<=12&&!isNaN(n[2])})),ov("%m/%d/%Y",(function(t,e){if(!e)return!1;var n=t.split("/").map(parseFloat);return n[0]>0&&n[0]<=12&&n[1]>0&&n[1]<=31&&n[2]>=1e3})),ov("%m/%d/%Y %H:%M",(function(t,e){if(!e)return!1;var n=t.split(/[/ :]/).map(parseFloat);return n[0]>0&&n[0]<=12&&n[1]>0&&n[1]<=31&&n[2]>=1e3&&n[3]>=0&&n[3]<24&&n[4]>=0&&n[4]<60})),ov("%m/%d/%y",(function(t,e){if(!e)return!1;var n=t.split("/").map(parseFloat);return n[0]>0&&n[0]<=12&&n[1]>0&&n[1]<=31&&!isNaN(n[2])})),ov("%Y/%m/%d",(function(t,e){if(!e)return!1;var n=t.split("/").map(parseFloat);return n[0]>=1e3&&n[1]>0&&n[1]<=12&&n[2]>0&&n[2]<=31})),ov("%d-%m-%Y",(function(t,e){if(!e)return!1;var n=t.split("-").map(parseFloat);return n[0]>0&&n[0]<=31&&n[1]>0&&n[1]<=12&&n[2]>=1e3})),ov("%d-%m-%y",(function(t,e){if(!e)return!1;var n=t.split("-").map(parseFloat);return n[0]>0&&n[0]<=31&&n[1]>0&&n[1]<=12&&!isNaN(n[2])})),ov("%d.%m.%Y",(function(t,e){if(!e)return!1;var n=t.split(".").map(parseFloat);return n[0]>0&&n[0]<=31&&n[1]>0&&n[1]<=12&&n[2]>=1e3})),ov("%m.%d.%y",(function(t,e){if(!e)return!1;var n=t.split(".").map(parseFloat);return n[0]>0&&n[0]<=12&&n[1]>0&&n[1]<=31&&!isNaN(n[2])})),ov("%m-%d-%Y",(function(t,e){if(!e)return!1;var n=t.split("-").map(parseFloat);return n[0]>0&&n[0]<=12&&n[1]>0&&n[1]<=31&&n[2]>=1e3})),ov("%m-%d-%y",(function(t,e){if(!e)return!1;var n=t.split("-").map(parseFloat);return n[0]>0&&n[0]<=12&&n[1]>0&&n[1]<=31&&!isNaN(n[2])})),ov("%Y-%m-%d",(function(t,e){if(!e)return!1;var n=t.split("-").map(parseFloat);return n[0]>=1e3&&n[1]>0&&n[1]<=12&&n[2]>0&&n[2]<=31})),ov("%Y-%m",(function(t,e){if(!e)return!1;var n=t.split("-").map(parseFloat);return n[0]>=1e3&&n[1]>0&&n[1]<=12})),ov("%d %b %Y",(function(t,e){if(!e)return!1;var n=t.split(" ").map(parseFloat);return n[0]>0&&n[0]<=31&&n[2]>=1e3})),ov("%d %B %Y",(function(t,e){if(!e)return!1;var n=t.split(" ").map(parseFloat);return n[0]>0&&n[0]<=31&&n[2]>=1e3})),ov("%d %b %y"),ov("%-d %b ’%y"),ov("%d %B %y"),ov("%d-%b-%Y",(function(t,e){if(!e)return!1;var n=t.split("-").map(parseFloat);return n[0]>0&&n[0]<=31&&n[2]>=1e3})),ov("%d-%B-%Y",(function(t,e){if(!e)return!1;var n=t.split("-").map(parseFloat);return n[0]>0&&n[0]<=31&&n[2]>=1e3})),ov("%d-%b-%y"),ov("%d-%B-%y"),ov("%m/%Y",(function(t,e){if(!e)return!1;var n=t.split("/").map(parseFloat);return n[0]>0&&n[0]<=12&&n[1]>=1e3})),ov("%m/%y"),ov("%b %Y",(function(t,e){return!!e&&t.split(" ").map(parseFloat)[1]>=1e3})),ov("%B %Y",(function(t,e){return!!e&&t.split(" ").map(parseFloat)[1]>=1e3})),ov("%b-%y"),ov("%b %y"),ov("%B %y"),ov("%b '%y"),ov("%B %-d %Y"),ov("%d %b",(function(t,e){return!!e||!!iv(rv["%d %b"])(t)})),ov("%d %B"),ov("%b %d",(function(t,e){return!!e||!!iv(rv["%b %d"])(t)})),ov("%B %d"),ov("%d-%m",(function(t,e){if(!e)return!1;var n=t.split("-").map(parseFloat);return n[0]>0&&n[0]<=31&&n[1]>0&&n[1]<=12})),ov("%m-%d"),ov("%d/%m"),ov("%m/%d"),ov("%b %d %Y"),ov("%b %d %Y, %-I.%M%p"),ov("%Y",(function(t,e){if(!e)return!1;var n=parseFloat(t);return n>1499&&n<2200})),ov("%B"),ov("%b"),ov("%X"),ov("%I:%M %p"),ov("%-I.%M%p"),ov("%H:%M",(function(t,e){if(!e)return!1;var n=t.split(":").map(parseFloat);return n[0]>=0&&n[0]<24})),ov("%H:%M:%S"),ov("%M:%S"),ov("%-I%p"),ov("Q%q %Y",(function(t,e){return!!e&&6===t.replace(/\s/g,"").length})),ov("%Y Q%q",(function(t,e){return!!e&&6===t.replace(/\s/g,"").length}))]);function sv(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}var uv,lv=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function cv(t){if(!(e=lv.exec(t)))throw new Error("invalid format: "+t);var e;return new fv({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function fv(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function dv(t,e){var n=sv(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}cv.prototype=fv.prototype,fv.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var pv={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return dv(100*t,e)},r:dv,s:function(t,e){var n=sv(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(uv=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+sv(t,Math.max(0,e+o-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function hv(t){return t}var mv=Array.prototype.map,gv=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function vv(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?hv:(e=mv.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,o=[],a=0,s=e[0],u=0;i>0&&s>0&&(u+s+1>r&&(s=Math.max(1,r-u)),o.push(t.substring(i-=s,i+s)),!((u+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(n)}),i=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",a=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?hv:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(mv.call(t.numerals,String)),u=void 0===t.percent?"%":t.percent+"",l=void 0===t.minus?"-":t.minus+"",c=void 0===t.nan?"NaN":t.nan+"";function f(t){var e=(t=cv(t)).fill,n=t.align,f=t.sign,d=t.symbol,p=t.zero,h=t.width,m=t.comma,g=t.precision,v=t.trim,y=t.type;"n"===y?(m=!0,y="g"):pv[y]||(void 0===g&&(g=12),v=!0,y="g"),(p||"0"===e&&"="===n)&&(p=!0,e="0",n="=");var _="$"===d?i:"#"===d&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",b="$"===d?o:/[%p]/.test(y)?u:"",w=pv[y],x=/[defgprs%]/.test(y);function T(t){var i,o,u,d=_,T=b;if("c"===y)T=w(t)+T,t="";else{var C=(t=+t)<0||1/t<0;if(t=isNaN(t)?c:w(Math.abs(t),g),v&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),C&&0==+t&&"+"!==f&&(C=!1),d=(C?"("===f?f:l:"-"===f||"("===f?"":f)+d,T=("s"===y?gv[8+uv/3]:"")+T+(C&&"("===f?")":""),x)for(i=-1,o=t.length;++i(u=t.charCodeAt(i))||u>57){T=(46===u?a+t.slice(i+1):t.slice(i))+T,t=t.slice(0,i);break}}m&&!p&&(t=r(t,1/0));var A=d.length+t.length+T.length,E=A>1)+d+t+T+E.slice(A);break;default:t=E+d+t+T}return s(t)}return g=void 0===g?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),T.toString=function(){return t+""},T}return{format:f,formatPrefix:function(t,e){var n,r=f(((t=cv(t)).type="f",t)),i=3*Math.max(-8,Math.min(8,Math.floor((n=e,((n=sv(Math.abs(n)))?n[1]:NaN)/3)))),o=Math.pow(10,-i),a=gv[8+i/3];return function(t){return r(o*t)+a}}}}var yv={test:ev((function(t){return/^(\+|-)?\d{1,3}(,\d{3})*(\.\d+)?((e|E)(\+|-)?\d+)?$/.test(t.trim())})),parse:ev((function(t){return parseFloat(t.replace(/,/g,""))})),description:"Comma thousand separator, point decimal mark",thousand_separator:",",decimal_mark:".",id:"number$comma_point",example:"12,235.56"},_v={test:ev((function(t){return/^(\+|-)?\d{1,3}(\s\d{3})*(\.\d+)?((e|E)(\+|-)?\d+)?$/.test(t.trim())})),parse:ev((function(t){return parseFloat(t.replace(/\s/g,""))})),description:"Space thousand separator, point decimal mark",thousand_separator:" ",decimal_mark:".",id:"number$space_point",example:"12 235.56"},bv={test:ev((function(t){return/^(\+|-)?\d+(\.\d+)?((e|E)(\+|-)?\d+)?$/.test(t.trim())})),parse:ev((function(t){return parseFloat(t)})),description:"No thousand separator, point decimal mark",thousand_separator:"",decimal_mark:".",id:"number$none_point",example:"12235.56"},wv={test:ev((function(t){return/^(\+|-)?\d{1,3}(\.\d{3})*(,\d+)?((e|E)(\+|-)?\d+)?$/.test(t.trim())})),parse:ev((function(t){return parseFloat(t.replace(/\./g,"").replace(/,/,"."))})),description:"Point thousand separator, comma decimal mark",thousand_separator:".",decimal_mark:",",id:"number$point_comma",example:"12.235,56"},xv={test:ev((function(t){return/^(\+|-)?\d{1,3}(\s\d{3})*(,\d+)?((e|E)(\+|-)?\d+)?$/.test(t.trim())})),parse:ev((function(t){return parseFloat(t.replace(/\s/g,"").replace(/,/,"."))})),description:"Space thousand separator, comma decimal mark",thousand_separator:" ",decimal_mark:",",id:"number$space_comma",example:"12 235,56"},Tv={test:ev((function(t){return/^(\+|-)?\d+(,\d+)?((e|E)(\+|-)?\d+)?$/.test(t.trim())})),parse:ev((function(t){return parseFloat(t.replace(/,/,"."))})),description:"No thousand separator, comma decimal mark",thousand_separator:"",decimal_mark:",",id:"number$none_comma",example:"12235,56"},Cv=Object.freeze([yv,_v,wv,xv,bv,Tv]);Cv.forEach((function(t){t.type="number",t.format=function(t){var e,n,r=vv({decimal:t.decimal_mark,thousands:t.thousand_separator,grouping:[3],currency:["",""]});return function(t,i){return null===t?"":(i||(i=",.2f"),i!==n&&(n=i,e=r.format(n)),e(t))}}(t),Object.freeze(t)}));var Av=Object.freeze({test:function(t){return"string"==typeof t||tv(t)},parse:function(t){return"string"==typeof t?t:tv(t)},format:function(t){if("string"==typeof t)return t},type:"string",description:"Arbitrary string",id:"string$arbitrary_string"}),Ev=Object.freeze({datetime:av,number:Cv}),Dv=Object.freeze(["datetime","number","string"]),kv=Object.freeze({n_max:250,n_failing_values:0,failure_fraction:.05,sort:!0}),Sv=Object.freeze(Object.keys(kv));function Mv(t,e){return t.index-e.index}function Fv(t,e){return e.n_success-t.n_success||Mv(t,e)}function Lv(t){return(""+t).trim()}function Nv(t){return void 0===t?function(t){return Lv(t)}:"function"==typeof t?function(e,n){return Lv(t(e,n))}:function(e){return Lv(e[""+t])}}function Uv(t){t?Array.isArray(t)||(t=[t]):t=Dv;var e=t.reduce((function(t,e){var n=Ev[e];return n&&Array.prototype.push.apply(t,n),t}),[]),n=-1!==t.indexOf("string"),r=Sv.reduce((function(t,e){return t[e]=kv[e],t}),{}),i=function(t,i){i=Nv(i);var o=t.map(i).filter((function(t){return t}));if(!o.length)return n?[Av]:[];var a=Math.min(r.n_max,o.length),s=Math.floor(a*r.failure_fraction),u=r.n_failing_values,l=r.sort?Fv:Mv,c=e.slice().reduce((function(t,e,n){for(var r=c=0,i=[],l=!1,c=0;cs?l=!0:-1===i.indexOf(f)&&(i.push(f),i.length>u&&(l=!0)),l))break}return l||t.push({interp:e,n_success:a-r,index:n}),t}),[]).sort(l).map((function(t){return t.interp}));return n&&c.push(Av),c};return Sv.forEach((function(t){var e;i[(e=t,e.replace(/_(\w)/g,(function(t,e){return e.toUpperCase()})))]=function(e){return void 0===e?r[t]:(r[t]=e,i)}})),i}Uv.DATETIME_IDS=Object.freeze(av.map((function(t){return t.id}))),Uv.NUMBER_IDS=Object.freeze(Cv.map((function(t){return t.id}))),Uv.STRING_IDS=Object.freeze([Av.id]),Uv.getInterpretation=function(){var t=av.concat(Cv,Av).reduce((function(t,e){return t[e.id]=e,t}),{});return function(e){return t[e]}}(),Uv._createAccessorFunction=Nv;var Ov=Ev,Rv=im(Object.freeze({__proto__:null,createInterpreter:Uv,recognised_formats:Ov}));Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function(t){if(null==this)throw new TypeError("this is null or not defined");var e=Object(this),n=e.length>>>0;if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var r=arguments[1],i=0;i=T.length||("columns"in h&&null!=h.columns?w[h.key]=h.columns.filter((function(t){return t=T[b+1].length?w[h.key]=_(h,h.column,""):w[h.key]=_(h,h.column,T[b+1][h.column])))}s.push(w)}return s};var Bv=om.getColumnTypesForData=function(t){return Gv(t).map((function(t,e){const n=Zv(t);let r;r=n.length>2e3?jv(n,1e3):n;const i=Xv(r)[0].id;return{type_id:i,index:e,output_format_id:i}}))};function jv(t,e){if(t.length<=2*e)return t;const n=Yv(t.length);for(;t.length>e;){const e=Math.floor(n()*t.length);t.splice(e,1)}return t}function Yv(t){let e=t;return function(){e|=0,e=e+1831565813|0;var t=Math.imul(e^e>>>15,1|e);return(((t=t+Math.imul(t^t>>>7,61|t)^t)^t>>>14)>>>0)/4294967296}}function zv(t){for(var e=t.length;e-- >1&&(!t[e]||!t[e].length||Array.isArray(t[e])&&-1==t[e].findIndex((function(t){return null!==t&&""!==t})));)t.splice(e,1);return t}om.getRandomSeededSample=jv,om.mulberry32=Yv,om.trimTrailingEmptyRows=zv,om.dropReturnCharacters=function(t){for(const e of t)for(let t=0;t0?t[0].length:0,r=[],i=0;i100?t.slice(10,e-10):e>50?t.slice(5,e-5):e>30?t.slice(4,e-4):e>20?t.slice(3,e-3):e>10?t.slice(2,e-2):e>1?t.slice(1,e):t.slice(0,1)}function Xv(t){var e=t.filter((function(t){return t&&!qv.includes(t.trim())})).map(Wv);return Vv(e)}function Jv(t,e,n){var r=this;r.id=1,r.template_id=1,r.api_prefix="/api/visualisation",r.can_edit=!0,r.__sdk__=!0,r.template_store_key=n.template_store_key,n.data_tables&&(this.data_tables=n.data_tables.map((function(t){return new em(r,t)}))),n.data_bindings&&(this.data_bindings=n.data_bindings)}om.stripCommonFixes=Wv,om.transposeNestedArray=Gv,om.getSlicedData=Zv,om.interpretColumn=Xv,Jv.prototype.save=function(t,e){this.version_number++,e(void 0)},Jv.prototype.getTemplate=function(){return this.template_id?(this._template&&this.template_id==this._template.id||(this._template=new rm(this.template_id)),this._template):null},Jv.prototype.settingsForCurrentTemplate=function(){return this.settings&&this.template_id in this.settings?this.settings[this.template_id]:{}},Jv.prototype.dataBindingsForCurrentTemplate=function(){return this.data_bindings&&this.template_id in this.data_bindings?this.data_bindings[this.template_id]:{}},Jv.prototype.refreshDataBindings=function(t){t()},Jv.prototype.updateDataBindings=function(t,e){var n=this;n.version_number++,n.data_bindings||(n.data_bindings={}),n.template_id in n.data_bindings||(n.data_bindings[n.template_id]={});var r=n.data_bindings[n.template_id];for(var i in t)for(var o in t[i]){var a=t[i][o];r[i][o]=a}e(void 0)},Jv.prototype.updateSettings=function(t,e){var n=this;n.version_number++,n.settings||(n.settings={}),n.template_id in n.settings||(n.settings[n.template_id]={});var r=n.settings[n.template_id];for(var i in t){var o=t[i];r[i]=o}e(void 0)},Jv.prototype.getDataTables=function(t){t(void 0,window.Flourish.app.data_tables)},Jv.prototype.dataTables=function(t){var e=this;e.data_tables?t(void 0,e.data_tables):(e.after_loading_data_tables||(e.after_loading_data_tables=[]),e.after_loading_data_tables.push(t),e.after_loading_data_tables.length>1||e.getDataTables((function(t,n){if(t){for(var r=0;rli{position:relative}.fa-li{position:absolute;left:-2.1428571429em;width:2.1428571429em;top:.1428571429em;text-align:center}.fa-li.fa-lg{left:-1.8571428571em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0);-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:""}.fa-music:before{content:""}.fa-search:before{content:""}.fa-envelope-o:before{content:""}.fa-heart:before{content:""}.fa-star:before{content:""}.fa-star-o:before{content:""}.fa-user:before{content:""}.fa-film:before{content:""}.fa-th-large:before{content:""}.fa-th:before{content:""}.fa-th-list:before{content:""}.fa-check:before{content:""}.fa-remove:before,.fa-close:before,.fa-times:before{content:""}.fa-search-plus:before{content:""}.fa-search-minus:before{content:""}.fa-power-off:before{content:""}.fa-signal:before{content:""}.fa-gear:before,.fa-cog:before{content:""}.fa-trash-o:before{content:""}.fa-home:before{content:""}.fa-file-o:before{content:""}.fa-clock-o:before{content:""}.fa-road:before{content:""}.fa-download:before{content:""}.fa-arrow-circle-o-down:before{content:""}.fa-arrow-circle-o-up:before{content:""}.fa-inbox:before{content:""}.fa-play-circle-o:before{content:""}.fa-rotate-right:before,.fa-repeat:before{content:""}.fa-refresh:before{content:""}.fa-list-alt:before{content:""}.fa-lock:before{content:""}.fa-flag:before{content:""}.fa-headphones:before{content:""}.fa-volume-off:before{content:""}.fa-volume-down:before{content:""}.fa-volume-up:before{content:""}.fa-qrcode:before{content:""}.fa-barcode:before{content:""}.fa-tag:before{content:""}.fa-tags:before{content:""}.fa-book:before{content:""}.fa-bookmark:before{content:""}.fa-print:before{content:""}.fa-camera:before{content:""}.fa-font:before{content:""}.fa-bold:before{content:""}.fa-italic:before{content:""}.fa-text-height:before{content:""}.fa-text-width:before{content:""}.fa-align-left:before{content:""}.fa-align-center:before{content:""}.fa-align-right:before{content:""}.fa-align-justify:before{content:""}.fa-list:before{content:""}.fa-dedent:before,.fa-outdent:before{content:""}.fa-indent:before{content:""}.fa-video-camera:before{content:""}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:""}.fa-pencil:before{content:""}.fa-map-marker:before{content:""}.fa-adjust:before{content:""}.fa-tint:before{content:""}.fa-edit:before,.fa-pencil-square-o:before{content:""}.fa-share-square-o:before{content:""}.fa-check-square-o:before{content:""}.fa-arrows:before{content:""}.fa-step-backward:before{content:""}.fa-fast-backward:before{content:""}.fa-backward:before{content:""}.fa-play:before{content:""}.fa-pause:before{content:""}.fa-stop:before{content:""}.fa-forward:before{content:""}.fa-fast-forward:before{content:""}.fa-step-forward:before{content:""}.fa-eject:before{content:""}.fa-chevron-left:before{content:""}.fa-chevron-right:before{content:""}.fa-plus-circle:before{content:""}.fa-minus-circle:before{content:""}.fa-times-circle:before{content:""}.fa-check-circle:before{content:""}.fa-question-circle:before{content:""}.fa-info-circle:before{content:""}.fa-crosshairs:before{content:""}.fa-times-circle-o:before{content:""}.fa-check-circle-o:before{content:""}.fa-ban:before{content:""}.fa-arrow-left:before{content:""}.fa-arrow-right:before{content:""}.fa-arrow-up:before{content:""}.fa-arrow-down:before{content:""}.fa-mail-forward:before,.fa-share:before{content:""}.fa-expand:before{content:""}.fa-compress:before{content:""}.fa-plus:before{content:""}.fa-minus:before{content:""}.fa-asterisk:before{content:""}.fa-exclamation-circle:before{content:""}.fa-gift:before{content:""}.fa-leaf:before{content:""}.fa-fire:before{content:""}.fa-eye:before{content:""}.fa-eye-slash:before{content:""}.fa-warning:before,.fa-exclamation-triangle:before{content:""}.fa-plane:before{content:""}.fa-calendar:before{content:""}.fa-random:before{content:""}.fa-comment:before{content:""}.fa-magnet:before{content:""}.fa-chevron-up:before{content:""}.fa-chevron-down:before{content:""}.fa-retweet:before{content:""}.fa-shopping-cart:before{content:""}.fa-folder:before{content:""}.fa-folder-open:before{content:""}.fa-arrows-v:before{content:""}.fa-arrows-h:before{content:""}.fa-bar-chart-o:before,.fa-bar-chart:before{content:""}.fa-twitter-square:before{content:""}.fa-facebook-square:before{content:""}.fa-camera-retro:before{content:""}.fa-key:before{content:""}.fa-gears:before,.fa-cogs:before{content:""}.fa-comments:before{content:""}.fa-thumbs-o-up:before{content:""}.fa-thumbs-o-down:before{content:""}.fa-star-half:before{content:""}.fa-heart-o:before{content:""}.fa-sign-out:before{content:""}.fa-linkedin-square:before{content:""}.fa-thumb-tack:before{content:""}.fa-external-link:before{content:""}.fa-sign-in:before{content:""}.fa-trophy:before{content:""}.fa-github-square:before{content:""}.fa-upload:before{content:""}.fa-lemon-o:before{content:""}.fa-phone:before{content:""}.fa-square-o:before{content:""}.fa-bookmark-o:before{content:""}.fa-phone-square:before{content:""}.fa-twitter:before{content:""}.fa-facebook-f:before,.fa-facebook:before{content:""}.fa-github:before{content:""}.fa-unlock:before{content:""}.fa-credit-card:before{content:""}.fa-feed:before,.fa-rss:before{content:""}.fa-hdd-o:before{content:""}.fa-bullhorn:before{content:""}.fa-bell:before{content:""}.fa-certificate:before{content:""}.fa-hand-o-right:before{content:""}.fa-hand-o-left:before{content:""}.fa-hand-o-up:before{content:""}.fa-hand-o-down:before{content:""}.fa-arrow-circle-left:before{content:""}.fa-arrow-circle-right:before{content:""}.fa-arrow-circle-up:before{content:""}.fa-arrow-circle-down:before{content:""}.fa-globe:before{content:""}.fa-wrench:before{content:""}.fa-tasks:before{content:""}.fa-filter:before{content:""}.fa-briefcase:before{content:""}.fa-arrows-alt:before{content:""}.fa-group:before,.fa-users:before{content:""}.fa-chain:before,.fa-link:before{content:""}.fa-cloud:before{content:""}.fa-flask:before{content:""}.fa-cut:before,.fa-scissors:before{content:""}.fa-copy:before,.fa-files-o:before{content:""}.fa-paperclip:before{content:""}.fa-save:before,.fa-floppy-o:before{content:""}.fa-square:before{content:""}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:""}.fa-list-ul:before{content:""}.fa-list-ol:before{content:""}.fa-strikethrough:before{content:""}.fa-underline:before{content:""}.fa-table:before{content:""}.fa-magic:before{content:""}.fa-truck:before{content:""}.fa-pinterest:before{content:""}.fa-pinterest-square:before{content:""}.fa-google-plus-square:before{content:""}.fa-google-plus:before{content:""}.fa-money:before{content:""}.fa-caret-down:before{content:""}.fa-caret-up:before{content:""}.fa-caret-left:before{content:""}.fa-caret-right:before{content:""}.fa-columns:before{content:""}.fa-unsorted:before,.fa-sort:before{content:""}.fa-sort-down:before,.fa-sort-desc:before{content:""}.fa-sort-up:before,.fa-sort-asc:before{content:""}.fa-envelope:before{content:""}.fa-linkedin:before{content:""}.fa-rotate-left:before,.fa-undo:before{content:""}.fa-legal:before,.fa-gavel:before{content:""}.fa-dashboard:before,.fa-tachometer:before{content:""}.fa-comment-o:before{content:""}.fa-comments-o:before{content:""}.fa-flash:before,.fa-bolt:before{content:""}.fa-sitemap:before{content:""}.fa-umbrella:before{content:""}.fa-paste:before,.fa-clipboard:before{content:""}.fa-lightbulb-o:before{content:""}.fa-exchange:before{content:""}.fa-cloud-download:before{content:""}.fa-cloud-upload:before{content:""}.fa-user-md:before{content:""}.fa-stethoscope:before{content:""}.fa-suitcase:before{content:""}.fa-bell-o:before{content:""}.fa-coffee:before{content:""}.fa-cutlery:before{content:""}.fa-file-text-o:before{content:""}.fa-building-o:before{content:""}.fa-hospital-o:before{content:""}.fa-ambulance:before{content:""}.fa-medkit:before{content:""}.fa-fighter-jet:before{content:""}.fa-beer:before{content:""}.fa-h-square:before{content:""}.fa-plus-square:before{content:""}.fa-angle-double-left:before{content:""}.fa-angle-double-right:before{content:""}.fa-angle-double-up:before{content:""}.fa-angle-double-down:before{content:""}.fa-angle-left:before{content:""}.fa-angle-right:before{content:""}.fa-angle-up:before{content:""}.fa-angle-down:before{content:""}.fa-desktop:before{content:""}.fa-laptop:before{content:""}.fa-tablet:before{content:""}.fa-mobile-phone:before,.fa-mobile:before{content:""}.fa-circle-o:before{content:""}.fa-quote-left:before{content:""}.fa-quote-right:before{content:""}.fa-spinner:before{content:""}.fa-circle:before{content:""}.fa-mail-reply:before,.fa-reply:before{content:""}.fa-github-alt:before{content:""}.fa-folder-o:before{content:""}.fa-folder-open-o:before{content:""}.fa-smile-o:before{content:""}.fa-frown-o:before{content:""}.fa-meh-o:before{content:""}.fa-gamepad:before{content:""}.fa-keyboard-o:before{content:""}.fa-flag-o:before{content:""}.fa-flag-checkered:before{content:""}.fa-terminal:before{content:""}.fa-code:before{content:""}.fa-mail-reply-all:before,.fa-reply-all:before{content:""}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:""}.fa-location-arrow:before{content:""}.fa-crop:before{content:""}.fa-code-fork:before{content:""}.fa-unlink:before,.fa-chain-broken:before{content:""}.fa-question:before{content:""}.fa-info:before{content:""}.fa-exclamation:before{content:""}.fa-superscript:before{content:""}.fa-subscript:before{content:""}.fa-eraser:before{content:""}.fa-puzzle-piece:before{content:""}.fa-microphone:before{content:""}.fa-microphone-slash:before{content:""}.fa-shield:before{content:""}.fa-calendar-o:before{content:""}.fa-fire-extinguisher:before{content:""}.fa-rocket:before{content:""}.fa-maxcdn:before{content:""}.fa-chevron-circle-left:before{content:""}.fa-chevron-circle-right:before{content:""}.fa-chevron-circle-up:before{content:""}.fa-chevron-circle-down:before{content:""}.fa-html5:before{content:""}.fa-css3:before{content:""}.fa-anchor:before{content:""}.fa-unlock-alt:before{content:""}.fa-bullseye:before{content:""}.fa-ellipsis-h:before{content:""}.fa-ellipsis-v:before{content:""}.fa-rss-square:before{content:""}.fa-play-circle:before{content:""}.fa-ticket:before{content:""}.fa-minus-square:before{content:""}.fa-minus-square-o:before{content:""}.fa-level-up:before{content:""}.fa-level-down:before{content:""}.fa-check-square:before{content:""}.fa-pencil-square:before{content:""}.fa-external-link-square:before{content:""}.fa-share-square:before{content:""}.fa-compass:before{content:""}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:""}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:""}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:""}.fa-euro:before,.fa-eur:before{content:""}.fa-gbp:before{content:""}.fa-dollar:before,.fa-usd:before{content:""}.fa-rupee:before,.fa-inr:before{content:""}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:""}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:""}.fa-won:before,.fa-krw:before{content:""}.fa-bitcoin:before,.fa-btc:before{content:""}.fa-file:before{content:""}.fa-file-text:before{content:""}.fa-sort-alpha-asc:before{content:""}.fa-sort-alpha-desc:before{content:""}.fa-sort-amount-asc:before{content:""}.fa-sort-amount-desc:before{content:""}.fa-sort-numeric-asc:before{content:""}.fa-sort-numeric-desc:before{content:""}.fa-thumbs-up:before{content:""}.fa-thumbs-down:before{content:""}.fa-youtube-square:before{content:""}.fa-youtube:before{content:""}.fa-xing:before{content:""}.fa-xing-square:before{content:""}.fa-youtube-play:before{content:""}.fa-dropbox:before{content:""}.fa-stack-overflow:before{content:""}.fa-instagram:before{content:""}.fa-flickr:before{content:""}.fa-adn:before{content:""}.fa-bitbucket:before{content:""}.fa-bitbucket-square:before{content:""}.fa-tumblr:before{content:""}.fa-tumblr-square:before{content:""}.fa-long-arrow-down:before{content:""}.fa-long-arrow-up:before{content:""}.fa-long-arrow-left:before{content:""}.fa-long-arrow-right:before{content:""}.fa-apple:before{content:""}.fa-windows:before{content:""}.fa-android:before{content:""}.fa-linux:before{content:""}.fa-dribbble:before{content:""}.fa-skype:before{content:""}.fa-foursquare:before{content:""}.fa-trello:before{content:""}.fa-female:before{content:""}.fa-male:before{content:""}.fa-gittip:before,.fa-gratipay:before{content:""}.fa-sun-o:before{content:""}.fa-moon-o:before{content:""}.fa-archive:before{content:""}.fa-bug:before{content:""}.fa-vk:before{content:""}.fa-weibo:before{content:""}.fa-renren:before{content:""}.fa-pagelines:before{content:""}.fa-stack-exchange:before{content:""}.fa-arrow-circle-o-right:before{content:""}.fa-arrow-circle-o-left:before{content:""}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:""}.fa-dot-circle-o:before{content:""}.fa-wheelchair:before{content:""}.fa-vimeo-square:before{content:""}.fa-turkish-lira:before,.fa-try:before{content:""}.fa-plus-square-o:before{content:""}.fa-space-shuttle:before{content:""}.fa-slack:before{content:""}.fa-envelope-square:before{content:""}.fa-wordpress:before{content:""}.fa-openid:before{content:""}.fa-institution:before,.fa-bank:before,.fa-university:before{content:""}.fa-mortar-board:before,.fa-graduation-cap:before{content:""}.fa-yahoo:before{content:""}.fa-google:before{content:""}.fa-reddit:before{content:""}.fa-reddit-square:before{content:""}.fa-stumbleupon-circle:before{content:""}.fa-stumbleupon:before{content:""}.fa-delicious:before{content:""}.fa-digg:before{content:""}.fa-pied-piper:before{content:""}.fa-pied-piper-alt:before{content:""}.fa-drupal:before{content:""}.fa-joomla:before{content:""}.fa-language:before{content:""}.fa-fax:before{content:""}.fa-building:before{content:""}.fa-child:before{content:""}.fa-paw:before{content:""}.fa-spoon:before{content:""}.fa-cube:before{content:""}.fa-cubes:before{content:""}.fa-behance:before{content:""}.fa-behance-square:before{content:""}.fa-steam:before{content:""}.fa-steam-square:before{content:""}.fa-recycle:before{content:""}.fa-automobile:before,.fa-car:before{content:""}.fa-cab:before,.fa-taxi:before{content:""}.fa-tree:before{content:""}.fa-spotify:before{content:""}.fa-deviantart:before{content:""}.fa-soundcloud:before{content:""}.fa-database:before{content:""}.fa-file-pdf-o:before{content:""}.fa-file-word-o:before{content:""}.fa-file-excel-o:before{content:""}.fa-file-powerpoint-o:before{content:""}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:""}.fa-file-zip-o:before,.fa-file-archive-o:before{content:""}.fa-file-sound-o:before,.fa-file-audio-o:before{content:""}.fa-file-movie-o:before,.fa-file-video-o:before{content:""}.fa-file-code-o:before{content:""}.fa-vine:before{content:""}.fa-codepen:before{content:""}.fa-jsfiddle:before{content:""}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:""}.fa-circle-o-notch:before{content:""}.fa-ra:before,.fa-rebel:before{content:""}.fa-ge:before,.fa-empire:before{content:""}.fa-git-square:before{content:""}.fa-git:before{content:""}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:""}.fa-tencent-weibo:before{content:""}.fa-qq:before{content:""}.fa-wechat:before,.fa-weixin:before{content:""}.fa-send:before,.fa-paper-plane:before{content:""}.fa-send-o:before,.fa-paper-plane-o:before{content:""}.fa-history:before{content:""}.fa-circle-thin:before{content:""}.fa-header:before{content:""}.fa-paragraph:before{content:""}.fa-sliders:before{content:""}.fa-share-alt:before{content:""}.fa-share-alt-square:before{content:""}.fa-bomb:before{content:""}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:""}.fa-tty:before{content:""}.fa-binoculars:before{content:""}.fa-plug:before{content:""}.fa-slideshare:before{content:""}.fa-twitch:before{content:""}.fa-yelp:before{content:""}.fa-newspaper-o:before{content:""}.fa-wifi:before{content:""}.fa-calculator:before{content:""}.fa-paypal:before{content:""}.fa-google-wallet:before{content:""}.fa-cc-visa:before{content:""}.fa-cc-mastercard:before{content:""}.fa-cc-discover:before{content:""}.fa-cc-amex:before{content:""}.fa-cc-paypal:before{content:""}.fa-cc-stripe:before{content:""}.fa-bell-slash:before{content:""}.fa-bell-slash-o:before{content:""}.fa-trash:before{content:""}.fa-copyright:before{content:""}.fa-at:before{content:""}.fa-eyedropper:before{content:""}.fa-paint-brush:before{content:""}.fa-birthday-cake:before{content:""}.fa-area-chart:before{content:""}.fa-pie-chart:before{content:""}.fa-line-chart:before{content:""}.fa-lastfm:before{content:""}.fa-lastfm-square:before{content:""}.fa-toggle-off:before{content:""}.fa-toggle-on:before{content:""}.fa-bicycle:before{content:""}.fa-bus:before{content:""}.fa-ioxhost:before{content:""}.fa-angellist:before{content:""}.fa-cc:before{content:""}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:""}.fa-meanpath:before{content:""}.fa-buysellads:before{content:""}.fa-connectdevelop:before{content:""}.fa-dashcube:before{content:""}.fa-forumbee:before{content:""}.fa-leanpub:before{content:""}.fa-sellsy:before{content:""}.fa-shirtsinbulk:before{content:""}.fa-simplybuilt:before{content:""}.fa-skyatlas:before{content:""}.fa-cart-plus:before{content:""}.fa-cart-arrow-down:before{content:""}.fa-diamond:before{content:""}.fa-ship:before{content:""}.fa-user-secret:before{content:""}.fa-motorcycle:before{content:""}.fa-street-view:before{content:""}.fa-heartbeat:before{content:""}.fa-venus:before{content:""}.fa-mars:before{content:""}.fa-mercury:before{content:""}.fa-intersex:before,.fa-transgender:before{content:""}.fa-transgender-alt:before{content:""}.fa-venus-double:before{content:""}.fa-mars-double:before{content:""}.fa-venus-mars:before{content:""}.fa-mars-stroke:before{content:""}.fa-mars-stroke-v:before{content:""}.fa-mars-stroke-h:before{content:""}.fa-neuter:before{content:""}.fa-genderless:before{content:""}.fa-facebook-official:before{content:""}.fa-pinterest-p:before{content:""}.fa-whatsapp:before{content:""}.fa-server:before{content:""}.fa-user-plus:before{content:""}.fa-user-times:before{content:""}.fa-hotel:before,.fa-bed:before{content:""}.fa-viacoin:before{content:""}.fa-train:before{content:""}.fa-subway:before{content:""}.fa-medium:before{content:""}.fa-yc:before,.fa-y-combinator:before{content:""}.fa-optin-monster:before{content:""}.fa-opencart:before{content:""}.fa-expeditedssl:before{content:""}.fa-battery-4:before,.fa-battery-full:before{content:""}.fa-battery-3:before,.fa-battery-three-quarters:before{content:""}.fa-battery-2:before,.fa-battery-half:before{content:""}.fa-battery-1:before,.fa-battery-quarter:before{content:""}.fa-battery-0:before,.fa-battery-empty:before{content:""}.fa-mouse-pointer:before{content:""}.fa-i-cursor:before{content:""}.fa-object-group:before{content:""}.fa-object-ungroup:before{content:""}.fa-sticky-note:before{content:""}.fa-sticky-note-o:before{content:""}.fa-cc-jcb:before{content:""}.fa-cc-diners-club:before{content:""}.fa-clone:before{content:""}.fa-balance-scale:before{content:""}.fa-hourglass-o:before{content:""}.fa-hourglass-1:before,.fa-hourglass-start:before{content:""}.fa-hourglass-2:before,.fa-hourglass-half:before{content:""}.fa-hourglass-3:before,.fa-hourglass-end:before{content:""}.fa-hourglass:before{content:""}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:""}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:""}.fa-hand-scissors-o:before{content:""}.fa-hand-lizard-o:before{content:""}.fa-hand-spock-o:before{content:""}.fa-hand-pointer-o:before{content:""}.fa-hand-peace-o:before{content:""}.fa-trademark:before{content:""}.fa-registered:before{content:""}.fa-creative-commons:before{content:""}.fa-gg:before{content:""}.fa-gg-circle:before{content:""}.fa-tripadvisor:before{content:""}.fa-odnoklassniki:before{content:""}.fa-odnoklassniki-square:before{content:""}.fa-get-pocket:before{content:""}.fa-wikipedia-w:before{content:""}.fa-safari:before{content:""}.fa-chrome:before{content:""}.fa-firefox:before{content:""}.fa-opera:before{content:""}.fa-internet-explorer:before{content:""}.fa-tv:before,.fa-television:before{content:""}.fa-contao:before{content:""}.fa-500px:before{content:""}.fa-amazon:before{content:""}.fa-calendar-plus-o:before{content:""}.fa-calendar-minus-o:before{content:""}.fa-calendar-times-o:before{content:""}.fa-calendar-check-o:before{content:""}.fa-industry:before{content:""}.fa-map-pin:before{content:""}.fa-map-signs:before{content:""}.fa-map-o:before{content:""}.fa-map:before{content:""}.fa-commenting:before{content:""}.fa-commenting-o:before{content:""}.fa-houzz:before{content:""}.fa-vimeo:before{content:""}.fa-black-tie:before{content:""}.fa-fonticons:before{content:""}.fa-reddit-alien:before{content:""}.fa-edge:before{content:""}.fa-credit-card-alt:before{content:""}.fa-codiepie:before{content:""}.fa-modx:before{content:""}.fa-fort-awesome:before{content:""}.fa-usb:before{content:""}.fa-product-hunt:before{content:""}.fa-mixcloud:before{content:""}.fa-scribd:before{content:""}.fa-pause-circle:before{content:""}.fa-pause-circle-o:before{content:""}.fa-stop-circle:before{content:""}.fa-stop-circle-o:before{content:""}.fa-shopping-bag:before{content:""}.fa-shopping-basket:before{content:""}.fa-hashtag:before{content:""}.fa-bluetooth:before{content:""}.fa-bluetooth-b:before{content:""}.fa-percent:before{content:""}@font-face{font-family:"Source Sans Pro";font-weight:300;font-style:normal;font-stretch:normal;src:url("fonts/source-sans-pro/EOT/SourceSansPro-Light.eot") format("embedded-opentype"),url("fonts/source-sans-pro/WOFF/OTF/SourceSansPro-Light.otf.woff") format("woff"),url("fonts/source-sans-pro/OTF/SourceSansPro-Light.otf") format("opentype"),url("fonts/source-sans-pro/TTF/SourceSansPro-Light.ttf") format("truetype")}@font-face{font-family:"Source Sans Pro";font-weight:300;font-style:italic;font-stretch:normal;src:url("fonts/source-sans-pro/EOT/SourceSansPro-LightIt.eot") format("embedded-opentype"),url("fonts/source-sans-pro/WOFF/OTF/SourceSansPro-LightIt.otf.woff") format("woff"),url("fonts/source-sans-pro/OTF/SourceSansPro-LightIt.otf") format("opentype"),url("fonts/source-sans-pro/TTF/SourceSansPro-LightIt.ttf") format("truetype")}@font-face{font-family:"Source Sans Pro";font-weight:400;font-style:normal;font-stretch:normal;src:url("fonts/source-sans-pro/EOT/SourceSansPro-Regular.eot") format("embedded-opentype"),url("fonts/source-sans-pro/WOFF/OTF/SourceSansPro-Regular.otf.woff") format("woff"),url("fonts/source-sans-pro/OTF/SourceSansPro-Regular.otf") format("opentype"),url("fonts/source-sans-pro/TTF/SourceSansPro-Regular.ttf") format("truetype")}@font-face{font-family:"Source Sans Pro";font-weight:400;font-style:italic;font-stretch:normal;src:url("fonts/source-sans-pro/EOT/SourceSansPro-It.eot") format("embedded-opentype"),url("fonts/source-sans-pro/WOFF/OTF/SourceSansPro-It.otf.woff") format("woff"),url("fonts/source-sans-pro/OTF/SourceSansPro-It.otf") format("opentype"),url("fonts/source-sans-pro/TTF/SourceSansPro-It.ttf") format("truetype")}@font-face{font-family:"Source Sans Pro";font-weight:600;font-style:normal;font-stretch:normal;src:url("fonts/source-sans-pro/EOT/SourceSansPro-Semibold.eot") format("embedded-opentype"),url("fonts/source-sans-pro/WOFF/OTF/SourceSansPro-Semibold.otf.woff") format("woff"),url("fonts/source-sans-pro/OTF/SourceSansPro-Semibold.otf") format("opentype"),url("fonts/source-sans-pro/TTF/SourceSansPro-Semibold.ttf") format("truetype")}@font-face{font-family:"Source Sans Pro";font-weight:600;font-style:italic;font-stretch:normal;src:url("fonts/source-sans-pro/EOT/SourceSansPro-SemiboldIt.eot") format("embedded-opentype"),url("fonts/source-sans-pro/WOFF/OTF/SourceSansPro-SemiboldIt.otf.woff") format("woff"),url("fonts/source-sans-pro/OTF/SourceSansPro-SemiboldIt.otf") format("opentype"),url("fonts/source-sans-pro/TTF/SourceSansPro-SemiboldIt.ttf") format("truetype")}@font-face{font-family:"Source Sans Pro";font-weight:700;font-style:normal;font-stretch:normal;src:url("fonts/source-sans-pro/EOT/SourceSansPro-Bold.eot") format("embedded-opentype"),url("fonts/source-sans-pro/WOFF/OTF/SourceSansPro-Bold.otf.woff") format("woff"),url("fonts/source-sans-pro/OTF/SourceSansPro-Bold.otf") format("opentype"),url("fonts/source-sans-pro/TTF/SourceSansPro-Bold.ttf") format("truetype")}@font-face{font-family:"Source Sans Pro";font-weight:700;font-style:italic;font-stretch:normal;src:url("fonts/source-sans-pro/EOT/SourceSansPro-BoldIt.eot") format("embedded-opentype"),url("fonts/source-sans-pro/WOFF/OTF/SourceSansPro-BoldIt.otf.woff") format("woff"),url("fonts/source-sans-pro/OTF/SourceSansPro-BoldIt.otf") format("opentype"),url("fonts/source-sans-pro/TTF/SourceSansPro-BoldIt.ttf") format("truetype")}@font-face{font-family:"Canva Sans Variable";font-weight:200 700;src:url("fonts/canva-sans-variable/WOFF/CanvaSans-VF.woff") format("woff"),url("fonts/canva-sans-display/TTF/CanvaSans-VF.ttf") format("truetype")}@font-face{font-family:"Canva Sans Display Variable";font-weight:200 700;src:url("fonts/canva-sans-variable/WOFF/CanvaSansDisplay-VF.woff") format("woff"),url("fonts/canva-sans-variable/TTF/CanvaSansDisplay-VF.ttf") format("truetype")}.content.shaded-bg{background:#eee;display:flex;flex-direction:column;justify-content:center}.content.full-height{height:100vh}.row{position:relative;width:100%}.row .row-inner{position:relative;padding:0 20px;margin:auto;max-width:520px}@media(min-width: 620px){.row .row-inner{max-width:620px}}@media(min-width: 820px){.row .row-inner{max-width:820px}}@media(min-width: 1020px){.row .row-inner{max-width:1020px}}@media(min-width: 1220px){.row .row-inner{max-width:1220px}}.row .row-inner.narrow{max-width:800px}.row .row-inner.extra-narrow{max-width:620px}.row .row-header h1.collapser{color:#777;font-weight:500;font-size:.75em;letter-spacing:.1em;text-transform:uppercase;margin-bottom:.5em}.row .row-menus .row-menu{height:1.7em;display:inline-block;vertical-align:middle}.row .row-menus .row-menu.right{float:right}.row .row-menus .row-menu .menu-item{display:inline;color:#333}.row .row-menus .row-menu .menu-item i{margin-left:10px;color:#555;font-size:1em}.row .row-menus .row-menu .menu-item .label{font-size:.8em}.row .row-menus .row-menu .menu-item.selected{bottom:2px solid}@media only screen and (max-width: 1100px){.row .row-menus .row-menu .menu-item .label{display:none}}@media only screen and (max-width: 600px){.row .row-menus .row-menu .menu-label{display:none}}.page-header{display:flex;flex-direction:column;align-items:center;align-items:flex-start;position:relative;margin:0 0 10px;border-bottom:1px solid #ddd;padding:30px 0}.page-header h1{display:inline-block;font-size:18px;height:24px}.page-header h2{font-size:16px;font-weight:100;line-height:1em}@media(min-width: 620px){.page-header h2{font-size:36px}}@media(min-width: 820px){.page-header{flex-direction:row}.page-header h2{font-size:42px;margin-top:42px}}@media(min-width: 1220px){.page-header h2{font-size:48px}}.clickable{cursor:pointer}.clickable:hover{opacity:.5}.clickable.selected,.clickable.selected:hover{opacity:1;cursor:default}.clickable[disabled]{opacity:.5;cursor:default}button.clickable{border:none;background:none}.is-touch .clickable:hover{opacity:1}.no-select{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.fa-chevron-down{-webkit-text-stroke:1px #fff}.dropdown{height:40px;padding-top:12px;position:relative}.dropdown .dropdown-head{padding:0;font-size:18px}.dropdown .dropdown-head .current{font-size:1em;margin:0 5px;cursor:default}.dropdown .dropdown-head .dropdown-chevron{font-size:10px}.dropdown .dropdown-label{display:inline-block;font-size:12px;padding:.6em .4em .2em;text-transform:uppercase;letter-spacing:1px;vertical-align:middle}.dropdown .dropdown-list{display:none;background:#fff;border-radius:3px;box-shadow:0 1px 4px rgba(0,0,0,.2);position:absolute;margin-top:0;margin-bottom:40px;left:0;padding:0;min-width:100%;max-height:60vh;overflow-x:hidden;overflow-y:auto}.dropdown .dropdown-list .dropdown-category{text-transform:uppercase;font-size:12px;font-weight:600;padding:9px 60px 9px 6px;color:#fff;background-color:#777}.dropdown .dropdown-list .dropdown-item{display:flex;flex-direction:row;flex-wrap:nowrap;align-content:center;justify-content:flex-start;align-items:center;cursor:pointer;border-bottom:1px solid #eaeaea;padding:12px 60px 12px 12px;font-weight:normal;position:relative;white-space:nowrap}.dropdown .dropdown-list .dropdown-item i{margin-right:5px}.dropdown .dropdown-list .dropdown-item img{margin-right:5px;height:14px;width:auto}.dropdown .dropdown-list .dropdown-item.selected,.dropdown .dropdown-list .dropdown-item:not(.dropdown-category):hover{background:#eee}.dropdown .dropdown-list .dropdown-item:last-child{border-bottom:none}.dropdown .dropdown-list .dropdown-item.current::before{font-family:FontAwesome;content:"";position:absolute;right:11px;top:12px;color:#666;pointer-events:none}.dropdown .dropdown-list .dropdown-item.upgrade-btn::after{top:12px;right:8px}.dropdown .dropdown-list form.dropdown-item{padding:0}.dropdown .dropdown-list form.dropdown-item button{background:rgba(0,0,0,0);font-size:inherit;display:block;width:100%;border:none;cursor:pointer;padding:12px 60px 12px 12px;text-align:left}.dropdown .dropdown-list form.dropdown-item:hover button{opacity:.75}.dropdown.right-aligned .dropdown-head{text-align:right}.dropdown.right-aligned .dropdown-list{right:0;left:auto}.dropdown.autocomplete{display:none;height:0}.dropdown.autocomplete.open{display:block;height:auto}.dropdown.autocomplete.open .dropdown-list,.dropdown.click-to-open.open:hover .dropdown-list,.dropdown:not(.click-to-open):hover .dropdown-list{animation:dropdown-out 200ms;display:block;z-index:999}@media(min-width: 420px){.dropdown{padding-top:21px}.dropdown.autocomplete{padding-top:0}}.dialog .dropdown-list{max-height:30vh}@keyframes dropdown-out{0%{opacity:0;transform:translateY(-10px);pointer-events:none}100%{opacity:1;transform:translateY(0);pointer-events:auto}}.menu{overflow:hidden;display:inline-block;margin-left:1em}.menu:first-child,.menu:first-of-type{margin-left:0}.menu .menu-label{display:inline-block;font-size:.75em;margin-top:.25em;padding:18px 12px 0;text-transform:uppercase;letter-spacing:1px;vertical-align:middle}.menu .menu-item{display:inline-block;font-size:1em;padding:0;vertical-align:middle;cursor:pointer;font-weight:500;margin-right:40px;padding-top:21px}.menu .menu-item a:hover{opacity:1}.menu .menu-item#sign-in{padding-top:0;margin:0}.menu .menu-item.small{font-size:.85em;font-weight:400}.menu .menu-item:hover{color:#888}.menu .menu-item.selected{border-color:#333}.menu .menu-item.selected:hover{color:#333}.menu .menu-item.space-right{padding-right:50px}.menu .menu-item.space-left{padding-left:50px}#preview-menu{float:left;margin-top:7px;width:0}#preview-menu .menu-item{padding:0;font-size:12px;margin-right:5px;padding-right:5px;opacity:.5}#preview-menu .menu-item.selected{opacity:1}#preview-menu .menu-item.selected .label{text-decoration:underline}#preview-menu .menu-item:last-child{border-right:none;padding-right:0}#preview-menu #editor-previews{display:none}#preview-menu #editor-custom-inputs input{width:44px;border:none;border-radius:3px;padding-left:5px;background:#fff;outline:none}#preview-menu #editor-custom-inputs input:first-child{margin-right:-10px;position:relative;z-index:2}#preview-menu #editor-custom-inputs input:last-child{margin-left:5px}#preview-menu #editor-preview{border-right:none}@media(min-width: 820px){#preview-menu{width:230px}#preview-menu .menu-item{display:inline-block}#preview-menu .menu-item#full-preview{padding-right:12px;margin-right:10px;border-right:1px solid rgba(0,0,0,.2)}#preview-menu #editor-previews{display:inline-block}#preview-menu #editor-previews.hidden{display:none}}button{font-family:"Source Sans Pro",sans-serif}.btn{font-size:12px;border:none;font-weight:bold;font-family:inherit;border-radius:3px;overflow:hidden;display:inline-block;vertical-align:middle;padding:0 8px;height:24px;line-height:22px;cursor:pointer;text-align:left;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background:#eee}.btn i{margin-right:3px}.btn.fa{font-family:FontAwesome}.btn .no-padding{padding:0}.btn.selected,.btn.selected:hover{background-color:#dd4141;color:#fff;cursor:default}.btn.upgrade{background:#eaa22d;color:#fff}.btn.upgrade.business{background:#93366e}.btn.upgrade:hover{background:#e69717}.btn.upgrade:hover.business{background:#802f60}.btn.available{background:#5cb85c;color:#fff}.btn.available:hover{background:#4cae4c}.btn.danger{background:#dd4141;color:#fff}.btn.danger:not(.disabled):hover{background:#d92b2b}.btn.primary{background:#333;color:#fff}.btn.caution{background:orange;color:#fff}.btn.caution:hover{background:#e69500}.btn.neutral{background:#888;color:#fff}.btn.neutral:not(.disabled):hover{background:#7b7b7b}.btn.control-btn{background:rgba(0,0,0,.5);border-color:rgba(230,230,230,.7);width:34px;height:34px;padding:9px 0 0;font-size:1em;margin-right:.2em;color:#fff}.btn.control-btn:hover{background:#111}.selected.template .btn.control-btn.template-select{background:#5cb85c}.btn.disabled{pointer-events:none;opacity:.5}.btn.create-new,.btn.create,.btn.cta{background:#2886b2;border:1px solid #17739d;color:#fff}@media(min-width: 520px){.btn{font-size:14px;padding:0 8px;line-height:28px;height:30px}}@media(min-width: 920px){.btn{padding:0 12px;line-height:34px;height:36px}}.upgrade-btn{position:relative}.upgrade-btn:after{display:block;width:20px;height:20px;border-radius:9999px;background-color:#eaa22d;border:2px solid #fff;content:"";font-family:FontAwesome;top:-8px;right:-8px;color:#fff;font-size:9px;box-sizing:border-box;position:absolute;line-height:16px;text-align:center}.upgrade-btn.business::after{background-color:#93366e}.dropdown-btn{font-size:14px;height:2em;border:1px solid #ccc;border-radius:3px;background-color:#eee;position:relative;display:inline-block;vertical-align:middle;margin-left:7px;z-index:102}.dropdown-btn:first-child{margin-left:0}.dropdown-btn .btn{border-radius:0;height:100%;line-height:1.75em;border:0;border-left:1px solid #ddd;font-size:inherit;background:none}.dropdown-btn .arrow{padding:0 .5em}.dropdown-btn .arrow i{margin-right:0}.dropdown-btn .options{position:absolute;right:0;top:2em;background:#fff;margin-top:5px;box-shadow:0 0 5px rgba(0,0,0,.3);line-height:initial}.dropdown-btn .options .option{position:relative;width:280px;border-top:1px solid #ccc;padding:.5em 1em .5em 3em;cursor:pointer}.dropdown-btn .options .option:first-child{border-top:none}.dropdown-btn .options .option .option-title{font-weight:bold}.dropdown-btn .options .option .option-description{font-size:.85em}.dropdown-btn .options .option .option-check{display:none;position:absolute;left:1.5em;top:50%;transform:translate(-50%, -50%)}.dropdown-btn .options .option.selected .option-check{display:block}.dropdown-btn .options .option:hover{background-color:#add8e6}.btn-group{font-size:14px;height:2em;border:1px solid #ccc;border-radius:3px;overflow:hidden;position:relative;display:inline-block;vertical-align:middle;margin-left:7px}.btn-group:first-child{margin-left:0}.btn-group .btn{border-radius:0;height:100%;line-height:1.75em;border:0;border-left:1px solid #ddd;font-size:inherit}.btn-group .btn:first-child{border:none}.btn-group.tabs:not(.can-stack){border:0;border-radius:0}.btn-group.tabs:not(.can-stack) .btn.tab{display:inline-block;border-top-right-radius:3px;border-top-left-radius:3px;border-bottom:none;padding-top:5px;line-height:1}.btn-group.tabs:not(.can-stack) .btn.tab:first-child{margin-left:0}.btn-group.can-stack{margin-left:0;height:auto}.btn-group.can-stack .btn{width:100%;border:0;padding:4px 8px 5px;height:auto;border-top:1px solid #ddd}.btn-group.can-stack .btn:first-child{border:none}.tab-buttons{white-space:nowrap;display:inline-block;margin:5px 0 0}.tab-buttons button{appearance:none;-webkit-appearance:none;box-shadow:none;border:none;margin:0;padding:0 8px;width:80px;height:20px;font-family:"Source Sans Pro";color:#777;background:#fff;border-radius:3px 0 0 3px}.tab-buttons button:not([disabled]):hover{opacity:1;color:#333}.tab-buttons button.active{background-color:#2886b2;font-weight:bold;color:#fff;cursor:default}.tab-buttons button.active:hover{opacity:1;color:#fff}.tab-buttons button:last-child{border-radius:0 3px 3px 0}.tab-panes{position:relative;overflow-x:hidden}.tab-pane{position:absolute;top:0;width:100%;height:100%;left:100vw;pointer-events:none}.tab-pane.active{left:0;pointer-events:auto}.check{width:16px;height:16px;display:inline-block;position:relative;vertical-align:middle;border-radius:4px;border:1px solid #ccc;cursor:pointer;overflow:hidden;font-family:helvetica,arial;text-align:center;margin:3px 10px;background:#428bca}.check:after{opacity:0;content:"";position:absolute;width:7px;height:4px;background:rgba(0,0,0,0);top:2px;left:2px;border:3px solid #fff;border-top:none;border-right:none;-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg)}.check:hover::after{opacity:.3}.check.selected:after{opacity:1}.toggle-single{cursor:pointer;padding:0 5px}.toggle-single input[type=checkbox]{display:none}.toggle-single input[type=checkbox]:checked+.toggle-label{opacity:1}.toggle-single .toggle-label{opacity:.4}.toggle-single:hover .toggle-label{opacity:1}.toggle-single:hover input[type=checkbox]:checked+.toggle-label{opacity:1}input[type=search]{border:1px solid #e1e1e1;border-radius:3px;font-size:14px;padding:7px 8px;margin:0}input[type=search]:focus{outline:0;border-color:#ababab}input::-webkit-search-cancel-button{-webkit-appearance:none}.slider-container input{width:0;height:0;opacity:0;margin:0;display:inline-block;vertical-align:top;font-size:0;line-height:0;position:absolute}.slider-container input:focus-visible+.slider:after{border:1px solid #777}.slider-container input:checked:focus-visible+.slider:after{border:1px solid #032a3c}.slider-container .slider{position:relative;cursor:pointer;display:inline-block;width:33px;height:30px;background:rgba(0,0,0,0);padding-left:0;padding-top:0}.slider-container .slider:hover:after{border-color:#bbb}.slider-container .slider:before{position:absolute;content:"";height:12px;width:33px;top:9px;left:0;border-radius:6px;background-color:#ddd;-webkit-transition:200ms;transition:200ms}.slider-container .slider:after{position:absolute;content:"";height:24px;width:24px;left:0;bottom:3px;border-radius:50%;background-color:#fff;border:1px solid #ddd;box-sizing:border-box;-webkit-transition:200ms;transition:200ms}.slider-container input:checked+.slider:before{background:#ccdee6}.slider-container input:checked+.slider:after{left:9px;background:#2886b2;border-color:#2886b2}.slider-container input:checked+.slider:hover:after{background-color:#2886b2;border-color:#2886b2}.slider-container.small input:checked+.slider:after{left:9px}.slider-container.small .slider{height:24px}.slider-container.small .slider:before{height:9px;width:27px;top:7px;left:0}.slider-container.small .slider:after{height:18px;width:18px;left:0;bottom:3px}input[type=url]{padding-right:30px}button.upload{width:30px;height:30px;background:#eee;position:absolute;bottom:0;left:100%;appearance:none;-webkit-appearance:none;border:none;outline:none;border-radius:0 3px 3px 0;font-size:18px;color:#999;margin-left:-35px;cursor:pointer}button.upload:hover{color:#777}.circle-icon{width:1.2em;height:1.2em;font-size:.8em;border-radius:50%;background:#000;color:#fff;display:inline-block;text-align:center;line-height:1.1em}.circle-icon i{font-size:.75em}.circle-icon:last-child{margin-right:0}.flourish-popup{pointer-events:none;z-index:111;font-size:13px;max-width:280px;line-height:1.2em}.flourish-popup-svg{pointer-events:none}.flourish-popup .popup-content-header,.popup .popup-content-header{display:block !important;font-size:1em;font-weight:bold}.flourish-popup .popup-content-body,.popup .popup-content-body{display:block !important;font-size:.9em}.popup .popup-content-wrapper{position:absolute;background:rgba(0,0,0,0);width:280px;height:auto;left:0;display:none;pointer-events:none;text-align:left}.popup .popup-content-outer{display:inline-block;padding-bottom:14px;background:rgba(0,0,0,0);pointer-events:auto;position:relative}.popup .popup-content-inner{pointer-events:auto;display:inline-block;width:auto;max-width:280px;background:#fff;color:#333;font-family:"Source Sans Pro";font-weight:normal;line-height:1.2em;font-size:13px;padding:10px;border-radius:3px;box-shadow:rgba(0,0,0,.2) 0 0 10px;text-align:left;user-select:text}.popup .popup-content-inner a{color:#2886b2}.popup .popup-content-inner pre{font-size:10px;background:#eee;border-radius:2px;user-select:all;padding:3px 0;white-space:pre-line}.popup .popup-content-arrow{position:absolute;width:10px;height:10px;display:block;bottom:4px}.popup .popup-content-arrow:before{content:"";display:block;width:0;height:0;border-left:5px solid rgba(0,0,0,0);border-right:5px solid rgba(0,0,0,0);border-top:5px solid #fff}.popup[data-popup-position=bottom] .popup-content-outer{padding-bottom:0;padding-top:8px}.popup[data-popup-position=bottom] .popup-content-arrow{top:4px}.popup[data-popup-position=bottom] .popup-content-arrow:before{bottom:auto;border-left:5px solid rgba(0,0,0,0);border-right:5px solid rgba(0,0,0,0);border-bottom:5px solid #fff;border-top:none}.dialog{position:fixed;width:100%;height:100%;top:0;left:0;background:rgba(255,255,255,.75);display:flex;align-items:center;justify-content:center}.dialog .dialog-inner{background:#fff;padding:36px 30px 30px;box-shadow:0 1px 4px rgba(0,0,0,.2);border-radius:3px;margin:20px;max-width:calc(100% - 40px);max-height:80vh;overflow:auto}.dialog .dialog-inner.loading-data{display:flex;flex-direction:column;align-items:center}.dialog .dialog-inner textarea{resize:vertical}.dialog .dialog-inner .loading-spinner{display:flex;justify-content:center}.dialog .dialog-inner .btns.loading{display:flex;justify-content:center}.dialog .dialog-inner img{width:100%;margin-top:12px}.dialog:focus{outline:none}.dialog,.detailed-settings .settings-block{z-index:113}.dialog .btn,.detailed-settings .settings-block .btn{margin-bottom:5px}.dialog .btn.secondary,.detailed-settings .settings-block .btn.secondary{background:none;text-decoration:underline;font-weight:normal}.dialog .btn.data-magic-primary,.detailed-settings .settings-block .btn.data-magic-primary{background:#2886b2;color:#fff}.dialog .btn.data-magic-secondary,.detailed-settings .settings-block .btn.data-magic-secondary{color:#989898;background:none;font-weight:400}.dialog .dialog-inner .text,.detailed-settings .settings-block .dialog-inner .text{margin-bottom:30px}.dialog .dialog-inner .text.loading,.detailed-settings .settings-block .dialog-inner .text.loading{display:flex;flex-direction:column;align-items:center}.dialog .dialog-inner .text h1,.detailed-settings .settings-block .dialog-inner .text h1{font-weight:bold;font-size:18px;margin-bottom:1rem}.dialog .dialog-inner .text h1 .import-ready,.detailed-settings .settings-block .dialog-inner .text h1 .import-ready{margin-right:10px}.dialog .dialog-inner .text h1 .file-name,.detailed-settings .settings-block .dialog-inner .text h1 .file-name{display:inline-block;font-weight:normal;overflow:hidden;text-overflow:ellipsis;max-width:100%}.dialog .dialog-inner .text h2,.detailed-settings .settings-block .dialog-inner .text h2{font-weight:600;font-size:16px;color:#333;margin:10px 0 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dialog .dialog-inner .text hr,.detailed-settings .settings-block .dialog-inner .text hr{margin:15px 0;opacity:.3}.dialog .dialog-inner .text p,.dialog .dialog-inner .text label,.dialog .dialog-inner .text details,.dialog .dialog-inner .text summary,.detailed-settings .settings-block .dialog-inner .text p,.detailed-settings .settings-block .dialog-inner .text label,.detailed-settings .settings-block .dialog-inner .text details,.detailed-settings .settings-block .dialog-inner .text summary{font-size:14px;line-height:1.25em;color:#777;margin-bottom:6px;position:relative}.dialog .dialog-inner .text p.alert,.dialog .dialog-inner .text label.alert,.dialog .dialog-inner .text details.alert,.dialog .dialog-inner .text summary.alert,.detailed-settings .settings-block .dialog-inner .text p.alert,.detailed-settings .settings-block .dialog-inner .text label.alert,.detailed-settings .settings-block .dialog-inner .text details.alert,.detailed-settings .settings-block .dialog-inner .text summary.alert{color:#c64c61;margin-top:.5em}.dialog .dialog-inner .text p.small,.dialog .dialog-inner .text label.small,.dialog .dialog-inner .text details.small,.dialog .dialog-inner .text summary.small,.detailed-settings .settings-block .dialog-inner .text p.small,.detailed-settings .settings-block .dialog-inner .text label.small,.detailed-settings .settings-block .dialog-inner .text details.small,.detailed-settings .settings-block .dialog-inner .text summary.small{font-size:14px;line-height:21px}.dialog .dialog-inner .text p.big,.dialog .dialog-inner .text label.big,.dialog .dialog-inner .text details.big,.dialog .dialog-inner .text summary.big,.detailed-settings .settings-block .dialog-inner .text p.big,.detailed-settings .settings-block .dialog-inner .text label.big,.detailed-settings .settings-block .dialog-inner .text details.big,.detailed-settings .settings-block .dialog-inner .text summary.big{color:#333}.dialog .dialog-inner .text p i.alert,.dialog .dialog-inner .text label i.alert,.dialog .dialog-inner .text details i.alert,.dialog .dialog-inner .text summary i.alert,.detailed-settings .settings-block .dialog-inner .text p i.alert,.detailed-settings .settings-block .dialog-inner .text label i.alert,.detailed-settings .settings-block .dialog-inner .text details i.alert,.detailed-settings .settings-block .dialog-inner .text summary i.alert{color:#c64c61;margin-right:5px}.dialog .dialog-inner .text p span.alert,.dialog .dialog-inner .text label span.alert,.dialog .dialog-inner .text details span.alert,.dialog .dialog-inner .text summary span.alert,.detailed-settings .settings-block .dialog-inner .text p span.alert,.detailed-settings .settings-block .dialog-inner .text label span.alert,.detailed-settings .settings-block .dialog-inner .text details span.alert,.detailed-settings .settings-block .dialog-inner .text summary span.alert{color:#c64c61}.dialog .dialog-inner .text p span.bold,.dialog .dialog-inner .text label span.bold,.dialog .dialog-inner .text details span.bold,.dialog .dialog-inner .text summary span.bold,.detailed-settings .settings-block .dialog-inner .text p span.bold,.detailed-settings .settings-block .dialog-inner .text label span.bold,.detailed-settings .settings-block .dialog-inner .text details span.bold,.detailed-settings .settings-block .dialog-inner .text summary span.bold{font-weight:bold}.dialog .dialog-inner .text .import-settings,.detailed-settings .settings-block .dialog-inner .text .import-settings{cursor:pointer;margin-top:1rem;margin-bottom:1rem}.dialog .dialog-inner .text .import-settings label,.detailed-settings .settings-block .dialog-inner .text .import-settings label{display:flex;font-size:.85em;font-weight:400}.dialog .dialog-inner .text details summary+p,.detailed-settings .settings-block .dialog-inner .text details summary+p{margin-top:.5em}.dialog .dialog-inner .text a,.detailed-settings .settings-block .dialog-inner .text a{text-decoration:underline}.dialog .dialog-inner .text a.canva-link,.detailed-settings .settings-block .dialog-inner .text a.canva-link{text-decoration:none}.dialog .dialog-inner .text textarea,.dialog .dialog-inner .text input,.dialog .dialog-inner .text select,.detailed-settings .settings-block .dialog-inner .text textarea,.detailed-settings .settings-block .dialog-inner .text input,.detailed-settings .settings-block .dialog-inner .text select{border-radius:3px;border:1px solid #ddd;width:100%;padding:.2em .1em .2em .3em;min-height:30px;font-size:13px;transition:200ms linear border}.dialog .dialog-inner .text textarea:focus,.dialog .dialog-inner .text input:focus,.dialog .dialog-inner .text select:focus,.detailed-settings .settings-block .dialog-inner .text textarea:focus,.detailed-settings .settings-block .dialog-inner .text input:focus,.detailed-settings .settings-block .dialog-inner .text select:focus{border:1px solid #777}.dialog .dialog-inner .text textarea.narrow,.dialog .dialog-inner .text input.narrow,.dialog .dialog-inner .text select.narrow,.detailed-settings .settings-block .dialog-inner .text textarea.narrow,.detailed-settings .settings-block .dialog-inner .text input.narrow,.detailed-settings .settings-block .dialog-inner .text select.narrow{width:50px;margin-right:1em}.dialog .dialog-inner .text textarea.medium,.dialog .dialog-inner .text input.medium,.dialog .dialog-inner .text select.medium,.detailed-settings .settings-block .dialog-inner .text textarea.medium,.detailed-settings .settings-block .dialog-inner .text input.medium,.detailed-settings .settings-block .dialog-inner .text select.medium{width:200px}.dialog .dialog-inner .text progress,.detailed-settings .settings-block .dialog-inner .text progress{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%;height:20px;border:none;overflow:hidden;border-radius:10px;background:#eee}.dialog .dialog-inner .text progress::-webkit-progress-bar,.detailed-settings .settings-block .dialog-inner .text progress::-webkit-progress-bar{border:none;border-radius:10px;background:#eee;overflow:hidden}.dialog .dialog-inner .text progress::-webkit-progress-value,.detailed-settings .settings-block .dialog-inner .text progress::-webkit-progress-value{border:none;background-color:#2886b2}.dialog .dialog-inner .text progress::-moz-progress-bar,.detailed-settings .settings-block .dialog-inner .text progress::-moz-progress-bar{border:none;background-color:#2886b2}.dialog .dialog-inner .text table,.detailed-settings .settings-block .dialog-inner .text table{border:1px solid #ddd;width:100%;border-collapse:collapse}.dialog .dialog-inner .text table td,.detailed-settings .settings-block .dialog-inner .text table td{border:1px solid #ddd;padding:2px 4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;height:26px;max-width:170px}.dialog .dialog-inner .text select,.detailed-settings .settings-block .dialog-inner .text select{outline:none}.dialog .dialog-inner .text ul.plain,.detailed-settings .settings-block .dialog-inner .text ul.plain{list-style:none;padding:0}.dialog .dialog-inner .text ul.plain li,.detailed-settings .settings-block .dialog-inner .text ul.plain li{padding:0}.dialog .dialog-inner .text label:first-child,.detailed-settings .settings-block .dialog-inner .text label:first-child{display:inline-block}.dialog .dialog-inner .text label:first-child:last-child,.detailed-settings .settings-block .dialog-inner .text label:first-child:last-child{width:100%}.dialog .dialog-inner .text input[type=number],.detailed-settings .settings-block .dialog-inner .text input[type=number]{width:90px}.dialog .dialog-inner .text input[type=checkbox],.dialog .dialog-inner .text input[type=radio],.detailed-settings .settings-block .dialog-inner .text input[type=checkbox],.detailed-settings .settings-block .dialog-inner .text input[type=radio]{width:auto;margin-right:.4em;min-height:auto}.dialog .dialog-inner .text textarea,.detailed-settings .settings-block .dialog-inner .text textarea{padding:.1em;height:5em}.dialog .dialog-inner .text textarea.code,.detailed-settings .settings-block .dialog-inner .text textarea.code{font-family:monospace;font-size:.8em;height:7em}.dialog .dialog-inner .text input[type=text][disabled],.detailed-settings .settings-block .dialog-inner .text input[type=text][disabled]{opacity:.5}.dialog .dialog-inner .text label,.detailed-settings .settings-block .dialog-inner .text label{display:inline-block;font-weight:600;color:#333;margin:.5em .5em .25em 0}.dialog .dialog-inner .text label.narrow,.detailed-settings .settings-block .dialog-inner .text label.narrow{width:50px}.dialog .dialog-inner .text label span,.detailed-settings .settings-block .dialog-inner .text label span{display:inline-block;color:#999;font-size:.85em;font-weight:500;line-height:1.2;padding-left:22px}.dialog .dialog-inner .text label select,.detailed-settings .settings-block .dialog-inner .text label select{width:auto}.dialog .dialog-inner .text label.indented,.detailed-settings .settings-block .dialog-inner .text label.indented{display:block;padding-left:22px;width:100%;position:relative}.dialog .dialog-inner .text label.indented input:first-child,.detailed-settings .settings-block .dialog-inner .text label.indented input:first-child{position:absolute;top:0;left:0}.dialog .dialog-inner .text figure,.detailed-settings .settings-block .dialog-inner .text figure{max-width:100%;max-height:120px;overflow:hidden}.dialog .dialog-inner .text figure img,.detailed-settings .settings-block .dialog-inner .text figure img{width:100%;height:100%;object-fit:contain}.dialog .dialog-inner .text .collapsed,.detailed-settings .settings-block .dialog-inner .text .collapsed{display:none}.dialog .dialog-inner .text button[name=toggle-collapse],.detailed-settings .settings-block .dialog-inner .text button[name=toggle-collapse]{-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;appearance:none;border:none;background:rgba(0,0,0,0);outline:none;font:inherit;padding:.5em 0}.dialog .dialog-inner .text .columns,.detailed-settings .settings-block .dialog-inner .text .columns{display:flex;align-items:flex-start;justify-content:flex-start;padding-bottom:16px}.dialog .dialog-inner .text .columns>div,.detailed-settings .settings-block .dialog-inner .text .columns>div{width:50%;padding-right:10px;overflow:hidden}.dialog .dialog-inner .text .columns>div>*,.detailed-settings .settings-block .dialog-inner .text .columns>div>*{max-width:100%}.dialog .dialog-inner .text button.upload,.detailed-settings .settings-block .dialog-inner .text button.upload{margin-left:-30px;height:25px;bottom:6px}.dialog .dialog-inner .upgrade,.detailed-settings .settings-block .dialog-inner .upgrade{margin:0 -30px -30px;padding:30px 30px 30px;background:#eaa22d;color:#fff}.dialog .dialog-inner .upgrade p,.detailed-settings .settings-block .dialog-inner .upgrade p{color:#fff}.dialog .dialog-inner .upgrade ul,.detailed-settings .settings-block .dialog-inner .upgrade ul{padding:0}.dialog .dialog-inner .upgrade ul li,.detailed-settings .settings-block .dialog-inner .upgrade ul li{margin-bottom:9px;list-style:none;padding-left:20px;position:relative}.dialog .dialog-inner .upgrade ul li i,.detailed-settings .settings-block .dialog-inner .upgrade ul li i{position:absolute;left:0;top:3px}.dialog .dialog-inner .upgrade .btn.convert,.detailed-settings .settings-block .dialog-inner .upgrade .btn.convert{background:#fff;color:#eaa22d}.dialog .dialog-inner .upgrade.business,.detailed-settings .settings-block .dialog-inner .upgrade.business{background-color:#93366e}.dialog .dialog-inner .upgrade.business .btn.convert,.detailed-settings .settings-block .dialog-inner .upgrade.business .btn.convert{color:#93366e}.dialog .mini-spreadsheet,.detailed-settings .settings-block .mini-spreadsheet{margin-top:10px}.hide-unpublished{display:none}body.published .hide-published{display:none}body.published .hide-unpublished{display:initial}.svg-defs{display:none}.empty-label{font-size:16px;font-weight:bold;color:#aaa;z-index:1;position:relative;width:80%;margin:0 auto}.empty-details{margin-top:.5em;color:#888}.empty-details:empty{margin:0}@media(min-width: 420px){.empty-label{font-size:18px}}.button-radio-group input,.hidden-radio-group input{opacity:0;position:absolute;pointer-events:none}.button-radio-group label,.hidden-radio-group label{cursor:pointer}.button-radio-group{display:flex;flex-wrap:wrap;gap:8px}@media(min-width: 820px){.button-radio-group{gap:4px}}.button-radio-group label{background:#fff;border:1px solid #e1e1e1;border-radius:43px;display:inline-block;padding:4px 6px;min-width:40px;text-align:center;transition:border-color 100ms;white-space:nowrap}.button-radio-group label:hover{border-color:#c8c8c8}@media(min-width: 820px)and (max-width: 1219px){.button-radio-group label{font-size:14px}}.button-radio-group input:checked+label{background:#007cad;border-color:#007cad;color:#fff}input[type=search],input[type=text],textarea{border:1px solid #e1e1e1;border-radius:3px;font-size:14px;padding:7px 8px;margin:0}input[type=search]:focus,input[type=text]:focus,textarea:focus{outline:0;border-color:#ababab}input[type=search]::-webkit-search-cancel-button,input[type=text]::-webkit-search-cancel-button,textarea::-webkit-search-cancel-button{-webkit-appearance:none}.loading-spinner{animation-name:spin;animation-duration:1.2s;animation-iteration-count:infinite;animation-timing-function:linear;transform-origin:center center}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.mobile-only{display:auto}@media(min-width: 820px){.mobile-only{display:none !important}}#sdk-tag{font-size:14px;margin-top:23px;display:inline-block;opacity:.2;font-weight:bold;position:absolute}@media(min-width: 420px){#sdk-tag{margin-top:33px}}.row.header{position:relative;top:0;background:#fff;border-bottom:1px solid #ccc;height:49px}.row.header #back-to-projects{width:48px;height:100%;border-right:1px solid #eee;display:block;text-align:center;padding-top:12px;font-size:19px}.row.header #back-to-projects.bosh img{width:20px}@media(min-width: 420px){.row.header #back-to-projects{font-size:21px;padding-top:16px;width:60px}}.row.header .row-inner{height:100%;padding-top:1px;padding-left:20px}.row.header .row-inner:after{clear:both;content:""}.row.header .menu-holder{width:auto;height:100%;display:inline-block;text-align:left;vertical-align:bottom;float:right}.row.header .hamburger{margin-top:6px}.row.header .logo{margin:6px 0 0;display:block;float:left;width:100px}.row.header .logo img{width:100px}.row.header .dropdown{margin-right:0;max-width:300px;position:absolute;right:20px}.row.header .mobile-nav{display:none}.row.header .mobile-nav .fa-bars{font-size:1.5em}.row.header .desktop-nav{padding-top:0}.row.header .user-settings{margin-top:10px;padding:5px 0 5px 40px;position:relative}.row.header .unsubscribed .user-settings{padding:0 0 0 40px}@media screen and (max-width: 819px){.row.header .desktop-nav{display:none}.row.header .mobile-nav{display:block}.row.header .menu-holder:hover{text-align:right}.row.header .menu-holder:hover .menu{display:block;position:fixed;padding:10px;background:#fff;top:40px;right:0;box-shadow:3px 3px 5px rgba(0,0,0,.1);border:1px solid rgba(0,0,0,.1)}.row.header .menu-holder:hover .menu .menu-item{display:block;padding:6px 0;color:#333;margin-right:0;font-size:14px;text-align:left}.row.header .menu-holder:hover .menu #sign-in .btn{background:#eee;font-size:14px;margin-top:12px}}@media(min-width: 420px){.row.header{height:61px}.row.header .logo{margin-top:10px;width:120px}.row.header .logo img{width:120px}.row.header .hamburger{margin-top:14px}}@media(min-width: 820px){.row.header .menu-holder{width:430px}.row.header.not-logged-in .menu-holder{width:580px}.row.header #sign-in{position:absolute;right:20px;top:0}.row.header #sign-in .btn{margin-top:12px;background-color:#eee}.row.header #sign-in a{display:block}}@media(min-width: 1020px){.row.header.not-logged-in .row-inner{max-width:1220px}}.row.header.app-showcase .sign-in{position:absolute;top:8px;right:20px;height:32px;font-size:14px;padding-top:.3em;line-height:1.4em}@media(min-width: 420px){.row.header.app-showcase .sign-in{top:12px;height:40px;font-size:16px;padding-top:.45em}}.is-static .row.header,.not-logged-in .row.header{background:rgba(0,0,0,0);box-shadow:none;z-index:3;border-color:rgba(0,0,0,0)}.is-static .row.header .row-inner,.not-logged-in .row.header .row-inner{display:block;position:relative}.is-static .row.header .row-inner:after,.not-logged-in .row.header .row-inner:after{border-bottom:1px solid rgba(255,255,255,.1);content:"";display:block;position:absolute;bottom:0;left:20px;right:20px}.is-static .row.header .menu-holder,.is-static .row.header .menu-holder:hover,.not-logged-in .row.header .menu-holder,.not-logged-in .row.header .menu-holder:hover{display:inline-block;width:calc(100% - 150px);text-align:right}.is-static .row.header .menu-holder .menu,.is-static .row.header .menu-holder:hover .menu,.not-logged-in .row.header .menu-holder .menu,.not-logged-in .row.header .menu-holder:hover .menu{min-width:150px;position:absolute;right:20px;top:36px;padding:10px 20px}.is-static .row.header .menu-holder .menu h1,.is-static .row.header .menu-holder:hover .menu h1,.not-logged-in .row.header .menu-holder .menu h1,.not-logged-in .row.header .menu-holder:hover .menu h1{font-weight:600}.is-static .row.header .menu-holder .menu .menu-item,.is-static .row.header .menu-holder:hover .menu .menu-item,.not-logged-in .row.header .menu-holder .menu .menu-item,.not-logged-in .row.header .menu-holder:hover .menu .menu-item{font-size:16px;vertical-align:middle;border-color:rgba(0,0,0,0);margin-top:.5em}@media(min-width: 820px){.is-static .row.header .menu-holder .menu .menu-item,.is-static .row.header .menu-holder:hover .menu .menu-item,.not-logged-in .row.header .menu-holder .menu .menu-item,.not-logged-in .row.header .menu-holder:hover .menu .menu-item{color:#fff;margin:1em .4em}}@media(min-width: 1020px){.is-static .row.header .menu-holder .menu .menu-item,.is-static .row.header .menu-holder:hover .menu .menu-item,.not-logged-in .row.header .menu-holder .menu .menu-item,.not-logged-in .row.header .menu-holder:hover .menu .menu-item{margin:1em .75em}}@media(min-width: 420px){.is-static .row.header .menu-holder .menu,.is-static .row.header .menu-holder:hover .menu,.not-logged-in .row.header .menu-holder .menu,.not-logged-in .row.header .menu-holder:hover .menu{top:42px}}@media(min-width: 820px){.is-static .row.header .menu-holder .menu,.is-static .row.header .menu-holder:hover .menu,.not-logged-in .row.header .menu-holder .menu,.not-logged-in .row.header .menu-holder:hover .menu{top:0;padding:0;width:calc(100% - 140px)}.is-static .row.header .menu-holder .menu .sub-menu,.is-static .row.header .menu-holder:hover .menu .sub-menu,.not-logged-in .row.header .menu-holder .menu .sub-menu,.not-logged-in .row.header .menu-holder:hover .menu .sub-menu{display:inline-block;vertical-align:middle;padding-top:6px}.is-static .row.header .menu-holder .menu .sub-menu#main-menu,.is-static .row.header .menu-holder:hover .menu .sub-menu#main-menu,.not-logged-in .row.header .menu-holder .menu .sub-menu#main-menu,.not-logged-in .row.header .menu-holder:hover .menu .sub-menu#main-menu{width:calc(100% - 340px);text-align:left}}@media(min-width: 820px)and (min-width: 1020px){.is-static .row.header .menu-holder .menu .sub-menu#main-menu,.is-static .row.header .menu-holder:hover .menu .sub-menu#main-menu,.not-logged-in .row.header .menu-holder .menu .sub-menu#main-menu,.not-logged-in .row.header .menu-holder:hover .menu .sub-menu#main-menu{text-align:center}}@media(min-width: 820px){.is-static .row.header .menu-holder .menu .sub-menu h1,.is-static .row.header .menu-holder:hover .menu .sub-menu h1,.not-logged-in .row.header .menu-holder .menu .sub-menu h1,.not-logged-in .row.header .menu-holder:hover .menu .sub-menu h1{font-size:18px;padding-top:4px;font-weight:bold}}@media(min-width: 820px){.is-static .row.header .menu-holder .menu .sub-menu h2,.is-static .row.header .menu-holder:hover .menu .sub-menu h2,.not-logged-in .row.header .menu-holder .menu .sub-menu h2,.not-logged-in .row.header .menu-holder:hover .menu .sub-menu h2{font-size:11px;padding-top:9px;text-transform:uppercase;letter-spacing:1px}}@media(min-width: 1020px){.is-static .row.header .menu-holder .menu .sub-menu#main-menu,.is-static .row.header .menu-holder:hover .menu .sub-menu#main-menu,.not-logged-in .row.header .menu-holder .menu .sub-menu#main-menu,.not-logged-in .row.header .menu-holder:hover .menu .sub-menu#main-menu{width:calc(100% - 450px)}}.is-static .row.header .mobile-nav .fa-bars,.not-logged-in .row.header .mobile-nav .fa-bars{color:#fff;font-size:1em}#current-picture{display:inline-block;width:32px;height:32px;background:#eee;border-radius:16px;background-size:cover;background-position:center center;flex-shrink:0}.show-username{display:flex;align-items:center}.show-username div{display:flex;flex-direction:column;justify-content:center;padding-left:8px;max-width:200px}.badge{text-align:center;border-radius:12px;font-weight:600;font-size:12px;line-height:1;padding:4px 5px;min-width:20px;margin-left:8px;color:#666;background:#ddd;display:inline-block;position:relative}.badge.reviewer{color:#fff;background:#00a4ce}#user-menu{z-index:99}#user-menu+.badge{position:absolute;top:24px}#current-name{margin:0;font-weight:bold;font-size:16px;white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}#upgrade-link{font-size:12px;opacity:.7;text-align:left;line-height:1em}#create-menu i{background:#fff;color:#ff465d;height:18px;width:18px;border-radius:9999px;font-size:12px;vertical-align:middle;padding-top:4px;margin-right:5px}#create-menu .btn{position:relative}#create-menu .btn-bg{position:absolute;right:0;top:6px;opacity:.2;font-size:24px}@media(min-width: 820px){#create-menu{margin-top:10px}#create-menu .menu-item{background:#ff465d;transition:background 200ms;color:#fff;padding:7px 18px 7px 12px;font-size:16px;font-weight:bold;height:36px;margin-right:10px}#create-menu .menu-item:hover{background:#9a2d44}}#mobile-menu{min-width:180px}#mobile-menu .dropdown-label{padding:.4em 1.3em;font-weight:normal}.dropdown-modal-container{position:relative;display:inline-block;z-index:2;color:rgba(0,0,0,.6)}.dropdown-modal-container.open .dropdown-modal{display:block}.dropdown-modal-container.open .export-clickarea{display:block}.dropdown-modal-container button{font-family:"Source Sans Pro",sans-serif}.dropdown-modal-container .export-clickarea{position:fixed;top:0;left:0;width:100%;height:100%;z-index:0;display:none}.dropdown-modal-container .dropdown-modal{position:absolute;background:#fff;box-shadow:0 4px 10px rgba(0,0,0,.2);right:0;top:calc(100% + 5px);width:300px;border-radius:3px;display:none}.dropdown-modal-container .dropdown-modal h3{font-size:16px;color:#333;font-weight:bold;margin-bottom:10px;display:inline-block}.dropdown-modal-container .dropdown-modal h3 .try-again{font-weight:normal;font-size:14px;display:block}@media(min-width: 820px){.dropdown-modal-container{width:auto}.dropdown-modal-container .dropdown-modal{width:340px;top:calc(100% + 5px)}}.company-sharing-autocomplete{position:relative;margin-bottom:10px}.sharing-permissions-container{display:flex;align-items:center}#sharing-permissions{background:none;border:none}#sharing-permissions i{cursor:pointer}.sharing-dropdown{padding:10px}@media(min-width: 820px){.sharing-dropdown{padding:20px 25px}}.sharing-dropdown input[type=text]{width:100%;border:1px solid #dee8da;border-radius:3px;padding:12px 30px 12px 12px;cursor:pointer;font-size:14px}.sharing-dropdown input[type=text]+.fa{position:absolute;right:10px;top:17px;font-size:14px;pointer-events:none}.sharing-dropdown .dropdown-list{font-size:14px}header{display:block;position:absolute;top:0;left:0;width:100%}main{display:block;position:absolute;top:80px;left:0;width:100%;height:calc(100vh - 80px);overflow-y:auto}@media(min-width: 420px){main{top:91px;height:calc(100vh - 91px)}}.user-nav{padding-top:0;display:none}@media(min-width: 820px){.user-nav{display:block;height:36px}.user-nav .dropdown-head #current-picture{height:36px;width:36px;border-radius:9999px;margin-left:10px}.user-nav .dropdown-list{left:auto;right:-5px;margin-top:-5px}}.visualisation-editor{overflow-x:hidden}.visualisation-editor .template-chooser.visible+.tab-panes{display:none}.visualisation-editor .tab-panes{height:100%;width:100%}.visualisation-editor .tab-panes .tab-pane,.visualisation-editor .tab-panes .row.editor,.visualisation-editor .tab-panes .row-inner,.visualisation-editor .tab-panes #visualisation{height:100%}.visualisation-editor .tab-panes .tab-pane .editor-core,.visualisation-editor .tab-panes .row.editor .editor-core,.visualisation-editor .tab-panes .row-inner .editor-core,.visualisation-editor .tab-panes #visualisation .editor-core{position:relative}@media(min-width: 820px){.visualisation-editor .tab-panes .tab-pane .editor-core,.visualisation-editor .tab-panes .row.editor .editor-core,.visualisation-editor .tab-panes .row-inner .editor-core,.visualisation-editor .tab-panes #visualisation .editor-core{min-height:100%;padding-bottom:40px}}.visualisation-editor .tab-panes .tab-pane .side-panel{display:none}.visualisation-editor .tab-panes .tab-pane.active .side-panel{display:block}.visualisation-editor .tab-panes .tab-pane:not(.active) #spreadsheet-container input{display:none}.story-editor,.visualisation-editor{background:#f9f9f9}.row.editor{padding:0;height:100%}.no-template .row.editor{display:none}.row.editor .row-inner{max-width:none;padding:0 10px;height:100%}.row.editor #visibility-status .label,.row.editor .blueprint-tag{display:inline-block;margin-left:2px}.row.editor #visualisation,.row.editor #story{height:100%;width:100%;transition:height .5s ease;position:relative}.row.editor #visualisation .editor-core,.row.editor #story .editor-core{width:100%;height:auto;overflow:visible;transition:width .5s ease;position:relative;text-align:center}.row.editor #visualisation .editor-core .preview-holder,.row.editor #story .editor-core .preview-holder{width:100%;height:100%;padding-right:4px;min-width:100px;max-width:800px;min-height:100px;transition:margin-left .5s ease,width .5s ease,opacity 1s;position:relative;background:#fff;display:inline-block;box-shadow:0 0 2px rgba(0,0,0,.2)}.row.editor #visualisation .editor-core .preview-holder #preview,.row.editor #story .editor-core .preview-holder #preview{height:100%;max-height:100%;overflow-y:auto;min-width:100px}.row.editor #visualisation .editor-core .preview-holder #preview,.row.editor #story .editor-core .preview-holder #preview{text-align:right;border:none;background:rgba(0,0,0,0);display:block;width:100%;height:100%}.row.editor #visualisation .editor-core .preview-holder #preview iframe,.row.editor #story .editor-core .preview-holder #preview iframe{width:100vw;border:none;position:relative;display:block}.row.editor #visualisation .editor-core .preview-holder #preview #blank-slide,.row.editor #visualisation .editor-core .preview-holder #preview iframe,.row.editor #story .editor-core .preview-holder #preview #blank-slide,.row.editor #story .editor-core .preview-holder #preview iframe{height:100%;width:100%;min-width:100px;border:none;flex:1}.row.editor #visualisation .editor-core .preview-holder .loading-spinner,.row.editor #story .editor-core .preview-holder .loading-spinner{position:absolute;left:50%;top:50%;width:27px;height:27px;opacity:0;pointer-events:none;z-index:5;margin-top:-13.5px;margin-left:-13.5px}.row.editor #visualisation .editor-core .preview-holder .unsupported-notice,.row.editor #story .editor-core .preview-holder .unsupported-notice{position:absolute;top:0;left:0;right:0;bottom:0;background-color:#f9f9f9;padding:20px;z-index:10}.row.editor #visualisation .editor-core #resize-overlay,.row.editor #story .editor-core #resize-overlay{position:absolute;top:0;left:0;width:100%;height:100%;display:none}.row.editor #visualisation .editor-core #resize-overlay.dragging,.row.editor #story .editor-core #resize-overlay.dragging{display:block}.row.editor #visualisation .editor-core #resize-handle-container,.row.editor #story .editor-core #resize-handle-container{position:absolute;width:4px;bottom:0;top:0;right:0;margin-bottom:0;display:none;z-index:100;transition:width 200ms}.row.editor #visualisation .editor-core #resize-handle-container #resize-handle,.row.editor #story .editor-core #resize-handle-container #resize-handle{cursor:ew-resize;position:absolute;width:4px;bottom:0;top:0;right:0;background:#eee;transition:width 100ms,background 100ms}.row.editor #visualisation .editor-core #resize-handle-container #resize-handle:after,.row.editor #story .editor-core #resize-handle-container #resize-handle:after{display:block;content:"";position:absolute;top:0;bottom:0;left:-4px;background:rgba(0,0,0,0);right:0;width:auto}.row.editor #visualisation .editor-core #resize-handle-container .resize-handle-icon,.row.editor #story .editor-core #resize-handle-container .resize-handle-icon{position:absolute;right:3px;top:50%;margin-top:-15px;opacity:.8;pointer-events:none;transition:right 100ms;display:none}.row.editor #visualisation .editor-core #resize-handle-container>i,.row.editor #story .editor-core #resize-handle-container>i{position:absolute;top:5px;left:5px}.row.editor #visualisation .editor-core #resize-handle-container:hover,.row.editor #story .editor-core #resize-handle-container:hover{width:6px}.row.editor #visualisation .editor-core #resize-handle-container:hover #resize-handle,.row.editor #story .editor-core #resize-handle-container:hover #resize-handle{width:6px;background:#ddd}.row.editor #visualisation .editor-core #resize-handle-container:hover #resize-handle:after,.row.editor #story .editor-core #resize-handle-container:hover #resize-handle:after{left:-10px}.row.editor #visualisation .editor-core #resize-handle-container:hover .resize-handle-icon,.row.editor #story .editor-core #resize-handle-container:hover .resize-handle-icon{right:2px;display:block}.row.editor #visualisation .editor-core #resize-handle-container.dragging #resize-handle:after,.row.editor #story .editor-core #resize-handle-container.dragging #resize-handle:after{left:-200px;right:0}@media(min-width: 770px){.row.editor #visualisation .editor-core,.row.editor #story .editor-core{padding:0}.row.editor #visualisation .editor-core #resize-handle-container,.row.editor #story .editor-core #resize-handle-container{display:block}}@media(min-width: 820px){.row.editor #visualisation .editor-core,.row.editor #story .editor-core{padding:0 10px 0 0}}.row.editor #visualisation{padding:10px 0 0}.row.editor #visualisation .editor-core .preview-holder iframe#preview{transform-origin:left top}.row.editor #visualisation .editor-core .preview-holder iframe#preview.mini-preview{z-index:1000;box-shadow:none;overflow:hidden;pointer-events:none}@media(min-width: 820px){.row.editor #visualisation .editor-core .preview-holder iframe#preview{width:100%}}.row.editor #story .editor-core .preview-holder #preview iframe{height:calc(100% - 64px)}.row.editor #story .editor-core .preview-holder #preview.nav-style-none iframe{height:100%}@media(min-width: 820px){.row.editor #story .editor-core{max-width:calc(100% - 220px);margin-left:220px;min-height:calc(100vh - 94px)}}.row.editor.mobile #visualisation .editor-core .preview-holder,.row.editor.mobile #story .editor-core .preview-holder{width:320px}.row.editor.mobile #visualisation .editor-core .preview-holder iframe,.row.editor.mobile #story .editor-core .preview-holder iframe{width:320px}.row.editor.mobile.landscape #visualisation .editor-core .preview-holder,.row.editor.mobile.landscape #story .editor-core .preview-holder{width:500px}.row.editor.mobile.landscape #visualisation .editor-core .preview-holder iframe,.row.editor.mobile.landscape #story .editor-core .preview-holder iframe{width:500px}.row.editor.tablet #visualisation .editor-core .preview-holder,.row.editor.tablet #story .editor-core .preview-holder{width:768px}.row.editor.tablet #visualisation .editor-core .preview-holder iframe,.row.editor.tablet #story .editor-core .preview-holder iframe{width:768px}.row.editor.tablet.landscape #visualisation .editor-core .preview-holder,.row.editor.tablet.landscape #story .editor-core .preview-holder{width:1024px}.row.editor.tablet.landscape #visualisation .editor-core .preview-holder iframe,.row.editor.tablet.landscape #story .editor-core .preview-holder iframe{width:1024px}@media(min-width: 820px){.row.editor #visualisation .editor-core{max-width:calc(100% - 350px)}}.row.project-header{display:flex;gap:10px;z-index:110}.row.project-header .user-settings{margin-top:0;padding:0}.row.project-header .dropdown{position:relative;right:unset}.row.project-header #visibility-status,.row.project-header .read-only,.row.project-header .blueprint-tag{text-align:left;height:auto;line-height:1em;display:inline-block;border-radius:3px;vertical-align:top}@media(min-width: 420px){.row.project-header #visibility-status,.row.project-header .read-only,.row.project-header .blueprint-tag{font-size:11px;padding:2px 3px 1px}}.row.project-header #visibility-status{cursor:pointer}.row.project-header #visibility-status:hover{color:#333}.row.project-header #visibility-status,.row.project-header .read-only{color:#aaa;font-weight:normal;padding:1px 3px 2px;background:#eee}.row.project-header #visibility-status.public,.row.project-header .read-only.public{background:#ffdc98;color:#000}.row.project-header #visibility-status.public:hover,.row.project-header .read-only.public:hover{background:#eec26d;color:#000}.row.project-header .blueprint-tag{font-size:9px;font-weight:bold;background:#2886b2;color:#fff;text-transform:uppercase;padding:1px 5px 2px;cursor:default}.row.project-header .project-settings{margin-left:10px;font-size:14px;font-weight:normal;line-height:0;vertical-align:top;display:inline-block;z-index:110;height:auto;padding-top:0}.row.project-header .project-settings .dropdown-head{padding-right:5px;padding-left:5px;padding-bottom:0;padding-top:2px;font-size:14px}.row.project-header .project-settings .dropdown-list{margin-right:0}.row.project-header .has-name+.project-settings{margin-left:0}.row.project-header .tags,.row.project-header .project-author>span{overflow-x:clip;text-overflow:ellipsis}.row.project-header .project-info,.row.project-header .tags{flex:1;min-width:0}.row.project-header .project-info{display:flex;flex-direction:column;justify-content:center;gap:.15rem}.row.project-header .tags{max-width:fit-content}.row.project-header #project-info-name{display:flex}.row.project-header .name{position:relative;margin-left:0;width:auto;font-size:14px;z-index:110}@media(min-width: 620px){.row.project-header .name{font-size:16px}}.row.project-header .name input{font-size:1em;font-size:inherit;border:none;border-bottom:1px solid #ccc;border-radius:0;background:#fff;padding:0;display:inline-block;color:#aaa;position:absolute;left:0;top:0;box-sizing:content-box;outline:none;height:15px}@media(min-width: 420px){.row.project-header .name input{height:18px}}.row.project-header .name .name-width-setter{font-size:inherit;padding:0;display:inline-block;opacity:0;pointer-events:none;max-width:100px;min-width:40px;white-space:pre}@media(min-width: 420px){.row.project-header .name .name-width-setter{max-width:190px}}@media(min-width: 620px){.row.project-header .name .name-width-setter{max-width:340px}}@media(min-width: 820px){.row.project-header .name .name-width-setter{max-width:340px}}.row.project-header .name.has-name input,.row.project-header .name.has-name .name-width-setter{font-style:normal;background:none}.row.project-header .name.has-name input{color:#333;border-color:#ccc;top:0}.row.project-header .name.has-name .name-overlay{display:block;top:0}.row.project-header .name.not-editable input,.row.project-header .name.not-editable .name-width-setter{font-style:normal;background:rgba(0,0,0,0)}.row.project-header .name.not-editable input{border-color:rgba(0,0,0,0);color:#333;top:0}.row.project-header .name .name-overlay{display:none;content:"";position:absolute;left:85px;top:0;width:20px;height:100%;background:linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgb(255, 255, 255) 80%)}@media(min-width: 420px){.row.project-header .name .name-overlay{left:175px}}@media(min-width: 620px){.row.project-header .name .name-overlay{left:325px}}@media(min-width: 820px){.row.project-header .name .name-overlay{left:325px}}.row.project-header .project-author{color:#aaa;font-weight:normal;font-size:11px;line-height:1em;display:flex;align-items:center;gap:.5em;white-space:nowrap}@media(min-width: 420px){.row.project-header .project-author{font-size:12px}}@media(min-width: 820px){.row.project-header .project-author{font-size:12px}}.row.project-header .project-author+.dropdown .dropdown-head{display:inline-block}.row.project-header .project-author+.dropdown .badge{top:-14px}.row.project-header .project-author+.dropdown .dropdown-list .badge{position:absolute;right:10px;top:12px;pointer-events:none}.row.project-header .export-user-group{display:flex;align-items:center;padding-right:10px}.row.project-header #export-btn-group{display:flex;margin-bottom:0;margin-right:0}.row.project-header #export-btn-group .export-btn,.row.project-header #export-btn-group #story-btn,.row.project-header #export-btn-group #sharing-permissions,.row.project-header #export-btn-group #story-preview-btn{width:30px;height:30px;padding:0 0;display:flex;gap:8px;align-items:center;font-weight:normal;justify-content:center}.row.project-header #export-btn-group .export-btn span,.row.project-header #export-btn-group #story-btn span,.row.project-header #export-btn-group #sharing-permissions span,.row.project-header #export-btn-group #story-preview-btn span{display:none}.row.project-header #export-btn-group .export-btn img,.row.project-header #export-btn-group #story-btn img,.row.project-header #export-btn-group #sharing-permissions img,.row.project-header #export-btn-group #story-preview-btn img{margin-right:0;height:18px;width:18px}@media(min-width: 420px){.row.project-header #export-btn-group .export-btn,.row.project-header #export-btn-group #story-btn,.row.project-header #export-btn-group #sharing-permissions,.row.project-header #export-btn-group #story-preview-btn{width:30px;height:30px}}@media(min-width: 820px){.row.project-header #export-btn-group .export-btn,.row.project-header #export-btn-group #story-btn,.row.project-header #export-btn-group #sharing-permissions,.row.project-header #export-btn-group #story-preview-btn{padding:0 10px;height:36px;width:auto}.row.project-header #export-btn-group .export-btn span,.row.project-header #export-btn-group #story-btn span,.row.project-header #export-btn-group #sharing-permissions span,.row.project-header #export-btn-group #story-preview-btn span{display:inline}.row.project-header #export-btn-group .export-btn img,.row.project-header #export-btn-group #story-btn img,.row.project-header #export-btn-group #sharing-permissions img,.row.project-header #export-btn-group #story-preview-btn img{width:21px;height:21px}}.row.project-header #export-btn-group #create-btn{height:36px;line-height:34px}.visualisation-editor.no-template .row.project-header #export-btn-group{display:none}.row.project-header #export-btn-group #story-btn-form{display:inline-block}.row.project-header #export-btn-group #story-btn-form.disabled{cursor:not-allowed}.row.project-header #export-btn-group #story-btn,.row.project-header #export-btn-group #sharing-permissions,.row.project-header #export-btn-group #story-preview-btn{background-color:#e3e3e3;color:#333;margin-right:8px;overflow:visible}.row.project-header #export-btn-group #story-btn.disabled,.row.project-header #export-btn-group #sharing-permissions.disabled,.row.project-header #export-btn-group #story-preview-btn.disabled{cursor:not-allowed}.row.project-header #export-btn-group #story-btn:not(.disabled):hover,.row.project-header #export-btn-group #sharing-permissions:not(.disabled):hover,.row.project-header #export-btn-group #story-preview-btn:not(.disabled):hover{background:#ccc}.dialog .tag-input{position:relative}.dialog .tag-input .fa-chevron-down{position:absolute;right:8px;top:6px;pointer-events:none}.row.editor-bar{background:#e3e3e3;height:30px;font-size:12px;padding:0 10px}.row.editor-bar #visualisation-tabs{z-index:110;width:100%;text-align:center}.row.editor-bar #visualisation-tabs button{font-size:12px;line-height:1em}.row.editor-bar #visualisation-tabs button i{margin-right:3px;font-size:11px}.row.editor-bar #visualisation-tabs button .fa-exclamation-triangle{color:#ff5b5b}.row.editor-bar #visualisation-tabs button.active .fa-exclamation-triangle{color:#fff}.row.editor-bar #visibility-status,.row.editor-bar .read-only{display:inline-block;float:left;font-weight:bold;color:#aaa;margin-top:7px}.row.editor-bar .tab-buttons .fa-exclamation-triangle{display:none}.row.editor-bar .confirm-saved{float:right;margin-top:8px;margin-left:0;width:60px}.row.editor-bar .flourish-warn-container{display:none;float:right;margin-left:4px;position:relative}.row.editor-bar .flourish-warn-container.visible{display:block}.row.editor-bar .flourish-warn-container .flourish-warn-btn{background:#333;height:16px;width:16px;border-radius:50%;font-size:9px;color:#e3e3e3;margin-top:7px;text-align:center;padding-top:2px}.row.editor-bar .flourish-warn-container .flourish-warn-list{display:none;position:absolute;right:0;top:25px;width:250px;background-color:#fff;box-shadow:0 1px 2px rgba(0,0,0,.2);border-radius:3px;padding:10px;z-index:1}.row.editor-bar .flourish-warn-container .flourish-warn-list.visible{display:block}.row.editor-bar .flourish-warn-container .flourish-warn-list ul{margin:0;padding:0;list-style:none}.row.editor-bar .flourish-warn-container .flourish-warn-list ul li{position:relative;border-top:1px solid rgba(0,0,0,.1);padding:8px 0 0 20px;margin:8px 0 0 0}.row.editor-bar .flourish-warn-container .flourish-warn-list ul li:first-child{border-top:none;padding-top:0;margin-top:0}.row.editor-bar .flourish-warn-container .flourish-warn-list ul li:first-child i{top:4px}.row.editor-bar .flourish-warn-container .flourish-warn-list ul li i{position:absolute;top:11px;left:4px;color:#333;font-size:11px}.row.editor-bar .flourish-warn-container .flourish-warn-list ul li p.message{font-weight:bold}.row.editor-bar .flourish-warn-container .flourish-warn-list ul li p.explanation{color:#888}@media(min-width: 820px){.row.editor-bar #visualisation-tabs{width:calc(100% - 460px);margin-left:0}}.impossible .row.editor-bar .tab-buttons .fa-exclamation-triangle{display:inline}@media(min-width: 620px){.tab-data{overflow:hidden}}.tab-data .tab-preview{position:fixed;z-index:2}.tab-data #preview-menu{opacity:0;pointer-events:none}.side-panel{text-align:left;position:relative;background:#f9f9f9;line-height:1.1;margin-left:0;padding:0 0 1px 0;width:100%}.side-panel.closed{margin-left:-300px}.side-panel .side-panel-inner{margin-bottom:87px;border:1px solid #ddd;background:#fff}@media(min-width: 820px){.side-panel .side-panel-inner{border:none;background:rgba(0,0,0,0)}}.side-panel .side-panel-close{position:absolute;top:15px;right:10px;font-size:1.25em;width:1.5em;height:1.5em;padding:.1em;text-align:center;border:solid 1px rgba(0,0,0,.4);border-radius:3px;background:#eaeaea;transition:right .5s ease;z-index:1}.side-panel .side-panel-close.opener{right:calc(-1.5em + 1px);border-bottom-left-radius:0;border-top-left-radius:0}.side-panel .side-panel-close:hover{opacity:1}.side-panel .side-panel-close:hover i{opacity:.7}.side-panel .side-panel-scrollbox{width:100%;height:100%;padding:10px 10px 20px;overflow-y:scroll}.side-panel .side-panel-scrollbox .side-panel-inner{width:100%}@media(min-width: 1220px){.side-panel .side-panel-scrollbox{padding:20px}}.side-panel h1{margin:1em 0 .5em;font-size:.9em;opacity:.5;cursor:default}.side-panel h2{font-size:13px;letter-spacing:0;font-weight:500;margin:0 0 .6em;position:relative;color:#333;word-wrap:break-word}.side-panel .toplevel-settings-block{padding:0 5px 20px}.side-panel .toplevel-settings-block.hidden{display:none}.side-panel .toplevel-settings-block .settings-option{display:inline-block}.side-panel .toplevel-settings-block .settings-option:first-child{margin-top:9px}.side-panel .toplevel-settings-block .settings-option.hidden{display:none}.side-panel .settings-divider{margin:1rem -10px 0;clear:both;width:calc(100% + 20px);height:1px;background:#eee}.side-panel .settings-subhead{text-transform:uppercase;font-size:.7rem;font-weight:bold;color:#999;padding:.5rem 5px .25rem;margin:0}.side-panel .settings-block{margin:0;display:inline-block;width:100%;background-color:#fff;padding:0 10px 0;min-height:24px}.side-panel .settings-block h2{margin:0 -10px;font-size:.8rem;padding:.75em 30px;font-weight:bold;background-color:#f5f5f5;border-top:1px solid #ddd;cursor:pointer;color:#535e65}.side-panel .settings-block h2:hover,.side-panel .settings-block h2:focus{background:#e8e8e8}.side-panel .settings-block h2::after{font-family:FontAwesome;content:"";position:absolute;left:15px}.side-panel .settings-block.open h2{position:sticky;top:0;z-index:1;box-shadow:0 1px 0 #fff;border-top-color:#666;background-color:#777;color:#fff}.side-panel .settings-block.open h2::after{transform:rotate(90deg)}.side-panel .settings-block .settings-option,.side-panel .settings-block .settings-divider,.side-panel .settings-block .settings-subhead{display:none}.side-panel .settings-block input::-webkit-contacts-auto-fill-button{visibility:hidden;display:none !important;pointer-events:none;position:absolute;right:0}.side-panel .settings-block.open{padding-bottom:1rem}.side-panel .settings-block.open .settings-option{display:inline-block}.side-panel .settings-block.open .settings-divider,.side-panel .settings-block.open .settings-subhead{display:block}.side-panel .settings-block.open h2+.settings-divider{background:rgba(0,0,0,0);margin-top:.25rem}.side-panel .settings-block.open .hidden{display:none}.side-panel .settings-block.hidden{display:none}.side-panel .settings-block.hidden h2:focus{outline:none}.side-panel h3{font-size:.8rem;line-height:1.2em;font-weight:normal;margin-top:0;margin-bottom:3px;color:#333;display:inline-block;cursor:default;vertical-align:top;background:#fff}.side-panel p{font-size:13px;margin-top:0}.side-panel .upgrade-setting{cursor:pointer}.side-panel .upgrade-setting .buttons-container label{opacity:.2;pointer-events:none}.side-panel .upgrade-setting h3{color:#999}.side-panel .upgrade-setting input,.side-panel .upgrade-setting label.slider{pointer-events:none;opacity:.2}.side-panel .upgrade-setting h3,.side-panel .upgrade-setting input,.side-panel .upgrade-setting label.slider{cursor:pointer}.side-panel .settings-option{position:relative;margin-top:.75rem;display:none;vertical-align:bottom;width:100%;padding:0 5px}.side-panel .settings-option label{font-size:13px;display:inline-block;vertical-align:top;width:100%}.side-panel .settings-option label.slider{width:auto}.side-panel .settings-option label:hover,.side-panel .settings-option label:focus,.side-panel .settings-option label:focus-within{z-index:2;position:relative}.side-panel .settings-option label:hover h3,.side-panel .settings-option label:focus h3,.side-panel .settings-option label:focus-within h3{padding-right:1px}.side-panel .settings-option input,.side-panel .settings-option textarea,.side-panel .settings-option select,.side-panel .settings-option button{border-radius:3px;border:1px solid #ddd;padding:.2em .1em .2em .3em;min-height:30px;font-size:13px;display:block;outline:none;transition:200ms linear border}.side-panel .settings-option input:focus,.side-panel .settings-option textarea:focus,.side-panel .settings-option select:focus,.side-panel .settings-option button:focus{border:1px solid #777}.side-panel .settings-option textarea{resize:vertical;height:60px;padding-top:5px}.side-panel .settings-option ::-webkit-input-placeholder{color:#ddd}.side-panel .settings-option :-ms-input-placeholder{color:#ddd}.side-panel .settings-option ::-ms-input-placeholder{color:#ddd}.side-panel .settings-option .dropdown-list .dropdown-item{font-size:13px;padding:10px 10px 10px 6px}.side-panel .settings-option .color-picker{vertical-align:top;line-height:0;position:relative;z-index:0}.side-panel .settings-option .color-picker:hover:not(.is-null) .cancel-setting{transform:translateX(27px)}.side-panel .settings-option .color-picker:not(.is-null) .cancel-setting:focus-visible{transform:translateX(27px);border-color:#777}.side-panel .settings-option .color-picker.is-null .cancel-setting{display:none}.side-panel .settings-option .color-picker.is-null .color-wrapper input{opacity:0}.side-panel .settings-option .color-wrapper{width:30px;height:30px;overflow:hidden;border-radius:3px;position:relative;display:inline-block;background:#fff;z-index:1}.side-panel .settings-option .color-wrapper input{transform:scale(10);position:absolute}.side-panel .settings-option .color-wrapper:before{display:block;position:absolute;content:"";top:0;bottom:-10px;left:0;width:1px;pointer-events:none;background:rgba(0,0,0,.1);transform-origin:top;transform:rotate(-45deg)}.side-panel .settings-option .color-wrapper:after{display:block;position:absolute;content:"";border:1px solid rgba(0,0,0,.1);left:0;right:0;top:0;bottom:0;pointer-events:none}.side-panel .settings-option .color-wrapper:invalid{box-shadow:none}.side-panel .settings-option .cancel-setting{width:30px;border-radius:3px;border:1px solid #ddd;background:#fff;position:absolute;padding:0;height:30px;display:flex;justify-content:center;align-items:center;left:0;top:0;cursor:pointer;transition:200ms transform}.side-panel .settings-option .cancel-setting svg{margin-left:2px;width:8px;height:8px;pointer-events:none;transition:200ms opacity}.side-panel .settings-option .cancel-setting:focus{border:1px solid #ddd}.side-panel .settings-option .cancel-setting:hover svg{opacity:.4}.side-panel .settings-option .single-button{background:#eee;color:#333;width:100%;border:none;padding:0;cursor:pointer;transition:200ms linear background-color}.side-panel .settings-option .single-button:hover{background-color:#e0e0e0}.side-panel .settings-option .single-button:hover:disabled{background-color:#eee;cursor:default}.side-panel .settings-option .single-button:focus{background-color:#e0e0e0}.side-panel .settings-option .single-button:focus:disabled{background-color:#eee;cursor:default}.side-panel .settings-option .buttons-container input[type=radio]{width:0;height:0;opacity:0;margin:0;display:inline-block;vertical-align:top;font-size:0;line-height:0;position:absolute}.side-panel .settings-option .buttons-container input[type=radio]+label{font-size:13px;background:#eee;color:#333;display:inline-flex;flex-wrap:nowrap;align-content:center;justify-content:center;align-items:center;height:30px;cursor:pointer;text-align:center;border-right:1px solid #fff;border-bottom:1px solid #fff;background-size:cover;background-position:50% 50%;transition:200ms linear background-color}.side-panel .settings-option .buttons-container input[type=radio]+label i{color:#555;margin-right:5px}.side-panel .settings-option .buttons-container input[type=radio]+label img{margin-right:5px;height:13px}.side-panel .settings-option .buttons-container.large input[type=radio]+label{height:60px}.side-panel .settings-option .buttons-container input[type=radio]:not([disabled])+label:hover{background-color:#e0e0e0}.side-panel .settings-option .buttons-container input[type=radio]:not([disabled]):focus-visible+label:after{height:4px}.side-panel .settings-option .buttons-container input[type=radio]:disabled+label{cursor:default}.side-panel .settings-option .buttons-container input[type=radio]:checked+label{background-color:#ccdee6;cursor:default;position:relative}.side-panel .settings-option .buttons-container input[type=radio]:checked+label:hover{background-color:#ccdee6}.side-panel .settings-option .buttons-container input[type=radio]:checked+label:after{width:100%;height:2px;background:#2886b2;bottom:0;position:absolute;content:"";left:0}.side-panel .settings-option input[data-autocomplete]+.fa{position:absolute;right:10px;margin-top:-21px;font-size:12px;pointer-events:none}.side-panel .settings-option select{width:100%;height:32px}.side-panel .settings-option.option-type-color input{padding:0;background:#fff}.side-panel .settings-option.option-type-number,.side-panel .settings-option.option-type-rows,.side-panel .settings-option.option-type-color{width:50%}.side-panel .settings-option.option-type-number.width-quarter input,.side-panel .settings-option.option-type-rows.width-quarter input,.side-panel .settings-option.option-type-color.width-quarter input{width:100%}.side-panel .settings-option.option-type-number input,.side-panel .settings-option.option-type-rows input,.side-panel .settings-option.option-type-color input{width:calc((100% - 10px)/2);min-width:40px}.side-panel .settings-option.option-type-boolean:not(.settings-buttons).settings-buttons>label{height:auto}.side-panel .settings-option.option-type-boolean:not(.settings-buttons)>label:first-child{position:absolute;padding-left:37px;padding-top:7px;width:auto;right:5px;left:5px}.side-panel .settings-option.option-type-string input,.side-panel .settings-option.option-type-url input{width:100%}.side-panel .settings-option.option-type-text textarea,.side-panel .settings-option.option-type-code textarea,.side-panel .settings-option.option-type-html textarea{width:100%}.side-panel .settings-option.option-type-text textarea.size-large,.side-panel .settings-option.option-type-code textarea.size-large,.side-panel .settings-option.option-type-html textarea.size-large{height:50vh}.side-panel .settings-option.option-type-text textarea.size-small,.side-panel .settings-option.option-type-code textarea.size-small,.side-panel .settings-option.option-type-html textarea.size-small{height:30px}.side-panel .settings-option.option-type-code label{width:calc(100% - 18px)}.side-panel .settings-option.option-type-code .wrap-control{font-size:.7em;color:#999;transform:scale(1, -1);margin-bottom:.3em;display:inline-block;vertical-align:bottom;transition:transform .2s ease}.side-panel .settings-option.option-type-code .wrap-control.selected{transform:scale(-1, -1);cursor:pointer}.side-panel .settings-option.option-type-code textarea{font-family:monospace;font-size:13px}.side-panel .settings-option.option-type-font input.font-menu{width:100%;outline:none}.side-panel .settings-option.option-type-colors input{width:100%;margin:0;z-index:1;cursor:pointer}.side-panel .settings-option.option-type-colors .color-swatches,.side-panel .settings-option.option-type-colors .dropdown-item{display:flex;align-items:stretch;min-height:26px;overflow:hidden;border-radius:3px}.side-panel .settings-option.option-type-colors .color-swatches em,.side-panel .settings-option.option-type-colors .dropdown-item em{font-style:normal;color:#777;display:block;padding:8px;pointer-events:none}.side-panel .settings-option.option-type-colors .color-swatches span,.side-panel .settings-option.option-type-colors .dropdown-item span{display:inline-block;height:26px;flex:1}.side-panel .settings-option.option-type-colors .color-swatches span:nth-child(n+13):nth-child(-n+99),.side-panel .settings-option.option-type-colors .dropdown-item span:nth-child(n+13):nth-child(-n+99){display:none}.side-panel .settings-option.option-type-colors .color-swatches{padding:0;position:absolute;left:7px;margin-top:2px;right:26px;z-index:0;pointer-events:none}.side-panel .settings-option.option-type-colors .dropdown-item{padding:0 !important;margin:2px}.side-panel .settings-option.option-type-colors .dropdown-item label{position:absolute;top:6px;left:8px;color:#fff;pointer-events:none;opacity:.4;width:auto}.side-panel .settings-option.option-type-colors .dropdown-item span{pointer-events:none}.side-panel .settings-option.option-type-colors .dropdown-item:hover label,.side-panel .settings-option.option-type-colors .dropdown-item.selected label{opacity:1;background:rgba(0,0,0,.55)}.side-panel .settings-option.option-type-colors .dropdown-item.current label{opacity:1;background:rgba(0,0,0,.8)}.side-panel .settings-option.option-type-colors .dropdown-item.current:before{top:7px;right:5px;color:#fff}.side-panel .settings-option.option-type-colors.custom input{opacity:0}.side-panel .settings-option.option-type-colors.custom .color-swatches{align-items:flex-start}.side-panel .settings-option.option-type-colors.custom .color-swatches span{max-width:28px;pointer-events:auto;transition:transform 200ms;transform-origin:center center}.side-panel .settings-option.option-type-colors.custom .color-swatches span:hover{transform:scale(1.2)}.side-panel .settings-option.option-type-colors.custom .color-swatches span.fa{font-size:24px;color:#ccc;margin-left:4px}.side-panel .settings-option.option-type-colors.custom .color-swatches span.fa::before{position:relative;top:2px}.side-panel .settings-option .text-editor-setting{position:relative}.side-panel .settings-option .text-editor-setting .text-editor-btn{position:absolute;top:5px;right:5px;width:20px;height:20px;min-height:0;font-size:10px;padding:0;line-height:0;border:none;border-radius:999px;cursor:pointer;transition:200ms background-color;color:#aaa;background-color:#ddd;box-shadow:0 0 0 2px #fff;display:flex;align-items:center;justify-content:center}.side-panel .settings-option .text-editor-setting .text-editor-btn:hover,.side-panel .settings-option .text-editor-setting .text-editor-btn:focus{color:#333}.side-panel .settings-option .text-editor-setting *:focus+.text-editor-btn{color:#777}.side-panel .settings-option .text-editor-setting *:focus+.text-editor-btn:hover{color:#333}.side-panel .settings-option.width-full{width:100% !important}.side-panel .settings-option.width-half{width:50% !important}.side-panel .settings-option.width-quarter{width:25% !important}.side-panel .settings-option.width-three-quarters{width:75% !important}.side-panel .settings-option .description-link{cursor:pointer;color:#dd4141}.side-panel .settings-option.search-filtered-out,.side-panel .settings-block h2.search-filtered-out,.side-panel .settings-subhead.search-filtered-out,.side-panel .settings-divider.search-filtered-out{opacity:.2;transition:opacity 200ms;-webkit-filter:blur(1px);filter:blur(1px)}.side-panel .detailed-settings h2{margin-bottom:.75rem}.side-panel .detailed-settings h2:after{content:""}.side-panel .detailed-settings .settings-block .settings-option{display:block}.side-panel .palette{max-height:calc(100vh - 210px);overflow-y:auto;padding:1px}.side-panel .palette input[type=color],.side-panel .palette button,.side-panel .palette .swatch-color{-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;appearance:none;display:inline-block;width:28px;height:28px;padding:0;margin:1px;border:none;outline:none;background:rgba(0,0,0,0)}.side-panel .palette input[type=color].fa-plus-square::before,.side-panel .palette button.fa-plus-square::before,.side-panel .palette .swatch-color.fa-plus-square::before{font-size:32px;color:#ddd;margin-left:1px}.side-panel .palette input[type=color].fa-times,.side-panel .palette button.fa-times,.side-panel .palette .swatch-color.fa-times{position:absolute;right:0;opacity:0;color:#aaa}.side-panel .palette input[type=color].fa-times:hover,.side-panel .palette button.fa-times:hover,.side-panel .palette .swatch-color.fa-times:hover{color:#888}.side-panel .palette input[type=color]::-webkit-color-swatch-wrapper,.side-panel .palette button::-webkit-color-swatch-wrapper,.side-panel .palette .swatch-color::-webkit-color-swatch-wrapper{padding:0}.side-panel .palette input[type=color]::-webkit-color-swatch,.side-panel .palette button::-webkit-color-swatch,.side-panel .palette .swatch-color::-webkit-color-swatch{border:none}.side-panel .palette [draggable]{cursor:move;cursor:grab;cursor:-moz-grab;cursor:-webkit-grab}.side-panel .palette [draggable]:active{cursor:grabbing;cursor:-moz-grabbing;cursor:-webkit-grabbing}.side-panel .palette .swatch-handle{display:block;width:15px;height:28px;color:#ddd;position:absolute;left:1px;top:7px;text-align:center;font-size:18px;font-weight:bold;line-height:5.5px;pointer-events:none}.side-panel .palette input[type=text]{width:120px;width:calc(100% - 52px);background:rgba(0,0,0,0);padding:5px 8px;border-width:0;margin:0}.side-panel .palette p{position:relative;display:flex;align-items:center;margin:0;padding:5px 5px 5px 20px;border-bottom:1px solid #eee}.side-panel .palette p:first-child{border-top:1px solid #eee}.side-panel .palette p:hover button.fa-times{opacity:.5}.side-panel .palette p:hover [draggable]::before{opacity:1}.side-panel .text-editor-container .editor-section{display:inline-block}.side-panel .text-editor-container .editor-section+.editor-section{margin-left:10px;padding-left:6px;border-left:1px solid #ddd}.side-panel .text-editor-container .text-settings{margin-bottom:10px}.side-panel .text-editor-container .editor-button{display:inline-block;margin-left:4px;cursor:pointer}.side-panel .text-editor-container .editor-button:hover{opacity:.8}.side-panel .text-editor-container .editor-button+.editor-button{margin-left:14px}.side-panel .text-editor-container .editor-button svg{height:10px;width:auto}.side-panel .text-editor-container .text-bindings{border:1px solid #ddd;border-top:none;margin-top:-1px;padding:4px}.side-panel .text-editor-container .text-bindings p{display:block;margin:4px;font-size:10px;letter-spacing:.5px;text-transform:uppercase;color:#999}.side-panel .text-editor-container .text-bindings button{display:inline-block;margin:2.5px;border-radius:20px;border:none;min-height:0;padding:2px 10px;cursor:pointer;white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}.side-panel .text-editor-container .text-bindings button:hover{background:#ddd}.side-panel .text-editor-container .text-bindings button[data-type=dynamic]{background:#ccdee6}.side-panel .text-editor-container .text-bindings button[data-type=dynamic]:hover{background:#bbcdd5}.side-panel .text-editor-container textarea{width:100%;min-height:150px}.side-panel .text-editor-container input.text-input{width:100%}.side-panel .side-panel-top{border-top:none;border-bottom:1px solid rgba(0,0,0,.1);margin-top:0;padding:17px 10px 20px;font-size:1em}.side-panel .side-panel-top.shadow{box-shadow:3px 3px 5px rgba(0,0,0,.1)}.side-panel .side-panel-top .side-panel-top-menu .side-panel-icon-btn{color:#fff;background:#9a9a9a;padding:7px 0 0 0;border-radius:9999px;width:30px;height:30px;text-align:center;margin:0}.side-panel .side-panel-top .side-panel-top-menu .separator{margin:0 .4em;height:1em;border-left:1px solid rgba(0,0,0,.25);display:inline-block;vertical-align:middle}#story .side-panel .side-panel-top .side-panel-top-menu .separator{margin:0 .25em}.side-panel .current-template{margin:0;opacity:0;transition:200ms opacity;position:relative;border-bottom:1px solid #ddd}.side-panel .current-template h1{opacity:1;font-size:12px;font-weight:normal;margin:0;padding:15px 80px 15px 15px}.side-panel .current-template h1>span{display:block;font-weight:bold;font-size:16px}.side-panel .current-template h3{margin-top:.7em}.side-panel .current-template h3 i{margin-left:.2em;color:rgba(0,0,0,.5)}.side-panel .current-template .current-template-title{position:relative}.side-panel .current-template .current-template-title .current-template-version{font-size:14px;font-weight:normal;margin-top:4px}.side-panel .current-template .current-template-title .current-template-version form{display:inline-block;margin-left:4px}.side-panel .current-template .current-template-title .current-template-version form button{all:unset;cursor:pointer}.side-panel .current-template .current-template-title .current-template-version form button img{height:14px;vertical-align:bottom}.side-panel .current-template .current-template-thumbnail{position:absolute;right:0;top:0;width:76px;height:100%;background-size:cover;background-position:center;background-repeat:no-repeat}.side-panel .current-template .current-template-thumbnail:after{width:20px;height:100%;position:absolute;left:0;right:0;background:linear-gradient(to right, rgb(255, 255, 255), rgba(255, 255, 255, 0));content:"";display:block}.side-panel .template-theme button#reset-to-theme:disabled{color:#d3d3d3}.side-panel .template-settings-search{background:#fff;padding:5px 15px;border-top:1px solid #eee;position:sticky;bottom:0;width:100%;z-index:2}.side-panel .template-settings-search input{width:200px;border-radius:3px;height:30px;border:1px solid #eee;margin-left:6px}@media(min-width: 820px){.side-panel .template-settings-search{position:fixed;width:329px}}@media(min-width: 620px)and (max-width: 819px){.side-panel .side-panel-inner{max-width:500px;margin-top:20px;margin-left:auto;margin-right:auto}}@media(min-width: 820px){.side-panel{max-width:330px;position:fixed;right:0;top:91px;background:#fff;overflow-y:auto;height:calc(100vh - 91px);border-left:1px solid #ddd}.side-panel .current-template{min-height:56px}}.tab-preview #visualisation .editor-core{overflow:visible !important}.sdk #visualisation .editor-core,.tab-preview.active #visualisation .editor-core{overflow:auto !important}body.full-screen .row.editor #visualisation,body.full-screen .row.editor #story{position:fixed !important;top:0 !important;left:0 !important;width:100% !important;height:100% !important}body.full-screen .row.editor #visualisation .editor-core #preview,body.full-screen .row.editor #story .editor-core #preview{width:100% !important}body.full-screen .row.editor #visualisation #exit-full-screen,body.full-screen .row.editor #story #exit-full-screen{display:block}body.loading .loading-spinner{opacity:1 !important;animation-name:spin;animation-duration:1.2s;animation-iteration-count:infinite;animation-timing-function:linear;transform-origin:center center}body.loading .content{min-height:100vh}body.loading .preview-holder{pointer-events:none;background-color:#f3f3f3}body.loading .preview-holder #preview{background:rgba(0,0,0,0) !important}body.loading .preview-holder iframe{opacity:.1}body.loading .row.data,body.loading #blank-slide{opacity:0;pointer-events:none}#spreadsheet-container.loading .loading-spinner{opacity:1 !important;animation-name:spin;animation-duration:1.2s;animation-iteration-count:infinite;animation-timing-function:linear;transform-origin:center center;position:absolute;left:50%;top:50%;pointer-events:none;z-index:5;transition:opacity 100ms;transition-delay:200ms}#spreadsheet-container.loading #spreadsheet-main{opacity:.1;transition:opacity 100ms;transition-delay:200ms}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}body.impossible .preview-overlay{display:flex;flex-direction:column;justify-content:center;align-items:center;position:absolute;background:#fff;width:100%;height:100%}body.impossible #preview{opacity:0;pointer-events:none}body.impossible .empty-label .fa{color:#ff5b5b}body.impossible .empty-details .data-tab-icon{padding:0 3px;font-weight:bold}.setting-tooltip{margin-left:3px;color:#fff;background-color:#d0d0d0;border-radius:10px;width:12px;height:12px;font-size:8px;padding:2px 0 0 0;text-align:center;vertical-align:bottom;margin-bottom:1px;position:relative}.setting-tooltip.tooltip-upgrade{background-color:#eaa22d}.setting-tooltip:hover,.setting-tooltip:focus{background-color:#aaa;outline:none}.setting-tooltip:hover.tooltip-upgrade,.setting-tooltip:focus.tooltip-upgrade{background-color:#df911c}#private-publishing,#anyone-can-duplicate{padding-right:15px;margin-top:10px;width:100%;display:flex;align-items:center}#private-publishing+input,#anyone-can-duplicate+input{width:100%;padding:5px}#private-publishing+input.hidden,#anyone-can-duplicate+input.hidden{display:none}#private-publishing+input.error,#anyone-can-duplicate+input.error{border-color:#dd4141}#private-publishing.upgrade-btn,#anyone-can-duplicate.upgrade-btn{width:auto;color:#999}#private-publishing.upgrade-btn::after,#anyone-can-duplicate.upgrade-btn::after{top:4px}.is-touch .side-panel .settings-option .color-picker:not(.is-null) .cancel-setting{transform:translateX(27px)}#snapshot-preview-wrapper{padding:8px;border:1px solid #a9a9a9;border-radius:4px;background-color:#fcfcfc;height:300px;align-self:center;justify-self:center;pointer-events:none}#snapshot-grid{display:grid;grid-gap:12px}@media(min-width: 820px){#snapshot-grid{grid-template-columns:auto 200px;height:240px;justify-items:center}}.download-snapshot-btn{align-items:center;display:inline-flex}.download-snapshot-btn.disabled:after{background-image:url("/images/bosh.svg");background-size:cover;background-position:center center;content:"";display:block;width:18px;height:18px;animation-name:spin;animation-duration:1.4s;animation-iteration-count:infinite;animation-timing-function:linear;transform-origin:center center}body.sdk{background:#f9f9f9;overflow-x:hidden}body.sdk .row.editor .row-inner{max-width:none}body.sdk .error{position:absolute;top:0;left:50%;margin-left:-115px;width:230px;max-width:80%;background:#dd4141;color:#fff;padding:70px 10px 10px;border-bottom-left-radius:6px;border-bottom-right-radius:6px;text-align:center;z-index:101;display:none}body.sdk .error h1{font-size:1em;font-weight:500}body.sdk .error h2{font-size:1em;font-weight:300}body.sdk .error.shown{display:block;animation-name:enter;animation-duration:.3s}@keyframes enter{0%{top:-100px}100%{top:0}}body.sdk .side-panel .side-panel-scrollbox{height:100%}body.sdk .side-panel .side-panel-scrollbox .current-template .current-template-thumbnail{background-image:url("/thumbnail");background-size:cover;background-position:50% 50%}body.sdk .side-panel .side-panel-scrollbox .sdk-add .settings-block,body.sdk .side-panel .side-panel-scrollbox .sdk-add .data-block{margin:10px 0;color:#fff;background:#888;border:1px solid rgba(0,0,0,.1);text-align:right}body.sdk .side-panel .side-panel-scrollbox .sdk-add .settings-block:hover,body.sdk .side-panel .side-panel-scrollbox .sdk-add .data-block:hover{background:#777}body.sdk .side-panel .side-panel-scrollbox .sdk-add .settings-block.open:hover,body.sdk .side-panel .side-panel-scrollbox .sdk-add .data-block.open:hover{background:#888}body.sdk .side-panel .side-panel-scrollbox .sdk-add .settings-block h2,body.sdk .side-panel .side-panel-scrollbox .sdk-add .data-block h2{text-align:left;color:#fff}body.sdk .side-panel .side-panel-scrollbox .sdk-add .settings-block i,body.sdk .side-panel .side-panel-scrollbox .sdk-add .data-block i{margin-right:.2em;display:inline-block;vertical-align:middle}body.sdk .side-panel .side-panel-scrollbox .sdk-add .settings-block .settings-option,body.sdk .side-panel .side-panel-scrollbox .sdk-add .data-block .settings-option{margin-top:.75em}body.sdk .side-panel .side-panel-scrollbox .sdk-add .settings-block .settings-option .form-element select,body.sdk .side-panel .side-panel-scrollbox .sdk-add .settings-block .settings-option .form-element input,body.sdk .side-panel .side-panel-scrollbox .sdk-add .settings-block .settings-option .form-element textarea,body.sdk .side-panel .side-panel-scrollbox .sdk-add .data-block .settings-option .form-element select,body.sdk .side-panel .side-panel-scrollbox .sdk-add .data-block .settings-option .form-element input,body.sdk .side-panel .side-panel-scrollbox .sdk-add .data-block .settings-option .form-element textarea{width:150px}body.sdk .side-panel .side-panel-scrollbox .sdk-add .settings-block .settings-option .form-element textarea,body.sdk .side-panel .side-panel-scrollbox .sdk-add .data-block .settings-option .form-element textarea{min-height:50px}body.sdk .side-panel .side-panel-scrollbox .sdk-add .settings-block .settings-option .form-element .small,body.sdk .side-panel .side-panel-scrollbox .sdk-add .data-block .settings-option .form-element .small{display:inline-block}body.sdk .side-panel .side-panel-scrollbox .sdk-add .settings-block .settings-option .form-element .small label,body.sdk .side-panel .side-panel-scrollbox .sdk-add .data-block .settings-option .form-element .small label{width:auto;vertical-align:middle}body.sdk .side-panel .side-panel-scrollbox .sdk-add .settings-block .settings-option .form-element .small input,body.sdk .side-panel .side-panel-scrollbox .sdk-add .data-block .settings-option .form-element .small input{width:30px;margin-right:4px}body.sdk .side-panel .side-panel-scrollbox .sdk-add .settings-block .settings-option .type-specific,body.sdk .side-panel .side-panel-scrollbox .sdk-add .data-block .settings-option .type-specific{display:none}body.sdk .side-panel .side-panel-scrollbox .sdk-add .settings-block button,body.sdk .side-panel .side-panel-scrollbox .sdk-add .data-block button{margin-top:1em;margin-left:2em}body.sdk .side-panel .tip{font-size:.8em;line-height:1.4;color:#aaa;font-weight:300}.row.text-editor{margin-top:1em;background:none}.row.text-editor .row-inner #code-mirror{width:100%}.row.text-editor .row-inner .CodeMirror{border:1px solid rgba(0,0,0,.3);width:100%}/*# sourceMappingURL=sdk.css.map */ + */@font-face{font-family:"FontAwesome";src:url("fonts/fontawesome-webfont.eot?v=4.5.0");src:url("fonts/fontawesome-webfont.eot?#iefix&v=4.5.0") format("embedded-opentype"),url("fonts/fontawesome-webfont.woff2?v=4.5.0") format("woff2"),url("fonts/fontawesome-webfont.woff?v=4.5.0") format("woff"),url("fonts/fontawesome-webfont.ttf?v=4.5.0") format("truetype"),url("fonts/fontawesome-webfont.svg?v=4.5.0#fontawesomeregular") format("svg");font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.3333333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.2857142857em;text-align:center}.fa-ul{padding-left:0;margin-left:2.1428571429em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.1428571429em;width:2.1428571429em;top:.1428571429em;text-align:center}.fa-li.fa-lg{left:-1.8571428571em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0);-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:""}.fa-music:before{content:""}.fa-search:before{content:""}.fa-envelope-o:before{content:""}.fa-heart:before{content:""}.fa-star:before{content:""}.fa-star-o:before{content:""}.fa-user:before{content:""}.fa-film:before{content:""}.fa-th-large:before{content:""}.fa-th:before{content:""}.fa-th-list:before{content:""}.fa-check:before{content:""}.fa-remove:before,.fa-close:before,.fa-times:before{content:""}.fa-search-plus:before{content:""}.fa-search-minus:before{content:""}.fa-power-off:before{content:""}.fa-signal:before{content:""}.fa-gear:before,.fa-cog:before{content:""}.fa-trash-o:before{content:""}.fa-home:before{content:""}.fa-file-o:before{content:""}.fa-clock-o:before{content:""}.fa-road:before{content:""}.fa-download:before{content:""}.fa-arrow-circle-o-down:before{content:""}.fa-arrow-circle-o-up:before{content:""}.fa-inbox:before{content:""}.fa-play-circle-o:before{content:""}.fa-rotate-right:before,.fa-repeat:before{content:""}.fa-refresh:before{content:""}.fa-list-alt:before{content:""}.fa-lock:before{content:""}.fa-flag:before{content:""}.fa-headphones:before{content:""}.fa-volume-off:before{content:""}.fa-volume-down:before{content:""}.fa-volume-up:before{content:""}.fa-qrcode:before{content:""}.fa-barcode:before{content:""}.fa-tag:before{content:""}.fa-tags:before{content:""}.fa-book:before{content:""}.fa-bookmark:before{content:""}.fa-print:before{content:""}.fa-camera:before{content:""}.fa-font:before{content:""}.fa-bold:before{content:""}.fa-italic:before{content:""}.fa-text-height:before{content:""}.fa-text-width:before{content:""}.fa-align-left:before{content:""}.fa-align-center:before{content:""}.fa-align-right:before{content:""}.fa-align-justify:before{content:""}.fa-list:before{content:""}.fa-dedent:before,.fa-outdent:before{content:""}.fa-indent:before{content:""}.fa-video-camera:before{content:""}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:""}.fa-pencil:before{content:""}.fa-map-marker:before{content:""}.fa-adjust:before{content:""}.fa-tint:before{content:""}.fa-edit:before,.fa-pencil-square-o:before{content:""}.fa-share-square-o:before{content:""}.fa-check-square-o:before{content:""}.fa-arrows:before{content:""}.fa-step-backward:before{content:""}.fa-fast-backward:before{content:""}.fa-backward:before{content:""}.fa-play:before{content:""}.fa-pause:before{content:""}.fa-stop:before{content:""}.fa-forward:before{content:""}.fa-fast-forward:before{content:""}.fa-step-forward:before{content:""}.fa-eject:before{content:""}.fa-chevron-left:before{content:""}.fa-chevron-right:before{content:""}.fa-plus-circle:before{content:""}.fa-minus-circle:before{content:""}.fa-times-circle:before{content:""}.fa-check-circle:before{content:""}.fa-question-circle:before{content:""}.fa-info-circle:before{content:""}.fa-crosshairs:before{content:""}.fa-times-circle-o:before{content:""}.fa-check-circle-o:before{content:""}.fa-ban:before{content:""}.fa-arrow-left:before{content:""}.fa-arrow-right:before{content:""}.fa-arrow-up:before{content:""}.fa-arrow-down:before{content:""}.fa-mail-forward:before,.fa-share:before{content:""}.fa-expand:before{content:""}.fa-compress:before{content:""}.fa-plus:before{content:""}.fa-minus:before{content:""}.fa-asterisk:before{content:""}.fa-exclamation-circle:before{content:""}.fa-gift:before{content:""}.fa-leaf:before{content:""}.fa-fire:before{content:""}.fa-eye:before{content:""}.fa-eye-slash:before{content:""}.fa-warning:before,.fa-exclamation-triangle:before{content:""}.fa-plane:before{content:""}.fa-calendar:before{content:""}.fa-random:before{content:""}.fa-comment:before{content:""}.fa-magnet:before{content:""}.fa-chevron-up:before{content:""}.fa-chevron-down:before{content:""}.fa-retweet:before{content:""}.fa-shopping-cart:before{content:""}.fa-folder:before{content:""}.fa-folder-open:before{content:""}.fa-arrows-v:before{content:""}.fa-arrows-h:before{content:""}.fa-bar-chart-o:before,.fa-bar-chart:before{content:""}.fa-twitter-square:before{content:""}.fa-facebook-square:before{content:""}.fa-camera-retro:before{content:""}.fa-key:before{content:""}.fa-gears:before,.fa-cogs:before{content:""}.fa-comments:before{content:""}.fa-thumbs-o-up:before{content:""}.fa-thumbs-o-down:before{content:""}.fa-star-half:before{content:""}.fa-heart-o:before{content:""}.fa-sign-out:before{content:""}.fa-linkedin-square:before{content:""}.fa-thumb-tack:before{content:""}.fa-external-link:before{content:""}.fa-sign-in:before{content:""}.fa-trophy:before{content:""}.fa-github-square:before{content:""}.fa-upload:before{content:""}.fa-lemon-o:before{content:""}.fa-phone:before{content:""}.fa-square-o:before{content:""}.fa-bookmark-o:before{content:""}.fa-phone-square:before{content:""}.fa-twitter:before{content:""}.fa-facebook-f:before,.fa-facebook:before{content:""}.fa-github:before{content:""}.fa-unlock:before{content:""}.fa-credit-card:before{content:""}.fa-feed:before,.fa-rss:before{content:""}.fa-hdd-o:before{content:""}.fa-bullhorn:before{content:""}.fa-bell:before{content:""}.fa-certificate:before{content:""}.fa-hand-o-right:before{content:""}.fa-hand-o-left:before{content:""}.fa-hand-o-up:before{content:""}.fa-hand-o-down:before{content:""}.fa-arrow-circle-left:before{content:""}.fa-arrow-circle-right:before{content:""}.fa-arrow-circle-up:before{content:""}.fa-arrow-circle-down:before{content:""}.fa-globe:before{content:""}.fa-wrench:before{content:""}.fa-tasks:before{content:""}.fa-filter:before{content:""}.fa-briefcase:before{content:""}.fa-arrows-alt:before{content:""}.fa-group:before,.fa-users:before{content:""}.fa-chain:before,.fa-link:before{content:""}.fa-cloud:before{content:""}.fa-flask:before{content:""}.fa-cut:before,.fa-scissors:before{content:""}.fa-copy:before,.fa-files-o:before{content:""}.fa-paperclip:before{content:""}.fa-save:before,.fa-floppy-o:before{content:""}.fa-square:before{content:""}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:""}.fa-list-ul:before{content:""}.fa-list-ol:before{content:""}.fa-strikethrough:before{content:""}.fa-underline:before{content:""}.fa-table:before{content:""}.fa-magic:before{content:""}.fa-truck:before{content:""}.fa-pinterest:before{content:""}.fa-pinterest-square:before{content:""}.fa-google-plus-square:before{content:""}.fa-google-plus:before{content:""}.fa-money:before{content:""}.fa-caret-down:before{content:""}.fa-caret-up:before{content:""}.fa-caret-left:before{content:""}.fa-caret-right:before{content:""}.fa-columns:before{content:""}.fa-unsorted:before,.fa-sort:before{content:""}.fa-sort-down:before,.fa-sort-desc:before{content:""}.fa-sort-up:before,.fa-sort-asc:before{content:""}.fa-envelope:before{content:""}.fa-linkedin:before{content:""}.fa-rotate-left:before,.fa-undo:before{content:""}.fa-legal:before,.fa-gavel:before{content:""}.fa-dashboard:before,.fa-tachometer:before{content:""}.fa-comment-o:before{content:""}.fa-comments-o:before{content:""}.fa-flash:before,.fa-bolt:before{content:""}.fa-sitemap:before{content:""}.fa-umbrella:before{content:""}.fa-paste:before,.fa-clipboard:before{content:""}.fa-lightbulb-o:before{content:""}.fa-exchange:before{content:""}.fa-cloud-download:before{content:""}.fa-cloud-upload:before{content:""}.fa-user-md:before{content:""}.fa-stethoscope:before{content:""}.fa-suitcase:before{content:""}.fa-bell-o:before{content:""}.fa-coffee:before{content:""}.fa-cutlery:before{content:""}.fa-file-text-o:before{content:""}.fa-building-o:before{content:""}.fa-hospital-o:before{content:""}.fa-ambulance:before{content:""}.fa-medkit:before{content:""}.fa-fighter-jet:before{content:""}.fa-beer:before{content:""}.fa-h-square:before{content:""}.fa-plus-square:before{content:""}.fa-angle-double-left:before{content:""}.fa-angle-double-right:before{content:""}.fa-angle-double-up:before{content:""}.fa-angle-double-down:before{content:""}.fa-angle-left:before{content:""}.fa-angle-right:before{content:""}.fa-angle-up:before{content:""}.fa-angle-down:before{content:""}.fa-desktop:before{content:""}.fa-laptop:before{content:""}.fa-tablet:before{content:""}.fa-mobile-phone:before,.fa-mobile:before{content:""}.fa-circle-o:before{content:""}.fa-quote-left:before{content:""}.fa-quote-right:before{content:""}.fa-spinner:before{content:""}.fa-circle:before{content:""}.fa-mail-reply:before,.fa-reply:before{content:""}.fa-github-alt:before{content:""}.fa-folder-o:before{content:""}.fa-folder-open-o:before{content:""}.fa-smile-o:before{content:""}.fa-frown-o:before{content:""}.fa-meh-o:before{content:""}.fa-gamepad:before{content:""}.fa-keyboard-o:before{content:""}.fa-flag-o:before{content:""}.fa-flag-checkered:before{content:""}.fa-terminal:before{content:""}.fa-code:before{content:""}.fa-mail-reply-all:before,.fa-reply-all:before{content:""}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:""}.fa-location-arrow:before{content:""}.fa-crop:before{content:""}.fa-code-fork:before{content:""}.fa-unlink:before,.fa-chain-broken:before{content:""}.fa-question:before{content:""}.fa-info:before{content:""}.fa-exclamation:before{content:""}.fa-superscript:before{content:""}.fa-subscript:before{content:""}.fa-eraser:before{content:""}.fa-puzzle-piece:before{content:""}.fa-microphone:before{content:""}.fa-microphone-slash:before{content:""}.fa-shield:before{content:""}.fa-calendar-o:before{content:""}.fa-fire-extinguisher:before{content:""}.fa-rocket:before{content:""}.fa-maxcdn:before{content:""}.fa-chevron-circle-left:before{content:""}.fa-chevron-circle-right:before{content:""}.fa-chevron-circle-up:before{content:""}.fa-chevron-circle-down:before{content:""}.fa-html5:before{content:""}.fa-css3:before{content:""}.fa-anchor:before{content:""}.fa-unlock-alt:before{content:""}.fa-bullseye:before{content:""}.fa-ellipsis-h:before{content:""}.fa-ellipsis-v:before{content:""}.fa-rss-square:before{content:""}.fa-play-circle:before{content:""}.fa-ticket:before{content:""}.fa-minus-square:before{content:""}.fa-minus-square-o:before{content:""}.fa-level-up:before{content:""}.fa-level-down:before{content:""}.fa-check-square:before{content:""}.fa-pencil-square:before{content:""}.fa-external-link-square:before{content:""}.fa-share-square:before{content:""}.fa-compass:before{content:""}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:""}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:""}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:""}.fa-euro:before,.fa-eur:before{content:""}.fa-gbp:before{content:""}.fa-dollar:before,.fa-usd:before{content:""}.fa-rupee:before,.fa-inr:before{content:""}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:""}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:""}.fa-won:before,.fa-krw:before{content:""}.fa-bitcoin:before,.fa-btc:before{content:""}.fa-file:before{content:""}.fa-file-text:before{content:""}.fa-sort-alpha-asc:before{content:""}.fa-sort-alpha-desc:before{content:""}.fa-sort-amount-asc:before{content:""}.fa-sort-amount-desc:before{content:""}.fa-sort-numeric-asc:before{content:""}.fa-sort-numeric-desc:before{content:""}.fa-thumbs-up:before{content:""}.fa-thumbs-down:before{content:""}.fa-youtube-square:before{content:""}.fa-youtube:before{content:""}.fa-xing:before{content:""}.fa-xing-square:before{content:""}.fa-youtube-play:before{content:""}.fa-dropbox:before{content:""}.fa-stack-overflow:before{content:""}.fa-instagram:before{content:""}.fa-flickr:before{content:""}.fa-adn:before{content:""}.fa-bitbucket:before{content:""}.fa-bitbucket-square:before{content:""}.fa-tumblr:before{content:""}.fa-tumblr-square:before{content:""}.fa-long-arrow-down:before{content:""}.fa-long-arrow-up:before{content:""}.fa-long-arrow-left:before{content:""}.fa-long-arrow-right:before{content:""}.fa-apple:before{content:""}.fa-windows:before{content:""}.fa-android:before{content:""}.fa-linux:before{content:""}.fa-dribbble:before{content:""}.fa-skype:before{content:""}.fa-foursquare:before{content:""}.fa-trello:before{content:""}.fa-female:before{content:""}.fa-male:before{content:""}.fa-gittip:before,.fa-gratipay:before{content:""}.fa-sun-o:before{content:""}.fa-moon-o:before{content:""}.fa-archive:before{content:""}.fa-bug:before{content:""}.fa-vk:before{content:""}.fa-weibo:before{content:""}.fa-renren:before{content:""}.fa-pagelines:before{content:""}.fa-stack-exchange:before{content:""}.fa-arrow-circle-o-right:before{content:""}.fa-arrow-circle-o-left:before{content:""}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:""}.fa-dot-circle-o:before{content:""}.fa-wheelchair:before{content:""}.fa-vimeo-square:before{content:""}.fa-turkish-lira:before,.fa-try:before{content:""}.fa-plus-square-o:before{content:""}.fa-space-shuttle:before{content:""}.fa-slack:before{content:""}.fa-envelope-square:before{content:""}.fa-wordpress:before{content:""}.fa-openid:before{content:""}.fa-institution:before,.fa-bank:before,.fa-university:before{content:""}.fa-mortar-board:before,.fa-graduation-cap:before{content:""}.fa-yahoo:before{content:""}.fa-google:before{content:""}.fa-reddit:before{content:""}.fa-reddit-square:before{content:""}.fa-stumbleupon-circle:before{content:""}.fa-stumbleupon:before{content:""}.fa-delicious:before{content:""}.fa-digg:before{content:""}.fa-pied-piper:before{content:""}.fa-pied-piper-alt:before{content:""}.fa-drupal:before{content:""}.fa-joomla:before{content:""}.fa-language:before{content:""}.fa-fax:before{content:""}.fa-building:before{content:""}.fa-child:before{content:""}.fa-paw:before{content:""}.fa-spoon:before{content:""}.fa-cube:before{content:""}.fa-cubes:before{content:""}.fa-behance:before{content:""}.fa-behance-square:before{content:""}.fa-steam:before{content:""}.fa-steam-square:before{content:""}.fa-recycle:before{content:""}.fa-automobile:before,.fa-car:before{content:""}.fa-cab:before,.fa-taxi:before{content:""}.fa-tree:before{content:""}.fa-spotify:before{content:""}.fa-deviantart:before{content:""}.fa-soundcloud:before{content:""}.fa-database:before{content:""}.fa-file-pdf-o:before{content:""}.fa-file-word-o:before{content:""}.fa-file-excel-o:before{content:""}.fa-file-powerpoint-o:before{content:""}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:""}.fa-file-zip-o:before,.fa-file-archive-o:before{content:""}.fa-file-sound-o:before,.fa-file-audio-o:before{content:""}.fa-file-movie-o:before,.fa-file-video-o:before{content:""}.fa-file-code-o:before{content:""}.fa-vine:before{content:""}.fa-codepen:before{content:""}.fa-jsfiddle:before{content:""}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:""}.fa-circle-o-notch:before{content:""}.fa-ra:before,.fa-rebel:before{content:""}.fa-ge:before,.fa-empire:before{content:""}.fa-git-square:before{content:""}.fa-git:before{content:""}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:""}.fa-tencent-weibo:before{content:""}.fa-qq:before{content:""}.fa-wechat:before,.fa-weixin:before{content:""}.fa-send:before,.fa-paper-plane:before{content:""}.fa-send-o:before,.fa-paper-plane-o:before{content:""}.fa-history:before{content:""}.fa-circle-thin:before{content:""}.fa-header:before{content:""}.fa-paragraph:before{content:""}.fa-sliders:before{content:""}.fa-share-alt:before{content:""}.fa-share-alt-square:before{content:""}.fa-bomb:before{content:""}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:""}.fa-tty:before{content:""}.fa-binoculars:before{content:""}.fa-plug:before{content:""}.fa-slideshare:before{content:""}.fa-twitch:before{content:""}.fa-yelp:before{content:""}.fa-newspaper-o:before{content:""}.fa-wifi:before{content:""}.fa-calculator:before{content:""}.fa-paypal:before{content:""}.fa-google-wallet:before{content:""}.fa-cc-visa:before{content:""}.fa-cc-mastercard:before{content:""}.fa-cc-discover:before{content:""}.fa-cc-amex:before{content:""}.fa-cc-paypal:before{content:""}.fa-cc-stripe:before{content:""}.fa-bell-slash:before{content:""}.fa-bell-slash-o:before{content:""}.fa-trash:before{content:""}.fa-copyright:before{content:""}.fa-at:before{content:""}.fa-eyedropper:before{content:""}.fa-paint-brush:before{content:""}.fa-birthday-cake:before{content:""}.fa-area-chart:before{content:""}.fa-pie-chart:before{content:""}.fa-line-chart:before{content:""}.fa-lastfm:before{content:""}.fa-lastfm-square:before{content:""}.fa-toggle-off:before{content:""}.fa-toggle-on:before{content:""}.fa-bicycle:before{content:""}.fa-bus:before{content:""}.fa-ioxhost:before{content:""}.fa-angellist:before{content:""}.fa-cc:before{content:""}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:""}.fa-meanpath:before{content:""}.fa-buysellads:before{content:""}.fa-connectdevelop:before{content:""}.fa-dashcube:before{content:""}.fa-forumbee:before{content:""}.fa-leanpub:before{content:""}.fa-sellsy:before{content:""}.fa-shirtsinbulk:before{content:""}.fa-simplybuilt:before{content:""}.fa-skyatlas:before{content:""}.fa-cart-plus:before{content:""}.fa-cart-arrow-down:before{content:""}.fa-diamond:before{content:""}.fa-ship:before{content:""}.fa-user-secret:before{content:""}.fa-motorcycle:before{content:""}.fa-street-view:before{content:""}.fa-heartbeat:before{content:""}.fa-venus:before{content:""}.fa-mars:before{content:""}.fa-mercury:before{content:""}.fa-intersex:before,.fa-transgender:before{content:""}.fa-transgender-alt:before{content:""}.fa-venus-double:before{content:""}.fa-mars-double:before{content:""}.fa-venus-mars:before{content:""}.fa-mars-stroke:before{content:""}.fa-mars-stroke-v:before{content:""}.fa-mars-stroke-h:before{content:""}.fa-neuter:before{content:""}.fa-genderless:before{content:""}.fa-facebook-official:before{content:""}.fa-pinterest-p:before{content:""}.fa-whatsapp:before{content:""}.fa-server:before{content:""}.fa-user-plus:before{content:""}.fa-user-times:before{content:""}.fa-hotel:before,.fa-bed:before{content:""}.fa-viacoin:before{content:""}.fa-train:before{content:""}.fa-subway:before{content:""}.fa-medium:before{content:""}.fa-yc:before,.fa-y-combinator:before{content:""}.fa-optin-monster:before{content:""}.fa-opencart:before{content:""}.fa-expeditedssl:before{content:""}.fa-battery-4:before,.fa-battery-full:before{content:""}.fa-battery-3:before,.fa-battery-three-quarters:before{content:""}.fa-battery-2:before,.fa-battery-half:before{content:""}.fa-battery-1:before,.fa-battery-quarter:before{content:""}.fa-battery-0:before,.fa-battery-empty:before{content:""}.fa-mouse-pointer:before{content:""}.fa-i-cursor:before{content:""}.fa-object-group:before{content:""}.fa-object-ungroup:before{content:""}.fa-sticky-note:before{content:""}.fa-sticky-note-o:before{content:""}.fa-cc-jcb:before{content:""}.fa-cc-diners-club:before{content:""}.fa-clone:before{content:""}.fa-balance-scale:before{content:""}.fa-hourglass-o:before{content:""}.fa-hourglass-1:before,.fa-hourglass-start:before{content:""}.fa-hourglass-2:before,.fa-hourglass-half:before{content:""}.fa-hourglass-3:before,.fa-hourglass-end:before{content:""}.fa-hourglass:before{content:""}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:""}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:""}.fa-hand-scissors-o:before{content:""}.fa-hand-lizard-o:before{content:""}.fa-hand-spock-o:before{content:""}.fa-hand-pointer-o:before{content:""}.fa-hand-peace-o:before{content:""}.fa-trademark:before{content:""}.fa-registered:before{content:""}.fa-creative-commons:before{content:""}.fa-gg:before{content:""}.fa-gg-circle:before{content:""}.fa-tripadvisor:before{content:""}.fa-odnoklassniki:before{content:""}.fa-odnoklassniki-square:before{content:""}.fa-get-pocket:before{content:""}.fa-wikipedia-w:before{content:""}.fa-safari:before{content:""}.fa-chrome:before{content:""}.fa-firefox:before{content:""}.fa-opera:before{content:""}.fa-internet-explorer:before{content:""}.fa-tv:before,.fa-television:before{content:""}.fa-contao:before{content:""}.fa-500px:before{content:""}.fa-amazon:before{content:""}.fa-calendar-plus-o:before{content:""}.fa-calendar-minus-o:before{content:""}.fa-calendar-times-o:before{content:""}.fa-calendar-check-o:before{content:""}.fa-industry:before{content:""}.fa-map-pin:before{content:""}.fa-map-signs:before{content:""}.fa-map-o:before{content:""}.fa-map:before{content:""}.fa-commenting:before{content:""}.fa-commenting-o:before{content:""}.fa-houzz:before{content:""}.fa-vimeo:before{content:""}.fa-black-tie:before{content:""}.fa-fonticons:before{content:""}.fa-reddit-alien:before{content:""}.fa-edge:before{content:""}.fa-credit-card-alt:before{content:""}.fa-codiepie:before{content:""}.fa-modx:before{content:""}.fa-fort-awesome:before{content:""}.fa-usb:before{content:""}.fa-product-hunt:before{content:""}.fa-mixcloud:before{content:""}.fa-scribd:before{content:""}.fa-pause-circle:before{content:""}.fa-pause-circle-o:before{content:""}.fa-stop-circle:before{content:""}.fa-stop-circle-o:before{content:""}.fa-shopping-bag:before{content:""}.fa-shopping-basket:before{content:""}.fa-hashtag:before{content:""}.fa-bluetooth:before{content:""}.fa-bluetooth-b:before{content:""}.fa-percent:before{content:""}@font-face{font-family:"Source Sans Pro";font-weight:300;font-style:normal;font-stretch:normal;src:url("fonts/source-sans-pro/EOT/SourceSansPro-Light.eot") format("embedded-opentype"),url("fonts/source-sans-pro/WOFF/OTF/SourceSansPro-Light.otf.woff") format("woff"),url("fonts/source-sans-pro/OTF/SourceSansPro-Light.otf") format("opentype"),url("fonts/source-sans-pro/TTF/SourceSansPro-Light.ttf") format("truetype")}@font-face{font-family:"Source Sans Pro";font-weight:300;font-style:italic;font-stretch:normal;src:url("fonts/source-sans-pro/EOT/SourceSansPro-LightIt.eot") format("embedded-opentype"),url("fonts/source-sans-pro/WOFF/OTF/SourceSansPro-LightIt.otf.woff") format("woff"),url("fonts/source-sans-pro/OTF/SourceSansPro-LightIt.otf") format("opentype"),url("fonts/source-sans-pro/TTF/SourceSansPro-LightIt.ttf") format("truetype")}@font-face{font-family:"Source Sans Pro";font-weight:400;font-style:normal;font-stretch:normal;src:url("fonts/source-sans-pro/EOT/SourceSansPro-Regular.eot") format("embedded-opentype"),url("fonts/source-sans-pro/WOFF/OTF/SourceSansPro-Regular.otf.woff") format("woff"),url("fonts/source-sans-pro/OTF/SourceSansPro-Regular.otf") format("opentype"),url("fonts/source-sans-pro/TTF/SourceSansPro-Regular.ttf") format("truetype")}@font-face{font-family:"Source Sans Pro";font-weight:400;font-style:italic;font-stretch:normal;src:url("fonts/source-sans-pro/EOT/SourceSansPro-It.eot") format("embedded-opentype"),url("fonts/source-sans-pro/WOFF/OTF/SourceSansPro-It.otf.woff") format("woff"),url("fonts/source-sans-pro/OTF/SourceSansPro-It.otf") format("opentype"),url("fonts/source-sans-pro/TTF/SourceSansPro-It.ttf") format("truetype")}@font-face{font-family:"Source Sans Pro";font-weight:600;font-style:normal;font-stretch:normal;src:url("fonts/source-sans-pro/EOT/SourceSansPro-Semibold.eot") format("embedded-opentype"),url("fonts/source-sans-pro/WOFF/OTF/SourceSansPro-Semibold.otf.woff") format("woff"),url("fonts/source-sans-pro/OTF/SourceSansPro-Semibold.otf") format("opentype"),url("fonts/source-sans-pro/TTF/SourceSansPro-Semibold.ttf") format("truetype")}@font-face{font-family:"Source Sans Pro";font-weight:600;font-style:italic;font-stretch:normal;src:url("fonts/source-sans-pro/EOT/SourceSansPro-SemiboldIt.eot") format("embedded-opentype"),url("fonts/source-sans-pro/WOFF/OTF/SourceSansPro-SemiboldIt.otf.woff") format("woff"),url("fonts/source-sans-pro/OTF/SourceSansPro-SemiboldIt.otf") format("opentype"),url("fonts/source-sans-pro/TTF/SourceSansPro-SemiboldIt.ttf") format("truetype")}@font-face{font-family:"Source Sans Pro";font-weight:700;font-style:normal;font-stretch:normal;src:url("fonts/source-sans-pro/EOT/SourceSansPro-Bold.eot") format("embedded-opentype"),url("fonts/source-sans-pro/WOFF/OTF/SourceSansPro-Bold.otf.woff") format("woff"),url("fonts/source-sans-pro/OTF/SourceSansPro-Bold.otf") format("opentype"),url("fonts/source-sans-pro/TTF/SourceSansPro-Bold.ttf") format("truetype")}@font-face{font-family:"Source Sans Pro";font-weight:700;font-style:italic;font-stretch:normal;src:url("fonts/source-sans-pro/EOT/SourceSansPro-BoldIt.eot") format("embedded-opentype"),url("fonts/source-sans-pro/WOFF/OTF/SourceSansPro-BoldIt.otf.woff") format("woff"),url("fonts/source-sans-pro/OTF/SourceSansPro-BoldIt.otf") format("opentype"),url("fonts/source-sans-pro/TTF/SourceSansPro-BoldIt.ttf") format("truetype")}@font-face{font-family:"Canva Sans Variable";font-weight:200 700;src:url("fonts/canva-sans-variable/WOFF/CanvaSans-VF.woff") format("woff"),url("fonts/canva-sans-display/TTF/CanvaSans-VF.ttf") format("truetype")}@font-face{font-family:"Canva Sans Display Variable";font-weight:200 700;src:url("fonts/canva-sans-variable/WOFF/CanvaSansDisplay-VF.woff") format("woff"),url("fonts/canva-sans-variable/TTF/CanvaSansDisplay-VF.ttf") format("truetype")}.content.shaded-bg{background:#eee;display:flex;flex-direction:column;justify-content:center}.content.full-height{height:100vh}.row{position:relative;width:100%}.row .row-inner{position:relative;padding:0 20px;margin:auto;max-width:520px}@media(min-width: 620px){.row .row-inner{max-width:620px}}@media(min-width: 820px){.row .row-inner{max-width:820px}}@media(min-width: 1020px){.row .row-inner{max-width:1020px}}@media(min-width: 1220px){.row .row-inner{max-width:1220px}}@media(min-width: 1600px){.row .row-inner{max-width:1600px}}.row .row-inner.narrow{max-width:800px}.row .row-inner.extra-narrow{max-width:620px}.row .row-header h1.collapser{color:#777;font-weight:500;font-size:.75em;letter-spacing:.1em;text-transform:uppercase;margin-bottom:.5em}.row .row-menus .row-menu{height:1.7em;display:inline-block;vertical-align:middle}.row .row-menus .row-menu.right{float:right}.row .row-menus .row-menu .menu-item{display:inline;color:#333}.row .row-menus .row-menu .menu-item i{margin-left:10px;color:#555;font-size:1em}.row .row-menus .row-menu .menu-item .label{font-size:.8em}.row .row-menus .row-menu .menu-item.selected{bottom:2px solid}@media only screen and (max-width: 1100px){.row .row-menus .row-menu .menu-item .label{display:none}}@media only screen and (max-width: 600px){.row .row-menus .row-menu .menu-label{display:none}}.page-header{display:flex;flex-direction:column;align-items:center;align-items:flex-start;position:relative;margin:0 0 10px;padding:20px 0}.page-header h1{display:inline-block;font-size:18px;height:24px}.page-header h2{font-size:16px;font-weight:100;line-height:1em}@media(min-width: 620px){.page-header h2{font-size:36px}}@media(min-width: 820px){.page-header{flex-direction:row}.page-header h2{font-size:42px;margin-top:42px}}@media(min-width: 1220px){.page-header h2{font-size:48px}}.clickable{cursor:pointer}.clickable:hover{opacity:.5}.clickable.selected,.clickable.selected:hover{opacity:1;cursor:default}.clickable[disabled]{opacity:.5;cursor:default}button.clickable{border:none;background:none}.is-touch .clickable:hover{opacity:1}.no-select{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.fa-chevron-down{-webkit-text-stroke:1px #fff}.dropdown{height:40px;padding-top:12px;position:relative}.dropdown .dropdown-head{padding:0;font-size:18px}.dropdown .dropdown-head .current{font-size:1em;margin:0 5px;cursor:default}.dropdown .dropdown-head .dropdown-chevron{font-size:10px}.dropdown .dropdown-label{display:inline-block;font-size:12px;padding:.6em .4em .2em;text-transform:uppercase;letter-spacing:1px;vertical-align:middle}.dropdown .dropdown-list{display:none;background:#fff;border-radius:3px;box-shadow:0 1px 4px rgba(0,0,0,.2);position:absolute;margin-top:0;margin-bottom:40px;left:0;padding:0;min-width:100%;max-height:60vh;overflow-x:hidden;overflow-y:auto}.dropdown .dropdown-list .dropdown-category{text-transform:uppercase;font-size:12px;font-weight:600;padding:9px 60px 9px 6px;color:#fff;background-color:#777}.dropdown .dropdown-list .dropdown-item{display:flex;flex-direction:row;flex-wrap:nowrap;align-content:center;justify-content:flex-start;align-items:center;cursor:pointer;border-bottom:1px solid #eaeaea;padding:12px 60px 12px 12px;font-weight:normal;position:relative;white-space:nowrap}.dropdown .dropdown-list .dropdown-item i{margin-right:7px;margin-left:2px}.dropdown .dropdown-list .dropdown-item img{margin-right:5px;height:16px;width:auto}.dropdown .dropdown-list .dropdown-item.selected,.dropdown .dropdown-list .dropdown-item:not(.dropdown-category):hover{background:#eee}.dropdown .dropdown-list .dropdown-item:last-child{border-bottom:none}.dropdown .dropdown-list .dropdown-item.current::before{font-family:FontAwesome;content:"";position:absolute;right:11px;top:12px;color:#666;pointer-events:none}.dropdown .dropdown-list .dropdown-item.upgrade-btn::after{top:12px;right:8px}.dropdown .dropdown-list form.dropdown-item{padding:0}.dropdown .dropdown-list form.dropdown-item button{background:rgba(0,0,0,0);font-size:inherit;display:block;width:100%;border:none;cursor:pointer;padding:12px 60px 12px 12px;text-align:left}.dropdown .dropdown-list form.dropdown-item:hover button{opacity:.75}.dropdown.right-aligned .dropdown-head{text-align:right}.dropdown.right-aligned .dropdown-list{right:0;left:auto}.dropdown.autocomplete{display:none;height:0}.dropdown.autocomplete.open{display:block;height:auto}.dropdown.autocomplete.open .dropdown-list,.dropdown.click-to-open.open:hover .dropdown-list,.dropdown:not(.click-to-open):hover .dropdown-list{animation:dropdown-out 200ms;display:block;z-index:999}@media(min-width: 420px){.dropdown{padding-top:21px}.dropdown.autocomplete{padding-top:0}}.dialog .dropdown-list{max-height:30vh}@keyframes dropdown-out{0%{opacity:0;transform:translateY(-10px);pointer-events:none}100%{opacity:1;transform:translateY(0);pointer-events:auto}}.menu{overflow:hidden;display:inline-block;margin-left:1em}.menu:first-child,.menu:first-of-type{margin-left:0}.menu .menu-label{display:inline-block;font-size:.75em;margin-top:.25em;padding:18px 12px 0;text-transform:uppercase;letter-spacing:1px;vertical-align:middle}.menu .menu-item{display:inline-block;font-size:1em;padding:0;vertical-align:middle;cursor:pointer;font-weight:500;margin-right:40px;padding-top:21px}.menu .menu-item a:hover{opacity:1}.menu .menu-item#sign-in{padding-top:0;margin:0}.menu .menu-item.small{font-size:.85em;font-weight:400}.menu .menu-item:hover{color:#888}.menu .menu-item.selected{border-color:#333}.menu .menu-item.selected:hover{color:#333}.menu .menu-item.space-right{padding-right:50px}.menu .menu-item.space-left{padding-left:50px}#preview-menu{float:left;margin-top:7px;width:0}#preview-menu .menu-item{padding:0;font-size:12px;margin-right:5px;padding-right:5px;opacity:.5}#preview-menu .menu-item.selected{opacity:1}#preview-menu .menu-item.selected .label{text-decoration:underline}#preview-menu .menu-item:last-child{border-right:none;padding-right:0}#preview-menu #editor-previews{display:none}#preview-menu #editor-custom-inputs input{width:44px;border:none;border-radius:3px;padding-left:5px;background:#fff;outline:none}#preview-menu #editor-custom-inputs input:first-child{margin-right:-10px;position:relative;z-index:2}#preview-menu #editor-custom-inputs input:last-child{margin-left:5px}#preview-menu #editor-preview{border-right:none}@media(min-width: 820px){#preview-menu{width:230px}#preview-menu .menu-item{display:inline-block}#preview-menu .menu-item#full-preview{padding-right:12px;margin-right:10px;border-right:1px solid rgba(0,0,0,.2)}#preview-menu #editor-previews{display:inline-block}#preview-menu #editor-previews.hidden{display:none}}button{font-family:"Source Sans Pro",sans-serif}.btn{font-size:12px;border:none;font-weight:bold;font-family:inherit;border-radius:3px;overflow:hidden;display:inline-block;vertical-align:middle;padding:0 8px;height:24px;line-height:22px;cursor:pointer;text-align:left;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background:#eee}.btn i{margin-right:3px}.btn.fa{font-family:FontAwesome}.btn .no-padding{padding:0}.btn.selected,.btn.selected:hover{background-color:#dd4141;color:#fff;cursor:default}.btn.upgrade{background:#eaa22d;color:#fff}.btn.upgrade.business{background:#93366e}.btn.upgrade:hover{background:#e69717}.btn.upgrade:hover.business{background:#802f60}.btn.available{background:#5cb85c;color:#fff}.btn.available:hover{background:#4cae4c}.btn.danger{background:#dd4141;color:#fff}.btn.danger:not(.disabled):hover{background:#d92b2b}.btn.primary{background:#333;color:#fff}.btn.caution{background:orange;color:#fff}.btn.caution:hover{background:#e69500}.btn.neutral{background:#888;color:#fff}.btn.neutral:not(.disabled):hover{background:#7b7b7b}.btn.control-btn{background:rgba(0,0,0,.5);border-color:rgba(230,230,230,.7);width:34px;height:34px;padding:9px 0 0;font-size:1em;margin-right:.2em;color:#fff}.btn.control-btn:hover{background:#111}.selected.template .btn.control-btn.template-select{background:#5cb85c}.btn.disabled{pointer-events:none;opacity:.5}.btn.create-new,.btn.create,.btn.cta{background:#2886b2;border:1px solid #17739d;color:#fff}@media(min-width: 520px){.btn{font-size:14px;padding:0 8px;line-height:28px;height:30px}}@media(min-width: 920px){.btn{padding:0 12px;line-height:34px;height:36px}}.upgrade-btn{position:relative}.upgrade-btn:not(.left):after{display:block;width:20px;height:20px;border-radius:9999px;background-color:#eaa22d;border:2px solid #fff;content:"";font-family:FontAwesome;top:-8px;right:-8px;color:#fff;font-size:9px;box-sizing:border-box;position:absolute;line-height:16px;text-align:center}.upgrade-btn.business::after{background-color:#93366e}.upgrade-btn.left{position:absolute;right:unset;transform:translate(calc(-100% - 10px), 2px)}.upgrade-btn.left:after{font-style:normal;display:block;width:16px;height:16px;border-radius:9999px;background-color:#eaa22d;border:2px solid #fff;content:"";font-family:FontAwesome;color:#fff;font-size:9px;box-sizing:border-box;line-height:12px;text-align:center}.dropdown-btn{font-size:14px;height:2em;border:1px solid #ccc;border-radius:3px;background-color:#eee;position:relative;display:inline-block;vertical-align:middle;margin-left:7px;z-index:102}.dropdown-btn:first-child{margin-left:0}.dropdown-btn .btn{border-radius:0;height:100%;line-height:1.75em;border:0;border-left:1px solid #ddd;font-size:inherit;background:none}.dropdown-btn .arrow{padding:0 .5em}.dropdown-btn .arrow i{margin-right:0}.dropdown-btn .options{position:absolute;right:0;top:2em;background:#fff;margin-top:5px;box-shadow:0 0 5px rgba(0,0,0,.3);line-height:initial}.dropdown-btn .options .option{position:relative;width:280px;border-top:1px solid #ccc;padding:.5em 1em .5em 3em;cursor:pointer}.dropdown-btn .options .option:first-child{border-top:none}.dropdown-btn .options .option .option-title{font-weight:bold}.dropdown-btn .options .option .option-description{font-size:.85em}.dropdown-btn .options .option .option-check{display:none;position:absolute;top:10px;transform:translate(calc(-100% - 12px), 0)}.dropdown-btn .options .option.selected .option-check{display:block}.dropdown-btn .options .option:hover{background-color:#add8e6}.btn-group{font-size:14px;height:2em;border:1px solid #ccc;border-radius:3px;overflow:hidden;position:relative;display:inline-block;vertical-align:middle;margin-left:7px}.btn-group:first-child{margin-left:0}.btn-group .btn{border-radius:0;height:100%;line-height:1.75em;border:0;border-left:1px solid #ddd;font-size:inherit}.btn-group .btn:first-child{border:none}.btn-group.tabs:not(.can-stack){border:0;border-radius:0}.btn-group.tabs:not(.can-stack) .btn.tab{display:inline-block;border-top-right-radius:3px;border-top-left-radius:3px;border-bottom:none;padding-top:5px;line-height:1}.btn-group.tabs:not(.can-stack) .btn.tab:first-child{margin-left:0}.btn-group.can-stack{margin-left:0;height:auto}.btn-group.can-stack .btn{width:100%;border:0;padding:4px 8px 5px;height:auto;border-top:1px solid #ddd}.btn-group.can-stack .btn:first-child{border:none}.tab-buttons{white-space:nowrap;display:inline-block;margin:5px 0 0}.tab-buttons button{appearance:none;-webkit-appearance:none;box-shadow:none;border:none;margin:0;padding:0 8px;width:80px;height:20px;font-family:"Source Sans Pro";color:#757575;background:#fff;border-radius:3px 0 0 3px}.tab-buttons button:not([disabled]):hover{opacity:1;color:#333}.tab-buttons button.active{background-color:#2886b2;font-weight:bold;color:#fff;cursor:default}.tab-buttons button.active:hover{opacity:1;color:#fff}.tab-buttons button:last-child{border-radius:0 3px 3px 0}.tab-panes{position:relative;overflow-x:hidden}.tab-pane{position:absolute;top:0;width:100%;height:100%;left:100vw;pointer-events:none}.tab-pane.active{left:0;pointer-events:auto}.check{width:16px;height:16px;display:inline-block;position:relative;vertical-align:middle;border-radius:4px;border:1px solid #ccc;cursor:pointer;overflow:hidden;font-family:helvetica,arial;text-align:center;margin:3px 10px;background:#428bca}.check:after{opacity:0;content:"";position:absolute;width:7px;height:4px;background:rgba(0,0,0,0);top:2px;left:2px;border:3px solid #fff;border-top:none;border-right:none;-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg)}.check:hover::after{opacity:.3}.check.selected:after{opacity:1}.toggle-single{cursor:pointer;padding:0 5px}.toggle-single input[type=checkbox]{display:none}.toggle-single input[type=checkbox]:checked+.toggle-label{opacity:1}.toggle-single .toggle-label{opacity:.4}.toggle-single:hover .toggle-label{opacity:1}.toggle-single:hover input[type=checkbox]:checked+.toggle-label{opacity:1}input[type=search]{border:1px solid #e1e1e1;border-radius:3px;font-size:14px;padding:7px 8px;margin:0}input[type=search]:focus{outline:0;border-color:#ababab}input::-webkit-search-cancel-button{-webkit-appearance:none}.slider-container input{width:0;height:0;opacity:0;margin:0;display:inline-block;vertical-align:top;font-size:0;line-height:0;position:absolute}.slider-container input:focus-visible+.slider:after{border:1px solid #777}.slider-container input:checked:focus-visible+.slider:after{border:1px solid #032a3c}.slider-container .slider{position:relative;cursor:pointer;display:inline-block;width:33px;height:30px;background:rgba(0,0,0,0);padding-left:0;padding-top:0}.slider-container .slider:hover:after{border-color:#bbb}.slider-container .slider:before{position:absolute;content:"";height:12px;width:33px;top:9px;left:0;border-radius:6px;background-color:#ddd;-webkit-transition:200ms;transition:200ms}.slider-container .slider:after{position:absolute;content:"";height:24px;width:24px;left:0;bottom:3px;border-radius:50%;background-color:#fff;border:1px solid #ddd;box-sizing:border-box;-webkit-transition:200ms;transition:200ms}.slider-container input:checked+.slider:before{background:#ccdee6}.slider-container input:checked+.slider:after{left:9px;background:#2886b2;border-color:#2886b2}.slider-container input:checked+.slider:hover:after{background-color:#2886b2;border-color:#2886b2}.slider-container.small input:checked+.slider:after{left:9px}.slider-container.small .slider{height:24px}.slider-container.small .slider:before{height:9px;width:27px;top:7px;left:0}.slider-container.small .slider:after{height:18px;width:18px;left:0;bottom:3px}input[type=url]{padding-right:30px}button.upload{width:30px;height:30px;background:#eee;position:absolute;bottom:0;left:100%;appearance:none;-webkit-appearance:none;border:none;outline:none;border-radius:0 3px 3px 0;font-size:18px;color:#999;margin-left:-35px;cursor:pointer}button.upload:hover{color:#777}.circle-icon{width:1.2em;height:1.2em;font-size:.8em;border-radius:50%;background:#000;color:#fff;display:inline-block;text-align:center;line-height:1.1em}.circle-icon i{font-size:.75em}.circle-icon:last-child{margin-right:0}.flourish-popup{pointer-events:none;z-index:111;font-size:13px;max-width:280px;line-height:1.2em}.flourish-popup-svg{pointer-events:none}.flourish-popup .popup-content-header,.popup .popup-content-header{display:block !important;font-size:1em;font-weight:bold}.flourish-popup .popup-content-body,.popup .popup-content-body{display:block !important;font-size:.9em}.popup .popup-content-wrapper{position:absolute;background:rgba(0,0,0,0);width:280px;height:auto;left:0;display:none;pointer-events:none;text-align:left}.popup .popup-content-outer{display:inline-block;padding-bottom:14px;background:rgba(0,0,0,0);pointer-events:auto;position:relative}.popup .popup-content-inner{pointer-events:auto;display:inline-block;width:auto;max-width:280px;background:#fff;color:#333;font-family:"Source Sans Pro";font-weight:normal;line-height:1.2em;font-size:13px;padding:10px;border-radius:3px;box-shadow:rgba(0,0,0,.2) 0 0 10px;text-align:left;user-select:text}.popup .popup-content-inner a{color:#2886b2;font-weight:bold}.popup .popup-content-inner pre{font-size:10px;background:#eee;border-radius:2px;user-select:all;padding:3px 0;white-space:pre-line}.popup .popup-content-arrow{position:absolute;width:10px;height:10px;display:block;bottom:4px}.popup .popup-content-arrow:before{content:"";display:block;width:0;height:0;border-left:5px solid rgba(0,0,0,0);border-right:5px solid rgba(0,0,0,0);border-top:5px solid #fff}.popup[data-popup-position=bottom] .popup-content-outer{padding-bottom:0;padding-top:8px}.popup[data-popup-position=bottom] .popup-content-arrow{top:4px}.popup[data-popup-position=bottom] .popup-content-arrow:before{bottom:auto;border-left:5px solid rgba(0,0,0,0);border-right:5px solid rgba(0,0,0,0);border-bottom:5px solid #fff;border-top:none}.dialog{position:fixed;width:100%;height:100%;top:0;left:0;background:rgba(255,255,255,.75);display:flex;align-items:center;justify-content:center}.dialog .dialog-inner{background:#fff;padding:36px 30px 30px;box-shadow:0 1px 4px rgba(0,0,0,.2);border-radius:3px;margin:20px;max-width:calc(100% - 40px);max-height:80vh;overflow:auto}.dialog .dialog-inner.loading-data{display:flex;flex-direction:column;align-items:center}.dialog .dialog-inner textarea{resize:vertical}.dialog .dialog-inner .loading-spinner{display:flex;justify-content:center}.dialog .dialog-inner .btns.loading{display:flex;justify-content:center}.dialog .dialog-inner img{width:100%;margin-top:12px}.dialog:focus{outline:none}.dialog,.detailed-settings .settings-block{z-index:113}.dialog .btn,.detailed-settings .settings-block .btn{margin-bottom:5px}.dialog .btn.secondary,.detailed-settings .settings-block .btn.secondary{background:none;text-decoration:underline;font-weight:normal}.dialog .btn.data-magic-primary,.detailed-settings .settings-block .btn.data-magic-primary{background:#2886b2;color:#fff}.dialog .btn.data-magic-secondary,.detailed-settings .settings-block .btn.data-magic-secondary{color:#989898;background:none;font-weight:400}.dialog .dialog-inner .text,.detailed-settings .settings-block .dialog-inner .text{margin-bottom:30px}.dialog .dialog-inner .text.loading,.detailed-settings .settings-block .dialog-inner .text.loading{display:flex;flex-direction:column;align-items:center}.dialog .dialog-inner .text h1,.detailed-settings .settings-block .dialog-inner .text h1{font-weight:bold;font-size:18px;margin-bottom:1rem}.dialog .dialog-inner .text h1 .import-ready,.detailed-settings .settings-block .dialog-inner .text h1 .import-ready{margin-right:10px}.dialog .dialog-inner .text h1 .file-name,.detailed-settings .settings-block .dialog-inner .text h1 .file-name{display:inline-block;font-weight:normal;overflow:hidden;text-overflow:ellipsis;max-width:100%}.dialog .dialog-inner .text h2,.detailed-settings .settings-block .dialog-inner .text h2{font-weight:600;font-size:16px;color:#333;margin:10px 0 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dialog .dialog-inner .text hr,.detailed-settings .settings-block .dialog-inner .text hr{margin:15px 0;opacity:.3}.dialog .dialog-inner .text p,.dialog .dialog-inner .text label,.dialog .dialog-inner .text details,.dialog .dialog-inner .text summary,.detailed-settings .settings-block .dialog-inner .text p,.detailed-settings .settings-block .dialog-inner .text label,.detailed-settings .settings-block .dialog-inner .text details,.detailed-settings .settings-block .dialog-inner .text summary{font-size:14px;line-height:1.25em;color:#777;margin-bottom:6px;position:relative}.dialog .dialog-inner .text p.alert,.dialog .dialog-inner .text label.alert,.dialog .dialog-inner .text details.alert,.dialog .dialog-inner .text summary.alert,.detailed-settings .settings-block .dialog-inner .text p.alert,.detailed-settings .settings-block .dialog-inner .text label.alert,.detailed-settings .settings-block .dialog-inner .text details.alert,.detailed-settings .settings-block .dialog-inner .text summary.alert{color:#c64c61;margin-top:.5em}.dialog .dialog-inner .text p.small,.dialog .dialog-inner .text label.small,.dialog .dialog-inner .text details.small,.dialog .dialog-inner .text summary.small,.detailed-settings .settings-block .dialog-inner .text p.small,.detailed-settings .settings-block .dialog-inner .text label.small,.detailed-settings .settings-block .dialog-inner .text details.small,.detailed-settings .settings-block .dialog-inner .text summary.small{font-size:14px;line-height:21px}.dialog .dialog-inner .text p.big,.dialog .dialog-inner .text label.big,.dialog .dialog-inner .text details.big,.dialog .dialog-inner .text summary.big,.detailed-settings .settings-block .dialog-inner .text p.big,.detailed-settings .settings-block .dialog-inner .text label.big,.detailed-settings .settings-block .dialog-inner .text details.big,.detailed-settings .settings-block .dialog-inner .text summary.big{color:#333}.dialog .dialog-inner .text p i.alert,.dialog .dialog-inner .text label i.alert,.dialog .dialog-inner .text details i.alert,.dialog .dialog-inner .text summary i.alert,.detailed-settings .settings-block .dialog-inner .text p i.alert,.detailed-settings .settings-block .dialog-inner .text label i.alert,.detailed-settings .settings-block .dialog-inner .text details i.alert,.detailed-settings .settings-block .dialog-inner .text summary i.alert{color:#c64c61;margin-right:5px}.dialog .dialog-inner .text p span.alert,.dialog .dialog-inner .text label span.alert,.dialog .dialog-inner .text details span.alert,.dialog .dialog-inner .text summary span.alert,.detailed-settings .settings-block .dialog-inner .text p span.alert,.detailed-settings .settings-block .dialog-inner .text label span.alert,.detailed-settings .settings-block .dialog-inner .text details span.alert,.detailed-settings .settings-block .dialog-inner .text summary span.alert{color:#c64c61}.dialog .dialog-inner .text p span.bold,.dialog .dialog-inner .text label span.bold,.dialog .dialog-inner .text details span.bold,.dialog .dialog-inner .text summary span.bold,.detailed-settings .settings-block .dialog-inner .text p span.bold,.detailed-settings .settings-block .dialog-inner .text label span.bold,.detailed-settings .settings-block .dialog-inner .text details span.bold,.detailed-settings .settings-block .dialog-inner .text summary span.bold{font-weight:bold}.dialog .dialog-inner .text .import-settings,.detailed-settings .settings-block .dialog-inner .text .import-settings{cursor:pointer;margin-top:1rem;margin-bottom:1rem}.dialog .dialog-inner .text .import-settings label,.detailed-settings .settings-block .dialog-inner .text .import-settings label{display:flex;font-size:.85em;font-weight:400}.dialog .dialog-inner .text details summary+p,.detailed-settings .settings-block .dialog-inner .text details summary+p{margin-top:.5em}.dialog .dialog-inner .text a,.detailed-settings .settings-block .dialog-inner .text a{text-decoration:underline}.dialog .dialog-inner .text a.canva-link,.detailed-settings .settings-block .dialog-inner .text a.canva-link{text-decoration:none}.dialog .dialog-inner .text textarea,.dialog .dialog-inner .text input,.dialog .dialog-inner .text select,.detailed-settings .settings-block .dialog-inner .text textarea,.detailed-settings .settings-block .dialog-inner .text input,.detailed-settings .settings-block .dialog-inner .text select{border-radius:3px;border:1px solid #ddd;width:100%;padding:.2em .1em .2em .3em;min-height:30px;font-size:13px;transition:200ms linear border}.dialog .dialog-inner .text textarea:focus,.dialog .dialog-inner .text input:focus,.dialog .dialog-inner .text select:focus,.detailed-settings .settings-block .dialog-inner .text textarea:focus,.detailed-settings .settings-block .dialog-inner .text input:focus,.detailed-settings .settings-block .dialog-inner .text select:focus{border:1px solid #777}.dialog .dialog-inner .text textarea.narrow,.dialog .dialog-inner .text input.narrow,.dialog .dialog-inner .text select.narrow,.detailed-settings .settings-block .dialog-inner .text textarea.narrow,.detailed-settings .settings-block .dialog-inner .text input.narrow,.detailed-settings .settings-block .dialog-inner .text select.narrow{width:50px;margin-right:1em}.dialog .dialog-inner .text textarea.medium,.dialog .dialog-inner .text input.medium,.dialog .dialog-inner .text select.medium,.detailed-settings .settings-block .dialog-inner .text textarea.medium,.detailed-settings .settings-block .dialog-inner .text input.medium,.detailed-settings .settings-block .dialog-inner .text select.medium{width:200px}.dialog .dialog-inner .text progress,.detailed-settings .settings-block .dialog-inner .text progress{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%;height:20px;border:none;overflow:hidden;border-radius:10px;background:#eee}.dialog .dialog-inner .text progress::-webkit-progress-bar,.detailed-settings .settings-block .dialog-inner .text progress::-webkit-progress-bar{border:none;border-radius:10px;background:#eee;overflow:hidden}.dialog .dialog-inner .text progress::-webkit-progress-value,.detailed-settings .settings-block .dialog-inner .text progress::-webkit-progress-value{border:none;background-color:#2886b2}.dialog .dialog-inner .text progress::-moz-progress-bar,.detailed-settings .settings-block .dialog-inner .text progress::-moz-progress-bar{border:none;background-color:#2886b2}.dialog .dialog-inner .text table,.detailed-settings .settings-block .dialog-inner .text table{border:1px solid #ddd;width:100%;border-collapse:collapse}.dialog .dialog-inner .text table td,.detailed-settings .settings-block .dialog-inner .text table td{border:1px solid #ddd;padding:2px 4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;height:26px;max-width:170px}.dialog .dialog-inner .text select,.detailed-settings .settings-block .dialog-inner .text select{outline:none}.dialog .dialog-inner .text ul.plain,.detailed-settings .settings-block .dialog-inner .text ul.plain{list-style:none;padding:0}.dialog .dialog-inner .text ul.plain li,.detailed-settings .settings-block .dialog-inner .text ul.plain li{padding:0}.dialog .dialog-inner .text label:first-child,.detailed-settings .settings-block .dialog-inner .text label:first-child{display:inline-block}.dialog .dialog-inner .text label:first-child:last-child,.detailed-settings .settings-block .dialog-inner .text label:first-child:last-child{width:100%}.dialog .dialog-inner .text input[type=number],.detailed-settings .settings-block .dialog-inner .text input[type=number]{width:90px}.dialog .dialog-inner .text input[type=checkbox],.dialog .dialog-inner .text input[type=radio],.detailed-settings .settings-block .dialog-inner .text input[type=checkbox],.detailed-settings .settings-block .dialog-inner .text input[type=radio]{width:auto;margin-right:.4em;min-height:auto}.dialog .dialog-inner .text textarea,.detailed-settings .settings-block .dialog-inner .text textarea{padding:.1em;height:5em}.dialog .dialog-inner .text textarea.code,.detailed-settings .settings-block .dialog-inner .text textarea.code{font-family:monospace;font-size:.8em;height:7em}.dialog .dialog-inner .text input[type=text][disabled],.detailed-settings .settings-block .dialog-inner .text input[type=text][disabled]{opacity:.5}.dialog .dialog-inner .text label,.detailed-settings .settings-block .dialog-inner .text label{display:inline-block;font-weight:600;color:#333;margin:.5em .5em .25em 0}.dialog .dialog-inner .text label.narrow,.detailed-settings .settings-block .dialog-inner .text label.narrow{width:50px}.dialog .dialog-inner .text label span,.detailed-settings .settings-block .dialog-inner .text label span{display:inline-block;color:#999;font-size:.85em;font-weight:500;line-height:1.2;padding-left:22px}.dialog .dialog-inner .text label select,.detailed-settings .settings-block .dialog-inner .text label select{width:auto}.dialog .dialog-inner .text label.indented,.detailed-settings .settings-block .dialog-inner .text label.indented{display:block;padding-left:22px;width:100%;position:relative}.dialog .dialog-inner .text label.indented input:first-child,.detailed-settings .settings-block .dialog-inner .text label.indented input:first-child{position:absolute;top:0;left:0}.dialog .dialog-inner .text figure,.detailed-settings .settings-block .dialog-inner .text figure{max-width:100%;max-height:120px;overflow:hidden}.dialog .dialog-inner .text figure img,.detailed-settings .settings-block .dialog-inner .text figure img{width:100%;height:100%;object-fit:contain}.dialog .dialog-inner .text .collapsed,.detailed-settings .settings-block .dialog-inner .text .collapsed{display:none}.dialog .dialog-inner .text button[name=toggle-collapse],.detailed-settings .settings-block .dialog-inner .text button[name=toggle-collapse]{-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;appearance:none;border:none;background:rgba(0,0,0,0);outline:none;font:inherit;padding:.5em 0}.dialog .dialog-inner .text .columns,.detailed-settings .settings-block .dialog-inner .text .columns{display:flex;align-items:flex-start;justify-content:flex-start;padding-bottom:16px}.dialog .dialog-inner .text .columns>div,.detailed-settings .settings-block .dialog-inner .text .columns>div{width:50%;padding-right:10px;overflow:hidden}.dialog .dialog-inner .text .columns>div>*,.detailed-settings .settings-block .dialog-inner .text .columns>div>*{max-width:100%}.dialog .dialog-inner .text button.upload,.detailed-settings .settings-block .dialog-inner .text button.upload{margin-left:-30px;height:25px;bottom:6px}.dialog .dialog-inner .upgrade,.detailed-settings .settings-block .dialog-inner .upgrade{margin:0 -30px -30px;padding:30px 30px 30px;background:#eaa22d;color:#fff}.dialog .dialog-inner .upgrade p,.detailed-settings .settings-block .dialog-inner .upgrade p{color:#fff}.dialog .dialog-inner .upgrade ul,.detailed-settings .settings-block .dialog-inner .upgrade ul{padding:0}.dialog .dialog-inner .upgrade ul li,.detailed-settings .settings-block .dialog-inner .upgrade ul li{margin-bottom:9px;list-style:none;padding-left:20px;position:relative}.dialog .dialog-inner .upgrade ul li i,.detailed-settings .settings-block .dialog-inner .upgrade ul li i{position:absolute;left:0;top:3px}.dialog .dialog-inner .upgrade .btn.convert,.detailed-settings .settings-block .dialog-inner .upgrade .btn.convert{background:#fff;color:#eaa22d}.dialog .dialog-inner .upgrade.business,.detailed-settings .settings-block .dialog-inner .upgrade.business{background-color:#93366e}.dialog .dialog-inner .upgrade.business .btn.convert,.detailed-settings .settings-block .dialog-inner .upgrade.business .btn.convert{color:#93366e}.dialog .mini-spreadsheet,.detailed-settings .settings-block .mini-spreadsheet{margin-top:10px}.hide-unpublished{display:none}body.published .hide-published{display:none}body.published .hide-unpublished{display:initial}.svg-defs{display:none}.empty-label{font-size:16px;font-weight:bold;color:#aaa;z-index:1;position:relative;width:80%;margin:0 auto}.empty-details{margin-top:.5em;color:#888}.empty-details:empty{margin:0}@media(min-width: 420px){.empty-label{font-size:18px}}.button-radio-group input,.hidden-radio-group input{opacity:0;position:absolute;pointer-events:none}.button-radio-group label,.hidden-radio-group label{cursor:pointer}.button-radio-group{display:flex;flex-wrap:wrap;gap:8px}@media(min-width: 820px){.button-radio-group{gap:4px}}.button-radio-group label{background:#fff;border:1px solid #e1e1e1;border-radius:43px;display:inline-block;padding:4px 6px;min-width:40px;text-align:center;transition:border-color 100ms;white-space:nowrap}.button-radio-group label:hover{border-color:#c8c8c8}@media(min-width: 820px)and (max-width: 1219px){.button-radio-group label{font-size:14px}}.button-radio-group input:checked+label{background:#007cad;border-color:#007cad;color:#fff}input[type=search],input[type=text],input[type=email],input[type=password],textarea{border:1px solid #e1e1e1;border-radius:3px;font-size:14px;padding:7px 8px;margin:0}input[type=search]:focus,input[type=text]:focus,input[type=email]:focus,input[type=password]:focus,textarea:focus{outline:0;border-color:#ababab}input[type=search]::-webkit-search-cancel-button,input[type=text]::-webkit-search-cancel-button,input[type=email]::-webkit-search-cancel-button,input[type=password]::-webkit-search-cancel-button,textarea::-webkit-search-cancel-button{-webkit-appearance:none}.loading-spinner{animation-name:spin;animation-duration:1.2s;animation-iteration-count:infinite;animation-timing-function:linear;transform-origin:center center}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.progress-container{border-radius:8px;background:#efefef;display:flex;height:30px;width:100%;overflow:hidden}.progress-container .progress-bar{min-width:1%;background-color:#007cad;height:100%;transition:width 300ms ease-in-out;background-image:linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-size:1rem 1rem;animation:progress-bar-stripes 1s linear infinite}@keyframes progress-bar-stripes{0%{background-position:1rem 0}100%{background-position:0 0}}.mobile-only{display:auto}@media(min-width: 820px){.mobile-only{display:none !important}}.sr-only{border:0 !important;clip:rect(1px, 1px, 1px, 1px) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;height:1px !important;margin:-1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important;white-space:nowrap !important}#sdk-tag{font-size:14px;margin-top:23px;display:inline-block;opacity:.2;font-weight:bold;position:absolute}@media(min-width: 420px){#sdk-tag{margin-top:33px}}.row.header{position:relative;top:0;background:#fff;border-bottom:1px solid #ccc;height:49px}.row.header #back-to-projects{width:48px;height:100%;border-right:1px solid #eee;display:block;text-align:center;padding-top:12px;font-size:19px}.row.header #back-to-projects.bosh img{width:20px}@media(min-width: 420px){.row.header #back-to-projects{font-size:21px;padding-top:16px;width:60px}}.row.header .row-inner{height:100%;padding-top:1px;padding-left:20px}.row.header .row-inner:after{clear:both;content:""}.row.header .menu-holder{width:auto;height:100%;display:inline-block;text-align:left;vertical-align:bottom;float:right}.row.header .hamburger{margin-top:6px}.row.header .logo{margin:6px 0 0;display:block;float:left;width:100px}.row.header .logo img{width:100px}.row.header .dropdown{margin-right:0;max-width:300px;position:absolute;right:20px}.row.header .mobile-nav{display:none}.row.header .mobile-nav .fa-bars{font-size:1.5em}.row.header .desktop-nav{padding-top:0}.row.header .user-settings{margin-top:10px;padding:5px 0 5px 40px;position:relative}.row.header .unsubscribed .user-settings{padding:0 0 0 40px}@media screen and (max-width: 819px){.row.header .desktop-nav{display:none}.row.header .mobile-nav{display:block}.row.header .menu-holder:hover{text-align:right}.row.header .menu-holder:hover .menu{display:block;position:fixed;padding:10px;background:#fff;top:40px;right:0;box-shadow:3px 3px 5px rgba(0,0,0,.1);border:1px solid rgba(0,0,0,.1)}.row.header .menu-holder:hover .menu .menu-item{display:block;padding:6px 0;color:#333;margin-right:0;font-size:14px;text-align:left}.row.header .menu-holder:hover .menu #sign-in .btn{background:#eee;font-size:14px;margin-top:12px}}@media(min-width: 420px){.row.header{height:61px}.row.header .logo{margin-top:10px;width:120px}.row.header .logo img{width:120px}.row.header .hamburger{margin-top:14px}}@media(min-width: 820px){.row.header .menu-holder{width:430px}.row.header.not-logged-in .menu-holder{width:580px}.row.header #sign-in{position:absolute;right:20px;top:0}.row.header #sign-in .btn{margin-top:12px;background-color:#eee}.row.header #sign-in a{display:block}}@media(min-width: 1020px){.row.header.not-logged-in .row-inner{max-width:1220px}}.row.header.app-showcase .sign-in{position:absolute;top:8px;right:20px;height:32px;font-size:14px;padding-top:.3em;line-height:1.4em}@media(min-width: 420px){.row.header.app-showcase .sign-in{top:12px;height:40px;font-size:16px;padding-top:.45em}}.is-static .row.header,.not-logged-in .row.header{background:rgba(0,0,0,0);box-shadow:none;z-index:3;border-color:rgba(0,0,0,0)}.is-static .row.header .row-inner,.not-logged-in .row.header .row-inner{display:block;position:relative}.is-static .row.header .row-inner:after,.not-logged-in .row.header .row-inner:after{border-bottom:1px solid rgba(255,255,255,.1);content:"";display:block;position:absolute;bottom:0;left:20px;right:20px}.is-static .row.header .menu-holder,.is-static .row.header .menu-holder:hover,.not-logged-in .row.header .menu-holder,.not-logged-in .row.header .menu-holder:hover{display:inline-block;width:calc(100% - 150px);text-align:right}.is-static .row.header .menu-holder .menu,.is-static .row.header .menu-holder:hover .menu,.not-logged-in .row.header .menu-holder .menu,.not-logged-in .row.header .menu-holder:hover .menu{min-width:150px;position:absolute;right:20px;top:36px;padding:10px 20px}.is-static .row.header .menu-holder .menu h1,.is-static .row.header .menu-holder:hover .menu h1,.not-logged-in .row.header .menu-holder .menu h1,.not-logged-in .row.header .menu-holder:hover .menu h1{font-weight:600}.is-static .row.header .menu-holder .menu .menu-item,.is-static .row.header .menu-holder:hover .menu .menu-item,.not-logged-in .row.header .menu-holder .menu .menu-item,.not-logged-in .row.header .menu-holder:hover .menu .menu-item{font-size:16px;vertical-align:middle;border-color:rgba(0,0,0,0);margin-top:.5em}@media(min-width: 820px){.is-static .row.header .menu-holder .menu .menu-item,.is-static .row.header .menu-holder:hover .menu .menu-item,.not-logged-in .row.header .menu-holder .menu .menu-item,.not-logged-in .row.header .menu-holder:hover .menu .menu-item{color:#fff;margin:1em .4em}}@media(min-width: 1020px){.is-static .row.header .menu-holder .menu .menu-item,.is-static .row.header .menu-holder:hover .menu .menu-item,.not-logged-in .row.header .menu-holder .menu .menu-item,.not-logged-in .row.header .menu-holder:hover .menu .menu-item{margin:1em .75em}}@media(min-width: 420px){.is-static .row.header .menu-holder .menu,.is-static .row.header .menu-holder:hover .menu,.not-logged-in .row.header .menu-holder .menu,.not-logged-in .row.header .menu-holder:hover .menu{top:42px}}@media(min-width: 820px){.is-static .row.header .menu-holder .menu,.is-static .row.header .menu-holder:hover .menu,.not-logged-in .row.header .menu-holder .menu,.not-logged-in .row.header .menu-holder:hover .menu{top:0;padding:0;width:calc(100% - 140px)}.is-static .row.header .menu-holder .menu .sub-menu,.is-static .row.header .menu-holder:hover .menu .sub-menu,.not-logged-in .row.header .menu-holder .menu .sub-menu,.not-logged-in .row.header .menu-holder:hover .menu .sub-menu{display:inline-block;vertical-align:middle;padding-top:6px}.is-static .row.header .menu-holder .menu .sub-menu#main-menu,.is-static .row.header .menu-holder:hover .menu .sub-menu#main-menu,.not-logged-in .row.header .menu-holder .menu .sub-menu#main-menu,.not-logged-in .row.header .menu-holder:hover .menu .sub-menu#main-menu{width:calc(100% - 340px);text-align:left}}@media(min-width: 820px)and (min-width: 1020px){.is-static .row.header .menu-holder .menu .sub-menu#main-menu,.is-static .row.header .menu-holder:hover .menu .sub-menu#main-menu,.not-logged-in .row.header .menu-holder .menu .sub-menu#main-menu,.not-logged-in .row.header .menu-holder:hover .menu .sub-menu#main-menu{text-align:center}}@media(min-width: 820px){.is-static .row.header .menu-holder .menu .sub-menu h1,.is-static .row.header .menu-holder:hover .menu .sub-menu h1,.not-logged-in .row.header .menu-holder .menu .sub-menu h1,.not-logged-in .row.header .menu-holder:hover .menu .sub-menu h1{font-size:18px;padding-top:4px;font-weight:bold}}@media(min-width: 820px){.is-static .row.header .menu-holder .menu .sub-menu h2,.is-static .row.header .menu-holder:hover .menu .sub-menu h2,.not-logged-in .row.header .menu-holder .menu .sub-menu h2,.not-logged-in .row.header .menu-holder:hover .menu .sub-menu h2{font-size:11px;padding-top:9px;text-transform:uppercase;letter-spacing:1px}}@media(min-width: 1020px){.is-static .row.header .menu-holder .menu .sub-menu#main-menu,.is-static .row.header .menu-holder:hover .menu .sub-menu#main-menu,.not-logged-in .row.header .menu-holder .menu .sub-menu#main-menu,.not-logged-in .row.header .menu-holder:hover .menu .sub-menu#main-menu{width:calc(100% - 450px)}}.is-static .row.header .mobile-nav .fa-bars,.not-logged-in .row.header .mobile-nav .fa-bars{color:#fff;font-size:1em}#current-picture{display:inline-block;width:32px;height:32px;background:#eee;border-radius:16px;background-size:cover;background-position:center center;flex-shrink:0}.show-username{display:flex;align-items:center}.show-username div{display:flex;flex-direction:column;justify-content:center;padding-left:8px;max-width:200px}.badge{text-align:center;border-radius:12px;font-weight:600;font-size:12px;line-height:1;padding:4px 5px;min-width:20px;margin-left:8px;color:#666;background:#ddd;display:inline-block;position:relative}.badge.reviewer{color:#fff;background:#00a4ce}#user-menu{z-index:99}#user-menu+.badge{position:absolute;top:24px}#current-name{margin:0;font-weight:bold;font-size:16px;white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}#upgrade-link{font-size:12px;opacity:.7;text-align:left;line-height:1em}#create-menu i{background:#fff;color:#ff465d;height:18px;width:18px;border-radius:9999px;font-size:12px;vertical-align:middle;padding-top:4px;margin-right:5px}#create-menu .btn{position:relative}#create-menu .btn-bg{position:absolute;right:0;top:6px;opacity:.2;font-size:24px}@media(min-width: 820px){#create-menu{margin-top:10px}#create-menu .menu-item{background:#ff465d;transition:background 200ms;color:#fff;padding:7px 18px 7px 12px;font-size:16px;font-weight:bold;height:36px;margin-right:10px}#create-menu .menu-item:hover{background:#9a2d44}}#mobile-menu{min-width:180px}#mobile-menu .dropdown-label{padding:.4em 1.3em;font-weight:normal}.dropdown-modal-container{position:relative;display:inline-block;z-index:2;color:rgba(0,0,0,.6)}.dropdown-modal-container.open .dropdown-modal{display:block}.dropdown-modal-container.open .export-clickarea{display:block}.dropdown-modal-container button{font-family:"Source Sans Pro",sans-serif}.dropdown-modal-container .export-clickarea{position:fixed;top:0;left:0;width:100%;height:100%;z-index:0;display:none}.dropdown-modal-container .dropdown-modal{position:absolute;background:#fff;box-shadow:0 4px 10px rgba(0,0,0,.2);right:0;top:calc(100% + 5px);width:300px;border-radius:3px;display:none}.dropdown-modal-container .dropdown-modal h3{font-size:16px;color:#333;font-weight:bold;margin-bottom:10px;display:inline-block}.dropdown-modal-container .dropdown-modal h3 .try-again{font-weight:normal;font-size:14px;display:block}@media(min-width: 820px){.dropdown-modal-container{width:auto}.dropdown-modal-container .dropdown-modal{width:340px;top:calc(100% + 5px)}}.company-sharing-autocomplete{position:relative;margin-bottom:10px}.sharing-permissions-container{display:flex;align-items:center}#sharing-permissions{background:none;border:none}#sharing-permissions i{cursor:pointer}.sharing-dropdown{padding:10px}@media(min-width: 820px){.sharing-dropdown{padding:20px 25px}}.sharing-dropdown input[type=text]{width:100%;border:1px solid #dee8da;border-radius:3px;padding:12px 30px 12px 12px;cursor:pointer;font-size:14px}.sharing-dropdown input[type=text]+.fa{position:absolute;right:10px;top:17px;font-size:14px;pointer-events:none}.sharing-dropdown .dropdown-list{font-size:14px}header{display:block;position:absolute;top:0;left:0;width:100%}main{display:block;position:absolute;top:80px;left:0;width:100%;height:calc(100vh - 80px);overflow-y:auto}@media(min-width: 420px){main{top:91px;height:calc(100vh - 91px)}}.user-nav{padding-top:0;display:none}@media(min-width: 820px){.user-nav{display:block;height:36px}.user-nav .dropdown-head #current-picture{height:36px;width:36px;border-radius:9999px;margin-left:10px}.user-nav .dropdown-list{left:auto;right:-5px;margin-top:-5px}}.visualisation-editor{overflow-x:hidden}.visualisation-editor .template-chooser.visible+.tab-panes{display:none}.visualisation-editor .tab-panes{height:100%;width:100%}.visualisation-editor .tab-panes .tab-pane,.visualisation-editor .tab-panes .row.editor,.visualisation-editor .tab-panes .row-inner,.visualisation-editor .tab-panes #visualisation{height:100%}.visualisation-editor .tab-panes .tab-pane .editor-core,.visualisation-editor .tab-panes .row.editor .editor-core,.visualisation-editor .tab-panes .row-inner .editor-core,.visualisation-editor .tab-panes #visualisation .editor-core{position:relative}@media(min-width: 820px){.visualisation-editor .tab-panes .tab-pane .editor-core,.visualisation-editor .tab-panes .row.editor .editor-core,.visualisation-editor .tab-panes .row-inner .editor-core,.visualisation-editor .tab-panes #visualisation .editor-core{min-height:100%;padding-bottom:40px}}.visualisation-editor .tab-panes .tab-pane .side-panel{display:none}.visualisation-editor .tab-panes .tab-pane.active .side-panel{display:block}.visualisation-editor .tab-panes .tab-pane:not(.active) #spreadsheet-container input{display:none}.story-editor,.visualisation-editor{background:#f9f9f9}.row.editor{padding:0;height:100%}.no-template .row.editor{display:none}.row.editor .row-inner{max-width:none;padding:0 10px;height:100%}.row.editor #visibility-status .label,.row.editor .blueprint-tag{display:inline-block;margin-left:2px}.row.editor #visualisation,.row.editor #story{height:100%;width:100%;transition:height .5s ease;position:relative}.row.editor #visualisation .editor-core,.row.editor #story .editor-core{width:100%;height:auto;overflow:visible;transition:width .5s ease;position:relative;text-align:center}.row.editor #visualisation .editor-core .preview-holder,.row.editor #story .editor-core .preview-holder{width:100%;height:100%;padding-right:4px;min-width:100px;max-width:800px;min-height:100px;transition:margin-left .5s ease,width .5s ease,opacity 1s;position:relative;background:#fff;display:inline-block;box-shadow:0 0 2px rgba(0,0,0,.2)}.row.editor #visualisation .editor-core .preview-holder #preview,.row.editor #story .editor-core .preview-holder #preview{height:100%;max-height:100%;overflow-y:auto;min-width:100px}.row.editor #visualisation .editor-core .preview-holder #preview,.row.editor #story .editor-core .preview-holder #preview{text-align:right;border:none;background:rgba(0,0,0,0);display:block;width:100%;height:100%}.row.editor #visualisation .editor-core .preview-holder #preview iframe,.row.editor #story .editor-core .preview-holder #preview iframe{width:100vw;border:none;position:relative;display:block}.row.editor #visualisation .editor-core .preview-holder #preview #blank-slide,.row.editor #visualisation .editor-core .preview-holder #preview iframe,.row.editor #story .editor-core .preview-holder #preview #blank-slide,.row.editor #story .editor-core .preview-holder #preview iframe{height:100%;width:100%;min-width:100px;border:none;flex:1}.row.editor #visualisation .editor-core .preview-holder .loading-spinner,.row.editor #story .editor-core .preview-holder .loading-spinner{position:absolute;left:50%;top:50%;width:27px;height:27px;opacity:0;pointer-events:none;z-index:5;margin-top:-13.5px;margin-left:-13.5px}.row.editor #visualisation .editor-core .preview-holder .unsupported-notice,.row.editor #story .editor-core .preview-holder .unsupported-notice{position:absolute;top:0;left:0;right:0;bottom:0;background-color:#f9f9f9;padding:20px;z-index:10}.row.editor #visualisation .editor-core #resize-overlay,.row.editor #story .editor-core #resize-overlay{position:absolute;top:0;left:0;width:100%;height:100%;display:none}.row.editor #visualisation .editor-core #resize-overlay.dragging,.row.editor #story .editor-core #resize-overlay.dragging{display:block}.row.editor #visualisation .editor-core #resize-handle-container,.row.editor #story .editor-core #resize-handle-container{position:absolute;width:4px;bottom:0;top:0;right:0;margin-bottom:0;display:none;z-index:100;transition:width 200ms}.row.editor #visualisation .editor-core #resize-handle-container #resize-handle,.row.editor #story .editor-core #resize-handle-container #resize-handle{cursor:ew-resize;position:absolute;width:4px;bottom:0;top:0;right:0;background:#eee;transition:width 100ms,background 100ms}.row.editor #visualisation .editor-core #resize-handle-container #resize-handle:after,.row.editor #story .editor-core #resize-handle-container #resize-handle:after{display:block;content:"";position:absolute;top:0;bottom:0;left:-4px;background:rgba(0,0,0,0);right:0;width:auto}.row.editor #visualisation .editor-core #resize-handle-container .resize-handle-icon,.row.editor #story .editor-core #resize-handle-container .resize-handle-icon{position:absolute;right:3px;top:50%;margin-top:-15px;opacity:.8;pointer-events:none;transition:right 100ms;display:none}.row.editor #visualisation .editor-core #resize-handle-container>i,.row.editor #story .editor-core #resize-handle-container>i{position:absolute;top:5px;left:5px}.row.editor #visualisation .editor-core #resize-handle-container:hover,.row.editor #story .editor-core #resize-handle-container:hover{width:6px}.row.editor #visualisation .editor-core #resize-handle-container:hover #resize-handle,.row.editor #story .editor-core #resize-handle-container:hover #resize-handle{width:6px;background:#ddd}.row.editor #visualisation .editor-core #resize-handle-container:hover #resize-handle:after,.row.editor #story .editor-core #resize-handle-container:hover #resize-handle:after{left:-10px}.row.editor #visualisation .editor-core #resize-handle-container:hover .resize-handle-icon,.row.editor #story .editor-core #resize-handle-container:hover .resize-handle-icon{right:2px;display:block}.row.editor #visualisation .editor-core #resize-handle-container.dragging #resize-handle:after,.row.editor #story .editor-core #resize-handle-container.dragging #resize-handle:after{left:-200px;right:0}@media(min-width: 770px){.row.editor #visualisation .editor-core,.row.editor #story .editor-core{padding:0}.row.editor #visualisation .editor-core #resize-handle-container,.row.editor #story .editor-core #resize-handle-container{display:block}}@media(min-width: 820px){.row.editor #visualisation .editor-core,.row.editor #story .editor-core{padding:0 10px 0 0}}.row.editor #visualisation{padding:10px 0 0}.row.editor #visualisation .editor-core .preview-holder iframe#preview{transform-origin:left top}.row.editor #visualisation .editor-core .preview-holder iframe#preview.mini-preview{z-index:1000;box-shadow:none;overflow:hidden;pointer-events:none}@media(min-width: 820px){.row.editor #visualisation .editor-core .preview-holder iframe#preview{width:100%}}.row.editor #story .editor-core .preview-holder #preview iframe{height:calc(100% - 64px)}.row.editor #story .editor-core .preview-holder #preview.nav-style-none iframe{height:100%}@media(min-width: 820px){.row.editor #story .editor-core{max-width:calc(100% - 220px);margin-left:220px;min-height:calc(100vh - 94px)}}.row.editor.mobile #visualisation .editor-core .preview-holder,.row.editor.mobile #story .editor-core .preview-holder{width:320px}.row.editor.mobile #visualisation .editor-core .preview-holder iframe,.row.editor.mobile #story .editor-core .preview-holder iframe{width:320px}.row.editor.mobile.landscape #visualisation .editor-core .preview-holder,.row.editor.mobile.landscape #story .editor-core .preview-holder{width:500px}.row.editor.mobile.landscape #visualisation .editor-core .preview-holder iframe,.row.editor.mobile.landscape #story .editor-core .preview-holder iframe{width:500px}.row.editor.tablet #visualisation .editor-core .preview-holder,.row.editor.tablet #story .editor-core .preview-holder{width:768px}.row.editor.tablet #visualisation .editor-core .preview-holder iframe,.row.editor.tablet #story .editor-core .preview-holder iframe{width:768px}.row.editor.tablet.landscape #visualisation .editor-core .preview-holder,.row.editor.tablet.landscape #story .editor-core .preview-holder{width:1024px}.row.editor.tablet.landscape #visualisation .editor-core .preview-holder iframe,.row.editor.tablet.landscape #story .editor-core .preview-holder iframe{width:1024px}@media(min-width: 820px){.row.editor #visualisation .editor-core{max-width:calc(100% - 350px)}}.row.project-header{display:flex;gap:10px;z-index:110}.row.project-header .user-settings{margin-top:0;padding:0}.row.project-header .dropdown{position:relative;right:unset}.row.project-header #visibility-status,.row.project-header .read-only,.row.project-header .blueprint-tag{text-align:left;height:auto;line-height:1em;display:inline-block;border-radius:3px;vertical-align:top}@media(min-width: 420px){.row.project-header #visibility-status,.row.project-header .read-only,.row.project-header .blueprint-tag{font-size:11px;padding:2px 3px 1px}}.row.project-header #visibility-status{cursor:pointer}.row.project-header #visibility-status:hover{color:#333}.row.project-header #visibility-status,.row.project-header .read-only{color:#aaa;font-weight:normal;padding:1px 3px 2px;background:#eee}.row.project-header #visibility-status.public,.row.project-header .read-only.public{background:#ffdc98;color:#000}.row.project-header #visibility-status.public:hover,.row.project-header .read-only.public:hover{background:#eec26d;color:#000}.row.project-header .blueprint-tag{font-size:9px;font-weight:bold;background:#2886b2;color:#fff;text-transform:uppercase;padding:1px 5px 2px;cursor:default}.row.project-header .project-settings{margin-left:10px;font-size:14px;font-weight:normal;line-height:0;vertical-align:top;display:inline-block;z-index:110;height:auto;padding-top:0}.row.project-header .project-settings .dropdown-head{padding-right:5px;padding-left:5px;padding-bottom:0;padding-top:2px;font-size:14px}.row.project-header .project-settings .dropdown-list{margin-right:0}.row.project-header .has-name+.project-settings{margin-left:0}.row.project-header .tags,.row.project-header .project-author>span{overflow-x:clip;text-overflow:ellipsis}.row.project-header .project-info,.row.project-header .tags{flex:1;min-width:0}.row.project-header .project-info{display:flex;flex-direction:column;justify-content:center;gap:.15rem}.row.project-header .tags{max-width:fit-content}.row.project-header #project-info-name{display:flex}.row.project-header .name{position:relative;margin-left:0;width:auto;font-size:14px;z-index:110}@media(min-width: 620px){.row.project-header .name{font-size:16px}}.row.project-header .name input{font-size:1em;font-size:inherit;border:none;border-bottom:1px solid #ccc;border-radius:0;background:#fff;padding:0;display:inline-block;color:#757575;position:absolute;left:0;top:0;box-sizing:content-box;outline:none;height:15px}@media(min-width: 420px){.row.project-header .name input{height:18px}}.row.project-header .name .name-width-setter{font-size:inherit;padding:0;display:inline-block;opacity:0;pointer-events:none;max-width:100px;min-width:40px;white-space:pre}@media(min-width: 420px){.row.project-header .name .name-width-setter{max-width:190px}}@media(min-width: 620px){.row.project-header .name .name-width-setter{max-width:340px}}@media(min-width: 820px){.row.project-header .name .name-width-setter{max-width:340px}}.row.project-header .name.has-name input,.row.project-header .name.has-name .name-width-setter{font-style:normal;background:none}.row.project-header .name.has-name input{color:#333;border-color:#ccc;top:0}.row.project-header .name.has-name .name-overlay{display:block;top:0}.row.project-header .name.not-editable input,.row.project-header .name.not-editable .name-width-setter{font-style:normal;background:rgba(0,0,0,0)}.row.project-header .name.not-editable input{border-color:rgba(0,0,0,0);color:#333;top:0}.row.project-header .name .name-overlay{display:none;content:"";position:absolute;left:85px;top:0;width:20px;height:100%;background:linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgb(255, 255, 255) 80%)}@media(min-width: 420px){.row.project-header .name .name-overlay{left:175px}}@media(min-width: 620px){.row.project-header .name .name-overlay{left:325px}}@media(min-width: 820px){.row.project-header .name .name-overlay{left:325px}}.row.project-header .project-author{color:#757575;font-weight:normal;font-size:11px;line-height:1em;display:flex;align-items:center;gap:.5em;white-space:nowrap}@media(min-width: 420px){.row.project-header .project-author{font-size:12px}}@media(min-width: 820px){.row.project-header .project-author{font-size:12px}}.row.project-header .project-author+.dropdown .dropdown-head{display:inline-block}.row.project-header .project-author+.dropdown .badge{top:-14px}.row.project-header .project-author+.dropdown .dropdown-list .badge{position:absolute;right:10px;top:12px;pointer-events:none}.row.project-header .export-user-group{display:flex;align-items:center;padding-right:10px}.row.project-header #export-btn-group{display:flex;margin-bottom:0;margin-right:0}.row.project-header #export-btn-group .export-btn,.row.project-header #export-btn-group #story-btn,.row.project-header #export-btn-group #sharing-permissions,.row.project-header #export-btn-group #story-preview-btn{width:30px;height:30px;padding:0 0;display:flex;gap:8px;align-items:center;font-weight:normal;justify-content:center}.row.project-header #export-btn-group .export-btn span,.row.project-header #export-btn-group #story-btn span,.row.project-header #export-btn-group #sharing-permissions span,.row.project-header #export-btn-group #story-preview-btn span{display:none}.row.project-header #export-btn-group .export-btn img,.row.project-header #export-btn-group #story-btn img,.row.project-header #export-btn-group #sharing-permissions img,.row.project-header #export-btn-group #story-preview-btn img{margin-right:0;height:18px;width:18px}@media(min-width: 420px){.row.project-header #export-btn-group .export-btn,.row.project-header #export-btn-group #story-btn,.row.project-header #export-btn-group #sharing-permissions,.row.project-header #export-btn-group #story-preview-btn{width:30px;height:30px}}@media(min-width: 820px){.row.project-header #export-btn-group .export-btn,.row.project-header #export-btn-group #story-btn,.row.project-header #export-btn-group #sharing-permissions,.row.project-header #export-btn-group #story-preview-btn{padding:0 10px;height:36px;width:auto}.row.project-header #export-btn-group .export-btn span,.row.project-header #export-btn-group #story-btn span,.row.project-header #export-btn-group #sharing-permissions span,.row.project-header #export-btn-group #story-preview-btn span{display:inline}.row.project-header #export-btn-group .export-btn img,.row.project-header #export-btn-group #story-btn img,.row.project-header #export-btn-group #sharing-permissions img,.row.project-header #export-btn-group #story-preview-btn img{width:21px;height:21px}}.row.project-header #export-btn-group #create-btn{height:36px;line-height:34px}.visualisation-editor.no-template .row.project-header #export-btn-group{display:none}.row.project-header #export-btn-group #story-btn-form{display:inline-block}.row.project-header #export-btn-group #story-btn-form.disabled{cursor:not-allowed}.row.project-header #export-btn-group #story-btn,.row.project-header #export-btn-group #sharing-permissions,.row.project-header #export-btn-group #story-preview-btn{background-color:#e3e3e3;color:#333;margin-right:8px;overflow:visible}.row.project-header #export-btn-group #story-btn.disabled,.row.project-header #export-btn-group #sharing-permissions.disabled,.row.project-header #export-btn-group #story-preview-btn.disabled{cursor:not-allowed}.row.project-header #export-btn-group #story-btn:not(.disabled):hover,.row.project-header #export-btn-group #sharing-permissions:not(.disabled):hover,.row.project-header #export-btn-group #story-preview-btn:not(.disabled):hover{background:#ccc}.dialog .tag-input{position:relative}.dialog .tag-input .fa-chevron-down{position:absolute;right:8px;top:6px;pointer-events:none}.row.editor-bar{background:#e3e3e3;height:30px;font-size:12px;padding:0 10px}.row.editor-bar #visualisation-tabs{z-index:110;width:100%;text-align:center}.row.editor-bar #visualisation-tabs button{font-size:12px;line-height:1em}.row.editor-bar #visualisation-tabs button i{margin-right:3px;font-size:11px}.row.editor-bar #visualisation-tabs button .fa-exclamation-triangle{color:#ff5b5b}.row.editor-bar #visualisation-tabs button.active .fa-exclamation-triangle{color:#fff}.row.editor-bar #visibility-status,.row.editor-bar .read-only{display:inline-block;float:left;font-weight:bold;color:#aaa;margin-top:7px}.row.editor-bar .tab-buttons .fa-exclamation-triangle{display:none}.row.editor-bar .confirm-saved{float:right;margin-top:8px;margin-left:0;width:60px}.row.editor-bar .flourish-warn-container{display:none;float:right;margin-left:4px;position:relative}.row.editor-bar .flourish-warn-container.visible{display:block}.row.editor-bar .flourish-warn-container .flourish-warn-btn{background:#333;height:16px;width:16px;border-radius:50%;font-size:9px;color:#e3e3e3;margin-top:7px;text-align:center;padding-top:2px}.row.editor-bar .flourish-warn-container .flourish-warn-list{display:none;position:absolute;right:0;top:25px;width:250px;background-color:#fff;box-shadow:0 1px 2px rgba(0,0,0,.2);border-radius:3px;padding:10px;z-index:1}.row.editor-bar .flourish-warn-container .flourish-warn-list.visible{display:block}.row.editor-bar .flourish-warn-container .flourish-warn-list ul{margin:0;padding:0;list-style:none}.row.editor-bar .flourish-warn-container .flourish-warn-list ul li{position:relative;border-top:1px solid rgba(0,0,0,.1);padding:8px 0 0 20px;margin:8px 0 0 0}.row.editor-bar .flourish-warn-container .flourish-warn-list ul li:first-child{border-top:none;padding-top:0;margin-top:0}.row.editor-bar .flourish-warn-container .flourish-warn-list ul li:first-child i{top:4px}.row.editor-bar .flourish-warn-container .flourish-warn-list ul li i{position:absolute;top:11px;left:4px;color:#333;font-size:11px}.row.editor-bar .flourish-warn-container .flourish-warn-list ul li p.message{font-weight:bold}.row.editor-bar .flourish-warn-container .flourish-warn-list ul li p.explanation{color:#888}@media(min-width: 820px){.row.editor-bar #visualisation-tabs{width:calc(100% - 460px);margin-left:0}}.impossible .row.editor-bar .tab-buttons .fa-exclamation-triangle{display:inline}@media(min-width: 620px){.tab-data{overflow:hidden}}.tab-data .tab-preview{position:fixed;z-index:2}.tab-data #preview-menu{opacity:0;pointer-events:none}.side-panel{text-align:left;position:relative;background:#f9f9f9;line-height:1.1;margin-left:0;padding:0 0 1px 0;width:100%}.side-panel.closed{margin-left:-300px}.side-panel .side-panel-inner{margin-bottom:87px;border:1px solid #ddd;background:#fff}@media(min-width: 820px){.side-panel .side-panel-inner{border:none;background:rgba(0,0,0,0)}}.side-panel .side-panel-close{position:absolute;top:15px;right:10px;font-size:1.25em;width:1.5em;height:1.5em;padding:.1em;text-align:center;border:solid 1px rgba(0,0,0,.4);border-radius:3px;background:#eaeaea;transition:right .5s ease;z-index:1}.side-panel .side-panel-close.opener{right:calc(-1.5em + 1px);border-bottom-left-radius:0;border-top-left-radius:0}.side-panel .side-panel-close:hover{opacity:1}.side-panel .side-panel-close:hover i{opacity:.7}.side-panel .side-panel-scrollbox{width:100%;height:100%;padding:10px 10px 20px;overflow-y:scroll}.side-panel .side-panel-scrollbox .side-panel-inner{width:100%}@media(min-width: 1220px){.side-panel .side-panel-scrollbox{padding:20px}}.side-panel h1{margin:1em 0 .5em;font-size:.9em;opacity:.5;cursor:default}.side-panel h2{font-size:13px;letter-spacing:0;font-weight:500;margin:0 0 .6em;position:relative;color:#333;word-wrap:break-word}.side-panel .toplevel-settings-block{padding:0 5px 20px}.side-panel .toplevel-settings-block.hidden{display:none}.side-panel .toplevel-settings-block .settings-option{display:inline-block}.side-panel .toplevel-settings-block .settings-option:first-child{margin-top:9px}.side-panel .toplevel-settings-block .settings-option.hidden{display:none}.side-panel .settings-divider{margin:1rem -10px 0;clear:both;width:calc(100% + 20px);height:1px;background:#eee}.side-panel .settings-subhead{text-transform:uppercase;font-size:.7rem;font-weight:bold;color:#757575;padding:.5rem 5px .25rem;margin:0}.side-panel .settings-block{margin:0;display:inline-block;width:100%;background-color:#fff;padding:0 10px 0;min-height:24px}.side-panel .settings-block h2{margin:0 -10px;font-size:.8rem;padding:.75em 30px;font-weight:bold;background-color:#f5f5f5;border-top:1px solid #ddd;cursor:pointer;color:#535e65}.side-panel .settings-block h2:hover,.side-panel .settings-block h2:focus{background:#e8e8e8}.side-panel .settings-block h2::after{font-family:FontAwesome;content:"";position:absolute;left:15px}.side-panel .settings-block.open h2{position:sticky;top:0;z-index:1;box-shadow:0 1px 0 #fff;border-top-color:#666;background-color:#757575;color:#fff}.side-panel .settings-block.open h2::after{transform:rotate(90deg)}.side-panel .settings-block .settings-option,.side-panel .settings-block .settings-divider,.side-panel .settings-block .settings-subhead{display:none}.side-panel .settings-block input::-webkit-contacts-auto-fill-button{visibility:hidden;display:none !important;pointer-events:none;position:absolute;right:0}.side-panel .settings-block.open{padding-bottom:1rem}.side-panel .settings-block.open .settings-option{display:inline-block}.side-panel .settings-block.open .settings-divider,.side-panel .settings-block.open .settings-subhead{display:block}.side-panel .settings-block.open h2+.settings-divider{background:rgba(0,0,0,0);margin-top:.25rem}.side-panel .settings-block.open .hidden{display:none}.side-panel .settings-block.hidden{display:none}.side-panel .settings-block.hidden h2:focus{outline:none}.side-panel h3{font-size:.8rem;line-height:1.2em;font-weight:normal;margin-top:0;margin-bottom:3px;color:#333;display:inline-block;cursor:default;vertical-align:top;background:#fff}.side-panel p{font-size:13px;margin-top:0}.side-panel .upgrade-setting{cursor:pointer}.side-panel .upgrade-setting .buttons-container label{opacity:.2;pointer-events:none}.side-panel .upgrade-setting h3{color:#999}.side-panel .upgrade-setting input,.side-panel .upgrade-setting label.slider{pointer-events:none;opacity:.2}.side-panel .upgrade-setting h3,.side-panel .upgrade-setting input,.side-panel .upgrade-setting label.slider{cursor:pointer}.side-panel .settings-option{position:relative;margin-top:.75rem;display:none;vertical-align:bottom;width:100%;padding:0 5px}.side-panel .settings-option label{font-size:13px;display:inline-block;vertical-align:top;width:100%}.side-panel .settings-option label.slider{width:auto}.side-panel .settings-option label:hover,.side-panel .settings-option label:focus,.side-panel .settings-option label:focus-within{z-index:2;position:relative}.side-panel .settings-option label:hover h3,.side-panel .settings-option label:focus h3,.side-panel .settings-option label:focus-within h3{padding-right:1px}.side-panel .settings-option input,.side-panel .settings-option textarea,.side-panel .settings-option select,.side-panel .settings-option button{border-radius:3px;border:1px solid #ddd;padding:.2em .1em .2em .3em;min-height:30px;font-size:13px;display:block;outline:none;transition:200ms linear border}.side-panel .settings-option input:focus,.side-panel .settings-option textarea:focus,.side-panel .settings-option select:focus,.side-panel .settings-option button:focus{border:1px solid #777}.side-panel .settings-option textarea{resize:vertical;height:60px;padding-top:5px}.side-panel .settings-option ::-webkit-input-placeholder{color:#ddd}.side-panel .settings-option :-ms-input-placeholder{color:#ddd}.side-panel .settings-option ::-ms-input-placeholder{color:#ddd}.side-panel .settings-option .dropdown-list .dropdown-item{font-size:13px;padding:10px 10px 10px 6px}.side-panel .settings-option .color-picker{vertical-align:top;line-height:0;position:relative;z-index:0}.side-panel .settings-option .color-picker:hover:not(.is-null) .cancel-setting{transform:translateX(27px)}.side-panel .settings-option .color-picker:not(.is-null) .cancel-setting:focus-visible{transform:translateX(27px);border-color:#777}.side-panel .settings-option .color-picker.is-null .cancel-setting{display:none}.side-panel .settings-option .color-picker.is-null .color-wrapper input{opacity:0}.side-panel .settings-option .color-wrapper{width:30px;height:30px;overflow:hidden;border-radius:3px;position:relative;display:inline-block;background:#fff;z-index:1}.side-panel .settings-option .color-wrapper input{transform:scale(10);position:absolute}.side-panel .settings-option .color-wrapper:before{display:block;position:absolute;content:"";top:0;bottom:-10px;left:0;width:1px;pointer-events:none;background:rgba(0,0,0,.1);transform-origin:top;transform:rotate(-45deg)}.side-panel .settings-option .color-wrapper:after{display:block;position:absolute;content:"";border:1px solid rgba(0,0,0,.1);left:0;right:0;top:0;bottom:0;pointer-events:none}.side-panel .settings-option .color-wrapper:invalid{box-shadow:none}.side-panel .settings-option .cancel-setting{width:30px;border-radius:3px;border:1px solid #ddd;background:#fff;position:absolute;padding:0;height:30px;display:flex;justify-content:center;align-items:center;left:0;top:0;cursor:pointer;transition:200ms transform}.side-panel .settings-option .cancel-setting svg{margin-left:2px;width:8px;height:8px;pointer-events:none;transition:200ms opacity}.side-panel .settings-option .cancel-setting:focus{border:1px solid #ddd}.side-panel .settings-option .cancel-setting:hover svg{opacity:.4}.side-panel .settings-option .single-button{background:#eee;color:#333;width:100%;border:none;padding:0;cursor:pointer;transition:200ms linear background-color}.side-panel .settings-option .single-button:hover{background-color:#e0e0e0}.side-panel .settings-option .single-button:hover:disabled{background-color:#eee;cursor:default}.side-panel .settings-option .single-button:focus{background-color:#e0e0e0}.side-panel .settings-option .single-button:focus:disabled{background-color:#eee;cursor:default}.side-panel .settings-option .buttons-container input[type=radio]{width:0;height:0;opacity:0;margin:0;display:inline-block;vertical-align:top;font-size:0;line-height:0;position:absolute}.side-panel .settings-option .buttons-container input[type=radio]+label{font-size:13px;background:#eee;color:#333;display:inline-flex;flex-wrap:nowrap;align-content:center;justify-content:center;align-items:center;height:30px;cursor:pointer;text-align:center;border-right:1px solid #fff;border-bottom:1px solid #fff;background-size:cover;background-position:50% 50%;transition:200ms linear background-color}.side-panel .settings-option .buttons-container input[type=radio]+label i{color:#555;margin-right:5px}.side-panel .settings-option .buttons-container input[type=radio]+label img{margin-right:5px;height:13px}.side-panel .settings-option .buttons-container.large input[type=radio]+label{height:60px}.side-panel .settings-option .buttons-container input[type=radio]:not([disabled])+label:hover{background-color:#e0e0e0}.side-panel .settings-option .buttons-container input[type=radio]:not([disabled]):focus-visible+label:after{height:4px}.side-panel .settings-option .buttons-container input[type=radio]:disabled+label{cursor:default}.side-panel .settings-option .buttons-container input[type=radio]:checked+label{background-color:#ccdee6;cursor:default;position:relative}.side-panel .settings-option .buttons-container input[type=radio]:checked+label:hover{background-color:#ccdee6}.side-panel .settings-option .buttons-container input[type=radio]:checked+label:after{width:100%;height:2px;background:#2886b2;bottom:0;position:absolute;content:"";left:0}.side-panel .settings-option input[data-autocomplete]+.fa{position:absolute;right:10px;margin-top:-21px;font-size:12px;pointer-events:none}.side-panel .settings-option select{width:100%;height:32px}.side-panel .settings-option.option-type-color input{padding:0;background:#fff}.side-panel .settings-option.option-type-number,.side-panel .settings-option.option-type-rows,.side-panel .settings-option.option-type-color{width:50%}.side-panel .settings-option.option-type-number.width-quarter input,.side-panel .settings-option.option-type-rows.width-quarter input,.side-panel .settings-option.option-type-color.width-quarter input{width:100%}.side-panel .settings-option.option-type-number input,.side-panel .settings-option.option-type-rows input,.side-panel .settings-option.option-type-color input{width:calc((100% - 10px)/2);min-width:40px}.side-panel .settings-option.option-type-boolean:not(.settings-buttons).settings-buttons>label{height:auto}.side-panel .settings-option.option-type-boolean:not(.settings-buttons)>label:first-child{position:absolute;padding-left:37px;padding-top:7px;width:auto;right:5px;left:5px}.side-panel .settings-option.option-type-string input,.side-panel .settings-option.option-type-url input{width:100%}.side-panel .settings-option.option-type-text textarea,.side-panel .settings-option.option-type-code textarea,.side-panel .settings-option.option-type-html textarea{width:100%}.side-panel .settings-option.option-type-text textarea.size-large,.side-panel .settings-option.option-type-code textarea.size-large,.side-panel .settings-option.option-type-html textarea.size-large{height:50vh}.side-panel .settings-option.option-type-text textarea.size-small,.side-panel .settings-option.option-type-code textarea.size-small,.side-panel .settings-option.option-type-html textarea.size-small{height:30px}.side-panel .settings-option.option-type-code label{width:calc(100% - 18px)}.side-panel .settings-option.option-type-code .wrap-control{font-size:.7em;color:#999;transform:scale(1, -1);margin-bottom:.3em;display:inline-block;vertical-align:bottom;transition:transform .2s ease}.side-panel .settings-option.option-type-code .wrap-control.selected{transform:scale(-1, -1);cursor:pointer}.side-panel .settings-option.option-type-code textarea{font-family:monospace;font-size:13px}.side-panel .settings-option.option-type-font input.font-menu{width:100%;outline:none}.side-panel .settings-option.option-type-colors input{width:100%;margin:0;z-index:1;cursor:pointer}.side-panel .settings-option.option-type-colors .color-swatches,.side-panel .settings-option.option-type-colors .dropdown-item{display:flex;align-items:stretch;min-height:26px;overflow:hidden;border-radius:3px}.side-panel .settings-option.option-type-colors .color-swatches em,.side-panel .settings-option.option-type-colors .dropdown-item em{font-style:normal;color:#777;display:block;padding:8px;pointer-events:none}.side-panel .settings-option.option-type-colors .color-swatches span,.side-panel .settings-option.option-type-colors .dropdown-item span{display:inline-block;height:26px;flex:1}.side-panel .settings-option.option-type-colors .color-swatches span:nth-child(n+13):nth-child(-n+99),.side-panel .settings-option.option-type-colors .dropdown-item span:nth-child(n+13):nth-child(-n+99){display:none}.side-panel .settings-option.option-type-colors .color-swatches{padding:0;position:absolute;left:7px;margin-top:2px;right:26px;z-index:0;pointer-events:none}.side-panel .settings-option.option-type-colors .dropdown-item{padding:0 !important;margin:2px}.side-panel .settings-option.option-type-colors .dropdown-item label{position:absolute;top:6px;left:8px;color:#fff;pointer-events:none;opacity:.4;width:auto}.side-panel .settings-option.option-type-colors .dropdown-item span{pointer-events:none}.side-panel .settings-option.option-type-colors .dropdown-item:hover label,.side-panel .settings-option.option-type-colors .dropdown-item.selected label{opacity:1;background:rgba(0,0,0,.55)}.side-panel .settings-option.option-type-colors .dropdown-item.current label{opacity:1;background:rgba(0,0,0,.8)}.side-panel .settings-option.option-type-colors .dropdown-item.current:before{top:7px;right:5px;color:#fff}.side-panel .settings-option.option-type-colors.custom input{opacity:0}.side-panel .settings-option.option-type-colors.custom .color-swatches{align-items:flex-start}.side-panel .settings-option.option-type-colors.custom .color-swatches span{max-width:28px;pointer-events:auto;transition:transform 200ms;transform-origin:center center}.side-panel .settings-option.option-type-colors.custom .color-swatches span:hover{transform:scale(1.2)}.side-panel .settings-option.option-type-colors.custom .color-swatches span.fa{font-size:24px;color:#ccc;margin-left:4px}.side-panel .settings-option.option-type-colors.custom .color-swatches span.fa::before{position:relative;top:2px}.side-panel .settings-option .text-editor-setting{position:relative}.side-panel .settings-option .text-editor-setting .text-editor-btn{position:absolute;top:5px;right:5px;width:20px;height:20px;min-height:0;font-size:10px;padding:0;line-height:0;border:none;border-radius:999px;cursor:pointer;transition:200ms background-color;color:#aaa;background-color:#ddd;box-shadow:0 0 0 2px #fff;display:flex;align-items:center;justify-content:center}.side-panel .settings-option .text-editor-setting .text-editor-btn:hover,.side-panel .settings-option .text-editor-setting .text-editor-btn:focus{color:#333}.side-panel .settings-option .text-editor-setting *:focus+.text-editor-btn{color:#777}.side-panel .settings-option .text-editor-setting *:focus+.text-editor-btn:hover{color:#333}.side-panel .settings-option.width-full{width:100% !important}.side-panel .settings-option.width-half{width:50% !important}.side-panel .settings-option.width-quarter{width:25% !important}.side-panel .settings-option.width-three-quarters{width:75% !important}.side-panel .settings-option .description-link{cursor:pointer;color:#dd4141}.side-panel .settings-option.search-filtered-out,.side-panel .settings-block h2.search-filtered-out,.side-panel .settings-subhead.search-filtered-out,.side-panel .settings-divider.search-filtered-out{opacity:.2;transition:opacity 200ms;-webkit-filter:blur(1px);filter:blur(1px)}.side-panel .detailed-settings h2{margin-bottom:.75rem}.side-panel .detailed-settings h2:after{content:""}.side-panel .detailed-settings .settings-block .settings-option{display:block}.side-panel .palette{max-height:calc(100vh - 210px);overflow-y:auto;padding:1px}.side-panel .palette input[type=color],.side-panel .palette button,.side-panel .palette .swatch-color{-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;appearance:none;display:inline-block;width:28px;height:28px;padding:0;margin:1px;border:none;outline:none;background:rgba(0,0,0,0)}.side-panel .palette input[type=color].fa-plus-square::before,.side-panel .palette button.fa-plus-square::before,.side-panel .palette .swatch-color.fa-plus-square::before{font-size:32px;color:#ddd;margin-left:1px}.side-panel .palette input[type=color].fa-times,.side-panel .palette button.fa-times,.side-panel .palette .swatch-color.fa-times{position:absolute;right:0;opacity:0;color:#aaa}.side-panel .palette input[type=color].fa-times:hover,.side-panel .palette button.fa-times:hover,.side-panel .palette .swatch-color.fa-times:hover{color:#888}.side-panel .palette input[type=color]::-webkit-color-swatch-wrapper,.side-panel .palette button::-webkit-color-swatch-wrapper,.side-panel .palette .swatch-color::-webkit-color-swatch-wrapper{padding:0}.side-panel .palette input[type=color]::-webkit-color-swatch,.side-panel .palette button::-webkit-color-swatch,.side-panel .palette .swatch-color::-webkit-color-swatch{border:none}.side-panel .palette [draggable]{cursor:move;cursor:grab;cursor:-moz-grab;cursor:-webkit-grab}.side-panel .palette [draggable]:active{cursor:grabbing;cursor:-moz-grabbing;cursor:-webkit-grabbing}.side-panel .palette .swatch-handle{display:block;width:15px;height:28px;color:#ddd;position:absolute;left:1px;top:7px;text-align:center;font-size:18px;font-weight:bold;line-height:5.5px;pointer-events:none}.side-panel .palette input[type=text]{width:120px;width:calc(100% - 52px);background:rgba(0,0,0,0);padding:5px 8px;border-width:0;margin:0}.side-panel .palette p{position:relative;display:flex;align-items:center;margin:0;padding:5px 5px 5px 20px;border-bottom:1px solid #eee}.side-panel .palette p:first-child{border-top:1px solid #eee}.side-panel .palette p:hover button.fa-times{opacity:.5}.side-panel .palette p:hover [draggable]::before{opacity:1}.side-panel .text-editor-container .editor-section{display:inline-block}.side-panel .text-editor-container .editor-section+.editor-section{margin-left:10px;padding-left:6px;border-left:1px solid #ddd}.side-panel .text-editor-container .text-settings{margin-bottom:10px}.side-panel .text-editor-container .editor-button{display:inline-block;margin-left:4px;cursor:pointer}.side-panel .text-editor-container .editor-button:hover{opacity:.8}.side-panel .text-editor-container .editor-button+.editor-button{margin-left:14px}.side-panel .text-editor-container .editor-button svg{height:10px;width:auto}.side-panel .text-editor-container .text-bindings{border:1px solid #ddd;border-top:none;margin-top:-1px;padding:4px}.side-panel .text-editor-container .text-bindings p{display:block;margin:4px;font-size:10px;letter-spacing:.5px;text-transform:uppercase;color:#999}.side-panel .text-editor-container .text-bindings button{display:inline-block;margin:2.5px;border-radius:20px;border:none;min-height:0;padding:2px 10px;cursor:pointer;white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}.side-panel .text-editor-container .text-bindings button:hover{background:#ddd}.side-panel .text-editor-container .text-bindings button[data-type=dynamic]{background:#ccdee6}.side-panel .text-editor-container .text-bindings button[data-type=dynamic]:hover{background:#bbcdd5}.side-panel .text-editor-container textarea{width:100%;min-height:150px}.side-panel .text-editor-container input.text-input{width:100%}.side-panel .side-panel-top{border-top:none;border-bottom:1px solid rgba(0,0,0,.1);margin-top:0;padding:17px 10px 20px;font-size:1em}.side-panel .side-panel-top.shadow{box-shadow:3px 3px 5px rgba(0,0,0,.1)}.side-panel .side-panel-top .side-panel-top-menu .side-panel-icon-btn{color:#fff;background:#9a9a9a;padding:7px 0 0 0;border-radius:9999px;width:30px;height:30px;text-align:center;margin:0}.side-panel .side-panel-top .side-panel-top-menu .separator{margin:0 .4em;height:1em;border-left:1px solid rgba(0,0,0,.25);display:inline-block;vertical-align:middle}#story .side-panel .side-panel-top .side-panel-top-menu .separator{margin:0 .25em}.side-panel .current-template{margin:0;opacity:0;transition:200ms opacity;position:relative;border-bottom:1px solid #ddd}.side-panel .current-template h1{opacity:1;font-size:12px;font-weight:normal;margin:0;padding:15px 80px 15px 15px}.side-panel .current-template h1>span{display:block;font-weight:bold;font-size:16px}.side-panel .current-template h3{margin-top:.7em}.side-panel .current-template h3 i{margin-left:.2em;color:rgba(0,0,0,.5)}.side-panel .current-template .current-template-title{position:relative}.side-panel .current-template .current-template-title .current-template-version{font-size:14px;font-weight:normal;margin-top:4px}.side-panel .current-template .current-template-title .current-template-version form{display:inline-block;margin-left:4px}.side-panel .current-template .current-template-title .current-template-version form button{all:unset;cursor:pointer}.side-panel .current-template .current-template-title .current-template-version form button img{height:14px;vertical-align:bottom}.side-panel .current-template .current-template-thumbnail{position:absolute;right:0;top:0;width:76px;height:100%;background-size:cover;background-position:center;background-repeat:no-repeat}.side-panel .current-template .current-template-thumbnail:after{width:20px;height:100%;position:absolute;left:0;right:0;background:linear-gradient(to right, rgb(255, 255, 255), rgba(255, 255, 255, 0));content:"";display:block}.side-panel .template-theme button#reset-to-theme:disabled{color:#d3d3d3}.side-panel .template-settings-search{background:#fff;padding:5px 15px;border-top:1px solid #eee;position:sticky;bottom:0;width:100%;z-index:2}.side-panel .template-settings-search input{width:200px;border-radius:3px;height:30px;border:1px solid #eee;margin-left:6px}@media(min-width: 820px){.side-panel .template-settings-search{position:fixed;width:329px}}@media(min-width: 620px)and (max-width: 819px){.side-panel .side-panel-inner{max-width:500px;margin-top:20px;margin-left:auto;margin-right:auto}}@media(min-width: 820px){.side-panel{max-width:330px;position:fixed;right:0;top:91px;background:#fff;overflow-y:auto;height:calc(100vh - 91px);border-left:1px solid #ddd}.side-panel .current-template{min-height:56px}}.tab-preview #visualisation .editor-core{overflow:visible !important}.sdk #visualisation .editor-core,.tab-preview.active #visualisation .editor-core{overflow:auto !important}body.full-screen .row.editor #visualisation,body.full-screen .row.editor #story{position:fixed !important;top:0 !important;left:0 !important;width:100% !important;height:100% !important}body.full-screen .row.editor #visualisation .editor-core #preview,body.full-screen .row.editor #story .editor-core #preview{width:100% !important}body.full-screen .row.editor #visualisation #exit-full-screen,body.full-screen .row.editor #story #exit-full-screen{display:block}body.loading .loading-spinner{opacity:1 !important;animation-name:spin;animation-duration:1.2s;animation-iteration-count:infinite;animation-timing-function:linear;transform-origin:center center}body.loading .content{min-height:100vh}body.loading .preview-holder{pointer-events:none;background-color:#f3f3f3}body.loading .preview-holder #preview{background:rgba(0,0,0,0) !important}body.loading .preview-holder iframe{opacity:.1}body.loading .row.data,body.loading #blank-slide{opacity:0;pointer-events:none}#spreadsheet-container.loading .loading-spinner{opacity:1 !important;animation-name:spin;animation-duration:1.2s;animation-iteration-count:infinite;animation-timing-function:linear;transform-origin:center center;position:absolute;left:50%;top:50%;pointer-events:none;z-index:5;transition:opacity 100ms;transition-delay:200ms}#spreadsheet-container.loading #spreadsheet-main{opacity:.1;transition:opacity 100ms;transition-delay:200ms}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}body.impossible .preview-overlay{display:flex;flex-direction:column;justify-content:center;align-items:center;position:absolute;background:#fff;width:100%;height:100%}body.impossible #preview{opacity:0;pointer-events:none}body.impossible .empty-label .fa{color:#ff5b5b}body.impossible .empty-details .data-tab-icon{padding:0 3px;font-weight:bold}.setting-tooltip{margin-left:3px;color:#fff;background-color:#757575;border-radius:10px;width:12px;height:12px;font-size:8px;padding:2px 0 0 0;text-align:center;vertical-align:bottom;margin-bottom:1px;position:relative}.setting-tooltip.tooltip-upgrade{background-color:#eaa22d}.setting-tooltip:hover,.setting-tooltip:focus{background-color:#aaa;outline:none}.setting-tooltip:hover.tooltip-upgrade,.setting-tooltip:focus.tooltip-upgrade{background-color:#df911c}#private-publishing,#anyone-can-duplicate{padding-right:15px;margin-top:10px;width:100%;display:flex;align-items:center}#private-publishing+input,#anyone-can-duplicate+input{width:100%;padding:5px}#private-publishing+input.hidden,#anyone-can-duplicate+input.hidden{display:none}#private-publishing+input.error,#anyone-can-duplicate+input.error{border-color:#dd4141}#private-publishing.upgrade-btn,#anyone-can-duplicate.upgrade-btn{width:auto;color:#999}#private-publishing.upgrade-btn::after,#anyone-can-duplicate.upgrade-btn::after{top:4px}.is-touch .side-panel .settings-option .color-picker:not(.is-null) .cancel-setting{transform:translateX(27px)}#snapshot-preview-wrapper{padding:8px;border:1px solid #a9a9a9;border-radius:4px;background-color:#fcfcfc;height:300px;align-self:center;justify-self:center;pointer-events:none}#snapshot-grid{display:grid;grid-gap:12px}@media(min-width: 820px){#snapshot-grid{grid-template-columns:auto 200px;height:240px;justify-items:center}}.download-snapshot-btn{align-items:center;display:inline-flex}.download-snapshot-btn.disabled:after{background-image:url("/images/bosh.svg");background-size:cover;background-position:center center;content:"";display:block;width:18px;height:18px;animation-name:spin;animation-duration:1.4s;animation-iteration-count:infinite;animation-timing-function:linear;transform-origin:center center}body.sdk{background:#f9f9f9;overflow-x:hidden}body.sdk .row.editor .row-inner{max-width:none}body.sdk .error{position:absolute;top:0;left:50%;margin-left:-115px;width:230px;max-width:80%;background:#dd4141;color:#fff;padding:70px 10px 10px;border-bottom-left-radius:6px;border-bottom-right-radius:6px;text-align:center;z-index:101;display:none}body.sdk .error h1{font-size:1em;font-weight:500}body.sdk .error h2{font-size:1em;font-weight:300}body.sdk .error.shown{display:block;animation-name:enter;animation-duration:.3s}@keyframes enter{0%{top:-100px}100%{top:0}}body.sdk .side-panel .side-panel-scrollbox{height:100%}body.sdk .side-panel .side-panel-scrollbox .current-template .current-template-thumbnail{background-image:url("/thumbnail");background-size:cover;background-position:50% 50%}body.sdk .side-panel .side-panel-scrollbox .sdk-add .settings-block,body.sdk .side-panel .side-panel-scrollbox .sdk-add .data-block{margin:10px 0;color:#fff;background:#888;border:1px solid rgba(0,0,0,.1);text-align:right}body.sdk .side-panel .side-panel-scrollbox .sdk-add .settings-block:hover,body.sdk .side-panel .side-panel-scrollbox .sdk-add .data-block:hover{background:#777}body.sdk .side-panel .side-panel-scrollbox .sdk-add .settings-block.open:hover,body.sdk .side-panel .side-panel-scrollbox .sdk-add .data-block.open:hover{background:#888}body.sdk .side-panel .side-panel-scrollbox .sdk-add .settings-block h2,body.sdk .side-panel .side-panel-scrollbox .sdk-add .data-block h2{text-align:left;color:#fff}body.sdk .side-panel .side-panel-scrollbox .sdk-add .settings-block i,body.sdk .side-panel .side-panel-scrollbox .sdk-add .data-block i{margin-right:.2em;display:inline-block;vertical-align:middle}body.sdk .side-panel .side-panel-scrollbox .sdk-add .settings-block .settings-option,body.sdk .side-panel .side-panel-scrollbox .sdk-add .data-block .settings-option{margin-top:.75em}body.sdk .side-panel .side-panel-scrollbox .sdk-add .settings-block .settings-option .form-element select,body.sdk .side-panel .side-panel-scrollbox .sdk-add .settings-block .settings-option .form-element input,body.sdk .side-panel .side-panel-scrollbox .sdk-add .settings-block .settings-option .form-element textarea,body.sdk .side-panel .side-panel-scrollbox .sdk-add .data-block .settings-option .form-element select,body.sdk .side-panel .side-panel-scrollbox .sdk-add .data-block .settings-option .form-element input,body.sdk .side-panel .side-panel-scrollbox .sdk-add .data-block .settings-option .form-element textarea{width:150px}body.sdk .side-panel .side-panel-scrollbox .sdk-add .settings-block .settings-option .form-element textarea,body.sdk .side-panel .side-panel-scrollbox .sdk-add .data-block .settings-option .form-element textarea{min-height:50px}body.sdk .side-panel .side-panel-scrollbox .sdk-add .settings-block .settings-option .form-element .small,body.sdk .side-panel .side-panel-scrollbox .sdk-add .data-block .settings-option .form-element .small{display:inline-block}body.sdk .side-panel .side-panel-scrollbox .sdk-add .settings-block .settings-option .form-element .small label,body.sdk .side-panel .side-panel-scrollbox .sdk-add .data-block .settings-option .form-element .small label{width:auto;vertical-align:middle}body.sdk .side-panel .side-panel-scrollbox .sdk-add .settings-block .settings-option .form-element .small input,body.sdk .side-panel .side-panel-scrollbox .sdk-add .data-block .settings-option .form-element .small input{width:30px;margin-right:4px}body.sdk .side-panel .side-panel-scrollbox .sdk-add .settings-block .settings-option .type-specific,body.sdk .side-panel .side-panel-scrollbox .sdk-add .data-block .settings-option .type-specific{display:none}body.sdk .side-panel .side-panel-scrollbox .sdk-add .settings-block button,body.sdk .side-panel .side-panel-scrollbox .sdk-add .data-block button{margin-top:1em;margin-left:2em}body.sdk .side-panel .tip{font-size:.8em;line-height:1.4;color:#aaa;font-weight:300}body.sdk .row.editor-bar .confirm-saved{margin-top:10px;animation:none}body.sdk .sdk-status-label{border-radius:3px;padding:.16em .8em;font-size:12px;color:#333;opacity:0;transition:opacity 300ms ease 0s,transform 600ms ease 0s;display:inline-block;margin:6px 0 0 28%;background:#efefef}body.sdk .sdk-session-reset-button{font-size:12px;margin-top:6px;margin-left:14px;border:0;border-radius:3px;padding:.12em .5em;float:right;background-color:#eee;cursor:pointer}body.sdk .sdk-session-reset-button:hover{background-color:#fafafa}body.sdk .sdk-session-reset-button:active{background-color:#d5d5d5}.row.text-editor{margin-top:1em;background:none}.row.text-editor .row-inner #code-mirror{width:100%}.row.text-editor .row-inner .CodeMirror{border:1px solid rgba(0,0,0,.3);width:100%}.confirm-saved{color:#aaa;font-weight:bold;margin:-5px 0 0 3px;font-size:12px;line-height:1em;transition:opacity 250ms;opacity:0;text-align:right}.confirm-saved i{display:none}@keyframes anim{0%{color:#aaa}50%{color:#333}100%{color:#aaa}}.confirm-saved.saved{opacity:1;animation:anim 500ms}.confirm-saved.saved .label::before{content:"Saved"}.confirm-saved.saved i{display:inline}.confirm-saved.saving{opacity:1}.confirm-saved.saving .label::before{content:"Saving"}.confirm-saved.saving i{transform:scale(1, 0)}.confirm-saved.error{opacity:1;color:#dd4141}.confirm-saved.error .label::before{content:"Not saved"}.confirm-saved.error i{transform:scale(1, -1);top:.1em}@media(min-width: 820px){.confirm-saved{font-size:12px;margin:0}}/*# sourceMappingURL=sdk.css.map */ diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..aa12e6d --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,10 @@ +{ + "compilerOptions": { + "paths": { + "common/*": ["../common/*"], + } + }, + "references": [ + { "path": "../common/tsconfig.sdk.json" } + ] +} \ No newline at end of file diff --git a/utils/state.js b/utils/state.js deleted file mode 100644 index 620fd2a..0000000 --- a/utils/state.js +++ /dev/null @@ -1,152 +0,0 @@ -/* * * * * * GENERATED FILE - DO NOT EDIT * * * * * * - * * * * * * GENERATED FILE - DO NOT EDIT * * * * * * - * * * * * * GENERATED FILE - DO NOT EDIT * * * * * */ - -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -/* This file is used by the story player, and must be IE-compatible */ - -function isObject(x) { - return !Array.isArray(x) && typeof x === "object" && x != null; -} - -/* Example: { a: { b: { c: 2, d: 3 } } } ↦ - { - "a": { b: { c: 2, d: 3 } }, - "a.b": { c: 2, d: 3 }, - "a.b.c": 2, - "a.b.d": 3 - } - */ -function flatten(o, keys, result) { - if (!keys) keys = []; - if (!result) result = {}; - - for (var k in o) { - keys.push(k); - if (typeof o[k] === "object") { - flatten(o[k], keys, result); - } - result[keys.join(".")] = o[k]; - keys.pop(); - } - - return result; -} - -// { "a.b.c": 2, "a.b.d":3 } → { a: { b: { c: 2, d: 3 } } } -function unflatten(o) { - var r = {}; - for (var k in o) { - var t = r; - for (var i = k.indexOf("."), p = 0; i >= 0; i = k.indexOf(".", p = i+1)) { - var s = k.substring(p, i); - if (!(s in t)) t[s] = {}; - t = t[s]; - } - t[k.substring(p)] = o[k]; // Assign the actual value to the appropriate nested object - } - return r; -} - -function merge(dest, source) { - for (var prop in source) { - if (isObject(dest[prop]) && isObject(source[prop])) { - merge(dest[prop], source[prop]); - } - else { - dest[prop] = source[prop]; - } - } - return dest; -} - -function deepCopyObject(obj) { - if (obj == null) return obj; - var copy = {}; - for (var k in obj) { - if (Array.isArray(obj[k])) { - copy[k] = obj[k].slice(); - } - else if (isObject(obj[k])) { - copy[k] = deepCopyObject(obj[k]); - } - else { - copy[k] = obj[k]; - } - } - return copy; -} - -// Simple deep equality test for JSON-definable objects -// The idea is that two objects test equal if they would -// JSON.stringify to the same thing, modulo key ordering. -// -// An edge case implied by the above: -// { a: 1, b: undefined } counts as equal to { a: 1 } -// -// This is used to compare the slide state to the preview -// state, to see if the state has been changed by user interaction. -function deepEqual(a, b) { - if (typeof a !== typeof b) return false; - - switch (typeof a) { - case "string": - case "boolean": - return a === b; - - case "number": - if (isNaN(a) && isNaN(b)) return true; - return a === b; - - - case "object": - if (a === null) return (b === null); - if (Array.isArray(a)) { - if (!Array.isArray(b)) return false; - if (a.length != b.length) return false; - for (var i = 0; i < a.length; i++) { - if (!deepEqual(a[i], b[i])) return false; - } - return true; - } - - if (b === null) return false; - var k; - for (k in a) { - if (!deepEqual(a[k], b[k])) return false; - } - for (k in b) { - if (!(k in a) && typeof b[k] !== "undefined") return false; - } - return true; - - case "undefined": - return typeof b === "undefined"; - } -} - -function getStateChanges(state1, state2) { - var diff = {}; - for (var name in state2) { - if (!state1.hasOwnProperty(name) || !deepEqual(state1[name], state2[name])) { - if (isObject(state1[name]) && isObject(state2[name])) { - diff[name] = getStateChanges(state1[name], state2[name]); - } - else { - diff[name] = state2[name]; - } - } - } - return diff; -} - -exports.deepCopyObject = deepCopyObject; -exports.deepEqual = deepEqual; -exports.flatten = flatten; -exports.getStateChanges = getStateChanges; -exports.isObject = isObject; -exports.merge = merge; -exports.unflatten = unflatten;