From 40d0cd49f1634d63cabbe6400eafa105cee54097 Mon Sep 17 00:00:00 2001 From: Digital Studium Date: Sat, 22 Jul 2023 16:57:00 +0300 Subject: [PATCH] Remove module --- config.yaml | 23 + config/_default/config.yaml | 36 - config/production/config.yaml | 5 - content/en/about-author.md | 2 +- .../ubuntu-how-to-upgrade-kernel.md | 2 +- content/ru/about-author.md | 3 +- deploy | 2 +- i18n/en.yaml | 10 - i18n/ru.yaml | 10 - static/admin/config.yml | 55 -- static/admin/index.html | 13 - static/admin/netlify-cms.js | 723 ------------------ static/logo.svg | 79 ++ 13 files changed, 106 insertions(+), 857 deletions(-) create mode 100644 config.yaml delete mode 100644 config/_default/config.yaml delete mode 100644 config/production/config.yaml delete mode 100644 i18n/en.yaml delete mode 100644 i18n/ru.yaml delete mode 100644 static/admin/config.yml delete mode 100644 static/admin/index.html delete mode 100644 static/admin/netlify-cms.js create mode 100644 static/logo.svg diff --git a/config.yaml b/config.yaml new file mode 100644 index 0000000..16490da --- /dev/null +++ b/config.yaml @@ -0,0 +1,23 @@ +baseURL: https://digitalstudium.com +theme: ds + +languages: + en: + language_name: English + title: Digital Studium + description: Blog about Linux, DevOps and cloud technologies + author: Konstantin Shutkin + github: digitalstudium + + ru: + language_name: Русский + title: Digital Studium + description: Блог о Linux, DevOps и облачных технологиях + author: Константин Шуткин + github: digitalstudium + youtube: digitalstudium + telegram: digitalstudium + +schema: + type: TechArticle + copyright: http://creativecommons.org/licenses/by/4.0/ diff --git a/config/_default/config.yaml b/config/_default/config.yaml deleted file mode 100644 index ab4eca6..0000000 --- a/config/_default/config.yaml +++ /dev/null @@ -1,36 +0,0 @@ -title: Digital Studium -baseURL: https://digitalstudium.com -theme: ds - -defaultContentLanguageInSubdir: true -languages: - en: - contentDir: content/en - languageName: English - params: - author: Konstantin Shutkin - description: Blog about Linux, DevOps and cloud technologies - github: digitalstudium - ru: - contentDir: content/ru - languageName: Русский - params: - author: Константин Шуткин - description: Блог о Linux, DevOps и облачных технологиях - github: digitalstudium - youtube: digitalstudium - telegram: digitalstudium - -params: - authorPage: /about-author - logo: /static/images/logo.svg - schemaType: TechArticle - copyright: http://creativecommons.org/licenses/by/4.0/ - includeJS: ['copy.js'] - -# deployment: -# targets: -# - name: yandex cloud -# URL: s3://digitalstudium.com?region=ru-central1&endpoint=storage.yandexcloud.net - -enableRobotsTXT: true \ No newline at end of file diff --git a/config/production/config.yaml b/config/production/config.yaml deleted file mode 100644 index 4503cf6..0000000 --- a/config/production/config.yaml +++ /dev/null @@ -1,5 +0,0 @@ -module: - mounts: - - source: "static" - target: "static" - excludeFiles: "admin" \ No newline at end of file diff --git a/content/en/about-author.md b/content/en/about-author.md index 45ca6b7..11d327a 100644 --- a/content/en/about-author.md +++ b/content/en/about-author.md @@ -2,7 +2,7 @@ title: About author category: / filename: about-author -featured_image: /images/kostya.jpg +image: /images/kostya.jpg date: 2023-02-18 --- My name is Konstantin Shutkin, I am from Moscow, Russia and I am a DevOps engineer. Since 2016, I have worked in this position in companies such as Severstal, Sberbank, Nvidia. My main subject of research and work is Linux, Docker, Kubernetes, Python programming and more. I share my knowledge on this blog. diff --git a/content/en/ubuntu-lifehacks/ubuntu-how-to-upgrade-kernel.md b/content/en/ubuntu-lifehacks/ubuntu-how-to-upgrade-kernel.md index 9c078a9..0634b84 100644 --- a/content/en/ubuntu-lifehacks/ubuntu-how-to-upgrade-kernel.md +++ b/content/en/ubuntu-lifehacks/ubuntu-how-to-upgrade-kernel.md @@ -6,11 +6,11 @@ date: 2022-05-14 --- This article describes how to upgrade Linux kernel on Ubuntu operating system via command line interface. -``` ### First method The first method is very simple. We need to enter only one command in the terminal: ```bash sudo apt update && sudo apt -y upgrade +``` The `sudo apt update` command will update the repository cache, and the `sudo apt -y upgrade` command will install new versions of all installed programs, including the linux kernel. The advantage of this method is that the latest version of the linux kernel, officially supported by Ubuntu OS, will be installed. The disadvantage of this method is that the officially supported kernel is usually not the newest. Sometimes it happens that it is necessary to install the latest version of the linux kernel. Real world example: your new laptop may have a CPU which is only supported in linux kernel version 5.12, while the officially supported version is older. And here the second method comes to the rescue. ### Second method The first step is to go to https://kernel.ubuntu.com/~kernel-ppa/mainline/. On this site, you need to select the folder with the latest version of the linux kernel (at the very bottom of the page). Note that it is recommended to select the version without the "rc" suffix. The "rc" suffix means "release candidate", which in turn means that the given kernel version is not stable. On the page that opens, select the folder with the architecture of your processor. The architecture can be found using the `uname -p` command. If the output of this command is "x86_64", then select the amd64 folder. On the opened page there will be links to .deb files. We need to download 4 of them: diff --git a/content/ru/about-author.md b/content/ru/about-author.md index aced57d..22dba72 100644 --- a/content/ru/about-author.md +++ b/content/ru/about-author.md @@ -2,10 +2,9 @@ title: Об авторе category: / filename: about-author -featured_image: /images/kostya.jpg +image: /images/kostya.jpg date: 2023-02-18 --- -{{< figure src="/images/kostya.jpg" width="100px" class="floatleft alignleft" >}} Меня зовут Константин Шуткин, я живу в городе Москва и я DevOps-инженер. С 2016 года я работал на этой должности в таких компаниях, как Северсталь, Сбербанк, Nvidia. Мой основной предмет исследований и работы это Linux, Docker, Kubernetes, программирование на Python и т. д., и я делюсь своими знаниями в этих областях на этом сайте и на ютуб канале. Мой youtube канал: https://youtube.com/DigitalStudium diff --git a/deploy b/deploy index db0dbd7..8fdc3e3 100755 --- a/deploy +++ b/deploy @@ -3,6 +3,6 @@ USER=root HOST=digitalstudium.com DIR=/srv/$HOST # the directory where your web site files should go -hugo --minify && rsync -avz --delete public/ ${USER}@${HOST}:${DIR} # this will delete everything on the server that's not in the local public folder +crater -p && rsync -avz --delete public/ ${USER}@${HOST}:${DIR} # this will delete everything on the server that's not in the local public folder exit 0 \ No newline at end of file diff --git a/i18n/en.yaml b/i18n/en.yaml deleted file mode 100644 index d81d371..0000000 --- a/i18n/en.yaml +++ /dev/null @@ -1,10 +0,0 @@ -bash-lifehacks: - other: BASH lifehacks -nginx-lifehacks: - other: Nginx lifehacks -linux-lifehacks: - other: Linux lifehacks -ubuntu-lifehacks: - other: Ubuntu lifehacks -python-lifehacks: - other: Python lifehacks \ No newline at end of file diff --git a/i18n/ru.yaml b/i18n/ru.yaml deleted file mode 100644 index 19e12e3..0000000 --- a/i18n/ru.yaml +++ /dev/null @@ -1,10 +0,0 @@ -bash-lifehacks: - other: BASH лайфхаки -nginx-lifehacks: - other: Nginx лайфхаки -linux-lifehacks: - other: Linux лайфхаки -ubuntu-lifehacks: - other: Ubuntu лайфхаки -python-lifehacks: - other: Python лайфхаки \ No newline at end of file diff --git a/static/admin/config.yml b/static/admin/config.yml deleted file mode 100644 index 3def80a..0000000 --- a/static/admin/config.yml +++ /dev/null @@ -1,55 +0,0 @@ -backend: - name: git-gateway - -local_backend: true - -media_folder: "static/images" # Media files will be stored in the repo under static/images -public_folder: "/images" # The src attribute for uploaded media will begin with /images - -i18n: - structure: multiple_folders - locales: [en, ru] - -collections: - - name: posts - label: Posts - label_singular: Post - folder: content - path: '{{category}}/{{slug}}' - slug: '{{filename}}{{extension}}' - create: true - i18n: true - view_groups: - - label: Year - field: date - pattern: \d{4} - - label: Category - field: category - fields: - - label: Title - name: title - widget: string - i18n: true - - label: "Category" - name: "category" - widget: "select" - options: ["/", "linux-lifehacks", "nginx-lifehacks", "python-lifehacks", "ubuntu-lifehacks", "bash-lifehacks"] - i18n: duplicate - - label: Filename - name: filename - widget: string - i18n: duplicate - # - label: "Featured Image" - # name: "featured_image" - # widget: "image" - # media_folder: "/assets/images" - # public_folder: "/images" - # i18n: duplicate - - label: Date - name: date - widget: datetime - i18n: duplicate - - label: Body - name: body - widget: markdown - i18n: true \ No newline at end of file diff --git a/static/admin/index.html b/static/admin/index.html deleted file mode 100644 index 47c02e0..0000000 --- a/static/admin/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - Content Manager - - - - - - \ No newline at end of file diff --git a/static/admin/netlify-cms.js b/static/admin/netlify-cms.js deleted file mode 100644 index 47cfb9b..0000000 --- a/static/admin/netlify-cms.js +++ /dev/null @@ -1,723 +0,0 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("NetlifyCms",[],t):"object"==typeof exports?exports.NetlifyCms=t():e.NetlifyCms=t()}(window,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1934)}([function(e,t,n){"use strict";e.exports=n(792)},function(e,t,n){"use strict";function r(e){return(r="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})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}n.d(t,"a",(function(){return S})),n.d(t,"b",(function(){return M})),n.d(t,"c",(function(){return z})),n.d(t,"d",(function(){return I})),n.d(t,"e",(function(){return O})),n.d(t,"f",(function(){return F})),n.d(t,"g",(function(){return E})),n.d(t,"h",(function(){return r})),n.d(t,"i",(function(){return a})),n.d(t,"j",(function(){return i})),n.d(t,"k",(function(){return C})),n.d(t,"l",(function(){return s})),n.d(t,"m",(function(){return B})),n.d(t,"n",(function(){return N})),n.d(t,"o",(function(){return y})),n.d(t,"p",(function(){return L})),n.d(t,"q",(function(){return l})),n.d(t,"r",(function(){return g})),n.d(t,"s",(function(){return v})),n.d(t,"t",(function(){return u})),n.d(t,"u",(function(){return T})),n.d(t,"v",(function(){return D})),n.d(t,"w",(function(){return h})),n.d(t,"x",(function(){return b})),n.d(t,"y",(function(){return m}));var S={ANCHOR:"&",COMMENT:"#",TAG:"!",DIRECTIVES_END:"-",DOCUMENT_END:"."},O={ALIAS:"ALIAS",BLANK_LINE:"BLANK_LINE",BLOCK_FOLDED:"BLOCK_FOLDED",BLOCK_LITERAL:"BLOCK_LITERAL",COMMENT:"COMMENT",DIRECTIVE:"DIRECTIVE",DOCUMENT:"DOCUMENT",FLOW_MAP:"FLOW_MAP",FLOW_SEQ:"FLOW_SEQ",MAP:"MAP",MAP_KEY:"MAP_KEY",MAP_VALUE:"MAP_VALUE",PLAIN:"PLAIN",QUOTE_DOUBLE:"QUOTE_DOUBLE",QUOTE_SINGLE:"QUOTE_SINGLE",SEQ:"SEQ",SEQ_ITEM:"SEQ_ITEM"},C="tag:yaml.org,2002:",T={MAP:"tag:yaml.org,2002:map",SEQ:"tag:yaml.org,2002:seq",STR:"tag:yaml.org,2002:str"};function A(e){for(var t=[0],n=e.indexOf("\n");-1!==n;)n+=1,t.push(n),n=e.indexOf("\n",n);return t}function P(e){var t,n;return"string"==typeof e?(t=A(e),n=e):(Array.isArray(e)&&(e=e[0]),e&&e.context&&(e.lineStarts||(e.lineStarts=A(e.context.src)),t=e.lineStarts,n=e.context.src)),{lineStarts:t,src:n}}function R(e,t){if("number"!=typeof e||e<0)return null;var n=P(t),r=n.lineStarts,i=n.src;if(!r||!i||e>i.length)return null;for(var o=0;o=1)||e>r.length)return null;for(var o=r[e-1],a=r[e];a&&a>o&&"\n"===i[a-1];)--a;return i.slice(o,a)}var I=function(){function e(t,n){i(this,e),this.start=t,this.end=n||t}return a(e,[{key:"isEmpty",value:function(){return"number"!=typeof this.start||!this.end||this.end<=this.start}},{key:"setOrigRange",value:function(e,t){var n=this.start,r=this.end;if(0===e.length||r<=e[0])return this.origStart=n,this.origEnd=r,t;for(var i=t;in);)++i;this.origStart=n+i;for(var o=i;i=r);)++i;return this.origEnd=r+i,o}}],[{key:"copy",value:function(t){return new e(t.start,t.end)}}]),e}(),M=function(){function e(t,n,r){i(this,e),Object.defineProperty(this,"context",{value:r||null,writable:!0}),this.error=null,this.range=null,this.valueRange=null,this.props=n||[],this.type=t,this.value=null}return a(e,[{key:"getPropValue",value:function(e,t,n){if(!this.context)return null;var r=this.context.src,i=this.props[e];return i&&r[i.start]===t?r.slice(i.start+(n?1:0),i.end):null}},{key:"anchor",get:function(){for(var e=0;e0?e.join("\n"):null}},{key:"commentHasRequiredWhitespace",value:function(t){var n=this.context.src;if(this.header&&t===this.header.end)return!1;if(!this.valueRange)return!1;var r=this.valueRange.end;return t!==r||e.atBlank(n,r-1)}},{key:"hasComment",get:function(){if(this.context)for(var e=this.context.src,t=0;t=t.length||"\n"===t[i]?r+"\n":r}},{key:"atDocumentBoundary",value:function(e,t,n){var r=e[t];if(!r)return!0;var i=e[t-1];if(i&&"\n"!==i)return!1;if(n){if(r!==n)return!1}else if(r!==S.DIRECTIVES_END&&r!==S.DOCUMENT_END)return!1;var o=e[t+1],a=e[t+2];if(o!==r||a!==r)return!1;var s=e[t+3];return!s||"\n"===s||"\t"===s||" "===s}},{key:"endOfIdentifier",value:function(e,t){for(var n=e[t],r="<"===n,i=r?["\n","\t"," ",">"]:["\n","\t"," ","[","]","{","}",","];n&&-1===i.indexOf(n);)n=e[t+=1];return r&&">"===n&&(t+=1),t}},{key:"endOfIndent",value:function(e,t){for(var n=e[t];" "===n;)n=e[t+=1];return t}},{key:"endOfLine",value:function(e,t){for(var n=e[t];n&&"\n"!==n;)n=e[t+=1];return t}},{key:"endOfWhiteSpace",value:function(e,t){for(var n=e[t];"\t"===n||" "===n;)n=e[t+=1];return t}},{key:"startOfLine",value:function(e,t){var n=e[t-1];if("\n"===n)return t;for(;n&&"\n"!==n;)n=e[t-=1];return t+1}},{key:"endOfBlockIndent",value:function(t,n,r){var i=e.endOfIndent(t,r);if(i>r+n)return i;var o=e.endOfWhiteSpace(t,i),a=t[o];return a&&"\n"!==a?null:o}},{key:"atBlank",value:function(e,t,n){var r=e[t];return"\n"===r||"\t"===r||" "===r||n&&!r}},{key:"nextNodeIsIndented",value:function(e,t,n){return!(!e||t<0)&&(t>0||n&&"-"===e)}},{key:"normalizeOffset",value:function(t,n){var r=t[n];return r?"\n"!==r&&"\n"===t[n-1]?n-1:e.endOfWhiteSpace(t,n):n}},{key:"foldNewline",value:function(t,n,r){for(var i=0,o=!1,a="",s=t[n+1];" "===s||"\t"===s||"\n"===s;){switch(s){case"\n":i=0,n+=1,a+="\n";break;case"\t":i<=r&&(o=!0),n=e.endOfWhiteSpace(t,n+2)-1;break;case" ":i+=1,n+=1}s=t[n+1]}return a||(a=" "),s&&i<=r&&(o=!0),{fold:a,offset:n,error:o}}}]),e}(),L=function(e){l(n,e);var t=g(n);function n(e,r,o){var a;if(i(this,n),!(o&&r instanceof M))throw new Error("Invalid arguments for new ".concat(e));return(a=t.call(this)).name=e,a.message=o,a.source=r,a}return a(n,[{key:"makePretty",value:function(){if(this.source){this.nodeType=this.source.type;var e=this.source.context&&this.source.context.root;if("number"==typeof this.offset){this.range=new I(this.offset,this.offset+1);var t=e&&R(this.offset,e);if(t){var n={line:t.line,col:t.col+1};this.linePos={start:t,end:n}}delete this.offset}else this.range=this.source.range,this.linePos=this.source.rangeAsLinePos;if(this.linePos){var r=this.linePos.start,i=r.line,o=r.col;this.message+=" at line ".concat(i,", column ").concat(o);var a=e&&function(e,t){var n=e.start,r=e.end,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:80,o=j(n.line,t);if(!o)return null;var a=n.col;if(o.length>i)if(a<=i-10)o=o.substr(0,i-1)+"…";else{var s=Math.round(i/2);o.length>a+s&&(o=o.substr(0,a+s-1)+"…"),a-=o.length-i,o="…"+o.substr(1-i)}var l=1,u="";r&&(r.line===n.line&&a+(r.col-n.col)<=i+1?l=r.col-n.col:(l=Math.min(o.length+1,i)-a,u="…"));var c=a>1?" ".repeat(a-1):"",d="^".repeat(l);return"".concat(o,"\n").concat(c).concat(d).concat(u)}(this.linePos,e);a&&(this.message+=":\n\n".concat(a,"\n"))}delete this.source}}}]),n}(p(Error)),D=function(e){l(n,e);var t=g(n);function n(e,r){return i(this,n),t.call(this,"YAMLReferenceError",e,r)}return n}(L),N=function(e){l(n,e);var t=g(n);function n(e,r){return i(this,n),t.call(this,"YAMLSemanticError",e,r)}return n}(L),F=function(e){l(n,e);var t=g(n);function n(e,r){return i(this,n),t.call(this,"YAMLSyntaxError",e,r)}return n}(L),B=function(e){l(n,e);var t=g(n);function n(e,r){return i(this,n),t.call(this,"YAMLWarning",e,r)}return n}(L),z=function(e){l(n,e);var t=g(n);function n(){return i(this,n),t.apply(this,arguments)}return a(n,[{key:"strValue",get:function(){if(!this.valueRange||!this.context)return null;for(var e=this.valueRange,t=e.start,n=e.end,r=this.context.src,i=r[n-1];tu?r.slice(u,a+1):s)}else o+=s}var d=r[t];switch(d){case"\t":return{errors:[new N(this,"Plain value cannot start with a tab character")],str:o};case"@":case"`":var f="Plain value cannot start with reserved character ".concat(d);return{errors:[new N(this,f)],str:o};default:return o}}},{key:"parseBlockValue",value:function(e){for(var t=this.context,r=t.indent,i=t.inFlow,o=t.src,a=e,s=e,l=o[a];"\n"===l&&!M.atDocumentBoundary(o,a+1);l=o[a]){var u=M.endOfBlockIndent(o,r,a+1);if(null===u||"#"===o[u])break;a="\n"===o[u]?u:s=n.endOfLine(o,u,i)}return this.valueRange.isEmpty()&&(this.valueRange.start=e),this.valueRange.end=s,s}},{key:"parse",value:function(e,t){this.context=e;var r=e.inFlow,i=e.src,o=t,a=i[o];return a&&"#"!==a&&"\n"!==a&&(o=n.endOfLine(i,t,r)),this.valueRange=new I(t,o),o=M.endOfWhiteSpace(i,o),o=this.parseComment(o),this.hasComment&&!this.valueRange.isEmpty()||(o=this.parseBlockValue(o)),o}}],[{key:"endOfLine",value:function(e,t,n){for(var r=e[t],i=t;r&&"\n"!==r&&(!n||"["!==r&&"]"!==r&&"{"!==r&&"}"!==r&&","!==r);){var o=e[i+1];if(":"===r&&(!o||"\n"===o||"\t"===o||" "===o||n&&","===o))break;if((" "===r||"\t"===r)&&"#"===o)break;i+=1,r=o}return i}}]),n}(M)},function(e,t,n){e.exports=n(800)()},function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return s})),n.d(t,"d",(function(){return l})),n.d(t,"e",(function(){return u})),n.d(t,"f",(function(){return c})),n.d(t,"g",(function(){return d})),n.d(t,"h",(function(){return f})),n.d(t,"i",(function(){return p})),n.d(t,"j",(function(){return h})),n.d(t,"k",(function(){return m})),n.d(t,"l",(function(){return g})),n.d(t,"m",(function(){return v})),n.d(t,"n",(function(){return y})),n.d(t,"o",(function(){return b})),n.d(t,"p",(function(){return _})),n.d(t,"q",(function(){return w})),n.d(t,"r",(function(){return x})),n.d(t,"s",(function(){return E})),n.d(t,"t",(function(){return S})),n.d(t,"u",(function(){return O})),n.d(t,"v",(function(){return C})),n.d(t,"w",(function(){return T})),n.d(t,"x",(function(){return A})),n.d(t,"y",(function(){return P})),n.d(t,"z",(function(){return R})),n.d(t,"A",(function(){return j})),n.d(t,"B",(function(){return I})),n.d(t,"C",(function(){return M})),n.d(t,"D",(function(){return L})),n.d(t,"E",(function(){return D})),n.d(t,"G",(function(){return N})),n.d(t,"H",(function(){return F})),n.d(t,"F",(function(){return B})),n.d(t,"a",(function(){return z})),n.d(t,"I",(function(){return U}));var r=n(206),i=n(67),o=n(23);function a(e){for(var t=h(),n=0,r=e.length;no&&(u|=i.a.RIGHT),la&&(u|=i.a.ABOVE),u===i.a.UNKNOWN&&(u=i.a.INTERSECTING),u}function h(){return[1/0,1/0,-1/0,-1/0]}function m(e,t,n,r,i){return i?(i[0]=e,i[1]=t,i[2]=n,i[3]=r,i):[e,t,n,r]}function g(e){return m(1/0,1/0,-1/0,-1/0,e)}function v(e,t){var n=e[0],r=e[1];return m(n,r,n,r,t)}function y(e,t,n,r,i){return x(g(i),e,t,n,r)}function b(e,t){return e[0]==t[0]&&e[2]==t[2]&&e[1]==t[1]&&e[3]==t[3]}function _(e,t){return t[0]e[2]&&(e[2]=t[2]),t[1]e[3]&&(e[3]=t[3]),e}function w(e,t){t[0]e[2]&&(e[2]=t[0]),t[1]e[3]&&(e[3]=t[1])}function x(e,t,n,r,i){for(;nt[0]?r[0]=e[0]:r[0]=t[0],e[1]>t[1]?r[1]=e[1]:r[1]=t[1],e[2]=t[0]&&e[1]<=t[3]&&e[3]>=t[1]}function N(e){return e[2]=s&&v<=u),r||!(a&i.a.RIGHT)||o&i.a.RIGHT||(r=(y=m-(h-u)*g)>=l&&y<=c),r||!(a&i.a.BELOW)||o&i.a.BELOW||(r=(v=h-(m-l)/g)>=s&&v<=u),r||!(a&i.a.LEFT)||o&i.a.LEFT||(r=(y=m-(h-s)*g)>=l&&y<=c)}return r}function z(e,t,n,r){var i=[];if(r>1)for(var o=e[2]-e[0],a=e[3]-e[1],s=0;s=n[2])){var i=L(n),o=Math.floor((r[0]-n[0])/i)*i;e[0]-=o,e[2]-=o}return e}},function(e,t,n){e.exports=function(){"use strict";var e=Array.prototype.slice;function t(e,t){t&&(e.prototype=Object.create(t.prototype)),e.prototype.constructor=e}function n(e){return a(e)?e:q(e)}function r(e){return s(e)?e:W(e)}function i(e){return l(e)?e:H(e)}function o(e){return a(e)&&!u(e)?e:$(e)}function a(e){return!(!e||!e[d])}function s(e){return!(!e||!e[f])}function l(e){return!(!e||!e[p])}function u(e){return s(e)||l(e)}function c(e){return!(!e||!e[h])}t(r,n),t(i,n),t(o,n),n.isIterable=a,n.isKeyed=s,n.isIndexed=l,n.isAssociative=u,n.isOrdered=c,n.Keyed=r,n.Indexed=i,n.Set=o;var d="@@__IMMUTABLE_ITERABLE__@@",f="@@__IMMUTABLE_KEYED__@@",p="@@__IMMUTABLE_INDEXED__@@",h="@@__IMMUTABLE_ORDERED__@@",m={},g={value:!1},v={value:!1};function y(e){return e.value=!1,e}function b(e){e&&(e.value=!0)}function _(){}function w(e,t){t=t||0;for(var n=Math.max(0,e.length-t),r=new Array(n),i=0;i>>0;if(""+n!==t||4294967295===n)return NaN;t=n}return t<0?x(e)+t:t}function E(){return!0}function S(e,t,n){return(0===e||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function O(e,t){return T(e,t,0)}function C(e,t){return T(e,t,t)}function T(e,t,n){return void 0===e?n:e<0?Math.max(0,t+e):void 0===t?e:Math.min(t,e)}var A,P,R,j="function"==typeof Symbol&&Symbol.iterator,I=j||"@@iterator";function M(e){this.next=e}function L(e,t,n,r){var i=0===e?t:1===e?n:[t,n];return r?r.value=i:r={value:i,done:!1},r}function D(){return{value:void 0,done:!0}}function N(e){return!!z(e)}function F(e){return e&&"function"==typeof e.next}function B(e){var t=z(e);return t&&t.call(e)}function z(e){var t=e&&(j&&e[j]||e["@@iterator"]);if("function"==typeof t)return t}function U(e){return e&&"number"==typeof e.length}function q(e){return null==e?X():a(e)?e.toSeq():function(e){var t=ee(e)||"object"==typeof e&&new G(e);if(!t)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+e);return t}(e)}function W(e){return null==e?X().toKeyedSeq():a(e)?s(e)?e.toSeq():e.fromEntrySeq():Z(e)}function H(e){return null==e?X():a(e)?s(e)?e.entrySeq():e.toIndexedSeq():J(e)}function $(e){return(null==e?X():a(e)?s(e)?e.entrySeq():e:J(e)).toSetSeq()}function V(e){this._array=e,this.size=e.length}function G(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}function K(e){this._iterable=e,this.size=e.length||e.size}function Y(e){this._iterator=e,this._iteratorCache=[]}function Q(e){return!(!e||!e["@@__IMMUTABLE_SEQ__@@"])}function X(){return A||(A=new V([]))}function Z(e){var t=Array.isArray(e)?new V(e).fromEntrySeq():F(e)?new Y(e).fromEntrySeq():N(e)?new K(e).fromEntrySeq():"object"==typeof e?new G(e):void 0;if(!t)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+e);return t}function J(e){var t=ee(e);if(!t)throw new TypeError("Expected Array or iterable object of values: "+e);return t}function ee(e){return U(e)?new V(e):F(e)?new Y(e):N(e)?new K(e):void 0}function te(e,t,n,r){var i=e._cache;if(i){for(var o=i.length-1,a=0;a<=o;a++){var s=i[n?o-a:a];if(!1===t(s[1],r?s[0]:a,e))return a+1}return a}return e.__iterateUncached(t,n)}function ne(e,t,n,r){var i=e._cache;if(i){var o=i.length-1,a=0;return new M((function(){var e=i[n?o-a:a];return a++>o?{value:void 0,done:!0}:L(t,r?e[0]:a-1,e[1])}))}return e.__iteratorUncached(t,n)}function re(e,t){return t?function e(t,n,r,i){return Array.isArray(n)?t.call(i,r,H(n).map((function(r,i){return e(t,r,i,n)}))):oe(n)?t.call(i,r,W(n).map((function(r,i){return e(t,r,i,n)}))):n}(t,e,"",{"":e}):ie(e)}function ie(e){return Array.isArray(e)?H(e).map(ie).toList():oe(e)?W(e).map(ie).toMap():e}function oe(e){return e&&(e.constructor===Object||void 0===e.constructor)}function ae(e,t){if(e===t||e!=e&&t!=t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if((e=e.valueOf())===(t=t.valueOf())||e!=e&&t!=t)return!0;if(!e||!t)return!1}return!("function"!=typeof e.equals||"function"!=typeof t.equals||!e.equals(t))}function se(e,t){if(e===t)return!0;if(!a(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||s(e)!==s(t)||l(e)!==l(t)||c(e)!==c(t))return!1;if(0===e.size&&0===t.size)return!0;var n=!u(e);if(c(e)){var r=e.entries();return t.every((function(e,t){var i=r.next().value;return i&&ae(i[1],e)&&(n||ae(i[0],t))}))&&r.next().done}var i=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{i=!0;var o=e;e=t,t=o}var d=!0,f=t.__iterate((function(t,r){if(n?!e.has(t):i?!ae(t,e.get(r,m)):!ae(e.get(r,m),t))return d=!1,!1}));return d&&e.size===f}function le(e,t){if(!(this instanceof le))return new le(e,t);if(this._value=e,this.size=void 0===t?1/0:Math.max(0,t),0===this.size){if(P)return P;P=this}}function ue(e,t){if(!e)throw new Error(t)}function ce(e,t,n){if(!(this instanceof ce))return new ce(e,t,n);if(ue(0!==n,"Cannot step a Range by 0"),e=e||0,void 0===t&&(t=1/0),n=void 0===n?1:Math.abs(n),tr?{value:void 0,done:!0}:L(e,i,n[t?r-i++:i++])}))},t(G,W),G.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},G.prototype.has=function(e){return this._object.hasOwnProperty(e)},G.prototype.__iterate=function(e,t){for(var n=this._object,r=this._keys,i=r.length-1,o=0;o<=i;o++){var a=r[t?i-o:o];if(!1===e(n[a],a,this))return o+1}return o},G.prototype.__iterator=function(e,t){var n=this._object,r=this._keys,i=r.length-1,o=0;return new M((function(){var a=r[t?i-o:o];return o++>i?{value:void 0,done:!0}:L(e,a,n[a])}))},G.prototype[h]=!0,t(K,H),K.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n=B(this._iterable),r=0;if(F(n))for(var i;!(i=n.next()).done&&!1!==e(i.value,r++,this););return r},K.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=B(this._iterable);if(!F(n))return new M(D);var r=0;return new M((function(){var t=n.next();return t.done?t:L(e,r++,t.value)}))},t(Y,H),Y.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);for(var n,r=this._iterator,i=this._iteratorCache,o=0;o=r.length){var t=n.next();if(t.done)return t;r[i]=t.value}return L(e,i,r[i++])}))},t(le,H),le.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},le.prototype.get=function(e,t){return this.has(e)?this._value:t},le.prototype.includes=function(e){return ae(this._value,e)},le.prototype.slice=function(e,t){var n=this.size;return S(e,t,n)?this:new le(this._value,C(t,n)-O(e,n))},le.prototype.reverse=function(){return this},le.prototype.indexOf=function(e){return ae(this._value,e)?0:-1},le.prototype.lastIndexOf=function(e){return ae(this._value,e)?this.size:-1},le.prototype.__iterate=function(e,t){for(var n=0;n=0&&t=0&&nn?{value:void 0,done:!0}:L(e,o++,a)}))},ce.prototype.equals=function(e){return e instanceof ce?this._start===e._start&&this._end===e._end&&this._step===e._step:se(this,e)},t(de,n),t(fe,de),t(pe,de),t(he,de),de.Keyed=fe,de.Indexed=pe,de.Set=he;var me="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){var n=65535&(e|=0),r=65535&(t|=0);return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0};function ge(e){return e>>>1&1073741824|3221225471&e}function ve(e){if(!1===e||null==e)return 0;if("function"==typeof e.valueOf&&(!1===(e=e.valueOf())||null==e))return 0;if(!0===e)return 1;var t=typeof e;if("number"===t){if(e!=e||e===1/0)return 0;var n=0|e;for(n!==e&&(n^=4294967295*e);e>4294967295;)n^=e/=4294967295;return ge(n)}if("string"===t)return e.length>Se?function(e){var t=Te[e];return void 0===t&&(t=ye(e),Ce===Oe&&(Ce=0,Te={}),Ce++,Te[e]=t),t}(e):ye(e);if("function"==typeof e.hashCode)return e.hashCode();if("object"===t)return function(e){var t;if(xe&&void 0!==(t=be.get(e)))return t;if(void 0!==(t=e[Ee]))return t;if(!we){if(void 0!==(t=e.propertyIsEnumerable&&e.propertyIsEnumerable[Ee]))return t;if(void 0!==(t=function(e){if(e&&e.nodeType>0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}(e)))return t}if(t=++ke,1073741824&ke&&(ke=0),xe)be.set(e,t);else{if(void 0!==_e&&!1===_e(e))throw new Error("Non-extensible objects are not allowed as keys.");if(we)Object.defineProperty(e,Ee,{enumerable:!1,configurable:!1,writable:!1,value:t});else if(void 0!==e.propertyIsEnumerable&&e.propertyIsEnumerable===e.constructor.prototype.propertyIsEnumerable)e.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},e.propertyIsEnumerable[Ee]=t;else{if(void 0===e.nodeType)throw new Error("Unable to set a non-enumerable property on object.");e[Ee]=t}}return t}(e);if("function"==typeof e.toString)return ye(e.toString());throw new Error("Value type "+t+" cannot be hashed.")}function ye(e){for(var t=0,n=0;n=t.length)throw new Error("Missing value for key: "+t[n]);e.set(t[n],t[n+1])}}))},Pe.prototype.toString=function(){return this.__toString("Map {","}")},Pe.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},Pe.prototype.set=function(e,t){return $e(this,e,t)},Pe.prototype.setIn=function(e,t){return this.updateIn(e,m,(function(){return t}))},Pe.prototype.remove=function(e){return $e(this,e,m)},Pe.prototype.deleteIn=function(e){return this.updateIn(e,(function(){return m}))},Pe.prototype.update=function(e,t,n){return 1===arguments.length?e(this):this.updateIn([e],t,n)},Pe.prototype.updateIn=function(e,t,n){n||(n=t,t=void 0);var r=function e(t,n,r,i){var o=t===m,a=n.next();if(a.done){var s=o?r:t,l=i(s);return l===s?t:l}ue(o||t&&t.set,"invalid keyPath");var u=a.value,c=o?m:t.get(u,m),d=e(c,n,r,i);return d===c?t:d===m?t.remove(u):(o?He():t).set(u,d)}(this,Yt(e),t,n);return r===m?void 0:r},Pe.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):He()},Pe.prototype.merge=function(){return Ye(this,void 0,arguments)},Pe.prototype.mergeWith=function(t){var n=e.call(arguments,1);return Ye(this,t,n)},Pe.prototype.mergeIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,He(),(function(e){return"function"==typeof e.merge?e.merge.apply(e,n):n[n.length-1]}))},Pe.prototype.mergeDeep=function(){return Ye(this,Qe,arguments)},Pe.prototype.mergeDeepWith=function(t){var n=e.call(arguments,1);return Ye(this,Xe(t),n)},Pe.prototype.mergeDeepIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,He(),(function(e){return"function"==typeof e.mergeDeep?e.mergeDeep.apply(e,n):n[n.length-1]}))},Pe.prototype.sort=function(e){return wt(Ft(this,e))},Pe.prototype.sortBy=function(e,t){return wt(Ft(this,t,e))},Pe.prototype.withMutations=function(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this},Pe.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new _)},Pe.prototype.asImmutable=function(){return this.__ensureOwner()},Pe.prototype.wasAltered=function(){return this.__altered},Pe.prototype.__iterator=function(e,t){return new ze(this,e,t)},Pe.prototype.__iterate=function(e,t){var n=this,r=0;return this._root&&this._root.iterate((function(t){return r++,e(t[1],t[0],n)}),t),r},Pe.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?We(this.size,this._root,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},Pe.isMap=Re;var je,Ie="@@__IMMUTABLE_MAP__@@",Me=Pe.prototype;function Le(e,t){this.ownerID=e,this.entries=t}function De(e,t,n){this.ownerID=e,this.bitmap=t,this.nodes=n}function Ne(e,t,n){this.ownerID=e,this.count=t,this.nodes=n}function Fe(e,t,n){this.ownerID=e,this.keyHash=t,this.entries=n}function Be(e,t,n){this.ownerID=e,this.keyHash=t,this.entry=n}function ze(e,t,n){this._type=t,this._reverse=n,this._stack=e._root&&qe(e._root)}function Ue(e,t){return L(e,t[0],t[1])}function qe(e,t){return{node:e,index:0,__prev:t}}function We(e,t,n,r){var i=Object.create(Me);return i.size=e,i._root=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function He(){return je||(je=We(0))}function $e(e,t,n){var r,i;if(e._root){var o=y(g),a=y(v);if(r=Ve(e._root,e.__ownerID,0,void 0,t,n,o,a),!a.value)return e;i=e.size+(o.value?n===m?-1:1:0)}else{if(n===m)return e;i=1,r=new Le(e.__ownerID,[[t,n]])}return e.__ownerID?(e.size=i,e._root=r,e.__hash=void 0,e.__altered=!0,e):r?We(i,r):He()}function Ve(e,t,n,r,i,o,a,s){return e?e.update(t,n,r,i,o,a,s):o===m?e:(b(s),b(a),new Be(t,r,[i,o]))}function Ge(e){return e.constructor===Be||e.constructor===Fe}function Ke(e,t,n,r,i){if(e.keyHash===r)return new Fe(t,r,[e.entry,i]);var o,a=31&(0===n?e.keyHash:e.keyHash>>>n),s=31&(0===n?r:r>>>n);return new De(t,1<>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135,e+=e>>8,127&(e+=e>>16)}function et(e,t,n,r){var i=r?e:w(e);return i[t]=n,i}Me[Ie]=!0,Me.delete=Me.remove,Me.removeIn=Me.deleteIn,Le.prototype.get=function(e,t,n,r){for(var i=this.entries,o=0,a=i.length;o=tt)return function(e,t,n,r){e||(e=new _);for(var i=new Be(e,ve(n),[n,r]),o=0;o>>e)),o=this.bitmap;return 0==(o&i)?r:this.nodes[Je(o&i-1)].get(e+5,t,n,r)},De.prototype.update=function(e,t,n,r,i,o,a){void 0===n&&(n=ve(r));var s=31&(0===t?n:n>>>t),l=1<=nt)return function(e,t,n,r,i){for(var o=0,a=new Array(32),s=0;0!==n;s++,n>>>=1)a[s]=1&n?t[o++]:void 0;return a[r]=i,new Ne(e,o+1,a)}(e,f,u,s,h);if(c&&!h&&2===f.length&&Ge(f[1^d]))return f[1^d];if(c&&h&&1===f.length&&Ge(h))return h;var g=e&&e===this.ownerID,v=c?h?u:u^l:u|l,y=c?h?et(f,d,h,g):function(e,t,n){var r=e.length-1;if(n&&t===r)return e.pop(),e;for(var i=new Array(r),o=0,a=0;a>>e),o=this.nodes[i];return o?o.get(e+5,t,n,r):r},Ne.prototype.update=function(e,t,n,r,i,o,a){void 0===n&&(n=ve(r));var s=31&(0===t?n:n>>>t),l=i===m,u=this.nodes,c=u[s];if(l&&!c)return this;var d=Ve(c,e,t+5,n,r,i,o,a);if(d===c)return this;var f=this.count;if(c){if(!d&&--f0&&r<32?pt(0,r,5,null,new lt(n.toArray())):t.withMutations((function(e){e.setSize(r),n.forEach((function(t,n){return e.set(n,t)}))})))}function ot(e){return!(!e||!e[at])}t(it,pe),it.of=function(){return this(arguments)},it.prototype.toString=function(){return this.__toString("List [","]")},it.prototype.get=function(e,t){if((e=k(this,e))>=0&&e=e.size||t<0)return e.withMutations((function(e){t<0?yt(e,t).set(0,n):yt(e,0,t+1).set(t,n)}));t+=e._origin;var r=e._tail,i=e._root,o=y(v);return t>=_t(e._capacity)?r=mt(r,e.__ownerID,0,t,n,o):i=mt(i,e.__ownerID,e._level,t,n,o),o.value?e.__ownerID?(e._root=i,e._tail=r,e.__hash=void 0,e.__altered=!0,e):pt(e._origin,e._capacity,e._level,i,r):e}(this,e,t)},it.prototype.remove=function(e){return this.has(e)?0===e?this.shift():e===this.size-1?this.pop():this.splice(e,1):this},it.prototype.insert=function(e,t){return this.splice(e,0,t)},it.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=5,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):ht()},it.prototype.push=function(){var e=arguments,t=this.size;return this.withMutations((function(n){yt(n,0,t+e.length);for(var r=0;r>>t&31;if(r>=this.array.length)return new lt([],e);var i,o=0===r;if(t>0){var a=this.array[r];if((i=a&&a.removeBefore(e,t-5,n))===a&&o)return this}if(o&&!i)return this;var s=gt(this,e);if(!o)for(var l=0;l>>t&31;if(i>=this.array.length)return this;if(t>0){var o=this.array[i];if((r=o&&o.removeAfter(e,t-5,n))===o&&i===this.array.length-1)return this}var a=gt(this,e);return a.array.splice(i+1),r&&(a.array[i]=r),a};var ut,ct,dt={};function ft(e,t){var n=e._origin,r=e._capacity,i=_t(r),o=e._tail;return a(e._root,e._level,0);function a(e,s,l){return 0===s?function(e,a){var s=a===i?o&&o.array:e&&e.array,l=a>n?0:n-a,u=r-a;return u>32&&(u=32),function(){if(l===u)return dt;var e=t?--u:l++;return s&&s[e]}}(e,l):function(e,i,o){var s,l=e&&e.array,u=o>n?0:n-o>>i,c=1+(r-o>>i);return c>32&&(c=32),function(){for(;;){if(s){var e=s();if(e!==dt)return e;s=null}if(u===c)return dt;var n=t?--c:u++;s=a(l&&l[n],i-5,o+(n<>>n&31,l=e&&s0){var u=e&&e.array[s],c=mt(u,t,n-5,r,i,o);return c===u?e:((a=gt(e,t)).array[s]=c,a)}return l&&e.array[s]===i?e:(b(o),a=gt(e,t),void 0===i&&s===a.array.length-1?a.array.pop():a.array[s]=i,a)}function gt(e,t){return t&&e&&t===e.ownerID?e:new lt(e?e.array.slice():[],t)}function vt(e,t){if(t>=_t(e._capacity))return e._tail;if(t<1<0;)n=n.array[t>>>r&31],r-=5;return n}}function yt(e,t,n){void 0!==t&&(t|=0),void 0!==n&&(n|=0);var r=e.__ownerID||new _,i=e._origin,o=e._capacity,a=i+t,s=void 0===n?o:n<0?o+n:i+n;if(a===i&&s===o)return e;if(a>=s)return e.clear();for(var l=e._level,u=e._root,c=0;a+c<0;)u=new lt(u&&u.array.length?[void 0,u]:[],r),c+=1<<(l+=5);c&&(a+=c,i+=c,s+=c,o+=c);for(var d=_t(o),f=_t(s);f>=1<d?new lt([],r):p;if(p&&f>d&&a5;g-=5){var v=d>>>g&31;m=m.array[v]=gt(m.array[v],r)}m.array[d>>>5&31]=p}if(s=f)a-=f,s-=f,l=5,u=null,h=h&&h.removeBefore(r,0,a);else if(a>i||f>>l&31;if(y!==f>>>l&31)break;y&&(c+=(1<i&&(u=u.removeBefore(r,l,a-c)),u&&fo&&(o=u.size),a(l)||(u=u.map((function(e){return re(e)}))),r.push(u)}return o>e.size&&(e=e.setSize(o)),Ze(e,t,r)}function _t(e){return e<32?0:e-1>>>5<<5}function wt(e){return null==e?Et():xt(e)?e:Et().withMutations((function(t){var n=r(e);Ae(n.size),n.forEach((function(e,n){return t.set(n,e)}))}))}function xt(e){return Re(e)&&c(e)}function kt(e,t,n,r){var i=Object.create(wt.prototype);return i.size=e?e.size:0,i._map=e,i._list=t,i.__ownerID=n,i.__hash=r,i}function Et(){return ct||(ct=kt(He(),ht()))}function St(e,t,n){var r,i,o=e._map,a=e._list,s=o.get(t),l=void 0!==s;if(n===m){if(!l)return e;a.size>=32&&a.size>=2*o.size?(r=(i=a.filter((function(e,t){return void 0!==e&&s!==t}))).toKeyedSeq().map((function(e){return e[0]})).flip().toMap(),e.__ownerID&&(r.__ownerID=i.__ownerID=e.__ownerID)):(r=o.remove(t),i=s===a.size-1?a.pop():a.set(s,void 0))}else if(l){if(n===a.get(s)[1])return e;r=o,i=a.set(s,[t,n])}else r=o.set(t,a.size),i=a.set(a.size,[t,n]);return e.__ownerID?(e.size=r.size,e._map=r,e._list=i,e.__hash=void 0,e):kt(r,i)}function Ot(e,t){this._iter=e,this._useKeys=t,this.size=e.size}function Ct(e){this._iter=e,this.size=e.size}function Tt(e){this._iter=e,this.size=e.size}function At(e){this._iter=e,this.size=e.size}function Pt(e){var t=Vt(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=Gt,t.__iterateUncached=function(t,n){var r=this;return e.__iterate((function(e,n){return!1!==t(n,e,r)}),n)},t.__iteratorUncached=function(t,n){if(2===t){var r=e.__iterator(t,n);return new M((function(){var e=r.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e}))}return e.__iterator(1===t?0:1,n)},t}function Rt(e,t,n){var r=Vt(e);return r.size=e.size,r.has=function(t){return e.has(t)},r.get=function(r,i){var o=e.get(r,m);return o===m?i:t.call(n,o,r,e)},r.__iterateUncached=function(r,i){var o=this;return e.__iterate((function(e,i,a){return!1!==r(t.call(n,e,i,a),i,o)}),i)},r.__iteratorUncached=function(r,i){var o=e.__iterator(2,i);return new M((function(){var i=o.next();if(i.done)return i;var a=i.value,s=a[0];return L(r,s,t.call(n,a[1],s,e),i)}))},r}function jt(e,t){var n=Vt(e);return n._iter=e,n.size=e.size,n.reverse=function(){return e},e.flip&&(n.flip=function(){var t=Pt(e);return t.reverse=function(){return e.flip()},t}),n.get=function(n,r){return e.get(t?n:-1-n,r)},n.has=function(n){return e.has(t?n:-1-n)},n.includes=function(t){return e.includes(t)},n.cacheResult=Gt,n.__iterate=function(t,n){var r=this;return e.__iterate((function(e,n){return t(e,n,r)}),!n)},n.__iterator=function(t,n){return e.__iterator(t,!n)},n}function It(e,t,n,r){var i=Vt(e);return r&&(i.has=function(r){var i=e.get(r,m);return i!==m&&!!t.call(n,i,r,e)},i.get=function(r,i){var o=e.get(r,m);return o!==m&&t.call(n,o,r,e)?o:i}),i.__iterateUncached=function(i,o){var a=this,s=0;return e.__iterate((function(e,o,l){if(t.call(n,e,o,l))return s++,i(e,r?o:s-1,a)}),o),s},i.__iteratorUncached=function(i,o){var a=e.__iterator(2,o),s=0;return new M((function(){for(;;){var o=a.next();if(o.done)return o;var l=o.value,u=l[0],c=l[1];if(t.call(n,c,u,e))return L(i,r?u:s++,c,o)}}))},i}function Mt(e,t,n,r){var i=e.size;if(void 0!==t&&(t|=0),void 0!==n&&(n===1/0?n=i:n|=0),S(t,n,i))return e;var o=O(t,i),a=C(n,i);if(o!=o||a!=a)return Mt(e.toSeq().cacheResult(),t,n,r);var s,l=a-o;l==l&&(s=l<0?0:l);var u=Vt(e);return u.size=0===s?s:e.size&&s||void 0,!r&&Q(e)&&s>=0&&(u.get=function(t,n){return(t=k(this,t))>=0&&ts)return{value:void 0,done:!0};var e=i.next();return r||1===t?e:L(t,l-1,0===t?void 0:e.value[1],e)}))},u}function Lt(e,t,n,r){var i=Vt(e);return i.__iterateUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterate(i,o);var s=!0,l=0;return e.__iterate((function(e,o,u){if(!s||!(s=t.call(n,e,o,u)))return l++,i(e,r?o:l-1,a)})),l},i.__iteratorUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterator(i,o);var s=e.__iterator(2,o),l=!0,u=0;return new M((function(){var e,o,c;do{if((e=s.next()).done)return r||1===i?e:L(i,u++,0===i?void 0:e.value[1],e);var d=e.value;o=d[0],c=d[1],l&&(l=t.call(n,c,o,a))}while(l);return 2===i?e:L(i,o,c,e)}))},i}function Dt(e,t){var n=s(e),i=[e].concat(t).map((function(e){return a(e)?n&&(e=r(e)):e=n?Z(e):J(Array.isArray(e)?e:[e]),e})).filter((function(e){return 0!==e.size}));if(0===i.length)return e;if(1===i.length){var o=i[0];if(o===e||n&&s(o)||l(e)&&l(o))return o}var u=new V(i);return n?u=u.toKeyedSeq():l(e)||(u=u.toSetSeq()),(u=u.flatten(!0)).size=i.reduce((function(e,t){if(void 0!==e){var n=t.size;if(void 0!==n)return e+n}}),0),u}function Nt(e,t,n){var r=Vt(e);return r.__iterateUncached=function(r,i){var o=0,s=!1;return function e(l,u){var c=this;l.__iterate((function(i,l){return(!t||u0}function Ut(e,t,r){var i=Vt(e);return i.size=new V(r).map((function(e){return e.size})).min(),i.__iterate=function(e,t){for(var n,r=this.__iterator(1,t),i=0;!(n=r.next()).done&&!1!==e(n.value,i++,this););return i},i.__iteratorUncached=function(e,i){var o=r.map((function(e){return e=n(e),B(i?e.reverse():e)})),a=0,s=!1;return new M((function(){var n;return s||(n=o.map((function(e){return e.next()})),s=n.some((function(e){return e.done}))),s?{value:void 0,done:!0}:L(e,a++,t.apply(null,n.map((function(e){return e.value}))))}))},i}function qt(e,t){return Q(e)?t:e.constructor(t)}function Wt(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function Ht(e){return Ae(e.size),x(e)}function $t(e){return s(e)?r:l(e)?i:o}function Vt(e){return Object.create((s(e)?W:l(e)?H:$).prototype)}function Gt(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):q.prototype.cacheResult.call(this)}function Kt(e,t){return e>t?1:e=0;n--)t={value:arguments[n],next:t};return this.__ownerID?(this.size=e,this._head=t,this.__hash=void 0,this.__altered=!0,this):wn(e,t)},gn.prototype.pushAll=function(e){if(0===(e=i(e)).size)return this;Ae(e.size);var t=this.size,n=this._head;return e.reverse().forEach((function(e){t++,n={value:e,next:n}})),this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):wn(t,n)},gn.prototype.pop=function(){return this.slice(1)},gn.prototype.unshift=function(){return this.push.apply(this,arguments)},gn.prototype.unshiftAll=function(e){return this.pushAll(e)},gn.prototype.shift=function(){return this.pop.apply(this,arguments)},gn.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):xn()},gn.prototype.slice=function(e,t){if(S(e,t,this.size))return this;var n=O(e,this.size);if(C(t,this.size)!==this.size)return pe.prototype.slice.call(this,e,t);for(var r=this.size-n,i=this._head;n--;)i=i.next;return this.__ownerID?(this.size=r,this._head=i,this.__hash=void 0,this.__altered=!0,this):wn(r,i)},gn.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?wn(this.size,this._head,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},gn.prototype.__iterate=function(e,t){if(t)return this.reverse().__iterate(e);for(var n=0,r=this._head;r&&!1!==e(r.value,n++,this);)r=r.next;return n},gn.prototype.__iterator=function(e,t){if(t)return this.reverse().__iterator(e);var n=0,r=this._head;return new M((function(){if(r){var t=r.value;return r=r.next,L(e,n++,t)}return{value:void 0,done:!0}}))},gn.isStack=vn;var yn,bn="@@__IMMUTABLE_STACK__@@",_n=gn.prototype;function wn(e,t,n,r){var i=Object.create(_n);return i.size=e,i._head=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function xn(){return yn||(yn=wn(0))}function kn(e,t){var n=function(n){e.prototype[n]=t[n]};return Object.keys(t).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(n),e}_n[bn]=!0,_n.withMutations=Me.withMutations,_n.asMutable=Me.asMutable,_n.asImmutable=Me.asImmutable,_n.wasAltered=Me.wasAltered,n.Iterator=M,kn(n,{toArray:function(){Ae(this.size);var e=new Array(this.size||0);return this.valueSeq().__iterate((function(t,n){e[n]=t})),e},toIndexedSeq:function(){return new Ct(this)},toJS:function(){return this.toSeq().map((function(e){return e&&"function"==typeof e.toJS?e.toJS():e})).__toJS()},toJSON:function(){return this.toSeq().map((function(e){return e&&"function"==typeof e.toJSON?e.toJSON():e})).__toJS()},toKeyedSeq:function(){return new Ot(this,!0)},toMap:function(){return Pe(this.toKeyedSeq())},toObject:function(){Ae(this.size);var e={};return this.__iterate((function(t,n){e[n]=t})),e},toOrderedMap:function(){return wt(this.toKeyedSeq())},toOrderedSet:function(){return cn(s(this)?this.valueSeq():this)},toSet:function(){return tn(s(this)?this.valueSeq():this)},toSetSeq:function(){return new Tt(this)},toSeq:function(){return l(this)?this.toIndexedSeq():s(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return gn(s(this)?this.valueSeq():this)},toList:function(){return it(s(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){var t=e.call(arguments,0);return qt(this,Dt(this,t))},includes:function(e){return this.some((function(t){return ae(t,e)}))},entries:function(){return this.__iterator(2)},every:function(e,t){Ae(this.size);var n=!0;return this.__iterate((function(r,i,o){if(!e.call(t,r,i,o))return n=!1,!1})),n},filter:function(e,t){return qt(this,It(this,e,t,!0))},find:function(e,t,n){var r=this.findEntry(e,t);return r?r[1]:n},forEach:function(e,t){return Ae(this.size),this.__iterate(t?e.bind(t):e)},join:function(e){Ae(this.size),e=void 0!==e?""+e:",";var t="",n=!0;return this.__iterate((function(r){n?n=!1:t+=e,t+=null!=r?r.toString():""})),t},keys:function(){return this.__iterator(0)},map:function(e,t){return qt(this,Rt(this,e,t))},reduce:function(e,t,n){var r,i;return Ae(this.size),arguments.length<2?i=!0:r=t,this.__iterate((function(t,o,a){i?(i=!1,r=t):r=e.call(n,r,t,o,a)})),r},reduceRight:function(e,t,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return qt(this,jt(this,!0))},slice:function(e,t){return qt(this,Mt(this,e,t,!0))},some:function(e,t){return!this.every(Tn(e),t)},sort:function(e){return qt(this,Ft(this,e))},values:function(){return this.__iterator(1)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some((function(){return!0}))},count:function(e,t){return x(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return function(e,t,n){var r=Pe().asMutable();return e.__iterate((function(i,o){r.update(t.call(n,i,o,e),0,(function(e){return e+1}))})),r.asImmutable()}(this,e,t)},equals:function(e){return se(this,e)},entrySeq:function(){var e=this;if(e._cache)return new V(e._cache);var t=e.toSeq().map(Cn).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq()},t},filterNot:function(e,t){return this.filter(Tn(e),t)},findEntry:function(e,t,n){var r=n;return this.__iterate((function(n,i,o){if(e.call(t,n,i,o))return r=[i,n],!1})),r},findKey:function(e,t){var n=this.findEntry(e,t);return n&&n[0]},findLast:function(e,t,n){return this.toKeyedSeq().reverse().find(e,t,n)},findLastEntry:function(e,t,n){return this.toKeyedSeq().reverse().findEntry(e,t,n)},findLastKey:function(e,t){return this.toKeyedSeq().reverse().findKey(e,t)},first:function(){return this.find(E)},flatMap:function(e,t){return qt(this,function(e,t,n){var r=$t(e);return e.toSeq().map((function(i,o){return r(t.call(n,i,o,e))})).flatten(!0)}(this,e,t))},flatten:function(e){return qt(this,Nt(this,e,!0))},fromEntrySeq:function(){return new At(this)},get:function(e,t){return this.find((function(t,n){return ae(n,e)}),void 0,t)},getIn:function(e,t){for(var n,r=this,i=Yt(e);!(n=i.next()).done;){var o=n.value;if((r=r&&r.get?r.get(o,m):m)===m)return t}return r},groupBy:function(e,t){return function(e,t,n){var r=s(e),i=(c(e)?wt():Pe()).asMutable();e.__iterate((function(o,a){i.update(t.call(n,o,a,e),(function(e){return(e=e||[]).push(r?[a,o]:o),e}))}));var o=$t(e);return i.map((function(t){return qt(e,o(t))}))}(this,e,t)},has:function(e){return this.get(e,m)!==m},hasIn:function(e){return this.getIn(e,m)!==m},isSubset:function(e){return e="function"==typeof e.includes?e:n(e),this.every((function(t){return e.includes(t)}))},isSuperset:function(e){return(e="function"==typeof e.isSubset?e:n(e)).isSubset(this)},keyOf:function(e){return this.findKey((function(t){return ae(t,e)}))},keySeq:function(){return this.toSeq().map(On).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},lastKeyOf:function(e){return this.toKeyedSeq().reverse().keyOf(e)},max:function(e){return Bt(this,e)},maxBy:function(e,t){return Bt(this,t,e)},min:function(e){return Bt(this,e?An(e):jn)},minBy:function(e,t){return Bt(this,t?An(t):jn,e)},rest:function(){return this.slice(1)},skip:function(e){return this.slice(Math.max(0,e))},skipLast:function(e){return qt(this,this.toSeq().reverse().skip(e).reverse())},skipWhile:function(e,t){return qt(this,Lt(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(Tn(e),t)},sortBy:function(e,t){return qt(this,Ft(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return qt(this,this.toSeq().reverse().take(e).reverse())},takeWhile:function(e,t){return qt(this,function(e,t,n){var r=Vt(e);return r.__iterateUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterate(r,i);var a=0;return e.__iterate((function(e,i,s){return t.call(n,e,i,s)&&++a&&r(e,i,o)})),a},r.__iteratorUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterator(r,i);var a=e.__iterator(2,i),s=!0;return new M((function(){if(!s)return{value:void 0,done:!0};var e=a.next();if(e.done)return e;var i=e.value,l=i[0],u=i[1];return t.call(n,u,l,o)?2===r?e:L(r,l,u,e):(s=!1,{value:void 0,done:!0})}))},r}(this,e,t))},takeUntil:function(e,t){return this.takeWhile(Tn(e),t)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=function(e){if(e.size===1/0)return 0;var t=c(e),n=s(e),r=t?1:0;return function(e,t){return t=me(t,3432918353),t=me(t<<15|t>>>-15,461845907),t=me(t<<13|t>>>-13,5),t=me((t=(t+3864292196|0)^e)^t>>>16,2246822507),t=ge((t=me(t^t>>>13,3266489909))^t>>>16)}(e.__iterate(n?t?function(e,t){r=31*r+In(ve(e),ve(t))|0}:function(e,t){r=r+In(ve(e),ve(t))|0}:t?function(e){r=31*r+ve(e)|0}:function(e){r=r+ve(e)|0}),r)}(this))}});var En=n.prototype;En[d]=!0,En[I]=En.values,En.__toJS=En.toArray,En.__toStringMapper=Pn,En.inspect=En.toSource=function(){return this.toString()},En.chain=En.flatMap,En.contains=En.includes,kn(r,{flip:function(){return qt(this,Pt(this))},mapEntries:function(e,t){var n=this,r=0;return qt(this,this.toSeq().map((function(i,o){return e.call(t,[o,i],r++,n)})).fromEntrySeq())},mapKeys:function(e,t){var n=this;return qt(this,this.toSeq().flip().map((function(r,i){return e.call(t,r,i,n)})).flip())}});var Sn=r.prototype;function On(e,t){return t}function Cn(e,t){return[t,e]}function Tn(e){return function(){return!e.apply(this,arguments)}}function An(e){return function(){return-e.apply(this,arguments)}}function Pn(e){return"string"==typeof e?JSON.stringify(e):String(e)}function Rn(){return w(arguments)}function jn(e,t){return et?-1:0}function In(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}return Sn[f]=!0,Sn[I]=En.entries,Sn.__toJS=En.toObject,Sn.__toStringMapper=function(e,t){return JSON.stringify(t)+": "+Pn(e)},kn(i,{toKeyedSeq:function(){return new Ot(this,!1)},filter:function(e,t){return qt(this,It(this,e,t,!1))},findIndex:function(e,t){var n=this.findEntry(e,t);return n?n[0]:-1},indexOf:function(e){var t=this.keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.lastKeyOf(e);return void 0===t?-1:t},reverse:function(){return qt(this,jt(this,!1))},slice:function(e,t){return qt(this,Mt(this,e,t,!1))},splice:function(e,t){var n=arguments.length;if(t=Math.max(0|t,0),0===n||2===n&&!t)return this;e=O(e,e<0?this.count():this.size);var r=this.slice(0,e);return qt(this,1===n?r:r.concat(w(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var n=this.findLastEntry(e,t);return n?n[0]:-1},first:function(){return this.get(0)},flatten:function(e){return qt(this,Nt(this,e,!1))},get:function(e,t){return(e=k(this,e))<0||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find((function(t,n){return n===e}),void 0,t)},has:function(e){return(e=k(this,e))>=0&&(void 0!==this.size?this.size===1/0||e2),g=/Android/.test(e),v=m||g||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),y=m||/Mac/.test(t),b=/\bCrOS\b/.test(e),_=/win/i.test(t),w=d&&e.match(/Version\/(\d*\.\d*)/);w&&(w=Number(w[1])),w&&w>=15&&(d=!1,l=!0);var x=y&&(u||d&&(null==w||w<12.11)),k=n||a&&s>=9;function E(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var S,O=function(e,t){var n=e.className,r=E(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function C(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function T(e,t){return C(e).appendChild(t)}function A(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o=t)return a+(t-o);a+=s-o,a+=n-a%n,o=s+1}}m?L=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:a&&(L=function(e){try{e.select()}catch(e){}});var B=function(){this.id=null,this.f=null,this.time=0,this.handler=D(this.onTimeout,this)};function z(e,t){for(var n=0;n=t)return r+Math.min(a,t-i);if(i+=o-r,r=o+1,(i+=n-i%n)>=t)return r}}var V=[""];function G(e){for(;V.length<=e;)V.push(K(V)+" ");return V[e]}function K(e){return e[e.length-1]}function Y(e,t){for(var n=[],r=0;r"€"&&(e.toUpperCase()!=e.toLowerCase()||Z.test(e))}function ee(e,t){return t?!!(t.source.indexOf("\\w")>-1&&J(e))||t.test(e):J(e)}function te(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ne=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function re(e){return e.charCodeAt(0)>=768&&ne.test(e)}function ie(e,t,n){for(;(n<0?t>0:tn?-1:1;;){if(t==n)return t;var i=(t+n)/2,o=r<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:n;e(o)?n=o:t=o+r}}var ae=null;function se(e,t,n){var r;ae=null;for(var i=0;it)return i;o.to==t&&(o.from!=o.to&&"before"==n?r=i:ae=i),o.from==t&&(o.from!=o.to&&"before"!=n?r=i:ae=i)}return null!=r?r:ae}var le=function(){var e=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,t=/[stwN]/,n=/[LRr]/,r=/[Lb1n]/,i=/[1n]/;function o(e,t,n){this.level=e,this.from=t,this.to=n}return function(a,s){var l="ltr"==s?"L":"R";if(0==a.length||"ltr"==s&&!e.test(a))return!1;for(var u,c=a.length,d=[],f=0;f-1&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function he(e,t){var n=fe(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i0}function ye(e){e.prototype.on=function(e,t){de(this,e,t)},e.prototype.off=function(e,t){pe(this,e,t)}}function be(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function _e(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function we(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function xe(e){be(e),_e(e)}function ke(e){return e.target||e.srcElement}function Ee(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),y&&e.ctrlKey&&1==t&&(t=3),t}var Se,Oe,Ce=function(){if(a&&s<9)return!1;var e=A("div");return"draggable"in e||"dragDrop"in e}();function Te(e){if(null==Se){var t=A("span","​");T(e,A("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Se=t.offsetWidth<=1&&t.offsetHeight>2&&!(a&&s<8))}var n=Se?A("span","​"):A("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Ae(e){if(null!=Oe)return Oe;var t=T(e,document.createTextNode("AخA")),n=S(t,0,1).getBoundingClientRect(),r=S(t,1,2).getBoundingClientRect();return C(e),!(!n||n.left==n.right)&&(Oe=r.right-n.right<3)}var Pe,Re=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),a=o.indexOf("\r");-1!=a?(n.push(o.slice(0,a)),t+=a+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},je=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Ie="oncopy"in(Pe=A("div"))||(Pe.setAttribute("oncopy","return;"),"function"==typeof Pe.oncopy),Me=null,Le={},De={};function Ne(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Le[e]=t}function Fe(e){if("string"==typeof e&&De.hasOwnProperty(e))e=De[e];else if(e&&"string"==typeof e.name&&De.hasOwnProperty(e.name)){var t=De[e.name];"string"==typeof t&&(t={name:t}),(e=X(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Fe("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Fe("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Be(e,t){t=Fe(t);var n=Le[t.name];if(!n)return Be(e,"text/plain");var r=n(e,t);if(ze.hasOwnProperty(t.name)){var i=ze[t.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)r[a]=t.modeProps[a];return r}var ze={};function Ue(e,t){N(t,ze.hasOwnProperty(e)?ze[e]:ze[e]={})}function qe(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function We(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}}function He(e,t,n){return!e.startState||e.startState(t,n)}var $e=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function Ve(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(t=e.first&&tn?et(n,Ve(e,n).text.length):function(e,t){var n=e.ch;return null==n||n>t?et(e.line,t):n<0?et(e.line,0):e}(t,Ve(e,t.line).text.length)}function lt(e,t){for(var n=[],r=0;r=this.string.length},$e.prototype.sol=function(){return this.pos==this.lineStart},$e.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},$e.prototype.next=function(){if(this.post},$e.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},$e.prototype.skipToEnd=function(){this.pos=this.string.length},$e.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},$e.prototype.backUp=function(e){this.pos-=e},$e.prototype.column=function(){return this.lastColumnPos0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},$e.prototype.current=function(){return this.string.slice(this.start,this.pos)},$e.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},$e.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},$e.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var ut=function(e,t){this.state=e,this.lookAhead=t},ct=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function dt(e,t,n,r){var i=[e.state.modeGen],o={};_t(e,t.text,e.doc.mode,n,(function(e,t){return i.push(e,t)}),o,r);for(var a=n.state,s=function(r){n.baseTokens=i;var s=e.state.overlays[r],l=1,u=0;n.state=!0,_t(e,t.text,s.mode,n,(function(e,t){for(var n=l;ue&&i.splice(l,1,e,i[l+1],r),l+=2,u=Math.min(e,r)}if(t)if(s.opaque)i.splice(n,l-n,e,"overlay "+t),l=n+2;else for(;ne.options.maxHighlightLength&&qe(e.doc.mode,r.state),o=dt(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function pt(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new ct(r,!0,t);var o=function(e,t,n){for(var r,i,o=e.doc,a=n?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>a;--s){if(s<=o.first)return o.first;var l=Ve(o,s-1),u=l.stateAfter;if(u&&(!n||s+(u instanceof ut?u.lookAhead:0)<=o.modeFrontier))return s;var c=F(l.text,null,e.options.tabSize);(null==i||r>c)&&(i=s-1,r=c)}return i}(e,t,n),a=o>r.first&&Ve(r,o-1).stateAfter,s=a?ct.fromSaved(r,a,o):new ct(r,He(r.mode),o);return r.iter(o,t,(function(n){ht(e,n.text,s);var r=s.line;n.stateAfter=r==t-1||r%5==0||r>=i.viewFrom&&rt.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}ct.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},ct.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},ct.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ct.fromSaved=function(e,t,n){return t instanceof ut?new ct(e,qe(e.mode,t.state),n,t.lookAhead):new ct(e,qe(e.mode,t),n)},ct.prototype.save=function(e){var t=!1!==e?qe(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ut(t,this.maxLookAhead):t};var vt=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function yt(e,t,n,r){var i,o,a=e.doc,s=a.mode,l=Ve(a,(t=st(a,t)).line),u=pt(e,t.line,n),c=new $e(l.text,e.options.tabSize,u);for(r&&(o=[]);(r||c.pose.options.maxHighlightLength?(s=!1,a&&ht(e,t,r,d.pos),d.pos=t.length,l=null):l=bt(gt(n,d,r.state,f),o),f){var p=f[0].name;p&&(l="m-"+(l?p+" "+l:p))}if(!s||c!=l){for(;u=t:o.to>t);(r||(r=[])).push(new kt(a,o.from,s?null:o.to))}}return r}(n,i,a),l=function(e,t,n){var r;if(e)for(var i=0;i=t:o.to>t)||o.from==t&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var s=null==o.from||(a.inclusiveLeft?o.from<=t:o.from0&&s)for(var b=0;bt)&&(!n||jt(n,o.marker)<0)&&(n=o.marker)}return n}function Nt(e,t,n,r,i){var o=Ve(e,t),a=xt&&o.markedSpans;if(a)for(var s=0;s=0&&d<=0||c<=0&&d>=0)&&(c<=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?tt(u.to,n)>=0:tt(u.to,n)>0)||c>=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?tt(u.from,r)<=0:tt(u.from,r)<0)))return!0}}}function Ft(e){for(var t;t=Mt(e);)e=t.find(-1,!0).line;return e}function Bt(e,t){var n=Ve(e,t),r=Ft(n);return n==r?t:Qe(r)}function zt(e,t){if(t>e.lastLine())return t;var n,r=Ve(e,t);if(!Ut(e,r))return t;for(;n=Lt(r);)r=n.find(1,!0).line;return Qe(r)+1}function Ut(e,t){var n=xt&&t.markedSpans;if(n)for(var r=void 0,i=0;it.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)}))}var Vt=function(e,t,n){this.text=e,At(this,t),this.height=n?n(this):1};function Gt(e){e.parent=null,Tt(e)}Vt.prototype.lineNo=function(){return Qe(this)},ye(Vt);var Kt={},Yt={};function Qt(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?Yt:Kt;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function Xt(e,t){var n=P("span",null,null,l?"padding-right: .1px":null),r={pre:P("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,a=void 0;r.pos=0,r.addToken=Jt,Ae(e.display.measure)&&(a=ue(o,e.doc.direction))&&(r.addToken=en(r.addToken,a)),r.map=[],nn(o,r,ft(e,o,t!=e.display.externalMeasured&&Qe(o))),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=M(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=M(o.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Te(e.display.measure))),0==i?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(l){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return he(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=M(r.pre.className,r.textClass||"")),r}function Zt(e){var t=A("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Jt(e,t,n,r,i,o,l){if(t){var u,c=e.splitSpaces?function(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;iu&&d.from<=u);f++);if(d.to>=c)return e(n,r,i,o,a,s,l);e(n,r.slice(0,d.to-u),i,o,null,s,l),o=null,r=r.slice(d.to-u),u=d.to}}}function tn(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function nn(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var a,s,l,u,c,d,f,p=i.length,h=0,m=1,g="",v=0;;){if(v==h){l=u=c=s="",f=null,d=null,v=1/0;for(var y=[],b=void 0,_=0;_h||x.collapsed&&w.to==h&&w.from==h)){if(null!=w.to&&w.to!=h&&v>w.to&&(v=w.to,u=""),x.className&&(l+=" "+x.className),x.css&&(s=(s?s+";":"")+x.css),x.startStyle&&w.from==h&&(c+=" "+x.startStyle),x.endStyle&&w.to==v&&(b||(b=[])).push(x.endStyle,w.to),x.title&&((f||(f={})).title=x.title),x.attributes)for(var k in x.attributes)(f||(f={}))[k]=x.attributes[k];x.collapsed&&(!d||jt(d.marker,x)<0)&&(d=w)}else w.from>h&&v>w.from&&(v=w.from)}if(b)for(var E=0;E=p)break;for(var O=Math.min(p,v);;){if(g){var C=h+g.length;if(!d){var T=C>O?g.slice(0,O-h):g;t.addToken(t,T,a?a+l:l,c,h+T.length==v?u:"",s,f)}if(C>=O){g=g.slice(O-h),h=O;break}h=C,c=""}g=i.slice(o,o=n[m++]),a=Qt(n[m++],t.cm.options)}}else for(var A=1;An)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}}function Pn(e,t,n,r){return In(e,jn(e,t),n,r)}function Rn(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&t2&&o.push((l.bottom+u.top)/2-n.top)}}o.push(n.bottom-n.top)}}(e,t.view,t.rect),t.hasHeights=!0),(o=function(e,t,n,r){var i,o=Dn(t.map,n,r),l=o.node,u=o.start,c=o.end,d=o.collapse;if(3==l.nodeType){for(var f=0;f<4;f++){for(;u&&re(t.line.text.charAt(o.coverStart+u));)--u;for(;o.coverStart+c1}(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}(e.display.measure,i))}else{var p;u>0&&(d=r="right"),i=e.options.lineWrapping&&(p=l.getClientRects()).length>1?p["right"==r?p.length-1:0]:l.getBoundingClientRect()}if(a&&s<9&&!u&&(!i||!i.left&&!i.right)){var h=l.parentNode.getClientRects()[0];i=h?{left:h.left,right:h.left+ir(e.display),top:h.top,bottom:h.bottom}:Ln}for(var m=i.top-t.rect.top,g=i.bottom-t.rect.top,v=(m+g)/2,y=t.view.measure.heights,b=0;bt)&&(i=(o=l-s)-1,t>=l&&(a="right")),null!=i){if(r=e[u+2],s==l&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==i)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)r=e[2+(u-=3)],a="left";if("right"==n&&i==l-s)for(;u=0&&(n=e[i]).left==n.right;i--);return n}function Fn(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t=r.text.length?(l=r.text.length,u="before"):l<=0&&(l=0,u="after"),!s)return a("before"==u?l-1:l,"before"==u);function c(e,t,n){return a(n?e-1:e,1==s[t].level!=n)}var d=se(s,l,u),f=ae,p=c(l,d,"before"==u);return null!=f&&(p.other=c(l,f,"before"!=u)),p}function Kn(e,t){var n=0;t=st(e.doc,t),e.options.lineWrapping||(n=ir(e.display)*t.ch);var r=Ve(e.doc,t.line),i=Wt(r)+kn(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Yn(e,t,n,r,i){var o=et(e,t,n);return o.xRel=i,r&&(o.outside=r),o}function Qn(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return Yn(r.first,0,null,-1,-1);var i=Xe(r,n),o=r.first+r.size-1;if(i>o)return Yn(r.first+r.size-1,Ve(r,o).text.length,null,1,1);t<0&&(t=0);for(var a=Ve(r,i);;){var s=er(e,a,i,t,n),l=Dt(a,s.ch+(s.xRel>0||s.outside>0?1:0));if(!l)return s;var u=l.find(1);if(u.line==i)return u;a=Ve(r,i=u.line)}}function Xn(e,t,n,r){r-=Wn(t);var i=t.text.length,o=oe((function(t){return In(e,n,t-1).bottom<=r}),i,0);return{begin:o,end:i=oe((function(t){return In(e,n,t).top>r}),o,i)}}function Zn(e,t,n,r){return n||(n=jn(e,t)),Xn(e,t,n,Hn(e,t,In(e,n,r),"line").top)}function Jn(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function er(e,t,n,r,i){i-=Wt(t);var o=jn(e,t),a=Wn(t),s=0,l=t.text.length,u=!0,c=ue(t,e.doc.direction);if(c){var d=(e.options.lineWrapping?nr:tr)(e,t,n,o,c,r,i);s=(u=1!=d.level)?d.from:d.to-1,l=u?d.to:d.from-1}var f,p,h=null,m=null,g=oe((function(t){var n=In(e,o,t);return n.top+=a,n.bottom+=a,!!Jn(n,r,i,!1)&&(n.top<=i&&n.left<=r&&(h=t,m=n),!0)}),s,l),v=!1;if(m){var y=r-m.left=_.bottom?1:0}return Yn(n,g=ie(t.text,g,1),p,v,r-f)}function tr(e,t,n,r,i,o,a){var s=oe((function(s){var l=i[s],u=1!=l.level;return Jn(Gn(e,et(n,u?l.to:l.from,u?"before":"after"),"line",t,r),o,a,!0)}),0,i.length-1),l=i[s];if(s>0){var u=1!=l.level,c=Gn(e,et(n,u?l.from:l.to,u?"after":"before"),"line",t,r);Jn(c,o,a,!0)&&c.top>a&&(l=i[s-1])}return l}function nr(e,t,n,r,i,o,a){var s=Xn(e,t,r,a),l=s.begin,u=s.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var c=null,d=null,f=0;f=u||p.to<=l)){var h=In(e,r,1!=p.level?Math.min(u,p.to)-1:Math.max(l,p.from)).right,m=hm)&&(c=p,d=m)}}return c||(c=i[i.length-1]),c.fromu&&(c={from:c.from,to:u,level:c.level}),c}function rr(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Mn){Mn=A("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Mn.appendChild(document.createTextNode("x")),Mn.appendChild(A("br"));Mn.appendChild(document.createTextNode("x"))}T(e.measure,Mn);var n=Mn.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),C(e.measure),n||1}function ir(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=A("span","xxxxxxxxxx"),n=A("pre",[t],"CodeMirror-line-like");T(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function or(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,o=t.gutters.firstChild,a=0;o;o=o.nextSibling,++a){var s=e.display.gutterSpecs[a].className;n[s]=o.offsetLeft+o.clientLeft+i,r[s]=o.clientWidth}return{fixedPos:ar(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function ar(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function sr(e){var t=rr(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/ir(e.display)-3);return function(i){if(Ut(e.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;a0&&(l=Ve(e.doc,u.line).text).length==u.ch){var c=F(l,l.length,e.options.tabSize)-l.length;u=et(u.line,Math.max(0,Math.round((o-Sn(e.display).left)/ir(e.display))-c))}return u}function cr(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;rt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)xt&&Bt(e.doc,t)i.viewFrom?pr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)pr(e);else if(t<=i.viewFrom){var o=hr(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):pr(e)}else if(n>=i.viewTo){var a=hr(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):pr(e)}else{var s=hr(e,t,t,-1),l=hr(e,n,n+r,1);s&&l?(i.view=i.view.slice(0,s.index).concat(on(e,s.lineN,l.lineN)).concat(i.view.slice(l.index)),i.viewTo+=r):pr(e)}var u=i.externalMeasured;u&&(n=i.lineN&&t=r.viewTo)){var o=r.view[cr(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==z(a,n)&&a.push(n)}}}function pr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function hr(e,t,n,r){var i,o=cr(e,t),a=e.display.view;if(!xt||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var s=e.display.viewFrom,l=0;l0){if(o==a.length-1)return null;i=s+a[o].size-t,o++}else i=s-t;t+=i,n+=i}for(;Bt(e.doc,n)!=n;){if(o==(r<0?0:a.length-1))return null;n+=r*a[o-(r<0?1:0)].size,o+=r}return{index:o,lineN:n}}function mr(e){for(var t=e.display.view,n=0,r=0;r=e.display.viewTo||l.to().line0?a:e.defaultCharWidth())+"px"}if(r.other){var s=n.appendChild(A("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));s.style.display="",s.style.left=r.other.left+"px",s.style.top=r.other.top+"px",s.style.height=.85*(r.other.bottom-r.other.top)+"px"}}function br(e,t){return e.top-t.top||e.left-t.left}function _r(e,t,n){var r=e.display,i=e.doc,o=document.createDocumentFragment(),a=Sn(e.display),s=a.left,l=Math.max(r.sizerWidth,Cn(e)-r.sizer.offsetLeft)-a.right,u="ltr"==i.direction;function c(e,t,n,r){t<0&&(t=0),t=Math.round(t),r=Math.round(r),o.appendChild(A("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==n?l-e:n)+"px;\n height: "+(r-t)+"px"))}function d(t,n,r){var o,a,d=Ve(i,t),f=d.text.length;function p(n,r){return Vn(e,et(t,n),"div",d,r)}function h(t,n,r){var i=Zn(e,d,null,t),o="ltr"==n==("after"==r)?"left":"right";return p("after"==r?i.begin:i.end-(/\s/.test(d.text.charAt(i.end-1))?2:1),o)[o]}var m=ue(d,i.direction);return function(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var i=!1,o=0;ot||t==n&&a.to==t)&&(r(Math.max(a.from,t),Math.min(a.to,n),1==a.level?"rtl":"ltr",o),i=!0)}i||r(t,n,"ltr")}(m,n||0,null==r?f:r,(function(e,t,i,d){var g="ltr"==i,v=p(e,g?"left":"right"),y=p(t-1,g?"right":"left"),b=null==n&&0==e,_=null==r&&t==f,w=0==d,x=!m||d==m.length-1;if(y.top-v.top<=3){var k=(u?_:b)&&x,E=(u?b:_)&&w?s:(g?v:y).left,S=k?l:(g?y:v).right;c(E,v.top,S-E,v.bottom)}else{var O,C,T,A;g?(O=u&&b&&w?s:v.left,C=u?l:h(e,i,"before"),T=u?s:h(t,i,"after"),A=u&&_&&x?l:y.right):(O=u?h(e,i,"before"):s,C=!u&&b&&w?l:v.right,T=!u&&_&&x?s:y.left,A=u?h(t,i,"after"):l),c(O,v.top,C-O,v.bottom),v.bottom0?t.blinker=setInterval((function(){e.hasFocus()||Sr(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function xr(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||Er(e))}function kr(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Sr(e))}),100)}function Er(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(he(e,"focus",e,t),e.state.focused=!0,I(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),l&&setTimeout((function(){return e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),wr(e))}function Sr(e,t){e.state.delayingBlurEvent||(e.state.focused&&(he(e,"blur",e,t),e.state.focused=!1,O(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function Or(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=Math.max(0,t.scroller.getBoundingClientRect().top),i=t.lineDiv.getBoundingClientRect().top,o=0,l=0;l.005||m<-.005)&&(ie.display.sizerWidth){var v=Math.ceil(f/ir(e.display));v>e.display.maxLineLength&&(e.display.maxLineLength=v,e.display.maxLine=u.line,e.display.maxLineChanged=!0)}}}Math.abs(o)>2&&(t.scroller.scrollTop+=o)}function Cr(e){if(e.widgets)for(var t=0;t=a&&(o=Xe(t,Wt(Ve(t,l))-e.wrapper.clientHeight),a=l)}return{from:o,to:Math.max(a,o+1)}}function Ar(e,t){var n=e.display,r=rr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,o=Tn(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var s=e.doc.height+En(n),l=t.tops-r;if(t.topi+o){var c=Math.min(t.top,(u?s:t.bottom)-o);c!=i&&(a.scrollTop=c)}var d=e.options.fixedGutter?0:n.gutters.offsetWidth,f=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft-d,p=Cn(e)-n.gutters.offsetWidth,h=t.right-t.left>p;return h&&(t.right=t.left+p),t.left<10?a.scrollLeft=0:t.leftp+f-3&&(a.scrollLeft=t.right+(h?0:10)-p),a}function Pr(e,t){null!=t&&(Ir(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Rr(e){Ir(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function jr(e,t,n){null==t&&null==n||Ir(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function Ir(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,Mr(e,Kn(e,t.from),Kn(e,t.to),t.margin))}function Mr(e,t,n,r){var i=Ar(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});jr(e,i.scrollLeft,i.scrollTop)}function Lr(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||li(e,{top:t}),Dr(e,t,!0),n&&li(e),ri(e,100))}function Dr(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Nr(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r||(e.doc.scrollLeft=t,di(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Fr(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+En(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+On(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var Br=function(e,t,n){this.cm=n;var r=this.vert=A("div",[A("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=A("div",[A("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),de(r,"scroll",(function(){r.clientHeight&&t(r.scrollTop,"vertical")})),de(i,"scroll",(function(){i.clientWidth&&t(i.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,a&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Br.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},Br.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Br.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Br.prototype.zeroWidthHack=function(){var e=y&&!p?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new B,this.disableVert=new B},Br.prototype.enableZeroWidthBar=function(e,t,n){e.style.pointerEvents="auto",t.set(1e3,(function r(){var i=e.getBoundingClientRect();("vert"==n?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,r)}))},Br.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var zr=function(){};function Ur(e,t){t||(t=Fr(e));var n=e.display.barWidth,r=e.display.barHeight;qr(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&Or(e),qr(e,Fr(e)),n=e.display.barWidth,r=e.display.barHeight}function qr(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}zr.prototype.update=function(){return{bottom:0,right:0}},zr.prototype.setScrollLeft=function(){},zr.prototype.setScrollTop=function(){},zr.prototype.clear=function(){};var Wr={native:Br,null:zr};function Hr(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&O(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Wr[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),de(t,"mousedown",(function(){e.state.focused&&setTimeout((function(){return e.display.input.focus()}),0)})),t.setAttribute("cm-not-content","true")}),(function(t,n){"horizontal"==n?Nr(e,t):Lr(e,t)}),e),e.display.scrollbars.addClass&&I(e.display.wrapper,e.display.scrollbars.addClass)}var $r=0;function Vr(e){var t;e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++$r,markArrays:null},t=e.curOp,an?an.ops.push(t):t.ownsGroup=an={ops:[t],delayedCallbacks:[]}}function Gr(e){var t=e.curOp;t&&function(e,t){var n=e.ownsGroup;if(n)try{!function(e){var t=e.delayedCallbacks,n=0;do{for(;n=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new oi(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Yr(e){e.updatedDisplay=e.mustUpdate&&ai(e.cm,e.update)}function Qr(e){var t=e.cm,n=t.display;e.updatedDisplay&&Or(t),e.barMeasure=Fr(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Pn(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+On(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Cn(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function Xr(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!h){var o=A("div","​",null,"position: absolute;\n top: "+(t.top-n.viewOffset-kn(e.display))+"px;\n height: "+(t.bottom-t.top+On(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}(t,function(e,t,n,r){var i;null==r&&(r=0),e.options.lineWrapping||t!=n||(n="before"==t.sticky?et(t.line,t.ch+1,"before"):t,t=t.ch?et(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t);for(var o=0;o<5;o++){var a=!1,s=Gn(e,t),l=n&&n!=t?Gn(e,n):s,u=Ar(e,i={left:Math.min(s.left,l.left),top:Math.min(s.top,l.top)-r,right:Math.max(s.left,l.left),bottom:Math.max(s.bottom,l.bottom)+r}),c=e.doc.scrollTop,d=e.doc.scrollLeft;if(null!=u.scrollTop&&(Lr(e,u.scrollTop),Math.abs(e.doc.scrollTop-c)>1&&(a=!0)),null!=u.scrollLeft&&(Nr(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-d)>1&&(a=!0)),!a)break}return i}(t,st(r,e.scrollToPos.from),st(r,e.scrollToPos.to),e.scrollToPos.margin));var i=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers;if(i)for(var a=0;a=e.display.viewTo)){var n=+new Date+e.options.workTime,r=pt(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),(function(o){if(r.line>=e.display.viewFrom){var a=o.styles,s=o.text.length>e.options.maxHighlightLength?qe(t.mode,r.state):null,l=dt(e,o,r,!0);s&&(r.state=s),o.styles=l.styles;var u=o.styleClasses,c=l.classes;c?o.styleClasses=c:u&&(o.styleClasses=null);for(var d=!a||a.length!=o.styles.length||u!=c&&(!u||!c||u.bgClass!=c.bgClass||u.textClass!=c.textClass),f=0;!d&&fn)return ri(e,e.options.workDelay),!0})),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&Jr(e,(function(){for(var t=0;t=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==mr(e))return!1;fi(e)&&(pr(e),t.dims=or(e));var i=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),a=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFroma&&n.viewTo-a<20&&(a=Math.min(i,n.viewTo)),xt&&(o=Bt(e.doc,o),a=zt(e.doc,a));var s=o!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;!function(e,t,n){var r=e.display;0==r.view.length||t>=r.viewTo||n<=r.viewFrom?(r.view=on(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=on(e,t,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,cr(e,n)))),r.viewTo=n}(e,o,a),n.viewOffset=Wt(Ve(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var u=mr(e);if(!s&&0==u&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var c=function(e){if(e.hasFocus())return null;var t=j();if(!t||!R(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&R(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}(e);return u>4&&(n.lineDiv.style.display="none"),function(e,t,n){var r=e.display,i=e.options.lineNumbers,o=r.lineDiv,a=o.firstChild;function s(t){var n=t.nextSibling;return l&&y&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var u=r.view,c=r.viewFrom,d=0;d-1&&(p=!1),cn(e,f,c,n)),p&&(C(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(Je(e.options,c)))),a=f.node.nextSibling}else{var h=vn(e,f,c,n);o.insertBefore(h,a)}c+=f.size}for(;a;)a=s(a)}(e,n.updateLineNumbers,t.dims),u>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,function(e){if(e&&e.activeElt&&e.activeElt!=j()&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&R(document.body,e.anchorNode)&&R(document.body,e.focusNode))){var t=window.getSelection(),n=document.createRange();n.setEnd(e.anchorNode,e.anchorOffset),n.collapse(!1),t.removeAllRanges(),t.addRange(n),t.extend(e.focusNode,e.focusOffset)}}(c),C(n.cursorDiv),C(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,ri(e,400)),n.updateLineNumbers=null,!0}function si(e,t){for(var n=t.viewport,r=!0;;r=!1){if(r&&e.options.lineWrapping&&t.oldDisplayWidth!=Cn(e))r&&(t.visible=Tr(e.display,e.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(e.doc.height+En(e.display)-Tn(e),n.top)}),t.visible=Tr(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!ai(e,t))break;Or(e);var i=Fr(e);gr(e),Ur(e,i),ci(e,i),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function li(e,t){var n=new oi(e,t);if(ai(e,n)){Or(e),si(e,n);var r=Fr(e);gr(e),Ur(e,r),ci(e,r),n.finish()}}function ui(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",ln(e,"gutterChanged",e)}function ci(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+On(e)+"px"}function di(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=ar(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",a=0;au.clientWidth,f=u.scrollHeight>u.clientHeight;if(i&&c||o&&f){if(o&&y&&l)e:for(var p=t.target,h=s.view;p!=u;p=p.parentNode)for(var m=0;m=0&&tt(e,r.to())<=0)return n}return-1};var ki=function(e,t){this.anchor=e,this.head=t};function Ei(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort((function(e,t){return tt(e.from(),t.from())})),n=z(t,i);for(var o=1;o0:l>=0){var u=ot(s.from(),a.from()),c=it(s.to(),a.to()),d=s.empty()?a.from()==a.head:s.from()==s.head;o<=n&&--n,t.splice(--o,2,new ki(d?c:u,d?u:c))}}return new xi(t,n)}function Si(e,t){return new xi([new ki(e,t||e)],0)}function Oi(e){return e.text?et(e.from.line+e.text.length-1,K(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function Ci(e,t){if(tt(e,t.from)<0)return e;if(tt(e,t.to)<=0)return Oi(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=Oi(t).ch-t.to.ch),et(n,r)}function Ti(e,t){for(var n=[],r=0;r1&&e.remove(s.line+1,h-1),e.insert(s.line+1,v)}ln(e,"change",e,t)}function Mi(e,t,n){!function e(r,i,o){if(r.linked)for(var a=0;as-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(o=function(e,t){return t?(Bi(e.done),K(e.done)):e.done.length&&!K(e.done).ranges?K(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),K(e.done)):void 0}(i,i.lastOp==r)))a=K(o.changes),0==tt(t.from,t.to)&&0==tt(t.from,a.to)?a.to=Oi(t):o.changes.push(Fi(e,t));else{var l=K(i.done);for(l&&l.ranges||qi(e.sel,i.done),o={changes:[Fi(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,a||he(e,"historyAdded")}function Ui(e,t,n,r){var i=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||function(e,t,n,r){var i=t.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}(e,o,K(i.done),t))?i.done[i.done.length-1]=t:qi(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&!1!==r.clearRedo&&Bi(i.undone)}function qi(e,t){var n=K(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Wi(e,t,n,r){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),(function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=n.markedSpans),++o}))}function Hi(e){if(!e)return null;for(var t,n=0;n-1&&(K(s)[d]=u[d],delete u[d])}}}return r}function Gi(e,t,n,r){if(r){var i=e.anchor;if(n){var o=tt(t,i)<0;o!=tt(n,i)<0?(i=t,t=n):o!=tt(t,n)<0&&(t=n)}return new ki(i,t)}return new ki(n||t,t)}function Ki(e,t,n,r,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),Ji(e,new xi([Gi(e.sel.primary(),t,n,i)],0),r)}function Yi(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o=t.ch:s.to>t.ch))){if(i&&(he(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!l.atomic)continue;if(n){var d=l.find(r<0?1:-1),f=void 0;if((r<0?c:u)&&(d=ao(e,d,-r,d&&d.line==t.line?o:null)),d&&d.line==t.line&&(f=tt(d,n))&&(r<0?f<0:f>0))return io(e,d,t,r,i)}var p=l.find(r<0?-1:1);return(r<0?u:c)&&(p=ao(e,p,r,p.line==t.line?o:null)),p?io(e,p,t,r,i):null}}return t}function oo(e,t,n,r,i){var o=r||1,a=io(e,t,n,o,i)||!i&&io(e,t,n,o,!0)||io(e,t,n,-o,i)||!i&&io(e,t,n,-o,!0);return a||(e.cantEdit=!0,et(e.first,0))}function ao(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?st(e,et(t.line-1)):null:n>0&&t.ch==(r||Ve(e,t.line)).text.length?t.line0)){var c=[l,1],d=tt(u.from,s.from),f=tt(u.to,s.to);(d<0||!a.inclusiveLeft&&!d)&&c.push({from:u.from,to:s.from}),(f>0||!a.inclusiveRight&&!f)&&c.push({from:s.to,to:u.to}),i.splice.apply(i,c),l+=c.length-3}}return i}(e,t.from,t.to);if(r)for(var i=r.length-1;i>=0;--i)co(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else co(e,t)}}function co(e,t){if(1!=t.text.length||""!=t.text[0]||0!=tt(t.from,t.to)){var n=Ti(e,t);zi(e,t,n,e.cm?e.cm.curOp.id:NaN),ho(e,t,n,Ot(e,t));var r=[];Mi(e,(function(e,n){n||-1!=z(r,e.history)||(yo(e.history,t),r.push(e.history)),ho(e,t,null,Ot(e,t))}))}}function fo(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!r||n){for(var i,o=e.history,a=e.sel,s="undo"==t?o.done:o.undone,l="undo"==t?o.undone:o.done,u=0;u=0;--p){var h=f(p);if(h)return h.v}}}}function po(e,t){if(0!=t&&(e.first+=t,e.sel=new xi(Y(e.sel.ranges,(function(e){return new ki(et(e.anchor.line+t,e.anchor.ch),et(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){dr(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;re.lastLine())){if(t.from.lineo&&(t={from:t.from,to:et(o,Ve(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Ge(e,t.from,t.to),n||(n=Ti(e,t)),e.cm?function(e,t,n){var r=e.doc,i=e.display,o=t.from,a=t.to,s=!1,l=o.line;e.options.lineWrapping||(l=Qe(Ft(Ve(r,o.line))),r.iter(l,a.line+1,(function(e){if(e==i.maxLine)return s=!0,!0}))),r.sel.contains(t.from,t.to)>-1&&ge(e),Ii(r,t,n,sr(e)),e.options.lineWrapping||(r.iter(l,o.line+t.text.length,(function(e){var t=Ht(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)})),s&&(e.curOp.updateMaxLine=!0)),function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontiern;r--){var i=Ve(e,r).stateAfter;if(i&&(!(i instanceof ut)||r+i.lookAhead1||!(this.children[0]instanceof _o))){var s=[];this.collapse(s),this.children=[new _o(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var a=i.lines.length%25+25,s=a;s10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r0||0==a&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=P("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Nt(e,t.line,t,n,o)||t.line!=n.line&&Nt(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");xt=!0}o.addToHistory&&zi(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var s,l=t.line,u=e.cm;if(e.iter(l,n.line+1,(function(r){u&&o.collapsed&&!u.options.lineWrapping&&Ft(r)==u.display.maxLine&&(s=!0),o.collapsed&&l!=t.line&&Ye(r,0),function(e,t,n){var r=n&&window.WeakSet&&(n.markedSpans||(n.markedSpans=new WeakSet));r&&r.has(e.markedSpans)?e.markedSpans.push(t):(e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],r&&r.add(e.markedSpans)),t.marker.attachLine(e)}(r,new kt(o,l==t.line?t.ch:null,l==n.line?n.ch:null),e.cm&&e.cm.curOp),++l})),o.collapsed&&e.iter(t.line,n.line+1,(function(t){Ut(e,t)&&Ye(t,0)})),o.clearOnEnter&&de(o,"beforeCursorEnter",(function(){return o.clear()})),o.readOnly&&(wt=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++Eo,o.atomic=!0),u){if(s&&(u.curOp.updateMaxLine=!0),o.collapsed)dr(u,t.line,n.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var c=t.line;c<=n.line;c++)fr(u,c,"text");o.atomic&&no(u.doc),ln(u,"markerAdded",u,o)}return o}So.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Vr(e),ve(this,"clear")){var n=this.find();n&&ln(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;oe.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=c,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&dr(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&no(e.doc)),e&&ln(e,"markerCleared",e,this,r,i),t&&Gr(e),this.parent&&this.parent.clear()}},So.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i=0;l--)uo(this,r[l]);s?Zi(this,s):this.cm&&Rr(this.cm)})),undo:ni((function(){fo(this,"undo")})),redo:ni((function(){fo(this,"redo")})),undoSelection:ni((function(){fo(this,"undo",!0)})),redoSelection:ni((function(){fo(this,"redo",!0)})),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=st(this,e),t=st(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,(function(o){var a=o.markedSpans;if(a)for(var s=0;s=l.to||null==l.from&&i!=e.line||null!=l.from&&i==t.line&&l.from>=t.ch||n&&!n(l.marker)||r.push(l.marker.parent||l.marker)}++i})),r},getAllMarks:function(){var e=[];return this.iter((function(t){var n=t.markedSpans;if(n)for(var r=0;re)return t=e,!0;e-=o,++n})),st(this,et(n,t))},indexFromPos:function(e){var t=(e=st(this,e)).ch;if(e.linet&&(t=e.from),null!=e.to&&e.to-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20);try{var d=e.dataTransfer.getData("Text");if(d){var f;if(t.state.draggingText&&!t.state.draggingText.copy&&(f=t.listSelections()),eo(t.doc,Si(n,n)),f)for(var p=0;p=0;t--)mo(e.doc,"",r[t].from,r[t].to,"+delete");Rr(e)}))}function Zo(e,t,n){var r=ie(e.text,t+n,n);return r<0||r>e.text.length?null:r}function Jo(e,t,n){var r=Zo(e,t.ch,n);return null==r?null:new et(t.line,r,n<0?"after":"before")}function ea(e,t,n,r,i){if(e){"rtl"==t.doc.direction&&(i=-i);var o=ue(n,t.doc.direction);if(o){var a,s=i<0?K(o):o[0],l=i<0==(1==s.level)?"after":"before";if(s.level>0||"rtl"==t.doc.direction){var u=jn(t,n);a=i<0?n.text.length-1:0;var c=In(t,u,a).top;a=oe((function(e){return In(t,u,e).top==c}),i<0==(1==s.level)?s.from:s.to-1,a),"before"==l&&(a=Zo(n,a,1))}else a=i<0?s.to:s.from;return new et(r,a,l)}}return new et(r,i<0?n.text.length:0,i<0?"before":"after")}Wo.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Wo.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Wo.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Wo.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Wo.default=y?Wo.macDefault:Wo.pcDefault;var ta={selectAll:so,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),q)},killLine:function(e){return Xo(e,(function(t){if(t.empty()){var n=Ve(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line0)i=new et(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),et(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=Ve(e.doc,i.line-1).text;a&&(i=new et(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),et(i.line-1,a.length-1),i,"+transpose"))}n.push(new ki(i,i))}e.setSelections(n)}))},newlineAndIndent:function(e){return Jr(e,(function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;r-1&&(tt((i=u.ranges[i]).from(),t)<0||t.xRel>0)&&(tt(i.to(),t)>0||t.xRel<0)?function(e,t,n,r){var i=e.display,o=!1,u=ei(e,(function(t){l&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:kr(e)),pe(i.wrapper.ownerDocument,"mouseup",u),pe(i.wrapper.ownerDocument,"mousemove",c),pe(i.scroller,"dragstart",d),pe(i.scroller,"drop",u),o||(be(t),r.addNew||Ki(e.doc,n,null,null,r.extend),l&&!f||a&&9==s?setTimeout((function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()}),20):i.input.focus())})),c=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},d=function(){return o=!0};l&&(i.scroller.draggable=!0),e.state.draggingText=u,u.copy=!r.moveOnDrag,de(i.wrapper.ownerDocument,"mouseup",u),de(i.wrapper.ownerDocument,"mousemove",c),de(i.scroller,"dragstart",d),de(i.scroller,"drop",u),e.state.delayingBlurEvent=!0,setTimeout((function(){return i.input.focus()}),20),i.scroller.dragDrop&&i.scroller.dragDrop()}(e,r,t,o):function(e,t,n,r){a&&kr(e);var i=e.display,o=e.doc;be(t);var s,l,u=o.sel,c=u.ranges;if(r.addNew&&!r.extend?(l=o.sel.contains(n),s=l>-1?c[l]:new ki(n,n)):(s=o.sel.primary(),l=o.sel.primIndex),"rectangle"==r.unit)r.addNew||(s=new ki(n,n)),n=ur(e,t,!0,!0),l=-1;else{var d=va(e,n,r.unit);s=r.extend?Gi(s,d.anchor,d.head,r.extend):d}r.addNew?-1==l?(l=c.length,Ji(o,Ei(e,c.concat([s]),l),{scroll:!1,origin:"*mouse"})):c.length>1&&c[l].empty()&&"char"==r.unit&&!r.extend?(Ji(o,Ei(e,c.slice(0,l).concat(c.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),u=o.sel):Qi(o,l,s,W):(l=0,Ji(o,new xi([s],0),W),u=o.sel);var f=n;function p(t){if(0!=tt(f,t))if(f=t,"rectangle"==r.unit){for(var i=[],a=e.options.tabSize,c=F(Ve(o,n.line).text,n.ch,a),d=F(Ve(o,t.line).text,t.ch,a),p=Math.min(c,d),h=Math.max(c,d),m=Math.min(n.line,t.line),g=Math.min(e.lastLine(),Math.max(n.line,t.line));m<=g;m++){var v=Ve(o,m).text,y=$(v,p,a);p==h?i.push(new ki(et(m,y),et(m,y))):v.length>y&&i.push(new ki(et(m,y),et(m,$(v,h,a))))}i.length||i.push(new ki(n,n)),Ji(o,Ei(e,u.ranges.slice(0,l).concat(i),l),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b,_=s,w=va(e,t,r.unit),x=_.anchor;tt(w.anchor,x)>0?(b=w.head,x=ot(_.from(),w.anchor)):(b=w.anchor,x=it(_.to(),w.head));var k=u.ranges.slice(0);k[l]=function(e,t){var n=t.anchor,r=t.head,i=Ve(e.doc,n.line);if(0==tt(n,r)&&n.sticky==r.sticky)return t;var o=ue(i);if(!o)return t;var a=se(o,n.ch,n.sticky),s=o[a];if(s.from!=n.ch&&s.to!=n.ch)return t;var l,u=a+(s.from==n.ch==(1!=s.level)?0:1);if(0==u||u==o.length)return t;if(r.line!=n.line)l=(r.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var c=se(o,r.ch,r.sticky),d=c-a||(r.ch-n.ch)*(1==s.level?-1:1);l=c==u-1||c==u?d<0:d>0}var f=o[u+(l?-1:0)],p=l==(1==f.level),h=p?f.from:f.to,m=p?"after":"before";return n.ch==h&&n.sticky==m?t:new ki(new et(n.line,h,m),r)}(e,new ki(st(o,x),b)),Ji(o,Ei(e,k,l),W)}}var h=i.wrapper.getBoundingClientRect(),m=0;function g(t){e.state.selectingText=!1,m=1/0,t&&(be(t),i.input.focus()),pe(i.wrapper.ownerDocument,"mousemove",v),pe(i.wrapper.ownerDocument,"mouseup",y),o.history.lastSelOrigin=null}var v=ei(e,(function(t){0!==t.buttons&&Ee(t)?function t(n){var a=++m,s=ur(e,n,!0,"rectangle"==r.unit);if(s)if(0!=tt(s,f)){e.curOp.focus=j(),p(s);var l=Tr(i,o);(s.line>=l.to||s.lineh.bottom?20:0;u&&setTimeout(ei(e,(function(){m==a&&(i.scroller.scrollTop+=u,t(n))})),50)}}(t):g(t)})),y=ei(e,g);e.state.selectingText=y,de(i.wrapper.ownerDocument,"mousemove",v),de(i.wrapper.ownerDocument,"mouseup",y)}(e,r,t,o)}(t,r,o,e):ke(e)==n.scroller&&be(e):2==i?(r&&Ki(t.doc,r),setTimeout((function(){return n.input.focus()}),20)):3==i&&(k?t.display.input.onContextMenu(e):kr(t)))}}function va(e,t,n){if("char"==n)return new ki(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new ki(et(t.line,0),st(e.doc,et(t.line+1,0)));var r=n(e,t);return new ki(r.from,r.to)}function ya(e,t,n,r){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(e){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&be(t);var a=e.display,s=a.lineDiv.getBoundingClientRect();if(o>s.bottom||!ve(e,n))return we(t);o-=s.top-a.viewOffset;for(var l=0;l=i)return he(e,n,e,Xe(e.doc,o),e.display.gutterSpecs[l].className,t),we(t)}}function ba(e,t){return ya(e,t,"gutterClick",!0)}function _a(e,t){xn(e.display,t)||function(e,t){return!!ve(e,"gutterContextMenu")&&ya(e,t,"gutterContextMenu",!1)}(e,t)||me(e,t,"contextmenu")||k||e.display.input.onContextMenu(t)}function wa(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),zn(e)}ma.prototype.compare=function(e,t,n){return this.time+400>e&&0==tt(t,this.pos)&&n==this.button};var xa={toString:function(){return"CodeMirror.Init"}},ka={},Ea={};function Sa(e,t,n){if(!t!=!(n&&n!=xa)){var r=e.display.dragFunctions,i=t?de:pe;i(e.display.scroller,"dragstart",r.start),i(e.display.scroller,"dragenter",r.enter),i(e.display.scroller,"dragover",r.over),i(e.display.scroller,"dragleave",r.leave),i(e.display.scroller,"drop",r.drop)}}function Oa(e){e.options.lineWrapping?(I(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(O(e.display.wrapper,"CodeMirror-wrap"),$t(e)),lr(e),dr(e),zn(e),setTimeout((function(){return Ur(e)}),100)}function Ca(e,t){var n=this;if(!(this instanceof Ca))return new Ca(e,t);this.options=t=t?N(t):{},N(ka,t,!1);var r=t.value;"string"==typeof r?r=new Ro(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new Ca.inputStyles[t.inputStyle](this),o=this.display=new gi(e,r,i,t);for(var u in o.wrapper.CodeMirror=this,wa(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Hr(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new B,keySeq:null,specialChars:null},t.autofocus&&!v&&o.input.focus(),a&&s<11&&setTimeout((function(){return n.display.input.reset(!0)}),20),function(e){var t=e.display;de(t.scroller,"mousedown",ei(e,ga)),de(t.scroller,"dblclick",a&&s<11?ei(e,(function(t){if(!me(e,t)){var n=ur(e,t);if(n&&!ba(e,t)&&!xn(e.display,t)){be(t);var r=e.findWordAt(n);Ki(e.doc,r.anchor,r.head)}}})):function(t){return me(e,t)||be(t)}),de(t.scroller,"contextmenu",(function(t){return _a(e,t)})),de(t.input.getField(),"contextmenu",(function(n){t.scroller.contains(n.target)||_a(e,n)}));var n,r={end:0};function i(){t.activeTouch&&(n=setTimeout((function(){return t.activeTouch=null}),1e3),(r=t.activeTouch).end=+new Date)}function o(e,t){if(null==t.left)return!0;var n=t.left-e.left,r=t.top-e.top;return n*n+r*r>400}de(t.scroller,"touchstart",(function(i){if(!me(e,i)&&!function(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}(i)&&!ba(e,i)){t.input.ensurePolled(),clearTimeout(n);var o=+new Date;t.activeTouch={start:o,moved:!1,prev:o-r.end<=300?r:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}})),de(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),de(t.scroller,"touchend",(function(n){var r=t.activeTouch;if(r&&!xn(t,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var a,s=e.coordsChar(t.activeTouch,"page");a=!r.prev||o(r,r.prev)?new ki(s,s):!r.prev.prev||o(r,r.prev.prev)?e.findWordAt(s):new ki(et(s.line,0),st(e.doc,et(s.line+1,0))),e.setSelection(a.anchor,a.head),e.focus(),be(n)}i()})),de(t.scroller,"touchcancel",i),de(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(Lr(e,t.scroller.scrollTop),Nr(e,t.scroller.scrollLeft,!0),he(e,"scroll",e))})),de(t.scroller,"mousewheel",(function(t){return wi(e,t)})),de(t.scroller,"DOMMouseScroll",(function(t){return wi(e,t)})),de(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){me(e,t)||xe(t)},over:function(t){me(e,t)||(function(e,t){var n=ur(e,t);if(n){var r=document.createDocumentFragment();yr(e,n,r),e.display.dragCursor||(e.display.dragCursor=A("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),T(e.display.dragCursor,r)}}(e,t),xe(t))},start:function(t){return function(e,t){if(a&&(!e.state.draggingText||+new Date-jo<100))xe(t);else if(!me(e,t)&&!xn(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!f)){var n=A("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",d&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),d&&n.parentNode.removeChild(n)}}(e,t)},drop:ei(e,Io),leave:function(t){me(e,t)||Mo(e)}};var l=t.input.getField();de(l,"keyup",(function(t){return da.call(e,t)})),de(l,"keydown",ei(e,ca)),de(l,"keypress",ei(e,fa)),de(l,"focus",(function(t){return Er(e,t)})),de(l,"blur",(function(t){return Sr(e,t)}))}(this),No(),Vr(this),this.curOp.forceUpdate=!0,Li(this,r),t.autofocus&&!v||this.hasFocus()?setTimeout((function(){n.hasFocus()&&!n.state.focused&&Er(n)}),20):Sr(this),Ea)Ea.hasOwnProperty(u)&&Ea[u](this,t[u],xa);fi(this),t.finishInit&&t.finishInit(this);for(var c=0;c150)){if(!r)return;n="prev"}}else u=0,n="not";"prev"==n?u=t>o.first?F(Ve(o,t-1).text,null,a):0:"add"==n?u=l+e.options.indentUnit:"subtract"==n?u=l-e.options.indentUnit:"number"==typeof n&&(u=l+n),u=Math.max(0,u);var d="",f=0;if(e.options.indentWithTabs)for(var p=Math.floor(u/a);p;--p)f+=a,d+="\t";if(fa,l=Re(t),u=null;if(s&&r.ranges.length>1)if(Pa&&Pa.text.join("\n")==t){if(r.ranges.length%Pa.text.length==0){u=[];for(var c=0;c=0;f--){var p=r.ranges[f],h=p.from(),m=p.to();p.empty()&&(n&&n>0?h=et(h.line,h.ch-n):e.state.overwrite&&!s?m=et(m.line,Math.min(Ve(o,m.line).text.length,m.ch+K(l).length)):s&&Pa&&Pa.lineWise&&Pa.text.join("\n")==l.join("\n")&&(h=m=et(h.line,0)));var g={from:h,to:m,text:u?u[f%u.length]:l,origin:i||(s?"paste":e.state.cutIncoming>a?"cut":"+input")};uo(e.doc,g),ln(e,"inputRead",e,g)}t&&!s&&Ma(e,t),Rr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=d),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Ia(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||Jr(t,(function(){return ja(t,n,0,null,"paste")})),!0}function Ma(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),a=!1;if(o.electricChars){for(var s=0;s-1){a=Aa(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Ve(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Aa(e,i.head.line,"smart"));a&&ln(e,"electricInput",e,i.head.line)}}}function La(e){for(var t=[],n=[],r=0;r0?0:-1));if(isNaN(u))a=null;else{var c=n>0?u>=55296&&u<56320:u>=56320&&u<57343;a=new et(t.line,Math.max(0,Math.min(s.text.length,t.ch+n*(c?2:1))),-n)}}else a=i?function(e,t,n,r){var i=ue(t,e.doc.direction);if(!i)return Jo(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=se(i,n.ch,n.sticky),a=i[o];if("ltr"==e.doc.direction&&a.level%2==0&&(r>0?a.to>n.ch:a.from=a.from&&f>=c.begin)){var p=d?"before":"after";return new et(n.line,f,p)}}var h=function(e,t,r){for(var o=function(e,t){return t?new et(n.line,l(e,1),"before"):new et(n.line,e,"after")};e>=0&&e0==(1!=a.level),u=s?r.begin:l(r.end,-1);if(a.from<=u&&u0?c.end:l(c.begin,-1);return null==g||r>0&&g==t.text.length||!(m=h(r>0?0:i.length-1,r,u(g)))?null:m}(e.cm,s,t,n):Jo(s,t,n);if(null==a){if(o||!function(){var n=t.line+l;return!(n=e.first+e.size)&&(t=new et(n,t.ch,t.sticky),s=Ve(e,n))}())return!1;t=ea(i,e.cm,s,t.line,l)}else t=a;return!0}if("char"==r||"codepoint"==r)u();else if("column"==r)u(!0);else if("word"==r||"group"==r)for(var c=null,d="group"==r,f=e.cm&&e.cm.getHelper(t,"wordChars"),p=!0;!(n<0)||u(!p);p=!1){var h=s.text.charAt(t.ch)||"\n",m=ee(h,f)?"w":d&&"\n"==h?"n":!d||/\s/.test(h)?null:"p";if(!d||p||m||(m="s"),c&&c!=m){n<0&&(n=1,u(),t.sticky="after");break}if(m&&(c=m),n>0&&!u(!p))break}var g=oo(e,t,o,a,!0);return nt(o,g)&&(g.hitSide=!0),g}function Ba(e,t,n,r){var i,o,a=e.doc,s=t.left;if("page"==r){var l=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),u=Math.max(l-.5*rr(e.display),3);i=(n>0?t.bottom:t.top)+n*u}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(;(o=Qn(e,s,i)).outside;){if(n<0?i<=0:i>=a.height){o.hitSide=!0;break}i+=5*n}return o}var za=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new B,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Ua(e,t){var n=Rn(e,t.line);if(!n||n.hidden)return null;var r=Ve(e.doc,t.line),i=An(n,r,t.line),o=ue(r,e.doc.direction),a="left";o&&(a=se(o,t.ch)%2?"right":"left");var s=Dn(i.map,t.ch,a);return s.offset="right"==s.collapse?s.end:s.start,s}function qa(e,t){return t&&(e.bad=!0),e}function Wa(e,t,n){var r;if(t==e.display.lineDiv){if(!(r=e.display.lineDiv.childNodes[n]))return qa(e.clipPos(et(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var i=0;i=t.display.viewTo||o.line=t.display.viewFrom&&Ua(t,i)||{node:l[0].measure.map[2],offset:0},c=o.liner.firstLine()&&(a=et(a.line-1,Ve(r.doc,a.line-1).length)),s.ch==Ve(r.doc,s.line).text.length&&s.linei.viewTo-1)return!1;a.line==i.viewFrom||0==(e=cr(r,a.line))?(t=Qe(i.view[0].line),n=i.view[0].node):(t=Qe(i.view[e].line),n=i.view[e-1].node.nextSibling);var l,u,c=cr(r,s.line);if(c==i.view.length-1?(l=i.viewTo-1,u=i.lineDiv.lastChild):(l=Qe(i.view[c+1].line)-1,u=i.view[c+1].node.previousSibling),!n)return!1;for(var d=r.doc.splitLines(function(e,t,n,r,i){var o="",a=!1,s=e.doc.lineSeparator(),l=!1;function u(){a&&(o+=s,l&&(o+=s),a=l=!1)}function c(e){e&&(u(),o+=e)}function d(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void c(n);var o,f=t.getAttribute("cm-marker");if(f){var p=e.findMarks(et(r,0),et(i+1,0),(g=+f,function(e){return e.id==g}));return void(p.length&&(o=p[0].find(0))&&c(Ge(e.doc,o.from,o.to).join(s)))}if("false"==t.getAttribute("contenteditable"))return;var h=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;h&&u();for(var m=0;m1&&f.length>1;)if(K(d)==K(f))d.pop(),f.pop(),l--;else{if(d[0]!=f[0])break;d.shift(),f.shift(),t++}for(var p=0,h=0,m=d[0],g=f[0],v=Math.min(m.length,g.length);pa.ch&&y.charCodeAt(y.length-h-1)==b.charCodeAt(b.length-h-1);)p--,h++;d[d.length-1]=y.slice(0,y.length-h).replace(/^\u200b+/,""),d[0]=d[0].slice(p).replace(/\u200b+$/,"");var w=et(t,p),x=et(l,f.length?K(f).length-h:0);return d.length>1||d[0]||tt(w,x)?(mo(r.doc,d,w,x,"+input"),!0):void 0},za.prototype.ensurePolled=function(){this.forceCompositionEnd()},za.prototype.reset=function(){this.forceCompositionEnd()},za.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},za.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()}),80))},za.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||Jr(this.cm,(function(){return dr(e.cm)}))},za.prototype.setUneditable=function(e){e.contentEditable="false"},za.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||ei(this.cm,ja)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},za.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},za.prototype.onContextMenu=function(){},za.prototype.resetPosition=function(){},za.prototype.needsContentAttribute=!0;var $a=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new B,this.hasSelection=!1,this.composing=null};$a.prototype.init=function(e){var t=this,n=this,r=this.cm;this.createField(e);var i=this.textarea;function o(e){if(!me(r,e)){if(r.somethingSelected())Ra({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var t=La(r);Ra({lineWise:!0,text:t.text}),"cut"==e.type?r.setSelections(t.ranges,null,q):(n.prevInput="",i.value=t.text.join("\n"),L(i))}"cut"==e.type&&(r.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),m&&(i.style.width="0px"),de(i,"input",(function(){a&&s>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()})),de(i,"paste",(function(e){me(r,e)||Ia(e,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())})),de(i,"cut",o),de(i,"copy",o),de(e.scroller,"paste",(function(t){if(!xn(e,t)&&!me(r,t)){if(!i.dispatchEvent)return r.state.pasteIncoming=+new Date,void n.focus();var o=new Event("paste");o.clipboardData=t.clipboardData,i.dispatchEvent(o)}})),de(e.lineSpace,"selectstart",(function(t){xn(e,t)||be(t)})),de(i,"compositionstart",(function(){var e=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}})),de(i,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},$a.prototype.createField=function(e){this.wrapper=Na(),this.textarea=this.wrapper.firstChild},$a.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},$a.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=vr(e);if(e.options.moveInputWithCursor){var i=Gn(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+a.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+a.left-o.left))}return r},$a.prototype.showSelection=function(e){var t=this.cm.display;T(t.cursorDiv,e.cursors),T(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},$a.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&L(this.textarea),a&&s>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",a&&s>=9&&(this.hasSelection=null))}},$a.prototype.getField=function(){return this.textarea},$a.prototype.supportsTouch=function(){return!1},$a.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!v||j()!=this.textarea))try{this.textarea.focus()}catch(e){}},$a.prototype.blur=function(){this.textarea.blur()},$a.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},$a.prototype.receivedFocus=function(){this.slowPoll()},$a.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},$a.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0,t.polling.set(20,(function n(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,n))}))},$a.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||je(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(a&&s>=9&&this.hasSelection===i||y&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||r||(r="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var l=0,u=Math.min(r.length,i.length);l1e3||i.indexOf("\n")>-1?n.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},$a.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},$a.prototype.onKeyPress=function(){a&&s>=9&&(this.hasSelection=null),this.fastPoll()},$a.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=ur(n,e),u=r.scroller.scrollTop;if(o&&!d){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(o)&&ei(n,Ji)(n.doc,Si(o),q);var c,f=i.style.cssText,p=t.wrapper.style.cssText,h=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-h.top-5)+"px; left: "+(e.clientX-h.left-5)+"px;\n z-index: 1000; background: "+(a?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",l&&(c=window.scrollY),r.input.focus(),l&&window.scrollTo(null,c),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=v,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),a&&s>=9&&g(),k){xe(e);var m=function(){pe(window,"mouseup",m),setTimeout(v,20)};de(window,"mouseup",m)}else setTimeout(v,50)}function g(){if(null!=i.selectionStart){var e=n.somethingSelected(),o="​"+(e?i.value:"");i.value="⇚",i.value=o,t.prevInput=e?"":"​",i.selectionStart=1,i.selectionEnd=o.length,r.selForContextMenu=n.doc.sel}}function v(){if(t.contextMenuPending==v&&(t.contextMenuPending=!1,t.wrapper.style.cssText=p,i.style.cssText=f,a&&s<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=u),null!=i.selectionStart)){(!a||a&&s<9)&&g();var e=0,o=function(){r.selForContextMenu==n.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&"​"==t.prevInput?ei(n,so)(n):e++<10?r.detectingSelectAll=setTimeout(o,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(o,200)}}},$a.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},$a.prototype.setUneditable=function(){},$a.prototype.needsContentAttribute=!1,function(e){var t=e.optionHandlers;function n(n,r,i,o){e.defaults[n]=r,i&&(t[n]=o?function(e,t,n){n!=xa&&i(e,t,n)}:i)}e.defineOption=n,e.Init=xa,n("value","",(function(e,t){return e.setValue(t)}),!0),n("mode",null,(function(e,t){e.doc.modeOption=t,Pi(e)}),!0),n("indentUnit",2,Pi,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(e){Ri(e),zn(e),dr(e)}),!0),n("lineSeparator",null,(function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter((function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,n.push(et(r,o))}r++}));for(var i=n.length-1;i>=0;i--)mo(e.doc,t,n[i],et(n[i].line,n[i].ch+t.length))}})),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=xa&&e.refresh()})),n("specialCharPlaceholder",Zt,(function(e){return e.refresh()}),!0),n("electricChars",!0),n("inputStyle",v?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),n("spellcheck",!1,(function(e,t){return e.getInputField().spellcheck=t}),!0),n("autocorrect",!1,(function(e,t){return e.getInputField().autocorrect=t}),!0),n("autocapitalize",!1,(function(e,t){return e.getInputField().autocapitalize=t}),!0),n("rtlMoveVisually",!_),n("wholeLineUpdateBefore",!0),n("theme","default",(function(e){wa(e),mi(e)}),!0),n("keyMap","default",(function(e,t,n){var r=Qo(t),i=n!=xa&&Qo(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Oa,!0),n("gutters",[],(function(e,t){e.display.gutterSpecs=pi(t,e.options.lineNumbers),mi(e)}),!0),n("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?ar(e.display)+"px":"0",e.refresh()}),!0),n("coverGutterNextToScrollbar",!1,(function(e){return Ur(e)}),!0),n("scrollbarStyle","native",(function(e){Hr(e),Ur(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),n("lineNumbers",!1,(function(e,t){e.display.gutterSpecs=pi(e.options.gutters,t),mi(e)}),!0),n("firstLineNumber",1,mi,!0),n("lineNumberFormatter",(function(e){return e}),mi,!0),n("showCursorWhenSelecting",!1,gr,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(e,t){"nocursor"==t&&(Sr(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)})),n("screenReaderLabel",null,(function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)})),n("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),n("dragDrop",!0,Sa),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,gr,!0),n("singleCursorHeightPerLine",!0,gr,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Ri,!0),n("addModeClass",!1,Ri,!0),n("pollInterval",100),n("undoDepth",200,(function(e,t){return e.doc.history.undoDepth=t})),n("historyEventDelay",1250),n("viewportMargin",10,(function(e){return e.refresh()}),!0),n("maxHighlightLength",1e4,Ri,!0),n("moveInputWithCursor",!0,(function(e,t){t||e.display.input.resetPosition()})),n("tabindex",null,(function(e,t){return e.display.input.getField().tabIndex=t||""})),n("autofocus",null),n("direction","ltr",(function(e,t){return e.doc.setDirection(t)}),!0),n("phrases",null)}(Ca),function(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,n){var r=this.options,i=r[e];r[e]==n&&"mode"!=e||(r[e]=n,t.hasOwnProperty(e)&&ei(this,t[e])(this,n,i),he(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](Qo(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;nn&&(Aa(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&Rr(this));else{var o=i.from(),a=i.to(),s=Math.max(n,o.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var l=s;l0&&Qi(this.doc,r,new ki(o,u[r].to()),q)}}})),getTokenAt:function(e,t){return yt(this,e,t)},getLineTokens:function(e,t){return yt(this,et(e),t,!0)},getTokenTypeAt:function(e){e=st(this.doc,e);var t,n=ft(this,Ve(this.doc,e.line)),r=0,i=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];else for(;;){var a=r+i>>1;if((a?n[2*a-1]:0)>=o)i=a;else{if(!(n[2*a+1]o&&(e=o,i=!0),r=Ve(this.doc,e)}else r=e;return Hn(this,r,{top:0,left:0},t||"page",n||i).top+(i?this.doc.height-Wt(r):0)},defaultTextHeight:function(){return rr(this.display)},defaultCharWidth:function(){return ir(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var o,a,s,l=this.display,u=(e=Gn(this,st(this.doc,e))).bottom,c=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),l.sizer.appendChild(t),"over"==r)u=e.top;else if("above"==r||"near"==r){var d=Math.max(l.wrapper.clientHeight,this.doc.height),f=Math.max(l.sizer.clientWidth,l.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>d)&&e.top>t.offsetHeight?u=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=d&&(u=e.bottom),c+t.offsetWidth>f&&(c=f-t.offsetWidth)}t.style.top=u+"px",t.style.left=t.style.right="","right"==i?(c=l.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?c=0:"middle"==i&&(c=(l.sizer.clientWidth-t.offsetWidth)/2),t.style.left=c+"px"),n&&(o=this,a={left:c,top:u,right:c+t.offsetWidth,bottom:u+t.offsetHeight},null!=(s=Ar(o,a)).scrollTop&&Lr(o,s.scrollTop),null!=s.scrollLeft&&Nr(o,s.scrollLeft))},triggerOnKeyDown:ti(ca),triggerOnKeyPress:ti(fa),triggerOnKeyUp:da,triggerOnMouseDown:ti(ga),execCommand:function(e){if(ta.hasOwnProperty(e))return ta[e].call(null,this)},triggerElectric:ti((function(e){Ma(this,e)})),findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var o=st(this.doc,e),a=0;a0&&a(t.charAt(n-1));)--n;for(;r.5||this.options.lineWrapping)&&lr(this),he(this,"refresh",this)})),swapDoc:ti((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),Li(this,e),zn(this),this.display.input.reset(),jr(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,ln(this,"swapDoc",this,t),t})),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},ye(e),e.registerHelper=function(t,r,i){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][r]=i},e.registerGlobalHelper=function(t,r,i,o){e.registerHelper(t,r,o),n[t]._global.push({pred:i,val:o})}}(Ca);var Va="iter insert remove copy getEditor constructor".split(" ");for(var Ga in Ro.prototype)Ro.prototype.hasOwnProperty(Ga)&&z(Va,Ga)<0&&(Ca.prototype[Ga]=function(e){return function(){return e.apply(this.doc,arguments)}}(Ro.prototype[Ga]));return ye(Ro),Ca.inputStyles={textarea:$a,contenteditable:za},Ca.defineMode=function(e){Ca.defaults.mode||"null"==e||(Ca.defaults.mode=e),Ne.apply(this,arguments)},Ca.defineMIME=function(e,t){De[e]=t},Ca.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),Ca.defineMIME("text/plain","null"),Ca.defineExtension=function(e,t){Ca.prototype[e]=t},Ca.defineDocExtension=function(e,t){Ro.prototype[e]=t},Ca.fromTextArea=function(e,t){if((t=t?N(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var n=j();t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}function r(){e.value=s.getValue()}var i;if(e.form&&(de(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var a=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=a}}catch(e){}}t.finishInit=function(n){n.save=r,n.getTextArea=function(){return e},n.toTextArea=function(){n.toTextArea=isNaN,r(),e.parentNode.removeChild(n.getWrapperElement()),e.style.display="",e.form&&(pe(e.form,"submit",r),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=i))}},e.style.display="none";var s=Ca((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t);return s},function(e){e.off=pe,e.on=de,e.wheelEventPixels=_i,e.Doc=Ro,e.splitLines=Re,e.countColumn=F,e.findColumn=$,e.isWordChar=J,e.Pass=U,e.signal=he,e.Line=Vt,e.changeEnd=Oi,e.scrollbarModel=Wr,e.Pos=et,e.cmpPos=tt,e.modes=Le,e.mimeModes=De,e.resolveMode=Fe,e.getMode=Be,e.modeExtensions=ze,e.extendMode=Ue,e.copyState=qe,e.startState=He,e.innerMode=We,e.commands=ta,e.keyMap=Wo,e.keyName=Yo,e.isModifierKey=Go,e.lookupKey=Vo,e.normalizeKeyMap=$o,e.StringStream=$e,e.SharedTextMarker=Co,e.TextMarker=So,e.LineWidget=xo,e.e_preventDefault=be,e.e_stopPropagation=_e,e.e_stop=xe,e.addClass=I,e.contains=R,e.rmClass=O,e.keyNames=Bo}(Ca),Ca.version="5.65.2",Ca}()},function(e,t,n){"use strict";n.d(t,"c",(function(){return i})),n.d(t,"a",(function(){return o})),n.d(t,"e",(function(){return a})),n.d(t,"b",(function(){return s})),n.d(t,"d",(function(){return l})),n.d(t,"f",(function(){return u})); -/*! ***************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */ -var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function i(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=0;--i){var o=t[i];if(Number.isInteger(o)&&o>=0){var a=[];a[o]=r,r=a}else{var s={};Object.defineProperty(s,o,{value:r,writable:!0,enumerable:!0,configurable:!0}),r=s}}return e.createNode(r,!1)}var u=function(e){return null==e||"object"===Object(r.h)(e)&&e[Symbol.iterator]().next().done},c=function(e){Object(r.q)(n,e);var t=Object(r.r)(n);function n(e){var i;return Object(r.j)(this,n),i=t.call(this),Object(r.l)(Object(r.w)(i),"items",[]),i.schema=e,i}return Object(r.i)(n,[{key:"addIn",value:function(e,t){if(u(e))this.add(t);else{var i=Object(r.x)(e),o=i[0],a=i.slice(1),s=this.get(o,!0);if(s instanceof n)s.addIn(a,t);else{if(void 0!==s||!this.schema)throw new Error("Expected YAML collection at ".concat(o,". Remaining path: ").concat(a));this.set(o,l(this.schema,a,t))}}}},{key:"deleteIn",value:function(e){var t=Object(r.x)(e),i=t[0],o=t.slice(1);if(0===o.length)return this.delete(i);var a=this.get(i,!0);if(a instanceof n)return a.deleteIn(o);throw new Error("Expected YAML collection at ".concat(i,". Remaining path: ").concat(o))}},{key:"getIn",value:function(e,t){var i=Object(r.x)(e),o=i[0],a=i.slice(1),l=this.get(o,!0);return 0===a.length?!t&&l instanceof s?l.value:l:l instanceof n?l.getIn(a,t):void 0}},{key:"hasAllNullValues",value:function(){return this.items.every((function(e){if(!e||"PAIR"!==e.type)return!1;var t=e.value;return null==t||t instanceof s&&null==t.value&&!t.commentBefore&&!t.comment&&!t.tag}))}},{key:"hasIn",value:function(e){var t=Object(r.x)(e),i=t[0],o=t.slice(1);if(0===o.length)return this.has(i);var a=this.get(i,!0);return a instanceof n&&a.hasIn(o)}},{key:"setIn",value:function(e,t){var i=Object(r.x)(e),o=i[0],a=i.slice(1);if(0===a.length)this.set(o,t);else{var s=this.get(o,!0);if(s instanceof n)s.setIn(a,t);else{if(void 0!==s||!this.schema)throw new Error("Expected YAML collection at ".concat(o,". Remaining path: ").concat(a));this.set(o,l(this.schema,a,t))}}}},{key:"toJSON",value:function(){return null}},{key:"toString",value:function(e,t,o,a){var s=this,l=t.blockItem,u=t.flowChars,c=t.isMap,d=t.itemIndent,f=e,p=f.indent,h=f.indentStep,m=f.stringify,g=this.type===r.e.FLOW_MAP||this.type===r.e.FLOW_SEQ||e.inFlow;g&&(d+=h);var v=c&&this.hasAllNullValues();e=Object.assign({},e,{allNullValues:v,indent:d,inFlow:g,type:null});var y,b=!1,_=!1,w=this.items.reduce((function(t,n,r){var o;n&&(!b&&n.spaceBefore&&t.push({type:"comment",str:""}),n.commentBefore&&n.commentBefore.match(/^.*$/gm).forEach((function(e){t.push({type:"comment",str:"#".concat(e)})})),n.comment&&(o=n.comment),g&&(!b&&n.spaceBefore||n.commentBefore||n.comment||n.key&&(n.key.commentBefore||n.key.comment)||n.value&&(n.value.commentBefore||n.value.comment))&&(_=!0)),b=!1;var a=m(n,e,(function(){return o=null}),(function(){return b=!0}));return g&&!_&&a.includes("\n")&&(_=!0),g&&rn.maxFlowStringSingleLineLength){y=x;var S,O=Object(r.g)(E);try{for(O.s();!(S=O.n()).done;){var C=S.value;y+=C?"\n".concat(h).concat(p).concat(C):"\n"}}catch(e){O.e(e)}finally{O.f()}y+="\n".concat(p).concat(k)}else y="".concat(x," ").concat(E.join(" ")," ").concat(k)}else{var T=w.map(l);y=T.shift();var A,P=Object(r.g)(T);try{for(P.s();!(A=P.n()).done;){var R=A.value;y+=R?"\n".concat(p).concat(R):"\n"}}catch(e){P.e(e)}finally{P.f()}}return this.comment?(y+="\n"+this.comment.replace(/^/gm,"".concat(p,"#")),o&&o()):b&&a&&a(),y}}]),n}(o);function d(e){var t=e instanceof s?e.value:e;return t&&"string"==typeof t&&(t=Number(t)),Number.isInteger(t)&&t>=0?t:null}Object(r.l)(c,"maxFlowStringSingleLineLength",60);var f=function(e){Object(r.q)(n,e);var t=Object(r.r)(n);function n(){return Object(r.j)(this,n),t.apply(this,arguments)}return Object(r.i)(n,[{key:"add",value:function(e){this.items.push(e)}},{key:"delete",value:function(e){var t=d(e);return"number"==typeof t&&this.items.splice(t,1).length>0}},{key:"get",value:function(e,t){var n=d(e);if("number"==typeof n){var r=this.items[n];return!t&&r instanceof s?r.value:r}}},{key:"has",value:function(e){var t=d(e);return"number"==typeof t&&t1&&void 0!==arguments[1]?arguments[1]:null;return Object(r.j)(this,n),(i=t.call(this)).key=e,i.value=o,i.type=n.Type.PAIR,i}return Object(r.i)(n,[{key:"commentBefore",get:function(){return this.key instanceof o?this.key.commentBefore:void 0},set:function(e){if(null==this.key&&(this.key=new s(null)),!(this.key instanceof o)){throw new Error("Pair.commentBefore is an alias for Pair.key.commentBefore. To set it, the key must be a Node.")}this.key.commentBefore=e}},{key:"addToJSMap",value:function(e,t){var n=a(this.key,"",e);if(t instanceof Map){var i=a(this.value,n,e);t.set(n,i)}else if(t instanceof Set)t.add(n);else{var s=function(e,t,n){return null===t?"":"object"!==Object(r.h)(t)?String(t):e instanceof o&&n&&n.doc?e.toString({anchors:Object.create(null),doc:n.doc,indent:"",indentStep:n.indentStep,inFlow:!0,inStringifyKey:!0,stringify:n.stringify}):JSON.stringify(t)}(this.key,n,e),l=a(this.value,s,e);s in t?Object.defineProperty(t,s,{value:l,writable:!0,enumerable:!0,configurable:!0}):t[s]=l}return t}},{key:"toJSON",value:function(e,t){var n=t&&t.mapAsMap?new Map:{};return this.addToJSMap(t,n)}},{key:"toString",value:function(e,t,n){if(!e||!e.doc)return JSON.stringify(this);var a=e.doc.options,l=a.indent,u=a.indentSeq,d=a.simpleKeys,p=this.key,h=this.value,m=p instanceof o&&p.comment;if(d){if(m)throw new Error("With simple keys, key nodes cannot have comments");if(p instanceof c){throw new Error("With simple keys, collection cannot be used as a key value")}}var g=!d&&(!p||m||(p instanceof o?p instanceof c||p.type===r.e.BLOCK_FOLDED||p.type===r.e.BLOCK_LITERAL:"object"===Object(r.h)(p))),v=e,y=v.doc,b=v.indent,_=v.indentStep,w=v.stringify;e=Object.assign({},e,{implicitKey:!g,indent:b+_});var x=!1,k=w(p,e,(function(){return m=null}),(function(){return x=!0}));if(k=i(k,e.indent,m),!g&&k.length>1024){if(d)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");g=!0}if(e.allNullValues&&!d)return this.comment?(k=i(k,e.indent,this.comment),t&&t()):x&&!m&&n&&n(),e.inFlow&&!g?k:"? ".concat(k);k=g?"? ".concat(k,"\n").concat(b,":"):"".concat(k,":"),this.comment&&(k=i(k,e.indent,this.comment),t&&t());var E="",S=null;if(h instanceof o){if(h.spaceBefore&&(E="\n"),h.commentBefore){var O=h.commentBefore.replace(/^/gm,"".concat(e.indent,"#"));E+="\n".concat(O)}S=h.comment}else h&&"object"===Object(r.h)(h)&&(h=y.schema.createNode(h,!0));e.implicitKey=!1,!g&&!this.comment&&h instanceof s&&(e.indentAtStart=k.length+1),x=!1,!u&&l>=2&&!e.inFlow&&!g&&h instanceof f&&h.type!==r.e.FLOW_SEQ&&!h.tag&&!y.anchors.getName(h)&&(e.indent=e.indent.substr(2));var C=w(h,e,(function(){return S=null}),(function(){return x=!0})),T=" ";if(E||this.comment)T="".concat(E,"\n").concat(e.indent);else if(!g&&h instanceof c){("["===C[0]||"{"===C[0])&&!C.includes("\n")||(T="\n".concat(e.indent))}else"\n"===C[0]&&(T="");return x&&!S&&n&&n(),i(k+T+C,e.indent,S)}}]),n}(o);Object(r.l)(p,"Type",{PAIR:"PAIR",MERGE_PAIR:"MERGE_PAIR"});var h=function e(t,n){if(t instanceof m){var i=n.get(t.source);return i.count*i.aliasCount}if(t instanceof c){var o,a=0,s=Object(r.g)(t.items);try{for(s.s();!(o=s.n()).done;){var l=e(o.value,n);l>a&&(a=l)}}catch(e){s.e(e)}finally{s.f()}return a}if(t instanceof p){var u=e(t.key,n),d=e(t.value,n);return Math.max(u,d)}return 1},m=function(e){Object(r.q)(n,e);var t=Object(r.r)(n);function n(e){var i;return Object(r.j)(this,n),(i=t.call(this)).source=e,i.type=r.e.ALIAS,i}return Object(r.i)(n,[{key:"tag",set:function(e){throw new Error("Alias nodes cannot have tags")}},{key:"toJSON",value:function(e,t){if(!t)return a(this.source,e,t);var n=t.anchors,i=t.maxAliasCount,o=n.get(this.source);if(!o||void 0===o.res){var s="This should not happen: Alias anchor was not resolved?";throw this.cstNode?new r.v(this.cstNode,s):new ReferenceError(s)}if(i>=0&&(o.count+=1,0===o.aliasCount&&(o.aliasCount=h(this.source,n)),o.count*o.aliasCount>i)){var l="Excessive alias count indicates a resource exhaustion attack";throw this.cstNode?new r.v(this.cstNode,l):new ReferenceError(l)}return o.res}},{key:"toString",value:function(e){return n.stringify(this,e)}}],[{key:"stringify",value:function(e,t){var n=e.range,r=e.source,i=t.anchors,o=t.doc,a=t.implicitKey,s=t.inStringifyKey,l=Object.keys(i).find((function(e){return i[e]===r}));if(!l&&s&&(l=o.anchors.getName(r)||o.anchors.newName()),l)return"*".concat(l).concat(a?" ":"");var u=o.anchors.getName(r)?"Alias node must be after source node":"Source node not found for alias node";throw new Error("".concat(u," [").concat(n,"]"))}}]),n}(o);function g(e,t){var n,i=t instanceof s?t.value:t,o=Object(r.g)(e);try{for(o.s();!(n=o.n()).done;){var a=n.value;if(a instanceof p){if(a.key===t||a.key===i)return a;if(a.key&&a.key.value===i)return a}}}catch(e){o.e(e)}finally{o.f()}}Object(r.l)(m,"default",!0);var v=function(e){Object(r.q)(n,e);var t=Object(r.r)(n);function n(){return Object(r.j)(this,n),t.apply(this,arguments)}return Object(r.i)(n,[{key:"add",value:function(e,t){e?e instanceof p||(e=new p(e.key||e,e.value)):e=new p(e);var n=g(this.items,e.key),r=this.schema&&this.schema.sortMapEntries;if(n){if(!t)throw new Error("Key ".concat(e.key," already set"));n.value=e.value}else if(r){var i=this.items.findIndex((function(t){return r(e,t)<0}));-1===i?this.items.push(e):this.items.splice(i,0,e)}else this.items.push(e)}},{key:"delete",value:function(e){var t=g(this.items,e);return!!t&&this.items.splice(this.items.indexOf(t),1).length>0}},{key:"get",value:function(e,t){var n=g(this.items,e),r=n&&n.value;return!t&&r instanceof s?r.value:r}},{key:"has",value:function(e){return!!g(this.items,e)}},{key:"set",value:function(e,t){this.add(new p(e,t),!0)}},{key:"toJSON",value:function(e,t,n){var i=n?new n:t&&t.mapAsMap?new Map:{};t&&t.onCreate&&t.onCreate(i);var o,a=Object(r.g)(this.items);try{for(a.s();!(o=a.n()).done;){o.value.addToJSMap(t,i)}}catch(e){a.e(e)}finally{a.f()}return i}},{key:"toString",value:function(e,t,i){if(!e)return JSON.stringify(this);var o,a=Object(r.g)(this.items);try{for(a.s();!(o=a.n()).done;){var s=o.value;if(!(s instanceof p))throw new Error("Map items must all be pairs; found ".concat(JSON.stringify(s)," instead"))}}catch(e){a.e(e)}finally{a.f()}return Object(r.s)(Object(r.t)(n.prototype),"toString",this).call(this,e,{blockItem:function(e){return e.str},flowChars:{start:"{",end:"}"},isMap:!0,itemIndent:e.indent||""},t,i)}}]),n}(c),y=function(e){Object(r.q)(n,e);var t=Object(r.r)(n);function n(e){var i;if(Object(r.j)(this,n),e instanceof p){var o=e.value;o instanceof f||((o=new f).items.push(e.value),o.range=e.value.range),(i=t.call(this,e.key,o)).range=e.range}else i=t.call(this,new s("<<"),new f);return i.type=p.Type.MERGE_PAIR,Object(r.y)(i)}return Object(r.i)(n,[{key:"addToJSMap",value:function(e,t){var n,i=Object(r.g)(this.value.items);try{for(i.s();!(n=i.n()).done;){var o=n.value.source;if(!(o instanceof v))throw new Error("Merge sources must be maps");var a,s=o.toJSON(null,e,Map),l=Object(r.g)(s);try{for(l.s();!(a=l.n()).done;){var u=Object(r.o)(a.value,2),c=u[0],d=u[1];t instanceof Map?t.has(c)||t.set(c,d):t instanceof Set?t.add(c):Object.prototype.hasOwnProperty.call(t,c)||Object.defineProperty(t,c,{value:d,writable:!0,enumerable:!0,configurable:!0})}}catch(e){l.e(e)}finally{l.f()}}}catch(e){i.e(e)}finally{i.f()}return t}},{key:"toString",value:function(e,t){var i=this.value;if(i.items.length>1)return Object(r.s)(Object(r.t)(n.prototype),"toString",this).call(this,e,t);this.value=i.items[0];var o=Object(r.s)(Object(r.t)(n.prototype),"toString",this).call(this,e,t);return this.value=i,o}}]),n}(p),b={defaultType:r.e.BLOCK_LITERAL,lineWidth:76},_={trueStr:"true",falseStr:"false"},w={asBigInt:!1},x={nullStr:"null"},k={defaultType:r.e.PLAIN,doubleQuoted:{jsonEncoding:!1,minMultiLineLength:40},fold:{lineWidth:80,minContentWidth:20}};function E(e,t,n){var i,o=Object(r.g)(t);try{for(o.s();!(i=o.n()).done;){var a=i.value,l=a.format,u=a.test,c=a.resolve;if(u){var d=e.match(u);if(d){var f=c.apply(null,d);return f instanceof s||(f=new s(f)),l&&(f.format=l),f}}}}catch(e){o.e(e)}finally{o.f()}return n&&(e=n(e)),new s(e)}var S=function(e,t){for(var n=e[t+1];" "===n||"\t"===n;){do{n=e[t+=1]}while(n&&"\n"!==n);n=e[t+1]}return t};function O(e,t,n,r){var i=r.indentAtStart,o=r.lineWidth,a=void 0===o?80:o,s=r.minContentWidth,l=void 0===s?20:s,u=r.onFold,c=r.onOverflow;if(!a||a<0)return e;var d=Math.max(1+l,1+a-t.length);if(e.length<=d)return e;var f=[],p={},h=a-t.length;"number"==typeof i&&(i>a-Math.max(2,l)?f.push(0):h=a-i);var m,g=void 0,v=void 0,y=!1,b=-1,_=-1,w=-1;for("block"===n&&-1!==(b=S(e,b))&&(h=b+d);m=e[b+=1];){if("quoted"===n&&"\\"===m){switch(_=b,e[b+1]){case"x":b+=3;break;case"u":b+=5;break;case"U":b+=9;break;default:b+=1}w=b}if("\n"===m)"block"===n&&(b=S(e,b)),h=b+d,g=void 0;else{if(" "===m&&v&&" "!==v&&"\n"!==v&&"\t"!==v){var x=e[b+1];x&&" "!==x&&"\n"!==x&&"\t"!==x&&(g=b)}if(b>=h)if(g)f.push(g),h=g+d,g=void 0;else if("quoted"===n){for(;" "===v||"\t"===v;)v=m,m=e[b+=1],y=!0;var k=b>w+1?b-2:_-1;if(p[k])return e;f.push(k),p[k]=!0,h=k+d,g=void 0}else y=!0}v=m}if(y&&c&&c(),0===f.length)return e;u&&u();for(var E=e.slice(0,f[0]),O=0;Or)return!0;if(i-(a=o+1)<=r)return!1}return!0}(s,k.fold.lineWidth,l.length)),d=c?"|":">";if(!s)return d+"\n";var f="",p="";if(s=s.replace(/[\n\t ]*$/,(function(e){var t=e.indexOf("\n");return-1===t?d+="-":s!==e&&t===e.length-1||(d+="+",i&&i()),p=e.replace(/\n$/,""),""})).replace(/^[\n ]*/,(function(e){-1!==e.indexOf(" ")&&(d+=u);var t=e.match(/ +$/);return t?(f=e.slice(0,-t[0].length),t[0]):(f=e,"")})),p&&(p=p.replace(/\n+(?!\n|$)/g,"$&".concat(l))),f&&(f=f.replace(/\n+/g,"$&".concat(l))),o&&(d+=" #"+o.replace(/ ?[\r\n]+/g," "),n&&n()),!s)return"".concat(d).concat(u,"\n").concat(l).concat(p);if(c)return s=s.replace(/\n+/g,"$&".concat(l)),"".concat(d,"\n").concat(l).concat(f).concat(s).concat(p);s=s.replace(/\n+/g,"\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,"$&".concat(l));var h=O("".concat(f).concat(s).concat(p),l,"block",k.fold);return"".concat(d,"\n").concat(l).concat(h)}function j(e,t,n,i){var o=k.defaultType,a=t.implicitKey,s=t.inFlow,l=e,u=l.type,c=l.value;"string"!=typeof c&&(c=String(c),e=Object.assign({},e,{value:c}));var d=function(o){switch(o){case r.e.BLOCK_FOLDED:case r.e.BLOCK_LITERAL:return R(e,t,n,i);case r.e.QUOTE_DOUBLE:return A(c,t);case r.e.QUOTE_SINGLE:return P(c,t);case r.e.PLAIN:return function(e,t,n,i){var o=e.comment,a=e.type,s=e.value,l=t.actualString,u=t.implicitKey,c=t.indent,d=t.inFlow;if(u&&/[\n[\]{},]/.test(s)||d&&/[[\]{},]/.test(s))return A(s,t);if(!s||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(s))return u||d||-1===s.indexOf("\n")?-1!==s.indexOf('"')&&-1===s.indexOf("'")?P(s,t):A(s,t):R(e,t,n,i);if(!u&&!d&&a!==r.e.PLAIN&&-1!==s.indexOf("\n"))return R(e,t,n,i);if(""===c&&T(s))return t.forceBlockIndent=!0,R(e,t,n,i);var f=s.replace(/\n+/g,"$&\n".concat(c));if(l){var p=t.doc.schema.tags;if("string"!=typeof E(f,p,p.scalarFallback).value)return A(s,t)}var h=u?f:O(f,c,"flow",C(t));return!o||d||-1===h.indexOf("\n")&&-1===o.indexOf("\n")?h:(n&&n(),function(e,t,n){if(!n)return e;var r=n.replace(/[\s\S]^/gm,"$&".concat(t,"#"));return"#".concat(r,"\n").concat(t).concat(e)}(h,c,o))}(e,t,n,i);default:return null}};u!==r.e.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f]/.test(c)?u=r.e.QUOTE_DOUBLE:!a&&!s||u!==r.e.BLOCK_FOLDED&&u!==r.e.BLOCK_LITERAL||(u=r.e.QUOTE_DOUBLE);var f=d(u);if(null===f&&null===(f=d(o)))throw new Error("Unsupported default string type ".concat(o));return f}function I(e){var t=e.format,n=e.minFractionDigits,r=e.tag,i=e.value;if("bigint"==typeof i)return String(i);if(!isFinite(i))return isNaN(i)?".nan":i<0?"-.inf":".inf";var o=JSON.stringify(i);if(!t&&n&&(!r||"tag:yaml.org,2002:float"===r)&&/^\d/.test(o)){var a=o.indexOf(".");a<0&&(a=o.length,o+=".");for(var s=n-(o.length-a-1);s-- >0;)o+="0"}return o}function M(e,t){var n,i,o;switch(t.type){case r.e.FLOW_MAP:n="}",i="flow map";break;case r.e.FLOW_SEQ:n="]",i="flow sequence";break;default:return void e.push(new r.n(t,"Not a flow collection!?"))}for(var a=t.items.length-1;a>=0;--a){var s=t.items[a];if(!s||s.type!==r.e.COMMENT){o=s;break}}if(o&&o.char!==n){var l,u="Expected ".concat(i," to end with ").concat(n);"number"==typeof o.offset?(l=new r.n(t,u)).offset=o.offset+1:(l=new r.n(o,u),o.range&&o.range.end&&(l.offset=o.range.end-o.range.start)),e.push(l)}}function L(e,t){var n=t.context.src[t.range.start-1];if("\n"!==n&&"\t"!==n&&" "!==n){e.push(new r.n(t,"Comments must be separated from other tokens by white space characters"))}}function D(e,t){var n=String(t),i=n.substr(0,8)+"..."+n.substr(-8);return new r.n(e,'The "'.concat(i,'" key is too long'))}function N(e,t){var n,i=Object(r.g)(t);try{for(i.s();!(n=i.n()).done;){var o=n.value,a=o.afterKey,s=o.before,l=o.comment,u=e.items[s];u?(a&&u.value&&(u=u.value),void 0===l?!a&&u.commentBefore||(u.spaceBefore=!0):u.commentBefore?u.commentBefore+="\n"+l:u.commentBefore=l):void 0!==l&&(e.comment?e.comment+="\n"+l:e.comment=l)}}catch(e){i.e(e)}finally{i.f()}}function F(e,t){var n=t.strValue;return n?"string"==typeof n?n:(n.errors.forEach((function(n){n.source||(n.source=t),e.errors.push(n)})),n.str):""}function B(e,t){var n=t.tag,i=t.type,o=!1;if(n){var a=n.handle,s=n.suffix,l=n.verbatim;if(l){if("!"!==l&&"!!"!==l)return l;var u="Verbatim tags aren't resolved, so ".concat(l," is invalid.");e.errors.push(new r.n(t,u))}else if("!"!==a||s)try{return function(e,t){var n=t.tag,i=n.handle,o=n.suffix,a=e.tagPrefixes.find((function(e){return e.handle===i}));if(!a){var s=e.getDefaults().tagPrefixes;if(s&&(a=s.find((function(e){return e.handle===i}))),!a)throw new r.n(t,"The ".concat(i," tag handle is non-default and was not declared."))}if(!o)throw new r.n(t,"The ".concat(i," tag has no suffix."));if("!"===i&&"1.0"===(e.version||e.options.version)){if("^"===o[0])return e.warnings.push(new r.m(t,"YAML 1.0 ^ tag expansion is not supported")),o;if(/[:/]/.test(o)){var l=o.match(/^([a-z0-9-]+)\/(.*)/i);return l?"tag:".concat(l[1],".yaml.org,2002:").concat(l[2]):"tag:".concat(o)}}return a.prefix+decodeURIComponent(o)}(e,t)}catch(t){e.errors.push(t)}else o=!0}switch(i){case r.e.BLOCK_FOLDED:case r.e.BLOCK_LITERAL:case r.e.QUOTE_DOUBLE:case r.e.QUOTE_SINGLE:return r.u.STR;case r.e.FLOW_MAP:case r.e.MAP:return r.u.MAP;case r.e.FLOW_SEQ:case r.e.SEQ:return r.u.SEQ;case r.e.PLAIN:return o?r.u.STR:null;default:return null}}function z(e,t,n){var i,o=e.schema.tags,a=[],l=Object(r.g)(o);try{for(l.s();!(i=l.n()).done;){var u=i.value;if(u.tag===n){if(!u.test){var d=u.resolve(e,t);return d instanceof c?d:new s(d)}a.push(u)}}}catch(e){l.e(e)}finally{l.f()}var f=F(e,t);return"string"==typeof f&&a.length>0?E(f,a,o.scalarFallback):null}function U(e,t,n){try{var i=z(e,t,n);if(i)return n&&t.tag&&(i.tag=n),i}catch(n){return n.source||(n.source=t),e.errors.push(n),null}try{var o=function(e){switch(e.type){case r.e.FLOW_MAP:case r.e.MAP:return r.u.MAP;case r.e.FLOW_SEQ:case r.e.SEQ:return r.u.SEQ;default:return r.u.STR}}(t);if(!o)throw new Error("The tag ".concat(n," is unavailable"));var a="The tag ".concat(n," is unavailable, falling back to ").concat(o);e.warnings.push(new r.m(t,a));var s=z(e,t,o);return s.tag=n,s}catch(n){var l=new r.v(t,n.message);return l.stack=n.stack,e.errors.push(l),null}}function q(e,t){var n,i={before:[],after:[]},o=!1,a=!1,s=function(e){if(!e)return!1;var t=e.type;return t===r.e.MAP_KEY||t===r.e.MAP_VALUE||t===r.e.SEQ_ITEM}(t.context.parent)?t.context.parent.props.concat(t.props):t.props,l=Object(r.g)(s);try{for(l.s();!(n=l.n()).done;){var u=n.value,c=u.start,d=u.end;switch(t.context.src[c]){case r.a.COMMENT:if(!t.commentHasRequiredWhitespace(c)){e.push(new r.n(t,"Comments must be separated from other tokens by white space characters"))}var f=t.header,p=t.valueRange;(p&&(c>p.start||f&&c>f.start)?i.after:i.before).push(t.context.src.slice(c+1,d));break;case r.a.ANCHOR:if(o){e.push(new r.n(t,"A node can have at most one anchor"))}o=!0;break;case r.a.TAG:if(a){e.push(new r.n(t,"A node can have at most one tag"))}a=!0}}}catch(e){l.e(e)}finally{l.f()}return{comments:i,hasAnchor:o,hasTag:a}}function W(e,t){if(!t)return null;t.error&&e.errors.push(t.error);var n=q(e.errors,t),i=n.comments,o=n.hasAnchor,a=n.hasTag;if(o){var s=e.anchors,l=t.anchor,u=s.getNode(l);u&&(s.map[s.newName(l)]=u),s.map[l]=t}if(t.type===r.e.ALIAS&&(o||a)){e.errors.push(new r.n(t,"An alias node must not specify any properties"))}var c=function(e,t){var n=e.anchors,i=e.errors,o=e.schema;if(t.type===r.e.ALIAS){var a=t.rawValue,s=n.getNode(a);if(!s){var l="Aliased anchor not found: ".concat(a);return i.push(new r.v(t,l)),null}var u=new m(s);return n._cstAliases.push(u),u}var c=B(e,t);if(c)return U(e,t,c);if(t.type!==r.e.PLAIN){var d="Failed to resolve ".concat(t.type," node here");return i.push(new r.f(t,d)),null}try{return E(F(e,t),o.tags,o.tags.scalarFallback)}catch(e){return e.source||(e.source=t),i.push(e),null}}(e,t);if(c){c.range=[t.range.start,t.range.end],e.options.keepCstNodes&&(c.cstNode=t),e.options.keepNodeTypes&&(c.type=t.type);var d=i.before.join("\n");d&&(c.commentBefore=c.commentBefore?"".concat(c.commentBefore,"\n").concat(d):d);var f=i.after.join("\n");f&&(c.comment=c.comment?"".concat(c.comment,"\n").concat(f):f)}return t.resolved=c}function H(e,t){if(t.type!==r.e.MAP&&t.type!==r.e.FLOW_MAP){var n="A ".concat(t.type," node cannot be resolved as a mapping");return e.errors.push(new r.f(t,n)),null}var i=t.type===r.e.FLOW_MAP?function(e,t){for(var n=[],i=[],o=void 0,a=!1,s="{",l=0;l0){(u=new r.c(r.e.PLAIN,[])).context={parent:l,src:l.context.src};var c=l.range.start+1;if(u.range={start:c,end:c},u.valueRange={start:c,end:c},"number"==typeof l.range.origStart){var d=l.range.origStart+1;u.range.origStart=u.range.origEnd=d,u.valueRange.origStart=u.valueRange.origEnd=d}}var f=new p(o,W(e,u));$(l,f),i.push(f),o&&"number"==typeof a&&l.range.start>a+1024&&e.errors.push(D(t,o)),o=void 0,a=null;break;default:void 0!==o&&i.push(new p(o)),o=W(e,l),a=l.range.start,l.error&&e.errors.push(l.error);e:for(var h=s+1;;++h){var m=t.items[h];switch(m&&m.type){case r.e.BLANK_LINE:case r.e.COMMENT:continue e;case r.e.MAP_VALUE:break e;default:e.errors.push(new r.n(l,"Implicit map keys need to be followed by map values"));break e}}if(l.valueRangeContainsNewline){e.errors.push(new r.n(l,"Implicit map keys need to be on a single line"))}}}void 0!==o&&i.push(new p(o));return{comments:n,items:i}}(e,t),o=i.comments,a=i.items,s=new v;s.items=a,N(s,o);for(var l=!1,u=0;ui.valueRange.start)return!1;if(o[s]!==r.a.COMMENT)return!1;for(var l=n;ls+1024&&e.errors.push(D(t,a));for(var v=u.context.src,y=s;yr&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(m,"$1"+e.trim());case 58:return e.trim()+t.replace(m,"$1"+e.trim());default:if(0<1*n&&0l.charCodeAt(8))break;case 115:a=a.replace(l,"-webkit-"+l)+";"+a;break;case 207:case 102:a=a.replace(l,"-webkit-"+(102s.charCodeAt(0)&&(s=s.trim()),s=[s],0p)&&(B=(q=q.replace(" ",":")).length),01?t-1:0),a=1;a1?(n=i,r=o):u>0&&(n+=a*u,r+=l*u)}return s(e,t,n,r)}function s(e,t,n,r){var i=n-e,o=r-t;return i*i+o*o}function l(e){for(var t=e.length,n=0;ni&&(i=a,r=o)}if(0===i)return null;var s=e[r];e[r]=e[n],e[n]=s;for(var l=n+1;l=0;f--){d[f]=e[f][t]/e[f][f];for(var p=f-1;p>=0;p--)e[p][t]-=e[p][f]*d[f]}return d}function u(e){return 180*e/Math.PI}function c(e){return e*Math.PI/180}function d(e,t){var n=e%t;return n*t<0?n+t:n}function f(e,t,n){return e+n*(t-e)}function p(e,t){var n=Math.pow(10,t);return Math.round(e*n)/n}function h(e,t){return Math.floor(p(e,t))}function m(e,t){return Math.ceil(p(e,t))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i.a})),n.d(t,"c",(function(){return T})),n.d(t,"h",(function(){return j})),n.d(t,"i",(function(){return I})),n.d(t,"b",(function(){return L})),n.d(t,"d",(function(){return D})),n.d(t,"k",(function(){return N})),n.d(t,"j",(function(){return F})),n.d(t,"p",(function(){return B})),n.d(t,"q",(function(){return z})),n.d(t,"l",(function(){return $})),n.d(t,"m",(function(){return V})),n.d(t,"e",(function(){return G})),n.d(t,"n",(function(){return K})),n.d(t,"f",(function(){return Y})),n.d(t,"o",(function(){return Q})),n.d(t,"g",(function(){return X}));var r,i=n(53),o=function(){function e(e){this.code_=e.code,this.units_=e.units,this.extent_=void 0!==e.extent?e.extent:null,this.worldExtent_=void 0!==e.worldExtent?e.worldExtent:null,this.axisOrientation_=void 0!==e.axisOrientation?e.axisOrientation:"enu",this.global_=void 0!==e.global&&e.global,this.canWrapX_=!(!this.global_||!this.extent_),this.getPointResolutionFunc_=e.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=e.metersPerUnit}return e.prototype.canWrapX=function(){return this.canWrapX_},e.prototype.getCode=function(){return this.code_},e.prototype.getExtent=function(){return this.extent_},e.prototype.getUnits=function(){return this.units_},e.prototype.getMetersPerUnit=function(){return this.metersPerUnit_||i.a[this.units_]},e.prototype.getWorldExtent=function(){return this.worldExtent_},e.prototype.getAxisOrientation=function(){return this.axisOrientation_},e.prototype.isGlobal=function(){return this.global_},e.prototype.setGlobal=function(e){this.global_=e,this.canWrapX_=!(!e||!this.extent_)},e.prototype.getDefaultTileGrid=function(){return this.defaultTileGrid_},e.prototype.setDefaultTileGrid=function(e){this.defaultTileGrid_=e},e.prototype.setExtent=function(e){this.extent_=e,this.canWrapX_=!(!this.global_||!e)},e.prototype.setWorldExtent=function(e){this.worldExtent_=e},e.prototype.setGetPointResolution=function(e){this.getPointResolutionFunc_=e},e.prototype.getPointResolutionFunc=function(){return this.getPointResolutionFunc_},e}(),a=n(13),s=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),l=6378137*Math.PI,u=[-l,-l,l,l],c=[-180,-85,180,85],d=6378137*Math.log(Math.tan(Math.PI/2)),f=function(e){function t(t){return e.call(this,{code:t,units:i.b.METERS,extent:u,global:!0,worldExtent:c,getPointResolution:function(e,t){return e/Object(a.c)(t[1]/6378137)}})||this}return s(t,e),t}(o),p=[new f("EPSG:3857"),new f("EPSG:102100"),new f("EPSG:102113"),new f("EPSG:900913"),new f("http://www.opengis.net/def/crs/EPSG/0/3857"),new f("http://www.opengis.net/gml/srs/epsg.xml#3857")];function h(e,t,n){var r=e.length,i=n>1?n:2,o=t;void 0===o&&(o=i>2?e.slice():new Array(r));for(var a=0;ad?s=d:s<-d&&(s=-d),o[a+1]=s}return o}function m(e,t,n){var r=e.length,i=n>1?n:2,o=t;void 0===o&&(o=i>2?e.slice():new Array(r));for(var a=0;a=-180&&e[0]<=180&&e[1]>=-90&&e[1]<=90&&(C=!1,console.warn("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),e)}function K(e,t){return H?z(e,t,H):e}function Y(e,t){return H?z(e,H,t):e}function Q(e,t){if(!H)return e;var n=j(t).getUnits(),r=H.getUnits();return n&&r?e*i.a[n]/i.a[r]:e}function X(e,t){if(!H)return e;var n=j(t).getUnits(),r=H.getUnits();return n&&r?e*i.a[r]/i.a[n]:e}M(p),M(_),U=p,q=h,W=m,_.forEach((function(e){U.forEach((function(t){k(e,t,q),k(t,e,W)}))}))},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return B})),n.d(t,"b",(function(){return f})),n.d(t,"c",(function(){return S})),n.d(t,"d",(function(){return q})),n.d(t,"e",(function(){return H})),n.d(t,"f",(function(){return V})),n.d(t,"g",(function(){return j})),n.d(t,"h",(function(){return I})),n.d(t,"i",(function(){return b})),n.d(t,"j",(function(){return A})),n.d(t,"k",(function(){return E})),n.d(t,"l",(function(){return R})),n.d(t,"m",(function(){return C})),n.d(t,"n",(function(){return T})),n.d(t,"o",(function(){return P})),n.d(t,"p",(function(){return d})),n.d(t,"q",(function(){return X})),n.d(t,"r",(function(){return x})),n.d(t,"s",(function(){return w})),n.d(t,"t",(function(){return h})),n.d(t,"u",(function(){return g})),n.d(t,"v",(function(){return m})),n.d(t,"w",(function(){return y})),n.d(t,"x",(function(){return K})),n.d(t,"y",(function(){return Y})),n.d(t,"z",(function(){return Z})),n.d(t,"A",(function(){return ee})),n.d(t,"B",(function(){return te})),n.d(t,"C",(function(){return W})),n.d(t,"D",(function(){return U})),n.d(t,"E",(function(){return p})),n.d(t,"F",(function(){return _})),n.d(t,"G",(function(){return u})),n.d(t,"H",(function(){return v})),n.d(t,"I",(function(){return Q}));var r=n(108),i=n(25),o=n(6),a=n(765),s=n.n(a);n(158);function l(e,t,n,r){if(function(e){return"IntValue"===e.kind}(n)||function(e){return"FloatValue"===e.kind}(n))e[t.value]=Number(n.value);else if(function(e){return"BooleanValue"===e.kind}(n)||function(e){return"StringValue"===e.kind}(n))e[t.value]=n.value;else if(function(e){return"ObjectValue"===e.kind}(n)){var o={};n.fields.map((function(e){return l(o,e.name,e.value,r)})),e[t.value]=o}else if(function(e){return"Variable"===e.kind}(n)){var a=(r||{})[n.name.value];e[t.value]=a}else if(function(e){return"ListValue"===e.kind}(n))e[t.value]=n.values.map((function(e){var n={};return l(n,t,e,r),n[t.value]}));else if(function(e){return"EnumValue"===e.kind}(n))e[t.value]=n.value;else{if(!function(e){return"NullValue"===e.kind}(n))throw new i.a(17);e[t.value]=null}}function u(e,t){var n=null;e.directives&&(n={},e.directives.forEach((function(e){n[e.name.value]={},e.arguments&&e.arguments.forEach((function(r){var i=r.name,o=r.value;return l(n[e.name.value],i,o,t)}))})));var r=null;return e.arguments&&e.arguments.length&&(r={},e.arguments.forEach((function(e){var n=e.name,i=e.value;return l(r,n,i,t)}))),d(e.name.value,r,n)}var c=["connection","include","skip","client","rest","export"];function d(e,t,n){if(n&&n.connection&&n.connection.key){if(n.connection.filter&&n.connection.filter.length>0){var r=n.connection.filter?n.connection.filter:[];r.sort();var i=t,o={};return r.forEach((function(e){o[e]=i[e]})),n.connection.key+"("+JSON.stringify(o)+")"}return n.connection.key}var a=e;if(t){var l=s()(t);a+="("+l+")"}return n&&Object.keys(n).forEach((function(e){-1===c.indexOf(e)&&(n[e]&&Object.keys(n[e]).length?a+="@"+e+"("+JSON.stringify(n[e])+")":a+="@"+e)})),a}function f(e,t){if(e.arguments&&e.arguments.length){var n={};return e.arguments.forEach((function(e){var r=e.name,i=e.value;return l(n,r,i,t)})),n}return null}function p(e){return e.alias?e.alias.value:e.name.value}function h(e){return"Field"===e.kind}function m(e){return"InlineFragment"===e.kind}function g(e){return e&&"id"===e.type&&"boolean"==typeof e.generated}function v(e,t){return void 0===t&&(t=!1),Object(o.a)({type:"id",generated:t},"string"==typeof e?{id:e,typename:void 0}:e)}function y(e){return null!=e&&"object"==typeof e&&"json"===e.type}function b(e,t){if(e.directives&&e.directives.length){var n={};return e.directives.forEach((function(e){n[e.name.value]=f(e,t)})),n}return null}function _(e,t){return void 0===t&&(t={}),(n=e.directives,n?n.filter(k).map((function(e){var t=e.arguments;e.name.value,Object(i.b)(t&&1===t.length,14);var n=t[0];Object(i.b)(n.name&&"if"===n.name.value,15);var r=n.value;return Object(i.b)(r&&("Variable"===r.kind||"BooleanValue"===r.kind),16),{directive:e,ifArgument:n}})):[]).every((function(e){var n=e.directive,r=e.ifArgument,o=!1;return"Variable"===r.value.kind?(o=t[r.value.name.value],Object(i.b)(void 0!==o,13)):o=r.value.value,"skip"===n.name.value?!o:o}));var n}function w(e,t){return function(e){var t=[];return Object(r.visit)(e,{Directive:function(e){t.push(e.name.value)}}),t}(t).some((function(t){return e.indexOf(t)>-1}))}function x(e){return e&&w(["client"],e)&&w(["export"],e)}function k(e){var t=e.name.value;return"skip"===t||"include"===t}function E(e,t){var n=t,r=[];return e.definitions.forEach((function(e){if("OperationDefinition"===e.kind)throw new i.a(11);"FragmentDefinition"===e.kind&&r.push(e)})),void 0===n&&(Object(i.b)(1===r.length,12),n=r[0].name.value),Object(o.a)(Object(o.a)({},e),{definitions:Object(o.f)([{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:n}}]}}],e.definitions)})}function S(e){for(var t=[],n=1;n1){var r=[];t=ie(t,r);for(var i=1;i2?n-2:0),i=2;i96?d:f};function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e){for(var t=1;t-1}function T(e){return C(e)?window.pageYOffset:e.scrollTop}function A(e,t){C(e)?window.scrollTo(0,t):e.scrollTop=t}function P(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function R(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:w,i=T(e),o=t-i,a=10,s=0;function l(){var t=P(s+=a,i,o,n);A(e,t),sn.bottom?A(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+i,e.scrollHeight)):r.top-i=p)return{placement:"bottom",maxHeight:t};if(k>=p&&!a)return o&&R(l,E,160),{placement:"bottom",maxHeight:t};if(!a&&k>=r||a&&w>=r)return o&&R(l,E,160),{placement:"bottom",maxHeight:a?w-y:k-y};if("auto"===i||a){var O=t,C=a?_:x;return C>=r&&(O=Math.min(C-y-s.controlHeight,t)),{placement:"top",maxHeight:O}}if("bottom"===i)return o&&A(l,E),{placement:"bottom",maxHeight:t};break;case"top":if(_>=p)return{placement:"top",maxHeight:t};if(x>=p&&!a)return o&&R(l,S,160),{placement:"top",maxHeight:t};if(!a&&x>=r||a&&_>=r){var P=t;return(!a&&x>=r||a&&_>=r)&&(P=a?_-b:x-b),o&&R(l,S,160),{placement:"top",maxHeight:P}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(i,'".'))}return u}var z=function(e){return"auto"===e?"bottom":e},U=function(e){var t,n=e.placement,r=e.theme,i=r.borderRadius,o=r.spacing,a=r.colors;return t={label:"menu"},Object(f.a)(t,function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(n),"100%"),Object(f.a)(t,"backgroundColor",a.neutral0),Object(f.a)(t,"borderRadius",i),Object(f.a)(t,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),Object(f.a)(t,"marginBottom",o.menuGutter),Object(f.a)(t,"marginTop",o.menuGutter),Object(f.a)(t,"position","absolute"),Object(f.a)(t,"width","100%"),Object(f.a)(t,"zIndex",1),t},q=Object(p.createContext)({getPortalPlacement:null}),W=function(e){Object(d.a)(n,e);var t=_(n);function n(){var e;Object(u.a)(this,n);for(var r=arguments.length,i=new Array(r),o=0;o=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},T=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},A=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},P=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);to)return 1}return e.size===t.size?0:null}function j(e){if(null==e)return null;if(r.List.isList(e))return e;if(Array.isArray(e))return Object(r.List)(e);throw new Error("Paths can only be created from arrays or lists, but you passed: "+e)}function I(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:B(e,t),r=e.slice(0,n),i=t.slice(0,n);return[r,i]}function M(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.size-1;return L(e,0-t,n)}function L(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.size-1,r=e.get(n),i=r+t,o=e.set(n,i);return o}function D(e,t){var n=I(e,t),r=A(n,2),i=r[0],o=r[1];return e.sizel},isPath:function(e){return(r.List.isList(e)||Array.isArray(e))&&e.every((function(e){return"number"==typeof e}))},isSibling:function(e,t){if(e.size!==t.size)return!1;var n=e.butLast(),r=t.butLast();return n.equals(r)},isYounger:F,lift:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=e.slice(0,-1*t);return n},drop:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=e.slice(t);return n},max:function(e,t){return Math.max(e.size,t.size)},min:B,relate:function(e,t){for(var n=[],r=0;r=i&&(e=M(e=L(e,1,a),i,a+1))),"move_node"===n){var c=t.newPath;if(N(o,c))return Object(r.List)([e]);u||s?e=F(o,c)&&o.sizee.offset||1===z.compare(this.path,e.path))}},{key:"isAfterRange",value:function(e){return!this.isUnset&&this.isAfterPoint(e.end)}},{key:"isAtEndOfRange",value:function(e){return!this.isUnset&&this.equals(e.end)}},{key:"isAtStartOfRange",value:function(e){return!this.isUnset&&this.equals(e.start)}},{key:"isBeforePoint",value:function(e){return!this.isUnset&&(this.key===e.key&&this.offset0&&void 0!==arguments[0]?arguments[0]:1;if(0===e)return this;if(e<0)return this.moveForward(-e);var t=this.setOffset(this.offset-e);return t}},{key:"moveForward",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;if(0===e)return this;if(e<0)return this.moveBackward(-e);var t=this.setOffset(this.offset+e);return t}},{key:"moveTo",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.key;"number"==typeof e?(t=e,e=this.path):"string"==typeof e?e=(n=e)===this.key?this.path:null:n=e.equals(this.path)?this.key:null;var r=this.merge({key:n,path:e,offset:t});return r}},{key:"moveToStartOfNode",value:function(e){var t=e.getFirstText();return this.moveTo(t.key,0)}},{key:"moveToEndOfNode",value:function(e){var t=e.getLastText();return this.moveTo(t.key,t.text.length)}},{key:"normalize",value:function(e){if(null==this.key&&null==this.path)return this.setOffset(null);var n=this.key,r=this.offset,i=this.path,o=i&&e.getNode(i);if(!o&&(o=e.getNode(n)))return this.merge({path:e.getPath(n)});if(!o){Object(a.a)(!1,"A point's `path` or `key` invalid and was reset!");var s=e.getFirstText();return s?this.merge({key:s.key,offset:0,path:e.getPath(s.key)}):t.create()}if("text"!==o.object){Object(a.a)(!1,"A point should not reference a non-text node!");var l=o.getTextAtOffset(r),u=o.getOffset(l.key);return this.merge({offset:r-u,key:l.key,path:e.getPath(l.key)})}o&&i&&n&&n!==o.key&&Object(a.a)(!1,"A point's `key` did not match its `path`!");var c=this.merge({key:o.key,path:null==i?e.getPath(o.key):i,offset:null==r?0:Math.min(r,o.text.length)});if(c.offset===o.text.length){var d=e.getClosestBlock(c.path).getNextText();d&&(c=c.merge({key:d.key,path:e.getPath(d.key),offset:0}))}return c}},{key:"setKey",value:function(e){return null!=e&&(e=_.create(e)),this.set("key",e)}},{key:"setOffset",value:function(e){return this.set("offset",e)}},{key:"setPath",value:function(e){return null!=e&&(e=z.create(e)),this.set("path",e)}},{key:"toJSON",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={object:this.object,key:this.key,offset:this.offset,path:this.path&&this.path.toArray()};return e.preserveKeys||delete t.key,t}},{key:"unset",value:function(){return this.merge({key:null,offset:null,path:null})}},{key:"isSet",get:function(){return null!=this.key&&null!=this.offset&&null!=this.path}},{key:"isUnset",get:function(){return!this.isSet}}],[{key:"create",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(t.isPoint(e))return e;if(o()(e))return t.fromJSON(e);throw new Error("`Point.create` only accepts objects or points, but you passed it: "+e)}},{key:"createProperties",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(t.isPoint(e))return{key:e.key,offset:e.offset,path:e.path};if(o()(e)){var n={};return"key"in e&&(n.key=e.key),"offset"in e&&(n.offset=e.offset),"path"in e&&(n.path=z.create(e.path)),"path"in e&&!("key"in e)&&(n.key=null),"key"in e&&!("path"in e)&&(n.path=null),n}throw new Error("`Point.createProperties` only accepts objects or points, but you passed it: "+e)}},{key:"fromJSON",value:function(e){var n=e.key,r=void 0===n?null:n,i=e.offset,o=void 0===i?null:i,a=e.path,s=void 0===a?null:a;return new t({key:r,offset:o,path:z.create(s)})}}]),t}(Object(r.Record)(U)),W=function(){function e(){x(this,e)}return k(e,null,[{key:"create",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(r.Map.isMap(t))return t;if(o()(t))return e.fromJSON(t);throw new Error("`Data.create` only accepts objects or maps, but you passed it: "+t)}},{key:"fromJSON",value:function(e){return new r.Map(e)}}]),e}();W.fromJS=W.fromJSON;var H={data:void 0,type:void 0},$=function(e){function t(){return x(this,t),T(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return O(t,e),k(t,[{key:"toJSON",value:function(){return{object:this.object,type:this.type,data:this.data.toJSON()}}}],[{key:"create",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(t.isMark(e))return e;if("string"==typeof e&&(e={type:e}),o()(e))return t.fromJSON(e);throw new Error("`Mark.create` only accepts objects, strings or marks, but you passed it: "+e)}},{key:"createSet",value:function(e){if(r.Set.isSet(e)||Array.isArray(e))return new r.Set(e.map(t.create));if(null==e)return Object(r.Set)();throw new Error("`Mark.createSet` only accepts sets, arrays or null, but you passed it: "+e)}},{key:"createProperties",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(t.isMark(e))return{data:e.data,type:e.type};if("string"==typeof e)return{type:e};if(o()(e)){var n={};return"type"in e&&(n.type=e.type),"data"in e&&(n.data=W.create(e.data)),n}throw new Error("`Mark.createProperties` only accepts objects, strings or marks, but you passed it: "+e)}},{key:"fromJSON",value:function(e){var n=e.data,i=void 0===n?{}:n,o=e.type;if("string"!=typeof o)throw new Error("`Mark.fromJS` requires a `type` string.");return new t({type:o,data:new r.Map(i)})}},{key:"isMarkSet",value:function(e){return r.Set.isSet(e)&&e.every((function(e){return t.isMark(e)}))}}]),t}(Object(r.Record)(H)),V={type:void 0,data:void 0,anchor:void 0,focus:void 0},G=function(e){function t(){return x(this,t),T(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return O(t,e),k(t,[{key:"setProperties",value:function(e){return e=t.createProperties(e),this.merge(e)}},{key:"toJSON",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={object:this.object,type:this.type,data:this.data.toJSON(),anchor:this.anchor.toJSON(e),focus:this.focus.toJSON(e)};return t}}],[{key:"create",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(t.isDecoration(e))return e;if(J.isRange(e))return t.fromJSON(J.createProperties(e));if(o()(e))return t.fromJSON(e);throw new Error("`Decoration.create` only accepts objects or decorations, but you passed it: "+e)}},{key:"createList",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(r.List.isList(e)||Array.isArray(e)){var n=new r.List(e.map(t.create));return n}throw new Error("`Decoration.createList` only accepts arrays or lists, but you passed it: "+e)}},{key:"createProperties",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(t.isDecoration(e))return{type:e.type,data:e.data,anchor:q.createProperties(e.anchor),focus:q.createProperties(e.focus),mark:$.create(e.mark)};if(o()(e)){var n={};return"type"in e&&(n.type=e.type),"data"in e&&(n.data=W.create(e.data)),"anchor"in e&&(n.anchor=q.create(e.anchor)),"focus"in e&&(n.focus=q.create(e.focus)),n}throw new Error("`Decoration.createProperties` only accepts objects or decorations, but you passed it: "+e)}},{key:"fromJSON",value:function(e){var n=e.anchor,r=e.focus,i=e.type,o=e.data;if(e.mark&&!i&&(Object(a.a)(!1,"As of slate@0.47 the `decoration.mark` property has been changed to `decoration.type` and `decoration.data` directly."),i=e.mark.type,o=e.mark.data),!i)throw new Error("Decorations must be created with a `type`, but you passed: "+JSON.stringify(e));return new t({type:i,data:W.create(o||{}),anchor:q.fromJSON(n||{}),focus:q.fromJSON(r||{})})}}]),t}(Object(r.Record)(V)),K={anchor:void 0,focus:void 0,isFocused:void 0,marks:void 0},Y=function(e){function t(){return x(this,t),T(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return O(t,e),k(t,[{key:"setIsFocused",value:function(e){return this.set("isFocused",e)}},{key:"setMarks",value:function(e){return this.set("marks",e)}},{key:"setProperties",value:function(e){var n=e=t.createProperties(e),r=n.anchor,i=n.focus,o=C(n,["anchor","focus"]);return r&&(o.anchor=q.create(r)),i&&(o.focus=q.create(i)),this.merge(o)}},{key:"toJSON",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={object:this.object,anchor:this.anchor.toJSON(e),focus:this.focus.toJSON(e),isFocused:this.isFocused,marks:null==this.marks?null:this.marks.toArray().map((function(e){return e.toJSON()}))};return t}},{key:"isBlurred",get:function(){return!this.isFocused}}],[{key:"create",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(t.isSelection(e))return e;if(J.isRange(e))return t.fromJSON(J.createProperties(e));if(o()(e))return t.fromJSON(e);throw new Error("`Selection.create` only accepts objects, ranges or selections, but you passed it: "+e)}},{key:"createProperties",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(t.isSelection(e))return{anchor:q.createProperties(e.anchor),focus:q.createProperties(e.focus),isFocused:e.isFocused,marks:e.marks};if(J.isRange(e))return{anchor:q.createProperties(e.anchor),focus:q.createProperties(e.focus)};if(o()(e)){var n={};return"anchor"in e&&(n.anchor=q.create(e.anchor)),"focus"in e&&(n.focus=q.create(e.focus)),"isFocused"in e&&(n.isFocused=e.isFocused),"marks"in e&&(n.marks=null==e.marks?null:$.createSet(e.marks)),n}throw new Error("`Selection.createProperties` only accepts objects, ranges or selections, but you passed it: "+e)}},{key:"fromJSON",value:function(e){var n=e.anchor,i=e.focus,o=e.isFocused,a=void 0!==o&&o,s=e.marks,l=void 0===s?null:s;return new t({anchor:q.fromJSON(n||{}),focus:q.fromJSON(i||{}),isFocused:a,marks:null==l?null:new r.Set(l.map($.fromJSON))})}}]),t}(Object(r.Record)(K)),Q={annotation:"@@__SLATE_ANNOTATION__@@",block:"@@__SLATE_BLOCK__@@",change:"@@__SLATE_CHANGE__@@",decoration:"@@__SLATE_DECORATION__@@",document:"@@__SLATE_DOCUMENT__@@",editor:"@@__SLATE_EDITOR__@@",inline:"@@__SLATE_INLINE__@@",leaf:"@@__SLATE_LEAF__@@",mark:"@@__SLATE_MARK__@@",operation:"@@__SLATE_OPERATION__@@",point:"@@__SLATE_POINT__@@",range:"@@__SLATE_RANGE__@@",selection:"@@__SLATE_SELECTION__@@",text:"@@__SLATE_TEXT__@@",value:"@@__SLATE_VALUE__@@"};function X(e,t){return!(!t||!t[Q[e]])}var Z={anchor:void 0,focus:void 0},J=function(e){function t(){return x(this,t),T(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return O(t,e),k(t,[{key:"toJSON",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={object:this.object,anchor:this.anchor.toJSON(e),focus:this.focus.toJSON(e)};return t}}],[{key:"create",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(t.isRange(e))return"range"===e.object?e:t.fromJSON(t.createProperties(e));if(o()(e))return t.fromJSON(e);throw new Error("`Range.create` only accepts objects or ranges, but you passed it: "+e)}},{key:"createList",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(r.List.isList(e)||Array.isArray(e)){var n=new r.List(e.map(t.create));return n}throw new Error("`Range.createList` only accepts arrays or lists, but you passed it: "+e)}},{key:"createProperties",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(t.isRange(e))return{anchor:q.createProperties(e.anchor),focus:q.createProperties(e.focus)};if(o()(e)){var n={};return"anchor"in e&&(n.anchor=q.create(e.anchor)),"focus"in e&&(n.focus=q.create(e.focus)),n}throw new Error("`Range.createProperties` only accepts objects, annotations, decorations, ranges or selections, but you passed it: "+e)}},{key:"fromJSON",value:function(e){var n=e.anchor,r=e.focus;return new t({anchor:q.fromJSON(n||{}),focus:q.fromJSON(r||{})})}},{key:"isRange",value:function(e){return X("range",e)||G.isDecoration(e)||Y.isSelection(e)}}]),t}(Object(r.Record)(Z)),ee={key:void 0,type:void 0,data:void 0,anchor:void 0,focus:void 0},te=function(e){function t(){return x(this,t),T(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return O(t,e),k(t,[{key:"setProperties",value:function(e){return e=t.createProperties(e),this.merge(e)}},{key:"toJSON",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={object:this.object,key:this.key,type:this.type,data:this.data.toJSON(),anchor:this.anchor.toJSON(e),focus:this.focus.toJSON(e)};return t}}],[{key:"create",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(t.isAnnotation(e))return e;if(J.isRange(e))return t.fromJSON(J.createProperties(e));if(o()(e))return t.fromJSON(e);throw new Error("`Annotation.create` only accepts objects or annotations, but you passed it: "+e)}},{key:"createMap",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(r.Map.isMap(e))return e;if(o()(e)){var n={};for(var i in e){var a=e[i],s=t.create(a);n[i]=s}return Object(r.Map)(n)}throw new Error("`Annotation.createMap` only accepts arrays or lists, but you passed it: "+e)}},{key:"createProperties",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(t.isAnnotation(e))return{key:e.key,type:e.type,data:e.data,anchor:q.createProperties(e.anchor),focus:q.createProperties(e.focus)};if(o()(e)){var n={};return"key"in e&&(n.key=e.key),"type"in e&&(n.type=e.type),"data"in e&&(n.data=W.create(e.data)),"anchor"in e&&(n.anchor=q.create(e.anchor)),"focus"in e&&(n.focus=q.create(e.focus)),n}throw new Error("`Annotation.createProperties` only accepts objects or annotations, but you passed it: "+e)}},{key:"fromJSON",value:function(e){var n=e.key,r=e.type,i=e.data,o=e.anchor,a=e.focus;if(!n)throw new Error("Annotations must be created with a `key`, but you passed: "+JSON.stringify(e));if(!r)throw new Error("Annotations must be created with a `type`, but you passed: "+JSON.stringify(e));return new t({key:n,type:r,data:W.create(i||{}),anchor:q.fromJSON(o||{}),focus:q.fromJSON(a||{})})}}]),t}(Object(r.Record)(ee)),ne={data:void 0,key:void 0,nodes:void 0},re=function(e){function t(){return x(this,t),T(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return O(t,e),k(t,[{key:"toJSON",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={object:this.object,data:this.data.toJSON(),nodes:this.nodes.toArray().map((function(t){return t.toJSON(e)}))};return e.preserveKeys&&(t.key=this.key),t}}],[{key:"create",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(t.isDocument(e))return e;if((r.List.isList(e)||Array.isArray(e))&&(e={nodes:e}),o()(e))return t.fromJSON(e);throw new Error("`Document.create` only accepts objects, arrays, lists or documents, but you passed it: "+e)}},{key:"fromJSON",value:function(e){if(t.isDocument(e))return e;var n=e.data,i=void 0===n?{}:n,o=e.key,a=void 0===o?_.create():o,s=e.nodes,l=void 0===s?[]:s;return new t({key:a,data:new r.Map(i),nodes:ue.createList(l)})}}]),t}(Object(r.Record)(ne)),ie={data:void 0,key:void 0,nodes:void 0,type:void 0},oe=function(e){function t(){return x(this,t),T(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return O(t,e),k(t,[{key:"toJSON",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={object:this.object,type:this.type,data:this.data.toJSON(),nodes:this.nodes.toArray().map((function(t){return t.toJSON(e)}))};return e.preserveKeys&&(t.key=this.key),t}}],[{key:"create",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(t.isInline(e))return e;if("string"==typeof e&&(e={type:e}),o()(e))return t.fromJSON(e);throw new Error("`Inline.create` only accepts objects, strings or inlines, but you passed it: "+e)}},{key:"createList",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(r.List.isList(e)||Array.isArray(e)){var n=new r.List(e.map(t.create));return n}throw new Error("`Inline.createList` only accepts arrays or lists, but you passed it: "+e)}},{key:"fromJSON",value:function(e){if(t.isInline(e))return e;var n=e.data,i=void 0===n?{}:n,o=e.key,a=void 0===o?_.create():o,s=e.nodes,l=void 0===s?[]:s,u=e.type;if("string"!=typeof u)throw new Error("`Inline.fromJS` requires a `type` string.");return new t({key:a,type:u,data:new r.Map(i),nodes:ue.createList(l)})}},{key:"isInlineList",value:function(e){return r.List.isList(e)&&e.every((function(e){return t.isInline(e)}))}}]),t}(Object(r.Record)(ie)),ae={key:void 0,marks:void 0,text:void 0},se=Object(r.Record)({text:void 0,marks:void 0,annotations:void 0,decorations:void 0}),le=function(e){function t(){return x(this,t),T(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return O(t,e),k(t,[{key:"addMark",value:function(e){e=$.create(e);var t=this.marks.add(e);return this.set("marks",t)}},{key:"addMarks",value:function(e){return e=$.createSet(e),this.set("marks",this.marks.union(e))}},{key:"getLeaves",value:function(e,t){var n=[{text:this.text,marks:this.marks,annotations:[],decorations:[]}],i=function(e,t){return[{text:e.text.slice(0,t),marks:e.marks,annotations:[].concat(P(e.annotations)),decorations:[].concat(P(e.decorations))},{text:e.text.slice(t),marks:e.marks,annotations:[].concat(P(e.annotations)),decorations:[].concat(P(e.decorations))}]},o=function(r){var o="annotations"===r?e.values():t,a=!0,s=!1,l=void 0;try{for(var u,c=o[Symbol.iterator]();!(a=(u=c.next()).done);a=!0){var d=u.value,f=d.start,p=d.end,h=[],m=0,g=!0,v=!1,y=void 0;try{for(var b,_=n[Symbol.iterator]();!(g=(b=_.next()).done);g=!0){var w=b.value,x=w.text.length,k=m;if(m+=x,f.offset<=k&&p.offset>=k+x)w[r].push(d),h.push(w);else if(f.offset>k+x||p.offsetk){var P=i(E,f.offset-k),R=A(P,2);S=R[0],E=R[1]}E[r].push(d),S&&h.push(S),h.push(E),O&&h.push(O)}}}catch(e){v=!0,y=e}finally{try{!g&&_.return&&_.return()}finally{if(v)throw y}}n=h}}catch(e){s=!0,l=e}finally{try{!a&&c.return&&c.return()}finally{if(s)throw l}}};return o("annotations"),o("decorations"),n=n.map((function(e){return new se(S({},e,{annotations:Object(r.List)(e.annotations),decorations:Object(r.List)(e.decorations)}))})),Object(r.List)(n)}},{key:"insertText",value:function(e,t){var n=this.text,r=n.slice(0,e)+t+n.slice(e);return this.set("text",r)}},{key:"removeMark",value:function(e){e=$.create(e);var t=this.marks.remove(e);return this.set("marks",t)}},{key:"removeText",value:function(e,t){var n=this.text,r=n.slice(0,e)+n.slice(e+t);return this.set("text",r)}},{key:"toJSON",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={object:this.object,text:this.text,marks:this.marks.toArray().map((function(e){return e.toJSON()}))};return e.preserveKeys&&(t.key=this.key),t}},{key:"setMark",value:function(e,t){var n=this.marks,r=$.create(e),i=r.merge(t),o=n.remove(r).add(i);return this.set("marks",o)}},{key:"splitText",value:function(e){var t=this.text;return[this.set("text",t.slice(0,e)),this.set("text",t.slice(e)).regenerateKey()]}},{key:"mergeText",value:function(e){var t=this.text+e.text;return this.set("text",t)}}],[{key:"create",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(t.isText(e))return e;if("string"==typeof e&&(e={text:e}),o()(e))return t.fromJSON(e);throw new Error("`Text.create` only accepts objects, arrays, strings or texts, but you passed it: "+e)}},{key:"createList",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(r.List.isList(e)||Array.isArray(e)){var n=new r.List(e.map(t.create));return n}throw new Error("`Text.createList` only accepts arrays or lists, but you passed it: "+e)}},{key:"fromJSON",value:function(e){if(t.isText(e))return e;Object(s.a)(null==e.leaves,"As of slate@0.46, the `leaves` property of text nodes has been removed! Each individual leaf should be created as a text node instead.");var n=e.text,r=void 0===n?"":n,i=e.marks,o=void 0===i?[]:i,a=e.key;return new t({key:void 0===a?_.create():a,text:r,marks:$.createSet(o)})}},{key:"isTextList",value:function(e){return r.List.isList(e)&&e.every((function(e){return t.isText(e)}))}}]),t}(Object(r.Record)(ae)),ue=function(){function e(){x(this,e)}return k(e,null,[{key:"create",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(e.isNode(t))return t;if(o()(t)){var n=t.object;switch(!n&&t.kind&&(Object(a.a)(!1,"As of slate@0.32.0, the `kind` property of Slate objects has been renamed to `object`."),n=t.kind),n){case"block":return de.create(t);case"document":return re.create(t);case"inline":return oe.create(t);case"text":return le.create(t);default:throw new Error("`Node.create` requires a `object` string.")}}throw new Error("`Node.create` only accepts objects or nodes but you passed it: "+t)}},{key:"createList",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(r.List.isList(t)||Array.isArray(t)){var n=[];t.forEach((function(t){if(t&&"text"===t.object&&t.leaves&&Array.isArray(t.leaves)){Object(a.a)(!1,"As of slate@0.46, the `leaves` property of Text nodes has been removed. Instead, each text node contains a string of text and a unique set of marks and leaves are unnecessary.");var r=le.createList(t.leaves).toArray();n=n.concat(r)}else{var i=e.create(t);n.push(i)}}));var i=Object(r.List)(n);return i}throw new Error("`Node.createList` only accepts lists or arrays, but you passed it: "+t)}},{key:"createProperties",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(de.isBlock(e)||oe.isInline(e))return{data:e.data,type:e.type};if("string"==typeof e)return{type:e};if(o()(e)){var t={};return"type"in e&&(t.type=e.type),"data"in e&&(t.data=W.create(e.data)),t}throw new Error("`Node.createProperties` only accepts objects, strings, blocks or inlines, but you passed it: "+e)}},{key:"fromJSON",value:function(e){var t=e.object;switch(!t&&e.kind&&(Object(a.a)(!1,"As of slate@0.32.0, the `kind` property of Slate objects has been renamed to `object`."),t=e.kind),t){case"block":return de.fromJSON(e);case"document":return re.fromJSON(e);case"inline":return oe.fromJSON(e);case"text":return le.fromJSON(e);default:throw new Error("`Node.fromJSON` requires an `object` of either 'block', 'document', 'inline' or 'text', but you passed: "+e)}}},{key:"isNode",value:function(e){return de.isBlock(e)||re.isDocument(e)||oe.isInline(e)||le.isText(e)}},{key:"isNodeList",value:function(t){return r.List.isList(t)&&t.every((function(t){return e.isNode(t)}))}}]),e}(),ce={data:void 0,key:void 0,nodes:void 0,type:void 0},de=function(e){function t(){return x(this,t),T(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return O(t,e),k(t,[{key:"toJSON",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={object:this.object,type:this.type,data:this.data.toJSON(),nodes:this.nodes.toArray().map((function(t){return t.toJSON(e)}))};return e.preserveKeys&&(t.key=this.key),t}}],[{key:"create",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(t.isBlock(e))return e;if("string"==typeof e&&(e={type:e}),o()(e))return t.fromJSON(e);throw new Error("`Block.create` only accepts objects, strings or blocks, but you passed it: "+e)}},{key:"createList",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(r.List.isList(e)||Array.isArray(e)){var n=new r.List(e.map(t.create));return n}throw new Error("`Block.createList` only accepts arrays or lists, but you passed it: "+e)}},{key:"fromJSON",value:function(e){if(t.isBlock(e))return e;var n=e.data,i=void 0===n?{}:n,o=e.key,a=void 0===o?_.create():o,s=e.nodes,l=void 0===s?[]:s,u=e.type;if("string"!=typeof u)throw new Error("`Block.fromJSON` requires a `type` string.");return new t({key:a,type:u,data:Object(r.Map)(i),nodes:ue.createList(l)})}},{key:"isBlockList",value:function(e){return r.List.isList(e)&&e.every((function(e){return t.isBlock(e)}))}}]),t}(Object(r.Record)(ce)),fe={annotations:void 0,data:void 0,document:void 0,selection:void 0},pe=function(e){function t(){return x(this,t),T(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return O(t,e),k(t,[{key:"addAnnotation",value:function(e){e=te.create(e);var t=this,n=t,r=n.annotations,i=n.document,o=e.key;return e=e.updatePoints((function(e){return e.normalize(i)})),r=r.set(o,e),t=t.set("annotations",r)}},{key:"addMark",value:function(e,t){t=$.create(t);var n=this,r=n.document;return r=r.addMark(e,t),n=n.set("document",r)}},{key:"insertNode",value:function(e,t){var n=this,r=n.document;return r=r.insertNode(e,t),n=(n=n.set("document",r)).mapRanges((function(e){return e.updatePoints((function(e){return e.setPath(null)}))}))}},{key:"insertText",value:function(e,t,n){var r=this,i=r.document,o=i.assertNode(e);return i=i.insertText(e,t,n),o=i.assertNode(e),r=(r=r.set("document",i)).mapPoints((function(e){return e.key===o.key&&e.offset>=t?e.setOffset(e.offset+n.length):e}))}},{key:"mergeNode",value:function(e){var t=this,n=t.document,r=n.mergeNode(e);e=n.resolvePath(e);var i=z.decrement(e),o=n.getNode(i),a=n.getNode(e);return t=(t=t.set("document",r)).mapRanges((function(e){if("text"===a.object){var t=o.text.length;e.anchor.key===a.key&&(e=e.moveAnchorTo(o.key,t+e.anchor.offset)),e.focus.key===a.key&&(e=e.moveFocusTo(o.key,t+e.focus.offset))}return e=e.updatePoints((function(e){return e.setPath(null)}))}))}},{key:"moveNode",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=this,i=r,o=i.document;return z.isEqual(e,t)?r:(o=o.moveNode(e,t,n),r=(r=r.set("document",o)).mapPoints((function(e){return e.setPath(null)})))}},{key:"removeAnnotation",value:function(e){e=te.create(e);var t=this,n=t.annotations,r=e.key;return n=n.delete(r),t=t.set("annotations",n)}},{key:"removeMark",value:function(e,t){t=$.create(t);var n=this,r=n.document;return r=r.removeMark(e,t),n=n.set("document",r)}},{key:"removeNode",value:function(e){var t=this,n=t.document,r=n.assertNode(e),i="text"===r.object?r:r.getFirstText()||r,o="text"===r.object?r:r.getLastText()||r,a=n.getPreviousText(i.key),s=n.getNextText(o.key);return n=n.removeNode(e),t=(t=t.set("document",n)).mapRanges((function(e){var t=e,n=t.anchor,i=t.focus;return r.hasNode(n.key)&&(e=a?e.moveAnchorTo(a.key,a.text.length):s?e.moveAnchorTo(s.key,0):e.unset()),r.hasNode(i.key)&&(e=a?e.moveFocusTo(a.key,a.text.length):s?e.moveFocusTo(s.key,0):e.unset()),e=e.updatePoints((function(e){return e.setPath(null)}))}))}},{key:"removeText",value:function(e,t,n){var r=this,i=r.document,o=i.assertNode(e);i=i.removeText(e,t,n),r=r.set("document",i);var a=n.length,s=t,l=t+a;return r=r.mapPoints((function(e){return e.key!==o.key?e:e.offset>=l?e.setOffset(e.offset-a):e.offset>s?e.setOffset(s):e}))}},{key:"setAnnotation",value:function(e,t){t=te.createProperties(t);var n=te.create(e),r=n.merge(t),i=this,o=i.annotations,a=n.key;return o=o.set(a,r),i=i.set("annotations",o)}},{key:"setNode",value:function(e,t){var n=this,r=n.document;return r=r.setNode(e,t),n=n.set("document",r)}},{key:"setMark",value:function(e,t,n){var r=this,i=r.document;return i=i.setMark(e,t,n),r=r.set("document",i)}},{key:"setProperties",value:function(e){var t=this,n=t.document,r=e.data,i=e.annotations,o={};return r&&(o.data=r),i&&(o.annotations=i.map((function(e){return e.isSet?e:n.resolveAnnotation(e)}))),t=t.merge(o)}},{key:"setSelection",value:function(e){var t=this,n=t,r=n.document,i=n.selection,o=i.setProperties(e);return i=r.resolveSelection(o),t=t.set("selection",i)}},{key:"splitNode",value:function(e,t,n){var r=this,i=r.document,o=i.splitNode(e,t,n),a=i.assertNode(e);return r=(r=r.set("document",o)).mapRanges((function(e){var n=o.getNextText(a.key),r=e,i=r.anchor,s=r.focus;return a.key===i.key&&t<=i.offset&&(e=e.moveAnchorTo(n.key,i.offset-t)),a.key===s.key&&t<=s.offset&&(e=e.moveFocusTo(n.key,s.offset-t)),e=e.updatePoints((function(e){return e.setPath(null)}))}))}},{key:"mapRanges",value:function(e){var t=this,n=t,r=n.document,i=n.selection,o=n.annotations,a=i.isSet?e(i):i;a||(a=i.unset()),a!==i&&(a=r.createSelection(a)),t=t.set("selection",a);var s=o.map((function(t){var n=t.isSet?e(t):t;return n&&n!==t&&(n=r.createAnnotation(n)),n}));return s=s.filter((function(e){return!!e})),t=t.set("annotations",s)}},{key:"mapPoints",value:function(e){return this.mapRanges((function(t){return t.updatePoints(e)}))}},{key:"toJSON",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={object:this.object,document:this.document.toJSON(e)};return e.preserveData&&(t.data=this.data.toJSON(e)),e.preserveAnnotations&&(t.annotations=this.annotations.map((function(t){return t.toJSON(e)})).toObject()),e.preserveSelection&&(t.selection=this.selection.toJSON(e)),t}},{key:"change",value:function(){Object(s.a)(!1,"As of Slate 0.42.0, value object are no longer schema-aware, and the `value.change()` method is no longer available. Use the `editor.change()` method on the new `Editor` controller instead.")}},{key:"startBlock",get:function(){return this.selection.start.key&&this.document.getClosestBlock(this.selection.start.key)}},{key:"endBlock",get:function(){return this.selection.end.key&&this.document.getClosestBlock(this.selection.end.key)}},{key:"anchorBlock",get:function(){return this.selection.anchor.key&&this.document.getClosestBlock(this.selection.anchor.key)}},{key:"focusBlock",get:function(){return this.selection.focus.key&&this.document.getClosestBlock(this.selection.focus.key)}},{key:"startInline",get:function(){return this.selection.start.key&&this.document.getClosestInline(this.selection.start.key)}},{key:"endInline",get:function(){return this.selection.end.key&&this.document.getClosestInline(this.selection.end.key)}},{key:"anchorInline",get:function(){return this.selection.anchor.key&&this.document.getClosestInline(this.selection.anchor.key)}},{key:"focusInline",get:function(){return this.selection.focus.key&&this.document.getClosestInline(this.selection.focus.key)}},{key:"startText",get:function(){return this.selection.start.key&&this.document.getDescendant(this.selection.start.key)}},{key:"endText",get:function(){return this.selection.end.key&&this.document.getDescendant(this.selection.end.key)}},{key:"anchorText",get:function(){return this.selection.anchor.key&&this.document.getDescendant(this.selection.anchor.key)}},{key:"focusText",get:function(){return this.selection.focus.key&&this.document.getDescendant(this.selection.focus.key)}},{key:"nextBlock",get:function(){return this.selection.end.key&&this.document.getNextBlock(this.selection.end.key)}},{key:"previousBlock",get:function(){return this.selection.start.key&&this.document.getPreviousBlock(this.selection.start.key)}},{key:"nextInline",get:function(){return this.selection.end.key&&this.document.getNextInline(this.selection.end.key)}},{key:"previousInline",get:function(){return this.selection.start.key&&this.document.getPreviousInline(this.selection.start.key)}},{key:"nextText",get:function(){return this.selection.end.key&&this.document.getNextText(this.selection.end.key)}},{key:"previousText",get:function(){return this.selection.start.key&&this.document.getPreviousText(this.selection.start.key)}},{key:"marks",get:function(){return this.selection.isUnset?new r.Set:this.selection.marks||this.document.getMarksAtRange(this.selection)}},{key:"activeMarks",get:function(){return this.selection.isUnset?new r.Set:this.selection.marks||this.document.getActiveMarksAtRange(this.selection)}},{key:"blocks",get:function(){return this.selection.isUnset?new r.List:this.document.getLeafBlocksAtRange(this.selection)}},{key:"fragment",get:function(){return this.selection.isUnset?re.create():this.document.getFragmentAtRange(this.selection)}},{key:"inlines",get:function(){return this.selection.isUnset?new r.List:this.document.getLeafInlinesAtRange(this.selection)}},{key:"texts",get:function(){return this.selection.isUnset?new r.List:this.document.getTextsAtRange(this.selection)}},{key:"history",get:function(){Object(s.a)(!1,"As of Slate 0.42.0, the `value.history` model no longer exists, and the history is stored in `value.data` instead using plugins.")}}],[{key:"create",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t.isValue(e))return e;if(o()(e))return t.fromJSON(e,n);throw new Error("`Value.create` only accepts objects or values, but you passed it: "+e)}},{key:"createProperties",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(t.isValue(e))return{annotations:e.annotations,data:e.data};if(o()(e)){var n={};return"annotations"in e&&(n.annotations=te.createMap(e.annotations)),"data"in e&&(n.data=W.create(e.data)),n}throw new Error("`Value.createProperties` only accepts objects or values, but you passed it: "+e)}},{key:"fromJSON",value:function(e){var n=e.data,r=void 0===n?{}:n,i=e.annotations,o=void 0===i?{}:i,a=e.document,s=void 0===a?{}:a,l=e.selection,u=void 0===l?{}:l;if(r=W.fromJSON(r),u=(s=re.fromJSON(s)).createSelection(u),o=te.createMap(o),u.isUnset){var c=s.getFirstText();c&&(u=u.moveToStartOfNode(c)),u=s.createSelection(u)}return new t({annotations:o,data:r,document:s,selection:u})}}]),t}(Object(r.Record)(fe)),he=u()("slate:operation:apply");function me(e,t){var n=(t=_e.create(t)).type;switch(he(n,t),n){case"add_annotation":var r=t.annotation;return e.addAnnotation(r);case"add_mark":var i=t,o=i.path,a=i.mark;return e.addMark(o,a);case"insert_node":var s=t,l=s.path,u=s.node;return e.insertNode(l,u);case"insert_text":var c=t,d=c.path,f=c.offset,p=c.text,h=c.marks;return e.insertText(d,f,p,h);case"merge_node":var m=t.path;return e.mergeNode(m);case"move_node":var g=t,v=g.path,y=g.newPath;return e.moveNode(v,y);case"remove_annotation":var b=t.annotation;return e.removeAnnotation(b);case"remove_mark":var _=t,w=_.path,x=_.mark;return e.removeMark(w,x);case"remove_node":var k=t.path;return e.removeNode(k);case"remove_text":var E=t,S=E.path,O=E.offset,C=E.text;return e.removeText(S,O,C);case"set_annotation":var T=t,A=T.properties,P=T.newProperties;return e.setAnnotation(A,P);case"set_mark":var R=t,j=R.path,I=R.properties,M=R.newProperties;return e.setMark(j,I,M);case"set_node":var L=t,D=L.path,N=L.newProperties;return e.setNode(D,N);case"set_selection":var F=t.newProperties;return e.setSelection(F);case"set_value":var B=t.newProperties;return e.setProperties(B);case"split_node":var z=t,U=z.path,q=z.position,W=z.properties;return e.splitNode(U,q,W);default:throw new Error('Unknown operation type: "'+n+'".')}}var ge=u()("slate:operation:invert");function ve(e){var t=(e=_e.create(e)).type;switch(ge(t,e),t){case"move_node":var n=e,r=n.newPath,i=n.path;if(z.isEqual(r,i))return e;var o=z.transform(i,e).first(),a=z.transform(z.increment(i),e).first();return e.set("path",o).set("newPath",a);case"merge_node":var s=e.path,l=z.decrement(s);return e.set("type","split_node").set("path",l);case"split_node":var u=e.path,c=z.increment(u);return e.set("type","merge_node").set("path",c);case"set_annotation":case"set_node":case"set_value":case"set_selection":case"set_mark":var d=e,f=d.properties,p=d.newProperties;return e.set("properties",p).set("newProperties",f);case"insert_node":case"insert_text":return e.set("type",t.replace("insert_","remove_"));case"remove_node":case"remove_text":return e.set("type",t.replace("remove_","insert_"));case"add_annotation":case"add_mark":return e.set("type",t.replace("add_","remove_"));case"remove_annotation":case"remove_mark":return e.set("type",t.replace("remove_","add_"));default:throw new Error('Unknown operation type: "'+t+'".')}}var ye={add_mark:["path","mark","data"],add_annotation:["annotation","data"],insert_node:["path","node","data"],insert_text:["path","offset","text","data"],merge_node:["path","position","properties","target","data"],move_node:["path","newPath","data"],remove_annotation:["annotation","data"],remove_mark:["path","mark","data"],remove_node:["path","node","data"],remove_text:["path","offset","text","data"],set_annotation:["properties","newProperties","data"],set_mark:["path","properties","newProperties","data"],set_node:["path","properties","newProperties","data"],set_selection:["properties","newProperties","data"],set_value:["properties","newProperties","data"],split_node:["path","position","properties","target","data"]},be={annotation:void 0,data:void 0,length:void 0,mark:void 0,marks:void 0,newPath:void 0,newProperties:void 0,node:void 0,offset:void 0,path:void 0,position:void 0,properties:void 0,target:void 0,text:void 0,type:void 0},_e=function(e){function t(){return x(this,t),T(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return O(t,e),k(t,[{key:"apply",value:function(e){return me(e,this)}},{key:"invert",value:function(){return ve(this)}},{key:"toJSON",value:function(){var e=this.object,t=this.type,n={object:e,type:t},r=ye[t],i=!0,o=!1,a=void 0;try{for(var s,l=r[Symbol.iterator]();!(i=(s=l.next()).done);i=!0){var u=s.value,c=this[u];if("annotation"!==u&&"mark"!==u&&"marks"!==u&&"node"!==u&&"path"!==u&&"newPath"!==u||(c=c.toJSON()),"properties"===u&&"merge_node"===t){var d={};"data"in c&&(d.data=c.data.toJS()),"type"in c&&(d.type=c.type),c=d}if(("properties"===u||"newProperties"===u)&&"set_annotation"===t){var f={};"anchor"in c&&(f.anchor=c.anchor.toJS()),"focus"in c&&(f.focus=c.focus.toJS()),"key"in c&&(f.key=c.key),"data"in c&&(f.data=c.data.toJS()),"type"in c&&(f.type=c.type),c=f}if(("properties"===u||"newProperties"===u)&&"set_mark"===t){var p={};"data"in c&&(p.data=c.data.toJS()),"type"in c&&(p.type=c.type),c=p}if(("properties"===u||"newProperties"===u)&&"set_node"===t){var h={};"data"in c&&(h.data=c.data.toJS()),"type"in c&&(h.type=c.type),c=h}if(("properties"===u||"newProperties"===u)&&"set_selection"===t){var m={};"anchor"in c&&(m.anchor=c.anchor.toJSON()),"focus"in c&&(m.focus=c.focus.toJSON()),"isFocused"in c&&(m.isFocused=c.isFocused),"marks"in c&&(m.marks=c.marks&&c.marks.toJSON()),c=m}if(("properties"===u||"newProperties"===u)&&"set_value"===t){var g={};"data"in c&&(g.data=c.data.toJS()),c=g}if("properties"===u&&"split_node"===t){var v={};"data"in c&&(v.data=c.data.toJS()),"type"in c&&(v.type=c.type),c=v}"data"===u&&(c=c.toJSON()),n[u]=c}}catch(e){o=!0,a=e}finally{try{!i&&l.return&&l.return()}finally{if(o)throw a}}return n}}],[{key:"create",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(t.isOperation(e))return e;if(o()(e))return t.fromJSON(e);throw new Error("`Operation.create` only accepts objects or operations, but you passed it: "+e)}},{key:"createList",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(r.List.isList(e)||Array.isArray(e)){var n=new r.List(e.map(t.create));return n}throw new Error("`Operation.createList` only accepts arrays or lists, but you passed it: "+e)}},{key:"fromJSON",value:function(e){if(t.isOperation(e))return e;var n=e.type,i=ye[n],o={type:n};if(!i)throw new Error('`Operation.fromJSON` was passed an unrecognized operation type: "'+n+'"');var a=!0,s=!1,l=void 0;try{for(var u,c=i[Symbol.iterator]();!(a=(u=c.next()).done);a=!0){var d=u.value,f=e[d];if("data"===d&&void 0===f&&(f={}),void 0===f)throw new Error('`Operation.fromJSON` was passed a "'+n+'" operation without the required "'+d+'" attribute.');"annotation"===d&&(f=te.create(f)),"path"!==d&&"newPath"!==d||(f=z.create(f)),"mark"===d&&(f=$.create(f)),"node"===d&&(f=ue.create(f)),"properties"!==d&&"newProperties"!==d||"set_annotation"!==n||(f=te.createProperties(f)),"properties"!==d&&"newProperties"!==d||"set_mark"!==n||(f=$.createProperties(f)),"properties"!==d&&"newProperties"!==d||"set_node"!==n&&"merge_node"!==n&&"split_node"!==n||(f=ue.createProperties(f)),"properties"!==d&&"newProperties"!==d||"set_selection"!==n||(f=Y.createProperties(f)),"properties"!==d&&"newProperties"!==d||"set_value"!==n||(f=pe.createProperties(f)),"data"===d&&(f=Object(r.Map)(f)),o[d]=f}}catch(e){s=!0,l=e}finally{try{!a&&c.return&&c.return()}finally{if(s)throw l}}return new t(o)}},{key:"isOperationList",value:function(e){return r.List.isList(e)&&e.every((function(e){return t.isOperation(e)}))}}]),t}(Object(r.Record)(be)),we={operations:void 0,value:void 0},xe=function(e){function t(){return x(this,t),T(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return O(t,e),k(t,[{key:"toJSON",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={object:this.object,value:this.value.toJSON(e),operations:this.operations.toArray().map((function(t){return t.toJSON(e)}))};return t}}],[{key:"create",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(t.isChange(e))return e;if(o()(e))return t.fromJSON(e);throw new Error("`Change.create` only accepts objects or changes, but you passed it: "+e)}},{key:"fromJSON",value:function(e){var n=e.value,r=e.operations,i=void 0===r?[]:r;return new t({value:pe.create(n),operations:_e.createList(i)})}}]),t}(Object(r.Record)(we));function ke(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};function t(t,n,r){var i=t.type,o=t.args,a=e[i];if(!a)return r();n.command.apply(n,[a].concat(P(o)))}function n(t,n){for(var r in e)t.registerCommand(r);return n()}return{onCommand:t,onConstruct:n}}var Ee=/\s/,Se=/['\u2018\u2019]/,Oe=/[\u0021-\u0023\u0025-\u002A\u002C-\u002F\u003A\u003B\u003F\u0040\u005B-\u005D\u005F\u007B\u007D\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E3B\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/;function Ce(e){return 55296<=e&&e<=57343}function Te(e,t,n){if(55356===e){var r=t.charCodeAt(n+1);return r<=57343&&r>=57339}return!1}function Ae(e){return e<=65039&&e>=65024}function Pe(e,t){if(Ee.test(e))return!1;if(Se.test(e)){var n=t.charAt(0),r=Re(n);if(Pe(n=t.slice(0,r),t.slice(r)))return!0}return!Oe.test(e)}function Re(e){return Ce(e.charCodeAt(0))?2:1}function je(e,t,n){var r,i=0;if(""===e)return 1;for(var o=0;o2&&void 0!==arguments[2]?arguments[2]:1;return e=e.slice(0,t),je(e=Object(c.reverse)(e),n)},getCharOffsetForward:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return je(e=e.slice(t),n,!0)},getWordOffset:Ie,getWordOffsetBackward:function(e,t){return e=e.slice(0,t),Ie(e=Object(c.reverse)(e))},getWordOffsetForward:function(e,t){return Ie(e=e.slice(t))},isSurrogate:Ce,isWord:Pe};function Le(e,t){t.isExpanded&&e.deleteAtRange(t);var n=e.value.document,r=t,i=r.start,o=r.end;return t=n.hasDescendant(i.path)?t.moveToStart():t.moveTo(o.path,0).normalize(n)}var De={addMarkAtRange:function(e,t,n){if(!t.isCollapsed){var r=e.value.document,i=t.start,o=t.end,a=r.getTextsAtRange(t);e.withoutNormalizing((function(){a.forEach((function(t){var r=t.key,a=0,s=t.text.length;r===i.key&&(a=i.offset),r===o.key&&(s=o.offset),r===i.key&&r===o.key&&(s=o.offset-i.offset),e.addMarkByKey(r,a,s,n)}))}))}},addMarksAtRange:function(e,t,n){n.forEach((function(n){return e.addMarkAtRange(t,n)}))},deleteAtRange:function(e,t){e.snapshotSelection();var n=e.value,r=t.start,i=t.end,o=r.key,a=r.offset,s=i.key,l=i.offset,u=n.document,c=u.hasVoidParent(o,e),d=u.hasVoidParent(s,e),f=u.getClosestBlock(o),p=u.getClosestBlock(s),h=0===a&&0===l&&!1===c&&o===f.getFirstText().key&&s===p.getFirstText().key&&o!==s;if(h&&d){var m=u.getPreviousText(s);s=m.key,l=m.text.length,d=u.hasVoidParent(s,e)}e.withoutNormalizing((function(){for(;c;){var t=u.getClosestVoid(o,e),n=u.getNextText(o);if(e.removeNodeByKey(t.key),o===s)return;if(!n)return;u=e.value.document,o=n.key,a=0,c=u.hasVoidParent(o,e)}for(;d;){var r=u.getClosestVoid(s,e),i=u.getPreviousText(s);e.removeNodeByKey(r.key),u=e.value.document,s=i.key,l=i.text.length,d=u.hasVoidParent(s,e)}if(o===s&&h)e.removeNodeByKey(f.key);else if(o!==s){f=u.getClosestBlock(o),p=u.getClosestBlock(s);var m=u.getNode(o),g=u.getNode(s),v=m.text.length-a,y=l,b=u.getCommonAncestor(o,s),_=b.getFurthestChild(o),w=b.getFurthestChild(s),x=u.getParent(f.key),k=x.nodes.indexOf(f),E=x.nodes.indexOf(p),S=void 0;for(S=m;S.key!==_.key;){var O=u.getParent(S.key),C=O.nodes.indexOf(S);O.nodes.slice(C+1).reverse().forEach((function(t){e.removeNodeByKey(t.key)})),S=O}var T=b.nodes.indexOf(_),P=b.nodes.indexOf(w);for(b.nodes.slice(T+1,P).reverse().forEach((function(t){e.removeNodeByKey(t.key)})),S=g;S.key!==w.key;){var R=u.getParent(S.key),j=R.nodes.indexOf(S);R.nodes.slice(0,j).reverse().forEach((function(t){e.removeNodeByKey(t.key)})),S=R}if(0!==v&&e.removeTextByKey(o,a,v),0!==y&&e.removeTextByKey(s,0,l),f.key!==p.key){u=e.value.document;var I=void 0,M=!0,L=!1,D=void 0;try{for(var N,F=u.ancestors(p.key)[Symbol.iterator]();!(M=(N=F.next()).done);M=!0){var B=N.value,z=A(B,1)[0];if(z.nodes.size>1)break;I=z}}catch(e){L=!0,D=e}finally{try{!M&&F.return&&F.return()}finally{if(L)throw D}}E!==k+1&&e.moveNodeByKey(p.key,x.key,k+1),h?e.removeNodeByKey(f.key):e.mergeNodeByKey(p.key),I&&e.removeNodeByKey(I.key)}}else{var U=a,q=l-a;e.removeTextByKey(o,U,q)}}))},deleteBackwardAtRange:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(0!==n){var r=e.value,i=r.document,o=t,a=o.start,s=o.focus;if(t.isExpanded)e.deleteAtRange(t);else{var l=i.getClosestVoid(a.path,e);if(l)e.removeNodeByKey(l.key);else if(!a.isAtStartOfNode(i)){var u=i.getClosestBlock(a.path);if(1!==i.nodes.size&&u&&""===u.text&&1===u.nodes.size)e.removeNodeByKey(u.key);else{var c=i.getDescendant(a.path);if(a.isAtStartOfNode(c)){var d=i.getPreviousText(c.key),f=i.getClosestInline(c.key);f&&""===d.text&&(d=i.getPreviousText(d.key));var p=i.getClosestBlock(d.key),h=i.getClosestVoid(d.key,e);if(h)return void e.removeNodeByKey(h.key);if(1===n&&p!==u)return t=t.moveAnchorTo(d.key,d.text.length),void e.deleteAtRange(t)}if(n<=s.offset)return t=t.moveFocusBackward(n),void e.deleteAtRange(t);for(var m=c,g=0,v=s.offset;n>v;){var y=v+(m=i.getPreviousText(m.key)).text.length;if(n<=y){g=y-n;break}v=y}t=t.moveAnchorTo(m.key,g),e.deleteAtRange(t)}}}}},deleteCharBackwardAtRange:function(e,t){if(t.isExpanded)e.deleteAtRange(t);else{var n=e.value.document,r=t.start,i=n.getClosestBlock(r.path),o=i.getOffset(r.key)+r.offset,a=i.text,s=Me.getCharOffsetBackward(a,o);e.deleteBackwardAtRange(t,s)}},deleteCharForwardAtRange:function(e,t){if(t.isExpanded)e.deleteAtRange(t);else{var n=e.value.document,r=t.start,i=n.getClosestBlock(r.path),o=i.getOffset(r.key)+r.offset,a=i.text,s=Me.getCharOffsetForward(a,o);e.deleteForwardAtRange(t,s)}},deleteForwardAtRange:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(0!==n){var r=e.value,i=r.document,o=t,a=o.start,s=o.focus;if(t.isExpanded)e.deleteAtRange(t);else{var l=i.getClosestVoid(a.path,e);if(l)e.removeNodeByKey(l.key);else{var u=i.getClosestBlock(a.path);if(u&&!e.isVoid(u)&&""===u.text&&1!==i.nodes.size){var c=i.getNextBlock(u.key);return e.removeNodeByKey(u.key),void(c&&c.key&&e.moveToStartOfNode(c))}if(!a.isAtEndOfNode(i)){var d=i.getDescendant(a.path);if(a.isAtEndOfNode(d)){var f=i.getNextText(d.key),p=i.getClosestBlock(f.key),h=i.getClosestVoid(f.key,e);if(h)return void e.removeNodeByKey(h.key);if(1===n&&p!==u)return t=t.moveFocusTo(f.key,0),void e.deleteAtRange(t)}if(n<=d.text.length-s.offset)return t=t.moveFocusForward(n),void e.deleteAtRange(t);for(var m=d,g=s.offset,v=d.text.length-s.offset;n>v;){var y=v+(m=i.getNextText(m.key)).text.length;if(n<=y){g=n-v;break}v=y}t=t.moveFocusTo(m.key,g),e.deleteAtRange(t)}}}}},deleteLineBackwardAtRange:function(e,t){if(t.isExpanded)e.deleteAtRange(t);else{var n=e.value.document,r=t.start,i=n.getClosestBlock(r.path).getOffset(r.key)+r.offset;e.deleteBackwardAtRange(t,i)}},deleteLineForwardAtRange:function(e,t){if(t.isExpanded)e.deleteAtRange(t);else{var n=e.value.document,r=t.start,i=n.getClosestBlock(r.path),o=i.getOffset(r.key)+r.offset;e.deleteForwardAtRange(t,i.text.length-o)}},deleteWordBackwardAtRange:function(e,t){if(t.isExpanded)e.deleteAtRange(t);else{var n=e.value.document,r=t.start,i=n.getClosestBlock(r.path),o=i.getOffset(r.key)+r.offset,a=i.text,s=0===o?1:Me.getWordOffsetBackward(a,o);e.deleteBackwardAtRange(t,s)}},deleteWordForwardAtRange:function(e,t){if(t.isExpanded)e.deleteAtRange(t);else{var n=e.value.document,r=t.start,i=n.getClosestBlock(r.path),o=i.getOffset(r.key)+r.offset,a=i.text,s=Me.getWordOffsetForward(a,o),l=0===s?1:s;e.deleteForwardAtRange(t,l)}},insertBlockAtRange:function(e,t,n){t=Le(e,t),n=de.create(n);var r=e.value.document,i=t.start,o=i.key,a=i.offset,s=r.getClosestBlock(o),l=r.getClosestInline(o),u=r.getParent(s.key),c=u.nodes.indexOf(s),d=Ne(e,t);if("before"===d)e.insertNodeByKey(u.key,c,n);else if("behind"===d)e.insertNodeByKey(u.key,c+1,n);else{if(l&&e.isVoid(l)){var f=i.isAtEndOfNode(l),p=f?r.getNextText(o):r.getPreviousText(o),h=f?t.moveToStartOfNode(p):t.moveToEndOfNode(p);o=h.start.key,a=h.start.offset}e.withoutNormalizing((function(){e.splitDescendantsByKey(s.key,o,a),e.insertNodeByKey(u.key,c+1,n)}))}}},Ne=function(e,t){var n=e.value.document,r=t.start,i=r.key,o=n.getClosestBlock(i),a=n.getClosestInline(i);return e.isVoid(o)?r.isAtEndOfNode(o)?"behind":"before":a||""!==o.text?r.isAtStartOfNode(o)?"before":r.isAtEndOfNode(o)?"behind":"split":"behind"};De.insertFragmentAtRange=function(e,t,n){e.withoutNormalizing((function(){if(t=Le(e,t),n.nodes.size){n=n.mapDescendants((function(e){return e.regenerateKey()}));var i=t.start,o=e.value.document,a=o.getDescendant(i.path),s=o.getClosestBlock(a.key),l=s.getFurthestChild(a.key),u=i.isAtStartOfNode(s),c=o.getParent(s.key),d=c.nodes.indexOf(s),f=n.getBlocks(),p=n.nodes.first(),h=n.nodes.last(),m=f.first(),g=f.last(),v=Fe(n,o,s.key);if(m===g&&e.isVoid(m))e.insertBlockAtRange(t,m);else if(v!==n||!p.hasBlockChildren()&&!h.hasBlockChildren()){if(m!==g){var y=v.getFurthest(m.key,(function(e){return 1===e.nodes.size}))||m,b=c.nodes.indexOf(s);v.removeNode(y.key).nodes.forEach((function(t,n){var r=b+n+1;e.insertNodeByKey(c.key,r,t)}))}if(0!==i.offset&&e.splitDescendantsByKey(l.key,i.key,i.offset),a=(o=e.value.document).getDescendant(i.key),l=(s=o.getClosestBlock(i.key)).getFurthestChild(a.key),m!==g){var _=u?l:s.getNextSibling(l.key),w=_?s.nodes.skipUntil((function(e){return e.key===_.key})):Object(r.List)(),x=g.nodes.size;w.forEach((function(t,n){var r=x+n;e.moveNodeByKey(t.key,g.key,r)}))}if(e.isVoid(s)||""!==s.text||s.findDescendant((function(t){return e.isVoid(t)}))){var k=s.getFurthestChild(a.key),E=s.nodes.indexOf(k);m.nodes.forEach((function(t,n){var r=0===i.offset?0:1,o=E+n+r;e.insertNodeByKey(s.key,o,t)}))}else e.removeNodeByKey(s.key),e.insertNodeByKey(c.key,d,m)}else{("before"===Ne(e,t)?n.nodes:n.nodes.reverse()).forEach((function(n){e.insertBlockAtRange(t,n)}))}}}))};var Fe=function(e,t,n){var r=function(e,t){return t.size>=e.size&&e.every((function(e,n){return t.get(n).type===e.type}))},i=function(e,t){return e.getAncestors(t).slice(1).push(e.getNode(t)).reverse()},o=function(e){for(var t=e;1===t.nodes.size&&"block"===t.nodes.first().object;)t=t.nodes.first();return t===e?null:t}(e);return o?function(t,n){var i=t.size-n.size;if(i<0)return e;for(var o=0;o2&&void 0!==arguments[2]?arguments[2]:1,r=t=Le(e,t),i=r.start,o=r.end,a=e.value,s=a,l=s.document,u=l.assertDescendant(i.path),c=l.getClosestBlock(u.key),d=0;c&&"block"===c.object&&d2&&void 0!==arguments[2]?arguments[2]:1/0,r=t=Le(e,t),i=r.start,o=e.value,a=o.document,s=a.assertDescendant(i.path),l=a.getClosestInline(s.key),u=0;l&&"inline"===l.object&&u3&&void 0!==arguments[3]?arguments[3]:n,i=t.start,o=t.end,a=t.moveToStart(),s=t.moveToEnd();i.path.equals(o.path)&&(s=s.moveForward(n.length)),e.withoutNormalizing((function(){e.insertTextAtRange(a,n),e.insertTextAtRange(s,r)}))};var Be={addMarkByPath:function(e,t,n,r,i){i=$.create(i),e.addMarksByPath(t,n,r,[i])},addMarksByPath:function(e,t,n,r,i){if((i=$.createSet(i)).size){var o=e.value.document.assertNode(t);e.withoutNormalizing((function(){n+r0&&(e.splitNodeByPath(t,n),t=z.increment(t),n=0),i.forEach((function(n){e.applyOperation({type:"add_mark",path:t,mark:$.create(n)})}))}))}},replaceMarksByPath:function(e,t,n,r,i){var o=$.createSet(i),a=e.value.document.assertNode(t);a.marks.equals(o)||e.withoutNormalizing((function(){n+r0&&(e.splitNodeByPath(t,n),t=z.increment(t),n=0);var i=o.subtract(a.marks);a.marks.subtract(o).forEach((function(n){e.applyOperation({type:"remove_mark",path:t,mark:$.create(n)})})),i.forEach((function(n){e.applyOperation({type:"add_mark",path:t,mark:$.create(n)})}))}))},insertFragmentByPath:function(e,t,n,r){r.nodes.forEach((function(r,i){e.insertNodeByPath(t,n+i,r)}))},insertNodeByPath:function(e,t,n,r){e.applyOperation({type:"insert_node",path:t.concat(n),node:r})},insertTextByPath:function(e,t,n,r,i){var o=e.value,a=o.annotations;o.document.assertNode(t),e.withoutNormalizing((function(){var o=!0,s=!1,l=void 0;try{for(var u,c=a.values()[Symbol.iterator]();!(o=(u=c.next()).done);o=!0){var d=u.value,f=d.start,p=d.end;e.isAtomic(d)&&(f.path.equals(t)&&f.offsetn)&&e.removeAnnotation(d))}}catch(e){s=!0,l=e}finally{try{!o&&c.return&&c.return()}finally{if(s)throw l}}e.applyOperation({type:"insert_text",path:t,offset:n,text:r}),i&&e.replaceMarksByPath(t,n,r.length,i)}))},mergeNodeByPath:function(e,t){var n=e.value.document,r=n.getDescendant(t),i=n.getPreviousSibling(t);if(!i)throw new Error('Unable to merge node with path "'+t+'", because it has no previous sibling.');var o="text"===i.object?i.text.length:i.nodes.size;e.applyOperation({type:"merge_node",path:t,position:o,properties:{type:r.type,data:r.data},target:null})},moveNodeByPath:function(e,t,n,r){if(z.isEqual(t,n))return e;var i=n.concat(r);if(z.isEqual(t,i))return e;e.applyOperation({type:"move_node",path:t,newPath:i})},removeMarkByPath:function(e,t,n,r,i){i=$.create(i),e.removeMarksByPath(t,n,r,[i])},removeMarksByPath:function(e,t,n,r,i){if((i=$.createSet(i)).size){var o=e.value.document.assertNode(t);i.intersect(o.marks).isEmpty()||e.withoutNormalizing((function(){n+r0&&(e.splitNodeByPath(t,n),t=z.increment(t),n=0),i.forEach((function(i){e.applyOperation({type:"remove_mark",path:t,offset:n,length:r,mark:i})}))}))}},removeAllMarksByPath:function(e,t){var n=e.state.document.assertNode(t);e.withoutNormalizing((function(){if("text"!==n.object){var r=!0,i=!1,o=void 0;try{for(var a,s=n.texts()[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var l=a.value,u=A(l,2),c=u[0],d=u[1],f=t.concat(d);e.removeMarksByPath(f,0,c.text.length,c.marks)}}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}}else e.removeMarksByPath(t,0,n.text.length,n.marks)}))},removeNodeByPath:function(e,t){var n=e.value.document.assertNode(t);e.applyOperation({type:"remove_node",path:t,node:n})},removeTextByPath:function(e,t,n,r){var i=e.value,o=i.document,a=i.annotations,s=o.assertNode(t).text.slice(n,n+r);e.withoutNormalizing((function(){var r=!0,i=!1,o=void 0;try{for(var l,u=a.values()[Symbol.iterator]();!(r=(l=u.next()).done);r=!0){var c=l.value,d=c.start,f=c.end;e.isAtomic(c)&&(d.path.equals(t)&&d.offsetn)&&e.removeAnnotation(c))}}catch(e){i=!0,o=e}finally{try{!r&&u.return&&u.return()}finally{if(i)throw o}}e.applyOperation({type:"remove_text",path:t,offset:n,text:s})}))},replaceNodeByPath:function(e,t,n){n=ue.create(n);var r=t.last(),i=z.lift(t);e.withoutNormalizing((function(){e.removeNodeByPath(t),e.insertNodeByPath(i,r,n)}))},replaceTextByPath:function(e,t,n,r,i,o){e.withoutNormalizing((function(){e.removeTextByPath(t,n,r),e.insertTextByPath(t,n,i,o)}))},setMarkByPath:function(e,t,n,r,i,o){i=$.create(i),o=$.createProperties(o);var a=e.value.document.assertNode(t);e.withoutNormalizing((function(){n+r0&&(e.splitNodeByPath(t,n),t=z.increment(t),n=0),e.applyOperation({type:"set_mark",path:t,properties:i,newProperties:o})}))},setNodeByPath:function(e,t,n){var r=e.value.document.assertNode(t);n=ue.createProperties(n);var i=f()(r,Object.keys(n));e.applyOperation({type:"set_node",path:t,properties:i,newProperties:n})},setTextByPath:function(e,t,n,r){var i=e.value.document.assertNode(t).text.length;e.replaceTextByPath(t,0,i,n,r)},splitNodeByPath:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=r.target,o=void 0===i?null:i,a=e.value,s=a.document,l=s.getDescendant(t);e.applyOperation({type:"split_node",path:t,position:n,target:o,properties:{type:l.type,data:l.data}})},splitDescendantsByPath:function(e,t,n,r){if(t.equals(n))e.splitNodeByPath(n,r);else{var i=e.value.document,o=r,a=n;e.withoutNormalizing((function(){e.splitNodeByKey(n,r);var s=!0,l=!1,u=void 0;try{for(var c,d=i.ancestors(n)[Symbol.iterator]();!(s=(c=d.next()).done);s=!0){var f=c.value,p=A(f,2)[1],h=o;if(o=a.last()+1,a=p,e.splitNodeByPath(p,o,{target:h}),p.equals(t))break}}catch(e){l=!0,u=e}finally{try{!s&&d.return&&d.return()}finally{if(l)throw u}}}))}},unwrapInlineByPath:function(e,t,n){var r=e.value,i=r.document,o=r.selection,a=i.assertNode(t),s=a.getFirstText(),l=a.getLastText(),u=o.moveToRangeOfNode(s,l);e.unwrapInlineAtRange(u,n)},unwrapBlockByPath:function(e,t,n){var r=e.value,i=r.document,o=r.selection,a=i.assertNode(t),s=a.getFirstText(),l=a.getLastText(),u=o.moveToRangeOfNode(s,l);e.unwrapBlockAtRange(u,n)},unwrapNodeByPath:function(e,t){var n=e.value.document;n.assertNode(t);var r=z.lift(t),i=n.assertNode(r),o=t.last(),a=r.last(),s=z.lift(r),l=0===o,u=o===i.nodes.size-1;e.withoutNormalizing((function(){if(1===i.nodes.size)e.moveNodeByPath(t,s,a+1),e.removeNodeByPath(r);else if(l)e.moveNodeByPath(t,s,a);else if(u)e.moveNodeByPath(t,s,a+1);else{var n=z.increment(t,1,r.size-1);n=n.set(n.size-1,0),e.splitNodeByPath(r,o),e.moveNodeByPath(n,s,a+1)}}))},unwrapChildrenByPath:function(e,t){t=z.create(t);var n=e.value.document.assertNode(t),r=z.lift(t),i=t.last(),o=n.nodes;e.withoutNormalizing((function(){o.reverse().forEach((function(n,a){var s=o.size-a-1,l=t.push(s);e.moveNodeByPath(l,r,i+1)})),e.removeNodeByPath(t)}))},wrapBlockByPath:function(e,t,n){n=(n=de.create(n)).set("nodes",n.nodes.clear());var r=z.lift(t),i=t.last(),o=z.increment(t);e.withoutNormalizing((function(){e.insertNodeByPath(r,i,n),e.moveNodeByPath(o,t,0)}))},wrapInlineByPath:function(e,t,n){n=(n=oe.create(n)).set("nodes",n.nodes.clear());var r=z.lift(t),i=t.last(),o=z.increment(t);e.withoutNormalizing((function(){e.insertNodeByPath(r,i,n),e.moveNodeByPath(o,t,0)}))},wrapNodeByPath:function(e,t,n){"block"===(n=ue.create(n)).object?e.wrapBlockByPath(t,n):"inline"===n.object&&e.wrapInlineByPath(t,n)}},ze=function(e){Be[e+"ByKey"]=function(t,n){for(var r=arguments.length,i=Array(r>2?r-2:0),o=2;o3?r-3:0),o=3;o3?r-3:0),o=3;o100&&(c=c.takeLast(100)),e.withoutSaving((function(){var t=Object(r.List)(),n=i.set("undos",c).set("redos",t);e.setData(n)}))}},Ve.redo=function(e){var t=e.value.data,n=t.get("redos")||Object(r.List)(),i=t.get("undos")||Object(r.List)(),o=n.last();o&&e.withoutSaving((function(){e.withoutNormalizing((function(){o.forEach((function(t){var n=t,r=n.type,i=n.newProperties;"set_selection"===r&&(t=t.set("newProperties",h()(i,"isFocused"))),e.applyOperation(t)})),n=n.pop(),i=i.push(o);var r=t.set("undos",i).set("redos",n);e.setData(r)}))}))},Ve.undo=function(e){var t=e.value.data,n=t.get("redos")||Object(r.List)(),i=t.get("undos")||Object(r.List)(),o=i.last();o&&e.withoutSaving((function(){e.withoutNormalizing((function(){o.slice().reverse().map((function(e){return e.invert()})).forEach((function(t){var n=t,r=n.type,i=n.newProperties;"set_selection"===r&&(t=t.set("newProperties",h()(i,"isFocused"))),e.applyOperation(t)})),n=n.push(o),i=i.pop();var r=t.set("undos",i).set("redos",n);e.setData(r)}))}))},Ve.withoutMerging=function(e,t){var n=e.tmp.merge;e.tmp.merge=!1,t(e),e.tmp.merge=n},Ve.withoutSaving=function(e,t){var n=e.tmp.save;e.tmp.save=!1,t(e),e.tmp.save=n};var Ge={};function Ke(e,t){for(var n,r=arguments.length,i=Array(r>2?r-2:0),o=2;o2&&void 0!==arguments[2]?arguments[2]:1;if(0!==n){if(n<0)return Ze(e,t,-n);var r=t.slice(0,1).toUpperCase()+t.slice(1),i=e.value,o=i.document,a=i.selection,s=a[t],l=o.hasVoidParent(s.path,e);if(!l&&s.offset-n>=0){var u=a["move"+r+"Backward"](n);e.select(u)}else{var c=o.getPreviousText(s.path);if(c){var d=o.getClosestBlock(s.path),f=d.hasNode(c.key),p=c&&o.hasVoidParent(c.key,e);if(e["move"+r+"ToEndOfNode"](c),!l&&!p&&f){var h=e.value.selection["move"+r+"Backward"](n);e.select(h)}}}}}function Ze(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(0!==n){if(n<0)return Xe(e,t,-n);var r=t.slice(0,1).toUpperCase()+t.slice(1),i=e.value,o=i.document,a=i.selection,s=a[t],l=o.getNode(s.path),u=o.hasVoidParent(s.path,e);if(!u&&s.offset+n<=l.text.length){var c=a["move"+r+"Forward"](n);e.select(c)}else{var d=o.getNextText(s.path);if(d){var f=o.getClosestBlock(s.path),p=f.hasNode(d.key),h=o.hasVoidParent(d.key,e);if(e["move"+r+"ToStartOfNode"](d),!u&&!h&&p){var m=e.value.selection["move"+r+"Forward"](n);e.select(m)}}}}}function Je(e,t){var n=e.value,r=n.document,i=n.selection[t],o=r.getClosestBlock(i.key),a=o.getOffset(i.key)+i.offset,s=o.text,l=Me.getWordOffsetBackward(s,a);e.command(Xe,t,l>0?l:1)}function et(e,t){var n=e.value,r=n.document,i=n.selection[t],o=r.getClosestBlock(i.key),a=o.getOffset(i.key)+i.offset,s=o.text,l=Me.getWordOffsetForward(s,a);e.command(Ze,t,l>0?l:1)}Ge.blur=function(e){e.select({isFocused:!1})},Ge.deselect=function(e){var t=Y.create();e.select(t)},Ge.focus=function(e){e.select({isFocused:!0})},Ge.flip=function(e){e.command(Ke,"flip")},Ge.moveAnchorBackward=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:1;if(0!==t){var n=e.value,r=n.document,i=n.selection,o=i.start,a=r.getClosestBlock(o.key),s=a.getOffset(o.key),l=s+o.offset,u=a.text,c=Me.getCharOffsetBackward(u,l,t);e.moveAnchorBackward(c).moveFocusBackward(c)}},Ge.moveWordBackward=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:1;if(0!==t){var n=e.value,r=n.document,i=n.selection,o=i.start,a=r.getClosestBlock(o.path),s=a.getOffset(o.key),l=s+o.offset,u=a.text,c=Me.getCharOffsetForward(u,l,t);e.moveAnchorForward(c).moveFocusForward(c)}},Ge.moveWordForward=function(e){for(var t,n=arguments.length,r=Array(n>1?n-1:0),i=1;i1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r2&&void 0!==arguments[2]?arguments[2]:{};t=Y.createProperties(t);var i=n.snapshot,o=void 0!==i&&i,a=e.value,s=a.document,l=a.selection,u={},c=l.setProperties(t);for(var d in c=s.resolveSelection(c),t=f()(c,Object.keys(t)))!0!==o&&Object(r.is)(t[d],l[d])||(u[d]=t[d]);if(l.marks&&!u.marks&&(u.anchor||u.focus)&&(u.marks=null),0!==Object.keys(u).length){var p=f()(l.toJSON(),Object.keys(u));e.applyOperation({type:"set_selection",value:a,properties:p,newProperties:u},o?{skip:!1,merge:!1}:{})}},Ge.setAnchor=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r0&&void 0!==arguments[0]?arguments[0]:{};function t(t,n){for(var r in e)t.registerQuery(r);return n()}function n(t,n,r){var i=t.type,o=t.args,a=e[i];if(!a)return r();var s=a.apply(void 0,[n].concat(P(o)));return void 0===s?r():s}return{onConstruct:t,onQuery:n}}tt.setData=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.value,r=pe.createProperties({data:t}),i=f()(n,Object.keys(r));e.applyOperation({type:"set_value",properties:i,newProperties:r})},tt.addAnnotation=function(e,t){t=te.create(t),e.applyOperation({type:"add_annotation",annotation:t})},tt.removeAnnotation=function(e,t){t=te.create(t),e.applyOperation({type:"remove_annotation",annotation:t})},tt.setAnnotation=function(e,t,n){t=te.create(t),n=te.createProperties(n),e.applyOperation({type:"set_annotation",properties:t,newProperties:n})},tt.setAnnotations=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=e.value,r=pe.createProperties({annotations:t}),i=f()(n,Object.keys(r));e.applyOperation({type:"set_value",properties:i,newProperties:r})};var rt=function(e){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};x(this,t);var r=T(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));for(var i in r.code=e,n)r[i]=n[i];return Error.captureStackTrace?Error.captureStackTrace(r,r.constructor):r.stack=(new Error).stack,r}return O(t,e),t}(Error);function it(e){var t=e.rules,n=e.document,r=e.blocks,i=e.inlines,o=e.marks,a=e.annotations,s=e.decorations,l=[];if(t&&(l=l.concat(t)),n&&l.push(S({match:[{object:"document"}]},n)),r)for(var u in r)l.push(S({match:[{object:"block",type:u}]},r[u]));if(i)for(var c in i)l.push(S({match:[{object:"inline",type:c}]},i[c]));if(o)for(var d in o)l.push(S({match:[{object:"mark",type:d}]},o[d]));if(a)for(var f in a)l.push(S({match:[{object:"annotation",type:f}]},a[f]));if(s)for(var p in s)l.push(S({match:[{object:"decoration",type:p}]},s[p]));function h(e,t,n){var r=l.filter((function(t){return ot(e,t.match)})),i=at(e,r,l,{every:!0});return i?new rt(i.code,i):n()}return[{normalizeNode:function(e,t,n){var r=h(e,t,(function(){}));return r?function(){var e=r.rule,n=t.operations.size;e.normalize&&e.normalize(t,r),t.operations.size===n&&function(e,t){var n=t.code,r=t.node,i=t.child,o=t.next,a=t.previous,s=t.key,l=t.mark;switch(n){case"child_max_invalid":case"child_object_invalid":case"child_type_invalid":case"child_unknown":case"first_child_object_invalid":case"first_child_type_invalid":case"last_child_object_invalid":case"last_child_type_invalid":return"text"===i.object&&"block"===r.object&&1===r.nodes.size?e.removeNodeByKey(r.key):e.removeNodeByKey(i.key);case"previous_sibling_object_invalid":case"previous_sibling_type_invalid":return"text"===a.object&&"block"===r.object&&1===r.nodes.size?e.removeNodeByKey(r.key):e.removeNodeByKey(a.key);case"next_sibling_object_invalid":case"next_sibling_type_invalid":return"text"===o.object&&"block"===r.object&&1===r.nodes.size?e.removeNodeByKey(r.key):e.removeNodeByKey(o.key);case"child_min_invalid":case"node_text_invalid":case"parent_object_invalid":case"parent_type_invalid":return"document"===r.object?r.nodes.forEach((function(t){return e.removeNodeByKey(t.key)})):e.removeNodeByKey(r.key);case"node_data_invalid":return void 0===r.data.get(s)&&"document"!==r.object?e.removeNodeByKey(r.key):e.setNodeByKey(r.key,{data:r.data.delete(s)});case"node_mark_invalid":return r.getTexts().forEach((function(t){return e.removeMarkByKey(t.key,0,t.text.length,l)}));default:e.removeNodeByKey(r.key)}}(t,r)}:n()},validateNode:h},nt({isAtomic:function(e,t){var n=l.find((function(e){return"isAtomic"in e&&ot(t,e.match)}));return n&&n.isAtomic},isVoid:function(e,t){var n=l.find((function(e){return"isVoid"in e&&ot(t,e.match)}));return n&&n.isVoid}})]}function ot(e,t){return!at(e,t)}function at(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=r.every,o=void 0!==i&&i,a=r.match,s=void 0===a?null:a;if("function"==typeof t){var l=t(e,s);return l?null:yt("node_invalid",{rule:t,node:e})}if(Array.isArray(t)){var u=t.length?t:[{}],c=void 0,d=!0,f=!1,p=void 0;try{for(var h,m=u[Symbol.iterator]();!(d=(h=m.next()).done);d=!0){var g=h.value,v=at(e,g,n);if(c=c||v,o&&v)return v;if(!o&&!v)return}}catch(e){f=!0,p=e}finally{try{!d&&m.return&&m.return()}finally{if(f)throw p}}return c}var y=st(e,t)||lt(e,t)||ut(e,t)||ct(e,t)||dt(e,t)||ft(e,t)||pt(e,t)||ht(e,t,n);return y}function st(e,t){if(null!=t.object&&t.object!==e.object&&("function"!=typeof t.object||!t.object(e.object)))return yt("node_object_invalid",{rule:t,node:e})}function lt(e,t){if(null!=t.type&&t.type!==e.type&&("function"!=typeof t.type||!t.type(e.type)))return yt("node_type_invalid",{rule:t,node:e})}function ut(e,t){if(null!=t.data&&null!=e.data){if("function"==typeof t.data){if(t.data(e.data))return;return yt("node_data_invalid",{rule:t,node:e})}for(var n in t.data){var r=t.data[n],i=e.data&&e.data.get(n);if(!("function"==typeof r?r(i):r===i))return yt("node_data_invalid",{rule:t,node:e,key:n,value:i})}}}function ct(e,t){if(null!=t.marks){var n="text"===e.object?e.marks.toArray():e.getMarks().toArray(),r=function(n){return t.marks.some((function(e){return"function"==typeof e.type?e.type(n.type):e.type===n.type}))?"continue":{v:yt("node_mark_invalid",{rule:t,node:e,mark:n})}},i=!0,o=!1,a=void 0;try{for(var s,l=n[Symbol.iterator]();!(i=(s=l.next()).done);i=!0){var u=r(s.value);switch(u){case"continue":continue;default:if("object"===(void 0===u?"undefined":w(u)))return u.v}}}catch(e){o=!0,a=e}finally{try{!i&&l.return&&l.return()}finally{if(o)throw a}}}}function dt(e,t){if(null!=t.text){var n=e.text;if(!("function"==typeof t.text?t.text(n):t.text.test(n)))return yt("node_text_invalid",{rule:t,node:e,text:n})}}function ft(e,t){if(null!=t.first){var n=e.nodes.first();if(n){var r=at(n,t.first);if(r)return r.rule=t,r.node=e,r.child=n,r.code=r.code.replace("node_","first_child_"),r}}}function pt(e,t){if(null!=t.last){var n=e.nodes.last();if(n){var r=at(n,t.last);if(r)return r.rule=t,r.node=e,r.child=n,r.code=r.code.replace("node_","last_child_"),r}}}function ht(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(null!=e.nodes){var r=e.nodes,i=null!=t.nodes?t.nodes.slice():[],o=0,a=0,s=null,l=-1,u=null,c=null,d=null,f=null,p=null;for(null!=t.nodes&&v();y();){var h=mt(e,d,n)||gt(e,d,f,l,n)||vt(e,d,p,l,n);if(h)return h;if(null!=t.nodes){if(!u)return yt("child_unknown",{rule:t,node:e,child:d,index:l});if(u.match){var m=at(d,u.match);if(m){if(null!=c&&o-1>c)return b(),yt("child_max_invalid",{rule:t,node:e,index:l,child:r.get(l),count:o,limit:c});var g=s;if(v()){if(a-1>=g){l-=1;continue}return null==at(d,u.match)?(b(),yt("child_min_invalid",{rule:t,node:e,index:l,count:a-1,limit:g})):(m.rule=t,m.node=e,m.child=d,m.index=l,m.code=m.code.replace("node_","child_"),m)}return null!=c&&o>c?yt("child_unknown",{rule:t,node:e,child:d,index:l}):(m.rule=t,m.node=e,m.child=d,m.index=l,m.code=m.code.replace("node_","child_"),m)}}}}if(null!=c&&o>c)return yt("child_max_invalid",{rule:t,node:e,index:l-1,count:o,child:r.get(l-1),limit:c});if(null!=t.nodes)do{if(o0&&(l-=1,o=a)}}function mt(e,t,n){var r=!0,i=!1,o=void 0;try{for(var a,s=n[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var l=a.value;if(null!=l.parent&&ot(t,l.match)){var u=at(e,l.parent);if(u)return u.rule=l,u.parent=e,u.node=t,u.code=u.code.replace("node_","parent_"),u}}}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}}function gt(e,t,n,r,i){if(n){var o=!0,a=!1,s=void 0;try{for(var l,u=i[Symbol.iterator]();!(o=(l=u.next()).done);o=!0){var c=l.value;if(null!=c.previous&&ot(t,c.match)){var d=at(n,c.previous);if(d)return d.rule=c,d.node=e,d.child=t,d.index=r,d.previous=n,d.code=d.code.replace("node_","previous_sibling_"),d}}}catch(e){a=!0,s=e}finally{try{!o&&u.return&&u.return()}finally{if(a)throw s}}}}function vt(e,t,n,r,i){if(n){var o=!0,a=!1,s=void 0;try{for(var l,u=i[Symbol.iterator]();!(o=(l=u.next()).done);o=!0){var c=l.value;if(null!=c.next&&ot(t,c.match)){var d=at(n,c.next,[],{match:t});if(d)return d.rule=c,d.node=e,d.child=t,d.index=r,d.next=n,d.code=d.code.replace("node_","next_sibling_"),d}}}catch(e){a=!0,s=e}finally{try{!o&&u.return&&u.return()}finally{if(a)throw s}}}}function yt(e,t){return S({code:e},t)}function bt(e){e.value.selection.isExpanded&&e.delete()}var _t={};function wt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.plugins,n=void 0===t?[]:t,r=ke(S({},De,Be,Ve,Ge,tt,_t)),i=nt({isAtomic:function(){return!1},isVoid:function(){return!1}}),o=it({rules:[{match:{object:"document"},nodes:[{match:{object:"block"}}]},{match:{object:"block",first:{object:"block"}},nodes:[{match:{object:"block"}}]},{match:{object:"block",first:[{object:"inline"},{object:"text"}]},nodes:[{match:[{object:"inline"},{object:"text"}]}]},{match:{object:"inline"},nodes:[{match:[{object:"inline"},{object:"text"}]}]},{match:[{object:"block"},{object:"inline"}],nodes:[{min:1}],normalize:function(e,t){var n=t.code,r=t.node;"child_min_invalid"===n&&r.nodes.isEmpty()&&e.insertNodeByKey(r.key,0,le.create())}},{match:{object:"block"},first:[{object:"block"},{object:"text"}],last:[{object:"block"},{object:"text"}],normalize:function(e,t){var n=t.code,r=t.node,i=le.create(),o=void 0;if("first_child_object_invalid"===n)o=0;else{if("last_child_object_invalid"!==n)return;o=r.nodes.size}e.insertNodeByKey(r.key,o,i)}},{match:{object:"inline"},first:[{object:"block"},{object:"text"}],last:[{object:"block"},{object:"text"}],previous:[{object:"block"},{object:"text"}],next:[{object:"block"},{object:"text"}],normalize:function(e,t){var n=t.code,r=t.node,i=t.index,o=le.create(),a=void 0;if("first_child_object_invalid"===n)a=0;else if("last_child_object_invalid"===n)a=r.nodes.size;else if("previous_sibling_object_invalid"===n)a=i;else{if("next_sibling_object_invalid"!==n)return;a=i+1}e.insertNodeByKey(r.key,a,o)}},{match:{object:"text"},next:function(e,t){return"text"!==e.object||!t.marks.equals(e.marks)},normalize:function(e,t){var n=t.code,r=t.next;"next_sibling_invalid"===n&&e.mergeNodeByKey(r.key)}},{match:{object:"text"},previous:function(e){return"text"!==e.object||""!==e.text},next:function(e){return"text"!==e.object||""!==e.text},normalize:function(e,t){var n=t.code,r=t.next,i=t.previous;"next_sibling_invalid"===n?e.removeNodeByKey(r.key):"previous_sibling_invalid"===n&&e.removeNodeByKey(i.key)}}]});return[o].concat(P(n),[r,i])}_t.addMark=function(e,t){t=$.create(t);var n=e.value,r=n.document,i=n.selection;if(i.isExpanded)e.addMarkAtRange(i,t);else if(i.marks){var o=i.marks.add(t),a=i.set("marks",o);e.select(a)}else{var s=r.getActiveMarksAtRange(i).add(t),l=i.set("marks",s);e.select(l)}},_t.addMarks=function(e,t){t.forEach((function(t){return e.addMark(t)}))},_t.delete=function(e){var t=e.value.selection;e.deleteAtRange(t),e.moveToFocus()},_t.deleteBackward=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=e.value,r=n.selection;r.isExpanded?e.delete():e.deleteBackwardAtRange(r,t)},_t.deleteCharBackward=function(e){var t=e.value.selection;t.isExpanded?e.delete():e.deleteCharBackwardAtRange(t)},_t.deleteLineBackward=function(e){var t=e.value.selection;t.isExpanded?e.delete():e.deleteLineBackwardAtRange(t)},_t.deleteWordBackward=function(e){var t=e.value.selection;t.isExpanded?e.delete():e.deleteWordBackwardAtRange(t)},_t.deleteForward=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=e.value,r=n.selection;r.isExpanded?e.delete():e.deleteForwardAtRange(r,t)},_t.deleteCharForward=function(e){var t=e.value.selection;t.isExpanded?e.delete():e.deleteCharForwardAtRange(t)},_t.deleteLineForward=function(e){var t=e.value.selection;t.isExpanded?e.delete():e.deleteLineForwardAtRange(t)},_t.deleteWordForward=function(e){var t=e.value.selection;t.isExpanded?e.delete():e.deleteWordForwardAtRange(t)},_t.insertBlock=function(e,t){bt(e),t=de.create(t);var n=e.value.selection;e.insertBlockAtRange(n,t);var r=e.value.document.getNode(t.key);r&&e.moveToEndOfNode(r)},_t.insertFragment=function(e,t){if(t.nodes.size){bt(e);var n=e.value,r=n,i=r.document,o=r.selection,a=o.start,s=Array.from(i.texts(),(function(e){return A(e,1)[0].key}));e.insertFragmentAtRange(o,t);var l=(i=(n=e.value).document).getTexts().filter((function(e){return!s.includes(e.key)}));if(0!==l.size){var u=t.text.length,c=i.getNode(a.key)||l.first(),d=l.last()||c;if(c!==d){var f=i.getCommonAncestor(c.key,d.key),p=f.getOffset(c.key)+(a.key===c.key?a.offset:0);d=f.getTextAtOffset(p+u-1)||d,e.moveTo(d.key,p+u-f.getOffset(d.key))}else e.moveTo(d.key,u)}}},_t.insertInline=function(e,t){bt(e),t=oe.create(t);var n=e.value.selection;e.insertInlineAtRange(n,t);var r=e.value.document.getNode(t.key);r&&e.moveToEndOfNode(r)},_t.insertText=function(e,t,n){bt(e);var r=e.value,i=r.document,o=r.selection;n=n||o.marks||i.getInsertMarksAtRange(o),e.withoutNormalizing((function(){e.insertTextAtRange(o,t,n),o.marks&&i!==e.value.document&&e.select({marks:null})}))},_t.removeMark=function(e,t){t=$.create(t);var n=e.value,r=n.document,i=n.selection;if(i.isExpanded)e.removeMarkAtRange(i,t);else if(i.marks){var o=i.marks.remove(t),a=i.set("marks",o);e.select(a)}else{var s=r.getActiveMarksAtRange(i).remove(t),l=i.set("marks",s);e.select(l)}},_t.replaceMark=function(e,t,n){e.removeMark(t),e.addMark(n)},_t.setBlocks=function(e,t){var n=e.value.selection;e.setBlocksAtRange(n,t)},_t.setInlines=function(e,t){var n=e.value.selection;e.setInlinesAtRange(n,t)},_t.splitBlock=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;bt(e);var n=e.value,r=n.selection,i=n.document,o=r.marks||i.getInsertMarksAtRange(r);e.splitBlockAtRange(r,t).moveToEnd(),o&&0!==o.size&&e.select({marks:o})},_t.splitInline=function(e,t){bt(e);var n=e.value.selection;e.splitInlineAtRange(n,t)},_t.toggleMark=function(e,t){t=$.create(t),e.value.activeMarks.has(t)?e.removeMark(t):e.addMark(t)},_t.unwrapBlock=function(e,t){var n=e.value.selection;e.unwrapBlockAtRange(n,t)},_t.unwrapInline=function(e,t){var n=e.value.selection;e.unwrapInlineAtRange(n,t)},_t.wrapBlock=function(e,t){var n=e.value.selection;e.wrapBlockAtRange(n,t)},_t.wrapInline=function(e,t){var n=e.value.selection;e.wrapInlineAtRange(n,t)},_t.wrapText=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,r=e.value,i=r.selection;e.wrapTextAtRange(i,t,n),i.isCollapsed&&e.moveStartBackward(t.length),e.moveEndBackward(n.length),i.isForward!==e.value.selection.isForward&&e.flip()};var xt=u()("slate:editor"),kt=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};x(this,e);var i=n.controller,o=void 0===i?this:i,a=n.construct,s=void 0===a||a,l=t.onChange,u=void 0===l?function(){}:l,c=t.plugins,d=void 0===c?[]:c,f=t.readOnly,p=void 0!==f&&f,h=t.value,m=void 0===h?pe.create():h;this.controller=o,this.middleware={},this.onChange=u,this.operations=Object(r.List)(),this.readOnly=null,this.value=null,this.tmp={dirty:[],flushing:!1,merge:null,normalize:!0,save:!0};var g=wt({plugins:d});Ot(this,g),s&&(this.run("onConstruct"),this.setReadOnly(p),this.setValue(m,n))}return k(e,[{key:"applyOperation",value:function(e){var t=this,n=this.operations,r=this.controller,i=this.value;o()(e)&&(e=S({},e,{value:i})),e=_e.create(e),this.withoutNormalizing((function(){r.save(e),i=t.value})),xt("apply",{operation:e}),this.value=e.apply(i),this.operations=n.push(e);var a=function(e){var t=e.type,n=e.node,r=e.path,i=e.newPath;switch(t){case"add_mark":case"insert_text":case"remove_mark":case"remove_text":case"set_mark":case"set_node":var o=z.getAncestors(r).toArray();return[].concat(P(o),[r]);case"insert_node":var a=n.getKeysToPathsTable(),s=Object.values(a).map((function(e){return r.concat(e)})),l=z.getAncestors(r).toArray();return[].concat(P(l),[r],P(s));case"split_node":var u=z.getAncestors(r).toArray(),c=z.increment(r);return[].concat(P(u),[r,c]);case"merge_node":var d=z.getAncestors(r).toArray(),f=z.decrement(r);return[].concat(P(d),[f]);case"move_node":if(z.isEqual(r,i))return[];var p=z.getAncestors(r).reduce((function(t,n){return t.push.apply(t,P(z.transform(n,e).toArray())),t}),[]),h=z.getAncestors(i).reduce((function(t,n){return t.push.apply(t,P(z.transform(n,e).toArray())),t}),[]);return[].concat(P(p),P(h));case"remove_node":var m=z.getAncestors(r).toArray();return[].concat(P(m));default:return[]}}(e),s=this.tmp.dirty.map((function(t){return t=z.create(t),z.transform(t,e).toArray()})),l={},u=Array.prototype.concat.apply(a,s);return this.tmp.dirty=[],u.forEach((function(e){var n=e.join(",");l[n]||t.tmp.dirty.push(e),l[n]=!0})),this.tmp.flushing||(this.tmp.flushing=!0,Promise.resolve().then((function(){return t.flush()}))),r}},{key:"flush",value:function(){this.run("onChange");var e=this.value,t=this.operations,n=this.controller,i={value:e,operations:t};return this.operations=Object(r.List)(),this.tmp.flushing=!1,this.onChange(i),n}},{key:"command",value:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:{},n=t.normalize,r=void 0===n?e!==this.value:n;return this.value=e,r&&this.normalize(),this}},{key:"withoutNormalizing",value:function(e){var t=this.controller,n=this.tmp.normalize;return this.tmp.normalize=!1,e(t),this.tmp.normalize=n,Et(this),t}},{key:"change",value:function(e){Object(a.a)(!1,"As of Slate 0.43 the `change` object has been replaced with `editor`, so the `editor.change()` method is deprecated.`");for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r1?t-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:{};return Object(a.a)(!1,"As of slate@0.41 the `change.getFlag` method has been deprecated."),void 0!==t[e]?t[e]:this.tmp[e]}},{key:"unsetOperationFlag",value:function(e){return Object(a.a)(!1,"As of slate@0.41 the `change.unsetOperationFlag` method has been deprecated."),delete this.tmp[e],this}},{key:"withoutNormalization",value:function(e){return Object(a.a)(!1,"As of slate@0.41 the `change.withoutNormalization` helper has been renamed to `change.withoutNormalizing`."),this.withoutNormalizing(e)}},{key:"editor",get:function(){return Object(a.a)(!1,"As of Slate 0.43 the `change` object has been replaced with `editor`, so you don't need to access `change.editor`."),this.controller}}]),e}();function Et(e){e.tmp.normalize&&e.tmp.dirty.length&&e.withoutNormalizing((function(){for(;e.tmp.dirty.length;){var t=e.tmp.dirty.pop();St(e,t)}}))}function St(e,t){for(var n=e.controller,r=e.value,i=r.document,o=i.assertNode(t),a=0,s=100+("text"===o.object?1:o.nodes.size);o;){var l=o.normalize(n);if(!l)break;l(n),i=(r=e.value).document;var u=o.key,c=i.getDescendant(t);if(c&&c.key===u)o=c;else{if(!(c=i.getDescendant(u)))break;o=c,t=i.getPath(u)}if(++a>s)throw new Error("A schema rule could not be normalized after sufficient iterations. This is usually due to a `rule.normalize` or `plugin.normalizeNode` function of a schema being incorrectly written, causing an infinite loop.")}}function Ot(e,t){if(Array.isArray(t))t.forEach((function(t){return Ot(e,t)}));else if(null!=t){var n=t.commands,r=t.queries,i=t.schema,o=C(t,["commands","queries","schema"]);if(n){var a=ke(n);Ot(e,a)}if(r){var s=nt(r);Ot(e,s)}if(i){var l=it(i);Ot(e,l)}for(var u in o){var c=o[u];(e.middleware[u]=e.middleware[u]||[]).push(c)}}}var Ct={marks:void 0,text:void 0},Tt=function(e){function t(){return x(this,t),T(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return O(t,e),k(t,[{key:"updateMark",value:function(e,t){var n=this.marks;if(t.equals(e))return this;if(!n.has(e))return this;var r=n.withMutations((function(n){n.remove(e).add(t)}));return this.set("marks",r)}},{key:"addMark",value:function(e){var t=this.marks;return this.set("marks",t.add(e))}},{key:"addMarks",value:function(e){var t=this.marks;return this.set("marks",t.union(e))}},{key:"insertText",value:function(e,t){var n=this.text,r=n.slice(0,e)+t+n.slice(e);return this.set("text",r)}},{key:"removeMark",value:function(e){var t=this.marks;return this.set("marks",t.remove(e))}},{key:"toJSON",value:function(){return{object:this.object,text:this.text,marks:this.marks.toArray().map((function(e){return e.toJSON()}))}}}],[{key:"create",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Object(a.a)(!1,"As of slate@0.47 the `Leaf` model is deprecated."),t.isLeaf(e))return e;if("string"==typeof e&&(e={text:e}),o()(e))return t.fromJSON(e);throw new Error("`Leaf.create` only accepts objects, strings or leaves, but you passed it: "+e)}},{key:"createLeaves",value:function(e){if(e.size<=1)return e;var t=!1,n=Object(r.List)().withMutations((function(n){e.findLast((function(e,r){var i=n.first();if(i){if(i.marks.equals(e.marks))return t=!0,void n.set(0,i.set("text",""+e.text+i.text));if(""===i.text)return t=!0,void n.set(0,e);if(""===e.text)return void(t=!0)}n.unshift(e)}))}));return t?n:e}},{key:"splitLeaves",value:function(e,t){if(t<0)return[Object(r.List)(),e];if(0===e.size)return[Object(r.List)(),Object(r.List)()];var n=0,i=-1,o=void 0,a=void 0;return e.find((function(e){i++;var r=n,s=e.text;if((n+=s.length)t)return!1;var l=t-r;return o=e.set("text",s.slice(0,l)),a=e.set("text",s.slice(l)),!0})),o?""===o.text?0===i?[r.List.of(o),e]:[e.take(i),e.skip(i)]:""===a.text?i===e.size-1?[e,r.List.of(a)]:[e.take(i+1),e.skip(i+1)]:[e.take(i).push(o),e.skip(i+1).unshift(a)]:[e,Object(r.List)()]}},{key:"createList",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(r.List.isList(e)||Array.isArray(e)){var n=new r.List(e.map(t.create));return n}throw new Error("`Leaf.createList` only accepts arrays or lists, but you passed it: "+e)}},{key:"fromJSON",value:function(e){var n=e.text,i=void 0===n?"":n,o=e.marks,a=void 0===o?[]:o;return new t({text:i,marks:Object(r.Set)(a.map($.fromJSON))})}},{key:"isLeafList",value:function(e){return r.List.isList(e)&&e.every((function(e){return t.isLeaf(e)}))}}]),t}(Object(r.Record)(Ct));function At(e,t){var n=!0,r=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=o.value,l=!0,u=!1,c=void 0;try{for(var d,f=Object.getOwnPropertyNames(e)[Symbol.iterator]();!(l=(d=f.next()).done);l=!0){var p=d.value;if(!s.hasOwnProperty(p)){var h=Object.getOwnPropertyDescriptor(e,p);Object.defineProperty(s,p,h)}}}catch(e){u=!0,c=e}finally{try{!l&&f.return&&f.return()}finally{if(u)throw c}}var m=!0,g=!1,v=void 0;try{for(var y,b=Object.getOwnPropertyNames(e.prototype)[Symbol.iterator]();!(m=(y=b.next()).done);m=!0){var _=y.value;if(!s.prototype.hasOwnProperty(_)){h=Object.getOwnPropertyDescriptor(e.prototype,_);Object.defineProperty(s.prototype,_,h)}}}catch(e){g=!0,v=e}finally{try{!m&&b.return&&b.return()}finally{if(g)throw v}}}}catch(e){r=!0,i=e}finally{try{!n&&a.return&&a.return()}finally{if(r)throw i}}}Object.entries({Annotation:te,Block:de,Change:xe,Decoration:G,Document:re,Editor:kt,Inline:oe,Leaf:Tt,Mark:$,Node:ue,Operation:_e,Point:q,Range:J,Selection:Y,Text:le,Value:pe}).forEach((function(e){var t,n,r,i,o=A(e,2),a=o[0],s=o[1];return At((t=a.toLowerCase(),n=Q[t],r="is"+t.charAt(0).toUpperCase()+t.slice(1),(i=function(){function e(){x(this,e)}return k(e,[{key:"object",get:function(){return t}}]),e}())[r]=X.bind(null,t),i.prototype[n]=!0,i),[s])})),At(function(){function e(){x(this,e)}return k(e,[{key:"toJS",value:function(){return this.toJSON.apply(this,arguments)}}],[{key:"fromJS",value:function(){return this.fromJSON.apply(this,arguments)}}]),e}(),[te,de,G,re,oe,Tt,$,ue,_e,q,J,Y,le,pe]);var Pt=!0,Rt=Symbol("LEAF"),jt=Symbol("STORE_KEY"),It=Symbol("undefined"),Mt=Symbol("null"),Lt=new WeakMap;function Dt(e,t){var n=function(t){var n=e[t];if(!n)throw new Error('Object does not have a property named "'+t+'".');e[t]=function(){for(var e=arguments.length,r=Array(e),i=0;i0&&void 0!==arguments[0]?arguments[0]:{},t=e.onlyLeaves,n=e.onlyRoots,r=e.onlyTypes,i=e.match,o=C(e,["onlyLeaves","onlyRoots","onlyTypes","match"]),a=this.descendants(S({includeDocument:!1,includeInlines:!1,includeTexts:!1},o,{match:function(e,o){return!(r&&!r.includes(e.type))&&((!n||1===o.size)&&(!(t&&!e.isLeafBlock())&&!(i&&!i(e,o))))}}));return a}},{key:"createAnnotation",value:function(e){return e=te.createProperties(e),this.resolveAnnotation(e)}},{key:"createDecoration",value:function(e){return e=G.createProperties(e),this.resolveDecoration(e)}},{key:"createIterable",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.direction,n=void 0===t?"forward":t,r=e.downward,i=void 0===r||r,o=e.upward,a=void 0===o||o,s=e.includeBlocks,l=void 0===s||s,u=e.includeDocument,c=void 0===u||u,d=e.includeInlines,f=void 0===d||d,p=e.includeRoot,h=void 0!==p&&p,m=e.includeTarget,g=void 0===m?!!e.range:m,v=e.includeTargetAncestors,y=void 0!==v&&v,b=e.includeTexts,_=void 0===b||b,w=e.match,x=void 0===w?null:w,k=this,S=null,O=null;e.range?(O=k.resolveRange(e.range),S=k.resolvePath(O.start.path)):e.path&&(S=k.resolvePath(e.path));var C=S&&k.assertNode(S),T="undefined"==typeof window?qt.Set:window.Set;return E({},Symbol.iterator,(function(){var e=new T,t=O&&O.start.path,r=O&&O.end.path,o=S,s=C,u=!1,d=!1,p=!1,m=function(){return o&&s?(h||s!==k)&&(l||"block"!==s.object)&&(c||"document"!==s.object)&&(f||"inline"!==s.object)&&(_||"text"!==s.object)?x&&!x(s,o)?v():{value:[s,o],done:!1}:v():{done:!0}},v=function l(){if(!o||!s)return m();if(t&&!d)return p?o.size===t.size-1?(d=!0,o=S,s=C,l()):(o=t.slice(0,o.size+1),s=k.assertNode(o),m()):(p=!0,o=z.create([]),s=k,m());if(g&&!u)return u=!0,m();if(r&&o.equals(r))return s=null,o=null,l();if(i&&s.nodes&&s.nodes.size&&!e.has(s)){e.add(s);var c="forward"===n?0:s.nodes.size-1;return o=o.push(c),s=k.assertNode(o),m()}if("forward"===n){var f=z.increment(o),h=k.getNode(f);if(h)return o=f,s=h,m()}if("backward"===n&&0!==o.last()){var v=z.decrement(o),b=k.getNode(v);if(b)return o=v,s=b,m()}return a&&o.size?(o=z.lift(o),s=k.assertNode(o),e.has(s)?l():(e.add(s),y?m():l())):(o=null,s=null,l())};return{next:v}}))}},{key:"createPoint",value:function(e){return e=q.createProperties(e),this.resolvePoint(e)}},{key:"createRange",value:function(e){return e=J.createProperties(e),this.resolveRange(e)}},{key:"createSelection",value:function(e){return e=Y.createProperties(e),this.resolveSelection(e)}},{key:"descendants",value:function(e){return this.createIterable(S({path:[]},e))}},{key:"filterDescendants",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Wt,t=[],n=!0,i=!1,o=void 0;try{for(var a,s=this.descendants()[Symbol.iterator]();!(n=(a=s.next()).done);n=!0){var l=a.value,u=A(l,2),c=u[0],d=u[1];e(c,d)&&t.push(c)}}catch(e){i=!0,o=e}finally{try{!n&&s.return&&s.return()}finally{if(i)throw o}}return Object(r.List)(t)}},{key:"findDescendant",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Wt,t=!0,n=!1,r=void 0;try{for(var i,o=this.descendants()[Symbol.iterator]();!(t=(i=o.next()).done);t=!0){var a=i.value,s=A(a,2),l=s[0],u=s[1];if(e(l,u))return l}}catch(e){n=!0,r=e}finally{try{!t&&o.return&&o.return()}finally{if(n)throw r}}return null}},{key:"forEachDescendant",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Wt,t=!0,n=!1,r=void 0;try{for(var i,o=this.descendants()[Symbol.iterator]();!(t=(i=o.next()).done);t=!0){var a=i.value,s=e.apply(void 0,P(a));if(!1===s)return}}catch(e){n=!0,r=e}finally{try{!t&&o.return&&o.return()}finally{if(n)throw r}}}},{key:"getActiveMarksAtRange",value:function(e){if((e=this.resolveRange(e)).isUnset)return Object(r.Set)();if(e.isCollapsed){var t=e.start;return this.getInsertMarksAtPoint(t)}var n=e,i=n.start,o=n.end,a=i.path,s=i.offset,l=o.path,u=o.offset,c=this.getDescendant(a),d=this.getDescendant(l);if(!a.equals(l)){for(;!a.equals(l)&&0===u;){var f=this.texts({path:l,direction:"backward"}),p=A(f,1),h=A(p[0],2);d=h[0],l=h[1],u=d.text.length}for(;!a.equals(l)&&s===c.text.length;){var m=this.texts({path:a}),g=A(m,1),v=A(g[0],2);c=v[0],a=v[1],s=0}}if(a.equals(l))return c.marks;var y=c.marks;if(0===y.size)return Object(r.Set)();var b=d.marks,_=y.intersect(b);if(0===_.size)return _;var w=this.texts({path:a}),x=A(w,1),k=A(x[0],2);for(c=k[0],a=k[1];!a.equals(l);){if(0!==c.text.length&&0===(_=_.intersect(c.marks)).size)return Object(r.Set)();var E=this.texts({path:a}),S=A(E,1),O=A(S[0],2);c=O[0],a=O[1]}return _}},{key:"getAncestors",value:function(e){var t=this.ancestors(e),n=Array.from(t,(function(e){return A(e,1)[0]})).reverse();return Object(r.List)(n)}},{key:"getBlocks",value:function(){var e=this.blocks({onlyLeaves:!0}),t=Array.from(e,(function(e){return A(e,1)[0]}));return Object(r.List)(t)}},{key:"getBlocksByType",value:function(e){var t=this.blocks({onlyLeaves:!0,onlyTypes:[e]}),n=Array.from(t,(function(e){return A(e,1)[0]}));return Object(r.List)(n)}},{key:"getChild",value:function(e){return!(e=this.resolvePath(e))||e.size>1?null:this.nodes.get(e.first())}},{key:"getClosest",value:function(e,t){var n=!0,r=!1,i=void 0;try{for(var o,a=this.ancestors(e)[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=o.value,l=A(s,2),u=l[0];if(t(u,l[1]))return u}}catch(e){r=!0,i=e}finally{try{!n&&a.return&&a.return()}finally{if(r)throw i}}return null}},{key:"getClosestBlock",value:function(e){return this.getClosest(e,(function(e){return"block"===e.object}))}},{key:"getClosestInline",value:function(e){return this.getClosest(e,(function(e){return"inline"===e.object}))}},{key:"getClosestVoid",value:function(e,t){return Object(s.a)(!pe.isValue(t),"As of Slate 0.42.0, the `node.getClosestVoid` method takes an `editor` instead of a `value`."),this.getClosest(e,(function(e){return t.isVoid(e)}))}},{key:"getCommonAncestor",value:function(e,t){if(e=this.resolvePath(e),t=this.resolvePath(t),!e||!t)return null;var n=z.relate(e,t);return this.getNode(n)}},{key:"getDecorations",value:function(e){var t=e.run("decorateNode",this);return t=G.createList(t)}},{key:"getDepth",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(!(e=this.resolvePath(e)))return null;var n=this.getNode(e),r=n?e.size-1+t:null;return r}},{key:"getDescendant",value:function(e){if(!(e=this.resolvePath(e))||!e.size)return null;var t=this;return e.forEach((function(e){return!!(t=t.getIn(["nodes",e]))})),t}},{key:"getDescendantsAtRange",value:function(e){var t=this.descendants({range:e}),n=Array.from(t,(function(e){return A(e,1)[0]}));return Object(r.List)(n)}},{key:"getFragmentAtRange",value:function(e){if((e=this.resolveRange(e)).isUnset)return re.create();for(var t=e,n=t.start,r=t.end,i=this,o=r.path,a=r.offset,s="end";o.size;){var l=o.last();i=i.splitNode(o,a),a=l+1,(o=z.lift(o)).size||"end"!==s||(o=n.path,a=n.offset,s="start")}var u=n.path.first()+1,c=r.path.first()+2,d=i.nodes.slice(u,c);return re.create({nodes:d})}},{key:"getFurthest",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Wt,n=this.ancestors(e),r=Array.from(n).reverse(),i=!0,o=!1,a=void 0;try{for(var s,l=r[Symbol.iterator]();!(i=(s=l.next()).done);i=!0){var u=s.value,c=A(u,2),d=c[0],f=c[1];if(t(d,f))return d}}catch(e){o=!0,a=e}finally{try{!i&&l.return&&l.return()}finally{if(o)throw a}}return null}},{key:"getFurthestBlock",value:function(e){return this.getFurthest(e,(function(e){return"block"===e.object}))}},{key:"getFurthestChild",value:function(e){return(e=this.resolvePath(e))&&e.size?this.nodes.get(e.first()):null}},{key:"getFurthestInline",value:function(e){return this.getFurthest(e,(function(e){return"inline"===e.object}))}},{key:"getInlines",value:function(){var e=this.inlines({onlyLeaves:!0}),t=Array.from(e,(function(e){return A(e,1)[0]}));return Object(r.List)(t)}},{key:"getInlinesByType",value:function(e){var t=this.inlines({onlyLeaves:!0,onlyTypes:[e]}),n=Array.from(t,(function(e){return A(e,1)[0]}));return Object(r.List)(n)}},{key:"getInsertMarksAtPoint",value:function(e){var t=e=this.resolvePoint(e),n=t.path,r=t.offset,i=this.getDescendant(n);if(0!==r)return i.marks;var o=void 0,a=void 0,s=!0,l=!1,u=void 0;try{for(var c,d=this.ancestors(n)[Symbol.iterator]();!(s=(c=d.next()).done);s=!0){var f=c.value,p=A(f,2),h=p[0],m=p[1];"block"===h.object&&(o=h,a=m)}}catch(e){l=!0,u=e}finally{try{!s&&d.return&&d.return()}finally{if(l)throw u}}var g=z.drop(n,a.size),v=o.texts({path:g,direction:"backward"}),y=A(v,1)[0];return y?A(y,1)[0].marks:i.marks}},{key:"getInsertMarksAtRange",value:function(e){var t=(e=this.resolveRange(e)).start;return e.isUnset?Object(r.Set)():e.isCollapsed?this.getInsertMarksAtPoint(t):this.getDescendant(t.path).marks}},{key:"getLeafBlocksAtRange",value:function(e){var t=this.blocks({range:e,onlyLeaves:!0}),n=Array.from(t,(function(e){return A(e,1)[0]}));return Object(r.List)(n)}},{key:"getLeafInlinesAtRange",value:function(e){var t=this.inlines({range:e,onlyLeaves:!0}),n=Array.from(t,(function(e){return A(e,1)[0]}));return Object(r.List)(n)}},{key:"getNodesToPathsMap",value:function(){var e="undefined"==typeof window?new qt.Map:new window.Map;return e.set(this,z.create([])),this.forEachDescendant((function(t,n){e.set(t,n)})),e}},{key:"getMarks",value:function(){var e=this.marks(),t=Array.from(e,(function(e){return A(e,1)[0]}));return Object(r.OrderedSet)(t)}},{key:"getMarksAtRange",value:function(e){var t=this.marks({range:e}),n=Array.from(t,(function(e){return A(e,1)[0]}));return Object(r.OrderedSet)(n)}},{key:"getMarksByType",value:function(e){var t=this.marks({onlyTypes:[e]}),n=Array.from(t,(function(e){return A(e,1)[0]}));return Object(r.OrderedSet)(n)}},{key:"getNextBlock",value:function(e){var t=this.blocks({path:e,onlyLeaves:!0}),n=A(t,1)[0];return n?n[0]:null}},{key:"getNextNode",value:function(e){var t=this.createIterable({path:e,downward:!1}),n=A(t,1)[0];return n?n[0]:null}},{key:"getNextSibling",value:function(e){var t=this.siblings(e),n=A(t,1)[0];return n?n[0]:null}},{key:"getNextText",value:function(e){var t=this.texts({path:e}),n=A(t,1)[0];return n?n[0]:null}},{key:"getOffset",value:function(e){e=this.resolvePath(e),this.assertDescendant(e);var t=e.first(),n=this.nodes.slice(0,t).reduce((function(e,t){return e+t.text.length}),0);return 1===e.size?n:n+this.nodes.get(t).getOffset(z.drop(e))}},{key:"getOffsetAtRange",value:function(e){if((e=this.resolveRange(e)).isUnset)throw new Error("The range cannot be unset to calculcate its offset.");if(e.isExpanded)throw new Error("The range must be collapsed to calculcate its offset.");var t=e.start;return this.getOffset(t.path)+t.offset}},{key:"getParent",value:function(e){if(!(e=this.resolvePath(e)))return null;if(!e.size)return null;var t=z.lift(e);return this.getNode(t)}},{key:"getPreviousBlock",value:function(e){var t=this.blocks({path:e,onlyLeaves:!0,direction:"backward"}),n=A(t,1)[0];return n?n[0]:null}},{key:"getPreviousNode",value:function(e){var t=this.createIterable({path:e,downward:!1,direction:"backward"}),n=A(t,1)[0];return n?n[0]:null}},{key:"getPreviousSibling",value:function(e){var t=this.siblings(e,{direction:"backward"}),n=A(t,1)[0];return n?n[0]:null}},{key:"getPreviousText",value:function(e){var t=this.texts({path:e,direction:"backward"}),n=A(t,1)[0];return n?n[0]:null}},{key:"getRootBlocksAtRange",value:function(e){var t=this.blocks({range:e,onlyRoots:!0}),n=Array.from(t,(function(e){return A(e,1)[0]}));return Object(r.List)(n)}},{key:"getRootInlinesAtRange",value:function(e){var t=this.inlines({range:e,onlyRoots:!0}),n=Array.from(t,(function(e){return A(e,1)[0]}));return Object(r.List)(n)}},{key:"getTextAtOffset",value:function(e){if(0===e)return this.getFirstText();if(e===this.text.length)return this.getLastText();if(e<0||e>this.text.length)return null;var t=0,n=!0,r=!1,i=void 0;try{for(var o,a=this.texts()[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=o.value,l=A(s,1)[0];if((t+=l.text.length)>e)return l}}catch(e){r=!0,i=e}finally{try{!n&&a.return&&a.return()}finally{if(r)throw i}}return null}},{key:"getTextDirection",value:function(){var e=g()(this.text);return"neutral"===e?null:e}},{key:"getTexts",value:function(){var e=this.texts(),t=Array.from(e,(function(e){return A(e,1)[0]}));return Object(r.List)(t)}},{key:"getTextsAtRange",value:function(e){var t=this.texts({range:e}),n=Array.from(t,(function(e){return A(e,1)[0]}));return Object(r.List)(n)}},{key:"hasBlockChildren",value:function(){return!(!this.nodes||!this.nodes.find((function(e){return"block"===e.object})))}},{key:"hasChild",value:function(e){return!!this.getChild(e)}},{key:"hasInlineChildren",value:function(){return!(!this.nodes||!this.nodes.find((function(e){return"inline"===e.object||"text"===e.object})))}},{key:"hasDescendant",value:function(e){return!!this.getDescendant(e)}},{key:"hasVoidParent",value:function(e,t){return Object(s.a)(!pe.isValue(t),"As of Slate 0.42.0, the `node.hasVoidParent` method takes an `editor` instead of a `value`."),!!this.getClosestVoid(e,t)}},{key:"inlines",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.onlyLeaves,r=t.onlyRoots,i=t.onlyTypes,o=t.match,a=C(t,["onlyLeaves","onlyRoots","onlyTypes","match"]),s=this.descendants(S({includeBlocks:!1,includeTexts:!1,includeDocument:!1},a,{match:function(t,a){return!(i&&!i.includes(t.type))&&(!(n&&!t.isLeafInline())&&((!r||"block"===e.getParent(a).object)&&!(o&&!o(t,a))))}}));return s}},{key:"insertNode",value:function(e,t){var n=(e=this.resolvePath(e)).last(),r=z.lift(e),i=this.assertNode(r),o=i.nodes.splice(n,0,t);return i=i.set("nodes",o),this.replaceNode(r,i)}},{key:"insertText",value:function(e,t,n){e=this.resolvePath(e);var r=this.assertDescendant(e);return r=r.insertText(t,n),this.replaceNode(e,r)}},{key:"isLeafBlock",value:function(){return"block"===this.object&&!this.nodes.some((function(e){return"block"===e.object}))}},{key:"isLeafInline",value:function(){return"inline"===this.object&&!this.nodes.some((function(e){return"inline"===e.object}))}},{key:"isInRange",value:function(e,t){if(e=this.resolvePath(e),(t=this.resolveRange(t)).isUnset)return!1;var n=z.compare(e,t.start.path),r=z.compare(e,t.end.path),i=-1!==n&&1!==r;return i}},{key:"mapChildren",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Wt,n=this.nodes;n.forEach((function(r,i){var o=t(r,i,e.nodes);o!==r&&(n=n.set(o.key,o))}));var r=this.set("nodes",n);return r}},{key:"mapDescendants",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Wt,n=this.nodes;n.forEach((function(r,i){var o=r;"text"!==o.object&&(o=o.mapDescendants(t)),(o=t(o,i,e.nodes))!==r&&(n=n.set(i,o))}));var r=this.set("nodes",n);return r}},{key:"marks",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.onlyTypes,n=void 0===t?null:t,r=e.match,i=C(e,["onlyTypes","match"]),o=this.texts(i);return E({},Symbol.iterator,(function(){var e=o[Symbol.iterator](),t=null,i=null,a=[];return{next:function o(){if(a.length){var s=a.shift();return n&&!n.includes(s.type)||r&&!r(s,t,i)?o():{value:[s,t,i],done:!1}}var l=e.next(),u=l.value;if(l.done)return{done:!0};var c=A(u,2);return t=c[0],i=c[1],a=t.marks.toArray(),o()}}}))}},{key:"mergeNode",value:function(e){var t=this.assertNode(e);if(0===(e=this.resolvePath(e)).last())throw new Error("Unable to merge node because it has no previous sibling: "+t);var n=z.decrement(e),r=this.assertNode(n);if(r.object!==t.object)throw new Error("Unable to merge two different kinds of nodes: "+r+" and "+t);var i="text"===r.object?r.mergeText(t):r.set("nodes",r.nodes.concat(t.nodes)),o=this;return o=(o=(o=o.removeNode(e)).removeNode(n)).insertNode(n,i)}},{key:"moveNode",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=this.assertNode(e);e=this.resolvePath(e),t=this.resolvePath(t,n);var i=z.lift(t);this.assertNode(i);var o=_e.create({type:"move_node",path:e,newPath:t});t=z.transform(e,o).first();var a=this;return a=(a=a.removeNode(e)).insertNode(t,r)}},{key:"removeMark",value:function(e,t){e=this.resolvePath(e);var n=this.assertDescendant(e);return n=n.removeMark(t),this.replaceNode(e,n)}},{key:"removeNode",value:function(e){this.assertDescendant(e);var t=(e=this.resolvePath(e)).flatMap((function(e){return["nodes",e]}));return this.deleteIn(t)}},{key:"removeText",value:function(e,t,n){var r=this.assertDescendant(e);return r=r.removeText(t,n.length),this.replaceNode(e,r)}},{key:"replaceNode",value:function(e,t){if(!(e=this.resolvePath(e)))throw new Error("Unable to replace a node because it could not be found in the first place: "+e);if(!e.size)return t;this.assertNode(e);var n=e.flatMap((function(e){return["nodes",e]}));return this.setIn(n,t)}},{key:"resolveAnnotation",value:function(e){return e=(e=te.create(e)).normalize(this)}},{key:"resolveDecoration",value:function(e){return e=(e=G.create(e)).normalize(this)}},{key:"resolvePoint",value:function(e){return e=(e=q.create(e)).normalize(this)}},{key:"resolveRange",value:function(e){return e=(e=J.create(e)).normalize(this)}},{key:"resolveSelection",value:function(e){return e=(e=Y.create(e)).normalize(this)}},{key:"setNode",value:function(e,t){var n=this.assertNode(e);return n=n.merge(t),this.replaceNode(e,n)}},{key:"setMark",value:function(e,t,n){e=this.resolvePath(e);var r=this.assertDescendant(e);return r=r.setMark(t,n),this.replaceNode(e,r)}},{key:"siblings",value:function(e,t){return this.createIterable(S({path:e,upward:!1,downward:!1},t))}},{key:"splitNode",value:function(e,t,n){var r=this.assertNode(e);e=this.resolvePath(e);var i=void 0,o=void 0;if("text"===r.object){var a=r.splitText(t),s=A(a,2);i=s[0],o=s[1]}else{var l=r.nodes.take(t),u=r.nodes.skip(t);i=r.set("nodes",l),o=r.set("nodes",u).regenerateKey()}n&&"text"!==r.object&&(o=o.merge(n));var c=this;return c=(c=(c=c.removeNode(e)).insertNode(e,o)).insertNode(e,i)}},{key:"texts",value:function(e){return this.descendants(S({includeBlocks:!1,includeInlines:!1,includeDocument:!1},e))}},{key:"getBlocksAtRange",value:function(e){return Object(a.a)(!1,"As of slate@0.44 the `node.getBlocksAtRange` method has been renamed to `getLeafBlocksAtRange`."),this.getLeafBlocksAtRange(e)}},{key:"getBlocksAtRangeAsArray",value:function(e){return Object(a.a)(!1,"As of slate@0.44 the `node.getBlocksAtRangeAsArray` method has been renamed to `getLeafBlocksAtRangeAsArray`."),this.getLeafBlocksAtRangeAsArray(e)}},{key:"getInlinesAtRange",value:function(e){return Object(a.a)(!1,"As of slate@0.44 the `node.getInlinesAtRange` method has been renamed to `getLeafInlinesAtRange`."),this.getLeafInlinesAtRange(e)}},{key:"getInlinesAtRangeAsArray",value:function(e){return Object(a.a)(!1,"As of slate@0.44 the `node.getInlinesAtRangeAsArray` method has been renamed to `getLeafInlinesAtRangeAsArray`."),this.getLeafInlinesAtRangeAsArray(e)}},{key:"getNextTextAndPath",value:function(e){return Object(a.a)(!1,"As of slate@0.47, the `getNextTextAndPath` method has been renamed to `getNextTextEntry`."),this.getNextTextEntry(e)}},{key:"getNextDeepMatchingNodeAndPath",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return!0};Object(a.a)(!1,"As of slate@0.47, the `getNextDeepMatchingNodeAndPath` method is deprecated.");var n=this.getNextMatchingNodeAndPath(e);if(!n)return null;for(var r=A(n,2),i=r[0],o=r[1],s=void 0,l=function(){return s="text"!==i.object&&i.findFirstDescendantAndPath(t,o)};l(s);){var u=s,c=A(u,2);i=c[0],o=c[1]}return i?t(i)?[i,o]:this.getNextDeepMatchingNodeAndPath(n[1],t):null}},{key:"getPreviousTextAndPath",value:function(e){return Object(a.a)(!1,"As of slate@0.47, the `getPreviousTextAndPath` method has been renamed to `getPreviousTextEntry`."),this.getPreviousTextEntry(e)}},{key:"findFirstDescendantAndPath",value:function(e,t){return Object(a.a)(!1,"As of slate@0.47, the `findFirstDescendantAndPath` method is deprecated."),this.findDescendantAndPath(e,t,!1)}},{key:"getPreviousMatchingNodeAndPath",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return!0};if(Object(a.a)(!1,"As of slate@0.47, the `getPreviousMatchingNodeAndPath` method is deprecated."),!e)return null;for(var n=e.size;n>0;n--){var r=e.slice(0,n);if(0!==r.last()){for(var i=z.decrement(r),o=this.getNode(i);o&&!t(o);)i=z.decrement(i),o=this.getNode(i);if(o)return[o,i]}}return null}},{key:"getPreviousDeepMatchingNodeAndPath",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return!0};Object(a.a)(!1,"As of slate@0.47, the `getPreviousDeepMatchingNodeAndPath` method is deprecated.");var n=this.getPreviousMatchingNodeAndPath(e);if(!n)return null;for(var r=A(n,2),i=r[0],o=r[1],s=void 0,l=function(){return s="text"!==i.object&&i.findLastDescendantAndPath(t,o)};l(s);){var u=s,c=A(u,2);i=c[0],o=c[1]}return i?t(i)?[i,o]:this.getPreviousDeepMatchingNodeAndPath(n[1],t):null}},{key:"findLastDescendantAndPath",value:function(e,t){return Object(a.a)(!1,"As of slate@0.47, the `findLastDescendantAndPath` method is deprecated."),this.findDescendantAndPath(e,t,!0)}},{key:"findDescendantAndPath",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:z.create([]),n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];Object(a.a)(!1,"As of slate@0.47, the `findDescendantAndPath` method is deprecated.");var r=void 0,i=void 0;return this.forEachDescendantWithPath((function(t,n,o){if(e(t,n,o))return r=t,i=n,!1}),t,n),r?[r,i]:null}},{key:"forEachDescendantWithPath",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:z.create([]),n=arguments[2];Object(a.a)(!1,"As of slate@0.47, the `forEachDescendantWithPath` method is deprecated.");var r=this.nodes,i=void 0;return n&&(r=r.reverse()),r.forEach((function(o,a){var s=t.concat(a);return!1===e(o,s,r)?(i=!1,!1):"text"!==o.object?i=o.forEachDescendantWithPath(e,s,n):void 0})),i}},{key:"getNextMatchingNodeAndPath",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return!0};if(Object(a.a)(!1,"As of slate@0.47, the `getNextMatchingNodeAndPath` method is deprecated."),!e)return null;for(var n=e.size;n>0;n--){for(var r=e.slice(0,n),i=z.increment(r),o=this.getNode(i);o&&!t(o);)i=z.increment(i),o=this.getNode(i);if(o)return[o,i]}return null}},{key:"getSelectionIndexes",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];Object(a.a)(!1,"As of slate@0.47, the `getSelectionIndexes` method is deprecated.");var n=e.start,r=e.end;if(!t)return null;if(e.isUnset)return null;if(n.path.equals(r.path)){var i=this.getFurthestAncestor(n.path),o=i?this.nodes.indexOf(i):null;return{start:o,end:o+1}}var s=null,l=null;return this.nodes.forEach((function(e,t){return"text"===e.object?(null==s&&e.key===n.key&&(s=t),null==l&&e.key===r.key&&(l=t+1)):(null==s&&e.hasDescendant(n.key)&&(s=t),null==l&&e.hasDescendant(r.key)&&(l=t+1)),null==s||null==l})),t&&null==s&&(s=0),t&&null==l&&(l=this.nodes.size),null==s?null:{start:s,end:l}}},{key:"getTextsBetweenPositionsAsArray",value:function(e,t){return Object(a.a)(!1,"As of slate@0.47, the `getTextsBetweenPositionsAsArray` method is deprecated."),e=this.resolvePath(e),t=this.resolvePath(t),this.getTextsBetweenPathPositionsAsArray(e,t)}},{key:"getOrderedMarksBetweenPositions",value:function(e,t,n,i){Object(a.a)(!1,"As of slate@0.47, the `getOrderedMarksBetweenPositions` method is deprecated."),e=this.resolvePath(e),n=this.resolvePath(n);var o=this.getDescendant(e);if(z.isEqual(e,n))return o.marks;var s=this.getTextsBetweenPathPositionsAsArray(e,n);return Object(r.OrderedSet)().withMutations((function(e){s.forEach((function(t){e.union(t.marks)}))}))}},{key:"getTextsBetweenPathPositionsAsArray",value:function(e,t){if(Object(a.a)(!1,"As of slate@0.47, the `getTextsBetweenPathPositionsAsArray` method is deprecated."),e&&t&&z.isEqual(e,t))return[this.getDescendant(e)];if(!e&&!t)return this.getTextsAsArray();var n=e?e.get(0,0):0,r=t?t.get(0,this.nodes.size-1):this.nodes.size-1,i=[];return this.nodes.slice(n,r+1).forEach((function(o,a){if("text"===o.object)i.push(o);else{var s=e&&0===a?z.drop(e):null,l=t&&a===r-n?z.drop(t):null;i=i.concat(o.getTextsBetweenPathPositionsAsArray(s,l))}})),i}},{key:"getFurthestAncestor",value:function(e){return Object(a.a)(!1,"As of slate@0.47, the `getFurthestAncestor` method has been renamed to `getFurthestChild`."),this.getFurthestChild(e)}},{key:"getLeafBlocksAtRangeAsArray",value:function(e){if(Object(a.a)(!1,"As of slate@0.47, the `getLeafBlocksAtRangeAsArray` method is deprecated."),(e=this.resolveRange(e)).isUnset)return[];var t=e,n=t.start,r=t.end;return this.getLeafBlocksBetweenPathPositionsAsArray(n.path,r.path)}},{key:"getLeafBlocksBetweenPathPositionsAsArray",value:function(e,t){if(Object(a.a)(!1,"As of slate@0.47, the `getLeafBlocksBetweenPathPositionsAsArray` method is deprecated."),e&&t&&z.isEqual(e,t))return[this.getClosestBlock(e)];if(!e&&!t)return this.getBlocksAsArray();var n=e?e.get(0,0):0,r=t?t.get(0,this.nodes.size-1):this.nodes.size-1,i=[];return this.nodes.slice(n,r+1).forEach((function(o,a){if("block"===o.object)if(o.isLeafBlock())i.push(o);else{var s=e&&0===a?z.drop(e):null,l=t&&a===r-n?z.drop(t):null;i=i.concat(o.getLeafBlocksBetweenPathPositionsAsArray(s,l))}})),i}},{key:"getBlocksAsArray",value:function(){Object(a.a)(!1,"As of slate@0.47, the `getBlocksAsArray` method is deprecated.");var e=this.blocks({onlyLeaves:!0});return Array.from(e,(function(e){return A(e,1)[0]}))}},{key:"getBlocksByTypeAsArray",value:function(e){Object(a.a)(!1,"As of slate@0.47, the `getBlocksByTypeAsArray` method is deprecated.");var t=this.blocks({onlyLeaves:!0,onlyTypes:[e]});return Array.from(t,(function(e){return A(e,1)[0]}))}},{key:"getFurthestOnlyChildAncestor",value:function(e){Object(a.a)(!1,"As of slate@0.47, the `getFurthestOnlyChildAncestor` method is deprecated.");var t=this.getAncestors(e);return t&&t.rest().reverse().takeUntil((function(e){return e.nodes.size>1})).last()||null}},{key:"getInlinesAsArray",value:function(){return Object(a.a)(!1,"As of slate@0.47, the `getInlinesAsArray` method is deprecated."),Array.from(this.inlines({onlyLeaves:!0}),(function(e){return A(e,1)[0]}))}},{key:"getInlinesByTypeAsArray",value:function(e){return Object(a.a)(!1,"As of slate@0.47, the `getInlinesByTypeAsArray` method is deprecated."),Array.from(this.inlines({onlyLeaves:!0,onlyTypes:[e]}),(function(e){return A(e,1)[0]}))}},{key:"getLeafInlinesAtRangeAsArray",value:function(e){var t=this;return Object(a.a)(!1,"As of slate@0.47, the `getLeafInlinesAtRangeAsArray` method is deprecated."),(e=this.resolveRange(e)).isUnset?[]:this.getTextsAtRangeAsArray(e).map((function(e){return t.getClosestInline(e.key)})).filter((function(e){return e}))}},{key:"getOrderedMarks",value:function(){return Object(a.a)(!1,"As of slate@0.47, the `getOrderedMarks` method has been folded into `getMarks`, which will now return an ordered set."),this.getMarks()}},{key:"getOrderedMarksAtRange",value:function(e){return Object(a.a)(!1,"As of slate@0.47, the `getOrderedMarksAtRange` method has been folded into `getMarksAtRange`, which will now return an ordered set."),this.getMarksAtRange(e)}},{key:"getOrderedMarksByType",value:function(e){return Object(a.a)(!1,"As of slate@0.47, the `getOrderedMarksByType` method has been folded into `getMarksByType`, which will now return an ordered set."),this.getMarksByType(e)}},{key:"getMarksByTypeAsArray",value:function(e){return Object(a.a)(!1,"As of slate@0.47, the `getMarksByTypeAsArray` method is deprecated."),this.nodes.reduce((function(t,n){return"text"===n.object?t.concat(n.marks.filter((function(t){return t.type===e}))):t.concat(n.getMarksByTypeAsArray(e))}),[])}},{key:"getMarksAsArray",value:function(){var e;Object(a.a)(!1,"As of slate@0.47, the `getMarksAsArray` method is deprecated.");var t=[],n=!0,r=!1,i=void 0;try{for(var o,s=this.texts()[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var l=o.value,u=A(l,1)[0];t.push(u.marks.toArray())}}catch(e){r=!0,i=e}finally{try{!n&&s.return&&s.return()}finally{if(r)throw i}}return(e=[]).concat.apply(e,t)}},{key:"getRootInlinesAtRangeAsArray",value:function(e){var t=this;return Object(a.a)(!1,"As of slate@0.47, the `getRootInlinesAtRangeAsArray` method is deprecated."),(e=this.resolveRange(e)).isUnset?Object(r.List)():this.getTextsAtRangeAsArray(e).map((function(e){return t.getFurthestInline(e.key)})).filter((function(e){return e}))}},{key:"getTextsAsArray",value:function(){Object(a.a)(!1,"As of slate@0.47, the `getTextsAsArray` method is deprecated.");var e=this.texts();return Array.from(e,(function(e){return A(e,1)[0]}))}},{key:"getTextsAtRangeAsArray",value:function(e){Object(a.a)(!1,"As of slate@0.47, the `getTextsAtRangeAsArray` method is deprecated.");var t=this.texts({range:e});return Array.from(t,(function(e){return A(e,1)[0]}))}},{key:"getMarksAtPosition",value:function(e,t){Object(a.a)(!1,"As of slate@0.47, the `getMarksAtPosition` method is deprecated."),e=this.resolvePath(e);var n=this.getDescendant(e).marks;if(0!==t)return Object(r.OrderedSet)(n);var i=this.getClosestBlock(e);if(""===i.text)return Object(r.OrderedSet)(n);var o=this.texts({path:e,direction:"backward"}),s=A(o,1)[0];if(!s)return Object(r.OrderedSet)();var l=A(s,2),u=l[0],c=l[1];return i.hasDescendant(c)?Object(r.OrderedSet)(u.marks):Object(r.OrderedSet)(n)}},{key:"getNodesAtRange",value:function(e){Object(a.a)(!1,"As of slate@0.47, the `getNodesAtRange` method has been renamed to `getDescendantsAtRange`.");var t=this.descendants({range:e}),n=Array.from(t,(function(e){return A(e,1)[0]}));return Object(r.List)(n)}},{key:"isNodeInRange",value:function(e,t){return Object(a.a)(!1,"As of slate@0.47, the `isNodeInRange` method has been renamed to `isInRange`."),this.isInRange(e,t)}},{key:"text",get:function(){return this.getText()}}]),e}(),$t=function(e){Ht.prototype["assert"+e]=function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i1&&void 0!==arguments[1]?arguments[1]:e,n=this.setPoints([this.anchor.moveToStartOfNode(e),this.focus.moveToEndOfNode(t)]);return n}},{key:"moveToStart",value:function(){return this.setEnd(this.start)}},{key:"moveToStartOfNode",value:function(e){return this.updatePoints((function(t){return t.moveToStartOfNode(e)}))}},{key:"normalize",value:function(e){return this.updatePoints((function(t){return t.normalize(e)}))}},{key:"setAnchor",value:function(e){return this.set("anchor",e)}},{key:"setEnd",value:function(e){return this.isBackward?this.setAnchor(e):this.setFocus(e)}},{key:"setFocus",value:function(e){return this.set("focus",e)}},{key:"setPoints",value:function(e){var t=A(e,2),n=t[0],r=t[1];return this.set("anchor",n).set("focus",r)}},{key:"updatePoints",value:function(e){var t=this.anchor,n=this.focus;return t=e(t),n=e(n),this.merge({anchor:t,focus:n})}},{key:"setStart",value:function(e){return this.isBackward?this.setFocus(e):this.setAnchor(e)}},{key:"setProperties",value:function(e){var t=e=J.createProperties(e),n=t.anchor,r=t.focus,i=C(t,["anchor","focus"]);return n&&(i.anchor=q.create(n)),r&&(i.focus=q.create(r)),this.merge(i)}},{key:"toJSON",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={object:this.object,anchor:this.anchor.toJSON(e),focus:this.focus.toJSON(e)};return t}},{key:"toRange",value:function(){var e=J.createProperties(this);return J.create(e)}},{key:"unset",value:function(){return this.updatePoints((function(e){return e.unset()}))}},{key:"isCollapsed",get:function(){return this.anchor===this.focus||this.anchor.key===this.focus.key&&this.anchor.offset===this.focus.offset}},{key:"isExpanded",get:function(){return!this.isCollapsed}},{key:"isBackward",get:function(){var e=this.isUnset,t=this.anchor,n=this.focus;return e?null:t.key===n.key?t.offset>n.offset:z.isBefore(n.path,t.path)}},{key:"isForward",get:function(){var e=this.isBackward;return null==e?null:!e}},{key:"isUnset",get:function(){var e=this.anchor,t=this.focus;return e.isUnset||t.isUnset}},{key:"isSet",get:function(){return!this.isUnset}},{key:"start",get:function(){return this.isBackward?this.focus:this.anchor}},{key:"end",get:function(){return this.isBackward?this.anchor:this.focus}}]),e}(),[te,G,J,Y]);var Xt={Annotation:te,Block:de,Change:xe,Data:W,Decoration:G,Document:re,Editor:kt,Inline:oe,KeyUtils:_,Leaf:Tt,Mark:$,Node:ue,Operation:_e,PathUtils:z,Point:q,Range:J,resetMemoization:Bt,Selection:Y,Text:le,TextUtils:Me,useMemoization:zt,Value:pe};t.default=Xt}.call(this,n(56))},function(e,t,n){"use strict";function r(e,t,n){for(var r,o,a=n||i,s=0,l=e.length,u=!1;s>1)],t))<0?s=r+1:(l=r,u=!o);return u?s:~s}function i(e,t){return e>t?1:e0){for(i=1;i0?i-1:i:e[i-1]-t0||n&&0===o)}))}n.d(t,"a",(function(){return r})),n.d(t,"f",(function(){return i})),n.d(t,"e",(function(){return o})),n.d(t,"g",(function(){return a})),n.d(t,"c",(function(){return s})),n.d(t,"b",(function(){return l})),n.d(t,"d",(function(){return u}))},function(e,t,n){"use strict";var r,i=n(4),o=function(){invariant(!1,"ImmutablePropTypes type checking code is stripped in production.")};o.isRequired=o;var a=function(){return o};function s(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":e instanceof i.Iterable?"Immutable."+e.toSource().split(" ")[0]:t}function l(e){function t(t,n,r,i,o,a){for(var s=arguments.length,l=Array(s>6?s-6:0),u=6;u>",null!=n[r])return e.apply(void 0,[n,r,i,o,a].concat(l));var c=o;return t?new Error("Required "+c+" `"+a+"` was not specified in `"+i+"`."):void 0}var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}function u(e,t){return n="Iterable."+e,r=function(e){return i.Iterable.isIterable(e)&&t(e)},l((function(e,t,i,o,a){var l=e[t];if(!r(l)){var u=s(l);return new Error("Invalid "+o+" `"+a+"` of type `"+u+"` supplied to `"+i+"`, expected `"+n+"`.")}return null}));var n,r}(r={listOf:a,mapOf:a,orderedMapOf:a,setOf:a,orderedSetOf:a,stackOf:a,iterableOf:a,recordOf:a,shape:a,contains:a,mapContains:a,orderedMapContains:a,list:o,map:o,orderedMap:o,set:o,orderedSet:o,stack:o,seq:o,record:o,iterable:o}).iterable.indexed=u("Indexed",i.Iterable.isIndexed),r.iterable.keyed=u("Keyed",i.Iterable.isKeyed),e.exports=r},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const r=n(256),i=n(591);var o=n(256);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return o._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return o.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return o.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return o.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return o.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return o.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return o.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return o.Name}});var a=n(591);Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return a.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return a.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return a.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return a.varKinds}}),t.operators={GT:new r._Code(">"),GTE:new r._Code(">="),LT:new r._Code("<"),LTE:new r._Code("<="),EQ:new r._Code("==="),NEQ:new r._Code("!=="),NOT:new r._Code("!"),OR:new r._Code("||"),AND:new r._Code("&&"),ADD:new r._Code("+")};class s{optimizeNodes(){return this}optimizeNames(e,t){return this}}class l extends s{constructor(e,t,n){super(),this.varKind=e,this.name=t,this.rhs=n}render({es5:e,_n:t}){const n=e?i.varKinds.var:this.varKind,r=void 0===this.rhs?"":" = "+this.rhs;return`${n} ${this.name}${r};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=R(this.rhs,e,t)),this}get names(){return this.rhs instanceof r._CodeOrName?this.rhs.names:{}}}class u extends s{constructor(e,t,n){super(),this.lhs=e,this.rhs=t,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(!(this.lhs instanceof r.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=R(this.rhs,e,t),this}get names(){return P(this.lhs instanceof r.Name?{}:{...this.lhs.names},this.rhs)}}class c extends u{constructor(e,t,n,r){super(e,n,r),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class d extends s{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return this.label+":"+e}}class f extends s{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?" "+this.label:""};`+e}}class p extends s{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class h extends s{constructor(e){super(),this.code=e}render({_n:e}){return this.code+";"+e}optimizeNodes(){return""+this.code?this:void 0}optimizeNames(e,t){return this.code=R(this.code,e,t),this}get names(){return this.code instanceof r._CodeOrName?this.code.names:{}}}class m extends s{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((t,n)=>t+n.render(e),"")}optimizeNodes(){const{nodes:e}=this;let t=e.length;for(;t--;){const n=e[t].optimizeNodes();Array.isArray(n)?e.splice(t,1,...n):n?e[t]=n:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){const{nodes:n}=this;let r=n.length;for(;r--;){const i=n[r];i.optimizeNames(e,t)||(j(e,i.names),n.splice(r,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>A(e,t.names),{})}}class g extends m{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class v extends m{}class y extends g{}y.kind="else";class b extends g{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();const e=this.condition;if(!0===e)return this.nodes;let t=this.else;if(t){const e=t.optimizeNodes();t=this.else=Array.isArray(e)?new y(e):e}return t?!1===e?t instanceof b?t:t.nodes:this.nodes.length?this:new b(I(e),t instanceof b?[t]:t.nodes):!1!==e&&this.nodes.length?this:void 0}optimizeNames(e,t){var n;if(this.else=null===(n=this.else)||void 0===n?void 0:n.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=R(this.condition,e,t),this}get names(){const e=super.names;return P(e,this.condition),this.else&&A(e,this.else.names),e}}b.kind="if";class _ extends g{}_.kind="for";class w extends _{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=R(this.iteration,e,t),this}get names(){return A(super.names,this.iteration.names)}}class x extends _{constructor(e,t,n,r){super(),this.varKind=e,this.name=t,this.from=n,this.to=r}render(e){const t=e.es5?i.varKinds.var:this.varKind,{name:n,from:r,to:o}=this;return`for(${t} ${n}=${r}; ${n}<${o}; ${n}++)`+super.render(e)}get names(){const e=P(super.names,this.from);return P(e,this.to)}}class k extends _{constructor(e,t,n,r){super(),this.loop=e,this.varKind=t,this.name=n,this.iterable=r}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=R(this.iterable,e,t),this}get names(){return A(super.names,this.iterable.names)}}class E extends g{constructor(e,t,n){super(),this.name=e,this.args=t,this.async=n}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}E.kind="func";class S extends m{render(e){return"return "+super.render(e)}}S.kind="return";class O extends g{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),null===(e=this.catch)||void 0===e||e.optimizeNodes(),null===(t=this.finally)||void 0===t||t.optimizeNodes(),this}optimizeNames(e,t){var n,r;return super.optimizeNames(e,t),null===(n=this.catch)||void 0===n||n.optimizeNames(e,t),null===(r=this.finally)||void 0===r||r.optimizeNames(e,t),this}get names(){const e=super.names;return this.catch&&A(e,this.catch.names),this.finally&&A(e,this.finally.names),e}}class C extends g{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}C.kind="catch";class T extends g{render(e){return"finally"+super.render(e)}}T.kind="finally";function A(e,t){for(const n in t)e[n]=(e[n]||0)+(t[n]||0);return e}function P(e,t){return t instanceof r._CodeOrName?A(e,t.names):e}function R(e,t,n){return e instanceof r.Name?o(e):(i=e)instanceof r._Code&&i._items.some(e=>e instanceof r.Name&&1===t[e.str]&&void 0!==n[e.str])?new r._Code(e._items.reduce((e,t)=>(t instanceof r.Name&&(t=o(t)),t instanceof r._Code?e.push(...t._items):e.push(t),e),[])):e;var i;function o(e){const r=n[e.str];return void 0===r||1!==t[e.str]?e:(delete t[e.str],r)}}function j(e,t){for(const n in t)e[n]=(e[n]||0)-(t[n]||0)}function I(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:r._`!${N(e)}`}t.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?"\n":""},this._extScope=e,this._scope=new i.Scope({parent:e}),this._nodes=[new v]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){const n=this._extScope.value(e,t);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,n,r){const i=this._scope.toName(t);return void 0!==n&&r&&(this._constants[i.str]=n),this._leafNode(new l(e,i,n)),i}const(e,t,n){return this._def(i.varKinds.const,e,t,n)}let(e,t,n){return this._def(i.varKinds.let,e,t,n)}var(e,t,n){return this._def(i.varKinds.var,e,t,n)}assign(e,t,n){return this._leafNode(new u(e,t,n))}add(e,n){return this._leafNode(new c(e,t.operators.ADD,n))}code(e){return"function"==typeof e?e():e!==r.nil&&this._leafNode(new h(e)),this}object(...e){const t=["{"];for(const[n,i]of e)t.length>1&&t.push(","),t.push(n),(n!==i||this.opts.es5)&&(t.push(":"),r.addCodeArg(t,i));return t.push("}"),new r._Code(t)}if(e,t,n){if(this._blockNode(new b(e)),t&&n)this.code(t).else().code(n).endIf();else if(t)this.code(t).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new b(e))}else(){return this._elseNode(new y)}endIf(){return this._endBlockNode(b,y)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new w(e),t)}forRange(e,t,n,r,o=(this.opts.es5?i.varKinds.var:i.varKinds.let)){const a=this._scope.toName(e);return this._for(new x(o,a,t,n),()=>r(a))}forOf(e,t,n,o=i.varKinds.const){const a=this._scope.toName(e);if(this.opts.es5){const e=t instanceof r.Name?t:this.var("_arr",t);return this.forRange("_i",0,r._`${e}.length`,t=>{this.var(a,r._`${e}[${t}]`),n(a)})}return this._for(new k("of",o,a,t),()=>n(a))}forIn(e,t,n,o=(this.opts.es5?i.varKinds.var:i.varKinds.const)){if(this.opts.ownProperties)return this.forOf(e,r._`Object.keys(${t})`,n);const a=this._scope.toName(e);return this._for(new k("in",o,a,t),()=>n(a))}endFor(){return this._endBlockNode(_)}label(e){return this._leafNode(new d(e))}break(e){return this._leafNode(new f(e))}return(e){const t=new S;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(S)}try(e,t,n){if(!t&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');const r=new O;if(this._blockNode(r),this.code(e),t){const e=this.name("e");this._currNode=r.catch=new C(e),t(e)}return n&&(this._currNode=r.finally=new T,this.code(n)),this._endBlockNode(C,T)}throw(e){return this._leafNode(new p(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){const t=this._blockStarts.pop();if(void 0===t)throw new Error("CodeGen: not in self-balancing block");const n=this._nodes.length-t;if(n<0||void 0!==e&&n!==e)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=r.nil,n,i){return this._blockNode(new E(e,t,n)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(E)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){const n=this._currNode;if(n instanceof e||t&&n instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){const t=this._currNode;if(!(t instanceof b))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){const e=this._nodes;return e[e.length-1]}set _currNode(e){const t=this._nodes;t[t.length-1]=e}},t.not=I;const M=D(t.operators.AND);t.and=function(...e){return e.reduce(M)};const L=D(t.operators.OR);function D(e){return(t,n)=>t===r.nil?n:n===r.nil?t:r._`${N(t)} ${e} ${N(n)}`}function N(e){return e instanceof r.Name?e:r._`(${e})`}t.or=function(...e){return e.reduce(L)}},function(e,t,n){"use strict";var r=n(20);t.a={SINGLECLICK:"singleclick",CLICK:r.a.CLICK,DBLCLICK:r.a.DBLCLICK,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"}},function(e,t,n){"use strict";n.d(t,"a",(function(){return D})),n.d(t,"b",(function(){return W})),n.d(t,"c",(function(){return N})),n.d(t,"d",(function(){return F})),n.d(t,"e",(function(){return d})),n.d(t,"f",(function(){return Q})),n.d(t,"g",(function(){return R})),n.d(t,"h",(function(){return j})),n.d(t,"i",(function(){return S})),n.d(t,"j",(function(){return Z})),n.d(t,"k",(function(){return X})),n.d(t,"l",(function(){return K})),n.d(t,"m",(function(){return M})),n.d(t,"n",(function(){return Y})),n.d(t,"o",(function(){return L}));var r="-ms-",i="-moz-",o="-webkit-",a="comm",s="rule",l="decl",u="@keyframes",c=Math.abs,d=String.fromCharCode,f=Object.assign;function p(e){return e.trim()}function h(e,t,n){return e.replace(t,n)}function m(e,t){return e.indexOf(t)}function g(e,t){return 0|e.charCodeAt(t)}function v(e,t,n){return e.slice(t,n)}function y(e){return e.length}function b(e){return e.length}function _(e,t){return t.push(e),e}function w(e,t){return e.map(t).join("")}var x=1,k=1,E=0,S=0,O=0,C="";function T(e,t,n,r,i,o,a){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:x,column:k,length:a,return:""}}function A(e,t){return f(T("",null,null,"",null,null,0),e,{length:-e.length},t)}function P(){return O=S>0?g(C,--S):0,k--,10===O&&(k=1,x--),O}function R(){return O=S2||L(O)>3?"":" "}function z(e,t){for(;--t&&R()&&!(O<48||O>102||O>57&&O<65||O>70&&O<97););return M(e,I()+(t<6&&32==j()&&32==R()))}function U(e,t){for(;R()&&e+O!==57&&(e+O!==84||47!==j()););return"/*"+M(t,S-1)+"*"+d(47===e?e:R())}function q(e){for(;!L(j());)R();return M(e,S)}function W(e){return N(function e(t,n,r,i,o,a,s,l,u){var c=0,f=0,p=s,g=0,v=0,b=0,w=1,x=1,k=1,E=0,S="",O=o,C=a,T=i,A=S;for(;x;)switch(b=E,E=R()){case 40:if(108!=b&&58==A.charCodeAt(p-1)){-1!=m(A+=h(F(E),"&","&\f"),"&\f")&&(k=-1);break}case 34:case 39:case 91:A+=F(E);break;case 9:case 10:case 13:case 32:A+=B(b);break;case 92:A+=z(I()-1,7);continue;case 47:switch(j()){case 42:case 47:_($(U(R(),I()),n,r),u);break;default:A+="/"}break;case 123*w:l[c++]=y(A)*k;case 125*w:case 59:case 0:switch(E){case 0:case 125:x=0;case 59+f:v>0&&y(A)-p&&_(v>32?V(A+";",i,r,p-1):V(h(A," ","")+";",i,r,p-2),u);break;case 59:A+=";";default:if(_(T=H(A,n,r,c,f,o,l,S,O=[],C=[],p),a),123===E)if(0===f)e(A,n,T,T,O,a,p,l,C);else switch(g){case 100:case 109:case 115:e(t,T,T,i&&_(H(t,T,T,0,0,o,l,S,o,O=[],p),C),o,C,p,l,i?O:C);break;default:e(A,T,T,T,[""],C,0,l,C)}}c=f=v=0,w=k=1,S=A="",p=s;break;case 58:p=1+y(A),v=b;default:if(w<1)if(123==E)--w;else if(125==E&&0==w++&&125==P())continue;switch(A+=d(E),E*w){case 38:k=f>0?1:(A+="\f",-1);break;case 44:l[c++]=(y(A)-1)*k,k=1;break;case 64:45===j()&&(A+=F(R())),g=j(),f=p=y(S=A+=q(I())),E++;break;case 45:45===b&&2==y(A)&&(w=0)}}return a}("",null,null,null,[""],e=D(e),0,[0],e))}function H(e,t,n,r,i,o,a,l,u,d,f){for(var m=i-1,g=0===i?o:[""],y=b(g),_=0,w=0,x=0;_0?g[k]+" "+E:h(E,/&\f/g,g[k])))&&(u[x++]=S);return T(e,t,n,0===i?s:l,u,d,f)}function $(e,t,n){return T(e,t,n,a,d(O),v(e,2,-2),0)}function V(e,t,n,r){return T(e,t,n,l,v(e,0,r),v(e,r+1,-1),r)}function G(e,t){switch(function(e,t){return(((t<<2^g(e,0))<<2^g(e,1))<<2^g(e,2))<<2^g(e,3)}(e,t)){case 5103:return o+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return o+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return o+e+i+e+r+e+e;case 6828:case 4268:return o+e+r+e+e;case 6165:return o+e+r+"flex-"+e+e;case 5187:return o+e+h(e,/(\w+).+(:[^]+)/,o+"box-$1$2"+r+"flex-$1$2")+e;case 5443:return o+e+r+"flex-item-"+h(e,/flex-|-self/,"")+e;case 4675:return o+e+r+"flex-line-pack"+h(e,/align-content|flex-|-self/,"")+e;case 5548:return o+e+r+h(e,"shrink","negative")+e;case 5292:return o+e+r+h(e,"basis","preferred-size")+e;case 6060:return o+"box-"+h(e,"-grow","")+o+e+r+h(e,"grow","positive")+e;case 4554:return o+h(e,/([^-])(transform)/g,"$1"+o+"$2")+e;case 6187:return h(h(h(e,/(zoom-|grab)/,o+"$1"),/(image-set)/,o+"$1"),e,"")+e;case 5495:case 3959:return h(e,/(image-set\([^]*)/,o+"$1$`$1");case 4968:return h(h(e,/(.+:)(flex-)?(.*)/,o+"box-pack:$3"+r+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+o+e+e;case 4095:case 3583:case 4068:case 2532:return h(e,/(.+)-inline(.+)/,o+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(y(e)-1-t>6)switch(g(e,t+1)){case 109:if(45!==g(e,t+4))break;case 102:return h(e,/(.+:)(.+)-([^]+)/,"$1"+o+"$2-$3$1"+i+(108==g(e,t+3)?"$3":"$2-$3"))+e;case 115:return~m(e,"stretch")?G(h(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==g(e,t+1))break;case 6444:switch(g(e,y(e)-3-(~m(e,"!important")&&10))){case 107:return h(e,":",":"+o)+e;case 101:return h(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+o+(45===g(e,14)?"inline-":"")+"box$3$1"+o+"$2$3$1"+r+"$2box$3")+e}break;case 5936:switch(g(e,t+11)){case 114:return o+e+r+h(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return o+e+r+h(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return o+e+r+h(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return o+e+r+e+e}return e}function K(e,t){for(var n="",r=b(e),i=0;i-1&&!e.return)switch(e.type){case l:e.return=G(e.value,e.length);break;case u:return K([A(e,{value:h(e.value,"@","@"+o)})],i);case s:if(e.length)return w(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return K([A(e,{props:[h(t,/:(read-\w+)/,":-moz-$1")]})],i);case"::placeholder":return K([A(e,{props:[h(t,/:(plac\w+)/,":"+o+"input-$1")]}),A(e,{props:[h(t,/:(plac\w+)/,":-moz-$1")]}),A(e,{props:[h(t,/:(plac\w+)/,r+"input-$1")]})],i)}return""}))}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return o})),n.d(t,"c",(function(){return a})),n.d(t,"d",(function(){return s}));var r=n(32);function i(){return!0}function o(){return!1}function a(){}function s(e){var t,n,i,o=!1;return function(){var a=Array.prototype.slice.call(arguments);return o&&this===i&&Object(r.b)(a,n)||(o=!0,i=this,n=a,t=e.apply(this,arguments)),t}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r="Invariant failed";function i(e,t){if(!e)throw new Error(r)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"APIError",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"AccessTokenError",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"CMS_BRANCH_PREFIX",{enumerable:!0,get:function(){return v.CMS_BRANCH_PREFIX}}),Object.defineProperty(t,"CURSOR_COMPATIBILITY_SYMBOL",{enumerable:!0,get:function(){return i.CURSOR_COMPATIBILITY_SYMBOL}}),Object.defineProperty(t,"Cursor",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"DEFAULT_PR_BODY",{enumerable:!0,get:function(){return v.DEFAULT_PR_BODY}}),Object.defineProperty(t,"EDITORIAL_WORKFLOW_ERROR",{enumerable:!0,get:function(){return o.EDITORIAL_WORKFLOW_ERROR}}),Object.defineProperty(t,"EditorialWorkflowError",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"MERGE_COMMIT_MESSAGE",{enumerable:!0,get:function(){return v.MERGE_COMMIT_MESSAGE}}),t.NetlifyCmsLibUtil=void 0,Object.defineProperty(t,"PreviewState",{enumerable:!0,get:function(){return g.PreviewState}}),Object.defineProperty(t,"allEntriesByFolder",{enumerable:!0,get:function(){return m.allEntriesByFolder}}),Object.defineProperty(t,"asyncLock",{enumerable:!0,get:function(){return h.asyncLock}}),Object.defineProperty(t,"basename",{enumerable:!0,get:function(){return l.basename}}),Object.defineProperty(t,"blobToFileObj",{enumerable:!0,get:function(){return m.blobToFileObj}}),Object.defineProperty(t,"branchFromContentKey",{enumerable:!0,get:function(){return v.branchFromContentKey}}),Object.defineProperty(t,"contentKeyFromBranch",{enumerable:!0,get:function(){return v.contentKeyFromBranch}}),Object.defineProperty(t,"createPointerFile",{enumerable:!0,get:function(){return y.createPointerFile}}),Object.defineProperty(t,"entriesByFiles",{enumerable:!0,get:function(){return m.entriesByFiles}}),Object.defineProperty(t,"entriesByFolder",{enumerable:!0,get:function(){return m.entriesByFolder}}),Object.defineProperty(t,"fileExtension",{enumerable:!0,get:function(){return l.fileExtension}}),Object.defineProperty(t,"fileExtensionWithSeparator",{enumerable:!0,get:function(){return l.fileExtensionWithSeparator}}),Object.defineProperty(t,"filterByExtension",{enumerable:!0,get:function(){return d.filterByExtension}}),Object.defineProperty(t,"flowAsync",{enumerable:!0,get:function(){return u.flowAsync}}),Object.defineProperty(t,"generateContentKey",{enumerable:!0,get:function(){return v.generateContentKey}}),Object.defineProperty(t,"getAllResponses",{enumerable:!0,get:function(){return d.getAllResponses}}),Object.defineProperty(t,"getBlobSHA",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(t,"getLargeMediaFilteredMediaFiles",{enumerable:!0,get:function(){return y.getLargeMediaFilteredMediaFiles}}),Object.defineProperty(t,"getLargeMediaPatternsFromGitAttributesFile",{enumerable:!0,get:function(){return y.getLargeMediaPatternsFromGitAttributesFile}}),Object.defineProperty(t,"getMediaAsBlob",{enumerable:!0,get:function(){return m.getMediaAsBlob}}),Object.defineProperty(t,"getMediaDisplayURL",{enumerable:!0,get:function(){return m.getMediaDisplayURL}}),Object.defineProperty(t,"getPathDepth",{enumerable:!0,get:function(){return d.getPathDepth}}),Object.defineProperty(t,"getPointerFileForMediaFileObj",{enumerable:!0,get:function(){return y.getPointerFileForMediaFileObj}}),Object.defineProperty(t,"getPreviewStatus",{enumerable:!0,get:function(){return g.getPreviewStatus}}),Object.defineProperty(t,"isAbsolutePath",{enumerable:!0,get:function(){return l.isAbsolutePath}}),Object.defineProperty(t,"isCMSLabel",{enumerable:!0,get:function(){return v.isCMSLabel}}),Object.defineProperty(t,"isPreviewContext",{enumerable:!0,get:function(){return g.isPreviewContext}}),Object.defineProperty(t,"labelToStatus",{enumerable:!0,get:function(){return v.labelToStatus}}),Object.defineProperty(t,"loadScript",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(t,"localForage",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"onlySuccessfulPromises",{enumerable:!0,get:function(){return u.onlySuccessfulPromises}}),Object.defineProperty(t,"parseContentKey",{enumerable:!0,get:function(){return v.parseContentKey}}),Object.defineProperty(t,"parseLinkHeader",{enumerable:!0,get:function(){return d.parseLinkHeader}}),Object.defineProperty(t,"parsePointerFile",{enumerable:!0,get:function(){return y.parsePointerFile}}),Object.defineProperty(t,"parseResponse",{enumerable:!0,get:function(){return d.parseResponse}}),Object.defineProperty(t,"readFile",{enumerable:!0,get:function(){return g.readFile}}),Object.defineProperty(t,"readFileMetadata",{enumerable:!0,get:function(){return g.readFileMetadata}}),Object.defineProperty(t,"requestWithBackoff",{enumerable:!0,get:function(){return g.requestWithBackoff}}),Object.defineProperty(t,"responseParser",{enumerable:!0,get:function(){return d.responseParser}}),Object.defineProperty(t,"runWithLock",{enumerable:!0,get:function(){return m.runWithLock}}),Object.defineProperty(t,"statusToLabel",{enumerable:!0,get:function(){return v.statusToLabel}}),Object.defineProperty(t,"then",{enumerable:!0,get:function(){return u.then}}),Object.defineProperty(t,"throwOnConflictingBranches",{enumerable:!0,get:function(){return g.throwOnConflictingBranches}}),Object.defineProperty(t,"unpublishedEntries",{enumerable:!0,get:function(){return m.unpublishedEntries}}),Object.defineProperty(t,"unsentRequest",{enumerable:!0,get:function(){return c.default}});var r=w(n(399)),i=_(n(948)),o=_(n(949)),a=w(n(950)),s=w(n(951)),l=n(550),u=n(953),c=w(n(404)),d=n(968),f=w(n(992)),p=w(n(569)),h=n(570),m=n(995),g=n(997),v=n(998),y=n(999);function b(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(b=function(e){return e?n:t})(e)}function _(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=b(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}function w(e){return e&&e.__esModule?e:{default:e}}const x={APIError:r.default,Cursor:i.default,CURSOR_COMPATIBILITY_SYMBOL:i.CURSOR_COMPATIBILITY_SYMBOL,EditorialWorkflowError:o.default,EDITORIAL_WORKFLOW_ERROR:o.EDITORIAL_WORKFLOW_ERROR,localForage:s.default,basename:l.basename,fileExtensionWithSeparator:l.fileExtensionWithSeparator,fileExtension:l.fileExtension,onlySuccessfulPromises:u.onlySuccessfulPromises,flowAsync:u.flowAsync,then:u.then,unsentRequest:c.default,filterByExtension:d.filterByExtension,parseLinkHeader:d.parseLinkHeader,parseResponse:d.parseResponse,responseParser:d.responseParser,loadScript:f.default,getBlobSHA:p.default,getPathDepth:d.getPathDepth,entriesByFiles:m.entriesByFiles,entriesByFolder:m.entriesByFolder,unpublishedEntries:m.unpublishedEntries,getMediaDisplayURL:m.getMediaDisplayURL,getMediaAsBlob:m.getMediaAsBlob,readFile:g.readFile,readFileMetadata:g.readFileMetadata,CMS_BRANCH_PREFIX:v.CMS_BRANCH_PREFIX,generateContentKey:v.generateContentKey,isCMSLabel:v.isCMSLabel,labelToStatus:v.labelToStatus,statusToLabel:v.statusToLabel,DEFAULT_PR_BODY:v.DEFAULT_PR_BODY,MERGE_COMMIT_MESSAGE:v.MERGE_COMMIT_MESSAGE,isPreviewContext:g.isPreviewContext,getPreviewStatus:g.getPreviewStatus,runWithLock:m.runWithLock,PreviewState:g.PreviewState,parseContentKey:v.parseContentKey,createPointerFile:y.createPointerFile,getLargeMediaFilteredMediaFiles:y.getLargeMediaFilteredMediaFiles,getLargeMediaPatternsFromGitAttributesFile:y.getLargeMediaPatternsFromGitAttributesFile,parsePointerFile:y.parsePointerFile,getPointerFileForMediaFileObj:y.getPointerFileForMediaFileObj,branchFromContentKey:v.branchFromContentKey,contentKeyFromBranch:v.contentKeyFromBranch,blobToFileObj:m.blobToFileObj,requestWithBackoff:g.requestWithBackoff,allEntriesByFolder:m.allEntriesByFolder,AccessTokenError:a.default,throwOnConflictingBranches:g.throwOnConflictingBranches};t.NetlifyCmsLibUtil=x},function(e,t,n){"use strict";t.a={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"e",(function(){return o})),n.d(t,"c",(function(){return a})),n.d(t,"b",(function(){return s})),n.d(t,"d",(function(){return l}));var r=n(58);function i(e,t,n,i){var o;return o=n&&n.length?n.shift():r.g?new OffscreenCanvas(e||300,t||300):document.createElement("canvas"),e&&(o.width=e),t&&(o.height=t),o.getContext("2d",i)}function o(e,t){var n=t.parentNode;n&&n.replaceChild(e,t)}function a(e){return e&&e.parentNode?e.parentNode.removeChild(e):null}function s(e){for(;e.lastChild;)e.removeChild(e.lastChild)}function l(e,t){for(var n=e.childNodes,r=0;;++r){var i=n[r],o=t[r];if(!i&&!o)break;i!==o&&(i?o?e.insertBefore(o,i):(e.removeChild(i),--r):e.appendChild(o))}}},function(e,t,n){"use strict";t.a={OPACITY:"opacity",VISIBLE:"visible",EXTENT:"extent",Z_INDEX:"zIndex",MAX_RESOLUTION:"maxResolution",MIN_RESOLUTION:"minResolution",MAX_ZOOM:"maxZoom",MIN_ZOOM:"minZoom",SOURCE:"source",MAP:"map"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkStrictMode=t.getErrorPath=t.Type=t.useFunc=t.setEvaluated=t.evaluatedPropsToName=t.mergeEvaluated=t.eachItem=t.unescapeJsonPointer=t.escapeJsonPointer=t.escapeFragment=t.unescapeFragment=t.schemaRefOrVal=t.schemaHasRulesButRef=t.schemaHasRules=t.checkUnknownRules=t.alwaysValidSchema=t.toHash=void 0;const r=n(35),i=n(256);function o(e,t=e.schema){const{opts:n,self:r}=e;if(!n.strictSchema)return;if("boolean"==typeof t)return;const i=r.RULES.keywords;for(const n in t)i[n]||h(e,`unknown keyword: "${n}"`)}function a(e,t){if("boolean"==typeof e)return!e;for(const n in e)if(t[n])return!0;return!1}function s(e){return"number"==typeof e?""+e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function l(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function u({mergeNames:e,mergeToName:t,mergeValues:n,resultToName:i}){return(o,a,s,l)=>{const u=void 0===s?a:s instanceof r.Name?(a instanceof r.Name?e(o,a,s):t(o,a,s),s):a instanceof r.Name?(t(o,s,a),a):n(a,s);return l!==r.Name||u instanceof r.Name?u:i(o,u)}}function c(e,t){if(!0===t)return e.var("props",!0);const n=e.var("props",r._`{}`);return void 0!==t&&d(e,n,t),n}function d(e,t,n){Object.keys(n).forEach(n=>e.assign(r._`${t}${r.getProperty(n)}`,!0))}t.toHash=function(e){const t={};for(const n of e)t[n]=!0;return t},t.alwaysValidSchema=function(e,t){return"boolean"==typeof t?t:0===Object.keys(t).length||(o(e,t),!a(t,e.self.RULES.all))},t.checkUnknownRules=o,t.schemaHasRules=a,t.schemaHasRulesButRef=function(e,t){if("boolean"==typeof e)return!e;for(const n in e)if("$ref"!==n&&t.all[n])return!0;return!1},t.schemaRefOrVal=function({topSchemaRef:e,schemaPath:t},n,i,o){if(!o){if("number"==typeof n||"boolean"==typeof n)return n;if("string"==typeof n)return r._`${n}`}return r._`${e}${t}${r.getProperty(i)}`},t.unescapeFragment=function(e){return l(decodeURIComponent(e))},t.escapeFragment=function(e){return encodeURIComponent(s(e))},t.escapeJsonPointer=s,t.unescapeJsonPointer=l,t.eachItem=function(e,t){if(Array.isArray(e))for(const n of e)t(n);else t(e)},t.mergeEvaluated={props:u({mergeNames:(e,t,n)=>e.if(r._`${n} !== true && ${t} !== undefined`,()=>{e.if(r._`${t} === true`,()=>e.assign(n,!0),()=>e.assign(n,r._`${n} || {}`).code(r._`Object.assign(${n}, ${t})`))}),mergeToName:(e,t,n)=>e.if(r._`${n} !== true`,()=>{!0===t?e.assign(n,!0):(e.assign(n,r._`${n} || {}`),d(e,n,t))}),mergeValues:(e,t)=>!0===e||{...e,...t},resultToName:c}),items:u({mergeNames:(e,t,n)=>e.if(r._`${n} !== true && ${t} !== undefined`,()=>e.assign(n,r._`${t} === true ? true : ${n} > ${t} ? ${n} : ${t}`)),mergeToName:(e,t,n)=>e.if(r._`${n} !== true`,()=>e.assign(n,!0===t||r._`${n} > ${t} ? ${n} : ${t}`)),mergeValues:(e,t)=>!0===e||Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})},t.evaluatedPropsToName=c,t.setEvaluated=d;const f={};var p;function h(e,t,n=e.opts.strictSchema){if(n){if(t="strict mode: "+t,!0===n)throw new Error(t);e.self.logger.warn(t)}}t.useFunc=function(e,t){return e.scopeValue("func",{ref:t,code:f[t.code]||(f[t.code]=new i._Code(t.code))})},function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"}(p=t.Type||(t.Type={})),t.getErrorPath=function(e,t,n){if(e instanceof r.Name){const i=t===p.Num;return n?i?r._`"[" + ${e} + "]"`:r._`"['" + ${e} + "']"`:i?r._`"/" + ${e}`:r._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return n?r.getProperty(e).toString():"/"+s(e)},t.checkStrictMode=h},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(345);function i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Object(r.a)(e,t)}},function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return s})),n.d(t,"d",(function(){return l})),n.d(t,"c",(function(){return u})),n.d(t,"e",(function(){return c})),n.d(t,"g",(function(){return d})),n.d(t,"i",(function(){return f})),n.d(t,"j",(function(){return p})),n.d(t,"f",(function(){return h})),n.d(t,"h",(function(){return m}));n(36);var r=n(38),i=n(58),o=n(23);function a(e){var t=arguments;return function(e){for(var n=!0,r=0,i=t.length;r - * - * Copyright (c) 2014-2017, Jon Schlinkert. - * Released under the MIT License. - */var r=n(1465);function i(e){return!0===r(e)&&"[object Object]"===Object.prototype.toString.call(e)}e.exports=function(e){var t,n;return!1!==i(e)&&("function"==typeof(t=e.constructor)&&(!1!==i(n=t.prototype)&&!1!==n.hasOwnProperty("isPrototypeOf")))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"I18n",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"translate",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"useTranslate",{enumerable:!0,get:function(){return o.default}});var r=a(n(877)),i=a(n(916)),o=a(n(917));function a(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){var r=n(1469);e.exports=function(e){if(t=e,t&&t.window===t)return e;var t;var n=r(e);if(i){n.parentWindow.execScript("document._parentWindow = window;","Javascript");var o=n._parentWindow;return n._parentWindow=null,o}return n.defaultView||n.parentWindow};var i=n(1470)},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r={RADIANS:"radians",DEGREES:"degrees",FEET:"ft",METERS:"m",PIXELS:"pixels",TILE_PIXELS:"tile-pixels",USFEET:"us-ft"};var i={};i[r.RADIANS]=6370997/(2*Math.PI),i[r.DEGREES]=2*Math.PI*6370997/360,i[r.FEET]=.3048,i[r.METERS]=1,i[r.USFEET]=1200/3937,t.b=r},function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){0;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}}(),e.exports=n(795)},function(e,t,n){"use strict";n.d(t,"c",(function(){return r})),n.d(t,"d",(function(){return i})),n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return a})),n.d(t,"f",(function(){return u})),n.d(t,"e",(function(){return c}));var r="ol-hidden",i="ol-unselectable",o="ol-control",a="ol-collapsed",s=new RegExp(["^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)","(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?","(?:small|large)|medium|smaller|larger|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))","(?:\\s*\\/\\s*(normal|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])?))","?\\s*([-,\\\"\\'\\sa-z]+?)\\s*$"].join(""),"i"),l=["style","variant","weight","size","lineHeight","family"],u=function(e){var t=e.match(s);if(!t)return null;for(var n={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"},r=0,i=l.length;r=0||r.match(/cpu (os|iphone os) 15_4 like mac os x/)),-1!==r.indexOf("webkit")&&-1==r.indexOf("edge")),a=-1!==r.indexOf("macintosh"),s="undefined"!=typeof devicePixelRatio?devicePixelRatio:1,l="undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof OffscreenCanvas&&self instanceof WorkerGlobalScope,u="undefined"!=typeof Image&&Image.prototype.decode,c=function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("_",null,t),window.removeEventListener("_",null,t)}catch(e){}return e}()},function(e,t,n){"use strict";function r(e,t,n,r,i){for(var o=void 0!==i?i:[],a=0,s=t;s=0;--r)if(e[r]!=t[r]){n=!1;break}return n}function a(e,t){var n=Math.cos(t),r=Math.sin(t),i=e[0]*n-e[1]*r,o=e[1]*n+e[0]*r;return e[0]=i,e[1]=o,e}function s(e,t){return e[0]*=t,e[1]*=t,e}function l(e,t){var n=e[0]-t[0],r=e[1]-t[1];return n*n+r*r}function u(e,t){if(t.canWrapX()){var n=Object(r.D)(t.getExtent()),i=c(e,t,n);i&&(e[0]-=i*n)}return e}function c(e,t,n){var i=t.getExtent(),o=0;if(t.canWrapX()&&(e[0]i[2])){var a=n||Object(r.D)(i);o=Math.floor((e[0]-i[0])/a)}return o}},function(e,t,n){"use strict";e.exports=function(e){return e<-2}},function(e,t){e.exports=function(){for(var e={},t=0;t0&&e[1]>0}function i(e,t,n){return void 0===n&&(n=[0,0]),n[0]=e[0]*t+.5|0,n[1]=e[1]*t+.5|0,n}function o(e,t){return Array.isArray(e)?e:(void 0===t?t=[e,e]:(t[0]=e,t[1]=e),t)}n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return o}))},function(e,t,n){"use strict";t.a={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16}},function(e,t,n){"use strict";var r=n(150);e.exports=function(e,t,n,i){var o=i?i-1:1/0,a=0;return function(i){if(r(i))return e.enter(n),s(i);return t(i)};function s(i){return r(i)&&a++{const i=P(e,r);return!t.isGitBackend()||"author"!==r||i||n?i:c.COMMIT_AUTHOR}).filter(Boolean);t.isGitBackend()&&!n&&(r=[c.COMMIT_DATE,...r]);return r},t.selectEntryCollectionTitle=function(e,t){const n=e.get("summary");if(n)return(0,h.summaryFormatter)(n,t,e);if(e.get("type")==u.FILES){const n=S(e,t.get("slug"));if(n)return n}const r=t.get("data"),i=P(e,"title"),o=i&&r.getIn(b(i));if(!o&&"title"!==i)return r.getIn(b("title"));return o},t.selectEntryPath=function(e,t){return w[e.get("type")].entryPath(e,t)},t.selectEntrySlug=function(e,t){return w[e.get("type")].entrySlug(e,t)},t.selectField=C,t.selectFields=function(e,t){return w[e.get("type")].fields(e,t)},t.selectFieldsComments=function(e,t){let n=[];if(e.has("folder"))n=e.get("fields").toArray();else if(e.has("files")){const r=e.get("files").find(e=>(null==e?void 0:e.get("name"))===t.get("slug"));n=r.get("fields").toArray()}const r={};return O(n).forEach(t=>{const n=C(e,t);null!=n&&n.has("comment")&&(r[t]=n.get("comment"))}),r},t.selectFieldsWithMediaFolders=E,t.selectFileEntryLabel=S,t.selectFolderEntryExtension=function(e){return w[u.FOLDER].entryExtension(e)},t.selectHasMetaPath=function(e){var t;return e.has("folder")&&e.get("type")===u.FOLDER&&e.has("meta")&&(null===(t=e.get("meta"))||void 0===t?void 0:t.has("path"))},t.selectIdentifier=A,t.selectInferedField=P,t.selectMediaFolders=function(e,t,n){const r=E(t,n.get("slug")).map(r=>(0,p.selectMediaFolder)(e,t,n,r));if(t.has("files")){k(t,n.get("slug"))&&r.unshift((0,p.selectMediaFolder)(e,t,n,void 0))}t.has("media_folder")&&(t=t.delete("files"),r.unshift((0,p.selectMediaFolder)(e,t,n,void 0)));return(0,o.Set)(r).toArray()},t.selectSortDataPath=function(e,t){return t===c.COMMIT_DATE?"updatedOn":t!==c.COMMIT_AUTHOR||C(e,t)?"data."+t:"author"},t.selectSortableFields=function(e,t){return e.get("sortable_fields").toArray().map(n=>{if(n===c.COMMIT_DATE)return{key:n,field:{name:n,label:t("collection.defaultFields.updatedOn.label")}};const r=C(e,n);return n!==c.COMMIT_AUTHOR||r?{key:n,field:null==r?void 0:r.toJS()}:{key:n,field:{name:n,label:t("collection.defaultFields.author.label")}}}).filter(e=>!!e.field).map(e=>v(v({},e.field),{},{key:e.key}))},t.selectTemplateName=function(e,t){return w[e.get("type")].templateName(e,t)},t.selectViewFilters=function(e){return e.get("view_filters").toJS()},t.selectViewGroups=function(e){return e.get("view_groups").toJS()},t.traverseFields=T,t.updateFieldByKey=function(e,t,n){const r=C(e,t);if(!r)return e;let i=!1;return e=e.set("fields",T(e.get("fields",(0,o.List)()),(function(e){const t=e;return t===r?(i=!0,n(t)):t}),()=>i))};var r=m(n(422)),i=m(n(103)),o=n(4),a=n(147),s=m(n(1153)),l=n(220),u=n(257),c=n(604),d=n(605),f=n(409),p=n(126),h=n(319);function m(e){return e&&e.__esModule?e:{default:e}}function g(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){for(var t=1;t(e.get("extension")||(0,i.default)(f.formatExtensions,e.get("format")||"frontmatter")).replace(/^\./,""),fields:e=>e.get("fields"),entryPath(e,t){return`${e.get("folder").replace(/\/$/,"")}/${t}.${this.entryExtension(e)}`},entrySlug(e,t){var n;const i=e.get("folder").replace(/\/$/,"");return null===(n=t.split(i+"/").pop())||void 0===n?void 0:n.replace(new RegExp(`\\.${(0,r.default)(this.entryExtension(e))}$`),"")},allowNewEntries:e=>e.get("create"),allowDeletion:e=>e.get("delete",!0),templateName:e=>e.get("name")},[u.FILES]:{fileForEntry(e,t){const n=e.get("files");return n&&n.filter(e=>(null==e?void 0:e.get("name"))===t).get(0)},fields(e,t){const n=this.fileForEntry(e,t);return n&&n.get("fields")},entryPath(e,t){const n=this.fileForEntry(e,t);return n&&n.get("file")},entrySlug(e,t){const n=e.get("files").filter(e=>(null==e?void 0:e.get("file"))===t).get(0);return n&&n.get("name")},entryLabel(e,t){const n=this.fileForEntry(e,t);return n&&n.get("label")},allowNewEntries:()=>!1,allowDeletion:e=>e.get("delete",!1),templateName:(e,t)=>t}};function x(e){return e.reduce((e,t)=>{if(t.has("media_folder")&&(e=[...e,t]),t.has("fields")){var n;const r=null===(n=t.get("fields"))||void 0===n?void 0:n.toArray();e=[...e,...x(r)]}else if(t.has("field")){const n=t.get("field");e=[...e,...x([n])]}else if(t.has("types")){var r;const n=null===(r=t.get("types"))||void 0===r?void 0:r.toArray();e=[...e,...x(n)]}return e},[])}function k(e,t){var n;return null===(n=e.get("files"))||void 0===n?void 0:n.toArray().find(e=>e.get("name")===t)}function E(e,t){if(e.has("folder")){return x(e.get("fields").toArray())}if(e.has("files")){var n;return x((null===(n=k(e,t))||void 0===n?void 0:n.get("fields").toArray())||[])}return[]}function S(e,t){return w[u.FILES].entryLabel(e,t)}function O(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e.map(e=>`${t}${e.get("name")}`);return e.forEach((e,t)=>{if(e.has("fields")){var r;const i=null===(r=e.get("fields"))||void 0===r?void 0:r.toArray();n=[...n,...O(i,n[t]+".")]}else if(e.has("field")){const r=e.get("field");n=[...n,...O([r],n[t]+".")]}else if(e.has("types")){var i;const r=null===(i=e.get("types"))||void 0===i?void 0:i.toArray();n=[...n,...O(r,n[t]+".")]}}),n}function C(e,t){const n=b(t);let r,i,a=e.get("fields",(0,o.List)()).toArray();for(;(r=n.shift())&&a;){var s,l,u,c,d;if(i=a.find(e=>e.get("name")===r),null!==(s=i)&&void 0!==s&&s.has("fields"))a=null===(c=i)||void 0===c||null===(d=c.get("fields"))||void 0===d?void 0:d.toArray();else if(null!==(l=i)&&void 0!==l&&l.has("field")){var f;a=[null===(f=i)||void 0===f?void 0:f.get("field")]}else if(null!==(u=i)&&void 0!==u&&u.has("types")){var p,h;a=null===(p=i)||void 0===p||null===(h=p.get("types"))||void 0===h?void 0:h.toArray()}}return i}function T(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>!1;return n()?e:e=e.map(e=>{const r=t(e);return n()?r:r.has("fields")?r.set("fields",T(r.get("fields"),t,n)):r.has("field")?r.set("field",T((0,o.List)([r.get("field")]),t,n).get(0)):r.has("types")?r.set("types",T(r.get("types"),t,n)):r}).toList()}function A(e){const t=e.get("identifier_field"),n=t?[t,...d.IDENTIFIER_FIELDS]:[...d.IDENTIFIER_FIELDS],r=O(e.get("fields",(0,o.List)()).toArray());return n.find(e=>r.find(t=>t.toLowerCase().trim()===e.toLowerCase().trim()))}function P(e,t){if("title"===t&&e.get("identifier_field"))return A(e);const n=d.INFERABLE_FIELDS[t],r=e.get("fields");let i;if(!r||!n)return null;const o=r.filter(e=>(null==e?void 0:e.get("widget","string"))===n.type).map(e=>null==e?void 0:e.get("name"));if(i=o.filter(e=>-1!==n.synonyms.indexOf(e)),i&&i.size>0)return i.first();return i=r.filter(e=>-1!==n.secondaryTypes.indexOf(null==e?void 0:e.get("widget","string"))).map(e=>null==e?void 0:e.get("name")).filter(e=>-1!==n.synonyms.indexOf(e)),i&&i.size>0?i.first():n.fallbackToFirstField&&o.size>0?o.first():(n.showError&&(0,s.default)(`The Field ${t} is missing for the collection “${e.get("name")}”`,`Netlify CMS tries to infer the entry ${t} automatically, but one couldn't be found for entries of the collection “${e.get("name")}”. Please check your site configuration.`),null)}var R=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case l.CONFIG_SUCCESS:{const e=t.payload.collections;let n=(0,o.OrderedMap)({});return e.forEach(e=>{n=n.set(e.name,(0,o.fromJS)(e))}),n}default:return e}};t.default=R},function(e,t,n){"use strict";var r=n(207);e.exports=function(e,t,n){var i;null!=n||"object"==typeof t&&!Array.isArray(t)||(n=t,t={});i=r({type:String(e)},t),Array.isArray(n)?i.children=n:null!=n&&(i.value=String(n));return i}},function(e,t,n){"use strict";n.d(t,"b",(function(){return f}));var r,i=n(357),o=n(48),a=n(10),s=n(3),l=n(65),u=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),c=function(e){function t(){var t=e.call(this)||this;return t.layout=o.a.XY,t.stride=2,t.flatCoordinates=null,t}return u(t,e),t.prototype.computeExtent=function(e){return Object(s.n)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e)},t.prototype.getCoordinates=function(){return Object(a.b)()},t.prototype.getFirstCoordinate=function(){return this.flatCoordinates.slice(0,this.stride)},t.prototype.getFlatCoordinates=function(){return this.flatCoordinates},t.prototype.getLastCoordinate=function(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)},t.prototype.getLayout=function(){return this.layout},t.prototype.getSimplifiedGeometry=function(e){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),e<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&e<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;var t=this.getSimplifiedGeometryInternal(e);return t.getFlatCoordinates().length1){throw new i.n(t,"Each pair must have its own sequence indicator")}var s=a.items[0]||new o.e;a.commentBefore&&(s.commentBefore=s.commentBefore?"".concat(a.commentBefore,"\n").concat(s.commentBefore):a.commentBefore),a.comment&&(s.comment=s.comment?"".concat(a.comment,"\n").concat(s.comment):a.comment),a=s}n.items[r]=a instanceof o.e?a:new o.e(a)}}return n}function l(e,t,n){var r=new o.g(e);r.tag="tag:yaml.org,2002:pairs";var a,s=Object(i.g)(t);try{for(s.s();!(a=s.n()).done;){var l=a.value,u=void 0,c=void 0;if(Array.isArray(l)){if(2!==l.length)throw new TypeError("Expected [key, value] tuple: ".concat(l));u=l[0],c=l[1]}else if(l&&l instanceof Object){var d=Object.keys(l);if(1!==d.length)throw new TypeError("Expected { key: value } tuple: ".concat(l));c=l[u=d[0]]}else u=l;var f=e.createPair(u,c,n);r.items.push(f)}}catch(e){s.e(e)}finally{s.f()}return r}var u={default:!1,tag:"tag:yaml.org,2002:pairs",resolve:s,createNode:l},c=function(e){Object(i.q)(n,e);var t=Object(i.r)(n);function n(){var e;return Object(i.j)(this,n),e=t.call(this),Object(i.l)(Object(i.w)(e),"add",o.k.prototype.add.bind(Object(i.w)(e))),Object(i.l)(Object(i.w)(e),"delete",o.k.prototype.delete.bind(Object(i.w)(e))),Object(i.l)(Object(i.w)(e),"get",o.k.prototype.get.bind(Object(i.w)(e))),Object(i.l)(Object(i.w)(e),"has",o.k.prototype.has.bind(Object(i.w)(e))),Object(i.l)(Object(i.w)(e),"set",o.k.prototype.set.bind(Object(i.w)(e))),e.tag=n.tag,e}return Object(i.i)(n,[{key:"toJSON",value:function(e,t){var n=new Map;t&&t.onCreate&&t.onCreate(n);var r,a=Object(i.g)(this.items);try{for(a.s();!(r=a.n()).done;){var s=r.value,l=void 0,u=void 0;if(s instanceof o.e?(l=Object(o.w)(s.key,"",t),u=Object(o.w)(s.value,l,t)):l=Object(o.w)(s,"",t),n.has(l))throw new Error("Ordered maps must not include duplicate keys");n.set(l,u)}}catch(e){a.e(e)}finally{a.f()}return n}}]),n}(o.g);Object(i.l)(c,"tag","tag:yaml.org,2002:omap");var d={identify:function(e){return e instanceof Map},nodeClass:c,default:!1,tag:"tag:yaml.org,2002:omap",resolve:function(e,t){var n,r=s(e,t),a=[],l=Object(i.g)(r.items);try{for(l.s();!(n=l.n()).done;){var u=n.value.key;if(u instanceof o.f){if(a.includes(u.value)){throw new i.n(t,"Ordered maps must not include duplicate keys")}a.push(u.value)}}}catch(e){l.e(e)}finally{l.f()}return Object.assign(new c,r)},createNode:function(e,t,n){var r=l(e,t,n),i=new c;return i.items=r.items,i}},f=function(e){Object(i.q)(n,e);var t=Object(i.r)(n);function n(){var e;return Object(i.j)(this,n),(e=t.call(this)).tag=n.tag,e}return Object(i.i)(n,[{key:"add",value:function(e){var t=e instanceof o.e?e:new o.e(e);Object(o.s)(this.items,t.key)||this.items.push(t)}},{key:"get",value:function(e,t){var n=Object(o.s)(this.items,e);return!t&&n instanceof o.e?n.key instanceof o.f?n.key.value:n.key:n}},{key:"set",value:function(e,t){if("boolean"!=typeof t)throw new Error("Expected boolean value for set(key, value) in a YAML set, not ".concat(Object(i.h)(t)));var n=Object(o.s)(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new o.e(e))}},{key:"toJSON",value:function(e,t){return Object(i.s)(Object(i.t)(n.prototype),"toJSON",this).call(this,e,t,Set)}},{key:"toString",value:function(e,t,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues())return Object(i.s)(Object(i.t)(n.prototype),"toString",this).call(this,e,t,r);throw new Error("Set items must all have null values")}}]),n}(o.k);Object(i.l)(f,"tag","tag:yaml.org,2002:set");var p={identify:function(e){return e instanceof Set},nodeClass:f,default:!1,tag:"tag:yaml.org,2002:set",resolve:function(e,t){var n=Object(o.n)(e,t);if(!n.hasAllNullValues())throw new i.n(t,"Set items must all have null values");return Object.assign(new f,n)},createNode:function(e,t,n){var r,o=new f,a=Object(i.g)(t);try{for(a.s();!(r=a.n()).done;){var s=r.value;o.items.push(e.createPair(s,null,n))}}catch(e){a.e(e)}finally{a.f()}return o}},h=function(e,t){var n=t.split(":").reduce((function(e,t){return 60*e+Number(t)}),0);return"-"===e?-n:n},m=function(e){var t=e.value;if(isNaN(t)||!isFinite(t))return Object(o.r)(t);var n="";t<0&&(n="-",t=Math.abs(t));var r=[t%60];return t<60?r.unshift(0):(t=Math.round((t-r[0])/60),r.unshift(t%60),t>=60&&(t=Math.round((t-r[0])/60),r.unshift(t))),n+r.map((function(e){return e<10?"0"+String(e):String(e)})).join(":").replace(/000000\d*$/,"")},g={identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+)$/,resolve:function(e,t,n){return h(t,n.replace(/_/g,""))},stringify:m},v={identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*)$/,resolve:function(e,t,n){return h(t,n.replace(/_/g,""))},stringify:m},y={identify:function(e){return e instanceof Date},default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^(?:([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?)$"),resolve:function(e,t,n,r,i,o,a,s,l){s&&(s=(s+"00").substr(1,3));var u=Date.UTC(t,n-1,r,i||0,o||0,a||0,s||0);if(l&&"Z"!==l){var c=h(l[0],l.slice(1));Math.abs(c)<30&&(c*=60),u-=6e4*c}return new Date(u)},stringify:function(e){return e.value.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")}};function b(e){var t=void 0!==r&&r.env||{};return e?"undefined"!=typeof YAML_SILENCE_DEPRECATION_WARNINGS?!YAML_SILENCE_DEPRECATION_WARNINGS:!t.YAML_SILENCE_DEPRECATION_WARNINGS:"undefined"!=typeof YAML_SILENCE_WARNINGS?!YAML_SILENCE_WARNINGS:!t.YAML_SILENCE_WARNINGS}function _(e,t){if(b(!1)){var n=void 0!==r&&r.emitWarning;n?n(e,t):console.warn(t?"".concat(t,": ").concat(e):e)}}var w={};function x(e,t){if(!w[e]&&b(!0)){w[e]=!0;var n="The option '".concat(e,"' will be removed in a future release");_(n+=t?", use '".concat(t,"' instead."):".","DeprecationWarning")}}}).call(this,n(196).Buffer,n(97))},function(e,t,n){"use strict"; -/*! - * repeat-string - * - * Copyright (c) 2014-2015, Jon Schlinkert. - * Licensed under the MIT License. - */var r,i="";e.exports=function(e,t){if("string"!=typeof e)throw new TypeError("expected a string");if(1===t)return e;if(2===t)return e+e;var n=e.length*t;if(r!==e||void 0===r)r=e,i="";else if(i.length>=n)return i.substr(0,n);for(;n>i.length&&t>1;)1&t&&(i+=e),t>>=1,e+=e;return i=(i+=e).substr(0,n)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return v})),n.d(t,"c",(function(){return d})),n.d(t,"d",(function(){return m})),n.d(t,"e",(function(){return s})),n.d(t,"f",(function(){return p})),n.d(t,"g",(function(){return c}));var r=n(0),i=n(484),o=(n(11),n(203),n(479),n(159)),a=n(231),s={}.hasOwnProperty,l=Object(r.createContext)("undefined"!=typeof HTMLElement?Object(i.a)({key:"css"}):null);var u=l.Provider,c=function(e){return Object(r.forwardRef)((function(t,n){var i=Object(r.useContext)(l);return e(t,i,n)}))},d=Object(r.createContext)({});var f=r.useInsertionEffect?r.useInsertionEffect:function(e){e()};function p(e){f(e)}var h="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",m=function(e,t){var n={};for(var r in t)s.call(t,r)&&(n[r]=t[r]);return n[h]=e,n},g=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;Object(o.c)(t,n,r);p((function(){return Object(o.b)(t,n,r)}));return null},v=c((function(e,t,n){var i=e.css;"string"==typeof i&&void 0!==t.registered[i]&&(i=t.registered[i]);var l=e[h],u=[i],c="";"string"==typeof e.className?c=Object(o.a)(t.registered,u,e.className):null!=e.className&&(c=e.className+" ");var f=Object(a.a)(u,void 0,Object(r.useContext)(d));c+=t.key+"-"+f.name;var p={};for(var m in e)s.call(e,m)&&"css"!==m&&m!==h&&(p[m]=e[m]);return p.ref=n,p.className=c,Object(r.createElement)(r.Fragment,null,Object(r.createElement)(g,{cache:t,serialized:f,isStringTag:"string"==typeof l}),Object(r.createElement)(l,p))}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r,i=n(87),o=n(36),a=n(28),s=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),l=function(e){function t(t){var n=this,r=t||{};return n=e.call(this,r)||this,r.handleDownEvent&&(n.handleDownEvent=r.handleDownEvent),r.handleDragEvent&&(n.handleDragEvent=r.handleDragEvent),r.handleMoveEvent&&(n.handleMoveEvent=r.handleMoveEvent),r.handleUpEvent&&(n.handleUpEvent=r.handleUpEvent),r.stopDown&&(n.stopDown=r.stopDown),n.handlingDownUpSequence=!1,n.trackedPointers_={},n.targetPointers=[],n}return s(t,e),t.prototype.getPointerCount=function(){return this.targetPointers.length},t.prototype.handleDownEvent=function(e){return!1},t.prototype.handleDragEvent=function(e){},t.prototype.handleEvent=function(e){if(!e.originalEvent)return!0;var t=!1;if(this.updateTrackedPointers_(e),this.handlingDownUpSequence){if(e.type==o.a.POINTERDRAG)this.handleDragEvent(e),e.originalEvent.preventDefault();else if(e.type==o.a.POINTERUP){var n=this.handleUpEvent(e);this.handlingDownUpSequence=n&&this.targetPointers.length>0}}else if(e.type==o.a.POINTERDOWN){var r=this.handleDownEvent(e);this.handlingDownUpSequence=r,t=this.stopDown(r)}else e.type==o.a.POINTERMOVE&&this.handleMoveEvent(e);return!t},t.prototype.handleMoveEvent=function(e){},t.prototype.handleUpEvent=function(e){return!1},t.prototype.stopDown=function(e){return e},t.prototype.updateTrackedPointers_=function(e){if(function(e){var t=e.type;return t===o.a.POINTERDOWN||t===o.a.POINTERDRAG||t===o.a.POINTERUP}(e)){var t=e.originalEvent,n=t.pointerId.toString();e.type==o.a.POINTERUP?delete this.trackedPointers_[n]:(e.type==o.a.POINTERDOWN||n in this.trackedPointers_)&&(this.trackedPointers_[n]=t),this.targetPointers=Object(a.c)(this.trackedPointers_)}},t}(i.a);function u(e){for(var t=e.length,n=0,r=0,i=0;i0;)this.pop()},t.prototype.extend=function(e){for(var t=0,n=e.length;t=0;r--){var i=t[r](e);if(i)return i}return function(t,r){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+r.wrappedComponentName+".")}}function q(e,t){return e===t}function W(e){var t=void 0===e?{}:e,n=t.connectHOC,r=void 0===n?O:n,i=t.mapStateToPropsFactories,o=void 0===i?I:i,a=t.mapDispatchToPropsFactories,s=void 0===a?j:a,l=t.mergePropsFactories,u=void 0===l?L:l,c=t.selectorFactory,d=void 0===c?B:c;return function(e,t,n,i){void 0===i&&(i={});var a=i,l=a.pure,c=void 0===l||l,h=a.areStatesEqual,m=void 0===h?q:h,g=a.areOwnPropsEqual,v=void 0===g?T:g,y=a.areStatePropsEqual,b=void 0===y?T:y,_=a.areMergedPropsEqual,w=void 0===_?T:_,x=Object(p.a)(a,z),k=U(e,o,"mapStateToProps"),E=U(t,s,"mapDispatchToProps"),S=U(n,u,"mergeProps");return r(d,Object(f.a)({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:k,initMapDispatchToProps:E,initMergeProps:S,pure:c,areStatesEqual:m,areOwnPropsEqual:v,areStatePropsEqual:b,areMergedPropsEqual:w},x))}}var H=W();function $(){return Object(r.useContext)(o)}function V(e){void 0===e&&(e=o);var t=e===o?$:function(){return Object(r.useContext)(e)};return function(){return t().store}}var G=V();function K(e){void 0===e&&(e=o);var t=e===o?G:V(e);return function(){return t().dispatch}}var Y=K(),Q=function(e,t){return e===t};function X(e){void 0===e&&(e=o);var t=e===o?$:function(){return Object(r.useContext)(e)};return function(e,n){void 0===n&&(n=Q);var i=t(),o=function(e,t,n,i){var o,a=Object(r.useReducer)((function(e){return e+1}),0)[1],s=Object(r.useMemo)((function(){return u(n,i)}),[n,i]),l=Object(r.useRef)(),d=Object(r.useRef)(),f=Object(r.useRef)(),p=Object(r.useRef)(),h=n.getState();try{if(e!==d.current||h!==f.current||l.current){var m=e(h);o=void 0!==p.current&&t(m,p.current)?p.current:m}else o=p.current}catch(e){throw l.current&&(e.message+="\nThe error may be correlated with this previous error:\n"+l.current.stack+"\n\n"),e}return c((function(){d.current=e,f.current=h,p.current=o,l.current=void 0})),c((function(){function e(){try{var e=n.getState();if(e===f.current)return;var r=d.current(e);if(t(r,p.current))return;p.current=r,f.current=e}catch(e){l.current=e}a()}return s.onStateChange=e,s.trySubscribe(),e(),function(){return s.tryUnsubscribe()}}),[n,s]),o}(e,n,i.store,i.subscription);return Object(r.useDebugValue)(o),o}}var Z,J=X(),ee=n(54);Z=ee.unstable_batchedUpdates,a=Z},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(345);function i(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&&Object(r.a)(e,t)}},function(e,t,n){"use strict";n.d(t,"e",(function(){return o})),n.d(t,"a",(function(){return a})),n.d(t,"f",(function(){return s})),n.d(t,"d",(function(){return l})),n.d(t,"b",(function(){return u})),n.d(t,"c",(function(){return c}));var r=n(13);function i(e,t,n,i,o,a,s){var l,u=e[t],c=e[t+1],d=e[n]-u,f=e[n+1]-c;if(0===d&&0===f)l=t;else{var p=((o-u)*d+(a-c)*f)/(d*d+f*f);if(p>1)l=n;else{if(p>0){for(var h=0;ho&&(o=c),a=l,s=u}return o}function a(e,t,n,r,i){for(var a=0,s=n.length;a=0;f--){var p=a[f];"."===p?o(a,f):".."===p?(o(a,f),d++):d&&(o(a,f),d--)}if(!u)for(;d--;d)a.unshift("..");!u||""===a[0]||a[0]&&i(a[0])||a.unshift("");var h=a.join("/");return n&&"/"!==h.substr(-1)&&(h+="/"),h};function s(e){return e.valueOf?e.valueOf():Object.prototype.valueOf.call(e)}var l=function e(t,n){if(t===n)return!0;if(null==t||null==n)return!1;if(Array.isArray(t))return Array.isArray(n)&&t.length===n.length&&t.every((function(t,r){return e(t,n[r])}));if("object"==typeof t||"object"==typeof n){var r=s(t),i=s(n);return r!==t||i!==n?e(r,i):Object.keys(Object.assign({},t,n)).every((function(r){return e(t[r],n[r])}))}return!1},u=n(39);function c(e){return"/"===e.charAt(0)?e:"/"+e}function d(e){return"/"===e.charAt(0)?e.substr(1):e}function f(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function p(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function h(e){var t=e||"/",n="",r="",i=t.indexOf("#");-1!==i&&(r=t.substr(i),t=t.substr(0,i));var o=t.indexOf("?");return-1!==o&&(n=t.substr(o),t=t.substr(0,o)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}function m(e){var t=e.pathname,n=e.search,r=e.hash,i=t||"/";return n&&"?"!==n&&(i+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(i+="#"===r.charAt(0)?r:"#"+r),i}function g(e,t,n,i){var o;"string"==typeof e?(o=h(e)).state=t:(void 0===(o=Object(r.a)({},e)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==t&&void 0===o.state&&(o.state=t));try{o.pathname=decodeURI(o.pathname)}catch(e){throw e instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):e}return n&&(o.key=n),i?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=a(o.pathname,i.pathname)):o.pathname=i.pathname:o.pathname||(o.pathname="/"),o}function v(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&l(e.state,t.state)}function y(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,i){if(null!=e){var o="function"==typeof e?e(t,n):e;"string"==typeof o?"function"==typeof r?r(o,i):i(!0):i(!1!==o)}else i(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;rt?n.splice(t,n.length-t,r):n.push(r),d({action:"PUSH",location:r,index:t,entries:n})}}))},replace:function(e,t){var r=g(e,t,f(),_.location);c.confirmTransitionTo(r,"REPLACE",n,(function(e){e&&(_.entries[_.index]=r,d({action:"REPLACE",location:r}))}))},go:b,goBack:function(){b(-1)},goForward:function(){b(1)},canGo:function(e){var t=_.index+e;return t>=0&&t<_.entries.length},block:function(e){return void 0===e&&(e=!1),c.setPrompt(e)},listen:function(e){return c.appendListener(e)}};return _}},function(e,t,n){"use strict";(function(r){function i(e){return(i="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})(e)}t.log=function(){var e;return"object"===("undefined"==typeof console?"undefined":i(console))&&console.log&&(e=console).log.apply(e,arguments)},t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;var n="color: "+this.color;t.splice(1,0,n,"color: inherit");var r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(r++,"%c"===e&&(i=r))})),t.splice(i,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){var e;try{e=t.storage.getItem("debug")}catch(e){}!e&&void 0!==r&&"env"in r&&(e=r.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.exports=n(1468)(t),e.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}).call(this,n(97))},function(e,t,n){"use strict";var r=SyntaxError,i=Function,o=TypeError,a=function(e){try{return i('"use strict"; return ('+e+").constructor;")()}catch(e){}},s=Object.getOwnPropertyDescriptor;if(s)try{s({},"")}catch(e){s=null}var l=function(){throw new o},u=s?function(){try{return l}catch(e){try{return s(arguments,"callee").get}catch(e){return l}}}():l,c=n(516)(),d=Object.getPrototypeOf||function(e){return e.__proto__},f={},p="undefined"==typeof Uint8Array?void 0:d(Uint8Array),h={"%AggregateError%":"undefined"==typeof AggregateError?void 0:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?void 0:ArrayBuffer,"%ArrayIteratorPrototype%":c?d([][Symbol.iterator]()):void 0,"%AsyncFromSyncIteratorPrototype%":void 0,"%AsyncFunction%":f,"%AsyncGenerator%":f,"%AsyncGeneratorFunction%":f,"%AsyncIteratorPrototype%":f,"%Atomics%":"undefined"==typeof Atomics?void 0:Atomics,"%BigInt%":"undefined"==typeof BigInt?void 0:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?void 0:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?void 0:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?void 0:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?void 0:FinalizationRegistry,"%Function%":i,"%GeneratorFunction%":f,"%Int8Array%":"undefined"==typeof Int8Array?void 0:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?void 0:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?void 0:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":c?d(d([][Symbol.iterator]())):void 0,"%JSON%":"object"==typeof JSON?JSON:void 0,"%Map%":"undefined"==typeof Map?void 0:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&c?d((new Map)[Symbol.iterator]()):void 0,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?void 0:Promise,"%Proxy%":"undefined"==typeof Proxy?void 0:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?void 0:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?void 0:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&c?d((new Set)[Symbol.iterator]()):void 0,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?void 0:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":c?d(""[Symbol.iterator]()):void 0,"%Symbol%":c?Symbol:void 0,"%SyntaxError%":r,"%ThrowTypeError%":u,"%TypedArray%":p,"%TypeError%":o,"%Uint8Array%":"undefined"==typeof Uint8Array?void 0:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?void 0:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?void 0:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?void 0:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?void 0:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?void 0:WeakSet},m={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},g=n(385),v=n(518),y=g.call(Function.call,Array.prototype.concat),b=g.call(Function.apply,Array.prototype.splice),_=g.call(Function.call,String.prototype.replace),w=g.call(Function.call,String.prototype.slice),x=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,k=/\\(\\)?/g,E=function(e){var t=w(e,0,1),n=w(e,-1);if("%"===t&&"%"!==n)throw new r("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new r("invalid intrinsic syntax, expected opening `%`");var i=[];return _(e,x,(function(e,t,n,r){i[i.length]=n?_(r,k,"$1"):t||e})),i},S=function(e,t){var n,i=e;if(v(m,i)&&(i="%"+(n=m[i])[0]+"%"),v(h,i)){var s=h[i];if(s===f&&(s=function e(t){var n;if("%AsyncFunction%"===t)n=a("async function () {}");else if("%GeneratorFunction%"===t)n=a("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=a("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&(n=d(i.prototype))}return h[t]=n,n}(i)),void 0===s&&!t)throw new o("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:i,value:s}}throw new r("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new o("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new o('"allowMissing" argument must be a boolean');var n=E(e),i=n.length>0?n[0]:"",a=S("%"+i+"%",t),l=a.name,u=a.value,c=!1,d=a.alias;d&&(i=d[0],b(n,y([0,1],d)));for(var f=1,p=!0;f=n.length){var x=s(u,m);u=(p=!!x)&&"get"in x&&!("originalValue"in x.get)?x.get:u[m]}else p=v(u,m),u=u[m];p&&!c&&(h[l]=u)}}return u}},function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var l,u=[],c=!1,d=-1;function f(){c&&l&&(c=!1,l.length?u=l.concat(u):d=-1,u.length&&p())}function p(){if(!c){var e=s(f);c=!0;for(var t=u.length;t;){for(l=u,u=[];++d1)for(var n=1;n=0;r--){var i=e[r];"."===i?e.splice(r,1):".."===i?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}function r(e,t){if(e.filter)return e.filter(t);for(var n=[],r=0;r=-1&&!i;o--){var a=o>=0?arguments[o]:e.cwd();if("string"!=typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(t=a+"/"+t,i="/"===a.charAt(0))}return(i?"/":"")+(t=n(r(t.split("/"),(function(e){return!!e})),!i).join("/"))||"."},t.normalize=function(e){var o=t.isAbsolute(e),a="/"===i(e,-1);return(e=n(r(e.split("/"),(function(e){return!!e})),!o).join("/"))||o||(e="."),e&&a&&(e+="/"),(o?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(r(e,(function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e})).join("/"))},t.relative=function(e,n){function r(e){for(var t=0;t=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=t.resolve(e).substr(1),n=t.resolve(n).substr(1);for(var i=r(e.split("/")),o=r(n.split("/")),a=Math.min(i.length,o.length),s=a,l=0;l=1;--o)if(47===(t=e.charCodeAt(o))){if(!i){r=o;break}}else i=!1;return-1===r?n?"/":".":n&&1===r?"/":e.slice(0,r)},t.basename=function(e,t){var n=function(e){"string"!=typeof e&&(e+="");var t,n=0,r=-1,i=!0;for(t=e.length-1;t>=0;--t)if(47===e.charCodeAt(t)){if(!i){n=t+1;break}}else-1===r&&(i=!1,r=t+1);return-1===r?"":e.slice(n,r)}(e);return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},t.extname=function(e){"string"!=typeof e&&(e+="");for(var t=-1,n=0,r=-1,i=!0,o=0,a=e.length-1;a>=0;--a){var s=e.charCodeAt(a);if(47!==s)-1===r&&(i=!1,r=a+1),46===s?-1===t?t=a:1!==o&&(o=1):-1!==t&&(o=-1);else if(!i){n=a+1;break}}return-1===t||-1===r||0===o||1===o&&t===r-1&&t===n+1?"":e.slice(t,r)};var i="b"==="ab".substr(-1)?function(e,t,n){return e.substr(t,n)}:function(e,t,n){return t<0&&(t=e.length+t),e.substr(t,n)}}).call(this,n(97))},function(e,t,n){"use strict";e.exports=function(e,t){var n,i,o=t.children||[],a=o.length,s=[],l=-1;for(;++l=e.maxResolution)return!1;var r=t.zoom;return r>e.minZoom&&r<=e.maxZoom}t.a=p},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(107);function i(e){return Array.isArray(e)?Object(r.c)(e):e}},function(e,t,n){var r=n(240);e.exports=function(e,t,n){var i=null==e?void 0:r(e,t);return void 0===i?n:i}},function(e,t,n){"use strict";e.exports=function(e){return i.test("number"==typeof e?r(e):e.charAt(0))};var r=String.fromCharCode,i=/\s/},function(e,t,n){"use strict";var r=n(375),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?a:s[e.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var u=Object.defineProperty,c=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(h){var i=p(n);i&&i!==h&&e(t,i,r)}var a=c(n);d&&(a=a.concat(d(n)));for(var s=l(t),m=l(n),g=0;g=1024){var n=0;for(var i in u)0==(3&n++)&&(delete u[i],--c)}t=function(e){var t,n,i,s,u;if(a.exec(e)&&(e=l(e)),o.exec(e)){var c=e.length-1,d=void 0;d=c<=4?1:2;var f=4===c||8===c;t=parseInt(e.substr(1+0*d,d),16),n=parseInt(e.substr(1+1*d,d),16),i=parseInt(e.substr(1+2*d,d),16),s=f?parseInt(e.substr(1+3*d,d),16):255,1==d&&(t=(t<<4)+t,n=(n<<4)+n,i=(i<<4)+i,f&&(s=(s<<4)+s)),u=[t,n,i,s/255]}else 0==e.indexOf("rgba(")?p(u=e.slice(5,-1).split(",").map(Number)):0==e.indexOf("rgb(")?((u=e.slice(4,-1).split(",").map(Number)).push(1),p(u)):Object(r.a)(!1,14);return u}(e),u[e]=t,++c}return t});function f(e){return Array.isArray(e)?e:d(e)}function p(e){return e[0]=Object(i.b)(e[0]+.5|0,0,255),e[1]=Object(i.b)(e[1]+.5|0,0,255),e[2]=Object(i.b)(e[2]+.5|0,0,255),e[3]=Object(i.b)(e[3],0,1),e}function h(e){var t=e[0];t!=(0|t)&&(t=t+.5|0);var n=e[1];n!=(0|n)&&(n=n+.5|0);var r=e[2];return r!=(0|r)&&(r=r+.5|0),"rgba("+t+","+n+","+r+","+(void 0===e[3]?1:Math.round(100*e[3])/100)+")"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.visit=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a,r=void 0,u=Array.isArray(e),c=[e],d=-1,f=[],p=void 0,h=void 0,m=void 0,g=[],v=[],y=e;do{var b=++d===c.length,_=b&&0!==f.length;if(b){if(h=0===v.length?void 0:g[g.length-1],p=m,m=v.pop(),_){if(u)p=p.slice();else{for(var w={},x=0,k=Object.keys(p);x1?n-1:0),i=1;i0&&Array.isArray(r[0])&&(r=r[0]),this.transformers=r.map((function(e){return"function"==typeof e?e():e})),this.tag}return o(e,[{key:"interimTag",value:function(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i0&&void 0!==arguments[0]?arguments[0]:"";return{onEndResult:function(t){if(""===e)return t.trim();if("start"===(e=e.toLowerCase())||"left"===e)return t.replace(/^\s*/,"");if("end"===e||"right"===e)return t.replace(/\s*$/,"");throw new Error("Side not supported: "+e)}}};function c(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:"initial";return{onEndResult:function(t){if("initial"===e){var n=t.match(/^[^\S\n]*(?=\S)/gm),r=n&&Math.min.apply(Math,c(n.map((function(e){return e.length}))));if(r){var i=new RegExp("^.{"+r+"}","gm");return t.replace(i,"")}return t}if("all"===e)return t.replace(/^[^\S\n]+/gm,"");throw new Error("Unknown type: "+e)}}},f=function(e,t){return{onEndResult:function(n){if(null==e||null==t)throw new Error("replaceResultTransformer requires at least 2 arguments.");return n.replace(e,t)}}},p=function(e,t){return{onSubstitution:function(n,r){if(null==e||null==t)throw new Error("replaceSubstitutionTransformer requires at least 2 arguments.");return null==n?n:n.toString().replace(e,t)}}},h=function(e,t){return{onString:function(n){if(null==e||null==t)throw new Error("replaceStringTransformer requires at least 2 arguments.");return n.replace(e,t)}}},m={separator:"",conjunction:"",serial:!1},g=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:m;return{onSubstitution:function(t,n){if(Array.isArray(t)){var r=t.length,i=e.separator,o=e.conjunction,a=e.serial,s=n.match(/(\n?[^\S\n]+)$/);if(t=s?t.join(i+s[1]):t.join(i+" "),o&&r>1){var l=t.lastIndexOf(i);t=t.slice(0,l)+(a?i:"")+" "+o+t.slice(l+1)}}return t}}},v=function(e){return{onSubstitution:function(t,n){if(null==e||"string"!=typeof e)throw new Error("You need to specify a string character to split by.");return"string"==typeof t&&t.includes(e)&&(t=t.split(e)),t}}},y=function(e){return null!=e&&!Number.isNaN(e)&&"boolean"!=typeof e},b=function(){return{onSubstitution:function(e){return Array.isArray(e)?e.filter(y):y(e)?e:""}}},_=new l(g({separator:","}),d,u),w=new l(g({separator:",",conjunction:"and"}),d,u),x=new l(g({separator:",",conjunction:"or"}),d,u),k=new l(v("\n"),b,g,d,u),E=new l(v("\n"),g,d,u,p(/&/g,"&"),p(//g,">"),p(/"/g,"""),p(/'/g,"'"),p(/`/g,"`")),S=new l(f(/(?:\n(?:\s*))+/g," "),u),O=new l(f(/(?:\n\s*)/g,""),u),C=new l(g({separator:","}),f(/(?:\s+)/g," "),u),T=new l(g({separator:",",conjunction:"or"}),f(/(?:\s+)/g," "),u),A=new l(g({separator:",",conjunction:"and"}),f(/(?:\s+)/g," "),u),P=new l(g,d,u),R=new l(g,f(/(?:\s+)/g," "),u),j=new l(d,u),I=new l(d("all"),u)},function(e,t,n){"use strict";var r,i=n(228),o=n(63),a=n(38),s=n(28),l=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),u=function(e){function t(t){var n=e.call(this)||this;return n.eventTarget_=t,n.pendingRemovals_=null,n.dispatching_=null,n.listeners_=null,n}return l(t,e),t.prototype.addEventListener=function(e,t){if(e&&t){var n=this.listeners_||(this.listeners_={}),r=n[e]||(n[e]=[]);-1===r.indexOf(t)&&r.push(t)}},t.prototype.dispatchEvent=function(e){var t="string"==typeof e,n=t?e:e.type,r=this.listeners_&&this.listeners_[n];if(r){var i=t?new o.a(e):e;i.target||(i.target=this.eventTarget_||this);var s,l=this.dispatching_||(this.dispatching_={}),u=this.pendingRemovals_||(this.pendingRemovals_={});n in l||(l[n]=0,u[n]=0),++l[n];for(var c=0,d=r.length;c0)},t.prototype.removeEventListener=function(e,t){var n=this.listeners_&&this.listeners_[e];if(n){var r=n.indexOf(t);-1!==r&&(this.pendingRemovals_&&e in this.pendingRemovals_?(n[r]=a.c,++this.pendingRemovals_[e]):(n.splice(r,1),0===n.length&&delete this.listeners_[e]))}},t}(i.a);t.a=u},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o})),n.d(t,"e",(function(){return a})),n.d(t,"c",(function(){return l})),n.d(t,"d",(function(){return u}));var r=n(13);function i(e,t,n,i,o,a,s){var l=(n-t)/i;if(l<3){for(;t0;){for(var f=c.pop(),p=c.pop(),h=0,m=e[p],g=e[p+1],v=e[f],y=e[f+1],b=p+i;bh&&(d=b,h=x)}h>o&&(u[(d-t)/i]=1,p+i0&&g>h)&&(m<0&&v0&&v>m)?(l=f,u=p):(o[s++]=l,o[s++]=u,c=l,d=u,l=f,u=p)}}return o[s++]=l,o[s++]=u,s}function l(e,t,n,r,i,o,a,l){for(var u=0,c=n.length;uo&&(u-s)*(o-l)-(i-s)*(c-l)>0&&a++:c<=o&&(u-s)*(o-l)-(i-s)*(c-l)<0&&a--,s=u,l=c}return 0!==a}function a(e,t,n,r,i,a){if(0===n.length)return!1;if(!o(e,t,n[0],r,i,a))return!1;for(var s=1,l=n.length;s-1!==t.indexOf(e.collection)).map(t=>s.selectEntry(e.entries,t.collection,t.slug))},t.selectUnpublishedEntriesByStatus=function(e,t){return u.selectUnpublishedEntriesByStatus(e.editorialWorkflow,t)},t.selectUnpublishedEntry=function(e,t,n){return u.selectUnpublishedEntry(e.editorialWorkflow,t,n)},t.selectUnpublishedSlugs=function(e,t){return u.selectUnpublishedSlugs(e.editorialWorkflow,t)};var r=n(4),i=_(n(935)),o=_(n(420)),a=b(n(430)),s=b(n(126)),l=_(n(426)),u=b(n(1173)),c=_(n(428)),d=_(n(71)),f=_(n(1174)),p=_(n(322)),h=_(n(321)),m=b(n(1175)),g=_(n(1176)),v=_(n(1177));function y(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(y=function(e){return e?n:t})(e)}function b(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=y(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}function _(e){return e&&e.__esModule?e:{default:e}}var w={auth:i.default,config:o.default,collections:d.default,search:f.default,integrations:a.default,entries:s.default,cursors:l.default,editorialWorkflow:u.default,entryDraft:c.default,medias:p.default,mediaLibrary:h.default,deploys:m.default,globalUI:g.default,status:v.default};t.default=w},function(e,t,n){var r=n(192),i=n(542),o=n(299),a=n(544),s=n(545),l=n(300),u=n(133);e.exports=function(e,t,n){if((e=u(e))&&(n||void 0===t))return i(e);if(!e||!(t=r(t)))return e;var c=l(e),d=l(t),f=s(c,d),p=a(c,d)+1;return o(c,f,p).join("")}},function(e,t,n){var r=n(192),i=n(299),o=n(545),a=n(300),s=n(133),l=/^\s+/;e.exports=function(e,t,n){if((e=s(e))&&(n||void 0===t))return e.replace(l,"");if(!e||!(t=r(t)))return e;var u=a(e),c=o(u,a(t));return i(u,c).join("")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.statusDescriptions=t.status=t.Statues=t.SIMPLE=t.EDITORIAL_WORKFLOW=void 0;var r=n(4);t.SIMPLE="simple";t.EDITORIAL_WORKFLOW="editorial_workflow";const i={DRAFT:"draft",PENDING_REVIEW:"pending_review",PENDING_PUBLISH:"pending_publish"};t.Statues=i;const o=(0,r.OrderedMap)(i);t.status=o;const a=(0,r.Map)({[o.get("DRAFT")]:"Draft",[o.get("PENDING_REVIEW")]:"Waiting for Review",[o.get("PENDING_PUBLISH")]:"Waiting to go live"});t.statusDescriptions=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateUnion=t.validateArray=t.usePattern=t.callValidateCode=t.schemaProperties=t.allSchemaProperties=t.noPropertyInData=t.propertyInData=t.isOwnProperty=t.hasPropFunc=t.reportMissingProp=t.checkMissingProp=t.checkReportMissingProp=void 0;const r=n(35),i=n(44),o=n(148);function a(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:r._`Object.prototype.hasOwnProperty`})}function s(e,t,n){return r._`${a(e)}.call(${t}, ${n})`}function l(e,t,n,i){const o=r._`${t}${r.getProperty(n)} === undefined`;return i?r.or(o,r.not(s(e,t,n))):o}function u(e){return e?Object.keys(e).filter(e=>"__proto__"!==e):[]}t.checkReportMissingProp=function(e,t){const{gen:n,data:i,it:o}=e;n.if(l(n,i,t,o.opts.ownProperties),()=>{e.setParams({missingProperty:r._`${t}`},!0),e.error()})},t.checkMissingProp=function({gen:e,data:t,it:{opts:n}},i,o){return r.or(...i.map(i=>r.and(l(e,t,i,n.ownProperties),r._`${o} = ${i}`)))},t.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},t.hasPropFunc=a,t.isOwnProperty=s,t.propertyInData=function(e,t,n,i){const o=r._`${t}${r.getProperty(n)} !== undefined`;return i?r._`${o} && ${s(e,t,n)}`:o},t.noPropertyInData=l,t.allSchemaProperties=u,t.schemaProperties=function(e,t){return u(t).filter(n=>!i.alwaysValidSchema(e,t[n]))},t.callValidateCode=function({schemaCode:e,data:t,it:{gen:n,topSchemaRef:i,schemaPath:a,errorPath:s},it:l},u,c,d){const f=d?r._`${e}, ${t}, ${i}${a}`:t,p=[[o.default.instancePath,r.strConcat(o.default.instancePath,s)],[o.default.parentData,l.parentData],[o.default.parentDataProperty,l.parentDataProperty],[o.default.rootData,o.default.rootData]];l.opts.dynamicRef&&p.push([o.default.dynamicAnchors,o.default.dynamicAnchors]);const h=r._`${f}, ${n.object(...p)}`;return c!==r.nil?r._`${u}.call(${c}, ${h})`:r._`${u}(${h})`},t.usePattern=function({gen:e,it:{opts:t}},n){const i=t.unicodeRegExp?"u":"";return e.scopeValue("pattern",{key:n,ref:new RegExp(n,i),code:r._`new RegExp(${n}, ${i})`})},t.validateArray=function(e){const{gen:t,data:n,keyword:o,it:a}=e,s=t.name("valid");if(a.allErrors){const e=t.let("valid",!0);return l(()=>t.assign(e,!1)),e}return t.var(s,!0),l(()=>t.break()),s;function l(a){const l=t.const("len",r._`${n}.length`);t.forRange("i",0,l,n=>{e.subschema({keyword:o,dataProp:n,dataPropType:i.Type.Num},s),t.if(r.not(s),a)})}},t.validateUnion=function(e){const{gen:t,schema:n,keyword:o,it:a}=e;if(!Array.isArray(n))throw new Error("ajv implementation error");if(n.some(e=>i.alwaysValidSchema(a,e))&&!a.opts.unevaluated)return;const s=t.let("valid",!1),l=t.name("_valid");t.block(()=>n.forEach((n,i)=>{const a=e.subschema({keyword:o,schemaProp:i,compositeRule:!0},l);t.assign(s,r._`${s} || ${l}`);e.mergeValidEvaluated(a,l)||t.if(r.not(s))})),e.result(s,()=>e.reset(),()=>e.error(!0))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.selectEditingDraft=function(e){const t=e.get("entry");return t&&!t.isEmpty()},t.selectEntries=function(e,t){const n=t.get("name");let r=W(e,n);const o=B(e,n);if(o&&o.length>0){const e=o.map(e=>(0,m.selectSortDataPath)(t,e.get("key"))),n=o.map(e=>e.get("direction")===p.SortDirection.Ascending?"asc":"desc");r=(0,u.fromJS)((0,i.default)(r.toJS(),e,n))}const a=z(e,n);a&&a.length>0&&(r=r.filter(e=>a.every(t=>{const n=t.get("pattern"),r=t.get("field"),i=(e.get("data")||(0,u.Map)()).getIn(E(r));return void 0!==i&&new RegExp(String(n)).test(String(i))})).toList());return r},t.selectEntriesFilter=D,t.selectEntriesFilterFields=z,t.selectEntriesGroup=N,t.selectEntriesGroupField=F,t.selectEntriesLoaded=function(e,t){return!!e.getIn(["pages",t])},t.selectEntriesSort=L,t.selectEntriesSortFields=B,t.selectEntry=U,t.selectEntryByPath=function(e,t,n){const r=q(e,t),i=r&&r.map(n=>U(e,t,n));return i&&i.find(e=>(null==e?void 0:e.get("path"))===n)},t.selectGroups=function(e,t){const n=t.get("name"),i=W(e,n),o=F(e,n);if(void 0===o)return[];let a={};const s=(0,r.default)(i.toArray(),e=>{const t=function(e,t){const n=t.get("label"),r=t.get("field"),i=e.getIn(["data",...E(r)]);if(void 0===i)return{id:"missing_value",label:n,value:i};const o=String(i);if(t.has("pattern")){const e=t.get("pattern");let i="";try{const t=new RegExp(e),n=o.match(t);n&&(i=n[0])}catch(t){console.warn(`Invalid view group pattern '${e}' for field '${r}'`,t)}return{id:`${n}${i}`,label:n,value:i}}return{id:`${n}${i}`,label:n,value:"boolean"==typeof i?i:o}}(e,o);return a=x(x({},a),{},{[t.id]:t}),t.id});return Object.entries(s).map(e=>{let[t,n]=e;return x(x({},a[t]),{},{paths:(0,u.Set)(n.map(e=>e.get("path")))})})},t.selectIsFetching=function(e,t){return e.getIn(["pages",t,"isFetching"],!1)},t.selectMediaFilePath=function(e,t,n,r,i){if((0,d.isAbsolutePath)(r))return r;const o=K(e,t,n,i);return(0,c.join)(o,(0,d.basename)(r))},t.selectMediaFilePublicPath=function(e,t,n,r,i){if((0,d.isAbsolutePath)(n))return n;const o="public_folder";let a=e[o];$(o,t,null==r?void 0:r.get("slug"),i)&&(a=G(o,e,t,r,i));if((0,d.isAbsolutePath)(a))return(0,b.joinUrlPath)(a,(0,d.basename)(n));return(0,c.join)(a,(0,d.basename)(n))},t.selectMediaFolder=K,t.selectPublishedSlugs=q,t.selectViewStyle=function(e){return e.get("viewStyle")};var r=_(n(603)),i=_(n(606)),o=_(n(389)),a=_(n(297)),s=_(n(318)),l=_(n(122)),u=n(4),c=n(98),d=n(40),f=n(147),p=n(423),h=n(319),m=n(71),g=n(320),v=n(149),y=n(429),b=n(170);function _(e){return e&&e.__esModule?e:{default:e}}function w(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 x(e){for(var t=1;t{const e=localStorage.getItem("netlify-cms.entries.sort");if(e)try{const t=JSON.parse(e);let n=(0,u.Map)();return Object.entries(t).forEach(e=>{let[t,r]=e,i=(0,u.OrderedMap)();(0,a.default)(Object.values(r),["index"]).forEach(e=>{const{key:t,direction:n}=e;i=i.set(t,(0,u.fromJS)({key:t,direction:n}))}),n=n.set(t,i)}),n}catch(e){return(0,u.Map)()}return(0,u.Map)()});function j(e){if(e){const t={};e.keySeq().forEach(n=>{const r=n;e.get(r).valueSeq().toJS().map((e,t)=>x(x({},e),{},{index:t})).forEach(e=>{(0,o.default)(t,[r,e.key],e)})}),localStorage.setItem("netlify-cms.entries.sort",JSON.stringify(t))}else localStorage.removeItem("netlify-cms.entries.sort")}const I=(0,s.default)(()=>{const e=localStorage.getItem(P);return e||(localStorage.setItem(P,y.VIEW_STYLE_LIST),y.VIEW_STYLE_LIST)});function M(e){e?localStorage.setItem(P,e):localStorage.removeItem(P)}function L(e,t){const n=e.get("sort");return null==n?void 0:n.get(t)}function D(e,t){const n=e.get("filter");return(null==n?void 0:n.get(t))||(0,u.Map)()}function N(e,t){const n=e.get("group");return(null==n?void 0:n.get(t))||(0,u.Map)()}function F(e,t){const n=N(e,t);return null==n?void 0:n.valueSeq().find(e=>!0===(null==e?void 0:e.get("active")))}function B(e,t){const n=L(e,t);return(null==n?void 0:n.valueSeq().filter(e=>(null==e?void 0:e.get("direction"))!==p.SortDirection.None).toArray())||[]}function z(e,t){const n=D(e,t);return(null==n?void 0:n.valueSeq().filter(e=>!0===(null==e?void 0:e.get("active"))).toArray())||[]}function U(e,t,n){return e.getIn(["entities",`${t}.${n}`])}function q(e,t){return e.getIn(["pages",t,"ids"],(0,u.List)())}function W(e,t){const n=q(e,t);return n&&n.map(n=>U(e,t,n))}function H(e,t){return e.find(e=>(null==e?void 0:e.get("name"))===t)}function $(e,t,n,r){if(!t)return!1;if(r&&r.has(e))return!0;if(t.has("files")){const r=H(t.get("files"),n);if(r&&r.has(e))return!0}return!!t.has(e)}function V(e,t,n,r,i,o,a){const s=o.filter(e=>e===i)[0];if(s)return(0,h.folderFormatter)(s.has(e)?s.get(e):`{{${e}}}`,r,n,a,e,t.slug);for(let s of o){s.has(e)||(s=s.set(e,`{{${e}}}`));const o=(0,h.folderFormatter)(s.get(e),r,n,a,e,t.slug);let l=null;if(s.has("fields")?l=V(e,t,n,r,i,s.get("fields").toArray(),o):s.has("field")?l=V(e,t,n,r,i,[s.get("field")],o):s.has("types")&&(l=V(e,t,n,r,i,s.get("types").toArray(),o)),null!=l)return l}return null}function G(e,t,n,r,i){let o=t[e];if(n.has(e)||(n=n.set(e,`{{${e}}}`)),n.has("files")){o=(0,h.folderFormatter)(n.get(e),r,n,o,e,t.slug);let a=H(n.get("files"),null==r?void 0:r.get("slug"));if(a&&(a.has(e)||(a=a.set(e,`{{${e}}}`)),o=(0,h.folderFormatter)(a.get(e),r,n,o,e,t.slug),i)){const s=V(e,t,n,r,i,a.get("fields").toArray(),o);null!==s&&(o=s)}}else if(o=(0,h.folderFormatter)(n.get(e),r,n,o,e,t.slug),i){const a=V(e,t,n,r,i,n.get("fields").toArray(),o);null!==a&&(o=a)}return o}function K(e,t,n,r){const i="media_folder";let o=e[i];if($(i,t,null==n?void 0:n.get("slug"),r)){const a=G(i,e,t,n,r);if(a.startsWith("/"))o=(0,c.join)(a);else{const e=null==n?void 0:n.get("path");o=e?(0,c.join)((0,c.dirname)(e),a):(0,c.join)(t.get("folder"),"DRAFT_MEDIA_FILES")}}return(0,l.default)(o,"/")}var Y=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,u.Map)({entities:(0,u.Map)(),pages:(0,u.Map)(),sort:R(),viewStyle:I()}),t=arguments.length>1?arguments[1]:void 0;switch(t.type){case v.ENTRY_REQUEST:{const n=t.payload;return e.setIn(["entities",`${n.collection}.${n.slug}`,"isFetching"],!0)}case v.ENTRY_SUCCESS:{const n=t.payload;return S=n.collection,A=n.entry.slug,e.withMutations(e=>{e.setIn(["entities",`${S}.${A}`],(0,u.fromJS)(n.entry));const t=e.getIn(["pages",S,"ids"],(0,u.List)());t.includes(A)||e.setIn(["pages",S,"ids"],t.unshift(A))})}case v.ENTRIES_REQUEST:{const n=t.payload;return e.withMutations(e=>{e.setIn(["pages",n.collection,"isFetching"],!0)})}case v.ENTRIES_SUCCESS:{const n=t.payload;return S=n.collection,O=n.entries,C=n.append,T=n.page,e.withMutations(e=>{O.forEach(t=>e.setIn(["entities",`${S}.${t.slug}`],(0,u.fromJS)(t).set("isFetching",!1)));const t=(0,u.List)(O.map(e=>e.slug));e.setIn(["pages",S],(0,u.Map)({page:T,ids:C?e.getIn(["pages",S,"ids"],(0,u.List)()).concat(t):t}))})}case v.ENTRIES_FAILURE:return e.setIn(["pages",t.meta.collection,"isFetching"],!1);case v.ENTRY_FAILURE:{const n=t.payload;return e.withMutations(e=>{e.setIn(["entities",`${n.collection}.${n.slug}`,"isFetching"],!1),e.setIn(["entities",`${n.collection}.${n.slug}`,"error"],n.error.message)})}case g.SEARCH_ENTRIES_SUCCESS:{const n=t.payload;return O=n.entries,e.withMutations(e=>{O.forEach(t=>e.setIn(["entities",`${t.collection}.${t.slug}`],(0,u.fromJS)(t).set("isFetching",!1)))})}case v.ENTRY_DELETE_SUCCESS:{const n=t.payload;return e.withMutations(e=>{e.deleteIn(["entities",`${n.collectionName}.${n.entrySlug}`]),e.updateIn(["pages",n.collectionName,"ids"],e=>e.filter(e=>e!==n.entrySlug))})}case v.SORT_ENTRIES_REQUEST:{const n=t.payload,{collection:r,key:i,direction:o}=n,a=e.withMutations(e=>{const t=(0,u.OrderedMap)({[i]:(0,u.Map)({key:i,direction:o})});e.setIn(["sort",r],t),e.setIn(["pages",r,"isFetching"],!0),e.deleteIn(["pages",r,"page"])});return j(a.get("sort")),a}case v.GROUP_ENTRIES_SUCCESS:case v.FILTER_ENTRIES_SUCCESS:case v.SORT_ENTRIES_SUCCESS:{const n=t.payload,{collection:r,entries:i}=n;O=i;return e.withMutations(e=>{O.forEach(t=>e.setIn(["entities",`${t.collection}.${t.slug}`],(0,u.fromJS)(t).set("isFetching",!1))),e.setIn(["pages",r,"isFetching"],!1);const t=(0,u.List)(O.map(e=>e.slug));e.setIn(["pages",r],(0,u.Map)({page:1,ids:t}))})}case v.SORT_ENTRIES_FAILURE:{const n=t.payload,{collection:r,key:i}=n,o=e.withMutations(e=>{e.deleteIn(["sort",r,i]),e.setIn(["pages",r,"isFetching"],!1)});return j(o.get("sort")),o}case v.FILTER_ENTRIES_REQUEST:{const n=t.payload,{collection:r,filter:i}=n;return e.withMutations(e=>{const t=e.getIn(["filter",r,i.id],(0,u.fromJS)(i));e.setIn(["filter",r,t.get("id")],t.set("active",!t.get("active")))})}case v.FILTER_ENTRIES_FAILURE:{const n=t.payload,{collection:r,filter:i}=n;return e.withMutations(e=>{e.deleteIn(["filter",r,i.id]),e.setIn(["pages",r,"isFetching"],!1)})}case v.GROUP_ENTRIES_REQUEST:{const n=t.payload,{collection:r,group:i}=n;return e.withMutations(e=>{const t=e.getIn(["group",r,i.id],(0,u.fromJS)(i));e.deleteIn(["group",r]),e.setIn(["group",r,t.get("id")],t.set("active",!t.get("active")))})}case v.GROUP_ENTRIES_FAILURE:{const n=t.payload,{collection:r,group:i}=n;return e.withMutations(e=>{e.deleteIn(["group",r,i.id]),e.setIn(["pages",r,"isFetching"],!1)})}case v.CHANGE_VIEW_STYLE:{const n=t.payload,{style:r}=n,i=e.withMutations(e=>{e.setIn(["viewStyle"],r)});return M(i.get("viewStyle")),i}default:return e}};t.default=Y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});for(var r="undefined"!=typeof window&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),i={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},o={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:r?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},a={backspace:8,tab:9,enter:13,shift:16,control:17,alt:18,pause:19,capslock:20,escape:27," ":32,pageup:33,pagedown:34,end:35,home:36,arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,insert:45,delete:46,meta:91,numlock:144,scrolllock:145,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},s=1;s<20;s++)a["f"+s]=111+s;function l(e,t,n){t&&!("byKey"in t)&&(n=t,t=null),Array.isArray(e)||(e=[e]);var r=e.map((function(e){return u(e,t)})),i=function(e){return r.some((function(t){return c(t,e)}))};return null==n?i:i(n)}function u(e,t){var n=t&&t.byKey,r={},s=(e=e.replace("++","+add")).split("+"),l=s.length;for(var u in i)r[i[u]]=!1;var c=!0,p=!1,h=void 0;try{for(var m,g=s[Symbol.iterator]();!(c=(m=g.next()).done);c=!0){var v=m.value,y=v.endsWith("?")&&v.length>1;y&&(v=v.slice(0,-1));var b=f(v),_=i[b];if(v.length>1&&!_&&!o[v]&&!a[b])throw new TypeError('Unknown modifier: "'+v+'"');1!==l&&_||(n?r.key=b:r.which=d(v)),_&&(r[_]=!y||null)}}catch(e){p=!0,h=e}finally{try{!c&&g.return&&g.return()}finally{if(p)throw h}}return r}function c(e,t){for(var n in e){var r=e[n],i=void 0;if(null!=r&&((null!=(i="key"===n&&null!=t.key?t.key.toLowerCase():"which"===n?91===r&&93===t.which?91:t.which:t[n])||!1!==r)&&i!==r))return!1}return!0}function d(e){return e=f(e),a[e]||e.toUpperCase().charCodeAt(0)}function f(e){return e=e.toLowerCase(),e=o[e]||e}t.default=l,t.isHotkey=l,t.isCodeHotkey=function(e,t){return l(e,t)},t.isKeyHotkey=function(e,t){return l(e,{byKey:!0},t)},t.parseHotkey=u,t.compareHotkey=c,t.toKeyCode=d,t.toKeyName=f},function(e,t,n){"use strict";function r(e){if("string"==typeof e)return function(e){return function(t){return i(t)&&t.tagName===e}}(e);if(null==e)return i;if("object"==typeof e)return t=function(e){for(var t=e.length,n=-1,i=[];++n=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}},function(e,t,n){"use strict";var r,i=n(8),o=n(73),a=n(3),s=n(85),l=n(13),u=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),c=function(e){function t(t,n){var r=e.call(this)||this;return r.setCoordinates(t,n),r}return u(t,e),t.prototype.clone=function(){var e=new t(this.flatCoordinates.slice(),this.layout);return e.applyProperties(this),e},t.prototype.closestPointXY=function(e,t,n,r){var i=this.flatCoordinates,o=Object(l.i)(e,t,i[0],i[1]);if(oa(a({},e),{},{border:0,boxShadow:"none",padding:"9px 0 9px 12px"}),option:(e,t)=>a(a({},e),{},{backgroundColor:t.isSelected?""+c.active:t.isFocused?""+c.activeBackground:"transparent",paddingLeft:"22px"}),menu:e=>a(a({},e),{},{right:0,zIndex:S.zIndex300}),container:e=>a(a({},e),{},{padding:"0 !important"}),indicatorSeparator:(e,t)=>t.hasValue&&t.selectProps.isClearable?a(a({},e),{},{backgroundColor:""+c.textFieldBorder}):{display:"none"},dropdownIndicator:e=>a(a({},e),{},{color:""+c.controlLabel}),clearIndicator:e=>a(a({},e),{},{color:""+c.controlLabel}),multiValue:e=>a(a({},e),{},{backgroundColor:c.background}),multiValueLabel:e=>a(a({},e),{},{color:c.textLead,fontWeight:500}),multiValueRemove:e=>a(a({},e),{},{color:c.controlLabel,":hover":{color:c.errorText,backgroundColor:c.errorBackground}})};t.reactSelectStyles=E;const S={zIndex0:0,zIndex1:1,zIndex2:2,zIndex10:10,zIndex100:100,zIndex200:200,zIndex299:299,zIndex300:300,zIndex1000:1e3,zIndex10000:1e4,zIndex99999:99999};t.zIndex=S},function(e,t,n){var r=n(192);e.exports=function(e){return null==e?"":r(e)}},function(e,t,n){var r=n(967);e.exports=function(e){var t=r(e),n=t%1;return t==t?n?t-n:t:0}},function(e,t,n){var r=n(378),i=n(212),o=n(237),a=n(49),s=n(162),l=n(238),u=n(286),c=n(284),d=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(s(e)&&(a(e)||"string"==typeof e||"function"==typeof e.splice||l(e)||c(e)||o(e)))return!e.length;var t=i(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(u(e))return!r(e).length;for(var n in e)if(d.call(e,n))return!1;return!0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.getBackend=j,t.getEditorComponents=O,t.getEventListeners=D,t.getLocale=U,t.getMediaLibrary=M,t.getPreviewStyles=y,t.getPreviewTemplate=_,t.getRemarkPlugins=T,t.getWidget=x,t.getWidgetValueSerializer=P,t.getWidgets=k,t.invokeEvent=F,t.registerBackend=R,t.registerEditorComponent=S,t.registerEventListener=N,t.registerLocale=z,t.registerMediaLibrary=I,t.registerPreviewStyle=v,t.registerPreviewTemplate=b,t.registerRemarkPlugin=C,t.registerWidget=w,t.registerWidgetValueSerializer=A,t.removeEventListener=B,t.resolveWidget=E;var r=n(4),i=l(n(144)),o=n(111),a=l(n(1149));const s=["name","controlComponent","previewComponent","schema","allowMapValue","globalStyles"];function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function c(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 d(e){for(var t=1;t{h[e]=[]});const m={backends:{},templates:{},previewStyles:[],widgets:{},editorComponents:(0,r.Map)(),remarkPlugins:[],widgetValueSerializers:{},mediaLibraries:[],locales:{},eventHandlers:h};var g={registerPreviewStyle:v,getPreviewStyles:y,registerPreviewTemplate:b,getPreviewTemplate:_,registerWidget:w,getWidget:x,getWidgets:k,resolveWidget:E,registerEditorComponent:S,getEditorComponents:O,registerRemarkPlugin:C,getRemarkPlugins:T,registerWidgetValueSerializer:A,getWidgetValueSerializer:P,registerBackend:R,getBackend:j,registerMediaLibrary:I,getMediaLibrary:M,registerLocale:z,getLocale:U,registerEventListener:N,removeEventListener:B,getEventListeners:D,invokeEvent:F};function v(e,t){m.previewStyles.push(d(d({},t),{},{value:e}))}function y(){return m.previewStyles}function b(e,t){m.templates[e]=t}function _(e){return m.templates[e]}function w(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(Array.isArray(e))e.forEach(e=>{"object"!=typeof e?console.error("Cannot register widget: "+e):w(e)});else if("string"==typeof e){const i="string"==typeof t?m.widgets[t].control:t;m.widgets[e]={control:i,preview:n,schema:r}}else if("object"==typeof e){const{name:t,controlComponent:n,previewComponent:r,schema:i={},allowMapValue:a,globalStyles:l}=e,c=u(e,s);if(m.widgets[t]&&console.warn(o.oneLine` - Multiple widgets registered with name "${t}". Only the last widget registered with - this name will be used. - `),!n)throw Error(`Widget "${t}" registered without \`controlComponent\`.`);m.widgets[t]=d({control:n,preview:r,schema:i,globalStyles:l,allowMapValue:a},c)}else console.error("`registerWidget` failed, called with incorrect arguments.")}function x(e){return m.widgets[e]}function k(){return(0,i.default)(Object.entries(m.widgets),e=>e.map(e=>{let[t,n]=e;return d({name:t},n)}))}function E(e){return x(e||"string")||x("unknown")}function S(e){const t=(0,a.default)(e);if("code-block"===t.type){const e=m.editorComponents.find(e=>"code-block"===e.type);e&&(console.warn(o.oneLine` - Only one editor component of type "code-block" may be registered. Previously registered code - block component(s) will be overwritten. - `),m.editorComponents=m.editorComponents.delete(e.id))}m.editorComponents=m.editorComponents.set(t.id,t)}function O(){return m.editorComponents}function C(e){m.remarkPlugins.push(e)}function T(){return m.remarkPlugins}function A(e,t){m.widgetValueSerializers[e]=t}function P(e){return m.widgetValueSerializers[e]}function R(e,t){e&&t?m.backends[e]?console.error(`Backend [${e}] already registered. Please choose a different name.`):m.backends[e]={init:function(){for(var e=arguments.length,n=new Array(e),r=0;re.name===t.name))throw new Error(`A media library named ${e.name} has already been registered.`);m.mediaLibraries.push(d(d({},e),{},{options:t}))}function M(e){return m.mediaLibraries.find(t=>t.name===e)}function L(e){if(!p.includes(e))throw new Error(`Invalid event name '${e}'`)}function D(e){return L(e),[...m.eventHandlers[e]]}function N(e){let{name:t,handler:n}=e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};L(t),m.eventHandlers[t].push({handler:n,options:r})}async function F(e){let{name:t,data:n}=e;L(t);const r=m.eventHandlers[t];let i=d({},n);for(const{handler:e,options:t}of r){const r=await e(i,t);if(void 0!==r){const e=i.entry.set("data",r);i=d(d({},n),{},{entry:e})}}return i.entry.get("data")}function B(e){let{name:t,handler:n}=e;L(t),m.eventHandlers[t]=n?m.eventHandlers[t].filter(e=>e.handler!==n):[]}function z(e,t){e&&t?m.locales[e]=t:console.error("Locale parameters invalid. example: CMS.registerLocale('locale', phrases)")}function U(e){return m.locales[e]}t.default=g},function(e,t,n){"use strict";function r(e){if(null==e)return i;if("string"==typeof e)return function(e){return function(t){return Boolean(t&&t.type===e)}}(e);if("object"==typeof e)return"length"in e?function(e){var t=[],n=-1;for(;++nthis.maxX&&(this.maxX=e.maxX),e.minYthis.maxY&&(this.maxY=e.maxY)},e.prototype.getHeight=function(){return this.maxY-this.minY+1},e.prototype.getSize=function(){return[this.getWidth(),this.getHeight()]},e.prototype.getWidth=function(){return this.maxX-this.minX+1},e.prototype.intersects=function(e){return this.minX<=e.maxX&&this.maxX>=e.minX&&this.minY<=e.maxY&&this.maxY>=e.minY},e}();function i(e,t,n,i,o){return void 0!==o?(o.minX=e,o.maxX=t,o.minY=n,o.maxY=i,o):new r(e,t,n,i)}t.b=r},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:p(e)?2:h(e)?3:0}function u(e,t){return 2===l(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function c(e,t){return 2===l(e)?e.get(t):e[t]}function d(e,t,n){var r=l(e);2===r?e.set(t,n):3===r?(e.delete(t),e.add(n)):e[t]=n}function f(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function p(e){return K&&e instanceof Map}function h(e){return Y&&e instanceof Set}function m(e){return e.o||e.t}function g(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=re(e);delete t[J];for(var n=ne(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=y),Object.freeze(e),t&&s(e,(function(e,t){return v(t,!0)}),!0)),e}function y(){r(2)}function b(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function _(e){var t=ie[e];return t||r(18,e),t}function w(e,t){ie[e]||(ie[e]=t)}function x(){return V}function k(e,t){t&&(_("Patches"),e.u=[],e.s=[],e.v=t)}function E(e){S(e),e.p.forEach(C),e.p=null}function S(e){e===V&&(V=e.l)}function O(e){return V={p:[],l:V,h:e,m:!0,_:0}}function C(e){var t=e[J];0===t.i||1===t.i?t.j():t.O=!0}function T(e,t){t._=t.p.length;var n=t.p[0],i=void 0!==e&&e!==n;return t.h.g||_("ES5").S(t,e,i),i?(n[J].P&&(E(t),r(4)),o(e)&&(e=A(t,e),t.l||R(t,e)),t.u&&_("Patches").M(n[J].t,e,t.u,t.s)):e=A(t,n,[]),E(t),t.u&&t.v(t.u,t.s),e!==X?e:void 0}function A(e,t,n){if(b(t))return t;var r=t[J];if(!r)return s(t,(function(i,o){return P(e,r,t,i,o,n)}),!0),t;if(r.A!==e)return t;if(!r.P)return R(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=4===r.i||5===r.i?r.o=g(r.k):r.o;s(3===r.i?new Set(i):i,(function(t,o){return P(e,r,i,t,o,n)})),R(e,i,!1),n&&e.u&&_("Patches").R(r,n,e.u,e.s)}return r.o}function P(e,t,n,r,a,s){if(i(a)){var l=A(e,a,s&&t&&3!==t.i&&!u(t.D,r)?s.concat(r):void 0);if(d(n,r,l),!i(l))return;e.m=!1}if(o(a)&&!b(a)){if(!e.h.F&&e._<1)return;A(e,a),t&&t.A.l||R(e,a)}}function R(e,t,n){void 0===n&&(n=!1),e.h.F&&e.m&&v(t,n)}function j(e,t){var n=e[J];return(n?m(n):e)[t]}function I(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function M(e){e.P||(e.P=!0,e.l&&M(e.l))}function L(e){e.o||(e.o=g(e.t))}function D(e,t,n){var r=p(t)?_("MapSet").N(t,n):h(t)?_("MapSet").T(t,n):e.g?function(e,t){var n=Array.isArray(e),r={i:n?1:0,A:t?t.A:x(),P:!1,I:!1,D:{},l:t,t:e,k:null,o:null,j:null,C:!1},i=r,o=oe;n&&(i=[r],o=ae);var a=Proxy.revocable(i,o),s=a.revoke,l=a.proxy;return r.k=l,r.j=s,l}(t,n):_("ES5").J(t,n);return(n?n.A:x()).p.push(r),r}function N(e){return i(e)||r(22,e),function e(t){if(!o(t))return t;var n,r=t[J],i=l(t);if(r){if(!r.P&&(r.i<4||!_("ES5").K(r)))return r.t;r.I=!0,n=F(t,i),r.I=!1}else n=F(t,i);return s(n,(function(t,i){r&&c(r.t,t)===i||d(n,t,e(i))})),3===i?new Set(n):n}(e)}function F(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return g(e)}function B(){function e(e,t){var n=o[e];return n?n.enumerable=t:o[e]=n={configurable:!0,enumerable:t,get:function(){var t=this[J];return oe.get(t,e)},set:function(t){var n=this[J];oe.set(n,e,t)}},n}function t(e){for(var t=e.length-1;t>=0;t--){var i=e[t][J];if(!i.P)switch(i.i){case 5:r(i)&&M(i);break;case 4:n(i)&&M(i)}}}function n(e){for(var t=e.t,n=e.k,r=ne(n),i=r.length-1;i>=0;i--){var o=r[i];if(o!==J){var a=t[o];if(void 0===a&&!u(t,o))return!0;var s=n[o],l=s&&s[J];if(l?l.t!==a:!f(s,a))return!0}}var c=!!t[J];return r.length!==ne(t).length+(c?0:1)}function r(e){var t=e.k;if(t.length!==e.t.length)return!0;var n=Object.getOwnPropertyDescriptor(t,t.length-1);if(n&&!n.get)return!0;for(var r=0;r1?r-1:0),o=1;o1?r-1:0),o=1;o=0;n--){var r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));var o=_("Patches").$;return i(e)?o(e,t):this.produce(e,(function(e){return o(e,t)}))},e}(),le=new se,ue=le.produce,ce=le.produceWithPatches.bind(le),de=le.setAutoFreeze.bind(le),fe=le.setUseProxies.bind(le),pe=le.applyPatches.bind(le),he=le.createDraft.bind(le),me=le.finishDraft.bind(le);t.default=ue},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.currentBackend=t.LocalStorageAuthStore=t.Backend=void 0,t.expandSearchEntries=W,t.extractSearchFields=q,t.mergeExpandedEntries=H,t.resolveBackend=Q,t.slugFromCustomPath=V;var r=R(n(389)),i=R(n(103)),o=R(n(297)),a=R(n(122)),s=R(n(546)),l=R(n(302)),u=R(n(245)),c=R(n(548)),d=n(4),f=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=P(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=e[o]}r.default=e,n&&n.set(e,r);return r}(n(549)),p=n(40),h=n(98),m=n(147),g=n(409),v=n(420),y=n(126),b=n(430),_=n(71),w=n(425),x=n(170),k=n(136),E=n(319),S=n(124),O=n(257),C=n(428),T=n(199);const A=["field"];function P(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(P=function(e){return e?n:t})(e)}function R(e){return e&&e.__esModule?e:{default:e}}function j(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function I(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function M(e){for(var t=1;te.reduce((e,n)=>{const r=U(n,t);return r?`${e} ${r}`:e},"")}function W(e,t){return e.reduce((e,n)=>{const r=t.reduce((e,t)=>{const r=F({data:n.data,path:t});return e.push(...r),e},[]);for(let t=0;te.field),n={},o=e.reduce((e,t)=>{if(!e[t.slug]){const{field:r}=t,i=j(t,A);e[t.slug]=i,n[t.slug]=(0,d.Set)()}const r=t.field.split(".");let i=e[t.slug].data;for(let e=0;e{const a=o[e].data;for(const o of n[e].toArray()){const e=(0,i.default)(a,o),n=e.filter((e,n)=>t.some(e=>(e+".").startsWith(`${o}.${n}.`)));n.sort((n,r)=>{const i=e.indexOf(n),a=e.indexOf(r),s=`${o}.${i}.`,l=`${o}.${a}.`;return t.findIndex(e=>(e+".").startsWith(s))-t.findIndex(e=>(e+".").startsWith(l))}),(0,r.default)(a,o,n)}}),Object.values(o)}function $(e,t){return e.score>t.score?-1:e.score{const t=this.authStore.retrieve();if(t&&t.backendName===this.backendName)return this.user=M(M({},t),e),this.authStore.store(this.user),this.user}),L(this,"getToken",()=>this.implementation.getToken()),this.deleteAnonymousBackup(),this.config=i,this.implementation=e.init(this.config,{useWorkflow:(0,v.selectUseWorkflow)(this.config),updateUserCredentials:this.updateUserCredentials,initialWorkflowStatus:S.status.first()}),this.backendName=n,this.authStore=r,null===this.implementation)throw new Error("Cannot instantiate a Backend with no implementation");this.backupSync=(0,p.asyncLock)()}async status(){let e={auth:{status:!0},api:{status:!0,statusPage:""}};for(let t=1;t<=3;t++){if(e=await this.implementation.status(),Object.values(e).every(e=>!0===e.status))return e;await new Promise(e=>setTimeout(e,1e3*t))}return e}currentUser(){if(this.user)return this.user;const e=this.authStore.retrieve();return e&&e.backendName===this.backendName?Promise.resolve(this.implementation.restoreUser(e)).then(e=>(this.user=M(M({},e),{},{backendName:this.backendName}),this.authStore.store(this.user),this.user)):Promise.resolve(null)}isGitBackend(){var e,t;return(null===(e=(t=this.implementation).isGitBackend)||void 0===e?void 0:e.call(t))||!1}authComponent(){return this.implementation.authComponent()}authenticate(e){return this.implementation.authenticate(e).then(e=>(this.user=M(M({},e),{},{backendName:this.backendName}),this.authStore&&this.authStore.store(this.user),this.user))}async logout(){try{await this.implementation.logout()}catch(e){console.warn("Error during logout",e.message)}finally{this.user=null,this.authStore&&this.authStore.logout()}}async entryExist(e,t,n,r){const i=r&&await this.implementation.unpublishedEntry({collection:e.get("name"),slug:n}).catch(e=>e.name===p.EDITORIAL_WORKFLOW_ERROR&&e.notUnderEditorialWorkflow?Promise.resolve(!1):Promise.reject(e));if(i)return i;return await this.implementation.getEntry(t).then(e=>{let{data:t}=e;return t}).catch(()=>Promise.resolve(!1))}async generateUniqueSlug(e,t,n,r,i){const o=n.slug;let a;a=i?V(e,i):(0,E.slugFormatter)(e,t,o);let s=1,l=a;for(;r.includes(l)||await this.entryExist(e,(0,_.selectEntryPath)(e,l),l,(0,v.selectUseWorkflow)(n));)l=`${a}${(0,x.sanitizeChar)(" ",o)}${s++}`;return l}processEntries(e,t){const n=e.map(e=>(0,w.createEntry)(t.get("name"),(0,_.selectEntrySlug)(t,e.file.path),e.file.path,{raw:e.data||"",label:e.file.label,author:e.file.author,updatedOn:e.file.updatedOn,meta:{path:G(e.file.path,t)}})).map(this.entryWithFormat(t)),r=t.get("filter"),i=r?this.filterEntries({entries:n},r):n;if((0,T.hasI18n)(t)){const e=(0,_.selectFolderEntryExtension)(t);return(0,T.groupEntries)(t,e,i)}return i}async listEntries(e){var t;const n=(0,_.selectFolderEntryExtension)(e);let r;const i=e.get("type");if(i===O.FOLDER)r=()=>{const t=K(e);return this.implementation.entriesByFolder(e.get("folder"),n,t)};else{if(i!==O.FILES)throw new Error("Unknown collection type: "+i);{const t=e.get("files").map(e=>({path:e.get("file"),label:e.get("label")})).toArray();r=()=>this.implementation.entriesByFiles(t)}}const o=await r(),a=p.Cursor.create(o[p.CURSOR_COMPATIBILITY_SYMBOL]).wrapData({cursorType:"collectionEntries",collection:e});return{entries:this.processEntries(o,e),pagination:null===(t=a.meta)||void 0===t?void 0:t.get("page"),cursor:a}}async listAllEntries(e){if(e.get("folder")&&this.implementation.allEntriesByFolder){const t=K(e),n=(0,_.selectFolderEntryExtension)(e);return this.implementation.allEntriesByFolder(e.get("folder"),n,t).then(t=>this.processEntries(t,e))}const t=await this.listEntries(e),{entries:n}=t;let{cursor:r}=t;for(;r&&r.actions.includes("next");){const{entries:e,cursor:t}=await this.traverseCursor(r,"next");n.push(...e),r=t}return n}async search(e,t){const n=[],r=e.map(async e=>{const n=e.get("summary",""),r=D(n);let i=[];var o;e.get("type")===O.FILES?null===(o=e.get("files"))||void 0===o||o.forEach(e=>{const t=e.get("fields").map(e=>e.get("name")).toArray();i=[...i,...t]}):i=[(0,_.selectInferedField)(e,"title"),(0,_.selectInferedField)(e,"shortTitle"),(0,_.selectInferedField)(e,"author"),...r.map(t=>N[t]?(0,_.selectInferedField)(e,"date"):t)];const a=i.filter(Boolean),l=await this.listAllEntries(e);return f.filter(t,l,{extract:q((0,s.default)(a))})}).map(e=>e.catch(e=>(n.push(e),[]))),i=await Promise.all(r).then(e=>(0,u.default)(e));if(n.length>0)throw new Error({message:"Errors ocurred while searching entries locally!",errors:n});return{entries:i.filter(e=>{let{score:t}=e;return t>5}).sort($).map(e=>e.original)}}async query(e,t,n,r,i){let o=await this.listAllEntries(e);r&&(o=o.filter(e=>e.slug===r));const a=W(o,t);let s=f.filter(n,a,{extract:e=>U(e.field,e)}).sort($).map(e=>e.original);void 0!==i&&i>0&&(s=s.slice(0,i));return{query:n,hits:H(s)}}traverseCursor(e,t){const[n,r]=e.unwrapData(),i=n.get("collection");return this.implementation.traverseCursor(r,t).then(async e=>{let{entries:t,cursor:n}=e;return{entries:this.processEntries(t,i),cursor:p.Cursor.create(n).wrapData({cursorType:"collectionEntries",collection:i})}})}async getLocalDraftBackup(e,t){const n=z(e.get("name"),t),r=await p.localForage.getItem(n);if(!r||!r.raw.trim())return{};const{raw:i,path:o}=r;let{mediaFiles:a=[]}=r;a=a.map(e=>e.file?M(M({},e),{},{url:URL.createObjectURL(e.file)}):e);const s=(0,_.selectFileEntryLabel)(e,t),l=n=>this.entryWithFormat(e)((0,w.createEntry)(e.get("name"),t,o,{raw:n,label:s,mediaFiles:a,meta:{path:G(o,e)}})),u=l(i);if((0,T.hasI18n)(e)&&r.i18n){const e=(0,T.formatI18nBackup)(r.i18n,l);u.i18n=e}return{entry:u}}async persistLocalDraftBackup(e,t){try{await this.backupSync.acquire();const n=z(t.get("name"),e.get("slug")),r=this.entryToRaw(t,e);if(!r.trim())return;const i=await Promise.all(e.get("mediaFiles").toJS().map(async e=>{var t;if(null!==(t=e.url)&&void 0!==t&&t.startsWith("blob:")){const t=await fetch(e.url).then(e=>e.blob());return M(M({},e),{},{file:(0,p.blobToFileObj)(e.name,t)})}return e}));let o;(0,T.hasI18n)(t)&&(o=(0,T.getI18nBackup)(t,e,e=>this.entryToRaw(t,e))),await p.localForage.setItem(n,M({raw:r,path:e.get("path"),mediaFiles:i},o&&{i18n:o}));return await p.localForage.setItem(z(),r)}catch(e){console.warn("persistLocalDraftBackup",e)}finally{this.backupSync.release()}}async deleteLocalDraftBackup(e,t){try{await this.backupSync.acquire(),await p.localForage.removeItem(z(e.get("name"),t)),t&&await p.localForage.removeItem(z(e.get("name")));return await this.deleteAnonymousBackup()}catch(e){console.warn("deleteLocalDraftBackup",e)}finally{this.backupSync.release()}}deleteAnonymousBackup(){return p.localForage.removeItem(z())}async getEntry(e,t,n){const r=(0,_.selectEntryPath)(t,n),i=(0,_.selectFileEntryLabel)(t,n),o=(0,_.selectFolderEntryExtension)(t),a=async r=>{const o=await this.implementation.getEntry(r);let a=(0,w.createEntry)(t.get("name"),n,o.file.path,{raw:o.data,label:i,mediaFiles:[],meta:{path:G(o.file.path,t)}});return a=this.entryWithFormat(t)(a),a=await this.processEntry(e,t,a),a};let s;return s=(0,T.hasI18n)(t)?await(0,T.getI18nEntry)(t,o,r,n,a):await a(r),s}getMedia(){return this.implementation.getMedia()}getMediaFile(e){return this.implementation.getMediaFile(e)}getMediaDisplayURL(e){if(this.implementation.getMediaDisplayURL)return this.implementation.getMediaDisplayURL(e);const t=new Error("getMediaDisplayURL is not implemented by the current backend, but the backend returned a displayURL which was not a string!");return t.displayURL=e,Promise.reject(t)}entryWithFormat(e){return t=>{const n=(0,g.resolveFormat)(e,t);if(t&&void 0!==t.raw){const e=n&&(0,c.default)(n.fromFile.bind(n,t.raw))||{};return(0,l.default)(e)&&console.error(e),Object.assign(t,{data:(0,l.default)(e)?{}:e})}return n.fromFile(t)}}async processUnpublishedEntry(e,t,n){const{slug:r}=t;let i;if(e.get("type")===O.FILES){const t=e.get("files").find(e=>(null==e?void 0:e.get("name"))===r);i=(0,h.extname)(t.get("file"))}else i=(0,_.selectFolderEntryExtension)(e);const a=[];if(n){const n=t.diffs.filter(e=>!e.path.endsWith(i)),o=await Promise.all(n.map(t=>this.implementation.unpublishedEntryMediaFile(e.get("name"),r,t.path,t.id)));a.push(...o.map(e=>M(M({},e),{},{draft:!0})))}const s=(0,o.default)(t.diffs.filter(e=>e.path.endsWith(i)),e=>e.path.length),l=(n,i,o)=>{const s=(0,w.createEntry)(e.get("name"),r,i,{raw:n,isModification:!o,label:e&&(0,_.selectFileEntryLabel)(e,r),mediaFiles:a,updatedOn:t.updatedAt,author:t.pullRequestAuthor,status:t.status,meta:{path:G(i,e)}});return this.entryWithFormat(e)(s)},u=async n=>{const r=await this.implementation.unpublishedEntryDataFile(e.get("name"),t.slug,n.path,n.id);return l(r,n.path,n.newFile)};if(s.length<=0){const t=await this.implementation.getEntry((0,_.selectEntryPath)(e,r));return l(t.data,t.file.path,!1)}if((0,T.hasI18n)(e)){const t=(0,_.selectEntryPath)(e,r),n=(0,T.getI18nDataFiles)(e,i,t,r,s);let o=await Promise.all(n.map(e=>u(e).catch(()=>null)));o=o.filter(Boolean);return(await(0,T.groupEntries)(e,i,o))[0]}return await u(s[0])}async unpublishedEntries(e){const t=await this.implementation.unpublishedEntries();return{pagination:0,entries:(await Promise.all(t.map(async t=>{const n=await this.implementation.unpublishedEntry({id:t}),r=n.collection,i=e.find(e=>e.get("name")===r);if(!i)return console.warn(`Missing collection '${r}' for unpublished entry '${t}'`),null;return await this.processUnpublishedEntry(i,n,!1)}))).filter(Boolean)}}async processEntry(e,t,n){const r=(0,b.selectIntegration)(e.integrations,null,"assetStore"),i=(0,_.selectMediaFolders)(e.config,t,(0,d.fromJS)(n));if(i.length>0&&!r){const e=await Promise.all(i.map(e=>this.implementation.getMedia(e)));n.mediaFiles=n.mediaFiles.concat(...e)}else n.mediaFiles=n.mediaFiles.concat(e.mediaLibrary.get("files")||[]);return n}async unpublishedEntry(e,t,n){const r=await this.implementation.unpublishedEntry({collection:t.get("name"),slug:n});let i=await this.processUnpublishedEntry(t,r,!0);return i=await this.processEntry(e,t,i),i}getDeploy(e,t,n){const r=this.config.site_url;if(r&&!1!==this.config.show_preview_links)return{url:(0,E.previewUrlFormatter)(r,e,t,n,this.config.slug),status:"SUCCESS"}}async getDeployPreview(e,t,n){let{maxAttempts:r=1,interval:i=5e3}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(!this.implementation.getDeployPreview||!1===this.config.show_preview_links)return;let o,a=0;for(;!o&&asetTimeout(()=>e(void 0),i));return o?{url:(0,E.previewUrlFormatter)(o.url,e,t,n,this.config.slug),status:o.status?o.status.toUpperCase():""}:void 0}async persistEntry(e){let{config:t,collection:n,entryDraft:r,assetProxies:i,usedSlugs:o,unpublished:a=!1,status:s}=e;const l=await this.invokePreSaveEvent(r.get("entry")),u=l&&r.setIn(["entry","data"],l)||r,c=u.getIn(["entry","newRecord"])||!1,d=(0,v.selectUseWorkflow)(t),f=(0,C.selectCustomPath)(n,u);let p;if(c){if(!(0,_.selectAllowNewEntries)(n))throw new Error("Not allowed to create new entries in this collection");const e=await this.generateUniqueSlug(n,u.getIn(["entry","data"]),t,o,f),r=f||(0,_.selectEntryPath)(n,e);p={path:r,slug:e,raw:this.entryToRaw(n,u.get("entry"))},function(e,t,n,r,i){e.map(e=>{const o=e.path,a=(0,y.selectMediaFilePath)(t,n,r.get("entry").set("path",i),o,e.field);e.path=a})}(i,t,n,u,r)}else{const e=u.getIn(["entry","slug"]);p={path:u.getIn(["entry","path"]),slug:f&&!d?V(n,f):e,raw:this.entryToRaw(n,u.get("entry")),newPath:f}}const{slug:h,path:m,newPath:g}=p;let b=[p];if((0,T.hasI18n)(n)){const e=(0,_.selectFolderEntryExtension)(n);b=(0,T.getI18nFiles)(n,e,u.get("entry"),e=>this.entryToRaw(n,e),m,h,g)}const w=await this.currentUser(),x=M({newEntry:c,commitMessage:(0,E.commitMessageFormatter)(c?"create":"update",t,{collection:n,slug:h,path:m,authorLogin:w.login,authorName:w.name},w.useOpenAuthoring),collectionName:n.get("name"),useWorkflow:d},{unpublished:a,status:s});return d||await this.invokePrePublishEvent(u.get("entry")),await this.implementation.persistEntry({dataFiles:b,assets:i},x),await this.invokePostSaveEvent(u.get("entry")),d||await this.invokePostPublishEvent(u.get("entry")),h}async invokeEventWithEntry(e,t){const{login:n,name:r}=await this.currentUser();return await(0,k.invokeEvent)({name:e,data:{entry:t,author:{login:n,name:r}}})}async invokePrePublishEvent(e){await this.invokeEventWithEntry("prePublish",e)}async invokePostPublishEvent(e){await this.invokeEventWithEntry("postPublish",e)}async invokePreUnpublishEvent(e){await this.invokeEventWithEntry("preUnpublish",e)}async invokePostUnpublishEvent(e){await this.invokeEventWithEntry("postUnpublish",e)}async invokePreSaveEvent(e){return await this.invokeEventWithEntry("preSave",e)}async invokePostSaveEvent(e){await this.invokeEventWithEntry("postSave",e)}async persistMedia(e,t){const n=await this.currentUser(),r={commitMessage:(0,E.commitMessageFormatter)("uploadMedia",e,{path:t.path,authorLogin:n.login,authorName:n.name},n.useOpenAuthoring)};return this.implementation.persistMedia(t,r)}async deleteEntry(e,t,n){const r=e.config,i=(0,_.selectEntryPath)(t,n),o=(0,_.selectFolderEntryExtension)(t);if(!(0,_.selectAllowDeletion)(t))throw new Error("Not allowed to delete entries in this collection");const a=await this.currentUser(),s=(0,E.commitMessageFormatter)("delete",r,{collection:t,slug:n,path:i,authorLogin:a.login,authorName:a.name},a.useOpenAuthoring),l=(0,y.selectEntry)(e.entries,t.get("name"),n);await this.invokePreUnpublishEvent(l);let u=[i];(0,T.hasI18n)(t)&&(u=(0,T.getFilePaths)(t,o,i,n)),await this.implementation.deleteFiles(u,s),await this.invokePostUnpublishEvent(l)}async deleteMedia(e,t){const n=await this.currentUser(),r=(0,E.commitMessageFormatter)("deleteMedia",e,{path:t,authorLogin:n.login,authorName:n.name},n.useOpenAuthoring);return this.implementation.deleteFiles([t],r)}persistUnpublishedEntry(e){return this.persistEntry(M(M({},e),{},{unpublished:!0}))}updateUnpublishedEntryStatus(e,t,n){return this.implementation.updateUnpublishedEntryStatus(e,t,n)}async publishUnpublishedEntry(e){const t=e.get("collection"),n=e.get("slug");await this.invokePrePublishEvent(e),await this.implementation.publishUnpublishedEntry(t,n),await this.invokePostPublishEvent(e)}deleteUnpublishedEntry(e,t){return this.implementation.deleteUnpublishedEntry(e,t)}entryToRaw(e,t){const n=(0,g.resolveFormat)(e,t.toJS()),r=this.fieldsOrder(e,t),i=(0,_.selectFieldsComments)(e,t);return n&&n.toFile(t.get("data").toJS(),r,i)}fieldsOrder(e,t){if(e.get("fields"))return e.get("fields").map(e=>e.get("name")).toArray();const n=(e.get("files")||(0,d.List)()).filter(e=>e.get("name")===t.get("slug")).get(0);if(null==n)throw new Error(`No file found for ${t.get("slug")} in ${e.get("name")}`);return n.get("fields").map(e=>e.get("name")).toArray()}filterEntries(e,t){return e.entries.filter(e=>{const n=e.data[t.get("field")];return Array.isArray(n)?n.includes(t.get("value")):n===t.get("value")})}}function Q(e){if(!e.backend.name)throw new Error("No backend defined in configuration");const{name:t}=e.backend,n=new B,r=(0,k.getBackend)(t);if(r)return new Y(r,{backendName:t,authStore:n,config:e});throw new Error("Backend not found: "+t)}t.Backend=Y;const X=function(){let e;return t=>e||(e=Q(t))}();t.currentBackend=X},function(e,t,n){var r=n(954)();e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validations=t.stringTemplate=t.NetlifyCmsLibWidgets=void 0;var r=a(n(1003));t.stringTemplate=r;var i=a(n(1009));function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(o=function(e){return e?n:t})(e)}function a(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=o(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var s=i?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(r,a,s):r[a]=e[a]}return r.default=e,n&&n.set(e,r),r}t.validations=i;const s={stringTemplate:r,validations:i};t.NetlifyCmsLibWidgets=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(35),i={data:new r.Name("data"),valCxt:new r.Name("valCxt"),instancePath:new r.Name("instancePath"),parentData:new r.Name("parentData"),parentDataProperty:new r.Name("parentDataProperty"),rootData:new r.Name("rootData"),dynamicAnchors:new r.Name("dynamicAnchors"),vErrors:new r.Name("vErrors"),errors:new r.Name("errors"),this:new r.Name("this"),self:new r.Name("self"),scope:new r.Name("scope"),json:new r.Name("json"),jsonPos:new r.Name("jsonPos"),jsonLen:new r.Name("jsonLen"),jsonPart:new r.Name("jsonPart")};t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SORT_ENTRIES_SUCCESS=t.SORT_ENTRIES_REQUEST=t.SORT_ENTRIES_FAILURE=t.REMOVE_DRAFT_ENTRY_MEDIA_FILE=t.GROUP_ENTRIES_SUCCESS=t.GROUP_ENTRIES_REQUEST=t.GROUP_ENTRIES_FAILURE=t.FILTER_ENTRIES_SUCCESS=t.FILTER_ENTRIES_REQUEST=t.FILTER_ENTRIES_FAILURE=t.ENTRY_SUCCESS=t.ENTRY_REQUEST=t.ENTRY_PERSIST_SUCCESS=t.ENTRY_PERSIST_REQUEST=t.ENTRY_PERSIST_FAILURE=t.ENTRY_FAILURE=t.ENTRY_DELETE_SUCCESS=t.ENTRY_DELETE_REQUEST=t.ENTRY_DELETE_FAILURE=t.ENTRIES_SUCCESS=t.ENTRIES_REQUEST=t.ENTRIES_FAILURE=t.DRAFT_VALIDATION_ERRORS=t.DRAFT_LOCAL_BACKUP_RETRIEVED=t.DRAFT_DISCARD=t.DRAFT_CREATE_FROM_LOCAL_BACKUP=t.DRAFT_CREATE_FROM_ENTRY=t.DRAFT_CREATE_EMPTY=t.DRAFT_CREATE_DUPLICATE_FROM_ENTRY=t.DRAFT_CLEAR_ERRORS=t.DRAFT_CHANGE_FIELD=t.CHANGE_VIEW_STYLE=t.ADD_DRAFT_ENTRY_MEDIA_FILE=void 0,t.addDraftEntryMediaFile=function(e){return{type:"ADD_DRAFT_ENTRY_MEDIA_FILE",payload:e}},t.changeDraftField=function(e){let{field:t,value:n,metadata:r,entries:i,i18n:o}=e;return{type:"DRAFT_CHANGE_FIELD",payload:{field:t,value:n,metadata:r,entries:i,i18n:o}}},t.changeDraftFieldValidation=function(e,t){return{type:"DRAFT_VALIDATION_ERRORS",payload:{uniquefieldId:e,errors:t}}},t.changeViewStyle=function(e){return{type:"CHANGE_VIEW_STYLE",payload:{style:e}}},t.clearFieldErrors=function(){return{type:"DRAFT_CLEAR_ERRORS"}},t.createDraftDuplicateFromEntry=function(e){return t=>{t((0,b.waitUntil)({predicate:e=>{let{type:t}=e;return"DRAFT_CREATE_EMPTY"===t},run:()=>t(V(e))}))}},t.createDraftFromEntry=$,t.createEmptyDraft=function(e,t){return async(n,r)=>{new URLSearchParams(t).forEach((t,n)=>{e=(0,l.updateFieldByKey)(e,n,e=>e.set("default",function(e){if(["true","True","TRUE"].includes(e))return!0;if(["false","False","FALSE"].includes(e))return!1;return function(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}(e)}(t)))});const o=e.get("fields",(0,i.List)()),a=function(e){return e.filter(e=>!e.get("meta")).toList()}(o),s=J(a),u=J(function(e){return e.filter(e=>!0===e.get("meta")).toList()}(o)),c=r(),f=(0,d.currentBackend)(c.config);e.has("media_folder")||await(0,y.waitForMediaLibraryToLoad)(n,r());const h=function(e,t){if(!(0,E.hasI18n)(e))return{};const n=J(t,(function(e){return e.get(E.I18N)!==E.I18N_FIELD.DUPLICATE&&e.get(E.I18N)!==E.I18N_FIELD.TRANSLATE}));return(0,E.duplicateDefaultI18nFields)(e,n)}(e,a);let m=(0,p.createEntry)(e.get("name"),"","",{data:s,i18n:h,mediaFiles:[],meta:u});m=await f.processEntry(c,e,m),n(H(m))}},t.createEmptyDraftData=J,t.deleteEntry=function(e,t){return(n,r)=>{const i=r(),o=(0,d.currentBackend)(i.config);return n(U(e,t)),o.deleteEntry(i,e,t).then(()=>n(q(e,t))).catch(r=>(n(A({message:{details:r,key:"ui.toast.onFailToDelete"},kind:"danger",dismissAfter:8e3})),console.error(r),Promise.reject(n(W(e,t,r)))))}},t.deleteLocalBackup=function(e,t){return(n,r)=>{const i=r();return(0,d.currentBackend)(i.config).deleteLocalDraftBackup(e,t)}},t.discardDraft=function(){return{type:"DRAFT_DISCARD"}},t.draftDuplicateEntry=V,t.emptyDraftCreated=H,t.entriesFailed=L,t.entriesLoaded=M,t.entriesLoading=I,t.entryDeleteFail=W,t.entryDeleted=q,t.entryDeleting=U,t.entryLoadError=j,t.entryLoaded=R,t.entryLoading=P,t.entryPersistFail=z,t.entryPersisted=B,t.entryPersisting=F,t.filterByField=function(e,t){return async(n,r)=>{const i=r(),o=(0,_.selectIsFetching)(i.entries,e.get("name"));if(n({type:"FILTER_ENTRIES_REQUEST",payload:{collection:e.get("name"),filter:t}}),!o)try{const r=await D(i,e);n({type:"FILTER_ENTRIES_SUCCESS",payload:{collection:e.get("name"),filter:t,entries:r}})}catch(r){n({type:"FILTER_ENTRIES_FAILURE",payload:{collection:e.get("name"),filter:t,error:r}})}}},t.getMediaAssets=ee,t.getSerializedEntry=te,t.groupByField=function(e,t){return async(n,r)=>{const i=r(),o=(0,_.selectIsFetching)(i.entries,e.get("name"));if(n({type:"GROUP_ENTRIES_REQUEST",payload:{collection:e.get("name"),group:t}}),!o)try{const r=await D(i,e);n({type:"GROUP_ENTRIES_SUCCESS",payload:{collection:e.get("name"),group:t,entries:r}})}catch(r){n({type:"GROUP_ENTRIES_FAILURE",payload:{collection:e.get("name"),group:t,error:r}})}}},t.loadEntries=Z,t.loadEntry=K,t.loadLocalBackup=function(){return{type:"DRAFT_CREATE_FROM_LOCAL_BACKUP"}},t.localBackupRetrieved=G,t.persistEntry=function(e){return async(t,n)=>{const r=n(),i=r.entryDraft,o=i.get("fieldsErrors"),a=(0,u.selectPublishedSlugs)(r,e.get("name"));if(!o.isEmpty()){return o.some(e=>e.some(e=>e.type&&e.type===m.default.PRESENCE))&&t(A({message:{key:"ui.toast.missingRequiredField"},kind:"danger",dismissAfter:8e3})),Promise.reject()}const s=(0,d.currentBackend)(r.config),l=i.get("entry"),c=ee({entry:l}),f=te(e,l),p=i.set("entry",f);return t(F(e,f)),s.persistEntry({config:r.config,collection:e,entryDraft:p,assetProxies:c,usedSlugs:a}).then(async n=>{t(A({message:{key:"ui.toast.entrySaved"},kind:"success",dismissAfter:4e3})),c.length>0&&await t((0,y.loadMedia)()),t(B(e,f,n)),e.has("nested")&&await t(Z(e)),l.get("slug")!==n&&(await t(K(e,n)),(0,x.navigateToEntry)(e.get("name"),n))}).catch(n=>(console.error(n),t(A({message:{details:n,key:"ui.toast.onFailToPersist"},kind:"danger",dismissAfter:8e3})),Promise.reject(t(z(e,f,n)))))}},t.persistLocalBackup=function(e,t){return(n,r)=>{const i=r();return(0,d.currentBackend)(i.config).persistLocalDraftBackup(e,t)}},t.removeDraftEntryMediaFile=function(e){let{id:t}=e;return{type:"REMOVE_DRAFT_ENTRY_MEDIA_FILE",payload:{id:t}}},t.retrieveLocalBackup=function(e,t){return async(n,r)=>{const o=r(),a=(0,d.currentBackend)(o.config),{entry:s}=await a.getLocalDraftBackup(e,t);if(s){const t=s.mediaFiles||[],o=await Promise.all(t.map(t=>t.file||t.url?(0,h.createAssetProxy)({path:t.path,file:t.file,url:t.url,field:t.field}):(0,g.getAsset)({collection:e,entry:(0,i.fromJS)(s),path:t.path,field:t.field})(n,r)));return n((0,g.addAssets)(o)),n(G(s))}}},t.sortByField=N,t.traverseCollectionCursor=function(e,t){return async(n,r)=>{const i=r(),o=e.get("name");if(i.entries.getIn(["pages",""+o,"isFetching"]))return;const a=(0,d.currentBackend)(i.config),{action:l,append:u}=Q.has(t)?Q.get(t).toJS():{action:t,append:!1},c=(0,s.selectCollectionEntriesCursor)(i.cursors,e.get("name"));if(c.meta.get("usingOldPaginationAPI",!1))return n(Z(e,c.data.get("nextPage")));try{var f;n(I(e));const{entries:t,cursor:r}=await function(e,t,n){if(!t.actions.has(n))throw new Error(`The current cursor does not support the pagination action "${n}".`);return e.traverseCursor(t,n)}(a,c,l),i=null===(f=r.meta)||void 0===f?void 0:f.get("page");return n(M(e,t,i,X(r),u))}catch(t){return console.error(t),n(A({message:{details:t,key:"ui.toast.onFailToLoadEntries"},kind:"danger",dismissAfter:8e3})),Promise.reject(n(L(e,t)))}}},t.tryLoadEntry=Y,t.validateMetaField=function(e,t,n,r,o){if(n.get("meta")&&"path"===n.get("name")){var a;if(!r)return ne(r,"invalidPath",o);const n=r.split("/").map((0,k.getProcessSegment)(e.config.slug)).join("/");if(r!==n)return ne(r,"invalidPath",o);const s=(0,w.selectCustomPath)(t,(0,i.fromJS)({entry:{meta:{path:r}}})),l=s?(0,_.selectEntryByPath)(e.entries,t.get("name"),s):void 0,u=null==l?void 0:l.get("path"),c=null===(a=e.entryDraft)||void 0===a?void 0:a.getIn(["entry","path"]);if(u&&u!==c)return ne(r,"pathExists",o)}return{error:!1}};var r=S(n(258)),i=n(4),o=n(165),a=n(40),s=n(426),l=n(71),u=n(121),c=n(424),d=n(145),f=n(1171),p=n(425),h=n(251),m=S(n(427)),g=n(200),v=n(423),y=n(171),b=n(609),_=n(126),w=n(428),x=n(221),k=n(319),E=n(199);function S(e){return e&&e.__esModule?e:{default:e}}function O(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 C(e){for(var t=1;t4&&void 0!==arguments[4])||arguments[4];return{type:"ENTRIES_SUCCESS",payload:{collection:e.get("name"),entries:t,page:n,cursor:a.Cursor.create(r),append:i}}}function L(e,t){return{type:"ENTRIES_FAILURE",error:"Failed to load entries",payload:t.toString(),meta:{collection:e.get("name")}}}async function D(e,t){const n=(0,d.currentBackend)(e.config),r=(0,u.selectIntegration)(e,t.get("name"),"listEntries"),i=r?(0,c.getIntegrationProvider)(e.integrations,n.getToken,r):n;return await i.listAllEntries(t)}function N(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:v.SortDirection.Ascending;return async(r,i)=>{const o=i(),a=(0,_.selectIsFetching)(o.entries,e.get("name"));if(r({type:"SORT_ENTRIES_REQUEST",payload:{collection:e.get("name"),key:t,direction:n}}),!a)try{const i=await D(o,e);r({type:"SORT_ENTRIES_SUCCESS",payload:{collection:e.get("name"),key:t,direction:n,entries:i}})}catch(i){r({type:"SORT_ENTRIES_FAILURE",payload:{collection:e.get("name"),key:t,direction:n,error:i}})}}}function F(e,t){return{type:"ENTRY_PERSIST_REQUEST",payload:{collectionName:e.get("name"),entrySlug:t.get("slug")}}}function B(e,t,n){return{type:"ENTRY_PERSIST_SUCCESS",payload:{collectionName:e.get("name"),entrySlug:t.get("slug"),slug:n}}}function z(e,t,n){return{type:"ENTRY_PERSIST_FAILURE",error:"Failed to persist entry",payload:{collectionName:e.get("name"),entrySlug:t.get("slug"),error:n.toString()}}}function U(e,t){return{type:"ENTRY_DELETE_REQUEST",payload:{collectionName:e.get("name"),entrySlug:t}}}function q(e,t){return{type:"ENTRY_DELETE_SUCCESS",payload:{collectionName:e.get("name"),entrySlug:t}}}function W(e,t,n){return{type:"ENTRY_DELETE_FAILURE",payload:{collectionName:e.get("name"),entrySlug:t,error:n.toString()}}}function H(e){return{type:"DRAFT_CREATE_EMPTY",payload:e}}function $(e){return{type:"DRAFT_CREATE_FROM_ENTRY",payload:{entry:e}}}function V(e){return{type:"DRAFT_CREATE_DUPLICATE_FROM_ENTRY",payload:(0,p.createEntry)(e.get("collection"),"","",{data:e.get("data"),mediaFiles:e.get("mediaFiles").toJS()})}}function G(e){return{type:"DRAFT_LOCAL_BACKUP_RETRIEVED",payload:{entry:e}}}function K(e,t){return async(n,r)=>{await(0,y.waitForMediaLibraryToLoad)(n,r()),n(P(e,t));try{const i=await Y(r(),e,t);n(R(e,i)),n($(i))}catch(r){console.error(r),n(A({message:{details:r.message,key:"ui.toast.onFailToLoadEntries"},kind:"danger",dismissAfter:8e3})),n(j(r,e,t))}}}async function Y(e,t,n){const r=(0,d.currentBackend)(e.config);return await r.getEntry(e,t,n)}t.CHANGE_VIEW_STYLE="CHANGE_VIEW_STYLE";const Q=(0,i.fromJS)({append_next:{action:"next",append:!0}});function X(e){return a.Cursor.create(e).updateStore("actions",e=>e.union(Q.filter(t=>e.has(t.get("action"))).keySeq()))}function Z(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return async(n,r)=>{if(e.get("isFetching"))return;const i=r(),o=(0,_.selectEntriesSortFields)(i.entries,e.get("name"));if(o&&o.length>0){const t=o[0];return n(N(e,t.get("key"),t.get("direction")))}const s=(0,d.currentBackend)(i.config),l=(0,u.selectIntegration)(i,e.get("name"),"listEntries"),f=l?(0,c.getIntegrationProvider)(i.integrations,s.getToken,l):s,p=!!(t&&!isNaN(t)&&t>0);n(I(e));try{const r=e.has("nested")||(0,E.hasI18n)(e);let i=await(r?f.listAllEntries(e).then(e=>({entries:e})):f.listEntries(e,t));i=C(C({},i),{},{cursor:l?a.Cursor.create({actions:["next"],meta:{usingOldPaginationAPI:!0},data:{nextPage:t+1}}):a.Cursor.create(i.cursor)}),n(M(e,i.cursor.meta.get("usingOldPaginationAPI")?i.entries.reverse():i.entries,i.pagination,X(i.cursor),p))}catch(t){return n(A({message:{details:t,key:"ui.toast.onFailToLoadEntries"},kind:"danger",dismissAfter:8e3})),Promise.reject(n(L(e,t)))}}}function J(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>!1;return e.reduce((e,n)=>{const o=e,a=n;if(t(a))return o;const s=a.get("field")||a.get("fields"),l="list"==a.get("widget"),u=a.get("name"),c=a.get("default",null);if(i.List.isList(s)||i.Map.isMap(s)){if(l&&i.List.isList(c))o[u]=c;else{const e=i.List.isList(s)?s:(0,i.List)([s]),n=l?[J(e,t)]:J(e,t);d=n,[[{}],{}].some(e=>(0,r.default)(d,e))||(o[u]=n)}return o}var d;return null!==c&&(o[u]=c),o},{})}function ee(e){let{entry:t}=e;return t.get("mediaFiles").toArray().filter(e=>e.get("draft")).map(e=>(0,h.createAssetProxy)({path:e.get("path"),file:e.get("file"),url:e.get("url"),field:e.get("field")}))}function te(e,t){const n=(0,l.selectFields)(e,t.get("slug"));function r(e){return(0,f.serializeValues)(e,n)}const i=r(t.get("data"));let o=t.set("data",i);return(0,E.hasI18n)(e)&&(o=(0,E.serializeI18n)(e,o,r)),o}function ne(e,t,n){return{error:{type:m.default.CUSTOM,message:n("editor.editorControlPane.widget."+t,{path:e})}}}},function(e,t,n){"use strict";e.exports=function(e){return-2===e||-1===e||32===e}},function(e,t,n){"use strict";var r=n(1266);e.exports=function(e,t,n,i){var o,a=e.length,s=0;if(t=t<0?-t>a?0:a+t:t>a?a:t,n=n>0?n:0,i.length<1e4)(o=Array.from(i)).unshift(t,n),r.apply(e,o);else for(n&&r.apply(e,[t,n]);s","i")}function o(e,t){for(var n in e)for(var r=t[n]||(t[n]=[]),i=e[n],o=i.length-1;o>=0;o--)r.unshift(i[o])}e.defineMode("htmlmixed",(function(n,a){var s=e.getMode(n,{name:"xml",htmlMode:!0,multilineTagIndentFactor:a.multilineTagIndentFactor,multilineTagIndentPastTag:a.multilineTagIndentPastTag,allowMissingTagName:a.allowMissingTagName}),l={},u=a&&a.tags,c=a&&a.scriptTypes;if(o(t,l),u&&o(u,l),c)for(var d=c.length-1;d>=0;d--)l.script.unshift(["type",c[d].matches,c[d].mode]);function f(t,o){var a,u=s.token(t,o.htmlState),c=/\btag\b/.test(u);if(c&&!/[<>\s\/]/.test(t.current())&&(a=o.htmlState.tagName&&o.htmlState.tagName.toLowerCase())&&l.hasOwnProperty(a))o.inTag=a+" ";else if(o.inTag&&c&&/>$/.test(t.current())){var d=/^([\S]+) (.*)/.exec(o.inTag);o.inTag=null;var p=">"==t.current()&&function(e,t){for(var n=0;n-1?e.backUp(r.length-i):r.match(/<\/?$/)&&(e.backUp(r.length),e.match(t,!1)||e.match(r)),n}(e,g,t.localMode.token(e,t.localState))},o.localMode=h,o.localState=e.startState(h,s.indent(o.htmlState,"",""))}else o.inTag&&(o.inTag+=t.current(),t.eol()&&(o.inTag+=" "));return u}return{startState:function(){return{token:f,inTag:null,localMode:null,localState:null,htmlState:e.startState(s)}},copyState:function(t){var n;return t.localState&&(n=e.copyState(t.localMode,t.localState)),{token:t.token,inTag:t.inTag,localMode:t.localMode,localState:n,htmlState:e.copyState(s,t.htmlState)}},token:function(e,t){return t.token(e,t)},indent:function(t,n,r){return!t.localMode||/^\s*<\//.test(n)?s.indent(t.htmlState,n,r):t.localMode.indent?t.localMode.indent(t.localState,n,r):e.Pass},innerMode:function(e){return{state:e.localState||e.htmlState,mode:e.localMode||s}}}}),"xml","javascript","css"),e.defineMIME("text/html","htmlmixed")}(n(5),n(272),n(225),n(271))},function(e,t,n){"use strict";n.r(t),n.d(t,"MemoryRouter",(function(){return b})),n.d(t,"Prompt",(function(){return w})),n.d(t,"Redirect",(function(){return S})),n.d(t,"Route",(function(){return A})),n.d(t,"Router",(function(){return y})),n.d(t,"StaticRouter",(function(){return L})),n.d(t,"Switch",(function(){return D})),n.d(t,"generatePath",(function(){return E})),n.d(t,"matchPath",(function(){return T})),n.d(t,"useHistory",(function(){return B})),n.d(t,"useLocation",(function(){return z})),n.d(t,"useParams",(function(){return U})),n.d(t,"useRouteMatch",(function(){return q})),n.d(t,"withRouter",(function(){return N})),n.d(t,"BrowserRouter",(function(){return W})),n.d(t,"HashRouter",(function(){return H})),n.d(t,"Link",(function(){return Q})),n.d(t,"NavLink",(function(){return J}));var r=n(45),i=n(0),o=n.n(i),a=n(94),s=n(759),l=n(39),u=n(11),c=n(485),d=n.n(c),f=(n(375),n(46)),p=n(105),h=n.n(p),m=function(e){var t=Object(s.a)();return t.displayName=e,t},g=m("Router-History"),v=m("Router"),y=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={location:t.history.location},n._isMounted=!1,n._pendingLocation=null,t.staticContext||(n.unlisten=t.history.listen((function(e){n._isMounted?n.setState({location:e}):n._pendingLocation=e}))),n}Object(r.a)(t,e),t.computeRootMatch=function(e){return{path:"/",url:"/",params:{},isExact:"/"===e}};var n=t.prototype;return n.componentDidMount=function(){this._isMounted=!0,this._pendingLocation&&this.setState({location:this._pendingLocation})},n.componentWillUnmount=function(){this.unlisten&&(this.unlisten(),this._isMounted=!1,this._pendingLocation=null)},n.render=function(){return o.a.createElement(v.Provider,{value:{history:this.props.history,location:this.state.location,match:t.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},o.a.createElement(g.Provider,{children:this.props.children||null,value:this.props.history}))},t}(o.a.Component);var b=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;ip&&(p=f=(p+f)/2),m>g&&(g=m=(g+m)/2);var v=Object(h.b)(r[0],f,p),y=Object(h.b)(r[1],m,g);if(a&&n&&i){var b=30*i;v+=-b*Math.log(1+Math.max(0,f-r[0])/b)+b*Math.log(1+Math.max(0,r[0]-p)/b),y+=-b*Math.log(1+Math.max(0,m-r[1])/b)+b*Math.log(1+Math.max(0,r[1]-g)/b)}return[v,y]}}}function g(e){return e}var v=n(3),y=n(32);function b(e,t,n,r){var i=Object(v.D)(t)/n[0],o=Object(v.z)(t)/n[1];return r?Math.min(e,Math.max(i,o)):Math.min(e,Math.min(i,o))}function _(e,t,n){var r=Math.min(e,t);return r*=Math.log(1+50*Math.max(0,e/t-1))/50+1,n&&(r=Math.max(r,n),r/=Math.log(1+50*Math.max(0,n/e-1))/50+1),Object(h.b)(r,n/2,2*t)}function w(e,t,n,r,i){return function(o,a,s,l){if(void 0!==o){var u=r?b(e,r,s,i):e;return(void 0===n||n)&&l?_(o,u,t):Object(h.b)(o,t,u)}}}var x,k=n(141),E=n(86),S=n(93),O=(x=function(e,t){return(x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}x(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),C=function(e){function t(t){var n=e.call(this)||this;n.on,n.once,n.un;var r=Object(p.a)({},t);return n.hints_=[0,0],n.animations_=[],n.updateAnimationKey_,n.projection_=Object(u.b)(r.projection,"EPSG:3857"),n.viewportSize_=[100,100],n.targetCenter_=null,n.targetResolution_,n.targetRotation_,n.nextCenter_=null,n.nextResolution_,n.nextRotation_,n.cancelAnchor_=void 0,r.projection&&Object(u.c)(),r.center&&(r.center=Object(u.e)(r.center,n.projection_)),r.extent&&(r.extent=Object(u.f)(r.extent,n.projection_)),n.applyOptions_(r),n}return O(t,e),t.prototype.applyOptions_=function(e){var t=Object(p.a)({},e);for(var n in s)delete t[n];this.setProperties(t,!0);var r=P(e);this.maxResolution_=r.maxResolution,this.minResolution_=r.minResolution,this.zoomFactor_=r.zoomFactor,this.resolutions_=e.resolutions,this.padding_=e.padding,this.minZoom_=r.minZoom;var i=A(e),o=r.constraint,a=R(e);this.constraints_={center:i,resolution:o,rotation:a},this.setRotation(void 0!==e.rotation?e.rotation:0),this.setCenterInternal(void 0!==e.center?e.center:null),void 0!==e.resolution?this.setResolution(e.resolution):void 0!==e.zoom&&this.setZoom(e.zoom)},Object.defineProperty(t.prototype,"padding",{get:function(){return this.padding_},set:function(e){var t=this.padding_;this.padding_=e;var n=this.getCenter();if(n){var r=e||[0,0,0,0];t=t||[0,0,0,0];var i=this.getResolution(),o=i/2*(r[3]-t[3]+t[1]-r[1]),a=i/2*(r[0]-t[0]+t[2]-r[2]);this.setCenterInternal([n[0]+o,n[1]-a])}},enumerable:!1,configurable:!0}),t.prototype.getUpdatedOptions_=function(e){var t=this.getProperties();return void 0!==t.resolution?t.resolution=this.getResolution():t.zoom=this.getZoom(),t.center=this.getCenterInternal(),t.rotation=this.getRotation(),Object(p.a)({},t,e)},t.prototype.animate=function(e){this.isDef()&&!this.getAnimating()&&this.resolveConstraints(0);for(var t=new Array(arguments.length),n=0;n1&&"function"==typeof arguments[n-1]&&(t=arguments[n-1],--n);for(var r=0;r0},t.prototype.getInteracting=function(){return this.hints_[a.a.INTERACTING]>0},t.prototype.cancelAnimations=function(){var e;this.setHint(a.a.ANIMATING,-this.hints_[a.a.ANIMATING]);for(var t=0,n=this.animations_.length;t=0;--n){for(var r=this.animations_[n],i=!0,o=0,s=r.length;o0?u/l.duration:1;c>=1?(l.complete=!0,c=1):i=!1;var d=l.easing(c);if(l.sourceCenter){var f=l.sourceCenter[0],p=l.sourceCenter[1],m=l.targetCenter[0],g=l.targetCenter[1];this.nextCenter_=l.targetCenter;var v=f+d*(m-f),y=p+d*(g-p);this.targetCenter_=[v,y]}if(l.sourceResolution&&l.targetResolution){var b=1===d?l.targetResolution:l.sourceResolution+d*(l.targetResolution-l.sourceResolution);if(l.anchor){var _=this.getViewportSize_(this.getRotation()),w=this.constraints_.resolution(b,0,_,!0);this.targetCenter_=this.calculateCenterZoom(w,l.anchor)}this.nextResolution_=l.targetResolution,this.targetResolution_=b,this.applyTargetState_(!0)}if(void 0!==l.sourceRotation&&void 0!==l.targetRotation){var x=1===d?Object(h.g)(l.targetRotation+Math.PI,2*Math.PI)-Math.PI:l.sourceRotation+d*(l.targetRotation-l.sourceRotation);if(l.anchor){var k=this.constraints_.rotation(x,!0);this.targetCenter_=this.calculateCenterRotate(k,l.anchor)}this.nextRotation_=l.targetRotation,this.targetRotation_=x}if(this.applyTargetState_(!0),t=!0,!l.complete)break}}if(i){this.animations_[n]=null,this.setHint(a.a.ANIMATING,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;var E=r[0].callback;E&&T(E,!0)}}this.animations_=this.animations_.filter(Boolean),t&&void 0===this.updateAnimationKey_&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}},t.prototype.calculateCenterRotate=function(e,t){var n,r=this.getCenterInternal();return void 0!==r&&(n=[r[0]-t[0],r[1]-t[1]],Object(d.d)(n,e-this.getRotation()),Object(d.a)(n,t)),n},t.prototype.calculateCenterZoom=function(e,t){var n,r=this.getCenterInternal(),i=this.getResolution();void 0!==r&&void 0!==i&&(n=[t[0]-e*(t[0]-r[0])/i,t[1]-e*(t[1]-r[1])/i]);return n},t.prototype.getViewportSize_=function(e){var t=this.viewportSize_;if(e){var n=t[0],r=t[1];return[Math.abs(n*Math.cos(e))+Math.abs(r*Math.sin(e)),Math.abs(n*Math.sin(e))+Math.abs(r*Math.cos(e))]}return t},t.prototype.setViewportSize=function(e){this.viewportSize_=Array.isArray(e)?e.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)},t.prototype.getCenter=function(){var e=this.getCenterInternal();return e?Object(u.m)(e,this.getProjection()):e},t.prototype.getCenterInternal=function(){return this.get(s.CENTER)},t.prototype.getConstraints=function(){return this.constraints_},t.prototype.getConstrainResolution=function(){return this.get("constrainResolution")},t.prototype.getHints=function(e){return void 0!==e?(e[0]=this.hints_[0],e[1]=this.hints_[1],e):this.hints_.slice()},t.prototype.calculateExtent=function(e){var t=this.calculateExtentInternal(e);return Object(u.n)(t,this.getProjection())},t.prototype.calculateExtentInternal=function(e){var t=e||this.getViewportSizeMinusPadding_(),n=this.getCenterInternal();Object(f.a)(n,1);var r=this.getResolution();Object(f.a)(void 0!==r,2);var i=this.getRotation();return Object(f.a)(void 0!==i,3),Object(v.y)(n,r,i,t)},t.prototype.getMaxResolution=function(){return this.maxResolution_},t.prototype.getMinResolution=function(){return this.minResolution_},t.prototype.getMaxZoom=function(){return this.getZoomForResolution(this.minResolution_)},t.prototype.setMaxZoom=function(e){this.applyOptions_(this.getUpdatedOptions_({maxZoom:e}))},t.prototype.getMinZoom=function(){return this.getZoomForResolution(this.maxResolution_)},t.prototype.setMinZoom=function(e){this.applyOptions_(this.getUpdatedOptions_({minZoom:e}))},t.prototype.setConstrainResolution=function(e){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:e}))},t.prototype.getProjection=function(){return this.projection_},t.prototype.getResolution=function(){return this.get(s.RESOLUTION)},t.prototype.getResolutions=function(){return this.resolutions_},t.prototype.getResolutionForExtent=function(e,t){return this.getResolutionForExtentInternal(Object(u.f)(e,this.getProjection()),t)},t.prototype.getResolutionForExtentInternal=function(e,t){var n=t||this.getViewportSizeMinusPadding_(),r=Object(v.D)(e)/n[0],i=Object(v.z)(e)/n[1];return Math.max(r,i)},t.prototype.getResolutionForValueFunction=function(e){var t=e||2,n=this.getConstrainedResolution(this.maxResolution_),r=this.minResolution_,i=Math.log(n/r)/Math.log(t);return function(e){return n/Math.pow(t,e*i)}},t.prototype.getRotation=function(){return this.get(s.ROTATION)},t.prototype.getValueForResolutionFunction=function(e){var t=Math.log(e||2),n=this.getConstrainedResolution(this.maxResolution_),r=this.minResolution_,i=Math.log(n/r)/t;return function(e){return Math.log(n/e)/t/i}},t.prototype.getViewportSizeMinusPadding_=function(e){var t=this.getViewportSize_(e),n=this.padding_;return n&&(t=[t[0]-n[1]-n[3],t[1]-n[0]-n[2]]),t},t.prototype.getState=function(){var e=this.getProjection(),t=this.getResolution(),n=this.getRotation(),r=this.getCenterInternal(),i=this.padding_;if(i){var o=this.getViewportSizeMinusPadding_();r=I(r,this.getViewportSize_(),[o[0]/2+i[3],o[1]/2+i[0]],t,n)}return{center:r.slice(0),projection:void 0!==e?e:null,resolution:t,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:n,zoom:this.getZoom()}},t.prototype.getZoom=function(){var e,t=this.getResolution();return void 0!==t&&(e=this.getZoomForResolution(t)),e},t.prototype.getZoomForResolution=function(e){var t,n,r=this.minZoom_||0;if(this.resolutions_){var i=Object(y.e)(this.resolutions_,e,1);r=i,t=this.resolutions_[i],n=i==this.resolutions_.length-1?2:t/this.resolutions_[i+1]}else t=this.maxResolution_,n=this.zoomFactor_;return r+Math.log(t/e)/Math.log(n)},t.prototype.getResolutionForZoom=function(e){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;var t=Object(h.b)(Math.floor(e),0,this.resolutions_.length-2),n=this.resolutions_[t]/this.resolutions_[t+1];return this.resolutions_[t]/Math.pow(n,Object(h.b)(e-t,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,e-this.minZoom_)},t.prototype.fit=function(e,t){var n;if(Object(f.a)(Array.isArray(e)||"function"==typeof e.getSimplifiedGeometry,24),Array.isArray(e)){Object(f.a)(!Object(v.G)(e),25);var r=Object(u.f)(e,this.getProjection());n=Object(S.c)(r)}else if(e.getType()===i.a.CIRCLE){r=Object(u.f)(e.getExtent(),this.getProjection());(n=Object(S.c)(r)).rotate(this.getRotation(),Object(v.w)(r))}else{var o=Object(u.l)();n=o?e.clone().transform(o,this.getProjection()):e}this.fitInternal(n,t)},t.prototype.rotatedExtentForGeometry=function(e){for(var t=this.getRotation(),n=Math.cos(t),r=Math.sin(-t),i=e.getFlatCoordinates(),o=e.getStride(),a=1/0,s=1/0,l=-1/0,u=-1/0,c=0,d=i.length;cc&&f-1?i(n):n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reducer=t.actions=t.Notifs=void 0;var r=a(n(921)),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(533)),o=a(n(922));function a(e){return e&&e.__esModule?e:{default:e}}t.Notifs=o.default,t.actions=i,t.reducer=r.default},function(e,t,n){var r=n(214),i=n(539),o=n(392);e.exports=function(e,t){return o(i(e,t,r),e+"")}},function(e,t,n){var r=n(143),i=n(109),o=n(538),a=n(49);e.exports=function(e,t){return(a(e)?r:o)(e,i(t,3))}},function(e,t,n){var r=n(192),i=n(299),o=n(544),a=n(300),s=n(133),l=n(543);e.exports=function(e,t,n){if((e=s(e))&&(n||void 0===t))return e.slice(0,l(e)+1);if(!e||!(t=r(t)))return e;var u=a(e),c=o(u,a(t))+1;return i(u,0,c).join("")}},function(e,t,n){var r=n(1147),i=n(1148);e.exports=function(e,t,n){var o=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||r)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var s=0;s<16;++s)t[o+s]=a[s];return t||i(a)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addParams=function(e,t){const n=s.default.parse(e,!0);return n.query=p(p({},n.query),t),s.default.format(n)},t.getCharReplacer=_,t.getCollectionUrl=function(e,t){return m("/collections/"+e,t)},t.getNewEntryUrl=function(e,t){return m(`/collections/${e}/new`,t)},t.joinUrlPath=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r-1?e.slice(t+2):e};var r=d(n(607)),i=d(n(146)),o=d(n(422)),a=d(n(307)),s=d(n(1155)),l=d(n(1161)),u=d(n(1162)),c=d(n(1163));function d(e){return e&&e.__esModule?e:{default:e}}function f(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 p(e){for(var t=1;tn(e)?e:t}function w(e,t){const{replacement:n="",encoding:r="unicode"}=t||{};if(!(0,a.default)(e))throw new Error("The input slug must be a string.");if(!(0,a.default)(n))throw new Error("`options.replacement` must be a string.");return Array.from(e).map(_(r,n)).join("")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MEDIA_REMOVE_INSERTED=t.MEDIA_PERSIST_SUCCESS=t.MEDIA_PERSIST_REQUEST=t.MEDIA_PERSIST_FAILURE=t.MEDIA_LOAD_SUCCESS=t.MEDIA_LOAD_REQUEST=t.MEDIA_LOAD_FAILURE=t.MEDIA_LIBRARY_OPEN=t.MEDIA_LIBRARY_CREATE=t.MEDIA_LIBRARY_CLOSE=t.MEDIA_INSERT=t.MEDIA_DISPLAY_URL_SUCCESS=t.MEDIA_DISPLAY_URL_REQUEST=t.MEDIA_DISPLAY_URL_FAILURE=t.MEDIA_DELETE_SUCCESS=t.MEDIA_DELETE_REQUEST=t.MEDIA_DELETE_FAILURE=void 0,t.clearMediaControl=function(e){return(t,n)=>{const r=n().mediaLibrary.get("externalLibrary");r&&r.onClearControl({id:e})}},t.closeMediaLibrary=function(){return(e,t)=>{const n=t().mediaLibrary.get("externalLibrary");n&&n.hide(),e({type:"MEDIA_LIBRARY_CLOSE"})}},t.createMediaLibrary=function(e){const t={show:e.show||(()=>{}),hide:e.hide||(()=>{}),onClearControl:e.onClearControl||(()=>{}),onRemoveControl:e.onRemoveControl||(()=>{}),enableStandalone:e.enableStandalone||(()=>{})};return{type:"MEDIA_LIBRARY_CREATE",payload:t}},t.deleteMedia=w,t.getMediaDisplayURL=async function(e,t,n){const r=(0,c.selectMediaDisplayURL)(t,n.id);let i;if(r.get("url"))i=r.get("url");else if(r.get("err"))i=null;else{const t=n.id,o=(0,m.waitUntilWithTimeout)(e,e=>({predicate:e=>{let{type:n,payload:r}=e;return("MEDIA_DISPLAY_URL_SUCCESS"===n||"MEDIA_DISPLAY_URL_FAILURE"===n)&&r.key===t},run:(t,n,r)=>e(r.payload.url)}));r.get("isFetching")||e(x(n)),i=await o}return i},t.getMediaFile=async function(e,t){const n=(0,a.currentBackend)(e.config),{url:r}=await n.getMediaFile(t);return{url:r}},t.insertMedia=function(e,t){return(n,r)=>{const i=r(),o=i.config,a=i.entryDraft.get("entry"),s=i.entryDraft.getIn(["entry","collection"]),l=i.collections.get(s);n(function(e){return{type:"MEDIA_INSERT",payload:{mediaPath:e}}}(e=Array.isArray(e)?e.map(e=>(0,u.selectMediaFilePublicPath)(o,l,e,a,t)):(0,u.selectMediaFilePublicPath)(o,l,e,a,t)))}},t.loadMedia=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{delay:t=0,query:n="",page:r=1,privateUpload:i}=e;return async(e,o)=>{const s=o(),u=(0,a.currentBackend)(s.config),c=(0,l.selectIntegration)(s,null,"assetStore");if(c){const t=(0,d.getIntegrationProvider)(s.integrations,u.getToken,c);e(E(r));try{const o=await t.retrieve(n,r,i);return e(S(o,{page:r,canPaginate:!0,dynamicSearch:!0,dynamicSearchQuery:n,privateUpload:i}))}catch(t){return e(O({privateUpload:i}))}}function f(){return u.getMedia().then(t=>e(S(t))).catch(t=>{console.error(t),404===t.status?(console.log("This 404 was expected and handled appropriately."),e(S([]))):e(O())})}return e(E(r)),t>0?new Promise(e=>{setTimeout(()=>e(f()),t)}):f()}},t.loadMediaDisplayURL=x,t.mediaDeleteFailed=j,t.mediaDeleted=R,t.mediaDeleting=P,t.mediaDisplayURLFailure=L,t.mediaDisplayURLRequest=I,t.mediaDisplayURLSuccess=M,t.mediaLoadFailed=O,t.mediaLoaded=S,t.mediaLoading=E,t.mediaPersistFailed=A,t.mediaPersisted=T,t.mediaPersisting=C,t.openMediaLibrary=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(t,n)=>{const i=n().mediaLibrary.get("externalLibrary");if(i){const{controlID:t,value:n,config:o=(0,r.Map)(),allowMultiple:a,forImage:s}=e;i.show({id:t,value:n,config:o.toJS(),allowMultiple:a,imagesOnly:s})}t(k(e))}},t.persistMedia=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{privateUpload:n,field:r}=t;return async(t,i)=>{const m=i(),g=(0,a.currentBackend)(m.config),v=(0,l.selectIntegration)(m,null,"assetStore"),y=(0,c.selectMediaFiles)(m,r),x=(0,h.sanitizeSlug)(e.name.toLowerCase(),m.config.slug),k=y.find(e=>e.name.toLowerCase()===x),E=(0,u.selectEditingDraft)(m.entryDraft);if(!v&&k){if(!window.confirm(k.name+" already exists. Do you want to replace it?"))return;await t(w(k,{privateUpload:n}))}!v&&E||t(C());try{let i,a;if(v)try{const t=(0,d.getIntegrationProvider)(m.integrations,g.getToken,v),r=await t.upload(e,n);i=(0,s.createAssetProxy)({url:r.asset.url,path:r.asset.url})}catch(t){i=(0,s.createAssetProxy)({file:e,path:x})}else{if(n)throw new Error("The Private Upload option is only available for Asset Store Integration");{const t=m.entryDraft.get("entry"),n=m.collections.get(null==t?void 0:t.get("collection")),o=(0,u.selectMediaFilePath)(m.config,n,t,x,r);i=(0,s.createAssetProxy)({file:e,path:o,field:r})}}if(t((0,f.addAsset)(i)),v){a=_({id:await(0,o.getBlobSHA)(e),file:e,assetProxy:i,draft:!1})}else{if(E){return a=_({id:await(0,o.getBlobSHA)(e),file:e,assetProxy:i,draft:E}),t((0,p.addDraftEntryMediaFile)(a))}a=await g.persistMedia(m.config,i)}return t(T(a,{privateUpload:n}))}catch(e){return console.error(e),t(b({message:"Failed to persist media: "+e,kind:"danger",dismissAfter:8e3})),t(A({privateUpload:n}))}}},t.removeInsertedMedia=function(e){return{type:"MEDIA_REMOVE_INSERTED",payload:{controlID:e}}},t.removeMediaControl=function(e){return(t,n)=>{const r=n().mediaLibrary.get("externalLibrary");r&&r.onRemoveControl({id:e})}},t.waitForMediaLibraryToLoad=async function(e,t){!1===t.mediaLibrary.get("isLoading")||t.mediaLibrary.get("externalLibrary")||await(0,m.waitUntilWithTimeout)(e,e=>({predicate:e=>{let{type:t}=e;return"MEDIA_LOAD_SUCCESS"===t||"MEDIA_LOAD_FAILURE"===t},run:()=>e()}))};var r=n(4),i=n(165),o=n(40),a=n(145),s=n(251),l=n(121),u=n(126),c=n(321),d=n(424),f=n(200),p=n(149),h=n(170),m=n(609);function g(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){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{};const{privateUpload:n}=t;return async(t,r)=>{const i=r(),o=(0,a.currentBackend)(i.config),s=(0,l.selectIntegration)(i,null,"assetStore");if(s){const r=(0,d.getIntegrationProvider)(i.integrations,o.getToken,s);t(P());try{return await r.delete(e.id),t(R(e,{privateUpload:n}))}catch(e){return console.error(e),t(b({message:"Failed to delete media: "+e.message,kind:"danger",dismissAfter:8e3})),t(j({privateUpload:n}))}}try{if(e.draft)t((0,f.removeAsset)(e.path)),t((0,p.removeDraftEntryMediaFile)({id:e.id}));else{const n=(0,u.selectEditingDraft)(i.entryDraft);t(P()),t((0,f.removeAsset)(e.path)),await o.deleteMedia(i.config,e.path),t(R(e)),n&&t((0,p.removeDraftEntryMediaFile)({id:e.id}))}}catch(e){return console.error(e),t(b({message:"Failed to delete media: "+e.message,kind:"danger",dismissAfter:8e3})),t(j())}}}function x(e){return async(t,n)=>{const{displayURL:r,id:i}=e,o=n(),s=(0,c.selectMediaDisplayURL)(o,i);if(!i||!r||s.get("url")||s.get("isFetching")||s.get("err"))return Promise.resolve();if("string"==typeof r)return t(I(i)),void t(M(i,r));try{const e=(0,a.currentBackend)(o.config);t(I(i));const n=await e.getMediaDisplayURL(r);if(!n)throw new Error("No display URL was returned!");t(M(i,n))}catch(e){console.error(e),t(L(i,e))}}}function k(e){return{type:"MEDIA_LIBRARY_OPEN",payload:e}}function E(e){return{type:"MEDIA_LOAD_REQUEST",payload:{page:e}}}function S(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"MEDIA_LOAD_SUCCESS",payload:v({files:e},t)}}function O(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{privateUpload:t}=e;return{type:"MEDIA_LOAD_FAILURE",payload:{privateUpload:t}}}function C(){return{type:"MEDIA_PERSIST_REQUEST"}}function T(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{privateUpload:n}=t;return{type:"MEDIA_PERSIST_SUCCESS",payload:{file:e,privateUpload:n}}}function A(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{privateUpload:t}=e;return{type:"MEDIA_PERSIST_FAILURE",payload:{privateUpload:t}}}function P(){return{type:"MEDIA_DELETE_REQUEST"}}function R(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{privateUpload:n}=t;return{type:"MEDIA_DELETE_SUCCESS",payload:{file:e,privateUpload:n}}}function j(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{privateUpload:t}=e;return{type:"MEDIA_DELETE_FAILURE",payload:{privateUpload:t}}}function I(e){return{type:"MEDIA_DISPLAY_URL_REQUEST",payload:{key:e}}}function M(e,t){return{type:"MEDIA_DISPLAY_URL_SUCCESS",payload:{key:e,url:t}}}function L(e,t){return{type:"MEDIA_DISPLAY_URL_FAILURE",payload:{key:e,err:t}}}t.MEDIA_DISPLAY_URL_FAILURE="MEDIA_DISPLAY_URL_FAILURE"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"DragSource",{enumerable:!0,get:function(){return r.DragSource}}),Object.defineProperty(t,"DropTarget",{enumerable:!0,get:function(){return r.DropTarget}}),Object.defineProperty(t,"ErrorBoundary",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"FileUploadButton",{enumerable:!0,get:function(){return o.FileUploadButton}}),Object.defineProperty(t,"HTML5DragDrop",{enumerable:!0,get:function(){return r.HTML5DragDrop}}),Object.defineProperty(t,"Modal",{enumerable:!0,get:function(){return a.Modal}}),Object.defineProperty(t,"SettingsDropdown",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"Toast",{enumerable:!0,get:function(){return s.default}});var r=n(1184),i=u(n(1190)),o=n(1191),a=n(1192),s=u(n(1201)),l=u(n(1204));function u(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){var r=n(166),i=n(246),o=n(306),a=n(247),s=r((function(e,t){var n=a(t,o(s));return i(e,32,void 0,t,n)}));s.placeholder={},e.exports=s},function(e,t,n){"use strict";var r=n(323);e.exports=function(e){return function(t){return e.test(r(t))}}},function(e,t,n){"use strict";var r={};function i(e,t,n){var o,a,s,l,u,c="";for("string"!=typeof t&&(n=t,t=i.defaultChars),void 0===n&&(n=!0),u=function(e){var t,n,i=r[e];if(i)return i;for(i=r[e]=[],t=0;t<128;t++)n=String.fromCharCode(t),/^[0-9a-z]$/i.test(n)?i.push(n):i.push("%"+("0"+t.toString(16).toUpperCase()).slice(-2));for(t=0;t=55296&&s<=57343){if(s>=55296&&s<=56319&&o+1=56320&&l<=57343){c+=encodeURIComponent(e[o]+e[o+1]),o++;continue}c+="%EF%BF%BD"}else c+=encodeURIComponent(e[o]);return c}i.defaultChars=";/?:@&=+$,-_.!~*'()#",i.componentChars="-_.!~*'()",e.exports=i},function(e,t,n){"use strict";n.d(t,"a",(function(){return re})),n.d(t,"b",(function(){return T})),n.d(t,"c",(function(){return H})),n.d(t,"d",(function(){return W}));var r=n(11),i=n(22),o=n(80),a=n(81),s=n(91),l=n(279),u=n(0),c=n.n(u),d=n(26),f=n(114),p=n(130);for(var h={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},m=function(e){return Object(d.c)("span",Object(r.a)({css:h},e))},g={guidance:function(e){var t=e.isSearchable,n=e.isMulti,r=e.isDisabled,i=e.tabSelectsValue;switch(e.context){case"menu":return"Use Up and Down to choose options".concat(r?"":", press Enter to select the currently focused option",", press Escape to exit the menu").concat(i?", press Tab to select the option and exit the menu":"",".");case"input":return"".concat(e["aria-label"]||"Select"," is focused ").concat(t?",type to refine list":"",", press Down to open the menu, ").concat(n?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(e){var t=e.action,n=e.label,r=void 0===n?"":n,i=e.isDisabled;switch(t){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(r,", deselected.");case"select-option":return"option ".concat(r,i?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,r=void 0===n?{}:n,i=e.options,o=e.label,a=void 0===o?"":o,s=e.selectValue,l=e.isDisabled,u=e.isSelected,c=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&s)return"value ".concat(a," focused, ").concat(c(s,r),".");if("menu"===t){var d=l?" disabled":"",f="".concat(u?"selected":"focused").concat(d);return"option ".concat(a," ").concat(f,", ").concat(c(i,r),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},v=function(e){var t=e.ariaSelection,n=e.focusedOption,r=e.focusedValue,o=e.focusableOptions,a=e.isFocused,s=e.selectValue,l=e.selectProps,f=l.ariaLiveMessages,p=l.getOptionLabel,h=l.inputValue,v=l.isMulti,y=l.isOptionDisabled,b=l.isSearchable,_=l.menuIsOpen,w=l.options,x=l.screenReaderStatus,k=l.tabSelectsValue,E=l["aria-label"],S=l["aria-live"],O=Object(u.useMemo)((function(){return Object(i.k)(Object(i.k)({},g),f||{})}),[f]),C=Object(u.useMemo)((function(){var e,n="";if(t&&O.onChange){var r=t.option,o=t.removedValue,a=t.value,s=o||r||(e=a,Array.isArray(e)?null:e),l=Object(i.k)({isDisabled:s&&y(s),label:s?p(s):""},t);n=O.onChange(l)}return n}),[t,y,p,O]),T=Object(u.useMemo)((function(){var e="",t=n||r,i=!!(n&&s&&s.includes(n));if(t&&O.onFocus){var o={focused:t,label:p(t),isDisabled:y(t),isSelected:i,options:w,context:t===n?"menu":"value",selectValue:s};e=O.onFocus(o)}return e}),[n,r,p,y,O,w,s]),A=Object(u.useMemo)((function(){var e="";if(_&&w.length&&O.onFilter){var t=x({count:o.length});e=O.onFilter({inputValue:h,resultsMessage:t})}return e}),[o,h,_,O,w,x]),P=Object(u.useMemo)((function(){var e="";if(O.guidance){var t=r?"value":_?"menu":"input";e=O.guidance({"aria-label":E,context:t,isDisabled:n&&y(n),isMulti:v,isSearchable:b,tabSelectsValue:k})}return e}),[E,n,r,v,y,b,_,O,k]),R="".concat(T," ").concat(A," ").concat(P);return Object(d.c)(m,{"aria-live":S,"aria-atomic":"false","aria-relevant":"additions text"},a&&Object(d.c)(c.a.Fragment,null,Object(d.c)("span",{id:"aria-selection"},C),Object(d.c)("span",{id:"aria-context"},R)))},y=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],b=new RegExp("["+y.map((function(e){return e.letters})).join("")+"]","g"),_={},w=0;w-1}};function A(e){e.in,e.out,e.onExited,e.appear,e.enter,e.exit;var t=e.innerRef;e.emotion;var n=Object(p.a)(e,["in","out","onExited","appear","enter","exit","innerRef","emotion"]);return Object(d.c)("input",Object(r.a)({ref:t},n,{css:Object(d.b)({label:"dummyInput",background:0,border:0,fontSize:"inherit",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(0)"},"","")}))}var P=["boxSizing","height","overflow","paddingRight","position"],R={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function j(e){e.preventDefault()}function I(e){e.stopPropagation()}function M(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function L(){return"ontouchstart"in window||navigator.maxTouchPoints}var D=!("undefined"==typeof window||!window.document||!window.document.createElement),N=0,F={capture:!1,passive:!1};var B=function(){return document.activeElement&&document.activeElement.blur()},z={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function U(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,o=function(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,o=e.onTopArrive,a=e.onTopLeave,s=Object(u.useRef)(!1),l=Object(u.useRef)(!1),c=Object(u.useRef)(0),d=Object(u.useRef)(null),f=Object(u.useCallback)((function(e,t){if(null!==d.current){var i=d.current,u=i.scrollTop,c=i.scrollHeight,f=i.clientHeight,p=d.current,h=t>0,m=c-f-u,g=!1;m>t&&s.current&&(r&&r(e),s.current=!1),h&&l.current&&(a&&a(e),l.current=!1),h&&t>m?(n&&!s.current&&n(e),p.scrollTop=c,g=!0,s.current=!0):!h&&-t>u&&(o&&!l.current&&o(e),p.scrollTop=0,g=!0,l.current=!0),g&&function(e){e.preventDefault(),e.stopPropagation()}(e)}}),[]),p=Object(u.useCallback)((function(e){f(e,e.deltaY)}),[f]),h=Object(u.useCallback)((function(e){c.current=e.changedTouches[0].clientY}),[]),m=Object(u.useCallback)((function(e){var t=c.current-e.changedTouches[0].clientY;f(e,t)}),[f]),g=Object(u.useCallback)((function(e){if(e){var t=!!i.C&&{passive:!1};"function"==typeof e.addEventListener&&e.addEventListener("wheel",p,t),"function"==typeof e.addEventListener&&e.addEventListener("touchstart",h,t),"function"==typeof e.addEventListener&&e.addEventListener("touchmove",m,t)}}),[m,h,p]),v=Object(u.useCallback)((function(e){e&&("function"==typeof e.removeEventListener&&e.removeEventListener("wheel",p,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchstart",h,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchmove",m,!1))}),[m,h,p]);return Object(u.useEffect)((function(){if(t){var e=d.current;return g(e),function(){v(e)}}}),[t,g,v]),function(e){d.current=e}}({isEnabled:void 0===r||r,onBottomArrive:e.onBottomArrive,onBottomLeave:e.onBottomLeave,onTopArrive:e.onTopArrive,onTopLeave:e.onTopLeave}),a=function(e){var t=e.isEnabled,n=e.accountForScrollbars,r=void 0===n||n,i=Object(u.useRef)({}),o=Object(u.useRef)(null),a=Object(u.useCallback)((function(e){if(D){var t=document.body,n=t&&t.style;if(r&&P.forEach((function(e){var t=n&&n[e];i.current[e]=t})),r&&N<1){var o=parseInt(i.current.paddingRight,10)||0,a=document.body?document.body.clientWidth:0,s=window.innerWidth-a+o||0;Object.keys(R).forEach((function(e){var t=R[e];n&&(n[e]=t)})),n&&(n.paddingRight="".concat(s,"px"))}t&&L()&&(t.addEventListener("touchmove",j,F),e&&(e.addEventListener("touchstart",M,F),e.addEventListener("touchmove",I,F))),N+=1}}),[]),s=Object(u.useCallback)((function(e){if(D){var t=document.body,n=t&&t.style;N=Math.max(N-1,0),r&&N<1&&P.forEach((function(e){var t=i.current[e];n&&(n[e]=t)})),t&&L()&&(t.removeEventListener("touchmove",j,F),e&&(e.removeEventListener("touchstart",M,F),e.removeEventListener("touchmove",I,F)))}}),[]);return Object(u.useEffect)((function(){if(t){var e=o.current;return a(e),function(){s(e)}}}),[t,a,s]),function(e){o.current=e}}({isEnabled:n});return Object(d.c)(c.a.Fragment,null,n&&Object(d.c)("div",{onClick:B,css:z}),t((function(e){o(e),a(e)})))}var q={clearIndicator:i.l,container:i.n,control:i.o,dropdownIndicator:i.p,group:i.q,groupHeading:i.r,indicatorsContainer:i.s,indicatorSeparator:i.t,input:i.u,loadingIndicator:i.v,loadingMessage:i.w,menu:i.x,menuList:i.y,menuPortal:i.z,multiValue:i.A,multiValueLabel:i.B,multiValueRemove:i.D,noOptionsMessage:i.E,option:i.F,placeholder:i.G,singleValue:i.H,valueContainer:i.I};function W(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object(i.k)({},e);return Object.keys(t).forEach((function(r){e[r]?n[r]=function(n,i){return t[r](e[r](n,i),i)}:n[r]=t[r]})),n}var H={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},$={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Object(i.J)(),captureMenuScroll:!Object(i.J)(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:T(),formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!Object(i.a)(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:"0",tabSelectsValue:!0};function V(e,t,n,r){return{type:"option",data:t,isDisabled:Z(e,t,n),isSelected:J(e,t,n),label:Q(e,t),value:X(e,t),index:r}}function G(e,t){return e.options.map((function(n,r){if(n.options){var i=n.options.map((function(n,r){return V(e,n,t,r)})).filter((function(t){return Y(e,t)}));return i.length>0?{type:"group",data:n,options:i,index:r}:void 0}var o=V(e,n,t,r);return Y(e,o)?o:void 0})).filter((function(e){return!!e}))}function K(e){return e.reduce((function(e,t){return"group"===t.type?e.push.apply(e,Object(l.a)(t.options.map((function(e){return e.data})))):e.push(t.data),e}),[])}function Y(e,t){var n=e.inputValue,r=void 0===n?"":n,i=t.data,o=t.isSelected,a=t.label,s=t.value;return(!te(e)||!o)&&ee(e,{label:a,value:s,data:i},r)}var Q=function(e,t){return e.getOptionLabel(t)},X=function(e,t){return e.getOptionValue(t)};function Z(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function J(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var r=X(e,t);return n.some((function(t){return X(e,t)===r}))}function ee(e,t,n){return!e.filterOption||e.filterOption(t,n)}var te=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},ne=1,re=function(e){Object(s.a)(n,e);var t=Object(i.j)(n);function n(e){var r;return Object(o.a)(this,n),(r=t.call(this,e)).state={ariaSelection:null,focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0},r.blockOptionHover=!1,r.isComposing=!1,r.commonProps=void 0,r.initialTouchX=0,r.initialTouchY=0,r.instancePrefix="",r.openAfterFocus=!1,r.scrollToFocusedOptionOnUpdate=!1,r.userIsDragging=void 0,r.controlRef=null,r.getControlRef=function(e){r.controlRef=e},r.focusedOptionRef=null,r.getFocusedOptionRef=function(e){r.focusedOptionRef=e},r.menuListRef=null,r.getMenuListRef=function(e){r.menuListRef=e},r.inputRef=null,r.getInputRef=function(e){r.inputRef=e},r.focus=r.focusInput,r.blur=r.blurInput,r.onChange=function(e,t){var n=r.props,i=n.onChange,o=n.name;t.name=o,r.ariaOnChange(e,t),i(e,t)},r.setValue=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"set-value",n=arguments.length>2?arguments[2]:void 0,i=r.props,o=i.closeMenuOnSelect,a=i.isMulti;r.onInputChange("",{action:"set-value"}),o&&(r.setState({inputIsHiddenAfterUpdate:!a}),r.onMenuClose()),r.setState({clearFocusValueOnUpdate:!0}),r.onChange(e,{action:t,option:n})},r.selectOption=function(e){var t=r.props,n=t.blurInputOnSelect,i=t.isMulti,o=t.name,a=r.state.selectValue,s=i&&r.isOptionSelected(e,a),u=r.isOptionDisabled(e,a);if(s){var c=r.getOptionValue(e);r.setValue(a.filter((function(e){return r.getOptionValue(e)!==c})),"deselect-option",e)}else{if(u)return void r.ariaOnChange(e,{action:"select-option",name:o});i?r.setValue([].concat(Object(l.a)(a),[e]),"select-option",e):r.setValue(e,"select-option")}n&&r.blurInput()},r.removeValue=function(e){var t=r.props.isMulti,n=r.state.selectValue,i=r.getOptionValue(e),o=n.filter((function(e){return r.getOptionValue(e)!==i})),a=t?o:o[0]||null;r.onChange(a,{action:"remove-value",removedValue:e}),r.focusInput()},r.clearValue=function(){var e=r.state.selectValue;r.onChange(r.props.isMulti?[]:null,{action:"clear",removedValues:e})},r.popValue=function(){var e=r.props.isMulti,t=r.state.selectValue,n=t[t.length-1],i=t.slice(0,t.length-1),o=e?i:i[0]||null;r.onChange(o,{action:"pop-value",removedValue:n})},r.getValue=function(){return r.state.selectValue},r.cx=function(){for(var e=arguments.length,t=new Array(e),n=0;n5||o>5}},r.onTouchEnd=function(e){r.userIsDragging||(r.controlRef&&!r.controlRef.contains(e.target)&&r.menuListRef&&!r.menuListRef.contains(e.target)&&r.blurInput(),r.initialTouchX=0,r.initialTouchY=0)},r.onControlTouchEnd=function(e){r.userIsDragging||r.onControlMouseDown(e)},r.onClearIndicatorTouchEnd=function(e){r.userIsDragging||r.onClearIndicatorMouseDown(e)},r.onDropdownIndicatorTouchEnd=function(e){r.userIsDragging||r.onDropdownIndicatorMouseDown(e)},r.handleInputChange=function(e){var t=e.currentTarget.value;r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange(t,{action:"input-change"}),r.props.menuIsOpen||r.onMenuOpen()},r.onInputFocus=function(e){r.props.onFocus&&r.props.onFocus(e),r.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(r.openAfterFocus||r.props.openMenuOnFocus)&&r.openMenu("first"),r.openAfterFocus=!1},r.onInputBlur=function(e){r.menuListRef&&r.menuListRef.contains(document.activeElement)?r.inputRef.focus():(r.props.onBlur&&r.props.onBlur(e),r.onInputChange("",{action:"input-blur"}),r.onMenuClose(),r.setState({focusedValue:null,isFocused:!1}))},r.onOptionHover=function(e){r.blockOptionHover||r.state.focusedOption===e||r.setState({focusedOption:e})},r.shouldHideSelectedOptions=function(){return te(r.props)},r.onKeyDown=function(e){var t=r.props,n=t.isMulti,i=t.backspaceRemovesValue,o=t.escapeClearsValue,a=t.inputValue,s=t.isClearable,l=t.isDisabled,u=t.menuIsOpen,c=t.onKeyDown,d=t.tabSelectsValue,f=t.openMenuOnFocus,p=r.state,h=p.focusedOption,m=p.focusedValue,g=p.selectValue;if(!(l||"function"==typeof c&&(c(e),e.defaultPrevented))){switch(r.blockOptionHover=!0,e.key){case"ArrowLeft":if(!n||a)return;r.focusValue("previous");break;case"ArrowRight":if(!n||a)return;r.focusValue("next");break;case"Delete":case"Backspace":if(a)return;if(m)r.removeValue(m);else{if(!i)return;n?r.popValue():s&&r.clearValue()}break;case"Tab":if(r.isComposing)return;if(e.shiftKey||!u||!d||!h||f&&r.isOptionSelected(h,g))return;r.selectOption(h);break;case"Enter":if(229===e.keyCode)break;if(u){if(!h)return;if(r.isComposing)return;r.selectOption(h);break}return;case"Escape":u?(r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange("",{action:"menu-close"}),r.onMenuClose()):s&&o&&r.clearValue();break;case" ":if(a)return;if(!u){r.openMenu("first");break}if(!h)return;r.selectOption(h);break;case"ArrowUp":u?r.focusOption("up"):r.openMenu("last");break;case"ArrowDown":u?r.focusOption("down"):r.openMenu("first");break;case"PageUp":if(!u)return;r.focusOption("pageup");break;case"PageDown":if(!u)return;r.focusOption("pagedown");break;case"Home":if(!u)return;r.focusOption("first");break;case"End":if(!u)return;r.focusOption("last");break;default:return}e.preventDefault()}},r.instancePrefix="react-select-"+(r.props.instanceId||++ne),r.state.selectValue=Object(i.e)(e.value),r}return Object(a.a)(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isDisabled,r=t.menuIsOpen,o=this.state.isFocused;(o&&!n&&e.isDisabled||o&&r&&!e.menuIsOpen)&&this.focusInput(),o&&n&&!e.isDisabled&&this.setState({isFocused:!1},this.onMenuClose),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(Object(i.f)(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close"}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this,n=this.state,r=n.selectValue,i=n.isFocused,o=this.buildFocusableOptions(),a="first"===e?0:o.length-1;if(!this.props.isMulti){var s=o.indexOf(r[0]);s>-1&&(a=s)}this.scrollToFocusedOptionOnUpdate=!(i&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:o[a]},(function(){return t.onMenuOpen()}))}},{key:"focusValue",value:function(e){var t=this.state,n=t.selectValue,r=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var i=n.indexOf(r);r||(i=-1);var o=n.length-1,a=-1;if(n.length){switch(e){case"previous":a=0===i?0:-1===i?o:i-1;break;case"next":i>-1&&i0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state.focusedOption,r=this.getFocusableOptions();if(r.length){var i=0,o=r.indexOf(n);n||(o=-1),"up"===e?i=o>0?o-1:r.length-1:"down"===e?i=(o+1)%r.length:"pageup"===e?(i=o-t)<0&&(i=0):"pagedown"===e?(i=o+t)>r.length-1&&(i=r.length-1):"last"===e&&(i=r.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:r[i],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(H):Object(i.k)(Object(i.k)({},H),this.props.theme):H}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,r=this.getValue,i=this.selectOption,o=this.setValue,a=this.props,s=a.isMulti,l=a.isRtl,u=a.options;return{clearValue:e,cx:t,getStyles:n,getValue:r,hasValue:this.hasValue(),isMulti:s,isRtl:l,options:u,selectOption:i,selectProps:a,setValue:o,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return Z(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return J(this.props,e,t)}},{key:"filterOption",value:function(e,t){return ee(this.props,e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,o=e.inputId,a=e.inputValue,s=e.tabIndex,l=e.form,u=this.getComponents().Input,d=this.state.inputIsHidden,f=this.commonProps,p=o||this.getElementId("input"),h={"aria-autocomplete":"list","aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]};return n?c.a.createElement(u,Object(r.a)({},f,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:p,innerRef:this.getInputRef,isDisabled:t,isHidden:d,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:s,form:l,type:"text",value:a},h)):c.a.createElement(A,Object(r.a)({id:p,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:i.g,onFocus:this.onInputFocus,readOnly:!0,disabled:t,tabIndex:s,form:l,value:""},h))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.getComponents(),n=t.MultiValue,i=t.MultiValueContainer,o=t.MultiValueLabel,a=t.MultiValueRemove,s=t.SingleValue,l=t.Placeholder,u=this.commonProps,d=this.props,f=d.controlShouldRenderValue,p=d.isDisabled,h=d.isMulti,m=d.inputValue,g=d.placeholder,v=this.state,y=v.selectValue,b=v.focusedValue,_=v.isFocused;if(!this.hasValue()||!f)return m?null:c.a.createElement(l,Object(r.a)({},u,{key:"placeholder",isDisabled:p,isFocused:_}),g);if(h)return y.map((function(t,s){var l=t===b;return c.a.createElement(n,Object(r.a)({},u,{components:{Container:i,Label:o,Remove:a},isFocused:l,isDisabled:p,key:"".concat(e.getOptionValue(t)).concat(s),index:s,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault(),e.stopPropagation()}},data:t}),e.formatOptionLabel(t,"value"))}));if(m)return null;var w=y[0];return c.a.createElement(s,Object(r.a)({},u,{data:w,isDisabled:p}),this.formatOptionLabel(w,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.getComponents().ClearIndicator,t=this.commonProps,n=this.props,i=n.isDisabled,o=n.isLoading,a=this.state.isFocused;if(!this.isClearable()||!e||i||!this.hasValue()||o)return null;var s={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return c.a.createElement(e,Object(r.a)({},t,{innerProps:s,isFocused:a}))}},{key:"renderLoadingIndicator",value:function(){var e=this.getComponents().LoadingIndicator,t=this.commonProps,n=this.props,i=n.isDisabled,o=n.isLoading,a=this.state.isFocused;if(!e||!o)return null;return c.a.createElement(e,Object(r.a)({},t,{innerProps:{"aria-hidden":"true"},isDisabled:i,isFocused:a}))}},{key:"renderIndicatorSeparator",value:function(){var e=this.getComponents(),t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var i=this.commonProps,o=this.props.isDisabled,a=this.state.isFocused;return c.a.createElement(n,Object(r.a)({},i,{isDisabled:o,isFocused:a}))}},{key:"renderDropdownIndicator",value:function(){var e=this.getComponents().DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,i=this.state.isFocused,o={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return c.a.createElement(e,Object(r.a)({},t,{innerProps:o,isDisabled:n,isFocused:i}))}},{key:"renderMenu",value:function(){var e=this,t=this.getComponents(),n=t.Group,o=t.GroupHeading,a=t.Menu,s=t.MenuList,l=t.MenuPortal,u=t.LoadingMessage,d=t.NoOptionsMessage,f=t.Option,p=this.commonProps,h=this.state.focusedOption,m=this.props,g=m.captureMenuScroll,v=m.inputValue,y=m.isLoading,b=m.loadingMessage,_=m.minMenuHeight,w=m.maxMenuHeight,x=m.menuIsOpen,k=m.menuPlacement,E=m.menuPosition,S=m.menuPortalTarget,O=m.menuShouldBlockScroll,C=m.menuShouldScrollIntoView,T=m.noOptionsMessage,A=m.onMenuScrollToTop,P=m.onMenuScrollToBottom;if(!x)return null;var R,j=function(t,n){var i=t.type,o=t.data,a=t.isDisabled,s=t.isSelected,l=t.label,u=t.value,d=h===o,m=a?void 0:function(){return e.onOptionHover(o)},g=a?void 0:function(){return e.selectOption(o)},v="".concat(e.getElementId("option"),"-").concat(n),y={id:v,onClick:g,onMouseMove:m,onMouseOver:m,tabIndex:-1};return c.a.createElement(f,Object(r.a)({},p,{innerProps:y,data:o,isDisabled:a,isSelected:s,key:v,label:l,type:i,value:u,isFocused:d,innerRef:d?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())R=this.getCategorizedOptions().map((function(t){if("group"===t.type){var i=t.data,a=t.options,s=t.index,l="".concat(e.getElementId("group"),"-").concat(s),u="".concat(l,"-heading");return c.a.createElement(n,Object(r.a)({},p,{key:l,data:i,options:a,Heading:o,headingProps:{id:u,data:t.data},label:e.formatGroupLabel(t.data)}),t.options.map((function(e){return j(e,"".concat(s,"-").concat(e.index))})))}if("option"===t.type)return j(t,"".concat(t.index))}));else if(y){var I=b({inputValue:v});if(null===I)return null;R=c.a.createElement(u,p,I)}else{var M=T({inputValue:v});if(null===M)return null;R=c.a.createElement(d,p,M)}var L={minMenuHeight:_,maxMenuHeight:w,menuPlacement:k,menuPosition:E,menuShouldScrollIntoView:C},D=c.a.createElement(i.i,Object(r.a)({},p,L),(function(t){var n=t.ref,i=t.placerProps,o=i.placement,l=i.maxHeight;return c.a.createElement(a,Object(r.a)({},p,L,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:y,placement:o}),c.a.createElement(U,{captureEnabled:g,onTopArrive:A,onBottomArrive:P,lockEnabled:O},(function(t){return c.a.createElement(s,Object(r.a)({},p,{innerRef:function(n){e.getMenuListRef(n),t(n)},isLoading:y,maxHeight:l,focusedOption:h}),R)})))}));return S||"fixed"===E?c.a.createElement(l,Object(r.a)({},p,{appendTo:S,controlElement:this.controlRef,menuPlacement:k,menuPosition:E}),D):D}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,i=t.isMulti,o=t.name,a=this.state.selectValue;if(o&&!r){if(i){if(n){var s=a.map((function(t){return e.getOptionValue(t)})).join(n);return c.a.createElement("input",{name:o,type:"hidden",value:s})}var l=a.length>0?a.map((function(t,n){return c.a.createElement("input",{key:"i-".concat(n),name:o,type:"hidden",value:e.getOptionValue(t)})})):c.a.createElement("input",{name:o,type:"hidden"});return c.a.createElement("div",null,l)}var u=a[0]?this.getOptionValue(a[0]):"";return c.a.createElement("input",{name:o,type:"hidden",value:u})}}},{key:"renderLiveRegion",value:function(){var e=this.commonProps,t=this.state,n=t.ariaSelection,i=t.focusedOption,o=t.focusedValue,a=t.isFocused,s=t.selectValue,l=this.getFocusableOptions();return c.a.createElement(v,Object(r.a)({},e,{ariaSelection:n,focusedOption:i,focusedValue:o,isFocused:a,selectValue:s,focusableOptions:l}))}},{key:"render",value:function(){var e=this.getComponents(),t=e.Control,n=e.IndicatorsContainer,i=e.SelectContainer,o=e.ValueContainer,a=this.props,s=a.className,l=a.id,u=a.isDisabled,d=a.menuIsOpen,f=this.state.isFocused,p=this.commonProps=this.getCommonProps();return c.a.createElement(i,Object(r.a)({},p,{className:s,innerProps:{id:l,onKeyDown:this.onKeyDown},isDisabled:u,isFocused:f}),this.renderLiveRegion(),c.a.createElement(t,Object(r.a)({},p,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:u,isFocused:f,menuIsOpen:d}),c.a.createElement(o,Object(r.a)({},p,{isDisabled:u}),this.renderPlaceholderOrValue(),this.renderInput()),c.a.createElement(n,Object(r.a)({},p,{isDisabled:u}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r=t.clearFocusValueOnUpdate,o=t.inputIsHiddenAfterUpdate,a=e.options,s=e.value,l=e.menuIsOpen,u=e.inputValue,c={};if(n&&(s!==n.value||a!==n.options||l!==n.menuIsOpen||u!==n.inputValue)){var d=Object(i.e)(s),f=l?function(e,t){return K(G(e,t))}(e,d):[],p=r?function(e,t){var n=e.focusedValue,r=e.selectValue.indexOf(n);if(r>-1){if(t.indexOf(n)>-1)return n;if(r-1?n:t[0]}(t,f),focusedValue:p,clearFocusValueOnUpdate:!1}}var h=null!=o&&e!==n?{inputIsHidden:o,inputIsHiddenAfterUpdate:void 0}:{};return Object(i.k)(Object(i.k)(Object(i.k)({},c),h),{},{prevProps:e})}}]),n}(u.Component);re.defaultProps=$},function(e,t,n){var r=n(143),i=n(309),o=n(680),a=n(191),s=n(217),l=n(1467),u=n(304),c=n(407),d=u((function(e,t){var n={};if(null==e)return n;var u=!1;t=r(t,(function(t){return t=a(t,e),u||(u=t.length>1),t})),s(e,c(e),n),u&&(n=i(n,7,l));for(var d=t.length;d--;)o(n,t[d]);return n}));e.exports=d},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return s})),n.d(t,"c",(function(){return l})),n.d(t,"d",(function(){return u}));var r=n(3),i=n(358),o=n(116);function a(e,t,n,o,a){var s=Object(r.r)(Object(r.j)(),e,t,n,o);return!!Object(r.E)(a,s)&&(!!Object(r.g)(a,s)||(s[0]>=a[0]&&s[2]<=a[2]||(s[1]>=a[1]&&s[3]<=a[3]||Object(i.a)(e,t,n,o,(function(e,t){return Object(r.F)(a,e,t)})))))}function s(e,t,n,r,i){for(var o=0,s=n.length;o0}function o(e,t,n,r,o){for(var a=void 0!==o&&o,s=0,l=n.length;se.size,";height:",e=>e.size,";transform:",e=>`rotate(${e.rotation})`,";& path:not(.no-fill),& circle:not(.no-fill),& polygon:not(.no-fill),& rect:not(.no-fill){fill:currentColor;}& path.clipped{fill:transparent;}svg{width:100%;height:100%;}");function u(e,t){if(!e||!t)return"0deg";const n={right:90,down:180,left:270,up:360};return n[t]-n[e]+"deg"}const c={xsmall:"12px",small:"18px",medium:"24px",large:"32px"};function d(e){let{type:t,direction:n,size:r="medium",className:i}=e;const s=o.default[t].image;return(0,a.jsx)(l,{className:i,size:c[r]||r,rotation:u(o.default[t].direction,n)},(0,a.jsx)(s,null))}d.propTypes={type:i.default.string.isRequired,direction:i.default.oneOf(["right","down","left","up"]),size:i.default.string,className:i.default.string};var f=(0,r.default)(d,{target:"ei6fm2r1"})("");t.default=f},function(e,t,n){var r=n(815),i=n(820);e.exports=function(e,t){var n=i(e,t);return r(n)?n:void 0}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){var r=n(49),i=n(384),o=n(510),a=n(133);e.exports=function(e,t){return r(e)?e:i(e,t)?[e]:o(a(e))}},function(e,t,n){var r=n(209),i=n(143),o=n(49),a=n(213),s=r?r.prototype:void 0,l=s?s.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(o(t))return i(t,e)+"";if(a(t))return l?l.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},function(e,t,n){(function(t){!function(n){"use strict";var r=function(e){setTimeout(e,0)};void 0!==t&&t&&"function"==typeof t.nextTick&&(r=t.nextTick),e.exports=function(e){var t={capacity:e||1,current:0,queue:[],firstHere:!1,take:function(){if(!1===t.firstHere){t.current++,t.firstHere=!0;var e=1}else e=0;var n={n:1};"function"==typeof arguments[0]?n.task=arguments[0]:n.n=arguments[0],arguments.length>=2&&("function"==typeof arguments[1]?n.task=arguments[1]:n.n=arguments[1]);var r=n.task;if(n.task=function(){r(t.leave)},t.current+n.n-e>t.capacity)return 1===e&&(t.current--,t.firstHere=!1),t.queue.push(n);t.current+=n.n-e,n.task(t.leave),1===e&&(t.firstHere=!1)},leave:function(e){if(e=e||1,t.current-=e,t.queue.length){var n=t.queue[0];n.n+t.current>t.capacity||(t.queue.shift(),t.current+=n.n,r(n.task))}else if(t.current<0)throw new Error("leave called too many times.")},available:function(e){return e=e||1,t.current+e<=t.capacity}};return t}}()}).call(this,n(97))},function(e,t){e.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},function(e,t,n){(function(e){e.exports=function(){"use strict";var t,n;function r(){return t.apply(null,arguments)}function i(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function o(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function a(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function s(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(a(e,t))return!1;return!0}function l(e){return void 0===e}function u(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function c(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function d(e,t){var n,r=[],i=e.length;for(n=0;n>>0;for(t=0;t0)for(n=0;n=0?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}r.suppressDeprecationWarnings=!1,r.deprecationHandler=null,E=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)a(e,t)&&n.push(t);return n};var R=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,j=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,I={},M={};function L(e,t,n,r){var i=r;"string"==typeof r&&(i=function(){return this[r]()}),e&&(M[e]=i),t&&(M[t[0]]=function(){return P(i.apply(this,arguments),t[1],t[2])}),n&&(M[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function D(e,t){return e.isValid()?(t=N(t,e.localeData()),I[t]=I[t]||function(e){var t,n,r,i=e.match(R);for(t=0,n=i.length;t=0&&j.test(e);)e=e.replace(j,r),j.lastIndex=0,n-=1;return e}var F={};function B(e,t){var n=e.toLowerCase();F[n]=F[n+"s"]=F[t]=e}function z(e){return"string"==typeof e?F[e]||F[e.toLowerCase()]:void 0}function U(e){var t,n,r={};for(n in e)a(e,n)&&(t=z(n))&&(r[t]=e[n]);return r}var q={};function W(e,t){q[e]=t}function H(e){return e%4==0&&e%100!=0||e%400==0}function $(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function V(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=$(t)),n}function G(e,t){return function(n){return null!=n?(Y(this,e,n),r.updateOffset(this,t),this):K(this,e)}}function K(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function Y(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&H(e.year())&&1===e.month()&&29===e.date()?(n=V(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),we(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}var Q,X=/\d/,Z=/\d\d/,J=/\d{3}/,ee=/\d{4}/,te=/[+-]?\d{6}/,ne=/\d\d?/,re=/\d\d\d\d?/,ie=/\d\d\d\d\d\d?/,oe=/\d{1,3}/,ae=/\d{1,4}/,se=/[+-]?\d{1,6}/,le=/\d+/,ue=/[+-]?\d+/,ce=/Z|[+-]\d\d:?\d\d/gi,de=/Z|[+-]\d\d(?::?\d\d)?/gi,fe=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;function pe(e,t,n){Q[e]=C(t)?t:function(e,r){return e&&n?n:t}}function he(e,t){return a(Q,e)?Q[e](t._strict,t._locale):new RegExp(me(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,n,r,i){return t||n||r||i}))))}function me(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}Q={};var ge,ve={};function ye(e,t){var n,r,i=t;for("string"==typeof e&&(e=[e]),u(t)&&(i=function(e,n){n[t]=V(e)}),r=e.length,n=0;n68?1900:2e3)};var je=G("FullYear",!0);function Ie(e,t,n,r,i,o,a){var s;return e<100&&e>=0?(s=new Date(e+400,t,n,r,i,o,a),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,n,r,i,o,a),s}function Me(e){var t,n;return e<100&&e>=0?((n=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Le(e,t,n){var r=7+t-n;return-(7+Me(e,0,r).getUTCDay()-t)%7+r-1}function De(e,t,n,r,i){var o,a,s=1+7*(t-1)+(7+n-r)%7+Le(e,r,i);return s<=0?a=Re(o=e-1)+s:s>Re(e)?(o=e+1,a=s-Re(e)):(o=e,a=s),{year:o,dayOfYear:a}}function Ne(e,t,n){var r,i,o=Le(e.year(),t,n),a=Math.floor((e.dayOfYear()-o-1)/7)+1;return a<1?r=a+Fe(i=e.year()-1,t,n):a>Fe(e.year(),t,n)?(r=a-Fe(e.year(),t,n),i=e.year()+1):(i=e.year(),r=a),{week:r,year:i}}function Fe(e,t,n){var r=Le(e,t,n),i=Le(e+1,t,n);return(Re(e)-r+i)/7}function Be(e,t){return e.slice(t,7).concat(e.slice(0,t))}L("w",["ww",2],"wo","week"),L("W",["WW",2],"Wo","isoWeek"),B("week","w"),B("isoWeek","W"),W("week",5),W("isoWeek",5),pe("w",ne),pe("ww",ne,Z),pe("W",ne),pe("WW",ne,Z),be(["w","ww","W","WW"],(function(e,t,n,r){t[r.substr(0,1)]=V(e)})),L("d",0,"do","day"),L("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),L("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),L("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),L("e",0,0,"weekday"),L("E",0,0,"isoWeekday"),B("day","d"),B("weekday","e"),B("isoWeekday","E"),W("day",11),W("weekday",11),W("isoWeekday",11),pe("d",ne),pe("e",ne),pe("E",ne),pe("dd",(function(e,t){return t.weekdaysMinRegex(e)})),pe("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),pe("dddd",(function(e,t){return t.weekdaysRegex(e)})),be(["dd","ddd","dddd"],(function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);null!=i?t.d=i:h(n).invalidWeekday=e})),be(["d","e","E"],(function(e,t,n,r){t[r]=V(e)}));var ze="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Ue="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),qe="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),We=fe,He=fe,$e=fe;function Ve(e,t,n){var r,i,o,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)o=p([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(o,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(i=ge.call(this._weekdaysParse,a))?i:null:"ddd"===t?-1!==(i=ge.call(this._shortWeekdaysParse,a))?i:null:-1!==(i=ge.call(this._minWeekdaysParse,a))?i:null:"dddd"===t?-1!==(i=ge.call(this._weekdaysParse,a))||-1!==(i=ge.call(this._shortWeekdaysParse,a))||-1!==(i=ge.call(this._minWeekdaysParse,a))?i:null:"ddd"===t?-1!==(i=ge.call(this._shortWeekdaysParse,a))||-1!==(i=ge.call(this._weekdaysParse,a))||-1!==(i=ge.call(this._minWeekdaysParse,a))?i:null:-1!==(i=ge.call(this._minWeekdaysParse,a))||-1!==(i=ge.call(this._weekdaysParse,a))||-1!==(i=ge.call(this._shortWeekdaysParse,a))?i:null}function Ge(){function e(e,t){return t.length-e.length}var t,n,r,i,o,a=[],s=[],l=[],u=[];for(t=0;t<7;t++)n=p([2e3,1]).day(t),r=me(this.weekdaysMin(n,"")),i=me(this.weekdaysShort(n,"")),o=me(this.weekdays(n,"")),a.push(r),s.push(i),l.push(o),u.push(r),u.push(i),u.push(o);a.sort(e),s.sort(e),l.sort(e),u.sort(e),this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function Ke(){return this.hours()%12||12}function Ye(e,t){L(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function Qe(e,t){return t._meridiemParse}L("H",["HH",2],0,"hour"),L("h",["hh",2],0,Ke),L("k",["kk",2],0,(function(){return this.hours()||24})),L("hmm",0,0,(function(){return""+Ke.apply(this)+P(this.minutes(),2)})),L("hmmss",0,0,(function(){return""+Ke.apply(this)+P(this.minutes(),2)+P(this.seconds(),2)})),L("Hmm",0,0,(function(){return""+this.hours()+P(this.minutes(),2)})),L("Hmmss",0,0,(function(){return""+this.hours()+P(this.minutes(),2)+P(this.seconds(),2)})),Ye("a",!0),Ye("A",!1),B("hour","h"),W("hour",13),pe("a",Qe),pe("A",Qe),pe("H",ne),pe("h",ne),pe("k",ne),pe("HH",ne,Z),pe("hh",ne,Z),pe("kk",ne,Z),pe("hmm",re),pe("hmmss",ie),pe("Hmm",re),pe("Hmmss",ie),ye(["H","HH"],3),ye(["k","kk"],(function(e,t,n){var r=V(e);t[3]=24===r?0:r})),ye(["a","A"],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),ye(["h","hh"],(function(e,t,n){t[3]=V(e),h(n).bigHour=!0})),ye("hmm",(function(e,t,n){var r=e.length-2;t[3]=V(e.substr(0,r)),t[4]=V(e.substr(r)),h(n).bigHour=!0})),ye("hmmss",(function(e,t,n){var r=e.length-4,i=e.length-2;t[3]=V(e.substr(0,r)),t[4]=V(e.substr(r,2)),t[5]=V(e.substr(i)),h(n).bigHour=!0})),ye("Hmm",(function(e,t,n){var r=e.length-2;t[3]=V(e.substr(0,r)),t[4]=V(e.substr(r))})),ye("Hmmss",(function(e,t,n){var r=e.length-4,i=e.length-2;t[3]=V(e.substr(0,r)),t[4]=V(e.substr(r,2)),t[5]=V(e.substr(i))}));var Xe,Ze=G("Hours",!0),Je={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:xe,monthsShort:ke,week:{dow:0,doy:6},weekdays:ze,weekdaysMin:qe,weekdaysShort:Ue,meridiemParse:/[ap]\.?m?\.?/i},et={},tt={};function nt(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n0;){if(r=it(i.slice(0,t).join("-")))return r;if(n&&n.length>=t&&nt(i,n)>=t-1)break;t--}o++}return Xe}(e)}function lt(e){var t,n=e._a;return n&&-2===h(e).overflow&&(t=n[1]<0||n[1]>11?1:n[2]<1||n[2]>we(n[0],n[1])?2:n[3]<0||n[3]>24||24===n[3]&&(0!==n[4]||0!==n[5]||0!==n[6])?3:n[4]<0||n[4]>59?4:n[5]<0||n[5]>59?5:n[6]<0||n[6]>999?6:-1,h(e)._overflowDayOfYear&&(t<0||t>2)&&(t=2),h(e)._overflowWeeks&&-1===t&&(t=7),h(e)._overflowWeekday&&-1===t&&(t=8),h(e).overflow=t),e}var ut=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ct=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,dt=/Z|[+-]\d\d(?::?\d\d)?/,ft=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],pt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],ht=/^\/?Date\((-?\d+)/i,mt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,gt={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function vt(e){var t,n,r,i,o,a,s=e._i,l=ut.exec(s)||ct.exec(s),u=ft.length,c=pt.length;if(l){for(h(e).iso=!0,t=0,n=u;t7)&&(l=!0)):(o=e._locale._week.dow,a=e._locale._week.doy,u=Ne(St(),o,a),n=_t(t.gg,e._a[0],u.year),r=_t(t.w,u.week),null!=t.d?((i=t.d)<0||i>6)&&(l=!0):null!=t.e?(i=t.e+o,(t.e<0||t.e>6)&&(l=!0)):i=o),r<1||r>Fe(n,o,a)?h(e)._overflowWeeks=!0:null!=l?h(e)._overflowWeekday=!0:(s=De(n,r,i,o,a),e._a[0]=s.year,e._dayOfYear=s.dayOfYear)}(e),null!=e._dayOfYear&&(a=_t(e._a[0],i[0]),(e._dayOfYear>Re(a)||0===e._dayOfYear)&&(h(e)._overflowDayOfYear=!0),n=Me(a,0,e._dayOfYear),e._a[1]=n.getUTCMonth(),e._a[2]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=s[t]=i[t];for(;t<7;t++)e._a[t]=s[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[3]&&0===e._a[4]&&0===e._a[5]&&0===e._a[6]&&(e._nextDay=!0,e._a[3]=0),e._d=(e._useUTC?Me:Ie).apply(null,s),o=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[3]=24),e._w&&void 0!==e._w.d&&e._w.d!==o&&(h(e).weekdayMismatch=!0)}}function xt(e){if(e._f!==r.ISO_8601)if(e._f!==r.RFC_2822){e._a=[],h(e).empty=!0;var t,n,i,o,a,s,l,u=""+e._i,c=u.length,d=0;for(l=(i=N(e._f,e._locale).match(R)||[]).length,t=0;t0&&h(e).unusedInput.push(a),u=u.slice(u.indexOf(n)+n.length),d+=n.length),M[o]?(n?h(e).empty=!1:h(e).unusedTokens.push(o),_e(o,n,e)):e._strict&&!n&&h(e).unusedTokens.push(o);h(e).charsLeftOver=c-d,u.length>0&&h(e).unusedInput.push(u),e._a[3]<=12&&!0===h(e).bigHour&&e._a[3]>0&&(h(e).bigHour=void 0),h(e).parsedDateParts=e._a.slice(0),h(e).meridiem=e._meridiem,e._a[3]=function(e,t,n){var r;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0),t):t}(e._locale,e._a[3],e._meridiem),null!==(s=h(e).era)&&(e._a[0]=e._locale.erasConvertYear(s,e._a[0])),wt(e),lt(e)}else bt(e);else vt(e)}function kt(e){var t=e._i,n=e._f;return e._locale=e._locale||st(e._l),null===t||void 0===n&&""===t?g({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),w(t)?new _(lt(t)):(c(t)?e._d=t:i(n)?function(e){var t,n,r,i,o,a,s=!1,l=e._f.length;if(0===l)return h(e).invalidFormat=!0,void(e._d=new Date(NaN));for(i=0;ithis?this:e:g()}));function Tt(e,t){var n,r;if(1===t.length&&i(t[0])&&(t=t[0]),!t.length)return St();for(n=t[0],r=1;r=0?new Date(e+400,t,n)-126227808e5:new Date(e,t,n).valueOf()}function rn(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-126227808e5:Date.UTC(e,t,n)}function on(e,t){return t.erasAbbrRegex(e)}function an(){var e,t,n=[],r=[],i=[],o=[],a=this.eras();for(e=0,t=a.length;e(o=Fe(e,r,i))&&(t=o),un.call(this,e,t,n,r,i))}function un(e,t,n,r,i){var o=De(e,t,n,r,i),a=Me(o.year,0,o.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}L("N",0,0,"eraAbbr"),L("NN",0,0,"eraAbbr"),L("NNN",0,0,"eraAbbr"),L("NNNN",0,0,"eraName"),L("NNNNN",0,0,"eraNarrow"),L("y",["y",1],"yo","eraYear"),L("y",["yy",2],0,"eraYear"),L("y",["yyy",3],0,"eraYear"),L("y",["yyyy",4],0,"eraYear"),pe("N",on),pe("NN",on),pe("NNN",on),pe("NNNN",(function(e,t){return t.erasNameRegex(e)})),pe("NNNNN",(function(e,t){return t.erasNarrowRegex(e)})),ye(["N","NN","NNN","NNNN","NNNNN"],(function(e,t,n,r){var i=n._locale.erasParse(e,r,n._strict);i?h(n).era=i:h(n).invalidEra=e})),pe("y",le),pe("yy",le),pe("yyy",le),pe("yyyy",le),pe("yo",(function(e,t){return t._eraYearOrdinalRegex||le})),ye(["y","yy","yyy","yyyy"],0),ye(["yo"],(function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[0]=n._locale.eraYearOrdinalParse(e,i):t[0]=parseInt(e,10)})),L(0,["gg",2],0,(function(){return this.weekYear()%100})),L(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),sn("gggg","weekYear"),sn("ggggg","weekYear"),sn("GGGG","isoWeekYear"),sn("GGGGG","isoWeekYear"),B("weekYear","gg"),B("isoWeekYear","GG"),W("weekYear",1),W("isoWeekYear",1),pe("G",ue),pe("g",ue),pe("GG",ne,Z),pe("gg",ne,Z),pe("GGGG",ae,ee),pe("gggg",ae,ee),pe("GGGGG",se,te),pe("ggggg",se,te),be(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,n,r){t[r.substr(0,2)]=V(e)})),be(["gg","GG"],(function(e,t,n,i){t[i]=r.parseTwoDigitYear(e)})),L("Q",0,"Qo","quarter"),B("quarter","Q"),W("quarter",7),pe("Q",X),ye("Q",(function(e,t){t[1]=3*(V(e)-1)})),L("D",["DD",2],"Do","date"),B("date","D"),W("date",9),pe("D",ne),pe("DD",ne,Z),pe("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),ye(["D","DD"],2),ye("Do",(function(e,t){t[2]=V(e.match(ne)[0])}));var cn=G("Date",!0);L("DDD",["DDDD",3],"DDDo","dayOfYear"),B("dayOfYear","DDD"),W("dayOfYear",4),pe("DDD",oe),pe("DDDD",J),ye(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=V(e)})),L("m",["mm",2],0,"minute"),B("minute","m"),W("minute",14),pe("m",ne),pe("mm",ne,Z),ye(["m","mm"],4);var dn=G("Minutes",!1);L("s",["ss",2],0,"second"),B("second","s"),W("second",15),pe("s",ne),pe("ss",ne,Z),ye(["s","ss"],5);var fn,pn,hn=G("Seconds",!1);for(L("S",0,0,(function(){return~~(this.millisecond()/100)})),L(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),L(0,["SSS",3],0,"millisecond"),L(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),L(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),L(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),L(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),L(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),L(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),B("millisecond","ms"),W("millisecond",16),pe("S",oe,X),pe("SS",oe,Z),pe("SSS",oe,J),fn="SSSS";fn.length<=9;fn+="S")pe(fn,le);function mn(e,t){t[6]=V(1e3*("0."+e))}for(fn="S";fn.length<=9;fn+="S")ye(fn,mn);pn=G("Milliseconds",!1),L("z",0,0,"zoneAbbr"),L("zz",0,0,"zoneName");var gn=_.prototype;function vn(e){return e}gn.add=Vt,gn.calendar=function(e,t){1===arguments.length&&(arguments[0]?Yt(arguments[0])?(e=arguments[0],t=void 0):Qt(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||St(),i=Dt(n,this).startOf("day"),o=r.calendarFormat(this,i)||"sameElse",a=t&&(C(t[o])?t[o].call(this,n):t[o]);return this.format(a||this.localeData().calendar(o,this,St(n)))},gn.clone=function(){return new _(this)},gn.diff=function(e,t,n){var r,i,o;if(!this.isValid())return NaN;if(!(r=Dt(e,this)).isValid())return NaN;switch(i=6e4*(r.utcOffset()-this.utcOffset()),t=z(t)){case"year":o=Xt(this,r)/12;break;case"month":o=Xt(this,r);break;case"quarter":o=Xt(this,r)/3;break;case"second":o=(this-r)/1e3;break;case"minute":o=(this-r)/6e4;break;case"hour":o=(this-r)/36e5;break;case"day":o=(this-r-i)/864e5;break;case"week":o=(this-r-i)/6048e5;break;default:o=this-r}return n?o:$(o)},gn.endOf=function(e){var t,n;if(void 0===(e=z(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?rn:nn,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=36e5-tn(t+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":t=this._d.valueOf(),t+=6e4-tn(t,6e4)-1;break;case"second":t=this._d.valueOf(),t+=1e3-tn(t,1e3)-1}return this._d.setTime(t),r.updateOffset(this,!0),this},gn.format=function(e){e||(e=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var t=D(this,e);return this.localeData().postformat(t)},gn.from=function(e,t){return this.isValid()&&(w(e)&&e.isValid()||St(e).isValid())?Ut({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},gn.fromNow=function(e){return this.from(St(),e)},gn.to=function(e,t){return this.isValid()&&(w(e)&&e.isValid()||St(e).isValid())?Ut({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},gn.toNow=function(e){return this.to(St(),e)},gn.get=function(e){return C(this[e=z(e)])?this[e]():this},gn.invalidAt=function(){return h(this).overflow},gn.isAfter=function(e,t){var n=w(e)?e:St(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=z(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()9999?D(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):C(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",D(n,"Z")):D(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},gn.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,n,r="moment",i="";return this.isLocal()||(r=0===this.utcOffset()?"moment.utc":"moment.parseZone",i="Z"),e="["+r+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n=i+'[")]',this.format(e+t+"-MM-DD[T]HH:mm:ss.SSS"+n)},"undefined"!=typeof Symbol&&null!=Symbol.for&&(gn[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),gn.toJSON=function(){return this.isValid()?this.toISOString():null},gn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},gn.unix=function(){return Math.floor(this.valueOf()/1e3)},gn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},gn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},gn.eraName=function(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;ethis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},gn.isLocal=function(){return!!this.isValid()&&!this._isUTC},gn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},gn.isUtc=Ft,gn.isUTC=Ft,gn.zoneAbbr=function(){return this._isUTC?"UTC":""},gn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},gn.dates=k("dates accessor is deprecated. Use date instead.",cn),gn.months=k("months accessor is deprecated. Use month instead",Ae),gn.years=k("years accessor is deprecated. Use year instead",je),gn.zone=k("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()})),gn.isDSTShifted=k("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!l(this._isDSTShifted))return this._isDSTShifted;var e,t={};return b(t,this),(t=kt(t))._a?(e=t._isUTC?p(t._a):St(t._a),this._isDSTShifted=this.isValid()&&function(e,t,n){var r,i=Math.min(e.length,t.length),o=Math.abs(e.length-t.length),a=0;for(r=0;r0):this._isDSTShifted=!1,this._isDSTShifted}));var yn=A.prototype;function bn(e,t,n,r){var i=st(),o=p().set(r,t);return i[n](o,e)}function _n(e,t,n){if(u(e)&&(t=e,e=void 0),e=e||"",null!=t)return bn(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=bn(e,r,n,"month");return i}function wn(e,t,n,r){"boolean"==typeof e?(u(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,u(t)&&(n=t,t=void 0),t=t||"");var i,o=st(),a=e?o._week.dow:0,s=[];if(null!=n)return bn(t,(n+a)%7,r,"day");for(i=0;i<7;i++)s[i]=bn(t,(i+a)%7,r,"day");return s}yn.calendar=function(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return C(r)?r.call(t,n):r},yn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(R).map((function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])},yn.invalidDate=function(){return this._invalidDate},yn.ordinal=function(e){return this._ordinal.replace("%d",e)},yn.preparse=vn,yn.postformat=vn,yn.relativeTime=function(e,t,n,r){var i=this._relativeTime[n];return C(i)?i(e,t,n,r):i.replace(/%d/i,e)},yn.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return C(n)?n(t):n.replace(/%s/i,t)},yn.set=function(e){var t,n;for(n in e)a(e,n)&&(C(t=e[n])?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},yn.eras=function(e,t){var n,i,o,a=this._eras||st("en")._eras;for(n=0,i=a.length;n=0)return l[r]},yn.erasConvertYear=function(e,t){var n=e.since<=e.until?1:-1;return void 0===t?r(e.since).year():r(e.since).year()+(t-e.offset)*n},yn.erasAbbrRegex=function(e){return a(this,"_erasAbbrRegex")||an.call(this),e?this._erasAbbrRegex:this._erasRegex},yn.erasNameRegex=function(e){return a(this,"_erasNameRegex")||an.call(this),e?this._erasNameRegex:this._erasRegex},yn.erasNarrowRegex=function(e){return a(this,"_erasNarrowRegex")||an.call(this),e?this._erasNarrowRegex:this._erasRegex},yn.months=function(e,t){return e?i(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Ee).test(t)?"format":"standalone"][e.month()]:i(this._months)?this._months:this._months.standalone},yn.monthsShort=function(e,t){return e?i(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Ee.test(t)?"format":"standalone"][e.month()]:i(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},yn.monthsParse=function(e,t,n){var r,i,o;if(this._monthsParseExact)return Ce.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=p([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(o="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(o.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}},yn.monthsRegex=function(e){return this._monthsParseExact?(a(this,"_monthsRegex")||Pe.call(this),e?this._monthsStrictRegex:this._monthsRegex):(a(this,"_monthsRegex")||(this._monthsRegex=Oe),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},yn.monthsShortRegex=function(e){return this._monthsParseExact?(a(this,"_monthsRegex")||Pe.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(a(this,"_monthsShortRegex")||(this._monthsShortRegex=Se),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},yn.week=function(e){return Ne(e,this._week.dow,this._week.doy).week},yn.firstDayOfYear=function(){return this._week.doy},yn.firstDayOfWeek=function(){return this._week.dow},yn.weekdays=function(e,t){var n=i(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Be(n,this._week.dow):e?n[e.day()]:n},yn.weekdaysMin=function(e){return!0===e?Be(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},yn.weekdaysShort=function(e){return!0===e?Be(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},yn.weekdaysParse=function(e,t,n){var r,i,o;if(this._weekdaysParseExact)return Ve.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=p([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(o="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(o.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}},yn.weekdaysRegex=function(e){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||Ge.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(a(this,"_weekdaysRegex")||(this._weekdaysRegex=We),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},yn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||Ge.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(a(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=He),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},yn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||Ge.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(a(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=$e),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},yn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},yn.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},ot("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===V(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),r.lang=k("moment.lang is deprecated. Use moment.locale instead.",ot),r.langData=k("moment.langData is deprecated. Use moment.localeData instead.",st);var xn=Math.abs;function kn(e,t,n,r){var i=Ut(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function En(e){return e<0?Math.floor(e):Math.ceil(e)}function Sn(e){return 4800*e/146097}function On(e){return 146097*e/4800}function Cn(e){return function(){return this.as(e)}}var Tn=Cn("ms"),An=Cn("s"),Pn=Cn("m"),Rn=Cn("h"),jn=Cn("d"),In=Cn("w"),Mn=Cn("M"),Ln=Cn("Q"),Dn=Cn("y");function Nn(e){return function(){return this.isValid()?this._data[e]:NaN}}var Fn=Nn("milliseconds"),Bn=Nn("seconds"),zn=Nn("minutes"),Un=Nn("hours"),qn=Nn("days"),Wn=Nn("months"),Hn=Nn("years"),$n=Math.round,Vn={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Gn(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}var Kn=Math.abs;function Yn(e){return(e>0)-(e<0)||+e}function Qn(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,r,i,o,a,s,l=Kn(this._milliseconds)/1e3,u=Kn(this._days),c=Kn(this._months),d=this.asSeconds();return d?(e=$(l/60),t=$(e/60),l%=60,e%=60,n=$(c/12),c%=12,r=l?l.toFixed(3).replace(/\.?0+$/,""):"",i=d<0?"-":"",o=Yn(this._months)!==Yn(d)?"-":"",a=Yn(this._days)!==Yn(d)?"-":"",s=Yn(this._milliseconds)!==Yn(d)?"-":"",i+"P"+(n?o+n+"Y":"")+(c?o+c+"M":"")+(u?a+u+"D":"")+(t||e||l?"T":"")+(t?s+t+"H":"")+(e?s+e+"M":"")+(l?s+r+"S":"")):"P0D"}var Xn=Pt.prototype;return Xn.isValid=function(){return this._isValid},Xn.abs=function(){var e=this._data;return this._milliseconds=xn(this._milliseconds),this._days=xn(this._days),this._months=xn(this._months),e.milliseconds=xn(e.milliseconds),e.seconds=xn(e.seconds),e.minutes=xn(e.minutes),e.hours=xn(e.hours),e.months=xn(e.months),e.years=xn(e.years),this},Xn.add=function(e,t){return kn(this,e,t,1)},Xn.subtract=function(e,t){return kn(this,e,t,-1)},Xn.as=function(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=z(e))||"quarter"===e||"year"===e)switch(t=this._days+r/864e5,n=this._months+Sn(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(On(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}},Xn.asMilliseconds=Tn,Xn.asSeconds=An,Xn.asMinutes=Pn,Xn.asHours=Rn,Xn.asDays=jn,Xn.asWeeks=In,Xn.asMonths=Mn,Xn.asQuarters=Ln,Xn.asYears=Dn,Xn.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*V(this._months/12):NaN},Xn._bubble=function(){var e,t,n,r,i,o=this._milliseconds,a=this._days,s=this._months,l=this._data;return o>=0&&a>=0&&s>=0||o<=0&&a<=0&&s<=0||(o+=864e5*En(On(s)+a),a=0,s=0),l.milliseconds=o%1e3,e=$(o/1e3),l.seconds=e%60,t=$(e/60),l.minutes=t%60,n=$(t/60),l.hours=n%24,a+=$(n/24),i=$(Sn(a)),s+=i,a-=En(On(i)),r=$(s/12),s%=12,l.days=a,l.months=s,l.years=r,this},Xn.clone=function(){return Ut(this)},Xn.get=function(e){return e=z(e),this.isValid()?this[e+"s"]():NaN},Xn.milliseconds=Fn,Xn.seconds=Bn,Xn.minutes=zn,Xn.hours=Un,Xn.days=qn,Xn.weeks=function(){return $(this.days()/7)},Xn.months=Wn,Xn.years=Hn,Xn.humanize=function(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,r,i=!1,o=Vn;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(i=e),"object"==typeof t&&(o=Object.assign({},Vn,t),null!=t.s&&null==t.ss&&(o.ss=t.s-1)),n=this.localeData(),r=function(e,t,n,r){var i=Ut(e).abs(),o=$n(i.as("s")),a=$n(i.as("m")),s=$n(i.as("h")),l=$n(i.as("d")),u=$n(i.as("M")),c=$n(i.as("w")),d=$n(i.as("y")),f=o<=n.ss&&["s",o]||o0,f[4]=r,Gn.apply(null,f)}(this,!i,o,n),i&&(r=n.pastFuture(+this,r)),n.postformat(r)},Xn.toISOString=Qn,Xn.toString=Qn,Xn.toJSON=Qn,Xn.locale=Zt,Xn.localeData=en,Xn.toIsoString=k("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Qn),Xn.lang=Jt,L("X",0,0,"unix"),L("x",0,0,"valueOf"),pe("x",ue),pe("X",/[+-]?\d+(\.\d{1,3})?/),ye("X",(function(e,t,n){n._d=new Date(1e3*parseFloat(e))})),ye("x",(function(e,t,n){n._d=new Date(V(e))})), -//! moment.js -r.version="2.29.2",t=St,r.fn=gn,r.min=function(){var e=[].slice.call(arguments,0);return Tt("isBefore",e)},r.max=function(){var e=[].slice.call(arguments,0);return Tt("isAfter",e)},r.now=function(){return Date.now?Date.now():+new Date},r.utc=p,r.unix=function(e){return St(1e3*e)},r.months=function(e,t){return _n(e,t,"months")},r.isDate=c,r.locale=ot,r.invalid=g,r.duration=Ut,r.isMoment=w,r.weekdays=function(e,t,n){return wn(e,t,n,"weekdays")},r.parseZone=function(){return St.apply(null,arguments).parseZone()},r.localeData=st,r.isDuration=Rt,r.monthsShort=function(e,t){return _n(e,t,"monthsShort")},r.weekdaysMin=function(e,t,n){return wn(e,t,n,"weekdaysMin")},r.defineLocale=at,r.updateLocale=function(e,t){if(null!=t){var n,r,i=Je;null!=et[e]&&null!=et[e].parentLocale?et[e].set(T(et[e]._config,t)):(null!=(r=it(e))&&(i=r._config),t=T(i,t),null==r&&(t.abbr=e),(n=new A(t)).parentLocale=et[e],et[e]=n),ot(e)}else null!=et[e]&&(null!=et[e].parentLocale?(et[e]=et[e].parentLocale,e===ot()&&ot(e)):null!=et[e]&&delete et[e]);return et[e]},r.locales=function(){return E(et)},r.weekdaysShort=function(e,t,n){return wn(e,t,n,"weekdaysShort")},r.normalizeUnits=z,r.relativeTimeRounding=function(e){return void 0===e?$n:"function"==typeof e&&($n=e,!0)},r.relativeTimeThreshold=function(e,t){return void 0!==Vn[e]&&(void 0===t?Vn[e]:(Vn[e]=t,"s"===e&&(Vn.ss=t-1),!0))},r.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},r.prototype=gn,r.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},r}()}).call(this,n(161)(e))},function(e,t,n){"use strict";(function(e){ -/*! - * The buffer module from node.js, for the browser. - * - * @author Feross Aboukhadijeh - * @license MIT - */ -var r=n(1011),i=n(1012),o=n(575);function a(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function h(e,t){if(l.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return z(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return U(e).length;default:if(r)return z(e).length;t=(""+t).toLowerCase(),r=!0}}function m(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return A(this,t,n);case"utf8":case"utf-8":return O(this,t,n);case"ascii":return C(this,t,n);case"latin1":case"binary":return T(this,t,n);case"base64":return S(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function g(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function v(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=l.from(t,r)),l.isBuffer(t))return 0===t.length?-1:y(e,t,n,r,i);if("number"==typeof t)return t&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):y(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function y(e,t,n,r,i){var o,a=1,s=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,l/=2,n/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var c=-1;for(o=n;os&&(n=s-l),o=n;o>=0;o--){for(var d=!0,f=0;fi&&(r=i):r=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function S(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function O(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i239?4:u>223?3:u>191?2:1;if(i+d<=n)switch(d){case 1:u<128&&(c=u);break;case 2:128==(192&(o=e[i+1]))&&(l=(31&u)<<6|63&o)>127&&(c=l);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(l=(15&u)<<12|(63&o)<<6|63&a)>2047&&(l<55296||l>57343)&&(c=l);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(l=(15&u)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&l<1114112&&(c=l)}null===c?(c=65533,d=1):c>65535&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c),i+=d}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},l.prototype.compare=function(e,t,n,r,i){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),s=Math.min(o,a),u=this.slice(r,i),c=e.slice(t,n),d=0;di)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return _(this,e,t,n);case"ascii":return w(this,e,t,n);case"latin1":case"binary":return x(this,e,t,n);case"base64":return k(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function C(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;ir)&&(n=r);for(var i="",o=t;on)throw new RangeError("Trying to access beyond buffer length")}function j(e,t,n,r,i,o){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function I(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i>>8*(r?i:1-i)}function M(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i>>8*(r?i:3-i)&255}function L(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function D(e,t,n,r,o){return o||L(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function N(e,t,n,r,o){return o||L(e,0,n,8),i.write(e,t,n,r,52,8),n+8}l.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t0&&(i*=256);)r+=this[e+--t]*i;return r},l.prototype.readUInt8=function(e,t){return t||R(e,1,this.length),this[e]},l.prototype.readUInt16LE=function(e,t){return t||R(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUInt16BE=function(e,t){return t||R(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUInt32LE=function(e,t){return t||R(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUInt32BE=function(e,t){return t||R(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||R(e,t,this.length);for(var r=this[e],i=1,o=0;++o=(i*=128)&&(r-=Math.pow(2,8*t)),r},l.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||R(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},l.prototype.readInt8=function(e,t){return t||R(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){t||R(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(e,t){t||R(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(e,t){return t||R(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return t||R(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readFloatLE=function(e,t){return t||R(e,4,this.length),i.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return t||R(e,4,this.length),i.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return t||R(e,8,this.length),i.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return t||R(e,8,this.length),i.read(this,e,!1,52,8)},l.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||j(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o=0&&(o*=256);)this[t+i]=e/o&255;return t+n},l.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,1,255,0),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},l.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):I(this,e,t,!0),t+2},l.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):I(this,e,t,!1),t+2},l.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):M(this,e,t,!0),t+4},l.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},l.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);j(this,e,t,n,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o>0)-s&255;return t+n},l.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);j(this,e,t,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},l.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,1,127,-128),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):I(this,e,t,!0),t+2},l.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):I(this,e,t,!1),t+2},l.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):M(this,e,t,!0),t+4},l.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},l.prototype.writeFloatLE=function(e,t,n){return D(this,e,t,!0,n)},l.prototype.writeFloatBE=function(e,t,n){return D(this,e,t,!1,n)},l.prototype.writeDoubleLE=function(e,t,n){return N(this,e,t,!0,n)},l.prototype.writeDoubleBE=function(e,t,n){return N(this,e,t,!1,n)},l.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--i)e[i+t]=this[i+n];else if(o<1e3||!l.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function U(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(F,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function q(e,t,n,r){for(var i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,n(56))},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},function(e,t,n){"use strict";var r=n(311),i=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=d;var o=Object.create(n(250));o.inherits=n(197);var a=n(579),s=n(417);o.inherits(d,a);for(var l=i(s.prototype),u=0;ue!==r).map(e=>[e,{data:t}]))},t.duplicateI18nFields=function e(t,n,r,i){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[n.get("name")];const s=t.getIn(["entry","data",...o]);n.get(f)===h.DUPLICATE&&r.filter(e=>e!==i).forEach(e=>{t=t.setIn(["entry",...y(e,i),...o],s)});if(n.has("field")&&!a.List.isList(s)){[n.get("field")].forEach(n=>{t=e(t,n,r,i,[...o,n.get("name")])})}else if(n.has("fields")&&!a.List.isList(s)){n.get("fields").toArray().forEach(n=>{t=e(t,n,r,i,[...o,n.get("name")])})}return t},t.formatI18nBackup=function(e,t){return Object.entries(e).reduce((e,n)=>{let[r,{raw:i}]=n;const o=t(i);return c(c({},e),{},{[r]:{data:o.data}})},{})},t.getDataPath=y,t.getFilePath=b,t.getFilePaths=w,t.getI18nBackup=function(e,t,n){const{locales:r,defaultLocale:i}=g(e);return r.filter(e=>e!==i).reduce((e,r)=>{const o=y(r,i),a=t.getIn(o);if(!a)return e;const s=t.set("data",a);return c(c({},e),{},{[r]:{raw:n(s)}})},{})},t.getI18nDataFiles=function(e,t,n,r,i){const{structure:o}=g(e);if(o===p.SINGLE_FILE)return i;const a=w(e,t,n,r);return a.reduce((e,t)=>{const n=i.find(e=>e.path===t);return n?[...e,n]:[...e,{path:t,id:"",newFile:!1}]},[])},t.getI18nEntry=async function(e,t,n,r,i){const{structure:o,locales:a,defaultLocale:s}=g(e);let l;if(o===p.SINGLE_FILE)l=E(await i(n),s,a);else{const u=(await Promise.all(a.map(async e=>{const a=b(o,t,n,r,e);return{value:await i(a).catch(()=>null),locale:e}}))).filter(e=>null!==e.value);l=k(e,o,s,u)}return l},t.getI18nFiles=function(e,t,n,r,i,o,s){const{structure:l,defaultLocale:u,locales:d}=g(e);if(l===p.SINGLE_FILE){const e=d.reduce((e,t)=>{const r=y(t,u);return e.set(t,n.getIn(r))},(0,a.Map)({})),f=n.set("data",e);return[c({path:b(l,t,i,o,d[0]),slug:o,raw:r(f)},s&&{newPath:b(l,t,s,o,d[0])})]}return d.map(e=>{const a=y(e,u),d=n.set("data",n.getIn(a));return c({path:b(l,t,i,o,e),slug:o,raw:d.get("data")?r(d):""},s&&{newPath:b(l,t,s,o,e)})}).filter(e=>e.raw)},t.getI18nFilesDepth=function(e,t){const{structure:n}=g(e);if(n===p.MULTIPLE_FOLDERS)return t+1;return t},t.getI18nInfo=g,t.getLocaleDataPath=v,t.getLocaleFromPath=_,t.getPreviewEntry=function(e,t,n){if(t===n)return e;return e.set("data",e.getIn([f,t,"data"]))},t.groupEntries=function(e,t,n){const{structure:r,defaultLocale:o,locales:a}=g(e);if(r===p.SINGLE_FILE)return n.map(e=>E(e,o,a));const s=(0,i.default)(n.map(e=>({locale:_(r,t,e.path),value:e})),e=>{let{locale:t,value:n}=e;return x(r,n.path,t)});return Object.values(s).reduce((t,n)=>[...t,k(e,r,o,n)],[])},t.hasI18n=m,t.isFieldDuplicate=function(e,t,n){return t!==n&&e.get(f)===h.DUPLICATE},t.isFieldHidden=function(e,t,n){return t!==n&&e.get(f)===h.NONE},t.isFieldTranslatable=function(e,t,n){return t!==n&&e.get(f)===h.TRANSLATE},t.normalizeFilePath=x,t.serializeI18n=function(e,t,n){const{locales:r,defaultLocale:i}=g(e);return r.filter(e=>e!==i).forEach(e=>{const r=v(e);t=t.setIn(r,n(t.getIn(r)))}),t};var r=l(n(422)),i=l(n(603)),o=l(n(389)),a=n(4),s=n(71);function l(e){return e&&e.__esModule?e:{default:e}}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 c(e){for(var t=1;tb(i,t,n,r,e))}function x(e,t,n){switch(e){case p.MULTIPLE_FOLDERS:return t.replace(n+"/","");case p.MULTIPLE_FILES:return t.replace("."+n,"");case p.SINGLE_FILE:default:return t}}function k(e,t,n,r){let i=r.find(e=>e.locale===n);i||(i=r[0],console.warn(`Could not locale entry for default locale '${n}'`));const a=r.filter(e=>e.locale!==i.locale).reduce((e,t)=>{let{locale:n,value:r}=t;const i=v(n);return(0,o.default)(e,i,r.data)},{}),l=x(t,i.value.path,n),u=(0,s.selectEntrySlug)(e,l);return c(c(c({},i.value),{},{raw:""},a),{},{path:l,slug:u})}function E(e,t,n){const r=e.data[t]||{},i=n.filter(e=>e!==t).map(t=>({locale:t,value:e.data[t]})).filter(e=>e.value).reduce((e,t)=>c(c({},e),{},{[t.locale]:{data:t.value}}),{});return c(c({},e),{},{data:r,i18n:i,raw:""})}t.I18N=f,t.I18N_STRUCTURE=p,function(e){e.MULTIPLE_FOLDERS="multiple_folders",e.MULTIPLE_FILES="multiple_files",e.SINGLE_FILE="single_file"}(p||(t.I18N_STRUCTURE=p={})),t.I18N_FIELD=h,function(e){e.TRANSLATE="translate",e.DUPLICATE="duplicate",e.NONE="none"}(h||(t.I18N_FIELD=h={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.REMOVE_ASSET=t.LOAD_ASSET_SUCCESS=t.LOAD_ASSET_REQUEST=t.LOAD_ASSET_FAILURE=t.ADD_ASSETS=t.ADD_ASSET=void 0,t.addAsset=l,t.addAssets=function(e){return{type:"ADD_ASSETS",payload:e}},t.boundGetAsset=function(e,t,n){return function(r,i){return e(h({collection:t,entry:n,path:r,field:i}))}},t.getAsset=h,t.loadAsset=f,t.loadAssetFailure=d,t.loadAssetRequest=u,t.loadAssetSuccess=c,t.removeAsset=function(e){return{type:"REMOVE_ASSET",payload:e}};var r=n(40),i=n(251),o=n(126),a=n(321),s=n(171);t.ADD_ASSETS="ADD_ASSETS";t.ADD_ASSET="ADD_ASSET";t.REMOVE_ASSET="REMOVE_ASSET";t.LOAD_ASSET_REQUEST="LOAD_ASSET_REQUEST";t.LOAD_ASSET_SUCCESS="LOAD_ASSET_SUCCESS";function l(e){return{type:"ADD_ASSET",payload:e}}function u(e){return{type:"LOAD_ASSET_REQUEST",payload:{path:e}}}function c(e){return{type:"LOAD_ASSET_SUCCESS",payload:{path:e}}}function d(e,t){return{type:"LOAD_ASSET_FAILURE",payload:{path:e,error:t}}}function f(e){return async(t,n)=>{try{t(u(e)),await(0,s.waitForMediaLibraryToLoad)(t,n());const r=(0,a.selectMediaFileByPath)(n(),e);if(r){const o=await(0,s.getMediaDisplayURL)(t,n(),r);t(l((0,i.createAssetProxy)({path:e,url:o||e})))}else{const{url:r}=await(0,s.getMediaFile)(n(),e);t(l((0,i.createAssetProxy)({path:e,url:r})))}t(c(e))}catch(n){t(d(e,n))}}}t.LOAD_ASSET_FAILURE="LOAD_ASSET_FAILURE";const p=(0,i.createAssetProxy)({path:"empty.svg",file:new File([''],"empty.svg",{type:"image/svg+xml"})});function h(e){let{collection:t,entry:n,path:a,field:s}=e;return(e,u)=>{if(!a)return p;const c=u(),d=(0,o.selectMediaFilePath)(c.config,t,n,a,s);let{asset:h,isLoading:m,error:g}=c.medias[d]||{};return m?p:h||((0,r.isAbsolutePath)(d)||g?(h=(0,i.createAssetProxy)({path:d,url:a}),e(l(h))):(e(f(d)),h=p),h)}}},function(e,t,n){"use strict";var r=n(262);e.exports=function(e){return r({},e)}},function(e,t){(t=e.exports=function(e){return e.replace(/^\s*|\s*$/g,"")}).left=function(e){return e.replace(/^\s*/,"")},t.right=function(e){return e.replace(/\s*$/,"")}},function(e,t,n){"use strict";t.a=function(e){var t=new WeakMap;return function(n){if(t.has(n))return t.get(n);var r=e(n);return t.set(n,r),r}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i}));var r=42,i=256},function(e,t,n){"use strict";(function(e){var r=n(57),i=n(769),o="object"==typeof exports&&exports&&!exports.nodeType&&exports,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,s=a&&a.exports===o?r.a.Buffer:void 0,l=(s?s.isBuffer:void 0)||i.a;t.a=l}).call(this,n(331)(e))},function(e,t,n){"use strict";t.a={BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",TOP_LEFT:"top-left",TOP_RIGHT:"top-right"}},function(e,t,n){"use strict"; -/* -object-assign -(c) Sindre Sorhus -@license MIT -*/var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,s,l=a(e),u=1;u-1&&e%1==0&&e2?arguments[2]:{},o=r(t);i&&(o=a.call(o,Object.getOwnPropertySymbols(t)));for(var s=0;s0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if(window.CMS_CONFIG)return B(window.CMS_CONFIG);return async n=>{n(z());try{const i=S(),o=!(0,r.default)(e),a=!1===e.load_config_file?{}:await F(i,o),s=(0,l.default)(a,e);(0,d.validateConfig)(s);const u=L(await W(s));n(B(D(u))),"function"==typeof t&&t()}catch(e){throw n(U(e)),e}}},t.normalizeConfig=L,t.parseConfig=N;var r=y(n(135)),i=y(n(122)),o=y(n(123)),a=y(n(410)),s=n(4),l=y(n(1068)),u=n(144),c=n(124),d=n(1069),f=n(71),p=n(430),h=n(145),m=n(199),g=n(257);const v=["sortableFields"];function y(e){return e&&e.__esModule?e:{default:e}}function b(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function _(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function w(e){for(var t=1;t{const n=t(e);return function(e){return"fields"in e}(n)?w(w({},n),{},{fields:E(n.fields,t)}):k(n)&&n.field?w(w({},n),{},{field:E([n.field],t)[0]}):k(n)&&n.types?w(w({},n),{},{types:E(n.types,t)}):n})}function S(){const e=document.querySelector('link[rel="cms-config-url"]');return e&&{"text/yaml":"yaml","application/x-yaml":"yaml"}[e.type]&&e.href?(console.log(`Using config file path: "${e.href}"`),e.href):"config.yml"}function O(e){return"media_folder"in e&&!("public_folder"in e)?w(w({},e),{},{public_folder:e.media_folder}):e}t.CONFIG_FAILURE="CONFIG_FAILURE";const C={dateFormat:"date_format",timeFormat:"time_format",pickerUtc:"picker_utc",editorComponents:"editor_components",valueType:"value_type",valueField:"value_field",searchFields:"search_fields",displayFields:"display_fields",optionsLength:"options_length"};function T(e){const t=Object.keys(C).filter(t=>t in e).map(t=>{const n=C[t];return console.warn(`Field ${e.name} is using a deprecated configuration '${t}'. Please use '${n}'`),{[n]:e[t]}});return Object.assign({},e,...t)}function A(e){return!0===e[m.I18N]?w(w({},e),{},{[m.I18N]:m.I18N_FIELD.TRANSLATE}):!1!==e[m.I18N]&&e[m.I18N]?e:w(w({},e),{},{[m.I18N]:m.I18N_FIELD.NONE})}function P(e,t){if("boolean"==typeof e)return t;{const n=e.locales||t.locales,r=e.default_locale||n[0],i=(0,l.default)(t,e);return i.locales=n,i.default_locale=r,I(i),i}}function R(e,t){return E(e,t?A:e=>{const t=w({},e);return delete t[m.I18N],t})}function j(e){if(e&&e.structure!==m.I18N_STRUCTURE.SINGLE_FILE)throw new Error(`i18n configuration for files collections is limited to ${m.I18N_STRUCTURE.SINGLE_FILE} structure`)}function I(e){if(e&&e.default_locale&&!e.locales.includes(e.default_locale))throw new Error(`i18n locales '${e.locales.join(", ")}' are missing the default locale ${e.default_locale}`)}function M(e,t){const n=(0,p.getIntegrations)((0,s.fromJS)(e));return!!(0,p.selectIntegration)(n,t.name,"listEntries")}function L(e){const{collections:t=[]}=e,n=t.map(e=>{const{fields:t,files:n}=e;let r=e;if(t){const e=E(t,T);r=w(w({},r),{},{fields:e})}if(n){const e=n.map(e=>{const t=E(e.fields,T);return w(w({},e),{},{fields:t})});r=w(w({},r),{},{files:e})}if(r.sortableFields){const{sortableFields:t}=r;r=w(w({},b(r,v)),{},{sortable_fields:t}),console.warn(`Collection ${e.name} is using a deprecated configuration 'sortableFields'. Please use 'sortable_fields'`)}return r});return w(w({},e),{},{collections:n})}function D(e){return(0,u.produce)(e,e=>{e.publish_mode=e.publish_mode||c.SIMPLE,e.slug=e.slug||{},e.collections=e.collections||[],!e.display_url&&e.site_url&&(e.display_url=e.site_url);const t="/"+(0,o.default)(e.media_folder,"/");"public_folder"in e||(e.public_folder=t),"encoding"in e.slug||(e.slug.encoding="unicode"),"clean_accents"in e.slug||(e.slug.clean_accents=!1),"sanitize_replacement"in e.slug||(e.slug.sanitize_replacement="-");const n=e[m.I18N];n&&(n.default_locale=n.default_locale||n.locales[0]),I(n);const r=(0,h.resolveBackend)(e);for(const t of e.collections){"publish"in t||(t.publish=!0);let a=t[m.I18N];n&&a?(a=P(a,n),t[m.I18N]=a):(a=void 0,delete t[m.I18N]),t.fields&&(t.fields=R(t.fields,Boolean(a)));const{folder:l,files:u,view_filters:c,view_groups:d,meta:p}=t;if(l&&(t.type=g.FOLDER,t.path&&!t.media_folder&&(t.media_folder=""),"media_folder"in t&&!("public_folder"in t)&&(t.public_folder=t.media_folder),t.fields&&(t.fields=E(t.fields,O)),t.folder=(0,i.default)(l,"/"),p&&p.path)){const e=w({name:"path",meta:!0,required:!0},p.path);t.fields=[e,...t.fields||[]]}if(u){t.type=g.FILES,j(a),delete t.nested,delete t.meta;for(const e of u){e.file=(0,o.default)(e.file,"/"),"media_folder"in e&&!("public_folder"in e)&&(e.public_folder=e.media_folder),e.fields&&(e.fields=E(e.fields,O));let t=e[m.I18N];t&&a?(t=P(t,a),e[m.I18N]=t):(t=void 0,delete e[m.I18N]),j(t),e.fields&&(e.fields=R(e.fields,Boolean(t)))}}t.sortable_fields||(t.sortable_fields=(0,f.selectDefaultSortableFields)((0,s.fromJS)(t),r,M(e,t))),t.view_filters=(c||[]).map(e=>w(w({},e),{},{id:`${e.field}__${e.pattern}`})),t.view_groups=(d||[]).map(e=>w(w({},e),{},{id:`${e.field}__${e.pattern}`})),e.editor&&!t.editor&&(t.editor={preview:e.editor.preview})}})}function N(e){const t=a.default.parse(e,{maxAliasCount:-1,prettyErrors:!0,merge:!0});if("undefined"!=typeof window&&"string"==typeof window.CMS_ENV&&t[window.CMS_ENV]){const e=Object.keys(t[window.CMS_ENV]);for(const n of e)t[n]=t[window.CMS_ENV][n]}return t}async function F(e,t){const n=await fetch(e,{credentials:"same-origin"}).catch(e=>e);if(n instanceof Error||200!==n.status){if(t)return{};const e=n instanceof Error?n.message:n.status;throw new Error(`Failed to load config.yml (${e})`)}const r=n.headers.get("Content-Type")||"Not-Found";return!(-1!==r.indexOf("yaml"))&&(console.log(`Response for ${e} was not yaml. (Content-Type: ${r})`),t)?{}:N(await n.text())}function B(e){return{type:"CONFIG_SUCCESS",payload:e}}function z(){return{type:"CONFIG_REQUEST"}}function U(e){return{type:"CONFIG_FAILURE",error:"Error loading config",payload:e}}async function q(e){if(!["localhost","127.0.0.1",..."boolean"==typeof e?[]:(null==e?void 0:e.allowed_hosts)||[]].includes(location.hostname)||!e)return{};const t=!0===e?"http://localhost:8081/api/v1":e.url||"http://localhost:8081/api/v1".replace("localhost",location.hostname);try{console.log(`Looking for Netlify CMS Proxy Server at '${t}'`);const e=await fetch(""+t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"info"})}),{repo:n,publish_modes:r,type:i}=await e.json();return"string"==typeof n&&Array.isArray(r)&&"string"==typeof i?(console.log(`Detected Netlify CMS Proxy Server at '${t}' with repo: '${n}'`),{proxyUrl:t,publish_modes:r,type:i}):(console.log(`Netlify CMS Proxy Server not detected at '${t}'`),{})}catch{return console.log(`Netlify CMS Proxy Server not detected at '${t}'`),{}}}async function W(e){if(!e.local_backend)return e;const{proxyUrl:t,publish_modes:n,type:r}=await q(e.local_backend);return t?(0,u.produce)(e,e=>{e.backend.name="proxy",e.backend.proxy_url=t,e.publish_mode&&(e.publish_mode=function(e,t,n){if(e.publish_mode&&t&&!t.includes(e.publish_mode)){const r=t[0];return console.log(`'${e.publish_mode}' is not supported by '${n}' backend, switching to '${r}'`),r}return e.publish_mode}(e,n,r))}):e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.history=void 0,t.navigateToCollection=function(e){return r.push("/collections/"+e)},t.navigateToEntry=function(e,t){return r.replace(`/collections/${e}/entries/${t}`)},t.navigateToNewEntry=function(e){return r.replace(`/collections/${e}/new`)};const r=(0,n(94).createHashHistory)();t.history=r},function(e,t,n){"use strict";var r=n(443),i=n(651),o=n(653);e.exports=function(e){var t,n,a=e.space,s=e.mustUseProperty||[],l=e.attributes||{},u=e.properties,c=e.transform,d={},f={};for(t in u)n=new o(t,c(l,t),u[t],a),-1!==s.indexOf(t)&&(n.mustUseProperty=!0),d[t]=n,f[r(t)]=t,f[r(n.attribute)]=t;return new i(d,f,a)}},function(e,t,n){"use strict";e.exports=function(e,t){var n=[],i=-1,o=e.length;t&&n.push(r("text","\n"));for(;++i!?|~^@]/,h=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function m(e,t,n){return r=e,i=n,t}function g(e,t){var n,r=e.next();if('"'==r||"'"==r)return t.tokenize=(n=r,function(e,t){var r,i=!1;if(s&&"@"==e.peek()&&e.match(h))return t.tokenize=g,m("jsonld-keyword","meta");for(;null!=(r=e.next())&&(r!=n||i);)i=!i&&"\\"==r;return i||(t.tokenize=g),m("string","string")}),t.tokenize(e,t);if("."==r&&e.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return m("number","number");if("."==r&&e.match(".."))return m("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return m(r);if("="==r&&e.eat(">"))return m("=>","operator");if("0"==r&&e.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return m("number","number");if(/\d/.test(r))return e.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),m("number","number");if("/"==r)return e.eat("*")?(t.tokenize=v,v(e,t)):e.eat("/")?(e.skipToEnd(),m("comment","comment")):Ze(e,t,1)?(function(e){for(var t,n=!1,r=!1;null!=(t=e.next());){if(!n){if("/"==t&&!r)return;"["==t?r=!0:r&&"]"==t&&(r=!1)}n=!n&&"\\"==t}}(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),m("regexp","string-2")):(e.eat("="),m("operator","operator",e.current()));if("`"==r)return t.tokenize=y,y(e,t);if("#"==r&&"!"==e.peek())return e.skipToEnd(),m("meta","meta");if("#"==r&&e.eatWhile(d))return m("variable","property");if("<"==r&&e.match("!--")||"-"==r&&e.match("->")&&!/\S/.test(e.string.slice(0,e.start)))return e.skipToEnd(),m("comment","comment");if(p.test(r))return">"==r&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=r&&"="!=r||e.eat("="):/[<>*+\-|&?]/.test(r)&&(e.eat(r),">"==r&&e.eat(r))),"?"==r&&e.eat(".")?m("."):m("operator","operator",e.current());if(d.test(r)){e.eatWhile(d);var i=e.current();if("."!=t.lastType){if(f.propertyIsEnumerable(i)){var o=f[i];return m(o.type,o.style,i)}if("async"==i&&e.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return m("async","keyword",i)}return m("variable","variable",i)}}function v(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=g;break}r="*"==n}return m("comment","comment")}function y(e,t){for(var n,r=!1;null!=(n=e.next());){if(!r&&("`"==n||"$"==n&&e.eat("{"))){t.tokenize=g;break}r=!r&&"\\"==n}return m("quasi","string-2",e.current())}function b(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var n=e.string.indexOf("=>",e.start);if(!(n<0)){if(c){var r=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,n));r&&(n=r.index)}for(var i=0,o=!1,a=n-1;a>=0;--a){var s=e.string.charAt(a),l="([{}])".indexOf(s);if(l>=0&&l<3){if(!i){++a;break}if(0==--i){"("==s&&(o=!0);break}}else if(l>=3&&l<6)++i;else if(d.test(s))o=!0;else if(/["'\/`]/.test(s))for(;;--a){if(0==a)return;if(e.string.charAt(a-1)==s&&"\\"!=e.string.charAt(a-2)){a--;break}}else if(o&&!i){++a;break}}o&&!i&&(t.fatArrowAt=a)}}var _={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function w(e,t,n,r,i,o){this.indented=e,this.column=t,this.type=n,this.prev=i,this.info=o,null!=r&&(this.align=r)}function x(e,t){if(!u)return!1;for(var n=e.localVars;n;n=n.next)if(n.name==t)return!0;for(var r=e.context;r;r=r.prev)for(n=r.vars;n;n=n.next)if(n.name==t)return!0}function k(e,t,n,r,i){var o=e.cc;for(E.state=e,E.stream=i,E.marked=null,E.cc=o,E.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;)if((o.length?o.pop():l?U:B)(n,r)){for(;o.length&&o[o.length-1].lex;)o.pop()();return E.marked?E.marked:"variable"==n&&x(e,r)?"variable-2":t}}var E={state:null,column:null,marked:null,cc:null};function S(){for(var e=arguments.length-1;e>=0;e--)E.cc.push(arguments[e])}function O(){return S.apply(null,arguments),!0}function C(e,t){for(var n=t;n;n=n.next)if(n.name==e)return!0;return!1}function T(e){var t=E.state;if(E.marked="def",u){if(t.context)if("var"==t.lexical.info&&t.context&&t.context.block){var r=function e(t,n){if(n){if(n.block){var r=e(t,n.prev);return r?r==n.prev?n:new P(r,n.vars,!0):null}return C(t,n.vars)?n:new P(n.prev,new R(t,n.vars),!1)}return null}(e,t.context);if(null!=r)return void(t.context=r)}else if(!C(e,t.localVars))return void(t.localVars=new R(e,t.localVars));n.globalVars&&!C(e,t.globalVars)&&(t.globalVars=new R(e,t.globalVars))}}function A(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function P(e,t,n){this.prev=e,this.vars=t,this.block=n}function R(e,t){this.name=e,this.next=t}var j=new R("this",new R("arguments",null));function I(){E.state.context=new P(E.state.context,E.state.localVars,!1),E.state.localVars=j}function M(){E.state.context=new P(E.state.context,E.state.localVars,!0),E.state.localVars=null}function L(){E.state.localVars=E.state.context.vars,E.state.context=E.state.context.prev}function D(e,t){var n=function(){var n=E.state,r=n.indented;if("stat"==n.lexical.type)r=n.lexical.indented;else for(var i=n.lexical;i&&")"==i.type&&i.align;i=i.prev)r=i.indented;n.lexical=new w(r,E.stream.column(),e,null,n.lexical,t)};return n.lex=!0,n}function N(){var e=E.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function F(e){return function t(n){return n==e?O():";"==e||"}"==n||")"==n||"]"==n?S():O(t)}}function B(e,t){return"var"==e?O(D("vardef",t),ke,F(";"),N):"keyword a"==e?O(D("form"),W,B,N):"keyword b"==e?O(D("form"),B,N):"keyword d"==e?E.stream.match(/^\s*$/,!1)?O():O(D("stat"),$,F(";"),N):"debugger"==e?O(F(";")):"{"==e?O(D("}"),M,se,N,L):";"==e?O():"if"==e?("else"==E.state.lexical.info&&E.state.cc[E.state.cc.length-1]==N&&E.state.cc.pop()(),O(D("form"),W,B,N,Ae)):"function"==e?O(Ie):"for"==e?O(D("form"),M,Pe,B,L,N):"class"==e||c&&"interface"==t?(E.marked="keyword",O(D("form","class"==e?e:t),Fe,N)):"variable"==e?c&&"declare"==t?(E.marked="keyword",O(B)):c&&("module"==t||"enum"==t||"type"==t)&&E.stream.match(/^\s*\w/,!1)?(E.marked="keyword","enum"==t?O(Qe):"type"==t?O(Le,F("operator"),fe,F(";")):O(D("form"),Ee,F("{"),D("}"),se,N,N)):c&&"namespace"==t?(E.marked="keyword",O(D("form"),U,B,N)):c&&"abstract"==t?(E.marked="keyword",O(B)):O(D("stat"),ee):"switch"==e?O(D("form"),W,F("{"),D("}","switch"),M,se,N,N,L):"case"==e?O(U,F(":")):"default"==e?O(F(":")):"catch"==e?O(D("form"),I,z,B,N,L):"export"==e?O(D("stat"),qe,N):"import"==e?O(D("stat"),He,N):"async"==e?O(B):"@"==t?O(U,B):S(D("stat"),U,F(";"),N)}function z(e){if("("==e)return O(De,F(")"))}function U(e,t){return H(e,t,!1)}function q(e,t){return H(e,t,!0)}function W(e){return"("!=e?S():O(D(")"),$,F(")"),N)}function H(e,t,n){if(E.state.fatArrowAt==E.stream.start){var r=n?X:Q;if("("==e)return O(I,D(")"),oe(De,")"),N,F("=>"),r,L);if("variable"==e)return S(I,Ee,F("=>"),r,L)}var i=n?G:V;return _.hasOwnProperty(e)?O(i):"function"==e?O(Ie,i):"class"==e||c&&"interface"==t?(E.marked="keyword",O(D("form"),Ne,N)):"keyword c"==e||"async"==e?O(n?q:U):"("==e?O(D(")"),$,F(")"),N,i):"operator"==e||"spread"==e?O(n?q:U):"["==e?O(D("]"),Ye,N,i):"{"==e?ae(ne,"}",null,i):"quasi"==e?S(K,i):"new"==e?O(function(e){return function(t){return"."==t?O(e?J:Z):"variable"==t&&c?O(_e,e?G:V):S(e?q:U)}}(n)):O()}function $(e){return e.match(/[;\}\)\],]/)?S():S(U)}function V(e,t){return","==e?O($):G(e,t,!1)}function G(e,t,n){var r=0==n?V:G,i=0==n?U:q;return"=>"==e?O(I,n?X:Q,L):"operator"==e?/\+\+|--/.test(t)||c&&"!"==t?O(r):c&&"<"==t&&E.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?O(D(">"),oe(fe,">"),N,r):"?"==t?O(U,F(":"),i):O(i):"quasi"==e?S(K,r):";"!=e?"("==e?ae(q,")","call",r):"."==e?O(te,r):"["==e?O(D("]"),$,F("]"),N,r):c&&"as"==t?(E.marked="keyword",O(fe,r)):"regexp"==e?(E.state.lastType=E.marked="operator",E.stream.backUp(E.stream.pos-E.stream.start-1),O(i)):void 0:void 0}function K(e,t){return"quasi"!=e?S():"${"!=t.slice(t.length-2)?O(K):O($,Y)}function Y(e){if("}"==e)return E.marked="string-2",E.state.tokenize=y,O(K)}function Q(e){return b(E.stream,E.state),S("{"==e?B:U)}function X(e){return b(E.stream,E.state),S("{"==e?B:q)}function Z(e,t){if("target"==t)return E.marked="keyword",O(V)}function J(e,t){if("target"==t)return E.marked="keyword",O(G)}function ee(e){return":"==e?O(N,B):S(V,F(";"),N)}function te(e){if("variable"==e)return E.marked="property",O()}function ne(e,t){return"async"==e?(E.marked="property",O(ne)):"variable"==e||"keyword"==E.style?(E.marked="property","get"==t||"set"==t?O(re):(c&&E.state.fatArrowAt==E.stream.start&&(n=E.stream.match(/^\s*:\s*/,!1))&&(E.state.fatArrowAt=E.stream.pos+n[0].length),O(ie))):"number"==e||"string"==e?(E.marked=s?"property":E.style+" property",O(ie)):"jsonld-keyword"==e?O(ie):c&&A(t)?(E.marked="keyword",O(ne)):"["==e?O(U,le,F("]"),ie):"spread"==e?O(q,ie):"*"==t?(E.marked="keyword",O(ne)):":"==e?S(ie):void 0;var n}function re(e){return"variable"!=e?S(ie):(E.marked="property",O(Ie))}function ie(e){return":"==e?O(q):"("==e?S(Ie):void 0}function oe(e,t,n){function r(i,o){if(n?n.indexOf(i)>-1:","==i){var a=E.state.lexical;return"call"==a.info&&(a.pos=(a.pos||0)+1),O((function(n,r){return n==t||r==t?S():S(e)}),r)}return i==t||o==t?O():n&&n.indexOf(";")>-1?S(e):O(F(t))}return function(n,i){return n==t||i==t?O():S(e,r)}}function ae(e,t,n){for(var r=3;r"),fe):"quasi"==e?S(ge,be):void 0}function pe(e){if("=>"==e)return O(fe)}function he(e){return e.match(/[\}\)\]]/)?O():","==e||";"==e?O(he):S(me,he)}function me(e,t){return"variable"==e||"keyword"==E.style?(E.marked="property",O(me)):"?"==t||"number"==e||"string"==e?O(me):":"==e?O(fe):"["==e?O(F("variable"),ue,F("]"),me):"("==e?S(Me,me):e.match(/[;\}\)\],]/)?void 0:O()}function ge(e,t){return"quasi"!=e?S():"${"!=t.slice(t.length-2)?O(ge):O(fe,ve)}function ve(e){if("}"==e)return E.marked="string-2",E.state.tokenize=y,O(ge)}function ye(e,t){return"variable"==e&&E.stream.match(/^\s*[?:]/,!1)||"?"==t?O(ye):":"==e?O(fe):"spread"==e?O(ye):S(fe)}function be(e,t){return"<"==t?O(D(">"),oe(fe,">"),N,be):"|"==t||"."==e||"&"==t?O(fe):"["==e?O(fe,F("]"),be):"extends"==t||"implements"==t?(E.marked="keyword",O(fe)):"?"==t?O(fe,F(":"),fe):void 0}function _e(e,t){if("<"==t)return O(D(">"),oe(fe,">"),N,be)}function we(){return S(fe,xe)}function xe(e,t){if("="==t)return O(fe)}function ke(e,t){return"enum"==t?(E.marked="keyword",O(Qe)):S(Ee,le,Ce,Te)}function Ee(e,t){return c&&A(t)?(E.marked="keyword",O(Ee)):"variable"==e?(T(t),O()):"spread"==e?O(Ee):"["==e?ae(Oe,"]"):"{"==e?ae(Se,"}"):void 0}function Se(e,t){return"variable"!=e||E.stream.match(/^\s*:/,!1)?("variable"==e&&(E.marked="property"),"spread"==e?O(Ee):"}"==e?S():"["==e?O(U,F("]"),F(":"),Se):O(F(":"),Ee,Ce)):(T(t),O(Ce))}function Oe(){return S(Ee,Ce)}function Ce(e,t){if("="==t)return O(q)}function Te(e){if(","==e)return O(ke)}function Ae(e,t){if("keyword b"==e&&"else"==t)return O(D("form","else"),B,N)}function Pe(e,t){return"await"==t?O(Pe):"("==e?O(D(")"),Re,N):void 0}function Re(e){return"var"==e?O(ke,je):"variable"==e?O(je):S(je)}function je(e,t){return")"==e?O():";"==e?O(je):"in"==t||"of"==t?(E.marked="keyword",O(U,je)):S(U,je)}function Ie(e,t){return"*"==t?(E.marked="keyword",O(Ie)):"variable"==e?(T(t),O(Ie)):"("==e?O(I,D(")"),oe(De,")"),N,ce,B,L):c&&"<"==t?O(D(">"),oe(we,">"),N,Ie):void 0}function Me(e,t){return"*"==t?(E.marked="keyword",O(Me)):"variable"==e?(T(t),O(Me)):"("==e?O(I,D(")"),oe(De,")"),N,ce,L):c&&"<"==t?O(D(">"),oe(we,">"),N,Me):void 0}function Le(e,t){return"keyword"==e||"variable"==e?(E.marked="type",O(Le)):"<"==t?O(D(">"),oe(we,">"),N):void 0}function De(e,t){return"@"==t&&O(U,De),"spread"==e?O(De):c&&A(t)?(E.marked="keyword",O(De)):c&&"this"==e?O(le,Ce):S(Ee,le,Ce)}function Ne(e,t){return"variable"==e?Fe(e,t):Be(e,t)}function Fe(e,t){if("variable"==e)return T(t),O(Be)}function Be(e,t){return"<"==t?O(D(">"),oe(we,">"),N,Be):"extends"==t||"implements"==t||c&&","==e?("implements"==t&&(E.marked="keyword"),O(c?fe:U,Be)):"{"==e?O(D("}"),ze,N):void 0}function ze(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||c&&A(t))&&E.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(E.marked="keyword",O(ze)):"variable"==e||"keyword"==E.style?(E.marked="property",O(Ue,ze)):"number"==e||"string"==e?O(Ue,ze):"["==e?O(U,le,F("]"),Ue,ze):"*"==t?(E.marked="keyword",O(ze)):c&&"("==e?S(Me,ze):";"==e||","==e?O(ze):"}"==e?O():"@"==t?O(U,ze):void 0}function Ue(e,t){if("!"==t)return O(Ue);if("?"==t)return O(Ue);if(":"==e)return O(fe,Ce);if("="==t)return O(q);var n=E.state.lexical.prev;return S(n&&"interface"==n.info?Me:Ie)}function qe(e,t){return"*"==t?(E.marked="keyword",O(Ke,F(";"))):"default"==t?(E.marked="keyword",O(U,F(";"))):"{"==e?O(oe(We,"}"),Ke,F(";")):S(B)}function We(e,t){return"as"==t?(E.marked="keyword",O(F("variable"))):"variable"==e?S(q,We):void 0}function He(e){return"string"==e?O():"("==e?S(U):"."==e?S(V):S($e,Ve,Ke)}function $e(e,t){return"{"==e?ae($e,"}"):("variable"==e&&T(t),"*"==t&&(E.marked="keyword"),O(Ge))}function Ve(e){if(","==e)return O($e,Ve)}function Ge(e,t){if("as"==t)return E.marked="keyword",O($e)}function Ke(e,t){if("from"==t)return E.marked="keyword",O(U)}function Ye(e){return"]"==e?O():S(oe(q,"]"))}function Qe(){return S(D("form"),Ee,F("{"),D("}"),oe(Xe,"}"),N,N)}function Xe(){return S(Ee,Ce)}function Ze(e,t,n){return t.tokenize==g&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(n||0)))}return I.lex=M.lex=!0,L.lex=!0,N.lex=!0,{startState:function(e){var t={tokenize:g,lastType:"sof",cc:[],lexical:new w((e||0)-o,0,"block",!1),localVars:n.localVars,context:n.localVars&&new P(null,null,!1),indented:e||0};return n.globalVars&&"object"==typeof n.globalVars&&(t.globalVars=n.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),b(e,t)),t.tokenize!=v&&e.eatSpace())return null;var n=t.tokenize(e,t);return"comment"==r?n:(t.lastType="operator"!=r||"++"!=i&&"--"!=i?r:"incdec",k(t,n,r,i,e))},indent:function(t,r){if(t.tokenize==v||t.tokenize==y)return e.Pass;if(t.tokenize!=g)return 0;var i,s=r&&r.charAt(0),l=t.lexical;if(!/^\s*else\b/.test(r))for(var u=t.cc.length-1;u>=0;--u){var c=t.cc[u];if(c==N)l=l.prev;else if(c!=Ae&&c!=L)break}for(;("stat"==l.type||"form"==l.type)&&("}"==s||(i=t.cc[t.cc.length-1])&&(i==V||i==G)&&!/^[,\.=+\-*:?[\(]/.test(r));)l=l.prev;a&&")"==l.type&&"stat"==l.prev.type&&(l=l.prev);var d=l.type,f=s==d;return"vardef"==d?l.indented+("operator"==t.lastType||","==t.lastType?l.info.length+1:0):"form"==d&&"{"==s?l.indented:"form"==d?l.indented+o:"stat"==d?l.indented+(function(e,t){return"operator"==e.lastType||","==e.lastType||p.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}(t,r)?a||o:0):"switch"!=l.info||f||0==n.doubleIndentSwitch?l.align?l.column+(f?0:1):l.indented+(f?0:o):l.indented+(/^(?:case|default)\b/.test(r)?o:2*o)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:l?null:"/*",blockCommentEnd:l?null:"*/",blockCommentContinue:l?null:" * ",lineComment:l?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:l?"json":"javascript",jsonldMode:s,jsonMode:l,expressionAllowed:Ze,skipExpression:function(t){k(t,"atom","atom","true",new e.StringStream("",2,null))}}})),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/manifest+json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})}(n(5))},function(e,t,n){!function(e){"use strict";function t(e,t){if(!e.hasOwnProperty(t))throw new Error("Undefined state "+t+" in simple mode")}function n(e,t){if(!e)return/(?:)/;var n="";return e instanceof RegExp?(e.ignoreCase&&(n="i"),e.unicode&&(n+="u"),e=e.source):e=String(e),new RegExp((!1===t?"":"^")+"(?:"+e+")",n)}function r(e,r){(e.next||e.push)&&t(r,e.next||e.push),this.regex=n(e.regex),this.token=function(e){if(!e)return null;if(e.apply)return e;if("string"==typeof e)return e.replace(/\./g," ");for(var t=[],n=0;n2&&c.token&&"string"!=typeof c.token){for(var p=2;p-1)return e.Pass;var a=r.indent.length-1,s=t[r.state];e:for(;;){for(var l=0;lthis.maxCacheSize_},e.prototype.expire=function(){if(this.canExpireCache()){var e=0;for(var t in this.cache_){var n=this.cache_[t];0!=(3&e++)||n.hasListener()||(delete this.cache_[t],--this.cacheSize_)}}},e.prototype.get=function(e,t,n){var r=o(e,t,n);return r in this.cache_?this.cache_[r]:null},e.prototype.set=function(e,t,n,r){var i=o(e,t,n);this.cache_[i]=r,++this.cacheSize_},e.prototype.setSize=function(e){this.maxCacheSize_=e,this.expire()},e}();function o(e,t,n){return t+":"+e+":"+(n?Object(r.b)(n):"null")}var a=new i},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return s}));var r=n(32),i=n(13);function o(e,t,n,o,a,s,l){var u,c,d=(n-t)/o;if(1===d)u=t;else if(2===d)u=t,c=a;else if(0!==d){for(var f=e[t],p=e[t+1],h=0,m=[0],g=t+o;g1?l:2,x=s||new Array(w);for(g=0;g>1;o{const n=t(),r=(0,i.currentBackend)(n.config);return e(s()),Promise.resolve(r.currentUser()).then(t=>{t?(t.useOpenAuthoring&&e(d()),e(l(t))):e(c())}).catch(t=>{e(u(t)),e(p())})}},t.authenticating=s,t.doneAuthenticating=c,t.loginUser=function(e){return(t,n)=>{const r=n(),a=(0,i.currentBackend)(r.config);return t(s()),a.authenticate(e).then(e=>{e.useOpenAuthoring&&t(d()),t(l(e))}).catch(e=>{console.error(e),t(o({message:{details:e.message,key:"ui.toast.onFailToAuth"},kind:"warning",dismissAfter:8e3})),t(u(e))})}},t.logout=f,t.logoutUser=p,t.useOpenAuthoring=d;var r=n(165),i=n(145);const{notifSend:o,notifClear:a}=r.actions;t.AUTH_REQUEST="AUTH_REQUEST";t.AUTH_SUCCESS="AUTH_SUCCESS";t.AUTH_FAILURE="AUTH_FAILURE";t.AUTH_REQUEST_DONE="AUTH_REQUEST_DONE";t.USE_OPEN_AUTHORING="USE_OPEN_AUTHORING";function s(){return{type:"AUTH_REQUEST"}}function l(e){return{type:"AUTH_SUCCESS",payload:e}}function u(e){return{type:"AUTH_FAILURE",error:"Failed to authenticate",payload:e}}function c(){return{type:"AUTH_REQUEST_DONE"}}function d(){return{type:"USE_OPEN_AUTHORING"}}function f(){return{type:"LOGOUT"}}function p(){return(e,t)=>{const n=t(),r=(0,i.currentBackend)(n.config);Promise.resolve(r.logout()).then(()=>{e({type:"LOGOUT"}),e(a())})}}t.LOGOUT="LOGOUT"},function(e,t,n){var r=n(294),i=n(936);e.exports=function e(t,n,o,a,s){var l=-1,u=t.length;for(o||(o=i),s||(s=[]);++l0&&o(c)?n>1?e(c,n-1,o,a,s):r(s,c):a||(s[s.length]=c)}return s}},function(e,t){e.exports=function(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++re.blob());if(e.size<=0)return"";return await new Promise(t=>{const n=new FileReader;n.onload=e=>{var n;const r=(null===(n=e.target)||void 0===n?void 0:n.result)||"";t(r.toString().split("base64,")[1])},n.readAsDataURL(e)})}}t.default=i},function(e,t,n){"use strict";function r(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r.prototype.toString=function(e){var t=this.name+": ";return t+=this.reason||"(unknown reason)",!e&&this.mark&&(t+=" "+this.mark.toString()),t},e.exports=r},function(e,t,n){"use strict";var r=n(219);e.exports=new r({include:[n(586)],implicit:[n(1054),n(1055)],explicit:[n(1056),n(1057),n(1058),n(1059)]})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;const r=n(1071),i=n(315),o=n(593),a=n(315),s=n(1072),l=n(1073),u=n(1074),c=n(35),d=n(148),f=n(316),p=n(44),h=n(255);function m({gen:e,validateName:t,schema:n,schemaEnv:r,opts:i},o){i.code.es5?e.func(t,c._`${d.default.data}, ${d.default.valCxt}`,r.$async,()=>{e.code(c._`"use strict"; ${g(n,i)}`),function(e,t){e.if(d.default.valCxt,()=>{e.var(d.default.instancePath,c._`${d.default.valCxt}.${d.default.instancePath}`),e.var(d.default.parentData,c._`${d.default.valCxt}.${d.default.parentData}`),e.var(d.default.parentDataProperty,c._`${d.default.valCxt}.${d.default.parentDataProperty}`),e.var(d.default.rootData,c._`${d.default.valCxt}.${d.default.rootData}`),t.dynamicRef&&e.var(d.default.dynamicAnchors,c._`${d.default.valCxt}.${d.default.dynamicAnchors}`)},()=>{e.var(d.default.instancePath,c._`""`),e.var(d.default.parentData,c._`undefined`),e.var(d.default.parentDataProperty,c._`undefined`),e.var(d.default.rootData,d.default.data),t.dynamicRef&&e.var(d.default.dynamicAnchors,c._`{}`)})}(e,i),e.code(o)}):e.func(t,c._`${d.default.data}, ${function(e){return c._`{${d.default.instancePath}="", ${d.default.parentData}, ${d.default.parentDataProperty}, ${d.default.rootData}=${d.default.data}${e.dynamicRef?c._`, ${d.default.dynamicAnchors}={}`:c.nil}}={}`}(i)}`,r.$async,()=>e.code(g(n,i)).code(o))}function g(e,t){return"object"==typeof e&&e.$id&&(t.code.source||t.code.process)?c._`/*# sourceURL=${e.$id} */`:c.nil}function v(e,t){b(e)&&(_(e),y(e))?function(e,t){const{schema:n,gen:r,opts:i}=e;i.$comment&&n.$comment&&x(e);(function(e){e.schema.$id&&(e.baseId=f.resolveUrl(e.baseId,e.schema.$id))})(e),function(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}(e);const o=r.const("_errs",d.default.errors);w(e,o),r.var(t,c._`${o} === ${d.default.errors}`)}(e,t):r.boolOrEmptySchema(e,t)}function y({schema:e,self:t}){if("boolean"==typeof e)return!e;for(const n in e)if(t.RULES.all[n])return!0;return!1}function b(e){return"boolean"!=typeof e.schema}function _(e){p.checkUnknownRules(e),function(e){const{schema:t,errSchemaPath:n,opts:r,self:i}=e;t.$ref&&r.ignoreKeywordsWithRef&&p.schemaHasRulesButRef(t,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${n}"`)}(e)}function w(e,t){if(e.opts.jtd)return k(e,[],!1,t);const n=i.getSchemaTypes(e.schema);k(e,n,!i.coerceAndCheckDataType(e,n),t)}function x({gen:e,schemaEnv:t,schema:n,errSchemaPath:r,opts:i}){const o=n.$comment;if(!0===i.$comment)e.code(c._`${d.default.self}.logger.log(${o})`);else if("function"==typeof i.$comment){const n=c.str`${r}/$comment`,i=e.scopeValue("root",{ref:t.root});e.code(c._`${d.default.self}.opts.$comment(${o}, ${n}, ${i}.schema)`)}}function k(e,t,n,r){const{gen:i,schema:s,data:l,allErrors:u,opts:f,self:h}=e,{RULES:m}=h;function g(p){o.shouldUseGroup(s,p)&&(p.type?(i.if(a.checkDataType(p.type,l,f.strictNumbers)),E(e,p),1===t.length&&t[0]===p.type&&n&&(i.else(),a.reportTypeError(e)),i.endIf()):E(e,p),u||i.if(c._`${d.default.errors} === ${r||0}`))}!s.$ref||!f.ignoreKeywordsWithRef&&p.schemaHasRulesButRef(s,m)?(f.jtd||function(e,t){if(e.schemaEnv.meta||!e.opts.strictTypes)return;(function(e,t){if(!t.length)return;if(!e.dataTypes.length)return void(e.dataTypes=t);t.forEach(t=>{S(e.dataTypes,t)||O(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)}),e.dataTypes=e.dataTypes.filter(e=>S(t,e))})(e,t),e.opts.allowUnionTypes||function(e,t){t.length>1&&(2!==t.length||!t.includes("null"))&&O(e,"use allowUnionTypes to allow union type keyword")}(e,t);!function(e,t){const n=e.self.RULES.all;for(const r in n){const i=n[r];if("object"==typeof i&&o.shouldUseRule(e.schema,i)){const{type:n}=i.definition;n.length&&!n.some(e=>{return r=e,(n=t).includes(r)||"number"===r&&n.includes("integer");var n,r})&&O(e,`missing type "${n.join(",")}" for keyword "${r}"`)}}}(e,e.dataTypes)}(e,t),i.block(()=>{for(const e of m.rules)g(e);g(m.post)})):i.block(()=>T(e,"$ref",m.all.$ref.definition))}function E(e,t){const{gen:n,schema:r,opts:{useDefaults:i}}=e;i&&s.assignDefaults(e,t.type),n.block(()=>{for(const n of t.rules)o.shouldUseRule(r,n)&&T(e,n.keyword,n.definition,t.type)})}function S(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function O(e,t){t+=` at "${e.schemaEnv.baseId+e.errSchemaPath}" (strictTypes)`,p.checkStrictMode(e,t,e.opts.strictTypes)}t.validateFunctionCode=function(e){b(e)&&(_(e),y(e))?function(e){const{schema:t,opts:n,gen:r}=e;m(e,()=>{n.$comment&&t.$comment&&x(e),function(e){const{schema:t,opts:n}=e;void 0!==t.default&&n.useDefaults&&n.strictSchema&&p.checkStrictMode(e,"default is ignored in the schema root")}(e),r.let(d.default.vErrors,null),r.let(d.default.errors,0),n.unevaluated&&function(e){const{gen:t,validateName:n}=e;e.evaluated=t.const("evaluated",c._`${n}.evaluated`),t.if(c._`${e.evaluated}.dynamicProps`,()=>t.assign(c._`${e.evaluated}.props`,c._`undefined`)),t.if(c._`${e.evaluated}.dynamicItems`,()=>t.assign(c._`${e.evaluated}.items`,c._`undefined`))}(e),w(e),function(e){const{gen:t,schemaEnv:n,validateName:r,ValidationError:i,opts:o}=e;n.$async?t.if(c._`${d.default.errors} === 0`,()=>t.return(d.default.data),()=>t.throw(c._`new ${i}(${d.default.vErrors})`)):(t.assign(c._`${r}.errors`,d.default.vErrors),o.unevaluated&&function({gen:e,evaluated:t,props:n,items:r}){n instanceof c.Name&&e.assign(c._`${t}.props`,n);r instanceof c.Name&&e.assign(c._`${t}.items`,r)}(e),t.return(c._`${d.default.errors} === 0`))}(e)})}(e):m(e,()=>r.topBoolOrEmptySchema(e))};class C{constructor(e,t,n){if(l.validateKeywordUsage(e,t,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=p.schemaRefOrVal(e,this.schema,n,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",R(this.$data,e));else if(this.schemaCode=this.schemaValue,!l.validSchemaType(this.schema,t.schemaType,t.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:!1!==t.errors)&&(this.errsCount=e.gen.const("_errs",d.default.errors))}result(e,t,n){this.gen.if(c.not(e)),n?n():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.result(e,void 0,t)}fail(e){if(void 0===e)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);const{schemaCode:t}=this;this.fail(c._`${t} !== undefined && (${c.or(this.invalid$data(),e)})`)}error(e,t,n){if(t)return this.setParams(t),this._error(e,n),void this.setParams({});this._error(e,n)}_error(e,t){(e?h.reportExtraError:h.reportError)(this,this.def.error,t)}$dataError(){h.reportError(this,this.def.$dataError||h.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');h.resetErrorsCount(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,n=c.nil){this.gen.block(()=>{this.check$data(e,n),t()})}check$data(e=c.nil,t=c.nil){if(!this.$data)return;const{gen:n,schemaCode:r,schemaType:i,def:o}=this;n.if(c.or(c._`${r} === undefined`,t)),e!==c.nil&&n.assign(e,!0),(i.length||o.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==c.nil&&n.assign(e,!1)),n.else()}invalid$data(){const{gen:e,schemaCode:t,schemaType:n,def:r,it:i}=this;return c.or(function(){if(n.length){if(!(t instanceof c.Name))throw new Error("ajv implementation error");const e=Array.isArray(n)?n:[n];return c._`${a.checkDataTypes(e,t,i.opts.strictNumbers,a.DataType.Wrong)}`}return c.nil}(),function(){if(r.validateSchema){const n=e.scopeValue("validate$data",{ref:r.validateSchema});return c._`!${n}(${t})`}return c.nil}())}subschema(e,t){const n=u.getSubschema(this.it,e);u.extendSubschemaData(n,this.it,e),u.extendSubschemaMode(n,e);const r={...this.it,...n,items:void 0,props:void 0};return v(r,t),r}mergeEvaluated(e,t){const{it:n,gen:r}=this;n.opts.unevaluated&&(!0!==n.props&&void 0!==e.props&&(n.props=p.mergeEvaluated.props(r,e.props,n.props,t)),!0!==n.items&&void 0!==e.items&&(n.items=p.mergeEvaluated.items(r,e.items,n.items,t)))}mergeValidEvaluated(e,t){const{it:n,gen:r}=this;if(n.opts.unevaluated&&(!0!==n.props||!0!==n.items))return r.if(t,()=>this.mergeEvaluated(e,c.Name)),!0}}function T(e,t,n,r){const i=new C(e,n,t);"code"in n?n.code(i,r):i.$data&&n.validate?l.funcKeywordCode(i,n):"macro"in n?l.macroKeywordCode(i,n):(n.compile||n.validate)&&l.funcKeywordCode(i,n)}t.KeywordCxt=C;const A=/^\/(?:[^~]|~0|~1)*$/,P=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function R(e,{dataLevel:t,dataNames:n,dataPathArr:r}){let i,o;if(""===e)return d.default.rootData;if("/"===e[0]){if(!A.test(e))throw new Error("Invalid JSON-pointer: "+e);i=e,o=d.default.rootData}else{const a=P.exec(e);if(!a)throw new Error("Invalid JSON-pointer: "+e);const s=+a[1];if(i=a[2],"#"===i){if(s>=t)throw new Error(l("property/index",s));return r[t-s]}if(s>t)throw new Error(l("data",s));if(o=n[t-s],!i)return o}let a=o;const s=i.split("/");for(const e of s)e&&(o=c._`${o}${c.getProperty(p.unescapeJsonPointer(e))}`,a=c._`${a} && ${o}`);return a;function l(e,n){return`Cannot access ${e} ${n} levels up, current level is ${t}`}}t.getData=R},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const r=n(35),i=n(44),o=n(148);function a(e,t){const n=e.const("err",t);e.if(r._`${o.default.vErrors} === null`,()=>e.assign(o.default.vErrors,r._`[${n}]`),r._`${o.default.vErrors}.push(${n})`),e.code(r._`${o.default.errors}++`)}function s(e,t){const{gen:n,validateName:i,schemaEnv:o}=e;o.$async?n.throw(r._`new ${e.ValidationError}(${t})`):(n.assign(r._`${i}.errors`,t),n.return(!1))}t.keywordError={message:({keyword:e})=>r.str`should pass "${e}" keyword validation`},t.keyword$DataError={message:({keyword:e,schemaType:t})=>t?r.str`"${e}" keyword must be ${t} ($data)`:r.str`"${e}" keyword is invalid ($data)`},t.reportError=function(e,n=t.keywordError,i,o){const{it:l}=e,{gen:c,compositeRule:d,allErrors:f}=l,p=u(e,n,i);(null!=o?o:d||f)?a(c,p):s(l,r._`[${p}]`)},t.reportExtraError=function(e,n=t.keywordError,r){const{it:i}=e,{gen:l,compositeRule:c,allErrors:d}=i;a(l,u(e,n,r)),c||d||s(i,o.default.vErrors)},t.resetErrorsCount=function(e,t){e.assign(o.default.errors,t),e.if(r._`${o.default.vErrors} !== null`,()=>e.if(t,()=>e.assign(r._`${o.default.vErrors}.length`,t),()=>e.assign(o.default.vErrors,null)))},t.extendErrors=function({gen:e,keyword:t,schemaValue:n,data:i,errsCount:a,it:s}){if(void 0===a)throw new Error("ajv implementation error");const l=e.name("err");e.forRange("i",a,o.default.errors,a=>{e.const(l,r._`${o.default.vErrors}[${a}]`),e.if(r._`${l}.instancePath === undefined`,()=>e.assign(r._`${l}.instancePath`,r.strConcat(o.default.instancePath,s.errorPath))),e.assign(r._`${l}.schemaPath`,r.str`${s.errSchemaPath}/${t}`),s.opts.verbose&&(e.assign(r._`${l}.schema`,n),e.assign(r._`${l}.data`,i))})};const l={keyword:new r.Name("keyword"),schemaPath:new r.Name("schemaPath"),params:new r.Name("params"),propertyName:new r.Name("propertyName"),message:new r.Name("message"),schema:new r.Name("schema"),parentSchema:new r.Name("parentSchema")};function u(e,t,n){const{createErrors:i}=e.it;return!1===i?r._`{}`:function(e,t,n={}){const{gen:i,it:a}=e,s=[c(a,n),d(e,n)];return function(e,{params:t,message:n},i){const{keyword:a,data:s,schemaValue:u,it:c}=e,{opts:d,propertyName:f,topSchemaRef:p,schemaPath:h}=c;i.push([l.keyword,a],[l.params,"function"==typeof t?t(e):t||r._`{}`]),d.messages&&i.push([l.message,"function"==typeof n?n(e):n]);d.verbose&&i.push([l.schema,u],[l.parentSchema,r._`${p}${h}`],[o.default.data,s]);f&&i.push([l.propertyName,f])}(e,t,s),i.object(...s)}(e,t,n)}function c({errorPath:e},{instancePath:t}){const n=t?r.str`${e}${i.getErrorPath(t,i.Type.Str)}`:e;return[o.default.instancePath,r.strConcat(o.default.instancePath,n)]}function d({keyword:e,it:{errSchemaPath:t}},{schemaPath:n,parentSchema:o}){let a=o?t:r.str`${t}/${e}`;return n&&(a=r.str`${a}${i.getErrorPath(n,i.Type.Str)}`),[l.schemaPath,a]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class r{}t._CodeOrName=r,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class i extends r{constructor(e){if(super(),!t.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=i;class o extends r{constructor(e){super(),this._items="string"==typeof e?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const e=this._items[0];return""===e||'""'===e}get str(){var e;return null!==(e=this._str)&&void 0!==e?e:this._str=this._items.reduce((e,t)=>`${e}${t}`,"")}get names(){var e;return null!==(e=this._names)&&void 0!==e?e:this._names=this._items.reduce((e,t)=>(t instanceof i&&(e[t.str]=(e[t.str]||0)+1),e),{})}}function a(e,...t){const n=[e[0]];let r=0;for(;r{const i=r(),o=(0,s.currentBackend)(i.config);return n(function(e,t){return{type:"UNPUBLISHED_ENTRY_DELETE_REQUEST",payload:{collection:e,slug:t}}}(e,t)),o.deleteUnpublishedEntry(e,t).then(()=>{n(y({message:{key:"ui.toast.onDeleteUnpublishedChanges"},kind:"success",dismissAfter:4e3})),n(function(e,t){return{type:"UNPUBLISHED_ENTRY_DELETE_SUCCESS",payload:{collection:e,slug:t}}}(e,t))}).catch(r=>{n(y({message:{key:"ui.toast.onDeleteUnpublishedChanges",details:r},kind:"danger",dismissAfter:8e3})),n(function(e,t){return{type:"UNPUBLISHED_ENTRY_DELETE_FAILURE",payload:{collection:e,slug:t}}}(e,t))})}},t.loadUnpublishedEntries=E,t.loadUnpublishedEntry=k,t.persistUnpublishedEntry=function(e,t){return async(n,i)=>{const o=i(),a=o.entryDraft,u=a.get("fieldsErrors"),c=(0,l.selectUnpublishedSlugs)(o,e.get("name")),f=(0,l.selectPublishedSlugs)(o,e.get("name")).concat(c);if(!(0,r.default)(o.editorialWorkflow.toJS(),"pages.ids",!1)&&n(E(o.collections)),!u.isEmpty()){return u.some(e=>e.some(e=>e.type&&e.type===m.default.PRESENCE))&&n(y({message:{key:"ui.toast.missingRequiredField"},kind:"danger",dismissAfter:8e3})),Promise.reject()}const p=(0,s.currentBackend)(o.config),h=a.get("entry"),v=(0,d.getMediaAssets)({entry:h}),b=(0,d.getSerializedEntry)(e,h),S=a.set("entry",b);n(_(e,h.get("slug")));const O=t?p.persistUnpublishedEntry:p.persistEntry;try{const t=await O.call(p,{config:o.config,collection:e,entryDraft:S,assetProxies:v,usedSlugs:f});n(y({message:{key:"ui.toast.entrySaved"},kind:"success",dismissAfter:4e3})),n(w(e,b)),h.get("slug")!==t&&(n(k(e,t)),(0,g.navigateToEntry)(e.get("name"),t))}catch(t){return n(y({message:{key:"ui.toast.onFailToPersist",details:t},kind:"danger",dismissAfter:8e3})),Promise.reject(n(x(t,e,h.get("slug"))))}}},t.publishUnpublishedEntry=function(e,t){return async(n,r)=>{const i=r(),o=i.collections,a=(0,s.currentBackend)(i.config),c=(0,l.selectUnpublishedEntry)(i,e,t);n(function(e,t){return{type:"UNPUBLISHED_ENTRY_PUBLISH_REQUEST",payload:{collection:e,slug:t}}}(e,t));try{await a.publishUnpublishedEntry(c),n((0,h.loadMedia)()),n(y({message:{key:"ui.toast.entryPublished"},kind:"success",dismissAfter:4e3})),n(function(e,t){return{type:"UNPUBLISHED_ENTRY_PUBLISH_SUCCESS",payload:{collection:e,slug:t}}}(e,t));const r=o.get(e);if(!r.has("nested"))return n((0,d.loadEntry)(r,t));{n((0,d.loadEntries)(r));const e=(0,s.slugFromCustomPath)(r,c.get("path"));(0,d.loadEntry)(r,e),t!==e&&(0,u.selectEditingDraft)(i.entryDraft)&&(0,g.navigateToEntry)(r.get("name"),e)}}catch(r){n(y({message:{key:"ui.toast.onFailToPublishEntry",details:r},kind:"danger",dismissAfter:8e3})),n(function(e,t){return{type:"UNPUBLISHED_ENTRY_PUBLISH_FAILURE",payload:{collection:e,slug:t}}}(e,t))}}},t.unpublishPublishedEntry=function(e,t){return(n,r)=>{const i=r(),a=(0,s.currentBackend)(i.config),u=(0,l.selectEntry)(i,e.get("name"),t),f=(0,o.Map)().set("entry",u);return n(_(e,t)),a.deleteEntry(i,e,t).then(()=>a.persistEntry({config:i.config,collection:e,entryDraft:f,assetProxies:[],usedSlugs:(0,o.List)(),status:c.status.get("PENDING_PUBLISH")})).then(()=>{n(w(e,u)),n((0,d.entryDeleted)(e,t)),n(k(e,t)),n(y({message:{key:"ui.toast.entryUnpublished"},kind:"success",dismissAfter:4e3}))}).catch(t=>{n(y({message:{key:"ui.toast.onFailToUnpublishEntry",details:t},kind:"danger",dismissAfter:8e3})),n(x(t,e,u.get("slug")))})}},t.updateUnpublishedEntryStatus=function(e,t,n,r){return(i,o)=>{if(n===r)return;const a=o(),l=(0,s.currentBackend)(a.config);i(function(e,t){return{type:"UNPUBLISHED_ENTRY_STATUS_CHANGE_REQUEST",payload:{collection:e,slug:t}}}(e,t)),l.updateUnpublishedEntryStatus(e,t,r).then(()=>{i(y({message:{key:"ui.toast.entryUpdated"},kind:"success",dismissAfter:4e3})),i(function(e,t,n){return{type:"UNPUBLISHED_ENTRY_STATUS_CHANGE_SUCCESS",payload:{collection:e,slug:t,newStatus:n}}}(e,t,r))}).catch(n=>{i(y({message:{key:"ui.toast.onFailToUpdateStatus",details:n},kind:"danger",dismissAfter:8e3})),i(function(e,t){return{type:"UNPUBLISHED_ENTRY_STATUS_CHANGE_FAILURE",payload:{collection:e,slug:t}}}(e,t))})}};var r=v(n(103)),i=n(165),o=n(4),a=n(40),s=n(145),l=n(121),u=n(126),c=n(124),d=n(149),f=n(251),p=n(200),h=n(171),m=v(n(427)),g=n(221);function v(e){return e&&e.__esModule?e:{default:e}}const{notifSend:y}=i.actions;t.UNPUBLISHED_ENTRY_REQUEST="UNPUBLISHED_ENTRY_REQUEST";t.UNPUBLISHED_ENTRY_SUCCESS="UNPUBLISHED_ENTRY_SUCCESS";t.UNPUBLISHED_ENTRY_REDIRECT="UNPUBLISHED_ENTRY_REDIRECT";t.UNPUBLISHED_ENTRIES_REQUEST="UNPUBLISHED_ENTRIES_REQUEST";t.UNPUBLISHED_ENTRIES_SUCCESS="UNPUBLISHED_ENTRIES_SUCCESS";t.UNPUBLISHED_ENTRIES_FAILURE="UNPUBLISHED_ENTRIES_FAILURE";t.UNPUBLISHED_ENTRY_PERSIST_REQUEST="UNPUBLISHED_ENTRY_PERSIST_REQUEST";t.UNPUBLISHED_ENTRY_PERSIST_SUCCESS="UNPUBLISHED_ENTRY_PERSIST_SUCCESS";t.UNPUBLISHED_ENTRY_PERSIST_FAILURE="UNPUBLISHED_ENTRY_PERSIST_FAILURE";t.UNPUBLISHED_ENTRY_STATUS_CHANGE_REQUEST="UNPUBLISHED_ENTRY_STATUS_CHANGE_REQUEST";t.UNPUBLISHED_ENTRY_STATUS_CHANGE_SUCCESS="UNPUBLISHED_ENTRY_STATUS_CHANGE_SUCCESS";t.UNPUBLISHED_ENTRY_STATUS_CHANGE_FAILURE="UNPUBLISHED_ENTRY_STATUS_CHANGE_FAILURE";t.UNPUBLISHED_ENTRY_PUBLISH_REQUEST="UNPUBLISHED_ENTRY_PUBLISH_REQUEST";t.UNPUBLISHED_ENTRY_PUBLISH_SUCCESS="UNPUBLISHED_ENTRY_PUBLISH_SUCCESS";t.UNPUBLISHED_ENTRY_PUBLISH_FAILURE="UNPUBLISHED_ENTRY_PUBLISH_FAILURE";t.UNPUBLISHED_ENTRY_DELETE_REQUEST="UNPUBLISHED_ENTRY_DELETE_REQUEST";t.UNPUBLISHED_ENTRY_DELETE_SUCCESS="UNPUBLISHED_ENTRY_DELETE_SUCCESS";function b(e,t){return{type:"UNPUBLISHED_ENTRIES_SUCCESS",payload:{entries:e,pages:t}}}function _(e,t){return{type:"UNPUBLISHED_ENTRY_PERSIST_REQUEST",payload:{collection:e.get("name"),slug:t}}}function w(e,t){return{type:"UNPUBLISHED_ENTRY_PERSIST_SUCCESS",payload:{collection:e.get("name"),entry:t}}}function x(e,t,n){return{type:"UNPUBLISHED_ENTRY_PERSIST_FAILURE",payload:{error:e,collection:t.get("name"),slug:n},error:e}}function k(e,t){return async(n,i)=>{const o=i(),l=(0,s.currentBackend)(o.config);if(!(0,r.default)(o.editorialWorkflow.toJS(),"pages.ids",!1))try{const{entries:e,pagination:t}=await l.unpublishedEntries(o.collections);n(b(e,t))}catch(e){}n(function(e,t){return{type:"UNPUBLISHED_ENTRY_REQUEST",payload:{collection:e.get("name"),slug:t}}}(e,t));try{const r=await l.unpublishedEntry(o,e,t),i=await Promise.all(r.mediaFiles.filter(e=>e.draft).map(e=>{let{url:t,file:n,path:r}=e;return(0,f.createAssetProxy)({path:r,url:t,file:n})}));n((0,p.addAssets)(i)),n(function(e,t){return{type:"UNPUBLISHED_ENTRY_SUCCESS",payload:{collection:e.get("name"),entry:t}}}(e,r)),n((0,d.createDraftFromEntry)(r))}catch(r){r.name===a.EDITORIAL_WORKFLOW_ERROR&&r.notUnderEditorialWorkflow?(n(function(e,t){return{type:"UNPUBLISHED_ENTRY_REDIRECT",payload:{collection:e.get("name"),slug:t}}}(e,t)),n((0,d.loadEntry)(e,t))):n(y({message:{key:"ui.toast.onFailToLoadEntries",details:r},kind:"danger",dismissAfter:8e3}))}}}function E(e){return(t,n)=>{const i=n(),o=(0,s.currentBackend)(i.config),a=(0,r.default)(i.editorialWorkflow.toJS(),"pages.ids",!1);i.config.publish_mode!==c.EDITORIAL_WORKFLOW||a||(t({type:"UNPUBLISHED_ENTRIES_REQUEST"}),o.unpublishedEntries(e).then(e=>t(b(e.entries,e.pagination))).catch(e=>{t(y({message:{key:"ui.toast.onFailToLoadEntries",details:e},kind:"danger",dismissAfter:8e3})),t(function(e){return{type:"UNPUBLISHED_ENTRIES_FAILURE",error:"Failed to load entries",payload:e}}(e)),Promise.reject(e)}))}}t.UNPUBLISHED_ENTRY_DELETE_FAILURE="UNPUBLISHED_ENTRY_DELETE_FAILURE"},function(e,t,n){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"==typeof btoa){var i=(a=r,s=btoa(unescape(encodeURIComponent(JSON.stringify(a)))),l="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s),"/*# ".concat(l," */")),o=r.sources.map((function(e){return"/*# sourceURL=".concat(r.sourceRoot||"").concat(e," */")}));return[n].concat(o).concat([i]).join("\n")}var a,s,l;return[n].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var i={};if(r)for(var o=0;o=t||n<0||g&&e-h>=c}function w(){var e=i();if(_(e))return x(e);f=setTimeout(w,function(e){var n=t-(e-p);return g?s(n,c-(e-h)):n}(e))}function x(e){return f=void 0,v&&l?y(e):(l=u=void 0,d)}function k(){var e=i(),n=_(e);if(l=arguments,u=this,p=e,n){if(void 0===f)return b(p);if(g)return clearTimeout(f),f=setTimeout(w,t),y(p)}return void 0===f&&(f=setTimeout(w,t)),d}return t=o(t)||0,r(n)&&(m=!!n.leading,c=(g="maxWait"in n)?a(o(n.maxWait)||0,t):c,v="trailing"in n?!!n.trailing:v),k.cancel=function(){void 0!==f&&clearTimeout(f),h=0,l=p=u=f=void 0},k.flush=function(){return void 0===f?d:x(i())},k}},function(e,t,n){"use strict";var r=Object.assign;e.exports=r},function(e,t,n){"use strict";var r=n(633);e.exports=function(e,t){var n=e[e.length-1];return n&&n[1].type===t?r(n[2].sliceStream(n[1])):0}},function(e,t,n){"use strict";var r=n(174)(/[\dA-Za-z]/);e.exports=r},function(e,t,n){"use strict";e.exports=function(e,t){var n=[],i=-1,o=e.length;t&&n.push(r("text","\n"));for(;++i0&&n.push(r("text","\n"));return n};var r=n(110)},function(e,t,n){"use strict";var r=n(650),i=n(652),o=n(655),a=n(656),s=n(659),l=n(1333);e.exports=r([o,i,a,s,l])},function(e,t,n){"use strict";e.exports=function(e,t){var n,r=String(e),i=0;if("string"!=typeof t)throw new Error("Expected character");n=r.indexOf(t);for(;-1!==n;)i++,n=r.indexOf(t,n+t.length);return i}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ImplicitAuthenticator",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"NetlifyAuthenticator",{enumerable:!0,get:function(){return r.default}}),t.NetlifyCmsLibAuth=void 0,Object.defineProperty(t,"PkceAuthenticator",{enumerable:!0,get:function(){return o.default}});var r=a(n(1389)),i=a(n(1390)),o=a(n(1391));function a(e){return e&&e.__esModule?e:{default:e}}const s={NetlifyAuthenticator:r.default,ImplicitAuthenticator:i.default,PkceAuthenticator:o.default};t.NetlifyCmsLibAuth=s},function(e,t,n){"use strict";e.exports=function(e){var t="string"==typeof e?e.charCodeAt(0):e;return t>=48&&t<=57}},function(e,t,n){"use strict";e.exports=function(e,t){if(null==t)return"";if(e.frozenBaseUrl&&"undefined"!=typeof URL)return String(new URL(t,e.frozenBaseUrl));return t}},function(e,t,n){!function(e){"use strict";function t(e){for(var t={},n=0;n*\/]/.test(n)?x(null,"select-op"):"."==n&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?x("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(n)?x(null,n):e.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(e.current())&&(t.tokenize=S),x("variable callee","variable")):/[\w\\\-]/.test(n)?(e.eatWhile(/[\w\\\-]/),x("property","word")):x(null,null):/[\d.]/.test(e.peek())?(e.eatWhile(/[\w.%]/),x("number","unit")):e.match(/^-[\w\\\-]*/)?(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?x("variable-2","variable-definition"):x("variable-2","variable")):e.match(/^\w+-/)?x("meta","meta"):void 0}function E(e){return function(t,n){for(var r,i=!1;null!=(r=t.next());){if(r==e&&!i){")"==e&&t.backUp(1);break}i=!i&&"\\"==r}return(r==e||!i&&")"!=e)&&(n.tokenize=null),x("string","string")}}function S(e,t){return e.next(),e.match(/^\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=E(")"),x(null,"(")}function O(e,t,n){this.type=e,this.indent=t,this.prev=n}function C(e,t,n,r){return e.context=new O(n,t.indentation()+(!1===r?0:a),e.context),n}function T(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function A(e,t,n){return j[n.context.type](e,t,n)}function P(e,t,n,r){for(var i=r||1;i>0;i--)n.context=n.context.prev;return A(e,t,n)}function R(e){var t=e.current().toLowerCase();o=v.hasOwnProperty(t)?"atom":g.hasOwnProperty(t)?"keyword":"variable"}var j={top:function(e,t,n){if("{"==e)return C(n,t,"block");if("}"==e&&n.context.prev)return T(n);if(_&&/@component/i.test(e))return C(n,t,"atComponentBlock");if(/^@(-moz-)?document$/i.test(e))return C(n,t,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(e))return C(n,t,"atBlock");if(/^@(font-face|counter-style)/i.test(e))return n.stateArg=e,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(e))return"keyframes";if(e&&"@"==e.charAt(0))return C(n,t,"at");if("hash"==e)o="builtin";else if("word"==e)o="tag";else{if("variable-definition"==e)return"maybeprop";if("interpolation"==e)return C(n,t,"interpolation");if(":"==e)return"pseudo";if(y&&"("==e)return C(n,t,"parens")}return n.context.type},block:function(e,t,n){if("word"==e){var r=t.current().toLowerCase();return f.hasOwnProperty(r)?(o="property","maybeprop"):p.hasOwnProperty(r)?(o=w?"string-2":"property","maybeprop"):y?(o=t.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(o+=" error","maybeprop")}return"meta"==e?"block":y||"hash"!=e&&"qualifier"!=e?j.top(e,t,n):(o="error","block")},maybeprop:function(e,t,n){return":"==e?C(n,t,"prop"):A(e,t,n)},prop:function(e,t,n){if(";"==e)return T(n);if("{"==e&&y)return C(n,t,"propBlock");if("}"==e||"{"==e)return P(e,t,n);if("("==e)return C(n,t,"parens");if("hash"!=e||/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(t.current())){if("word"==e)R(t);else if("interpolation"==e)return C(n,t,"interpolation")}else o+=" error";return"prop"},propBlock:function(e,t,n){return"}"==e?T(n):"word"==e?(o="property","maybeprop"):n.context.type},parens:function(e,t,n){return"{"==e||"}"==e?P(e,t,n):")"==e?T(n):"("==e?C(n,t,"parens"):"interpolation"==e?C(n,t,"interpolation"):("word"==e&&R(t),"parens")},pseudo:function(e,t,n){return"meta"==e?"pseudo":"word"==e?(o="variable-3",n.context.type):A(e,t,n)},documentTypes:function(e,t,n){return"word"==e&&l.hasOwnProperty(t.current())?(o="tag",n.context.type):j.atBlock(e,t,n)},atBlock:function(e,t,n){if("("==e)return C(n,t,"atBlock_parens");if("}"==e||";"==e)return P(e,t,n);if("{"==e)return T(n)&&C(n,t,y?"block":"top");if("interpolation"==e)return C(n,t,"interpolation");if("word"==e){var r=t.current().toLowerCase();o="only"==r||"not"==r||"and"==r||"or"==r?"keyword":u.hasOwnProperty(r)?"attribute":c.hasOwnProperty(r)?"property":d.hasOwnProperty(r)?"keyword":f.hasOwnProperty(r)?"property":p.hasOwnProperty(r)?w?"string-2":"property":v.hasOwnProperty(r)?"atom":g.hasOwnProperty(r)?"keyword":"error"}return n.context.type},atComponentBlock:function(e,t,n){return"}"==e?P(e,t,n):"{"==e?T(n)&&C(n,t,y?"block":"top",!1):("word"==e&&(o="error"),n.context.type)},atBlock_parens:function(e,t,n){return")"==e?T(n):"{"==e||"}"==e?P(e,t,n,2):j.atBlock(e,t,n)},restricted_atBlock_before:function(e,t,n){return"{"==e?C(n,t,"restricted_atBlock"):"word"==e&&"@counter-style"==n.stateArg?(o="variable","restricted_atBlock_before"):A(e,t,n)},restricted_atBlock:function(e,t,n){return"}"==e?(n.stateArg=null,T(n)):"word"==e?(o="@font-face"==n.stateArg&&!h.hasOwnProperty(t.current().toLowerCase())||"@counter-style"==n.stateArg&&!m.hasOwnProperty(t.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},keyframes:function(e,t,n){return"word"==e?(o="variable","keyframes"):"{"==e?C(n,t,"top"):A(e,t,n)},at:function(e,t,n){return";"==e?T(n):"{"==e||"}"==e?P(e,t,n):("word"==e?o="tag":"hash"==e&&(o="builtin"),"at")},interpolation:function(e,t,n){return"}"==e?T(n):"{"==e||";"==e?P(e,t,n):("word"==e?o="variable":"variable"!=e&&"("!=e&&")"!=e&&(o="error"),"interpolation")}};return{startState:function(e){return{tokenize:null,state:r?"block":"top",stateArg:null,context:new O(r?"block":"top",e||0,null)}},token:function(e,t){if(!t.tokenize&&e.eatSpace())return null;var n=(t.tokenize||k)(e,t);return n&&"object"==typeof n&&(i=n[1],n=n[0]),o=n,"comment"!=i&&(t.state=j[t.state](i,e,t)),o},indent:function(e,t){var n=e.context,r=t&&t.charAt(0),i=n.indent;return"prop"!=n.type||"}"!=r&&")"!=r||(n=n.prev),n.prev&&("}"!=r||"block"!=n.type&&"top"!=n.type&&"interpolation"!=n.type&&"restricted_atBlock"!=n.type?(")"!=r||"parens"!=n.type&&"atBlock_parens"!=n.type)&&("{"!=r||"at"!=n.type&&"atBlock"!=n.type)||(i=Math.max(0,n.indent-a)):i=(n=n.prev).indent),i},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:b,fold:"brace"}}));var n=["domain","regexp","url","url-prefix"],r=t(n),i=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],o=t(i),a=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover","prefers-color-scheme","dynamic-range","video-dynamic-range"],s=t(a),l=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive","dark","light","standard","high"],u=t(l),c=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","all","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","binding","bleed","block-size","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-content","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","inset","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","line-height-step","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","place-content","place-items","place-self","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotate","rotation","rotation-point","row-gap","ruby-align","ruby-overhang","ruby-position","ruby-span","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-type","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-orientation","text-outline","text-overflow","text-rendering","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","touch-action","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","paint-order","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],d=t(c),f=["accent-color","aspect-ratio","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","content-visibility","margin-block","margin-block-end","margin-block-start","margin-inline","margin-inline-end","margin-inline-start","overflow-anchor","overscroll-behavior","padding-block","padding-block-end","padding-block-start","padding-inline","padding-inline-end","padding-inline-start","scroll-snap-stop","scrollbar-3d-light-color","scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-track-color","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","shape-inside","zoom"],p=t(f),h=t(["font-display","font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"]),m=t(["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"]),g=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],v=t(g),y=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","blur","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","brightness","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","conic-gradient","contain","content","contents","content-box","context-menu","continuous","contrast","copy","counter","counters","cover","crop","cross","crosshair","cubic-bezier","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","drop-shadow","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","grayscale","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","hue-rotate","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","manipulation","match","matrix","matrix3d","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiple_mask_images","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeating-conic-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturate","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","semi-condensed","semi-expanded","separate","sepia","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],b=t(y),_=n.concat(i).concat(a).concat(l).concat(c).concat(f).concat(g).concat(y);function w(e,t){for(var n,r=!1;null!=(n=e.next());){if(r&&"/"==n){t.tokenize=null;break}r="*"==n}return["comment","comment"]}e.registerHelper("hintWords","css",_),e.defineMIME("text/css",{documentTypes:r,mediaTypes:o,mediaFeatures:s,mediaValueKeywords:u,propertyKeywords:d,nonStandardPropertyKeywords:p,fontProperties:h,counterDescriptors:m,colorKeywords:v,valueKeywords:b,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=w,w(e,t))}},name:"css"}),e.defineMIME("text/x-scss",{mediaTypes:o,mediaFeatures:s,mediaValueKeywords:u,propertyKeywords:d,nonStandardPropertyKeywords:p,colorKeywords:v,valueKeywords:b,fontProperties:h,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=w,w(e,t)):["operator","operator"]},":":function(e){return!!e.match(/^\s*\{/,!1)&&[null,null]},$:function(e){return e.match(/^[\w-]+/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(e){return!!e.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),e.defineMIME("text/x-less",{mediaTypes:o,mediaFeatures:s,mediaValueKeywords:u,propertyKeywords:d,nonStandardPropertyKeywords:p,colorKeywords:v,valueKeywords:b,fontProperties:h,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=w,w(e,t)):["operator","operator"]},"@":function(e){return e.eat("{")?[null,"interpolation"]:!e.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)&&(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),e.defineMIME("text/x-gss",{documentTypes:r,mediaTypes:o,mediaFeatures:s,propertyKeywords:d,nonStandardPropertyKeywords:p,fontProperties:h,counterDescriptors:m,colorKeywords:v,valueKeywords:b,supportsAtComponent:!0,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=w,w(e,t))}},name:"css",helperType:"gss"})}(n(5))},function(e,t,n){!function(e){"use strict";var t={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};e.defineMode("xml",(function(r,i){var o,a,s=r.indentUnit,l={},u=i.htmlMode?t:n;for(var c in u)l[c]=u[c];for(var c in i)l[c]=i[c];function d(e,t){function n(n){return t.tokenize=n,n(e,t)}var r=e.next();return"<"==r?e.eat("!")?e.eat("[")?e.match("CDATA[")?n(p("atom","]]>")):null:e.match("--")?n(p("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),n(function e(t){return function(n,r){for(var i;null!=(i=n.next());){if("<"==i)return r.tokenize=e(t+1),r.tokenize(n,r);if(">"==i){if(1==t){r.tokenize=d;break}return r.tokenize=e(t-1),r.tokenize(n,r)}}return"meta"}}(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=p("meta","?>"),"meta"):(o=e.eat("/")?"closeTag":"openTag",t.tokenize=f,"tag bracket"):"&"==r?(e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"))?"atom":"error":(e.eatWhile(/[^&<]/),null)}function f(e,t){var n,r,i=e.next();if(">"==i||"/"==i&&e.eat(">"))return t.tokenize=d,o=">"==i?"endTag":"selfcloseTag","tag bracket";if("="==i)return o="equals",null;if("<"==i){t.tokenize=d,t.state=y,t.tagName=t.tagStart=null;var a=t.tokenize(e,t);return a?a+" tag error":"tag error"}return/[\'\"]/.test(i)?(t.tokenize=(n=i,(r=function(e,t){for(;!e.eol();)if(e.next()==n){t.tokenize=f;break}return"string"}).isInAttribute=!0,r),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function p(e,t){return function(n,r){for(;!n.eol();){if(n.match(t)){r.tokenize=d;break}n.next()}return e}}function h(e){return e&&e.toLowerCase()}function m(e,t,n){this.prev=e.context,this.tagName=t||"",this.indent=e.indented,this.startOfLine=n,(l.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function g(e){e.context&&(e.context=e.context.prev)}function v(e,t){for(var n;;){if(!e.context)return;if(n=e.context.tagName,!l.contextGrabbers.hasOwnProperty(h(n))||!l.contextGrabbers[h(n)].hasOwnProperty(h(t)))return;g(e)}}function y(e,t,n){return"openTag"==e?(n.tagStart=t.column(),b):"closeTag"==e?_:y}function b(e,t,n){return"word"==e?(n.tagName=t.current(),a="tag",k):l.allowMissingTagName&&"endTag"==e?(a="tag bracket",k(e,0,n)):(a="error",b)}function _(e,t,n){if("word"==e){var r=t.current();return n.context&&n.context.tagName!=r&&l.implicitlyClosed.hasOwnProperty(h(n.context.tagName))&&g(n),n.context&&n.context.tagName==r||!1===l.matchClosing?(a="tag",w):(a="tag error",x)}return l.allowMissingTagName&&"endTag"==e?(a="tag bracket",w(e,0,n)):(a="error",x)}function w(e,t,n){return"endTag"!=e?(a="error",w):(g(n),y)}function x(e,t,n){return a="error",w(e,0,n)}function k(e,t,n){if("word"==e)return a="attribute",E;if("endTag"==e||"selfcloseTag"==e){var r=n.tagName,i=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==e||l.autoSelfClosers.hasOwnProperty(h(r))?v(n,r):(v(n,r),n.context=new m(n,r,i==n.indented)),y}return a="error",k}function E(e,t,n){return"equals"==e?S:(l.allowMissing||(a="error"),k(e,0,n))}function S(e,t,n){return"string"==e?O:"word"==e&&l.allowUnquoted?(a="string",k):(a="error",k(e,0,n))}function O(e,t,n){return"string"==e?O:k(e,0,n)}return d.isInText=!0,{startState:function(e){var t={tokenize:d,state:y,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;o=null;var n=t.tokenize(e,t);return(n||o)&&"comment"!=n&&(a=null,t.state=t.state(o||n,e,t),a&&(n="error"==a?n+" error":a)),n},indent:function(t,n,r){var i=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+s;if(i&&i.noIndent)return e.Pass;if(t.tokenize!=f&&t.tokenize!=d)return r?r.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1!==l.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+s*(l.multilineTagIndentFactor||1);if(l.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:l.htmlMode?"html":"xml",helperType:l.htmlMode?"html":"xml",skipAttribute:function(e){e.state==S&&(e.state=k)},xmlCurrentTag:function(e){return e.tagName?{name:e.tagName,close:"closeTag"==e.type}:null},xmlCurrentContext:function(e){for(var t=[],n=e.context;n;n=n.prev)t.push(n.tagName);return t.reverse()}}})),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})}(n(5))},function(e,t,n){!function(e){"use strict";e.overlayMode=function(t,n,r){return{startState:function(){return{base:e.startState(t),overlay:e.startState(n),basePos:0,baseCur:null,overlayPos:0,overlayCur:null,streamSeen:null}},copyState:function(r){return{base:e.copyState(t,r.base),overlay:e.copyState(n,r.overlay),basePos:r.basePos,baseCur:null,overlayPos:r.overlayPos,overlayCur:null}},token:function(e,i){return(e!=i.streamSeen||Math.min(i.basePos,i.overlayPos)e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=I(e,360),t=I(t,100),n=I(n,100),0===t)r=i=o=n;else{var s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;r=a(l,s,e+1/3),i=a(l,s,e),o=a(l,s,e-1/3)}return{r:255*r,g:255*i,b:255*o}}(e.h,r,l),d=!0,f="hsl"),e.hasOwnProperty("a")&&(n=e.a));var p,h,m;return n=j(n),{ok:d,format:e.format||f,r:u(255,c(t.r,0)),g:u(255,c(t.g,0)),b:u(255,c(t.b,0)),a:n}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=l(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=l(this._r)),this._g<1&&(this._g=l(this._g)),this._b<1&&(this._b=l(this._b)),this._ok=n.ok,this._tc_id=s++}function p(e,t,n){e=I(e,255),t=I(t,255),n=I(n,255);var r,i,o=c(e,t,n),a=u(e,t,n),s=(o+a)/2;if(o==a)r=i=0;else{var l=o-a;switch(i=s>.5?l/(2-o-a):l/(o+a),o){case e:r=(t-n)/l+(t>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(f(r));return o}function A(e,t){t=t||6;for(var n=f(e).toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/t;t--;)a.push(f({h:r,s:i,v:o})),o=(o+s)%1;return a}f.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:i.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:i.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:i.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=j(e),this._roundA=l(100*this._a)/100,this},toHsv:function(){var e=h(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=h(this._r,this._g,this._b),t=l(360*e.h),n=l(100*e.s),r=l(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=p(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=p(this._r,this._g,this._b),t=l(360*e.h),n=l(100*e.s),r=l(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return m(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,i){var o=[D(l(e).toString(16)),D(l(t).toString(16)),D(l(n).toString(16)),D(F(r))];if(i&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1))return o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0);return o.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:l(this._r),g:l(this._g),b:l(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+l(this._r)+", "+l(this._g)+", "+l(this._b)+")":"rgba("+l(this._r)+", "+l(this._g)+", "+l(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:l(100*I(this._r,255))+"%",g:l(100*I(this._g,255))+"%",b:l(100*I(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+l(100*I(this._r,255))+"%, "+l(100*I(this._g,255))+"%, "+l(100*I(this._b,255))+"%)":"rgba("+l(100*I(this._r,255))+"%, "+l(100*I(this._g,255))+"%, "+l(100*I(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(R[m(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+g(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var i=f(e);n="#"+g(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return f(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(_,arguments)},brighten:function(){return this._applyModification(w,arguments)},darken:function(){return this._applyModification(x,arguments)},desaturate:function(){return this._applyModification(v,arguments)},saturate:function(){return this._applyModification(y,arguments)},greyscale:function(){return this._applyModification(b,arguments)},spin:function(){return this._applyModification(k,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(T,arguments)},complement:function(){return this._applyCombination(E,arguments)},monochromatic:function(){return this._applyCombination(A,arguments)},splitcomplement:function(){return this._applyCombination(C,arguments)},triad:function(){return this._applyCombination(S,arguments)},tetrad:function(){return this._applyCombination(O,arguments)}},f.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:N(e[r]));e=n}return f(e,t)},f.equals=function(e,t){return!(!e||!t)&&f(e).toRgbString()==f(t).toRgbString()},f.random=function(){return f.fromRatio({r:d(),g:d(),b:d()})},f.mix=function(e,t,n){n=0===n?0:n||50;var r=f(e).toRgb(),i=f(t).toRgb(),o=n/100;return f({r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a})},f.readability=function(e,t){var n=f(e),r=f(t);return(i.max(n.getLuminance(),r.getLuminance())+.05)/(i.min(n.getLuminance(),r.getLuminance())+.05)},f.isReadable=function(e,t,n){var r,i,o=f.readability(e,t);switch(i=!1,(r=function(e){var t,n;t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA");"small"!==n&&"large"!==n&&(n="small");return{level:t,size:n}}(n)).level+r.size){case"AAsmall":case"AAAlarge":i=o>=4.5;break;case"AAlarge":i=o>=3;break;case"AAAsmall":i=o>=7}return i},f.mostReadable=function(e,t,n){var r,i,o,a,s=null,l=0;i=(n=n||{}).includeFallbackColors,o=n.level,a=n.size;for(var u=0;ul&&(l=r,s=f(t[u]));return f.isReadable(e,s,{level:o,size:a})||!i?s:(n.includeFallbackColors=!1,f.mostReadable(e,["#fff","#000"],n))};var P=f.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},R=f.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(P);function j(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function I(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=u(t,c(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),i.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function M(e){return u(1,c(0,e))}function L(e){return parseInt(e,16)}function D(e){return 1==e.length?"0"+e:""+e}function N(e){return e<=1&&(e=100*e+"%"),e}function F(e){return i.round(255*parseFloat(e)).toString(16)}function B(e){return L(e)/255}var z,U,q,W=(U="[\\s|\\(]+("+(z="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+z+")[,|\\s]+("+z+")\\s*\\)?",q="[\\s|\\(]+("+z+")[,|\\s]+("+z+")[,|\\s]+("+z+")[,|\\s]+("+z+")\\s*\\)?",{CSS_UNIT:new RegExp(z),rgb:new RegExp("rgb"+U),rgba:new RegExp("rgba"+q),hsl:new RegExp("hsl"+U),hsla:new RegExp("hsla"+q),hsv:new RegExp("hsv"+U),hsva:new RegExp("hsva"+q),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function H(e){return!!W.CSS_UNIT.exec(e)}e.exports?e.exports=f:void 0===(r=function(){return f}.call(t,n,t,e))||(e.exports=r)}(Math)},function(e,t,n){"use strict";var r=n(0).createContext();e.exports=r},function(e,t,n){"use strict";var r=n(2);e.exports={refType:r.oneOfType([r.func,r.shape({current:r.elementType})])}},function(e,t,n){"use strict";e.exports=function(e,t,n){for(var r in n=n||{},t)t.hasOwnProperty(r)&&(n[r]||(e[r]=t[r]))}},function(e,t,n){var r=n(825),i=n(190),o=n(285),a=o&&o.isTypedArray,s=a?i(a):r;e.exports=s},function(e,t,n){(function(e){var r=n(495),i=t&&!t.nodeType&&t,o=i&&"object"==typeof e&&e&&!e.nodeType&&e,a=o&&o.exports===i&&r.process,s=function(){try{var e=o&&o.require&&o.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=s}).call(this,n(161)(e))},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t,n){var r=n(288),i=n(834),o=n(835),a=n(836),s=n(837),l=n(838);function u(e){var t=this.__data__=new r(e);this.size=t.size}u.prototype.clear=i,u.prototype.delete=o,u.prototype.get=a,u.prototype.has=s,u.prototype.set=l,e.exports=u},function(e,t,n){var r=n(829),i=n(830),o=n(831),a=n(832),s=n(833);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t1&&a(e,t[0],t[1])?t=[]:n>2&&a(t[0],t[1],t[2])&&(t=[t[0]]),i(e,r(t,1),[])}));e.exports=s},function(e,t){e.exports=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}},function(e,t,n){var r=n(243);e.exports=function(e,t,n){var i=e.length;return n=void 0===n?i:n,!t&&n>=i?e:r(e,t,n)}},function(e,t,n){var r=n(945),i=n(395),o=n(946);e.exports=function(e){return i(e)?o(e):r(e)}},function(e,t,n){var r=n(393);e.exports=function(e,t){return!!(null==e?0:e.length)&&r(e,t,0)>-1}},function(e,t,n){var r=n(120),i=n(83),o=n(244);e.exports=function(e){if(!i(e))return!1;var t=r(e);return"[object Error]"==t||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!o(e)}},function(e,t,n){var r=n(89),i=Object.create,o=function(){function e(){}return function(t){if(!r(t))return{};if(i)return i(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=o},function(e,t,n){var r=n(245),i=n(539),o=n(392);e.exports=function(e){return o(i(e,void 0,r),e+"")}},function(e,t,n){var r=n(303),i=n(89);e.exports=function(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=r(e.prototype),o=e.apply(n,t);return i(o)?o:n}}},function(e,t){e.exports=function(e){return e.placeholder}},function(e,t,n){var r=n(120),i=n(49),o=n(83);e.exports=function(e){return"string"==typeof e||!i(e)&&o(e)&&"[object String]"==r(e)}},function(e,t,n){var r=n(969),i=n(971);e.exports=function(e,t,n){return r(i,e,t,n)}},function(e,t,n){var r=n(287),i=n(405),o=n(390),a=n(563),s=n(974),l=n(564),u=n(216),c=n(977),d=n(978),f=n(502),p=n(407),h=n(212),m=n(979),g=n(980),v=n(567),y=n(49),b=n(238),_=n(984),w=n(89),x=n(986),k=n(210),E=n(249),S={};S["[object Arguments]"]=S["[object Array]"]=S["[object ArrayBuffer]"]=S["[object DataView]"]=S["[object Boolean]"]=S["[object Date]"]=S["[object Float32Array]"]=S["[object Float64Array]"]=S["[object Int8Array]"]=S["[object Int16Array]"]=S["[object Int32Array]"]=S["[object Map]"]=S["[object Number]"]=S["[object Object]"]=S["[object RegExp]"]=S["[object Set]"]=S["[object String]"]=S["[object Symbol]"]=S["[object Uint8Array]"]=S["[object Uint8ClampedArray]"]=S["[object Uint16Array]"]=S["[object Uint32Array]"]=!0,S["[object Error]"]=S["[object Function]"]=S["[object WeakMap]"]=!1,e.exports=function e(t,n,O,C,T,A){var P,R=1&n,j=2&n,I=4&n;if(O&&(P=T?O(t,C,T,A):O(t)),void 0!==P)return P;if(!w(t))return t;var M=y(t);if(M){if(P=m(t),!R)return u(t,P)}else{var L=h(t),D="[object Function]"==L||"[object GeneratorFunction]"==L;if(b(t))return l(t,R);if("[object Object]"==L||"[object Arguments]"==L||D&&!T){if(P=j||D?{}:v(t),!R)return j?d(t,s(P,t)):c(t,a(P,t))}else{if(!S[L])return T?t:{};P=g(t,L,R)}}A||(A=new r);var N=A.get(t);if(N)return N;A.set(t,P),x(t)?t.forEach((function(r){P.add(e(r,n,O,r,t,A))})):_(t)&&t.forEach((function(r,i){P.set(i,e(r,n,O,i,t,A))}));var F=M?void 0:(I?j?p:f:j?E:k)(t);return i(F||t,(function(r,i){F&&(r=t[i=r]),o(P,i,e(r,n,O,i,t,A))})),P}},function(e,t,n){var r=n(162),i=n(83);e.exports=function(e){return i(e)&&r(e)}},function(e,t,n){"use strict";(function(t){void 0===t||!t.version||0===t.version.indexOf("v0.")||0===t.version.indexOf("v1.")&&0!==t.version.indexOf("v1.8.")?e.exports={nextTick:function(e,n,r,i){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var o,a,s=arguments.length;switch(s){case 0:case 1:return t.nextTick(e);case 2:return t.nextTick((function(){e.call(null,n)}));case 3:return t.nextTick((function(){e.call(null,n,r)}));case 4:return t.nextTick((function(){e.call(null,n,r,i)}));default:for(o=new Array(s-1),a=0;ac.has(e)||"array"===t&&"array"===e):[]}(t,o.coerceTypes),u=t.length>0&&!(0===s.length&&1===t.length&&i.schemaHasRulesForType(e,t[0]));if(u){const i=f(t,r,o.strictNumbers,l.Wrong);n.if(i,()=>{s.length?function(e,t,n){const{gen:r,data:i,opts:o}=e,s=r.let("dataType",a._`typeof ${i}`),l=r.let("coerced",a._`undefined`);"array"===o.coerceTypes&&r.if(a._`${s} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,()=>r.assign(i,a._`${i}[0]`).assign(s,a._`typeof ${i}`).if(f(t,i,o.strictNumbers),()=>r.assign(l,i)));r.if(a._`${l} !== undefined`);for(const e of n)(c.has(e)||"array"===e&&"array"===o.coerceTypes)&&u(e);function u(e){switch(e){case"string":return void r.elseIf(a._`${s} == "number" || ${s} == "boolean"`).assign(l,a._`"" + ${i}`).elseIf(a._`${i} === null`).assign(l,a._`""`);case"number":return void r.elseIf(a._`${s} == "boolean" || ${i} === null - || (${s} == "string" && ${i} && ${i} == +${i})`).assign(l,a._`+${i}`);case"integer":return void r.elseIf(a._`${s} === "boolean" || ${i} === null - || (${s} === "string" && ${i} && ${i} == +${i} && !(${i} % 1))`).assign(l,a._`+${i}`);case"boolean":return void r.elseIf(a._`${i} === "false" || ${i} === 0 || ${i} === null`).assign(l,!1).elseIf(a._`${i} === "true" || ${i} === 1`).assign(l,!0);case"null":return r.elseIf(a._`${i} === "" || ${i} === 0 || ${i} === false`),void r.assign(l,null);case"array":r.elseIf(a._`${s} === "string" || ${s} === "number" - || ${s} === "boolean" || ${i} === null`).assign(l,a._`[${i}]`)}}r.else(),h(e),r.endIf(),r.if(a._`${l} !== undefined`,()=>{r.assign(i,l),function({gen:e,parentData:t,parentDataProperty:n},r){e.if(a._`${t} !== undefined`,()=>e.assign(a._`${t}[${n}]`,r))}(e,l)})}(e,t,s):h(e)})}return u};const c=new Set(["string","number","integer","boolean","null"]);function d(e,t,n,r=l.Correct){const i=r===l.Correct?a.operators.EQ:a.operators.NEQ;let o;switch(e){case"null":return a._`${t} ${i} null`;case"array":o=a._`Array.isArray(${t})`;break;case"object":o=a._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":o=s(a._`!(${t} % 1) && !isNaN(${t})`);break;case"number":o=s();break;default:return a._`typeof ${t} ${i} ${e}`}return r===l.Correct?o:a.not(o);function s(e=a.nil){return a.and(a._`typeof ${t} == "number"`,e,n?a._`isFinite(${t})`:a.nil)}}function f(e,t,n,r){if(1===e.length)return d(e[0],t,n,r);let i;const o=s.toHash(e);if(o.array&&o.object){const e=a._`typeof ${t} != "object"`;i=o.null?e:a._`!${t} || ${e}`,delete o.null,delete o.array,delete o.object}else i=a.nil;o.number&&delete o.integer;for(const e in o)i=a.and(i,d(e,t,n,r));return i}t.checkDataType=d,t.checkDataTypes=f;const p={message:({schema:e})=>"must be "+e,params:({schema:e,schemaValue:t})=>"string"==typeof e?a._`{type: ${e}}`:a._`{type: ${t}}`};function h(e){const t=function(e){const{gen:t,data:n,schema:r}=e,i=s.schemaRefOrVal(e,r,"type");return{gen:t,keyword:"type",data:n,schema:r.type,schemaCode:i,schemaValue:i,parentSchema:r,params:{},it:e}}(e);o.reportError(t,p)}t.reportTypeError=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSchemaRefs=t.resolveUrl=t.normalizeId=t._getFullPath=t.getFullPath=t.inlineRef=void 0;const r=n(44),i=n(274),o=n(1075),a=n(594),s=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);t.inlineRef=function(e,t=!0){return"boolean"==typeof e||(!0===t?!u(e):!!t&&function e(t){let n=0;for(const i in t){if("$ref"===i)return 1/0;if(n++,!s.has(i)&&("object"==typeof t[i]&&r.eachItem(t[i],t=>n+=e(t)),n===1/0))return 1/0}return n}(e)<=t)};const l=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function u(e){for(const t in e){if(l.has(t))return!0;const n=e[t];if(Array.isArray(n)&&n.some(u))return!0;if("object"==typeof n&&u(n))return!0}return!1}function c(e="",t){!1!==t&&(e=p(e));return d(a.parse(e))}function d(e){return a.serialize(e).split("#")[0]+"#"}t.getFullPath=c,t._getFullPath=d;const f=/#\/?$/;function p(e){return e?e.replace(f,""):""}t.normalizeId=p,t.resolveUrl=function(e,t){return t=p(t),a.resolve(e,t)};const h=/^[a-z_][-a-z0-9._]*$/i;t.getSchemaRefs=function(e){if("boolean"==typeof e)return{};const t=p(e.$id),n={"":t},r=c(t,!1),s={},l=new Set;return o(e,{allKeys:!0},(e,t,i,o)=>{if(void 0===o)return;const c=r+t;let f=n[o];function m(t){if(t=p(f?a.resolve(f,t):t),l.has(t))throw d(t);l.add(t);let n=this.refs[t];return"string"==typeof n&&(n=this.refs[n]),"object"==typeof n?u(e,n.schema,t):t!==p(c)&&("#"===t[0]?(u(e,s[t],t),s[t]=e):this.refs[t]=c),t}function g(e){if("string"==typeof e){if(!h.test(e))throw new Error(`invalid anchor "${e}"`);m.call(this,"#"+e)}}"string"==typeof e.$id&&(f=m.call(this,e.$id)),g.call(this,e.$anchor),g.call(this,e.$dynamicAnchor),n[t]=f}),s;function u(e,t,n){if(void 0!==t&&!i(e,t))throw d(n)}function d(e){return new Error(`reference "${e}" resolves to more than one schema`)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.usePattern=t.metaSchemaRef=void 0;const r=n(35);t.metaSchemaRef=function({defaultMeta:e}={}){return!1===e?{}:{$ref:e||"http://json-schema.org/schema"}},t.usePattern=function({gen:e,it:{opts:t}},n,i=(t.unicodeRegExp?"u":"")){const o=new RegExp(n,i);return e.scopeValue("pattern",{key:o.toString(),ref:o,code:r._`new RegExp(${n}, ${i})`})}},function(e,t,n){var r=n(1154);e.exports=function(e){return r(2,e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.commitMessageFormatter=function(e,t,n,r){let{slug:i,path:o,collection:a,authorLogin:s,authorName:l}=n;const u=m(m({},x),t.backend.commit_messages||{}),c=u[e].replace(k,(e,t)=>{switch(t){case"slug":return i||"";case"path":return o||"";case"collection":return a?a.get("label_singular")||a.get("label"):"";case"author-login":return s||"";case"author-name":return l||"";default:return console.warn(`Ignoring unknown variable “${t}” in commit message template.`),""}});if(!r)return c;return u.openAuthoring.replace(k,(e,t)=>{switch(t){case"message":return c;case"author-login":return s||"";case"author-name":return l||"";default:return console.warn(`Ignoring unknown variable “${t}” in open authoring message template.`),""}})},t.folderFormatter=function(e,t,n,r,i,o){if(!t||!t.get("data"))return e;let a=t.get("data").set(i,r);a=w(t.get("path"),a,n.get("folder"));const s=y(t,(0,u.selectInferedField)(n,"date"))||null,l=a.getIn(_((0,u.selectIdentifier)(n))),c=S(o,[r,a.get("dirname")]);return v(e,s,l,a,c)},t.getProcessSegment=S,t.prepareSlug=E,t.previewUrlFormatter=function(e,t,n,o,a){if(!e)return;const s=(0,i.default)(e,"/"),c=t.get("type")===d.FILES?(0,u.getFileFromSlug)(t,o.get("slug")):void 0;const f=null!==(p=null==c?void 0:c.get("preview_path"))&&void 0!==p?p:t.get("preview_path");var p;if(!f)return e;let h=o.get("data");h=w(o.get("path"),h,t.get("folder"));const m=(null!==(x=null==c?void 0:c.get("preview_path_date_field"))&&void 0!==x?x:t.get("preview_path_date_field"))||(0,u.selectInferedField)(t,"date"),g=y(o,m),_=S(a,[h.get("dirname")]);var x;let k;try{k=v(f,g,n,h,_)}catch(e){if(e.name===b)return console.error(l.stripIndent` - Collection "${t.get("name")}" configuration error: - \`preview_path_date_field\` must be a field with a valid date. Ignoring \`preview_path\`. - `),s;throw e}const E=(0,r.default)(k," /");return`${s}/${E}`},t.slugFormatter=function(e,t,n){const r=e.get("slug")||"{{slug}}",i=t.getIn(_((0,u.selectIdentifier)(e)));if(!i)throw new Error("Collection must have a field name that is a valid entry identifier, or must have `identifier_field` set");const o=S(n),a=new Date,s=v(r,a,i,t,o);if(e.has("path")){const n=E(e.get("path"));return v(n,a,s,t,e=>e===s?e:o(e))}return s},t.summaryFormatter=function(e,t,n){let r=t.get("data");const i=y(t,(0,u.selectInferedField)(n,"date"))||null,o=r.getIn(_((0,u.selectIdentifier)(n)));r=w(t.get("path"),r,n.get("folder")),t.get("author")&&!(0,u.selectField)(n,f.COMMIT_AUTHOR)&&(r=r.set(f.COMMIT_AUTHOR,t.get("author")));t.get("updatedOn")&&!(0,u.selectField)(n,f.COMMIT_DATE)&&(r=r.set(f.COMMIT_DATE,t.get("updatedOn")));return v(e,i,o,r)};var r=p(n(123)),i=p(n(168)),o=p(n(607)),a=p(n(146)),s=n(147),l=n(111),u=n(71),c=n(170),d=n(257),f=n(604);function p(e){return e&&e.__esModule?e:{default:e}}function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e){for(var t=1;tt&&t.includes(n)?n:(0,a.default)([e=>String(e),E,(0,o.default)(c.sanitizeSlug,e)])(n)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SEARCH_ENTRIES_SUCCESS=t.SEARCH_ENTRIES_REQUEST=t.SEARCH_ENTRIES_FAILURE=t.SEARCH_CLEAR=t.QUERY_SUCCESS=t.QUERY_REQUEST=t.QUERY_FAILURE=void 0,t.clearSearch=function(){return{type:"SEARCH_CLEAR"}},t.query=function(e,t,n,r,i,l){return async(u,c)=>{u(d(r));const h=c(),m=(0,o.currentBackend)(h.config),g=(0,s.selectIntegration)(h,t,"search"),v=h.collections.find(e=>e.get("name")===t),y=g?(0,a.getIntegrationProvider)(h.integrations,m.getToken,g).searchBy(n.map(e=>"data."+e),t,r):m.query(v,n,r,i,l);try{const t=await y;return u(f(e,t.hits))}catch(e){return u(p(e))}}},t.queryFailure=p,t.querySuccess=f,t.querying=d,t.searchEntries=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return async(r,d)=>{const f=d(),{search:p}=f,h=(0,o.currentBackend)(f.config),m=t||f.collections.keySeq().toArray(),g=m.filter(e=>(0,s.selectIntegration)(f,e,"search")),v=(0,s.selectIntegration)(f,g[0],"search");if(p.isFetching&&p.term===e&&(0,i.default)(m,p.collections)&&(p.page===n||!v))return;r(l(e,m,n));const y=v?(0,a.getIntegrationProvider)(f.integrations,h.getToken,v).search(g,e,n):h.search(f.collections.filter((e,t)=>-1!==m.indexOf(t)).valueSeq().toArray(),e);try{const e=await y;return r(u(e.entries,e.pagination))}catch(e){return r(c(e))}}},t.searchFailure=c,t.searchSuccess=u,t.searchingEntries=l;var r,i=(r=n(258))&&r.__esModule?r:{default:r},o=n(145),a=n(424),s=n(121);t.SEARCH_ENTRIES_REQUEST="SEARCH_ENTRIES_REQUEST";t.SEARCH_ENTRIES_SUCCESS="SEARCH_ENTRIES_SUCCESS";t.SEARCH_ENTRIES_FAILURE="SEARCH_ENTRIES_FAILURE";t.QUERY_REQUEST="QUERY_REQUEST";t.QUERY_SUCCESS="QUERY_SUCCESS";t.QUERY_FAILURE="QUERY_FAILURE";function l(e,t,n){return{type:"SEARCH_ENTRIES_REQUEST",payload:{searchTerm:e,searchCollections:t,page:n}}}function u(e,t){return{type:"SEARCH_ENTRIES_SUCCESS",payload:{entries:e,page:t}}}function c(e){return{type:"SEARCH_ENTRIES_FAILURE",payload:{error:e}}}function d(e){return{type:"QUERY_REQUEST",payload:{searchTerm:e}}}function f(e,t){return{type:"QUERY_SUCCESS",payload:{namespace:e,hits:t}}}function p(e){return{type:"QUERY_FAILURE",payload:{error:e}}}t.SEARCH_CLEAR="SEARCH_CLEAR"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.selectMediaDisplayURL=function(e,t){return e.mediaLibrary.getIn(["displayURLs",t],(0,i.Map)())},t.selectMediaFileByPath=function(e,t){const n=h(e);return n.find(e=>e.path===t)},t.selectMediaFiles=h;var r,i=n(4),o=(r=n(169))&&r.__esModule?r:{default:r},a=n(98),s=n(171),l=n(126),u=n(121);function c(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 d(e){for(var t=1;t(0,a.dirname)(e.path)===u).map(e=>d({key:e.id},e))}else c=n.get("files")||[];return c}var m=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,i.Map)(p),t=arguments.length>1?arguments[1]:void 0;switch(t.type){case s.MEDIA_LIBRARY_CREATE:return e.withMutations(e=>{e.set("externalLibrary",t.payload),e.set("showMediaButton",t.payload.enableStandalone())});case s.MEDIA_LIBRARY_OPEN:{const{controlID:n,forImage:r,privateUpload:o,config:a,field:s,value:l,replaceIndex:u}=t.payload,c=a||(0,i.Map)();return e.get("privateUpload")!==o?(0,i.Map)({isVisible:!0,forImage:r,controlID:n,canInsert:!!n,privateUpload:o,config:c,controlMedia:(0,i.Map)(),displayURLs:(0,i.Map)(),field:s,value:l,replaceIndex:u}):e.withMutations(e=>{e.set("isVisible",!0),e.set("forImage",r),e.set("controlID",n),e.set("canInsert",!!n),e.set("privateUpload",o),e.set("config",c),e.set("field",s),e.set("value",l),e.set("replaceIndex",u)})}case s.MEDIA_LIBRARY_CLOSE:return e.set("isVisible",!1);case s.MEDIA_INSERT:{const{mediaPath:n}=t.payload,r=e.get("controlID"),i=e.get("value");if(!Array.isArray(i))return e.withMutations(e=>{e.setIn(["controlMedia",r],n)});const o=e.get("replaceIndex"),a=Array.isArray(n)?n:[n],s=i;return"number"==typeof o?s[o]=a[0]:s.push(...a),e.withMutations(e=>{e.setIn(["controlMedia",r],s)})}case s.MEDIA_REMOVE_INSERTED:{const n=t.payload.controlID;return e.setIn(["controlMedia",n],"")}case s.MEDIA_LOAD_REQUEST:return e.withMutations(e=>{e.set("isLoading",!0),e.set("isPaginating",t.payload.page>1)});case s.MEDIA_LOAD_SUCCESS:{const{files:n=[],page:r,canPaginate:i,dynamicSearch:a,dynamicSearchQuery:s,privateUpload:l}=t.payload;if(e.get("privateUpload")!==l)return e;const u=n.map(e=>d(d({},e),{},{key:(0,o.default)()}));return e.withMutations(e=>{if(e.set("isLoading",!1),e.set("isPaginating",!1),e.set("page",r),e.set("hasNextPage",i&&n.length>0),e.set("dynamicSearch",a),e.set("dynamicSearchQuery",s),e.set("dynamicSearchActive",!!s),r&&r>1){const t=e.get("files").concat(u);e.set("files",t)}else e.set("files",u)})}case s.MEDIA_LOAD_FAILURE:return e.get("privateUpload")!==t.payload.privateUpload?e:e.set("isLoading",!1);case s.MEDIA_PERSIST_REQUEST:return e.set("isPersisting",!0);case s.MEDIA_PERSIST_SUCCESS:{const{file:n,privateUpload:r}=t.payload;return e.get("privateUpload")!==r?e:e.withMutations(e=>{const t=[d(d({},n),{},{key:(0,o.default)()}),...e.get("files")];e.set("files",t),e.set("isPersisting",!1)})}case s.MEDIA_PERSIST_FAILURE:return e.get("privateUpload")!==t.payload.privateUpload?e:e.set("isPersisting",!1);case s.MEDIA_DELETE_REQUEST:return e.set("isDeleting",!0);case s.MEDIA_DELETE_SUCCESS:{const{file:n,privateUpload:r}=t.payload,{key:i,id:o}=n;return e.get("privateUpload")!==r?e:e.withMutations(e=>{const t=e.get("files").filter(e=>i?e.key!==i:e.id!==o);e.set("files",t),e.deleteIn(["displayURLs",o]),e.set("isDeleting",!1)})}case s.MEDIA_DELETE_FAILURE:return e.get("privateUpload")!==t.payload.privateUpload?e:e.set("isDeleting",!1);case s.MEDIA_DISPLAY_URL_REQUEST:return e.setIn(["displayURLs",t.payload.key,"isFetching"],!0);case s.MEDIA_DISPLAY_URL_SUCCESS:{const n=["displayURLs",t.payload.key];return e.setIn([...n,"isFetching"],!1).setIn([...n,"url"],t.payload.url)}case s.MEDIA_DISPLAY_URL_FAILURE:{const n=["displayURLs",t.payload.key];return e.setIn([...n,"isFetching"],!1).setIn([...n,"err"],t.payload.err||!0).deleteIn([...n,"url"])}default:return e}};t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.selectIsLoadingAsset=function(e){return Object.values(e).some(e=>e.isLoading)};var r=n(144),i=n(200);var o=(0,r.produce)((e,t)=>{switch(t.type){case i.ADD_ASSETS:t.payload.forEach(t=>{e[t.path]={asset:t,isLoading:!1,error:null}});break;case i.ADD_ASSET:{const n=t.payload;e[n.path]={asset:n,isLoading:!1,error:null};break}case i.REMOVE_ASSET:{const n=t.payload;delete e[n];break}case i.LOAD_ASSET_REQUEST:{const{path:n}=t.payload;e[n]=e[n]||{},e[n].isLoading=!0;break}case i.LOAD_ASSET_SUCCESS:{const{path:n}=t.payload;e[n]=e[n]||{},e[n].isLoading=!1,e[n].error=null;break}case i.LOAD_ASSET_FAILURE:{const{path:n,error:r}=t.payload;e[n]=e[n]||{},e[n].isLoading=!1,e[n].error=r}}},{});t.default=o},function(e,t,n){"use strict";var r=String.fromCharCode;e.exports=r},function(e,t,n){"use strict";var r=n(61),i=n(68),o={tokenize:function(e,t,n){return i(e,(function(e){return null===e||r(e)?t(e):n(e)}),"linePrefix")},partial:!0};e.exports=o},function(e,t,n){"use strict";e.exports=function(e,t,n){for(var r,i=[],o=-1;++o4&&"data"===n.slice(0,4)&&a.test(t)&&("-"===t.charAt(4)?d=function(e){var t=e.slice(5).replace(s,c);return"data"+t.charAt(0).toUpperCase()+t.slice(1)}(t):t=function(e){var t=e.slice(4);if(s.test(t))return e;"-"!==(t=t.replace(l,u)).charAt(0)&&(t="-"+t);return"data"+t}(t),f=i);return new f(d,t)};var a=/^data[-\w.:]+$/i,s=/-[a-z]/g,l=/[A-Z]/g;function u(e){return"-"+e.toLowerCase()}function c(e){return e.charAt(1).toUpperCase()}},function(e,t){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1}return t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.htmlToSlate=function(e){const t=(0,i.default)().use(c.default,{fragment:!0}).parse(e),n=(0,i.default)().use(p.default).use(d.default,{minify:!1}).runSync(t);return(0,i.default)().use(h.default).use(m.default).use(g.default).use(v.default).runSync(n)},t.markdownToHtml=function(e){let{getAsset:t,resolveWidget:n,remarkPlugins:r=[]}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const o=O(e,r),a=(0,i.default)().use(f.default,{plugins:(0,E.getEditorComponents)(),getAsset:t,resolveWidget:n}).use(l.default,{allowDangerousHTML:!0}).runSync(o),s=(0,i.default)().use(u.default,{allowDangerousHtml:!0,allowDangerousCharacters:!0,closeSelfClosing:!0,entities:{useNamedReferences:!0}}).stringify(a);return s},t.markdownToRemark=O,t.markdownToSlate=function(e){let{voidCodeBlock:t,remarkPlugins:n=[]}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=O(e,n),o=(0,i.default)().use(g.default).use(v.default,{voidCodeBlock:t}).runSync(r);return o},t.remarkToMarkdown=T,t.slateToMarkdown=function(e){let{voidCodeBlock:t,remarkPlugins:n=[]}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=(0,k.default)(e,{voidCodeBlock:t}),i=T(r,n);return i};var r=S(n(168)),i=S(n(1471)),o=S(n(72)),a=S(n(1480)),s=S(n(1527)),l=S(n(1569)),u=S(n(1595)),c=S(n(1615)),d=S(n(1638)),f=S(n(1679)),p=S(n(1683)),h=S(n(1684)),m=S(n(1688)),g=S(n(1692)),v=S(n(1693)),y=S(n(1694)),b=n(1696),_=S(n(1697)),w=S(n(1699)),x=S(n(1700)),k=S(n(1701)),E=n(452);function S(e){return e&&e.__esModule?e:{default:e}}function O(e,t){const n=(0,i.default)().use(a.default,{fences:!0,commonmark:!0}).use(C,{inlineTokenizers:["url"]}).use(b.remarkParseShortcodes,{plugins:(0,E.getEditorComponents)()}).use(x.default).use(y.default).use(t),r=n.parse(e);return n.runSync(r)}function C(e){let{inlineTokenizers:t}=e;t&&t.forEach(e=>{delete this.Parser.prototype.inlineTokenizers[e]})}function T(e,t){const n=e||(0,o.default)("root",[(0,o.default)("paragraph",[(0,o.default)("text","")])]),a=(0,i.default)().use({settings:{commonmark:!0,fences:!0,listItemIndent:"1",bullet:"*",emphasis:"*",strong:"*",rule:"-"}}).use(_.default).use(w.default).use(s.default).use((function(){this.Compiler.prototype.visitors.text=e=>e.value})).use((0,b.createRemarkShortcodeStringifier)({plugins:(0,E.getEditorComponents)()})).use(t),l=a.runSync(n),u=a.stringify(l).replace(/\r?/g,"");return(0,r.default)(u)}},function(e,t,n){"use strict";var r=n(453),i=n(1485),o=n(269),a=n(693),s=n(694),l=n(1486);e.exports=function(e,t){var n,o,a={};t||(t={});for(o in f)n=t[o],a[o]=null==n?f[o]:n;(a.position.indent||a.position.start)&&(a.indent=a.position.indent||[],a.position=a.position.start);return function(e,t){var n,o,a,f,b,_,w,x,k,E,S,O,C,T,A,P,R,j,I,M=t.additional,L=t.nonTerminated,D=t.text,N=t.reference,F=t.warning,B=t.textContext,z=t.referenceContext,U=t.warningContext,q=t.position,W=t.indent||[],H=e.length,$=0,V=-1,G=q.column||1,K=q.line||1,Y="",Q=[];"string"==typeof M&&(M=M.charCodeAt(0));P=Z(),x=F?function(e,t){var n=Z();n.column+=t,n.offset+=t,F.call(U,v[e],n,e)}:d,$--,H++;for(;++$=55296&&X<=57343||X>1114111?(x(7,j),_=c(65533)):_ in i?(x(6,j),_=i[_]):(E="",y(_)&&x(6,j),_>65535&&(E+=c((_-=65536)>>>10|55296),_=56320|1023&_),_=E+c(_))):T!==p&&x(4,j)),_?(J(),P=Z(),$=I-1,G+=I-C+1,Q.push(_),(R=Z()).offset++,N&&N.call(z,_,{start:P,end:R},e.slice(C-1,I)),P=R):(f=e.slice(C-1,I),Y+=f,G+=f.length,$=I-1)}else 10===b&&(K++,V++,G=0),b==b?(Y+=c(b),G++):J();var X;return Q.join("");function Z(){return{line:K,column:G,offset:$+(q.offset||0)}}function J(){Y&&(Q.push(Y),D&&D.call(B,Y,{start:P,end:Z()}),Y="")}}(e,a)};var u={}.hasOwnProperty,c=String.fromCharCode,d=Function.prototype,f={warning:null,reference:null,text:null,warningContext:null,referenceContext:null,textContext:null,position:{},additional:null,attribute:!1,nonTerminated:!0},p="named",h="hexadecimal",m={hexadecimal:16,decimal:10},g={};g[p]=s,g.decimal=o,g[h]=a;var v={};function y(e){return e>=1&&e<=8||11===e||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||65535==(65535&e)||65534==(65535&e)}v[1]="Named character references must be terminated by a semicolon",v[2]="Numeric character references must be terminated by a semicolon",v[3]="Named character references cannot be empty",v[4]="Numeric character references cannot be empty",v[5]="Named character references must be known",v[6]="Numeric character references cannot be disallowed",v[7]="Numeric character references cannot be outside the permissible Unicode range"},function(e,t,n){"use strict";e.exports=s;var r=n(698),i=r.CONTINUE,o=r.SKIP,a=r.EXIT;function s(e,t,n,i){"function"==typeof t&&"function"!=typeof n&&(i=n,n=t,t=null),r(e,t,(function(e,t){var r=t[t.length-1],i=r?r.children.indexOf(e):null;return n(e,i,r)}),i)}s.CONTINUE=i,s.SKIP=o,s.EXIT=a},function(e,t,n){"use strict";e.exports=function(e){return String(e).replace(/\n+$/,"")}},function(e,t,n){"use strict";e.exports=n(1602)},function(e,t,n){"use strict";const r=n(1624),i=n(461),o=n(1625),a=n(462),s=i.CODE_POINTS,l=i.CODE_POINT_SEQUENCES,u={128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376},c="DATA_STATE";function d(e){return e===s.SPACE||e===s.LINE_FEED||e===s.TABULATION||e===s.FORM_FEED}function f(e){return e>=s.DIGIT_0&&e<=s.DIGIT_9}function p(e){return e>=s.LATIN_CAPITAL_A&&e<=s.LATIN_CAPITAL_Z}function h(e){return e>=s.LATIN_SMALL_A&&e<=s.LATIN_SMALL_Z}function m(e){return h(e)||p(e)}function g(e){return m(e)||f(e)}function v(e){return e>=s.LATIN_CAPITAL_A&&e<=s.LATIN_CAPITAL_F}function y(e){return e>=s.LATIN_SMALL_A&&e<=s.LATIN_SMALL_F}function b(e){return e+32}function _(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(e>>>10&1023|55296)+String.fromCharCode(56320|1023&e))}function w(e){return String.fromCharCode(b(e))}function x(e,t){const n=o[++e];let r=++e,i=r+n-1;for(;r<=i;){const e=r+i>>>1,a=o[e];if(at))return o[e+n];i=e-1}}return-1}class k{constructor(){this.preprocessor=new r,this.tokenQueue=[],this.allowCDATA=!1,this.state=c,this.returnState="",this.charRefCode=-1,this.tempBuff=[],this.lastStartTagName="",this.consumedAfterSnapshot=-1,this.active=!1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr=null}_err(){}_errOnNextCodePoint(e){this._consume(),this._err(e),this._unconsume()}getNextToken(){for(;!this.tokenQueue.length&&this.active;){this.consumedAfterSnapshot=0;const e=this._consume();this._ensureHibernation()||this[this.state](e)}return this.tokenQueue.shift()}write(e,t){this.active=!0,this.preprocessor.write(e,t)}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e)}_ensureHibernation(){if(this.preprocessor.endOfChunkHit){for(;this.consumedAfterSnapshot>0;this.consumedAfterSnapshot--)this.preprocessor.retreat();return this.active=!1,this.tokenQueue.push({type:k.HIBERNATION_TOKEN}),!0}return!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_unconsume(){this.consumedAfterSnapshot--,this.preprocessor.retreat()}_reconsumeInState(e){this.state=e,this._unconsume()}_consumeSequenceIfMatch(e,t,n){let r=0,i=!0;const o=e.length;let a=0,l=t,u=void 0;for(;a0&&(l=this._consume(),r++),l===s.EOF){i=!1;break}if(u=e[a],l!==u&&(n||l!==b(u))){i=!1;break}}if(!i)for(;r--;)this._unconsume();return i}_isTempBufferEqualToScriptString(){if(this.tempBuff.length!==l.SCRIPT_STRING.length)return!1;for(let e=0;e0&&this._err(a.endTagWithAttributes),e.selfClosing&&this._err(a.endTagWithTrailingSolidus)),this.tokenQueue.push(e)}_emitCurrentCharacterToken(){this.currentCharacterToken&&(this.tokenQueue.push(this.currentCharacterToken),this.currentCharacterToken=null)}_emitEOFToken(){this._createEOFToken(),this._emitCurrentToken()}_appendCharToCurrentCharacterToken(e,t){this.currentCharacterToken&&this.currentCharacterToken.type!==e&&this._emitCurrentCharacterToken(),this.currentCharacterToken?this.currentCharacterToken.chars+=t:this._createCharacterToken(e,t)}_emitCodePoint(e){let t=k.CHARACTER_TOKEN;d(e)?t=k.WHITESPACE_CHARACTER_TOKEN:e===s.NULL&&(t=k.NULL_CHARACTER_TOKEN),this._appendCharToCurrentCharacterToken(t,_(e))}_emitSeveralCodePoints(e){for(let t=0;t-1;){const e=o[r],i=e<7;i&&1&e&&(t=2&e?[o[++r],o[++r]]:[o[++r]],n=0);const a=this._consume();if(this.tempBuff.push(a),n++,a===s.EOF)break;r=i?4&e?x(r,a):-1:a===e?++r:-1}for(;n--;)this.tempBuff.pop(),this._unconsume();return t}_isCharacterReferenceInAttribute(){return"ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE"===this.returnState||"ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE"===this.returnState||"ATTRIBUTE_VALUE_UNQUOTED_STATE"===this.returnState}_isCharacterReferenceAttributeQuirk(e){if(!e&&this._isCharacterReferenceInAttribute()){const e=this._consume();return this._unconsume(),e===s.EQUALS_SIGN||g(e)}return!1}_flushCodePointsConsumedAsCharacterReference(){if(this._isCharacterReferenceInAttribute())for(let e=0;e")):e===s.NULL?(this._err(a.unexpectedNullCharacter),this.state="SCRIPT_DATA_ESCAPED_STATE",this._emitChars(i.REPLACEMENT_CHARACTER)):e===s.EOF?(this._err(a.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state="SCRIPT_DATA_ESCAPED_STATE",this._emitCodePoint(e))}SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE(e){e===s.SOLIDUS?(this.tempBuff=[],this.state="SCRIPT_DATA_ESCAPED_END_TAG_OPEN_STATE"):m(e)?(this.tempBuff=[],this._emitChars("<"),this._reconsumeInState("SCRIPT_DATA_DOUBLE_ESCAPE_START_STATE")):(this._emitChars("<"),this._reconsumeInState("SCRIPT_DATA_ESCAPED_STATE"))}SCRIPT_DATA_ESCAPED_END_TAG_OPEN_STATE(e){m(e)?(this._createEndTagToken(),this._reconsumeInState("SCRIPT_DATA_ESCAPED_END_TAG_NAME_STATE")):(this._emitChars("")):e===s.NULL?(this._err(a.unexpectedNullCharacter),this.state="SCRIPT_DATA_DOUBLE_ESCAPED_STATE",this._emitChars(i.REPLACEMENT_CHARACTER)):e===s.EOF?(this._err(a.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state="SCRIPT_DATA_DOUBLE_ESCAPED_STATE",this._emitCodePoint(e))}SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE(e){e===s.SOLIDUS?(this.tempBuff=[],this.state="SCRIPT_DATA_DOUBLE_ESCAPE_END_STATE",this._emitChars("/")):this._reconsumeInState("SCRIPT_DATA_DOUBLE_ESCAPED_STATE")}SCRIPT_DATA_DOUBLE_ESCAPE_END_STATE(e){d(e)||e===s.SOLIDUS||e===s.GREATER_THAN_SIGN?(this.state=this._isTempBufferEqualToScriptString()?"SCRIPT_DATA_ESCAPED_STATE":"SCRIPT_DATA_DOUBLE_ESCAPED_STATE",this._emitCodePoint(e)):p(e)?(this.tempBuff.push(b(e)),this._emitCodePoint(e)):h(e)?(this.tempBuff.push(e),this._emitCodePoint(e)):this._reconsumeInState("SCRIPT_DATA_DOUBLE_ESCAPED_STATE")}BEFORE_ATTRIBUTE_NAME_STATE(e){d(e)||(e===s.SOLIDUS||e===s.GREATER_THAN_SIGN||e===s.EOF?this._reconsumeInState("AFTER_ATTRIBUTE_NAME_STATE"):e===s.EQUALS_SIGN?(this._err(a.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state="ATTRIBUTE_NAME_STATE"):(this._createAttr(""),this._reconsumeInState("ATTRIBUTE_NAME_STATE")))}ATTRIBUTE_NAME_STATE(e){d(e)||e===s.SOLIDUS||e===s.GREATER_THAN_SIGN||e===s.EOF?(this._leaveAttrName("AFTER_ATTRIBUTE_NAME_STATE"),this._unconsume()):e===s.EQUALS_SIGN?this._leaveAttrName("BEFORE_ATTRIBUTE_VALUE_STATE"):p(e)?this.currentAttr.name+=w(e):e===s.QUOTATION_MARK||e===s.APOSTROPHE||e===s.LESS_THAN_SIGN?(this._err(a.unexpectedCharacterInAttributeName),this.currentAttr.name+=_(e)):e===s.NULL?(this._err(a.unexpectedNullCharacter),this.currentAttr.name+=i.REPLACEMENT_CHARACTER):this.currentAttr.name+=_(e)}AFTER_ATTRIBUTE_NAME_STATE(e){d(e)||(e===s.SOLIDUS?this.state="SELF_CLOSING_START_TAG_STATE":e===s.EQUALS_SIGN?this.state="BEFORE_ATTRIBUTE_VALUE_STATE":e===s.GREATER_THAN_SIGN?(this.state=c,this._emitCurrentToken()):e===s.EOF?(this._err(a.eofInTag),this._emitEOFToken()):(this._createAttr(""),this._reconsumeInState("ATTRIBUTE_NAME_STATE")))}BEFORE_ATTRIBUTE_VALUE_STATE(e){d(e)||(e===s.QUOTATION_MARK?this.state="ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE":e===s.APOSTROPHE?this.state="ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE":e===s.GREATER_THAN_SIGN?(this._err(a.missingAttributeValue),this.state=c,this._emitCurrentToken()):this._reconsumeInState("ATTRIBUTE_VALUE_UNQUOTED_STATE"))}ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE(e){e===s.QUOTATION_MARK?this.state="AFTER_ATTRIBUTE_VALUE_QUOTED_STATE":e===s.AMPERSAND?(this.returnState="ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE",this.state="CHARACTER_REFERENCE_STATE"):e===s.NULL?(this._err(a.unexpectedNullCharacter),this.currentAttr.value+=i.REPLACEMENT_CHARACTER):e===s.EOF?(this._err(a.eofInTag),this._emitEOFToken()):this.currentAttr.value+=_(e)}ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE(e){e===s.APOSTROPHE?this.state="AFTER_ATTRIBUTE_VALUE_QUOTED_STATE":e===s.AMPERSAND?(this.returnState="ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE",this.state="CHARACTER_REFERENCE_STATE"):e===s.NULL?(this._err(a.unexpectedNullCharacter),this.currentAttr.value+=i.REPLACEMENT_CHARACTER):e===s.EOF?(this._err(a.eofInTag),this._emitEOFToken()):this.currentAttr.value+=_(e)}ATTRIBUTE_VALUE_UNQUOTED_STATE(e){d(e)?this._leaveAttrValue("BEFORE_ATTRIBUTE_NAME_STATE"):e===s.AMPERSAND?(this.returnState="ATTRIBUTE_VALUE_UNQUOTED_STATE",this.state="CHARACTER_REFERENCE_STATE"):e===s.GREATER_THAN_SIGN?(this._leaveAttrValue(c),this._emitCurrentToken()):e===s.NULL?(this._err(a.unexpectedNullCharacter),this.currentAttr.value+=i.REPLACEMENT_CHARACTER):e===s.QUOTATION_MARK||e===s.APOSTROPHE||e===s.LESS_THAN_SIGN||e===s.EQUALS_SIGN||e===s.GRAVE_ACCENT?(this._err(a.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=_(e)):e===s.EOF?(this._err(a.eofInTag),this._emitEOFToken()):this.currentAttr.value+=_(e)}AFTER_ATTRIBUTE_VALUE_QUOTED_STATE(e){d(e)?this._leaveAttrValue("BEFORE_ATTRIBUTE_NAME_STATE"):e===s.SOLIDUS?this._leaveAttrValue("SELF_CLOSING_START_TAG_STATE"):e===s.GREATER_THAN_SIGN?(this._leaveAttrValue(c),this._emitCurrentToken()):e===s.EOF?(this._err(a.eofInTag),this._emitEOFToken()):(this._err(a.missingWhitespaceBetweenAttributes),this._reconsumeInState("BEFORE_ATTRIBUTE_NAME_STATE"))}SELF_CLOSING_START_TAG_STATE(e){e===s.GREATER_THAN_SIGN?(this.currentToken.selfClosing=!0,this.state=c,this._emitCurrentToken()):e===s.EOF?(this._err(a.eofInTag),this._emitEOFToken()):(this._err(a.unexpectedSolidusInTag),this._reconsumeInState("BEFORE_ATTRIBUTE_NAME_STATE"))}BOGUS_COMMENT_STATE(e){e===s.GREATER_THAN_SIGN?(this.state=c,this._emitCurrentToken()):e===s.EOF?(this._emitCurrentToken(),this._emitEOFToken()):e===s.NULL?(this._err(a.unexpectedNullCharacter),this.currentToken.data+=i.REPLACEMENT_CHARACTER):this.currentToken.data+=_(e)}MARKUP_DECLARATION_OPEN_STATE(e){this._consumeSequenceIfMatch(l.DASH_DASH_STRING,e,!0)?(this._createCommentToken(),this.state="COMMENT_START_STATE"):this._consumeSequenceIfMatch(l.DOCTYPE_STRING,e,!1)?this.state="DOCTYPE_STATE":this._consumeSequenceIfMatch(l.CDATA_START_STRING,e,!0)?this.allowCDATA?this.state="CDATA_SECTION_STATE":(this._err(a.cdataInHtmlContent),this._createCommentToken(),this.currentToken.data="[CDATA[",this.state="BOGUS_COMMENT_STATE"):this._ensureHibernation()||(this._err(a.incorrectlyOpenedComment),this._createCommentToken(),this._reconsumeInState("BOGUS_COMMENT_STATE"))}COMMENT_START_STATE(e){e===s.HYPHEN_MINUS?this.state="COMMENT_START_DASH_STATE":e===s.GREATER_THAN_SIGN?(this._err(a.abruptClosingOfEmptyComment),this.state=c,this._emitCurrentToken()):this._reconsumeInState("COMMENT_STATE")}COMMENT_START_DASH_STATE(e){e===s.HYPHEN_MINUS?this.state="COMMENT_END_STATE":e===s.GREATER_THAN_SIGN?(this._err(a.abruptClosingOfEmptyComment),this.state=c,this._emitCurrentToken()):e===s.EOF?(this._err(a.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="-",this._reconsumeInState("COMMENT_STATE"))}COMMENT_STATE(e){e===s.HYPHEN_MINUS?this.state="COMMENT_END_DASH_STATE":e===s.LESS_THAN_SIGN?(this.currentToken.data+="<",this.state="COMMENT_LESS_THAN_SIGN_STATE"):e===s.NULL?(this._err(a.unexpectedNullCharacter),this.currentToken.data+=i.REPLACEMENT_CHARACTER):e===s.EOF?(this._err(a.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.data+=_(e)}COMMENT_LESS_THAN_SIGN_STATE(e){e===s.EXCLAMATION_MARK?(this.currentToken.data+="!",this.state="COMMENT_LESS_THAN_SIGN_BANG_STATE"):e===s.LESS_THAN_SIGN?this.currentToken.data+="!":this._reconsumeInState("COMMENT_STATE")}COMMENT_LESS_THAN_SIGN_BANG_STATE(e){e===s.HYPHEN_MINUS?this.state="COMMENT_LESS_THAN_SIGN_BANG_DASH_STATE":this._reconsumeInState("COMMENT_STATE")}COMMENT_LESS_THAN_SIGN_BANG_DASH_STATE(e){e===s.HYPHEN_MINUS?this.state="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH_STATE":this._reconsumeInState("COMMENT_END_DASH_STATE")}COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH_STATE(e){e!==s.GREATER_THAN_SIGN&&e!==s.EOF&&this._err(a.nestedComment),this._reconsumeInState("COMMENT_END_STATE")}COMMENT_END_DASH_STATE(e){e===s.HYPHEN_MINUS?this.state="COMMENT_END_STATE":e===s.EOF?(this._err(a.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="-",this._reconsumeInState("COMMENT_STATE"))}COMMENT_END_STATE(e){e===s.GREATER_THAN_SIGN?(this.state=c,this._emitCurrentToken()):e===s.EXCLAMATION_MARK?this.state="COMMENT_END_BANG_STATE":e===s.HYPHEN_MINUS?this.currentToken.data+="-":e===s.EOF?(this._err(a.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="--",this._reconsumeInState("COMMENT_STATE"))}COMMENT_END_BANG_STATE(e){e===s.HYPHEN_MINUS?(this.currentToken.data+="--!",this.state="COMMENT_END_DASH_STATE"):e===s.GREATER_THAN_SIGN?(this._err(a.incorrectlyClosedComment),this.state=c,this._emitCurrentToken()):e===s.EOF?(this._err(a.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="--!",this._reconsumeInState("COMMENT_STATE"))}DOCTYPE_STATE(e){d(e)?this.state="BEFORE_DOCTYPE_NAME_STATE":e===s.GREATER_THAN_SIGN?this._reconsumeInState("BEFORE_DOCTYPE_NAME_STATE"):e===s.EOF?(this._err(a.eofInDoctype),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(a.missingWhitespaceBeforeDoctypeName),this._reconsumeInState("BEFORE_DOCTYPE_NAME_STATE"))}BEFORE_DOCTYPE_NAME_STATE(e){d(e)||(p(e)?(this._createDoctypeToken(w(e)),this.state="DOCTYPE_NAME_STATE"):e===s.NULL?(this._err(a.unexpectedNullCharacter),this._createDoctypeToken(i.REPLACEMENT_CHARACTER),this.state="DOCTYPE_NAME_STATE"):e===s.GREATER_THAN_SIGN?(this._err(a.missingDoctypeName),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=c):e===s.EOF?(this._err(a.eofInDoctype),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._createDoctypeToken(_(e)),this.state="DOCTYPE_NAME_STATE"))}DOCTYPE_NAME_STATE(e){d(e)?this.state="AFTER_DOCTYPE_NAME_STATE":e===s.GREATER_THAN_SIGN?(this.state=c,this._emitCurrentToken()):p(e)?this.currentToken.name+=w(e):e===s.NULL?(this._err(a.unexpectedNullCharacter),this.currentToken.name+=i.REPLACEMENT_CHARACTER):e===s.EOF?(this._err(a.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.name+=_(e)}AFTER_DOCTYPE_NAME_STATE(e){d(e)||(e===s.GREATER_THAN_SIGN?(this.state=c,this._emitCurrentToken()):e===s.EOF?(this._err(a.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this._consumeSequenceIfMatch(l.PUBLIC_STRING,e,!1)?this.state="AFTER_DOCTYPE_PUBLIC_KEYWORD_STATE":this._consumeSequenceIfMatch(l.SYSTEM_STRING,e,!1)?this.state="AFTER_DOCTYPE_SYSTEM_KEYWORD_STATE":this._ensureHibernation()||(this._err(a.invalidCharacterSequenceAfterDoctypeName),this.currentToken.forceQuirks=!0,this._reconsumeInState("BOGUS_DOCTYPE_STATE")))}AFTER_DOCTYPE_PUBLIC_KEYWORD_STATE(e){d(e)?this.state="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER_STATE":e===s.QUOTATION_MARK?(this._err(a.missingWhitespaceAfterDoctypePublicKeyword),this.currentToken.publicId="",this.state="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE"):e===s.APOSTROPHE?(this._err(a.missingWhitespaceAfterDoctypePublicKeyword),this.currentToken.publicId="",this.state="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE"):e===s.GREATER_THAN_SIGN?(this._err(a.missingDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this.state=c,this._emitCurrentToken()):e===s.EOF?(this._err(a.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(a.missingQuoteBeforeDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState("BOGUS_DOCTYPE_STATE"))}BEFORE_DOCTYPE_PUBLIC_IDENTIFIER_STATE(e){d(e)||(e===s.QUOTATION_MARK?(this.currentToken.publicId="",this.state="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE"):e===s.APOSTROPHE?(this.currentToken.publicId="",this.state="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE"):e===s.GREATER_THAN_SIGN?(this._err(a.missingDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this.state=c,this._emitCurrentToken()):e===s.EOF?(this._err(a.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(a.missingQuoteBeforeDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState("BOGUS_DOCTYPE_STATE")))}DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE(e){e===s.QUOTATION_MARK?this.state="AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE":e===s.NULL?(this._err(a.unexpectedNullCharacter),this.currentToken.publicId+=i.REPLACEMENT_CHARACTER):e===s.GREATER_THAN_SIGN?(this._err(a.abruptDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=c):e===s.EOF?(this._err(a.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.publicId+=_(e)}DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE(e){e===s.APOSTROPHE?this.state="AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE":e===s.NULL?(this._err(a.unexpectedNullCharacter),this.currentToken.publicId+=i.REPLACEMENT_CHARACTER):e===s.GREATER_THAN_SIGN?(this._err(a.abruptDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=c):e===s.EOF?(this._err(a.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.publicId+=_(e)}AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE(e){d(e)?this.state="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS_STATE":e===s.GREATER_THAN_SIGN?(this.state=c,this._emitCurrentToken()):e===s.QUOTATION_MARK?(this._err(a.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),this.currentToken.systemId="",this.state="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE"):e===s.APOSTROPHE?(this._err(a.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),this.currentToken.systemId="",this.state="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE"):e===s.EOF?(this._err(a.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(a.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState("BOGUS_DOCTYPE_STATE"))}BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS_STATE(e){d(e)||(e===s.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=c):e===s.QUOTATION_MARK?(this.currentToken.systemId="",this.state="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE"):e===s.APOSTROPHE?(this.currentToken.systemId="",this.state="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE"):e===s.EOF?(this._err(a.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(a.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState("BOGUS_DOCTYPE_STATE")))}AFTER_DOCTYPE_SYSTEM_KEYWORD_STATE(e){d(e)?this.state="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER_STATE":e===s.QUOTATION_MARK?(this._err(a.missingWhitespaceAfterDoctypeSystemKeyword),this.currentToken.systemId="",this.state="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE"):e===s.APOSTROPHE?(this._err(a.missingWhitespaceAfterDoctypeSystemKeyword),this.currentToken.systemId="",this.state="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE"):e===s.GREATER_THAN_SIGN?(this._err(a.missingDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this.state=c,this._emitCurrentToken()):e===s.EOF?(this._err(a.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(a.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState("BOGUS_DOCTYPE_STATE"))}BEFORE_DOCTYPE_SYSTEM_IDENTIFIER_STATE(e){d(e)||(e===s.QUOTATION_MARK?(this.currentToken.systemId="",this.state="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE"):e===s.APOSTROPHE?(this.currentToken.systemId="",this.state="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE"):e===s.GREATER_THAN_SIGN?(this._err(a.missingDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this.state=c,this._emitCurrentToken()):e===s.EOF?(this._err(a.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(a.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState("BOGUS_DOCTYPE_STATE")))}DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE(e){e===s.QUOTATION_MARK?this.state="AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE":e===s.NULL?(this._err(a.unexpectedNullCharacter),this.currentToken.systemId+=i.REPLACEMENT_CHARACTER):e===s.GREATER_THAN_SIGN?(this._err(a.abruptDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=c):e===s.EOF?(this._err(a.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.systemId+=_(e)}DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE(e){e===s.APOSTROPHE?this.state="AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE":e===s.NULL?(this._err(a.unexpectedNullCharacter),this.currentToken.systemId+=i.REPLACEMENT_CHARACTER):e===s.GREATER_THAN_SIGN?(this._err(a.abruptDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=c):e===s.EOF?(this._err(a.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.systemId+=_(e)}AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE(e){d(e)||(e===s.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=c):e===s.EOF?(this._err(a.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(a.unexpectedCharacterAfterDoctypeSystemIdentifier),this._reconsumeInState("BOGUS_DOCTYPE_STATE")))}BOGUS_DOCTYPE_STATE(e){e===s.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=c):e===s.NULL?this._err(a.unexpectedNullCharacter):e===s.EOF&&(this._emitCurrentToken(),this._emitEOFToken())}CDATA_SECTION_STATE(e){e===s.RIGHT_SQUARE_BRACKET?this.state="CDATA_SECTION_BRACKET_STATE":e===s.EOF?(this._err(a.eofInCdata),this._emitEOFToken()):this._emitCodePoint(e)}CDATA_SECTION_BRACKET_STATE(e){e===s.RIGHT_SQUARE_BRACKET?this.state="CDATA_SECTION_END_STATE":(this._emitChars("]"),this._reconsumeInState("CDATA_SECTION_STATE"))}CDATA_SECTION_END_STATE(e){e===s.GREATER_THAN_SIGN?this.state=c:e===s.RIGHT_SQUARE_BRACKET?this._emitChars("]"):(this._emitChars("]]"),this._reconsumeInState("CDATA_SECTION_STATE"))}CHARACTER_REFERENCE_STATE(e){this.tempBuff=[s.AMPERSAND],e===s.NUMBER_SIGN?(this.tempBuff.push(e),this.state="NUMERIC_CHARACTER_REFERENCE_STATE"):g(e)?this._reconsumeInState("NAMED_CHARACTER_REFERENCE_STATE"):(this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState))}NAMED_CHARACTER_REFERENCE_STATE(e){const t=this._matchNamedCharacterReference(e);if(this._ensureHibernation())this.tempBuff=[s.AMPERSAND];else if(t){const e=this.tempBuff[this.tempBuff.length-1]===s.SEMICOLON;this._isCharacterReferenceAttributeQuirk(e)||(e||this._errOnNextCodePoint(a.missingSemicolonAfterCharacterReference),this.tempBuff=t),this._flushCodePointsConsumedAsCharacterReference(),this.state=this.returnState}else this._flushCodePointsConsumedAsCharacterReference(),this.state="AMBIGUOS_AMPERSAND_STATE"}AMBIGUOS_AMPERSAND_STATE(e){g(e)?this._isCharacterReferenceInAttribute()?this.currentAttr.value+=_(e):this._emitCodePoint(e):(e===s.SEMICOLON&&this._err(a.unknownNamedCharacterReference),this._reconsumeInState(this.returnState))}NUMERIC_CHARACTER_REFERENCE_STATE(e){this.charRefCode=0,e===s.LATIN_SMALL_X||e===s.LATIN_CAPITAL_X?(this.tempBuff.push(e),this.state="HEXADEMICAL_CHARACTER_REFERENCE_START_STATE"):this._reconsumeInState("DECIMAL_CHARACTER_REFERENCE_START_STATE")}HEXADEMICAL_CHARACTER_REFERENCE_START_STATE(e){!function(e){return f(e)||v(e)||y(e)}(e)?(this._err(a.absenceOfDigitsInNumericCharacterReference),this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState)):this._reconsumeInState("HEXADEMICAL_CHARACTER_REFERENCE_STATE")}DECIMAL_CHARACTER_REFERENCE_START_STATE(e){f(e)?this._reconsumeInState("DECIMAL_CHARACTER_REFERENCE_STATE"):(this._err(a.absenceOfDigitsInNumericCharacterReference),this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState))}HEXADEMICAL_CHARACTER_REFERENCE_STATE(e){v(e)?this.charRefCode=16*this.charRefCode+e-55:y(e)?this.charRefCode=16*this.charRefCode+e-87:f(e)?this.charRefCode=16*this.charRefCode+e-48:e===s.SEMICOLON?this.state="NUMERIC_CHARACTER_REFERENCE_END_STATE":(this._err(a.missingSemicolonAfterCharacterReference),this._reconsumeInState("NUMERIC_CHARACTER_REFERENCE_END_STATE"))}DECIMAL_CHARACTER_REFERENCE_STATE(e){f(e)?this.charRefCode=10*this.charRefCode+e-48:e===s.SEMICOLON?this.state="NUMERIC_CHARACTER_REFERENCE_END_STATE":(this._err(a.missingSemicolonAfterCharacterReference),this._reconsumeInState("NUMERIC_CHARACTER_REFERENCE_END_STATE"))}NUMERIC_CHARACTER_REFERENCE_END_STATE(){if(this.charRefCode===s.NULL)this._err(a.nullCharacterReference),this.charRefCode=s.REPLACEMENT_CHARACTER;else if(this.charRefCode>1114111)this._err(a.characterReferenceOutsideUnicodeRange),this.charRefCode=s.REPLACEMENT_CHARACTER;else if(i.isSurrogate(this.charRefCode))this._err(a.surrogateCharacterReference),this.charRefCode=s.REPLACEMENT_CHARACTER;else if(i.isUndefinedCodePoint(this.charRefCode))this._err(a.noncharacterCharacterReference);else if(i.isControlCodePoint(this.charRefCode)||this.charRefCode===s.CARRIAGE_RETURN){this._err(a.controlCharacterReference);const e=u[this.charRefCode];e&&(this.charRefCode=e)}this.tempBuff=[this.charRefCode],this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState)}}k.CHARACTER_TOKEN="CHARACTER_TOKEN",k.NULL_CHARACTER_TOKEN="NULL_CHARACTER_TOKEN",k.WHITESPACE_CHARACTER_TOKEN="WHITESPACE_CHARACTER_TOKEN",k.START_TAG_TOKEN="START_TAG_TOKEN",k.END_TAG_TOKEN="END_TAG_TOKEN",k.COMMENT_TOKEN="COMMENT_TOKEN",k.DOCTYPE_TOKEN="DOCTYPE_TOKEN",k.EOF_TOKEN="EOF_TOKEN",k.HIBERNATION_TOKEN="HIBERNATION_TOKEN",k.MODE={DATA:c,RCDATA:"RCDATA_STATE",RAWTEXT:"RAWTEXT_STATE",SCRIPT_DATA:"SCRIPT_DATA_STATE",PLAINTEXT:"PLAINTEXT_STATE"},k.getTokenAttr=function(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null},e.exports=k},function(e,t,n){"use strict";var r={}.hasOwnProperty;e.exports=function(e,t){var n,i;if(!e||!t||"object"!=typeof e||"element"!==e.type)return!1;return n=e.properties,null!=(i=n&&r.call(n,t)&&n[t])&&!1!==i}},function(e,t,n){"use strict";e.exports={}.hasOwnProperty},function(e,t,n){"use strict";var r=n(77),i=n(128),o=n(1653);e.exports=function(e){var t,n,i,o,a=e.children||[],s=p(e),u=y(e,{}),c=-1;if("text"===e.type||"comment"===e.type)return m(e,{whiteSpace:u,breakBefore:!0,breakAfter:!0});t=[];for(;++co&&(o=i):i&&(o&&n.push(r("\n",o)),o=0,n.push(i));return n.join("")};var a=/\n/g,s=/[\t ]+/g,l=i("br"),u=i("p"),c=i(["th","td"]),d=i("tr"),f=i(["datalist","head","noembed","noframes","rp","script","style","template","title","noscript",function(e){return(e.properties||{}).hidden},function(e){return"dialog"===e.tagName&&!(e.properties||{}).open}]),p=i(["caption","html","body","address","blockquote","center","dialog","div","figure","figcaption","footer","form,","header","hr","legend","listing","main","p","plaintext","pre","xmp","article","aside","h1","h2","h3","h4","h5","h6","hgroup","nav","section","dir","dd","dl","dt","menu","ol","ul"]);function h(e,t,n,r){return"element"===e.type?function(e,t,n,r){var i,a,s=y(e,r),m=e.children||[],g=-1,v=[];if(f(e))return v;l(e)||d(e)&&o(n,e,d)?a="\n":u(e)?(i=2,a=2):p(e)&&(i=1,a=1);for(;++g120){for(var h=Math.floor(l/80),m=l%80,g=[],v=0;v0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),null!=s&&s.stack?(Object.defineProperty(g(y),"stack",{value:s.stack,writable:!0,configurable:!0}),m(y)):(Error.captureStackTrace?Error.captureStackTrace(g(y),v):Object.defineProperty(g(y),"stack",{value:Error().stack,writable:!0,configurable:!0}),y)}return r=v,(u=[{key:"toString",value:function(){return function(e){var t=e.message;if(e.nodes)for(var n=0,r=e.nodes;n",EOF:"",BANG:"!",DOLLAR:"$",AMP:"&",PAREN_L:"(",PAREN_R:")",SPREAD:"...",COLON:":",EQUALS:"=",AT:"@",BRACKET_L:"[",BRACKET_R:"]",BRACE_L:"{",PIPE:"|",BRACE_R:"}",NAME:"Name",INT:"Int",FLOAT:"Float",STRING:"String",BLOCK_STRING:"BlockString",COMMENT:"Comment"});function R(e){return(R="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})(e)}function j(e){return I(e,[])}function I(e,t){switch(R(e)){case"string":return JSON.stringify(e);case"function":return e.name?"[function ".concat(e.name,"]"):"[function]";case"object":return null===e?"null":function(e,t){if(-1!==t.indexOf(e))return"[Circular]";var n=[].concat(t,[e]),r=function(e){var t=e[String(O)];if("function"==typeof t)return t;if("function"==typeof e.inspect)return e.inspect}(e);if(void 0!==r){var i=r.call(e);if(i!==e)return"string"==typeof i?i:I(i,n)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>2)return"[Array]";for(var n=Math.min(10,e.length),r=e.length-n,i=[],o=0;o1&&i.push("... ".concat(r," more items"));return"["+i.join(", ")+"]"}(e,n);return function(e,t){var n=Object.keys(e);if(0===n.length)return"{}";if(t.length>2)return"["+function(e){var t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){var n=e.constructor.name;if("string"==typeof n&&""!==n)return n}return t}(e)+"]";return"{ "+n.map((function(n){return n+": "+I(e[n],t)})).join(", ")+" }"}(e,n)}(e,t);default:return String(e)}}function M(e,t){if(!Boolean(e))throw new Error(t)}var L=function(e,t){return e instanceof t};function D(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"GraphQL request",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{line:1,column:1};"string"==typeof e||M(0,"Body must be a string. Received: ".concat(j(e),".")),this.body=e,this.name=t,this.locationOffset=n,this.locationOffset.line>0||M(0,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||M(0,"column in locationOffset is 1-indexed and must be positive.")}var t,n,r;return t=e,(n=[{key:o,get:function(){return"Source"}}])&&D(t.prototype,n),r&&D(t,r),e}();var F=Object.freeze({QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",VARIABLE_DEFINITION:"VARIABLE_DEFINITION",SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD_DEFINITION:"FIELD_DEFINITION",ARGUMENT_DEFINITION:"ARGUMENT_DEFINITION",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD_DEFINITION:"INPUT_FIELD_DEFINITION"});function B(e){var t=e.split(/\r\n|[\n\r]/g),n=function(e){for(var t,n=!0,r=!0,i=0,o=null,a=0;ai&&z(t[o-1]);)--o;return t.slice(i,o).join("\n")}function z(e){for(var t=0;t31||9===o));return new A(P.COMMENT,t,s,n,r,i,a.slice(t+1,s))}function V(e,t,n,r,i,o){var a=e.body,s=n,l=t,u=!1;if(45===s&&(s=a.charCodeAt(++l)),48===s){if((s=a.charCodeAt(++l))>=48&&s<=57)throw E(e,l,"Invalid number, unexpected digit after 0: ".concat(q(s),"."))}else l=G(e,l,s),s=a.charCodeAt(l);if(46===s&&(u=!0,s=a.charCodeAt(++l),l=G(e,l,s),s=a.charCodeAt(l)),69!==s&&101!==s||(u=!0,43!==(s=a.charCodeAt(++l))&&45!==s||(s=a.charCodeAt(++l)),l=G(e,l,s),s=a.charCodeAt(l)),46===s||function(e){return 95===e||e>=65&&e<=90||e>=97&&e<=122}(s))throw E(e,l,"Invalid number, expected digit but got: ".concat(q(s),"."));return new A(u?P.FLOAT:P.INT,t,l,r,i,o,a.slice(t,l))}function G(e,t,n){var r=e.body,i=t,o=n;if(o>=48&&o<=57){do{o=r.charCodeAt(++i)}while(o>=48&&o<=57);return i}throw E(e,i,"Invalid number, expected digit but got: ".concat(q(o),"."))}function K(e,t,n,r,i){for(var o,a,s,l,u=e.body,c=t+1,d=c,f=0,p="";c=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function X(e,t,n,r,i){for(var o=e.body,a=o.length,s=t+1,l=0;s!==a&&!isNaN(l=o.charCodeAt(s))&&(95===l||l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122);)++s;return new A(P.NAME,t,s,n,r,i,o.slice(t,s))}var Z=function(){function e(e,t){var n=function(e){return L(e,N)}(e)?e:new N(e);this._lexer=new U(n),this._options=t}var t=e.prototype;return t.parseName=function(){var e=this.expectToken(P.NAME);return{kind:S.NAME,value:e.value,loc:this.loc(e)}},t.parseDocument=function(){var e=this._lexer.token;return{kind:S.DOCUMENT,definitions:this.many(P.SOF,this.parseDefinition,P.EOF),loc:this.loc(e)}},t.parseDefinition=function(){if(this.peek(P.NAME))switch(this._lexer.token.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"schema":case"scalar":case"type":case"interface":case"union":case"enum":case"input":case"directive":return this.parseTypeSystemDefinition();case"extend":return this.parseTypeSystemExtension()}else{if(this.peek(P.BRACE_L))return this.parseOperationDefinition();if(this.peekDescription())return this.parseTypeSystemDefinition()}throw this.unexpected()},t.parseOperationDefinition=function(){var e=this._lexer.token;if(this.peek(P.BRACE_L))return{kind:S.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet(),loc:this.loc(e)};var t,n=this.parseOperationType();return this.peek(P.NAME)&&(t=this.parseName()),{kind:S.OPERATION_DEFINITION,operation:n,name:t,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(e)}},t.parseOperationType=function(){var e=this.expectToken(P.NAME);switch(e.value){case"query":return"query";case"mutation":return"mutation";case"subscription":return"subscription"}throw this.unexpected(e)},t.parseVariableDefinitions=function(){return this.optionalMany(P.PAREN_L,this.parseVariableDefinition,P.PAREN_R)},t.parseVariableDefinition=function(){var e=this._lexer.token;return{kind:S.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(P.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(P.EQUALS)?this.parseValueLiteral(!0):void 0,directives:this.parseDirectives(!0),loc:this.loc(e)}},t.parseVariable=function(){var e=this._lexer.token;return this.expectToken(P.DOLLAR),{kind:S.VARIABLE,name:this.parseName(),loc:this.loc(e)}},t.parseSelectionSet=function(){var e=this._lexer.token;return{kind:S.SELECTION_SET,selections:this.many(P.BRACE_L,this.parseSelection,P.BRACE_R),loc:this.loc(e)}},t.parseSelection=function(){return this.peek(P.SPREAD)?this.parseFragment():this.parseField()},t.parseField=function(){var e,t,n=this._lexer.token,r=this.parseName();return this.expectOptionalToken(P.COLON)?(e=r,t=this.parseName()):t=r,{kind:S.FIELD,alias:e,name:t,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(P.BRACE_L)?this.parseSelectionSet():void 0,loc:this.loc(n)}},t.parseArguments=function(e){var t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(P.PAREN_L,t,P.PAREN_R)},t.parseArgument=function(){var e=this._lexer.token,t=this.parseName();return this.expectToken(P.COLON),{kind:S.ARGUMENT,name:t,value:this.parseValueLiteral(!1),loc:this.loc(e)}},t.parseConstArgument=function(){var e=this._lexer.token;return{kind:S.ARGUMENT,name:this.parseName(),value:(this.expectToken(P.COLON),this.parseValueLiteral(!0)),loc:this.loc(e)}},t.parseFragment=function(){var e=this._lexer.token;this.expectToken(P.SPREAD);var t=this.expectOptionalKeyword("on");return!t&&this.peek(P.NAME)?{kind:S.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1),loc:this.loc(e)}:{kind:S.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(e)}},t.parseFragmentDefinition=function(){var e,t=this._lexer.token;return this.expectKeyword("fragment"),!0===(null===(e=this._options)||void 0===e?void 0:e.experimentalFragmentVariables)?{kind:S.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}:{kind:S.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}},t.parseFragmentName=function(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()},t.parseValueLiteral=function(e){var t=this._lexer.token;switch(t.kind){case P.BRACKET_L:return this.parseList(e);case P.BRACE_L:return this.parseObject(e);case P.INT:return this._lexer.advance(),{kind:S.INT,value:t.value,loc:this.loc(t)};case P.FLOAT:return this._lexer.advance(),{kind:S.FLOAT,value:t.value,loc:this.loc(t)};case P.STRING:case P.BLOCK_STRING:return this.parseStringLiteral();case P.NAME:switch(this._lexer.advance(),t.value){case"true":return{kind:S.BOOLEAN,value:!0,loc:this.loc(t)};case"false":return{kind:S.BOOLEAN,value:!1,loc:this.loc(t)};case"null":return{kind:S.NULL,loc:this.loc(t)};default:return{kind:S.ENUM,value:t.value,loc:this.loc(t)}}case P.DOLLAR:if(!e)return this.parseVariable()}throw this.unexpected()},t.parseStringLiteral=function(){var e=this._lexer.token;return this._lexer.advance(),{kind:S.STRING,value:e.value,block:e.kind===P.BLOCK_STRING,loc:this.loc(e)}},t.parseList=function(e){var t=this,n=this._lexer.token;return{kind:S.LIST,values:this.any(P.BRACKET_L,(function(){return t.parseValueLiteral(e)}),P.BRACKET_R),loc:this.loc(n)}},t.parseObject=function(e){var t=this,n=this._lexer.token;return{kind:S.OBJECT,fields:this.any(P.BRACE_L,(function(){return t.parseObjectField(e)}),P.BRACE_R),loc:this.loc(n)}},t.parseObjectField=function(e){var t=this._lexer.token,n=this.parseName();return this.expectToken(P.COLON),{kind:S.OBJECT_FIELD,name:n,value:this.parseValueLiteral(e),loc:this.loc(t)}},t.parseDirectives=function(e){for(var t=[];this.peek(P.AT);)t.push(this.parseDirective(e));return t},t.parseDirective=function(e){var t=this._lexer.token;return this.expectToken(P.AT),{kind:S.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e),loc:this.loc(t)}},t.parseTypeReference=function(){var e,t=this._lexer.token;return this.expectOptionalToken(P.BRACKET_L)?(e=this.parseTypeReference(),this.expectToken(P.BRACKET_R),e={kind:S.LIST_TYPE,type:e,loc:this.loc(t)}):e=this.parseNamedType(),this.expectOptionalToken(P.BANG)?{kind:S.NON_NULL_TYPE,type:e,loc:this.loc(t)}:e},t.parseNamedType=function(){var e=this._lexer.token;return{kind:S.NAMED_TYPE,name:this.parseName(),loc:this.loc(e)}},t.parseTypeSystemDefinition=function(){var e=this.peekDescription()?this._lexer.lookahead():this._lexer.token;if(e.kind===P.NAME)switch(e.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}throw this.unexpected(e)},t.peekDescription=function(){return this.peek(P.STRING)||this.peek(P.BLOCK_STRING)},t.parseDescription=function(){if(this.peekDescription())return this.parseStringLiteral()},t.parseSchemaDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");var n=this.parseDirectives(!0),r=this.many(P.BRACE_L,this.parseOperationTypeDefinition,P.BRACE_R);return{kind:S.SCHEMA_DEFINITION,description:t,directives:n,operationTypes:r,loc:this.loc(e)}},t.parseOperationTypeDefinition=function(){var e=this._lexer.token,t=this.parseOperationType();this.expectToken(P.COLON);var n=this.parseNamedType();return{kind:S.OPERATION_TYPE_DEFINITION,operation:t,type:n,loc:this.loc(e)}},t.parseScalarTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");var n=this.parseName(),r=this.parseDirectives(!0);return{kind:S.SCALAR_TYPE_DEFINITION,description:t,name:n,directives:r,loc:this.loc(e)}},t.parseObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");var n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseDirectives(!0),o=this.parseFieldsDefinition();return{kind:S.OBJECT_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:i,fields:o,loc:this.loc(e)}},t.parseImplementsInterfaces=function(){var e;if(!this.expectOptionalKeyword("implements"))return[];if(!0===(null===(e=this._options)||void 0===e?void 0:e.allowLegacySDLImplementsInterfaces)){var t=[];this.expectOptionalToken(P.AMP);do{t.push(this.parseNamedType())}while(this.expectOptionalToken(P.AMP)||this.peek(P.NAME));return t}return this.delimitedMany(P.AMP,this.parseNamedType)},t.parseFieldsDefinition=function(){var e;return!0===(null===(e=this._options)||void 0===e?void 0:e.allowLegacySDLEmptyFields)&&this.peek(P.BRACE_L)&&this._lexer.lookahead().kind===P.BRACE_R?(this._lexer.advance(),this._lexer.advance(),[]):this.optionalMany(P.BRACE_L,this.parseFieldDefinition,P.BRACE_R)},t.parseFieldDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),n=this.parseName(),r=this.parseArgumentDefs();this.expectToken(P.COLON);var i=this.parseTypeReference(),o=this.parseDirectives(!0);return{kind:S.FIELD_DEFINITION,description:t,name:n,arguments:r,type:i,directives:o,loc:this.loc(e)}},t.parseArgumentDefs=function(){return this.optionalMany(P.PAREN_L,this.parseInputValueDef,P.PAREN_R)},t.parseInputValueDef=function(){var e=this._lexer.token,t=this.parseDescription(),n=this.parseName();this.expectToken(P.COLON);var r,i=this.parseTypeReference();this.expectOptionalToken(P.EQUALS)&&(r=this.parseValueLiteral(!0));var o=this.parseDirectives(!0);return{kind:S.INPUT_VALUE_DEFINITION,description:t,name:n,type:i,defaultValue:r,directives:o,loc:this.loc(e)}},t.parseInterfaceTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");var n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseDirectives(!0),o=this.parseFieldsDefinition();return{kind:S.INTERFACE_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:i,fields:o,loc:this.loc(e)}},t.parseUnionTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");var n=this.parseName(),r=this.parseDirectives(!0),i=this.parseUnionMemberTypes();return{kind:S.UNION_TYPE_DEFINITION,description:t,name:n,directives:r,types:i,loc:this.loc(e)}},t.parseUnionMemberTypes=function(){return this.expectOptionalToken(P.EQUALS)?this.delimitedMany(P.PIPE,this.parseNamedType):[]},t.parseEnumTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");var n=this.parseName(),r=this.parseDirectives(!0),i=this.parseEnumValuesDefinition();return{kind:S.ENUM_TYPE_DEFINITION,description:t,name:n,directives:r,values:i,loc:this.loc(e)}},t.parseEnumValuesDefinition=function(){return this.optionalMany(P.BRACE_L,this.parseEnumValueDefinition,P.BRACE_R)},t.parseEnumValueDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),n=this.parseName(),r=this.parseDirectives(!0);return{kind:S.ENUM_VALUE_DEFINITION,description:t,name:n,directives:r,loc:this.loc(e)}},t.parseInputObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");var n=this.parseName(),r=this.parseDirectives(!0),i=this.parseInputFieldsDefinition();return{kind:S.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:n,directives:r,fields:i,loc:this.loc(e)}},t.parseInputFieldsDefinition=function(){return this.optionalMany(P.BRACE_L,this.parseInputValueDef,P.BRACE_R)},t.parseTypeSystemExtension=function(){var e=this._lexer.lookahead();if(e.kind===P.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(e)},t.parseSchemaExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");var t=this.parseDirectives(!0),n=this.optionalMany(P.BRACE_L,this.parseOperationTypeDefinition,P.BRACE_R);if(0===t.length&&0===n.length)throw this.unexpected();return{kind:S.SCHEMA_EXTENSION,directives:t,operationTypes:n,loc:this.loc(e)}},t.parseScalarTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");var t=this.parseName(),n=this.parseDirectives(!0);if(0===n.length)throw this.unexpected();return{kind:S.SCALAR_TYPE_EXTENSION,name:t,directives:n,loc:this.loc(e)}},t.parseObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");var t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseDirectives(!0),i=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===i.length)throw this.unexpected();return{kind:S.OBJECT_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:i,loc:this.loc(e)}},t.parseInterfaceTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");var t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseDirectives(!0),i=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===i.length)throw this.unexpected();return{kind:S.INTERFACE_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:i,loc:this.loc(e)}},t.parseUnionTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");var t=this.parseName(),n=this.parseDirectives(!0),r=this.parseUnionMemberTypes();if(0===n.length&&0===r.length)throw this.unexpected();return{kind:S.UNION_TYPE_EXTENSION,name:t,directives:n,types:r,loc:this.loc(e)}},t.parseEnumTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");var t=this.parseName(),n=this.parseDirectives(!0),r=this.parseEnumValuesDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return{kind:S.ENUM_TYPE_EXTENSION,name:t,directives:n,values:r,loc:this.loc(e)}},t.parseInputObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");var t=this.parseName(),n=this.parseDirectives(!0),r=this.parseInputFieldsDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return{kind:S.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:n,fields:r,loc:this.loc(e)}},t.parseDirectiveDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(P.AT);var n=this.parseName(),r=this.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");var o=this.parseDirectiveLocations();return{kind:S.DIRECTIVE_DEFINITION,description:t,name:n,arguments:r,repeatable:i,locations:o,loc:this.loc(e)}},t.parseDirectiveLocations=function(){return this.delimitedMany(P.PIPE,this.parseDirectiveLocation)},t.parseDirectiveLocation=function(){var e=this._lexer.token,t=this.parseName();if(void 0!==F[t.value])return t;throw this.unexpected(e)},t.loc=function(e){var t;if(!0!==(null===(t=this._options)||void 0===t?void 0:t.noLocation))return new T(e,this._lexer.lastToken,this._lexer.source)},t.peek=function(e){return this._lexer.token.kind===e},t.expectToken=function(e){var t=this._lexer.token;if(t.kind===e)return this._lexer.advance(),t;throw E(this._lexer.source,t.start,"Expected ".concat(ee(e),", found ").concat(J(t),"."))},t.expectOptionalToken=function(e){var t=this._lexer.token;if(t.kind===e)return this._lexer.advance(),t},t.expectKeyword=function(e){var t=this._lexer.token;if(t.kind!==P.NAME||t.value!==e)throw E(this._lexer.source,t.start,'Expected "'.concat(e,'", found ').concat(J(t),"."));this._lexer.advance()},t.expectOptionalKeyword=function(e){var t=this._lexer.token;return t.kind===P.NAME&&t.value===e&&(this._lexer.advance(),!0)},t.unexpected=function(e){var t=null!=e?e:this._lexer.token;return E(this._lexer.source,t.start,"Unexpected ".concat(J(t),"."))},t.any=function(e,t,n){this.expectToken(e);for(var r=[];!this.expectOptionalToken(n);)r.push(t.call(this));return r},t.optionalMany=function(e,t,n){if(this.expectOptionalToken(e)){var r=[];do{r.push(t.call(this))}while(!this.expectOptionalToken(n));return r}return[]},t.many=function(e,t,n){this.expectToken(e);var r=[];do{r.push(t.call(this))}while(!this.expectOptionalToken(n));return r},t.delimitedMany=function(e,t){this.expectOptionalToken(e);var n=[];do{n.push(t.call(this))}while(this.expectOptionalToken(e));return n},e}();function J(e){var t=e.value;return ee(e.kind)+(null!=t?' "'.concat(t,'"'):"")}function ee(e){return function(e){return e===P.BANG||e===P.DOLLAR||e===P.AMP||e===P.PAREN_L||e===P.PAREN_R||e===P.SPREAD||e===P.COLON||e===P.EQUALS||e===P.AT||e===P.BRACKET_L||e===P.BRACKET_R||e===P.BRACE_L||e===P.PIPE||e===P.BRACE_R}(e)?'"'.concat(e,'"'):e}var te=new Map,ne=new Map,re=!0,ie=!1;function oe(e){return e.replace(/[\s,]+/g," ").trim()}function ae(e){var t=new Set,n=[];return e.definitions.forEach((function(e){if("FragmentDefinition"===e.kind){var r=e.name.value,i=oe((a=e.loc).source.body.substring(a.start,a.end)),o=ne.get(r);o&&!o.has(i)?re&&console.warn("Warning: fragment with name "+r+" already exists.\ngraphql-tag enforces all fragment names across your application to be unique; read more about\nthis in the docs: http://dev.apollodata.com/core/fragments.html#unique-names"):o||ne.set(r,o=new Set),o.add(i),t.has(i)||(t.add(i),n.push(e))}else n.push(e);var a})),r(r({},e),{definitions:n})}function se(e){var t=oe(e);if(!te.has(t)){var n=function(e,t){return new Z(e,t).parseDocument()}(e,{experimentalFragmentVariables:ie,allowLegacyFragmentVariables:ie});if(!n||"Document"!==n.kind)throw new Error("Not a valid GraphQL document.");te.set(t,function(e){var t=new Set(e.definitions);t.forEach((function(e){e.loc&&delete e.loc,Object.keys(e).forEach((function(n){var r=e[n];r&&"object"==typeof r&&t.add(r)}))}));var n=e.loc;return n&&(delete n.startToken,delete n.endToken),e}(ae(n)))}return te.get(t)}function le(e){for(var t=[],n=1;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(this.props,[]);return function(e){c.forEach((function(t){return delete e[t]}))}(i),i.className=this.props.inputClassName,i.id=this.state.inputId,i.style=n,a.default.createElement("div",{className:this.props.className,style:t},this.renderStyles(),a.default.createElement("input",r({},i,{ref:this.inputRef})),a.default.createElement("div",{ref:this.sizerRef,style:u},e),this.props.placeholder?a.default.createElement("div",{ref:this.placeHolderSizerRef,style:u},this.props.placeholder):null)}}]),t}(o.Component);h.propTypes={className:s.default.string,defaultValue:s.default.any,extraWidth:s.default.oneOfType([s.default.number,s.default.string]),id:s.default.string,injectStyles:s.default.bool,inputClassName:s.default.string,inputRef:s.default.func,inputStyle:s.default.object,minWidth:s.default.oneOfType([s.default.number,s.default.string]),onAutosize:s.default.func,onChange:s.default.func,placeholder:s.default.string,placeholderIsMinWidth:s.default.bool,style:s.default.object,value:s.default.any},h.defaultProps={minWidth:1,injectStyles:!0},t.default=h},function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";t.a=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}},function(e,t,n){"use strict";t.a=function(e){for(var t,n=0,r=0,i=e.length;i>=4;++r,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}},function(e,t,n){"use strict";t.a={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(275);function i(e,t){if(e){if("string"==typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},function(e,t,n){"use strict";function r(e){return(r="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})(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(11),i=n(130),o=n(80),a=n(81),s=n(91),l=n(22),u=n(0),c=n.n(u),d={defaultInputValue:"",defaultMenuIsOpen:!1,defaultValue:null},f=function(e){var t,n;return n=t=function(t){Object(s.a)(u,t);var n=Object(l.j)(u);function u(){var e;Object(o.a)(this,u);for(var t=arguments.length,r=new Array(t),i=0;i1?n-1:0),i=1;i1&&void 0!==arguments[1]?arguments[1]:{},n=t.delimiter,i=void 0===n?"\n":n;return"document"===e.object||"block"===e.object&&r.Block.isBlockList(e.nodes)?e.nodes.map(a).join(i):e.text}var s={deserialize:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.defaultBlock,a=void 0===n?"line":n,s=t.defaultMarks,l=void 0===s?[]:s,u=t.delimiter,c=void 0===u?"\n":u,d=t.toJSON,f=void 0!==d&&d;i.Set.isSet(l)&&(l=l.toArray()),a=r.Node.createProperties(a),l=l.map(r.Mark.createProperties);var p={object:"value",document:{object:"document",data:{},nodes:e.split(c).map((function(e){return o({},a,{object:"block",data:{},nodes:[{object:"text",text:e,marks:l}]})}))}},h=f?p:r.Value.fromJSON(p);return h},serialize:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return a(e.document,t)}};t.default=s},function(e,t,n){"use strict";var r,i=n(10),o=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=function(e){function t(t){var n=this,r="Assertion failed. See https://openlayers.org/en/"+("latest"===i.a?i.a:"v"+i.a.split("-")[0])+"/doc/errors/#"+t+" for details.";return(n=e.call(this,r)||this).code=t,n.name="AssertionError",n.message=r,n}return o(t,e),t}(Error);t.a=a},function(e,t,n){"use strict";var r,i=n(112),o=n(20),a=n(19),s=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),l=function(e){function t(){var t=e.call(this)||this;return t.on=t.onInternal,t.once=t.onceInternal,t.un=t.unInternal,t.revision_=0,t}return s(t,e),t.prototype.changed=function(){++this.revision_,this.dispatchEvent(o.a.CHANGE)},t.prototype.getRevision=function(){return this.revision_},t.prototype.onInternal=function(e,t){if(Array.isArray(e)){for(var n=e.length,r=new Array(n),i=0;ix&&(d=(f+p)/2,Object(r.c)(e,t,n,o,d,g)&&(w=d,x=k)),f=p}return isNaN(w)&&(w=a[s]),l?(l.push(w,g,x),l):[w,g,x]}function a(e,t,n,r,i){for(var a=[],s=0,l=n.length;si;){if(o-i>600){var s=o-i+1,l=r-i+1,u=Math.log(s),c=.5*Math.exp(2*u/3),d=.5*Math.sqrt(u*c*(s-c)/s)*(l-s/2<0?-1:1);e(n,r,Math.max(i,Math.floor(r-l*c/s+d)),Math.min(o,Math.floor(r+(s-l)*c/s+d)),a)}var f=n[r],p=i,h=o;for(t(n,i,r),a(n[o],f)>0&&t(n,i,o);p0;)h--}0===a(n[i],f)?t(n,i,h):t(n,++h,o),h<=r&&(i=h+1),r<=h&&(o=h-1)}}(e,r,i||0,o||e.length-1,a||n)}function t(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function n(e,t){return et?1:0}var r=function(e){void 0===e&&(e=9),this._maxEntries=Math.max(4,e),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function i(e,t,n){if(!n)return t.indexOf(e);for(var r=0;r=e.minX&&t.maxY>=e.minY}function h(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function m(t,n,r,i,o){for(var a=[n,r];a.length;)if(!((r=a.pop())-(n=a.pop())<=i)){var s=n+Math.ceil((r-n)/i/2)*i;e(t,s,n,r,o),a.push(n,s,s,r)}}return r.prototype.all=function(){return this._all(this.data,[])},r.prototype.search=function(e){var t=this.data,n=[];if(!p(e,t))return n;for(var r=this.toBBox,i=[];t;){for(var o=0;o=0&&i[t].children.length>this._maxEntries;)this._split(i,t),t--;this._adjustParentBBoxes(r,i,t)},r.prototype._split=function(e,t){var n=e[t],r=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,r);var a=this._chooseSplitIndex(n,i,r),s=h(n.children.splice(a,n.children.length-a));s.height=n.height,s.leaf=n.leaf,o(n,this.toBBox),o(s,this.toBBox),t?e[t-1].children.push(s):this._splitRoot(n,s)},r.prototype._splitRoot=function(e,t){this.data=h([e,t]),this.data.height=e.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},r.prototype._chooseSplitIndex=function(e,t,n){for(var r,i,o,s,l,u,d,f=1/0,p=1/0,h=t;h<=n-t;h++){var m=a(e,0,h,this.toBBox),g=a(e,h,n,this.toBBox),v=(i=m,o=g,s=Math.max(i.minX,o.minX),l=Math.max(i.minY,o.minY),u=Math.min(i.maxX,o.maxX),d=Math.min(i.maxY,o.maxY),Math.max(0,u-s)*Math.max(0,d-l)),y=c(m)+c(g);v=t;p--){var h=e.children[p];s(l,e.leaf?i(h):h),u+=d(l)}return u},r.prototype._adjustParentBBoxes=function(e,t,n){for(var r=n;r>=0;r--)s(t[r],e)},r.prototype._condense=function(e){for(var t=e.length-1,n=void 0;t>=0;t--)0===e[t].children.length?t>0?(n=e[t-1].children).splice(n.indexOf(e[t]),1):this.clear():o(e[t],this.toBBox)},r}()},function(e,t,n){"use strict";var r,i=n(64),o=n(106),a=n(10),s=n(14),l=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),u=function(e){function t(t){var n=e.call(this)||this;n.projection=Object(s.h)(t.projection),n.attributions_=c(t.attributions),n.attributionsCollapsible_=void 0===t.attributionsCollapsible||t.attributionsCollapsible,n.loading=!1,n.state_=void 0!==t.state?t.state:o.a.READY,n.wrapX_=void 0!==t.wrapX&&t.wrapX,n.interpolate_=!!t.interpolate,n.viewResolver=null,n.viewRejector=null;var r=n;return n.viewPromise_=new Promise((function(e,t){r.viewResolver=e,r.viewRejector=t})),n}return l(t,e),t.prototype.getAttributions=function(){return this.attributions_},t.prototype.getAttributionsCollapsible=function(){return this.attributionsCollapsible_},t.prototype.getProjection=function(){return this.projection},t.prototype.getResolutions=function(){return Object(a.b)()},t.prototype.getView=function(){return this.viewPromise_},t.prototype.getState=function(){return this.state_},t.prototype.getWrapX=function(){return this.wrapX_},t.prototype.getInterpolate=function(){return this.interpolate_},t.prototype.refresh=function(){this.changed()},t.prototype.setAttributions=function(e){this.attributions_=c(e),this.changed()},t.prototype.setState=function(e){this.state_=e,this.changed()},t}(i.a);function c(e){return e?Array.isArray(e)?function(t){return e}:"function"==typeof e?e:function(t){return[e]}:null}t.a=u},function(e,t,n){"use strict";var r,i=n(366),o=n(24),a=n(42),s=n(371),l=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),u=function(e){function t(t,n,r,i,o,a){var s=e.call(this,t,n,a)||this;return s.crossOrigin_=i,s.src_=r,s.key=r,s.image_=new Image,null!==i&&(s.image_.crossOrigin=i),s.unlisten_=null,s.tileLoadFunction_=o,s}return l(t,e),t.prototype.getImage=function(){return this.image_},t.prototype.setImage=function(e){this.image_=e,this.state=o.a.LOADED,this.unlistenImage_(),this.changed()},t.prototype.handleImageError_=function(){var e;this.state=o.a.ERROR,this.unlistenImage_(),this.image_=((e=Object(a.a)(1,1)).fillStyle="rgba(0,0,0,0)",e.fillRect(0,0,1,1),e.canvas),this.changed()},t.prototype.handleImageLoad_=function(){var e=this.image_;e.naturalWidth&&e.naturalHeight?this.state=o.a.LOADED:this.state=o.a.EMPTY,this.unlistenImage_(),this.changed()},t.prototype.load=function(){this.state==o.a.ERROR&&(this.state=o.a.IDLE,this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==o.a.IDLE&&(this.state=o.a.LOADING,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=Object(s.a)(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))},t.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},t}(i.a);t.a=u},function(e,t,n){"use strict";var r,i=n(112),o=n(20),a=n(24),s=n(10),l=n(86),u=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),c=function(e){function t(t,n,r){var i=e.call(this)||this,o=r||{};return i.tileCoord=t,i.state=n,i.interimTile=null,i.key="",i.transition_=void 0===o.transition?250:o.transition,i.transitionStarts_={},i.interpolate=!!o.interpolate,i}return u(t,e),t.prototype.changed=function(){this.dispatchEvent(o.a.CHANGE)},t.prototype.release=function(){},t.prototype.getKey=function(){return this.key+"/"+this.tileCoord},t.prototype.getInterimTile=function(){if(!this.interimTile)return this;var e=this.interimTile;do{if(e.getState()==a.a.LOADED)return this.transition_=0,e;e=e.interimTile}while(e);return this},t.prototype.refreshInterimChain=function(){if(this.interimTile){var e=this.interimTile,t=this;do{if(e.getState()==a.a.LOADED){e.interimTile=null;break}e.getState()==a.a.LOADING?t=e:e.getState()==a.a.IDLE?t.interimTile=e.interimTile:t=e,e=t.interimTile}while(e)}},t.prototype.getTileCoord=function(){return this.tileCoord},t.prototype.getState=function(){return this.state},t.prototype.setState=function(e){if(this.state!==a.a.ERROR&&this.state>e)throw new Error("Tile load sequence violation");this.state=e,this.changed()},t.prototype.load=function(){Object(s.b)()},t.prototype.getAlpha=function(e,t){if(!this.transition_)return 1;var n=this.transitionStarts_[e];if(n){if(-1===n)return 1}else n=t,this.transitionStarts_[e]=n;var r=t-n+1e3/60;return r>=this.transition_?1:Object(l.a)(r/this.transition_)},t.prototype.inTransition=function(e){return!!this.transition_&&-1!==this.transitionStarts_[e]},t.prototype.endTransition=function(e){this.transition_&&(this.transitionStarts_[e]=-1)},t}(i.a);t.a=c},function(e,t,n){"use strict";(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.a=n}).call(this,n(56))},function(e,t,n){"use strict";var r,i=n(119),o=n(20),a=n(366),s=n(24),l=n(3),u=n(14),c=n(13),d=function(){function e(e,t,n,r,i,o){this.sourceProj_=e,this.targetProj_=t;var a={},s=Object(u.j)(this.targetProj_,this.sourceProj_);this.transformInv_=function(e){var t=e[0]+"/"+e[1];return a[t]||(a[t]=s(e)),a[t]},this.maxSourceExtent_=r,this.errorThresholdSquared_=i*i,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!r&&!!this.sourceProj_.getExtent()&&Object(l.D)(r)==Object(l.D)(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?Object(l.D)(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?Object(l.D)(this.targetProj_.getExtent()):null;var d=Object(l.B)(n),f=Object(l.C)(n),p=Object(l.v)(n),h=Object(l.u)(n),m=this.transformInv_(d),g=this.transformInv_(f),v=this.transformInv_(p),y=this.transformInv_(h),b=10+(o?Math.max(0,Math.ceil(Object(c.f)(Object(l.t)(n)/(o*o*256*256)))):0);if(this.addQuad_(d,f,p,h,m,g,v,y,b),this.wrapsXInSource_){var _=1/0;this.triangles_.forEach((function(e,t,n){_=Math.min(_,e.source[0][0],e.source[1][0],e.source[2][0])})),this.triangles_.forEach(function(e){if(Math.max(e.source[0][0],e.source[1][0],e.source[2][0])-_>this.sourceWorldWidth_/2){var t=[[e.source[0][0],e.source[0][1]],[e.source[1][0],e.source[1][1]],[e.source[2][0],e.source[2][1]]];t[0][0]-_>this.sourceWorldWidth_/2&&(t[0][0]-=this.sourceWorldWidth_),t[1][0]-_>this.sourceWorldWidth_/2&&(t[1][0]-=this.sourceWorldWidth_),t[2][0]-_>this.sourceWorldWidth_/2&&(t[2][0]-=this.sourceWorldWidth_);var n=Math.min(t[0][0],t[1][0],t[2][0]);Math.max(t[0][0],t[1][0],t[2][0])-n.5&&f<1,m=!1;if(u>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){var g=Object(l.b)([e,t,n,r]);m=Object(l.D)(g)/this.targetWorldWidth_>.25||m}!h&&this.sourceProj_.isGlobal()&&f&&(m=f>.25||m)}if(!(!m&&this.maxSourceExtent_&&isFinite(d[0])&&isFinite(d[1])&&isFinite(d[2])&&isFinite(d[3]))||Object(l.E)(d,this.maxSourceExtent_)){var v=0;if(!(m||isFinite(i[0])&&isFinite(i[1])&&isFinite(o[0])&&isFinite(o[1])&&isFinite(a[0])&&isFinite(a[1])&&isFinite(s[0])&&isFinite(s[1])))if(u>0)m=!0;else if(1!=(v=(isFinite(i[0])&&isFinite(i[1])?0:8)+(isFinite(o[0])&&isFinite(o[1])?0:4)+(isFinite(a[0])&&isFinite(a[1])?0:2)+(isFinite(s[0])&&isFinite(s[1])?0:1))&&2!=v&&4!=v&&8!=v)return;if(u>0){if(!m){var y=[(e[0]+n[0])/2,(e[1]+n[1])/2],b=this.transformInv_(y),_=void 0;if(h)_=(Object(c.g)(i[0],p)+Object(c.g)(a[0],p))/2-Object(c.g)(b[0],p);else _=(i[0]+a[0])/2-b[0];var w=(i[1]+a[1])/2-b[1];m=_*_+w*w>this.errorThresholdSquared_}if(m){if(Math.abs(e[0]-n[0])<=Math.abs(e[1]-n[1])){var x=[(t[0]+n[0])/2,(t[1]+n[1])/2],k=this.transformInv_(x),E=[(r[0]+e[0])/2,(r[1]+e[1])/2],S=this.transformInv_(E);this.addQuad_(e,t,x,E,i,o,k,S,u-1),this.addQuad_(E,x,n,r,S,k,a,s,u-1)}else{var O=[(e[0]+t[0])/2,(e[1]+t[1])/2],C=this.transformInv_(O),T=[(n[0]+r[0])/2,(n[1]+r[1])/2],A=this.transformInv_(T);this.addQuad_(e,O,T,r,i,C,A,s,u-1),this.addQuad_(O,t,n,T,C,o,a,A,u-1)}return}}if(h){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}0==(11&v)&&this.addTriangle_(e,n,r,i,a,s),0==(14&v)&&this.addTriangle_(e,n,t,i,a,o),v&&(0==(13&v)&&this.addTriangle_(t,r,e,o,s,i),0==(7&v)&&this.addTriangle_(t,r,n,o,s,a))}},e.prototype.calculateSourceExtent=function(){var e=Object(l.j)();return this.triangles_.forEach((function(t,n,r){var i=t.source;Object(l.q)(e,i[0]),Object(l.q)(e,i[1]),Object(l.q)(e,i[2])})),e},e.prototype.getTriangles=function(){return this.triangles_},e}(),f=n(235),p=n(28),h=n(42);function m(e,t,n,r,i){e.beginPath(),e.moveTo(0,0),e.lineTo(t,n),e.lineTo(r,i),e.closePath(),e.save(),e.clip(),e.fillRect(0,0,Math.max(t,r)+1,Math.max(n,i)),e.restore()}function g(e,t){return Math.abs(e[4*t]-210)>2||Math.abs(e[4*t+3]-191.25)>2}function v(e,t,n,r){var i=Object(u.p)(n,t,e),o=Object(u.i)(t,r,n),a=t.getMetersPerUnit();void 0!==a&&(o*=a);var s=e.getMetersPerUnit();void 0!==s&&(o/=s);var c=e.getExtent();if(!c||Object(l.f)(c,i)){var d=Object(u.i)(e,o,i)/o;isFinite(d)&&d>0&&(o/=d)}return o}function y(e,t,n,i,o,a,s,u,d,v,y,b){var _=Object(h.a)(Math.round(n*e),Math.round(n*t));if(b||Object(p.a)(_,f.a),0===d.length)return _.canvas;function w(e){return Math.round(e*n)/n}_.scale(n,n),_.globalCompositeOperation="lighter";var x=Object(l.j)();d.forEach((function(e,t,n){Object(l.p)(x,e.extent)}));var k=Object(l.D)(x),E=Object(l.z)(x),S=Object(h.a)(Math.round(n*k/i),Math.round(n*E/i));b||Object(p.a)(S,f.a);var O=n/i;d.forEach((function(e,t,n){var r=e.extent[0]-x[0],i=-(e.extent[3]-x[3]),o=Object(l.D)(e.extent),a=Object(l.z)(e.extent);e.image.width>0&&e.image.height>0&&S.drawImage(e.image,v,v,e.image.width-2*v,e.image.height-2*v,r*O,i*O,o*O,a*O)}));var C=Object(l.B)(s);return u.getTriangles().forEach((function(e,t,o){var s=e.source,l=e.target,u=s[0][0],d=s[0][1],f=s[1][0],p=s[1][1],h=s[2][0],v=s[2][1],y=w((l[0][0]-C[0])/a),k=w(-(l[0][1]-C[1])/a),E=w((l[1][0]-C[0])/a),O=w(-(l[1][1]-C[1])/a),T=w((l[2][0]-C[0])/a),A=w(-(l[2][1]-C[1])/a),P=u,R=d;u=0,d=0;var j=[[f-=P,p-=R,0,0,E-y],[h-=P,v-=R,0,0,T-y],[0,0,f,p,O-k],[0,0,h,v,A-k]],I=Object(c.h)(j);if(I){if(_.save(),_.beginPath(),function(){if(void 0===r){var e=document.createElement("canvas").getContext("2d");e.globalCompositeOperation="lighter",e.fillStyle="rgba(210, 0, 0, 0.75)",m(e,4,5,4,0),m(e,4,5,0,5);var t=e.getImageData(0,0,3,3).data;r=g(t,0)||g(t,4)||g(t,8)}return r}()||!b){_.moveTo(E,O);for(var M=y-E,L=k-O,D=0;D<4;D++)_.lineTo(E+w((D+1)*M/4),O+w(D*L/3)),3!=D&&_.lineTo(E+w((D+1)*M/4),O+w((D+1)*L/3));_.lineTo(T,A)}else _.moveTo(E,O),_.lineTo(y,k),_.lineTo(T,A);_.clip(),_.transform(I[0],I[2],I[1],I[3],y,k),_.translate(x[0]-P,x[3]-R),_.scale(i/n,-i/n),_.drawImage(S.canvas,0,0),_.restore()}})),y&&(_.save(),_.globalCompositeOperation="source-over",_.strokeStyle="black",_.lineWidth=1,u.getTriangles().forEach((function(e,t,n){var r=e.target,i=(r[0][0]-C[0])/a,o=-(r[0][1]-C[1])/a,s=(r[1][0]-C[0])/a,l=-(r[1][1]-C[1])/a,u=(r[2][0]-C[0])/a,c=-(r[2][1]-C[1])/a;_.beginPath(),_.moveTo(s,l),_.lineTo(i,o),_.lineTo(u,c),_.closePath(),_.stroke()})),_.restore()),_.canvas}var b,_=n(19),w=(b=function(e,t){return(b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}b(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),x=function(e){function t(t,n,r,o,a,u,f,p,h,m,g,y){var b=e.call(this,a,s.a.IDLE,{interpolate:!!y})||this;b.renderEdges_=void 0!==g&&g,b.pixelRatio_=f,b.gutter_=p,b.canvas_=null,b.sourceTileGrid_=n,b.targetTileGrid_=o,b.wrappedTileCoord_=u||a,b.sourceTiles_=[],b.sourcesListenerKeys_=null,b.sourceZ_=0;var _=o.getTileCoordExtent(b.wrappedTileCoord_),w=b.targetTileGrid_.getExtent(),x=b.sourceTileGrid_.getExtent(),k=w?Object(l.A)(_,w):_;if(0===Object(l.t)(k))return b.state=s.a.EMPTY,b;var E=t.getExtent();E&&(x=x?Object(l.A)(x,E):E);var S=o.getResolution(b.wrappedTileCoord_[0]),O=function(e,t,n,r){var i=Object(l.w)(n),o=v(e,t,i,r);return(!isFinite(o)||o<=0)&&Object(l.s)(n,(function(n){return o=v(e,t,n,r),isFinite(o)&&o>0})),o}(t,r,k,S);if(!isFinite(O)||O<=0)return b.state=s.a.EMPTY,b;var C=void 0!==m?m:i.b;if(b.triangulation_=new d(t,r,k,x,O*C,S),0===b.triangulation_.getTriangles().length)return b.state=s.a.EMPTY,b;b.sourceZ_=n.getZForResolution(O);var T=b.triangulation_.calculateSourceExtent();if(x&&(t.canWrapX()?(T[1]=Object(c.b)(T[1],x[1],x[3]),T[3]=Object(c.b)(T[3],x[1],x[3])):T=Object(l.A)(T,x)),Object(l.t)(T)){for(var A=n.getTileRangeForExtentAndZ(T,b.sourceZ_),P=A.minX;P<=A.maxX;P++)for(var R=A.minY;R<=A.maxY;R++){var j=h(b.sourceZ_,P,R,f);j&&b.sourceTiles_.push(j)}0===b.sourceTiles_.length&&(b.state=s.a.EMPTY)}else b.state=s.a.EMPTY;return b}return w(t,e),t.prototype.getImage=function(){return this.canvas_},t.prototype.reproject_=function(){var e=[];if(this.sourceTiles_.forEach(function(t,n,r){t&&t.getState()==s.a.LOADED&&e.push({extent:this.sourceTileGrid_.getTileCoordExtent(t.tileCoord),image:t.getImage()})}.bind(this)),this.sourceTiles_.length=0,0===e.length)this.state=s.a.ERROR;else{var t=this.wrappedTileCoord_[0],n=this.targetTileGrid_.getTileSize(t),r="number"==typeof n?n:n[0],i="number"==typeof n?n:n[1],o=this.targetTileGrid_.getResolution(t),a=this.sourceTileGrid_.getResolution(this.sourceZ_),l=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=y(r,i,this.pixelRatio_,a,this.sourceTileGrid_.getExtent(),o,l,this.triangulation_,e,this.gutter_,this.renderEdges_,this.interpolate),this.state=s.a.LOADED}this.changed()},t.prototype.load=function(){if(this.state==s.a.IDLE){this.state=s.a.LOADING,this.changed();var e=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(function(t,n,r){var i=t.getState();if(i==s.a.IDLE||i==s.a.LOADING){e++;var a=Object(_.a)(t,o.a.CHANGE,(function(n){var r=t.getState();r!=s.a.LOADED&&r!=s.a.ERROR&&r!=s.a.EMPTY||(Object(_.c)(a),0===--e&&(this.unlistenSources_(),this.reproject_()))}),this);this.sourcesListenerKeys_.push(a)}}.bind(this)),0===e?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach((function(e,t,n){e.getState()==s.a.IDLE&&e.load()}))}},t.prototype.unlistenSources_=function(){this.sourcesListenerKeys_.forEach(_.c),this.sourcesListenerKeys_=null},t}(a.a);t.a=x},function(e,t,n){"use strict";var r=n(48),i=n(8),o=n(230),a=n(93),s=n(73),l=n(92),u=n(3),c=n(85),d=n(32),f=n(356),p=n(59),h=n(178),m=n(184),g=n(229);var v,y=n(116),b=n(113),_=(v=function(e,t){return(v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}v(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),w=function(e){function t(t,n,r){var i=e.call(this)||this;if(i.endss_=[],i.flatInteriorPointsRevision_=-1,i.flatInteriorPoints_=null,i.maxDelta_=-1,i.maxDeltaRevision_=-1,i.orientedRevision_=-1,i.orientedFlatCoordinates_=null,!r&&!Array.isArray(t[0])){for(var o=i.getLayout(),a=t,s=[],l=[],u=0,c=a.length;u=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.exports=n(1466)(t),e.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}).call(this,n(97))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});for(var r="undefined"!=typeof window&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),i={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},o={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:r?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},a={backspace:8,tab:9,enter:13,shift:16,control:17,alt:18,pause:19,capslock:20,escape:27," ":32,pageup:33,pagedown:34,end:35,home:36,arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,insert:45,delete:46,meta:91,numlock:144,scrolllock:145,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},s=1;s<20;s++)a["f"+s]=111+s;function l(e,t,n){t&&!("byKey"in t)&&(n=t,t=null),Array.isArray(e)||(e=[e]);var r=e.map((function(e){return u(e,t)})),i=function(e){return r.some((function(t){return c(t,e)}))};return null==n?i:i(n)}function u(e,t){var n=t&&t.byKey,r={},o=(e=e.replace("++","+add")).split("+"),a=o.length;for(var s in i)r[i[s]]=!1;var l=!0,u=!1,c=void 0;try{for(var p,h=o[Symbol.iterator]();!(l=(p=h.next()).done);l=!0){var m=p.value,g=m.endsWith("?");g&&(m=m.slice(0,-1));var v=f(m),y=i[v];1!==a&&y||(n?r.key=v:r.which=d(m)),y&&(r[y]=!g||null)}}catch(e){u=!0,c=e}finally{try{!l&&h.return&&h.return()}finally{if(u)throw c}}return r}function c(e,t){for(var n in e){var r=e[n],i=void 0;if(null!=r&&((null!=(i="key"===n?t.key.toLowerCase():"which"===n?91===r&&93===t.which?91:t.which:t[n])||!1!==r)&&i!==r))return!1}return!0}function d(e){return e=f(e),a[e]||e.toUpperCase().charCodeAt(0)}function f(e){return e=e.toLowerCase(),e=o[e]||e}t.default=l,t.isHotkey=l,t.isCodeHotkey=function(e,t){return l(e,t)},t.isKeyHotkey=function(e,t){return l(e,{byKey:!0},t)},t.parseHotkey=u,t.compareHotkey=c,t.toKeyCode=d,t.toKeyName=f},,function(e,t,n){"use strict";e.exports=n(798)},function(e,t,n){var r=n(497),i=n(210);e.exports=function(e,t){return e&&r(e,t,i)}},function(e,t){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},function(e,t,n){var r=n(286),i=n(826),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=[];for(var n in Object(e))o.call(e,n)&&"constructor"!=n&&t.push(n);return t}},function(e,t,n){var r=n(189)(n(88),"Map");e.exports=r},function(e,t,n){var r=n(839),i=n(846),o=n(848),a=n(849),s=n(850);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t=200){var m=t?null:s(e);if(m)return l(m);f=!1,c=a,h=new r}else h=t?[]:p;e:for(;++u3&&void 0!==arguments[3]?arguments[3]:{};super(e),r(this,"message",void 0),r(this,"status",void 0),r(this,"api",void 0),r(this,"meta",void 0),this.message=e,this.status=t,this.api=n,this.name="API_ERROR",this.meta=i}}t.default=i},function(e,t,n){var r=n(303),i=n(401);function o(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}o.prototype=r(i.prototype),o.prototype.constructor=o,e.exports=o},function(e,t){e.exports=function(){}},function(e,t,n){var r=n(551),i=n(547),o=r?function(e){return r.get(e)}:i;e.exports=o},function(e,t,n){var r=n(303),i=n(401);function o(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}o.prototype=r(i.prototype),o.prototype.constructor=o,e.exports=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(4),i=s(n(554)),o=s(n(146)),a=s(n(307));function s(e){return e&&e.__esModule?e:{default:e}}function l(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 u(e){for(var t=1;tn.abort(),6e4);return fetch(e,u(u({},t),{},{signal:n.signal})).then(e=>(clearTimeout(r),e)).catch(e=>{if("AbortError"===e.name||"DOMException"===e.name)throw new Error("Request timed out after 60 seconds");throw e})}function f(e){const[t,n]=e.split("?");return(0,r.Map)(u({url:t},n?{params:(i=n,(0,r.List)(i.split("&")).map(e=>(0,r.List)(e.split("=")).map(decodeURIComponent)).update(r.Map))}:{}));var i}function p(e){return`${e.get("url")}${e.get("params")?"?"+(t=e.get("params"),t.entrySeq().map(e=>{let[t,n]=e;return`${encodeURIComponent(t)}=${encodeURIComponent(n)}`}).join("&")):""}`;var t}function h(e){return(0,a.default)(e)?f(e):e?(0,r.fromJS)(e):(0,r.Map)()}const m=(g=e=>d(...function(e){return[p(e),e.remove("url").remove("params").toJS()]}(e)),e=>g(h(e)));var g;const v=(0,o.default)([function(e){return(t,n)=>e(t,h(n))},i.default]);function y(e){return v((t,n)=>n.setIn(e,t))}function b(e){return v((t,n)=>n.updateIn(e,(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,r.Map)();return e.merge(t)})))}const _=y(["method"]),w=y(["body"]),x=y(["cache"])("no-cache"),k=b(["params"]),E=b(["headers"]),S=new RegExp("^(?:[a-z]+:)?//","i");var O={toURL:p,fromURL:f,fromFetchArguments:function(e,t){return f(e).merge((t?(0,r.fromJS)(t):(0,r.Map)()).remove("url").remove("params"))},performRequest:m,withMethod:_,withBody:w,withHeaders:E,withParams:k,withRoot:v((e,t)=>t.update("url",t=>S.test(t)?t:e&&t&&"/"!==t[0]&&"/"!==e[e.length-1]?`${e}/${t}`:`${e}${t}`)),withNoCache:x,fetchWithTimeout:d};t.default=O},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n{const t=new TomlError(e.message);return t.code=e.code,t.wrapped=e,t},module.exports.TomlError=TomlError;const createDateTime=__webpack_require__(1017),createDateTimeFloat=__webpack_require__(1018),createDate=__webpack_require__(1019),createTime=__webpack_require__(1020),CTRL_I=9,CTRL_J=10,CTRL_M=13,CTRL_CHAR_BOUNDARY=31,CHAR_SP=32,CHAR_QUOT=34,CHAR_NUM=35,CHAR_APOS=39,CHAR_PLUS=43,CHAR_COMMA=44,CHAR_HYPHEN=45,CHAR_PERIOD=46,CHAR_0=48,CHAR_1=49,CHAR_7=55,CHAR_9=57,CHAR_COLON=58,CHAR_EQUALS=61,CHAR_A=65,CHAR_E=69,CHAR_F=70,CHAR_T=84,CHAR_U=85,CHAR_Z=90,CHAR_LOWBAR=95,CHAR_a=97,CHAR_b=98,CHAR_e=101,CHAR_f=102,CHAR_i=105,CHAR_l=108,CHAR_n=110,CHAR_o=111,CHAR_r=114,CHAR_s=115,CHAR_t=116,CHAR_u=117,CHAR_x=120,CHAR_z=122,CHAR_LCUB=123,CHAR_RCUB=125,CHAR_LSQB=91,CHAR_BSOL=92,CHAR_RSQB=93,CHAR_DEL=127,SURROGATE_FIRST=55296,SURROGATE_LAST=57343,escapes={[CHAR_b]:"\b",[CHAR_t]:"\t",[CHAR_n]:"\n",[CHAR_f]:"\f",[CHAR_r]:"\r",[CHAR_QUOT]:'"',[CHAR_BSOL]:"\\"};function isDigit(e){return e>=CHAR_0&&e<=CHAR_9}function isHexit(e){return e>=CHAR_A&&e<=CHAR_F||e>=CHAR_a&&e<=CHAR_f||e>=CHAR_0&&e<=CHAR_9}function isBit(e){return e===CHAR_1||e===CHAR_0}function isOctit(e){return e>=CHAR_0&&e<=CHAR_7}function isAlphaNumQuoteHyphen(e){return e>=CHAR_A&&e<=CHAR_Z||e>=CHAR_a&&e<=CHAR_z||e>=CHAR_0&&e<=CHAR_9||e===CHAR_APOS||e===CHAR_QUOT||e===CHAR_LOWBAR||e===CHAR_HYPHEN}function isAlphaNumHyphen(e){return e>=CHAR_A&&e<=CHAR_Z||e>=CHAR_a&&e<=CHAR_z||e>=CHAR_0&&e<=CHAR_9||e===CHAR_LOWBAR||e===CHAR_HYPHEN}const _type=Symbol("type"),_declared=Symbol("declared"),hasOwnProperty=Object.prototype.hasOwnProperty,defineProperty=Object.defineProperty,descriptor={configurable:!0,enumerable:!0,writable:!0,value:void 0};function hasKey(e,t){return!!hasOwnProperty.call(e,t)||("__proto__"===t&&defineProperty(e,"__proto__",descriptor),!1)}const INLINE_TABLE=Symbol("inline-table");function InlineTable(){return Object.defineProperties({},{[_type]:{value:INLINE_TABLE}})}function isInlineTable(e){return null!==e&&"object"==typeof e&&e[_type]===INLINE_TABLE}const TABLE=Symbol("table");function Table(){return Object.defineProperties({},{[_type]:{value:TABLE},[_declared]:{value:!1,writable:!0}})}function isTable(e){return null!==e&&"object"==typeof e&&e[_type]===TABLE}const _contentType=Symbol("content-type"),INLINE_LIST=Symbol("inline-list");function InlineList(e){return Object.defineProperties([],{[_type]:{value:INLINE_LIST},[_contentType]:{value:e}})}function isInlineList(e){return null!==e&&"object"==typeof e&&e[_type]===INLINE_LIST}const LIST=Symbol("list");function List(){return Object.defineProperties([],{[_type]:{value:LIST}})}function isList(e){return null!==e&&"object"==typeof e&&e[_type]===LIST}let _custom;try{const utilInspect=eval("require('util').inspect");_custom=utilInspect.custom}catch(e){}const _inspect=_custom||"inspect";class BoxedBigInt{constructor(e){try{this.value=global.BigInt.asIntN(64,e)}catch(e){this.value=null}Object.defineProperty(this,_type,{value:INTEGER})}isNaN(){return null===this.value}toString(){return String(this.value)}[_inspect](){return`[BigInt: ${this.toString()}]}`}valueOf(){return this.value}}const INTEGER=Symbol("integer");function Integer(e){let t=Number(e);return Object.is(t,-0)&&(t=0),global.BigInt&&!Number.isSafeInteger(t)?new BoxedBigInt(e):Object.defineProperties(new Number(t),{isNaN:{value:function(){return isNaN(this)}},[_type]:{value:INTEGER},[_inspect]:{value:()=>`[Integer: ${e}]`}})}function isInteger(e){return null!==e&&"object"==typeof e&&e[_type]===INTEGER}const FLOAT=Symbol("float");function Float(e){return Object.defineProperties(new Number(e),{[_type]:{value:FLOAT},[_inspect]:{value:()=>`[Float: ${e}]`}})}function isFloat(e){return null!==e&&"object"==typeof e&&e[_type]===FLOAT}function tomlType(e){const t=typeof e;if("object"===t){if(null===e)return"null";if(e instanceof Date)return"datetime";if(_type in e)switch(e[_type]){case INLINE_TABLE:return"inline-table";case INLINE_LIST:return"inline-list";case TABLE:return"table";case LIST:return"list";case FLOAT:return"float";case INTEGER:return"integer"}}return t}function makeParserClass(e){return class extends e{constructor(){super(),this.ctx=this.obj=Table()}atEndOfWord(){return this.char===CHAR_NUM||this.char===CTRL_I||this.char===CHAR_SP||this.atEndOfLine()}atEndOfLine(){return this.char===e.END||this.char===CTRL_J||this.char===CTRL_M}parseStart(){if(this.char===e.END)return null;if(this.char===CHAR_LSQB)return this.call(this.parseTableOrList);if(this.char===CHAR_NUM)return this.call(this.parseComment);if(this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(isAlphaNumQuoteHyphen(this.char))return this.callNow(this.parseAssignStatement);throw this.error(new TomlError(`Unknown character "${this.char}"`))}parseWhitespaceToEOL(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(this.char===CHAR_NUM)return this.goto(this.parseComment);if(this.char===e.END||this.char===CTRL_J)return this.return();throw this.error(new TomlError("Unexpected character, expected only whitespace or comments till end of line"))}parseAssignStatement(){return this.callNow(this.parseAssign,this.recordAssignStatement)}recordAssignStatement(e){let t=this.ctx,n=e.key.pop();for(let n of e.key){if(hasKey(t,n)&&(!isTable(t[n])||t[n][_declared]))throw this.error(new TomlError("Can't redefine existing key"));t=t[n]=t[n]||Table()}if(hasKey(t,n))throw this.error(new TomlError("Can't redefine existing key"));return isInteger(e.value)||isFloat(e.value)?t[n]=e.value.valueOf():t[n]=e.value,this.goto(this.parseWhitespaceToEOL)}parseAssign(){return this.callNow(this.parseKeyword,this.recordAssignKeyword)}recordAssignKeyword(e){return this.state.resultTable?this.state.resultTable.push(e):this.state.resultTable=[e],this.goto(this.parseAssignKeywordPreDot)}parseAssignKeywordPreDot(){return this.char===CHAR_PERIOD?this.next(this.parseAssignKeywordPostDot):this.char!==CHAR_SP&&this.char!==CTRL_I?this.goto(this.parseAssignEqual):void 0}parseAssignKeywordPostDot(){if(this.char!==CHAR_SP&&this.char!==CTRL_I)return this.callNow(this.parseKeyword,this.recordAssignKeyword)}parseAssignEqual(){if(this.char===CHAR_EQUALS)return this.next(this.parseAssignPreValue);throw this.error(new TomlError('Invalid character, expected "="'))}parseAssignPreValue(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseValue,this.recordAssignValue)}recordAssignValue(e){return this.returnNow({key:this.state.resultTable,value:e})}parseComment(){do{if(this.char===e.END||this.char===CTRL_J)return this.return()}while(this.nextChar())}parseTableOrList(){if(this.char!==CHAR_LSQB)return this.goto(this.parseTable);this.next(this.parseList)}parseTable(){return this.ctx=this.obj,this.goto(this.parseTableNext)}parseTableNext(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseKeyword,this.parseTableMore)}parseTableMore(e){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(hasKey(this.ctx,e)&&(!isTable(this.ctx[e])||this.ctx[e][_declared]))throw this.error(new TomlError("Can't redefine existing key"));return this.ctx=this.ctx[e]=this.ctx[e]||Table(),this.ctx[_declared]=!0,this.next(this.parseWhitespaceToEOL)}if(this.char===CHAR_PERIOD){if(hasKey(this.ctx,e))if(isTable(this.ctx[e]))this.ctx=this.ctx[e];else{if(!isList(this.ctx[e]))throw this.error(new TomlError("Can't redefine existing key"));this.ctx=this.ctx[e][this.ctx[e].length-1]}else this.ctx=this.ctx[e]=Table();return this.next(this.parseTableNext)}throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseList(){return this.ctx=this.obj,this.goto(this.parseListNext)}parseListNext(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseKeyword,this.parseListMore)}parseListMore(e){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(hasKey(this.ctx,e)||(this.ctx[e]=List()),isInlineList(this.ctx[e]))throw this.error(new TomlError("Can't extend an inline array"));if(!isList(this.ctx[e]))throw this.error(new TomlError("Can't redefine an existing key"));{const t=Table();this.ctx[e].push(t),this.ctx=t}return this.next(this.parseListEnd)}if(this.char===CHAR_PERIOD){if(hasKey(this.ctx,e)){if(isInlineList(this.ctx[e]))throw this.error(new TomlError("Can't extend an inline array"));if(isInlineTable(this.ctx[e]))throw this.error(new TomlError("Can't extend an inline table"));if(isList(this.ctx[e]))this.ctx=this.ctx[e][this.ctx[e].length-1];else{if(!isTable(this.ctx[e]))throw this.error(new TomlError("Can't redefine an existing key"));this.ctx=this.ctx[e]}}else this.ctx=this.ctx[e]=Table();return this.next(this.parseListNext)}throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseListEnd(e){if(this.char===CHAR_RSQB)return this.next(this.parseWhitespaceToEOL);throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseValue(){if(this.char===e.END)throw this.error(new TomlError("Key without value"));if(this.char===CHAR_QUOT)return this.next(this.parseDoubleString);if(this.char===CHAR_APOS)return this.next(this.parseSingleString);if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)return this.goto(this.parseNumberSign);if(this.char===CHAR_i)return this.next(this.parseInf);if(this.char===CHAR_n)return this.next(this.parseNan);if(isDigit(this.char))return this.goto(this.parseNumberOrDateTime);if(this.char===CHAR_t||this.char===CHAR_f)return this.goto(this.parseBoolean);if(this.char===CHAR_LSQB)return this.call(this.parseInlineList,this.recordValue);if(this.char===CHAR_LCUB)return this.call(this.parseInlineTable,this.recordValue);throw this.error(new TomlError("Unexpected character, expecting string, number, datetime, boolean, inline array or inline table"))}recordValue(e){return this.returnNow(e)}parseInf(){if(this.char===CHAR_n)return this.next(this.parseInf2);throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"'))}parseInf2(){if(this.char===CHAR_f)return"-"===this.state.buf?this.return(-1/0):this.return(1/0);throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"'))}parseNan(){if(this.char===CHAR_a)return this.next(this.parseNan2);throw this.error(new TomlError('Unexpected character, expected "nan"'))}parseNan2(){if(this.char===CHAR_n)return this.return(NaN);throw this.error(new TomlError('Unexpected character, expected "nan"'))}parseKeyword(){return this.char===CHAR_QUOT?this.next(this.parseBasicString):this.char===CHAR_APOS?this.next(this.parseLiteralString):this.goto(this.parseBareKey)}parseBareKey(){do{if(this.char===e.END)throw this.error(new TomlError("Key ended without value"));if(!isAlphaNumHyphen(this.char)){if(0===this.state.buf.length)throw this.error(new TomlError("Empty bare keys are not allowed"));return this.returnNow()}this.consume()}while(this.nextChar())}parseSingleString(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiStringMaybe):this.goto(this.parseLiteralString)}parseLiteralString(){do{if(this.char===CHAR_APOS)return this.return();if(this.atEndOfLine())throw this.error(new TomlError("Unterminated string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}parseLiteralMultiStringMaybe(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiString):this.returnNow()}parseLiteralMultiString(){return this.char===CTRL_M?null:this.char===CTRL_J?this.next(this.parseLiteralMultiStringContent):this.goto(this.parseLiteralMultiStringContent)}parseLiteralMultiStringContent(){do{if(this.char===CHAR_APOS)return this.next(this.parseLiteralMultiEnd);if(this.char===e.END)throw this.error(new TomlError("Unterminated multi-line string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I&&this.char!==CTRL_J&&this.char!==CTRL_M)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}parseLiteralMultiEnd(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiEnd2):(this.state.buf+="'",this.goto(this.parseLiteralMultiStringContent))}parseLiteralMultiEnd2(){return this.char===CHAR_APOS?this.return():(this.state.buf+="''",this.goto(this.parseLiteralMultiStringContent))}parseDoubleString(){return this.char===CHAR_QUOT?this.next(this.parseMultiStringMaybe):this.goto(this.parseBasicString)}parseBasicString(){do{if(this.char===CHAR_BSOL)return this.call(this.parseEscape,this.recordEscapeReplacement);if(this.char===CHAR_QUOT)return this.return();if(this.atEndOfLine())throw this.error(new TomlError("Unterminated string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}recordEscapeReplacement(e){return this.state.buf+=e,this.goto(this.parseBasicString)}parseMultiStringMaybe(){return this.char===CHAR_QUOT?this.next(this.parseMultiString):this.returnNow()}parseMultiString(){return this.char===CTRL_M?null:this.char===CTRL_J?this.next(this.parseMultiStringContent):this.goto(this.parseMultiStringContent)}parseMultiStringContent(){do{if(this.char===CHAR_BSOL)return this.call(this.parseMultiEscape,this.recordMultiEscapeReplacement);if(this.char===CHAR_QUOT)return this.next(this.parseMultiEnd);if(this.char===e.END)throw this.error(new TomlError("Unterminated multi-line string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I&&this.char!==CTRL_J&&this.char!==CTRL_M)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}errorControlCharInString(){let e="\\u00";return this.char<16&&(e+="0"),e+=this.char.toString(16),this.error(new TomlError(`Control characters (codes < 0x1f and 0x7f) are not allowed in strings, use ${e} instead`))}recordMultiEscapeReplacement(e){return this.state.buf+=e,this.goto(this.parseMultiStringContent)}parseMultiEnd(){return this.char===CHAR_QUOT?this.next(this.parseMultiEnd2):(this.state.buf+='"',this.goto(this.parseMultiStringContent))}parseMultiEnd2(){return this.char===CHAR_QUOT?this.return():(this.state.buf+='""',this.goto(this.parseMultiStringContent))}parseMultiEscape(){return this.char===CTRL_M||this.char===CTRL_J?this.next(this.parseMultiTrim):this.char===CHAR_SP||this.char===CTRL_I?this.next(this.parsePreMultiTrim):this.goto(this.parseEscape)}parsePreMultiTrim(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CTRL_M||this.char===CTRL_J)return this.next(this.parseMultiTrim);throw this.error(new TomlError("Can't escape whitespace"))}parseMultiTrim(){return this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M?null:this.returnNow()}parseEscape(){if(this.char in escapes)return this.return(escapes[this.char]);if(this.char===CHAR_u)return this.call(this.parseSmallUnicode,this.parseUnicodeReturn);if(this.char===CHAR_U)return this.call(this.parseLargeUnicode,this.parseUnicodeReturn);throw this.error(new TomlError("Unknown escape character: "+this.char))}parseUnicodeReturn(e){try{const t=parseInt(e,16);if(t>=SURROGATE_FIRST&&t<=SURROGATE_LAST)throw this.error(new TomlError("Invalid unicode, character in range 0xD800 - 0xDFFF is reserved"));return this.returnNow(String.fromCodePoint(t))}catch(e){throw this.error(TomlError.wrap(e))}}parseSmallUnicode(){if(!isHexit(this.char))throw this.error(new TomlError("Invalid character in unicode sequence, expected hex"));if(this.consume(),this.state.buf.length>=4)return this.return()}parseLargeUnicode(){if(!isHexit(this.char))throw this.error(new TomlError("Invalid character in unicode sequence, expected hex"));if(this.consume(),this.state.buf.length>=8)return this.return()}parseNumberSign(){return this.consume(),this.next(this.parseMaybeSignedInfOrNan)}parseMaybeSignedInfOrNan(){return this.char===CHAR_i?this.next(this.parseInf):this.char===CHAR_n?this.next(this.parseNan):this.callNow(this.parseNoUnder,this.parseNumberIntegerStart)}parseNumberIntegerStart(){return this.char===CHAR_0?(this.consume(),this.next(this.parseNumberIntegerExponentOrDecimal)):this.goto(this.parseNumberInteger)}parseNumberIntegerExponentOrDecimal(){return this.char===CHAR_PERIOD?(this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat)):this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.returnNow(Integer(this.state.buf))}parseNumberInteger(){if(!isDigit(this.char)){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder);if(this.char===CHAR_E||this.char===CHAR_e)return this.consume(),this.next(this.parseNumberExponentSign);if(this.char===CHAR_PERIOD)return this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat);{const e=Integer(this.state.buf);if(e.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(e)}}this.consume()}parseNoUnder(){if(this.char===CHAR_LOWBAR||this.char===CHAR_PERIOD||this.char===CHAR_E||this.char===CHAR_e)throw this.error(new TomlError("Unexpected character, expected digit"));if(this.atEndOfWord())throw this.error(new TomlError("Incomplete number"));return this.returnNow()}parseNoUnderHexOctBinLiteral(){if(this.char===CHAR_LOWBAR||this.char===CHAR_PERIOD)throw this.error(new TomlError("Unexpected character, expected digit"));if(this.atEndOfWord())throw this.error(new TomlError("Incomplete number"));return this.returnNow()}parseNumberFloat(){return this.char===CHAR_LOWBAR?this.call(this.parseNoUnder,this.parseNumberFloat):isDigit(this.char)?void this.consume():this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.returnNow(Float(this.state.buf))}parseNumberExponentSign(){if(isDigit(this.char))return this.goto(this.parseNumberExponent);if(this.char!==CHAR_HYPHEN&&this.char!==CHAR_PLUS)throw this.error(new TomlError("Unexpected character, expected -, + or digit"));this.consume(),this.call(this.parseNoUnder,this.parseNumberExponent)}parseNumberExponent(){if(!isDigit(this.char))return this.char===CHAR_LOWBAR?this.call(this.parseNoUnder):this.returnNow(Float(this.state.buf));this.consume()}parseNumberOrDateTime(){return this.char===CHAR_0?(this.consume(),this.next(this.parseNumberBaseOrDateTime)):this.goto(this.parseNumberOrDateTimeOnly)}parseNumberOrDateTimeOnly(){return this.char===CHAR_LOWBAR?this.call(this.parseNoUnder,this.parseNumberInteger):isDigit(this.char)?(this.consume(),void(this.state.buf.length>4&&this.next(this.parseNumberInteger))):this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.char===CHAR_PERIOD?(this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat)):this.char===CHAR_HYPHEN?this.goto(this.parseDateTime):this.char===CHAR_COLON?this.goto(this.parseOnlyTimeHour):this.returnNow(Integer(this.state.buf))}parseDateTimeOnly(){if(this.state.buf.length<4){if(isDigit(this.char))return this.consume();if(this.char===CHAR_COLON)return this.goto(this.parseOnlyTimeHour);throw this.error(new TomlError("Expected digit while parsing year part of a date"))}if(this.char===CHAR_HYPHEN)return this.goto(this.parseDateTime);throw this.error(new TomlError("Expected hyphen (-) while parsing year part of date"))}parseNumberBaseOrDateTime(){return this.char===CHAR_b?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerBin)):this.char===CHAR_o?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerOct)):this.char===CHAR_x?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerHex)):this.char===CHAR_PERIOD?this.goto(this.parseNumberInteger):isDigit(this.char)?this.goto(this.parseDateTimeOnly):this.returnNow(Integer(this.state.buf))}parseIntegerHex(){if(!isHexit(this.char)){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{const e=Integer(this.state.buf);if(e.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(e)}}this.consume()}parseIntegerOct(){if(!isOctit(this.char)){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{const e=Integer(this.state.buf);if(e.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(e)}}this.consume()}parseIntegerBin(){if(!isBit(this.char)){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{const e=Integer(this.state.buf);if(e.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(e)}}this.consume()}parseDateTime(){if(this.state.buf.length<4)throw this.error(new TomlError("Years less than 1000 must be zero padded to four characters"));return this.state.result=this.state.buf,this.state.buf="",this.next(this.parseDateMonth)}parseDateMonth(){if(this.char===CHAR_HYPHEN){if(this.state.buf.length<2)throw this.error(new TomlError("Months less than 10 must be zero padded to two characters"));return this.state.result+="-"+this.state.buf,this.state.buf="",this.next(this.parseDateDay)}if(!isDigit(this.char))throw this.error(new TomlError("Incomplete datetime"));this.consume()}parseDateDay(){if(this.char===CHAR_T||this.char===CHAR_SP){if(this.state.buf.length<2)throw this.error(new TomlError("Days less than 10 must be zero padded to two characters"));return this.state.result+="-"+this.state.buf,this.state.buf="",this.next(this.parseStartTimeHour)}if(this.atEndOfWord())return this.returnNow(createDate(this.state.result+"-"+this.state.buf));if(!isDigit(this.char))throw this.error(new TomlError("Incomplete datetime"));this.consume()}parseStartTimeHour(){return this.atEndOfWord()?this.returnNow(createDate(this.state.result)):this.goto(this.parseTimeHour)}parseTimeHour(){if(this.char===CHAR_COLON){if(this.state.buf.length<2)throw this.error(new TomlError("Hours less than 10 must be zero padded to two characters"));return this.state.result+="T"+this.state.buf,this.state.buf="",this.next(this.parseTimeMin)}if(!isDigit(this.char))throw this.error(new TomlError("Incomplete datetime"));this.consume()}parseTimeMin(){if(!(this.state.buf.length<2&&isDigit(this.char))){if(2===this.state.buf.length&&this.char===CHAR_COLON)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseTimeSec);throw this.error(new TomlError("Incomplete datetime"))}this.consume()}parseTimeSec(){if(!isDigit(this.char))throw this.error(new TomlError("Incomplete datetime"));if(this.consume(),2===this.state.buf.length)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseTimeZoneOrFraction)}parseOnlyTimeHour(){if(this.char===CHAR_COLON){if(this.state.buf.length<2)throw this.error(new TomlError("Hours less than 10 must be zero padded to two characters"));return this.state.result=this.state.buf,this.state.buf="",this.next(this.parseOnlyTimeMin)}throw this.error(new TomlError("Incomplete time"))}parseOnlyTimeMin(){if(!(this.state.buf.length<2&&isDigit(this.char))){if(2===this.state.buf.length&&this.char===CHAR_COLON)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseOnlyTimeSec);throw this.error(new TomlError("Incomplete time"))}this.consume()}parseOnlyTimeSec(){if(!isDigit(this.char))throw this.error(new TomlError("Incomplete time"));if(this.consume(),2===this.state.buf.length)return this.next(this.parseOnlyTimeFractionMaybe)}parseOnlyTimeFractionMaybe(){if(this.state.result+=":"+this.state.buf,this.char!==CHAR_PERIOD)return this.return(createTime(this.state.result));this.state.buf="",this.next(this.parseOnlyTimeFraction)}parseOnlyTimeFraction(){if(!isDigit(this.char)){if(this.atEndOfWord()){if(0===this.state.buf.length)throw this.error(new TomlError("Expected digit in milliseconds"));return this.returnNow(createTime(this.state.result+"."+this.state.buf))}throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}this.consume()}parseTimeZoneOrFraction(){if(this.char===CHAR_PERIOD)this.consume(),this.next(this.parseDateTimeFraction);else{if(this.char!==CHAR_HYPHEN&&this.char!==CHAR_PLUS){if(this.char===CHAR_Z)return this.consume(),this.return(createDateTime(this.state.result+this.state.buf));if(this.atEndOfWord())return this.returnNow(createDateTimeFloat(this.state.result+this.state.buf));throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}this.consume(),this.next(this.parseTimeZoneHour)}}parseDateTimeFraction(){if(isDigit(this.char))this.consume();else{if(1===this.state.buf.length)throw this.error(new TomlError("Expected digit in milliseconds"));if(this.char!==CHAR_HYPHEN&&this.char!==CHAR_PLUS){if(this.char===CHAR_Z)return this.consume(),this.return(createDateTime(this.state.result+this.state.buf));if(this.atEndOfWord())return this.returnNow(createDateTimeFloat(this.state.result+this.state.buf));throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}this.consume(),this.next(this.parseTimeZoneHour)}}parseTimeZoneHour(){if(!isDigit(this.char))throw this.error(new TomlError("Unexpected character in datetime, expected digit"));if(this.consume(),/\d\d$/.test(this.state.buf))return this.next(this.parseTimeZoneSep)}parseTimeZoneSep(){if(this.char!==CHAR_COLON)throw this.error(new TomlError("Unexpected character in datetime, expected colon"));this.consume(),this.next(this.parseTimeZoneMin)}parseTimeZoneMin(){if(!isDigit(this.char))throw this.error(new TomlError("Unexpected character in datetime, expected digit"));if(this.consume(),/\d\d$/.test(this.state.buf))return this.return(createDateTime(this.state.result+this.state.buf))}parseBoolean(){return this.char===CHAR_t?(this.consume(),this.next(this.parseTrue_r)):this.char===CHAR_f?(this.consume(),this.next(this.parseFalse_a)):void 0}parseTrue_r(){if(this.char===CHAR_r)return this.consume(),this.next(this.parseTrue_u);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseTrue_u(){if(this.char===CHAR_u)return this.consume(),this.next(this.parseTrue_e);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseTrue_e(){if(this.char===CHAR_e)return this.return(!0);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_a(){if(this.char===CHAR_a)return this.consume(),this.next(this.parseFalse_l);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_l(){if(this.char===CHAR_l)return this.consume(),this.next(this.parseFalse_s);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_s(){if(this.char===CHAR_s)return this.consume(),this.next(this.parseFalse_e);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_e(){if(this.char===CHAR_e)return this.return(!1);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseInlineList(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M||this.char===CTRL_J)return null;if(this.char===e.END)throw this.error(new TomlError("Unterminated inline array"));return this.char===CHAR_NUM?this.call(this.parseComment):this.char===CHAR_RSQB?this.return(this.state.resultArr||InlineList()):this.callNow(this.parseValue,this.recordInlineListValue)}recordInlineListValue(e){if(this.state.resultArr){const t=this.state.resultArr[_contentType],n=tomlType(e);if(t!==n)throw this.error(new TomlError(`Inline lists must be a single type, not a mix of ${t} and ${n}`))}else this.state.resultArr=InlineList(tomlType(e));return isFloat(e)||isInteger(e)?this.state.resultArr.push(e.valueOf()):this.state.resultArr.push(e),this.goto(this.parseInlineListNext)}parseInlineListNext(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M||this.char===CTRL_J)return null;if(this.char===CHAR_NUM)return this.call(this.parseComment);if(this.char===CHAR_COMMA)return this.next(this.parseInlineList);if(this.char===CHAR_RSQB)return this.goto(this.parseInlineList);throw this.error(new TomlError("Invalid character, expected whitespace, comma (,) or close bracket (])"))}parseInlineTable(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===e.END||this.char===CHAR_NUM||this.char===CTRL_J||this.char===CTRL_M)throw this.error(new TomlError("Unterminated inline array"));return this.char===CHAR_RCUB?this.return(this.state.resultTable||InlineTable()):(this.state.resultTable||(this.state.resultTable=InlineTable()),this.callNow(this.parseAssign,this.recordInlineTableValue))}recordInlineTableValue(e){let t=this.state.resultTable,n=e.key.pop();for(let n of e.key){if(hasKey(t,n)&&(!isTable(t[n])||t[n][_declared]))throw this.error(new TomlError("Can't redefine existing key"));t=t[n]=t[n]||Table()}if(hasKey(t,n))throw this.error(new TomlError("Can't redefine existing key"));return isInteger(e.value)||isFloat(e.value)?t[n]=e.value.valueOf():t[n]=e.value,this.goto(this.parseInlineTableNext)}parseInlineTableNext(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===e.END||this.char===CHAR_NUM||this.char===CTRL_J||this.char===CTRL_M)throw this.error(new TomlError("Unterminated inline array"));if(this.char===CHAR_COMMA)return this.next(this.parseInlineTable);if(this.char===CHAR_RCUB)return this.goto(this.parseInlineTable);throw this.error(new TomlError("Invalid character, expected whitespace, comma (,) or close bracket (])"))}}}}).call(this,__webpack_require__(56))},function(e,t,n){"use strict";e.exports=(e,t)=>{for(t=String(t);t.length "+r[t]+"\n",n+=o+" ";for(let t=0;t0&&a.length>i&&!a.warned){a.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=a.length,s=l,console&&console.warn&&console.warn(s)}return e}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=f.bind(r);return i.listener=n,r.wrapFn=i,i}function h(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var l=i[e];if(void 0===l)return!1;if("function"==typeof l)o(l,this,t);else{var u=l.length,c=g(l,u);for(n=0;n=0;o--)if(n[o]===t||n[o].listener===t){a=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1=0;r--)this.removeListener(e,t[r]);return this},s.prototype.listeners=function(e){return h(this,e,!0)},s.prototype.rawListeners=function(e){return h(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},s.prototype.listenerCount=m,s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t,n){(t=e.exports=n(579)).Stream=t,t.Readable=t,t.Writable=n(417),t.Duplex=n(198),t.Transform=n(583),t.PassThrough=n(1030)},function(e,t,n){var r=n(196),i=r.Buffer;function o(e,t){for(var n in e)t[n]=e[n]}function a(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(o(r,t),t.Buffer=a),o(i,a),a.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},a.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t,n){"use strict";(function(t,r,i){var o=n(311);function a(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var r=e.entry;e.entry=null;for(;r;){var i=r.callback;t.pendingcb--,i(n),r=r.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}e.exports=y;var s,l=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?r:o.nextTick;y.WritableState=v;var u=Object.create(n(250));u.inherits=n(197);var c={deprecate:n(1028)},d=n(580),f=n(416).Buffer,p=i.Uint8Array||function(){};var h,m=n(581);function g(){}function v(e,t){s=s||n(198),e=e||{};var r=t instanceof s;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,u=e.writableHighWaterMark,c=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(u||0===u)?u:c,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var d=!1===e.decodeStrings;this.decodeStrings=!d,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,r,i){--t.pendingcb,n?(o.nextTick(i,r),o.nextTick(E,e,t),e._writableState.errorEmitted=!0,e.emit("error",r)):(i(r),e._writableState.errorEmitted=!0,e.emit("error",r),E(e,t))}(e,n,r,t,i);else{var a=x(n);a||n.corked||n.bufferProcessing||!n.bufferedRequest||w(e,n),r?l(_,e,n,a,i):_(e,n,a,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new a(this)}function y(e){if(s=s||n(198),!(h.call(y,this)||this instanceof s))return new y(e);this._writableState=new v(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),d.call(this)}function b(e,t,n,r,i,o,a){t.writelen=r,t.writecb=a,t.writing=!0,t.sync=!0,n?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function _(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),E(e,t)}function w(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,i=new Array(r),o=t.corkedRequestsFree;o.entry=n;for(var s=0,l=!0;n;)i[s]=n,n.isBuf||(l=!1),n=n.next,s+=1;i.allBuffers=l,b(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new a(t),t.bufferedRequestCount=0}else{for(;n;){var u=n.chunk,c=n.encoding,d=n.callback;if(b(e,t,!1,t.objectMode?1:u.length,u,c,d),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function x(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function k(e,t){e._final((function(n){t.pendingcb--,n&&e.emit("error",n),t.prefinished=!0,e.emit("prefinish"),E(e,t)}))}function E(e,t){var n=x(t);return n&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,o.nextTick(k,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),n}u.inherits(y,d),v.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(v.prototype,"buffer",{get:c.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(h=Function.prototype[Symbol.hasInstance],Object.defineProperty(y,Symbol.hasInstance,{value:function(e){return!!h.call(this,e)||this===y&&(e&&e._writableState instanceof v)}})):h=function(e){return e instanceof this},y.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},y.prototype.write=function(e,t,n){var r,i=this._writableState,a=!1,s=!i.objectMode&&(r=e,f.isBuffer(r)||r instanceof p);return s&&!f.isBuffer(e)&&(e=function(e){return f.from(e)}(e)),"function"==typeof t&&(n=t,t=null),s?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof n&&(n=g),i.ended?function(e,t){var n=new Error("write after end");e.emit("error",n),o.nextTick(t,n)}(this,n):(s||function(e,t,n,r){var i=!0,a=!1;return null===n?a=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||t.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),o.nextTick(r,a),i=!1),i}(this,i,e,n))&&(i.pendingcb++,a=function(e,t,n,r,i,o){if(!n){var a=function(e,t,n){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=f.from(t,n));return t}(t,r,i);r!==a&&(n=!0,i="buffer",r=a)}var s=t.objectMode?1:r.length;t.length+=s;var l=t.length-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),y.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},y.prototype._writev=null,y.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(e,t,n){t.ending=!0,E(e,t),n&&(t.finished?o.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,r,n)},Object.defineProperty(y.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),y.prototype.destroy=m.destroy,y.prototype._undestroy=m.undestroy,y.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,n(97),n(578).setImmediate,n(56))},function(e,t,n){"use strict";var r=n(219);e.exports=new r({explicit:[n(1047),n(1048),n(1049)]})},function(e,t,n){"use strict";(function(e){const r=n(1064),i=n(312);t.define=function(e,t,n){Reflect.defineProperty(e,t,{enumerable:!1,configurable:!0,writable:!0,value:n})},t.isBuffer=function(e){return"buffer"===i(e)},t.isObject=function(e){return"object"===i(e)},t.toBuffer=function(t){return"string"==typeof t?e.from(t):t},t.toString=function(e){if(t.isBuffer(e))return r(String(e));if("string"!=typeof e)throw new TypeError("expected input to be a string or buffer");return r(e)},t.arrayify=function(e){return e?Array.isArray(e)?e:[e]:[]},t.startsWith=function(e,t,n){return"number"!=typeof n&&(n=t.length),e.slice(0,n)===t}}).call(this,n(196).Buffer)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.selectLocale=function(e){return e.locale||"en"},t.selectUseWorkflow=function(e){return e.publish_mode===o.EDITORIAL_WORKFLOW};var r=n(144),i=n(220),o=n(124);function a(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 s(e){for(var t=1;t{switch(t.type){case i.CONFIG_REQUEST:e.isFetching=!0;break;case i.CONFIG_SUCCESS:return s(s({},t.payload),{},{isFetching:!1,error:void 0});case i.CONFIG_FAILURE:e.isFetching=!1,e.error=t.payload.toString()}},{isFetching:!0});t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(274);r.code='require("ajv/dist/runtime/equal").default',t.default=r},function(e,t,n){var r=n(133),i=/[\\^$.*+?()[\]{}|]/g,o=RegExp(i.source);e.exports=function(e){return(e=r(e))&&o.test(e)?e.replace(i,"\\$&"):e}},function(e,t,n){"use strict";let r;Object.defineProperty(t,"__esModule",{value:!0}),t.SortDirection=void 0,t.SortDirection=r,function(e){e.Ascending="Ascending",e.Descending="Descending",e.None="None"}(r||(t.SortDirection=r={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getIntegrationProvider=void 0,t.resolveIntegrations=s;var r=n(4),i=a(n(1167)),o=a(n(1169));function a(e){return e&&e.__esModule?e:{default:e}}function s(e,t){let n=(0,r.Map)({});return e.get("providers").forEach((e,r)=>{switch(r){case"algolia":n=n.set("algolia",new i.default(e));break;case"assetStore":n=n.set("assetStore",new o.default(e,t))}}),n}const l=function(){let e=null;return(t,n,r)=>(e||(e=s(t,n)),e.get(r))}();t.getIntegrationProvider=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createEntry=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o={collection:e,slug:t,path:n,partial:r.partial||!1,raw:r.raw||"",data:r.data||{},label:r.label||null,isModification:(0,i.default)(r.isModification)?r.isModification:null,mediaFiles:r.mediaFiles||[],author:r.author||"",updatedOn:r.updatedOn||"",status:r.status||"",meta:r.meta||{},i18n:r.i18n||{}};return o};var r,i=(r=n(1168))&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.selectCollectionEntriesCursor=function(e,t){return new i.Cursor(e.getIn(["cursorsByType","collectionEntries",t]))};var r=n(4),i=n(40),o=n(149);var a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,r.fromJS)({cursorsByType:{collectionEntries:{}}}),t=arguments.length>1?arguments[1]:void 0;switch(t.type){case o.ENTRIES_SUCCESS:return e.setIn(["cursorsByType","collectionEntries",t.payload.collection],i.Cursor.create(t.payload.cursor).store);case o.FILTER_ENTRIES_SUCCESS:case o.GROUP_ENTRIES_SUCCESS:case o.SORT_ENTRIES_SUCCESS:return e.deleteIn(["cursorsByType","collectionEntries",t.payload.collection]);default:return e}};t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={PRESENCE:"PRESENCE",PATTERN:"PATTERN",RANGE:"RANGE",CUSTOM:"CUSTOM"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.selectCustomPath=function(e,t){if(!(0,u.selectHasMetaPath)(e))return;const n=t.getIn(["entry","meta"]),i=n&&n.get("path"),o=(0,r.default)(e.toJS(),["meta","path","index_file"]),s=(0,u.selectFolderEntryExtension)(e);return i&&(0,a.join)(e.get("folder"),i,`${o}.${s}`)};var r=d(n(103)),i=n(4),o=d(n(169)),a=n(98),s=n(149),l=n(259),u=n(71),c=n(199);function d(e){return e&&e.__esModule?e:{default:e}}const f=(0,i.Map)({entry:(0,i.Map)(),fieldsMetaData:(0,i.Map)(),fieldsErrors:(0,i.Map)(),hasChanged:!1,key:""});var p=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,i.Map)(),t=arguments.length>1?arguments[1]:void 0;switch(t.type){case s.DRAFT_CREATE_FROM_ENTRY:return e.withMutations(e=>{e.set("entry",(0,i.fromJS)(t.payload.entry)),e.setIn(["entry","newRecord"],!1),e.set("fieldsMetaData",(0,i.Map)()),e.set("fieldsErrors",(0,i.Map)()),e.set("hasChanged",!1),e.set("key",(0,o.default)())});case s.DRAFT_CREATE_EMPTY:return e.withMutations(e=>{e.set("entry",(0,i.fromJS)(t.payload)),e.setIn(["entry","newRecord"],!0),e.set("fieldsMetaData",(0,i.Map)()),e.set("fieldsErrors",(0,i.Map)()),e.set("hasChanged",!1),e.set("key",(0,o.default)())});case s.DRAFT_CREATE_FROM_LOCAL_BACKUP:return e.withMutations(e=>{const t=e.get("localBackup").get("entry");e.delete("localBackup"),e.set("entry",t),e.setIn(["entry","newRecord"],!t.get("path")),e.set("fieldsMetaData",(0,i.Map)()),e.set("fieldsErrors",(0,i.Map)()),e.set("hasChanged",!0),e.set("key",(0,o.default)())});case s.DRAFT_CREATE_DUPLICATE_FROM_ENTRY:return e.withMutations(e=>{e.set("entry",(0,i.fromJS)(t.payload)),e.setIn(["entry","newRecord"],!0),e.set("mediaFiles",(0,i.List)()),e.set("fieldsMetaData",(0,i.Map)()),e.set("fieldsErrors",(0,i.Map)()),e.set("hasChanged",!0)});case s.DRAFT_DISCARD:return f;case s.DRAFT_LOCAL_BACKUP_RETRIEVED:{const{entry:n}=t.payload,r=new i.Map({entry:(0,i.fromJS)(n)});return e.set("localBackup",r)}case s.DRAFT_CHANGE_FIELD:return e.withMutations(e=>{const{field:n,value:r,metadata:o,entries:a,i18n:s}=t.payload,l=n.get("name"),u=n.get("meta"),d=s&&(0,c.getDataPath)(s.currentLocale,s.defaultLocale)||["data"];u?e.setIn(["entry","meta",l],r):(e.setIn(["entry",...d,l],r),s&&(e=(0,c.duplicateI18nFields)(e,n,s.locales,s.defaultLocale))),e.mergeDeepIn(["fieldsMetaData"],(0,i.fromJS)(o));const f=e.getIn(["entry",...d]),p=e.getIn(["entry","meta"]);e.set("hasChanged",!a.some(e=>f.equals(e.get(...d)))||!a.some(e=>p.equals(e.get("meta"))))});case s.DRAFT_VALIDATION_ERRORS:return 0===t.payload.errors.length?e.deleteIn(["fieldsErrors",t.payload.uniquefieldId]):e.setIn(["fieldsErrors",t.payload.uniquefieldId],t.payload.errors);case s.DRAFT_CLEAR_ERRORS:return e.set("fieldsErrors",(0,i.Map)());case s.ENTRY_PERSIST_REQUEST:case l.UNPUBLISHED_ENTRY_PERSIST_REQUEST:return e.setIn(["entry","isPersisting"],!0);case s.ENTRY_PERSIST_FAILURE:case l.UNPUBLISHED_ENTRY_PERSIST_FAILURE:return e.deleteIn(["entry","isPersisting"]);case l.UNPUBLISHED_ENTRY_STATUS_CHANGE_REQUEST:return e.setIn(["entry","isUpdatingStatus"],!0);case l.UNPUBLISHED_ENTRY_STATUS_CHANGE_FAILURE:case l.UNPUBLISHED_ENTRY_STATUS_CHANGE_SUCCESS:return e.deleteIn(["entry","isUpdatingStatus"]);case l.UNPUBLISHED_ENTRY_PUBLISH_REQUEST:return e.setIn(["entry","isPublishing"],!0);case l.UNPUBLISHED_ENTRY_PUBLISH_SUCCESS:case l.UNPUBLISHED_ENTRY_PUBLISH_FAILURE:return e.deleteIn(["entry","isPublishing"]);case s.ENTRY_PERSIST_SUCCESS:case l.UNPUBLISHED_ENTRY_PERSIST_SUCCESS:return e.withMutations(e=>{e.deleteIn(["entry","isPersisting"]),e.set("hasChanged",!1),e.getIn(["entry","slug"])||e.setIn(["entry","slug"],t.payload.slug)});case s.ENTRY_DELETE_SUCCESS:return e.withMutations(e=>{e.deleteIn(["entry","isPersisting"]),e.set("hasChanged",!1)});case s.ADD_DRAFT_ENTRY_MEDIA_FILE:return e.withMutations(e=>{const n=e.getIn(["entry","mediaFiles"]);e.setIn(["entry","mediaFiles"],n.filterNot(e=>e.get("id")===t.payload.id).insert(0,(0,i.fromJS)(t.payload))),e.set("hasChanged",!0)});case s.REMOVE_DRAFT_ENTRY_MEDIA_FILE:return e.withMutations(e=>{const n=e.getIn(["entry","mediaFiles"]);e.setIn(["entry","mediaFiles"],n.filterNot(e=>e.get("id")===t.payload.id)),e.set("hasChanged",!0)});default:return e}};t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VIEW_STYLE_LIST=t.VIEW_STYLE_GRID=void 0;t.VIEW_STYLE_LIST="VIEW_STYLE_LIST";t.VIEW_STYLE_GRID="VIEW_STYLE_GRID"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.getIntegrations=u,t.selectIntegration=function(e,t,n){return t?e.getIn(["hooks",t,n],!1):e.getIn(["hooks",n],!1)};var r=n(4),i=n(220);const o=["hooks","collections","provider"];function a(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 s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function u(e){const t=(e.integrations||[]).reduce((t,n)=>{const{hooks:r,collections:i,provider:u}=n,c=l(n,o);if(t.providers[u]=function(e){for(var t=1;t{t.hooks[e]=u}),t;return("*"===i?e.collections.map(e=>e.name):i).forEach(e=>{r.forEach(n=>{t.hooks[e]?t.hooks[e][n]=u:t.hooks[e]={[n]:u}})}),t},{providers:{},hooks:{}});return(0,r.fromJS)(t)}const c=(0,r.fromJS)({providers:{},hooks:{}});var d=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case i.CONFIG_SUCCESS:return u(t.payload);default:return e}};t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.canUseDOM=t.SafeNodeList=t.SafeHTMLCollection=void 0;var r,i=n(1198);var o=((r=i)&&r.__esModule?r:{default:r}).default,a=o.canUseDOM?window.HTMLElement:{};t.SafeHTMLCollection=o.canUseDOM?window.HTMLCollection:{},t.SafeNodeList=o.canUseDOM?window.NodeList:{},t.canUseDOM=o.canUseDOM;t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createNewEntry=function(e){r.history.push((0,i.getNewEntryUrl)(e))},t.searchCollections=function(e,t){t?r.history.push(`/collections/${t}/search/${e}`):r.history.push("/search/"+e)},t.showCollection=function(e){r.history.push((0,i.getCollectionUrl)(e))};var r=n(221),i=n(170)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ControlButton=function(e){let{active:t,title:n}=e;return(0,i.jsx)(s,{css:(0,i.css)("color:",t?o.colors.active:void 0,";;label:ControlButton;")},n)};var r=a(n(21)),i=(a(n(0)),n(9)),o=n(17);function a(e){return e&&e.__esModule?e:{default:e}}const s=(0,r.default)(o.StyledDropdownButton,{target:"e1jezdn30",label:"Button"})(o.buttons.button,";",o.buttons.medium,";",o.buttons.grayText,";font-size:14px;&:after{top:11px;}")},function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty,i=Object.prototype.toString,o=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===i.call(e)},l=function(e){if(!e||"[object Object]"!==i.call(e))return!1;var t,n=r.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&r.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!o)return!1;for(t in e);return void 0===t||r.call(e,t)},u=function(e,t){o&&"__proto__"===t.name?o(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},c=function(e,t){if("__proto__"===t){if(!r.call(e,t))return;if(a)return a(e,t).value}return e[t]};e.exports=function e(){var t,n,r,i,o,a,d=arguments[0],f=1,p=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f-1,e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),l)};function l(n){return 40===n?e.attempt(h,t,i?t:u)(n):91===n?e.attempt(m,t,i?e.attempt(g,t,u):u)(n):i?t(n):u(n)}function u(e){return r._balanced=!0,n(e)}},resolveTo:function(e,t){var n,r,a,u,c,d,f,p=e.length,h=0;for(;p--;)if(u=e[p][1],c){if("link"===u.type||"labelLink"===u.type&&u._inactive)break;"enter"===e[p][0]&&"labelLink"===u.type&&(u._inactive=!0)}else if(d){if("enter"===e[p][0]&&("labelImage"===u.type||"labelLink"===u.type)&&!u._balanced&&(c=p,"labelLink"!==u.type)){h=2;break}}else"labelEnd"===u.type&&(d=p);return n={type:"labelLink"===e[c][1].type?"link":"image",start:l(e[c][1].start),end:l(e[e.length-1][1].end)},r={type:"label",start:l(e[c][1].start),end:l(e[d][1].end)},a={type:"labelText",start:l(e[c+h+2][1].end),end:l(e[d-2][1].start)},f=i(f=[["enter",n,t],["enter",r,t]],e.slice(c+1,c+h+3)),f=i(f,[["enter",a,t]]),f=i(f,s(t.parser.constructs.insideSpan.null,e.slice(c+h+4,d-3),t)),f=i(f,[["exit",a,t],e[d-2],e[d-1],["exit",r,t]]),f=i(f,e.slice(d+1)),f=i(f,[["exit",n,t]]),o(e,c,e.length,f),e},resolveAll:function(e){var t,n=-1;for(;++n{let t={};return e.forEach((e,n)=>t[e]=n),t})(c),f=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,p=String.fromCharCode.bind(String),h="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):(e,t=(e=>e))=>new Uint8Array(Array.prototype.slice.call(e,0).map(t)),m=e=>e.replace(/=/g,"").replace(/[+\/]/g,e=>"+"==e?"-":"_"),g=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),v=e=>{let t,n,r,i,o="";const a=e.length%3;for(let a=0;a255||(r=e.charCodeAt(a++))>255||(i=e.charCodeAt(a++))>255)throw new TypeError("invalid character found");t=n<<16|r<<8|i,o+=c[t>>18&63]+c[t>>12&63]+c[t>>6&63]+c[63&t]}return a?o.slice(0,a-3)+"===".substring(a):o},y=a?e=>btoa(e):s?e=>Buffer.from(e,"binary").toString("base64"):v,b=s?e=>Buffer.from(e).toString("base64"):e=>{let t=[];for(let n=0,r=e.length;nt?m(b(e)):b(e),w=e=>{if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?p(192|t>>>6)+p(128|63&t):p(224|t>>>12&15)+p(128|t>>>6&63)+p(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return p(240|t>>>18&7)+p(128|t>>>12&63)+p(128|t>>>6&63)+p(128|63&t)},x=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,k=e=>e.replace(x,w),E=s?e=>Buffer.from(e,"utf8").toString("base64"):u?e=>b(u.encode(e)):e=>y(k(e)),S=(e,t=!1)=>t?m(E(e)):E(e),O=e=>S(e,!0),C=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,T=e=>{switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return p(55296+(t>>>10))+p(56320+(1023&t));case 3:return p((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return p((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},A=e=>e.replace(C,T),P=e=>{if(e=e.replace(/\s+/g,""),!f.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(3&e.length));let t,n,r,i="";for(let o=0;o>16&255):64===r?p(t>>16&255,t>>8&255):p(t>>16&255,t>>8&255,255&t);return i},R=o?e=>atob(g(e)):s?e=>Buffer.from(e,"base64").toString("binary"):P,j=s?e=>h(Buffer.from(e,"base64")):e=>h(R(e),e=>e.charCodeAt(0)),I=e=>j(L(e)),M=s?e=>Buffer.from(e,"base64").toString("utf8"):l?e=>l.decode(j(e)):e=>A(R(e)),L=e=>g(e.replace(/[-_]/g,e=>"-"==e?"+":"/")),D=e=>M(L(e)),N=e=>{if("string"!=typeof e)return!1;const t=e.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(t)||!/[^\s0-9a-zA-Z\-_]/.test(t)},F=e=>({value:e,enumerable:!1,writable:!0,configurable:!0}),B=function(){const e=(e,t)=>Object.defineProperty(String.prototype,e,F(t));e("fromBase64",(function(){return D(this)})),e("toBase64",(function(e){return S(this,e)})),e("toBase64URI",(function(){return S(this,!0)})),e("toBase64URL",(function(){return S(this,!0)})),e("toUint8Array",(function(){return I(this)}))},z=function(){const e=(e,t)=>Object.defineProperty(Uint8Array.prototype,e,F(t));e("toBase64",(function(e){return _(this,e)})),e("toBase64URI",(function(){return _(this,!0)})),e("toBase64URL",(function(){return _(this,!0)}))},U=()=>{B(),z()},q={version:r,VERSION:i,atob:R,atobPolyfill:P,btoa:y,btoaPolyfill:v,fromBase64:D,toBase64:S,encode:S,encodeURI:O,encodeURL:O,utob:k,btou:A,decode:D,isValid:N,fromUint8Array:_,toUint8Array:I,extendString:B,extendUint8Array:z,extendBuiltins:U}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"API",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"AuthenticationPage",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"GitHubBackend",{enumerable:!0,get:function(){return r.default}}),t.NetlifyCmsBackendGithub=void 0;var r=a(n(1392)),i=a(n(449)),o=a(n(666));function a(e){return e&&e.__esModule?e:{default:e}}const s={GitHubBackend:r.default,API:i.default,AuthenticationPage:o.default};t.NetlifyCmsBackendGithub=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.PullRequestState=t.MOCK_PULL_REQUEST=t.API_NAME=void 0;var r=h(n(122)),i=h(n(123)),o=h(n(446)),a=h(n(173)),s=h(n(194)),l=h(n(1393)),u=n(447),c=h(n(193)),d=n(111),f=n(40),p=n(98);function h(e){return e&&e.__esModule?e:{default:e}}function m(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 g(e){for(var t=1;t(0,f.isCMSLabel)(e.name,t))}function w(e){return e.reduce((e,t)=>("removed"===t.status?e.push({sha:null,path:t.filename}):"renamed"===t.status?(e.push({sha:null,path:t.previous_filename}),e.push({sha:t.sha,path:t.filename})):e.push({sha:t.sha,path:t.filename}),e),[])}t.MOCK_PULL_REQUEST=-1,function(e){e.Error="error",e.Failure="failure",e.Pending="pending",e.Success="success"}(y||(y={})),t.PullRequestState=b,function(e){e.Open="open",e.Closed="closed",e.All="all"}(b||(t.PullRequestState=b={}));let x=!1;class k{constructor(e){v(this,"apiRoot",void 0),v(this,"token",void 0),v(this,"branch",void 0),v(this,"useOpenAuthoring",void 0),v(this,"repo",void 0),v(this,"originRepo",void 0),v(this,"repoOwner",void 0),v(this,"repoName",void 0),v(this,"originRepoOwner",void 0),v(this,"originRepoName",void 0),v(this,"repoURL",void 0),v(this,"originRepoURL",void 0),v(this,"mergeMethod",void 0),v(this,"initialWorkflowStatus",void 0),v(this,"cmsLabelPrefix",void 0),v(this,"_userPromise",void 0),v(this,"_metadataSemaphore",void 0),v(this,"commitAuthor",void 0),v(this,"filterOpenAuthoringBranches",async e=>{try{const t=await this.getBranchPullRequest(e),{state:n,merged_at:r}=t;return-1!==t.number&&n===b.Closed&&r?(await this.deleteBranch(e),{branch:e,filter:!1}):{branch:e,filter:!0}}catch(t){return{branch:e,filter:!1}}}),this.apiRoot=e.apiRoot||"https://api.github.com",this.token=e.token||"",this.branch=e.branch||"master",this.useOpenAuthoring=e.useOpenAuthoring,this.repo=e.repo||"",this.originRepo=e.originRepo||this.repo,this.repoURL="/repos/"+this.repo,this.originRepoURL="/repos/"+this.originRepo;const[t,n]=[this.repo.split("/"),this.originRepo.split("/")];this.repoOwner=t[0],this.repoName=t[1],this.originRepoOwner=n[0],this.originRepoName=n[1],this.mergeMethod=e.squashMerges?"squash":"merge",this.cmsLabelPrefix=e.cmsLabelPrefix,this.initialWorkflowStatus=e.initialWorkflowStatus}user(){return this._userPromise||(this._userPromise=this.getUser()),this._userPromise}getUser(){return this.request("/user")}async hasWriteAccess(){try{const e=await this.request(this.repoURL);return this.repoOwner=e.owner.login,e.permissions.push}catch(e){throw console.error("Problem fetching repo data from GitHub"),e}}reset(){}requestHeaders(){const e=g({"Content-Type":"application/json; charset=utf-8"},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{});return this.token?(e.Authorization="token "+this.token,Promise.resolve(e)):Promise.resolve(e)}parseJsonResponse(e){return e.json().then(t=>e.ok?t:Promise.reject(t))}urlFor(e,t){const n=[];if(t.params)for(const e in t.params)n.push(`${e}=${encodeURIComponent(t.params[e])}`);return n.length&&(e+="?"+n.join("&")),this.apiRoot+e}parseResponse(e){const t=e.headers.get("Content-Type");if(t&&t.match(/json/))return this.parseJsonResponse(e);return e.text().then(t=>e.ok?t:Promise.reject(t))}handleRequestError(e,t){throw new f.APIError(e.message,t,"GitHub")}buildRequest(e){return e}async request(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e=>this.parseResponse(e);t=g({cache:"no-cache"},t);const r=await this.requestHeaders(t.headers||{}),i=this.urlFor(e,t);let o=500;try{const e=f.unsentRequest.fromFetchArguments(i,g(g({},t),{},{headers:r})),a=await(0,f.requestWithBackoff)(this,e);o=a.status;return await n(a)}catch(e){return this.handleRequestError(e,o)}}nextUrlProcessor(){return e=>e}async requestAllPages(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t=g({cache:"no-cache"},t);const n=await this.requestHeaders(t.headers||{}),r=this.urlFor(e,t),i=await(0,f.getAllResponses)(r,g(g({},t),{},{headers:n}),"next",this.nextUrlProcessor()),o=await Promise.all(i.map(e=>this.parseResponse(e)));return[].concat(...o)}generateContentKey(e,t){const n=(0,f.generateContentKey)(e,t);return this.useOpenAuthoring?`${this.repo}/${n}`:n}parseContentKey(e){return this.useOpenAuthoring?(0,f.parseContentKey)(e.slice(this.repo.length+1)):(0,f.parseContentKey)(e)}checkMetadataRef(){return this.request(this.repoURL+"/git/refs/meta/_netlify_cms").then(e=>e.object).catch(()=>this.uploadBlob({raw:"# Netlify CMS\n\nThis tree is used by the Netlify CMS to store metadata information for specific files and branches."}).then(e=>this.request(this.repoURL+"/git/trees",{method:"POST",body:JSON.stringify({tree:[{path:"README.md",mode:"100644",type:"blob",sha:e.sha}]})})).then(e=>this.commit("First Commit",e)).then(e=>this.createRef("meta","_netlify_cms",e.sha)).then(e=>e.object))}async storeMetadata(e,t){return this._metadataSemaphore||(this._metadataSemaphore=(0,c.default)(1)),new Promise((n,r)=>{var i;return null===(i=this._metadataSemaphore)||void 0===i?void 0:i.take(async()=>{try{var i;const r=await this.checkMetadataRef(),o={path:e+".json",raw:JSON.stringify(t)};await this.uploadBlob(o);const a=await this.updateTree(r.sha,[o]),{sha:s}=await this.commit(`Updating “${e}” metadata`,a);await this.patchRef("meta","_netlify_cms",s),await f.localForage.setItem("gh.meta."+e,{expires:Date.now()+3e5,data:t}),null===(i=this._metadataSemaphore)||void 0===i||i.leave(),n()}catch(e){r(e)}})})}deleteMetadata(e){return this._metadataSemaphore||(this._metadataSemaphore=(0,c.default)(1)),new Promise(t=>{var n;return null===(n=this._metadataSemaphore)||void 0===n?void 0:n.take(async()=>{try{var n;const r=await this.checkMetadataRef(),i={path:e+".json",sha:null},o=await this.updateTree(r.sha,[i]),{sha:a}=await this.commit(`Deleting “${e}” metadata`,o);await this.patchRef("meta","_netlify_cms",a),null===(n=this._metadataSemaphore)||void 0===n||n.leave(),t()}catch(e){var r;null===(r=this._metadataSemaphore)||void 0===r||r.leave(),t()}})})}async retrieveMetadataOld(e){console.log("%c Checking for MetaData files","line-height: 30px;text-align: center;font-weight: bold");const t={params:{ref:"refs/meta/_netlify_cms"},headers:{Accept:"application/vnd.github.v3.raw"}};function n(t){throw"Not Found"===t.message&&console.log("%c %s does not have metadata","line-height: 30px;text-align: center;font-weight: bold",e),t}if(!this.useOpenAuthoring){return await this.request(`${this.repoURL}/contents/${e}.json`,t).then(e=>JSON.parse(e)).catch(n)}const[r,i]=e.split("/");return this.request(`/repos/${r}/${i}/contents/${e}.json`,t).then(e=>JSON.parse(e)).catch(n)}async getPullRequests(e,t,n){return(await this.requestAllPages(this.originRepoURL+"/pulls",{params:g(g({},e?{head:await this.getHeadReference(e)}:{}),{},{base:this.branch,state:t,per_page:100})})).filter(e=>e.head.ref.startsWith(f.CMS_BRANCH_PREFIX+"/")&&n(e))}async getOpenAuthoringPullRequest(e,t){const n=await this.getBranch(e).catch(()=>{throw new f.EditorialWorkflowError("content is not under editorial workflow",!0)}),r=t.filter(e=>e.head.sha===n.commit.sha)[0];if(r){r.labels=r.labels.filter(e=>!(0,f.isCMSLabel)(e.name,this.cmsLabelPrefix));const e=r.state===b.Closed?{name:(0,f.statusToLabel)(this.initialWorkflowStatus,this.cmsLabelPrefix)}:{name:(0,f.statusToLabel)("pending_review",this.cmsLabelPrefix)};return r.labels.push(e),r}try{return{head:{sha:n.commit.sha},number:-1,labels:[{name:(0,f.statusToLabel)(this.initialWorkflowStatus,this.cmsLabelPrefix)}],state:b.Open}}catch(e){throw new f.EditorialWorkflowError("content is not under editorial workflow",!0)}}async getBranchPullRequest(e){if(this.useOpenAuthoring){const t=await this.getPullRequests(e,b.All,()=>!0);return this.getOpenAuthoringPullRequest(e,t)}{const t=await this.getPullRequests(e,b.Open,e=>_(e,this.cmsLabelPrefix));if(t.length<=0)throw new f.EditorialWorkflowError("content is not under editorial workflow",!0);return t[0]}}async getPullRequestCommits(e){if(-1===e)return[];try{return await this.request(`${this.originRepoURL}/pulls/${e}/commits`)}catch(e){return console.log(e),[]}}async getPullRequestAuthor(e){var t;if(null!==(t=e.user)&&void 0!==t&&t.login)try{const t=await this.request("/users/"+e.user.login);return t.name||t.login}catch{return}}async retrieveUnpublishedEntryData(e){const{collection:t,slug:n}=this.parseContentKey(e),r=(0,f.branchFromContentKey)(e),i=await this.getBranchPullRequest(r),[{files:o},a]=await Promise.all([this.getDifferences(this.branch,i.head.sha),this.getPullRequestAuthor(i)]),s=await Promise.all(o.map(e=>this.diffFromFile(e))),l=i.labels.find(e=>(0,f.isCMSLabel)(e.name,this.cmsLabelPrefix)),u=(0,f.labelToStatus)(l.name,this.cmsLabelPrefix),c=i.updated_at;return{collection:t,slug:n,status:u,diffs:s.map(e=>({path:e.path,newFile:e.newFile,id:e.sha})),updatedAt:c,pullRequestAuthor:a}}async readFile(e,t){let{branch:n=this.branch,repoURL:r=this.repoURL,parseText:i=!0}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};t||(t=await this.getFileSha(e,{repoURL:r,branch:n}));return await this.fetchBlobContent({sha:t,repoURL:r,parseText:i})}async readFileMetadata(e,t){return await(0,f.readFileMetadata)(t,async()=>{try{const t=await this.request(this.originRepoURL+"/commits",{params:{path:e,sha:this.branch}}),{commit:n}=t[0];return{author:n.author.name||n.author.email,updatedOn:n.author.date}}catch(e){return{author:"",updatedOn:""}}},f.localForage)}async fetchBlobContent(e){let{sha:t,repoURL:n,parseText:r}=e;const i=await this.request(`${n}/git/blobs/${t}`,{cache:"force-cache"});if(r){return u.Base64.decode(i.content)}{const e=u.Base64.atob(i.content),t=new Uint8Array(e.length);for(let n=0;n1&&void 0!==arguments[1]?arguments[1]:{};const o=(0,r.default)(e,"/");try{return(await this.request(`${t}/git/trees/${n}:${o}`,{params:i>1?{recursive:1}:{}})).tree.filter(e=>"blob"===e.type&&e.path.split("/").length<=i).map(e=>({type:e.type,id:e.sha,name:(0,f.basename)(e.path),path:`${o}/${e.path}`,size:e.size}))}catch(e){if(e&&404===e.status)return console.log("This 404 was expected and handled appropriately."),[];throw e}}async migrateToVersion1(e,t){const n=e.head.ref.slice("cms/".length),r=`${t.collection}/${n}`,i="cms/"+r;await this.getBranch(i).catch(()=>{})||await this.createBranch(i,e.head.sha);const o=(await this.getPullRequests(i,b.All,()=>!0))[0]||await this.createPR(e.title,i),a=g(g({},t),{},{pr:{number:o.number,head:o.head.sha},branch:i,version:"1"});return await this.storeMetadata(r,a),await this.closePR(e.number),await this.deleteBranch(e.head.ref),await this.deleteMetadata(n),{metadata:a,pullRequest:o}}async migrateToPullRequestLabels(e,t){await this.setPullRequestStatus(e,t.status);const n=e.head.ref.slice("cms/".length);await this.deleteMetadata(n)}async migratePullRequest(e,t){const{number:n}=e;console.log(`Migrating Pull Request '${n}' (${t})`);const r=(0,f.contentKeyFromBranch)(e.head.ref);let i=await this.retrieveMetadataOld(r).catch(()=>{});if(!i)return void console.log(`Skipped migrating Pull Request '${n}' (${t})`);let o=n;if(!i.version){console.log(`Migrating Pull Request '${n}' to version 1`);try{({metadata:i,pullRequest:e}=await this.migrateToVersion1(e,i))}catch(e){return console.log(`Failed to migrate Pull Request '${n}' to version 1. See error below.`),void console.error(e)}o=e.number,console.log(`Done migrating Pull Request '${n}' to version 1. New pull request '${o}' created.`)}"1"===i.version&&(console.log(`Migrating Pull Request '${o}' to labels`),await this.migrateToPullRequestLabels(e,i),console.log(`Done migrating Pull Request '${o}' to labels`)),console.log(`Done migrating Pull Request '${n===o?o:`${n} => ${o}`}'`)}async getOpenAuthoringBranches(){return await this.requestAllPages(`${this.repoURL}/git/refs/heads/cms/${this.repo}`).catch(()=>[])}async listUnpublishedBranches(){let e;if(console.log("%c Checking for Unpublished entries","line-height: 30px;text-align: center;font-weight: bold"),this.useOpenAuthoring){e=(await this.getOpenAuthoringBranches()).map(e=>e.ref.slice("refs/heads/".length));const t=await Promise.all(e.map(e=>this.filterOpenAuthoringBranches(e)));e=t.filter(e=>e.filter).map(e=>e.branch)}else{const t=await this.getPullRequests(void 0,b.Open,e=>!e.head.repo.fork&&function(e,t){return e.labels.every(e=>!(0,f.isCMSLabel)(e.name,t))}(e,this.cmsLabelPrefix));let n=0;for(const e of t)x||(x=!0,alert(d.oneLine` - Netlify CMS is adding labels to ${t.length} of your Editorial Workflow - entries. The "Workflow" tab will be unavailable during this migration. You may use other - areas of the CMS during this time. Note that closing the CMS will pause the migration. - `)),n+=1,await this.migratePullRequest(e,`${n} of ${t.length}`);e=(await this.getPullRequests(void 0,b.Open,e=>_(e,this.cmsLabelPrefix))).map(e=>e.head.ref)}return e}async getStatuses(e,t){const n=this.generateContentKey(e,t),r=(0,f.branchFromContentKey)(n),i=(await this.getBranchPullRequest(r)).head.sha;return(await this.request(`${this.originRepoURL}/commits/${i}/status`)).statuses.map(e=>({context:e.context,target_url:e.target_url,state:e.state===y.Success?f.PreviewState.Success:f.PreviewState.Other}))}async persistFiles(e,t,n){const r=t.concat(e),o=r.map(e=>this.uploadBlob(e));if(await Promise.all(o),n.useWorkflow){const o=t.map(e=>{let{sha:t,path:n}=e;return{path:(0,i.default)(n,"/"),sha:t}}),a=e[0].slug;return this.editorialWorkflowGit(r,a,o,n)}return this.getDefaultBranch().then(e=>this.updateTree(e.commit.sha,r)).then(e=>this.commit(n.commitMessage,e)).then(e=>this.patchBranch(this.branch,e.sha))}async getFileSha(e){let{repoURL:t=this.repoURL,branch:n=this.branch}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=e.split("/"),i=(0,s.default)(r),o=(0,l.default)(r).join("/"),a=`${t}/git/trees/${n}:${encodeURIComponent(o)}`,u=(await this.request(a)).tree.find(e=>e.path===i);if(u)return u.sha;throw new f.APIError("Not Found",404,"GitHub")}async deleteFiles(e,t){if(this.useOpenAuthoring)return Promise.reject("Cannot delete published entries as an Open Authoring user!");const n=await this.getDefaultBranch(),r=e.map(e=>({path:e,sha:null})),i=await this.updateTree(n.commit.sha,r),o=await this.commit(t,i);await this.patchBranch(this.branch,o.sha)}async createBranchAndPullRequest(e,t,n){return await this.createBranch(e,t),this.createPR(n,e)}async updatePullRequestLabels(e,t){await this.request(`${this.repoURL}/issues/${e}/labels`,{method:"PUT",body:JSON.stringify({labels:t})})}async diffFromFile(e){return{path:e.filename,newFile:"added"===e.status,sha:e.sha,binary:"renamed"!==e.status&&!e.patch||e.filename.endsWith(".svg")}}async editorialWorkflowGit(e,t,n,r){const i=this.generateContentKey(r.collectionName,t),o=(0,f.branchFromContentKey)(i);if(r.unpublished||!1){const{files:t}=await this.getDifferences(this.branch,await this.getHeadReference(o)),i=await Promise.all(t.map(e=>this.diffFromFile(e))),a=[];for(const e of i.filter(e=>e.binary))n.some(t=>t.path===e.path)||a.push({path:e.path,sha:null});const s=await this.rebaseBranch(o),l=a.concat(e),u=await this.updateTree(s.sha,l,o),c=await this.commit(r.commitMessage,u);return this.patchBranch(o,c.sha,{force:!0})}{const t=await this.getDefaultBranch(),n=await this.updateTree(t.commit.sha,e),i=await this.commit(r.commitMessage,n);if(this.useOpenAuthoring)await this.createBranch(o,i.sha);else{const e=await this.createBranchAndPullRequest(o,i.sha,r.commitMessage);await this.setPullRequestStatus(e,r.status||this.initialWorkflowStatus)}}}async getDifferences(e,t){const n=this.useOpenAuthoring?10:1;for(let r=1;r<=n;r++)try{return await this.request(`${this.originRepoURL}/compare/${e}...${t}`)}catch(e){if(r===n)throw console.warn(`Reached maximum number of attempts '${n}' for getDifferences`),e;await new Promise(e=>setTimeout(e,500*r))}throw new f.APIError("Not Found",404,"GitHub")}async rebaseSingleCommit(e,t){const n=w((await this.getDifferences(t.parents[0].sha,t.sha)).files);if(n.length>0){const r=await this.updateTree(e.sha,n),{message:i,author:o,committer:a}=t.commit;return await this.createCommit(i,r.sha,[e.sha],o,a)}return t}async rebaseCommits(e,t){if(0===t.length||t[0].parents[0].sha===e.sha){return(0,s.default)(t)}return t.reduce((e,t)=>e.then(e=>{const n=e,r=t;return this.rebaseSingleCommit(n,r)}),Promise.resolve(e))}async rebaseBranch(e){try{const{base_commit:t,commits:n}=await this.getDifferences(this.branch,await this.getHeadReference(e));return await this.rebaseCommits(t,n)}catch(e){throw console.error(e),e}}async setPullRequestStatus(e,t){const n=[...e.labels.filter(e=>!(0,f.isCMSLabel)(e.name,this.cmsLabelPrefix)).map(e=>e.name),(0,f.statusToLabel)(t,this.cmsLabelPrefix)];await this.updatePullRequestLabels(e.number,n)}async updateUnpublishedEntryStatus(e,t,n){const r=this.generateContentKey(e,t),i=(0,f.branchFromContentKey)(r),o=await this.getBranchPullRequest(i);if(this.useOpenAuthoring){if("pending_publish"===status)throw new Error('Open Authoring entries may not be set to the status "pending_publish".');if(-1!==o.number){const{state:e}=o;e===b.Open&&"draft"===n&&await this.closePR(o.number),e===b.Closed&&"pending_review"===n&&await this.openPR(o.number)}else if("pending_review"===n){var a,s;const e=(0,f.branchFromContentKey)(r),t=(null===(a=(await this.getDifferences(this.branch,await this.getHeadReference(e))).commits[0])||void 0===a||null===(s=a.commit)||void 0===s?void 0:s.message)||k.DEFAULT_COMMIT_MESSAGE;await this.createPR(t,e)}}else await this.setPullRequestStatus(o,n)}async deleteUnpublishedEntry(e,t){const n=this.generateContentKey(e,t),r=(0,f.branchFromContentKey)(n),i=await this.getBranchPullRequest(r);-1!==i.number&&await this.closePR(i.number),await this.deleteBranch(r)}async publishUnpublishedEntry(e,t){const n=this.generateContentKey(e,t),r=(0,f.branchFromContentKey)(n),i=await this.getBranchPullRequest(r);await this.mergePR(i),await this.deleteBranch(r)}async createRef(e,t,n){return await this.request(this.repoURL+"/git/refs",{method:"POST",body:JSON.stringify({ref:`refs/${e}/${t}`,sha:n})})}async patchRef(e,t,n){const r=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).force||!1;return await this.request(`${this.repoURL}/git/refs/${e}/${encodeURIComponent(t)}`,{method:"PATCH",body:JSON.stringify({sha:n,force:r})})}deleteRef(e,t){return this.request(`${this.repoURL}/git/refs/${e}/${encodeURIComponent(t)}`,{method:"DELETE"})}async getBranch(e){return await this.request(`${this.repoURL}/branches/${encodeURIComponent(e)}`)}async getDefaultBranch(){return await this.request(`${this.originRepoURL}/branches/${encodeURIComponent(this.branch)}`)}async backupBranch(e){try{const t=await this.getBranch(e);await this.createBranch(t.name.replace(new RegExp(f.CMS_BRANCH_PREFIX+"/"),`${f.CMS_BRANCH_PREFIX}_${Date.now()}/`),t.commit.sha)}catch(e){console.warn(e)}}async createBranch(e,t){try{return await this.createRef("heads",e,t)}catch(n){const r=String(n.message||"");if("Reference update failed"===r)await(0,f.throwOnConflictingBranches)(e,e=>this.getBranch(e),"GitHub");else if("Reference already exists"===r&&e.startsWith(f.CMS_BRANCH_PREFIX+"/"))try{await this.backupBranch(e);return await this.patchBranch(e,t,{force:!0})}catch(e){console.log(e)}throw n}}assertCmsBranch(e){return e.startsWith(f.CMS_BRANCH_PREFIX+"/")}patchBranch(e,t){const n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).force||!1;if(n&&!this.assertCmsBranch(e))throw Error("Only CMS branches can be force updated, cannot force update "+e);return this.patchRef("heads",e,t,{force:n})}deleteBranch(e){return this.deleteRef("heads",e).catch(e=>"Reference does not exist"===e.message?Promise.resolve():(console.error(e),Promise.reject(e)))}async getHeadReference(e){return`${this.repoOwner}:${e}`}async createPR(e,t){return await this.request(this.originRepoURL+"/pulls",{method:"POST",body:JSON.stringify({title:e,body:f.DEFAULT_PR_BODY,head:await this.getHeadReference(t),base:this.branch})})}async openPR(e){console.log("%c Re-opening PR","line-height: 30px;text-align: center;font-weight: bold");return await this.request(`${this.originRepoURL}/pulls/${e}`,{method:"PATCH",body:JSON.stringify({state:b.Open})})}async closePR(e){console.log("%c Deleting PR","line-height: 30px;text-align: center;font-weight: bold");return await this.request(`${this.originRepoURL}/pulls/${e}`,{method:"PATCH",body:JSON.stringify({state:b.Closed})})}async mergePR(e){console.log("%c Merging PR","line-height: 30px;text-align: center;font-weight: bold");try{return await this.request(`${this.originRepoURL}/pulls/${e.number}/merge`,{method:"PUT",body:JSON.stringify({commit_message:f.MERGE_COMMIT_MESSAGE,sha:e.head.sha,merge_method:this.mergeMethod})})}catch(t){if(t instanceof f.APIError&&405===t.status)return this.forceMergePR(e);throw t}}async forceMergePR(e){const t=w((await this.getDifferences(e.base.sha,e.head.sha)).files);let n="Automatically generated. Merged on Netlify CMS\n\nForce merge of:";return t.forEach(e=>{n+=`\n* "${e.path}"`}),console.log("%c Automatic merge not possible - Forcing merge.","line-height: 30px;text-align: center;font-weight: bold"),this.getDefaultBranch().then(e=>this.updateTree(e.commit.sha,t)).then(e=>this.commit(n,e)).then(e=>this.patchBranch(this.branch,e.sha))}toBase64(e){return Promise.resolve(u.Base64.encode(e))}async uploadBlob(e){const t=await(0,o.default)(e,"toBase64",(0,a.default)(this.toBase64,e.raw)),n=await this.request(this.repoURL+"/git/blobs",{method:"POST",body:JSON.stringify({content:t,encoding:"base64"})});return e.sha=n.sha,e}async updateTree(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.branch;const r=[],o=t.reduce((e,t)=>{const n={path:(0,i.default)(t.path,"/"),mode:"100644",type:"blob",sha:t.sha};return t.newPath?r.push({from:t.path,to:t.newPath,sha:t.sha}):e.push(n),e},[]);for(const{from:e,to:t,sha:i}of r){const r=(0,p.dirname)(e),a=(0,p.dirname)(t),s=await this.listFiles(r,{branch:n,depth:100});for(const t of s)o.push({path:t.path,mode:"100644",type:"blob",sha:null}),o.push({path:t.path.replace(r,a),mode:"100644",type:"blob",sha:t.path===e?i:t.id})}return g(g({},await this.createTree(e,o)),{},{parentSha:e})}async createTree(e,t){return await this.request(this.repoURL+"/git/trees",{method:"POST",body:JSON.stringify({base_tree:e,tree:t})})}commit(e,t){const n=t.parentSha?[t.parentSha]:[];return this.createCommit(e,t.sha,n)}async createCommit(e,t,n,r,i){return await this.request(this.repoURL+"/git/commits",{method:"POST",body:JSON.stringify({message:e,tree:t,parents:n,author:r,committer:i})})}async getUnpublishedEntrySha(e,t){const n=this.generateContentKey(e,t),r=(0,f.branchFromContentKey)(n);return(await this.getBranchPullRequest(r)).head.sha}}t.default=k,v(k,"DEFAULT_COMMIT_MESSAGE","Automatically generated by Netlify CMS")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"API",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"AuthenticationPage",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"GitLabBackend",{enumerable:!0,get:function(){return r.default}}),t.NetlifyCmsBackendGitlab=void 0;var r=a(n(1404)),i=a(n(672)),o=a(n(671));function a(e){return e&&e.__esModule?e:{default:e}}const s={GitLabBackend:r.default,API:i.default,AuthenticationPage:o.default};t.NetlifyCmsBackendGitlab=s},function(e,t,n){var r=n(684)(n(1453));e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.getEditorComponents=function(){return p()},t.getEditorControl=function(){return f};var r=c(n(0)),i=c(n(2)),o=c(n(33)),a=n(4),s=c(n(1464)),l=c(n(1703)),u=n(9);function c(e){return e&&e.__esModule?e:{default:e}}function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}let f,p=()=>(0,a.Map)();class h extends r.default.Component{constructor(e){var t;super(e),d(this,"handleMode",e=>{this.setState({mode:e,pendingFocus:!0}),localStorage.setItem("cms.md-mode",e)}),d(this,"processRef",e=>this.ref=e),d(this,"setFocusReceived",()=>{this.setState({pendingFocus:!1})}),d(this,"getAllowedModes",()=>this.props.field.get("modes",(0,a.List)(["rich_text","raw"])).toArray()),f=e.editorControl;const n=null!==(t=localStorage.getItem("cms.md-mode"))&&void 0!==t?t:"rich_text";p=e.getEditorComponents,this.state={mode:-1!==this.getAllowedModes().indexOf(n)?n:this.getAllowedModes()[0],pendingFocus:!1}}render(){const{onChange:e,onAddAsset:t,getAsset:n,value:r,classNameWrapper:i,field:o,getEditorComponents:a,getRemarkPlugins:c,resolveWidget:d,t:f,isDisabled:p}=this.props,{mode:h,pendingFocus:m}=this.state,g=this.getAllowedModes().length>1,v=(0,u.jsx)("div",{className:"cms-editor-visual",ref:this.processRef},(0,u.jsx)(l.default,{onChange:e,onAddAsset:t,isShowModeToggle:g,onMode:this.handleMode,getAsset:n,className:i,value:r,field:o,getEditorComponents:a,getRemarkPlugins:c,resolveWidget:d,pendingFocus:m&&this.setFocusReceived,t:f,isDisabled:p})),y=(0,u.jsx)("div",{className:"cms-editor-raw",ref:this.processRef},(0,u.jsx)(s.default,{onChange:e,onAddAsset:t,isShowModeToggle:g,onMode:this.handleMode,getAsset:n,className:i,value:r,field:o,pendingFocus:m&&this.setFocusReceived,t:f}));return"rich_text"===h?v:y}}t.default=h,d(h,"propTypes",{onChange:i.default.func.isRequired,onAddAsset:i.default.func.isRequired,getAsset:i.default.func.isRequired,classNameWrapper:i.default.string.isRequired,editorControl:i.default.elementType.isRequired,value:i.default.string,field:o.default.map.isRequired,getEditorComponents:i.default.func,t:i.default.func.isRequired}),d(h,"defaultProps",{value:""})},function(e){e.exports=JSON.parse('{"AElig":"Æ","AMP":"&","Aacute":"Á","Acirc":"Â","Agrave":"À","Aring":"Å","Atilde":"Ã","Auml":"Ä","COPY":"©","Ccedil":"Ç","ETH":"Ð","Eacute":"É","Ecirc":"Ê","Egrave":"È","Euml":"Ë","GT":">","Iacute":"Í","Icirc":"Î","Igrave":"Ì","Iuml":"Ï","LT":"<","Ntilde":"Ñ","Oacute":"Ó","Ocirc":"Ô","Ograve":"Ò","Oslash":"Ø","Otilde":"Õ","Ouml":"Ö","QUOT":"\\"","REG":"®","THORN":"Þ","Uacute":"Ú","Ucirc":"Û","Ugrave":"Ù","Uuml":"Ü","Yacute":"Ý","aacute":"á","acirc":"â","acute":"´","aelig":"æ","agrave":"à","amp":"&","aring":"å","atilde":"ã","auml":"ä","brvbar":"¦","ccedil":"ç","cedil":"¸","cent":"¢","copy":"©","curren":"¤","deg":"°","divide":"÷","eacute":"é","ecirc":"ê","egrave":"è","eth":"ð","euml":"ë","frac12":"½","frac14":"¼","frac34":"¾","gt":">","iacute":"í","icirc":"î","iexcl":"¡","igrave":"ì","iquest":"¿","iuml":"ï","laquo":"«","lt":"<","macr":"¯","micro":"µ","middot":"·","nbsp":" ","not":"¬","ntilde":"ñ","oacute":"ó","ocirc":"ô","ograve":"ò","ordf":"ª","ordm":"º","oslash":"ø","otilde":"õ","ouml":"ö","para":"¶","plusmn":"±","pound":"£","quot":"\\"","raquo":"»","reg":"®","sect":"§","shy":"­","sup1":"¹","sup2":"²","sup3":"³","szlig":"ß","thorn":"þ","times":"×","uacute":"ú","ucirc":"û","ugrave":"ù","uml":"¨","uuml":"ü","yacute":"ý","yen":"¥","yuml":"ÿ"}')},function(e,t,n){"use strict";e.exports=function(e,t,n,r){var i,o,a=e.length,s=-1;for(;++s";return e};var i=/\s/},function(e,t,n){"use strict";e.exports=function(e){var t=-1===e.indexOf('"')?'"':"'";return t+e+t}},function(e,t,n){"use strict";var r=n(128);function i(e,t,n,i,o){var a=null!=i,s=null!=n,l=r(t);if(s&&("number"!=typeof n||n<0||n===1/0))throw new Error("Expected positive finite index for child node");if(a&&(!i.type||!i.children))throw new Error("Expected parent node");if(!e||!e.type||"string"!=typeof e.type)return!1;if(a!==s)throw new Error("Expected both parent and index");return l.call(o,e,n,i)}e.exports=i,i.convert=r},function(e,t,n){"use strict";e.exports=function(e){var t;if(e&&"object"==typeof e&&"text"===e.type)t=e.value||"";else{if("string"!=typeof e)return!1;t=e}return""===t.replace(r,"")};var r=/[ \t\n\f\r]/g},function(e,t){e.exports=String.fromCharCode},function(e,t,n){"use strict";const r=[65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111];t.REPLACEMENT_CHARACTER="�",t.CODE_POINTS={EOF:-1,NULL:0,TABULATION:9,CARRIAGE_RETURN:13,LINE_FEED:10,FORM_FEED:12,SPACE:32,EXCLAMATION_MARK:33,QUOTATION_MARK:34,NUMBER_SIGN:35,AMPERSAND:38,APOSTROPHE:39,HYPHEN_MINUS:45,SOLIDUS:47,DIGIT_0:48,DIGIT_9:57,SEMICOLON:59,LESS_THAN_SIGN:60,EQUALS_SIGN:61,GREATER_THAN_SIGN:62,QUESTION_MARK:63,LATIN_CAPITAL_A:65,LATIN_CAPITAL_F:70,LATIN_CAPITAL_X:88,LATIN_CAPITAL_Z:90,RIGHT_SQUARE_BRACKET:93,GRAVE_ACCENT:96,LATIN_SMALL_A:97,LATIN_SMALL_F:102,LATIN_SMALL_X:120,LATIN_SMALL_Z:122,REPLACEMENT_CHARACTER:65533},t.CODE_POINT_SEQUENCES={DASH_DASH_STRING:[45,45],DOCTYPE_STRING:[68,79,67,84,89,80,69],CDATA_START_STRING:[91,67,68,65,84,65,91],SCRIPT_STRING:[115,99,114,105,112,116],PUBLIC_STRING:[80,85,66,76,73,67],SYSTEM_STRING:[83,89,83,84,69,77]},t.isSurrogate=function(e){return e>=55296&&e<=57343},t.isSurrogatePair=function(e){return e>=56320&&e<=57343},t.getSurrogatePairCodePoint=function(e,t){return 1024*(e-55296)+9216+t},t.isControlCodePoint=function(e){return 32!==e&&10!==e&&13!==e&&9!==e&&12!==e&&e>=1&&e<=31||e>=127&&e<=159},t.isUndefinedCodePoint=function(e){return e>=64976&&e<=65007||r.indexOf(e)>-1}},function(e,t,n){"use strict";e.exports={controlCharacterInInputStream:"control-character-in-input-stream",noncharacterInInputStream:"noncharacter-in-input-stream",surrogateInInputStream:"surrogate-in-input-stream",nonVoidHtmlElementStartTagWithTrailingSolidus:"non-void-html-element-start-tag-with-trailing-solidus",endTagWithAttributes:"end-tag-with-attributes",endTagWithTrailingSolidus:"end-tag-with-trailing-solidus",unexpectedSolidusInTag:"unexpected-solidus-in-tag",unexpectedNullCharacter:"unexpected-null-character",unexpectedQuestionMarkInsteadOfTagName:"unexpected-question-mark-instead-of-tag-name",invalidFirstCharacterOfTagName:"invalid-first-character-of-tag-name",unexpectedEqualsSignBeforeAttributeName:"unexpected-equals-sign-before-attribute-name",missingEndTagName:"missing-end-tag-name",unexpectedCharacterInAttributeName:"unexpected-character-in-attribute-name",unknownNamedCharacterReference:"unknown-named-character-reference",missingSemicolonAfterCharacterReference:"missing-semicolon-after-character-reference",unexpectedCharacterAfterDoctypeSystemIdentifier:"unexpected-character-after-doctype-system-identifier",unexpectedCharacterInUnquotedAttributeValue:"unexpected-character-in-unquoted-attribute-value",eofBeforeTagName:"eof-before-tag-name",eofInTag:"eof-in-tag",missingAttributeValue:"missing-attribute-value",missingWhitespaceBetweenAttributes:"missing-whitespace-between-attributes",missingWhitespaceAfterDoctypePublicKeyword:"missing-whitespace-after-doctype-public-keyword",missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers:"missing-whitespace-between-doctype-public-and-system-identifiers",missingWhitespaceAfterDoctypeSystemKeyword:"missing-whitespace-after-doctype-system-keyword",missingQuoteBeforeDoctypePublicIdentifier:"missing-quote-before-doctype-public-identifier",missingQuoteBeforeDoctypeSystemIdentifier:"missing-quote-before-doctype-system-identifier",missingDoctypePublicIdentifier:"missing-doctype-public-identifier",missingDoctypeSystemIdentifier:"missing-doctype-system-identifier",abruptDoctypePublicIdentifier:"abrupt-doctype-public-identifier",abruptDoctypeSystemIdentifier:"abrupt-doctype-system-identifier",cdataInHtmlContent:"cdata-in-html-content",incorrectlyOpenedComment:"incorrectly-opened-comment",eofInScriptHtmlCommentLikeText:"eof-in-script-html-comment-like-text",eofInDoctype:"eof-in-doctype",nestedComment:"nested-comment",abruptClosingOfEmptyComment:"abrupt-closing-of-empty-comment",eofInComment:"eof-in-comment",incorrectlyClosedComment:"incorrectly-closed-comment",eofInCdata:"eof-in-cdata",absenceOfDigitsInNumericCharacterReference:"absence-of-digits-in-numeric-character-reference",nullCharacterReference:"null-character-reference",surrogateCharacterReference:"surrogate-character-reference",characterReferenceOutsideUnicodeRange:"character-reference-outside-unicode-range",controlCharacterReference:"control-character-reference",noncharacterCharacterReference:"noncharacter-character-reference",missingWhitespaceBeforeDoctypeName:"missing-whitespace-before-doctype-name",missingDoctypeName:"missing-doctype-name",invalidCharacterSequenceAfterDoctypeName:"invalid-character-sequence-after-doctype-name",duplicateAttribute:"duplicate-attribute",nonConformingDoctype:"non-conforming-doctype",missingDoctype:"missing-doctype",misplacedDoctype:"misplaced-doctype",endTagWithoutMatchingOpenElement:"end-tag-without-matching-open-element",closingOfElementWithOpenChildElements:"closing-of-element-with-open-child-elements",disallowedContentInNoscriptInHead:"disallowed-content-in-noscript-in-head",openElementsLeftAfterEof:"open-elements-left-after-eof",abandonedHeadElementChild:"abandoned-head-element-child",misplacedStartTagForHeadElement:"misplaced-start-tag-for-head-element",nestedNoscriptInHead:"nested-noscript-in-head",eofInElementThatCanContainOnlyText:"eof-in-element-that-can-contain-only-text"}},function(e,t,n){"use strict";const r=n(153);e.exports=class extends r{constructor(e,t){super(e),this.posTracker=null,this.onParseError=t.onParseError}_setErrorLocation(e){e.startLine=e.endLine=this.posTracker.line,e.startCol=e.endCol=this.posTracker.col,e.startOffset=e.endOffset=this.posTracker.offset}_reportError(e){const t={code:e,startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1};this._setErrorLocation(t),this.onParseError(t)}_getOverriddenMethods(e){return{_err(t){e._reportError(t)}}}}},function(e,t,n){"use strict";e.exports=s;var r=n(1645),i=r.CONTINUE,o=r.SKIP,a=r.EXIT;function s(e,t,n,i){"function"==typeof t&&"function"!=typeof n&&(i=n,n=t,t=null),r(e,t,(function(e,t){var r=t[t.length-1],i=r?r.children.indexOf(e):null;return n(e,i,r)}),i)}s.CONTINUE=i,s.SKIP=o,s.EXIT=a},function(e,t,n){"use strict";e.exports=function(e,t){return i(r(e,t))};var r=n(84),i=n(466)},function(e,t,n){"use strict";e.exports=a,a.needed=l;var r=n(434),i=n(1648),o=n(731);function a(e){return s(e,(function(e){var t=e[0];if(1===e.length&&"text"===t.type&&(" "===t.value||"\n"===t.value))return[];return{type:"paragraph",children:e}}))}function s(e,t,n){for(var r,o,a=n||c,s=function(e){var t,n=[],r=-1;for(;++r0&&void 0!==arguments[0]?arguments[0]:{};return l({name:"object",controlComponent:r.default,previewComponent:i.default,schema:o.default},e)},controlComponent:r.default,previewComponent:i.default};t.NetlifyCmsWidgetObject=c;var d=c;t.default=d},function(e,t,n){!function(e){"use strict";function t(e,t,n,r,i,o){this.indented=e,this.column=t,this.type=n,this.info=r,this.align=i,this.prev=o}function n(e,n,r,i){var o=e.indented;return e.context&&"statement"==e.context.type&&"statement"!=r&&(o=e.context.indented),e.context=new t(o,n,r,i,null,e.context)}function r(e){var t=e.context.type;return")"!=t&&"]"!=t&&"}"!=t||(e.indented=e.context.indented),e.context=e.context.prev}function i(e,t,n){return"variable"==t.prevToken||"type"==t.prevToken||!!/\S(?:[^- ]>|[*\]])\s*$|\*$/.test(e.string.slice(0,n))||!(!t.typeAtEndOfLine||e.column()!=e.indentation())||void 0}function o(e){for(;;){if(!e||"top"==e.type)return!0;if("}"==e.type&&"namespace"!=e.prev.info)return!1;e=e.prev}}function a(e){for(var t={},n=e.split(" "),r=0;r!?|\/]/,A=l.isIdentifierChar||/[\w\$_\xa1-\uffff]/,P=l.isReservedIdentifier||!1;function R(e,t){var n,r=e.next();if(_[r]){var i=_[r](e,t);if(!1!==i)return i}if('"'==r||"'"==r)return t.tokenize=(n=r,function(e,t){for(var r,i=!1,o=!1;null!=(r=e.next());){if(r==n&&!i){o=!0;break}i=!i&&"\\"==r}return(o||!i&&!w)&&(t.tokenize=null),"string"}),t.tokenize(e,t);if(O.test(r)){if(e.backUp(1),e.match(C))return"number";e.next()}if(S.test(r))return u=r,null;if("/"==r){if(e.eat("*"))return t.tokenize=j,j(e,t);if(e.eat("/"))return e.skipToEnd(),"comment"}if(T.test(r)){for(;!e.match(/^\/[\/*]/,!1)&&e.eat(T););return"operator"}if(e.eatWhile(A),E)for(;e.match(E);)e.eatWhile(A);var o=e.current();return s(h,o)?(s(v,o)&&(u="newstatement"),s(y,o)&&(c=!0),"keyword"):s(m,o)?"type":s(g,o)||P&&P(o)?(s(v,o)&&(u="newstatement"),"builtin"):s(b,o)?"atom":"variable"}function j(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=null;break}r="*"==n}return"comment"}function I(e,t){l.typeFirstDefinitions&&e.eol()&&o(t.context)&&(t.typeAtEndOfLine=i(e,t,e.pos))}return{startState:function(e){return{tokenize:null,context:new t((e||0)-d,0,"top",null,!1),indented:0,startOfLine:!0,prevToken:null}},token:function(e,t){var a=t.context;if(e.sol()&&(null==a.align&&(a.align=!1),t.indented=e.indentation(),t.startOfLine=!0),e.eatSpace())return I(e,t),null;u=c=null;var s=(t.tokenize||R)(e,t);if("comment"==s||"meta"==s)return s;if(null==a.align&&(a.align=!0),";"==u||":"==u||","==u&&e.match(/^\s*(?:\/\/.*)?$/,!1))for(;"statement"==t.context.type;)r(t);else if("{"==u)n(t,e.column(),"}");else if("["==u)n(t,e.column(),"]");else if("("==u)n(t,e.column(),")");else if("}"==u){for(;"statement"==a.type;)a=r(t);for("}"==a.type&&(a=r(t));"statement"==a.type;)a=r(t)}else u==a.type?r(t):x&&(("}"==a.type||"top"==a.type)&&";"!=u||"statement"==a.type&&"newstatement"==u)&&n(t,e.column(),"statement",e.current());if("variable"==s&&("def"==t.prevToken||l.typeFirstDefinitions&&i(e,t,e.start)&&o(t.context)&&e.match(/^\s*\(/,!1))&&(s="def"),_.token){var d=_.token(e,t,s);void 0!==d&&(s=d)}return"def"==s&&!1===l.styleDefs&&(s="variable"),t.startOfLine=!1,t.prevToken=c?"def":s||u,I(e,t),s},indent:function(t,n){if(t.tokenize!=R&&null!=t.tokenize||t.typeAtEndOfLine)return e.Pass;var r=t.context,i=n&&n.charAt(0),o=i==r.type;if("statement"==r.type&&"}"==i&&(r=r.prev),l.dontIndentStatements)for(;"statement"==r.type&&l.dontIndentStatements.test(r.info);)r=r.prev;if(_.indent){var a=_.indent(t,r,n,d);if("number"==typeof a)return a}var s=r.prev&&"switch"==r.prev.info;if(l.allmanIndentation&&/[{(]/.test(i)){for(;"top"!=r.type&&"}"!=r.type;)r=r.prev;return r.indented}return"statement"==r.type?r.indented+("{"==i?0:f):!r.align||p&&")"==r.type?")"!=r.type||o?r.indented+(o?0:d)+(o||!s||/^(?:case|default)\b/.test(n)?0:d):r.indented+f:r.column+(o?0:1)},electricInput:k?/^\s*(?:case .*?:|default:|\{\}?|\})$/:/^\s*[{}]$/,blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:"//",fold:"brace"}}));var l="auto if break case register continue return default do sizeof static else struct switch extern typedef union for goto while enum const volatile inline restrict asm fortran",u="alignas alignof and and_eq audit axiom bitand bitor catch class compl concept constexpr const_cast decltype delete dynamic_cast explicit export final friend import module mutable namespace new noexcept not not_eq operator or or_eq override private protected public reinterpret_cast requires static_assert static_cast template this thread_local throw try typeid typename using virtual xor xor_eq",c="bycopy byref in inout oneway out self super atomic nonatomic retain copy readwrite readonly strong weak assign typeof nullable nonnull null_resettable _cmd @interface @implementation @end @protocol @encode @property @synthesize @dynamic @class @public @package @private @protected @required @optional @try @catch @finally @import @selector @encode @defs @synchronized @autoreleasepool @compatibility_alias @available",d="FOUNDATION_EXPORT FOUNDATION_EXTERN NS_INLINE NS_FORMAT_FUNCTION NS_RETURNS_RETAINEDNS_ERROR_ENUM NS_RETURNS_NOT_RETAINED NS_RETURNS_INNER_POINTER NS_DESIGNATED_INITIALIZER NS_ENUM NS_OPTIONS NS_REQUIRES_NIL_TERMINATION NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END NS_SWIFT_NAME NS_REFINED_FOR_SWIFT",f=a("int long char short double float unsigned signed void bool"),p=a("SEL instancetype id Class Protocol BOOL");function h(e){return s(f,e)||/.+_t$/.test(e)}function m(e){return h(e)||s(p,e)}var g="case do else for if switch while struct enum union";function v(e,t){if(!t.startOfLine)return!1;for(var n,r=null;n=e.peek();){if("\\"==n&&e.match(/^.$/)){r=v;break}if("/"==n&&e.match(/^\/[\/\*]/,!1))break;e.next()}return t.tokenize=r,"meta"}function y(e,t){return"type"==t.prevToken&&"type"}function b(e){return!(!e||e.length<2||"_"!=e[0]||"_"!=e[1]&&e[1]===e[1].toLowerCase())}function _(e){return e.eatWhile(/[\w\.']/),"number"}function w(e,t){if(e.backUp(1),e.match(/^(?:R|u8R|uR|UR|LR)/)){var n=e.match(/^"([^\s\\()]{0,16})\(/);return!!n&&(t.cpp11RawStringDelim=n[1],t.tokenize=E,E(e,t))}return e.match(/^(?:u8|u|U|L)/)?!!e.match(/^["']/,!1)&&"string":(e.next(),!1)}function x(e){var t=/(\w+)::~?(\w+)$/.exec(e);return t&&t[1]==t[2]}function k(e,t){for(var n;null!=(n=e.next());)if('"'==n&&!e.eat('"')){t.tokenize=null;break}return"string"}function E(e,t){var n=t.cpp11RawStringDelim.replace(/[^\w\s]/g,"\\$&");return e.match(new RegExp(".*?\\)"+n+'"'))?t.tokenize=null:e.skipToEnd(),"string"}function S(t,n){"string"==typeof t&&(t=[t]);var r=[];function i(e){if(e)for(var t in e)e.hasOwnProperty(t)&&r.push(t)}i(n.keywords),i(n.types),i(n.builtin),i(n.atoms),r.length&&(n.helperType=t[0],e.registerHelper("hintWords",t[0],r));for(var o=0;o!?|\/#:@]/,hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},'"':function(e,t){return!!e.match('""')&&(t.tokenize=O,t.tokenize(e,t))},"'":function(e){return e.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},"=":function(e,n){var r=n.context;return!("}"!=r.type||!r.align||!e.eat(">"))&&(n.context=new t(r.indented,r.column,r.type,r.info,null,r.prev),"operator")},"/":function(e,t){return!!e.eat("*")&&(t.tokenize=C(1),t.tokenize(e,t))}},modeProps:{closeBrackets:{pairs:'()[]{}""',triples:'"'}}}),S("text/x-kotlin",{name:"clike",keywords:a("package as typealias class interface this super val operator var fun for is in This throw return annotation break continue object if else while do try when !in !is as? file import where by get set abstract enum open inner override private public internal protected catch finally out final vararg reified dynamic companion constructor init sealed field property receiver param sparam lateinit data inline noinline tailrec external annotation crossinline const operator infix suspend actual expect setparam value"),types:a("Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void Annotation Any BooleanArray ByteArray Char CharArray DeprecationLevel DoubleArray Enum FloatArray Function Int IntArray Lazy LazyThreadSafetyMode LongArray Nothing ShortArray Unit"),intendSwitch:!1,indentStatements:!1,multiLineStrings:!0,number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+(\.\d+)?|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,blockKeywords:a("catch class do else finally for if where try while enum"),defKeywords:a("class val var object interface fun"),atoms:a("true false null this"),hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},"*":function(e,t){return"."==t.prevToken?"variable":"operator"},'"':function(e,t){var n;return t.tokenize=(n=e.match('""'),function(e,t){for(var r,i=!1,o=!1;!e.eol();){if(!n&&!i&&e.match('"')){o=!0;break}if(n&&e.match('"""')){o=!0;break}r=e.next(),!i&&"$"==r&&e.match("{")&&e.skipTo("}"),i=!i&&"\\"==r&&!n}return!o&&n||(t.tokenize=null),"string"}),t.tokenize(e,t)},"/":function(e,t){return!!e.eat("*")&&(t.tokenize=C(1),t.tokenize(e,t))},indent:function(e,t,n,r){var i=n&&n.charAt(0);return"}"!=e.prevToken&&")"!=e.prevToken||""!=n?"operator"==e.prevToken&&"}"!=n&&"}"!=e.context.type||"variable"==e.prevToken&&"."==i||("}"==e.prevToken||")"==e.prevToken)&&"."==i?2*r+t.indented:t.align&&"}"==t.type?t.indented+(e.context.type==(n||"").charAt(0)?0:r):void 0:e.indented}},modeProps:{closeBrackets:{triples:'"'}}}),S(["x-shader/x-vertex","x-shader/x-fragment"],{name:"clike",keywords:a("sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadow const attribute uniform varying break continue discard return for while do if else struct in out inout"),types:a("float int bool void vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 mat2 mat3 mat4"),blockKeywords:a("for while do if else struct"),builtin:a("radians degrees sin cos tan asin acos atan pow exp log exp2 sqrt inversesqrt abs sign floor ceil fract mod min max clamp mix step smoothstep length distance dot cross normalize ftransform faceforward reflect refract matrixCompMult lessThan lessThanEqual greaterThan greaterThanEqual equal notEqual any all not texture1D texture1DProj texture1DLod texture1DProjLod texture2D texture2DProj texture2DLod texture2DProjLod texture3D texture3DProj texture3DLod texture3DProjLod textureCube textureCubeLod shadow1D shadow2D shadow1DProj shadow2DProj shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod dFdx dFdy fwidth noise1 noise2 noise3 noise4"),atoms:a("true false gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_FogCoord gl_PointCoord gl_Position gl_PointSize gl_ClipVertex gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor gl_TexCoord gl_FogFragCoord gl_FragCoord gl_FrontFacing gl_FragData gl_FragDepth gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse gl_TextureMatrixTranspose gl_ModelViewMatrixInverseTranspose gl_ProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixInverseTranspose gl_TextureMatrixInverseTranspose gl_NormalScale gl_DepthRange gl_ClipPlane gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel gl_FrontLightModelProduct gl_BackLightModelProduct gl_TextureColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ gl_FogParameters gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats gl_MaxVertexTextureImageUnits gl_MaxTextureImageUnits gl_MaxFragmentUniformComponents gl_MaxCombineTextureImageUnits gl_MaxDrawBuffers"),indentSwitch:!1,hooks:{"#":v},modeProps:{fold:["brace","include"]}}),S("text/x-nesc",{name:"clike",keywords:a(l+" as atomic async call command component components configuration event generic implementation includes interface module new norace nx_struct nx_union post provides signal task uses abstract extends"),types:h,blockKeywords:a(g),atoms:a("null true false"),hooks:{"#":v},modeProps:{fold:["brace","include"]}}),S("text/x-objectivec",{name:"clike",keywords:a(l+" "+c),types:m,builtin:a(d),blockKeywords:a(g+" @synthesize @try @catch @finally @autoreleasepool @synchronized"),defKeywords:a("struct enum union @interface @implementation @protocol @class"),dontIndentStatements:/^@.*$/,typeFirstDefinitions:!0,atoms:a("YES NO NULL Nil nil true false nullptr"),isReservedIdentifier:b,hooks:{"#":v,"*":y},modeProps:{fold:["brace","include"]}}),S("text/x-objectivec++",{name:"clike",keywords:a(l+" "+c+" "+u),types:m,builtin:a(d),blockKeywords:a(g+" @synthesize @try @catch @finally @autoreleasepool @synchronized class try catch"),defKeywords:a("struct enum union @interface @implementation @protocol @class class namespace"),dontIndentStatements:/^@.*$|^template$/,typeFirstDefinitions:!0,atoms:a("YES NO NULL Nil nil true false nullptr"),isReservedIdentifier:b,hooks:{"#":v,"*":y,u:w,U:w,L:w,R:w,0:_,1:_,2:_,3:_,4:_,5:_,6:_,7:_,8:_,9:_,token:function(e,t,n){if("variable"==n&&"("==e.peek()&&(";"==t.prevToken||null==t.prevToken||"}"==t.prevToken)&&x(e.current()))return"def"}},namespaceSeparator:"::",modeProps:{fold:["brace","include"]}}),S("text/x-squirrel",{name:"clike",keywords:a("base break clone continue const default delete enum extends function in class foreach local resume return this throw typeof yield constructor instanceof static"),types:h,blockKeywords:a("case catch class else for foreach if switch try while"),defKeywords:a("function local class"),typeFirstDefinitions:!0,atoms:a("true false null"),hooks:{"#":v},modeProps:{fold:["brace","include"]}});var T=null;S("text/x-ceylon",{name:"clike",keywords:a("abstracts alias assembly assert assign break case catch class continue dynamic else exists extends finally for function given if import in interface is let module new nonempty object of out outer package return satisfies super switch then this throw try value void while"),types:function(e){var t=e.charAt(0);return t===t.toUpperCase()&&t!==t.toLowerCase()},blockKeywords:a("case catch class dynamic else finally for function if interface module new object switch try while"),defKeywords:a("class dynamic function interface module object package value"),builtin:a("abstract actual aliased annotation by default deprecated doc final formal late license native optional sealed see serializable shared suppressWarnings tagged throws variable"),isPunctuationChar:/[\[\]{}\(\),;\:\.`]/,isOperatorChar:/[+\-*&%=<>!?|^~:\/]/,numberStart:/[\d#$]/,number:/^(?:#[\da-fA-F_]+|\$[01_]+|[\d_]+[kMGTPmunpf]?|[\d_]+\.[\d_]+(?:[eE][-+]?\d+|[kMGTPmunpf]|)|)/i,multiLineStrings:!0,typeFirstDefinitions:!0,atoms:a("true false null larger smaller equal empty finished"),indentSwitch:!1,styleDefs:!1,hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},'"':function(e,t){return t.tokenize=function e(t){return function(n,r){for(var i,o=!1,a=!1;!n.eol();){if(!o&&n.match('"')&&("single"==t||n.match('""'))){a=!0;break}if(!o&&n.match("``")){T=e(t),a=!0;break}i=n.next(),o="single"==t&&!o&&"\\"==i}return a&&(r.tokenize=null),"string"}}(e.match('""')?"triple":"single"),t.tokenize(e,t)},"`":function(e,t){return!(!T||!e.match("`"))&&(t.tokenize=T,T=null,t.tokenize(e,t))},"'":function(e){return e.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},token:function(e,t,n){if(("variable"==n||"type"==n)&&"."==t.prevToken)return"variable-2"}},modeProps:{fold:["brace","import"],closeBrackets:{triples:'"'}}})}(n(5))},function(e,t,n){!function(e){"use strict";function t(e){for(var t={},n=0,r=e.length;n-1)r++;else if("]})".indexOf(t)>-1){if(--r<0)break}else if("/"==t&&0==r){i=!0;break}o="\\"==t}return e.backUp(e.pos-n),i}(e)?l(f(s,"string-2",!0),e,t):"operator";if("%"==s){var u="string",c=!0;e.eat("s")?u="atom":e.eat(/[WQ]/)?u="string":e.eat(/[r]/)?u="string-2":e.eat(/[wxq]/)&&(u="string",c=!1);var d=e.eat(/[^\w\s=]/);return d?(a.propertyIsEnumerable(d)&&(d=a[d]),l(f(d,u,c,!0),e,t)):"operator"}if("#"==s)return e.skipToEnd(),"comment";if("<"==s&&(r=e.match(/^<([-~])[\`\"\']?([a-zA-Z_?]\w*)[\`\"\']?(?:;|$)/)))return l((i=r[2],o=r[1],function(e,t){return o&&e.eatSpace(),e.match(i)?t.tokenize.pop():e.skipToEnd(),"string"}),e,t);if("0"==s)return e.eat("x")?e.eatWhile(/[\da-fA-F]/):e.eat("b")?e.eatWhile(/[01]/):e.eatWhile(/[0-7]/),"number";if(/\d/.test(s))return e.match(/^[\d_]*(?:\.[\d_]+)?(?:[eE][+\-]?[\d_]+)?/),"number";if("?"==s){for(;e.match(/^\\[CM]-/););return e.eat("\\")?e.eatWhile(/\w/):e.next(),"string"}if(":"==s)return e.eat("'")?l(f("'","atom",!1),e,t):e.eat('"')?l(f('"',"atom",!0),e,t):e.eat(/[\<\>]/)?(e.eat(/[\<\>]/),"atom"):e.eat(/[\+\-\*\/\&\|\:\!]/)?"atom":e.eat(/[a-zA-Z$@_\xa1-\uffff]/)?(e.eatWhile(/[\w$\xa1-\uffff]/),e.eat(/[\?\!\=]/),"atom"):"operator";if("@"==s&&e.match(/^@?[a-zA-Z_\xa1-\uffff]/))return e.eat("@"),e.eatWhile(/[\w\xa1-\uffff]/),"variable-2";if("$"==s)return e.eat(/[a-zA-Z_]/)?e.eatWhile(/[\w]/):e.eat(/\d/)?e.eat(/\d/):e.next(),"variable-3";if(/[a-zA-Z_\xa1-\uffff]/.test(s))return e.eatWhile(/[\w\xa1-\uffff]/),e.eat(/[\?\!]/),e.eat(":")?"atom":"ident";if("|"!=s||!t.varList&&"{"!=t.lastTok&&"do"!=t.lastTok){if(/[\(\)\[\]{}\\;]/.test(s))return n=s,null;if("-"==s&&e.eat(">"))return"arrow";if(/[=+\-\/*:\.^%<>~|]/.test(s)){var h=e.eatWhile(/[=+\-\/*:\.^%<>~|]/);return"."!=s||h||(n="."),"operator"}return null}return n="|",null}function c(e){return e||(e=1),function(t,n){if("}"==t.peek()){if(1==e)return n.tokenize.pop(),n.tokenize[n.tokenize.length-1](t,n);n.tokenize[n.tokenize.length-1]=c(e-1)}else"{"==t.peek()&&(n.tokenize[n.tokenize.length-1]=c(e+1));return u(t,n)}}function d(){var e=!1;return function(t,n){return e?(n.tokenize.pop(),n.tokenize[n.tokenize.length-1](t,n)):(e=!0,u(t,n))}}function f(e,t,n,r){return function(i,o){var a,s=!1;for("read-quoted-paused"===o.context.type&&(o.context=o.context.prev,i.eat("}"));null!=(a=i.next());){if(a==e&&(r||!s)){o.tokenize.pop();break}if(n&&"#"==a&&!s){if(i.eat("{")){"}"==e&&(o.context={prev:o.context,type:"read-quoted-paused"}),o.tokenize.push(c());break}if(/[@\$]/.test(i.peek())){o.tokenize.push(d());break}}s=!s&&"\\"==a}return t}}function p(e,t){return e.sol()&&e.match("=end")&&e.eol()&&t.tokenize.pop(),e.skipToEnd(),"comment"}return{startState:function(){return{tokenize:[u],indented:0,context:{type:"top",indented:-t.indentUnit},continuedLine:!1,lastTok:null,varList:!1}},token:function(e,t){n=null,e.sol()&&(t.indented=e.indentation());var a,s=t.tokenize[t.tokenize.length-1](e,t),l=n;if("ident"==s){var u=e.current();"keyword"==(s="."==t.lastTok?"property":r.propertyIsEnumerable(e.current())?"keyword":/^[A-Z]/.test(u)?"tag":"def"==t.lastTok||"class"==t.lastTok||t.varList?"def":"variable")&&(l=u,i.propertyIsEnumerable(u)?a="indent":o.propertyIsEnumerable(u)?a="dedent":"if"!=u&&"unless"!=u||e.column()!=e.indentation()?"do"==u&&t.context.indented-1?i+t.length:i}var o=t.exec(n?e.slice(n):e);return o?o.index+n+(r?o[0].length:0):-1}return{startState:function(){return{outer:e.startState(t),innerActive:null,inner:null,startingInner:!1}},copyState:function(n){return{outer:e.copyState(t,n.outer),innerActive:n.innerActive,inner:n.innerActive&&e.copyState(n.innerActive.mode,n.inner),startingInner:n.startingInner}},token:function(i,o){if(o.innerActive){var a=o.innerActive;if(u=i.string,!a.close&&i.sol())return o.innerActive=o.inner=null,this.token(i,o);if((d=a.close&&!o.startingInner?r(u,a.close,i.pos,a.parseDelimiters):-1)==i.pos&&!a.parseDelimiters)return i.match(a.close),o.innerActive=o.inner=null,a.delimStyle&&a.delimStyle+" "+a.delimStyle+"-close";d>-1&&(i.string=u.slice(0,d));var s=a.mode.token(i,o.inner);return d>-1?i.string=u:i.pos>i.start&&(o.startingInner=!1),d==i.pos&&a.parseDelimiters&&(o.innerActive=o.inner=null),a.innerStyle&&(s=s?s+" "+a.innerStyle:a.innerStyle),s}for(var l=1/0,u=i.string,c=0;c0&&void 0!==arguments[0]?arguments[0]:this.active.collection;return this.refs[e].sort(k)}}]),e}();function k(e,t){return e.node.sortableInfo.index-t.node.sortableInfo.index}function E(e,t,n){return(e=e.slice()).splice(n<0?e.length+n:n,0,e.splice(t,1)[0]),e}function S(e,t){return Object.keys(e).reduce((function(n,r){return-1===t.indexOf(r)&&(n[r]=e[r]),n}),{})}var O={end:["touchend","touchcancel","mouseup"],move:["touchmove","mousemove"],start:["touchstart","mousedown"]},C=function(){if("undefined"==typeof window||"undefined"==typeof document)return"";var e=window.getComputedStyle(document.documentElement,"")||["-moz-hidden-iframe"],t=(Array.prototype.slice.call(e).join("").match(/-(moz|webkit|ms)-/)||""===e.OLink&&["","o"])[1];switch(t){case"ms":return"ms";default:return t&&t.length?t[0].toUpperCase()+t.substr(1):""}}();function T(e,t){Object.keys(t).forEach((function(n){e.style[n]=t[n]}))}function A(e,t){e.style["".concat(C,"Transform")]=null==t?"":"translate3d(".concat(t.x,"px,").concat(t.y,"px,0)")}function P(e,t){e.style["".concat(C,"TransitionDuration")]=null==t?"":"".concat(t,"ms")}function R(e,t){for(;e;){if(t(e))return e;e=e.parentNode}return null}function j(e,t,n){return Math.max(e,Math.min(n,t))}function I(e){return"px"===e.substr(-2)?parseFloat(e):0}function M(e){var t=window.getComputedStyle(e);return{bottom:I(t.marginBottom),left:I(t.marginLeft),right:I(t.marginRight),top:I(t.marginTop)}}function L(e,t){var n=t.displayName||t.name;return n?"".concat(e,"(").concat(n,")"):e}function D(e,t){var n=e.getBoundingClientRect();return{top:n.top+t.top,left:n.left+t.left}}function N(e){return e.touches&&e.touches.length?{x:e.touches[0].pageX,y:e.touches[0].pageY}:e.changedTouches&&e.changedTouches.length?{x:e.changedTouches[0].pageX,y:e.changedTouches[0].pageY}:{x:e.pageX,y:e.pageY}}function F(e){return e.touches&&e.touches.length||e.changedTouches&&e.changedTouches.length}function B(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{left:0,top:0};if(e){var r={left:n.left+e.offsetLeft,top:n.top+e.offsetTop};return e.parentNode===t?r:B(e.parentNode,t,r)}}function z(e,t,n){return et?e-1:e>n&&e0&&n[t].height>0)&&e.getContext("2d").drawImage(n[t],0,0)})),r}function oe(e){var t,n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{withRef:!1};return n=t=function(t){function n(){var e,t;Object(l.a)(this,n);for(var r=arguments.length,i=new Array(r),o=0;o=i.y-a/2&&!v?(s.y=1,l.y=c*Math.abs((i.y-a/2-n.y)/a)):n.x>=i.x-o/2&&!b?(s.x=1,l.x=u*Math.abs((i.x-o/2-n.x)/o)):n.y<=r.y+a/2&&!g?(s.y=-1,l.y=c*Math.abs((n.y-a/2-r.y)/a)):n.x<=r.x+o/2&&!y&&(s.x=-1,l.x=u*Math.abs((n.x-o/2-r.x)/o)),this.interval&&(this.clear(),this.isAutoScrolling=!1),0===s.x&&0===s.y||(this.interval=setInterval((function(){t.isAutoScrolling=!0;var e={left:l.x*s.x,top:l.y*s.y};t.container.scrollTop+=e.top,t.container.scrollLeft+=e.left,t.onScrollCallback(e)}),5))}}]),e}();var le={axis:w.a.oneOf(["x","y","xy"]),contentWindow:w.a.any,disableAutoscroll:w.a.bool,distance:w.a.number,getContainer:w.a.func,getHelperDimensions:w.a.func,helperClass:w.a.string,helperContainer:w.a.oneOfType([w.a.func,"undefined"==typeof HTMLElement?w.a.any:w.a.instanceOf(HTMLElement)]),hideSortableGhost:w.a.bool,keyboardSortingTransitionDuration:w.a.number,lockAxis:w.a.string,lockOffset:w.a.oneOfType([w.a.number,w.a.string,w.a.arrayOf(w.a.oneOfType([w.a.number,w.a.string]))]),lockToContainerEdges:w.a.bool,onSortEnd:w.a.func,onSortMove:w.a.func,onSortOver:w.a.func,onSortStart:w.a.func,pressDelay:w.a.number,pressThreshold:w.a.number,keyCodes:w.a.shape({lift:w.a.arrayOf(w.a.number),drop:w.a.arrayOf(w.a.number),cancel:w.a.arrayOf(w.a.number),up:w.a.arrayOf(w.a.number),down:w.a.arrayOf(w.a.number)}),shouldCancelStart:w.a.func,transitionDuration:w.a.number,updateBeforeSortStart:w.a.func,useDragHandle:w.a.bool,useWindowAsScrollContainer:w.a.bool},ue={lift:[V],drop:[V],cancel:[$],up:[K,G],down:[Q,Y]},ce={axis:"y",disableAutoscroll:!1,distance:0,getHelperDimensions:function(e){var t=e.node;return{height:t.offsetHeight,width:t.offsetWidth}},hideSortableGhost:!0,lockOffset:"50%",lockToContainerEdges:!1,pressDelay:0,pressThreshold:5,keyCodes:ue,shouldCancelStart:function(e){return-1!==[ee,ne,re,te,Z].indexOf(e.target.tagName)||!!R(e.target,(function(e){return"true"===e.contentEditable}))},transitionDuration:300,useWindowAsScrollContainer:!1},de=Object.keys(le);function fe(e){y()(!(e.distance&&e.pressDelay),"Attempted to set both `pressDelay` and `distance` on SortableContainer, you may only use one or the other, not both at the same time.")}function pe(e,t){try{var n=e()}catch(e){return t(!0,e)}return n&&n.then?n.then(t.bind(null,!1),t.bind(null,!0)):t(!1,value)}var he=Object(m.createContext)({manager:{}});function me(e){var t,n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{withRef:!1};return n=t=function(t){function n(e){var t;Object(l.a)(this,n),t=f(this,p(n).call(this,e)),Object(a.a)(Object(d.a)(Object(d.a)(t)),"state",{}),Object(a.a)(Object(d.a)(Object(d.a)(t)),"handleStart",(function(e){var n=t.props,r=n.distance,i=n.shouldCancelStart;if(2!==e.button&&!i(e)){t.touched=!0,t.position=N(e);var o=R(e.target,(function(e){return null!=e.sortableInfo}));if(o&&o.sortableInfo&&t.nodeIsChild(o)&&!t.state.sorting){var a=t.props.useDragHandle,s=o.sortableInfo,l=s.index,u=s.collection;if(s.disabled)return;if(a&&!R(e.target,ae))return;t.manager.active={collection:u,index:l},F(e)||e.target.tagName!==X||e.preventDefault(),r||(0===t.props.pressDelay?t.handlePress(e):t.pressTimer=setTimeout((function(){return t.handlePress(e)}),t.props.pressDelay))}}})),Object(a.a)(Object(d.a)(Object(d.a)(t)),"nodeIsChild",(function(e){return e.sortableInfo.manager===t.manager})),Object(a.a)(Object(d.a)(Object(d.a)(t)),"handleMove",(function(e){var n=t.props,r=n.distance,i=n.pressThreshold;if(!t.state.sorting&&t.touched&&!t._awaitingUpdateBeforeSortStart){var o=N(e),a={x:t.position.x-o.x,y:t.position.y-o.y},s=Math.abs(a.x)+Math.abs(a.y);t.delta=a,r||i&&!(s>=i)?r&&s>=r&&t.manager.isActive()&&t.handlePress(e):(clearTimeout(t.cancelTimer),t.cancelTimer=setTimeout(t.cancel,0))}})),Object(a.a)(Object(d.a)(Object(d.a)(t)),"handleEnd",(function(){t.touched=!1,t.cancel()})),Object(a.a)(Object(d.a)(Object(d.a)(t)),"cancel",(function(){var e=t.props.distance;t.state.sorting||(e||clearTimeout(t.pressTimer),t.manager.active=null)})),Object(a.a)(Object(d.a)(Object(d.a)(t)),"handlePress",(function(e){try{var n=t.manager.getActive(),r=function(){if(n){var r=function(){var n=p.sortableInfo.index,r=M(p),i=H(t.container),c=t.scrollContainer.getBoundingClientRect(),g=a({index:n,node:p,collection:h});if(t.node=p,t.margin=r,t.gridGap=i,t.width=g.width,t.height=g.height,t.marginOffset={x:t.margin.left+t.margin.right+t.gridGap.x,y:Math.max(t.margin.top,t.margin.bottom,t.gridGap.y)},t.boundingClientRect=p.getBoundingClientRect(),t.containerBoundingRect=c,t.index=n,t.newIndex=n,t.axis={x:o.indexOf("x")>=0,y:o.indexOf("y")>=0},t.offsetEdge=B(p,t.container),t.initialOffset=N(m?s({},e,{pageX:t.boundingClientRect.left,pageY:t.boundingClientRect.top}):e),t.initialScroll={left:t.scrollContainer.scrollLeft,top:t.scrollContainer.scrollTop},t.initialWindowScroll={left:window.pageXOffset,top:window.pageYOffset},t.helper=t.helperContainer.appendChild(ie(p)),T(t.helper,{boxSizing:"border-box",height:"".concat(t.height,"px"),left:"".concat(t.boundingClientRect.left-r.left,"px"),pointerEvents:"none",position:"fixed",top:"".concat(t.boundingClientRect.top-r.top,"px"),width:"".concat(t.width,"px")}),m&&t.helper.focus(),u&&(t.sortableGhost=p,T(p,{opacity:0,visibility:"hidden"})),t.minTranslate={},t.maxTranslate={},m){var v=f?{top:0,left:0,width:t.contentWindow.innerWidth,height:t.contentWindow.innerHeight}:t.containerBoundingRect,y=v.top,b=v.left,_=v.width,w=y+v.height,x=b+_;t.axis.x&&(t.minTranslate.x=b-t.boundingClientRect.left,t.maxTranslate.x=x-(t.boundingClientRect.left+t.width)),t.axis.y&&(t.minTranslate.y=y-t.boundingClientRect.top,t.maxTranslate.y=w-(t.boundingClientRect.top+t.height))}else t.axis.x&&(t.minTranslate.x=(f?0:c.left)-t.boundingClientRect.left-t.width/2,t.maxTranslate.x=(f?t.contentWindow.innerWidth:c.left+c.width)-t.boundingClientRect.left-t.width/2),t.axis.y&&(t.minTranslate.y=(f?0:c.top)-t.boundingClientRect.top-t.height/2,t.maxTranslate.y=(f?t.contentWindow.innerHeight:c.top+c.height)-t.boundingClientRect.top-t.height/2);l&&l.split(" ").forEach((function(e){return t.helper.classList.add(e)})),t.listenerNode=e.touches?e.target:t.contentWindow,m?(t.listenerNode.addEventListener("wheel",t.handleKeyEnd,!0),t.listenerNode.addEventListener("mousedown",t.handleKeyEnd,!0),t.listenerNode.addEventListener("keydown",t.handleKeyDown)):(O.move.forEach((function(e){return t.listenerNode.addEventListener(e,t.handleSortMove,!1)})),O.end.forEach((function(e){return t.listenerNode.addEventListener(e,t.handleSortEnd,!1)}))),t.setState({sorting:!0,sortingIndex:n}),d&&d({node:p,index:n,collection:h,isKeySorting:m,nodes:t.manager.getOrderedRefs(),helper:t.helper},e),m&&t.keyMove(0)},i=t.props,o=i.axis,a=i.getHelperDimensions,l=i.helperClass,u=i.hideSortableGhost,c=i.updateBeforeSortStart,d=i.onSortStart,f=i.useWindowAsScrollContainer,p=n.node,h=n.collection,m=t.manager.isKeySorting,g=function(){if("function"==typeof c){t._awaitingUpdateBeforeSortStart=!0;var n=pe((function(){var t=p.sortableInfo.index;return Promise.resolve(c({collection:h,index:t,node:p,isKeySorting:m},e)).then((function(){}))}),(function(e,n){if(t._awaitingUpdateBeforeSortStart=!1,e)throw n;return n}));if(n&&n.then)return n.then((function(){}))}}();return g&&g.then?g.then(r):r()}}();return Promise.resolve(r&&r.then?r.then((function(){})):void 0)}catch(e){return Promise.reject(e)}})),Object(a.a)(Object(d.a)(Object(d.a)(t)),"handleSortMove",(function(e){var n=t.props.onSortMove;"function"==typeof e.preventDefault&&e.cancelable&&e.preventDefault(),t.updateHelperPosition(e),t.animateNodes(),t.autoscroll(),n&&n(e)})),Object(a.a)(Object(d.a)(Object(d.a)(t)),"handleSortEnd",(function(e){var n=t.props,r=n.hideSortableGhost,i=n.onSortEnd,o=t.manager,a=o.active.collection,s=o.isKeySorting,l=t.manager.getOrderedRefs();t.listenerNode&&(s?(t.listenerNode.removeEventListener("wheel",t.handleKeyEnd,!0),t.listenerNode.removeEventListener("mousedown",t.handleKeyEnd,!0),t.listenerNode.removeEventListener("keydown",t.handleKeyDown)):(O.move.forEach((function(e){return t.listenerNode.removeEventListener(e,t.handleSortMove)})),O.end.forEach((function(e){return t.listenerNode.removeEventListener(e,t.handleSortEnd)})))),t.helper.parentNode.removeChild(t.helper),r&&t.sortableGhost&&T(t.sortableGhost,{opacity:"",visibility:""});for(var u=0,c=l.length;ur)){t.prevIndex=o,t.newIndex=i;var a=z(t.newIndex,t.prevIndex,t.index),s=n.find((function(e){return e.node.sortableInfo.index===a})),l=s.node,u=t.containerScrollDelta,c=s.boundingClientRect||D(l,u),d=s.translate||{x:0,y:0},f=c.top+d.y-u.top,p=c.left+d.x-u.left,h=og?g/2:this.height/2,width:this.width>m?m/2:this.width/2},y=u&&h>this.index&&h<=c,b=u&&h=c,_={x:0,y:0},w=a[d].edgeOffset;w||(w=B(p,this.container),a[d].edgeOffset=w,u&&(a[d].boundingClientRect=D(p,i)));var x=d0&&a[d-1];x&&!x.edgeOffset&&(x.edgeOffset=B(x.node,this.container),u&&(x.boundingClientRect=D(x.node,i))),h!==this.index?(t&&P(p,t),this.axis.x?this.axis.y?b||hthis.containerBoundingRect.width-v.width&&x&&(_.x=x.edgeOffset.left-w.left,_.y=x.edgeOffset.top-w.top),null===this.newIndex&&(this.newIndex=h)):(y||h>this.index&&(s+o.left+v.width>=w.left&&l+o.top+v.height>=w.top||l+o.top+v.height>=w.top+g))&&(_.x=-(this.width+this.marginOffset.x),w.left+_.xthis.index&&s+o.left+v.width>=w.left?(_.x=-(this.width+this.marginOffset.x),this.newIndex=h):(b||hthis.index&&l+o.top+v.height>=w.top?(_.y=-(this.height+this.marginOffset.y),this.newIndex=h):(b||h1&&void 0!==arguments[1]?arguments[1]:{withRef:!1};return n=t=function(t){function n(){var e,t;Object(l.a)(this,n);for(var r=arguments.length,i=new Array(r),o=0;o0&&void 0!==arguments[0]?arguments[0]:this.props.collection;this.context.manager.remove(e,this.ref)}},{key:"getWrappedInstance",value:function(){return y()(i.withRef,"To access the wrapped instance, you need to pass in {withRef: true} as the second argument of the SortableElement() call"),this.wrappedInstance.current}},{key:"render",value:function(){var t=i.withRef?this.wrappedInstance:null;return Object(m.createElement)(e,Object(r.a)({ref:t},S(this.props,ve)))}}]),n}(m.Component),Object(a.a)(t,"displayName",L("sortableElement",e)),Object(a.a)(t,"contextType",he),Object(a.a)(t,"propTypes",ge),Object(a.a)(t,"defaultProps",{collection:0}),n}},function(e,t,n){"use strict";n.r(t),n.d(t,"Editor",(function(){return pn})),n.d(t,"cloneFragment",(function(){return Bt})),n.d(t,"findDOMNode",(function(){return hn})),n.d(t,"findDOMPoint",(function(){return mn})),n.d(t,"findDOMRange",(function(){return gn})),n.d(t,"findNode",(function(){return vn})),n.d(t,"findPath",(function(){return yn})),n.d(t,"findPoint",(function(){return bn})),n.d(t,"findRange",(function(){return wn})),n.d(t,"getEventRange",(function(){return xn})),n.d(t,"getEventTransfer",(function(){return Vt})),n.d(t,"setEventTransfer",(function(){return Yt})),n.d(t,"ReactPlugin",(function(){return dn}));var r=n(0),i=n.n(r),o=n(2),a=n.n(o),s=n(31);function l(e,t){function n(n,r,i,o,a){var s=r[i];return null!=s||n?null==s&&n?new Error("The "+a+" `"+i+"` is marked as required in `"+o+"`, but it was not supplied."):t(s)?null:new Error("Invalid "+a+" `"+i+"` supplied to `"+o+"`, expected a Slate `"+e+"` but received: "+s):null}function r(){for(var e=arguments.length,t=Array(e),r=0;r",(function(e){return s.Block.isBlockList(e)})),change:l("Change",(function(e){return s.Change.isChange(e)})),data:l("Data",(function(e){return s.Data.isData(e)})),document:l("Document",(function(e){return s.Document.isDocument(e)})),inline:l("Inline",(function(e){return s.Inline.isInline(e)})),inlines:l("Inline",(function(e){return s.Inline.isInlineList(e)})),leaf:l("Leaf",(function(e){return s.Leaf.isLeaf(e)})),leaves:l("List",(function(e){return s.Leaf.isLeafList(e)})),mark:l("Mark",(function(e){return s.Mark.isMark(e)})),marks:l("Set",(function(e){return s.Mark.isMarkSet(e)})),node:l("Node",(function(e){return s.Node.isNode(e)})),nodes:l("List",(function(e){return s.Node.isNodeList(e)})),range:l("Range",(function(e){return s.Range.isRange(e)})),ranges:l("List",(function(e){return s.Range.isRangeList(e)})),selection:l("Selection",(function(e){return s.Selection.isSelection(e)})),value:l("Value",(function(e){return s.Value.isValue(e)})),text:l("Text",(function(e){return s.Text.isText(e)})),texts:l("List",(function(e){return s.Text.isTextList(e)}))},c=n(33),d=n.n(c),f=n(95),p=n.n(f),h=function(e,t){0},m=n(52),g=n.n(m),v=n(768),y=n.n(v),b="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},_="object"===("undefined"==typeof window?"undefined":b(window))&&"object"===("undefined"==typeof document?"undefined":b(document))&&9===document.nodeType,w=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},x=void 0;if(_){var k=!0,E=!1,S=void 0;try{for(var O,C=[["edge",/Edge\/([0-9\._]+)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)$/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+)\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["android",/Android\s([0-9\.]+)/],["safari",/Version\/([0-9\._]+).*Safari/]][Symbol.iterator]();!(k=(O=C.next()).done);k=!0){var T=O.value,A=w(T,2),P=A[0];if(A[1].test(window.navigator.userAgent)){x=P;break}}}catch(e){E=!0,S=e}finally{try{!k&&C.return&&C.return()}finally{if(E)throw S}}}var R=void 0;if(_){var j=!0,I=!1,M=void 0;try{for(var L,D=[["ios",/os ([\.\_\d]+) like mac os/i],["macos",/mac os x/i],["android",/android/i],["firefoxos",/mozilla\/[a-z\.\_\d]+ \((?:mobile)|(?:tablet)/i],["windows",/windows\s*(?:nt)?\s*([\.\_\d]+)/i]][Symbol.iterator]();!(j=(L=D.next()).done);j=!0){var N=L.value,F=w(N,2),B=F[0];if(F[1].test(window.navigator.userAgent)){R=B;break}}}catch(e){I=!0,M=e}finally{try{!j&&D.return&&D.return()}finally{if(I)throw M}}}var z=[];if(_){var U=!0,q=!1,W=void 0;try{for(var H,$=[["inputeventslevel1",function(e){return"inputType"in(e.InputEvent?new e.InputEvent("input"):{})}],["inputeventslevel2",function(e){var t=e.document.createElement("div");return t.contentEditable=!0,"onbeforeinput"in t}]][Symbol.iterator]();!(U=(H=$.next()).done);U=!0){var V=H.value,G=w(V,2),K=G[0];(0,G[1])(window)&&z.push(K)}}catch(e){q=!0,W=e}finally{try{!U&&$.return&&$.return()}finally{if(q)throw W}}}var Y=[[/^9([.]0|)/,28],[/^8[.]1/,27],[/^8([.]0|)/,26],[/^7[.]1/,25],[/^7([.]0|)/,24],[/^6([.]0|)/,23],[/^5[.]1/,22],[/^5([.]0|)/,21],[/^4[.]4/,20]];var Q="firefox"===x,X="safari"===x,Z="ie"===x,J="edge"===x,ee="android"===R,te="ios"===R,ne="macos"===R,re=function(){if("android"!==R)return null;var e=window.navigator.userAgent.match(/Android\s([0-9\.]+)/);if(null==e)return null;var t=e[1],n=!0,r=!1,i=void 0;try{for(var o,a=Y[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=o.value,l=w(s,2),u=l[0],c=l[1];if(t.match(u))return c}}catch(e){r=!0,i=e}finally{try{!n&&a.return&&a.return()}finally{if(r)throw i}}return null}(),ie=(z.includes("inputeventslevel1"),z.includes("inputeventslevel2")||ee&&(28===re||null===re)),oe=n(480),ae=n.n(oe),se=n(177),le=n.n(se),ue=n(4),ce=n(373),de={bold:"mod+b",compose:["down","left","right","up","backspace","enter"],moveBackward:"left",moveForward:"right",moveWordBackward:"ctrl+left",moveWordForward:"ctrl+right",deleteBackward:"shift?+backspace",deleteForward:"shift?+delete",extendBackward:"shift+left",extendForward:"shift+right",italic:"mod+i",splitBlock:"shift?+enter",undo:"mod+z"},fe={moveLineBackward:"opt+up",moveLineForward:"opt+down",moveWordBackward:"opt+left",moveWordForward:"opt+right",deleteBackward:["ctrl+backspace","ctrl+h"],deleteForward:["ctrl+delete","ctrl+d"],deleteLineBackward:"cmd+shift?+backspace",deleteLineForward:["cmd+shift?+delete","ctrl+k"],deleteWordBackward:"opt+shift?+backspace",deleteWordForward:"opt+shift?+delete",extendLineBackward:"opt+shift+up",extendLineForward:"opt+shift+down",redo:"cmd+shift+z",transposeCharacter:"ctrl+t"},pe={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:"ctrl+y"},he={},me=te||ne,ge=!me;[].concat(Object.keys(de)).concat(Object.keys(fe)).concat(Object.keys(pe)).forEach((function(e){var t="is"+e[0].toUpperCase()+e.slice(1);if(!he[t]){var n=de[e],r=fe[e],i=pe[e],o=n&&Object(ce.isKeyHotkey)(n),a=r&&Object(ce.isKeyHotkey)(r),s=i&&Object(ce.isKeyHotkey)(i);he[t]=function(e){return!(!o||!o(e))||(!!(me&&a&&a(e))||!!(ge&&s&&s(e)))}}}));var ve=he,ye=n(54),be=n.n(ye),_e=n(232),we=n(352),xe=n(39),ke=function(e,t){if(!e)throw new Error("Invariant failed: "+(t||""))},Ee=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=Ce++,n=e.placeholder,r=e.when,o=e.style,a=void 0===o?{}:o;function s(e,n,i){if(!n.query(r,e))return i();var o=i(),a=e.texts(),s=Se(a,1)[0],l=e.texts({direction:"backward"}),u=Se(l,1)[0],c=Se(s,2),d=c[0],f=c[1],p=Se(u,2),h=p[0],m=p[1],g={type:"placeholder",data:{key:t},anchor:{key:d.key,offset:0,path:f},focus:{key:h.key,offset:h.text.length,path:m}};return[].concat(Oe(o),[g])}function l(e,r,o){var s=e.children,l=e.decoration;if("placeholder"===l.type&&l.data.get("key")===t){var u=Ee({pointerEvents:"none",display:"inline-block",width:"0",maxWidth:"100%",whiteSpace:"nowrap",opacity:"0.333",verticalAlign:"text-top"},a);return i.a.createElement("span",null,i.a.createElement("span",{contentEditable:!1,style:u},n),s)}return o()}return ke("string"==typeof n,"You must pass `SlateReactPlaceholder` an `options.placeholder` string."),ke("string"==typeof r||"function"==typeof r,"You must pass `SlateReactPlaceholder` an `options.when` query."),{decorateNode:s,renderDecoration:l}},Ae=function(e,t){return e===t};var Pe=function(e,t){var n;void 0===t&&(t=Ae);var r,i=[],o=!1,a=function(e,n){return t(e,i[n],n)};return function(){for(var t=arguments.length,s=new Array(t),l=0;l1?n-1:0),i=1;i1?n-1:0),i=1;ic+s&&(N=D+h+_-s),Lu+l&&(F=L+p+v+a.height-l),r?t.scrollTo(N,F):(n.scrollTop=F,n.scrollLeft=N)}}function gt(e){if(Z){var t=window.document.body.createTextRange();t.collapse(),t.select()}else e.removeAllRanges()}var vt=/Permission denied to access property "nodeType"/,yt=p()("slate:content");yt.update=p()("slate:update");var bt=function(e){function t(){var e,n,r;He(this,t);for(var o=arguments.length,a=Array(o),s=0;s0&&void 0!==arguments[0]?arguments[0]:{},t=_t.reduce((function(t,n){return n in e&&(t[n]=e[n]),t}),{});return t}function xt(){return{decorateNode:function(){return[]},renderAnnotation:function(e){var t=e.attributes,n=e.children;return i.a.createElement("span",t,n)},renderBlock:function(e){var t=e.attributes,n=e.children;return i.a.createElement("div",Ge({},t,{style:{position:"relative"}}),n)},renderDecoration:function(e){var t=e.attributes,n=e.children;return i.a.createElement("span",t,n)},renderDocument:function(e){return e.children},renderEditor:function(e){return e.children},renderInline:function(e){var t=e.attributes,n=e.children;return i.a.createElement("span",Ge({},t,{style:{position:"relative"}}),n)},renderMark:function(e){var t=e.attributes,n=e.children;return i.a.createElement("span",t,n)}}}function kt(){return{queries:{findDOMNode:function(e,t){t=s.PathUtils.create(t);var n=e.tmp.contentRef.current;return n?t.size?function e(t,n){if(!t)return null;if(!n.size)return t.ref?t.ref.current||null:t||null;var r=n.first(),i=n.rest();return e(t.tmp.nodeRefs[r],i)}(n.tmp.nodeRef.current,t):n.ref.current||null:null},findDOMPoint:function(e,t){var n=e.findDOMNode(t.path),r=0;if(!n)return null;var i=Array.from(n.querySelectorAll(We.STRING+", "+We.ZERO_WIDTH)),o=!0,a=!1,s=void 0;try{for(var l,u=i[Symbol.iterator]();!(o=(l=u.next()).done);o=!0){var c=l.value,d=c.childNodes[0],f=d.textContent.length,p=f;c.hasAttribute(De)&&(p=parseInt(c.getAttribute(De),10));var h=r+p;if(t.offset<=h)return{node:d,offset:Math.min(f,Math.max(0,t.offset-r))};r=h}}catch(e){a=!0,s=e}finally{try{!o&&u.return&&u.return()}finally{if(a)throw s}}return null},findDOMRange:function(e,t){var n=t.anchor,r=t.focus,i=t.isBackward,o=t.isCollapsed,a=e.findDOMPoint(n),s=o?a:e.findDOMPoint(r);if(!a||!s)return null;var l=g()(a.node).document.createRange(),u=i?s:a,c=i?a:s;return l.setStart(u.node,u.offset),l.setEnd(c.node,c.offset),l},findEventRange:function(e,t){t.nativeEvent&&(t=t.nativeEvent);var n=t,r=n.clientX,i=n.clientY,o=n.target;if(null==r||null==i)return null;var a=e.value.document,s=e.findPath(t.target);if(!s)return null;var l=a.getNode(s);if(e.isVoid(l)){var u=o.getBoundingClientRect(),c="inline"===l.object?r-u.left=r.length?(a=!0,o=t-1,n="backward"):o<0?(s=!0,o=t+1,n="forward"):(i=r[o],"forward"===n&&o++,"backward"===n&&o--);return i||null}function St(e,t){if(e===t)return null;var n=function(e,t){for(var n=Math.min(e.length,t.length),r=0;r1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=t,i=e,o=0;-1!==o&&-1!==(o=i.indexOf(Tt,o));)r>o&&r--,i=""+i.slice(0,o)+i.slice(o+1);var a=i.charAt(i.length-1);n&&"\n"===a&&(i=i.slice(0,-1));var s=i.length;return r>s&&(r=s),{text:i,offset:r}}function jt(e){var t=new window.MutationObserver((function(e){var t;Ct("flush"),(t=l).push.apply(t,Xe(e)),d()})),n=null,r={rootEl:null,diff:null,range:null,domNode:null};function i(){Ct("clearAction"),r.diff=null,r.domNode=null}function o(){Ct("applyDiff");var t=r.diff;if(null!=t){Ct("applyDiff:run");var n=e.value.document,i=e.value.selection.moveAnchorTo(t.path,t.start).moveFocusTo(t.path,t.end);i=n.resolveRange(i),e.insertTextAtRange(i,t.insertText)}}function a(){Ct("splitBlock"),Pt(e,(function(){o(),r.range?e.select(r.range):Ct("splitBlock:NO-SELECTION"),e.splitBlock().focus().restoreDOM(),i()}))}var s=null,l=[],u=null,c=!1;function d(){s&&(window.cancelAnimationFrame(s),s=null),c=!0,u&&window.cancelAnimationFrame(u),u=window.requestAnimationFrame((function(){l.length>0&&function(t){if(Ct("flushAction",t.length,t),r.range&&!r.range.isCollapsed)return void Pt(e,(function(){e.select(r.range).deleteBackward().focus().restoreDOM()}));if(t.length>1){if(t.find((function(t){if("childList"!==t.type)return!1;if(0===t.addedNodes.length)return!1;var n=t.addedNodes[0];if(n.nodeType===window.Node.TEXT_NODE&&"\n"===n.textContent)return!0;if(n.nodeType!==window.Node.ELEMENT_NODE)return!1;var r=n.dataset.key;return null!=r&&!!e.value.document.getClosestBlock(r)})))return void a()}var s=t[0];"characterData"===s.type?function(t){Ct("resolveDOMNode");var n=e.value.document,i=t.closest("[data-key]").dataset.key,o=n.getPath(i),a=n.getClosestBlock(i),s=n.getDescendant(i),l=s.text,u=a.nodes.last()===s,c=Rt(t.textContent,0,u).text;if(c===l)return void(r.diff=null);var d=function(e,t){var n=St(e,t);if(null==n)return null;var r=Ot(t,n),i=Ot(e,n);return{start:n.start,end:e.length-n.end,cursor:n.start+r.length,insertText:r,removeText:i}}(l,c);r.diff={path:o,start:d.start,end:d.end,insertText:d.insertText},Ct("resolveDOMNode:diff",r.diff)}(s.target.parentNode):"childList"===s.type&&(s.removedNodes.length>0?1===t.length?function(t){if(Ct("removeNode"),t.nodeType!==window.Node.ELEMENT_NODE)return;var n=e.value,r=n.document,i=n.selection,o=e.findNode(t),a=r.resolveRange(i.moveToRangeOfNode(o));Pt(e,(function(){e.select(a).delete().restoreDOM()}))}(s.removedNodes[0]):(Ct("mergeBlock"),n.requestAnimationFrame((function(){Pt(e,(function(){o(),e.select(r.range).deleteBackward().focus().restoreDOM(),i()}))}))):s.addedNodes.length>0&&a())}(l),u=null,l=[],c=!1}))}return{clearDiff:function(){Ct("clearDIff"),r.diff=null},connect:function(){Ct("connect",{rootEl:i});var i=e.findDOMNode([]);r.rootEl!==i&&(Ct("connect:run"),n=g()(i),t.observe(i,{childList:!0,characterData:!0,attributes:!0,subtree:!0,characterDataOldValue:!0}))},disconnect:function(){Ct("disconnect"),t.disconnect(),r.rootEl=null},onKeyDown:d,onCompositionStart:function(){Ct("onCompositionStart")},onCompositionEnd:function(){Ct("onCompositionEnd"),window.setTimeout((function(){r.diff&&(Ct("onCompositionEnd:applyDiff"),Pt(e,(function(){o();var t=n.getSelection().getRangeAt(0),r=Rt(t.startContainer.textContent,t.startOffset),i=e.findRange({anchorNode:t.startContainer,anchorOffset:0,focusNode:t.startContainer,focusOffset:0,isCollapsed:!0}).moveTo(r.offset);e.select(i).focus().restoreDOM()}))),i()}),20)},onSelect:function(t){Ct("onSelect:try"),t=t.nativeEvent?t.nativeEvent:t,window.cancelAnimationFrame(s),s=null,c||(s=window.requestAnimationFrame((function(){Ct("onSelect:save-selection");var n,a=g()(t.target).getSelection(),s=e.findRange(a),l=Rt(a.anchorNode.textContent,a.anchorOffset),u=Rt(a.focusNode.textContent,a.focusOffset);s.anchor.offset!==l.offset&&(s=s.set("anchor",s.anchor.set("offset",l.offset))),s.focus.offset!==u.offset&&(s=s.set("focus",s.focus.set("offset",u.offset))),Ct("onSelect:save-data",{domSelection:(n=a,{anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),range:s.toJS()}),a.isCollapsed&&r.node!==a.anchorNode&&null!=r.diff&&(Ct("onSelect:applyDiff",r.diff),o(),e.select(s),i()),r.range=s,r.node=a.anchorNode})))}}}function It(e){var t=new jt(e.editor);return{onComponentDidMount:function(){t.connect()},onComponentDidUpdate:function(){t.connect()},onComponentWillUnmount:function(){t.disconnect()},onCompositionEnd:function(){t.onCompositionEnd()},onCompositionStart:function(){t.onCompositionStart()},onRender:function(){t.disconnect(),t.clearDiff()},onSelect:function(e){!function(e){var t=e.getSelection(),n=t.anchorNode;if(null!=n){var r=n.parentElement.dataset;if(!!r&&"n"===r.slateZeroWidth&&1===n.textContent.length&&0!==t.anchorOffset){var i=e.document.createRange();i.setStart(n,0),i.setEnd(n,0),t.removeAllRanges(),t.addRange(i)}}}(g()(e.target)),t.onSelect(e)}}}function Mt(){var e={},t=!0,n=!1,r=void 0;try{for(var i,o=Re[Symbol.iterator]();!(t=(i=o.next()).done);t=!0){e[i.value]=function(e,t,n){}}}catch(e){n=!0,r=e}finally{try{!t&&o.return&&o.return()}finally{if(n)throw r}}return e}var Lt={FRAGMENT:"application/x-slate-fragment",HTML:"text/html",NODE:"application/x-slate-node",RICH:"text/rtf",TEXT:"text/plain"},Dt=Lt.FRAGMENT,Nt=Lt.HTML,Ft=Lt.TEXT;function Bt(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};Object(xe.a)(!s.Value.isValue(t),"As of Slate 0.42.0, the `cloneFragment` utility takes an `editor` instead of a `value`.");var r=g()(e.target),i=r.getSelection(),o=t.value,a=o.document,l=o.fragment,u=o.selection,c=u.start,d=u.end,f=a.getClosestVoid(c.path,t),p=a.getClosestVoid(d.path,t);if(!i.isCollapsed||f){var h=_e.default.serializeNode(l),m=i.getRangeAt(0),v=m.cloneContents(),y=v.childNodes[0];if(v.childNodes.forEach((function(e){e.textContent&&""!==e.textContent.trim()&&(y=e)})),p){var b=m.cloneRange(),_=a.getPath(p.key);if(_){var w=t.findDOMNode(_);b.setEndAfter(w),v=b.cloneContents()}}if(f&&(y=v.childNodes[0].childNodes[1].firstChild),[].slice.call(v.querySelectorAll(We.ZERO_WIDTH)).forEach((function(e){var t="n"===e.getAttribute(qe);e.textContent=t?"\n":""})),3===y.nodeType){var x=r.document.createElement("span");x.style.whiteSpace="pre",x.appendChild(y),v.appendChild(x),y=x}y.setAttribute(Ie,h);var k=s.Value.create({document:l}),E=we.default.serialize(k),S=r.document.createElement("div");if(S.appendChild(v),e.clipboardData&&e.clipboardData.setData&&!Z)return e.preventDefault(),e.clipboardData.setData(Ft,E),e.clipboardData.setData(Dt,h),e.clipboardData.setData(Nt,S.innerHTML),void n();var O=e.target.closest(We.EDITOR);S.setAttribute("contenteditable",!0),S.style.position="absolute",S.style.left="-9999px",O.appendChild(S),i.selectAllChildren(S),r.requestAnimationFrame((function(){O.removeChild(S),gt(i),i.addRange(m),n()}))}}var zt=Lt.FRAGMENT,Ut=Lt.HTML,qt=Lt.NODE,Wt=Lt.RICH,Ht=Lt.TEXT,$t=/ data-slate-fragment="([^\s"]+)"/;function Vt(e){!Z&&e.nativeEvent&&(e=e.nativeEvent);var t=e.dataTransfer||e.clipboardData,n=Gt(t,zt),r=Gt(t,qt),i=Gt(t,Ut),o=Gt(t,Wt),a=Gt(t,Ht),s=void 0;if(!n&&i&&~i.indexOf(" "+Ie+'="')){var l=$t.exec(i),u=Qe(l,2),c=(u[0],u[1]);c&&(n=c)}if(a){var d=function(e){var t="SLATE-DATA-EMBED::";if(e.substring(0,t.length)!==t)return{TEXT:e};try{return JSON.parse(e.substring(t.length))}catch(e){throw new Error("Unable to parse custom Slate drag event data.")}}(a);d[zt]&&(n=d[zt]),d[qt]&&(r=d[qt]),d[Ht]&&(a=d[Ht])}n&&(n=_e.default.deserializeNode(n)),r&&(r=_e.default.deserializeNode(r));try{t.items&&t.items.length?s=Array.from(t.items).map((function(e){return"file"===e.kind?e.getAsFile():null})).filter((function(e){return e})):t.files&&t.files.length&&(s=Array.from(t.files))}catch(e){t.files&&t.files.length&&(s=Array.from(t.files))}var f={files:s,fragment:n,html:i,node:r,rich:o,text:a};return f.type=function(e){return e.fragment?"fragment":e.node?"node":e.rich&&e.html?"html":e.rich&&e.text?"text":e.files&&e.files.length?"files":e.html?"html":e.text?"text":"unknown"}(f),f}function Gt(e,t){return e.types&&e.types.length?-1!==Array.from(e.types).indexOf(t)&&e.getData(t)||null:t===Ht&&e.getData("Text")||null}var Kt=Lt.TEXT;function Yt(e,t,n){var r=Lt[t.toUpperCase()];if(!r)throw new Error('Cannot set unknown transfer type "'+r+'".');e.nativeEvent&&(e=e.nativeEvent);var i=e.dataTransfer||e.clipboardData;try{i.setData(r,n),i.setData("text",i.getData("text"))}catch(e){var o="SLATE-DATA-EMBED::",a=i.getData(Kt),s={};if(a.substring(0,o.length)===o)try{s=JSON.parse(a.substring(o.length))}catch(e){throw new Error("Failed to parse Slate data from `DataTransfer` object.")}else s[Kt]=a;s[r]=n;var l=""+o+JSON.stringify(s);i.setData(Kt,l)}}var Qt=p()("slate:after");function Xt(){var e=null,t=!1;return{onBeforeInput:function(e,t,n){var r=t.value;if(!!e.nativeEvent)return e.preventDefault(),t.insertText(e.data),n();var i=e.getTargetRanges(),o=Qe(i,1)[0];if(!o)return n();Qt("onBeforeInput",{event:e}),e.preventDefault();var a=r.document,s=r.selection,l=t.findRange(o);switch(e.inputType){case"deleteByDrag":case"deleteByCut":case"deleteContent":case"deleteContentBackward":case"deleteContentForward":t.deleteAtRange(l);break;case"deleteWordBackward":t.deleteWordBackwardAtRange(l);break;case"deleteWordForward":t.deleteWordForwardAtRange(l);break;case"deleteSoftLineBackward":case"deleteHardLineBackward":t.deleteLineBackwardAtRange(l);break;case"deleteSoftLineForward":case"deleteHardLineForward":t.deleteLineForwardAtRange(l);break;case"insertLineBreak":case"insertParagraph":a.hasVoidParent(s.start.path,t)?t.moveToStartOfNextText():t.splitBlockAtRange(l);break;case"insertFromYank":case"insertReplacementText":case"insertText":var u=null==e.data?e.dataTransfer.getData("text/plain"):e.data;if(null==u)break;t.insertTextAtRange(l,u,s.marks),s.marks&&r.document!==t.value.document&&t.select({marks:null})}n()},onBlur:function(e,t,n){Qt("onBlur",{event:e}),t.blur(),n()},onClick:function(e,t,n){if(t.readOnly)return n();var r=t.value.document,i=t.findPath(e.target);if(!i)return n();Qt("onClick",{event:e});var o=r.getNode(i),a=r.getAncestors(i);o&&(t.isVoid(o)||a.some((function(e){return t.isVoid(e)})))&&t.focus().moveToEndOfNode(o),n()},onCopy:function(e,t,n){Qt("onCopy",{event:e}),Bt(e,t),n()},onCut:function(e,t,n){Qt("onCut",{event:e}),Bt(e,t,(function(){var e=t.value,n=e.document,r=e.selection,i=r.end,o=void 0;if(r.isCollapsed){var a=!0,s=!1,l=void 0;try{for(var u,c=n.ancestors(i.path)[Symbol.iterator]();!(a=(u=c.next()).done);a=!0){var d=u.value,f=Qe(d,2),p=f[0],h=f[1];if(t.isVoid(p)){o=h;break}}}catch(e){s=!0,l=e}finally{try{!a&&c.return&&c.return()}finally{if(s)throw l}}}o?t.removeNodeByKey(o):t.delete()})),n()},onDragEnd:function(t,n,r){Qt("onDragEnd",{event:t}),e=null,r()},onDragStart:function(t,n,r){Qt("onDragStart",{event:t}),e=!0;var i=n.value,o=i.document,a=n.findPath(t.target),s=o.getNode(a),l=o.getAncestors(a),u=s&&(n.isVoid(s)||l.some((function(e){return n.isVoid(e)}))),c=i.blocks.some((function(e){return e===s}));u&&!c&&n.moveToRangeOfNode(s);var d=n.value.fragment;Yt(t,"fragment",_e.default.serializeNode(d)),r()},onDrop:function(t,n,r){var i=n.value,o=i.document,a=i.selection,s=g()(t.target),l=n.findEventRange(t);if(!l)return r();Qt("onDrop",{event:t});var u=Vt(t),c=u.type,d=u.fragment,f=u.text;n.focus();var p=n.findDOMNode(l.focus.path);p&&p.dispatchEvent(new MouseEvent("mouseup",{view:s,bubbles:!0,cancelable:!0}));var h=a;if(n.select(l),e&&n.deleteAtRange(h),"text"===c||"html"===c){var m=l.anchor,v=o.hasVoidParent(m.path,n);if(v){for(var y=m.path,b=o.getNode(m.path);v;){var _=o.texts({path:y}),w=Qe(_,1)[0];if(!w)break;var x=Qe(w,2);b=x[0],y=x[1],v=o.hasVoidParent(y,n)}b&&n.moveToStartOfNode(b)}f&&f.split("\n").forEach((function(e,t){t>0&&n.splitBlock(),n.insertText(e)}))}"fragment"===c&&n.insertFragment(d),r()},onFocus:function(e,n,r){Qt("onFocus",{event:e}),!t||Z||J?n.focus():n.deselect().focus(),r()},onInput:function(e,t,n){Qt("onInput");var r=g()(e.target).getSelection(),i=t.findSelection(r);i?t.select(i):t.blur();var o=r.anchorNode;t.reconcileDOMNode(o),n()},onKeyDown:function(e,t,n){Qt("onKeyDown",{event:e});var r=t.value,i=r.document,o=r.selection,a=o.start,s=i.hasVoidParent(a.path,t);if(ve.isSplitBlock(e)&&!te)return s?t.moveToStartOfNextText():t.splitBlock();if(ve.isDeleteBackward(e)&&!te)return t.deleteCharBackward();if(ve.isDeleteForward(e)&&!te)return t.deleteCharForward();if(ve.isDeleteLineBackward(e))return t.deleteLineBackward();if(ve.isDeleteLineForward(e))return t.deleteLineForward();if(ve.isDeleteWordBackward(e))return t.deleteWordBackward();if(ve.isDeleteWordForward(e))return t.deleteWordForward();if(ve.isRedo(e))return t.redo();if(ve.isUndo(e))return t.undo();if(ve.isMoveLineBackward(e))return e.preventDefault(),t.moveToStartOfBlock();if(ve.isMoveLineForward(e))return e.preventDefault(),t.moveToEndOfBlock();if(ve.isExtendLineBackward(e))return e.preventDefault(),t.moveFocusToStartOfBlock();if(ve.isExtendLineForward(e))return e.preventDefault(),t.moveFocusToEndOfBlock();if(ve.isMoveBackward(e))return e.preventDefault(),o.isCollapsed?t.moveBackward():t.moveToStart();if(ve.isMoveForward(e))return e.preventDefault(),o.isCollapsed?t.moveForward():t.moveToEnd();if(ve.isMoveWordBackward(e))return e.preventDefault(),t.moveWordBackward();if(ve.isMoveWordForward(e))return e.preventDefault(),t.moveWordForward();if(ve.isExtendBackward(e)){var l=i.getNode(a.path),u=i.texts({path:a.path,direction:"backward"}),c=Qe(u,1)[0],d=!1;if(c){var f=Qe(c,2)[1];d=i.hasVoidParent(f,t)}if(s||d||""===l.text)return e.preventDefault(),t.moveFocusBackward()}if(ve.isExtendForward(e)){var p=i.getNode(a.path),h=i.texts({path:a.path}),m=Qe(h,1)[0],g=!1;if(m){var v=Qe(m,2)[1];g=i.hasVoidParent(v,t)}if(s||g||""===p.text)return e.preventDefault(),t.moveFocusForward()}n()},onMouseDown:function(e,n,r){Qt("onMouseDown",{event:e}),t=!0,r()},onMouseUp:function(e,n,r){Qt("onMouseUp",{event:e}),t=!1,r()},onPaste:function(e,t,n){Qt("onPaste",{event:e});var r=t.value,i=Vt(e),o=i.type,a=i.fragment,s=i.text;if("fragment"===o&&t.insertFragment(a),"text"===o||"html"===o){if(!s)return n();var l=r.document,u=r.selection,c=r.startBlock;if(t.isVoid(c))return n();var d=c,f=l.getInsertMarksAtRange(u),p=we.default.deserialize(s,{defaultBlock:d,defaultMarks:f}).document;t.insertFragment(p)}n()},onSelect:function(e,n,r){Qt("onSelect",{event:e});var i=g()(e.target).getSelection(),o=n.findSelection(i);o?n.select(o):n.blur(),t=!1,r()}}}var Zt=p()("slate:before");function Jt(){var e=null,t=0,n=!1,r=!1,i=!1,o=!1;return{onBeforeInput:function(e,t,n){var r=!!e.nativeEvent;t.readOnly||(o=!0,r&&ie||(Zt("onBeforeInput",{event:e}),n()))},onBlur:function(t,n,i){if(!r&&!n.readOnly){var o=t.relatedTarget,a=t.target,s=g()(a);if(e!==s.document.activeElement){if(o){var l=n.findDOMNode([]);if(o===l)return;if(o.hasAttribute(Be))return;var u=n.findNode(o);if(l.contains(o)&&u&&!n.isVoid(u))return}Zt("onBlur",{event:t}),i()}}},onClick:function(e,t,n){Zt("onClick",{event:e}),o=!0,n()},onCompositionEnd:function(e,r,i){var a=t;o=!0,window.requestAnimationFrame((function(){t>a||(n=!1)})),Zt("onCompositionEnd",{event:e}),i()},onCompositionStart:function(e,r,i){n=!0,t++;var a=r.value.selection;o=!0,a.isCollapsed||r.delete(),Zt("onCompositionStart",{event:e}),i()},onCopy:function(e,t,n){var i=g()(e.target);r=!0,i.requestAnimationFrame((function(){return r=!1})),Zt("onCopy",{event:e}),n()},onCut:function(e,t,n){if(!t.readOnly){var i=g()(e.target);r=!0,i.requestAnimationFrame((function(){return r=!1})),Zt("onCut",{event:e}),n()}},onDragEnd:function(e,t,n){i=!1,Zt("onDragEnd",{event:e}),n()},onDragEnter:function(e,t,n){Zt("onDragEnter",{event:e}),n()},onDragExit:function(e,t,n){Zt("onDragExit",{event:e}),n()},onDragLeave:function(e,t,n){Zt("onDragLeave",{event:e}),n()},onDragOver:function(e,t,n){var r=t.findNode(e.target);r&&!t.isVoid(r)||e.preventDefault(),Z&&e.preventDefault(),i||(i=!0,Z||(e.nativeEvent.dataTransfer.dropEffect="move")),Zt("onDragOver",{event:e}),n()},onDragStart:function(e,t,n){i=!0,Zt("onDragStart",{event:e}),n()},onDrop:function(e,t,n){t.readOnly||(o=!0,e.preventDefault(),Zt("onDrop",{event:e}),n())},onFocus:function(t,n,i){if(!r&&!n.readOnly){var o=n.findDOMNode([]),a=g()(t.target);e=a.document.activeElement,Q&&t.target!==o?o.focus():(Zt("onFocus",{event:t}),i())}},onInput:function(e,t,r){n||t.value.selection.isBlurred||(o=!0,Zt("onInput",{event:e}),r())},onKeyDown:function(e,t,r){t.readOnly||(n?ve.isCompose(e)&&e.preventDefault():(!te&&(ve.isBold(e)||ve.isDeleteBackward(e)||ve.isDeleteForward(e)||ve.isDeleteLineBackward(e)||ve.isDeleteLineForward(e)||ve.isDeleteWordBackward(e)||ve.isDeleteWordForward(e)||ve.isItalic(e)||ve.isRedo(e)||ve.isSplitBlock(e)||ve.isTransposeCharacter(e)||ve.isUndo(e))&&e.preventDefault(),o=!0,Zt("onKeyDown",{event:e}),r()))},onPaste:function(e,t,n){t.readOnly||(o=!0,e.preventDefault(),Zt("onPaste",{event:e}),n())},onSelect:function(t,i,a){if(!r&&!n&&!i.readOnly){var s=g()(t.target);e=s.document.activeElement,o=!0,Zt("onSelect",{event:t}),a()}},queries:{userActionPerformed:function(){return o}},commands:{clearUserActionPerformed:function(){return o=!1,null}}}}function en(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.plugins,n=void 0===t?[]:t,r=Jt(),i=Xt(),o=ee?[It(e),Mt()]:[];return[].concat(o,[r],Xe(n),[i])}function tn(e){var t=e.nativeEvent||e;switch(t.type){case"keydown":return t.type+" "+JSON.stringify(t.key);case"input":case"beforeinput":case"textInput":return t.type+":"+t.inputType+" "+JSON.stringify(t.data);default:return t.type}}var nn=p()("slate:events");function rn(){var e={},t=!0,n=!1,r=void 0;try{for(var i,o=Re[Symbol.iterator]();!(t=(i=o.next()).done);t=!0){e[i.value]=function(e,t,n){var r=tn(e);nn(r),n()}}}catch(e){n=!0,r=e}finally{try{!t&&o.return&&o.return()}finally{if(n)throw r}}return e}var on=p()("slate:batch-events");function an(){var e=null,t=null,n=[];function r(){on("\n"+n.join("\n")),n.length=0}function i(i){0===n.length&&(e=new Date);var o=tn(i),a=new Date;n.push("- "+(a-e)+" - "+o),clearTimeout(t),t=setTimeout(r,2e3)}var o={},a=!0,s=!1,l=void 0;try{for(var u,c=Re[Symbol.iterator]();!(a=(u=c.next()).done);a=!0){o[u.value]=function(e,t,n){i(e),n()}}}catch(e){s=!0,l=e}finally{try{!a&&c.return&&c.return()}finally{if(s)throw l}}return o}var sn=p()("slate:mutations"),ln=["type","oldValue","target","addedNodes","removedNodes","attributeName","attributeNamespace","nextSibling","previousSibling"];function un(e){if(e.nodeType===window.Node.TEXT_NODE)return e.textContent;if(e.nodeType===window.Node.ELEMENT_NODE){var t=e.outerHTML,n=e.innerHTML;return null==t?JSON.stringify(e.textContent):t.slice(0,t.indexOf(n))}return"Node(type="+e.nodeType}function cn(){var e=new window.MutationObserver((function(e){var t=Array.from(e).map((function(e){var t={};return ln.forEach((function(n){var r=e[n];if(null!=r)if(r instanceof window.NodeList){if(0===r.length)return;t[n]=Array.from(r).map(un).join(", ")}else r instanceof window.Node&&(r=un(r)),t[n]=r})),t}));sn.apply(void 0,[t.length+" Mutations"].concat(Xe(t)))})),t=null;function n(n,r,i){var o=r.findDOMNode([]);if(o===t)return i();sn("start"),e.observe(o,{childList:!0,characterData:!0,attributes:!0,subtree:!0,characterDataOldValue:!0}),t=o,i()}return{onComponentDidMount:n,onComponentDidUpdate:n,onComponentWillUnmount:function(n,r,i){sn("stop"),e.disconnect(),t=null,i()}}}function dn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.placeholder,n=void 0===t?"":t,r=p.a.enabled("slate:events")?rn():null,i=p.a.enabled("slate:batch-events")?an():null,o=p.a.enabled("slate:mutations")?cn():null,a=xt(),s={commands:{reconcileNode:function(e,t){var n=e.value,r=n.document,i=n.selection,o=r.getPath(t.key),a=e.findDOMNode(o),s=r.getClosestBlock(o),l=t.text,u=a.textContent,c=s.nodes.last()===t,d=u.charAt(u.length-1);if(c&&"\n"===d&&(u=u.slice(0,-1)),l!==u){var f=i.moveAnchorTo(o,0).moveFocusTo(o,l.length);f=r.resolveRange(f),e.insertTextAtRange(f,u,t.marks)}},reconcileDOMNode:function(e,t){var n=t.parentElement.closest("[data-key]"),r=e.findNode(n);e.reconcileNode(r)}}},l=kt(),u=wt(e),c=en(e),d={commands:{restoreDOM:function(e){var t=e.tmp.contentRef.current.tmp;t.contentKey=t.contentKey+1}}},f=ee?null:Te({placeholder:n,when:function(e,t){return"document"===t.object&&""===t.text&&1===t.nodes.size&&1===Array.from(t.texts()).length}});return[r,i,o,u,c,d,f,a,s,l]}var fn=p()("slate:editor"),pn=function(e){function t(){var e,n,r;He(this,t);for(var o=arguments.length,a=Array(o),l=0;l component is re-resolving the `plugins`, `schema`, `commands`, `queries` or `placeholder` prop on each update, which leads to poor performance. This is often due to passing in a new references for these props with each render by declaring them inline in your render function. Do not do this! Declare them outside your render function, or memoize them instead."),r.tmp.resolves++;var t=e(Ge({},r.props,{editor:r,value:r.props.value||r.state.value})),n=function(e){r.tmp.mounted?r.handleChange(e):r.tmp.change=e};r.controller=new s.Editor({plugins:[t],onChange:n},{controller:r,construct:!1}),r.controller.run("onConstruct")})),Ye(r,n)}return Ke(t,e),$e(t,[{key:"componentDidMount",value:function(){this.tmp.mounted=!0,this.tmp.updates++,this.props.autoFocus&&this.focus(),this.tmp.change&&(this.handleChange(this.tmp.change),this.tmp.change=null)}},{key:"componentDidUpdate",value:function(){this.tmp.updates++,this.tmp.change&&(this.handleChange(this.tmp.change),this.tmp.change=null)}},{key:"componentWillUnmount",value:function(){this.tmp.mounted=!1}},{key:"render",value:function(){var e=this;fn("render",this);var n=this.props,r=n.commands,o=n.placeholder,a=n.plugins,s=n.queries,l=n.schema;this.resolveController(a,l,r,s,o,dn);var u=this.props,c=u.options,d=u.readOnly,f=u.value,p=this.state.value,h=f||p,m=this.state.contentKey;this.controller.setReadOnly(d),this.controller.setValue(h,c);var g=this.props,v=g.autoCorrect,y=g.className,b=g.id,_=g.role,w=g.spellCheck,x=g.tabIndex,k=g.style,E=g.tagName,S=le()(this.props,Object.keys(t.propTypes)),O=i.a.createElement(bt,Ge({},S,{ref:this.tmp.contentRef,autoCorrect:v,className:y,contentKey:m,editor:this,id:b,onEvent:function(t,n){return e.run(t,n)},readOnly:d,role:_,spellCheck:w,style:k,tabIndex:x,tagName:E}));return this.controller.run("renderEditor",Ge({},this.props,{editor:this,children:O}))}},{key:"handleChange",value:function(e){var t=this.props.onChange;this.state.value&&this.setState({value:e.value}),t(e)}},{key:"applyOperation",value:function(){var e;return(e=this.controller).applyOperation.apply(e,arguments)}},{key:"command",value:function(){var e;return(e=this.controller).command.apply(e,arguments)}},{key:"hasCommand",value:function(){var e;return(e=this.controller).hasCommand.apply(e,arguments)}},{key:"hasQuery",value:function(){var e;return(e=this.controller).hasQuery.apply(e,arguments)}},{key:"normalize",value:function(){var e;return(e=this.controller).normalize.apply(e,arguments)}},{key:"query",value:function(){var e;return(e=this.controller).query.apply(e,arguments)}},{key:"registerCommand",value:function(){var e;return(e=this.controller).registerCommand.apply(e,arguments)}},{key:"registerQuery",value:function(){var e;return(e=this.controller).registerQuery.apply(e,arguments)}},{key:"run",value:function(){var e;return(e=this.controller).run.apply(e,arguments)}},{key:"withoutNormalizing",value:function(){var e;return(e=this.controller).withoutNormalizing.apply(e,arguments)}},{key:"call",value:function(){var e;return(e=this.controller).call.apply(e,arguments)}},{key:"change",value:function(){var e;return(e=this.controller).change.apply(e,arguments)}},{key:"onChange",value:function(){var e;return(e=this.controller).onChange.apply(e,arguments)}},{key:"applyOperations",value:function(){var e;return(e=this.controller).applyOperations.apply(e,arguments)}},{key:"setOperationFlag",value:function(){var e;return(e=this.controller).setOperationFlag.apply(e,arguments)}},{key:"getFlag",value:function(){var e;return(e=this.controller).getFlag.apply(e,arguments)}},{key:"unsetOperationFlag",value:function(){var e;return(e=this.controller).unsetOperationFlag.apply(e,arguments)}},{key:"withoutNormalization",value:function(){var e;return(e=this.controller).withoutNormalization.apply(e,arguments)}},{key:"operations",get:function(){return this.controller.operations}},{key:"readOnly",get:function(){return this.controller.readOnly}},{key:"value",get:function(){return this.controller.value}},{key:"editor",get:function(){return this.controller.editor}},{key:"schema",get:function(){Object(xe.a)(!1,"As of Slate 0.42, the `editor.schema` property no longer exists, and its functionality has been folded into the editor itself. Use the `editor` instead.")}},{key:"stack",get:function(){Object(xe.a)(!1,"As of Slate 0.42, the `editor.stack` property no longer exists, and its functionality has been folded into the editor itself. Use the `editor` instead.")}}]),t}(i.a.Component);function hn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;h(!1,"As of slate-react@0.22 the `findDOMNode(key)` helper is deprecated in favor of `editor.findDOMNode(path)`."),s.Node.isNode(e)&&(e=e.key);var n=t.document.querySelector("["+Me+'="'+e+'"]');if(!n)throw new Error('Unable to find a DOM node for "'+e+'". This is often because of forgetting to add `props.attributes` to a custom component.');return n}function mn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;h(!1,"As of slate-react@0.22 the `findDOMPoint(point)` helper is deprecated in favor of `editor.findDOMPoint(point)`.");var n=hn(e.key,t),r=0,i=Array.from(n.querySelectorAll(We.STRING+", "+We.ZERO_WIDTH)),o=!0,a=!1,s=void 0;try{for(var l,u=i[Symbol.iterator]();!(o=(l=u.next()).done);o=!0){var c=l.value,d=c.childNodes[0],f=d.textContent.length,p=f;c.hasAttribute(De)&&(p=parseInt(c.getAttribute(De),10));var m=r+p;if(e.offset<=m){var g=Math.min(f,Math.max(0,e.offset-r));return{node:d,offset:g}}r=m}}catch(e){a=!0,s=e}finally{try{!o&&u.return&&u.return()}finally{if(a)throw s}}return null}function gn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;h(!1,"As of slate-react@0.22 the `findDOMRange(range)` helper is deprecated in favor of `editor.findDOMRange(range)`.");var n=e.anchor,r=e.focus,i=e.isBackward,o=e.isCollapsed,a=mn(n,t),s=o?a:mn(r,t);if(!a||!s)return null;var l=t.document.createRange(),u=i?s:a,c=i?a:s;return l.setStart(u.node,u.offset),l.setEnd(c.node,c.offset),l}function vn(e,t){h(!1,"As of slate-react@0.22 the `findNode(element)` helper is deprecated in favor of `editor.findNode(element)`."),Object(xe.a)(!s.Value.isValue(t),"As of Slate 0.42.0, the `findNode` utility takes an `editor` instead of a `value`.");var n=e.closest(We.KEY);if(!n)return null;var r=n.getAttribute(Me);return r&&t.value.document.getNode(r)||null}function yn(e,t){h(!1,"As of slate-react@0.22 the `findPath(element)` helper is deprecated in favor of `editor.findPath(element)`.");var n=vn(e,t);return n?t.value.document.getPath(n):null}function bn(e,t,n){h(!1,"As of slate-react@0.22 the `findPoint(node, offset)` helper is deprecated in favor of `editor.findPoint(node, offset)`."),Object(xe.a)(!s.Value.isValue(n),"As of Slate 0.42.0, the `findPoint` utility takes an `editor` instead of a `value`.");var r=function(e,t){if(1===e.nodeType&&e.childNodes.length){var n=t===e.childNodes.length,r=n?"backward":"forward";for(e=_n(e,n?t-1:t,r);1===e.nodeType&&e.childNodes.length;){var i=n?e.childNodes.length-1:0;e=_n(e,i,r)}t=n?e.textContent.length:0}return{node:e,offset:t}}(e,t),i=r.node,o=r.offset,a=g()(e),l=i.parentNode,u=l.closest(We.LEAF),c=void 0,d=void 0;if(u){var f=a.document.createRange(),p=u.closest(We.TEXT);f.setStart(p,0),f.setEnd(i,o),d=p;var m=f.cloneContents(),v=m.querySelectorAll("["+qe+"]");c=m.textContent.length-v.length}else{var y=l.closest(We.VOID);if(!y)return null;if(!(u=y.querySelector(We.LEAF)))return null;c=(d=u).textContent.length}c===d.textContent.length&&l.hasAttribute(qe)&&c--;var b=u.getAttribute(Fe);if(!b)return null;var _=Je.parse(b).key,w=n.value;return w.document.hasDescendant(_)?w.document.createPoint({key:_,offset:c}):null}function _n(e,t,n){for(var r=e.childNodes,i=r[t],o=t,a=!1,s=!1;(8===i.nodeType||1===i.nodeType&&0===i.childNodes.length||1===i.nodeType&&"false"===i.getAttribute("contenteditable"))&&(!a||!s);)o>=r.length?(a=!0,o=t-1,n="backward"):o<0?(s=!0,o=t+1,n="forward"):(i=r[o],"forward"===n&&o++,"backward"===n&&o--);return i||null}function wn(e,t){h(!1,"As of slate-react@0.22 the `findRange(selection)` helper is deprecated in favor of `editor.findRange(selection)`."),Object(xe.a)(!s.Value.isValue(t),"As of Slate 0.42.0, the `findNode` utility takes an `editor` instead of a `value`.");var n=e.anchorNode||e.startContainer;if(!n)return null;var r=g()(n);(e instanceof r.Range||r.StaticRange&&e instanceof r.StaticRange)&&(e={anchorNode:e.startContainer,anchorOffset:e.startOffset,focusNode:e.endContainer,focusOffset:e.endOffset});var i=e,o=i.anchorNode,a=i.anchorOffset,l=i.focusNode,u=i.focusOffset,c=i.isCollapsed,d=t.value,f=bn(o,a,t),p=c?f:bn(l,u,t);return f&&p?d.document.createRange({anchor:f,focus:p}):null}function xn(e,t){h(!1,"As of slate-react@0.22 the `getEventRange(event, editor)` helper is deprecated in favor of `editor.findEventRange(event)`."),Object(xe.a)(!s.Value.isValue(t),"As of Slate 0.42.0, the `findNode` utility takes an `editor` instead of a `value`."),e.nativeEvent&&(e=e.nativeEvent);var n=e,r=n.clientX,i=n.clientY,o=n.target;if(null==r||null==i)return null;var a=t.value.document,l=yn(e.target,t);if(!l)return null;var u=a.getNode(l);if(t.isVoid(u)){var c=o.getBoundingClientRect(),d="inline"===u.object?r-c.left=n[0]||(e[1]<=n[1]&&e[3]>=n[1]||Object(a.s)(e,this.intersectsCoordinate.bind(this)))}return!1},t.prototype.setCenter=function(e){var t=this.stride,n=this.flatCoordinates[t]-this.flatCoordinates[0],r=e.slice();r[t]=r[0]+n;for(var i=1;i=this.dragVertexDelay_?(this.downPx_=t.pixel,this.shouldHandle_=!this.freehand_,n=!0):this.lastDragTime_=void 0,this.shouldHandle_&&void 0!==this.downTimeout_&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0));return this.freehand_&&t.type===y.a.POINTERDRAG&&null!==this.sketchFeature_?(this.addToDrawing_(t.coordinate),r=!1):this.freehand_&&t.type===y.a.POINTERDOWN?r=!1:n&&this.getPointerCount()<2?(r=t.type===y.a.POINTERMOVE)&&this.freehand_?(this.handlePointerMove_(t),this.shouldHandle_&&t.originalEvent.preventDefault()):("mouse"===t.originalEvent.pointerType||t.type===y.a.POINTERDRAG&&void 0===this.downTimeout_)&&this.handlePointerMove_(t):t.type===y.a.DBLCLICK&&(r=!1),e.prototype.handleEvent.call(this,t)&&r},t.prototype.handleDownEvent=function(e){return this.shouldHandle_=!this.freehand_,this.freehand_?(this.downPx_=e.pixel,this.finishCoordinate_||this.startDrawing_(e.coordinate),!0):this.condition_(e)?(this.lastDragTime_=Date.now(),this.downTimeout_=setTimeout(function(){this.handlePointerMove_(new v.a(y.a.POINTERMOVE,e.map,e.originalEvent,!1,e.frameState))}.bind(this),this.dragVertexDelay_),this.downPx_=e.pixel,!0):(this.lastDragTime_=void 0,!1)},t.prototype.handleUpEvent=function(e){var t=!0;if(0===this.getPointerCount())if(this.downTimeout_&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0),this.handlePointerMove_(e),this.shouldHandle_){var n=!this.finishCoordinate_;n&&this.startDrawing_(e.coordinate),!n&&this.freehand_?this.finishDrawing():this.freehand_||n&&this.mode_!==I||(this.atFinish_(e.pixel)?this.finishCondition_(e)&&this.finishDrawing():this.addToDrawing_(e.coordinate)),t=!1}else this.freehand_&&this.abortDrawing();return!t&&this.stopClick_&&e.preventDefault(),t},t.prototype.handlePointerMove_=function(e){if(this.pointerType_=e.originalEvent.pointerType,this.downPx_&&(!this.freehand_&&this.shouldHandle_||this.freehand_&&!this.shouldHandle_)){var t=this.downPx_,n=e.pixel,r=t[0]-n[0],i=t[1]-n[1],o=r*r+i*i;if(this.shouldHandle_=this.freehand_?o>this.squaredClickTolerance_:o<=this.squaredClickTolerance_,!this.shouldHandle_)return}this.finishCoordinate_?this.modifyDrawing_(e.coordinate):this.createOrUpdateSketchPoint_(e.coordinate.slice())},t.prototype.atFinish_=function(e){var t=!1;if(this.sketchFeature_){var n=!1,r=[this.finishCoordinate_],i=this.mode_;if(i===I)t=!0;else if(i===D)t=2===this.sketchCoords_.length;else if(i===M)n=this.sketchCoords_.length>this.minPoints_;else if(i===L){var o=this.sketchCoords_;n=o[0].length>this.minPoints_,r=[o[0][0],o[0][o[0].length-2]]}if(n)for(var a=this.getMap(),s=0,l=r.length;s=this.maxPoints_&&(this.freehand_?n.pop():t=!0),n.push(e.slice()),this.geometryFunction_(n,r,i)):o===L&&((n=this.sketchCoords_[0]).length>=this.maxPoints_&&(this.freehand_?n.pop():t=!0),n.push(e.slice()),t&&(this.finishCoordinate_=n[0]),this.geometryFunction_(this.sketchCoords_,r,i)),this.createOrUpdateSketchPoint_(e.slice()),this.updateSketchFeatures_(),t&&this.finishDrawing()},t.prototype.removeLastPoint=function(){if(this.sketchFeature_){var e,t=this.sketchFeature_.getGeometry(),n=this.getMap().getView().getProjection(),r=this.mode_;if(r===M||r===D){if((e=this.sketchCoords_).splice(-2,1),e.length>=2){this.finishCoordinate_=e[e.length-2].slice();var o=this.finishCoordinate_.slice();e[e.length-1]=o,this.createOrUpdateSketchPoint_(o)}this.geometryFunction_(e,t,n),t.getType()===i.a.POLYGON&&this.sketchLine_&&this.createOrUpdateCustomSketchLine_(t)}else if(r===L){(e=this.sketchCoords_[0]).splice(-2,1);var a=this.sketchLine_.getGeometry();if(e.length>=2){o=e[e.length-2].slice();e[e.length-1]=o,this.createOrUpdateSketchPoint_(o)}a.setCoordinates(e),this.geometryFunction_(this.sketchCoords_,t,n)}1===e.length&&this.abortDrawing(),this.updateSketchFeatures_()}},t.prototype.finishDrawing=function(){var e=this.abortDrawing_();if(e){var t=this.sketchCoords_,n=e.getGeometry(),r=this.getMap().getView().getProjection();this.mode_===M?(t.pop(),this.geometryFunction_(t,n,r)):this.mode_===L&&(t[0].pop(),this.geometryFunction_(t,n,r),t=n.getCoordinates()),this.type_===i.a.MULTI_POINT?e.setGeometry(new _.a([t])):this.type_===i.a.MULTI_LINE_STRING?e.setGeometry(new b.a([t])):this.type_===i.a.MULTI_POLYGON&&e.setGeometry(new w.a([t])),this.dispatchEvent(new z(F,e)),this.features_&&this.features_.push(e),this.source_&&this.source_.addFeature(e)}},t.prototype.abortDrawing_=function(){this.finishCoordinate_=null;var e=this.sketchFeature_;return this.sketchFeature_=null,this.sketchPoint_=null,this.sketchLine_=null,this.overlay_.getSource().clear(!0),e},t.prototype.abortDrawing=function(){var e=this.abortDrawing_();e&&this.dispatchEvent(new z(B,e))},t.prototype.appendCoordinates=function(e){var t,n=this.mode_,r=!this.sketchFeature_;if(r&&this.startDrawing_(e[0]),n===M||n===D)t=this.sketchCoords_;else{if(n!==L)return;t=this.sketchCoords_&&this.sketchCoords_.length?this.sketchCoords_[0]:[]}r&&t.shift(),t.pop();for(var i=0;ie.length)&&(t=e.length);for(var n=0,r=new Array(t);n2&&/MacIntel/.test(navigator.platform),L=!1;try{E()&&new window.Blob&&(L=window.Blob)}catch(e){}var D=E()&&(window.URL||window.webkitURL||!1),N=D&&D.createObjectURL&&D,F=E()&&(null!=window.FileReader?window.FileReader.prototype.readAsArrayBuffer:void 0)&&window.FileReader,B=function(){var e;try{var t;return null!=(e=window.console)&&"function"==typeof e.log?(t=e).log.apply(t,arguments):void 0}catch(e){}},z=function(){var e;if(!(null!=(e=window.console)?e.debug:void 0))return B.apply(void 0,["Debug:"].concat(Array.prototype.slice.call(arguments)));try{var t;return(t=window.console).debug.apply(t,arguments)}catch(e){}},U=function(){var e;if(!(null!=(e=window.console)?e.warn:void 0))return B.apply(void 0,["Warning:"].concat(Array.prototype.slice.call(arguments)));try{var t;return(t=window.console).warn.apply(t,arguments)}catch(e){}},q={},W=function(e){if(null==q[e])return q[e]=!0,U(e)},H=[].indexOf,$=function(e){var t,n,r,i;for(i=[],n=0,r=e.length;n1&&void 0!==arguments[1]?arguments[1]:"i";return t=n.default.map(e.split("*"),ae),new RegExp("^"+t.join(".+")+"$",r)},le=function(e){var t;return"http:"!==(t=document.location.protocol)&&(t="https:"),e.replace(/^\/\//,t+"//").replace(/\/+$/,"")},ue=function(e,t){if(e.length>t){var n=Math.ceil((t-3)/2),r=Math.floor((t-3)/2);return e.slice(0,n)+"..."+e.slice(-r)}return e},ce=function(e,t,n){var r,i;return e[0]>t[0]||e[1]>t[1]||n?(i=t[0]/e[0],r=t[1]/e[1],!t[0]||t[1]&&i>r?[Math.round(r*e[0]),t[1]]:[t[0],Math.round(i*e[1])]):e.slice()},de=function(e,t,r,i){var o,a,s,l,u,c,d;if(c=i.width,a=i.height,l=t.preferedSize,s="",(d=c===r[0]&&a===r[1])||(s+="-/crop/".concat(c,"x").concat(a,"/").concat(i.left,",").concat(i.top,"/")),o=t.downscale&&(c>l[0]||a>l[1]),u=t.upscale&&(c'):n.default('')).attr("accept",i).css({position:"absolute",top:0,opacity:0,margin:0,padding:0,width:"auto",height:"auto",cursor:e.css("cursor")}).on("change",(function(){return r(this),n.default(this).hide(),a()})),e.append(o)})(),e.css({position:"relative",overflow:"hidden"}).mousemove((function(e){var t,r,i,a=n.default(this).offset();return t=a.left,r=a.top,i=o.width(),o.css({left:e.pageX-t-i+10,top:e.pageY-r-10})}))},he=function(e,t,r){var i,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return""===(i=t.inputAcceptTypes)&&(i=t.imagesOnly?fe:null),n.default(t.multiple?'':'').attr("accept",i).attr(o).css({position:"fixed",bottom:0,opacity:0}).on("change",(function(){return r(this),n.default(this).remove()})).appendTo(e).focus().click().hide()},me="B KB MB GB TB PB EB ZB YB".split(" "),ge=function(e){var t,n,r,i,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";if(e=parseInt(e,10),isNaN(e))return o;for(t=2,r=0,i=1e3-5*Math.pow(10,2-Math.max(t,3));e>i&&r3&&void 0!==arguments[3]?arguments[3]:{};return n.default.ajax(n.default.extend({url:e,type:t,data:r},i,ve)).then((function(e){var t,r;return e.error?("string"==typeof e.error?(t=e.error,r=e.error_code):(t=e.error.content,r=e.error.error_code),n.default.Deferred().reject({message:t,code:r})):e}),(function(t,n,r){var i;return i="".concat(n," (").concat(r,")"),U("JSONP unexpected error: ".concat(i," while loading ").concat(e)),i}))},be=function(e,t,n,r){var i,o,a,s,l,u;if(window.HTMLCanvasElement.prototype.toBlob)return e.toBlob(r,t,n);for(a=(a=e.toDataURL(t,n)).split(","),o=window.atob(a[1]),i=new Uint8Array(o.length),s=l=0,u=o.length;l1?t-1:0),i=1;in&&a)return o;if(o=e*t})),o=Pe.dimension.find((function(n){return n>=e&&n>=t}));if(!i||!o)return r.reject();var a=[Me(i,i),Le(o,1)];return n.default.when.apply(n.default,a).done((function(e,t){e&&t?r.resolve():r.reject()})),r.promise()}var Ne,Fe,Be,ze,Ue,qe,We,He,$e,Ve,Ge,Ke,Ye,Qe,Xe,Ze,Je,et,tt,nt=[].indexOf;Ue={live:!0,manualStart:!1,locale:null,localePluralize:null,localeTranslations:null,systemDialog:!1,crop:!1,previewStep:!1,imagesOnly:!1,clearable:!1,multiple:!1,multipleMax:1e3,multipleMin:1,multipleMaxStrict:!1,imageShrink:!1,pathValue:!0,tabs:"file camera url facebook gdrive gphotos dropbox instagram evernote flickr onedrive",preferredTypes:"",inputAcceptTypes:"",doNotStore:!1,publicKey:null,secureSignature:"",secureExpire:"",pusherKey:"79ae88bd931ea68464d9",cdnBase:"https://ucarecdn.com",urlBase:"https://upload.uploadcare.com",socialBase:"https://social.uploadcare.com",previewProxy:null,previewUrlCallback:null,remoteTabSessionKey:null,imagePreviewMaxSize:26214400,multipartMinSize:10485760,multipartPartSize:5242880,multipartMinLastPartSize:1048576,multipartConcurrency:4,multipartMaxAttempts:3,parallelDirectUploads:10,passWindowOpen:!1,cameraMirrorDefault:!0,enableAudioRecording:!0,enableVideoRecording:!0,videoPreferredMimeTypes:null,audioBitsPerSecond:null,videoBitsPerSecond:null,scriptBase:"//ucarecdn.com/widget/".concat("3.17.2","/uploadcare/"),debugUploads:!1,integration:""},Je={multipleMax:{from:0,to:1e3}},Be={multipleMax:{min:1,max:1e3}},Ye={tabs:{all:"file camera url facebook gdrive gphotos dropbox instagram evernote flickr onedrive box vk huddle",default:Ue.tabs}},Qe=E()&&(document.currentScript||(tt=document.getElementsByTagName("script"))[tt.length-1]),(He=E()&&n.default(Qe).data("integration"))&&null!=He&&(Ue=n.default.extend(Ue,{integration:He})),Xe=function(e){return n.default.isArray(e)||(e=(e=n.default.trim(e))?e.split(" "):[]),e},Ne=function(e,t){var n,r,i,o,a,s,l,u,c=Object.prototype.hasOwnProperty;for(n=0,a=t.length;ni?(W("Shrinked size can not be larger than ".concat(Math.floor(i/1e3/1e3),"MP. ")+"You have set ".concat(t[1],"x").concat(t[2]," (")+"".concat(Math.ceil(r/1e3/100)/10,"MP).")),!1):{quality:t[3]?t[3]/100:void 0,size:r}},ze=function(e,t){var n,r,i,o;return this.previewProxy?(r=(i=!/\?/.test(this.previewProxy))||!/=$/.test(this.previewProxy),n=!i&&!/[&?=]$/.test(this.previewProxy),o=encodeURIComponent(e),r&&(o="url="+o),n&&(o="&"+o),i&&(o="?"+o),this.previewProxy+o):e},Ve=function(e){var t;return Ne(e,["tabs","preferredTypes","videoPreferredMimeTypes"]),et(e,["cdnBase","socialBase","urlBase","scriptBase"]),qe(e,["doNotStore","imagesOnly","multiple","clearable","pathValue","previewStep","systemDialog","debugUploads","multipleMaxStrict","cameraMirrorDefault"]),We(e,["multipleMax","multipleMin","multipartMinSize","multipartPartSize","multipartMinLastPartSize","multipartConcurrency","multipartMaxAttempts","parallelDirectUploads"]),Ze(e,Je),Fe(e,Be),$e(e),!1===e.crop||n.default.isArray(e.crop)||(/^(disabled?|false|null)$/i.test(e.crop)?e.crop=!1:n.default.isPlainObject(e.crop)?e.crop=[e.crop]:e.crop=n.default.map((""+e.crop).split(","),Ge)),e.imageShrink&&!n.default.isPlainObject(e.imageShrink)&&(e.imageShrink=Ke(e.imageShrink)),(e.crop||e.multiple)&&(e.previewStep=!0),C||(e.systemDialog=!1),e.validators&&(e.validators=e.validators.slice()),e.previewProxy&&!e.previewUrlCallback&&(e.previewUrlCallback=ze),-1!==(t=e.tabs.indexOf("skydrive"))&&(e.tabs[t]="onedrive"),e};var rt,it=function(){var e,t,n;for(e in t={},Ue)null!=(n=window["UPLOADCARE_".concat(Z(e))])&&(t[e]=n);return t},ot=K((function(e,t){var r;return t||(Ue=n.default.extend(Ue,it())),r=Ve(n.default.extend(Ue,e||{})),st.fire(r),r})),at=function(e){var t;return t=n.default.extend({},ot()),n.default.isEmptyObject(e)||(t=Ve(n.default.extend(t,e))),t},st=E()&&n.default.Callbacks("once memory"),lt=function(){function e(){s(this,e),this.urls=[],this.styles=[]}return c(e,[{key:"addUrl",value:function(e){if(!/^https?:\/\//i.test(e))throw new Error("Embedded urls should be absolute. "+e);if(!(nt.call(this.urls,e)>=0))return this.urls.push(e)}},{key:"addStyle",value:function(e){return this.styles.push(e)}}]),e}(),ut=function(e,t){var r;return r=n.default.Deferred(),t&&(e.src=t),e.complete?r.resolve(e):(n.default(e).one("load",(function(){return r.resolve(e)})),n.default(e).one("error",(function(){return r.reject(e)}))),r.promise()},ct=function e(t){return n.default.isArray(t)?n.default.when.apply(null,n.default.map(t,e)):t.src?ut(t):ut(new window.Image,t)},dt=function(e){var t=n.default.Deferred();return n.default("").on("loadeddata",t.resolve).on("error",t.reject).attr("src",e).get(0).load(),t.promise()},ft=function(){var e=n.default.Deferred();if(void 0!==rt)e.resolve(rt);else{var t=new window.Image;t.onload=function(){rt=t.naturalWidth=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}(a);try{var d=function(){var e=_(u.value,2),i=e[0],o=e[1];l=l.then((function(e){var t=n.default.Deferred();return De(i,o).then((function(){return t.resolve(e,!1)})).fail((function(){return t.resolve(e,!0)})),t.promise()})).then((function(e,t){return t?e:pt(e,i,o)})).then((function(e){return s.notify((t-i)/(t-r)),e}))};for(c.s();!(u=c.n()).done;)d()}catch(e){c.e(e)}finally{c.f()}return l.done((function(e){s.resolve(e)})),l.fail((function(e){s.reject(e)})),s.promise()},mt=function(e,t){var r=n.default.Deferred();if(.71*e.width*e.height*.710&&(o=o.then((function(e){return St(e,s)})).catch((function(){return t}))),o.done(r.resolve),o.fail((function(){return r.resolve(t)}))}))}))}))}))})),r.promise()):r.reject("support")},bt=function(e,t,r,i,o){var a,s;return a=n.default.Deferred(),N?((s=ct(N.createObjectURL(e))).always((function(e){return N.revokeObjectURL(e.src)})),s.fail((function(){return a.reject("not image")})),s.done((function(s){return a.always((function(){s.src="//:0"})),o&&s.width*s.height>o?a.reject("max source"):n.default.when(xt(e),ft()).always((function(e,n){var o=n?1:At(e)||1,l=o>4,u=l?[s.height,s.width]:[s.width,s.height],c=_(ce(u,[t,r]),2),d=c[0],f=c[1],p=[[1,0,0,1,0,0],[-1,0,0,1,d,0],[-1,0,0,-1,d,f],[1,0,0,-1,0,f],[0,1,1,0,0,0],[0,1,-1,0,d,0],[0,-1,-1,0,d,f],[0,-1,1,0,0,f]][o-1];if(!p)return a.reject("bad image");var h=document.createElement("canvas");h.width=d,h.height=f;var m=h.getContext("2d");if(m.transform.apply(m,p),l){var g=[f,d];d=g[0],f=g[1]}return i&&(m.fillStyle=i,m.fillRect(0,0,d,f)),m.drawImage(s,0,0,d,f),a.resolve(h,u)}))})),a.promise()):a.reject("support")},_t=function(e){var t,r,i,o,a;return a=function(e,n){var r;return(r=new F).onload=function(){return n(new gt(r.result))},r.onerror=function(e){return t.reject("reader",e)},r.readAsArrayBuffer(e)},i=function(){return a(e.slice(r,r+128),(function(e){var t,n,i;for(t=n=0,i=e.byteLength;i>=0?ni;t=i>=0?++n:--n)if(255===e.getUint8(t)){r+=t;break}return o()}))},o=function(){var n;return n=r,a(e.slice(r,r+=4),(function(o){var s,l;return 4!==o.byteLength||255!==o.getUint8(0)?t.reject("corrupted"):218===(l=o.getUint8(1))?t.resolve():(s=o.getUint16(2)-2,a(e.slice(r,r+=s),(function(e){return e.byteLength!==s?t.reject("corrupted"):(t.notify(n,s,l,e),i())})))}))},t=n.default.Deferred(),F&>?(r=2,a(e.slice(0,2),(function(e){return 65496!==e.getUint16(0)?t.reject("not jpeg"):i()})),t.promise()):t.reject("support")},wt=function(e,t,r){var i,o,a,s;return i=n.default.Deferred(),a=[],o=[],(s=_t(e)).fail(i.reject),s.progress((function(e,n,r){if(r===t)return a.push(e),o.push(n)})),s.done((function(){var n,s,l,u,c,d,f,p,h;for(f=[e.slice(0,2)],u=0,d=r.length;u=0?ch;s=h>=0?++c:--c)a[s]>p&&f.push(e.slice(p,a[s])),p=a[s]+o[s]+4;return f.push(e.slice(p,e.size)),i.resolve(new L(f,{type:e.type}))})),i.promise()},xt=function(e){var t=null,r=_t(e);return r.progress((function(e,n,r,i){if(!t&&225===r&&i.byteLength>=14&&1165519206===i.getUint32(0)&&0===i.getUint16(4))return t=i})),r.then((function(){return t}),(function(){return n.default.Deferred().reject(t)}))},kt=function(e){var t=[],r=_t(e);return r.progress((function(e,n,r,i){226===r&&1229144927===i.getUint32(0)&&1347571526===i.getUint32(4)&&1229735168===i.getUint32(8)&&t.push(i)})),r.then((function(){return t}),(function(){return n.default.Deferred().reject(t)}))},Et=function(e,t,n){return n&&Tt(t,1),wt(e,225,[t.buffer])},St=function(e,t){return wt(e,226,t.map((function(e){return e.buffer})))},Ot=function(e){var t=n.default.Deferred();return St(e,[]).catch((function(){return e})).then((function(e){var n=ct(N.createObjectURL(e));n.always((function(e){N.revokeObjectURL(e.src)})),n.fail((function(){t.reject()})),n.done((function(e){t.resolve(e)}))})).fail((function(){t.reject()})),t.promise()},Ct=function(e){var t=[1,3],n=[192,193,194,195,197,198,199,201,202,203,205,206,207],r=!1,i=_t(e);return i.progress((function(e,i,o,a){if(!r&&n.indexOf(o)>=0){var s=a.getUint8(5);t.indexOf(s)<0&&(r=!0)}})),i.then((function(){return r})).catch((function(){return r}))},Tt=function(e,t){Pt(e,(function(n,r){return e.setUint16(n,t,r)}))},At=function(e){return Pt(e,(function(t,n){return e.getUint16(t,n)}))},Pt=function(e,t){var n,r,i,o;if(!e||e.byteLength<14||1165519206!==e.getUint32(0)||0!==e.getUint16(4))return null;if(18761===e.getUint16(6))r=!0;else{if(19789!==e.getUint16(6))return null;r=!1}if(42!==e.getUint16(8,r))return null;for(i=8+e.getUint32(10,r),n=0,o=e.getUint16(i-2,r);o>=0?no;o>=0?++n:--n){if(e.byteLength2&&void 0!==arguments[2]?arguments[2]:{};s(this,e),this.settings=n,this.sourceInfo=i,this.fileId=null,this.fileName=null,this.sanitizedName=null,this.fileSize=null,this.isStored=null,this.cdnUrlModifiers=null,this.isImage=null,this.imageInfo=null,this.mimeType=null,this.s3Bucket=null,(r=this.sourceInfo).source||(r.source=this.sourceName),this.__setupValidation(),this.__initApi()}return c(e,[{key:"__startUpload",value:function(){return n.default.Deferred().resolve()}},{key:"__completeUpload",value:function(){var e,t,n,r,i=this;return n=0,this.settings.debugUploads&&(z("Load file info.",this.fileId,this.settings.publicKey),t=setInterval((function(){return z("Still waiting for file ready.",n,i.fileId,i.settings.publicKey)}),5e3),this.apiDeferred.done((function(){return z("File uploaded.",n,i.fileId,i.settings.publicKey)})).always((function(){return clearInterval(t)}))),r=100,(e=function(){if("pending"===i.apiDeferred.state())return n+=1,i.__updateInfo().done((function(){return setTimeout(e,r),r+=50}))})()}},{key:"__updateInfo",value:function(){var e=this;return ye("".concat(this.settings.urlBase,"/info/"),"GET",{jsonerrors:1,file_id:this.fileId,pub_key:this.settings.publicKey,wait_is_ready:+(null===this.isImage)},{headers:{"X-UC-User-Agent":this.settings._userAgent}}).fail((function(t){return e.settings.debugUploads&&B("Can't load file info. Probably removed.",e.fileId,e.settings.publicKey,t.message),e.__rejectApi("info",t)})).done(this.__handleFileData.bind(this))}},{key:"__handleFileData",value:function(e){if(this.fileName=e.original_filename,this.sanitizedName=e.filename,this.fileSize=e.size,this.isImage=e.is_image,this.imageInfo=e.image_info,this.mimeType=e.mime_type,this.isStored=e.is_stored,this.s3Bucket=e.s3_bucket,e.default_effects&&(this.cdnUrlModifiers="-/"+e.default_effects),this.s3Bucket&&this.cdnUrlModifiers&&this.__rejectApi("baddata"),this.__runValidators(),e.is_ready)return this.__resolveApi()}},{key:"__progressInfo",value:function(){var e;return{state:this.__progressState,uploadProgress:this.__progress,progress:"ready"===(e=this.__progressState)||"error"===e?1:.9*this.__progress,incompleteFileInfo:this.__fileInfo()}}},{key:"__fileInfo",value:function(){var e;return e=this.s3Bucket?"https://".concat(this.s3Bucket,".s3.amazonaws.com/").concat(this.fileId,"/").concat(this.sanitizedName):"".concat(this.settings.cdnBase,"/").concat(this.fileId,"/"),{uuid:this.fileId,name:this.fileName,size:this.fileSize,isStored:this.isStored,isImage:!this.s3Bucket&&this.isImage,originalImageInfo:this.imageInfo,mimeType:this.mimeType,originalUrl:this.fileId?e:null,cdnUrl:this.fileId?"".concat(e).concat(this.cdnUrlModifiers||""):null,cdnUrlModifiers:this.cdnUrlModifiers,sourceInfo:this.sourceInfo}}},{key:"__setupValidation",value:function(){if(this.validators=this.settings.validators||this.settings.__validators||[],this.settings.imagesOnly)return this.validators.push((function(e){if(!1===e.isImage)throw new Error("image")}))}},{key:"__runValidators",value:function(){var e,t,n,r,i,o,a;n=this.__fileInfo();try{for(i=this.validators,o=[],t=0,r=i.length;tt.__progress)return t.__progress=e,t.__notifyApi()})),e.fail((function(e){return t.__rejectApi("upload",e)})),this.apiDeferred.always(e.reject))),this.__apiPromise}}]),e}(),It=null,Mt=function(e){f(r,e);var t=v(r);function r(e){var n;return s(this,r),(n=t.apply(this,arguments)).__file=e,n.fileName=n.__file.name||"original",n.__notifyApi(),n}return c(r,[{key:"setFile",value:function(e){if(e&&(this.__file=e),this.sourceInfo.file=this.__file,this.__file)return this.fileSize=this.__file.size,this.fileType=this.__file.type||"application/octet-stream",this.settings.debugUploads&&z("Use local file.",this.fileName,this.fileType,this.fileSize),this.__runValidators(),this.__notifyApi()}},{key:"__startUpload",value:function(){var e,t,r,i=this;return this.apiDeferred.always((function(){return i.__file=null,i.__file})),this.__file.size>=this.settings.multipartMinSize&&L?(this.setFile(),this.multipartUpload()):(t=R,!this.settings.imageShrink||t&&t<8?(this.setFile(),this.directUpload()):(e=n.default.Deferred(),r=.4,yt(this.__file,this.settings.imageShrink).progress((function(t){return e.notify(t*r)})).done(this.setFile.bind(this)).fail((function(){return i.setFile(),r*=.1})).always((function(){return e.notify(r),i.directUpload().done(e.resolve).fail(e.reject).progress((function(t){return e.notify(r+t*(1-r))}))})),e))}},{key:"__autoAbort",value:function(e){return this.apiDeferred.fail(e.abort),e}},{key:"directRunner",value:function(e){return It||(It=_e(this.settings.parallelDirectUploads)),It(e)}},{key:"directUpload",value:function(){var e,t=this;return e=n.default.Deferred(),this.__file?this.fileSize>104857600?(this.__rejectApi("size"),e):(this.directRunner((function(r){var i;if(e.always(r),"pending"===t.apiDeferred.state())return(i=new window.FormData).append("UPLOADCARE_PUB_KEY",t.settings.publicKey),i.append("signature",t.settings.secureSignature),i.append("expire",t.settings.secureExpire),i.append("UPLOADCARE_STORE",t.settings.doNotStore?"":"auto"),i.append("file",t.__file,t.fileName),i.append("file_name",t.fileName),i.append("source",t.sourceInfo.source),t.__autoAbort(n.default.ajax({xhr:function(){var t;return t=n.default.ajaxSettings.xhr(),t.upload&&t.upload.addEventListener("progress",(function(t){return e.notify(t.loaded/t.total)}),!1),t},crossDomain:!0,type:"POST",url:"".concat(t.settings.urlBase,"/base/?jsonerrors=1"),headers:{"X-UC-User-Agent":t.settings._userAgent},contentType:!1,processData:!1,data:i,dataType:"json",error:e.reject,success:function(n){if(null!=n?n.file:void 0)return t.fileId=n.file,e.resolve();if(n.error){var r=n.error,i=r.content,o=r.error_code;return e.reject({message:i,code:o})}return e.reject()}}))})),e):(this.__rejectApi("baddata"),e)}},{key:"multipartUpload",value:function(){var e,t=this;return e=n.default.Deferred(),this.__file?(this.multipartStart().done((function(n){return t.uploadParts(n.parts,n.uuid).done((function(){return t.multipartComplete(n.uuid).done((function(n){return t.fileId=n.uuid,t.__handleFileData(n),e.resolve()})).fail(e.reject)})).progress(e.notify).fail(e.reject)})).fail(e.reject),e):e}},{key:"multipartStart",value:function(){var e,t=this;return e={UPLOADCARE_PUB_KEY:this.settings.publicKey,signature:this.settings.secureSignature,expire:this.settings.secureExpire,filename:this.fileName,source:this.sourceInfo.source,size:this.fileSize,content_type:this.fileType,part_size:this.settings.multipartPartSize,UPLOADCARE_STORE:this.settings.doNotStore?"":"auto"},this.__autoAbort(ye("".concat(this.settings.urlBase,"/multipart/start/?jsonerrors=1"),"POST",e,{headers:{"X-UC-User-Agent":this.settings._userAgent}})).fail((function(n){if(t.settings.debugUploads)return B("Can't start multipart upload.",n.message,e)}))}},{key:"uploadParts",value:function(e,t){var r,i,o,a,s,l,u,c,d,f,p=this;for(s=[],a=Date.now(),f=function(e,t){var n,i,o;if(s[e]=t,!(Date.now()-a<250)){for(a=Date.now(),o=0,n=0,i=s.length;n=p.fileSize))return l=c+p.settings.multipartPartSize,p.fileSizep.settings.multipartMaxAttempts?(p.settings.debugUploads&&B("Part #".concat(h," and file upload is failed."),t),r.reject()):(p.settings.debugUploads&&z("Part #".concat(h,"(").concat(o,") upload is failed."),t),m())},success:function(){if(i-=1,u(),!i)return r.resolve()}}))})()},o=0,l=this.settings.multipartConcurrency;l>=0?ol;l>=0?++o:--o)u();return r}},{key:"multipartComplete",value:function(e){var t,n=this;return t={UPLOADCARE_PUB_KEY:this.settings.publicKey,uuid:e},this.__autoAbort(ye("".concat(this.settings.urlBase,"/multipart/complete/?jsonerrors=1"),"POST",t,{headers:{"X-UC-User-Agent":this.settings._userAgent}})).fail((function(t){if(n.settings.debugUploads)return B("Can't complete multipart upload.",e,n.settings.publicKey,t.message)}))}}]),r}(jt);Mt.prototype.sourceName="local";var Lt=function(e){f(r,e);var t=v(r);function r(e){var i;return s(this,r),(i=t.apply(this,arguments)).__input=e,i.fileId=ee(),i.fileName=n.default(i.__input).val().split("\\").pop(),i.__notifyApi(),i}return c(r,[{key:"__startUpload",value:function(){var e,t,r,i;return e=n.default.Deferred(),i="".concat(this.settings.urlBase,"/iframe/"),r="uploadcare--iframe-".concat(this.fileId),this.__iframe=n.default("