Plugin Directory

Changeset 3411350


Ignore:
Timestamp:
12/04/2025 07:45:42 PM (4 months ago)
Author:
openvideo
Message:

Version 1.3.0: Add dynamic endpoint routing feature

Location:
open-video/trunk
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • open-video/trunk/OpenVideoNamespace/Channels.php

    r3387314 r3411350  
    33
    44if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
     5
     6require_once __DIR__ . '/DynamicEndpoints.php';
    57
    68/**
     
    7173        add_action('template_redirect', array(self::class, 'openvideoplugin_redirect_channel_root'), 1);
    7274        add_filter('user_trailingslashit', array(self::class, 'openvideoplugin_remove_trailing_slash_middleton_paths'), 10, 2);
     75        // Dynamic endpoint handler - catches paths from solEndpoints not handled by hardcoded rules
     76        add_action('template_redirect', array(self::class, 'openvideoplugin_dynamic_endpoint_handler'), 5);
    7377        add_action('template_redirect', array(self::class, 'openvideoplugin_render_middleton_path'));
    7478        add_action('redirect_canonical', array(self::class, 'openvideoplugin_prevent_middleton_canonical_redirect'), 10, 2);
     
    130134            exit;
    131135        }
     136    }
     137
     138    /**
     139     * Dynamic endpoint handler - catches paths from solEndpoints not handled by hardcoded rules
     140     * Runs at priority 5: after early handlers (-999) and redirect (1), before main handler (10)
     141     */
     142    public static function openvideoplugin_dynamic_endpoint_handler()
     143    {
     144        // DEBUG: Add ?debug_dynamic=1 to any URL to see diagnostic info
     145        if (isset($_GET['debug_dynamic']) && $_GET['debug_dynamic'] === '1') {
     146            self::openvideoplugin_debug_dynamic_endpoints();
     147            return;
     148        }
     149
     150        // Skip if already handled by WordPress query var (rewrite rule matched)
     151        global $wp_query;
     152        if (isset($wp_query->query_vars['open_video_middleton_path'])) {
     153            return;  // Let main handler (priority 10) handle it
     154        }
     155
     156        // Skip admin requests
     157        if (is_admin()) {
     158            return;
     159        }
     160
     161        // Get request path
     162        $request_uri = isset($_SERVER['REQUEST_URI']) ? sanitize_text_field($_SERVER['REQUEST_URI']) : '';
     163        $parsed = parse_url($request_uri);
     164        $path = isset($parsed['path']) ? $parsed['path'] : '';
     165
     166        if (empty($path)) {
     167            return;
     168        }
     169
     170        // Normalize out home_url subdirectory if WP is installed in a subfolder
     171        $home_path = parse_url(home_url(), PHP_URL_PATH);
     172        if ($home_path && $home_path !== '/' && strpos($path, $home_path) === 0) {
     173            $path = substr($path, strlen($home_path));
     174            if ($path === '' || $path === false) {
     175                $path = '/';
     176            }
     177        }
     178
     179        // Check dynamic endpoints
     180        $dynamic = DynamicEndpoints::getInstance();
     181
     182        // is_dynamic_endpoint() will fetch endpoints if no cache exists
     183        // If fetch fails, endpoints will be empty and this returns false
     184        if (!$dynamic->is_dynamic_endpoint($path)) {
     185            return;
     186        }
     187
     188        // Proxy to Middleton
     189        $full_path = ltrim($path, '/');
     190        if (!empty($_SERVER['QUERY_STRING'])) {
     191            $full_path .= '?' . sanitize_text_field($_SERVER['QUERY_STRING']);
     192        }
     193
     194        $response = OpenVideoPlugin_RequestUtils::openvideoplugin_get_middleton_request($full_path);
     195
     196        if (is_wp_error($response)) {
     197            return;  // Let it fall through to other handlers
     198        }
     199
     200        $headers = wp_remote_retrieve_headers($response);
     201        $status_code = wp_remote_retrieve_response_code($response);
     202        $output = wp_remote_retrieve_body($response);
     203
     204        // Forward headers (same logic as openvideoplugin_render_middleton_path)
     205        if ($headers && is_iterable($headers)) {
     206            $skip_headers = array('set-cookie', 'transfer-encoding', 'connection', 'content-encoding', 'content-length');
     207
     208            foreach ($headers as $header_name => $header_values) {
     209                $header_name_lower = strtolower($header_name);
     210                if (in_array($header_name_lower, $skip_headers)) {
     211                    continue;
     212                }
     213                if (is_array($header_values)) {
     214                    foreach ($header_values as $header_value) {
     215                        header("$header_name: $header_value", false);
     216                    }
     217                } else {
     218                    header("$header_name: $header_values", false);
     219                }
     220            }
     221        }
     222
     223        // Process cookies (only allowed cookies)
     224        if (!empty($headers['set-cookie'])) {
     225            $cookies = is_array($headers['set-cookie']) ? $headers['set-cookie'] : array($headers['set-cookie']);
     226            foreach ($cookies as $cookie_str) {
     227                $cookie_parts = explode(';', $cookie_str);
     228                $main_part = array_shift($cookie_parts);
     229                if (strpos($main_part, '=') === false) {
     230                    continue;
     231                }
     232                list($name, $value) = explode('=', $main_part, 2);
     233                $name = trim($name);
     234                if (!isset(self::OPENVIDEOPLUGIN_ALLOWED_COOKIES[strtolower($name)])) {
     235                    continue;
     236                }
     237                setcookie($name, $value, 0, '/');
     238            }
     239        }
     240
     241        // Record this served endpoint for debug logging
     242        $dynamic->record_served_endpoint($path, $status_code);
     243       
     244        http_response_code($status_code);
     245        echo $output;
     246        exit;
     247    }
     248
     249    /**
     250     * Debug endpoint for troubleshooting dynamic endpoints
     251     * Access via: https://yoursite.com/?debug_dynamic=1
     252     */
     253    private static function openvideoplugin_debug_dynamic_endpoints()
     254    {
     255        header('Content-Type: application/json');
     256       
     257        $debug = array();
     258       
     259        // 1. Check cache directory
     260        $upload_dir = wp_upload_dir();
     261        $cache_dir = $upload_dir['basedir'] . '/open-video-cache';
     262        $cache_file = $cache_dir . '/endpoints.json';
     263       
     264        $debug['cache_dir'] = $cache_dir;
     265        $debug['cache_dir_exists'] = file_exists($cache_dir);
     266        $debug['cache_dir_writable'] = is_writable($cache_dir) || is_writable($upload_dir['basedir']);
     267        $debug['cache_file'] = $cache_file;
     268        $debug['cache_file_exists'] = file_exists($cache_file);
     269       
     270        // 2. Read cache contents if exists
     271        if (file_exists($cache_file)) {
     272            $cache_content = file_get_contents($cache_file);
     273            $cache_data = json_decode($cache_content, true);
     274            $debug['cache_content'] = array(
     275                'version' => isset($cache_data['version']) ? $cache_data['version'] : null,
     276                'endpoints_count' => isset($cache_data['endpoints']) ? count($cache_data['endpoints']) : 0,
     277                'last_version_check' => isset($cache_data['last_version_check']) ? $cache_data['last_version_check'] : null,
     278                'last_check_ago_seconds' => isset($cache_data['last_version_check']) ? (time() - $cache_data['last_version_check']) : null,
     279            );
     280        } else {
     281            $debug['cache_content'] = null;
     282        }
     283       
     284        // 2b. Get last served dynamic endpoints
     285        $dynamic_instance = DynamicEndpoints::getInstance();
     286        $debug['last_served_endpoints'] = $dynamic_instance->get_served_log();
     287       
     288        // 3. Test fetch from sol
     289        $debug['sol_url'] = 'https://g.ezoic.net/wp/endpoints.go';
     290        $response = wp_remote_get($debug['sol_url'], array('timeout' => 10, 'sslverify' => true));
     291       
     292        if (is_wp_error($response)) {
     293            $debug['sol_fetch_error'] = $response->get_error_message();
     294            $debug['sol_fetch_success'] = false;
     295        } else {
     296            $debug['sol_fetch_success'] = true;
     297            $debug['sol_status_code'] = wp_remote_retrieve_response_code($response);
     298            $body = wp_remote_retrieve_body($response);
     299            $data = json_decode($body, true);
     300            $debug['sol_response'] = array(
     301                'result' => isset($data['result']) ? $data['result'] : null,
     302                'version' => isset($data['version']) ? $data['version'] : null,
     303                'endpoints_count' => isset($data['endpoints']) ? count($data['endpoints']) : 0,
     304            );
     305        }
     306       
     307        // 4. Test DynamicEndpoints class
     308        $dynamic = DynamicEndpoints::getInstance();
     309        $debug['dynamic_class'] = array(
     310            'has_valid_cache' => $dynamic->has_valid_cache(),
     311            'endpoints_count' => count($dynamic->get_endpoints()),
     312        );
     313       
     314        echo json_encode($debug, JSON_PRETTY_PRINT);
     315        exit;
    132316    }
    133317
  • open-video/trunk/README.txt

    r3387314 r3411350  
    66Tested up to: 6.8
    77Requires PHP: 7.0
    8 Stable tag: 1.2.4
     8Stable tag: 1.3.0
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    2727
    2828== Changelog ==
     29= 1.3.0 =
     30* Add dynamic endpoint routing - new endpoints are automatically supported without plugin updates
     31* Cache cleanup on plugin deactivation
     32
    2933= 1.2.4 =
    3034* Enforce channel path /openvideo/ with ending slash
  • open-video/trunk/open-video-block/build/index.asset.php

    r3363570 r3411350  
    1 <?php return array('dependencies' => array('react', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '8b5cefaf152611f4ea00');
     1<?php return array('dependencies' => array('react', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '442e012b4ccd3a5f8b0d');
  • open-video/trunk/open-video-block/build/index.js

    r3363570 r3411350  
    1 !function(){var e,t={2168:function(e,t,n){"use strict";var r=window.wp.blocks,o=window.wp.element;window.wp.i18n,n(9196),n(1038),n(8446);var i=window.wp.blockEditor,a=window.wp.components,c=window.wp.data,s=window.wp.apiFetch,l=n.n(s);function u(e,t){return function(){return e.apply(t,arguments)}}const{toString:f}=Object.prototype,{getPrototypeOf:p}=Object,d=(h=Object.create(null),e=>{const t=f.call(e);return h[t]||(h[t]=t.slice(8,-1).toLowerCase())});var h;const y=e=>(e=e.toLowerCase(),t=>d(t)===e),b=e=>t=>typeof t===e,{isArray:v}=Array,g=b("undefined"),m=y("ArrayBuffer"),w=b("string"),O=b("function"),j=b("number"),S=e=>null!==e&&"object"==typeof e,_=e=>{if("object"!==d(e))return!1;const t=p(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},E=y("Date"),P=y("File"),x=y("Blob"),k=y("FileList"),T=y("URLSearchParams");function C(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),v(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let a;for(r=0;r<i;r++)a=o[r],t.call(null,e[a],a,e)}}function R(e,t){t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const N="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,A=e=>!g(e)&&e!==N,D=(B="undefined"!=typeof Uint8Array&&p(Uint8Array),e=>B&&e instanceof B);var B;const I=y("HTMLFormElement"),F=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),M=y("RegExp"),L=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};C(n,((n,o)=>{!1!==t(n,o,e)&&(r[o]=n)})),Object.defineProperties(e,r)},U="abcdefghijklmnopqrstuvwxyz",V="0123456789",z={DIGIT:V,ALPHA:U,ALPHA_DIGIT:U+U.toUpperCase()+V},q=y("AsyncFunction");var K={isArray:v,isArrayBuffer:m,isBuffer:function(e){return null!==e&&!g(e)&&null!==e.constructor&&!g(e.constructor)&&O(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||O(e.append)&&("formdata"===(t=d(e))||"object"===t&&O(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&m(e.buffer),t},isString:w,isNumber:j,isBoolean:e=>!0===e||!1===e,isObject:S,isPlainObject:_,isUndefined:g,isDate:E,isFile:P,isBlob:x,isRegExp:M,isFunction:O,isStream:e=>S(e)&&O(e.pipe),isURLSearchParams:T,isTypedArray:D,isFileList:k,forEach:C,merge:function e(){const{caseless:t}=A(this)&&this||{},n={},r=(r,o)=>{const i=t&&R(n,o)||o;_(n[i])&&_(r)?n[i]=e(n[i],r):_(r)?n[i]=e({},r):v(r)?n[i]=r.slice():n[i]=r};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&C(arguments[e],r);return n},extend:(e,t,n,{allOwnKeys:r}={})=>(C(t,((t,r)=>{n&&O(t)?e[r]=u(t,n):e[r]=t}),{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,i,a;const c={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],r&&!r(a,e,t)||c[a]||(t[a]=e[a],c[a]=!0);e=!1!==n&&p(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:d,kindOfTest:y,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(v(e))return e;let t=e.length;if(!j(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:I,hasOwnProperty:F,hasOwnProp:F,reduceDescriptors:L,freezeMethods:e=>{L(e,((t,n)=>{if(O(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];O(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return v(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:R,global:N,isContextDefined:A,ALPHABET:z,generateString:(e=16,t=z.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&O(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(S(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const o=v(e)?[]:{};return C(e,((e,t)=>{const i=n(e,r+1);!g(i)&&(o[t]=i)})),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:q,isThenable:e=>e&&(S(e)||O(e))&&O(e.then)&&O(e.catch)};function H(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}K.inherits(H,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:K.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const $=H.prototype,W={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{W[e]={value:e}})),Object.defineProperties(H,W),Object.defineProperty($,"isAxiosError",{value:!0}),H.from=(e,t,n,r,o,i)=>{const a=Object.create($);return K.toFlatObject(e,a,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),H.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};var Y=H;function J(e){return K.isPlainObject(e)||K.isArray(e)}function G(e){return K.endsWith(e,"[]")?e.slice(0,-2):e}function X(e,t,n){return e?e.concat(t).map((function(e,t){return e=G(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const Q=K.toFlatObject(K,{},null,(function(e){return/^is[A-Z]/.test(e)}));var Z=function(e,t,n){if(!K.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=K.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!K.isUndefined(t[e])}))).metaTokens,o=n.visitor||l,i=n.dots,a=n.indexes,c=(n.Blob||"undefined"!=typeof Blob&&Blob)&&K.isSpecCompliantForm(t);if(!K.isFunction(o))throw new TypeError("visitor must be a function");function s(e){if(null===e)return"";if(K.isDate(e))return e.toISOString();if(!c&&K.isBlob(e))throw new Y("Blob is not supported. Use a Buffer instead.");return K.isArrayBuffer(e)||K.isTypedArray(e)?c&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function l(e,n,o){let c=e;if(e&&!o&&"object"==typeof e)if(K.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(K.isArray(e)&&function(e){return K.isArray(e)&&!e.some(J)}(e)||(K.isFileList(e)||K.endsWith(n,"[]"))&&(c=K.toArray(e)))return n=G(n),c.forEach((function(e,r){!K.isUndefined(e)&&null!==e&&t.append(!0===a?X([n],r,i):null===a?n:n+"[]",s(e))})),!1;return!!J(e)||(t.append(X(o,n,i),s(e)),!1)}const u=[],f=Object.assign(Q,{defaultVisitor:l,convertValue:s,isVisitable:J});if(!K.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!K.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+r.join("."));u.push(n),K.forEach(n,(function(n,i){!0===(!(K.isUndefined(n)||null===n)&&o.call(t,n,K.isString(i)?i.trim():i,r,f))&&e(n,r?r.concat(i):[i])})),u.pop()}}(e),t};function ee(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function te(e,t){this._pairs=[],e&&Z(e,this,t)}const ne=te.prototype;ne.append=function(e,t){this._pairs.push([e,t])},ne.toString=function(e){const t=e?function(t){return e.call(this,t,ee)}:ee;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var re=te;function oe(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ie(e,t,n){if(!t)return e;const r=n&&n.encode||oe,o=n&&n.serialize;let i;if(i=o?o(t,n):K.isURLSearchParams(t)?t.toString():new re(t,n).toString(r),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}var ae=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){K.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},ce={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},se={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:re,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},isStandardBrowserEnv:(()=>{let e;return("undefined"==typeof navigator||"ReactNative"!==(e=navigator.product)&&"NativeScript"!==e&&"NS"!==e)&&"undefined"!=typeof window&&"undefined"!=typeof document})(),isStandardBrowserWebWorkerEnv:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,protocols:["http","https","file","blob","url","data"]},le=function(e){function t(e,n,r,o){let i=e[o++];const a=Number.isFinite(+i),c=o>=e.length;return i=!i&&K.isArray(r)?r.length:i,c?(K.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!a):(r[i]&&K.isObject(r[i])||(r[i]=[]),t(e,n,r[i],o)&&K.isArray(r[i])&&(r[i]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}(r[i])),!a)}if(K.isFormData(e)&&K.isFunction(e.entries)){const n={};return K.forEachEntry(e,((e,r)=>{t(function(e){return K.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null};const ue={"Content-Type":void 0},fe={transitional:ce,adapter:["xhr","http"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=K.isObject(e);if(o&&K.isHTMLForm(e)&&(e=new FormData(e)),K.isFormData(e))return r&&r?JSON.stringify(le(e)):e;if(K.isArrayBuffer(e)||K.isBuffer(e)||K.isStream(e)||K.isFile(e)||K.isBlob(e))return e;if(K.isArrayBufferView(e))return e.buffer;if(K.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Z(e,new se.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return se.isNode&&K.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((i=K.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Z(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(K.isString(e))try{return(0,JSON.parse)(e),K.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||fe.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(e&&K.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw Y.from(e,Y.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:se.classes.FormData,Blob:se.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};K.forEach(["delete","get","head"],(function(e){fe.headers[e]={}})),K.forEach(["post","put","patch"],(function(e){fe.headers[e]=K.merge(ue)}));var pe=fe;const de=K.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),he=Symbol("internals");function ye(e){return e&&String(e).trim().toLowerCase()}function be(e){return!1===e||null==e?e:K.isArray(e)?e.map(be):String(e)}function ve(e,t,n,r,o){return K.isFunction(r)?r.call(this,t,n):(o&&(t=n),K.isString(t)?K.isString(r)?-1!==t.indexOf(r):K.isRegExp(r)?r.test(t):void 0:void 0)}class ge{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=ye(t);if(!o)throw new Error("header name must be a non-empty string");const i=K.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=be(e))}const i=(e,t)=>K.forEach(e,((e,n)=>o(e,n,t)));return K.isPlainObject(e)||e instanceof this.constructor?i(e,t):K.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?i((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&de[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t):null!=e&&o(t,e,n),this}get(e,t){if(e=ye(e)){const n=K.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(K.isFunction(t))return t.call(this,e,n);if(K.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=ye(e)){const n=K.findKey(this,e);return!(!n||void 0===this[n]||t&&!ve(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=ye(e)){const o=K.findKey(n,e);!o||t&&!ve(0,n[o],o,t)||(delete n[o],r=!0)}}return K.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!ve(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return K.forEach(this,((r,o)=>{const i=K.findKey(n,o);if(i)return t[i]=be(r),void delete t[o];const a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(o):String(o).trim();a!==o&&delete t[o],t[a]=be(r),n[a]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return K.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&K.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[he]=this[he]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=ye(e);t[r]||(function(e,t){const n=K.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})}))}(n,e),t[r]=!0)}return K.isArray(e)?e.forEach(r):r(e),this}}ge.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),K.freezeMethods(ge.prototype),K.freezeMethods(ge);var me=ge;function we(e,t){const n=this||pe,r=t||n,o=me.from(r.headers);let i=r.data;return K.forEach(e,(function(e){i=e.call(n,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function Oe(e){return!(!e||!e.__CANCEL__)}function je(e,t,n){Y.call(this,null==e?"canceled":e,Y.ERR_CANCELED,t,n),this.name="CanceledError"}K.inherits(je,Y,{__CANCEL__:!0});var Se=je,_e=se.isStandardBrowserEnv?{write:function(e,t,n,r,o,i){const a=[];a.push(e+"="+encodeURIComponent(t)),K.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),K.isString(r)&&a.push("path="+r),K.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function Ee(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}var Pe=se.isStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let n;function r(n){let r=n;return e&&(t.setAttribute("href",r),r=t.href),t.setAttribute("href",r),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return n=r(window.location.href),function(e){const t=K.isString(e)?r(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0};function xe(e,t){let n=0;const r=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,i=0,a=0;return t=void 0!==t?t:1e3,function(c){const s=Date.now(),l=r[a];o||(o=s),n[i]=c,r[i]=s;let u=a,f=0;for(;u!==i;)f+=n[u++],u%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),s-o<t)return;const p=l&&s-l;return p?Math.round(1e3*f/p):void 0}}(50,250);return o=>{const i=o.loaded,a=o.lengthComputable?o.total:void 0,c=i-n,s=r(c);n=i;const l={loaded:i,total:a,progress:a?i/a:void 0,bytes:c,rate:s||void 0,estimated:s&&a&&i<=a?(a-i)/s:void 0,event:o};l[t?"download":"upload"]=!0,e(l)}}const ke={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){let r=e.data;const o=me.from(e.headers).normalize(),i=e.responseType;let a;function c(){e.cancelToken&&e.cancelToken.unsubscribe(a),e.signal&&e.signal.removeEventListener("abort",a)}K.isFormData(r)&&(se.isStandardBrowserEnv||se.isStandardBrowserWebWorkerEnv?o.setContentType(!1):o.setContentType("multipart/form-data;",!1));let s=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",n=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(t+":"+n))}const l=Ee(e.baseURL,e.url);function u(){if(!s)return;const r=me.from("getAllResponseHeaders"in s&&s.getAllResponseHeaders());!function(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new Y("Request failed with status code "+n.status,[Y.ERR_BAD_REQUEST,Y.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}((function(e){t(e),c()}),(function(e){n(e),c()}),{data:i&&"text"!==i&&"json"!==i?s.response:s.responseText,status:s.status,statusText:s.statusText,headers:r,config:e,request:s}),s=null}if(s.open(e.method.toUpperCase(),ie(l,e.params,e.paramsSerializer),!0),s.timeout=e.timeout,"onloadend"in s?s.onloadend=u:s.onreadystatechange=function(){s&&4===s.readyState&&(0!==s.status||s.responseURL&&0===s.responseURL.indexOf("file:"))&&setTimeout(u)},s.onabort=function(){s&&(n(new Y("Request aborted",Y.ECONNABORTED,e,s)),s=null)},s.onerror=function(){n(new Y("Network Error",Y.ERR_NETWORK,e,s)),s=null},s.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const r=e.transitional||ce;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new Y(t,r.clarifyTimeoutError?Y.ETIMEDOUT:Y.ECONNABORTED,e,s)),s=null},se.isStandardBrowserEnv){const t=(e.withCredentials||Pe(l))&&e.xsrfCookieName&&_e.read(e.xsrfCookieName);t&&o.set(e.xsrfHeaderName,t)}void 0===r&&o.setContentType(null),"setRequestHeader"in s&&K.forEach(o.toJSON(),(function(e,t){s.setRequestHeader(t,e)})),K.isUndefined(e.withCredentials)||(s.withCredentials=!!e.withCredentials),i&&"json"!==i&&(s.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&s.addEventListener("progress",xe(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&s.upload&&s.upload.addEventListener("progress",xe(e.onUploadProgress)),(e.cancelToken||e.signal)&&(a=t=>{s&&(n(!t||t.type?new Se(null,e,s):t),s.abort(),s=null)},e.cancelToken&&e.cancelToken.subscribe(a),e.signal&&(e.signal.aborted?a():e.signal.addEventListener("abort",a)));const f=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(l);f&&-1===se.protocols.indexOf(f)?n(new Y("Unsupported protocol "+f+":",Y.ERR_BAD_REQUEST,e)):s.send(r||null)}))}};K.forEach(ke,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));function Te(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Se(null,e)}function Ce(e){return Te(e),e.headers=me.from(e.headers),e.data=we.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),(e=>{e=K.isArray(e)?e:[e];const{length:t}=e;let n,r;for(let o=0;o<t&&(n=e[o],!(r=K.isString(n)?ke[n.toLowerCase()]:n));o++);if(!r){if(!1===r)throw new Y(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT");throw new Error(K.hasOwnProp(ke,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`)}if(!K.isFunction(r))throw new TypeError("adapter is not a function");return r})(e.adapter||pe.adapter)(e).then((function(t){return Te(e),t.data=we.call(e,e.transformResponse,t),t.headers=me.from(t.headers),t}),(function(t){return Oe(t)||(Te(e),t&&t.response&&(t.response.data=we.call(e,e.transformResponse,t.response),t.response.headers=me.from(t.response.headers))),Promise.reject(t)}))}const Re=e=>e instanceof me?e.toJSON():e;function Ne(e,t){t=t||{};const n={};function r(e,t,n){return K.isPlainObject(e)&&K.isPlainObject(t)?K.merge.call({caseless:n},e,t):K.isPlainObject(t)?K.merge({},t):K.isArray(t)?t.slice():t}function o(e,t,n){return K.isUndefined(t)?K.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function i(e,t){if(!K.isUndefined(t))return r(void 0,t)}function a(e,t){return K.isUndefined(t)?K.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function c(n,o,i){return i in t?r(n,o):i in e?r(void 0,n):void 0}const s={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:c,headers:(e,t)=>o(Re(e),Re(t),!0)};return K.forEach(Object.keys(Object.assign({},e,t)),(function(r){const i=s[r]||o,a=i(e[r],t[r],r);K.isUndefined(a)&&i!==c||(n[r]=a)})),n}const Ae={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Ae[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const De={};Ae.transitional=function(e,t,n){function r(e,t){return"[Axios v1.4.0] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,i)=>{if(!1===e)throw new Y(r(o," has been removed"+(t?" in "+t:"")),Y.ERR_DEPRECATED);return t&&!De[o]&&(De[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,i)}};var Be={assertOptions:function(e,t,n){if("object"!=typeof e)throw new Y("options must be an object",Y.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],a=t[i];if(a){const t=e[i],n=void 0===t||a(t,i,e);if(!0!==n)throw new Y("option "+i+" must be "+n,Y.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new Y("Unknown option "+i,Y.ERR_BAD_OPTION)}},validators:Ae};const Ie=Be.validators;class Fe{constructor(e){this.defaults=e,this.interceptors={request:new ae,response:new ae}}request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Ne(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;let i;void 0!==n&&Be.assertOptions(n,{silentJSONParsing:Ie.transitional(Ie.boolean),forcedJSONParsing:Ie.transitional(Ie.boolean),clarifyTimeoutError:Ie.transitional(Ie.boolean)},!1),null!=r&&(K.isFunction(r)?t.paramsSerializer={serialize:r}:Be.assertOptions(r,{encode:Ie.function,serialize:Ie.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase(),i=o&&K.merge(o.common,o[t.method]),i&&K.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=me.concat(i,o);const a=[];let c=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(c=c&&e.synchronous,a.unshift(e.fulfilled,e.rejected))}));const s=[];let l;this.interceptors.response.forEach((function(e){s.push(e.fulfilled,e.rejected)}));let u,f=0;if(!c){const e=[Ce.bind(this),void 0];for(e.unshift.apply(e,a),e.push.apply(e,s),u=e.length,l=Promise.resolve(t);f<u;)l=l.then(e[f++],e[f++]);return l}u=a.length;let p=t;for(f=0;f<u;){const e=a[f++],t=a[f++];try{p=e(p)}catch(e){t.call(this,e);break}}try{l=Ce.call(this,p)}catch(e){return Promise.reject(e)}for(f=0,u=s.length;f<u;)l=l.then(s[f++],s[f++]);return l}getUri(e){return ie(Ee((e=Ne(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}K.forEach(["delete","get","head","options"],(function(e){Fe.prototype[e]=function(t,n){return this.request(Ne(n||{},{method:e,url:t,data:(n||{}).data}))}})),K.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,o){return this.request(Ne(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Fe.prototype[e]=t(),Fe.prototype[e+"Form"]=t(!0)}));var Me=Fe;class Le{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const n=this;this.promise.then((e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,o){n.reason||(n.reason=new Se(e,r,o),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new Le((function(t){e=t})),cancel:e}}}var Ue=Le;const Ve={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ve).forEach((([e,t])=>{Ve[t]=e}));var ze=Ve;const qe=function e(t){const n=new Me(t),r=u(Me.prototype.request,n);return K.extend(r,Me.prototype,n,{allOwnKeys:!0}),K.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Ne(t,n))},r}(pe);qe.Axios=Me,qe.CanceledError=Se,qe.CancelToken=Ue,qe.isCancel=Oe,qe.VERSION="1.4.0",qe.toFormData=Z,qe.AxiosError=Y,qe.Cancel=qe.CanceledError,qe.all=function(e){return Promise.all(e)},qe.spread=function(e){return function(t){return e.apply(null,t)}},qe.isAxiosError=function(e){return K.isObject(e)&&!0===e.isAxiosError},qe.mergeConfig=Ne,qe.AxiosHeaders=me,qe.formToJSON=e=>le(K.isHTMLForm(e)?new FormData(e):e),qe.HttpStatusCode=ze,qe.default=qe;var Ke=qe,He=(0,c.withSelect)((e=>{const{getEntityRecords:t}=e("core");return{categories:t("taxonomy","category",{per_page:-1})}}))((e=>{let{attributes:t,updateSelectedCategory:n,categories:r,disabled:i}=e,c=[];return Array.isArray(r)&&(c=r.map((e=>{let{id:t,name:n}=e;return{label:(r=n,"Uncategorized"===r?"Posts with no category assigned (Uncategorized)":`Posts assigned the '${r}' category`),value:t};var r})),c.unshift({value:-1,label:"All posts in site"})),(0,o.createElement)(a.SelectControl,{label:"Add this Video to:",disabled:i,value:t.category,onChange:e=>n(e),options:c})})),$e=n.p+"images/openvideologo.d7e568e7.png";n(361);const We=/^https?:\/\/[\w.-]+\/(?:.*\/)?(v|video|playlist)\/[\w-]+\/?([\?&][\w-]+=[\w-]*)*$/;function Ye(){return Ye=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ye.apply(this,arguments)}var Je=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"open-video/open-video-block","version":"0.1.0","title":"Open.Video Block","category":"embed","icon":"open-video-icon","description":"Open.Video Block for embedding videos","attributes":{"url":{"type":"string","default":""},"providerNameSlug":{"type":"string","default":""},"allowResponsive":{"type":"boolean","default":true},"responsive":{"type":"boolean","default":false},"previewable":{"type":"boolean","default":true},"floatOption":{"type":"number","default":1},"displayType":{"type":"string","default":"url"},"html":{"type":"string","default":""},"autoplay":{"type":"boolean","default":true},"loop":{"type":"boolean","default":false},"category":{"type":"string","default":""},"alignment":{"type":"string","default":"none"}},"supports":{"spacing":{"margin":true}},"textdomain":"open-video-block","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css"}');const Ge=()=>{const e={};for(const[t,n]of Object.entries(Je.attributes))n.hasOwnProperty("default")&&(e[t]=n.default);return e},Xe={...Je,edit:function(e){let{clientId:t,attributes:n,setAttributes:s}=e;const u="1",f="edit",p="preview",d="add_to_posts",h="skip_if_video_exists",y="replace_all_videos",b=(0,i.useBlockEditContext)(),v=(0,c.select)("core/editor");let g=null;v&&(g=v.getCurrentPost());let m=0,w=0,O=0,j=0;const{url:S,floatOption:_,html:E,category:P,autoplay:x}=n,[k,T]=(0,o.useState)(S),[C,R]=(0,o.useState)(_),[N,A]=(0,o.useState)(E),[D,B]=(0,o.useState)(x),[I,F]=(0,o.useState)(u),[M,L]=(0,o.useState)(P),[U,V]=(0,o.useState)(!1),[z,q]=(0,o.useState)(!1),[K,H]=(0,o.useState)(h),[$,W]=(0,o.useState)(0),[Y,J]=(0,o.useState)(!1),[G,X]=(0,o.useState)(0),[Q,Z]=(0,o.useState)(0),[ee,te]=(0,o.useState)(0),[ne,re]=(0,o.useState)(0),[oe,ie]=(0,o.useState)(0),[ae,ce]=(0,o.useState)(!1),se=()=>le(k),le=e=>We.test(e),[ue,fe]=(0,o.useState)(f);(0,o.useEffect)((()=>{if(!v)return;let e=0;const n=v.getBlocks();n.forEach(((r,o)=>{"core/paragraph"===r.name&&e++,r.clientId===t&&(0===e?F("0"):1===e?F(u):2===e?F("2"):o<n.length/2?F("3"):F("4"))}))}),[]),(0,o.useEffect)((()=>{s({category:M})}),[M]),(0,o.useEffect)((()=>{s({url:k}),le(k)?pe():ce(!1)}),[k]),(0,o.useEffect)((()=>{s({floatOption:C}),se()&&pe()}),[C]),(0,o.useEffect)((()=>{s({html:N})}),[N]),(0,o.useEffect)((()=>{s({autoplay:D}),se()&&pe()}),[D]),(0,o.useEffect)((()=>{ie(0!==G?Math.floor(($+Q+ee+ne)/G*100):0)}),[$,Q,ee,ne]);const pe=async()=>{let e="";if(k&&k.includes("/playlist")){if(e=(e=>{let t=e,n=k.split("/");if(!n)return;if(n=n[n.length-1].split("?"),!n)return;const r=n[0],o=function(){let{autoplay:e=!1,floatOption:t=!0,videoId:n="",autoMatch:r=!1,startTime:o=0,width:i=640,height:a=360,preview:c=!1,embedCodeSource:s="w"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const l={auto_play:e,float:t,width:i,height:a,embed_code_source:s};return n&&(l.videoId=n),o>0&&(l.time_start=o),c&&(l.preview=c),JSON.stringify(l)}({autoplay:!!D,floatOption:!!C,videoId:r});return o?t+o:void 0})("https://open.video/generate-embed-code?j="),!e)return void ce(!1)}else{if(!k)return void ce(!1);if(e=(e=>{let t="https://open.video/openvideo/oembed?url=";return t+=k?k.replace(/\/+$/,""):"",t+=`&float=${C}`,t+=`&autoplay=${D}`,t})(),!e)return void ce(!1)}const t=await Ke({method:"get",url:e});if(t&&t.data){const e=t.data;e.html?A(e.html):A(e),e.provider_name?s({providerSlug:e.provider_name}):s({providerSlug:"Open.Video"}),ce(!0)}else ce(!1)},de=()=>{se()&&fe(p)},he=()=>{se()&&fe(d)};return(0,o.createElement)("div",(0,i.useBlockProps)(),(0,o.createElement)(i.BlockControls,null,(0,o.createElement)(i.BlockAlignmentToolbar,{value:n.alignment,onChange:e=>{s({alignment:e})},controls:["left","center","right"]})),ue===p&&""!=N&&(0,o.createElement)("div",{className:"preview-block"},(0,o.createElement)("div",{class:"preview-btn-group"},(0,o.createElement)("button",{onClick:()=>{fe(f)},"aria-label":"Edit Video Settings",style:{marginRight:"15px"}},"Edit"),(0,o.createElement)("button",{onClick:he},"Add to Other Posts")),(0,o.createElement)("iframe",{src:(()=>{let e=k?k.replace(/\/+$/,""):"",t=`https://open.video/embed?idFromURL=${encodeURIComponent(e)}&play_nextvid=0`;return D||(t+="&autoplay=0"),t})()}),(z||Y)&&(0,o.createElement)("div",{class:"propagate-notice"},z&&(0,o.createElement)(a.Animate,{type:"slide-in",options:{origin:"top"}},(()=>(0,o.createElement)(a.Notice,{status:$>0?"success":"warning",isDismissible:!1},$>0&&(0,o.createElement)("p",null,(0,o.createElement)(a.Icon,{icon:"saved",className:"openvideoplugin-success"}),"Open.Video video added to ",(0,o.createElement)("strong",null,$)," other post",1===$?"":"s","!"),0===$&&(0,o.createElement)("p",null,(0,o.createElement)(a.Icon,{icon:"warning",className:"openvideoplugin-warning"}),"No Open.Video videos were added to other posts"),$!==G&&G>0&&(0,o.createElement)("ul",null,Q>0&&(0,o.createElement)("li",null,(0,o.createElement)("strong",null,Q)," post",1===Q?" was skipped because it already has":"s were skipped because they already have"," a Open.Video video"),ee>0&&(0,o.createElement)("li",null,(0,o.createElement)("strong",null,ee)," post",1===ee?"":"s"," did not have an appropriate location to add the video to"),ne>0&&(0,o.createElement)("li",null,(0,o.createElement)("strong",null,ne)," post",1===ne?"":"s"," failed to update due to an internal error, please try again"))))),Y&&(0,o.createElement)(a.Animate,{type:"slide-in",options:{origin:"top"}},(()=>(0,o.createElement)(a.Notice,{status:"error",isDismissible:!1},(0,o.createElement)("p",null,(0,o.createElement)(a.Icon,{icon:"warning",className:"openvideoplugin-error"}),"There was an error adding the Open.Video video to other pages")))))),ue===f&&(0,o.createElement)("div",{className:"edit-block"},(0,o.createElement)("div",{style:{height:"35px",maxWidth:"150px",marginBottom:"20px"}},(0,o.createElement)("a",{href:"https://open.video/",target:"_blank"},(0,o.createElement)("img",{src:$e}))),(0,o.createElement)("div",{style:{marginBottom:"18px"}}),(0,o.createElement)("div",null,(0,o.createElement)("p",{for:"open-video-url-input",style:{fontSize:"small",marginBottom:"20px"}},"Please provide a link to the video or playlist you'd like to serve on your website. You can easily copy the links from either ",(0,o.createElement)("a",{href:"https://app.open.video/videos",target:"_blank"},"Open.Video Studio")," or ",(0,o.createElement)("a",{href:"https://open.video",target:"_blank"},"Open.Video"),"."),(0,o.createElement)(a.TextControl,{id:"open-video-url-input",label:"Video or Playlist URL",value:k,placeholder:"Enter URL here",onChange:T})),(0,o.createElement)("hr",null),(0,o.createElement)("p",null,"Video Playback Settings"),(0,o.createElement)(a.CheckboxControl,{label:"Float",checked:_,onChange:e=>{R(e)}}),(0,o.createElement)(a.CheckboxControl,{label:"Auto Play",checked:x,onChange:e=>{B(e)}}),g&&(0,o.createElement)("span",null),(0,o.createElement)("div",{class:"openvideoplugin-btn-group"},(0,o.createElement)("button",{onClick:de,disabled:!ae},"Done"),(0,o.createElement)("button",{onClick:he,disabled:!ae},"Done & Add to Other Posts"))),(0,o.createElement)("div",{className:"edit-block",style:{display:ue===d?"block":"none"}},(0,o.createElement)("div",{style:{height:"35px",maxWidth:"150px",marginBottom:"20px"}},(0,o.createElement)("a",{href:"https://open.video/",target:"_blank"},(0,o.createElement)("img",{src:$e}))),(0,o.createElement)("div",{style:{marginBottom:"15px"}},"Add this Open.Video Video to other posts in your site"),(0,o.createElement)("p",null,(0,o.createElement)(He,{disabled:U,attributes:n,updateSelectedCategory:e=>{L(e)}})),(0,o.createElement)("p",null,(0,o.createElement)(a.SelectControl,{label:"Choose location in post to add this video:",disabled:U,onChange:e=>{F(e)},value:I,options:[{label:"Before 1st paragraph",value:"0"},{label:"Under 1st paragraph (recommended)",value:u},{label:"Under 2nd paragraph",value:"2"},{label:"Middle of page",value:"3"},{label:"Bottom of page",value:"4"}]})),(0,o.createElement)("p",null,(0,o.createElement)(a.RadioControl,{label:"If post already has one or more Open.Video Videos:",disabled:U,onChange:e=>{H(e)},selected:K,options:[{label:"Skip adding this video",value:h},{label:"Remove existing videos and add this one",value:y},{label:"Add this video without affecting other videos",value:"add_anyway"}]})),U&&G>0&&(0,o.createElement)(a.Notice,{status:"info",isDismissible:!1,className:"openvideoplugin-notice__loading"},(0,o.createElement)("p",null,(0,o.createElement)(a.Icon,{icon:"update",className:"openvideoplugin-loading openvideoplugin-info"}),(0,o.createElement)("span",null,"Adding video to ",(0,o.createElement)("strong",null,G)," posts... (",oe,"%)"))),(0,o.createElement)("div",{class:"openvideoplugin-btn-group"},(0,o.createElement)("button",{disabled:U,onClick:de,style:{backgroundColor:"white"}},"Cancel"),(0,o.createElement)("button",{disabled:U,onClick:async()=>{if(!N)return;if(U)return;m=0,w=0,O=0,j=0,te(0),re(0),X(0),W(0),Z(0),V(!0);let e="/wp/v2/posts?context=edit";parseInt(M)>0&&(e+=`&categories=${M}`);const t=await l()({path:e,method:"GET"}).catch((e=>{console.error(e),function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];V(!1),q(!e),J(e),de(),setTimeout((()=>{q(!1),J(!1),W(0)}),15e3)}(!0)}));if(!Array.isArray(t))return void propagateBlockComplete(!0);const o=g.id,i=t.filter((e=>e.id!==o));X(i.length);let a=i.map((e=>{let t=((e,t)=>{const n=e.some((e=>"open-video/open-video-block"===e.name||!("core/shortcode"!==e.name||"string"!=typeof e.originalContent||!e.originalContent.includes("[open-video"))||!("string"!=typeof e.originalContent||!e.originalContent.includes('id="open-video-'))));if(K===h&&n)return w++,Z(w),!1;if(K===y&&n){let t=[];e.forEach((e=>{"open-video/open-video-block"!==e.name&&("core/shortcode"===e.name&&"string"==typeof e.originalContent&&e.originalContent.includes("[open-video")||"string"==typeof e.originalContent&&e.originalContent.includes('id="open-video-')||t.push(e))})),e=[...t]}switch(I){case"0":return e.unshift(t),e;case u:let n=[],r=0;return e.forEach((e=>{n.push(e),"core/paragraph"===e.name&&r++,1===r&&n.push(t)})),n.length===e.length?(O++,te(O),!1):n;case"2":let o=[],i=0;return e.forEach((e=>{o.push(e),"core/paragraph"===e.name&&i++,2===i&&o.push(t)})),o.length===e.length?(O++,te(O),!1):o;case"3":let a=Math.floor(e.length/2);return e.splice(a,0,t),e;case"4":return e.push(t),e;default:return e}})((0,r.parse)(e.content.raw),(0,r.createBlock)(b.name,n));if(!t)return Promise.resolve();const o=(0,r.serialize)(t);return l()({path:`/wp/v2/posts/${e.id}`,method:"POST",data:{content:o}}).then((()=>{m++,W(m)})).catch((e=>{console.error(e),j++,re(j)}))}));await Promise.all(a),propagateBlockComplete()}},"Add to Posts"))))},save:function(e){let{attributes:t}=e;const n=i.useBlockProps.save(),{html:r,alignment:a}=t;let c={justifyContent:"center"};return"left"===a?c.justifyContent="flex-start":"right"===a&&(c.justifyContent="flex-end"),(0,o.createElement)("div",Ye({},n,{style:c}),(0,o.createElement)(o.RawHTML,null,r))},transforms:{from:[{type:"block",blocks:["core/embed"],isMatch(e){return We.test(e.url)},transform(e){const t=Ge();return t.url=e.url,t.displayType="url",(0,r.createBlock)("open-video/open-video-block",t)},priority:2},{type:"raw",isMatch:e=>"P"===e.nodeName&&We.test(e.textContent),transform:e=>{const t=Ge();return t.url=e.textContent.trim(),t.displayType="url",(0,r.createBlock)("open-video/open-video-block",t)},priority:1}]}};(0,r.registerBlockType)(Je.name,Xe)},8552:function(e,t,n){var r=n(852)(n(5639),"DataView");e.exports=r},1989:function(e,t,n){var r=n(1789),o=n(401),i=n(7667),a=n(1327),c=n(1866);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=r,s.prototype.delete=o,s.prototype.get=i,s.prototype.has=a,s.prototype.set=c,e.exports=s},8407:function(e,t,n){var r=n(7040),o=n(4125),i=n(2117),a=n(7518),c=n(4705);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=r,s.prototype.delete=o,s.prototype.get=i,s.prototype.has=a,s.prototype.set=c,e.exports=s},7071:function(e,t,n){var r=n(852)(n(5639),"Map");e.exports=r},3369:function(e,t,n){var r=n(4785),o=n(1285),i=n(6e3),a=n(9916),c=n(5265);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=r,s.prototype.delete=o,s.prototype.get=i,s.prototype.has=a,s.prototype.set=c,e.exports=s},3818:function(e,t,n){var r=n(852)(n(5639),"Promise");e.exports=r},8525:function(e,t,n){var r=n(852)(n(5639),"Set");e.exports=r},8668:function(e,t,n){var r=n(3369),o=n(619),i=n(2385);function a(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}a.prototype.add=a.prototype.push=o,a.prototype.has=i,e.exports=a},6384:function(e,t,n){var r=n(8407),o=n(7465),i=n(3779),a=n(7599),c=n(4758),s=n(4309);function l(e){var t=this.__data__=new r(e);this.size=t.size}l.prototype.clear=o,l.prototype.delete=i,l.prototype.get=a,l.prototype.has=c,l.prototype.set=s,e.exports=l},2705:function(e,t,n){var r=n(5639).Symbol;e.exports=r},1149:function(e,t,n){var r=n(5639).Uint8Array;e.exports=r},577:function(e,t,n){var r=n(852)(n(5639),"WeakMap");e.exports=r},7412:function(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}},4963:function(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}},4636:function(e,t,n){var r=n(2545),o=n(5694),i=n(1469),a=n(4144),c=n(5776),s=n(6719),l=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=i(e),u=!n&&o(e),f=!n&&!u&&a(e),p=!n&&!u&&!f&&s(e),d=n||u||f||p,h=d?r(e.length,String):[],y=h.length;for(var b in e)!t&&!l.call(e,b)||d&&("length"==b||f&&("offset"==b||"parent"==b)||p&&("buffer"==b||"byteLength"==b||"byteOffset"==b)||c(b,y))||h.push(b);return h}},2488:function(e){e.exports=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}},2908:function(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},4865:function(e,t,n){var r=n(9465),o=n(7813),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var a=e[t];i.call(e,t)&&o(a,n)&&(void 0!==n||t in e)||r(e,t,n)}},8470:function(e,t,n){var r=n(7813);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},4037:function(e,t,n){var r=n(8363),o=n(3674);e.exports=function(e,t){return e&&r(t,o(t),e)}},3886:function(e,t,n){var r=n(8363),o=n(1704);e.exports=function(e,t){return e&&r(t,o(t),e)}},9465:function(e,t,n){var r=n(8777);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},5990:function(e,t,n){var r=n(6384),o=n(7412),i=n(4865),a=n(4037),c=n(3886),s=n(4626),l=n(278),u=n(8805),f=n(1911),p=n(8234),d=n(6904),h=n(4160),y=n(3824),b=n(9148),v=n(8517),g=n(1469),m=n(4144),w=n(6688),O=n(3218),j=n(2928),S=n(3674),_=n(1704),E="[object Arguments]",P="[object Function]",x="[object Object]",k={};k[E]=k["[object Array]"]=k["[object ArrayBuffer]"]=k["[object DataView]"]=k["[object Boolean]"]=k["[object Date]"]=k["[object Float32Array]"]=k["[object Float64Array]"]=k["[object Int8Array]"]=k["[object Int16Array]"]=k["[object Int32Array]"]=k["[object Map]"]=k["[object Number]"]=k[x]=k["[object RegExp]"]=k["[object Set]"]=k["[object String]"]=k["[object Symbol]"]=k["[object Uint8Array]"]=k["[object Uint8ClampedArray]"]=k["[object Uint16Array]"]=k["[object Uint32Array]"]=!0,k["[object Error]"]=k[P]=k["[object WeakMap]"]=!1,e.exports=function e(t,n,T,C,R,N){var A,D=1&n,B=2&n,I=4&n;if(T&&(A=R?T(t,C,R,N):T(t)),void 0!==A)return A;if(!O(t))return t;var F=g(t);if(F){if(A=y(t),!D)return l(t,A)}else{var M=h(t),L=M==P||"[object GeneratorFunction]"==M;if(m(t))return s(t,D);if(M==x||M==E||L&&!R){if(A=B||L?{}:v(t),!D)return B?f(t,c(A,t)):u(t,a(A,t))}else{if(!k[M])return R?t:{};A=b(t,M,D)}}N||(N=new r);var U=N.get(t);if(U)return U;N.set(t,A),j(t)?t.forEach((function(r){A.add(e(r,n,T,r,t,N))})):w(t)&&t.forEach((function(r,o){A.set(o,e(r,n,T,o,t,N))}));var V=F?void 0:(I?B?d:p:B?_:S)(t);return o(V||t,(function(r,o){V&&(r=t[o=r]),i(A,o,e(r,n,T,o,t,N))})),A}},3118:function(e,t,n){var r=n(3218),o=Object.create,i=function(){function e(){}return function(t){if(!r(t))return{};if(o)return o(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=i},8866:function(e,t,n){var r=n(2488),o=n(1469);e.exports=function(e,t,n){var i=t(e);return o(e)?i:r(i,n(e))}},4239:function(e,t,n){var r=n(2705),o=n(9607),i=n(2333),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?o(e):i(e)}},9454:function(e,t,n){var r=n(4239),o=n(7005);e.exports=function(e){return o(e)&&"[object Arguments]"==r(e)}},939:function(e,t,n){var r=n(2492),o=n(7005);e.exports=function e(t,n,i,a,c){return t===n||(null==t||null==n||!o(t)&&!o(n)?t!=t&&n!=n:r(t,n,i,a,e,c))}},2492:function(e,t,n){var r=n(6384),o=n(7114),i=n(8351),a=n(6096),c=n(4160),s=n(1469),l=n(4144),u=n(6719),f="[object Arguments]",p="[object Array]",d="[object Object]",h=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,y,b,v){var g=s(e),m=s(t),w=g?p:c(e),O=m?p:c(t),j=(w=w==f?d:w)==d,S=(O=O==f?d:O)==d,_=w==O;if(_&&l(e)){if(!l(t))return!1;g=!0,j=!1}if(_&&!j)return v||(v=new r),g||u(e)?o(e,t,n,y,b,v):i(e,t,w,n,y,b,v);if(!(1&n)){var E=j&&h.call(e,"__wrapped__"),P=S&&h.call(t,"__wrapped__");if(E||P){var x=E?e.value():e,k=P?t.value():t;return v||(v=new r),b(x,k,n,y,v)}}return!!_&&(v||(v=new r),a(e,t,n,y,b,v))}},5588:function(e,t,n){var r=n(4160),o=n(7005);e.exports=function(e){return o(e)&&"[object Map]"==r(e)}},8458:function(e,t,n){var r=n(3560),o=n(5346),i=n(3218),a=n(346),c=/^\[object .+?Constructor\]$/,s=Function.prototype,l=Object.prototype,u=s.toString,f=l.hasOwnProperty,p=RegExp("^"+u.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||o(e))&&(r(e)?p:c).test(a(e))}},9221:function(e,t,n){var r=n(4160),o=n(7005);e.exports=function(e){return o(e)&&"[object Set]"==r(e)}},8749:function(e,t,n){var r=n(4239),o=n(1780),i=n(7005),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,e.exports=function(e){return i(e)&&o(e.length)&&!!a[r(e)]}},280:function(e,t,n){var r=n(5726),o=n(6916),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=[];for(var n in Object(e))i.call(e,n)&&"constructor"!=n&&t.push(n);return t}},313:function(e,t,n){var r=n(3218),o=n(5726),i=n(3498),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=o(e),n=[];for(var c in e)("constructor"!=c||!t&&a.call(e,c))&&n.push(c);return n}},2545:function(e){e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},1717:function(e){e.exports=function(e){return function(t){return e(t)}}},4757:function(e){e.exports=function(e,t){return e.has(t)}},4318:function(e,t,n){var r=n(1149);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},4626:function(e,t,n){e=n.nmd(e);var r=n(5639),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o?r.Buffer:void 0,c=a?a.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=c?c(n):new e.constructor(n);return e.copy(r),r}},7157:function(e,t,n){var r=n(4318);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}},3147:function(e){var t=/\w*$/;e.exports=function(e){var n=new e.constructor(e.source,t.exec(e));return n.lastIndex=e.lastIndex,n}},419:function(e,t,n){var r=n(2705),o=r?r.prototype:void 0,i=o?o.valueOf:void 0;e.exports=function(e){return i?Object(i.call(e)):{}}},7133:function(e,t,n){var r=n(4318);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},278:function(e){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}},8363:function(e,t,n){var r=n(4865),o=n(9465);e.exports=function(e,t,n,i){var a=!n;n||(n={});for(var c=-1,s=t.length;++c<s;){var l=t[c],u=i?i(n[l],e[l],l,n,e):void 0;void 0===u&&(u=e[l]),a?o(n,l,u):r(n,l,u)}return n}},8805:function(e,t,n){var r=n(8363),o=n(9551);e.exports=function(e,t){return r(e,o(e),t)}},1911:function(e,t,n){var r=n(8363),o=n(1442);e.exports=function(e,t){return r(e,o(e),t)}},4429:function(e,t,n){var r=n(5639)["__core-js_shared__"];e.exports=r},8777:function(e,t,n){var r=n(852),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},7114:function(e,t,n){var r=n(8668),o=n(2908),i=n(4757);e.exports=function(e,t,n,a,c,s){var l=1&n,u=e.length,f=t.length;if(u!=f&&!(l&&f>u))return!1;var p=s.get(e),d=s.get(t);if(p&&d)return p==t&&d==e;var h=-1,y=!0,b=2&n?new r:void 0;for(s.set(e,t),s.set(t,e);++h<u;){var v=e[h],g=t[h];if(a)var m=l?a(g,v,h,t,e,s):a(v,g,h,e,t,s);if(void 0!==m){if(m)continue;y=!1;break}if(b){if(!o(t,(function(e,t){if(!i(b,t)&&(v===e||c(v,e,n,a,s)))return b.push(t)}))){y=!1;break}}else if(v!==g&&!c(v,g,n,a,s)){y=!1;break}}return s.delete(e),s.delete(t),y}},8351:function(e,t,n){var r=n(2705),o=n(1149),i=n(7813),a=n(7114),c=n(8776),s=n(1814),l=r?r.prototype:void 0,u=l?l.valueOf:void 0;e.exports=function(e,t,n,r,l,f,p){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!f(new o(e),new o(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return i(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var d=c;case"[object Set]":var h=1&r;if(d||(d=s),e.size!=t.size&&!h)return!1;var y=p.get(e);if(y)return y==t;r|=2,p.set(e,t);var b=a(d(e),d(t),r,l,f,p);return p.delete(e),b;case"[object Symbol]":if(u)return u.call(e)==u.call(t)}return!1}},6096:function(e,t,n){var r=n(8234),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,i,a,c){var s=1&n,l=r(e),u=l.length;if(u!=r(t).length&&!s)return!1;for(var f=u;f--;){var p=l[f];if(!(s?p in t:o.call(t,p)))return!1}var d=c.get(e),h=c.get(t);if(d&&h)return d==t&&h==e;var y=!0;c.set(e,t),c.set(t,e);for(var b=s;++f<u;){var v=e[p=l[f]],g=t[p];if(i)var m=s?i(g,v,p,t,e,c):i(v,g,p,e,t,c);if(!(void 0===m?v===g||a(v,g,n,i,c):m)){y=!1;break}b||(b="constructor"==p)}if(y&&!b){var w=e.constructor,O=t.constructor;w==O||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&w instanceof w&&"function"==typeof O&&O instanceof O||(y=!1)}return c.delete(e),c.delete(t),y}},1957:function(e,t,n){var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},8234:function(e,t,n){var r=n(8866),o=n(9551),i=n(3674);e.exports=function(e){return r(e,i,o)}},6904:function(e,t,n){var r=n(8866),o=n(1442),i=n(1704);e.exports=function(e){return r(e,i,o)}},5050:function(e,t,n){var r=n(7019);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},852:function(e,t,n){var r=n(8458),o=n(7801);e.exports=function(e,t){var n=o(e,t);return r(n)?n:void 0}},5924:function(e,t,n){var r=n(5569)(Object.getPrototypeOf,Object);e.exports=r},9607:function(e,t,n){var r=n(2705),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,c=r?r.toStringTag:void 0;e.exports=function(e){var t=i.call(e,c),n=e[c];try{e[c]=void 0;var r=!0}catch(e){}var o=a.call(e);return r&&(t?e[c]=n:delete e[c]),o}},9551:function(e,t,n){var r=n(4963),o=n(479),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,c=a?function(e){return null==e?[]:(e=Object(e),r(a(e),(function(t){return i.call(e,t)})))}:o;e.exports=c},1442:function(e,t,n){var r=n(2488),o=n(5924),i=n(9551),a=n(479),c=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,i(e)),e=o(e);return t}:a;e.exports=c},4160:function(e,t,n){var r=n(8552),o=n(7071),i=n(3818),a=n(8525),c=n(577),s=n(4239),l=n(346),u="[object Map]",f="[object Promise]",p="[object Set]",d="[object WeakMap]",h="[object DataView]",y=l(r),b=l(o),v=l(i),g=l(a),m=l(c),w=s;(r&&w(new r(new ArrayBuffer(1)))!=h||o&&w(new o)!=u||i&&w(i.resolve())!=f||a&&w(new a)!=p||c&&w(new c)!=d)&&(w=function(e){var t=s(e),n="[object Object]"==t?e.constructor:void 0,r=n?l(n):"";if(r)switch(r){case y:return h;case b:return u;case v:return f;case g:return p;case m:return d}return t}),e.exports=w},7801:function(e){e.exports=function(e,t){return null==e?void 0:e[t]}},1789:function(e,t,n){var r=n(4536);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},401:function(e){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},7667:function(e,t,n){var r=n(4536),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return o.call(t,e)?t[e]:void 0}},1327:function(e,t,n){var r=n(4536),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:o.call(t,e)}},1866:function(e,t,n){var r=n(4536);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},3824:function(e){var t=Object.prototype.hasOwnProperty;e.exports=function(e){var n=e.length,r=new e.constructor(n);return n&&"string"==typeof e[0]&&t.call(e,"index")&&(r.index=e.index,r.input=e.input),r}},9148:function(e,t,n){var r=n(4318),o=n(7157),i=n(3147),a=n(419),c=n(7133);e.exports=function(e,t,n){var s=e.constructor;switch(t){case"[object ArrayBuffer]":return r(e);case"[object Boolean]":case"[object Date]":return new s(+e);case"[object DataView]":return o(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return c(e,n);case"[object Map]":case"[object Set]":return new s;case"[object Number]":case"[object String]":return new s(e);case"[object RegExp]":return i(e);case"[object Symbol]":return a(e)}}},8517:function(e,t,n){var r=n(3118),o=n(5924),i=n(5726);e.exports=function(e){return"function"!=typeof e.constructor||i(e)?{}:r(o(e))}},5776:function(e){var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var r=typeof e;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&t.test(e))&&e>-1&&e%1==0&&e<n}},7019:function(e){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},5346:function(e,t,n){var r,o=n(4429),i=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!i&&i in e}},5726:function(e){var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}},7040:function(e){e.exports=function(){this.__data__=[],this.size=0}},4125:function(e,t,n){var r=n(8470),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0||(n==t.length-1?t.pop():o.call(t,n,1),--this.size,0))}},2117:function(e,t,n){var r=n(8470);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},7518:function(e,t,n){var r=n(8470);e.exports=function(e){return r(this.__data__,e)>-1}},4705:function(e,t,n){var r=n(8470);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},4785:function(e,t,n){var r=n(1989),o=n(8407),i=n(7071);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},1285:function(e,t,n){var r=n(5050);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},6e3:function(e,t,n){var r=n(5050);e.exports=function(e){return r(this,e).get(e)}},9916:function(e,t,n){var r=n(5050);e.exports=function(e){return r(this,e).has(e)}},5265:function(e,t,n){var r=n(5050);e.exports=function(e,t){var n=r(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}},8776:function(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},4536:function(e,t,n){var r=n(852)(Object,"create");e.exports=r},6916:function(e,t,n){var r=n(5569)(Object.keys,Object);e.exports=r},3498:function(e){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},1167:function(e,t,n){e=n.nmd(e);var r=n(1957),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o&&r.process,c=function(){try{return i&&i.require&&i.require("util").types||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=c},2333:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},5569:function(e){e.exports=function(e,t){return function(n){return e(t(n))}}},5639:function(e,t,n){var r=n(1957),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();e.exports=i},619:function(e){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},2385:function(e){e.exports=function(e){return this.__data__.has(e)}},1814:function(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},7465:function(e,t,n){var r=n(8407);e.exports=function(){this.__data__=new r,this.size=0}},3779:function(e){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},7599:function(e){e.exports=function(e){return this.__data__.get(e)}},4758:function(e){e.exports=function(e){return this.__data__.has(e)}},4309:function(e,t,n){var r=n(8407),o=n(7071),i=n(3369);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!o||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new i(a)}return n.set(e,t),this.size=n.size,this}},346:function(e){var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},361:function(e,t,n){var r=n(5990);e.exports=function(e){return r(e,5)}},7813:function(e){e.exports=function(e,t){return e===t||e!=e&&t!=t}},5694:function(e,t,n){var r=n(9454),o=n(7005),i=Object.prototype,a=i.hasOwnProperty,c=i.propertyIsEnumerable,s=r(function(){return arguments}())?r:function(e){return o(e)&&a.call(e,"callee")&&!c.call(e,"callee")};e.exports=s},1469:function(e){var t=Array.isArray;e.exports=t},8612:function(e,t,n){var r=n(3560),o=n(1780);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},4144:function(e,t,n){e=n.nmd(e);var r=n(5639),o=n(5062),i=t&&!t.nodeType&&t,a=i&&e&&!e.nodeType&&e,c=a&&a.exports===i?r.Buffer:void 0,s=(c?c.isBuffer:void 0)||o;e.exports=s},8446:function(e,t,n){var r=n(939);e.exports=function(e,t){return r(e,t)}},3560:function(e,t,n){var r=n(4239),o=n(3218);e.exports=function(e){if(!o(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},1780:function(e){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},6688:function(e,t,n){var r=n(5588),o=n(1717),i=n(1167),a=i&&i.isMap,c=a?o(a):r;e.exports=c},3218:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},7005:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},2928:function(e,t,n){var r=n(9221),o=n(1717),i=n(1167),a=i&&i.isSet,c=a?o(a):r;e.exports=c},6719:function(e,t,n){var r=n(8749),o=n(1717),i=n(1167),a=i&&i.isTypedArray,c=a?o(a):r;e.exports=c},3674:function(e,t,n){var r=n(4636),o=n(280),i=n(8612);e.exports=function(e){return i(e)?r(e):o(e)}},1704:function(e,t,n){var r=n(4636),o=n(313),i=n(8612);e.exports=function(e){return i(e)?r(e,!0):o(e)}},479:function(e){e.exports=function(){return[]}},5062:function(e){e.exports=function(){return!1}},1038:function(e,t,n){var r;r=e=>(()=>{var t={865:e=>{"use strict";e.exports=function(e,t){var n=e.filter(t);return 0!==n.length&&n.length!==e.length}},703:(e,t,n)=>{"use strict";var r=n(414);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},697:(e,t,n)=>{e.exports=n(703)()},414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},385:function(e,t,n){var r;r=function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}return n.m=e,n.c=t,n.p="",n(0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function i(e){return e&&e.__esModule?e:{default:e}}var a=n(8),c=i(a),s=i(n(6)),l=i(n(2)),u=n(1),f=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){for(var r=!0;r;){var o=e,i=t,a=n;r=!1,null===o&&(o=Function.prototype);var c=Object.getOwnPropertyDescriptor(o,i);if(void 0!==c){if("value"in c)return c.value;var s=c.get;if(void 0===s)return;return s.call(a)}var l=Object.getPrototypeOf(o);if(null===l)return;e=l,t=i,n=a,r=!0,c=l=void 0}}(Object.getPrototypeOf(t.prototype),"constructor",this).call(this),this.state={showLoader:!1,lastScrollTop:0,actionTriggered:!1,pullToRefreshThresholdBreached:!1},this.startY=0,this.currentY=0,this.dragging=!1,this.maxPullDownDistance=0,this.onScrollListener=this.onScrollListener.bind(this),this.throttledOnScrollListener=(0,l.default)(this.onScrollListener,150).bind(this),this.onStart=this.onStart.bind(this),this.onMove=this.onMove.bind(this),this.onEnd=this.onEnd.bind(this),this.getScrollableTarget=this.getScrollableTarget.bind(this)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"componentDidMount",value:function(){if(this._scrollableNode=this.getScrollableTarget(),this.el=this.props.height?this._infScroll:this._scrollableNode||window,this.el.addEventListener("scroll",this.throttledOnScrollListener),"number"==typeof this.props.initialScrollY&&this.el.scrollHeight>this.props.initialScrollY&&this.el.scrollTo(0,this.props.initialScrollY),this.props.pullDownToRefresh&&(this.el.addEventListener("touchstart",this.onStart),this.el.addEventListener("touchmove",this.onMove),this.el.addEventListener("touchend",this.onEnd),this.el.addEventListener("mousedown",this.onStart),this.el.addEventListener("mousemove",this.onMove),this.el.addEventListener("mouseup",this.onEnd),this.maxPullDownDistance=this._pullDown.firstChild.getBoundingClientRect().height,this.forceUpdate(),"function"!=typeof this.props.refreshFunction))throw new Error('Mandatory prop "refreshFunction" missing.\n          Pull Down To Refresh functionality will not work\n          as expected. Check README.md for usage\'')}},{key:"componentWillUnmount",value:function(){this.el.removeEventListener("scroll",this.throttledOnScrollListener),this.props.pullDownToRefresh&&(this.el.removeEventListener("touchstart",this.onStart),this.el.removeEventListener("touchmove",this.onMove),this.el.removeEventListener("touchend",this.onEnd),this.el.removeEventListener("mousedown",this.onStart),this.el.removeEventListener("mousemove",this.onMove),this.el.removeEventListener("mouseup",this.onEnd))}},{key:"componentWillReceiveProps",value:function(e){this.props.key===e.key&&this.props.dataLength===e.dataLength||this.setState({showLoader:!1,actionTriggered:!1,pullToRefreshThresholdBreached:!1})}},{key:"getScrollableTarget",value:function(){return this.props.scrollableTarget instanceof HTMLElement?this.props.scrollableTarget:"string"==typeof this.props.scrollableTarget?document.getElementById(this.props.scrollableTarget):(null===this.props.scrollableTarget&&console.warn("You are trying to pass scrollableTarget but it is null. This might\n        happen because the element may not have been added to DOM yet.\n        See https://github.com/ankeetmaini/react-infinite-scroll-component/issues/59 for more info.\n      "),null)}},{key:"onStart",value:function(e){this.state.lastScrollTop||(this.dragging=!0,this.startY=e.pageY||e.touches[0].pageY,this.currentY=this.startY,this._infScroll.style.willChange="transform",this._infScroll.style.transition="transform 0.2s cubic-bezier(0,0,0.31,1)")}},{key:"onMove",value:function(e){this.dragging&&(this.currentY=e.pageY||e.touches[0].pageY,this.currentY<this.startY||(this.currentY-this.startY>=this.props.pullDownToRefreshThreshold&&this.setState({pullToRefreshThresholdBreached:!0}),this.currentY-this.startY>1.5*this.maxPullDownDistance||(this._infScroll.style.overflow="visible",this._infScroll.style.transform="translate3d(0px, "+(this.currentY-this.startY)+"px, 0px)")))}},{key:"onEnd",value:function(e){var t=this;this.startY=0,this.currentY=0,this.dragging=!1,this.state.pullToRefreshThresholdBreached&&this.props.refreshFunction&&this.props.refreshFunction(),requestAnimationFrame((function(){t._infScroll&&(t._infScroll.style.overflow="auto",t._infScroll.style.transform="none",t._infScroll.style.willChange="none")}))}},{key:"isElementAtBottom",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?.8:arguments[1],n=e===document.body||e===document.documentElement?window.screen.availHeight:e.clientHeight,r=(0,u.parseThreshold)(t);return r.unit===u.ThresholdUnits.Pixel?e.scrollTop+n>=e.scrollHeight-r.value:e.scrollTop+n>=r.value/100*e.scrollHeight}},{key:"onScrollListener",value:function(e){var t=this;"function"==typeof this.props.onScroll&&setTimeout((function(){return t.props.onScroll(e)}),0);var n=this.props.height||this._scrollableNode?e.target:document.documentElement.scrollTop?document.documentElement:document.body;this.state.actionTriggered||(this.isElementAtBottom(n,this.props.scrollThreshold)&&this.props.hasMore&&(this.setState({actionTriggered:!0,showLoader:!0}),this.props.next()),this.setState({lastScrollTop:n.scrollTop}))}},{key:"render",value:function(){var e=this,t=r({height:this.props.height||"auto",overflow:"auto",WebkitOverflowScrolling:"touch"},this.props.style),n=this.props.hasChildren||!(!this.props.children||!this.props.children.length),o=this.props.pullDownToRefresh&&this.props.height?{overflow:"auto"}:{};return c.default.createElement("div",{style:o},c.default.createElement("div",{className:"infinite-scroll-component "+(this.props.className||""),ref:function(t){return e._infScroll=t},style:t},this.props.pullDownToRefresh&&c.default.createElement("div",{style:{position:"relative"},ref:function(t){return e._pullDown=t}},c.default.createElement("div",{style:{position:"absolute",left:0,right:0,top:-1*this.maxPullDownDistance}},!this.state.pullToRefreshThresholdBreached&&this.props.pullDownToRefreshContent,this.state.pullToRefreshThresholdBreached&&this.props.releaseToRefreshContent)),this.props.children,!this.state.showLoader&&!n&&this.props.hasMore&&this.props.loader,this.state.showLoader&&this.props.hasMore&&this.props.loader,!this.props.hasMore&&this.props.endMessage))}}]),t}(a.Component);t.default=f,f.defaultProps={pullDownToRefreshContent:c.default.createElement("h3",null,"Pull down to refresh"),releaseToRefreshContent:c.default.createElement("h3",null,"Release to refresh"),pullDownToRefreshThreshold:100,disableBrowserPullToRefresh:!0},f.propTypes={next:s.default.func,hasMore:s.default.bool,children:s.default.node,loader:s.default.node.isRequired,scrollThreshold:s.default.oneOfType([s.default.number,s.default.string]),endMessage:s.default.node,style:s.default.object,height:s.default.number,scrollableTarget:s.default.node,hasChildren:s.default.bool,pullDownToRefresh:s.default.bool,pullDownToRefreshContent:s.default.node,releaseToRefreshContent:s.default.node,pullDownToRefreshThreshold:s.default.number,refreshFunction:s.default.func,onScroll:s.default.func,dataLength:s.default.number.isRequired,key:s.default.string},e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseThreshold=function(e){return"number"==typeof e?{unit:n.Percent,value:100*e}:"string"==typeof e?e.match(/^(\d*(\.\d+)?)px$/)?{unit:n.Pixel,value:parseFloat(e)}:e.match(/^(\d*(\.\d+)?)%$/)?{unit:n.Percent,value:parseFloat(e)}:(console.warn('scrollThreshold format is invalid. Valid formats: "120px", "50%"...'),r):(console.warn("scrollThreshold should be string or number"),r)};var n={Pixel:"Pixel",Percent:"Percent"};t.ThresholdUnits=n;var r={unit:n.Percent,value:.8}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var r,o;return t||(t=250),function(){var i=n||this,a=+new Date,c=arguments;r&&a<r+t?(clearTimeout(o),o=setTimeout((function(){r=a,e.apply(i,c)}),t)):(r=a,e.apply(i,c))}},e.exports=t.default},function(e,t){"use strict";function n(e){return function(){return e}}var r=function(){};r.thatReturns=n,r.thatReturnsFalse=n(!1),r.thatReturnsTrue=n(!0),r.thatReturnsNull=n(null),r.thatReturnsThis=function(){return this},r.thatReturnsArgument=function(e){return e},e.exports=r},function(e,t,n){"use strict";e.exports=function(e,t,n,r,o,i,a,c){if(!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,o,i,a,c],u=0;(s=new Error(t.replace(/%s/g,(function(){return l[u++]})))).name="Invariant Violation"}throw s.framesToPop=1,s}}},function(e,t,n){"use strict";var r=n(3),o=n(4),i=n(7);e.exports=function(){function e(e,t,n,r,a,c){c!==i&&o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t};return n.checkPropTypes=r,n.PropTypes=n,n}},function(e,t,n){e.exports=n(5)()},function(e,t){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(t,n){t.exports=e}])},e.exports=r(n(787))},787:t=>{"use strict";t.exports=e}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e].call(i.exports,i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return(()=>{"use strict";r.r(o),r.d(o,{default:()=>qt});var e=r(697),t=r.n(e),n=r(787),i=r.n(n);const a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).reduce((function(t,n){return t["data-".concat(function(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}(n))]=e[n],t}),{})},c=function(e){return!e||Array.isArray(e)&&!e.length};var s,l;const u=(s=1,l=new WeakMap,{get:function(e){return l.has(e)||l.set(e,s++),"".concat("rdts").concat(l.get(e))},reset:function(){l=new WeakMap,s=1}}),f=function(e,t,n){if(Array.prototype.findIndex)return e.findIndex(t,n);if(!e)throw new TypeError("findIndex called on null or undefined");if("function"!=typeof t)throw new TypeError("findIndex predicate must be a function");for(var r=0;r<e.length;r++){var o=e[r];if(t.call(n,o,r,e))return r}return-1};function p(e,t){var n=function(e){return e?"#"===e[0]?{"aria-labelledby":e.substring(1).replace(/ #/g," ")}:{"aria-label":e}:{}}(e);return t&&(n["aria-labelledby"]="".concat(n["aria-labelledby"]||""," ").concat(t).trim()),n}function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function h(){return h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},h.apply(this,arguments)}function y(e,t){return y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},y(e,t)}function b(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y(e,t)}(c,e);var t,n,r,o,a=(r=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=v(r);if(o){var n=v(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===d(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return b(e)}(this,e)});function c(e){var t,n,r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),g(b(t=a.call(this,e)),"handleInputChange",(function(e){e.persist(),t.delayedCallback(e)})),t.delayedCallback=(n=function(e){return t.props.onInputChange(e.target.value)},function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];var i=!r;clearTimeout(r),r=setTimeout((function(){r=null,n.apply(void 0,t)}),300),i&&n.apply(void 0,t)}),t}return t=c,(n=[{key:"render",value:function(){var e=this.props,t=e.inputRef,n=e.texts,r=void 0===n?{}:n,o=e.onFocus,a=e.onBlur,c=e.disabled,s=e.readOnly,l=e.onKeyDown,u=e.activeDescendant,f=e.inlineSearchInput;return i().createElement("input",h({type:"text",disabled:c,ref:t,className:"search",placeholder:f?r.inlineSearchPlaceholder||"Search...":r.placeholder||"Choose...",onKeyDown:l,onChange:this.handleInputChange,onFocus:o,onBlur:a,readOnly:s,"aria-activedescendant":u,"aria-autocomplete":l?"list":void 0},p(r.label)))}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(n.PureComponent);g(m,"propTypes",{tags:t().array,texts:t().object,onInputChange:t().func,onFocus:t().func,onBlur:t().func,onTagRemove:t().func,onKeyDown:t().func,inputRef:t().func,disabled:t().bool,readOnly:t().bool,activeDescendant:t().string,inlineSearchInput:t().bool});const w=m;function O(e){return O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},O(e)}function j(e,t){return j=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},j(e,t)}function S(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _(e){return _=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},_(e)}function E(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var P=function(e){return"".concat(e,"_tag")},x=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&j(e,t)}(c,e);var t,n,r,o,a=(r=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=_(r);if(o){var n=_(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===O(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return S(e)}(this,e)});function c(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return E(S(e=a.call.apply(a,[this].concat(n))),"handleClick",(function(t){var n=e.props,r=n.id,o=n.onDelete;t.stopPropagation(),t.nativeEvent.stopImmediatePropagation(),o(r,void 0!==(t.key||t.keyCode))})),E(S(e),"onKeyDown",(function(t){"Backspace"===t.key&&(e.handleClick(t),t.preventDefault())})),E(S(e),"onKeyUp",(function(t){(32===t.keyCode||["Delete","Enter"].indexOf(t.key)>-1)&&(e.handleClick(t),t.preventDefault())})),e}return t=c,(n=[{key:"render",value:function(){var e=this.props,t=e.id,n=e.label,r=e.labelRemove,o=void 0===r?"Remove":r,a=e.readOnly,c=e.disabled,s=P(t),l="".concat(t,"_button"),u=["tag-remove",a&&"readOnly",c&&"disabled"].filter(Boolean).join(" "),f=a||c;return i().createElement("span",{className:"tag",id:s,"aria-label":n},n,i().createElement("button",{id:l,onClick:f?void 0:this.handleClick,onKeyDown:f?void 0:this.onKeyDown,onKeyUp:f?void 0:this.onKeyUp,className:u,type:"button","aria-label":o,"aria-labelledby":"".concat(l," ").concat(s),"aria-disabled":f},"x"))}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(n.PureComponent);E(x,"propTypes",{id:t().string.isRequired,label:t().string.isRequired,onDelete:t().func,readOnly:t().bool,disabled:t().bool,labelRemove:t().string});const k=x;function T(e){return T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},T(e)}function C(e,t){return C=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},C(e,t)}function R(e){return R=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},R(e)}function N(){return N=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},N.apply(this,arguments)}var A,D,B,I=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&C(e,t)}(s,e);var t,n,r,o,c=(r=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=R(r);if(o){var n=R(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===T(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function s(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),c.apply(this,arguments)}return t=s,n=[{key:"render",value:function(){var e=this.props,t=e.tags,n=e.onTagRemove,r=e.texts,o=void 0===r?{}:r,c=e.disabled,s=e.readOnly,l=e.children||i().createElement("span",{className:"placeholder"},o.placeholder||"Choose...");return i().createElement("ul",{className:"tag-list"},function(){var e=arguments.length>1?arguments[1]:void 0,t=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,r=arguments.length>4?arguments[4]:void 0;return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map((function(o){var c=o._id,s=o.label,l=o.tagClassName,u=o.dataset,f=o.tagLabel;return i().createElement("li",N({className:["tag-item",l].filter(Boolean).join(" "),key:"tag-item-".concat(c)},a(u)),i().createElement(k,{label:f||s,id:c,onDelete:e,readOnly:t,disabled:n||o.disabled,labelRemove:r}))}))}(t,n,s,c,o.labelRemove),i().createElement("li",{className:"tag-item"},l))}}],n&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(n.PureComponent);A=I,D="propTypes",B={tags:t().array,onTagRemove:t().func,readOnly:t().bool,disabled:t().bool,texts:t().object,children:t().node},D in A?Object.defineProperty(A,D,{value:B,enumerable:!0,configurable:!0,writable:!0}):A[D]=B;const F=I;function M(e){return M="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},M(e)}function L(){return L=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},L.apply(this,arguments)}function U(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function V(e,t){return V=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},V(e,t)}function z(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function q(e){return q=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},q(e)}function K(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var H=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&V(e,t)}(c,e);var t,n,r,o,a=(r=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=q(r);if(o){var n=q(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===M(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return z(e)}(this,e)});function c(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return K(z(e=a.call.apply(a,[this].concat(n))),"getAriaAttributes",(function(){var t=e.props,n=t.mode,r=t.texts,o=void 0===r?{}:r,i=t.showDropdown,a=t.clientId,c=t.tags,s="".concat(a,"_trigger"),l=[],u=p(o.label);return c&&c.length&&(u["aria-label"]&&l.push(s),c.forEach((function(e){l.push(P(e._id))})),u=p(o.label,l.join(" "))),function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?U(Object(n),!0).forEach((function(t){K(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):U(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({id:s,role:"button",tabIndex:e.props.tabIndex,"aria-haspopup":"simpleSelect"===n?"listbox":"tree","aria-expanded":i?"true":"false"},u)})),K(z(e),"handleTrigger",(function(t){t.key&&13!==t.keyCode&&32!==t.keyCode&&40!==t.keyCode||t.key&&e.triggerNode&&e.triggerNode!==document.activeElement||(e.props.showDropdown||32!==t.keyCode||t.preventDefault(),e.props.onTrigger(t))})),e}return t=c,(n=[{key:"render",value:function(){var e=this,t=this.props,n=t.disabled,r=t.readOnly,o=t.showDropdown,a=["dropdown-trigger","arrow",n&&"disabled",r&&"readOnly",o&&"top",!o&&"bottom"].filter(Boolean).join(" ");return i().createElement("a",L({ref:function(t){e.triggerNode=t},className:a,onClick:n?void 0:this.handleTrigger,onKeyDown:n?void 0:this.handleTrigger},this.getAriaAttributes()),this.props.children)}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(n.PureComponent);K(H,"propTypes",{onTrigger:t().func,disabled:t().bool,readOnly:t().bool,showDropdown:t().bool,mode:t().oneOf(["multiSelect","simpleSelect","radioSelect","hierarchical"]),texts:t().object,clientId:t().string,tags:t().array,tabIndex:t().number});const $=H;var W=r(385),Y=r.n(W);function J(e){return J="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},J(e)}function G(e,t){return G=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},G(e,t)}function X(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Q(e){return Q=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Q(e)}function Z(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ee=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&G(e,t)}(c,e);var t,n,r,o,a=(r=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Q(r);if(o){var n=Q(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===J(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return X(e)}(this,e)});function c(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Z(X(e=a.call.apply(a,[this].concat(n))),"handleClick",(function(){var t=e.props,n=t.onAction,r=t.actionData;n&&n(r.nodeId,r.action)})),e}return t=c,(n=[{key:"render",value:function(){var e=this.props,t=e.title,n=e.className,r=e.text,o=e.readOnly;return i().createElement("i",{title:t,className:n,onClick:o?void 0:this.handleClick},r)}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(n.PureComponent);Z(ee,"propTypes",{title:t().string,text:t().string,className:t().string,actionData:t().object,onAction:t().func,readOnly:t().bool}),Z(ee,"defaultProps",{onAction:function(){}});const te=ee;function ne(e){return ne="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ne(e)}var re=["actions","id"];function oe(){return oe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},oe.apply(this,arguments)}function ie(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ae(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ie(Object(n),!0).forEach((function(t){le(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ie(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ce(e,t){return ce=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},ce(e,t)}function se(e){return se=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},se(e)}function le(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ue=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ce(e,t)}(s,e);var t,n,r,o,a=(r=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=se(r);if(o){var n=se(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===ne(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function s(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return t=s,(n=[{key:"render",value:function(){var e=this.props,t=e.actions,n=e.id,r=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,re);return c(t)?null:t.map((function(e,t){var o=e.id||"action-".concat(t);return i().createElement(te,oe({key:o},r,e,{actionData:{action:ae(ae({},e),{},{id:o}),nodeId:n}}))}))}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(n.PureComponent);le(ue,"propTypes",{id:t().string.isRequired,actions:t().array});const fe=ue;function pe(e){return pe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pe(e)}var de=["checked","indeterminate","onChange","disabled","readOnly"];function he(){return he=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},he.apply(this,arguments)}function ye(e,t){return ye=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},ye(e,t)}function be(e){return be=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},be(e)}var ve=function(e){var t=e.checked,n=e.indeterminate;return function(e){e&&(e.checked=t,e.indeterminate=n)}},ge=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ye(e,t)}(c,e);var t,n,r,o,a=(r=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=be(r);if(o){var n=be(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===pe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function c(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),a.apply(this,arguments)}return t=c,(n=[{key:"render",value:function(){var e=this.props,t=e.checked,n=e.indeterminate,r=void 0!==n&&n,o=e.onChange,a=e.disabled,c=e.readOnly,s=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,de),l=a||c;return i().createElement("input",he({type:"checkbox",ref:ve({checked:t,indeterminate:r}),onChange:o,disabled:l},s))}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(n.PureComponent);!function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(ge,"propTypes",{checked:t().bool,indeterminate:t().bool,onChange:t().func,disabled:t().bool,readOnly:t().bool});const me=ge;function we(e){return we="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},we(e)}var Oe=["name","checked","onChange","disabled","readOnly"];function je(){return je=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},je.apply(this,arguments)}function Se(e,t){return Se=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Se(e,t)}function _e(e){return _e=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},_e(e)}var Ee=function(e){var t=e.checked;return function(e){e&&(e.checked=t)}},Pe=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Se(e,t)}(c,e);var t,n,r,o,a=(r=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=_e(r);if(o){var n=_e(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===we(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function c(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),a.apply(this,arguments)}return t=c,(n=[{key:"render",value:function(){var e=this.props,t=e.name,n=e.checked,r=e.onChange,o=e.disabled,a=e.readOnly,c=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Oe),s=o||a;return i().createElement("input",je({type:"radio",name:t,ref:Ee({checked:n}),onChange:r,disabled:s},c))}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(n.PureComponent);!function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(Pe,"propTypes",{name:t().string.isRequired,checked:t().bool,onChange:t().func,disabled:t().bool,readOnly:t().bool});const xe=Pe;function ke(e){return ke="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ke(e)}function Te(){return Te=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Te.apply(this,arguments)}function Ce(e,t){return Ce=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Ce(e,t)}function Re(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ne(e){return Ne=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Ne(e)}function Ae(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var De=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ce(e,t)}(c,e);var t,n,r,o,a=(r=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Ne(r);if(o){var n=Ne(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===ke(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Re(e)}(this,e)});function c(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Ae(Re(e=a.call.apply(a,[this].concat(n))),"handleCheckboxChange",(function(t){var n=e.props,r=n.mode,o=n.id;(0,n.onCheckboxChange)(o,"simpleSelect"===r||"radioSelect"===r||t.target.checked),t.stopPropagation(),t.nativeEvent.stopImmediatePropagation()})),e}return t=c,n=[{key:"render",value:function(){var e=this.props,t=e.mode,n=e.title,r=e.label,o=e.id,a=e.partial,c=e.checked,s=this.props,l=s.value,u=s.disabled,f=s.showPartiallySelected,p=s.readOnly,d=s.clientId,h={className:"node-label"};"simpleSelect"===t&&!p&&!u&&(h.onClick=this.handleCheckboxChange);var y={id:o,value:l,checked:c,disabled:u,readOnly:p,tabIndex:-1},b=["checkbox-item","simpleSelect"===t&&"simple-select"].filter(Boolean).join(" ");return i().createElement("label",{title:n||r,htmlFor:o},"radioSelect"===t?i().createElement(xe,Te({name:d,className:"radio-item",onChange:this.handleCheckboxChange},y)):i().createElement(me,Te({name:o,className:b,indeterminate:f&&a,onChange:this.handleCheckboxChange},y)),i().createElement("span",h,r))}}],n&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(n.PureComponent);Ae(De,"propTypes",{id:t().string.isRequired,actions:t().array,title:t().string,label:t().string.isRequired,value:t().string.isRequired,checked:t().bool,partial:t().bool,disabled:t().bool,dataset:t().object,mode:t().oneOf(["multiSelect","simpleSelect","radioSelect","hierarchical"]),showPartiallySelected:t().bool,onCheckboxChange:t().func,readOnly:t().bool,clientId:t().string});const Be=De;function Ie(e){return Ie="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ie(e)}function Fe(e,t){return Fe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Fe(e,t)}function Me(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Le(e){return Le=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Le(e)}function Ue(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ve=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Fe(e,t)}(c,e);var t,n,r,o,a=(r=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Le(r);if(o){var n=Le(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Ie(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Me(e)}(this,e)});function c(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Ue(Me(e=a.call.apply(a,[this].concat(n))),"onToggle",(function(t){t.stopPropagation(),t.nativeEvent.stopImmediatePropagation(),e.props.onNodeToggle(e.props.id)})),Ue(Me(e),"onKeyDown",(function(t){"Enter"!==t.key&&32!==t.keyCode||(e.props.onNodeToggle(e.props.id),t.preventDefault())})),e}return t=c,n=[{key:"render",value:function(){var e=this.props,t=e.expanded,n=e.isLeaf,r=["toggle",t&&"expanded",!t&&"collapsed"].filter(Boolean).join(" ");return n?i().createElement("i",{role:"button",tabIndex:-1,className:r,style:{visibility:"hidden"},"aria-hidden":!0}):i().createElement("i",{role:"button",tabIndex:-1,className:r,onClick:this.onToggle,onKeyDown:this.onKeyDown,"aria-hidden":!0})}}],n&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(n.PureComponent);Ue(Ve,"propTypes",{expanded:t().bool,isLeaf:t().bool,onNodeToggle:t().func,id:t().string});const ze=Ve;function qe(e){return qe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qe(e)}function Ke(){return Ke=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ke.apply(this,arguments)}function He(e,t){return He=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},He(e,t)}function $e(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function We(e){return We=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},We(e)}function Ye(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Je=function(e){return c(e)},Ge=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&He(e,t)}(s,e);var t,n,r,o,c=(r=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=We(r);if(o){var n=We(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===qe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return $e(e)}(this,e)});function s(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Ye($e(e=c.call.apply(c,[this].concat(n))),"getAriaAttributes",(function(){var t=e.props,n=t._children,r=t._depth,o=t.checked,i=t.disabled,a=t.expanded,c=t.readOnly,s=t.mode,l=t.partial,u={};return u.role="simpleSelect"===s?"option":"treeitem",u["aria-disabled"]=i||c,u["aria-selected"]=o,"simpleSelect"!==s&&(u["aria-checked"]=l?"mixed":o,u["aria-level"]=(r||0)+1,u["aria-expanded"]=n&&(a?"true":"false")),u})),e}return t=s,n=[{key:"render",value:function(){var e=this.props,t=e.mode,n=e.keepTreeOnSearch,r=e._id,o=e._children,c=e.dataset,s=e._depth,l=e.expanded,u=e.title,f=e.label,p=e.partial,d=e.checked,h=e.value,y=e.disabled,b=e.actions,v=e.onAction,g=e.searchModeOn,m=e.onNodeToggle,w=e.onCheckboxChange,O=e.showPartiallySelected,j=e.readOnly,S=e.clientId,_=function(e){var t=e.keepTreeOnSearch,n=e.keepChildrenOnSearch,r=e._children,o=e.matchInChildren,i=e.matchInParent,a=e.disabled,c=e.partial,s=e.hide,l=e.className,u=e.showPartiallySelected,f=e.readOnly,p=e.checked,d=e._focused;return["node",Je(r)&&"leaf",!Je(r)&&"tree",a&&"disabled",s&&"hide",t&&o&&"match-in-children",t&&n&&i&&"match-in-parent",u&&c&&"partial",f&&"readOnly",p&&"checked",d&&"focused",l].filter(Boolean).join(" ")}(this.props),E=n||!g?{paddingLeft:"".concat(20*(s||0),"px")}:{},P="".concat(r,"_li");return i().createElement("li",Ke({className:_,style:E,id:P},a(c),this.getAriaAttributes()),i().createElement(ze,{isLeaf:Je(o),expanded:l,id:r,onNodeToggle:m}),i().createElement(Be,{title:u,label:f,id:r,partial:p,checked:d,value:h,disabled:y,mode:t,onCheckboxChange:w,showPartiallySelected:O,readOnly:j,clientId:S}),i().createElement(fe,{actions:b,onAction:v,id:r,readOnly:j}))}}],n&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(n.PureComponent);Ye(Ge,"propTypes",{_id:t().string.isRequired,_depth:t().number,_children:t().array,actions:t().array,className:t().string,title:t().string,label:t().string.isRequired,value:t().string.isRequired,checked:t().bool,expanded:t().bool,disabled:t().bool,partial:t().bool,dataset:t().object,keepTreeOnSearch:t().bool,keepChildrenOnSearch:t().bool,searchModeOn:t().bool,onNodeToggle:t().func,onAction:t().func,onCheckboxChange:t().func,mode:t().oneOf(["multiSelect","simpleSelect","radioSelect","hierarchical"]),showPartiallySelected:t().bool,readOnly:t().bool,clientId:t().string});const Xe=Ge;function Qe(e){return Qe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qe(e)}function Ze(){return Ze=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ze.apply(this,arguments)}function et(e,t){return et=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},et(e,t)}function tt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function nt(e){return nt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},nt(e)}function rt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ot=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&et(e,t)}(c,e);var t,n,r,o,a=(r=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=nt(r);if(o){var n=nt(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Qe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return tt(e)}(this,e)});function c(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),rt(tt(t=a.call(this,e)),"UNSAFE_componentWillReceiveProps",(function(e){var n=e.activeDescendant===t.props.activeDescendant;t.computeInstanceProps(e,!n),t.setState({items:t.allVisibleNodes.slice(0,t.currentPage*t.props.pageSize)})})),rt(tt(t),"componentDidMount",(function(){t.setState({scrollableTarget:t.node.parentNode})})),rt(tt(t),"computeInstanceProps",(function(e,n){if(t.allVisibleNodes=t.getNodes(e),t.totalPages=Math.ceil(t.allVisibleNodes.length/t.props.pageSize),n&&e.activeDescendant){var r=e.activeDescendant.replace(/_li$/,""),o=f(t.allVisibleNodes,(function(e){return e.key===r}))+1;t.currentPage=o>0?Math.ceil(o/t.props.pageSize):1}})),rt(tt(t),"shouldRenderNode",(function(e,t){var n=t.data,r=t.searchModeOn,o=e.expanded,i=e._parent;if(r||o)return!0;var a=i&&n.get(i);return!a||a.expanded})),rt(tt(t),"getNodes",(function(e){var n=e.data,r=e.keepTreeOnSearch,o=e.keepChildrenOnSearch,a=e.searchModeOn,c=e.mode,s=e.showPartiallySelected,l=e.readOnly,u=e.onAction,f=e.onChange,p=e.onCheckboxChange,d=e.onNodeToggle,h=e.activeDescendant,y=e.clientId,b=[];return n.forEach((function(n){t.shouldRenderNode(n,e)&&b.push(i().createElement(Xe,Ze({keepTreeOnSearch:r,keepChildrenOnSearch:o,key:n._id},n,{searchModeOn:a,onChange:f,onCheckboxChange:p,onNodeToggle:d,onAction:u,mode:c,showPartiallySelected:s,readOnly:l,clientId:y,activeDescendant:h})))})),b})),rt(tt(t),"hasMore",(function(){return t.currentPage<t.totalPages})),rt(tt(t),"loadMore",(function(){t.currentPage=t.currentPage+1;var e=t.allVisibleNodes.slice(0,t.currentPage*t.props.pageSize);t.setState({items:e})})),rt(tt(t),"setNodeRef",(function(e){t.node=e})),rt(tt(t),"getAriaAttributes",(function(){var e=t.props.mode;return{role:"simpleSelect"===e?"listbox":"tree","aria-multiselectable":/multiSelect|hierarchical/.test(e)}})),t.currentPage=1,t.computeInstanceProps(e,!0),t.state={items:t.allVisibleNodes.slice(0,t.props.pageSize)},t}return t=c,(n=[{key:"render",value:function(){var e=this.props.searchModeOn;return i().createElement("ul",Ze({className:"root ".concat(e?"searchModeOn":""),ref:this.setNodeRef},this.getAriaAttributes()),this.state.scrollableTarget&&i().createElement(Y(),{dataLength:this.state.items.length,next:this.loadMore,hasMore:this.hasMore(),loader:i().createElement("span",{className:"searchLoader"},"Loading..."),scrollableTarget:this.state.scrollableTarget},this.state.items))}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(n.Component);rt(ot,"propTypes",{data:t().object,keepTreeOnSearch:t().bool,keepChildrenOnSearch:t().bool,searchModeOn:t().bool,onChange:t().func,onNodeToggle:t().func,onAction:t().func,onCheckboxChange:t().func,mode:t().oneOf(["multiSelect","simpleSelect","radioSelect","hierarchical"]),showPartiallySelected:t().bool,pageSize:t().number,readOnly:t().bool,clientId:t().string,activeDescendant:t().string}),rt(ot,"defaultProps",{pageSize:100});const it=ot;var at=r(865),ct=r.n(at),st=function(e){return e};const lt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"children",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:st;return ct()(e[t],(function(e){return n(e).checked}))||e[t].some((function(e){return n(e).partial}))};function ut(e){var t=e.nodes,n=e.parent,r=e.depth,o=void 0===r?0:r,i=e.simple,a=e.radio,s=e.showPartialState,l=e.hierarchical,u=e.rootPrefixId,f=e._rv,p=void 0===f?{list:new Map,defaultValues:[],singleSelectedNode:null}:f,d=i||a;return t.forEach((function(e,t){e._depth=o,n?(e._id=e.id||"".concat(n._id,"-").concat(t),e._parent=n._id,n._children.push(e._id)):e._id=e.id||"".concat(u?"".concat(u,"-").concat(t):t),d&&e.checked&&(p.singleSelectedNode?e.checked=!1:p.singleSelectedNode=e),d&&e.isDefaultValue&&p.singleSelectedNode&&!p.singleSelectedNode.isDefaultValue&&(p.singleSelectedNode.checked=!1,p.singleSelectedNode=null),!e.isDefaultValue||d&&0!==p.defaultValues.length||(p.defaultValues.push(e._id),e.checked=!0,d&&(p.singleSelectedNode=e)),l&&!a||function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]&&!arguments[2]?["disabled"]:["checked","disabled"],r=0;r<n.length;r++){var o=n[r];void 0===e[o]&&void 0!==t[o]&&(e[o]=t[o])}}(e,n,!a),p.list.set(e._id,e),!i&&e.children&&(e._children=[],ut({nodes:e.children,parent:e,depth:o+1,radio:a,showPartialState:s,hierarchical:l,_rv:p}),s&&!e.checked&&(e.partial=lt(e),d||c(e.children)||!e.children.every((function(e){return e.checked}))||(e.checked=!0)),e.children=void 0)})),p}const ft=function(e){var t=e.tree,n=e.simple,r=e.radio,o=e.showPartialState,i=e.hierarchical,a=e.rootPrefixId;return ut({nodes:Array.isArray(t)?t:[t],simple:n,radio:r,showPartialState:o,hierarchical:i,rootPrefixId:a})};var pt=function e(t,n,r){n[t._id]=!0,c(t._children)||t._children.forEach((function(t){return e(r(t),n,r)}))},dt=function(e,t){var n=[],r={};return e.forEach((function(e,o){r[o]||(t(e,o,r)&&n.push(e),r[o]=!0)})),n},ht={getNodesMatching:dt,getVisibleNodes:function(e,t,n){return dt(e,(function(e,r,o){return n&&e._children&&e._children.length&&!0!==e.expanded&&pt(e,o,t),!e.hide}))},markSubTreeVisited:pt};const yt=ht;function bt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var vt="ArrowUp",gt="ArrowDown",mt="ArrowLeft",wt="ArrowRight",Ot="Enter",jt="Home",St="PageUp",_t="PageDown",Et={None:"None",FocusPrevious:"FocusPrevious",FocusNext:"FocusNext",FocusParent:"FocusParent",FocusFirst:"FocusFirst",FocusLast:"FocusLast",ToggleExpanded:"ToggleExpanded",ToggleChecked:"ToggleChecked"},Pt=new Set([Et.FocusPrevious,Et.FocusNext,Et.FocusParent,Et.FocusFirst,Et.FocusLast]),xt=[vt,gt,jt,St,"End",_t],kt=xt.concat([mt,wt,Ot]),Tt=function(e,t,n,r){return t.indexOf(e)>-1||!n&&e===r},Ct={isValidKey:function(e,t){return(t?kt:xt).indexOf(e)>-1},getAction:function(e,t){var n;return n=t===mt?function(e,t){return e&&t===mt?!0===e.expanded?Et.ToggleExpanded:e._parent?Et.FocusParent:Et.None:Et.None}(e,t):t===wt?function(e,t){return e&&e._children&&t===wt?!0!==e.expanded?Et.ToggleExpanded:Et.FocusNext:Et.None}(e,t):function(e,t){return Tt(e,[jt,St],t,gt)}(t,e)?Et.FocusFirst:function(e,t){return Tt(e,["End",_t],t,vt)}(t,e)?Et.FocusLast:function(e,t){if(!e)return Et.None;switch(t){case vt:return Et.FocusPrevious;case gt:return Et.FocusNext;case Ot:return Et.ToggleChecked;default:return Et.None}}(e,t),n},getNextFocus:function(e,t,n,r,o){if(n===Et.FocusParent)return function(e,t){return e&&e._parent?t(e._parent):e}(t,r);if(!Pt.has(n))return t;var i=yt.getVisibleNodes(e,r,o);return function(e){return Tt(e,[Et.FocusPrevious,Et.FocusLast],!0)}(n)&&(i=i.reverse()),function(e,t,n){if(!e||0===e.length)return t;var r,o=t;return function(e){return Tt(e,[Et.FocusFirst,Et.FocusLast],!0)}(n)?o=(r=e,function(e){if(Array.isArray(e))return e}(r)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),1!==i.length);a=!0);}catch(e){c=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(c)throw o}}return i}}(r)||function(e,t){if(e){if("string"==typeof e)return bt(e,1);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?bt(e,1):void 0}}(r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0]:[Et.FocusPrevious,Et.FocusNext].indexOf(n)>-1&&(o=function(e,t){var n=e.indexOf(t)+1;return n%e.length==0?e[0]:e[n]}(e,t)),o}(i,t,n)},getNextFocusAfterTagDelete:function(e,t,n,r){var o=t?f(t,(function(t){return t._id===e})):-1;if(o<0||!n.length)return r;var i=n[o=n.length>o?o:n.length-1]._id,a=document.getElementById(P(i));return a&&a.firstElementChild||r},handleFocusNavigationkey:function(e,t,n,r,o){var i=Ct.getNextFocus(e,n,t,r,o);return Ct.adjustFocusedProps(n,i),i?i._id:n&&n._id},handleToggleNavigationkey:function(e,t,n,r,o){return e!==Et.ToggleChecked||n||t.readOnly||t.disabled?e===Et.ToggleExpanded&&o(t._id):r(t._id,!0!==t.checked),t&&t._id},adjustFocusedProps:function(e,t){e&&t&&e._id!==t._id&&(e._focused=!1),t&&(t._focused=!0)}};const Rt=Ct;var Nt=function(){function e(t){var n=t.data,r=t.mode,o=t.showPartiallySelected,i=t.rootPrefixId,a=t.searchPredicate;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._src=n,this.simpleSelect="simpleSelect"===r,this.radioSelect="radioSelect"===r,this.hierarchical="hierarchical"===r,this.searchPredicate=a;var c=ft({tree:JSON.parse(JSON.stringify(n)),simple:this.simpleSelect,radio:this.radioSelect,showPartialState:o,hierarchical:this.hierarchical,rootPrefixId:i}),s=c.list,l=c.defaultValues,u=c.singleSelectedNode;this.tree=s,this.defaultValues=l,this.showPartialState=!this.hierarchical&&o,this.searchMaps=new Map,(this.simpleSelect||this.radioSelect)&&u&&(this.currentChecked=u._id)}var t,n;return t=e,n=[{key:"getNodeById",value:function(e){return this.tree.get(e)}},{key:"getMatches",value:function(e){var t=this;if(this.searchMaps.has(e))return this.searchMaps.get(e);var n=-1,r=e;this.searchMaps.forEach((function(t,o){e.startsWith(o)&&o.length>n&&(n=o.length,r=o)}));var o=[],i=this._getAddOnMatch(o,e);return r!==e?this.searchMaps.get(r).forEach((function(e){return i(t.getNodeById(e))})):this.tree.forEach(i),this.searchMaps.set(e,o),o}},{key:"addParentsToTree",value:function(e,t){if(void 0!==e){var n=this.getNodeById(e);this.addParentsToTree(n._parent,t),n.hide=!n._isMatch||n.hide,n.matchInChildren=!0,t.set(e,n)}}},{key:"addChildrenToTree",value:function(e,t,n){var r=this;void 0!==e&&e.forEach((function(e){if(!n||!n.includes(e)){var o=r.getNodeById(e);o.matchInParent=!0,t.set(e,o),r.addChildrenToTree(o._children,t)}}))}},{key:"filterTree",value:function(e,t,n){var r=this,o=this.getMatches(e.toLowerCase()),i=new Map;o.forEach((function(e){var a=r.getNodeById(e);a.hide=!1,a._isMatch=!0,t&&r.addParentsToTree(a._parent,i),i.set(e,a),t&&n&&r.addChildrenToTree(a._children,i,o)}));var a=0===o.length;return this.matchTree=i,{allNodesHidden:a,tree:i}}},{key:"restoreNodes",value:function(){return this.tree.forEach((function(e){e.hide=!1})),this.tree}},{key:"restoreDefaultValues",value:function(){var e=this;return this.defaultValues.forEach((function(t){e.setNodeCheckedState(t,!0)})),this.tree}},{key:"togglePreviousChecked",value:function(e,t){var n=this.currentChecked;if(n&&n!==e){var r=this.getNodeById(n);r.checked=!1,this.radioSelect&&this.showPartialState&&this.partialCheckParents(r)}this.currentChecked=t?e:null}},{key:"setNodeCheckedState",value:function(e,t){this.radioSelect&&this.togglePreviousChecked(e,t);var n=this.getNodeById(e);n.checked=t,this.showPartialState&&(n.partial=!1),this.simpleSelect?this.togglePreviousChecked(e,t):this.radioSelect?(this.showPartialState&&this.partialCheckParents(n),t||this.unCheckParents(n)):(this.hierarchical||this.toggleChildren(e,t),this.showPartialState&&this.partialCheckParents(n),this.hierarchical||t||this.unCheckParents(n))}},{key:"unCheckParents",value:function(e){for(var t=e._parent;t;){var n=this.getNodeById(t);n.checked=!1,n.partial=lt(n,"_children",this.getNodeById.bind(this)),t=n._parent}}},{key:"partialCheckParents",value:function(e){for(var t=this,n=e._parent;n;){var r=this.getNodeById(n);r.checked=r._children.every((function(e){return t.getNodeById(e).checked})),r.partial=lt(r,"_children",this.getNodeById.bind(this)),n=r._parent}}},{key:"toggleChildren",value:function(e,t){var n=this,r=this.getNodeById(e);r.checked=t,this.showPartialState&&(r.partial=!1),c(r._children)||r._children.forEach((function(e){return n.toggleChildren(e,t)}))}},{key:"toggleNodeExpandState",value:function(e){var t=this.getNodeById(e);return t.expanded=!t.expanded,t.expanded||this.collapseChildren(t),this.tree}},{key:"collapseChildren",value:function(e){var t=this;e.expanded=!1,c(e._children)||e._children.forEach((function(e){return t.collapseChildren(t.getNodeById(e))}))}},{key:"tags",get:function(){var e=this;return this.radioSelect||this.simpleSelect?this.currentChecked?[this.getNodeById(this.currentChecked)]:[]:yt.getNodesMatching(this.tree,(function(t,n,r){return t.checked&&!e.hierarchical&&yt.markSubTreeVisited(t,r,(function(t){return e.getNodeById(t)})),t.checked}))}},{key:"getTreeAndTags",value:function(){return{tree:this.tree,tags:this.tags}}},{key:"handleNavigationKey",value:function(e,t,n,r,o,i,a){var c=this,s=e&&this.getNodeById(e),l=Rt.getAction(s,n);return Pt.has(l)?Rt.handleFocusNavigationkey(t,l,s,(function(e){return c.getNodeById(e)}),o):s&&t.has(s._id)?Rt.handleToggleNavigationkey(l,s,r,i,a):e}},{key:"_getAddOnMatch",value:function(e,t){var n=function(e,t){return e.label.toLowerCase().indexOf(t)>=0};return"function"==typeof this.searchPredicate&&(n=this.searchPredicate),function(r){n(r,t)&&e.push(r._id)}}}],n&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();const At=Nt;function Dt(e){return Dt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Dt(e)}function Bt(){return Bt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Bt.apply(this,arguments)}function It(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ft(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?It(Object(n),!0).forEach((function(t){Vt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):It(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Mt(e,t){return Mt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Mt(e,t)}function Lt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ut(e){return Ut=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Ut(e)}function Vt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var zt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Mt(e,t)}(c,e);var t,n,r,o,a=(r=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Ut(r);if(o){var n=Ut(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Dt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Lt(e)}(this,e)});function c(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),Vt(Lt(t=a.call(this,e)),"initNewProps",(function(e){var n=e.data,r=e.mode,o=e.showDropdown,i=e.showPartiallySelected,a=e.searchPredicate;t.treeManager=new At({data:n,mode:r,showPartiallySelected:i,rootPrefixId:t.clientId,searchPredicate:a}),t.setState((function(e){var n=e.currentFocus&&t.treeManager.getNodeById(e.currentFocus);return n&&(n._focused=!0),Ft({showDropdown:/initial|always/.test(o)||!0===e.showDropdown},t.treeManager.getTreeAndTags())}))})),Vt(Lt(t),"resetSearchState",(function(){return t.searchInput&&(t.searchInput.value=""),{tree:t.treeManager.restoreNodes(),searchModeOn:!1,allNodesHidden:!1}})),Vt(Lt(t),"handleClick",(function(e,n){t.setState((function(e){var n="always"===t.props.showDropdown||t.keepDropdownActive||!e.showDropdown;return n!==e.showDropdown&&(n?document.addEventListener("click",t.handleOutsideClick,!1):document.removeEventListener("click",t.handleOutsideClick,!1)),n?t.props.onFocus():t.props.onBlur(),n?{showDropdown:n}:Ft({showDropdown:n},t.resetSearchState())}),n)})),Vt(Lt(t),"handleOutsideClick",(function(e){"always"!==t.props.showDropdown&&function(e,t){return e instanceof Event&&!function(e){if(e.path)return e.path;for(var t=e.target,n=[t];t.parentElement;)t=t.parentElement,n.unshift(t);return n}(e).some((function(e){return e===t}))}(e,t.node)&&t.handleClick()})),Vt(Lt(t),"onInputChange",(function(e){var n=e.length>0;if(n){var r=t.treeManager.filterTree(e,t.props.keepTreeOnSearch,t.props.keepChildrenOnSearch),o=r.allNodesHidden,i=r.tree;t.setState({tree:i,searchModeOn:n,allNodesHidden:o})}else t.setState(t.resetSearchState())})),Vt(Lt(t),"onTagRemove",(function(e,n){var r=t.state.tags;t.onCheckboxChange(e,!1,(function(o){n&&Rt.getNextFocusAfterTagDelete(e,r,o,t.searchInput).focus()}))})),Vt(Lt(t),"onNodeToggle",(function(e){t.treeManager.toggleNodeExpandState(e);var n=t.state.searchModeOn?t.treeManager.matchTree:t.treeManager.tree;t.setState({tree:n}),"function"==typeof t.props.onNodeToggle&&t.props.onNodeToggle(t.treeManager.getNodeById(e))})),Vt(Lt(t),"onCheckboxChange",(function(e,n,r){var o=t.props,i=o.mode,a=o.keepOpenOnSelect,c=o.clearSearchOnChange,s=t.state,l=s.currentFocus,u=s.searchModeOn;t.treeManager.setNodeCheckedState(e,n);var f=t.treeManager.tags,p=["simpleSelect","radioSelect"].indexOf(i)>-1,d=!(p&&!a)&&t.state.showDropdown,h=l&&t.treeManager.getNodeById(l),y=t.treeManager.getNodeById(e);f.length||(t.treeManager.restoreDefaultValues(),f=t.treeManager.tags);var b={tree:u?t.treeManager.matchTree:t.treeManager.tree,tags:f,showDropdown:d,currentFocus:e};(p&&!d||c)&&Object.assign(b,t.resetSearchState()),p&&!d&&document.removeEventListener("click",t.handleOutsideClick,!1),Rt.adjustFocusedProps(h,y),t.setState(b,(function(){r&&r(f)})),t.props.onChange(y,f)})),Vt(Lt(t),"onAction",(function(e,n){t.props.onAction(t.treeManager.getNodeById(e),n)})),Vt(Lt(t),"onInputFocus",(function(){t.keepDropdownActive=!0})),Vt(Lt(t),"onInputBlur",(function(){t.keepDropdownActive=!1})),Vt(Lt(t),"onTrigger",(function(e){t.handleClick(e,(function(){t.state.showDropdown&&t.searchInput.focus()}))})),Vt(Lt(t),"onKeyboardKeyDown",(function(e){var n=t.props,r=n.readOnly,o=n.mode,i=n.disablePoppingOnBackspace,a=t.state,c=a.showDropdown,s=a.tags,l=a.searchModeOn,u=a.currentFocus,f=t.treeManager,p=l?f.matchTree:f.tree;if(c||!Rt.isValidKey(e.key,!1)&&!/^\w$/i.test(e.key))if(c&&Rt.isValidKey(e.key,!0)){var d=f.handleNavigationKey(u,p,e.key,r,!l,t.onCheckboxChange,t.onNodeToggle);d!==u&&t.setState({currentFocus:d},(function(){var e=document&&document.getElementById("".concat(d,"_li"));e&&e.scrollIntoView()}))}else{if(c&&["Escape","Tab"].indexOf(e.key)>-1)return void("simpleSelect"===o&&p.has(u)?t.onCheckboxChange(u,!0):(t.keepDropdownActive=!1,t.handleClick()));if(i||"Backspace"!==e.key||!s.length||0!==t.searchInput.value.length)return;var h=s.pop();t.onCheckboxChange(h._id,!1)}else if(e.persist(),t.handleClick(null,(function(){return t.onKeyboardKeyDown(e)})),/\w/i.test(e.key))return;e.preventDefault()})),Vt(Lt(t),"getAriaAttributes",(function(){var e=t.props,n=e.mode,r=e.texts;return"radioSelect"!==n?{}:Ft({role:"radiogroup"},p(r.label))})),t.state={searchModeOn:!1,currentFocus:void 0},t.clientId=e.id||u.get(Lt(t)),t}return t=c,(n=[{key:"UNSAFE_componentWillMount",value:function(){this.initNewProps(this.props)}},{key:"componentWillUnmount",value:function(){document.removeEventListener("click",this.handleOutsideClick,!1)}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){this.initNewProps(e)}},{key:"render",value:function(){var e=this,t=this.props,n=t.disabled,r=t.readOnly,o=t.mode,a=t.texts,c=t.inlineSearchInput,s=t.tabIndex,l=this.state,u=l.showDropdown,f=l.currentFocus,p=l.tags,d={disabled:n,readOnly:r,activeDescendant:f?"".concat(f,"_li"):void 0,texts:a,mode:o,clientId:this.clientId},h=i().createElement(w,Bt({inputRef:function(t){e.searchInput=t},onInputChange:this.onInputChange,onFocus:this.onInputFocus,onBlur:this.onInputBlur,onKeyDown:this.onKeyboardKeyDown},d,{inlineSearchInput:c}));return i().createElement("div",{id:this.clientId,className:[this.props.className&&this.props.className,"react-dropdown-tree-select"].filter(Boolean).join(" "),ref:function(t){e.node=t}},i().createElement("div",{className:["dropdown","simpleSelect"===o&&"simple-select","radioSelect"===o&&"radio-select"].filter(Boolean).join(" ")},i().createElement($,Bt({onTrigger:this.onTrigger,showDropdown:u},d,{tags:p,tabIndex:s}),i().createElement(F,Bt({tags:p,onTagRemove:this.onTagRemove},d),!c&&h)),u&&i().createElement("div",Bt({className:"dropdown-content"},this.getAriaAttributes()),c&&h,this.state.allNodesHidden?i().createElement("span",{className:"no-matches"},a.noMatches||"No matches found"):i().createElement(it,Bt({data:this.state.tree,keepTreeOnSearch:this.props.keepTreeOnSearch,keepChildrenOnSearch:this.props.keepChildrenOnSearch,searchModeOn:this.state.searchModeOn,onAction:this.onAction,onCheckboxChange:this.onCheckboxChange,onNodeToggle:this.onNodeToggle,mode:o,showPartiallySelected:this.props.showPartiallySelected},d)))))}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(n.Component);Vt(zt,"propTypes",{data:t().oneOfType([t().object,t().array]).isRequired,clearSearchOnChange:t().bool,keepTreeOnSearch:t().bool,keepChildrenOnSearch:t().bool,keepOpenOnSelect:t().bool,texts:t().shape({placeholder:t().string,inlineSearchPlaceholder:t().string,noMatches:t().string,label:t().string,labelRemove:t().string}),showDropdown:t().oneOf(["default","initial","always"]),className:t().string,onChange:t().func,onAction:t().func,onNodeToggle:t().func,onFocus:t().func,onBlur:t().func,mode:t().oneOf(["multiSelect","simpleSelect","radioSelect","hierarchical"]),showPartiallySelected:t().bool,disabled:t().bool,readOnly:t().bool,id:t().string,searchPredicate:t().func,inlineSearchInput:t().bool,tabIndex:t().number,disablePoppingOnBackspace:t().bool}),Vt(zt,"defaultProps",{onAction:function(){},onFocus:function(){},onBlur:function(){},onChange:function(){},texts:{},showDropdown:"default",inlineSearchInput:!1,tabIndex:0,disablePoppingOnBackspace:!1});const qt=zt})(),o})(),e.exports=r(n(9196))},9196:function(e){"use strict";e.exports=window.React}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={id:e,loaded:!1,exports:{}};return t[e].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}r.m=t,e=[],r.O=function(t,n,o,i){if(!n){var a=1/0;for(u=0;u<e.length;u++){n=e[u][0],o=e[u][1],i=e[u][2];for(var c=!0,s=0;s<n.length;s++)(!1&i||a>=i)&&Object.keys(r.O).every((function(e){return r.O[e](n[s])}))?n.splice(s--,1):(c=!1,i<a&&(a=i));if(c){e.splice(u--,1);var l=o();void 0!==l&&(t=l)}}return t}i=i||0;for(var u=e.length;u>0&&e[u-1][2]>i;u--)e[u]=e[u-1];e[u]=[n,o,i]},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},function(){var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var o=n.length-1;o>-1&&!e;)e=n[o--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e}(),function(){var e={826:0,431:0};r.O.j=function(t){return 0===e[t]};var t=function(t,n){var o,i,a=n[0],c=n[1],s=n[2],l=0;if(a.some((function(t){return 0!==e[t]}))){for(o in c)r.o(c,o)&&(r.m[o]=c[o]);if(s)var u=s(r)}for(t&&t(n);l<a.length;l++)i=a[l],r.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return r.O(u)},n=self.webpackChunkopen_video_block=self.webpackChunkopen_video_block||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))}();var o=r.O(void 0,[431],(function(){return r(2168)}));o=r.O(o)}();
     1(()=>{var e,t={2:(e,t,r)=>{var n=r(2199),o=r(4664),i=r(5950);e.exports=function(e){return n(e,i,o)}},79:(e,t,r)=>{var n=r(3702),o=r(80),i=r(4739),a=r(8655),s=r(1175);function c(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}c.prototype.clear=n,c.prototype.delete=o,c.prototype.get=i,c.prototype.has=a,c.prototype.set=s,e.exports=c},80:(e,t,r)=>{var n=r(6025),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,r=n(t,e);return!(r<0||(r==t.length-1?t.pop():o.call(t,r,1),--this.size,0))}},181:e=>{e.exports=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}},270:(e,t,r)=>{var n=r(7068),o=r(346);e.exports=function e(t,r,i,a,s){return t===r||(null==t||null==r||!o(t)&&!o(r)?t!=t&&r!=r:n(t,r,i,a,e,s))}},289:(e,t,r)=>{var n=r(2651);e.exports=function(e){return n(this,e).get(e)}},294:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},317:e=>{e.exports=function(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}},332:(e,t,r)=>{"use strict";var n={};r.r(n),r.d(n,{hasBrowserEnv:()=>Oe,hasStandardBrowserEnv:()=>je,hasStandardBrowserWebWorkerEnv:()=>Ee,navigator:()=>Se,origin:()=>_e});const o=window.wp.blocks;var i=r(1609);window.wp.i18n,r(6628),r(2404),i.Component;const a=window.wp.blockEditor,s=window.wp.components,c=window.wp.data,l=window.wp.apiFetch;var u=r.n(l);const f=window.wp.element;function p(e,t){return function(){return e.apply(t,arguments)}}const{toString:d}=Object.prototype,{getPrototypeOf:h}=Object,{iterator:y,toStringTag:b}=Symbol,g=(v=Object.create(null),e=>{const t=d.call(e);return v[t]||(v[t]=t.slice(8,-1).toLowerCase())});var v;const m=e=>(e=e.toLowerCase(),t=>g(t)===e),w=e=>t=>typeof t===e,{isArray:O}=Array,S=w("undefined");function j(e){return null!==e&&!S(e)&&null!==e.constructor&&!S(e.constructor)&&x(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const E=m("ArrayBuffer"),_=w("string"),x=w("function"),P=w("number"),k=e=>null!==e&&"object"==typeof e,T=e=>{if("object"!==g(e))return!1;const t=h(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||b in e||y in e)},C=m("Date"),R=m("File"),N=m("Blob"),A=m("FileList"),D=m("URLSearchParams"),[B,I,F,M]=["ReadableStream","Request","Response","Headers"].map(m);function L(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,o;if("object"!=typeof e&&(e=[e]),O(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{if(j(e))return;const o=r?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let a;for(n=0;n<i;n++)a=o[n],t.call(null,e[a],a,e)}}function U(e,t){if(j(e))return null;t=t.toLowerCase();const r=Object.keys(e);let n,o=r.length;for(;o-- >0;)if(n=r[o],t===n.toLowerCase())return n;return null}const V="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,z=e=>!S(e)&&e!==V,q=($="undefined"!=typeof Uint8Array&&h(Uint8Array),e=>$&&e instanceof $);var $;const K=m("HTMLFormElement"),W=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),H=m("RegExp"),Y=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};L(r,(r,o)=>{let i;!1!==(i=t(r,o,e))&&(n[o]=i||r)}),Object.defineProperties(e,n)},J=m("AsyncFunction"),X=(G="function"==typeof setImmediate,Q=x(V.postMessage),G?setImmediate:Q?(Z=`axios@${Math.random()}`,ee=[],V.addEventListener("message",({source:e,data:t})=>{e===V&&t===Z&&ee.length&&ee.shift()()},!1),e=>{ee.push(e),V.postMessage(Z,"*")}):e=>setTimeout(e));var G,Q,Z,ee;const te="undefined"!=typeof queueMicrotask?queueMicrotask.bind(V):"undefined"!=typeof process&&process.nextTick||X,re={isArray:O,isArrayBuffer:E,isBuffer:j,isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||x(e.append)&&("formdata"===(t=g(e))||"object"===t&&x(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&E(e.buffer),t},isString:_,isNumber:P,isBoolean:e=>!0===e||!1===e,isObject:k,isPlainObject:T,isEmptyObject:e=>{if(!k(e)||j(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:B,isRequest:I,isResponse:F,isHeaders:M,isUndefined:S,isDate:C,isFile:R,isBlob:N,isRegExp:H,isFunction:x,isStream:e=>k(e)&&x(e.pipe),isURLSearchParams:D,isTypedArray:q,isFileList:A,forEach:L,merge:function e(){const{caseless:t,skipUndefined:r}=z(this)&&this||{},n={},o=(o,i)=>{const a=t&&U(n,i)||i;T(n[a])&&T(o)?n[a]=e(n[a],o):T(o)?n[a]=e({},o):O(o)?n[a]=o.slice():r&&S(o)||(n[a]=o)};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&L(arguments[e],o);return n},extend:(e,t,r,{allOwnKeys:n}={})=>(L(t,(t,n)=>{r&&x(t)?e[n]=p(t,r):e[n]=t},{allOwnKeys:n}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,t,r,n)=>{let o,i,a;const s={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],n&&!n(a,e,t)||s[a]||(t[a]=e[a],s[a]=!0);e=!1!==r&&h(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:g,kindOfTest:m,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return-1!==n&&n===r},toArray:e=>{if(!e)return null;if(O(e))return e;let t=e.length;if(!P(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const r=(e&&e[y]).call(e);let n;for(;(n=r.next())&&!n.done;){const r=n.value;t.call(e,r[0],r[1])}},matchAll:(e,t)=>{let r;const n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:K,hasOwnProperty:W,hasOwnProp:W,reduceDescriptors:Y,freezeMethods:e=>{Y(e,(t,r)=>{if(x(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];x(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))})},toObjectSet:(e,t)=>{const r={},n=e=>{e.forEach(e=>{r[e]=!0})};return O(e)?n(e):n(String(e).split(t)),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,r){return t.toUpperCase()+r}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:U,global:V,isContextDefined:z,isSpecCompliantForm:function(e){return!!(e&&x(e.append)&&"FormData"===e[b]&&e[y])},toJSONObject:e=>{const t=new Array(10),r=(e,n)=>{if(k(e)){if(t.indexOf(e)>=0)return;if(j(e))return e;if(!("toJSON"in e)){t[n]=e;const o=O(e)?[]:{};return L(e,(e,t)=>{const i=r(e,n+1);!S(i)&&(o[t]=i)}),t[n]=void 0,o}}return e};return r(e,0)},isAsyncFn:J,isThenable:e=>e&&(k(e)||x(e))&&x(e.then)&&x(e.catch),setImmediate:X,asap:te,isIterable:e=>null!=e&&x(e[y])};function ne(e,t,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o,this.status=o.status?o.status:null)}re.inherits(ne,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:re.toJSONObject(this.config),code:this.code,status:this.status}}});const oe=ne.prototype,ie={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{ie[e]={value:e}}),Object.defineProperties(ne,ie),Object.defineProperty(oe,"isAxiosError",{value:!0}),ne.from=(e,t,r,n,o,i)=>{const a=Object.create(oe);re.toFlatObject(e,a,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e);const s=e&&e.message?e.message:"Error",c=null==t&&e?e.code:t;return ne.call(a,s,c,r,n,o),e&&null==a.cause&&Object.defineProperty(a,"cause",{value:e,configurable:!0}),a.name=e&&e.name||"Error",i&&Object.assign(a,i),a};const ae=ne;function se(e){return re.isPlainObject(e)||re.isArray(e)}function ce(e){return re.endsWith(e,"[]")?e.slice(0,-2):e}function le(e,t,r){return e?e.concat(t).map(function(e,t){return e=ce(e),!r&&t?"["+e+"]":e}).join(r?".":""):t}const ue=re.toFlatObject(re,{},null,function(e){return/^is[A-Z]/.test(e)}),fe=function(e,t,r){if(!re.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(r=re.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!re.isUndefined(t[e])})).metaTokens,o=r.visitor||l,i=r.dots,a=r.indexes,s=(r.Blob||"undefined"!=typeof Blob&&Blob)&&re.isSpecCompliantForm(t);if(!re.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(re.isDate(e))return e.toISOString();if(re.isBoolean(e))return e.toString();if(!s&&re.isBlob(e))throw new ae("Blob is not supported. Use a Buffer instead.");return re.isArrayBuffer(e)||re.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function l(e,r,o){let s=e;if(e&&!o&&"object"==typeof e)if(re.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(re.isArray(e)&&function(e){return re.isArray(e)&&!e.some(se)}(e)||(re.isFileList(e)||re.endsWith(r,"[]"))&&(s=re.toArray(e)))return r=ce(r),s.forEach(function(e,n){!re.isUndefined(e)&&null!==e&&t.append(!0===a?le([r],n,i):null===a?r:r+"[]",c(e))}),!1;return!!se(e)||(t.append(le(o,r,i),c(e)),!1)}const u=[],f=Object.assign(ue,{defaultVisitor:l,convertValue:c,isVisitable:se});if(!re.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!re.isUndefined(r)){if(-1!==u.indexOf(r))throw Error("Circular reference detected in "+n.join("."));u.push(r),re.forEach(r,function(r,i){!0===(!(re.isUndefined(r)||null===r)&&o.call(t,r,re.isString(i)?i.trim():i,n,f))&&e(r,n?n.concat(i):[i])}),u.pop()}}(e),t};function pe(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function de(e,t){this._pairs=[],e&&fe(e,this,t)}const he=de.prototype;he.append=function(e,t){this._pairs.push([e,t])},he.toString=function(e){const t=e?function(t){return e.call(this,t,pe)}:pe;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};const ye=de;function be(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ge(e,t,r){if(!t)return e;const n=r&&r.encode||be;re.isFunction(r)&&(r={serialize:r});const o=r&&r.serialize;let i;if(i=o?o(t,r):re.isURLSearchParams(t)?t.toString():new ye(t,r).toString(n),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}const ve=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){re.forEach(this.handlers,function(t){null!==t&&e(t)})}},me={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},we={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:ye,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},Oe="undefined"!=typeof window&&"undefined"!=typeof document,Se="object"==typeof navigator&&navigator||void 0,je=Oe&&(!Se||["ReactNative","NativeScript","NS"].indexOf(Se.product)<0),Ee="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,_e=Oe&&window.location.href||"http://localhost",xe={...n,...we},Pe=function(e){function t(e,r,n,o){let i=e[o++];if("__proto__"===i)return!0;const a=Number.isFinite(+i),s=o>=e.length;return i=!i&&re.isArray(n)?n.length:i,s?(re.hasOwnProp(n,i)?n[i]=[n[i],r]:n[i]=r,!a):(n[i]&&re.isObject(n[i])||(n[i]=[]),t(e,r,n[i],o)&&re.isArray(n[i])&&(n[i]=function(e){const t={},r=Object.keys(e);let n;const o=r.length;let i;for(n=0;n<o;n++)i=r[n],t[i]=e[i];return t}(n[i])),!a)}if(re.isFormData(e)&&re.isFunction(e.entries)){const r={};return re.forEachEntry(e,(e,n)=>{t(function(e){return re.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),n,r,0)}),r}return null},ke={transitional:me,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,o=re.isObject(e);if(o&&re.isHTMLForm(e)&&(e=new FormData(e)),re.isFormData(e))return n?JSON.stringify(Pe(e)):e;if(re.isArrayBuffer(e)||re.isBuffer(e)||re.isStream(e)||re.isFile(e)||re.isBlob(e)||re.isReadableStream(e))return e;if(re.isArrayBufferView(e))return e.buffer;if(re.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return fe(e,new xe.classes.URLSearchParams,{visitor:function(e,t,r,n){return xe.isNode&&re.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((i=re.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return fe(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||n?(t.setContentType("application/json",!1),function(e){if(re.isString(e))try{return(0,JSON.parse)(e),re.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||ke.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(re.isResponse(e)||re.isReadableStream(e))return e;if(e&&re.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e,this.parseReviver)}catch(e){if(r){if("SyntaxError"===e.name)throw ae.from(e,ae.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:xe.classes.FormData,Blob:xe.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};re.forEach(["delete","get","head","post","put","patch"],e=>{ke.headers[e]={}});const Te=ke,Ce=re.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Re=Symbol("internals");function Ne(e){return e&&String(e).trim().toLowerCase()}function Ae(e){return!1===e||null==e?e:re.isArray(e)?e.map(Ae):String(e)}function De(e,t,r,n,o){return re.isFunction(n)?n.call(this,t,r):(o&&(t=r),re.isString(t)?re.isString(n)?-1!==t.indexOf(n):re.isRegExp(n)?n.test(t):void 0:void 0)}class Be{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function o(e,t,r){const o=Ne(t);if(!o)throw new Error("header name must be a non-empty string");const i=re.findKey(n,o);(!i||void 0===n[i]||!0===r||void 0===r&&!1!==n[i])&&(n[i||t]=Ae(e))}const i=(e,t)=>re.forEach(e,(e,r)=>o(e,r,t));if(re.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(re.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))i((e=>{const t={};let r,n,o;return e&&e.split("\n").forEach(function(e){o=e.indexOf(":"),r=e.substring(0,o).trim().toLowerCase(),n=e.substring(o+1).trim(),!r||t[r]&&Ce[r]||("set-cookie"===r?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t})(e),t);else if(re.isObject(e)&&re.isIterable(e)){let r,n,o={};for(const t of e){if(!re.isArray(t))throw TypeError("Object iterator must return a key-value pair");o[n=t[0]]=(r=o[n])?re.isArray(r)?[...r,t[1]]:[r,t[1]]:t[1]}i(o,t)}else null!=e&&o(t,e,r);return this}get(e,t){if(e=Ne(e)){const r=re.findKey(this,e);if(r){const e=this[r];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}(e);if(re.isFunction(t))return t.call(this,e,r);if(re.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Ne(e)){const r=re.findKey(this,e);return!(!r||void 0===this[r]||t&&!De(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function o(e){if(e=Ne(e)){const o=re.findKey(r,e);!o||t&&!De(0,r[o],o,t)||(delete r[o],n=!0)}}return re.isArray(e)?e.forEach(o):o(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const o=t[r];e&&!De(0,this[o],o,e,!0)||(delete this[o],n=!0)}return n}normalize(e){const t=this,r={};return re.forEach(this,(n,o)=>{const i=re.findKey(r,o);if(i)return t[i]=Ae(n),void delete t[o];const a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,r)=>t.toUpperCase()+r)}(o):String(o).trim();a!==o&&delete t[o],t[a]=Ae(n),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return re.forEach(this,(r,n)=>{null!=r&&!1!==r&&(t[n]=e&&re.isArray(r)?r.join(", "):r)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach(e=>r.set(e)),r}static accessor(e){const t=(this[Re]=this[Re]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=Ne(e);t[n]||(function(e,t){const r=re.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(e,r,o){return this[n].call(this,t,e,r,o)},configurable:!0})})}(r,e),t[n]=!0)}return re.isArray(e)?e.forEach(n):n(e),this}}Be.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),re.reduceDescriptors(Be.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}}),re.freezeMethods(Be);const Ie=Be;function Fe(e,t){const r=this||Te,n=t||r,o=Ie.from(n.headers);let i=n.data;return re.forEach(e,function(e){i=e.call(r,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function Me(e){return!(!e||!e.__CANCEL__)}function Le(e,t,r){ae.call(this,null==e?"canceled":e,ae.ERR_CANCELED,t,r),this.name="CanceledError"}re.inherits(Le,ae,{__CANCEL__:!0});const Ue=Le;function Ve(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new ae("Request failed with status code "+r.status,[ae.ERR_BAD_REQUEST,ae.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}const ze=(e,t,r=3)=>{let n=0;const o=function(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o,i=0,a=0;return t=void 0!==t?t:1e3,function(s){const c=Date.now(),l=n[a];o||(o=c),r[i]=s,n[i]=c;let u=a,f=0;for(;u!==i;)f+=r[u++],u%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),c-o<t)return;const p=l&&c-l;return p?Math.round(1e3*f/p):void 0}}(50,250);return function(e,t){let r,n,o=0,i=1e3/t;const a=(t,i=Date.now())=>{o=i,r=null,n&&(clearTimeout(n),n=null),e(...t)};return[(...e)=>{const t=Date.now(),s=t-o;s>=i?a(e,t):(r=e,n||(n=setTimeout(()=>{n=null,a(r)},i-s)))},()=>r&&a(r)]}(r=>{const i=r.loaded,a=r.lengthComputable?r.total:void 0,s=i-n,c=o(s);n=i,e({loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:c||void 0,estimated:c&&a&&i<=a?(a-i)/c:void 0,event:r,lengthComputable:null!=a,[t?"download":"upload"]:!0})},r)},qe=(e,t)=>{const r=null!=e;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},$e=e=>(...t)=>re.asap(()=>e(...t)),Ke=xe.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,xe.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(xe.origin),xe.navigator&&/(msie|trident)/i.test(xe.navigator.userAgent)):()=>!0,We=xe.hasStandardBrowserEnv?{write(e,t,r,n,o,i,a){if("undefined"==typeof document)return;const s=[`${e}=${encodeURIComponent(t)}`];re.isNumber(r)&&s.push(`expires=${new Date(r).toUTCString()}`),re.isString(n)&&s.push(`path=${n}`),re.isString(o)&&s.push(`domain=${o}`),!0===i&&s.push("secure"),re.isString(a)&&s.push(`SameSite=${a}`),document.cookie=s.join("; ")},read(e){if("undefined"==typeof document)return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};function He(e,t,r){let n=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(n||0==r)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Ye=e=>e instanceof Ie?{...e}:e;function Je(e,t){t=t||{};const r={};function n(e,t,r,n){return re.isPlainObject(e)&&re.isPlainObject(t)?re.merge.call({caseless:n},e,t):re.isPlainObject(t)?re.merge({},t):re.isArray(t)?t.slice():t}function o(e,t,r,o){return re.isUndefined(t)?re.isUndefined(e)?void 0:n(void 0,e,0,o):n(e,t,0,o)}function i(e,t){if(!re.isUndefined(t))return n(void 0,t)}function a(e,t){return re.isUndefined(t)?re.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function s(r,o,i){return i in t?n(r,o):i in e?n(void 0,r):void 0}const c={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(e,t,r)=>o(Ye(e),Ye(t),0,!0)};return re.forEach(Object.keys({...e,...t}),function(n){const i=c[n]||o,a=i(e[n],t[n],n);re.isUndefined(a)&&i!==s||(r[n]=a)}),r}const Xe=e=>{const t=Je({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:o,xsrfCookieName:i,headers:a,auth:s}=t;if(t.headers=a=Ie.from(a),t.url=ge(He(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&a.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),re.isFormData(r))if(xe.hasStandardBrowserEnv||xe.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(re.isFunction(r.getHeaders)){const e=r.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach(([e,r])=>{t.includes(e.toLowerCase())&&a.set(e,r)})}if(xe.hasStandardBrowserEnv&&(n&&re.isFunction(n)&&(n=n(t)),n||!1!==n&&Ke(t.url))){const e=o&&i&&We.read(i);e&&a.set(o,e)}return t},Ge="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,r){const n=Xe(e);let o=n.data;const i=Ie.from(n.headers).normalize();let a,s,c,l,u,{responseType:f,onUploadProgress:p,onDownloadProgress:d}=n;function h(){l&&l(),u&&u(),n.cancelToken&&n.cancelToken.unsubscribe(a),n.signal&&n.signal.removeEventListener("abort",a)}let y=new XMLHttpRequest;function b(){if(!y)return;const n=Ie.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders());Ve(function(e){t(e),h()},function(e){r(e),h()},{data:f&&"text"!==f&&"json"!==f?y.response:y.responseText,status:y.status,statusText:y.statusText,headers:n,config:e,request:y}),y=null}y.open(n.method.toUpperCase(),n.url,!0),y.timeout=n.timeout,"onloadend"in y?y.onloadend=b:y.onreadystatechange=function(){y&&4===y.readyState&&(0!==y.status||y.responseURL&&0===y.responseURL.indexOf("file:"))&&setTimeout(b)},y.onabort=function(){y&&(r(new ae("Request aborted",ae.ECONNABORTED,e,y)),y=null)},y.onerror=function(t){const n=t&&t.message?t.message:"Network Error",o=new ae(n,ae.ERR_NETWORK,e,y);o.event=t||null,r(o),y=null},y.ontimeout=function(){let t=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const o=n.transitional||me;n.timeoutErrorMessage&&(t=n.timeoutErrorMessage),r(new ae(t,o.clarifyTimeoutError?ae.ETIMEDOUT:ae.ECONNABORTED,e,y)),y=null},void 0===o&&i.setContentType(null),"setRequestHeader"in y&&re.forEach(i.toJSON(),function(e,t){y.setRequestHeader(t,e)}),re.isUndefined(n.withCredentials)||(y.withCredentials=!!n.withCredentials),f&&"json"!==f&&(y.responseType=n.responseType),d&&([c,u]=ze(d,!0),y.addEventListener("progress",c)),p&&y.upload&&([s,l]=ze(p),y.upload.addEventListener("progress",s),y.upload.addEventListener("loadend",l)),(n.cancelToken||n.signal)&&(a=t=>{y&&(r(!t||t.type?new Ue(null,e,y):t),y.abort(),y=null)},n.cancelToken&&n.cancelToken.subscribe(a),n.signal&&(n.signal.aborted?a():n.signal.addEventListener("abort",a)));const g=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(n.url);g&&-1===xe.protocols.indexOf(g)?r(new ae("Unsupported protocol "+g+":",ae.ERR_BAD_REQUEST,e)):y.send(o||null)})},Qe=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let r,n=new AbortController;const o=function(e){if(!r){r=!0,a();const t=e instanceof Error?e:this.reason;n.abort(t instanceof ae?t:new Ue(t instanceof Error?t.message:t))}};let i=t&&setTimeout(()=>{i=null,o(new ae(`timeout ${t} of ms exceeded`,ae.ETIMEDOUT))},t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)}),e=null)};e.forEach(e=>e.addEventListener("abort",o));const{signal:s}=n;return s.unsubscribe=()=>re.asap(a),s}},Ze=function*(e,t){let r=e.byteLength;if(!t||r<t)return void(yield e);let n,o=0;for(;o<r;)n=o+t,yield e.slice(o,n),o=n},et=(e,t,r,n)=>{const o=async function*(e,t){for await(const r of async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:r}=await t.read();if(e)break;yield r}}finally{await t.cancel()}}(e))yield*Ze(r,t)}(e,t);let i,a=0,s=e=>{i||(i=!0,n&&n(e))};return new ReadableStream({async pull(e){try{const{done:t,value:n}=await o.next();if(t)return s(),void e.close();let i=n.byteLength;if(r){let e=a+=i;r(e)}e.enqueue(new Uint8Array(n))}catch(e){throw s(e),e}},cancel:e=>(s(e),o.return())},{highWaterMark:2})},{isFunction:tt}=re,rt=(({Request:e,Response:t})=>({Request:e,Response:t}))(re.global),{ReadableStream:nt,TextEncoder:ot}=re.global,it=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},at=e=>{e=re.merge.call({skipUndefined:!0},rt,e);const{fetch:t,Request:r,Response:n}=e,o=t?tt(t):"function"==typeof fetch,i=tt(r),a=tt(n);if(!o)return!1;const s=o&&tt(nt),c=o&&("function"==typeof ot?(l=new ot,e=>l.encode(e)):async e=>new Uint8Array(await new r(e).arrayBuffer()));var l;const u=i&&s&&it(()=>{let e=!1;const t=new r(xe.origin,{body:new nt,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),f=a&&s&&it(()=>re.isReadableStream(new n("").body)),p={stream:f&&(e=>e.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!p[e]&&(p[e]=(t,r)=>{let n=t&&t[e];if(n)return n.call(t);throw new ae(`Response type '${e}' is not supported`,ae.ERR_NOT_SUPPORT,r)})});return async e=>{let{url:o,method:a,data:s,signal:l,cancelToken:d,timeout:h,onDownloadProgress:y,onUploadProgress:b,responseType:g,headers:v,withCredentials:m="same-origin",fetchOptions:w}=Xe(e),O=t||fetch;g=g?(g+"").toLowerCase():"text";let S=Qe([l,d&&d.toAbortSignal()],h),j=null;const E=S&&S.unsubscribe&&(()=>{S.unsubscribe()});let _;try{if(b&&u&&"get"!==a&&"head"!==a&&0!==(_=await(async(e,t)=>{const n=re.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(re.isBlob(e))return e.size;if(re.isSpecCompliantForm(e)){const t=new r(xe.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return re.isArrayBufferView(e)||re.isArrayBuffer(e)?e.byteLength:(re.isURLSearchParams(e)&&(e+=""),re.isString(e)?(await c(e)).byteLength:void 0)})(t):n})(v,s))){let e,t=new r(o,{method:"POST",body:s,duplex:"half"});if(re.isFormData(s)&&(e=t.headers.get("content-type"))&&v.setContentType(e),t.body){const[e,r]=qe(_,ze($e(b)));s=et(t.body,65536,e,r)}}re.isString(m)||(m=m?"include":"omit");const t=i&&"credentials"in r.prototype,l={...w,signal:S,method:a.toUpperCase(),headers:v.normalize().toJSON(),body:s,duplex:"half",credentials:t?m:void 0};j=i&&new r(o,l);let d=await(i?O(j,w):O(o,l));const h=f&&("stream"===g||"response"===g);if(f&&(y||h&&E)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=d[t]});const t=re.toFiniteNumber(d.headers.get("content-length")),[r,o]=y&&qe(t,ze($e(y),!0))||[];d=new n(et(d.body,65536,r,()=>{o&&o(),E&&E()}),e)}g=g||"text";let x=await p[re.findKey(p,g)||"text"](d,e);return!h&&E&&E(),await new Promise((t,r)=>{Ve(t,r,{data:x,headers:Ie.from(d.headers),status:d.status,statusText:d.statusText,config:e,request:j})})}catch(t){if(E&&E(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new ae("Network Error",ae.ERR_NETWORK,e,j),{cause:t.cause||t});throw ae.from(t,t&&t.code,e,j)}}},st=new Map,ct=e=>{let t=e&&e.env||{};const{fetch:r,Request:n,Response:o}=t,i=[n,o,r];let a,s,c=i.length,l=st;for(;c--;)a=i[c],s=l.get(a),void 0===s&&l.set(a,s=c?new Map:at(t)),l=s;return s},lt=(ct(),{http:null,xhr:Ge,fetch:{get:ct}});re.forEach(lt,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});const ut=e=>`- ${e}`,ft=e=>re.isFunction(e)||null===e||!1===e,pt=function(e,t){e=re.isArray(e)?e:[e];const{length:r}=e;let n,o;const i={};for(let a=0;a<r;a++){let r;if(n=e[a],o=n,!ft(n)&&(o=lt[(r=String(n)).toLowerCase()],void 0===o))throw new ae(`Unknown adapter '${r}'`);if(o&&(re.isFunction(o)||(o=o.get(t))))break;i[r||"#"+a]=o}if(!o){const e=Object.entries(i).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));let t=r?e.length>1?"since :\n"+e.map(ut).join("\n"):" "+ut(e[0]):"as no adapter specified";throw new ae("There is no suitable adapter to dispatch the request "+t,"ERR_NOT_SUPPORT")}return o};function dt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ue(null,e)}function ht(e){return dt(e),e.headers=Ie.from(e.headers),e.data=Fe.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),pt(e.adapter||Te.adapter,e)(e).then(function(t){return dt(e),t.data=Fe.call(e,e.transformResponse,t),t.headers=Ie.from(t.headers),t},function(t){return Me(t)||(dt(e),t&&t.response&&(t.response.data=Fe.call(e,e.transformResponse,t.response),t.response.headers=Ie.from(t.response.headers))),Promise.reject(t)})}const yt="1.13.1",bt={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{bt[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const gt={};bt.transitional=function(e,t,r){function n(e,t){return"[Axios v"+yt+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,o,i)=>{if(!1===e)throw new ae(n(o," has been removed"+(t?" in "+t:"")),ae.ERR_DEPRECATED);return t&&!gt[o]&&(gt[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,o,i)}},bt.spelling=function(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};const vt={assertOptions:function(e,t,r){if("object"!=typeof e)throw new ae("options must be an object",ae.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const i=n[o],a=t[i];if(a){const t=e[i],r=void 0===t||a(t,i,e);if(!0!==r)throw new ae("option "+i+" must be "+r,ae.ERR_BAD_OPTION_VALUE);continue}if(!0!==r)throw new ae("Unknown option "+i,ae.ERR_BAD_OPTION)}},validators:bt},mt=vt.validators;class wt{constructor(e){this.defaults=e||{},this.interceptors={request:new ve,response:new ve}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const r=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?r&&!String(e.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+r):e.stack=r}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Je(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:o}=t;void 0!==r&&vt.assertOptions(r,{silentJSONParsing:mt.transitional(mt.boolean),forcedJSONParsing:mt.transitional(mt.boolean),clarifyTimeoutError:mt.transitional(mt.boolean)},!1),null!=n&&(re.isFunction(n)?t.paramsSerializer={serialize:n}:vt.assertOptions(n,{encode:mt.function,serialize:mt.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),vt.assertOptions(t,{baseUrl:mt.spelling("baseURL"),withXsrfToken:mt.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&re.merge(o.common,o[t.method]);o&&re.forEach(["delete","get","head","post","put","patch","common"],e=>{delete o[e]}),t.headers=Ie.concat(i,o);const a=[];let s=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,a.unshift(e.fulfilled,e.rejected))});const c=[];let l;this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let u,f=0;if(!s){const e=[ht.bind(this),void 0];for(e.unshift(...a),e.push(...c),u=e.length,l=Promise.resolve(t);f<u;)l=l.then(e[f++],e[f++]);return l}u=a.length;let p=t;for(;f<u;){const e=a[f++],t=a[f++];try{p=e(p)}catch(e){t.call(this,e);break}}try{l=ht.call(this,p)}catch(e){return Promise.reject(e)}for(f=0,u=c.length;f<u;)l=l.then(c[f++],c[f++]);return l}getUri(e){return ge(He((e=Je(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}re.forEach(["delete","get","head","options"],function(e){wt.prototype[e]=function(t,r){return this.request(Je(r||{},{method:e,url:t,data:(r||{}).data}))}}),re.forEach(["post","put","patch"],function(e){function t(t){return function(r,n,o){return this.request(Je(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}wt.prototype[e]=t(),wt.prototype[e+"Form"]=t(!0)});const Ot=wt;class St{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(e){t=e});const r=this;this.promise.then(e=>{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null}),this.promise.then=e=>{let t;const n=new Promise(e=>{r.subscribe(e),t=e}).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e(function(e,n,o){r.reason||(r.reason=new Ue(e,n,o),t(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new St(function(t){e=t}),cancel:e}}}const jt=St,Et={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Et).forEach(([e,t])=>{Et[t]=e});const _t=Et,xt=function e(t){const r=new Ot(t),n=p(Ot.prototype.request,r);return re.extend(n,Ot.prototype,r,{allOwnKeys:!0}),re.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(Je(t,r))},n}(Te);xt.Axios=Ot,xt.CanceledError=Ue,xt.CancelToken=jt,xt.isCancel=Me,xt.VERSION=yt,xt.toFormData=fe,xt.AxiosError=ae,xt.Cancel=xt.CanceledError,xt.all=function(e){return Promise.all(e)},xt.spread=function(e){return function(t){return e.apply(null,t)}},xt.isAxiosError=function(e){return re.isObject(e)&&!0===e.isAxiosError},xt.mergeConfig=Je,xt.AxiosHeaders=Ie,xt.formToJSON=e=>Pe(re.isHTMLForm(e)?new FormData(e):e),xt.getAdapter=pt,xt.HttpStatusCode=_t,xt.default=xt;const Pt=xt,kt=(0,c.withSelect)(e=>{const{getEntityRecords:t}=e("core");return{categories:t("taxonomy","category",{per_page:-1})}})(({attributes:e,updateSelectedCategory:t,categories:r,disabled:n})=>{let o=[];return Array.isArray(r)&&(o=r.map(({id:e,name:t})=>{return{label:(r=t,"Uncategorized"===r?"Posts with no category assigned (Uncategorized)":`Posts assigned the '${r}' category`),value:e};var r}),o.unshift({value:-1,label:"All posts in site"})),(0,i.createElement)(s.SelectControl,{label:"Add this Video to:",disabled:n,value:e.category,onChange:e=>t(e),options:o})}),Tt=r.p+"images/openvideologo.d7e568e7.png";r(8055);const Ct=/^https?:\/\/[\w.-]+\/(?:.*\/)?(v|video|playlist)\/[\w-]+\/?([\?&][\w-]+=[\w-]*)*$/,Rt=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"open-video/open-video-block","version":"0.1.0","title":"Open.Video Block","category":"embed","icon":"open-video-icon","description":"Open.Video Block for embedding videos","attributes":{"url":{"type":"string","default":""},"providerNameSlug":{"type":"string","default":""},"allowResponsive":{"type":"boolean","default":true},"responsive":{"type":"boolean","default":false},"previewable":{"type":"boolean","default":true},"floatOption":{"type":"number","default":1},"displayType":{"type":"string","default":"url"},"html":{"type":"string","default":""},"autoplay":{"type":"boolean","default":true},"loop":{"type":"boolean","default":false},"category":{"type":"string","default":""},"alignment":{"type":"string","default":"none"}},"supports":{"spacing":{"margin":true}},"textdomain":"open-video-block","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css"}'),Nt=()=>{const e={};for(const[t,r]of Object.entries(Rt.attributes))r.hasOwnProperty("default")&&(e[t]=r.default);return e},At={...Rt,edit:function({clientId:e,attributes:t,setAttributes:r}){const n="1",l="edit",p="preview",d="add_to_posts",h="skip_if_video_exists",y="replace_all_videos",b=(0,a.useBlockEditContext)(),g=(0,c.select)("core/editor");let v=null;g&&(v=g.getCurrentPost());let m=0,w=0,O=0,S=0;const{url:j,floatOption:E,html:_,category:x,autoplay:P}=t,[k,T]=(0,f.useState)(j),[C,R]=(0,f.useState)(E),[N,A]=(0,f.useState)(_),[D,B]=(0,f.useState)(P),[I,F]=(0,f.useState)(n),[M,L]=(0,f.useState)(x),[U,V]=(0,f.useState)(!1),[z,q]=(0,f.useState)(!1),[$,K]=(0,f.useState)(h),[W,H]=(0,f.useState)(0),[Y,J]=(0,f.useState)(!1),[X,G]=(0,f.useState)(0),[Q,Z]=(0,f.useState)(0),[ee,te]=(0,f.useState)(0),[re,ne]=(0,f.useState)(0),[oe,ie]=(0,f.useState)(0),[ae,se]=(0,f.useState)(!1),ce=()=>le(k),le=e=>Ct.test(e),[ue,fe]=(0,f.useState)(l);(0,f.useEffect)(()=>{if(!g)return;let t=0;const r=g.getBlocks();r.forEach((o,i)=>{"core/paragraph"===o.name&&t++,o.clientId===e&&(0===t?F("0"):1===t?F(n):2===t?F("2"):i<r.length/2?F("3"):F("4"))})},[]),(0,f.useEffect)(()=>{r({category:M})},[M]),(0,f.useEffect)(()=>{r({url:k}),le(k)?pe():se(!1)},[k]),(0,f.useEffect)(()=>{r({floatOption:C}),ce()&&pe()},[C]),(0,f.useEffect)(()=>{r({html:N})},[N]),(0,f.useEffect)(()=>{r({autoplay:D}),ce()&&pe()},[D]),(0,f.useEffect)(()=>{ie(0!==X?Math.floor((W+Q+ee+re)/X*100):0)},[W,Q,ee,re]);const pe=async()=>{let e="";if(k&&k.includes("/playlist")){if(e=(e=>{let t=e,r=k.split("/");if(!r)return;if(r=r[r.length-1].split("?"),!r)return;const n=r[0],o=(({autoplay:e=!1,floatOption:t=!0,videoId:r="",autoMatch:n=!1,startTime:o=0,width:i=640,height:a=360,preview:s=!1,embedCodeSource:c="w"}={})=>{const l={auto_play:e,float:t,width:i,height:a,embed_code_source:c};return r&&(l.videoId=r),o>0&&(l.time_start=o),s&&(l.preview=s),JSON.stringify(l)})({autoplay:!!D,floatOption:!!C,videoId:n});return o?t+o:void 0})("https://open.video/generate-embed-code?j="),!e)return void se(!1)}else{if(!k)return void se(!1);if(e=(()=>{let e="https://open.video/openvideo/oembed?url=";return e+=k?k.replace(/\/+$/,""):"",e+=`&float=${C}`,e+=`&autoplay=${D}`,e})(),!e)return void se(!1)}const t=await Pt({method:"get",url:e});if(t&&t.data){const e=t.data;e.html?A(e.html):A(e),e.provider_name?r({providerSlug:e.provider_name}):r({providerSlug:"Open.Video"}),se(!0)}else se(!1)},de=()=>{ce()&&fe(p)},he=()=>{ce()&&fe(d)};return(0,i.createElement)("div",{...(0,a.useBlockProps)()},(0,i.createElement)(a.BlockControls,null,(0,i.createElement)(a.BlockAlignmentToolbar,{value:t.alignment,onChange:e=>{r({alignment:e})},controls:["left","center","right"]})),ue===p&&""!=N&&(0,i.createElement)("div",{className:"preview-block"},(0,i.createElement)("div",{class:"preview-btn-group"},(0,i.createElement)("button",{onClick:()=>{fe(l)},"aria-label":"Edit Video Settings",style:{marginRight:"15px"}},"Edit"),(0,i.createElement)("button",{onClick:he},"Add to Other Posts")),(0,i.createElement)("iframe",{src:(()=>{let e=k?k.replace(/\/+$/,""):"",t=`https://open.video/embed?idFromURL=${encodeURIComponent(e)}&play_nextvid=0`;return D||(t+="&autoplay=0"),t})()}),(z||Y)&&(0,i.createElement)("div",{class:"propagate-notice"},z&&(0,i.createElement)(s.Animate,{type:"slide-in",options:{origin:"top"}},()=>(0,i.createElement)(s.Notice,{status:W>0?"success":"warning",isDismissible:!1},W>0&&(0,i.createElement)("p",null,(0,i.createElement)(s.Icon,{icon:"saved",className:"openvideoplugin-success"}),"Open.Video video added to ",(0,i.createElement)("strong",null,W)," other post",1===W?"":"s","!"),0===W&&(0,i.createElement)("p",null,(0,i.createElement)(s.Icon,{icon:"warning",className:"openvideoplugin-warning"}),"No Open.Video videos were added to other posts"),W!==X&&X>0&&(0,i.createElement)("ul",null,Q>0&&(0,i.createElement)("li",null,(0,i.createElement)("strong",null,Q)," post",1===Q?" was skipped because it already has":"s were skipped because they already have"," a Open.Video video"),ee>0&&(0,i.createElement)("li",null,(0,i.createElement)("strong",null,ee)," post",1===ee?"":"s"," did not have an appropriate location to add the video to"),re>0&&(0,i.createElement)("li",null,(0,i.createElement)("strong",null,re)," post",1===re?"":"s"," failed to update due to an internal error, please try again")))),Y&&(0,i.createElement)(s.Animate,{type:"slide-in",options:{origin:"top"}},()=>(0,i.createElement)(s.Notice,{status:"error",isDismissible:!1},(0,i.createElement)("p",null,(0,i.createElement)(s.Icon,{icon:"warning",className:"openvideoplugin-error"}),"There was an error adding the Open.Video video to other pages"))))),ue===l&&(0,i.createElement)("div",{className:"edit-block"},(0,i.createElement)("div",{style:{height:"35px",maxWidth:"150px",marginBottom:"20px"}},(0,i.createElement)("a",{href:"https://open.video/",target:"_blank"},(0,i.createElement)("img",{src:Tt}))),(0,i.createElement)("div",{style:{marginBottom:"18px"}}),(0,i.createElement)("div",null,(0,i.createElement)("p",{for:"open-video-url-input",style:{fontSize:"small",marginBottom:"20px"}},"Please provide a link to the video or playlist you'd like to serve on your website. You can easily copy the links from either ",(0,i.createElement)("a",{href:"https://app.open.video/videos",target:"_blank"},"Open.Video Studio")," or ",(0,i.createElement)("a",{href:"https://open.video",target:"_blank"},"Open.Video"),"."),(0,i.createElement)(s.TextControl,{id:"open-video-url-input",label:"Video or Playlist URL",value:k,placeholder:"Enter URL here",onChange:T})),(0,i.createElement)("hr",null),(0,i.createElement)("p",null,"Video Playback Settings"),(0,i.createElement)(s.CheckboxControl,{label:"Float",checked:E,onChange:e=>{R(e)}}),(0,i.createElement)(s.CheckboxControl,{label:"Auto Play",checked:P,onChange:e=>{B(e)}}),v&&(0,i.createElement)("span",null),(0,i.createElement)("div",{class:"openvideoplugin-btn-group"},(0,i.createElement)("button",{onClick:de,disabled:!ae},"Done"),(0,i.createElement)("button",{onClick:he,disabled:!ae},"Done & Add to Other Posts"))),(0,i.createElement)("div",{className:"edit-block",style:{display:ue===d?"block":"none"}},(0,i.createElement)("div",{style:{height:"35px",maxWidth:"150px",marginBottom:"20px"}},(0,i.createElement)("a",{href:"https://open.video/",target:"_blank"},(0,i.createElement)("img",{src:Tt}))),(0,i.createElement)("div",{style:{marginBottom:"15px"}},"Add this Open.Video Video to other posts in your site"),(0,i.createElement)("p",null,(0,i.createElement)(kt,{disabled:U,attributes:t,updateSelectedCategory:e=>{L(e)}})),(0,i.createElement)("p",null,(0,i.createElement)(s.SelectControl,{label:"Choose location in post to add this video:",disabled:U,onChange:e=>{F(e)},value:I,options:[{label:"Before 1st paragraph",value:"0"},{label:"Under 1st paragraph (recommended)",value:n},{label:"Under 2nd paragraph",value:"2"},{label:"Middle of page",value:"3"},{label:"Bottom of page",value:"4"}]})),(0,i.createElement)("p",null,(0,i.createElement)(s.RadioControl,{label:"If post already has one or more Open.Video Videos:",disabled:U,onChange:e=>{K(e)},selected:$,options:[{label:"Skip adding this video",value:h},{label:"Remove existing videos and add this one",value:y},{label:"Add this video without affecting other videos",value:"add_anyway"}]})),U&&X>0&&(0,i.createElement)(s.Notice,{status:"info",isDismissible:!1,className:"openvideoplugin-notice__loading"},(0,i.createElement)("p",null,(0,i.createElement)(s.Icon,{icon:"update",className:"openvideoplugin-loading openvideoplugin-info"}),(0,i.createElement)("span",null,"Adding video to ",(0,i.createElement)("strong",null,X)," posts... (",oe,"%)"))),(0,i.createElement)("div",{class:"openvideoplugin-btn-group"},(0,i.createElement)("button",{disabled:U,onClick:de,style:{backgroundColor:"white"}},"Cancel"),(0,i.createElement)("button",{disabled:U,onClick:async()=>{if(!N)return;if(U)return;m=0,w=0,O=0,S=0,te(0),ne(0),G(0),H(0),Z(0),V(!0);let e="/wp/v2/posts?context=edit";parseInt(M)>0&&(e+=`&categories=${M}`);const r=await u()({path:e,method:"GET"}).catch(e=>{console.error(e),((e=!1)=>{V(!1),q(!e),J(e),de(),setTimeout(()=>{q(!1),J(!1),H(0)},15e3)})(!0)});if(!Array.isArray(r))return void propagateBlockComplete(!0);const i=v.id,a=r.filter(e=>e.id!==i);G(a.length);let s=a.map(e=>{let r=((e,t)=>{const r=e.some(e=>"open-video/open-video-block"===e.name||!("core/shortcode"!==e.name||"string"!=typeof e.originalContent||!e.originalContent.includes("[open-video"))||!("string"!=typeof e.originalContent||!e.originalContent.includes('id="open-video-')));if($===h&&r)return w++,Z(w),!1;if($===y&&r){let t=[];e.forEach(e=>{"open-video/open-video-block"!==e.name&&("core/shortcode"===e.name&&"string"==typeof e.originalContent&&e.originalContent.includes("[open-video")||"string"==typeof e.originalContent&&e.originalContent.includes('id="open-video-')||t.push(e))}),e=[...t]}switch(I){case"0":return e.unshift(t),e;case n:let r=[],o=0;return e.forEach(e=>{r.push(e),"core/paragraph"===e.name&&o++,1===o&&r.push(t)}),r.length===e.length?(O++,te(O),!1):r;case"2":let i=[],a=0;return e.forEach(e=>{i.push(e),"core/paragraph"===e.name&&a++,2===a&&i.push(t)}),i.length===e.length?(O++,te(O),!1):i;case"3":let s=Math.floor(e.length/2);return e.splice(s,0,t),e;case"4":return e.push(t),e;default:return e}})((0,o.parse)(e.content.raw),(0,o.createBlock)(b.name,t));if(!r)return Promise.resolve();const i=(0,o.serialize)(r);return u()({path:`/wp/v2/posts/${e.id}`,method:"POST",data:{content:i}}).then(()=>{m++,H(m)}).catch(e=>{console.error(e),S++,ne(S)})});await Promise.all(s),propagateBlockComplete()}},"Add to Posts"))))},save:function({attributes:e}){const t=a.useBlockProps.save(),{html:r,alignment:n}=e;let o={justifyContent:"center"};return"left"===n?o.justifyContent="flex-start":"right"===n&&(o.justifyContent="flex-end"),(0,i.createElement)("div",{...t,style:o},(0,i.createElement)(f.RawHTML,null,r))},transforms:{from:[{type:"block",blocks:["core/embed"],isMatch:e=>Ct.test(e.url),transform(e){const t=Nt();return t.url=e.url,t.displayType="url",(0,o.createBlock)("open-video/open-video-block",t)},priority:2},{type:"raw",isMatch:e=>"P"===e.nodeName&&Ct.test(e.textContent),transform:e=>{const t=Nt();return t.url=e.textContent.trim(),t.displayType="url",(0,o.createBlock)("open-video/open-video-block",t)},priority:1}]}};(0,o.registerBlockType)(Rt.name,At)},346:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},361:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,r){var n=typeof e;return!!(r=null==r?9007199254740991:r)&&("number"==n||"symbol"!=n&&t.test(e))&&e>-1&&e%1==0&&e<r}},392:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},659:(e,t,r)=>{var n=r(1873),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,s=n?n.toStringTag:void 0;e.exports=function(e){var t=i.call(e,s),r=e[s];try{e[s]=void 0;var n=!0}catch(e){}var o=a.call(e);return n&&(t?e[s]=r:delete e[s]),o}},689:(e,t,r)=>{var n=r(2),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,r,i,a,s){var c=1&r,l=n(e),u=l.length;if(u!=n(t).length&&!c)return!1;for(var f=u;f--;){var p=l[f];if(!(c?p in t:o.call(t,p)))return!1}var d=s.get(e),h=s.get(t);if(d&&h)return d==t&&h==e;var y=!0;s.set(e,t),s.set(t,e);for(var b=c;++f<u;){var g=e[p=l[f]],v=t[p];if(i)var m=c?i(v,g,p,t,e,s):i(g,v,p,e,t,s);if(!(void 0===m?g===v||a(g,v,r,i,s):m)){y=!1;break}b||(b="constructor"==p)}if(y&&!b){var w=e.constructor,O=t.constructor;w==O||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&w instanceof w&&"function"==typeof O&&O instanceof O||(y=!1)}return s.delete(e),s.delete(t),y}},695:(e,t,r)=>{var n=r(8096),o=r(2428),i=r(6449),a=r(3656),s=r(361),c=r(7167),l=Object.prototype.hasOwnProperty;e.exports=function(e,t){var r=i(e),u=!r&&o(e),f=!r&&!u&&a(e),p=!r&&!u&&!f&&c(e),d=r||u||f||p,h=d?n(e.length,String):[],y=h.length;for(var b in e)!t&&!l.call(e,b)||d&&("length"==b||f&&("offset"==b||"parent"==b)||p&&("buffer"==b||"byteLength"==b||"byteOffset"==b)||s(b,y))||h.push(b);return h}},938:e=>{e.exports=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}},945:(e,t,r)=>{var n=r(79),o=r(8223),i=r(3661);e.exports=function(e,t){var r=this.__data__;if(r instanceof n){var a=r.__data__;if(!o||a.length<199)return a.push([e,t]),this.size=++r.size,this;r=this.__data__=new i(a)}return r.set(e,t),this.size=r.size,this}},1042:(e,t,r)=>{var n=r(6110)(Object,"create");e.exports=n},1175:(e,t,r)=>{var n=r(6025);e.exports=function(e,t){var r=this.__data__,o=n(r,e);return o<0?(++this.size,r.push([e,t])):r[o][1]=t,this}},1380:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},1420:(e,t,r)=>{var n=r(79);e.exports=function(){this.__data__=new n,this.size=0}},1459:e=>{e.exports=function(e){return this.__data__.has(e)}},1549:(e,t,r)=>{var n=r(2032),o=r(3862),i=r(6721),a=r(2749),s=r(5749);function c(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}c.prototype.clear=n,c.prototype.delete=o,c.prototype.get=i,c.prototype.has=a,c.prototype.set=s,e.exports=c},1609:e=>{"use strict";e.exports=window.React},1791:(e,t,r)=>{var n=r(6547),o=r(3360);e.exports=function(e,t,r,i){var a=!r;r||(r={});for(var s=-1,c=t.length;++s<c;){var l=t[s],u=i?i(r[l],e[l],l,r,e):void 0;void 0===u&&(u=e[l]),a?o(r,l,u):n(r,l,u)}return r}},1873:(e,t,r)=>{var n=r(9325).Symbol;e.exports=n},1882:(e,t,r)=>{var n=r(2552),o=r(3805);e.exports=function(e){if(!o(e))return!1;var t=n(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},1961:(e,t,r)=>{var n=r(9653);e.exports=function(e,t){var r=t?n(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}},1986:(e,t,r)=>{var n=r(1873),o=r(7828),i=r(5288),a=r(5911),s=r(317),c=r(4247),l=n?n.prototype:void 0,u=l?l.valueOf:void 0;e.exports=function(e,t,r,n,l,f,p){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!f(new o(e),new o(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return i(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var d=s;case"[object Set]":var h=1&n;if(d||(d=c),e.size!=t.size&&!h)return!1;var y=p.get(e);if(y)return y==t;n|=2,p.set(e,t);var b=a(d(e),d(t),n,l,f,p);return p.delete(e),b;case"[object Symbol]":if(u)return u.call(e)==u.call(t)}return!1}},2032:(e,t,r)=>{var n=r(1042);e.exports=function(){this.__data__=n?n(null):{},this.size=0}},2199:(e,t,r)=>{var n=r(4528),o=r(6449);e.exports=function(e,t,r){var i=t(e);return o(e)?i:n(i,r(e))}},2271:(e,t,r)=>{var n=r(1791),o=r(4664);e.exports=function(e,t){return n(e,o(e),t)}},2404:(e,t,r)=>{var n=r(270);e.exports=function(e,t){return n(e,t)}},2428:(e,t,r)=>{var n=r(7534),o=r(346),i=Object.prototype,a=i.hasOwnProperty,s=i.propertyIsEnumerable,c=n(function(){return arguments}())?n:function(e){return o(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=c},2552:(e,t,r)=>{var n=r(1873),o=r(659),i=r(9350),a=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?o(e):i(e)}},2651:(e,t,r)=>{var n=r(4218);e.exports=function(e,t){var r=e.__data__;return n(t)?r["string"==typeof t?"string":"hash"]:r.map}},2749:(e,t,r)=>{var n=r(1042),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return n?void 0!==t[e]:o.call(t,e)}},2804:(e,t,r)=>{var n=r(6110)(r(9325),"Promise");e.exports=n},2903:(e,t,r)=>{var n=r(3805),o=r(5527),i=r(181),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return i(e);var t=o(e),r=[];for(var s in e)("constructor"!=s||!t&&a.call(e,s))&&r.push(s);return r}},2949:(e,t,r)=>{var n=r(2651);e.exports=function(e,t){var r=n(this,e),o=r.size;return r.set(e,t),this.size+=r.size==o?0:1,this}},3007:e=>{e.exports=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}},3040:(e,t,r)=>{var n=r(1549),o=r(79),i=r(8223);e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(i||o),string:new n}}},3201:e=>{var t=/\w*$/;e.exports=function(e){var r=new e.constructor(e.source,t.exec(e));return r.lastIndex=e.lastIndex,r}},3243:(e,t,r)=>{var n=r(6110),o=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},3290:(e,t,r)=>{e=r.nmd(e);var n=r(9325),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o?n.Buffer:void 0,s=a?a.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var r=e.length,n=s?s(r):new e.constructor(r);return e.copy(n),n}},3345:e=>{e.exports=function(){return[]}},3349:(e,t,r)=>{var n=r(2199),o=r(6375),i=r(7241);e.exports=function(e){return n(e,i,o)}},3360:(e,t,r)=>{var n=r(3243);e.exports=function(e,t,r){"__proto__"==t&&n?n(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}},3605:e=>{e.exports=function(e){return this.__data__.get(e)}},3650:(e,t,r)=>{var n=r(4335)(Object.keys,Object);e.exports=n},3656:(e,t,r)=>{e=r.nmd(e);var n=r(9325),o=r(9935),i=t&&!t.nodeType&&t,a=i&&e&&!e.nodeType&&e,s=a&&a.exports===i?n.Buffer:void 0,c=(s?s.isBuffer:void 0)||o;e.exports=c},3661:(e,t,r)=>{var n=r(3040),o=r(7670),i=r(289),a=r(4509),s=r(2949);function c(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}c.prototype.clear=n,c.prototype.delete=o,c.prototype.get=i,c.prototype.has=a,c.prototype.set=s,e.exports=c},3702:e=>{e.exports=function(){this.__data__=[],this.size=0}},3729:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}},3736:(e,t,r)=>{var n=r(1873),o=n?n.prototype:void 0,i=o?o.valueOf:void 0;e.exports=function(e){return i?Object(i.call(e)):{}}},3805:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},3838:(e,t,r)=>{var n=r(1791),o=r(7241);e.exports=function(e,t){return e&&n(t,o(t),e)}},3862:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},4218:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},4247:e=>{e.exports=function(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}},4248:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}},4335:e=>{e.exports=function(e,t){return function(r){return e(t(r))}}},4509:(e,t,r)=>{var n=r(2651);e.exports=function(e){return n(this,e).has(e)}},4528:e=>{e.exports=function(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}},4664:(e,t,r)=>{var n=r(9770),o=r(3345),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(e){return null==e?[]:(e=Object(e),n(a(e),function(t){return i.call(e,t)}))}:o;e.exports=s},4733:(e,t,r)=>{var n=r(1791),o=r(5950);e.exports=function(e,t){return e&&n(t,o(t),e)}},4739:(e,t,r)=>{var n=r(6025);e.exports=function(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}},4840:(e,t,r)=>{var n="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g;e.exports=n},4894:(e,t,r)=>{var n=r(1882),o=r(294);e.exports=function(e){return null!=e&&o(e.length)&&!n(e)}},4901:(e,t,r)=>{var n=r(2552),o=r(294),i=r(346),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,e.exports=function(e){return i(e)&&o(e.length)&&!!a[n(e)]}},5083:(e,t,r)=>{var n=r(1882),o=r(7296),i=r(3805),a=r(7473),s=/^\[object .+?Constructor\]$/,c=Function.prototype,l=Object.prototype,u=c.toString,f=l.hasOwnProperty,p=RegExp("^"+u.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||o(e))&&(n(e)?p:s).test(a(e))}},5288:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},5481:(e,t,r)=>{var n=r(9325)["__core-js_shared__"];e.exports=n},5527:e=>{var t=Object.prototype;e.exports=function(e){var r=e&&e.constructor;return e===("function"==typeof r&&r.prototype||t)}},5529:(e,t,r)=>{var n=r(9344),o=r(8879),i=r(5527);e.exports=function(e){return"function"!=typeof e.constructor||i(e)?{}:n(o(e))}},5580:(e,t,r)=>{var n=r(6110)(r(9325),"DataView");e.exports=n},5749:(e,t,r)=>{var n=r(1042);e.exports=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=n&&void 0===t?"__lodash_hash_undefined__":t,this}},5861:(e,t,r)=>{var n=r(5580),o=r(8223),i=r(2804),a=r(6545),s=r(8303),c=r(2552),l=r(7473),u="[object Map]",f="[object Promise]",p="[object Set]",d="[object WeakMap]",h="[object DataView]",y=l(n),b=l(o),g=l(i),v=l(a),m=l(s),w=c;(n&&w(new n(new ArrayBuffer(1)))!=h||o&&w(new o)!=u||i&&w(i.resolve())!=f||a&&w(new a)!=p||s&&w(new s)!=d)&&(w=function(e){var t=c(e),r="[object Object]"==t?e.constructor:void 0,n=r?l(r):"";if(n)switch(n){case y:return h;case b:return u;case g:return f;case v:return p;case m:return d}return t}),e.exports=w},5911:(e,t,r)=>{var n=r(8859),o=r(4248),i=r(9219);e.exports=function(e,t,r,a,s,c){var l=1&r,u=e.length,f=t.length;if(u!=f&&!(l&&f>u))return!1;var p=c.get(e),d=c.get(t);if(p&&d)return p==t&&d==e;var h=-1,y=!0,b=2&r?new n:void 0;for(c.set(e,t),c.set(t,e);++h<u;){var g=e[h],v=t[h];if(a)var m=l?a(v,g,h,t,e,c):a(g,v,h,e,t,c);if(void 0!==m){if(m)continue;y=!1;break}if(b){if(!o(t,function(e,t){if(!i(b,t)&&(g===e||s(g,e,r,a,c)))return b.push(t)})){y=!1;break}}else if(g!==v&&!s(g,v,r,a,c)){y=!1;break}}return c.delete(e),c.delete(t),y}},5950:(e,t,r)=>{var n=r(695),o=r(8984),i=r(4894);e.exports=function(e){return i(e)?n(e):o(e)}},6009:(e,t,r)=>{e=r.nmd(e);var n=r(4840),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o&&n.process,s=function(){try{return i&&i.require&&i.require("util").types||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=s},6025:(e,t,r)=>{var n=r(5288);e.exports=function(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}},6038:(e,t,r)=>{var n=r(5861),o=r(346);e.exports=function(e){return o(e)&&"[object Set]"==n(e)}},6110:(e,t,r)=>{var n=r(5083),o=r(392);e.exports=function(e,t){var r=o(e,t);return n(r)?r:void 0}},6169:(e,t,r)=>{var n=r(9653);e.exports=function(e,t){var r=t?n(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}},6189:e=>{var t=Object.prototype.hasOwnProperty;e.exports=function(e){var r=e.length,n=new e.constructor(r);return r&&"string"==typeof e[0]&&t.call(e,"index")&&(n.index=e.index,n.input=e.input),n}},6375:(e,t,r)=>{var n=r(4528),o=r(8879),i=r(4664),a=r(3345),s=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)n(t,i(e)),e=o(e);return t}:a;e.exports=s},6449:e=>{var t=Array.isArray;e.exports=t},6545:(e,t,r)=>{var n=r(6110)(r(9325),"Set");e.exports=n},6547:(e,t,r)=>{var n=r(3360),o=r(5288),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,r){var a=e[t];i.call(e,t)&&o(a,r)&&(void 0!==r||t in e)||n(e,t,r)}},6628:function(e,t,r){var n;n=e=>(()=>{var t={865:e=>{"use strict";e.exports=function(e,t){var r=e.filter(t);return 0!==r.length&&r.length!==e.length}},703:(e,t,r)=>{"use strict";var n=r(414);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,r,o,i,a){if(a!==n){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return r.PropTypes=r,r}},697:(e,t,r)=>{e.exports=r(703)()},414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},385:function(e,t,r){var n;n=function(e){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}return r.m=e,r.c=t,r.p="",r(0)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function i(e){return e&&e.__esModule?e:{default:e}}var a=r(8),s=i(a),c=i(r(6)),l=i(r(2)),u=r(1),f=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,r){for(var n=!0;n;){var o=e,i=t,a=r;n=!1,null===o&&(o=Function.prototype);var s=Object.getOwnPropertyDescriptor(o,i);if(void 0!==s){if("value"in s)return s.value;var c=s.get;if(void 0===c)return;return c.call(a)}var l=Object.getPrototypeOf(o);if(null===l)return;e=l,t=i,r=a,n=!0,s=l=void 0}}(Object.getPrototypeOf(t.prototype),"constructor",this).call(this),this.state={showLoader:!1,lastScrollTop:0,actionTriggered:!1,pullToRefreshThresholdBreached:!1},this.startY=0,this.currentY=0,this.dragging=!1,this.maxPullDownDistance=0,this.onScrollListener=this.onScrollListener.bind(this),this.throttledOnScrollListener=(0,l.default)(this.onScrollListener,150).bind(this),this.onStart=this.onStart.bind(this),this.onMove=this.onMove.bind(this),this.onEnd=this.onEnd.bind(this),this.getScrollableTarget=this.getScrollableTarget.bind(this)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"componentDidMount",value:function(){if(this._scrollableNode=this.getScrollableTarget(),this.el=this.props.height?this._infScroll:this._scrollableNode||window,this.el.addEventListener("scroll",this.throttledOnScrollListener),"number"==typeof this.props.initialScrollY&&this.el.scrollHeight>this.props.initialScrollY&&this.el.scrollTo(0,this.props.initialScrollY),this.props.pullDownToRefresh&&(this.el.addEventListener("touchstart",this.onStart),this.el.addEventListener("touchmove",this.onMove),this.el.addEventListener("touchend",this.onEnd),this.el.addEventListener("mousedown",this.onStart),this.el.addEventListener("mousemove",this.onMove),this.el.addEventListener("mouseup",this.onEnd),this.maxPullDownDistance=this._pullDown.firstChild.getBoundingClientRect().height,this.forceUpdate(),"function"!=typeof this.props.refreshFunction))throw new Error('Mandatory prop "refreshFunction" missing.\n          Pull Down To Refresh functionality will not work\n          as expected. Check README.md for usage\'')}},{key:"componentWillUnmount",value:function(){this.el.removeEventListener("scroll",this.throttledOnScrollListener),this.props.pullDownToRefresh&&(this.el.removeEventListener("touchstart",this.onStart),this.el.removeEventListener("touchmove",this.onMove),this.el.removeEventListener("touchend",this.onEnd),this.el.removeEventListener("mousedown",this.onStart),this.el.removeEventListener("mousemove",this.onMove),this.el.removeEventListener("mouseup",this.onEnd))}},{key:"componentWillReceiveProps",value:function(e){this.props.key===e.key&&this.props.dataLength===e.dataLength||this.setState({showLoader:!1,actionTriggered:!1,pullToRefreshThresholdBreached:!1})}},{key:"getScrollableTarget",value:function(){return this.props.scrollableTarget instanceof HTMLElement?this.props.scrollableTarget:"string"==typeof this.props.scrollableTarget?document.getElementById(this.props.scrollableTarget):(null===this.props.scrollableTarget&&console.warn("You are trying to pass scrollableTarget but it is null. This might\n        happen because the element may not have been added to DOM yet.\n        See https://github.com/ankeetmaini/react-infinite-scroll-component/issues/59 for more info.\n      "),null)}},{key:"onStart",value:function(e){this.state.lastScrollTop||(this.dragging=!0,this.startY=e.pageY||e.touches[0].pageY,this.currentY=this.startY,this._infScroll.style.willChange="transform",this._infScroll.style.transition="transform 0.2s cubic-bezier(0,0,0.31,1)")}},{key:"onMove",value:function(e){this.dragging&&(this.currentY=e.pageY||e.touches[0].pageY,this.currentY<this.startY||(this.currentY-this.startY>=this.props.pullDownToRefreshThreshold&&this.setState({pullToRefreshThresholdBreached:!0}),this.currentY-this.startY>1.5*this.maxPullDownDistance||(this._infScroll.style.overflow="visible",this._infScroll.style.transform="translate3d(0px, "+(this.currentY-this.startY)+"px, 0px)")))}},{key:"onEnd",value:function(e){var t=this;this.startY=0,this.currentY=0,this.dragging=!1,this.state.pullToRefreshThresholdBreached&&this.props.refreshFunction&&this.props.refreshFunction(),requestAnimationFrame(function(){t._infScroll&&(t._infScroll.style.overflow="auto",t._infScroll.style.transform="none",t._infScroll.style.willChange="none")})}},{key:"isElementAtBottom",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?.8:arguments[1],r=e===document.body||e===document.documentElement?window.screen.availHeight:e.clientHeight,n=(0,u.parseThreshold)(t);return n.unit===u.ThresholdUnits.Pixel?e.scrollTop+r>=e.scrollHeight-n.value:e.scrollTop+r>=n.value/100*e.scrollHeight}},{key:"onScrollListener",value:function(e){var t=this;"function"==typeof this.props.onScroll&&setTimeout(function(){return t.props.onScroll(e)},0);var r=this.props.height||this._scrollableNode?e.target:document.documentElement.scrollTop?document.documentElement:document.body;this.state.actionTriggered||(this.isElementAtBottom(r,this.props.scrollThreshold)&&this.props.hasMore&&(this.setState({actionTriggered:!0,showLoader:!0}),this.props.next()),this.setState({lastScrollTop:r.scrollTop}))}},{key:"render",value:function(){var e=this,t=n({height:this.props.height||"auto",overflow:"auto",WebkitOverflowScrolling:"touch"},this.props.style),r=this.props.hasChildren||!(!this.props.children||!this.props.children.length),o=this.props.pullDownToRefresh&&this.props.height?{overflow:"auto"}:{};return s.default.createElement("div",{style:o},s.default.createElement("div",{className:"infinite-scroll-component "+(this.props.className||""),ref:function(t){return e._infScroll=t},style:t},this.props.pullDownToRefresh&&s.default.createElement("div",{style:{position:"relative"},ref:function(t){return e._pullDown=t}},s.default.createElement("div",{style:{position:"absolute",left:0,right:0,top:-1*this.maxPullDownDistance}},!this.state.pullToRefreshThresholdBreached&&this.props.pullDownToRefreshContent,this.state.pullToRefreshThresholdBreached&&this.props.releaseToRefreshContent)),this.props.children,!this.state.showLoader&&!r&&this.props.hasMore&&this.props.loader,this.state.showLoader&&this.props.hasMore&&this.props.loader,!this.props.hasMore&&this.props.endMessage))}}]),t}(a.Component);t.default=f,f.defaultProps={pullDownToRefreshContent:s.default.createElement("h3",null,"Pull down to refresh"),releaseToRefreshContent:s.default.createElement("h3",null,"Release to refresh"),pullDownToRefreshThreshold:100,disableBrowserPullToRefresh:!0},f.propTypes={next:c.default.func,hasMore:c.default.bool,children:c.default.node,loader:c.default.node.isRequired,scrollThreshold:c.default.oneOfType([c.default.number,c.default.string]),endMessage:c.default.node,style:c.default.object,height:c.default.number,scrollableTarget:c.default.node,hasChildren:c.default.bool,pullDownToRefresh:c.default.bool,pullDownToRefreshContent:c.default.node,releaseToRefreshContent:c.default.node,pullDownToRefreshThreshold:c.default.number,refreshFunction:c.default.func,onScroll:c.default.func,dataLength:c.default.number.isRequired,key:c.default.string},e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseThreshold=function(e){return"number"==typeof e?{unit:r.Percent,value:100*e}:"string"==typeof e?e.match(/^(\d*(\.\d+)?)px$/)?{unit:r.Pixel,value:parseFloat(e)}:e.match(/^(\d*(\.\d+)?)%$/)?{unit:r.Percent,value:parseFloat(e)}:(console.warn('scrollThreshold format is invalid. Valid formats: "120px", "50%"...'),n):(console.warn("scrollThreshold should be string or number"),n)};var r={Pixel:"Pixel",Percent:"Percent"};t.ThresholdUnits=r;var n={unit:r.Percent,value:.8}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){var n,o;return t||(t=250),function(){var i=r||this,a=+new Date,s=arguments;n&&a<n+t?(clearTimeout(o),o=setTimeout(function(){n=a,e.apply(i,s)},t)):(n=a,e.apply(i,s))}},e.exports=t.default},function(e,t){"use strict";function r(e){return function(){return e}}var n=function(){};n.thatReturns=r,n.thatReturnsFalse=r(!1),n.thatReturnsTrue=r(!0),n.thatReturnsNull=r(null),n.thatReturnsThis=function(){return this},n.thatReturnsArgument=function(e){return e},e.exports=n},function(e,t,r){"use strict";e.exports=function(e,t,r,n,o,i,a,s){if(!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[r,n,o,i,a,s],u=0;(c=new Error(t.replace(/%s/g,function(){return l[u++]}))).name="Invariant Violation"}throw c.framesToPop=1,c}}},function(e,t,r){"use strict";var n=r(3),o=r(4),i=r(7);e.exports=function(){function e(e,t,r,n,a,s){s!==i&&o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t};return r.checkPropTypes=n,r.PropTypes=r,r}},function(e,t,r){e.exports=r(5)()},function(e,t){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(t,r){t.exports=e}])},e.exports=n(r(787))},787:t=>{"use strict";t.exports=e}},r={};function n(e){var o=r[e];if(void 0!==o)return o.exports;var i=r[e]={exports:{}};return t[e].call(i.exports,i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return(()=>{"use strict";n.r(o),n.d(o,{default:()=>qt});var e=n(697),t=n.n(e),r=n(787),i=n.n(r);const a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).reduce(function(t,r){return t["data-".concat(function(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}(r))]=e[r],t},{})},s=function(e){return!e||Array.isArray(e)&&!e.length};var c,l;const u=(c=1,l=new WeakMap,{get:function(e){return l.has(e)||l.set(e,c++),"".concat("rdts").concat(l.get(e))},reset:function(){l=new WeakMap,c=1}}),f=function(e,t,r){if(Array.prototype.findIndex)return e.findIndex(t,r);if(!e)throw new TypeError("findIndex called on null or undefined");if("function"!=typeof t)throw new TypeError("findIndex predicate must be a function");for(var n=0;n<e.length;n++){var o=e[n];if(t.call(r,o,n,e))return n}return-1};function p(e,t){var r=function(e){return e?"#"===e[0]?{"aria-labelledby":e.substring(1).replace(/ #/g," ")}:{"aria-label":e}:{}}(e);return t&&(r["aria-labelledby"]="".concat(r["aria-labelledby"]||""," ").concat(t).trim()),r}function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function h(){return h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},h.apply(this,arguments)}function y(e,t){return y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},y(e,t)}function b(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}function v(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y(e,t)}(s,e);var t,r,n,o,a=(n=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,t=g(n);if(o){var r=g(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===d(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return b(e)}(this,e)});function s(e){var t,r,n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),v(b(t=a.call(this,e)),"handleInputChange",function(e){e.persist(),t.delayedCallback(e)}),t.delayedCallback=(r=function(e){return t.props.onInputChange(e.target.value)},function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];var i=!n;clearTimeout(n),n=setTimeout(function(){n=null,r.apply(void 0,t)},300),i&&r.apply(void 0,t)}),t}return t=s,(r=[{key:"render",value:function(){var e=this.props,t=e.inputRef,r=e.texts,n=void 0===r?{}:r,o=e.onFocus,a=e.onBlur,s=e.disabled,c=e.readOnly,l=e.onKeyDown,u=e.activeDescendant,f=e.inlineSearchInput;return i().createElement("input",h({type:"text",disabled:s,ref:t,className:"search",placeholder:f?n.inlineSearchPlaceholder||"Search...":n.placeholder||"Choose...",onKeyDown:l,onChange:this.handleInputChange,onFocus:o,onBlur:a,readOnly:c,"aria-activedescendant":u,"aria-autocomplete":l?"list":void 0},p(n.label)))}}])&&function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),s}(r.PureComponent);v(m,"propTypes",{tags:t().array,texts:t().object,onInputChange:t().func,onFocus:t().func,onBlur:t().func,onTagRemove:t().func,onKeyDown:t().func,inputRef:t().func,disabled:t().bool,readOnly:t().bool,activeDescendant:t().string,inlineSearchInput:t().bool});const w=m;function O(e){return O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},O(e)}function S(e,t){return S=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},S(e,t)}function j(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function E(e){return E=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},E(e)}function _(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var x=function(e){return"".concat(e,"_tag")},P=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&S(e,t)}(s,e);var t,r,n,o,a=(n=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,t=E(n);if(o){var r=E(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===O(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return j(e)}(this,e)});function s(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return _(j(e=a.call.apply(a,[this].concat(r))),"handleClick",function(t){var r=e.props,n=r.id,o=r.onDelete;t.stopPropagation(),t.nativeEvent.stopImmediatePropagation(),o(n,void 0!==(t.key||t.keyCode))}),_(j(e),"onKeyDown",function(t){"Backspace"===t.key&&(e.handleClick(t),t.preventDefault())}),_(j(e),"onKeyUp",function(t){(32===t.keyCode||["Delete","Enter"].indexOf(t.key)>-1)&&(e.handleClick(t),t.preventDefault())}),e}return t=s,(r=[{key:"render",value:function(){var e=this.props,t=e.id,r=e.label,n=e.labelRemove,o=void 0===n?"Remove":n,a=e.readOnly,s=e.disabled,c=x(t),l="".concat(t,"_button"),u=["tag-remove",a&&"readOnly",s&&"disabled"].filter(Boolean).join(" "),f=a||s;return i().createElement("span",{className:"tag",id:c,"aria-label":r},r,i().createElement("button",{id:l,onClick:f?void 0:this.handleClick,onKeyDown:f?void 0:this.onKeyDown,onKeyUp:f?void 0:this.onKeyUp,className:u,type:"button","aria-label":o,"aria-labelledby":"".concat(l," ").concat(c),"aria-disabled":f},"x"))}}])&&function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),s}(r.PureComponent);_(P,"propTypes",{id:t().string.isRequired,label:t().string.isRequired,onDelete:t().func,readOnly:t().bool,disabled:t().bool,labelRemove:t().string});const k=P;function T(e){return T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},T(e)}function C(e,t){return C=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},C(e,t)}function R(e){return R=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},R(e)}function N(){return N=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},N.apply(this,arguments)}var A,D,B,I=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&C(e,t)}(c,e);var t,r,n,o,s=(n=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,t=R(n);if(o){var r=R(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===T(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function c(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),s.apply(this,arguments)}return t=c,r=[{key:"render",value:function(){var e=this.props,t=e.tags,r=e.onTagRemove,n=e.texts,o=void 0===n?{}:n,s=e.disabled,c=e.readOnly,l=e.children||i().createElement("span",{className:"placeholder"},o.placeholder||"Choose...");return i().createElement("ul",{className:"tag-list"},function(){var e=arguments.length>1?arguments[1]:void 0,t=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,n=arguments.length>4?arguments[4]:void 0;return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map(function(o){var s=o._id,c=o.label,l=o.tagClassName,u=o.dataset,f=o.tagLabel;return i().createElement("li",N({className:["tag-item",l].filter(Boolean).join(" "),key:"tag-item-".concat(s)},a(u)),i().createElement(k,{label:f||c,id:s,onDelete:e,readOnly:t,disabled:r||o.disabled,labelRemove:n}))})}(t,r,c,s,o.labelRemove),i().createElement("li",{className:"tag-item"},l))}}],r&&function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),c}(r.PureComponent);A=I,D="propTypes",B={tags:t().array,onTagRemove:t().func,readOnly:t().bool,disabled:t().bool,texts:t().object,children:t().node},D in A?Object.defineProperty(A,D,{value:B,enumerable:!0,configurable:!0,writable:!0}):A[D]=B;const F=I;function M(e){return M="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},M(e)}function L(){return L=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},L.apply(this,arguments)}function U(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function V(e,t){return V=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},V(e,t)}function z(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function q(e){return q=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},q(e)}function $(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var K=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&V(e,t)}(s,e);var t,r,n,o,a=(n=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,t=q(n);if(o){var r=q(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===M(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return z(e)}(this,e)});function s(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return $(z(e=a.call.apply(a,[this].concat(r))),"getAriaAttributes",function(){var t=e.props,r=t.mode,n=t.texts,o=void 0===n?{}:n,i=t.showDropdown,a=t.clientId,s=t.tags,c="".concat(a,"_trigger"),l=[],u=p(o.label);return s&&s.length&&(u["aria-label"]&&l.push(c),s.forEach(function(e){l.push(x(e._id))}),u=p(o.label,l.join(" "))),function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?U(Object(r),!0).forEach(function(t){$(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):U(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({id:c,role:"button",tabIndex:e.props.tabIndex,"aria-haspopup":"simpleSelect"===r?"listbox":"tree","aria-expanded":i?"true":"false"},u)}),$(z(e),"handleTrigger",function(t){t.key&&13!==t.keyCode&&32!==t.keyCode&&40!==t.keyCode||t.key&&e.triggerNode&&e.triggerNode!==document.activeElement||(e.props.showDropdown||32!==t.keyCode||t.preventDefault(),e.props.onTrigger(t))}),e}return t=s,(r=[{key:"render",value:function(){var e=this,t=this.props,r=t.disabled,n=t.readOnly,o=t.showDropdown,a=["dropdown-trigger","arrow",r&&"disabled",n&&"readOnly",o&&"top",!o&&"bottom"].filter(Boolean).join(" ");return i().createElement("a",L({ref:function(t){e.triggerNode=t},className:a,onClick:r?void 0:this.handleTrigger,onKeyDown:r?void 0:this.handleTrigger},this.getAriaAttributes()),this.props.children)}}])&&function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),s}(r.PureComponent);$(K,"propTypes",{onTrigger:t().func,disabled:t().bool,readOnly:t().bool,showDropdown:t().bool,mode:t().oneOf(["multiSelect","simpleSelect","radioSelect","hierarchical"]),texts:t().object,clientId:t().string,tags:t().array,tabIndex:t().number});const W=K;var H=n(385),Y=n.n(H);function J(e){return J="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},J(e)}function X(e,t){return X=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},X(e,t)}function G(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Q(e){return Q=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Q(e)}function Z(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var ee=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&X(e,t)}(s,e);var t,r,n,o,a=(n=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,t=Q(n);if(o){var r=Q(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===J(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return G(e)}(this,e)});function s(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Z(G(e=a.call.apply(a,[this].concat(r))),"handleClick",function(){var t=e.props,r=t.onAction,n=t.actionData;r&&r(n.nodeId,n.action)}),e}return t=s,(r=[{key:"render",value:function(){var e=this.props,t=e.title,r=e.className,n=e.text,o=e.readOnly;return i().createElement("i",{title:t,className:r,onClick:o?void 0:this.handleClick},n)}}])&&function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),s}(r.PureComponent);Z(ee,"propTypes",{title:t().string,text:t().string,className:t().string,actionData:t().object,onAction:t().func,readOnly:t().bool}),Z(ee,"defaultProps",{onAction:function(){}});const te=ee;function re(e){return re="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},re(e)}var ne=["actions","id"];function oe(){return oe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},oe.apply(this,arguments)}function ie(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function ae(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ie(Object(r),!0).forEach(function(t){le(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ie(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function se(e,t){return se=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},se(e,t)}function ce(e){return ce=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},ce(e)}function le(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var ue=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&se(e,t)}(c,e);var t,r,n,o,a=(n=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,t=ce(n);if(o){var r=ce(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===re(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function c(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),a.apply(this,arguments)}return t=c,(r=[{key:"render",value:function(){var e=this.props,t=e.actions,r=e.id,n=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,ne);return s(t)?null:t.map(function(e,t){var o=e.id||"action-".concat(t);return i().createElement(te,oe({key:o},n,e,{actionData:{action:ae(ae({},e),{},{id:o}),nodeId:r}}))})}}])&&function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),c}(r.PureComponent);le(ue,"propTypes",{id:t().string.isRequired,actions:t().array});const fe=ue;function pe(e){return pe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pe(e)}var de=["checked","indeterminate","onChange","disabled","readOnly"];function he(){return he=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},he.apply(this,arguments)}function ye(e,t){return ye=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},ye(e,t)}function be(e){return be=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},be(e)}var ge=function(e){var t=e.checked,r=e.indeterminate;return function(e){e&&(e.checked=t,e.indeterminate=r)}},ve=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ye(e,t)}(s,e);var t,r,n,o,a=(n=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,t=be(n);if(o){var r=be(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===pe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function s(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return t=s,(r=[{key:"render",value:function(){var e=this.props,t=e.checked,r=e.indeterminate,n=void 0!==r&&r,o=e.onChange,a=e.disabled,s=e.readOnly,c=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,de),l=a||s;return i().createElement("input",he({type:"checkbox",ref:ge({checked:t,indeterminate:n}),onChange:o,disabled:l},c))}}])&&function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),s}(r.PureComponent);!function(e,t,r){t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}(ve,"propTypes",{checked:t().bool,indeterminate:t().bool,onChange:t().func,disabled:t().bool,readOnly:t().bool});const me=ve;function we(e){return we="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},we(e)}var Oe=["name","checked","onChange","disabled","readOnly"];function Se(){return Se=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Se.apply(this,arguments)}function je(e,t){return je=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},je(e,t)}function Ee(e){return Ee=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Ee(e)}var _e=function(e){var t=e.checked;return function(e){e&&(e.checked=t)}},xe=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&je(e,t)}(s,e);var t,r,n,o,a=(n=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,t=Ee(n);if(o){var r=Ee(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===we(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function s(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return t=s,(r=[{key:"render",value:function(){var e=this.props,t=e.name,r=e.checked,n=e.onChange,o=e.disabled,a=e.readOnly,s=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,Oe),c=o||a;return i().createElement("input",Se({type:"radio",name:t,ref:_e({checked:r}),onChange:n,disabled:c},s))}}])&&function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),s}(r.PureComponent);!function(e,t,r){t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}(xe,"propTypes",{name:t().string.isRequired,checked:t().bool,onChange:t().func,disabled:t().bool,readOnly:t().bool});const Pe=xe;function ke(e){return ke="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ke(e)}function Te(){return Te=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Te.apply(this,arguments)}function Ce(e,t){return Ce=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Ce(e,t)}function Re(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ne(e){return Ne=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Ne(e)}function Ae(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var De=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ce(e,t)}(s,e);var t,r,n,o,a=(n=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,t=Ne(n);if(o){var r=Ne(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===ke(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Re(e)}(this,e)});function s(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Ae(Re(e=a.call.apply(a,[this].concat(r))),"handleCheckboxChange",function(t){var r=e.props,n=r.mode,o=r.id;(0,r.onCheckboxChange)(o,"simpleSelect"===n||"radioSelect"===n||t.target.checked),t.stopPropagation(),t.nativeEvent.stopImmediatePropagation()}),e}return t=s,r=[{key:"render",value:function(){var e=this.props,t=e.mode,r=e.title,n=e.label,o=e.id,a=e.partial,s=e.checked,c=this.props,l=c.value,u=c.disabled,f=c.showPartiallySelected,p=c.readOnly,d=c.clientId,h={className:"node-label"};"simpleSelect"===t&&!p&&!u&&(h.onClick=this.handleCheckboxChange);var y={id:o,value:l,checked:s,disabled:u,readOnly:p,tabIndex:-1},b=["checkbox-item","simpleSelect"===t&&"simple-select"].filter(Boolean).join(" ");return i().createElement("label",{title:r||n,htmlFor:o},"radioSelect"===t?i().createElement(Pe,Te({name:d,className:"radio-item",onChange:this.handleCheckboxChange},y)):i().createElement(me,Te({name:o,className:b,indeterminate:f&&a,onChange:this.handleCheckboxChange},y)),i().createElement("span",h,n))}}],r&&function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),s}(r.PureComponent);Ae(De,"propTypes",{id:t().string.isRequired,actions:t().array,title:t().string,label:t().string.isRequired,value:t().string.isRequired,checked:t().bool,partial:t().bool,disabled:t().bool,dataset:t().object,mode:t().oneOf(["multiSelect","simpleSelect","radioSelect","hierarchical"]),showPartiallySelected:t().bool,onCheckboxChange:t().func,readOnly:t().bool,clientId:t().string});const Be=De;function Ie(e){return Ie="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ie(e)}function Fe(e,t){return Fe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Fe(e,t)}function Me(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Le(e){return Le=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Le(e)}function Ue(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Ve=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Fe(e,t)}(s,e);var t,r,n,o,a=(n=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,t=Le(n);if(o){var r=Le(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Ie(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Me(e)}(this,e)});function s(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Ue(Me(e=a.call.apply(a,[this].concat(r))),"onToggle",function(t){t.stopPropagation(),t.nativeEvent.stopImmediatePropagation(),e.props.onNodeToggle(e.props.id)}),Ue(Me(e),"onKeyDown",function(t){"Enter"!==t.key&&32!==t.keyCode||(e.props.onNodeToggle(e.props.id),t.preventDefault())}),e}return t=s,r=[{key:"render",value:function(){var e=this.props,t=e.expanded,r=e.isLeaf,n=["toggle",t&&"expanded",!t&&"collapsed"].filter(Boolean).join(" ");return r?i().createElement("i",{role:"button",tabIndex:-1,className:n,style:{visibility:"hidden"},"aria-hidden":!0}):i().createElement("i",{role:"button",tabIndex:-1,className:n,onClick:this.onToggle,onKeyDown:this.onKeyDown,"aria-hidden":!0})}}],r&&function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),s}(r.PureComponent);Ue(Ve,"propTypes",{expanded:t().bool,isLeaf:t().bool,onNodeToggle:t().func,id:t().string});const ze=Ve;function qe(e){return qe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qe(e)}function $e(){return $e=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},$e.apply(this,arguments)}function Ke(e,t){return Ke=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Ke(e,t)}function We(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function He(e){return He=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},He(e)}function Ye(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Je=function(e){return s(e)},Xe=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ke(e,t)}(c,e);var t,r,n,o,s=(n=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,t=He(n);if(o){var r=He(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===qe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return We(e)}(this,e)});function c(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Ye(We(e=s.call.apply(s,[this].concat(r))),"getAriaAttributes",function(){var t=e.props,r=t._children,n=t._depth,o=t.checked,i=t.disabled,a=t.expanded,s=t.readOnly,c=t.mode,l=t.partial,u={};return u.role="simpleSelect"===c?"option":"treeitem",u["aria-disabled"]=i||s,u["aria-selected"]=o,"simpleSelect"!==c&&(u["aria-checked"]=l?"mixed":o,u["aria-level"]=(n||0)+1,u["aria-expanded"]=r&&(a?"true":"false")),u}),e}return t=c,r=[{key:"render",value:function(){var e=this.props,t=e.mode,r=e.keepTreeOnSearch,n=e._id,o=e._children,s=e.dataset,c=e._depth,l=e.expanded,u=e.title,f=e.label,p=e.partial,d=e.checked,h=e.value,y=e.disabled,b=e.actions,g=e.onAction,v=e.searchModeOn,m=e.onNodeToggle,w=e.onCheckboxChange,O=e.showPartiallySelected,S=e.readOnly,j=e.clientId,E=function(e){var t=e.keepTreeOnSearch,r=e.keepChildrenOnSearch,n=e._children,o=e.matchInChildren,i=e.matchInParent,a=e.disabled,s=e.partial,c=e.hide,l=e.className,u=e.showPartiallySelected,f=e.readOnly,p=e.checked,d=e._focused;return["node",Je(n)&&"leaf",!Je(n)&&"tree",a&&"disabled",c&&"hide",t&&o&&"match-in-children",t&&r&&i&&"match-in-parent",u&&s&&"partial",f&&"readOnly",p&&"checked",d&&"focused",l].filter(Boolean).join(" ")}(this.props),_=r||!v?{paddingLeft:"".concat(20*(c||0),"px")}:{},x="".concat(n,"_li");return i().createElement("li",$e({className:E,style:_,id:x},a(s),this.getAriaAttributes()),i().createElement(ze,{isLeaf:Je(o),expanded:l,id:n,onNodeToggle:m}),i().createElement(Be,{title:u,label:f,id:n,partial:p,checked:d,value:h,disabled:y,mode:t,onCheckboxChange:w,showPartiallySelected:O,readOnly:S,clientId:j}),i().createElement(fe,{actions:b,onAction:g,id:n,readOnly:S}))}}],r&&function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),c}(r.PureComponent);Ye(Xe,"propTypes",{_id:t().string.isRequired,_depth:t().number,_children:t().array,actions:t().array,className:t().string,title:t().string,label:t().string.isRequired,value:t().string.isRequired,checked:t().bool,expanded:t().bool,disabled:t().bool,partial:t().bool,dataset:t().object,keepTreeOnSearch:t().bool,keepChildrenOnSearch:t().bool,searchModeOn:t().bool,onNodeToggle:t().func,onAction:t().func,onCheckboxChange:t().func,mode:t().oneOf(["multiSelect","simpleSelect","radioSelect","hierarchical"]),showPartiallySelected:t().bool,readOnly:t().bool,clientId:t().string});const Ge=Xe;function Qe(e){return Qe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qe(e)}function Ze(){return Ze=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ze.apply(this,arguments)}function et(e,t){return et=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},et(e,t)}function tt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function rt(e){return rt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},rt(e)}function nt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var ot=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&et(e,t)}(s,e);var t,r,n,o,a=(n=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,t=rt(n);if(o){var r=rt(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Qe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return tt(e)}(this,e)});function s(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),nt(tt(t=a.call(this,e)),"UNSAFE_componentWillReceiveProps",function(e){var r=e.activeDescendant===t.props.activeDescendant;t.computeInstanceProps(e,!r),t.setState({items:t.allVisibleNodes.slice(0,t.currentPage*t.props.pageSize)})}),nt(tt(t),"componentDidMount",function(){t.setState({scrollableTarget:t.node.parentNode})}),nt(tt(t),"computeInstanceProps",function(e,r){if(t.allVisibleNodes=t.getNodes(e),t.totalPages=Math.ceil(t.allVisibleNodes.length/t.props.pageSize),r&&e.activeDescendant){var n=e.activeDescendant.replace(/_li$/,""),o=f(t.allVisibleNodes,function(e){return e.key===n})+1;t.currentPage=o>0?Math.ceil(o/t.props.pageSize):1}}),nt(tt(t),"shouldRenderNode",function(e,t){var r=t.data,n=t.searchModeOn,o=e.expanded,i=e._parent;if(n||o)return!0;var a=i&&r.get(i);return!a||a.expanded}),nt(tt(t),"getNodes",function(e){var r=e.data,n=e.keepTreeOnSearch,o=e.keepChildrenOnSearch,a=e.searchModeOn,s=e.mode,c=e.showPartiallySelected,l=e.readOnly,u=e.onAction,f=e.onChange,p=e.onCheckboxChange,d=e.onNodeToggle,h=e.activeDescendant,y=e.clientId,b=[];return r.forEach(function(r){t.shouldRenderNode(r,e)&&b.push(i().createElement(Ge,Ze({keepTreeOnSearch:n,keepChildrenOnSearch:o,key:r._id},r,{searchModeOn:a,onChange:f,onCheckboxChange:p,onNodeToggle:d,onAction:u,mode:s,showPartiallySelected:c,readOnly:l,clientId:y,activeDescendant:h})))}),b}),nt(tt(t),"hasMore",function(){return t.currentPage<t.totalPages}),nt(tt(t),"loadMore",function(){t.currentPage=t.currentPage+1;var e=t.allVisibleNodes.slice(0,t.currentPage*t.props.pageSize);t.setState({items:e})}),nt(tt(t),"setNodeRef",function(e){t.node=e}),nt(tt(t),"getAriaAttributes",function(){var e=t.props.mode;return{role:"simpleSelect"===e?"listbox":"tree","aria-multiselectable":/multiSelect|hierarchical/.test(e)}}),t.currentPage=1,t.computeInstanceProps(e,!0),t.state={items:t.allVisibleNodes.slice(0,t.props.pageSize)},t}return t=s,(r=[{key:"render",value:function(){var e=this.props.searchModeOn;return i().createElement("ul",Ze({className:"root ".concat(e?"searchModeOn":""),ref:this.setNodeRef},this.getAriaAttributes()),this.state.scrollableTarget&&i().createElement(Y(),{dataLength:this.state.items.length,next:this.loadMore,hasMore:this.hasMore(),loader:i().createElement("span",{className:"searchLoader"},"Loading..."),scrollableTarget:this.state.scrollableTarget},this.state.items))}}])&&function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),s}(r.Component);nt(ot,"propTypes",{data:t().object,keepTreeOnSearch:t().bool,keepChildrenOnSearch:t().bool,searchModeOn:t().bool,onChange:t().func,onNodeToggle:t().func,onAction:t().func,onCheckboxChange:t().func,mode:t().oneOf(["multiSelect","simpleSelect","radioSelect","hierarchical"]),showPartiallySelected:t().bool,pageSize:t().number,readOnly:t().bool,clientId:t().string,activeDescendant:t().string}),nt(ot,"defaultProps",{pageSize:100});const it=ot;var at=n(865),st=n.n(at),ct=function(e){return e};const lt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"children",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ct;return st()(e[t],function(e){return r(e).checked})||e[t].some(function(e){return r(e).partial})};function ut(e){var t=e.nodes,r=e.parent,n=e.depth,o=void 0===n?0:n,i=e.simple,a=e.radio,c=e.showPartialState,l=e.hierarchical,u=e.rootPrefixId,f=e._rv,p=void 0===f?{list:new Map,defaultValues:[],singleSelectedNode:null}:f,d=i||a;return t.forEach(function(e,t){e._depth=o,r?(e._id=e.id||"".concat(r._id,"-").concat(t),e._parent=r._id,r._children.push(e._id)):e._id=e.id||"".concat(u?"".concat(u,"-").concat(t):t),d&&e.checked&&(p.singleSelectedNode?e.checked=!1:p.singleSelectedNode=e),d&&e.isDefaultValue&&p.singleSelectedNode&&!p.singleSelectedNode.isDefaultValue&&(p.singleSelectedNode.checked=!1,p.singleSelectedNode=null),!e.isDefaultValue||d&&0!==p.defaultValues.length||(p.defaultValues.push(e._id),e.checked=!0,d&&(p.singleSelectedNode=e)),l&&!a||function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]&&!arguments[2]?["disabled"]:["checked","disabled"],n=0;n<r.length;n++){var o=r[n];void 0===e[o]&&void 0!==t[o]&&(e[o]=t[o])}}(e,r,!a),p.list.set(e._id,e),!i&&e.children&&(e._children=[],ut({nodes:e.children,parent:e,depth:o+1,radio:a,showPartialState:c,hierarchical:l,_rv:p}),c&&!e.checked&&(e.partial=lt(e),d||s(e.children)||!e.children.every(function(e){return e.checked})||(e.checked=!0)),e.children=void 0)}),p}const ft=function(e){var t=e.tree,r=e.simple,n=e.radio,o=e.showPartialState,i=e.hierarchical,a=e.rootPrefixId;return ut({nodes:Array.isArray(t)?t:[t],simple:r,radio:n,showPartialState:o,hierarchical:i,rootPrefixId:a})};var pt=function e(t,r,n){r[t._id]=!0,s(t._children)||t._children.forEach(function(t){return e(n(t),r,n)})},dt=function(e,t){var r=[],n={};return e.forEach(function(e,o){n[o]||(t(e,o,n)&&r.push(e),n[o]=!0)}),r},ht={getNodesMatching:dt,getVisibleNodes:function(e,t,r){return dt(e,function(e,n,o){return r&&e._children&&e._children.length&&!0!==e.expanded&&pt(e,o,t),!e.hide})},markSubTreeVisited:pt};const yt=ht;function bt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var gt="ArrowUp",vt="ArrowDown",mt="ArrowLeft",wt="ArrowRight",Ot="Enter",St="Home",jt="PageUp",Et="PageDown",_t={None:"None",FocusPrevious:"FocusPrevious",FocusNext:"FocusNext",FocusParent:"FocusParent",FocusFirst:"FocusFirst",FocusLast:"FocusLast",ToggleExpanded:"ToggleExpanded",ToggleChecked:"ToggleChecked"},xt=new Set([_t.FocusPrevious,_t.FocusNext,_t.FocusParent,_t.FocusFirst,_t.FocusLast]),Pt=[gt,vt,St,jt,"End",Et],kt=Pt.concat([mt,wt,Ot]),Tt=function(e,t,r,n){return t.indexOf(e)>-1||!r&&e===n},Ct={isValidKey:function(e,t){return(t?kt:Pt).indexOf(e)>-1},getAction:function(e,t){var r;return r=t===mt?function(e,t){return e&&t===mt?!0===e.expanded?_t.ToggleExpanded:e._parent?_t.FocusParent:_t.None:_t.None}(e,t):t===wt?function(e,t){return e&&e._children&&t===wt?!0!==e.expanded?_t.ToggleExpanded:_t.FocusNext:_t.None}(e,t):function(e,t){return Tt(e,[St,jt],t,vt)}(t,e)?_t.FocusFirst:function(e,t){return Tt(e,["End",Et],t,gt)}(t,e)?_t.FocusLast:function(e,t){if(!e)return _t.None;switch(t){case gt:return _t.FocusPrevious;case vt:return _t.FocusNext;case Ot:return _t.ToggleChecked;default:return _t.None}}(e,t),r},getNextFocus:function(e,t,r,n,o){if(r===_t.FocusParent)return function(e,t){return e&&e._parent?t(e._parent):e}(t,n);if(!xt.has(r))return t;var i=yt.getVisibleNodes(e,n,o);return function(e){return Tt(e,[_t.FocusPrevious,_t.FocusLast],!0)}(r)&&(i=i.reverse()),function(e,t,r){if(!e||0===e.length)return t;var n,o=t;return function(e){return Tt(e,[_t.FocusFirst,_t.FocusLast],!0)}(r)?o=(n=e,function(e){if(Array.isArray(e))return e}(n)||function(e){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,n,o=[],i=!0,a=!1;try{for(t=t.call(e);!(i=(r=t.next()).done)&&(o.push(r.value),1!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==t.return||t.return()}finally{if(a)throw n}}return o}}(n)||function(e){if(e){if("string"==typeof e)return bt(e,1);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?bt(e,1):void 0}}(n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0]:[_t.FocusPrevious,_t.FocusNext].indexOf(r)>-1&&(o=function(e,t){var r=e.indexOf(t)+1;return r%e.length==0?e[0]:e[r]}(e,t)),o}(i,t,r)},getNextFocusAfterTagDelete:function(e,t,r,n){var o=t?f(t,function(t){return t._id===e}):-1;if(o<0||!r.length)return n;var i=r[o=r.length>o?o:r.length-1]._id,a=document.getElementById(x(i));return a&&a.firstElementChild||n},handleFocusNavigationkey:function(e,t,r,n,o){var i=Ct.getNextFocus(e,r,t,n,o);return Ct.adjustFocusedProps(r,i),i?i._id:r&&r._id},handleToggleNavigationkey:function(e,t,r,n,o){return e!==_t.ToggleChecked||r||t.readOnly||t.disabled?e===_t.ToggleExpanded&&o(t._id):n(t._id,!0!==t.checked),t&&t._id},adjustFocusedProps:function(e,t){e&&t&&e._id!==t._id&&(e._focused=!1),t&&(t._focused=!0)}};const Rt=Ct;var Nt=function(){function e(t){var r=t.data,n=t.mode,o=t.showPartiallySelected,i=t.rootPrefixId,a=t.searchPredicate;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._src=r,this.simpleSelect="simpleSelect"===n,this.radioSelect="radioSelect"===n,this.hierarchical="hierarchical"===n,this.searchPredicate=a;var s=ft({tree:JSON.parse(JSON.stringify(r)),simple:this.simpleSelect,radio:this.radioSelect,showPartialState:o,hierarchical:this.hierarchical,rootPrefixId:i}),c=s.list,l=s.defaultValues,u=s.singleSelectedNode;this.tree=c,this.defaultValues=l,this.showPartialState=!this.hierarchical&&o,this.searchMaps=new Map,(this.simpleSelect||this.radioSelect)&&u&&(this.currentChecked=u._id)}var t,r;return t=e,r=[{key:"getNodeById",value:function(e){return this.tree.get(e)}},{key:"getMatches",value:function(e){var t=this;if(this.searchMaps.has(e))return this.searchMaps.get(e);var r=-1,n=e;this.searchMaps.forEach(function(t,o){e.startsWith(o)&&o.length>r&&(r=o.length,n=o)});var o=[],i=this._getAddOnMatch(o,e);return n!==e?this.searchMaps.get(n).forEach(function(e){return i(t.getNodeById(e))}):this.tree.forEach(i),this.searchMaps.set(e,o),o}},{key:"addParentsToTree",value:function(e,t){if(void 0!==e){var r=this.getNodeById(e);this.addParentsToTree(r._parent,t),r.hide=!r._isMatch||r.hide,r.matchInChildren=!0,t.set(e,r)}}},{key:"addChildrenToTree",value:function(e,t,r){var n=this;void 0!==e&&e.forEach(function(e){if(!r||!r.includes(e)){var o=n.getNodeById(e);o.matchInParent=!0,t.set(e,o),n.addChildrenToTree(o._children,t)}})}},{key:"filterTree",value:function(e,t,r){var n=this,o=this.getMatches(e.toLowerCase()),i=new Map;o.forEach(function(e){var a=n.getNodeById(e);a.hide=!1,a._isMatch=!0,t&&n.addParentsToTree(a._parent,i),i.set(e,a),t&&r&&n.addChildrenToTree(a._children,i,o)});var a=0===o.length;return this.matchTree=i,{allNodesHidden:a,tree:i}}},{key:"restoreNodes",value:function(){return this.tree.forEach(function(e){e.hide=!1}),this.tree}},{key:"restoreDefaultValues",value:function(){var e=this;return this.defaultValues.forEach(function(t){e.setNodeCheckedState(t,!0)}),this.tree}},{key:"togglePreviousChecked",value:function(e,t){var r=this.currentChecked;if(r&&r!==e){var n=this.getNodeById(r);n.checked=!1,this.radioSelect&&this.showPartialState&&this.partialCheckParents(n)}this.currentChecked=t?e:null}},{key:"setNodeCheckedState",value:function(e,t){this.radioSelect&&this.togglePreviousChecked(e,t);var r=this.getNodeById(e);r.checked=t,this.showPartialState&&(r.partial=!1),this.simpleSelect?this.togglePreviousChecked(e,t):this.radioSelect?(this.showPartialState&&this.partialCheckParents(r),t||this.unCheckParents(r)):(this.hierarchical||this.toggleChildren(e,t),this.showPartialState&&this.partialCheckParents(r),this.hierarchical||t||this.unCheckParents(r))}},{key:"unCheckParents",value:function(e){for(var t=e._parent;t;){var r=this.getNodeById(t);r.checked=!1,r.partial=lt(r,"_children",this.getNodeById.bind(this)),t=r._parent}}},{key:"partialCheckParents",value:function(e){for(var t=this,r=e._parent;r;){var n=this.getNodeById(r);n.checked=n._children.every(function(e){return t.getNodeById(e).checked}),n.partial=lt(n,"_children",this.getNodeById.bind(this)),r=n._parent}}},{key:"toggleChildren",value:function(e,t){var r=this,n=this.getNodeById(e);n.checked=t,this.showPartialState&&(n.partial=!1),s(n._children)||n._children.forEach(function(e){return r.toggleChildren(e,t)})}},{key:"toggleNodeExpandState",value:function(e){var t=this.getNodeById(e);return t.expanded=!t.expanded,t.expanded||this.collapseChildren(t),this.tree}},{key:"collapseChildren",value:function(e){var t=this;e.expanded=!1,s(e._children)||e._children.forEach(function(e){return t.collapseChildren(t.getNodeById(e))})}},{key:"tags",get:function(){var e=this;return this.radioSelect||this.simpleSelect?this.currentChecked?[this.getNodeById(this.currentChecked)]:[]:yt.getNodesMatching(this.tree,function(t,r,n){return t.checked&&!e.hierarchical&&yt.markSubTreeVisited(t,n,function(t){return e.getNodeById(t)}),t.checked})}},{key:"getTreeAndTags",value:function(){return{tree:this.tree,tags:this.tags}}},{key:"handleNavigationKey",value:function(e,t,r,n,o,i,a){var s=this,c=e&&this.getNodeById(e),l=Rt.getAction(c,r);return xt.has(l)?Rt.handleFocusNavigationkey(t,l,c,function(e){return s.getNodeById(e)},o):c&&t.has(c._id)?Rt.handleToggleNavigationkey(l,c,n,i,a):e}},{key:"_getAddOnMatch",value:function(e,t){var r=function(e,t){return e.label.toLowerCase().indexOf(t)>=0};return"function"==typeof this.searchPredicate&&(r=this.searchPredicate),function(n){r(n,t)&&e.push(n._id)}}}],r&&function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();const At=Nt;function Dt(e){return Dt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Dt(e)}function Bt(){return Bt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Bt.apply(this,arguments)}function It(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Ft(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?It(Object(r),!0).forEach(function(t){Vt(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):It(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Mt(e,t){return Mt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Mt(e,t)}function Lt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ut(e){return Ut=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Ut(e)}function Vt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var zt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Mt(e,t)}(s,e);var t,r,n,o,a=(n=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,t=Ut(n);if(o){var r=Ut(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Dt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Lt(e)}(this,e)});function s(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),Vt(Lt(t=a.call(this,e)),"initNewProps",function(e){var r=e.data,n=e.mode,o=e.showDropdown,i=e.showPartiallySelected,a=e.searchPredicate;t.treeManager=new At({data:r,mode:n,showPartiallySelected:i,rootPrefixId:t.clientId,searchPredicate:a}),t.setState(function(e){var r=e.currentFocus&&t.treeManager.getNodeById(e.currentFocus);return r&&(r._focused=!0),Ft({showDropdown:/initial|always/.test(o)||!0===e.showDropdown},t.treeManager.getTreeAndTags())})}),Vt(Lt(t),"resetSearchState",function(){return t.searchInput&&(t.searchInput.value=""),{tree:t.treeManager.restoreNodes(),searchModeOn:!1,allNodesHidden:!1}}),Vt(Lt(t),"handleClick",function(e,r){t.setState(function(e){var r="always"===t.props.showDropdown||t.keepDropdownActive||!e.showDropdown;return r!==e.showDropdown&&(r?document.addEventListener("click",t.handleOutsideClick,!1):document.removeEventListener("click",t.handleOutsideClick,!1)),r?t.props.onFocus():t.props.onBlur(),r?{showDropdown:r}:Ft({showDropdown:r},t.resetSearchState())},r)}),Vt(Lt(t),"handleOutsideClick",function(e){"always"!==t.props.showDropdown&&function(e,t){return e instanceof Event&&!function(e){if(e.path)return e.path;for(var t=e.target,r=[t];t.parentElement;)t=t.parentElement,r.unshift(t);return r}(e).some(function(e){return e===t})}(e,t.node)&&t.handleClick()}),Vt(Lt(t),"onInputChange",function(e){var r=e.length>0;if(r){var n=t.treeManager.filterTree(e,t.props.keepTreeOnSearch,t.props.keepChildrenOnSearch),o=n.allNodesHidden,i=n.tree;t.setState({tree:i,searchModeOn:r,allNodesHidden:o})}else t.setState(t.resetSearchState())}),Vt(Lt(t),"onTagRemove",function(e,r){var n=t.state.tags;t.onCheckboxChange(e,!1,function(o){r&&Rt.getNextFocusAfterTagDelete(e,n,o,t.searchInput).focus()})}),Vt(Lt(t),"onNodeToggle",function(e){t.treeManager.toggleNodeExpandState(e);var r=t.state.searchModeOn?t.treeManager.matchTree:t.treeManager.tree;t.setState({tree:r}),"function"==typeof t.props.onNodeToggle&&t.props.onNodeToggle(t.treeManager.getNodeById(e))}),Vt(Lt(t),"onCheckboxChange",function(e,r,n){var o=t.props,i=o.mode,a=o.keepOpenOnSelect,s=o.clearSearchOnChange,c=t.state,l=c.currentFocus,u=c.searchModeOn;t.treeManager.setNodeCheckedState(e,r);var f=t.treeManager.tags,p=["simpleSelect","radioSelect"].indexOf(i)>-1,d=!(p&&!a)&&t.state.showDropdown,h=l&&t.treeManager.getNodeById(l),y=t.treeManager.getNodeById(e);f.length||(t.treeManager.restoreDefaultValues(),f=t.treeManager.tags);var b={tree:u?t.treeManager.matchTree:t.treeManager.tree,tags:f,showDropdown:d,currentFocus:e};(p&&!d||s)&&Object.assign(b,t.resetSearchState()),p&&!d&&document.removeEventListener("click",t.handleOutsideClick,!1),Rt.adjustFocusedProps(h,y),t.setState(b,function(){n&&n(f)}),t.props.onChange(y,f)}),Vt(Lt(t),"onAction",function(e,r){t.props.onAction(t.treeManager.getNodeById(e),r)}),Vt(Lt(t),"onInputFocus",function(){t.keepDropdownActive=!0}),Vt(Lt(t),"onInputBlur",function(){t.keepDropdownActive=!1}),Vt(Lt(t),"onTrigger",function(e){t.handleClick(e,function(){t.state.showDropdown&&t.searchInput.focus()})}),Vt(Lt(t),"onKeyboardKeyDown",function(e){var r=t.props,n=r.readOnly,o=r.mode,i=r.disablePoppingOnBackspace,a=t.state,s=a.showDropdown,c=a.tags,l=a.searchModeOn,u=a.currentFocus,f=t.treeManager,p=l?f.matchTree:f.tree;if(s||!Rt.isValidKey(e.key,!1)&&!/^\w$/i.test(e.key))if(s&&Rt.isValidKey(e.key,!0)){var d=f.handleNavigationKey(u,p,e.key,n,!l,t.onCheckboxChange,t.onNodeToggle);d!==u&&t.setState({currentFocus:d},function(){var e=document&&document.getElementById("".concat(d,"_li"));e&&e.scrollIntoView()})}else{if(s&&["Escape","Tab"].indexOf(e.key)>-1)return void("simpleSelect"===o&&p.has(u)?t.onCheckboxChange(u,!0):(t.keepDropdownActive=!1,t.handleClick()));if(i||"Backspace"!==e.key||!c.length||0!==t.searchInput.value.length)return;var h=c.pop();t.onCheckboxChange(h._id,!1)}else if(e.persist(),t.handleClick(null,function(){return t.onKeyboardKeyDown(e)}),/\w/i.test(e.key))return;e.preventDefault()}),Vt(Lt(t),"getAriaAttributes",function(){var e=t.props,r=e.mode,n=e.texts;return"radioSelect"!==r?{}:Ft({role:"radiogroup"},p(n.label))}),t.state={searchModeOn:!1,currentFocus:void 0},t.clientId=e.id||u.get(Lt(t)),t}return t=s,(r=[{key:"UNSAFE_componentWillMount",value:function(){this.initNewProps(this.props)}},{key:"componentWillUnmount",value:function(){document.removeEventListener("click",this.handleOutsideClick,!1)}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){this.initNewProps(e)}},{key:"render",value:function(){var e=this,t=this.props,r=t.disabled,n=t.readOnly,o=t.mode,a=t.texts,s=t.inlineSearchInput,c=t.tabIndex,l=this.state,u=l.showDropdown,f=l.currentFocus,p=l.tags,d={disabled:r,readOnly:n,activeDescendant:f?"".concat(f,"_li"):void 0,texts:a,mode:o,clientId:this.clientId},h=i().createElement(w,Bt({inputRef:function(t){e.searchInput=t},onInputChange:this.onInputChange,onFocus:this.onInputFocus,onBlur:this.onInputBlur,onKeyDown:this.onKeyboardKeyDown},d,{inlineSearchInput:s}));return i().createElement("div",{id:this.clientId,className:[this.props.className&&this.props.className,"react-dropdown-tree-select"].filter(Boolean).join(" "),ref:function(t){e.node=t}},i().createElement("div",{className:["dropdown","simpleSelect"===o&&"simple-select","radioSelect"===o&&"radio-select"].filter(Boolean).join(" ")},i().createElement(W,Bt({onTrigger:this.onTrigger,showDropdown:u},d,{tags:p,tabIndex:c}),i().createElement(F,Bt({tags:p,onTagRemove:this.onTagRemove},d),!s&&h)),u&&i().createElement("div",Bt({className:"dropdown-content"},this.getAriaAttributes()),s&&h,this.state.allNodesHidden?i().createElement("span",{className:"no-matches"},a.noMatches||"No matches found"):i().createElement(it,Bt({data:this.state.tree,keepTreeOnSearch:this.props.keepTreeOnSearch,keepChildrenOnSearch:this.props.keepChildrenOnSearch,searchModeOn:this.state.searchModeOn,onAction:this.onAction,onCheckboxChange:this.onCheckboxChange,onNodeToggle:this.onNodeToggle,mode:o,showPartiallySelected:this.props.showPartiallySelected},d)))))}}])&&function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),s}(r.Component);Vt(zt,"propTypes",{data:t().oneOfType([t().object,t().array]).isRequired,clearSearchOnChange:t().bool,keepTreeOnSearch:t().bool,keepChildrenOnSearch:t().bool,keepOpenOnSelect:t().bool,texts:t().shape({placeholder:t().string,inlineSearchPlaceholder:t().string,noMatches:t().string,label:t().string,labelRemove:t().string}),showDropdown:t().oneOf(["default","initial","always"]),className:t().string,onChange:t().func,onAction:t().func,onNodeToggle:t().func,onFocus:t().func,onBlur:t().func,mode:t().oneOf(["multiSelect","simpleSelect","radioSelect","hierarchical"]),showPartiallySelected:t().bool,disabled:t().bool,readOnly:t().bool,id:t().string,searchPredicate:t().func,inlineSearchInput:t().bool,tabIndex:t().number,disablePoppingOnBackspace:t().bool}),Vt(zt,"defaultProps",{onAction:function(){},onFocus:function(){},onBlur:function(){},onChange:function(){},texts:{},showDropdown:"default",inlineSearchInput:!1,tabIndex:0,disablePoppingOnBackspace:!1});const qt=zt})(),o})(),e.exports=n(r(1609))},6721:(e,t,r)=>{var n=r(1042),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(n){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return o.call(t,e)?t[e]:void 0}},7068:(e,t,r)=>{var n=r(7217),o=r(5911),i=r(1986),a=r(689),s=r(5861),c=r(6449),l=r(3656),u=r(7167),f="[object Arguments]",p="[object Array]",d="[object Object]",h=Object.prototype.hasOwnProperty;e.exports=function(e,t,r,y,b,g){var v=c(e),m=c(t),w=v?p:s(e),O=m?p:s(t),S=(w=w==f?d:w)==d,j=(O=O==f?d:O)==d,E=w==O;if(E&&l(e)){if(!l(t))return!1;v=!0,S=!1}if(E&&!S)return g||(g=new n),v||u(e)?o(e,t,r,y,b,g):i(e,t,w,r,y,b,g);if(!(1&r)){var _=S&&h.call(e,"__wrapped__"),x=j&&h.call(t,"__wrapped__");if(_||x){var P=_?e.value():e,k=x?t.value():t;return g||(g=new n),b(P,k,r,y,g)}}return!!E&&(g||(g=new n),a(e,t,r,y,b,g))}},7167:(e,t,r)=>{var n=r(4901),o=r(7301),i=r(6009),a=i&&i.isTypedArray,s=a?o(a):n;e.exports=s},7199:(e,t,r)=>{var n=r(9653),o=r(6169),i=r(3201),a=r(3736),s=r(1961);e.exports=function(e,t,r){var c=e.constructor;switch(t){case"[object ArrayBuffer]":return n(e);case"[object Boolean]":case"[object Date]":return new c(+e);case"[object DataView]":return o(e,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return s(e,r);case"[object Map]":case"[object Set]":return new c;case"[object Number]":case"[object String]":return new c(e);case"[object RegExp]":return i(e);case"[object Symbol]":return a(e)}}},7217:(e,t,r)=>{var n=r(79),o=r(1420),i=r(938),a=r(3605),s=r(9817),c=r(945);function l(e){var t=this.__data__=new n(e);this.size=t.size}l.prototype.clear=o,l.prototype.delete=i,l.prototype.get=a,l.prototype.has=s,l.prototype.set=c,e.exports=l},7241:(e,t,r)=>{var n=r(695),o=r(2903),i=r(4894);e.exports=function(e){return i(e)?n(e,!0):o(e)}},7296:(e,t,r)=>{var n,o=r(5481),i=(n=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";e.exports=function(e){return!!i&&i in e}},7301:e=>{e.exports=function(e){return function(t){return e(t)}}},7473:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},7534:(e,t,r)=>{var n=r(2552),o=r(346);e.exports=function(e){return o(e)&&"[object Arguments]"==n(e)}},7670:(e,t,r)=>{var n=r(2651);e.exports=function(e){var t=n(this,e).delete(e);return this.size-=t?1:0,t}},7730:(e,t,r)=>{var n=r(9172),o=r(7301),i=r(6009),a=i&&i.isMap,s=a?o(a):n;e.exports=s},7828:(e,t,r)=>{var n=r(9325).Uint8Array;e.exports=n},8055:(e,t,r)=>{var n=r(9999);e.exports=function(e){return n(e,5)}},8096:e=>{e.exports=function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}},8223:(e,t,r)=>{var n=r(6110)(r(9325),"Map");e.exports=n},8303:(e,t,r)=>{var n=r(6110)(r(9325),"WeakMap");e.exports=n},8440:(e,t,r)=>{var n=r(6038),o=r(7301),i=r(6009),a=i&&i.isSet,s=a?o(a):n;e.exports=s},8655:(e,t,r)=>{var n=r(6025);e.exports=function(e){return n(this.__data__,e)>-1}},8859:(e,t,r)=>{var n=r(3661),o=r(1380),i=r(1459);function a(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new n;++t<r;)this.add(e[t])}a.prototype.add=a.prototype.push=o,a.prototype.has=i,e.exports=a},8879:(e,t,r)=>{var n=r(4335)(Object.getPrototypeOf,Object);e.exports=n},8948:(e,t,r)=>{var n=r(1791),o=r(6375);e.exports=function(e,t){return n(e,o(e),t)}},8984:(e,t,r)=>{var n=r(5527),o=r(3650),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return o(e);var t=[];for(var r in Object(e))i.call(e,r)&&"constructor"!=r&&t.push(r);return t}},9172:(e,t,r)=>{var n=r(5861),o=r(346);e.exports=function(e){return o(e)&&"[object Map]"==n(e)}},9219:e=>{e.exports=function(e,t){return e.has(t)}},9325:(e,t,r)=>{var n=r(4840),o="object"==typeof self&&self&&self.Object===Object&&self,i=n||o||Function("return this")();e.exports=i},9344:(e,t,r)=>{var n=r(3805),o=Object.create,i=function(){function e(){}return function(t){if(!n(t))return{};if(o)return o(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();e.exports=i},9350:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},9653:(e,t,r)=>{var n=r(7828);e.exports=function(e){var t=new e.constructor(e.byteLength);return new n(t).set(new n(e)),t}},9770:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,o=0,i=[];++r<n;){var a=e[r];t(a,r,e)&&(i[o++]=a)}return i}},9817:e=>{e.exports=function(e){return this.__data__.has(e)}},9935:e=>{e.exports=function(){return!1}},9999:(e,t,r)=>{var n=r(7217),o=r(3729),i=r(6547),a=r(4733),s=r(3838),c=r(3290),l=r(3007),u=r(2271),f=r(8948),p=r(2),d=r(3349),h=r(5861),y=r(6189),b=r(7199),g=r(5529),v=r(6449),m=r(3656),w=r(7730),O=r(3805),S=r(8440),j=r(5950),E=r(7241),_="[object Arguments]",x="[object Function]",P="[object Object]",k={};k[_]=k["[object Array]"]=k["[object ArrayBuffer]"]=k["[object DataView]"]=k["[object Boolean]"]=k["[object Date]"]=k["[object Float32Array]"]=k["[object Float64Array]"]=k["[object Int8Array]"]=k["[object Int16Array]"]=k["[object Int32Array]"]=k["[object Map]"]=k["[object Number]"]=k[P]=k["[object RegExp]"]=k["[object Set]"]=k["[object String]"]=k["[object Symbol]"]=k["[object Uint8Array]"]=k["[object Uint8ClampedArray]"]=k["[object Uint16Array]"]=k["[object Uint32Array]"]=!0,k["[object Error]"]=k[x]=k["[object WeakMap]"]=!1,e.exports=function e(t,r,T,C,R,N){var A,D=1&r,B=2&r,I=4&r;if(T&&(A=R?T(t,C,R,N):T(t)),void 0!==A)return A;if(!O(t))return t;var F=v(t);if(F){if(A=y(t),!D)return l(t,A)}else{var M=h(t),L=M==x||"[object GeneratorFunction]"==M;if(m(t))return c(t,D);if(M==P||M==_||L&&!R){if(A=B||L?{}:g(t),!D)return B?f(t,s(A,t)):u(t,a(A,t))}else{if(!k[M])return R?t:{};A=b(t,M,D)}}N||(N=new n);var U=N.get(t);if(U)return U;N.set(t,A),S(t)?t.forEach(function(n){A.add(e(n,r,T,n,t,N))}):w(t)&&t.forEach(function(n,o){A.set(o,e(n,r,T,o,t,N))});var V=F?void 0:(I?B?d:p:B?E:j)(t);return o(V||t,function(n,o){V&&(n=t[o=n]),i(A,o,e(n,r,T,o,t,N))}),A}}},r={};function n(e){var o=r[e];if(void 0!==o)return o.exports;var i=r[e]={id:e,loaded:!1,exports:{}};return t[e].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}n.m=t,e=[],n.O=(t,r,o,i)=>{if(!r){var a=1/0;for(u=0;u<e.length;u++){for(var[r,o,i]=e[u],s=!0,c=0;c<r.length;c++)(!1&i||a>=i)&&Object.keys(n.O).every(e=>n.O[e](r[c]))?r.splice(c--,1):(s=!1,i<a&&(a=i));if(s){e.splice(u--,1);var l=o();void 0!==l&&(t=l)}}return t}i=i||0;for(var u=e.length;u>0&&e[u-1][2]>i;u--)e[u]=e[u-1];e[u]=[r,o,i]},n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;n.g.importScripts&&(e=n.g.location+"");var t=n.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var o=r.length-1;o>-1&&(!e||!/^http(s?):/.test(e));)e=r[o--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=e})(),(()=>{var e={57:0,350:0};n.O.j=t=>0===e[t];var t=(t,r)=>{var o,i,[a,s,c]=r,l=0;if(a.some(t=>0!==e[t])){for(o in s)n.o(s,o)&&(n.m[o]=s[o]);if(c)var u=c(n)}for(t&&t(r);l<a.length;l++)i=a[l],n.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return n.O(u)},r=globalThis.webpackChunkopen_video_block=globalThis.webpackChunkopen_video_block||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var o=n.O(void 0,[350],()=>n(332));o=n.O(o)})();
  • open-video/trunk/open-video.php

    r3387314 r3411350  
    1616 *
    1717 * @link              https://open.video/
    18  * @since             1.2.4
     18 * @since             1.3.0
    1919 * @package           Open.Video
    2020 *
     
    2323 * Plugin URI:        https://wordpress.org/plugins/open-video
    2424 * Description:       Open.Video allows you to easily embed videos to your site from the Open.Video Network.
    25  * Version:           1.2.4
     25 * Version:           1.3.0
    2626 * Requires at least: 6.1
    2727 * Requires PHP: 7.0
     
    4141 * Rename this for your plugin and update it as you release new versions.
    4242 */
    43 define('OPENVIDEOPLUGIN_VERSION', '1.2.4');
     43define('OPENVIDEOPLUGIN_VERSION', '1.3.0');
    4444
    4545global $openvideoplugin_regex;
     
    241241{
    242242    \OpenVideoNamespace\OpenVideoPlugin_Channels::openvideoplugin_remove_middleton_paths();
     243    \OpenVideoNamespace\DynamicEndpoints::clear_cache();
    243244}
    244245register_deactivation_hook(__FILE__, 'openvideoplugin_deactivate');
Note: See TracChangeset for help on using the changeset viewer.