diff --git a/docs/asset-manifest.json b/docs/asset-manifest.json deleted file mode 100644 index b6a6b5b..0000000 --- a/docs/asset-manifest.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "files": { - "main.css": "/react-coffee-warehouse/static/css/main.019dfaa7.chunk.css", - "main.js": "/react-coffee-warehouse/static/js/main.d4e5ee9b.chunk.js", - "main.js.map": "/react-coffee-warehouse/static/js/main.d4e5ee9b.chunk.js.map", - "runtime-main.js": "/react-coffee-warehouse/static/js/runtime-main.4fe95d75.js", - "runtime-main.js.map": "/react-coffee-warehouse/static/js/runtime-main.4fe95d75.js.map", - "static/js/2.8baf995e.chunk.js": "/react-coffee-warehouse/static/js/2.8baf995e.chunk.js", - "static/js/2.8baf995e.chunk.js.map": "/react-coffee-warehouse/static/js/2.8baf995e.chunk.js.map", - "index.html": "/index.html", - "precache-manifest.297b768b09adb33ced6ce456f857ddef.js": "/precache-manifest.297b768b09adb33ced6ce456f857ddef.js", - "service-worker.js": "/service-worker.js", - "static/css/main.019dfaa7.chunk.css.map": "/react-coffee-warehouse/static/css/main.019dfaa7.chunk.css.map", - "static/js/2.8baf995e.chunk.js.LICENSE.txt": "/react-coffee-warehouse/static/js/2.8baf995e.chunk.js.LICENSE.txt", - "static/media/App.scss": "/react-coffee-warehouse/static/media/profile-icon.aebef4ea.svg", - "static/media/github-icon.svg": "/react-coffee-warehouse/static/media/github-icon.767e15a2.svg", - "static/media/header-bg.png": "/react-coffee-warehouse/static/media/header-bg.f1a95872.png", - "static/media/kendoka.png": "/react-coffee-warehouse/static/media/kendoka.1240069c.png", - "static/media/user-avatar.jpg": "/react-coffee-warehouse/static/media/user-avatar.5bded05c.jpg" - }, - "entrypoints": [ - "static/js/runtime-main.4fe95d75.js", - "static/js/2.8baf995e.chunk.js", - "static/css/main.019dfaa7.chunk.css", - "static/js/main.d4e5ee9b.chunk.js" - ] -} \ No newline at end of file diff --git a/docs/favicon.ico b/docs/favicon.ico deleted file mode 100644 index 667b63a..0000000 Binary files a/docs/favicon.ico and /dev/null differ diff --git a/docs/index.html b/docs/index.html deleted file mode 100644 index 47ce534..0000000 --- a/docs/index.html +++ /dev/null @@ -1 +0,0 @@ -React App
\ No newline at end of file diff --git a/docs/logo192.png b/docs/logo192.png deleted file mode 100644 index fc44b0a..0000000 Binary files a/docs/logo192.png and /dev/null differ diff --git a/docs/logo512.png b/docs/logo512.png deleted file mode 100644 index a4e47a6..0000000 Binary files a/docs/logo512.png and /dev/null differ diff --git a/docs/manifest.json b/docs/manifest.json deleted file mode 100644 index 080d6c7..0000000 --- a/docs/manifest.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "short_name": "React App", - "name": "Create React App Sample", - "icons": [ - { - "src": "favicon.ico", - "sizes": "64x64 32x32 24x24 16x16", - "type": "image/x-icon" - }, - { - "src": "logo192.png", - "type": "image/png", - "sizes": "192x192" - }, - { - "src": "logo512.png", - "type": "image/png", - "sizes": "512x512" - } - ], - "start_url": ".", - "display": "standalone", - "theme_color": "#000000", - "background_color": "#ffffff" -} diff --git a/docs/precache-manifest.297b768b09adb33ced6ce456f857ddef.js b/docs/precache-manifest.297b768b09adb33ced6ce456f857ddef.js deleted file mode 100644 index c1cd4bc..0000000 --- a/docs/precache-manifest.297b768b09adb33ced6ce456f857ddef.js +++ /dev/null @@ -1,66 +0,0 @@ -self.__precacheManifest = (self.__precacheManifest || []).concat([ - { - "revision": "896a7fcac9b864db2a3c19bd7306a928", - "url": "/index.html" - }, - { - "revision": "a99aba14b99ef0932a88", - "url": "/react-coffee-warehouse/static/css/main.019dfaa7.chunk.css" - }, - { - "revision": "d552af64bdf68e597c99", - "url": "/react-coffee-warehouse/static/js/2.8baf995e.chunk.js" - }, - { - "revision": "062913c50fbfed6b707a4635ea70f373", - "url": "/react-coffee-warehouse/static/js/2.8baf995e.chunk.js.LICENSE.txt" - }, - { - "revision": "a99aba14b99ef0932a88", - "url": "/react-coffee-warehouse/static/js/main.d4e5ee9b.chunk.js" - }, - { - "revision": "9082c8da168f0d9a90cd", - "url": "/react-coffee-warehouse/static/js/runtime-main.4fe95d75.js" - }, - { - "revision": "902317fdbd909bd41d7d3ce7507480e3", - "url": "/react-coffee-warehouse/static/media/dashboard-icon.902317fd.svg" - }, - { - "revision": "767e15a2d37aa8d15243fbb47dc7a5ea", - "url": "/react-coffee-warehouse/static/media/github-icon.767e15a2.svg" - }, - { - "revision": "a38c6bf1bb2051940b6b688e0a740a1e", - "url": "/react-coffee-warehouse/static/media/hamburger-icon.a38c6bf1.svg" - }, - { - "revision": "f1a95872000855a776e227749be29003", - "url": "/react-coffee-warehouse/static/media/header-bg.f1a95872.png" - }, - { - "revision": "3dcf0753205aa58b88ae996e09913308", - "url": "/react-coffee-warehouse/static/media/info-background.3dcf0753.svg" - }, - { - "revision": "ff22489feae9e2f52b6bd83664248b5f", - "url": "/react-coffee-warehouse/static/media/info-icon.ff22489f.svg" - }, - { - "revision": "1240069c54476e33278a5567e3159c49", - "url": "/react-coffee-warehouse/static/media/kendoka.1240069c.png" - }, - { - "revision": "1982fdfcb2d5643a2d23708f8089ad34", - "url": "/react-coffee-warehouse/static/media/planning-icon.1982fdfc.svg" - }, - { - "revision": "aebef4eac1542e1636b3fb59b2a178e6", - "url": "/react-coffee-warehouse/static/media/profile-icon.aebef4ea.svg" - }, - { - "revision": "5bded05c4648ff9a54505ec152a73618", - "url": "/react-coffee-warehouse/static/media/user-avatar.5bded05c.jpg" - } -]); \ No newline at end of file diff --git a/docs/robots.txt b/docs/robots.txt deleted file mode 100644 index e9e57dc..0000000 --- a/docs/robots.txt +++ /dev/null @@ -1,3 +0,0 @@ -# https://www.robotstxt.org/robotstxt.html -User-agent: * -Disallow: diff --git a/docs/service-worker.js b/docs/service-worker.js deleted file mode 100644 index a3b53b4..0000000 --- a/docs/service-worker.js +++ /dev/null @@ -1,39 +0,0 @@ -/** - * Welcome to your Workbox-powered service worker! - * - * You'll need to register this file in your web app and you should - * disable HTTP caching for this file too. - * See https://goo.gl/nhQhGp - * - * The rest of the code is auto-generated. Please don't update this file - * directly; instead, make changes to your Workbox build configuration - * and re-run your build process. - * See https://goo.gl/2aRDsh - */ - -importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js"); - -importScripts( - "/precache-manifest.297b768b09adb33ced6ce456f857ddef.js" -); - -self.addEventListener('message', (event) => { - if (event.data && event.data.type === 'SKIP_WAITING') { - self.skipWaiting(); - } -}); - -workbox.core.clientsClaim(); - -/** - * The workboxSW.precacheAndRoute() method efficiently caches and responds to - * requests for URLs in the manifest. - * See https://goo.gl/S9QRab - */ -self.__precacheManifest = [].concat(self.__precacheManifest || []); -workbox.precaching.precacheAndRoute(self.__precacheManifest, {}); - -workbox.routing.registerNavigationRoute(workbox.precaching.getCacheKeyForURL("/index.html"), { - - blacklist: [/^\/_/,/\/[^\/?]+\.[^\/]+$/], -}); diff --git a/docs/static/css/main.019dfaa7.chunk.css b/docs/static/css/main.019dfaa7.chunk.css deleted file mode 100644 index 8dd0427..0000000 --- a/docs/static/css/main.019dfaa7.chunk.css +++ /dev/null @@ -1,2 +0,0 @@ -body{margin:0;padding:0;list-style-type:none;font-family:"Roboto"}h1{font-size:1.25rem;font-weight:400}h2{font-size:1rem;font-weight:200}h3{font-weight:400}h3,h4,h5{font-size:1.25rem}a,p{font-size:1rem}@media (min-width:480px){h1{font-size:1.5rem;font-weight:400}h2{font-size:1.25rem;font-weight:200}}@media (min-width:768px){h1{font-weight:400}h1,h2{font-size:1.75rem}h2{font-weight:200}}body,h1,h2,h3,ul{margin:0;padding:0}a{text-decoration:none}li,ul{list-style:none}.k-drawer-container{background-color:#d4d6e4;min-height:calc(100vh - 80px)}.k-drawer-container .k-drawer{box-shadow:0 0 10px rgba(0,0,0,.2);border-right-width:0!important}.k-drawer-container .k-drawer-item{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.k-drawer-container .k-drawer-item:not(.k-drawer-separator){padding:16px 8px}.k-drawer-container .k-drawer-item .k-icon{-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;background-color:#656565;width:20px}.k-drawer-container .k-drawer-item .k-icon.dashboard-icon{-webkit-mask-image:url(/react-coffee-warehouse/static/media/dashboard-icon.902317fd.svg);mask-image:url(/react-coffee-warehouse/static/media/dashboard-icon.902317fd.svg);margin-top:3px;margin-left:7px}.k-drawer-container .k-drawer-item .k-icon.planning-icon{-webkit-mask-image:url(/react-coffee-warehouse/static/media/planning-icon.1982fdfc.svg);mask-image:url(/react-coffee-warehouse/static/media/planning-icon.1982fdfc.svg)}.k-drawer-container .k-drawer-item .k-icon.profile-icon{-webkit-mask-image:url(/react-coffee-warehouse/static/media/profile-icon.aebef4ea.svg);mask-image:url(/react-coffee-warehouse/static/media/profile-icon.aebef4ea.svg)}.k-drawer-container .k-drawer-item .k-icon.info-icon{-webkit-mask-image:url(/react-coffee-warehouse/static/media/info-icon.ff22489f.svg);mask-image:url(/react-coffee-warehouse/static/media/info-icon.ff22489f.svg)}.card-container,.k-drawer-container .k-drawer-item.k-state-selected .k-icon.dashboard-icon,.k-drawer-container .k-drawer-item.k-state-selected .k-icon.info-icon,.k-drawer-container .k-drawer-item.k-state-selected .k-icon.planning-icon,.k-drawer-container .k-drawer-item.k-state-selected .k-icon.profile-icon{background-color:#fff}.card-container{padding:40px 0;text-align:center}.card-container.grid{display:grid;grid-template-columns:repeat(1,1fr);grid-column-gap:10px;-webkit-column-gap:10px;column-gap:10px;grid-row-gap:1em;row-gap:1em}.card-container .card-buttons .k-button{min-width:105px}.card-container .card-ranges .k-daterangepicker .k-floating-label-container,.card-container .card-ranges .k-daterangepicker .k-textbox-container{padding-top:0;min-width:105px}.card-container .card-ranges .k-daterangepicker .k-label{display:none}.card-container .card-component{grid-column:1/-1}.card-container .card-component .k-chart,.card-container .card-component .k-grid{max-width:1360px;margin:0 auto}@media (min-width:480px){.card-container{text-align:left;text-align:initial;padding:30px}.card-container.grid{grid-template-columns:repeat(2,1fr)}.card-container .card-title{grid-column:1/2;grid-row:1}.card-container .card-buttons{text-align:center;grid-column:1/-1;grid-row:2}.card-container .card-ranges{text-align:right;grid-column:2/3;grid-row:1}}@media (min-width:768px){.card-container{margin:25px;border-radius:5px;box-shadow:0 0 10px rgba(0,0,0,.2)}.card-container.grid{grid-template-columns:repeat(3,1fr)}.card-container .card-buttons{text-align:center;grid-column:2/3;grid-row:1}.card-container .card-ranges{text-align:right;grid-column:3/4}.card-container .card-component{grid-column-start:1;grid-column-end:-1}}.header{height:80px}.header .nav-container{display:flex;flex-direction:row;align-items:center;justify-content:space-between;height:100%;color:#fff}.header .menu-button{flex:0 0 50px;text-align:center}.header .hamburger-icon{background-image:url(/react-coffee-warehouse/static/media/hamburger-icon.a38c6bf1.svg);background-repeat:no-repeat;width:20px}.header .title{display:flex;flex:1 0 auto;flex-direction:column;align-items:flex-start;margin-left:25px}.header .k-avatar{display:block;margin:0 25px;border:1px solid #fff}.header .k-avatar,.header .k-avatar img{width:40px;height:40px}.header .settings{display:none}@media (min-width:480px){.header .title{flex-direction:row;align-items:center}.header .vl{border-left:1px solid #fff;height:25px;margin:6px 15px}}@media (min-width:768px){.header .settings{display:flex;flex:0 0 auto;align-items:center}.header .k-dropdown{max-width:90px;margin-left:15px}}.dashboard-page .card-container:last-of-type{padding-top:0}@media (min-width:768px){.dashboard-page .card-container:last-of-type{padding-top:30px}}.planning-page .card-container{grid-template-columns:repeat(1,1fr)}.planning-page .card-title{grid-column:1/-1}.planning-page .k-hbox{padding:0 20px;background:transparent}.planning-page .k-avatar{width:41px;height:41px}.planning-page .k-card-title{font-size:15px;margin-bottom:-6px;text-align:left}.planning-page .k-card-subtitle{margin-top:0;text-transform:uppercase;font-size:11px}@media (min-width:480px){.planning-page .card-container{grid-template-columns:repeat(2,1fr)}}@media (min-width:768px){.planning-page .card-container{grid-template-columns:repeat(5,1fr)}.planning-page .k-hbox{padding:0;border-width:0}}.profile-page .card-container{text-align:left}.profile-page .k-form .k-form-field{display:block;padding:0 15px}.profile-page .k-form-field:first-of-type .k-form-field-wrap{margin:auto}.profile-page .k-form-field:first-of-type .k-avatar{margin:0 auto 1rem}.profile-page .k-form.k-form-horizontal .k-label{width:100%}.profile-page hr{margin-top:1rem;opacity:.2}.profile-page .k-form .k-form-buttons{justify-content:center}.profile-page .k-form .k-form-buttons>*{min-width:140px}@media (min-width:480px){.profile-page .k-form .k-form-field{display:flex}.profile-page .k-form-field:first-of-type .k-avatar{margin:0}.profile-page .k-form.k-form-horizontal .k-label{width:25%}}@media (min-width:768px){.profile-page .k-form{margin:0 auto;padding:0}.profile-page .k-form .k-form-field{padding:0}}.info-page{background-color:#151950;color:#fff}.info-page .component-link,.info-page h1,.info-page h2,.info-page h3{font-family:Metric,Helvetica,Arial,sans-serif}.info-page a:not(.k-button){color:#71a6ff}.info-page .content{padding-top:40px;margin:0 auto;position:relative;max-width:820px}.info-page .kendoka{text-align:center}.info-page .kendoka img{max-width:280px}.info-page .section-1{text-align:center}.info-page .section-1 h1{font-size:48px;font-weight:700;color:#53d2fa}.info-page .section-1 h2{font-size:30px;margin-bottom:53px}.info-page .section-1 .button-group{margin-bottom:30px}.info-page .section-1 .button-group .k-button{display:block;margin:10px auto;min-width:145px;width:60%}.info-page .section-1 .github-link{display:inline-flex;flex-direction:row;align-items:center;align-content:center}.info-page .section-1 .github-link .github-text{margin-left:15px}.info-page .section-2{text-align:center;margin-top:40px;padding:0 15px}.info-page .section-3{-webkit-columns:2;-webkit-column-count:2;column-count:2;margin-top:40px;padding:0 15px}.info-page .package-item{display:inline-block;margin-top:20px}.info-page .package-title a{font-size:17px;color:#ccc;text-transform:uppercase}.info-page .component-link{padding:5px 0}.info-page .component-link a{font-size:20px}.info-page .footer{background-image:url(/react-coffee-warehouse/static/media/info-background.3dcf0753.svg);background-repeat:no-repeat;height:320px}@media (min-width:480px){.info-page .content{padding:40px 40px 0}.info-page .kendoka img{max-width:348px}.info-page .section-1 h1{font-size:71px}.info-page .section-1 h2{font-size:38px}.info-page .section-1 .button-group .k-button{display:inline-block;margin-right:10px;width:auto}.info-page .section-3{-webkit-columns:3;-webkit-column-count:3;column-count:3}}@media (min-width:768px){.info-page .content{padding:120px 40px 0}.info-page .kendoka{position:absolute;right:0;top:2em;text-align:left}.info-page .section-1,.info-page .section-2{text-align:left;padding:0}.info-page .section-3{-webkit-columns:4;-webkit-column-count:4;column-count:4;padding:0}.info-page .footer{background-size:cover}} -/*# sourceMappingURL=main.019dfaa7.chunk.css.map */ \ No newline at end of file diff --git a/docs/static/css/main.019dfaa7.chunk.css.map b/docs/static/css/main.019dfaa7.chunk.css.map deleted file mode 100644 index e858239..0000000 --- a/docs/static/css/main.019dfaa7.chunk.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["App.scss","styles/_typography.scss","styles/_common.scss","styles/_variables.scss"],"names":[],"mappings":"AAAA,KACI,QAAS,CACT,SAAU,CACV,oBAAA,CCFA,oBDEqB,CCDxB,GAGG,iBAAkB,CAClB,eAAgB,CACnB,GAEG,cAAiB,CACjB,eAAgB,CACnB,GAGG,eAAgB,CAInB,SAEG,iBAAkB,CAIrB,IAEG,cAAe,CAClB,yBAGG,GACI,gBAAiB,CACjB,eAAgB,CACnB,GAEG,iBAAkB,CAClB,eAAgB,CACnB,CAGL,yBACI,GAEI,eAAgB,CACnB,MAFG,iBAKgB,CAHnB,GAGG,eAAgB,CACnB,CC/CL,iBAKI,QAAS,CACT,SAAU,CACb,EAGG,oBAAqB,CACxB,MAIG,eAAgB,CACnB,oBAIG,wBCpBsB,CDqBtB,6BAA8B,CAFlC,8BAKQ,kCAAmC,CACnC,8BAAgC,CANxC,mCASQ,wBAAA,CAAA,qBAAA,CAAA,oBAAA,CAAA,gBAAiB,CATzB,4DAYY,gBAAiB,CAZ7B,2CAgBY,6BAA8B,CAC9B,qBAAsB,CACtB,wBAAyB,CACzB,UAAW,CAnBvB,0DAsBgB,iEACA,CAAA,yDACA,CAAe,cACf,CAAA,eAzBhB,CAAA,yDA6BgB,gEACA,CAAA,wDA9BhB,CAAA,wDAiCgB,+DACA,CAAA,uDAlChB,CAAA,qDAqCgB,4DACA,CAAA,oDAtChB,CAuDI,oTAPS,qBAYL,CALJ,gBAFJ,cAMQ,CAAA,iBACA,CAAA,qBAAA,YACA,CAAA,mCAAA,CAAA,oBAAgB,CAChB,uBAAA,CAAA,eATR,CAAA,gBAAA,CAAA,WAAA,CAkBY,wCAlBZ,eAAA,CAAA,iJAAA,aAAA,CAAA,eAAA,CAAA,yDAAA,YAoCQ,CAAA,gCApCR,gBAAA,CAAA,iFAyCS,gBAAA,CAKL,aAAA,CAAA,yBACI,gBACA,eAFJ,CAAA,kBAKQ,CAAA,YAAA,CAAA,qBALR,mCASQ,CAAA,4BATR,eAAA,CAAA,UAcQ,CAAA,8BAEA,iBAhBR,CAAA,gBAAA,CAoBQ,UAAA,CAAA,6BAEA,gBAMZ,CAAA,eACI,CAAA,UAAA,CAAA,CAAA,yBAEI,gBACA,WAAA,CAAA,iBAHJ,CAAA,kCAMQ,CAAA,qBANR,mCAcQ,CAAA,8BAEA,iBAhBR,CAAA,eAAA,CAoBQ,UAAA,CAAA,6BApBR,gBAAA,CAAA,eAyBQ,CAAA,gCAOZ,mBACgB,CADhB,kBAAA,CAAA,CAAA,QAIQ,WACA,CAAA,uBACA,YACA,CAAA,kBAAA,CAAA,kBACA,CAAA,6BARR,CAAA,WAaQ,CAAA,UACA,CAAA,qBAdR,aAAA,CAAA,iBAkBQ,CAAA,wBAAA,+DAlBR,CAAA,2BAyBQ,CAAA,UACA,CAAA,eAAA,YACA,CAAA,aACA,CAAA,qBA5BR,CAAA,sBAgCQ,CAAA,gBAEA,CAAA,kBACA,aACA,CApCR,aAuCY,CAAA,qBAvCZ,CAAA,wCAoCQ,UAAA,CAAA,WAUH,CAAA,kBAID,YAEQ,CAAA,yBACA,eAHR,kBAMQ,CAAA,kBACA,CAAA,YACA,0BAKZ,CAAA,WACI,CAAA,eAEQ,CAAA,CAAA,yBAEA,kBAJR,YAAA,CAAA,aAQQ,CAAA,kBACA,CAAA,oBAMZ,cAAA,CAAA,gBAEQ,CAAA,CAAA,6CAKJ,aAAA,CAAA,yBAEQ,6CAKZ,gBAEQ,CAAA,CAAA,+BAFR,mCAAA,CAAA,2BAQQ,gBACA,CAAA,uBATR,cAAA,CAAA,sBAaQ,CAAY,yBAbpB,UAgBQ,CAAA,WACA,CAAA,6BACA,cAlBR,CAAA,kBAAA,CAAA,eAsBQ,CAAA,gCACA,YACH,CAAA,wBAID,CAAA,cAAA,CAAA,yBAEQ,+BAKZ,mCACI,CAAA,CAAA,yBAEQ,+BAFR,mCAOQ,CAAe,uBAM3B,SAEQ,CAAA,cAAgB,CAFxB,CAAA,8BAAA,eAMQ,CAAA,oCANR,aAAA,CAAA,cAAA,CAAA,6DAAA,WAAA,CAAA,oDAAA,kBAAA,CAAA,iDAwBQ,UAxBR,CAAA,iBAAA,eAAA,CAAA,UA4BQ,CAAA,sCA5BR,sBA+BY,CAAA,wCAMR,eAAA,CAAA,yBAEQ,oCAFR,YAAA,CAAA,oDAAA,QAAA,CAAA,iDAgBA,SAAA,CAAA,CAAA,yBAAA,sBAAA,aAMQ,CAAA,SACH,CAMT,oCAEI,SAAA,CCjYW,CD+Xf,WAAA,wBAAA,CAAA,UAAA,CAAA,qEAAA,6CAAA,CAAA,4BAYQ,aACA,CAAA,oBACA,gBACA,CAAgB,aAfxB,CAAA,iBAmBQ,CAAA,eAnBR,CAAA,oBAqBY,iBArBZ,CAAA,wBA0BQ,eA1BR,CAAA,sBA4BY,iBACA,CAAA,yBA7BZ,cAAA,CAAA,eAkCY,CAAA,aACA,CAAA,yBAnCZ,cAAA,CAAA,kBAuCY,CAAA,oCAvCZ,kBA0CgB,CAAA,8CAGA,aA7ChB,CAAA,gBAAA,CAAA,eAkDY,CAAA,SAAA,CAAA,mCAEA,mBACA,CAAA,kBArDZ,CAAA,kBAAA,CAAA,oBAAA,CAAA,gDA8DQ,gBACA,CAAA,sBACA,iBAhER,CAAA,eAoEQ,CAAA,cACA,CAAA,sBAAA,iBACA,CAAA,sBAtER,CAAA,cAAA,CAAA,eA2EQ,CAAA,cACA,CAAA,yBA5ER,oBAgFQ,CAAA,eACA,CAAA,4BACA,cAlFR,CAAA,UAAA,CAAA,wBAAA,CAAA,2BAyFY,aAzFZ,CAAA,6BA8FQ,cAAA,CAAA,mBAAA,gEAGH,CAAA,2BAID,CAAA,YAEQ,CAAA,yBAFR,oBAMY,mBANZ,CAAA,wBAY2B,eAZ3B,CAAA,yBAAA,cAAA,CAAA,yBAAA,cAqBgB,CAAA,8CArBhB,oBA4BQ,CAAA,iBACA,CAAA,UAAA,CAAA,sBAAe,iBAK3B,CAAA,sBACI,CAAA,cAEQ,CAAA,CAAA,yBAFR,oBAKQ,oBAGA,CAAA,oBARR,iBAAA,CAAA,OAAA,CAAA,OAAA,CAAA,eAYQ,CAAA,4CAIA,eACA,CAAA,SAAA,CAAA,sBAAe,iBAjBvB,CAAA,sBAqBQ,CAAA,cACH,CAAA,SAAA,CAAA,mBAAA,qBAAA,CAAA","file":"main.019dfaa7.chunk.css","sourcesContent":["body {\n margin: 0;\n padding: 0;\n list-style-type: none;\n}\n\n@import \"./styles/main.scss\";","body {\n font-family: \"Roboto\";\n}\n\nh1 {\n font-size: 1.25rem;\n font-weight: 400;\n}\nh2 {\n font-size: 1.0rem;;\n font-weight: 200;\n}\nh3 {\n font-size: 1.25rem;\n font-weight: 400;\n}\nh4 {\n font-size: 1.25rem;\n}\nh5 {\n font-size: 1.25rem;\n}\np {\n font-size: 1rem;\n}\na {\n font-size: 1rem;\n}\n\n@media (min-width: 480px) {\n h1 {\n font-size: 1.5rem;\n font-weight: 400;\n }\n h2 {\n font-size: 1.25rem;;\n font-weight: 200;\n }\n}\n\n@media (min-width: 768px) { \n h1 {\n font-size: 1.75rem;\n font-weight: 400;\n }\n h2 {\n font-size: 1.75rem;;\n font-weight: 200;\n }\n}","// Normalization\nbody,\nh1,\nh2,\nh3,\nul {\n margin: 0;\n padding: 0;\n}\n\na {\n text-decoration: none;\n}\n\nul,\nli {\n list-style: none;\n}\n\n// App styles\n.k-drawer-container {\n background-color: $background-color;\n min-height: calc(100vh - 80px);\n\n .k-drawer {\n box-shadow: 0 0 10px rgba(0,0,0,.2);\n border-right-width: 0 !important;\n }\n .k-drawer-item {\n user-select: none;\n\n &:not(.k-drawer-separator) {\n padding: 16px 8px;\n }\n\n .k-icon {\n -webkit-mask-repeat: no-repeat;\n mask-repeat: no-repeat;\n background-color: #656565;\n width: 20px;\n\n &.dashboard-icon {\n -webkit-mask-image: url('./../assets/dashboard-icon.svg');\n mask-image: url('./../assets/dashboard-icon.svg');\n margin-top: 3px;\n margin-left: 7px;\n \n }\n &.planning-icon {\n -webkit-mask-image: url('./../assets/planning-icon.svg');\n mask-image: url('./../assets/planning-icon.svg');\n }\n &.profile-icon {\n -webkit-mask-image: url('./../assets/profile-icon.svg');\n mask-image: url('./../assets/profile-icon.svg');\n }\n &.info-icon {\n -webkit-mask-image: url('./../assets/info-icon.svg');\n mask-image: url('./../assets/info-icon.svg');\n }\n }\n \n &.k-state-selected .k-icon {\n &.dashboard-icon,\n &.planning-icon,\n &.profile-icon,\n &.info-icon {\n background-color: #ffffff;\n }\n }\n }\n}\n\n.card-container {\n background-color: $white;\n padding: 40px 0;\n text-align: center;\n\n &.grid {\n display: grid;\n grid-template-columns: repeat(1, 1fr);\n column-gap: 10px;\n row-gap: 1em;\n }\n\n .card-title {\n\n }\n\n .card-buttons {\n .k-button {\n min-width: 105px;\n }\n }\n\n .card-ranges {\n .k-daterangepicker {\n .k-textbox-container, .k-floating-label-container {\n padding-top: 0; \n min-width: 105px;\n }\n\n .k-label {\n display: none;\n }\n }\n }\n\n .card-component {\n grid-column: 1 / -1;\n\n .k-chart, .k-grid {\n max-width: 1360px;\n margin: 0 auto;\n }\n }\n}\n\n@media (min-width: 480px) {\n .card-container {\n text-align: initial;\n padding: 30px;\n\n &.grid {\n grid-template-columns: repeat(2, 1fr);\n }\n\n .card-title {\n grid-column: 1 / 2;\n grid-row: 1;\n }\n\n .card-buttons {\n text-align: center;\n grid-column: 1 / -1;\n grid-row: 2;\n }\n\n .card-ranges {\n text-align: right;\n grid-column: 2 / 3;\n grid-row: 1;\n }\n }\n\n }\n\n@media (min-width: 768px) { \n .card-container {\n margin: 25px;\n border-radius: 5px;\n box-shadow: 0 0 10px rgba(0,0,0,.2);\n\n &.grid {\n grid-template-columns: repeat(3, 1fr);\n }\n\n .card-title {\n\n }\n\n .card-buttons {\n text-align: center;\n grid-column: 2 / 3;\n grid-row: 1;\n }\n\n .card-ranges {\n text-align: right;\n grid-column: 3 / 4;\n }\n\n .card-component {\n grid-column-start: 1;\n grid-column-end: -1;\n }\n }\n}\n\n// Header\n.header {\n height: 80px;\n\n .nav-container {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n height: 100%;\n color: $white;\n }\n\n .menu-button {\n flex: 0 0 50px;\n text-align: center;\n }\n\n .hamburger-icon {\n background-image: url('./../assets/hamburger-icon.svg');\n background-repeat: no-repeat;\n width: 20px;\n }\n\n .title {\n display: flex;\n flex: 1 0 auto;\n flex-direction: column;\n align-items: flex-start;\n margin-left: 25px;\n }\n\n .k-avatar {\n display: block;\n width: 40px;\n height: 40px;\n margin: 0 25px;\n border: 1px solid white;\n\n img {\n width: 40px;\n height: 40px;\n }\n }\n\n .settings {\n display: none;\n }\n}\n\n@media (min-width: 480px) {\n .header {\n .title {\n flex-direction: row;\n align-items: center;\n }\n .vl {\n border-left: 1px solid $white;\n height: 25px;\n margin: 6px 15px;\n }\n }\n}\n\n@media (min-width: 768px) {\n .header {\n .settings {\n display: flex;\n flex: 0 0 auto;\n align-items: center;\n }\n \n .k-dropdown {\n max-width: 90px;\n margin-left: 15px;\n }\n }\n}\n\n// Dashboard page\n.dashboard-page {\n .card-container:last-of-type {\n padding-top: 0;\n }\n}\n\n@media (min-width: 768px) {\n .dashboard-page {\n .card-container:last-of-type {\n padding-top: 30px;\n }\n }\n}\n// Planning page \n.planning-page {\n .card-container {\n grid-template-columns: repeat(1, 1fr);\n }\n .card-title{\n grid-column: 1 / -1;\n }\n .k-hbox {\n padding: 0 20px;\n background: transparent;\n }\n .k-avatar {\n width: 41px;\n height: 41px;\n }\n .k-card-title {\n font-size: 15px;\n margin-bottom: -6px;\n text-align: left;\n }\n .k-card-subtitle {\n margin-top: 0;\n text-transform: uppercase;\n font-size: 11px;\n }\n}\n\n@media (min-width: 480px) {\n .planning-page {\n .card-container {\n grid-template-columns: repeat(2, 1fr);\n }\n }\n}\n\n@media (min-width: 768px) {\n .planning-page {\n .card-container {\n grid-template-columns: repeat(5, 1fr);\n }\n\n .k-hbox {\n padding: 0;\n border-width: 0;\n }\n }\n}\n\n// Profile page\n.profile-page {\n .card-container {\n text-align: left;\n }\n\n .k-form .k-form-field {\n display: block;\n padding: 0 15px;\n }\n\n .k-form-field:first-of-type .k-form-field-wrap {\n margin: auto;\n }\n\n .k-form-field:first-of-type .k-avatar {\n margin: 0 auto 1rem;\n }\n\n .k-form.k-form-horizontal .k-label {\n width: 100%;\n }\n\n hr {\n margin-top: 1rem;\n opacity: 0.2;\n }\n\n .k-form .k-form-buttons {\n justify-content: center;\n\n & > * {\n min-width: 140px;\n }\n }\n}\n\n@media (min-width: 480px) {\n .profile-page {\n .k-form .k-form-field {\n display: flex;\n }\n\n .k-form-field:first-of-type .k-avatar {\n margin: 0;\n }\n\n .k-form.k-form-horizontal .k-label {\n width: 25%;\n }\n }\n}\n\n @media (min-width: 768px) { \n .profile-page {\n .k-form {\n margin: 0 auto;\n padding: 0;\n }\n .k-form .k-form-field {\n padding: 0;\n }\n }\n }\n\n\n// Info page\n.info-page {\n background-color: $info-background;\n color: $white;\n\n h1, h2, h3, .component-link {\n font-family: Metric,Helvetica,Arial,sans-serif;\n }\n a:not(.k-button) {\n color: $link-color;\n }\n \n .content {\n padding-top: 40px;\n margin: 0 auto;\n position: relative;\n max-width: 820px;\n }\n\n .kendoka {\n text-align: center;\n img {\n max-width: 280px;\n }\n }\n\n .section-1 {\n text-align: center;\n h1 {\n font-size: 48px;\n font-weight: bold;\n color: $react-color;\n }\n\n h2 {\n font-size: 30px;\n margin-bottom: 53px;\n }\n\n .button-group {\n margin-bottom: 30px;\n\n .k-button {\n display: block;\n margin: 10px auto;\n min-width: 145px;\n width: 60%;\n }\n }\n\n .github-link {\n display: inline-flex;\n flex-direction: row;\n align-items: center;\n align-content: center;\n\n .github-text {\n margin-left: 15px;\n }\n }\n }\n\n .section-2 {\n text-align: center;\n margin-top: 40px;\n padding: 0 15px;\n }\n\n .section-3 {\n -webkit-columns: 2;\n column-count: 2;\n margin-top: 40px;\n padding: 0 15px;\n }\n\n .package-item {\n display: inline-block;\n margin-top: 20px;\n }\n\n .package-title a {\n font-size: 17px;\n color: #CCCCCC;\n text-transform: uppercase;\n }\n\n .component-link {\n padding: 5px 0;\n \n a {\n font-size: 20px;\n }\n }\n\n .footer {\n background-image: url('../assets/info-background.svg');\n background-repeat: no-repeat;\n height: 320px;\n }\n}\n\n@media (min-width: 480px) { \n .info-page {\n .content {\n padding: 40px 40px 0;\n }\n .kendoka {\n img {\n max-width: 348px;\n }\n }\n\n .section-1 {\n h1 {\n font-size: 71px;\n }\n\n h2 {\n font-size: 38px;\n }\n\n .button-group {\n .k-button {\n display: inline-block;\n margin-right: 10px;\n width: auto;\n }\n }\n }\n .section-3 {\n -webkit-columns: 3;\n column-count: 3;\n }\n }\n}\n\n@media (min-width: 768px) { \n .info-page {\n .content {\n padding: 120px 40px 0;\n }\n .kendoka {\n position: absolute;\n right: 0;\n top: 2em;\n text-align: left;\n }\n .section-1,\n .section-2 {\n text-align: left;\n padding: 0;\n }\n .section-3 {\n -webkit-columns: 4;\n column-count: 4;\n padding: 0;\n }\n .footer {\n background-size: cover;\n }\n }\n}","// Global variables here\n$background-color: #D4D6E4;\n$info-background: #151950;\n$react-color: #53d2fa;\n$link-color: #71A6FF;\n$white: #FFFFFF;"]} \ No newline at end of file diff --git a/docs/static/js/2.8baf995e.chunk.js b/docs/static/js/2.8baf995e.chunk.js deleted file mode 100644 index 93f7b67..0000000 --- a/docs/static/js/2.8baf995e.chunk.js +++ /dev/null @@ -1,3 +0,0 @@ -/*! For license information please see 2.8baf995e.chunk.js.LICENSE.txt */ -(this["webpackJsonpcoffee-warehouse"]=this["webpackJsonpcoffee-warehouse"]||[]).push([[2],[function(e,t,n){"use strict";e.exports=n(111)},function(e,t,n){e.exports=n(115)()},function(e,t,n){"use strict";n.d(t,"d",(function(){return r})),n.d(t,"l",(function(){return o})),n.d(t,"b",(function(){return i})),n.d(t,"m",(function(){return a})),n.d(t,"h",(function(){return s})),n.d(t,"c",(function(){return l})),n.d(t,"a",(function(){return x})),n.d(t,"i",(function(){return k})),n.d(t,"o",(function(){return _})),n.d(t,"k",(function(){return O})),n.d(t,"n",(function(){return E})),n.d(t,"e",(function(){return D})),n.d(t,"g",(function(){return A})),n.d(t,"f",(function(){return P})),n.d(t,"j",(function(){return L}));var r=function e(){for(var t=[],n=0;n1||t._ignoreMouse||(d(document,"mousemove",t._mousemove),d(document,"mouseup",t._mouseup),t._pressHandler(e))},this._mousemove=function(e){t._dragHandler(e)},this._mouseup=function(e){h(document,"mousemove",t._mousemove),h(document,"mouseup",t._mouseup),t._releaseHandler(e)},this._pointerdown=function(e){e.isPrimary&&0===e.button&&(d(document,"pointermove",t._pointermove),d(document,"pointerup",t._pointerup),d(document,"pointercancel",t._pointerup),d(document,"contextmenu",m),t._pressHandler(e))},this._pointermove=function(e){e.isPrimary&&t._dragHandler(e)},this._pointerup=function(e){e.isPrimary&&(h(document,"pointermove",t._pointermove),h(document,"pointerup",t._pointerup),h(document,"pointercancel",t._pointerup),h(document,"contextmenu",m),t._releaseHandler(e))}};g.supportPointerEvent=function(){return"undefined"!==typeof window&&window.PointerEvent},g.prototype.bindTo=function(e){e!==this._element&&(this._element&&this._unbindFromCurrent(),this._element=e,this._bindToCurrent())},g.prototype._bindToCurrent=function(){var e=this._element;this._usePointers()?d(e,"pointerdown",this._pointerdown):(d(e,"mousedown",this._mousedown),this._mouseOnly||(d(e,"touchstart",this._touchstart),d(e,"touchmove",this._touchmove),d(e,"touchend",this._touchend)))},g.prototype._unbindFromCurrent=function(){var e=this._element;if(this._usePointers())return h(e,"pointerdown",this._pointerdown),h(document,"pointermove",this._pointermove),h(document,"pointerup",this._pointerup),h(document,"contextmenu",m),void h(document,"pointercancel",this._pointerup);h(e,"mousedown",this._mousedown),this._mouseOnly||(h(e,"touchstart",this._touchstart),h(e,"touchmove",this._touchmove),h(e,"touchend",this._touchend))},g.prototype._usePointers=function(){return!this._mouseOnly&&g.supportPointerEvent()},g.prototype.destroy=function(){this._unbindFromCurrent(),this._element=null},g.default=g;var b=g,w=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),x=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.element=null,t.draggable=new b({press:function(e){t.element&&t.props.onPress&&t.props.onPress.call(void 0,{target:t,event:e,element:t.element})},drag:function(e){t.element&&t.props.onDrag&&t.props.onDrag.call(void 0,{target:t,event:e,element:t.element})},release:function(e){t.element&&t.props.onRelease&&t.props.onRelease.call(void 0,{target:t,event:e})}}),t.assingRef=function(e){t.element=e},t}return w(t,e),t.prototype.componentDidMount=function(){this.element&&this.draggable.bindTo(this.element)},t.prototype.componentWillUnmount=function(){this.draggable.destroy()},t.prototype.render=function(){return u.cloneElement(u.Children.only(this.props.children),{ref:this.assingRef})},t.propTypes={children:c.element.isRequired},t}(u.Component),k=function(e){if(e){if((e instanceof HTMLInputElement||-1!==e.tabIndex)&&e.focus)return void e.focus();var t=e.querySelector('input, [tabindex]:not([tabindex="-1"])');t&&t.focus&&t.focus()}},_=function(e,t){var n=u.useState(t),r=n[0],o=n[1];return u.useEffect((function(){if(!r&&window&&e.current){var t=window.getComputedStyle(e.current).direction;t&&o(t)}}),[]),r};var C=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g;function S(e){var t=[];return e.replace(C,(function(e,n,r,o){t.push(void 0!==n?n:r||o)})),t}var N={};function O(e){if(N[e])return N[e];var t=S(e);return N[e]=function(e){for(var n=e,r=0;r/g;function b(e){return String(e).replace(f,"&").replace(m,"<").replace(g,">").replace(y,""").replace(v,"'")}function w(e){var t=window.console;"undefined"!=typeof t&&t.log&&t.log(e)}function x(e){return"function"===typeof e}function k(e){return"string"===typeof e?[e]:e}function _(){this._defaultPrevented=!0}function C(){return!0===this._defaultPrevented}var S=function(e){function t(){e.call(this),this._events={}}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.bind=function(e,t,n){var r=arguments,o=this,i=k(e),a=x(t),s=i.length;if(void 0===t){for(var l in e)o.bind(l,e[l]);return this}for(var u=function(e){var s=i[e],l=a?t:t[s];if(l){if(n){var u=l;(l=function(){o.unbind(s,l),u.apply(o,r)}).original=u}(o._events[s]=o._events[s]||[]).push(l)}},c=0;c=0;r--)n[r]!==t&&n[r].original!==t||n.splice(r,1);else this._events[e]=[];return this},t}(h);var N={};"undefined"!==typeof window&&(N.browser=function(e){var t,n={edge:/(edge)[ \/]([\w.]+)/i,webkit:/(chrome)[ \/]([\w.]+)/i,safari:/(webkit)[ \/]([\w.]+)/i,opera:/(opera)(?:.*version|)[ \/]([\w.]+)/i,msie:/(msie\s|trident.*? rv:)([\w.]+)/i,mozilla:/(mozilla)(?:.*? rv:([\w.]+)|)/i};for(var r in n)if(n.hasOwnProperty(r)){var o=e.match(n[r]);if(o){(t={})[r]=!0,t[o[1].toLowerCase().split(" ")[0].split("/")[0]]=!0,t.version=parseInt(document.documentMode||o[2],10);break}}return t}(window.navigator.userAgent));var O=N;function M(){return(new Date).getTime()}function T(e,t){var n,r=0;if(!t||t<=0)return e;var o=function(){var o=M()-r,i=arguments,a=function(){e.apply(null,i),r=M()};if(!r)return a();n&&clearTimeout(n),o>t?a():n=setTimeout(a,t-o)};return o.cancel=function(){clearTimeout(n)},o}var E={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgrey:"a9a9a9",darkgreen:"006400",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:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",grey:"808080",green:"008000",greenyellow:"adff2f",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",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"778899",lightslategrey:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",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:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",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:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"},P=O.browser,D=function(e){var t=Object.keys(E);t.push("transparent");var n=new RegExp("^("+t.join("|")+")(\\W|$)","i");return D=function(e){return n.exec(e)},n.exec(e)},A=function(e){function t(){e.call(this)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toHSV=function(){return this},t.prototype.toRGB=function(){return this},t.prototype.toHex=function(){return this.toBytes().toHex()},t.prototype.toBytes=function(){return this},t.prototype.toCss=function(){return"#"+this.toHex()},t.prototype.toCssRgba=function(){var e=this.toBytes();return"rgba("+e.r+", "+e.g+", "+e.b+", "+parseFloat(Number(this.a).toFixed(3))+")"},t.prototype.toDisplay=function(){return P.msie&&P.version<9?this.toCss():this.toCssRgba()},t.prototype.equals=function(e){return e===this||null!==e&&this.toCssRgba()===B(e).toCssRgba()},t.prototype.diff=function(e){if(null===e)return NaN;var t=this.toBytes(),n=e.toBytes();return Math.sqrt(Math.pow(.3*(t.r-n.r),2)+Math.pow(.59*(t.g-n.g),2)+Math.pow(.11*(t.b-n.b),2))},t.prototype.clone=function(){var e=this.toBytes();return e===this&&(e=new L(e.r,e.g,e.b,e.a)),e},t}(h),I=function(e){function t(t,n,r,o){e.call(this),this.r=t,this.g=n,this.b=r,this.a=o}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toHSV=function(){var e,t,n=this.r,r=this.g,o=this.b,i=Math.min(n,r,o),a=Math.max(n,r,o),s=a-i,l=a;return 0===s?new j(0,0,l,this.a):(0!==a?(t=s/a,e=n===a?(r-o)/s:r===a?2+(o-n)/s:4+(n-r)/s,(e*=60)<0&&(e+=360)):(t=0,e=-1),new j(e,t,l,this.a))},t.prototype.toHSL=function(){var e,t,n=this.r,r=this.g,o=this.b,i=Math.max(n,r,o),a=Math.min(n,r,o),s=(i+a)/2;if(i===a)e=t=0;else{var l=i-a;switch(t=s>.5?l/(2-i-a):l/(i+a),i){case n:e=(r-o)/l+(rr.length;)r=n+r;return r}var j=function(e){function t(t,n,r,o){e.call(this),this.h=t,this.s=n,this.v=r,this.a=o}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toRGB=function(){var e,t,n,r=this.h,o=this.s,i=this.v;if(0===o)e=t=n=i;else{r/=60;var a=Math.floor(r),s=r-a,l=i*(1-o),u=i*(1-o*s),c=i*(1-o*(1-s));switch(a){case 0:e=i,t=c,n=l;break;case 1:e=u,t=i,n=l;break;case 2:e=l,t=i,n=c;break;case 3:e=l,t=u,n=i;break;case 4:e=c,t=l,n=i;break;default:e=i,t=l,n=u}}return new I(e,t,n,this.a)},t.prototype.toHSL=function(){return this.toRGB().toHSL()},t.prototype.toBytes=function(){return this.toRGB().toBytes()},t}(A),F=function(e){function t(t,n,r,o){e.call(this),this.h=t,this.s=n,this.l=r,this.a=o}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toRGB=function(){var e,t,n,r=this.h/360,o=this.s/100,i=this.l/100;if(0===o)e=t=n=i;else{var a=i<.5?i*(1+o):i+o-i*o,s=2*i-a;e=z(s,a,r+1/3),t=z(s,a,r),n=z(s,a,r-1/3)}return new I(e,t,n,this.a)},t.prototype.toHSV=function(){return this.toRGB().toHSV()},t.prototype.toBytes=function(){return this.toRGB().toBytes()},t}(A);function z(e,t,n){var r=n;return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function B(e,t){var n,r;if(null==e||"none"===e)return null;if(e instanceof A)return e;var o=e.toLowerCase();if(n=D(o))return(o="transparent"===n[1]?new I(1,1,1,0):B(E[n[1]],t)).match=[n[1]],o;if((n=/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})\b/i.exec(o))?r=new L(parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16),1):(n=/^#?([0-9a-f])([0-9a-f])([0-9a-f])\b/i.exec(o))?r=new L(parseInt(n[1]+n[1],16),parseInt(n[2]+n[2],16),parseInt(n[3]+n[3],16),1):(n=/^rgb\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/.exec(o))?r=new L(parseInt(n[1],10),parseInt(n[2],10),parseInt(n[3],10),1):(n=/^rgba\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9.]+)\s*\)/.exec(o))?r=new L(parseInt(n[1],10),parseInt(n[2],10),parseInt(n[3],10),parseFloat(n[4])):(n=/^rgb\(\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*\)/.exec(o))?r=new I(parseFloat(n[1])/100,parseFloat(n[2])/100,parseFloat(n[3])/100,1):(n=/^rgba\(\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9.]+)\s*\)/.exec(o))&&(r=new I(parseFloat(n[1])/100,parseFloat(n[2])/100,parseFloat(n[3])/100,parseFloat(n[4]))),r)r.match=n;else if(!t)throw new Error("Cannot parse color: "+o);return r}var U=function(e){function t(n){var r=this;if(e.call(this),1===arguments.length)for(var o=t.formats,i=this.resolveColor(n),a=0;a255?255:e},t.prototype.padDigit=function(e){return 1===e.length?"0"+e:e},t.prototype.brightness=function(e){var t=Math.round;return this.r=t(this.normalizeByte(this.r*e)),this.g=t(this.normalizeByte(this.g*e)),this.b=t(this.normalizeByte(this.b*e)),this},t.prototype.percBrightness=function(){return Math.sqrt(.241*this.r*this.r+.691*this.g*this.g+.068*this.b*this.b)},t.prototype.isDark=function(){return this.percBrightness()<180},t.fromBytes=function(e,t,n,r){return new L(e,t,n,null!=r?r:1)},t.fromRGB=function(e,t,n,r){return new I(e,t,n,null!=r?r:1)},t.fromHSV=function(e,t,n,r){return new j(e,t,n,null!=r?r:1)},t.fromHSL=function(e,t,n,r){return new F(e,t,n,null!=r?r:1)},t}(h);U.formats=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,process:function(e){return[parseInt(e[1],10),parseInt(e[2],10),parseInt(e[3],10)]}},{re:/^(\w{2})(\w{2})(\w{2})$/,process:function(e){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,process:function(e){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)]}}],U.namedColors=E;var H=U;function V(e,t){return e.push.apply(e,t),e}var Z={1:"i",10:"x",100:"c",2:"ii",20:"xx",200:"cc",3:"iii",30:"xxx",300:"ccc",4:"iv",40:"xl",400:"cd",5:"v",50:"l",500:"d",6:"vi",60:"lx",600:"dc",7:"vii",70:"lxx",700:"dcc",8:"viii",80:"lxxx",800:"dccc",9:"ix",90:"xc",900:"cm",1e3:"m"};function G(e){for(var t=[1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],n="";e>0;)e>>6),t+=te(128|63&r)):r<65536&&(t+=te(224|r>>>12),t+=te(128|r>>>6&63),t+=te(128|63&r))}return t}(e);n>2,l=(3&o)<<4|i>>4,u=(15&i)<<2|a>>6,c=63&a;isNaN(i)?u=c=64:isNaN(a)&&(c=64),t=t+ee.charAt(s)+ee.charAt(l)+ee.charAt(u)+ee.charAt(c)}return t}function re(e){return q((e.x||{}).location)?{x:e.x.location,y:e.y.location}:{x:e.pageX||e.clientX||0,y:e.pageY||e.clientY||0}}function oe(e){return void 0===e&&(e={}),e.touch?e.touch.initialTouch:e.target}function ie(e){return""===e||null===e||"none"===e||"transparent"===e||!q(e)}function ae(e){if(e)return e[e.length-1]}function se(e,t,n){return Math.max(Math.min(e,n),t)}function le(e,t){if(e.length<2)return e.slice();return function e(n){if(n.length<=1)return n;var r=Math.floor(n.length/2),o=n.slice(0,r),i=n.slice(r);return function(e,n){for(var r=[],o=0,i=0,a=0;o=this._size?(n[this._head.key]=null,this._head=this._head.newer,this._head.older=null):this._length++},t.prototype.get=function(e){var t=this._map[e];if(t)return t===this._head&&t!==this._tail&&(this._head=t.newer,this._head.older=null),t!==this._tail&&(t.older&&(t.older.newer=t.newer,t.newer.older=t.older),t.older=this._tail,t.newer=null,this._tail.newer=t,this._tail=t),t.value},t}(h),we=/\r?\n|\r|\t/g;function xe(e){return String(e).replace(we," ")}function ke(e){var t=[];for(var n in e)t.push(n+e[n]);return t.sort().join("")}function _e(e){for(var t=2166136261,n=0;n>>0}var Ce,Se={baselineMarkerSize:1};"undefined"!==typeof document&&((Ce=document.createElement("div")).style.cssText="position: absolute !important; top: -4000px !important; width: auto !important; height: auto !important;padding: 0 !important; margin: 0 !important; border: 0 !important;line-height: normal !important; visibility: hidden !important; white-space: pre!important;");var Ne=function(e){function t(t){e.call(this),this._cache=new be(1e3),this.options=Object.assign({},Se,t)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.measure=function(e,t,n){if(void 0===n&&(n={}),!e)return{width:0,height:0,baseline:0};var r=_e(e+ke(t)),o=this._cache.get(r);if(o)return o;var i={width:0,height:0,baseline:0},a=n.box||Ce,s=this._baselineMarker().cloneNode(!1);for(var l in t){var u=t[l];"undefined"!==typeof u&&(a.style[l]=u)}var c=!1!==n.normalizeText?xe(e):String(e);return a.textContent=c,a.appendChild(s),document.body.appendChild(a),c.length&&(i.width=a.offsetWidth-this.options.baselineMarkerSize,i.height=a.offsetHeight,i.baseline=s.offsetTop+this.options.baselineMarkerSize),i.width>0&&i.height>0&&this._cache.put(r,i),a.parentNode.removeChild(a),i},t.prototype._baselineMarker=function(){var e=document.createElement("div");return e.style.cssText="display: inline-block; vertical-align: baseline;width: "+this.options.baselineMarkerSize+"px; height: "+this.options.baselineMarkerSize+"px;overflow: hidden;",e},t}(h);Ne.current=new Ne;var Oe=Ne;function Me(e,t,n){return Oe.current.measure(e,t,n)}var Te={}.toString,Ee=function(e){function t(t,n){for(var r in void 0===n&&(n=""),e.call(this),this.prefix=n,t){var o=t[r];o=this._wrap(o,r),this[r]=o}}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){for(var t=e.split("."),n=this;t.length&&n;){n=n[t.shift()]}return n},t.prototype.set=function(e,t){this.get(e)!==t&&(this._set(e,this._wrap(t,e)),this.optionsChange({field:this.prefix+e,value:t}))},t.prototype._set=function(e,n){var r=e.indexOf(".")>=0,o=this,i=e;if(r){for(var a=i.split("."),s=this.prefix;a.length>1;){s+=(i=a.shift())+".";var l=o[i];l||((l=new t({},s)).addObserver(this),o[i]=l),o=l}i=a[0]}o._clear(i),o[i]=n},t.prototype._clear=function(e){var t=this[e];t&&t.removeObserver&&t.removeObserver(this)},t.prototype._wrap=function(n,r){var o=Te.call(n),i=n;return null!==i&&q(i)&&"[object Object]"===o&&(n instanceof t||n instanceof e||(i=new t(i,this.prefix+r+".")),i.addObserver(this)),i},t}(h);u.extend(Ee.prototype);var Pe=Ee;function De(e){return function(t){return this[e]!==t&&(this[e]=t,this.geometryChange()),this}}function Ae(e){return function(){return this[e]}}function Ie(e,t){for(var n=0;n0&&!ie(e.color)},t.prototype._clippedBBox=function(e){return this.bbox(e)},t}(h);qe.prototype.nodeType="Element",u.extend(qe.prototype);var We=qe;function Ye(e,t,n,r){var o=0,i=0;return r&&(o=Math.atan2(r.c*n,r.a*t),0!==r.b&&(i=Math.atan2(r.d*n,r.b*t))),{x:o,y:i}}var $e=Math.PI/2,Xe=function(e){function t(t,n){void 0===t&&(t=new ze),void 0===n&&(n=0),e.call(this),this.setCenter(t),this.setRadius(n)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.setCenter=function(e){return this._observerField("center",ze.create(e)),this.geometryChange(),this},t.prototype.getCenter=function(){return this.center},t.prototype.equals=function(e){return e&&e.center.equals(this.center)&&e.radius===this.radius},t.prototype.clone=function(){return new t(this.center.clone(),this.radius)},t.prototype.pointAt=function(e){return this._pointAt(ce(e))},t.prototype.bbox=function(e){for(var t=Ye(this.center,this.radius,this.radius,e),n=ze.maxPoint(),r=ze.minPoint(),o=0;o<4;o++){var i=this._pointAt(t.x+o*$e).transformCopy(e),a=this._pointAt(t.y+o*$e).transformCopy(e),s=new ze(i.x,a.y);n=ze.min(n,s),r=ze.max(r,s)}return Ve.fromPoints(n,r)},t.prototype._pointAt=function(e){var t=this.center,n=this.radius;return new ze(t.x+n*Math.cos(e),t.y+n*Math.sin(e))},t.prototype.containsPoint=function(e){var t=this.center,n=this.radius;return Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)<=Math.pow(n,2)},t.prototype._isOnPath=function(e,t){var n=this.center,r=this.radius,o=n.distanceTo(e);return r-t<=o&&o<=r+t},t}(h);Ie(Xe.prototype,["radius"]),u.extend(Xe.prototype);var Je=Xe,Qe={extend:function(e){e.fill=this.fill,e.stroke=this.stroke},fill:function(e,t){var n=this.options;if(q(e)){if(e&&"Gradient"!==e.nodeType){var r={color:e};q(t)&&(r.opacity=t),n.set("fill",r)}else n.set("fill",e);return this}return n.get("fill")},stroke:function(e,t,n){return q(e)?(this.options.set("stroke.color",e),q(t)&&this.options.set("stroke.width",t),q(n)&&this.options.set("stroke.opacity",n),this):this.options.get("stroke")}},et=Re.IDENTITY.toString(),tt={extend:function(e){e.bbox=this.bbox,e.geometryChange=this.geometryChange},bbox:function(e){var t,n=je(this.currentTransform(e)),r=n?n.toString():et;this._bboxCache&&this._matrixHash===r?t=this._bboxCache.clone():(t=this._bbox(n),this._bboxCache=t?t.clone():null,this._matrixHash=r);var o=this.options.get("stroke.width");return o&&t&&t.expand(o/2),t},geometryChange:function(){delete this._bboxCache,this.trigger("geometryChange",{element:this})}};function nt(e){var t="_"+e;return function(e){return q(e)?(this._observerField(t,e),this.geometryChange(),this):this[t]}}function rt(e,t){for(var n=0;nt||n&&e===t)&&(t+=360),{startAngle:e,endAngle:t}},t.prototype._intervalCurvePoints=function(e,t,n){var r=this.pointAt(e),o=this.pointAt(t),i=this._derivativeAt(e),a=this._derivativeAt(t),s=(ce(t)-ce(e))/3,l=new ze(r.x+s*i.x,r.y+s*i.y),u=new ze(o.x-s*a.x,o.y-s*a.y);return n&&(r.transform(n),o.transform(n),l.transform(n),u.transform(n)),{p1:r,cp1:l,cp2:u,p2:o}},t.prototype._derivativeAt=function(e){var t=ce(e);return new ze(-this.radiusX*Math.sin(t),this.radiusY*Math.cos(t))},t.prototype.containsPoint=function(e){var t,n=this._arcInterval(),r=n.endAngle-n.startAngle,o=this.center,i=this.radiusX,a=this.radiusY,s=o.distanceTo(e),l=Math.atan2(e.y-o.y,e.x-o.x),u=i*a/Math.sqrt(lt(i,2)*lt(Math.sin(l),2)+lt(a,2)*lt(Math.cos(l),2)),c=this.pointAt(this.startAngle).round(10),p=this.pointAt(this.endAngle).round(10),d=function(e,t,n,r){var o=t.x-e.x,i=r.x-n.x,a=t.y-e.y,s=r.y-n.y,l=e.x-n.x,u=e.y-n.y,c=o*s-i*a,p=(o*u-a*l)/c,d=(i*u-s*l)/c;if(p>=0&&p<=1&&d>=0&&d<=1)return new ze(e.x+d*o,e.y+d*a)}(o,e.round(10),c,p);if(r<180)t=d&&st(o.distanceTo(d),s)&&st(s,u);else{var h=ct(o.x,o.y,i,a,e.x,e.y);360!==h&&(h=(360+h)%360);var f=n.startAngle<=h&&h<=n.endAngle;t=f&&st(s,u)||!f&&(!d||d.equals(e))}return t},t.prototype._isOnPath=function(e,t){var n=this._arcInterval(),r=this.center,o=ct(r.x,r.y,this.radiusX,this.radiusY,e.x,e.y);return 360!==o&&(o=(360+o)%360),n.startAngle<=o&&o<=n.endAngle&&this.pointAt(o).distanceTo(e)<=t},t.fromPoints=function(e,n,r,o,i,a,s){var l=function(e){var t=e.x1,n=e.y1,r=e.x2,o=e.y2,i=e.rx,a=e.ry,s=e.largeArc,l=e.swipe,u=e.rotation;void 0===u&&(u=0);var c=ce(u),p=Math.cos(c),d=Math.sin(c),h=p*(t-r)/2+d*(n-o)/2,f=-d*(t-r)/2+p*(n-o)/2,m=s!==l?1:-1,y=Math.pow(h,2),v=Math.pow(f,2),g=Math.pow(i,2),b=Math.pow(a,2),w=y/g+v/b;w>1&&(w=Math.sqrt(y/g+v/b),i*=w,g=Math.pow(i,2),a*=w,b=Math.pow(a,2));var x=m*Math.sqrt((g*b-g*v-b*y)/(g*v+b*y));isNaN(x)&&(x=0);var k=x*(i*f)/a,_=a*h*-x/i,C=p*k-d*_+(t+r)/2,S=d*k+p*_+(n+o)/2,N=(h-k)/i,O=(f-_)/a,M=-(h+k)/i,T=-(f+_)/a,E=(O>=0?1:-1)*Q(Math.acos(N/Math.sqrt(N*N+O*O))),P=pe((N*M+O*T)/(Math.sqrt(N*N+O*O)*Math.sqrt(M*M+T*T)),10),D=(N*T-O*M>=0?1:-1)*Q(Math.acos(P));!l&&D>0&&(D-=360);l&&D<0&&(D+=360);var A=E+D,I=A>=0?1:-1;return A=Math.abs(A)%360*I,{center:new ze(C,S),startAngle:E,endAngle:A,radiusX:i,radiusY:a,xRotation:u}}({x1:e.x,y1:e.y,x2:n.x,y2:n.y,rx:r,ry:o,largeArc:i,swipe:a,rotation:s});return new t(l.center,{startAngle:l.startAngle,endAngle:l.endAngle,radiusX:l.radiusX,radiusY:l.radiusY,xRotation:l.xRotation,anticlockwise:0===a})},t}(h);function ct(e,t,n,r,o,i){var a=pe((o-e)/n,3),s=pe((i-t)/r,3);return pe(Q(Math.atan2(s,a)))}function pt(e,t){for(var n=e;n0?n.x-o:i-n.x)/(i-o)+a-n.y>=0}return r?1:0}var Dt=function(e){function t(t,n,r){e.call(this),this.anchor(t||new ze),this.controlIn(n),this.controlOut(r)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.bboxTo=function(e,t){var n=this.anchor().transformCopy(t),r=e.anchor().transformCopy(t);return this.controlOut()&&e.controlIn()?this._curveBoundingBox(n,this.controlOut().transformCopy(t),e.controlIn().transformCopy(t),r):this._lineBoundingBox(n,r)},t.prototype._lineBoundingBox=function(e,t){return Ve.fromPoints(e,t)},t.prototype._curveBoundingBox=function(e,t,n,r){var o=[e,t,n,r],i=this._curveExtremesFor(o,"x"),a=this._curveExtremesFor(o,"y"),s=At([i.min,i.max,e.x,r.x]),l=At([a.min,a.max,e.y,r.y]);return Ve.fromPoints(new ze(s.min,l.min),new ze(s.max,l.max))},t.prototype._curveExtremesFor=function(e,t){var n=this._curveExtremes(e[0][t],e[1][t],e[2][t],e[3][t]);return{min:St(n.min,t,e),max:St(n.max,t,e)}},t.prototype._curveExtremes=function(e,t,n,r){var o=e-3*t+3*n-r,i=-2*(e-2*t+n),a=e-t,s=Math.sqrt(i*i-4*o*a),l=0,u=1;0===o?0!==i&&(l=u=-a/i):isNaN(s)||(l=(-i+s)/(2*o),u=(-i-s)/(2*o));var c=Math.max(Math.min(l,u),0);(c<0||c>1)&&(c=0);var p=Math.min(Math.max(l,u),1);return(p>1||p<0)&&(p=1),{min:c,max:p}},t.prototype._intersectionsTo=function(e,t){return this.controlOut()&&e.controlIn()?function(e,t,n){for(var r,o=Nt(e,"x"),i=Tt(o[0],o[1],o[2],o[3]-t.x),a=0,s=0;st.y)&&((0===i[s]||1===i[s])&&n.bottomRight().x>t.x||00&&ae(this.paths).lineTo(e,t),this},t.prototype.curveTo=function(e,t,n){return this.paths.length>0&&ae(this.paths).curveTo(e,t,n),this},t.prototype.arc=function(e,t,n,r,o){return this.paths.length>0&&ae(this.paths).arc(e,t,n,r,o),this},t.prototype.arcTo=function(e,t,n,r,o,i){return this.paths.length>0&&ae(this.paths).arcTo(e,t,n,r,o,i),this},t.prototype.close=function(){return this.paths.length>0&&ae(this.paths).close(),this},t.prototype._bbox=function(e){return Lt(this.paths,!0,e)},t.prototype.rawBBox=function(){return Lt(this.paths,!1)},t.prototype._containsPoint=function(e){for(var t=this.paths,n=0;n2&&(s="l",u.splice(0,2))),Ht[s])Ht[s](r,{parameters:u,position:o,isRelative:l,previousCommand:n}),a&&"z"===a.toLowerCase()&&r.close();else if("m"!==s)throw new Error("Error while parsing SVG path. Unsupported command: "+s);n=s})),r},t}(h);Gt.current=new Gt;var Kt=Gt,qt=function(e){function t(t){e.call(this,t),this.segments=new xt,this.segments.addObserver(this),q(this.options.stroke)||(this.stroke("#000"),q(this.options.stroke.lineJoin)||this.options.set("stroke.lineJoin","miter"))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.moveTo=function(e,t){return this.suspend(),this.segments.elements([]),this.resume(),this.lineTo(e,t),this},t.prototype.lineTo=function(e,t){var n=q(t)?new ze(e,t):e,r=new It(n);return this.segments.push(r),this},t.prototype.curveTo=function(e,t,n){if(this.segments.length>0){var r=ae(this.segments),o=new It(n,t);this.suspend(),r.controlOut(e),this.resume(),this.segments.push(o)}return this},t.prototype.arc=function(e,t,n,r,o){if(this.segments.length>0){var i=ae(this.segments).anchor(),a=ce(e),s=new ze(i.x-n*Math.cos(a),i.y-r*Math.sin(a)),l=new dt(s,{startAngle:e,endAngle:t,radiusX:n,radiusY:r,anticlockwise:o});this._addArcSegments(l)}return this},t.prototype.arcTo=function(e,t,n,r,o,i){if(this.segments.length>0){var a=ae(this.segments).anchor(),s=dt.fromPoints(a,e,t,n,r,o,i);this._addArcSegments(s)}return this},t.prototype._addArcSegments=function(e){this.suspend();for(var t=e.curvePoints(),n=1;n1){if(n[0]._isOnPathTo(n[1],e,o,"start"))return!0;for(var i=2;i<=r-2;i++)if(n[i-1]._isOnPathTo(n[i],e,o))return!0;if(n[r-2]._isOnPathTo(n[r-1],e,o,"end"))return!0}return!1},t.prototype._bbox=function(e){var t,n=this.segments,r=n.length;if(1===r){var o=n[0].anchor().transformCopy(e);t=new Ve(o,Ue.ZERO)}else if(r>0)for(var i=1;i0){e.moveTo(t[0].x,t[0].y);for(var n=1;n=0&&(this.children.splice(t,1),e.parent=null,this.childrenChange("remove",[e],t)),this},t.prototype.removeAt=function(e){if(0<=e&&e=0;n--)t(e[n],n)},pn=function(e){function t(t,n){e.call(this,Object.assign({},ln,n)),this._rect=t,this._fieldMap={}}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.rect=function(e){return e?(this._rect=e,this):this._rect},t.prototype._initMap=function(){var e=this.options,t=this._fieldMap;"horizontal"===e.orientation?(t.sizeField="width",t.groupsSizeField="height",t.groupAxis="x",t.groupsAxis="y"):(t.sizeField="height",t.groupsSizeField="width",t.groupAxis="y",t.groupsAxis="x"),e.reverse?(this.forEach=cn,this.justifyAlign=sn):(this.forEach=un,this.justifyAlign=an)},t.prototype.reflow=function(){if(this._rect&&0!==this.children.length){this._initMap(),this.options.transform&&this.transform(null);for(var e,t,n,r=this.options,o=this._rect,i=this._initGroups(),a=i.groups,s=i.groupsSize,l=this._fieldMap,u=l.sizeField,c=l.groupsSizeField,p=l.groupAxis,d=l.groupsAxis,h=new ze,f=new ze,m=new Ue,y=an(s,o,r.alignContent,d,c),v=function(o,i){var a=t.elements[i];f[p]=e,f[d]=an(o.size[c],n,r.alignItems,d,c),on(f,o,a),e+=o.size[u]+r.spacing},g=0;go.size[u]){var b=o.size[u]/n.size[u],w=n.topLeft().scale(b,b),x=an(n.size[c]*b,o,r.alignContent,d,c),k=Ke();"x"===p?k.translate(o.origin.x-w.x,x-w.y):k.translate(x-w.x,o.origin.y-w.y),k.scale(b,b),this.transform(k)}}},t.prototype._initGroups=function(){for(var e=this.options,t=this.children,n=e.lineSpacing,r=e.wrap,o=e.spacing,i=this._fieldMap.sizeField,a=this._newGroup(),s=[],l=function(){s.push(a),u+=a.lineSize+n},u=-n,c=0;cthis._rect.size[i]?0===a.bboxes.length?(this._addToGroup(a,d,p),l(),a=this._newGroup()):(l(),a=this._newGroup(),this._addToGroup(a,d,p)):this._addToGroup(a,d,p))}return a.bboxes.length&&l(),{groups:s,groupsSize:u}},t.prototype._addToGroup=function(e,t,n){e.size+=t.size[this._fieldMap.sizeField]+this.options.spacing,e.lineSize=Math.max(t.size[this._fieldMap.groupsSizeField],e.lineSize),e.bboxes.push(t),e.elements.push(n)},t.prototype._newGroup=function(){return{lineSize:0,size:-this.options.spacing,bboxes:[],elements:[]}},t}(rn),dn=function(e){function t(t,n){void 0===t&&(t=new Ve),void 0===n&&(n={}),e.call(this,n),this.geometry(t),q(this.options.stroke)||this.stroke("#000")}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._bbox=function(e){return this._geometry.bbox(e)},t.prototype.rawBBox=function(){return this._geometry.bbox()},t.prototype._containsPoint=function(e){return this._geometry.containsPoint(e)},t.prototype._isOnPath=function(e){return this.geometry()._isOnPath(e,this.options.stroke.width/2)},t}(We);dn.prototype.nodeType="Rect",Qe.extend(dn.prototype),tt.extend(dn.prototype),rt(dn.prototype,["geometry"]);var hn=dn;function fn(e,t,n,r,o){for(var i=0;i1)for(var o=new ze,i=e[0].bbox,a=1;ai?s.length?(a.push(s),s=[],u(),l=p):(u(),a.push(s),s=[],l=0):(u(),l+=p)}return s.length&&a.push(s),a}(e,t,o),a=t.origin.clone(),s=[],l=0;l1?new t(e[0],e[1],e[2]):new t(e.offset,e.color,e.opacity)},t}(h);!function(e,t){for(var n=0;n=0&&this.stops.splice(t,1)},t}(h);Tn.prototype.nodeType="Gradient",u.extend(Tn.prototype),Object.assign(Tn.prototype,{optionsChange:function(e){this.trigger("optionsChange",{field:"gradient"+(e?"."+e.field:""),value:this})},geometryChange:function(){this.optionsChange()}});var En=Tn,Pn=function(e){function t(t){void 0===t&&(t={}),e.call(this,t),this.start(t.start||new ze),this.end(t.end||new ze(1,0))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(En);_t(Pn.prototype,["start","end"]);var Dn=Pn,An=function(e){function t(t){void 0===t&&(t={}),e.call(this,t),this.center(t.center||new ze),this._radius=q(t.radius)?t.radius:1,this._fallbackFill=t.fallbackFill}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.radius=function(e){return q(e)?(this._radius=e,this.geometryChange(),this):this._radius},t.prototype.fallbackFill=function(e){return q(e)?(this._fallbackFill=e,this.optionsChange(),this):this._fallbackFill},t}(En);_t(An.prototype,["center"]);var In=An;function Ln(e){return.5-Math.cos(e*Math.PI)/2}function Rn(e){return e}function jn(e,t,n,r){var o=1.70158,i=0,a=r;return 0===e?n:1===e?n+r:(i||(i=.5),a0||t.height>0)&&(!n||t.width!==n.width||t.height!==n.height))&&(this.currentSize(t),this._resize(t,e),this.trigger("resize",t))},t.prototype.size=function(e){if(!e)return this.getSize();this.setSize(e)},t.prototype.suspendTracking=function(){this._suspendedTracking=!0},t.prototype.resumeTracking=function(){this._suspendedTracking=!1},t.prototype._enableTracking=function(){},t.prototype._resize=function(){},t.prototype._handler=function(e){var t=this;return function(n){var r=t.eventTarget(n);r&&!t._suspendedTracking&&t.trigger(e,{element:r,originalEvent:n,type:e})}},t.prototype._elementOffset=function(){var e=this.element,t=me(e,["paddingLeft","paddingTop"]),n=t.paddingLeft,r=t.paddingTop,o=fe(e),i=o.left,a=o.top;return{left:i+parseInt(n,10),top:a+parseInt(r,10)}},t.prototype._surfacePoint=function(e){var t=this._elementOffset(),n=re(e),r=n.x-t.left,o=n.y-t.top;return new ze(r,o)},t}(S);Kn.create=function(e,t){return Zn.current.create(e,t)},Kn.support={};var qn=Kn,Wn=function(e){function t(t){e.call(this),this.childNodes=[],this.parent=null,t&&(this.srcElement=t,this.observe())}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.destroy=function(){this.srcElement&&this.srcElement.removeObserver(this);for(var e=this.childNodes,t=0;t0&&i.load(o);var a=this.element;a&&i.attachTo(a,t)}},t.prototype.root=function(){for(var e=this;e.parent;)e=e.parent;return e},t.prototype.attachTo=function(e,t){var n=document.createElement("div");rr(n,""+this.render()+"");var r=n.firstChild.firstChild;r&&(q(t)?e.insertBefore(r,e.childNodes[t]||null):e.appendChild(r),this.setElement(r))},t.prototype.setElement=function(e){this.element&&(this.element._kendoNode=null),this.element=e,this.element._kendoNode=this;for(var t=this.childNodes,n=0;n"},t.prototype.renderOffset=function(){return Yn("offset",this.srcElement.offset())},t.prototype.mapStyle=function(){var e=this.srcElement;return[["stop-color",e.color()],["stop-opacity",e.opacity()]]},t.prototype.optionsChange=function(e){"offset"===e.field?this.attr(e.field,e.value):"color"!==e.field&&"opacity"!==e.field||this.css("stop-"+e.field,e.value)},t}(ar),lr=function(e){function t(t){e.call(this,t),this.id=t.id,this.loadStops()}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.loadStops=function(){for(var e=this.srcElement.stops,t=this.element,n=0;n"+this.renderChildren()+""},t.prototype.mapCoordinates=function(){var e=this.srcElement,t=e.start(),n=e.end();return[["x1",t.x],["y1",t.y],["x2",n.x],["y2",n.y],this.mapSpace()]},t}(lr),cr=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.template=function(){return""+this.renderChildren()+""},t.prototype.mapCoordinates=function(){var e=this.srcElement,t=e.center(),n=e.radius();return[["cx",t.x],["cy",t.y],["r",n],this.mapSpace()]},t}(lr),pr=function(e){function t(t){e.call(this),this.srcElement=t,this.id=t.id,this.load([t])}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.template=function(){return""+this.renderChildren()+""},t}(ar),dr=function(e){function t(){e.call(this),this.definitionMap={}}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.attachTo=function(e){this.element=e},t.prototype.template=function(){return""+this.renderChildren()+""},t.prototype.definitionChange=function(e){var t=e.definitions,n=e.action;"add"===n?this.addDefinitions(t):"remove"===n&&this.removeDefinitions(t)},t.prototype.createDefinition=function(e,t){var n;return"clip"===e?n=pr:"fill"===e&&(t instanceof Dn?n=ur:t instanceof In&&(n=cr)),new n(t)},t.prototype.addDefinitions=function(e){for(var t in e)this.addDefinition(t,e[t])},t.prototype.addDefinition=function(e,t){var n=this.element,r=this.definitionMap,o=t.id,i=r[o];if(i)i.count++;else{var a=this.createDefinition(e,t);r[o]={element:a,count:1},this.append(a),n&&a.attachTo(this.element)}},t.prototype.removeDefinitions=function(e){for(var t in e)this.removeDefinition(e[t])},t.prototype.removeDefinition=function(e){var t=this.definitionMap,n=e.id,r=t[n];r&&(r.count--,0===r.count&&(this.remove(this.childNodes.indexOf(r.element),1),delete t[n]))},t}(ar),hr=function(e){function t(t){e.call(this),this.options=t,this.defs=new dr}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.attachTo=function(e){this.element=e,this.defs.attachTo(e.firstElementChild)},t.prototype.clear=function(){Wn.prototype.clear.call(this)},t.prototype.template=function(){return this.defs.render()+this.renderChildren()},t.prototype.definitionChange=function(e){this.defs.definitionChange(e)},t}(ar);var fr=function(e){function t(t,n){e.call(this,t,n),this._root=new hr(Object.assign({rtl:"rtl"===me(t,"direction").direction},this.options)),rr(this.element,this._template()),this._rootElement=this.element.firstElementChild,function(e){var t;try{t=e.getScreenCTM?e.getScreenCTM():null}catch(i){}if(t){var n=-t.e%1,r=-t.f%1,o=e.style;0===n&&0===r||(o.left=n+"px",o.top=r+"px")}}(this._rootElement),this._root.attachTo(this._rootElement),he(this.element,{click:this._click,mouseover:this._mouseenter,mouseout:this._mouseleave,mousemove:this._mousemove}),this.resize()}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.destroy=function(){this._root&&(this._root.destroy(),this._root=null,this._rootElement=null,ge(this.element,{click:this._click,mouseover:this._mouseenter,mouseout:this._mouseleave,mousemove:this._mousemove})),e.prototype.destroy.call(this)},t.prototype.translate=function(e){var t=Math.round(e.x)+" "+Math.round(e.y)+" "+this._size.width+" "+this._size.height;this._offset=e,this._rootElement.setAttribute("viewBox",t)},t.prototype.draw=function(t){e.prototype.draw.call(this,t),this._root.load([t])},t.prototype.clear=function(){e.prototype.clear.call(this),this._root.clear()},t.prototype.svg=function(){return""+this._template()},t.prototype.exportVisual=function(){var e=this._visual,t=this._offset;if(t){var n=new rn;n.children.push(e),n.transform(Ke().translate(-t.x,-t.y)),e=n}return e},t.prototype._resize=function(){this._offset&&this.translate(this._offset)},t.prototype._template=function(){return""+this._root.render()+""},t}(qn);fr.prototype.type="svg","undefined"!==typeof document&&document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")&&(qn.support.svg=!0,Zn.current.register("svg",fr,10));var mr=fr,yr=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.template=function(){return""+this.renderChildren()+""},t.prototype.optionsChange=function(t){"transform"===t.field&&this.transformChange(t.value),e.prototype.optionsChange.call(this,t)},t}(ar);Jn.Group=yr;var vr=yr,gr={dot:[1.5,3.5],dash:[4,3.5],longdash:[8,3.5],dashdot:[3.5,3.5,1.5,3.5],longdashdot:[8,3.5,1.5,3.5],longdashdotdot:[8,3.5,1.5,3.5,1.5,3.5]},br={"fill.opacity":"fill-opacity","stroke.color":"stroke","stroke.width":"stroke-width","stroke.opacity":"stroke-opacity"},wr=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.geometryChange=function(){this.attr("d",this.renderData()),this.invalidate()},t.prototype.optionsChange=function(t){switch(t.field){case"fill":t.value?this.allAttr(this.mapFill(t.value)):this.removeAttr("fill");break;case"fill.color":this.allAttr(this.mapFill({color:t.value}));break;case"stroke":t.value?this.allAttr(this.mapStroke(t.value)):this.removeAttr("stroke");break;case"transform":this.transformChange(t.value);break;default:var n=br[t.field];n&&this.attr(n,t.value)}e.prototype.optionsChange.call(this,t)},t.prototype.content=function(){this.element&&(this.element.textContent=this.srcElement.content())},t.prototype.renderData=function(){return this.printPath(this.srcElement)},t.prototype.printPath=function(e){var t=e.segments,n=t.length;if(n>0){for(var r,o,i=[],a=1;a"},t}(ar);Jn.Path=wr;var xr=wr,kr=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.renderData=function(){return this.printPath(this.srcElement.toPath())},t}(xr);Jn.Arc=kr;var _r=kr,Cr=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.geometryChange=function(){var e=this.center();this.attr("cx",e.x),this.attr("cy",e.y),this.attr("r",this.radius()),this.invalidate()},t.prototype.center=function(){return this.srcElement.geometry().center},t.prototype.radius=function(){return this.srcElement.geometry().radius},t.prototype.template=function(){return""},t}(xr);Jn.Circle=Cr;var Sr=Cr,Nr=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.geometryChange=function(){var e=this.srcElement.geometry();this.attr("x",e.origin.x),this.attr("y",e.origin.y),this.attr("width",e.size.width),this.attr("height",e.size.height),this.invalidate()},t.prototype.size=function(){return this.srcElement.geometry().size},t.prototype.origin=function(){return this.srcElement.geometry().origin},t.prototype.template=function(){return""},t}(xr);Jn.Rect=Nr;var Or=Nr,Mr=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.geometryChange=function(){this.allAttr(this.mapPosition()),this.invalidate()},t.prototype.optionsChange=function(t){"src"===t.field&&this.allAttr(this.mapSource()),e.prototype.optionsChange.call(this,t)},t.prototype.mapPosition=function(){var e=this.srcElement.rect(),t=e.topLeft();return[["x",t.x],["y",t.y],["width",e.width()+"px"],["height",e.height()+"px"]]},t.prototype.renderPosition=function(){return $n(this.mapPosition())},t.prototype.mapSource=function(e){var t=this.srcElement.src();return e&&(t=b(t)),[["xlink:href",t]]},t.prototype.renderSource=function(){return $n(this.mapSource(!0))},t.prototype.template=function(){return""},t}(xr);Jn.Image=Mr;var Tr=Mr,Er=/&(?:[a-zA-Z]+|#\d+);/g;function Pr(e){if(!e||"string"!==typeof e||!Er.test(e))return e;var t=Pr._element;return Er.lastIndex=0,e.replace(Er,(function(e){return t.innerHTML=e,t.textContent||t.innerText}))}"undefined"!==typeof document&&(Pr._element=document.createElement("span"));var Dr=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.geometryChange=function(){var e=this.pos();this.attr("x",e.x),this.attr("y",e.y),this.invalidate()},t.prototype.optionsChange=function(t){"font"===t.field?(this.attr("style",Xn(this.mapStyle())),this.geometryChange()):"content"===t.field&&e.prototype.content.call(this,this.srcElement.content()),e.prototype.optionsChange.call(this,t)},t.prototype.mapStyle=function(t){var n=e.prototype.mapStyle.call(this,t),r=this.srcElement.options.font;return t&&(r=b(r)),n.push(["font",r],["white-space","pre"]),n},t.prototype.pos=function(){var e=this.srcElement.position(),t=this.srcElement.measure();return e.clone().setY(e.y+t.baseline)},t.prototype.renderContent=function(){var e=this.srcElement.content();return xe(e=b(e=Pr(e)))},t.prototype.renderTextAnchor=function(){var e;return!(this.options||{}).rtl||O.browser.msie||O.browser.edge||(e="end"),Yn("text-anchor",e)},t.prototype.template=function(){return""+this.renderContent()+""},t}(xr);Jn.Text=Dr;var Ar=Dr,Ir=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.renderData=function(){var e=this.srcElement.paths;if(e.length>0){for(var t=[],n=0;n"+t.render()+"";return t.destroy(),a}var jr={};function Fr(e,t){var n=t.segments;if(0!==n.length){var r=n[0],o=r.anchor();e.moveTo(o.x,o.y);for(var i=1;i0&&a.load(i,t,n),q(t)?this.insertAt(a,t):this.append(a)}},t.prototype.load=function(e,t,n){this.loadElements(e,t,n),this.invalidate()},t.prototype.setOpacity=function(e){if(this.srcElement){var t=this.srcElement.opacity();q(t)&&this.globalAlpha(e,t)}},t.prototype.globalAlpha=function(e,t){var n=t;n&&e.globalAlpha&&(n*=e.globalAlpha),e.globalAlpha=n},t.prototype.visible=function(){var e=this.srcElement;return!e||e&&!1!==e.options.visible},t}(Wn),Br=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.renderTo=function(e){if(this.visible()){e.save(),this.setTransform(e),this.setClip(e),this.setOpacity(e);for(var t=this.childNodes,n=0;nt._zIndex?-1:0}var qr=function(e){function t(){e.call(this),this.initRoots()}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.initRoots=function(){this.rootMap={},this.root=new Zr,this.rootElements=[]},t.prototype.clear=function(){for(var e=this.rootElements,t=0;t0;)(t=e.pop()).addObserver(this),"Group"===t.nodeType?V(e,t.children):this._insertShape(t)},t.prototype._insertShape=function(e){var t=e.bbox();if(t){var n=this.getSectors(t),r=n[0][0],o=n[1][0];if(this.inRoot(n))this.root.insert(e,t);else{var i=this.rootMap;i[r]||(i[r]={}),i[r][o]||(i[r][o]=new Gr(new Ve([3e3*r,3e3*o],[3e3,3e3]))),i[r][o].insert(e,t)}}},t.prototype.remove=function(e){if(e.removeObserver(this),"Group"===e.nodeType)for(var t=e.children,n=0;n1||e[1].length>1},t.prototype.getSectors=function(e){for(var t=e.bottomRight(),n=Math.floor(t.x/3e3),r=Math.floor(t.y/3e3),o=[[],[]],i=Math.floor(e.origin.x/3e3);i<=n;i++)o[0].push(i);for(var a=Math.floor(e.origin.y/3e3);a<=r;a++)o[1].push(a);return o},t}(h),Wr=function(e){e.bind("mouseenter",this._mouseenter.bind(this)),e.bind("mouseleave",this._mouseleave.bind(this)),this.element=e.element};Wr.prototype.clear=function(){this._resetCursor()},Wr.prototype.destroy=function(){this._resetCursor(),delete this.element},Wr.prototype._mouseenter=function(e){var t=this._shapeCursor(e);t?(this._current||(this._defaultCursor=this._getCursor()),this._setCursor(t)):this._resetCursor()},Wr.prototype._mouseleave=function(){this._resetCursor()},Wr.prototype._shapeCursor=function(e){for(var t=e.element;t&&!q(t.options.cursor);)t=t.parent;if(t)return t.options.cursor},Wr.prototype._getCursor=function(){if(this.element)return this.element.style.cursor},Wr.prototype._setCursor=function(e){this.element&&(this.element.style.cursor=e,this._current=e)},Wr.prototype._resetCursor=function(){this._current&&(this._setCursor(this._defaultCursor||""),delete this._current)};var Yr=Wr,$r=function(e){function t(t,n){e.call(this,t,n),this.element.innerHTML=this._template(this);var r=this.element.firstElementChild,o=ve(t);r.width=o.width,r.height=o.height,this._rootElement=r,this._root=new Vr(r,o),this._mouseTrackHandler=this._trackMouse.bind(this),he(this.element,{click:this._mouseTrackHandler,mousemove:this._mouseTrackHandler})}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.destroy=function(){e.prototype.destroy.call(this),this._root&&(this._root.destroy(),this._root=null),this._searchTree&&(this._searchTree.clear(),delete this._searchTree),this._cursor&&(this._cursor.destroy(),delete this._cursor),ge(this.element,{click:this._mouseTrackHandler,mousemove:this._mouseTrackHandler})},t.prototype.draw=function(t){e.prototype.draw.call(this,t),this._root.load([t],void 0,this.options.cors),this._searchTree&&this._searchTree.add([t])},t.prototype.clear=function(){e.prototype.clear.call(this),this._root.clear(),this._searchTree&&this._searchTree.clear(),this._cursor&&this._cursor.clear()},t.prototype.eventTarget=function(e){if(this._searchTree){var t=this._surfacePoint(e);return this._searchTree.pointShape(t)}},t.prototype.image=function(){var e=this._root,t=this._rootElement,n=[];e.traverse((function(e){e.loading&&n.push(e.loading)}));var r=K(),o=function(){e._invalidate();try{var n=t.toDataURL();r.resolve(n)}catch(o){r.reject(o)}};return ue(n).then(o,o),r},t.prototype.suspendTracking=function(){e.prototype.suspendTracking.call(this),this._searchTree&&(this._searchTree.clear(),delete this._searchTree)},t.prototype.resumeTracking=function(){if(e.prototype.resumeTracking.call(this),!this._searchTree){this._searchTree=new qr;for(var t=this._root.childNodes,n=[],r=0;r"},t.prototype._enableTracking=function(){this._searchTree=new qr,this._cursor=new Yr(this),e.prototype._enableTracking.call(this)},t.prototype._trackMouse=function(e){if(!this._suspendedTracking){var t=this.eventTarget(e);if("click"!==e.type){var n=this._currentShape;n&&n!==t&&this.trigger("mouseleave",{element:n,originalEvent:e,type:"mouseleave"}),t&&n!==t&&this.trigger("mouseenter",{element:t,originalEvent:e,type:"mouseenter"}),this.trigger("mousemove",{element:t,originalEvent:e,type:"mousemove"}),this._currentShape=t}else t&&this.trigger("click",{element:t,originalEvent:e,type:"click"})}},t}(qn);$r.prototype.type="canvas","undefined"!==typeof document&&document.createElement("canvas").getContext&&(qn.support.canvas=!0,Zn.current.register("canvas",$r,20));var Xr=$r;var Jr=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.renderTo=function(e){e.save(),this.setTransform(e),this.setClip(e),this.setOpacity(e),e.beginPath(),this.renderPoints(e,this.srcElement),this.setLineDash(e),this.setLineCap(e),this.setLineJoin(e),this.setFill(e),this.setStroke(e),e.restore()},t.prototype.setFill=function(e){var t=this.srcElement.options.fill,n=!1;return t&&("Gradient"===t.nodeType?(this.setGradientFill(e,t),n=!0):ie(t.color)||(e.fillStyle=t.color,e.save(),this.globalAlpha(e,t.opacity),e.fill(),e.restore(),n=!0)),n},t.prototype.setGradientFill=function(e,t){var n,r=this.srcElement.rawBBox();if(t instanceof Dn){var o=t.start(),i=t.end();n=e.createLinearGradient(o.x,o.y,i.x,i.y)}else if(t instanceof In){var a=t.center();n=e.createRadialGradient(a.x,a.y,0,a.x,a.y,t.radius())}!function(e,t){for(var n=0;n0)return e.strokeStyle=t.color,e.lineWidth=de(t.width,1),e.save(),this.globalAlpha(e,t.opacity),e.stroke(),e.restore(),!0},t.prototype.dashType=function(){var e=this.srcElement.options.stroke;if(e&&e.dashType)return e.dashType.toLowerCase()},t.prototype.setLineDash=function(e){var t=this.dashType();if(t&&"solid"!==t){var n=gr[t];e.setLineDash?e.setLineDash(n):(e.mozDash=n,e.webkitLineDash=n)}},t.prototype.setLineCap=function(e){var t=this.dashType(),n=this.srcElement.options.stroke;t&&"solid"!==t?e.lineCap="butt":n&&n.lineCap&&(e.lineCap=n.lineCap)},t.prototype.setLineJoin=function(e){var t=this.srcElement.options.stroke;t&&t.lineJoin&&(e.lineJoin=t.lineJoin)},t.prototype.renderPoints=function(e,t){Fr(e,t)},t}(zr);jr.Path=Jr;var Qr=Jr,eo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.renderPoints=function(e){Fr(e,this.srcElement.toPath())},t}(Qr);jr.Arc=eo;var to=eo,no=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.renderPoints=function(e){var t=this.srcElement.geometry(),n=t.center,r=t.radius;e.arc(n.x,n.y,r,0,2*Math.PI)},t}(Qr);jr.Circle=no;var ro=no,oo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.renderPoints=function(e){var t=this.srcElement.geometry(),n=t.origin,r=t.size;e.rect(n.x,n.y,r.width,r.height)},t}(Qr);jr.Rect=oo;var io=oo,ao=function(e){function t(t,n){e.call(this,t),this.onLoad=this.onLoad.bind(this),this.onError=this.onError.bind(this),this.loading=K();var r=this.img=new Image;n&&!/^data:/i.test(t.src())&&(r.crossOrigin=n),r.src=t.src(),r.complete?this.onLoad():(r.onload=this.onLoad,r.onerror=this.onError)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.renderTo=function(e){"resolved"===this.loading.state()&&(e.save(),this.setTransform(e),this.setClip(e),this.drawImage(e),e.restore())},t.prototype.optionsChange=function(t){"src"===t.field?(this.loading=K(),this.img.src=this.srcElement.src()):e.prototype.optionsChange.call(this,t)},t.prototype.onLoad=function(){this.loading.resolve(),this.invalidate()},t.prototype.onError=function(){this.loading.reject(new Error("Unable to load image '"+this.img.src+"'. Check for connectivity and verify CORS headers."))},t.prototype.drawImage=function(e){var t=this.srcElement.rect(),n=t.topLeft();e.drawImage(this.img,n.x,n.y,t.width(),t.height())},t}(Qr);jr.Image=ao;var so=ao,lo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.renderTo=function(e){var t=this.srcElement,n=t.position(),r=t.measure();e.save(),this.setTransform(e),this.setClip(e),this.setOpacity(e),e.beginPath(),e.font=t.options.font,e.textAlign="left",this.setFill(e)&&e.fillText(t.content(),n.x,n.y+r.baseline),this.setStroke(e)&&(this.setLineDash(e),e.strokeText(t.content(),n.x,n.y+r.baseline)),e.restore()},t}(Qr);jr.Text=lo;var uo=lo,co=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.renderPoints=function(e){for(var t=this.srcElement.paths,n=0;n9),yo=function(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";return{decode:function(t){for(var n=t.replace(/[^A-Za-z0-9\+\/\=]/g,""),r=0,o=n.length,i=[];r>>4,p=(15&s)<<4|l>>>2,d=(3&l)<<6|u;i.push(c),64!=l&&i.push(p),64!=u&&i.push(d)}return i},encode:function(t){for(var n=0,r=t.length,o="";n>>4,u=(15&a)<<2|s>>>6,c=63&s;n-r==2?u=c=64:n-r==1&&(c=64),o+=e.charAt(i>>>2)+e.charAt(l)+e.charAt(u)+e.charAt(c)}return o}}}();function vo(e){var t=0,n=0;null==e?e=mo?new Uint8Array(256):[]:n=e.length;var r=mo?function(t){if(t>=e.length){var n=new Uint8Array(Math.max(t+256,2*e.length));n.set(e,0),e=n}}:function(){},o=mo?function(){return new Uint8Array(e.buffer,0,n)}:function(){return e},i=mo?function(o){if("string"==typeof o)return m(o);var i=o.length;r(t+i),e.set(o,t),(t+=i)>n&&(n=t)}:function(e){if("string"==typeof e)return m(e);for(var t=0;tn&&(n=t)}function l(){return a()<<8|a()}function u(e){s(e>>8),s(e)}function c(){return 65536*l()+l()}function p(e){u(e>>>16&65535),u(65535&e)}function d(){var e=c();return e>=2147483648?e-4294967296:e}function h(e){p(e<0?e+4294967296:e)}function f(e){return y(e,a)}function m(e){for(var t=0;t=n},readByte:a,writeByte:s,readShort:l,writeShort:u,readLong:c,writeLong:p,readFixed:function(){return c()/65536},writeFixed:function(e){p(Math.round(65536*e))},readShort_:function(){var e=l();return e>=32768?e-65536:e},writeShort_:function(e){u(e<0?e+65536:e)},readLong_:d,writeLong_:h,readFixed_:function(){return d()/65536},writeFixed_:function(e){h(Math.round(65536*e))},read:f,write:i,readString:function(e){return String.fromCharCode.apply(String,f(e))},writeString:m,times:y,get:o,slice:mo?function(t,n){if(e.buffer.slice)return new Uint8Array(e.buffer.slice(t,t+n));var r=new Uint8Array(n);return r.set(new Uint8Array(e.buffer,t,n)),r}:function(t,n){return e.slice(t,t+n)},offset:function(e){return null!=e?(t=e,v):t},skip:function(e){t+=e},toString:function(){throw new Error("FIX CALLER. BinaryStream is no longer convertible to string!")},length:function(){return n},saveExcursion:function(e){var n=t;try{return e()}finally{t=n}},writeBase64:function(e){window.atob?m(window.atob(e)):i(yo.decode(e))},base64:function(){return yo.encode(o())}};return v}function go(e){return window.atob?function(e){for(var t=window.atob(e),n=new Uint8Array(t.length),r=0;r65535,r=0;r=0?r.push(l):(r.push(e.length+o.length),o.push(s))}for(n.writeShort(t.length),i=0;i0;)n[t++]=e.readShort();break;case 12:e.readShort(),r.length=e.readLong(),r.language=e.readLong();for(var y=e.readLong();y-- >0;){t=e.readLong();for(var v=e.readLong(),g=e.readLong();t<=v;)n[t++]=g++}break;default:window.console&&window.console.error("Unhandled CMAP format: "+r.format)}}))}return ko({parse:function(t){var n=this,r=n.offset;t.offset(r),n.codeMap={},n.version=t.readShort();var o=t.readShort();n.tables=t.times(o,(function(){return new e(t,r,n.codeMap)}))},render:function(e,t){var n=vo();return n.writeShort(0),n.writeShort(1),n.write(function(e,t){var n=wo(e),r=[],o=[],i=null,a=null;function s(n){return t[e[n]]}for(var l=0;l=32768){y.push(0),v.push(2*(g.length+p-l));for(var k=b;k<=w;++k)g.push(s(k))}else y.push(x-b),v.push(0)}var _=vo();return _.writeShort(3),_.writeShort(1),_.writeLong(12),_.writeShort(4),_.writeShort(16+8*p+2*g.length),_.writeShort(0),_.writeShort(d),_.writeShort(h),_.writeShort(f),_.writeShort(m),o.forEach(_.writeShort),_.writeShort(0),r.forEach(_.writeShort),y.forEach(_.writeShort_),v.forEach(_.writeShort),g.forEach(_.writeShort),_.get()}(e,t)),n.get()}})}(),Do=ko({parse:function(e){e.offset(this.offset),this.version=e.readShort(),this.averageCharWidth=e.readShort_(),this.weightClass=e.readShort(),this.widthClass=e.readShort(),this.type=e.readShort(),this.ySubscriptXSize=e.readShort_(),this.ySubscriptYSize=e.readShort_(),this.ySubscriptXOffset=e.readShort_(),this.ySubscriptYOffset=e.readShort_(),this.ySuperscriptXSize=e.readShort_(),this.ySuperscriptYSize=e.readShort_(),this.ySuperscriptXOffset=e.readShort_(),this.ySuperscriptYOffset=e.readShort_(),this.yStrikeoutSize=e.readShort_(),this.yStrikeoutPosition=e.readShort_(),this.familyClass=e.readShort_(),this.panose=e.times(10,e.readByte),this.charRange=e.times(4,e.readLong),this.vendorID=e.readString(4),this.selection=e.readShort(),this.firstCharIndex=e.readShort(),this.lastCharIndex=e.readShort(),this.version>0&&(this.ascent=e.readShort_(),this.descent=e.readShort_(),this.lineGap=e.readShort_(),this.winAscent=e.readShort(),this.winDescent=e.readShort(),this.codePageRange=e.times(2,e.readLong),this.version>1&&(this.xHeight=e.readShort(),this.capHeight=e.readShort(),this.defaultChar=e.readShort(),this.breakChar=e.readShort(),this.maxContext=e.readShort()))},render:function(){return this.raw()}}),Ao=1e5;function Io(e){this.font=e,this.subset={},this.unicodes={},this.ogid2ngid={0:0},this.ngid2ogid={0:0},this.ncid2ogid={},this.next=this.firstChar=1,this.nextGid=1,this.psName=function(){for(var e="",t=String(Ao),n=0;n=55296&&t<=56319&&o=0&&(i=i.replace(/\.?0+$/,"")),"-0"==i&&(i="0"),t.writeString(i)}else/string|boolean/.test(typeof o)?t.writeString(String(o)):"function"==typeof o.get?t.write(o.get()):"object"==typeof o&&(o?n(new hi(o)):t.writeString("null"))}}return n.writeData=function(e){t.write(e)},n.withIndent=function(t){++e,t(n),--e},n.indent=function(){n(Fo,Yo("",2*e," ")),n.apply(null,arguments)},n.offset=function(){return t.offset()},n.toString=function(){throw new Error("FIX CALLER")},n.get=function(){return t.get()},n.stream=function(){return t},n}function Ho(e){if("function"!=typeof e){var t=e;e=function(e,n){return e in t?t[e]:n}}var n=e("paperSize",Bo.a4);if(!n)return{};if("string"==typeof n&&null==(n=Bo[n.toLowerCase()]))throw new Error("Unknown paper size");n[0]=ii(n[0]),n[1]=ii(n[1]),e("landscape",!1)&&(n=[Math.max(n[0],n[1]),Math.min(n[0],n[1])]);var r=e("margin");return r&&(r="string"==typeof r||"number"==typeof r?{left:r=ii(r,0),top:r,right:r,bottom:r}:{left:ii(r.left,0),top:ii(r.top,0),right:ii(r.right,0),bottom:ii(r.bottom,0)},e("addMargin")&&(n[0]+=r.left+r.right,n[1]+=r.top+r.bottom)),{paperSize:n,margin:r}}function Vo(e){var t=this,n=Uo(),r=0,o=[];function i(t,n){return e&&null!=e[t]?e[t]:n}t.getOption=i,t.attach=function(e){return o.indexOf(e)<0&&(!function(e,t){var n=e.beforeRender,r=e.render;e.beforeRender=function(){},e.render=function(e){e(t," 0 R")},e.renderFull=function(o){e._offset=o.offset(),o(t," 0 obj "),n.call(e,o),r.call(e,o),o(" endobj")}}(e,++r),o.push(e)),e},t.pages=[],t.FONTS={},t.IMAGES={},t.GRAD_COL_FUNCTIONS={},t.GRAD_OPC_FUNCTIONS={},t.GRAD_COL={},t.GRAD_OPC={};var a=t.attach(new mi),s=t.attach(new yi);if(i("autoPrint")){var l={};l.JavaScript=new hi({Names:[new li("JS"),t.attach(new hi({S:di("JavaScript"),JS:new li("print(true);")}))]}),a.props.Names=new hi(l)}a.setPages(s);var u=t.attach(new hi({Producer:new li(i("producer","Kendo UI PDF Generator")),Title:new li(i("title","")),Author:new li(i("author","")),Subject:new li(i("subject","")),Keywords:new li(i("keywords","")),Creator:new li(i("creator","Kendo UI PDF Generator")),CreationDate:i("date",new Date)}));t.addPage=function(e){var n=Ho((function(t,n){return e&&null!=e[t]?e[t]:n})),r=n.paperSize,o=n.margin,i=r[0],a=r[1];o&&(i-=o.left+o.right,a-=o.top+o.bottom);var l=new fi(Uo(),null,!0),u={Contents:t.attach(l),Parent:s,MediaBox:[0,0,r[0],r[1]]},c=new Oi(t,u);return c._content=l,s.addPage(t.attach(c)),c.transform(1,0,0,-1,0,r[1]),o&&(c.translate(o.left,o.top),c.rect(0,0,i,a),c.clip()),t.pages.push(c),c},t.render=function(){var e;for(n("%PDF-1.4",Fo,"%\xc2\xc1\xda\xcf\xce",Fo,Fo),e=0;e0;)Ko(e[r],o)}),Wo=function(e,t){var n=Object.keys(e),r=n.length;if(0===r)return t();function o(){0===--r&&t()}n.forEach((function(t){!function(e,t,n){var r,o,i=Go[e];if(i)n(i);else if(i=new Image,/^data:/i.test(e)||(i.crossOrigin="Anonymous"),mo&&!/^data:/i.test(e)){var a=new XMLHttpRequest;a.onload=function(){o=a.response,s(r=URL.createObjectURL(o))},a.onerror=u,a.open("GET",e,!0),a.responseType="blob",a.send()}else s(e);function s(e){i.src=e,i.complete&&!jo.msie?c():(i.onload=c,i.onerror=u)}function l(){t||(t={width:i.width,height:i.height});var o=document.createElement("canvas");o.width=t.width,o.height=t.height;var a,s=o.getContext("2d");s.drawImage(i,0,0,t.width,t.height);try{a=s.getImageData(0,0,t.width,t.height)}catch(v){return void u()}finally{r&&URL.revokeObjectURL(r)}for(var l=!1,c=vo(),p=vo(),d=a.data,h=0;h=i.width||t.height>=i.height)&&(t=null),!t&&o&&/^image\/jpe?g$/i.test(o.type)){var a=new FileReader;a.onload=function(){try{var t=new gi(vo(new Uint8Array(this.result)));URL.revokeObjectURL(r),n(Go[e]=t)}catch(o){l()}},a.readAsArrayBuffer(o)}else l()}}(t,e[t],o)}))};function Yo(e,t,n){for(;e.length0&&t.withIndent((function(){for(var n=0;n0&&n%8===0?t.indent(e[n]):t(" ",e[n])})),t(" ]")}function ti(e,t){t("(D:",$o(e.getUTCFullYear(),4),$o(e.getUTCMonth()+1,2),$o(e.getUTCDate(),2),$o(e.getUTCHours(),2),$o(e.getUTCMinutes(),2),$o(e.getUTCSeconds(),2),"Z)")}function ni(e){return e*(72/25.4)}function ri(e){return ni(10*e)}function oi(e){return 72*e}function ii(e,t){if("number"==typeof e)return e;var n;if("string"==typeof e&&(n=/^\s*([0-9.]+)\s*(mm|cm|in|pt)\s*$/.exec(e))){var r=parseFloat(n[1]);if(!isNaN(r))return"pt"==n[2]?r:{mm:ni,cm:ri,in:oi}[n[2]](r)}if(null!=t)return t;throw new Error("Can't parse unit: "+e)}function ai(){}function si(e,t,n){for(var r in n||(n=ai),e.prototype=new n,t)Xo(t,r)&&(e.prototype[r]=t[r]);return e}ai.prototype.beforeRender=function(){};var li=si((function(e){this.value=e}),{render:function(e){for(var t="",n=this.value,r=0;r")}},li),ci=si((function(e){this.name=e}),{render:function(e){e("/"+this.escape())},escape:function(){return this.name.replace(/[^\x21-\x7E]/g,(function(e){return"#"+$o(e.charCodeAt(0).toString(16),2)}))},toString:function(){return this.name}}),pi={};function di(e){return Xo(pi,e)?pi[e]:pi[e]=new ci(e)}ci.get=di;var hi=si((function(e){this.props=e}),{render:function(e){var t=this.props,n=!0;e("<<"),e.withIndent((function(){for(var r in t)Xo(t,r)&&!/^_/.test(r)&&(n=!1,e.indent(di(r)," ",t[r]))})),n||e.indent(),e(">>")}}),fi=si((function(e,t,n){if("string"==typeof e){var r=vo();r.write(e),e=r}this.data=e,this.props=t||{},this.compress=n}),{render:function(e){var t=this.data.get(),n=this.props;this.compress&&(n.Filter?n.Filter instanceof Array||(n.Filter=[n.Filter]):n.Filter=[],n.Filter.unshift(di("FlateDecode")),t=Ro(t)),n.Length=t.length,e(new hi(n)," stream",Fo),e.writeData(t),e(Fo,"endstream")}}),mi=si((function(){this.props={Type:di("Catalog")}}),{setPages:function(e){this.props.Pages=e}},hi),yi=si((function(){this.props={Type:di("Pages"),Kids:[],Count:0}}),{addPage:function(e){this.props.Kids.push(e),this.props.Count++}},hi),vi=[192,193,194,195,197,198,199,201,202,203,205,206,207];function gi(e){var t,n,r,o;if(e.offset(0),65496!=e.readShort())throw new Error("Invalid JPEG image");for(;!e.eof();){if(255!=e.readByte())throw new Error("Invalid JPEG image");var i=e.readByte(),a=e.readShort();if(vi.indexOf(i)>=0){o=e.readByte(),n=e.readShort(),t=e.readShort(),r=e.readByte();break}e.skip(a-2)}if(null==r)throw new Error("Invalid JPEG image");var s={Type:di("XObject"),Subtype:di("Image"),Width:t,Height:n,BitsPerComponent:o,Filter:di("DCTDecode")};switch(r){case 1:s.ColorSpace=di("DeviceGray");break;case 3:s.ColorSpace=di("DeviceRGB");break;case 4:s.ColorSpace=di("DeviceCMYK"),s.Decode=[1,0,1,0,1,0,1,0]}this.asStream=function(){e.offset(0);var t=new fi(e,s);return t._resourceName=di("I"+ ++zo),t}}function bi(e,t,n,r){this.asStream=function(o){var i=new fi(r,{Type:di("XObject"),Subtype:di("Image"),Width:e,Height:t,BitsPerComponent:8,ColorSpace:di("DeviceGray")},!0),a=new fi(n,{Type:di("XObject"),Subtype:di("Image"),Width:e,Height:t,BitsPerComponent:8,ColorSpace:di("DeviceRGB"),SMask:o.attach(i)},!0);return a._resourceName=di("I"+ ++zo),a}}var wi=si((function(e){this.props={Type:di("Font"),Subtype:di("Type1"),BaseFont:di(e)},this._resourceName=di("F"+ ++zo)}),{encodeText:function(e){return new li(String(e))}},hi),xi=si((function(e,t,n){(n=this.props=n||{}).Type=di("Font"),n.Subtype=di("Type0"),n.Encoding=di("Identity-H"),this._pdf=e,this._font=t,this._sub=t.makeSubset(),this._resourceName=di("F"+ ++zo);var r=t.head;this.name=t.psName;var o=this.scale=t.scale;this.bbox=[r.xMin*o,r.yMin*o,r.xMax*o,r.yMax*o],this.italicAngle=t.post.italicAngle,this.ascent=t.ascent*o,this.descent=t.descent*o,this.lineGap=t.lineGap*o,this.capHeight=t.os2.capHeight||this.ascent,this.xHeight=t.os2.xHeight||0,this.stemV=0,this.familyClass=(t.os2.familyClass||0)>>8,this.isSerif=this.familyClass>=1&&this.familyClass<=7,this.isScript=10==this.familyClass,this.flags=(t.post.isFixedPitch?1:0)|(this.isSerif?2:0)|(this.isScript?8:0)|(0!==this.italicAngle?64:0)|32}),{encodeText:function(e){return new ui(this._sub.encodeText(String(e)))},getTextWidth:function(e,t){for(var n=0,r=this._font.cmap.codeMap,o=0;o> def"),e.indent("/CMapName /Adobe-Identity-UCS def"),e.indent("/CMapType 2 def"),e.indent("1 begincodespacerange"),e.indent(" <0000>"),e.indent("endcodespacerange");var t=this;e.indent(t.lastChar-t.firstChar+1," beginbfchar"),e.withIndent((function(){for(var n=t.firstChar;n<=t.lastChar;++n){var r=t.map[n],o=[r].map((function(e){var t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|1023&e),t+=String.fromCharCode(e)})).join("");e.indent("<",$o(n.toString(16),4),">","<");for(var i=0;i")}})),e.indent("endbfchar"),e.indent("endcmap"),e.indent("CMapName currentdict /CMap defineresource pop"),e.indent("end"),e.indent("end")}});function _i(e){return e.map((function(e){return Jo(e)?_i(e):"number"==typeof e?(Math.round(1e3*e)/1e3).toFixed(3):e})).join(" ")}function Ci(e,t,n,r,o,i,a){var s=_i([t,n,r,o,i,a]),l=e.GRAD_COL_FUNCTIONS[s];return l||(l=e.GRAD_COL_FUNCTIONS[s]=e.attach(new hi({FunctionType:2,Domain:[0,1],Range:[0,1,0,1,0,1],N:1,C0:[t,n,r],C1:[o,i,a]}))),l}function Si(e,t,n){var r=_i([t,n]),o=e.GRAD_OPC_FUNCTIONS[r];return o||(o=e.GRAD_OPC_FUNCTIONS[r]=e.attach(new hi({FunctionType:2,Domain:[0,1],Range:[0,1],N:1,C0:[t],C1:[n]}))),o}function Ni(e,t,n){var r="radial"==t.type,o=function(e,t){var n,r,o,i,a,s=!1,l=[],u=[],c=[],p=[];for(n=1;n1&&t&&this._font instanceof xi){var n=t/this._font.getTextWidth(this._fontSize,e)*100;this._out(n," Tz ")}this._out(this._font.encodeText(e)," Tj",Fo)},showTextNL:function(e){this._requireFont(),this._out(this._font.encodeText(e)," '",Fo)},addLink:function(e,t){var n=this._toPage({x:t.left,y:t.bottom}),r=this._toPage({x:t.right,y:t.top});this._annotations.push(new hi({Type:di("Annot"),Subtype:di("Link"),Rect:[n.x,n.y,r.x,r.y],Border:[0,0,0],A:new hi({Type:di("Action"),S:di("URI"),URI:new li(e)})}))},setStrokeColor:function(e,t,n){this._out(e," ",t," ",n," RG",Fo)},setOpacity:function(e){this.setFillOpacity(e),this.setStrokeOpacity(e),this._opacity*=e},setStrokeOpacity:function(e){if(e<1){var t=this._pdf.getOpacityGS(this._opacity*e,!0);this._gsResources[t._resourceName]=t,this._out(t._resourceName," gs",Fo)}},setFillColor:function(e,t,n){this._out(e," ",t," ",n," rg",Fo)},setFillOpacity:function(e){if(e<1){var t=this._pdf.getOpacityGS(this._opacity*e,!1);this._gsResources[t._resourceName]=t,this._out(t._resourceName," gs",Fo)}},gradient:function(e,t){this.save(),this.rect(t.left,t.top,t.width,t.height),this.clip(),e.userSpace||this.transform(t.width,0,0,t.height,t.left,t.top);var n,r=Ni(this._pdf,e,t),o=r.shading._resourceName;this._shResources[o]=r.shading,r.hasAlpha&&(n=r.opacity._resourceName,this._gsResources[n]=r.opacity,this._out("/"+n+" gs ")),this._out("/"+o+" sh",Fo),this.restore()},setDashPattern:function(e,t){this._out(e," ",t," d",Fo)},setLineWidth:function(e){this._out(e," w",Fo)},setLineCap:function(e){this._out(e," J",Fo)},setLineJoin:function(e){this._out(e," j",Fo)},setMitterLimit:function(e){this._out(e," M",Fo)},save:function(){this._contextStack.push(this._context()),this._out("q",Fo)},restore:function(){this._out("Q",Fo),this._context(this._contextStack.pop())},moveTo:function(e,t){this._out(e," ",t," m",Fo)},lineTo:function(e,t){this._out(e," ",t," l",Fo)},bezier:function(e,t,n,r,o,i){this._out(e," ",t," ",n," ",r," ",o," ",i," c",Fo)},bezier1:function(e,t,n,r){this._out(e," ",t," ",n," ",r," y",Fo)},bezier2:function(e,t,n,r){this._out(e," ",t," ",n," ",r," v",Fo)},close:function(){this._out("h",Fo)},rect:function(e,t,n,r){this._out(e," ",t," ",n," ",r," re",Fo)},ellipse:function(e,t,n,r){function o(t){return e+t}function i(e){return t+e}var a=.5522847498307936;this.moveTo(o(0),i(r)),this.bezier(o(n*a),i(r),o(n),i(r*a),o(n),i(0)),this.bezier(o(n),i(-r*a),o(n*a),i(-r),o(0),i(-r)),this.bezier(o(-n*a),i(-r),o(-n),i(-r*a),o(-n),i(0)),this.bezier(o(-n),i(r*a),o(-n*a),i(r),o(0),i(r))},circle:function(e,t,n){this.ellipse(e,t,n,n)},stroke:function(){this._out("S",Fo)},nop:function(){this._out("n",Fo)},clip:function(){this._out("W n",Fo)},clipStroke:function(){this._out("W S",Fo)},closeStroke:function(){this._out("s",Fo)},fill:function(){this._out("f",Fo)},fillStroke:function(){this._out("B",Fo)},drawImage:function(e){var t=this._pdf.getImage(e);t&&(this._xResources[t._resourceName]=t,this._out(t._resourceName," Do",Fo))},comment:function(e){var t=this;e.split(/\r?\n/g).forEach((function(e){t._out("% ",e,Fo)}))},_context:function(e){if(null==e)return{opacity:this._opacity,matrix:this._matrix};this._opacity=e.opacity,this._matrix=e.matrix},_toPage:function(e){var t=this._matrix,n=t[0],r=t[1],o=t[2],i=t[3],a=t[4],s=t[5];return{x:n*e.x+o*e.y+a,y:r*e.x+i*e.y+s}}},hi);var Mi={serif:"Times-Roman","serif|bold":"Times-Bold","serif|italic":"Times-Italic","serif|bold|italic":"Times-BoldItalic","sans-serif":"Helvetica","sans-serif|bold":"Helvetica-Bold","sans-serif|italic":"Helvetica-Oblique","sans-serif|bold|italic":"Helvetica-BoldOblique",monospace:"Courier","monospace|bold":"Courier-Bold","monospace|italic":"Courier-Oblique","monospace|bold|italic":"Courier-BoldOblique",zapfdingbats:"ZapfDingbats","zapfdingbats|bold":"ZapfDingbats","zapfdingbats|italic":"ZapfDingbats","zapfdingbats|bold|italic":"ZapfDingbats"};function Ti(e,t){e=e.toLowerCase(),Mi[e]=function(){return Mi[t]},Mi[e+"|bold"]=function(){return Mi[t+"|bold"]},Mi[e+"|italic"]=function(){return Mi[t+"|italic"]},Mi[e+"|bold|italic"]=function(){return Mi[t+"|bold|italic"]}}function Ei(e,t){var n=e[0],r=e[1],o=e[2],i=e[3],a=e[4],s=e[5],l=t[0],u=t[1],c=t[2],p=t[3];return[n*l+r*c,n*u+r*p,o*l+i*c,o*u+i*p,a*l+s*c+t[4],a*u+s*p+t[5]]}function Pi(e){return 1===e[0]&&0===e[1]&&0===e[2]&&1===e[3]&&0===e[4]&&0===e[5]}Ti("Times New Roman","serif"),Ti("Courier New","monospace"),Ti("Arial","sans-serif"),Ti("Helvetica","sans-serif"),Ti("Verdana","sans-serif"),Ti("Tahoma","sans-serif"),Ti("Georgia","sans-serif"),Ti("Monaco","monospace"),Ti("Andale Mono","monospace");var Di=O.browser||{};function Ai(e){return Array.prototype.slice.call(e)}var Ii={},Li={};Li._root=Li;var Ri=!!("undefined"!==typeof window)&&(Di.msie||Di.edge),ji=function(e){function t(t,n,r){e.call(this,t,n.getOrigin(),r),this._pdfRect=n}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.rect=function(){return this._pdfRect},t.prototype.rawBBox=function(){return this._pdfRect},t}(Jt);function Fi(e,t){Object.keys(t).forEach((function(n){e.style[n]=t[n]}))}var zi,Bi="undefined"!==typeof Element&&Element.prototype&&((zi=Element.prototype).matches?function(e,t){return e.matches(t)}:zi.webkitMatchesSelector?function(e,t){return e.webkitMatchesSelector(t)}:zi.mozMatchesSelector?function(e,t){return e.mozMatchesSelector(t)}:zi.msMatchesSelector?function(e,t){return e.msMatchesSelector(t)}:function(e){return-1!==[].indexOf.call(document.querySelectorAll(e),this)});function Ui(e,t){if(e.closest)return e.closest(t);for(;e&&!/^\[object (?:HTML)?Document\]$/.test(String(e));){if(1==e.nodeType&&Bi(e,t))return e;e=e.parentNode}}var Hi,Vi=(Hi="undefined"!==typeof window&&window.kendo&&window.kendo.jQuery)?function e(t){var n=t.cloneNode(!1);if(1==t.nodeType){var r,o=Hi(t),i=Hi(n),a=o.data();for(r in a)i.data(r,a[r]);for(/^canvas$/i.test(t.tagName)?n.getContext("2d").drawImage(t,0,0):/^(?:input|select|textarea|option)$/i.test(t.tagName)&&(n.removeAttribute("id"),n.removeAttribute("name"),n.value=t.value,n.checked=t.checked,n.selected=t.selected),r=t.firstChild;r;r=r.nextSibling)n.appendChild(e(r))}return n}:function(e){var t=function e(t){var n=t.cloneNode(!1);t._kendoExportVisual&&(n._kendoExportVisual=t._kendoExportVisual);for(var r=t.firstChild;r;r=r.nextSibling)n.appendChild(e(r));return n}(e),n=e.querySelectorAll("canvas");n.length&&Ai(t.querySelectorAll("canvas")).forEach((function(e,t){e.getContext("2d").drawImage(n[t],0,0)}));var r=e.querySelectorAll("input, select, textarea, option");return Ai(t.querySelectorAll("input, select, textarea, option")).forEach((function(e,t){e.removeAttribute("id"),e.removeAttribute("name"),e.value=r[t].value,e.checked=r[t].checked,e.selected=r[t].selected})),t};function Zi(e,t){t||(t={});var n=K();if(!e)return n.reject("No element to export");if("function"!=typeof window.getComputedStyle)throw new Error("window.getComputedStyle is missing. You are using an unsupported browser, or running in IE8 compatibility mode. Drawing HTML is supported in Chrome, Firefox, Safari and IE9+.");!function e(t,n){if(1==arguments.length)for(var r in t)Xo(t,r)&&e(r,t[r]);else switch(t=t.toLowerCase(),Mi[t]=n,t){case"dejavu sans":Mi["sans-serif"]=n;break;case"dejavu sans|bold":Mi["sans-serif|bold"]=n;break;case"dejavu sans|italic":Mi["sans-serif|italic"]=n;break;case"dejavu sans|bold|italic":Mi["sans-serif|bold|italic"]=n;break;case"dejavu serif":Mi.serif=n;break;case"dejavu serif|bold":Mi["serif|bold"]=n;break;case"dejavu serif|italic":Mi["serif|italic"]=n;break;case"dejavu serif|bold|italic":Mi["serif|bold|italic"]=n;break;case"dejavu mono":Mi.monospace=n;break;case"dejavu mono|bold":Mi["monospace|bold"]=n;break;case"dejavu mono|italic":Mi["monospace|italic"]=n;break;case"dejavu mono|bold|italic":Mi["monospace|bold|italic"]=n}}($i(e.ownerDocument));var r,o="number"==typeof(r=t.scale||1)?{x:r,y:r}:Array.isArray(r)?{x:r[0],y:r[1]}:{x:r.x,y:r.y};function i(e){var n,r,i=new rn,a=e.getBoundingClientRect();return ya(i,[o.x,0,0,o.y,-a.left*o.x,-a.top*o.y]),Li._clipbox=!1,Li._matrix=Re.unit(),Li._stackingContext={element:e,group:i},!0===t.avoidLinks?Li._avoidLinks="a":Li._avoidLinks=t.avoidLinks,r="k-pdf-export",(n=e).classList?n.classList.add(r):n.className+=" "+r,Aa(e,i),function(e,t){e.classList?e.classList.remove(t):e.className=e.className.split(/\s+/).reduce((function(e,n){return n!=t&&e.push(n),e}),[]).join(" ")}(e,"k-pdf-export"),i}return ra(e,(function(){var r=t&&t.forcePageBreak,a=t&&t.paperSize&&"auto"!=t.paperSize,s=Ho((function(e,n){return"paperSize"==e?a?t[e]:"A4":e in t?t[e]:n})),l=a&&s.paperSize[0],u=a&&s.paperSize[1],c=t.margin&&s.margin,p=Boolean(c);if(r||u){c||(c={left:0,top:0,right:0,bottom:0}),l&&(l/=o.x),u&&(u/=o.y),c.left/=o.x,c.right/=o.x,c.top/=o.y,c.bottom/=o.y;var d=new rn({pdf:{multiPage:!0,paperSize:a?s.paperSize:"auto",_ignoreMargin:p}});!function(e,t,n,r,o,i,a){var s=function(e){if(null!=e)return"string"==typeof e&&(e=function(){throw new Error("String template not yet supported. Pass a function and use your preferred template engine.")}(e.replace(/^\s+|\s+$/g,""))),"function"==typeof e?function(t){var n=e(t);if(n&&"string"==typeof n){var r=document.createElement("div");r.innerHTML=n,n=r.firstElementChild}return n}:function(){return e.cloneNode(!0)}}(a.template),l=t.ownerDocument,u=[],c=a._destructive?t:Vi(t),p=l.createElement("KENDO-PDF-DOCUMENT"),d=0;Ai(c.querySelectorAll("tfoot")).forEach((function(e){e.parentNode.appendChild(e)})),Ai(c.querySelectorAll("ol")).forEach((function(e){Ai(e.children).forEach((function(e,t){e.setAttribute("kendo-split-index",t)}))})),Fi(p,{display:"block",position:"absolute",boxSizing:"content-box",left:"-10000px",top:"-10000px"}),r&&(Fi(p,{width:r+"px",paddingLeft:i.left+"px",paddingRight:i.right+"px"}),Fi(c,{overflow:"hidden"}));t.parentNode.insertBefore(p,t),p.appendChild(c),a.beforePageBreak?setTimeout((function(){a.beforePageBreak(p,h)}),15):setTimeout(h,15);function h(){("-"!=n||o)&&function e(t){"TABLE"==t.tagName&&Fi(t,{tableLayout:"fixed"});if(f(t))return;var r=la(t),i=parseFloat(ua(r,"padding-bottom")),a=parseFloat(ua(r,"border-bottom-width")),s=d;d+=i+a;for(var l=!0,u=t.firstChild;u;u=u.nextSibling)if(1==u.nodeType){if(l=!1,Bi(u,n)){m(u);continue}if(!o){e(u);continue}if(!/^(?:static|relative)$/.test(ua(la(u),"position")))continue;var c=v(u);1==c||c&&f(u)?m(u):e(u)}else 3==u.nodeType&&o&&(g(u,l),l=!1);d=s}(c);var t=y();c.parentNode.insertBefore(t,c),t.appendChild(c),s&&u.forEach((function(e,t){var n=s({element:e,pageNum:t+1,totalPages:u.length});n&&e.appendChild(n)})),ra(u,(function(){!function(e,t){var n=0;e.forEach((function(e){for(var t=e.querySelectorAll("img"),o=0;o=o-d)&&(e.getAttribute("data-kendo-chart")||/^(?:img|tr|thead|th|tfoot|iframe|svg|object|canvas|input|textarea|select|video|h[1-6])/i.test(e.tagName))}function m(e){if(1==e.nodeType&&e!==c&&function(e){var t=e.parentNode,n=t.firstChild;if(e===n)return!0;if(e===t.children[0]){if(7==n.nodeType||8==n.nodeType)return!0;if(3==n.nodeType)return!/\S/.test(n.data)}return!1}(e))return m(e.parentNode);var t,n,r,o,i;n=(t=Ui(e,"table"))&&t.querySelector("colgroup"),a.repeatHeaders&&(r=t&&t.querySelector("thead"),(o=Ui(e,".k-grid.k-widget"))&&o.querySelector(".k-auto-scrollable")&&(i=o.querySelector(".k-grid-header")));var s=y(),u=l.createRange();u.setStartBefore(c),u.setEndBefore(e),s.appendChild(u.extractContents()),c.parentNode.insertBefore(s,c),b(e.parentNode),t&&(t=Ui(e,"table"),a.repeatHeaders&&r&&t.insertBefore(r.cloneNode(!0),t.firstChild),n&&t.insertBefore(n.cloneNode(!0),t.firstChild)),a.repeatHeaders&&i&&(o=Ui(e,".k-grid.k-widget")).insertBefore(i.cloneNode(!0),o.firstChild)}function y(){var e=l.createElement("KENDO-PDF-PAGE");return Fi(e,{display:"block",boxSizing:"content-box",width:r?r+"px":"auto",padding:i.top+"px "+i.right+"px "+i.bottom+"px "+i.left+"px",position:"relative",height:o?o+"px":"auto",overflow:o||r?"hidden":"visible",clear:"both"}),a&&a.pageClassName&&(e.className=a.pageClassName),u.push(e),e}function v(e){var t=e.getBoundingClientRect();if(0===t.width||0===t.height)return 0;var n=c.getBoundingClientRect().top,r=o-d;return t.height>r?3:t.top-n>r?1:t.bottom-n>r?2:0}function g(e,t){if(/\S/.test(e.data)){var n=e.data.length,r=l.createRange();r.selectNodeContents(e);var o=v(r);if(o){var i=e;if(1==o)m(t?e.parentNode:e);else if(function t(n,o,i){return r.setEnd(e,o),n==o||o==i?o:v(r)?t(n,n+o>>1,o):t(o,o+i>>1,i)}(0,n>>1,n),!/\S/.test(r.toString())&&t)m(e.parentNode);else{i=e.splitText(r.endOffset);var a=y();r.setStartBefore(c),a.appendChild(r.extractContents()),c.parentNode.insertBefore(a,c),b(i.parentNode)}g(i)}}}function b(e){var t=Ui(e,"li");t&&(t.setAttribute("kendo-no-bullet","1"),b(t.parentNode))}}((function(e){if(t.progress){var r=!1,o=0;!function a(){if(oa&&(i.push(p(t.substring(a,s))),a=s+o[0].length),s+=o[0].length):s++;return a0&&i(e,l,u,c,p[0])}}}(e,t)}}function o(e){var t=ua(e.style,"src");if(t)return qi(t).reduce((function(e,t){var n=Wi(t);return n&&e.push(n),e}),[]);var n=Wi(e.cssText);return n?[n]:[]}function i(e,n,r,o,i){/^data:/i.test(i)||/^[^\/:]+:\/\//.test(i)||/^\//.test(i)||(i=String(e.href).replace(/[^\/]*$/,"")+i),n.forEach((function(e){e=e.replace(/^(['"]?)(.*?)\1$/,"$2"),r&&(e+="|bold"),o&&(e+="|italic"),t[e]=i}))}}function Xi(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Ji(e,t){var n=Li;for(e="_counter_"+e;n&&!Xi(n,e);)n=Object.getPrototypeOf(n);n||(n=Li._root),n[e]=(n[e]||0)+(null==t?1:t)}function Qi(e,t){Li[e="_counter_"+e]=null==t?0:t}function ea(e,t,n){for(var r=0;r0);return t}function ia(e,t,n){(Li=Object.create(Li))[e.tagName.toLowerCase()]={element:e,style:t};var r=ua(t,"text-decoration");if(r&&"none"!=r){var o=ua(t,"color");r.split(/\s+/g).forEach((function(e){Li[e]||(Li[e]=o)}))}(function(e){function t(t){return ua(e,t)}if("none"!=t("transform")||"static"!=t("position")||"auto"!=t("z-index")||t("opacity")<1)return!0})(t)&&(Li._stackingContext={element:e,group:n})}function aa(){Li=Object.getPrototypeOf(Li)}function sa(e){if(null!=Li._clipbox){var t=e.bbox(Li._matrix);Li._clipbox?Li._clipbox=Ve.intersect(Li._clipbox,t):Li._clipbox=t}}function la(e,t){return window.getComputedStyle(e,t||null)}function ua(e,t,n){var r=e.getPropertyValue(t);return null!=r&&""!==r||(Di.webkit?r=e.getPropertyValue("-webkit-"+t):Di.mozilla?r=e.getPropertyValue("-moz-"+t):Di.opera?r=e.getPropertyValue("-o-"+t):Ri&&(r=e.getPropertyValue("-ms-"+t))),arguments.length>2&&(null==r||""===r)?n:r}function ca(e,t,n,r){e.setProperty(t,n,r),Di.webkit?e.setProperty("-webkit-"+t,n,r):Di.mozilla?e.setProperty("-moz-"+t,n,r):Di.opera?e.setProperty("-o-"+t,n,r):Ri&&(e.setProperty("-ms-"+t,n,r),e[t="ms"+t.replace(/(^|-)([a-z])/g,(function(e,t,n){return t+n.toUpperCase()}))]=n)}function pa(e,t){return t="border-"+t,{width:parseFloat(ua(e,t+"-width")),style:ua(e,t+"-style"),color:na(ua(e,t+"-color"),!0)}}function da(e,t){var n=e.style.cssText,r=t();return e.style.cssText=n,r}function ha(e,t){var n=ua(e,"border-"+t+"-radius").split(/\s+/g).map(parseFloat);return 1==n.length&&n.push(n[0]),ba({x:n[0],y:n[1]})}function fa(e,t,n){var r,o,i,a,s;return"string"==typeof t?(r=la(n),o=parseFloat(ua(r,t.replace("*","top"))),i=parseFloat(ua(r,t.replace("*","right"))),a=parseFloat(ua(r,t.replace("*","bottom"))),s=parseFloat(ua(r,t.replace("*","left")))):"number"==typeof t&&(o=i=a=s=t),{top:e.top+o,right:e.right-i,bottom:e.bottom-a,left:e.left+s,width:e.right-e.left-i-s,height:e.bottom-e.top-a-o}}function ma(e){return 180*e/Math.PI%360}function ya(e,t){return t=new Re(t[0],t[1],t[2],t[3],t[4],t[5]),e.transform(t),t}function va(e,t){e.clip(t)}function ga(e,t,n,r){for(var o=new dt([t,n],r).curvePoints(),i=1;i0){var r=e.className;e.className+=" kendo-pdf-hide-pseudo-elements",Oa(e,t),e.className=r,n.forEach((function(t){e.removeChild(t)}))}else Oa(e,t)}else Oa(e,t);function o(t,r){var o=la(e,t),i=o.content;if(ta(o),i&&"normal"!=i&&"none"!=i&&"0px"!=o.width){var a=e.ownerDocument.createElement("KENDO-PSEUDO-ELEMENT");a.style.cssText=Sa(o),a.textContent=Ca(e,i),e.insertBefore(a,r),n.push(a)}}}function Oa(e,t){var n=la(e),r=pa(n,"top"),o=pa(n,"right"),i=pa(n,"bottom"),a=pa(n,"left"),s=ha(n,"top-left"),l=ha(n,"top-right"),u=ha(n,"bottom-left"),c=ha(n,"bottom-right"),p=ua(n,"direction"),d=ua(n,"background-color");d=na(d);var h,f,m=Ki(ua(n,"background-image")),y=qi(ua(n,"background-repeat")),v=qi(ua(n,"background-position")),g=qi(ua(n,"background-origin")),b=qi(ua(n,"background-size"));Ri&&"ellipsis"==(h=n.textOverflow)&&(f=e.style.textOverflow,e.style.textOverflow="clip"),Di.msie&&Di.version<10&&(v=qi(e.currentStyle.backgroundPosition));var w,x,k,_=fa(e.getBoundingClientRect(),"border-*-width",e);!function(){var e=ua(n,"clip"),r=/^\s*rect\((.*)\)\s*$/.exec(e);if(r){var o=r[1].split(/[ ,]+/g),i="auto"==o[0]?_.top:parseFloat(o[0])+_.top,a="auto"==o[1]?_.right:parseFloat(o[1])+_.left,s="auto"==o[2]?_.bottom:parseFloat(o[2])+_.top,l="auto"==o[3]?_.left:parseFloat(o[3])+_.left,u=new rn,c=(new Wt).moveTo(l,i).lineTo(a,i).lineTo(a,s).lineTo(l,s).close();va(u,c),t.append(u),t=u,sa(c)}}();var C=ua(n,"display");if("table-row"==C)for(w=[],x=0,k=e.children;x0&&"list-item"==C&&!e.getAttribute("kendo-no-bullet")&&function(){var r=ua(n,"list-style-type");if("none"==r)return;var o=ua(n,"list-style-position");function i(n){da(e,(function(){e.style.position="relative";var r=e.ownerDocument.createElement("KENDO-PSEUDO-ELEMENT");r.style.position="absolute",r.style.boxSizing="border-box","outside"==o?(r.style.width="6em",r.style.left="-6.8em",r.style.textAlign="right"):r.style.left="0px",n(r),e.insertBefore(r,e.firstChild),Aa(r,t),e.removeChild(r)}))}function a(t){var n=e.parentNode.children,r=e.getAttribute("kendo-split-index");if(null!=r)return t(0|r,n.length);for(var o=0;o0&&a.y>0?(s.lineTo(a.x*Math.cos(i),n.y-a.y*Math.sin(i)),ga(s,0,n.y,{startAngle:-ma(i),endAngle:-90,radiusX:a.x,radiusY:a.y,anticlockwise:!0})):a.x>0?s.lineTo(a.x,r).lineTo(0,r):s.lineTo(a.x,r).lineTo(a.x,0),c.append(s.close())}}function O(t,n,r,o,i,a,s){var l;if(r&&"none"!=r)if("url"==r.type){if(/^url\(\"data:image\/svg/i.test(r.url))return;var u=Ii[r.url];u&&u.width>0&&u.height>0&&c(t,n,u.width,u.height,(function(e,t){e.append(new en(r.url,t))}))}else{if("linear"!=r.type)return;c(t,n,n.width,n.height,(l=r,function(e,t){var n=t.width(),r=t.height();switch(l.type){case"linear":var o=null!=l.angle?l.angle:Math.PI;switch(l.to){case"top":o=0;break;case"left":o=-Math.PI/2;break;case"bottom":o=Math.PI;break;case"right":o=Math.PI/2;break;case"top left":case"left top":o=-Math.atan2(r,n);break;case"top right":case"right top":o=Math.atan2(r,n);break;case"bottom left":case"left bottom":o=Math.PI+Math.atan2(r,n);break;case"bottom right":case"right bottom":o=Math.PI-Math.atan2(r,n)}l.reverse&&(o-=Math.PI),(o%=2*Math.PI)<0&&(o+=2*Math.PI);var i=Math.abs(n*Math.sin(o))+Math.abs(r*Math.cos(o)),a=Math.atan(n*Math.tan(o)/r),s=Math.sin(a),u=Math.cos(a),c=Math.abs(s)+Math.abs(u),p=c/2*s,d=c/2*u;o>Math.PI/2&&o<=3*Math.PI/2&&(p=-p,d=-d);var h=[],f=0,m=l.stops.map((function(e,t){var n=e.percent;n?n=parseFloat(n)/100:e.length?n=parseFloat(e.length)/i:0===t?n=0:t==l.stops.length-1&&(n=1);var r={color:e.color.toCssRgba(),offset:n};return null!=n?(f=n,h.forEach((function(e,t){e.stop.offset=e.left+(f-e.left)*(t+1)/(h.length+1)})),h=[]):h.push({left:f,stop:r}),r})),y=[.5-p,.5+d],v=[.5+p,.5-d];e.append(Wt.fromRect(t).stroke(null).fill(new Dn({start:y,end:v,stops:m,userSpace:!1})));break;case"radial":window.console&&window.console.log&&window.console.log("Radial gradients are not yet supported in HTML renderer")}}))}function c(t,n,r,l,u){var c,p=r/l,d=n;if("content-box"==a?(d=fa(d,"border-*-width",e),d=fa(d,"padding-*",e)):"padding-box"==a&&(d=fa(d,"border-*-width",e)),!/^\s*auto(\s+auto)?\s*$/.test(s))if("contain"==s)c=Math.min(d.width/r,d.height/l),r*=c,l*=c;else if("cover"==s)c=Math.max(d.width/r,d.height/l),r*=c,l*=c;else{var h=s.split(/\s+/g);r=/%$/.test(h[0])?d.width*parseFloat(h[0])/100:parseFloat(h[0]),l=1==h.length||"auto"==h[1]?r/p:/%$/.test(h[1])?d.height*parseFloat(h[1])/100:parseFloat(h[1])}var f=String(i);switch(f){case"bottom":f="50% 100%";break;case"top":f="50% 0";break;case"left":f="0 50%";break;case"right":f="100% 50%";break;case"center":f="50% 50%"}1==(f=f.split(/\s+/)).length&&(f[1]="50%"),/%$/.test(f[0])?f[0]=parseFloat(f[0])/100*(d.width-r):f[0]=parseFloat(f[0]),/%$/.test(f[1])?f[1]=parseFloat(f[1])/100*(d.height-l):f[1]=parseFloat(f[1]);var m=new Ve([d.left+f[0],d.top+f[1]],[r,l]);function y(){for(;m.origin.x>n.left;)m.origin.x-=r}function v(){for(;m.origin.y>n.top;)m.origin.y-=l}function g(){for(;m.origin.x=0;)O(n,e,m[o],y[o%y.length],v[o%v.length],g[o%g.length],b[o%b.length])}(n);var w=a.width>0&&(h&&"ltr"==p||f&&"rtl"==p),x=o.width>0&&(f&&"ltr"==p||h&&"rtl"==p);if(0!==r.width||0!==a.width||0!==o.width||0!==i.width){if(r.color==o.color&&r.color==i.color&&r.color==a.color&&r.width==o.width&&r.width==i.width&&r.width==a.width&&w&&x){n=fa(n,r.width/2);var k=xa(e,n,r.width/2);return k.options.stroke={color:r.color,width:r.width},void t.append(k)}if(0===s.x&&0===l.x&&0===c.x&&0===u.x&&r.width<2&&a.width<2&&o.width<2&&i.width<2)return r.width>0&&t.append(new Wt({stroke:{width:r.width,color:r.color}}).moveTo(n.left,n.top+r.width/2).lineTo(n.right,n.top+r.width/2)),i.width>0&&t.append(new Wt({stroke:{width:i.width,color:i.color}}).moveTo(n.left,n.bottom-i.width/2).lineTo(n.right,n.bottom-i.width/2)),w&&t.append(new Wt({stroke:{width:a.width,color:a.color}}).moveTo(n.left+a.width/2,n.top).lineTo(n.left+a.width/2,n.bottom)),void(x&&t.append(new Wt({stroke:{width:o.width,color:o.color}}).moveTo(n.right-o.width/2,n.top).lineTo(n.right-o.width/2,n.bottom)));var _=wa(n,s,l,c,u),C=_.tl,S=_.tr,M=_.br,T=_.bl;N(r.color,n.width,r.width,a.width,o.width,C,S,[1,0,0,1,n.left,n.top]),N(i.color,n.width,i.width,o.width,a.width,M,T,[-1,0,0,-1,n.right,n.bottom]),N(a.color,n.height,a.width,i.width,r.width,E(T),E(C),[0,-1,1,0,n.left,n.bottom]),N(o.color,n.height,o.width,r.width,i.width,E(S),E(M),[0,1,-1,0,n.right,n.top])}}function E(e){return{x:e.y,y:e.x}}}}function Ma(e,t,n){var r=function(e){var t=e.getBoundingClientRect();return t=fa(t,"border-*-width",e),t=fa(t,"padding-*",e)}(e),o=new Ve([r.left,r.top],[r.width,r.height]),i=new en(t,o);va(i,xa(e,r,"content")),n.append(i)}function Ta(e,t){var n=la(e),r=la(t),o=parseFloat(ua(n,"z-index")),i=parseFloat(ua(r,"z-index")),a=ua(n,"position"),s=ua(r,"position");return isNaN(o)&&isNaN(i)?/static|absolute/.test(a)&&/static|absolute/.test(s)?0:"static"==a?-1:"static"==s?1:0:isNaN(o)?0===i?0:i>0?-1:1:isNaN(i)?0===o?0:o>0?1:-1:parseFloat(o)-parseFloat(i)}function Ea(e,t){var n=e.tagName.toLowerCase();if("input"==n&&("checkbox"==e.type||"radio"==e.type))return function(e,t){var n=ua(la(e),"color"),r=e.getBoundingClientRect();"checkbox"==e.type?(t.append(Wt.fromRect(new Ve([r.left+1,r.top+1],[r.width-2,r.height-2])).stroke(n,1)),e.checked&&t.append((new Wt).stroke(n,1.2).moveTo(r.left+.22*r.width,r.top+.55*r.height).lineTo(r.left+.45*r.width,r.top+.75*r.height).lineTo(r.left+.78*r.width,r.top+.22*r.width))):(t.append(new it(new Je([(r.left+r.right)/2,(r.top+r.bottom)/2],Math.min(r.width-2,r.height-2)/2)).stroke(n,1)),e.checked&&t.append(new it(new Je([(r.left+r.right)/2,(r.top+r.bottom)/2],Math.min(r.width-8,r.height-8)/2)).fill(n).stroke(null)))}(e,t);var r,o=e.parentNode,i=e.ownerDocument,a=i.createElement("KENDO-PSEUDO-ELEMENT");if(a.style.cssText=Sa(la(e)),"input"==n&&(a.style.whiteSpace="pre"),"select"!=n&&"textarea"!=n||(a.style.overflow="auto"),"select"==n)if(e.multiple)for(var s=0;s0?e.selectedOptions[0]:e.options[e.selectedIndex]}(e))&&(a.textContent=r.textContent);else a.textContent=e.value;o.insertBefore(a,e),a.scrollLeft=e.scrollLeft,a.scrollTop=e.scrollTop,e.style.display="none",Pa(a,t),e.style.display="",o.removeChild(a)}function Pa(e,t){switch(Li._stackingContext.element===e&&(Li._stackingContext.group=t),e.tagName.toLowerCase()){case"img":Ma(e,e.src,t);break;case"canvas":try{Ma(e,e.toDataURL("image/png"),t)}catch(l){}break;case"textarea":case"input":case"select":Ea(e,t);break;default:for(var n=[],r=[],o=[],i=e.firstChild;i;i=i.nextSibling)switch(i.nodeType){case 3:/\S/.test(i.data)&&Da(e,i,t);break;case 1:var a=la(i),s=ua(a,"float");"static"!=ua(a,"position")?o.push(i):"none"!=s?r.push(i):n.push(i)}le(n,Ta).forEach((function(e){Aa(e,t)})),le(r,Ta).forEach((function(e){Aa(e,t)})),le(o,Ta).forEach((function(e){Aa(e,t)}))}}function Da(e,t,n){if(!function(){var e=Li._clipbox;return null==e||(e?0===e.width()||0===e.height():void 0)}()){var r=la(e);if(!(parseFloat(ua(r,"text-indent"))<-500)){var o=t.data,i=0,a=o.search(/\S\s*$/)+1;if(a){var s=ua(r,"font-size"),l=ua(r,"line-height"),u=[ua(r,"font-style"),ua(r,"font-variant"),ua(r,"font-weight"),s,ua(r,"font-family")].join(" ");if(s=parseFloat(s),l=parseFloat(l),0!==s){var c=ua(r,"color"),p=e.ownerDocument.createRange(),d="justify"==ua(r,"text-align"),h=ua(r,"column-count",1),f=ua(r,"white-space"),m=ua(r,"text-transform"),y=e.getBoundingClientRect().width/s*5;0===y&&(y=500);for(var v=null,g=Li.underline,b=Li["line-through"],w=Li.overline,x=g||b||w;!_(););return void(x&&(p.selectNode(t),Ai(p.getClientRects()).forEach((function(e){function t(t,r){if(t){var o=s/12,i=new Wt({stroke:{width:o,color:t}});r-=o,i.moveTo(e.left,r).lineTo(e.right,r),n.append(i)}}t(g,e.bottom),t(b,e.bottom-e.height/2.7),t(w,e.top)}))))}}}}function k(e){if(Ri||Di.chrome){for(var t=e.getClientRects(),n={top:1/0,right:-1/0,bottom:-1/0,left:1/0},r=!1,o=0;o=a)return!0;p.setStart(t,i),p.setEnd(t,i+1),e=k(p);var g=!1;if((d||h>1)&&(s=o.substr(i).search(/\s/))>=0){p.setEnd(t,i+s);var b=k(p);b.bottom==e.bottom&&(e=b,g=!0,i+=s)}if(!g){if((s=function n(r,o,i){p.setEnd(t,o);var a=k(p);return a.bottom!=e.bottom&&r>1,o):a.right!=e.right?(e=a,o>1,i):o):o}(i,Math.min(a,i+y),a))==i)return!0;if(i=s,0===(s=p.toString().search(/\s+$/)))return!1;s>0&&(p.setEnd(t,p.startOffset+s),e=k(p))}Ri&&(e=p.getClientRects()[0]);var w=p.toString();if(/^(?:pre|pre-wrap)$/i.test(f)){if(/\t/.test(w)){var x=0;for(s=r;s=0;){var C=" ".substr(0,8-(x+s)%8);w=w.substr(0,s)+C+w.substr(s+1)}}}else w=w.replace(/\s+/g," ");g||(v=e.bottom),function(e,t){if(Ri&&!isNaN(l)){var r=Yi(u),o=(t.top+t.bottom-r)/2;t={top:o,right:t.right,bottom:o+r,left:t.left,height:r,width:t.right-t.left}}switch(m){case"uppercase":e=e.toUpperCase();break;case"lowercase":e=e.toLowerCase();break;case"capitalize":e=e.replace(/(?:^|\s)\S/g,(function(e){return e.toUpperCase()}))}var i=new ji(e,new Ve([t.left,t.top],[t.width,t.height]),{font:u,fill:{color:c}});n.append(i)}(w,e)}}function Aa(e,t){var n=la(e);if(ta(n),!/^(style|script|link|meta|iframe|svg|col|colgroup)$/i.test(e.tagName)&&null!=Li._clipbox){var r=parseFloat(ua(n,"opacity")),o=ua(n,"visibility"),i=ua(n,"display");if(0!==r&&"hidden"!=o&&"none"!=i){var a,s=function(e){var t=ua(e,"transform");if("none"==t)return null;var n=/^\s*matrix\(\s*(.*?)\s*\)\s*$/.exec(t);if(n){var r=ua(e,"transform-origin");return{matrix:n=n[1].split(/\s*,\s*/g).map(parseFloat),origin:r=r.split(/\s+/g).map(parseFloat)}}}(n),l=ua(n,"z-index");(s||r<1)&&"auto"==l&&(l=0),a=function(e,t,n){var r;"auto"!=n?(r=Li._stackingContext.group,n=parseFloat(n)):(r=t,n=0);for(var o=r.children,i=0;in);++i);var a=new rn;if(r.insert(i,a),a._dom_zIndex=n,r!==t&&Li._clipbox){var s=Li._matrix.invert(),l=Li._clipbox.transformCopy(s);va(a,Wt.fromRect(l))}return a}(0,t,l),r<1&&a.opacity(r*a.opacity()),ia(e,n,a),s?da(e,(function(){ca(e.style,"transform","none","important"),ca(e.style,"transition","none","important"),"static"==ua(n,"position")&&ca(e.style,"position","relative","important");var t=e.getBoundingClientRect(),r=t.left+s.origin[0],o=t.top+s.origin[1],i=[1,0,0,1,-r,-o];i=Ia(i,s.matrix),i=Ia(i,[1,0,0,1,r,o]),i=ya(a,i),Li._matrix=Li._matrix.multiplyCopy(i),Na(e,a)})):Na(e,a),aa()}}}function Ia(e,t){var n=e[0],r=e[1],o=e[2],i=e[3],a=e[4],s=e[5],l=t[0],u=t[1],c=t[2],p=t[3];return[n*l+r*c,n*u+r*p,o*l+i*c,o*u+i*p,a*l+s*c+t[4],a*u+s*p+t[5]]}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"d",(function(){return p})),n.d(t,"b",(function(){return m})),n.d(t,"c",(function(){return i.g})),n.d(t,"e",(function(){return y})),n.d(t,"f",(function(){return v})),n.d(t,"g",(function(){return g})),n.d(t,"h",(function(){return b})),n.d(t,"i",(function(){return w})),n.d(t,"j",(function(){return x}));var r=n(0),o=n(1),i=n(17),a=function(){function e(e){this.locale=e}return e.prototype.format=function(e){for(var t=[],n=1;n>1}},r.from=function(e){if(e instanceof r)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new r(t)};var o=r;var i=function(e,t){if(this.content=e,this.size=t||0,null==t)for(var n=0;ne&&!1!==n(s,r+a,o,i)&&s.content.size){var u=a+1;s.nodesBetween(Math.max(0,e-u),Math.min(s.content.size,t-u),n,r+u)}a=l}},i.prototype.descendants=function(e){this.nodesBetween(0,this.size,e)},i.prototype.textBetween=function(e,t,n,r){var o="",i=!0;return this.nodesBetween(e,t,(function(a,s){a.isText?(o+=a.text.slice(Math.max(e,s)-s,t-s),i=!n):a.isLeaf&&r?(o+=r,i=!n):!i&&a.isBlock&&(o+=n,i=!0)}),0),o},i.prototype.append=function(e){if(!e.size)return this;if(!this.size)return e;var t=this.lastChild,n=e.firstChild,r=this.content.slice(),o=0;for(t.isText&&t.sameMarkup(n)&&(r[r.length-1]=t.withText(t.text+n.text),o=1);oe)for(var o=0,a=0;ae&&((at)&&(s=s.isText?s.cut(Math.max(0,e-a),Math.min(s.text.length,t-a)):s.cut(Math.max(0,e-a-1),Math.min(s.content.size,t-a-1))),n.push(s),r+=s.nodeSize),a=l}return new i(n,r)},i.prototype.cutByIndex=function(e,t){return e==t?i.empty:0==e&&t==this.content.length?this:new i(this.content.slice(e,t))},i.prototype.replaceChild=function(e,t){var n=this.content[e];if(n==t)return this;var r=this.content.slice(),o=this.size+t.nodeSize-n.nodeSize;return r[e]=t,new i(r,o)},i.prototype.addToStart=function(e){return new i([e].concat(this.content),this.size+e.nodeSize)},i.prototype.addToEnd=function(e){return new i(this.content.concat(e),this.size+e.nodeSize)},i.prototype.eq=function(e){if(this.content.length!=e.content.length)return!1;for(var t=0;tthis.size||e<0)throw new RangeError("Position "+e+" outside of fragment ("+this+")");for(var n=0,r=0;;n++){var o=r+this.child(n).nodeSize;if(o>=e)return o==e||t>0?l(n+1,o):l(n,r);r=o}},i.prototype.toString=function(){return"<"+this.toStringInner()+">"},i.prototype.toStringInner=function(){return this.content.join(", ")},i.prototype.toJSON=function(){return this.content.length?this.content.map((function(e){return e.toJSON()})):null},i.fromJSON=function(e,t){if(!t)return i.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new i(t.map(e.nodeFromJSON))},i.fromArray=function(e){if(!e.length)return i.empty;for(var t,n=0,r=0;rthis.type.rank&&(t||(t=e.slice(0,r)),t.push(this),n=!0),t&&t.push(o)}}return t||(t=e.slice()),n||t.push(this),t},c.prototype.removeFromSet=function(e){for(var t=0;te.depth)throw new p("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new p("Inconsistent open depths");return function e(t,n,r,o){var a=t.index(o),s=t.node(o);if(a==n.index(o)&&o=0;o--)r=t.node(o).copy(i.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}(r,t),c=u.start,p=u.end;return b(s,function e(t,n,r,o,a){var s=t.depth>a&&y(t,n,a+1),l=o.depth>a&&y(r,o,a+1),u=[];g(null,t,a,u),s&&l&&n.index(a)==r.index(a)?(m(s,l),v(b(s,e(t,n,r,o,a+1)),u)):(s&&v(b(s,w(t,n,a+1)),u),g(n,r,a,u),l&&v(b(l,w(r,o,a+1)),u));return g(o,null,a,u),new i(u)}(t,c,p,n,o))}var d=t.parent,h=d.content;return b(d,h.cut(0,t.parentOffset).append(r.content).append(h.cut(n.parentOffset)))}return b(s,w(t,n,o))}(e,t,n,0)}function m(e,t){if(!t.type.compatibleContent(e.type))throw new p("Cannot join "+t.type.name+" onto "+e.type.name)}function y(e,t,n){var r=e.node(n);return m(r,t.node(n)),r}function v(e,t){var n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function g(e,t,n,r){var o=(t||e).node(n),i=0,a=t?t.index(n):o.childCount;e&&(i=e.index(n),e.depth>n?i++:e.textOffset&&(v(e.nodeAfter,r),i++));for(var s=i;sn)&&v(b(y(e,t,n+1),w(e,t,n+1)),r);return g(t,null,n,r),new i(r)}h.size.get=function(){return this.content.size-this.openStart-this.openEnd},d.prototype.insertAt=function(e,t){var n=function e(t,n,r,o){var i=t.findIndex(n),a=i.index,s=i.offset,l=t.maybeChild(a);if(s==n||l.isText)return o&&!o.canReplace(a,a,r)?null:t.cut(0,n).append(r).append(t.cut(n));var u=e(l.content,n-s-1,r);return u&&t.replaceChild(a,l.copy(u))}(this.content,e+this.openStart,t,null);return n&&new d(n,this.openStart,this.openEnd)},d.prototype.removeBetween=function(e,t){return new d(function e(t,n,r){var o=t.findIndex(n),i=o.index,a=o.offset,s=t.maybeChild(i),l=t.findIndex(r),u=l.index,c=l.offset;if(a==n||s.isText){if(c!=r&&!t.child(u).isText)throw new RangeError("Removing non-flat range");return t.cut(0,n).append(t.cut(r))}if(i!=u)throw new RangeError("Removing non-flat range");return t.replaceChild(i,s.copy(e(s.content,n-a-1,r-a-1)))}(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)},d.prototype.eq=function(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd},d.prototype.toString=function(){return this.content+"("+this.openStart+","+this.openEnd+")"},d.prototype.toJSON=function(){if(!this.content.size)return null;var e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e},d.fromJSON=function(e,t){if(!t)return d.empty;var n=t.openStart||0,r=t.openEnd||0;if("number"!=typeof n||"number"!=typeof r)throw new RangeError("Invalid input for Slice.fromJSON");return new d(i.fromJSON(e,t.content),t.openStart||0,t.openEnd||0)},d.maxOpen=function(e,t){void 0===t&&(t=!0);for(var n=0,r=0,o=e.firstChild;o&&!o.isLeaf&&(t||!o.type.spec.isolating);o=o.firstChild)n++;for(var i=e.lastChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.lastChild)r++;return new d(e,n,r)},Object.defineProperties(d.prototype,h),d.empty=new d(i.empty,0,0);var x=function(e,t,n){this.pos=e,this.path=t,this.depth=t.length/3-1,this.parentOffset=n},k={parent:{configurable:!0},doc:{configurable:!0},textOffset:{configurable:!0},nodeAfter:{configurable:!0},nodeBefore:{configurable:!0}};x.prototype.resolveDepth=function(e){return null==e?this.depth:e<0?this.depth+e:e},k.parent.get=function(){return this.node(this.depth)},k.doc.get=function(){return this.node(0)},x.prototype.node=function(e){return this.path[3*this.resolveDepth(e)]},x.prototype.index=function(e){return this.path[3*this.resolveDepth(e)+1]},x.prototype.indexAfter=function(e){return e=this.resolveDepth(e),this.index(e)+(e!=this.depth||this.textOffset?1:0)},x.prototype.start=function(e){return 0==(e=this.resolveDepth(e))?0:this.path[3*e-1]+1},x.prototype.end=function(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size},x.prototype.before=function(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]},x.prototype.after=function(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]+this.path[3*e].nodeSize},k.textOffset.get=function(){return this.pos-this.path[this.path.length-1]},k.nodeAfter.get=function(){var e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;var n=this.pos-this.path[this.path.length-1],r=e.child(t);return n?e.child(t).cut(n):r},k.nodeBefore.get=function(){var e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):0==e?null:this.parent.child(e-1)},x.prototype.marks=function(){var e=this.parent,t=this.index();if(0==e.content.size)return c.none;if(this.textOffset)return e.child(t).marks;var n=e.maybeChild(t-1),r=e.maybeChild(t);if(!n){var o=n;n=r,r=o}for(var i=n.marks,a=0;a0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0},x.prototype.blockRange=function(e,t){if(void 0===e&&(e=this),e.pos=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new N(this,e,n)},x.prototype.sameParent=function(e){return this.pos-this.parentOffset==e.pos-e.parentOffset},x.prototype.max=function(e){return e.pos>this.pos?e:this},x.prototype.min=function(e){return e.pos=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");for(var n=[],r=0,o=t,i=e;;){var a=i.content.findIndex(o),s=a.index,l=a.offset,u=o-l;if(n.push(i,s,r+l),!u)break;if((i=i.child(s)).isText)break;o=u-1,r+=l+1}return new x(t,n,o)},x.resolveCached=function(e,t){for(var n=0;n<_.length;n++){var r=_[n];if(r.pos==t&&r.doc==e)return r}var o=_[C]=x.resolve(e,t);return C=(C+1)%S,o},Object.defineProperties(x.prototype,k);var _=[],C=0,S=12,N=function(e,t,n){this.$from=e,this.$to=t,this.depth=n},O={start:{configurable:!0},end:{configurable:!0},parent:{configurable:!0},startIndex:{configurable:!0},endIndex:{configurable:!0}};O.start.get=function(){return this.$from.before(this.depth+1)},O.end.get=function(){return this.$to.after(this.depth+1)},O.parent.get=function(){return this.$from.node(this.depth)},O.startIndex.get=function(){return this.$from.index(this.depth)},O.endIndex.get=function(){return this.$to.indexAfter(this.depth)},Object.defineProperties(N.prototype,O);var M=Object.create(null),T=function(e,t,n,r){this.type=e,this.attrs=t,this.content=n||i.empty,this.marks=r||c.none},E={nodeSize:{configurable:!0},childCount:{configurable:!0},textContent:{configurable:!0},firstChild:{configurable:!0},lastChild:{configurable:!0},isBlock:{configurable:!0},isTextblock:{configurable:!0},inlineContent:{configurable:!0},isInline:{configurable:!0},isText:{configurable:!0},isLeaf:{configurable:!0},isAtom:{configurable:!0}};E.nodeSize.get=function(){return this.isLeaf?1:2+this.content.size},E.childCount.get=function(){return this.content.childCount},T.prototype.child=function(e){return this.content.child(e)},T.prototype.maybeChild=function(e){return this.content.maybeChild(e)},T.prototype.forEach=function(e){this.content.forEach(e)},T.prototype.nodesBetween=function(e,t,n,r){void 0===r&&(r=0),this.content.nodesBetween(e,t,n,r,this)},T.prototype.descendants=function(e){this.nodesBetween(0,this.content.size,e)},E.textContent.get=function(){return this.textBetween(0,this.content.size,"")},T.prototype.textBetween=function(e,t,n,r){return this.content.textBetween(e,t,n,r)},E.firstChild.get=function(){return this.content.firstChild},E.lastChild.get=function(){return this.content.lastChild},T.prototype.eq=function(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)},T.prototype.sameMarkup=function(e){return this.hasMarkup(e.type,e.attrs,e.marks)},T.prototype.hasMarkup=function(e,t,n){return this.type==e&&u(this.attrs,t||e.defaultAttrs||M)&&c.sameSet(this.marks,n||c.none)},T.prototype.copy=function(e){return void 0===e&&(e=null),e==this.content?this:new this.constructor(this.type,this.attrs,e,this.marks)},T.prototype.mark=function(e){return e==this.marks?this:new this.constructor(this.type,this.attrs,this.content,e)},T.prototype.cut=function(e,t){return 0==e&&t==this.content.size?this:this.copy(this.content.cut(e,t))},T.prototype.slice=function(e,t,n){if(void 0===t&&(t=this.content.size),void 0===n&&(n=!1),e==t)return d.empty;var r=this.resolve(e),o=this.resolve(t),i=n?0:r.sharedDepth(t),a=r.start(i),s=r.node(i).content.cut(r.pos-a,o.pos-a);return new d(s,r.depth-i,o.depth-i)},T.prototype.replace=function(e,t,n){return f(this.resolve(e),this.resolve(t),n)},T.prototype.nodeAt=function(e){for(var t=this;;){var n=t.content.findIndex(e),r=n.index,o=n.offset;if(!(t=t.maybeChild(r)))return null;if(o==e||t.isText)return t;e-=o+1}},T.prototype.childAfter=function(e){var t=this.content.findIndex(e),n=t.index,r=t.offset;return{node:this.content.maybeChild(n),index:n,offset:r}},T.prototype.childBefore=function(e){if(0==e)return{node:null,index:0,offset:0};var t=this.content.findIndex(e),n=t.index,r=t.offset;if(re&&this.nodesBetween(e,t,(function(e){return n.isInSet(e.marks)&&(r=!0),!r})),r},E.isBlock.get=function(){return this.type.isBlock},E.isTextblock.get=function(){return this.type.isTextblock},E.inlineContent.get=function(){return this.type.inlineContent},E.isInline.get=function(){return this.type.isInline},E.isText.get=function(){return this.type.isText},E.isLeaf.get=function(){return this.type.isLeaf},E.isAtom.get=function(){return this.type.isAtom},T.prototype.toString=function(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);var e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),D(this.marks,e)},T.prototype.contentMatchAt=function(e){var t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t},T.prototype.canReplace=function(e,t,n,r,o){void 0===n&&(n=i.empty),void 0===r&&(r=0),void 0===o&&(o=n.childCount);var a=this.contentMatchAt(e).matchFragment(n,r,o),s=a&&a.matchFragment(this.content,t);if(!s||!s.validEnd)return!1;for(var l=r;l=0;n--)t=e[n].type.name+"("+t+")";return t}var A=function(e){this.validEnd=e,this.next=[],this.wrapCache=[]},I={inlineContent:{configurable:!0},defaultType:{configurable:!0},edgeCount:{configurable:!0}};A.parse=function(e,t){var n=new L(e,t);if(null==n.next)return A.empty;var r=j(n);n.next&&n.err("Unexpected trailing text");var o=function(e){var t=Object.create(null);return function n(r){var o=[];r.forEach((function(t){e[t].forEach((function(t){var n=t.term,r=t.to;if(n){var i=o.indexOf(n),a=i>-1&&o[i+1];V(e,r).forEach((function(e){a||o.push(n,a=[]),-1==a.indexOf(e)&&a.push(e)}))}}))}));for(var i=t[r.join(",")]=new A(r.indexOf(e.length-1)>-1),a=0;a>1},A.prototype.edge=function(e){var t=e<<1;if(t>=this.next.length)throw new RangeError("There's no "+e+"th edge in this content match");return{type:this.next[t],next:this.next[t+1]}},A.prototype.toString=function(){var e=[];return function t(n){e.push(n);for(var r=1;r"+e.indexOf(t.next[o+1]);return r})).join("\n")},Object.defineProperties(A.prototype,I),A.empty=new A(!0);var L=function(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.unshift()},R={next:{configurable:!0}};function j(e){var t=[];do{t.push(F(e))}while(e.eat("|"));return 1==t.length?t[0]:{type:"choice",exprs:t}}function F(e){var t=[];do{t.push(z(e))}while(e.next&&")"!=e.next&&"|"!=e.next);return 1==t.length?t[0]:{type:"seq",exprs:t}}function z(e){for(var t=function(e){if(e.eat("(")){var t=j(e);return e.eat(")")||e.err("Missing closing paren"),t}if(!/\W/.test(e.next)){var n=function(e,t){var n=e.nodeTypes,r=n[t];if(r)return[r];var o=[];for(var i in n){var a=n[i];a.groups.indexOf(t)>-1&&o.push(a)}0==o.length&&e.err("No node type or group '"+t+"' found");return o}(e,e.next).map((function(t){return null==e.inline?e.inline=t.isInline:e.inline!=t.isInline&&e.err("Mixing inline and block content"),{type:"name",value:t}}));return e.pos++,1==n.length?n[0]:{type:"choice",exprs:n}}e.err("Unexpected token '"+e.next+"'")}(e);;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else{if(!e.eat("{"))break;t=U(e,t)}return t}function B(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");var t=Number(e.next);return e.pos++,t}function U(e,t){var n=B(e),r=n;return e.eat(",")&&(r="}"!=e.next?B(e):-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function H(e,t){return t-e}function V(e,t){var n=[];return function t(r){var o=e[r];if(1==o.length&&!o[0].term)return t(o[0].to);n.push(r);for(var i=0;i-1},q.prototype.allowsMarks=function(e){if(null==this.markSet)return!0;for(var t=0;t-1};var J=function(e){for(var t in this.spec={},e)this.spec[t]=e[t];this.spec.nodes=o.from(e.nodes),this.spec.marks=o.from(e.marks),this.nodes=q.compile(this.spec.nodes,this),this.marks=X.compile(this.spec.marks,this);var n=Object.create(null);for(var r in this.nodes){if(r in this.marks)throw new RangeError(r+" can not be both a node and a mark");var i=this.nodes[r],a=i.spec.content||"",s=i.spec.marks;i.contentMatch=n[a]||(n[a]=A.parse(a,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.markSet="_"==s?null:s?Q(this,s.split(" ")):""!=s&&i.inlineContent?null:[]}for(var l in this.marks){var u=this.marks[l],c=u.spec.excludes;u.excluded=null==c?[u]:""==c?[]:Q(this,c.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached=Object.create(null),this.cached.wrappings=Object.create(null)};function Q(e,t){for(var n=[],r=0;r-1)&&n.push(a=l)}if(!a)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}J.prototype.node=function(e,t,n,r){if("string"==typeof e)e=this.nodeType(e);else{if(!(e instanceof q))throw new RangeError("Invalid node type: "+e);if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}return e.createChecked(t,n,r)},J.prototype.text=function(e,t){var n=this.nodes.text;return new P(n,n.defaultAttrs,e,c.setFrom(t))},J.prototype.mark=function(e,t){return"string"==typeof e&&(e=this.marks[e]),e.create(t)},J.prototype.nodeFromJSON=function(e){return T.fromJSON(this,e)},J.prototype.markFromJSON=function(e){return c.fromJSON(this,e)},J.prototype.nodeType=function(e){var t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t};var ee=function(e,t){var n=this;this.schema=e,this.rules=t,this.tags=[],this.styles=[],t.forEach((function(e){e.tag?n.tags.push(e):e.style&&n.styles.push(e)}))};ee.prototype.parse=function(e,t){void 0===t&&(t={});var n=new ae(this,t,!1);return n.addAll(e,null,t.from,t.to),n.finish()},ee.prototype.parseSlice=function(e,t){void 0===t&&(t={});var n=new ae(this,t,!0);return n.addAll(e,null,t.from,t.to),d.maxOpen(n.finish())},ee.prototype.matchTag=function(e,t){for(var n=0;ne.length&&(61!=o.style.charCodeAt(e.length)||o.style.slice(e.length+1)!=t))){if(o.getAttrs){var i=o.getAttrs(t);if(!1===i)continue;o.attrs=i}return o}}},ee.schemaRules=function(e){var t=[];function n(e){for(var n=null==e.priority?50:e.priority,r=0;r=0;r--){var o=this.nodes[r],i=o.findWrapping(e);if(i&&(!t||t.length>i.length)&&(t=i,n=o,!i.length))break;if(o.solid)break}if(!t)return!1;this.sync(n);for(var a=0;athis.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}},ae.prototype.finish=function(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)},ae.prototype.sync=function(e){for(var t=this.open;t>=0;t--)if(this.nodes[t]==e)return void(this.open=t)},se.currentPos.get=function(){this.closeExtra();for(var e=0,t=this.open;t>=0;t--){for(var n=this.nodes[t].content,r=n.length-1;r>=0;r--)e+=n[r].nodeSize;t&&e++}return e},ae.prototype.findAtPoint=function(e,t){if(this.find)for(var n=0;n-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);var n=e.split("/"),r=this.options.context,o=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(o?0:1);return function e(a,s){for(;a>=0;a--){var l=n[a];if(""==l){if(a==n.length-1||0==a)continue;for(;s>=i;s--)if(e(a-1,s))return!0;return!1}var u=s>0||0==s&&o?t.nodes[s].type:r&&s>=i?r.node(s-i).type:null;if(!u||u.name!=l&&-1==u.groups.indexOf(l))return!1;s--}return!0}(n.length-1,this.open)},ae.prototype.textblockFromContext=function(){var e=this.options.context;if(e)for(var t=e.depth;t>=0;t--){var n=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(var r in this.parser.schema.nodes){var o=this.parser.schema.nodes[r];if(o.isTextblock&&o.defaultAttrs)return o}},ae.prototype.addPendingMark=function(e){this.top.pendingMarks=e.addToSet(this.top.pendingMarks)},ae.prototype.removePendingMark=function(e,t){for(var n=this.open;n>=0;n--){var r=this.nodes[n];if(r.pendingMarks.lastIndexOf(e)>-1?r.pendingMarks=e.removeFromSet(r.pendingMarks):r.activeMarks=e.removeFromSet(r.activeMarks),r==t)break}},Object.defineProperties(ae.prototype,se);var pe=function(e,t){this.nodes=e||{},this.marks=t||{}};function de(e){var t={};for(var n in e){var r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function he(e){return e.document||window.document}pe.prototype.serializeFragment=function(e,t,n){var r=this;void 0===t&&(t={}),n||(n=he(t).createDocumentFragment());var o=n,i=null;return e.forEach((function(e){if(i||e.marks.length){i||(i=[]);for(var n=0,a=0;n=0;r--){var o=this.serializeMark(e.marks[r],e.isInline,t);o&&((o.contentDOM||o.dom).appendChild(n),n=o.dom)}return n},pe.prototype.serializeMark=function(e,t,n){void 0===n&&(n={});var r=this.marks[e.type.name];return r&&pe.renderSpec(he(n),r(e,t))},pe.renderSpec=function(e,t,n){if(void 0===n&&(n=null),"string"==typeof t)return{dom:e.createTextNode(t)};if(null!=t.nodeType)return{dom:t};var r=t[0],o=r.indexOf(" ");o>0&&(n=r.slice(0,o),r=r.slice(o+1));var i=null,a=n?e.createElementNS(n,r):e.createElement(r),s=t[1],l=1;if(s&&"object"==typeof s&&null==s.nodeType&&!Array.isArray(s))for(var u in l=2,s)if(null!=s[u]){var c=u.indexOf(" ");c>0?a.setAttributeNS(u.slice(0,c),u.slice(c+1),s[u]):a.setAttribute(u,s[u])}for(var p=l;pl)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}var h=pe.renderSpec(e,d,n),f=h.dom,m=h.contentDOM;if(a.appendChild(f),m){if(i)throw new RangeError("Multiple content holes");i=m}}return{dom:a,contentDOM:i}},pe.fromSchema=function(e){return e.cached.domSerializer||(e.cached.domSerializer=new pe(this.nodesFromSchema(e),this.marksFromSchema(e)))},pe.nodesFromSchema=function(e){var t=de(e.nodes);return t.text||(t.text=function(e){return e.text}),t},pe.marksFromSchema=function(e){return de(e.marks)}},function(e,t,n){"use strict";n.r(t),n.d(t,"AllSelection",(function(){return h})),n.d(t,"EditorState",(function(){return k})),n.d(t,"NodeSelection",(function(){return p})),n.d(t,"Plugin",(function(){return S})),n.d(t,"PluginKey",(function(){return M})),n.d(t,"Selection",(function(){return a})),n.d(t,"SelectionRange",(function(){return l})),n.d(t,"TextSelection",(function(){return u})),n.d(t,"Transaction",(function(){return v}));var r=n(5),o=n(9),i=Object.create(null),a=function(e,t,n){this.ranges=n||[new l(e.min(t),e.max(t))],this.$anchor=e,this.$head=t},s={anchor:{configurable:!0},head:{configurable:!0},from:{configurable:!0},to:{configurable:!0},$from:{configurable:!0},$to:{configurable:!0},empty:{configurable:!0}};s.anchor.get=function(){return this.$anchor.pos},s.head.get=function(){return this.$head.pos},s.from.get=function(){return this.$from.pos},s.to.get=function(){return this.$to.pos},s.$from.get=function(){return this.ranges[0].$from},s.$to.get=function(){return this.ranges[0].$to},s.empty.get=function(){for(var e=this.ranges,t=0;t=0;o--){var i=t<0?m(e.node(0),e.node(o),e.before(o+1),e.index(o),t,n):m(e.node(0),e.node(o),e.after(o+1),e.index(o)+1,t,n);if(i)return i}},a.near=function(e,t){return void 0===t&&(t=1),this.findFrom(e,t)||this.findFrom(e,-t)||new h(e.node(0))},a.atStart=function(e){return m(e,e,0,0,1)||new h(e)},a.atEnd=function(e){return m(e,e,e.content.size,e.childCount,-1)||new h(e)},a.fromJSON=function(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");var n=i[t.type];if(!n)throw new RangeError("No selection type "+t.type+" defined");return n.fromJSON(e,t)},a.jsonID=function(e,t){if(e in i)throw new RangeError("Duplicate use of selection JSON ID "+e);return i[e]=t,t.prototype.jsonID=e,t},a.prototype.getBookmark=function(){return u.between(this.$anchor,this.$head).getBookmark()},Object.defineProperties(a.prototype,s),a.prototype.visible=!0;var l=function(e,t){this.$from=e,this.$to=t},u=function(e){function t(t,n){void 0===n&&(n=t),e.call(this,t,n)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={$cursor:{configurable:!0}};return n.$cursor.get=function(){return this.$anchor.pos==this.$head.pos?this.$head:null},t.prototype.map=function(n,r){var o=n.resolve(r.map(this.head));if(!o.parent.inlineContent)return e.near(o);var i=n.resolve(r.map(this.anchor));return new t(i.parent.inlineContent?i:o,o)},t.prototype.replace=function(t,n){if(void 0===n&&(n=r.Slice.empty),e.prototype.replace.call(this,t,n),n==r.Slice.empty){var o=this.$from.marksAcross(this.$to);o&&t.ensureMarks(o)}},t.prototype.eq=function(e){return e instanceof t&&e.anchor==this.anchor&&e.head==this.head},t.prototype.getBookmark=function(){return new c(this.anchor,this.head)},t.prototype.toJSON=function(){return{type:"text",anchor:this.anchor,head:this.head}},t.fromJSON=function(e,n){if("number"!=typeof n.anchor||"number"!=typeof n.head)throw new RangeError("Invalid input for TextSelection.fromJSON");return new t(e.resolve(n.anchor),e.resolve(n.head))},t.create=function(e,t,n){void 0===n&&(n=t);var r=e.resolve(t);return new this(r,n==t?r:e.resolve(n))},t.between=function(n,r,o){var i=n.pos-r.pos;if(o&&!i||(o=i>=0?1:-1),!r.parent.inlineContent){var a=e.findFrom(r,o,!0)||e.findFrom(r,-o,!0);if(!a)return e.near(r,o);r=a.$head}return n.parent.inlineContent||(0==i||(n=(e.findFrom(n,-o,!0)||e.findFrom(n,o,!0)).$anchor).pos0?0:1);o>0?a=0;a+=o){var s=t.child(a);if(s.isAtom){if(!i&&p.isSelectable(s))return p.create(e,n-(o<0?s.nodeSize:0))}else{var l=m(e,s,n+o,o<0?s.childCount:0,o,i);if(l)return l}n+=s.nodeSize*o}}function y(e,t,n){var r=e.steps.length-1;if(!(r0},t.prototype.setStoredMarks=function(e){return this.storedMarks=e,this.updated|=2,this},t.prototype.ensureMarks=function(e){return r.Mark.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this},t.prototype.addStoredMark=function(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))},t.prototype.removeStoredMark=function(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))},n.storedMarksSet.get=function(){return(2&this.updated)>0},t.prototype.addStep=function(t,n){e.prototype.addStep.call(this,t,n),this.updated=-3&this.updated,this.storedMarks=null},t.prototype.setTime=function(e){return this.time=e,this},t.prototype.replaceSelection=function(e){return this.selection.replace(this,e),this},t.prototype.replaceSelectionWith=function(e,t){var n=this.selection;return!1!==t&&(e=e.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||r.Mark.none))),n.replaceWith(this,e),this},t.prototype.deleteSelection=function(){return this.selection.replace(this),this},t.prototype.insertText=function(e,t,n){void 0===n&&(n=t);var r=this.doc.type.schema;if(null==t)return e?this.replaceSelectionWith(r.text(e),!0):this.deleteSelection();if(!e)return this.deleteRange(t,n);var o=this.storedMarks;if(!o){var i=this.doc.resolve(t);o=n==t?i.marks():i.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(t,n,r.text(e,o)),this.selection.empty||this.setSelection(a.near(this.selection.$to)),this},t.prototype.setMeta=function(e,t){return this.meta["string"==typeof e?e:e.key]=t,this},t.prototype.getMeta=function(e){return this.meta["string"==typeof e?e:e.key]},n.isGeneric.get=function(){for(var e in this.meta)return!1;return!0},t.prototype.scrollIntoView=function(){return this.updated|=4,this},n.scrolledIntoView.get=function(){return(4&this.updated)>0},Object.defineProperties(t.prototype,n),t}(o.Transform);function g(e,t){return t&&e?e.bind(t):e}var b=function(e,t,n){this.name=e,this.init=g(t.init,n),this.apply=g(t.apply,n)},w=[new b("doc",{init:function(e){return e.doc||e.schema.topNodeType.createAndFill()},apply:function(e){return e.doc}}),new b("selection",{init:function(e,t){return e.selection||a.atStart(t.doc)},apply:function(e){return e.selection}}),new b("storedMarks",{init:function(e){return e.storedMarks||null},apply:function(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new b("scrollToSelection",{init:function(){return 0},apply:function(e,t){return e.scrolledIntoView?t+1:t}})],x=function(e,t){var n=this;this.schema=e,this.fields=w.concat(),this.plugins=[],this.pluginsByKey=Object.create(null),t&&t.forEach((function(e){if(n.pluginsByKey[e.key])throw new RangeError("Adding different instances of a keyed plugin ("+e.key+")");n.plugins.push(e),n.pluginsByKey[e.key]=e,e.spec.state&&n.fields.push(new b(e.key,e.spec.state,e))}))},k=function(e){this.config=e},_={schema:{configurable:!0},plugins:{configurable:!0},tr:{configurable:!0}};_.schema.get=function(){return this.config.schema},_.plugins.get=function(){return this.config.plugins},k.prototype.apply=function(e){return this.applyTransaction(e).state},k.prototype.filterTransaction=function(e,t){void 0===t&&(t=-1);for(var n=0;n-1&&C.splice(t,1)},Object.defineProperties(k.prototype,_);var C=[];var S=function(e){this.props={},e.props&&function e(t,n,r){for(var o in t){var i=t[o];i instanceof Function?i=i.bind(n):"handleDOMEvents"==o&&(i=e(i,n,{})),r[o]=i}return r}(e.props,this,this.props),this.spec=e,this.key=e.key?e.key.key:O("plugin")};S.prototype.getState=function(e){return e[this.key]};var N=Object.create(null);function O(e){return e in N?e+"$"+ ++N[e]:(N[e]=0,e+"$")}var M=function(e){void 0===e&&(e="key"),this.key=O(e)};M.prototype.get=function(e){return e.config.pluginsByKey[this.key]},M.prototype.getState=function(e){return e[this.key]}},function(e,t,n){"use strict";n.d(t,"c",(function(){return R})),n.d(t,"d",(function(){return T})),n.d(t,"e",(function(){return F})),n.d(t,"a",(function(){return p})),n.d(t,"b",(function(){return m}));var r=n(0),o=n(1),i=n(2),a={button:"k-button",bare:"k-bare",flat:"k-flat",outline:"k-outline",primary:"k-primary","state-active":"k-state-active","button-icon":"k-button-icon","button-icontext":"k-button-icontext","state-disabled":"k-state-disabled","group-start":"k-group-start","group-end":"k-group-end","button-group":"k-button-group","button-group-stretched":"k-button-group-stretched",ltr:"k-ltr",rtl:"k-rtl"},s=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),l=function(){return(l=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0?r.cloneElement(e,c,e.props.children):r.cloneElement(e,c)},t.propTypes={children:o.oneOfType([o.arrayOf(o.element),o.element]),className:o.string,disabled:o.bool,width:o.string,dir:o.string},t}(r.Component),y=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),v=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onClick=function(e){return t.props.onClick(e,t.props.index)},t}return y(t,e),t.prototype.render=function(){var e=this.props,t=e.dataItem,n=e.focused,o=e.id,a=e.onDown;return r.createElement("li",{id:o,className:Object(i.d)("k-item",{"k-state-focused":n,"k-state-selected":t.selected,"k-state-disabled":t.disabled}),onClick:this.onClick,onMouseDown:a,onPointerDown:a,role:"menuItem","aria-disabled":t.disabled||void 0},this.renderContent())},t.prototype.renderContent=function(){var e=this.props,t=e.dataItem,n=e.textField,o=e.index,i=this.props.dataItem.render||this.props.itemRender,a=void 0!==t.text?t.text:n?t[n]:t,s=t.icon?"k-icon k-i-"+t.icon:t.iconClass;return i&&r.createElement(i,{item:t,itemIndex:o})||[s&&r.createElement("span",{className:s,role:"presentation",key:"icon"}),t.imageUrl&&r.createElement("img",{className:"k-image",alt:"",src:t.imageUrl,role:"presentation",key:"image"}),a]},t}(r.Component),g=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),b=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return g(t,e),t.prototype.render=function(){return null},t.propTypes={text:o.string,icon:o.string,iconClass:o.string,imageUrl:o.string,disabled:o.bool,render:o.any},t}(r.Component),w=function(e,t,n,r){if(n)return e;switch(t){case i.b.enter:case i.b.space:case i.b.esc:return-1;case i.b.up:case i.b.left:return Math.max(0,e-1);case i.b.down:case i.b.right:return Math.min(r-1,e+1);default:return e}},x=n(14);function k(e){var t={horizontal:"left",vertical:"bottom"};return e&&(t.horizontal="right"),t}function _(e){var t={horizontal:"left",vertical:"top"};return e&&(t.horizontal="right"),t}var C=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),S=(function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={focused:!1,focusedIndex:-1,opened:!1},t.wrapper=null,t.mainButton=null,t.guid=Object(i.l)(),t.buttonsData=[],t.onKeyDown=function(e){var n=t.state,r=n.opened,o=n.focusedIndex;if(e.altKey)r||e.keyCode!==i.b.down?r&&e.keyCode===i.b.up&&(t.dispatchPopupEvent(e,!1),t.setState({focusedIndex:-1,opened:!1})):(t.dispatchPopupEvent(e,!0),t.setState({focusedIndex:0,opened:!0}));else{var a=void 0;if(e.keyCode===i.b.enter||e.keyCode===i.b.space?(e.preventDefault(),t.dispatchClickEvent(e,o),o>=0&&(a={focusedIndex:r?-1:0,opened:!r},t.dispatchPopupEvent(e,a.opened))):r&&e.keyCode===i.b.esc&&(a={focusedIndex:-1,opened:!1},t.dispatchPopupEvent(e,a.opened)),r){var s=w(o,e.keyCode,e.altKey,t.buttonsData.length);s!==o&&((a=a||{}).focusedIndex=s);var l=e.keyCode===i.b.up||e.keyCode===i.b.down||e.keyCode===i.b.left||e.keyCode===i.b.right;!e.altKey&&l&&e.preventDefault()}a&&t.setState(a)}},t.onFocus=function(e){Object(i.h)(t.props.onFocus,e,t,void 0),t.setState({focused:!0,focusedIndex:-1})},t.onItemClick=function(e,n){var r=t.state.opened;r&&t.setState({focusedIndex:0,opened:!1}),t.dispatchClickEvent(e,n),r&&t.dispatchPopupEvent(e,!1)},t.onBlur=function(e){t.setState({focused:!1,focusedIndex:-1,opened:!1}),Object(i.h)(t.props.onBlur,e,t,void 0),t.state.opened&&t.dispatchPopupEvent(e,!1)},t.onSplitPartClick=function(e){if(t.buttonsData.length){var n=!t.state.opened;t.dispatchPopupEvent(e,n),t.setState({focusedIndex:n?0:-1,opened:n,focused:!0})}},t.onDownSplitPart=function(e){e.preventDefault(),t.element&&document.activeElement!==t.element&&t.element.focus()},t.onItemDown=function(e){document.activeElement===t.element&&e.preventDefault()},t.dispatchPopupEvent=function(e,n){Object(i.h)(n?t.props.onOpen:t.props.onClose,e,t,void 0)},t}C(t,e),t.prototype.render=function(){var e=this;this.buttonsData=this.props.items||r.Children.toArray(this.props.children).filter((function(e){return e&&e.type===b})).map((function(e){return e.props}));var t=this.isRtl(),n=t?"rtl":void 0,o=this.props,a=o.tabIndex,s=o.disabled,l=this.state.focusedIndex;return r.createElement("div",{className:Object(i.d)("k-widget","k-split-button","k-button-group",this.props.className,{"k-state-focused":this.state.focused}),onKeyDown:this.onKeyDown,onFocus:this.onFocus,onBlur:this.onBlur,dir:n,ref:function(t){return e.wrapper=t}},r.createElement(p,{onClick:function(t){return e.onItemClick(t,-1)},disabled:s||void 0,tabIndex:a,accessKey:this.props.accessKey,className:this.props.buttonClass,icon:this.props.icon,iconClass:this.props.iconClass,imageUrl:this.props.imageUrl,look:this.props.look,dir:n,ref:function(t){return e.mainButton=t&&t.element},type:"button","aria-disabled":s,"aria-haspopup":!0,"aria-expanded":this.state.opened,"aria-label":this.props.text+" splitbutton","aria-owns":this.guid,"aria-activedescendant":l>=0?this.guid+"-"+l:void 0},this.props.text),r.createElement(p,{icon:"arrow-s",disabled:s||void 0,tabIndex:-1,look:this.props.look,onClick:this.onSplitPartClick,onMouseDown:this.onDownSplitPart,onPointerDown:this.onDownSplitPart,dir:n,"aria-label":"menu toggling button"}),this.renderPopup(t))},t.prototype.componentDidMount=function(){void 0===this.props.dir&&this.isRtl()&&this.forceUpdate()},Object.defineProperty(t.prototype,"element",{get:function(){return this.mainButton},enumerable:!0,configurable:!0}),t.prototype.dispatchClickEvent=function(e,t){this.isItemDisabled(t)||(-1===t?Object(i.h)(this.props.onButtonClick,e,this,void 0):Object(i.h)(this.props.onItemClick,e,this,{item:this.buttonsData[t],itemIndex:t}))},t.prototype.renderPopup=function(e){var t=this.props.popupSettings,n=void 0===t?{}:t;return r.createElement(x.a,{anchor:this.wrapper||void 0,show:this.state.opened,animate:n.animate,popupClass:Object(i.d)("k-list-container k-reset k-group",n.popupClass),anchorAlign:n.anchorAlign||k(e),popupAlign:n.popupAlign||_(e),style:e?{direction:"rtl"}:void 0},r.createElement("ul",{className:"k-list k-reset",role:"menu",id:this.guid},this.renderChildItems()))},t.prototype.renderChildItems=function(){var e=this,t=this.props,n=t.itemRender,o=t.textField;return this.buttonsData.length>0?this.buttonsData.map((function(t,i){return r.createElement(v,{dataItem:t,textField:o,focused:e.state.focusedIndex===i,onClick:e.onItemClick,onDown:e.onItemDown,itemRender:n,key:i,index:i,id:e.guid+"-"+i})})):null},t.prototype.isItemDisabled=function(e){return this.buttonsData[e]?this.buttonsData[e].disabled:this.props.disabled},t.prototype.isRtl=function(){return void 0!==this.props.dir?"rtl"===this.props.dir:!!this.wrapper&&"rtl"===getComputedStyle(this.wrapper).direction},t.propTypes={accessKey:o.string,onButtonClick:o.func,onFocus:o.func,onBlur:o.func,onItemClick:o.func,onOpen:o.func,onClose:o.func,text:o.string,items:o.arrayOf(o.any),textField:o.string,tabIndex:o.number,disabled:o.bool,icon:o.string,iconClass:o.string,imageUrl:o.string,popupSettings:o.object,itemRender:o.any,look:o.string,className:o.string,buttonClass:o.string,dir:o.string}}(r.Component),function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),N=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return S(t,e),t.prototype.render=function(){return null},t.propTypes={text:o.string,icon:o.string,iconClass:o.string,imageUrl:o.string,selected:o.bool,disabled:o.bool,render:o.any},t}(r.Component),O=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),M=(function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={opened:!1,focused:!1,focusedIndex:-1},t.wrapper=null,t.mainButton=null,t.guid=Object(i.l)(),t.buttonsData=[],t.onKeyDown=function(e){var n=t.state,r=n.opened,o=n.focusedIndex;if(e.altKey)r||e.keyCode!==i.b.down?r&&e.keyCode===i.b.up&&(t.dispatchPopupEvent(e,!1),t.setState({focusedIndex:-1,opened:!1})):(t.dispatchPopupEvent(e,!0),t.setState({focusedIndex:0,opened:!0}));else{var a=void 0;if(e.keyCode===i.b.enter||e.keyCode===i.b.space?(o>=0&&t.dispatchClickEvent(e,o),e.preventDefault(),a={focusedIndex:r?-1:0,opened:!r},t.dispatchPopupEvent(e,a.opened)):r&&e.keyCode===i.b.esc&&(a={focusedIndex:-1,opened:!1},t.dispatchPopupEvent(e,a.opened)),r){var s=w(o,e.keyCode,e.altKey,t.buttonsData.length);s!==o&&((a=a||{}).focusedIndex=s);var l=e.keyCode===i.b.up||e.keyCode===i.b.down||e.keyCode===i.b.left||e.keyCode===i.b.right;!e.altKey&&l&&e.preventDefault()}a&&t.setState(a)}},t.onFocus=function(e){t.setState({focused:!0,focusedIndex:t.state.opened?0:-1}),Object(i.h)(t.props.onFocus,e,t,void 0)},t.onBlur=function(e){t.setState({focused:!1,opened:!1,focusedIndex:-1}),Object(i.h)(t.props.onBlur,e,t,void 0),t.state.opened&&t.dispatchPopupEvent(e,!1)},t.onItemClick=function(e,n){t.setState({focusedIndex:-1,opened:!1}),t.dispatchClickEvent(e,n),t.dispatchPopupEvent(e,!1)},t.onItemDown=function(e){document.activeElement===t.element&&e.preventDefault()},t.mouseDown=function(e){e.preventDefault()},t.onClickMainButton=function(e){if(t.buttonsData.length){var n=!t.state.opened;t.setState({opened:n,focused:!0,focusedIndex:n?0:-1}),t.dispatchPopupEvent(e,n)}},t.dispatchPopupEvent=function(e,n){Object(i.h)(n?t.props.onOpen:t.props.onClose,e,t,void 0)},t}O(t,e),t.prototype.render=function(){var e=this,t=this.isRtl(),n=t?"rtl":void 0,o=this.props,a=o.tabIndex,s=o.disabled,l=this.state.focusedIndex;return this.buttonsData=this.props.items||r.Children.toArray(this.props.children).filter((function(e){return e&&e.type===N})).map((function(e){return e.props})),r.createElement("div",{className:Object(i.d)("k-widget","k-dropdown-button",this.props.className,{"k-state-focused":this.state.focused}),onKeyDown:this.onKeyDown,onFocus:this.onFocus,onBlur:this.onBlur,dir:n,ref:function(t){return e.wrapper=t}},r.createElement(p,{onClick:this.onClickMainButton,onMouseDown:this.mouseDown,disabled:s||void 0,tabIndex:a,accessKey:this.props.accessKey,icon:this.props.icon,iconClass:this.props.iconClass,className:this.props.buttonClass,imageUrl:this.props.imageUrl,look:this.props.look,primary:this.props.primary,dir:n,ref:function(t){return e.mainButton=t&&t.element},type:"button","aria-disabled":s,"aria-haspopup":!0,"aria-expanded":this.state.opened,"aria-label":this.props.text+" dropdownbutton","aria-owns":this.guid,"aria-activedescendant":l>=0?this.guid+"-"+l:void 0},this.props.text),this.renderPopup(t))},t.prototype.componentDidMount=function(){void 0===this.props.dir&&this.isRtl()&&this.forceUpdate()},t.prototype.componentDidUpdate=function(){this.state.focused&&this.element&&this.element.focus()},Object.defineProperty(t.prototype,"element",{get:function(){return this.mainButton},enumerable:!0,configurable:!0}),t.prototype.dispatchClickEvent=function(e,t){this.isItemDisabled(t)||Object(i.h)(this.props.onItemClick,e,this,{item:this.buttonsData[t],itemIndex:t})},t.prototype.renderPopup=function(e){var t=this.props.popupSettings,n=void 0===t?{}:t;return r.createElement(x.a,{anchor:this.wrapper||void 0,show:this.state.opened,animate:n.animate,popupClass:Object(i.d)("k-list-container k-reset k-group",n.popupClass),anchorAlign:n.anchorAlign||k(e),popupAlign:n.popupAlign||_(e),style:e?{direction:"rtl"}:void 0},r.createElement("ul",{className:"k-list k-reset",role:"menu",id:this.guid},this.renderChildItems()))},t.prototype.renderChildItems=function(){var e=this,t=this.props,n=t.itemRender,o=t.textField;return this.buttonsData.length>0?this.buttonsData.map((function(t,i){return r.createElement(v,{dataItem:t,textField:o,focused:e.state.focusedIndex===i,onClick:e.onItemClick,onDown:e.onItemDown,itemRender:n,index:i,key:i,id:e.guid+"-"+i})})):null},t.prototype.isItemDisabled=function(e){return this.buttonsData[e]?this.buttonsData[e].disabled:this.props.disabled},t.prototype.isRtl=function(){return void 0!==this.props.dir?"rtl"===this.props.dir:!!this.wrapper&&"rtl"===getComputedStyle(this.wrapper).direction},t.propTypes={accessKey:o.string,primary:o.bool,onFocus:o.func,onBlur:o.func,onItemClick:o.func,onOpen:o.func,onClose:o.func,items:o.arrayOf(o.any),textField:o.string,tabIndex:o.number,disabled:o.bool,icon:o.string,iconClass:o.string,imageUrl:o.string,popupSettings:o.object,itemRender:o.any,look:o.string,className:o.string,buttonClass:o.string,dir:o.string}}(r.Component),function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),T=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._element=null,t}return M(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._element},enumerable:!0,configurable:!0}),t.prototype.render=function(){var e=this;return r.createElement("span",{className:this.props.className,style:this.props.style,ref:function(t){return e._element=t}},this.props.children)},t.propTypes={className:o.string},t}(r.PureComponent),E=n(23),P=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),D=function(){return(D=Object.assign||function(e){for(var t,n=1,r=arguments.length;ne)break;var c=this.ranges[l+i],p=this.ranges[l+s],d=u+c;if(e<=d){var h=u+r+((c?e==u?-1:e==d?1:t:t)<0?0:p);if(n)return h;var f=l/3+(e-u)*o;return new a(h,t<0?e!=u:e!=d,f)}r+=p-c}return n?e+r:new a(e+r)},s.prototype.touches=function(e,t){for(var n=0,r=i(t),o=this.inverted?2:1,a=this.inverted?1:2,s=0;se)break;var u=this.ranges[s+o];if(e<=l+u&&s==3*r)return!0;n+=this.ranges[s+a]-u}return!1},s.prototype.forEach=function(e){for(var t=this.inverted?2:1,n=this.inverted?1:2,r=0,o=0;r=0;t--){var r=e.getMirror(t);this.appendMap(e.maps[t].invert(),null!=r&&r>t?n-r-1:null)}},l.prototype.invert=function(){var e=new l;return e.appendMappingInverted(this),e},l.prototype.map=function(e,t){if(void 0===t&&(t=1),this.mirror)return this._map(e,t,!0);for(var n=this.from;ni&&c0},c.prototype.addStep=function(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t},Object.defineProperties(c.prototype,p);var h=Object.create(null),f=function(){};f.prototype.apply=function(e){return d()},f.prototype.getMap=function(){return s.empty},f.prototype.invert=function(e){return d()},f.prototype.map=function(e){return d()},f.prototype.merge=function(e){return null},f.prototype.toJSON=function(){return d()},f.fromJSON=function(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");var n=h[t.stepType];if(!n)throw new RangeError("No step type "+t.stepType+" defined");return n.fromJSON(e,t)},f.jsonID=function(e,t){if(e in h)throw new RangeError("Duplicate use of step JSON ID "+e);return h[e]=t,t.prototype.jsonID=e,t};var m=function(e,t){this.doc=e,this.failed=t};m.ok=function(e){return new m(e,null)},m.fail=function(e){return new m(null,e)},m.fromReplace=function(e,t,n,o){try{return m.ok(e.replace(t,n,o))}catch(i){if(i instanceof r.ReplaceError)return m.fail(i.message);throw i}};var y=function(e){function t(t,n,r,o){e.call(this),this.from=t,this.to=n,this.slice=r,this.structure=!!o}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.apply=function(e){return this.structure&&g(e,this.from,this.to)?m.fail("Structure replace would overwrite content"):m.fromReplace(e,this.from,this.to,this.slice)},t.prototype.getMap=function(){return new s([this.from,this.to-this.from,this.slice.size])},t.prototype.invert=function(e){return new t(this.from,this.from+this.slice.size,e.slice(this.from,this.to))},t.prototype.map=function(e){var n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted?null:new t(n.pos,Math.max(n.pos,r.pos),this.slice)},t.prototype.merge=function(e){if(!(e instanceof t)||e.structure!=this.structure)return null;if(this.from+this.slice.size!=e.from||this.slice.openEnd||e.slice.openStart){if(e.to!=this.from||this.slice.openStart||e.slice.openEnd)return null;var n=this.slice.size+e.slice.size==0?r.Slice.empty:new r.Slice(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new t(e.from,this.to,n,this.structure)}var o=this.slice.size+e.slice.size==0?r.Slice.empty:new r.Slice(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new t(this.from,this.to+(e.to-e.from),o,this.structure)},t.prototype.toJSON=function(){var e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e},t.fromJSON=function(e,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new t(n.from,n.to,r.Slice.fromJSON(e,n.slice),!!n.structure)},t}(f);f.jsonID("replace",y);var v=function(e){function t(t,n,r,o,i,a,s){e.call(this),this.from=t,this.to=n,this.gapFrom=r,this.gapTo=o,this.slice=i,this.insert=a,this.structure=!!s}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.apply=function(e){if(this.structure&&(g(e,this.from,this.gapFrom)||g(e,this.gapTo,this.to)))return m.fail("Structure gap-replace would overwrite content");var t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return m.fail("Gap is not a flat range");var n=this.slice.insertAt(this.insert,t.content);return n?m.fromReplace(e,this.from,this.to,n):m.fail("Content does not fit in gap")},t.prototype.getMap=function(){return new s([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])},t.prototype.invert=function(e){var n=this.gapTo-this.gapFrom;return new t(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)},t.prototype.map=function(e){var n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),o=e.map(this.gapFrom,-1),i=e.map(this.gapTo,1);return n.deleted&&r.deleted||or.pos?null:new t(n.pos,r.pos,o,i,this.slice,this.insert,this.structure)},t.prototype.toJSON=function(){var e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e},t.fromJSON=function(e,n){if("number"!=typeof n.from||"number"!=typeof n.to||"number"!=typeof n.gapFrom||"number"!=typeof n.gapTo||"number"!=typeof n.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new t(n.from,n.to,n.gapFrom,n.gapTo,r.Slice.fromJSON(e,n.slice),n.insert,!!n.structure)},t}(f);function g(e,t,n){for(var r=e.resolve(t),o=n-t,i=r.depth;o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,o--;if(o>0)for(var a=r.node(i).maybeChild(r.indexAfter(i));o>0;){if(!a||a.isLeaf)return!0;a=a.firstChild,o--}return!1}function b(e,t,n){return(0==t||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function w(e){for(var t=e.parent.content.cutByIndex(e.startIndex,e.endIndex),n=e.depth;;--n){var r=e.$from.node(n),o=e.$from.index(n),i=e.$to.indexAfter(n);if(ni;s--,l--){var u=o.node(s),c=o.index(s);if(u.type.spec.isolating)return!1;var p=u.content.cutByIndex(c,u.childCount),d=r&&r[l]||u;if(d!=u&&(p=p.replaceChild(0,d.type.create(d.attrs))),!u.canReplace(c+1,u.childCount)||!d.type.validContent(p))return!1}var h=o.indexAfter(i),f=r&&r[0];return o.node(i).canReplaceWith(h,h,f?f.type:o.node(i+1).type)}function C(e,t){var n=e.resolve(t),r=n.index();return S(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function S(e,t){return e&&t&&!e.isLeaf&&e.canAppend(t)}function N(e,t,n){void 0===n&&(n=-1);for(var r=e.resolve(t),o=r.depth;;o--){var i=void 0,a=void 0,s=r.index(o);if(o==r.depth?(i=r.nodeBefore,a=r.nodeAfter):n>0?(i=r.node(o+1),s++,a=r.node(o).maybeChild(s)):(i=r.node(o).maybeChild(s-1),a=r.node(o+1)),i&&!i.isTextblock&&S(i,a)&&r.node(o).canReplace(s,s+1))return t;if(0==o)break;t=n<0?r.before(o):r.after(o)}}function O(e,t,n){var r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(0==r.parentOffset)for(var o=r.depth-1;o>=0;o--){var i=r.index(o);if(r.node(o).canReplaceWith(i,i,n))return r.before(o+1);if(i>0)return null}if(r.parentOffset==r.parent.content.size)for(var a=r.depth-1;a>=0;a--){var s=r.indexAfter(a);if(r.node(a).canReplaceWith(s,s,n))return r.after(a+1);if(s=0;s--){var l=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,u=r.index(s)+(l>0?1:0);if(1==a?r.node(s).canReplace(u,u,o):r.node(s).contentMatchAt(u).findWrapping(o.firstChild.type))return 0==l?r.pos:l<0?r.before(s+1):r.after(s+1)}return null}function T(e,t,n){for(var o=[],i=0;it;d--)h||n.index(d)>0?(h=!0,c=r.Fragment.from(n.node(d).copy(c)),p++):l--;for(var f=r.Fragment.empty,m=0,y=i,g=!1;y>t;y--)g||o.after(y+1)=0;o--)n=r.Fragment.from(t[o].type.create(t[o].attrs,n));var i=e.start,a=e.end;return this.step(new v(i,a,i,a,new r.Slice(n,0,0),t.length,!0))},c.prototype.setBlockType=function(e,t,n,o){var i=this;if(void 0===t&&(t=e),!n.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");var a=this.steps.length;return this.doc.nodesBetween(e,t,(function(e,t){if(e.isTextblock&&!e.hasMarkup(n,o)&&function(e,t,n){var r=e.resolve(t),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}(i.doc,i.mapping.slice(a).map(t),n)){i.clearIncompatible(i.mapping.slice(a).map(t,1),n);var s=i.mapping.slice(a),l=s.map(t,1),u=s.map(t+e.nodeSize,1);return i.step(new v(l,u,l+1,u-1,new r.Slice(r.Fragment.from(n.create(o,null,e.marks)),0,0),1,!0)),!1}})),this},c.prototype.setNodeMarkup=function(e,t,n,o){var i=this.doc.nodeAt(e);if(!i)throw new RangeError("No node at given position");t||(t=i.type);var a=t.create(n,null,o||i.marks);if(i.isLeaf)return this.replaceWith(e,e+i.nodeSize,a);if(!t.validContent(i.content))throw new RangeError("Invalid content for node type "+t.name);return this.step(new v(e,e+i.nodeSize,e+1,e+i.nodeSize-1,new r.Slice(r.Fragment.from(a),0,0),1,!0))},c.prototype.split=function(e,t,n){void 0===t&&(t=1);for(var o=this.doc.resolve(e),i=r.Fragment.empty,a=r.Fragment.empty,s=o.depth,l=o.depth-t,u=t-1;s>l;s--,u--){i=r.Fragment.from(o.node(s).copy(i));var c=n&&n[u];a=r.Fragment.from(c?c.type.create(c.attrs,a):o.node(s).copy(a))}return this.step(new y(e,e,new r.Slice(i.append(a),t,t),!0))},c.prototype.join=function(e,t){void 0===t&&(t=1);var n=new y(e-t,e+t,r.Slice.empty,!0);return this.step(n)};var E=function(e){function t(t,n,r){e.call(this),this.from=t,this.to=n,this.mark=r}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.apply=function(e){var t=this,n=e.slice(this.from,this.to),o=e.resolve(this.from),i=o.node(o.sharedDepth(this.to)),a=new r.Slice(T(n.content,(function(e,n){return n.type.allowsMarkType(t.mark.type)?e.mark(t.mark.addToSet(e.marks)):e}),i),n.openStart,n.openEnd);return m.fromReplace(e,this.from,this.to,a)},t.prototype.invert=function(){return new P(this.from,this.to,this.mark)},t.prototype.map=function(e){var n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new t(n.pos,r.pos,this.mark)},t.prototype.merge=function(e){if(e instanceof t&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from)return new t(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark)},t.prototype.toJSON=function(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}},t.fromJSON=function(e,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new t(n.from,n.to,e.markFromJSON(n.mark))},t}(f);f.jsonID("addMark",E);var P=function(e){function t(t,n,r){e.call(this),this.from=t,this.to=n,this.mark=r}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.apply=function(e){var t=this,n=e.slice(this.from,this.to),o=new r.Slice(T(n.content,(function(e){return e.mark(t.mark.removeFromSet(e.marks))})),n.openStart,n.openEnd);return m.fromReplace(e,this.from,this.to,o)},t.prototype.invert=function(){return new E(this.from,this.to,this.mark)},t.prototype.map=function(e){var n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new t(n.pos,r.pos,this.mark)},t.prototype.merge=function(e){if(e instanceof t&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from)return new t(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark)},t.prototype.toJSON=function(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}},t.fromJSON=function(e,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new t(n.from,n.to,e.markFromJSON(n.mark))},t}(f);function D(e,t,n,o){if(void 0===n&&(n=t),void 0===o&&(o=r.Slice.empty),t==n&&!o.size)return null;var i=e.resolve(t),a=e.resolve(n);return A(i,a,o)?new y(t,n,o):new I(i,a,o).fit()}function A(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}f.jsonID("removeMark",P),c.prototype.addMark=function(e,t,n){var r=this,o=[],i=[],a=null,s=null;return this.doc.nodesBetween(e,t,(function(r,l,u){if(r.isInline){var c=r.marks;if(!n.isInSet(c)&&u.type.allowsMarkType(n.type)){for(var p=Math.max(l,e),d=Math.min(l+r.nodeSize,t),h=n.addToSet(c),f=0;f=0;h--)this.step(i[h]);return this},c.prototype.replace=function(e,t,n){void 0===t&&(t=e),void 0===n&&(n=r.Slice.empty);var o=D(this.doc,e,t,n);return o&&this.step(o),this},c.prototype.replaceWith=function(e,t,n){return this.replace(e,t,new r.Slice(r.Fragment.from(n),0,0))},c.prototype.delete=function(e,t){return this.replace(e,t,r.Slice.empty)},c.prototype.insert=function(e,t){return this.replaceWith(e,e,t)};var I=function(e,t,n){this.$to=t,this.$from=e,this.unplaced=n,this.frontier=[];for(var o=0;o<=e.depth;o++){var i=e.node(o);this.frontier.push({type:i.type,match:i.contentMatchAt(e.indexAfter(o))})}this.placed=r.Fragment.empty;for(var a=e.depth;a>0;a--)this.placed=r.Fragment.from(e.node(a).copy(this.placed))},L={depth:{configurable:!0}};function R(e,t,n){return 0==t?e.cutByIndex(n):e.replaceChild(0,e.firstChild.copy(R(e.firstChild.content,t-1,n)))}function j(e,t,n){return 0==t?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(j(e.lastChild.content,t-1,n)))}function F(e,t){for(var n=0;n1&&(o=o.replaceChild(0,z(o.firstChild,t-1,1==o.childCount?n-1:0))),t>0&&(o=e.type.contentMatch.fillBefore(o).append(o),n<=0&&(o=o.append(e.type.contentMatch.matchFragment(o).fillBefore(r.Fragment.empty,!0)))),e.copy(o)}function B(e,t,n,r,o){var i=e.node(t),a=o?e.indexAfter(t):e.index(t);if(a==i.childCount&&!n.compatibleContent(i.type))return null;var s=r.fillBefore(i.content,!0,a);return s&&!function(e,t,n){for(var r=n;ro){var s=i.contentMatchAt(0),l=s.fillBefore(e).append(e);e=l.append(s.matchFragment(l).fillBefore(r.Fragment.empty,!0))}return e}function H(e,t){for(var n=[],r=Math.min(e.depth,t.depth);r>=0;r--){var o=e.start(r);if(ot.pos+(t.depth-r)||e.node(r).type.spec.isolating||t.node(r).type.spec.isolating)break;o==t.start(r)&&n.push(r)}return n}L.depth.get=function(){return this.frontier.length-1},I.prototype.fit=function(){for(;this.unplaced.size;){var e=this.findFittable();e?this.placeNodes(e):this.openMore()||this.dropNode()}var t=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,o=this.$from,i=t<0?this.$to:o.doc.resolve(t);if(this.close(i)){for(var a=this.placed,s=o.depth,l=i.depth;s&&l&&1==a.childCount;)a=a.firstChild.content,s--,l--;var u=new r.Slice(a,s,l);if(t>-1)return new v(o.pos,t,this.$to.pos,this.$to.end(),u,n);if(u.size||o.pos!=this.$to.pos)return new y(o.pos,i.pos,u)}return null},I.prototype.findFittable=function(){for(var e=1;e<=2;e++)for(var t=this.unplaced.openStart;t>=0;t--)for(var n=void 0,o=(t?(n=F(this.unplaced.content,t-1).firstChild).content:this.unplaced.content).firstChild,i=this.depth;i>=0;i--){var a=this.frontier[i],s=a.type,l=a.match,u=void 0,c=void 0;if(1==e&&(o?l.matchType(o.type)||(c=l.fillBefore(r.Fragment.from(o),!1)):s.compatibleContent(n.type)))return{sliceDepth:t,frontierDepth:i,parent:n,inject:c};if(2==e&&o&&(u=l.findWrapping(o.type)))return{sliceDepth:t,frontierDepth:i,parent:n,wrap:u};if(n&&l.matchType(n.type))break}},I.prototype.openMore=function(){var e=this.unplaced,t=e.content,n=e.openStart,o=e.openEnd,i=F(t,n);return!(!i.childCount||i.firstChild.isLeaf)&&(this.unplaced=new r.Slice(t,n+1,Math.max(o,i.size+n>=t.size-o?n+1:0)),!0)},I.prototype.dropNode=function(){var e=this.unplaced,t=e.content,n=e.openStart,o=e.openEnd,i=F(t,n);if(i.childCount<=1&&n>0){var a=t.size-n<=n+i.size;this.unplaced=new r.Slice(R(t,n-1,1),n-1,a?n-1:o)}else this.unplaced=new r.Slice(R(t,n,1),n,o)},I.prototype.placeNodes=function(e){for(var t=e.sliceDepth,n=e.frontierDepth,o=e.parent,i=e.inject,a=e.wrap;this.depth>n;)this.closeFrontierNode();if(a)for(var s=0;s1||0==c||g.content.size)&&(f=b,d.push(z(g.mark(m.allowedMarks(g.marks)),1==p?c:0,p==u.childCount?v:-1)))}var w=p==u.childCount;w||(v=-1),w&&v<0&&o&&o.type==this.frontier[this.depth].type?this.closeFrontierNode():this.frontier[n].match=f;for(var x=0,k=u;x1&&r==this.$to.end(--n);)++r;return r},I.prototype.findCloseLevel=function(e){e:for(var t=Math.min(this.depth,e.depth);t>=0;t--){var n=this.frontier[t],r=n.match,o=B(e,t,n.type,r,!1);if(o){for(var i=t-1;i>=0;i--){var a=this.frontier[i],s=a.match,l=B(e,i,a.type,s,!0);if(!l||l.childCount)continue e}return{depth:t,fit:o}}}},I.prototype.close=function(e){var t=this.findCloseLevel(e);if(!t)return!1;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=j(this.placed,t.depth,t.fit));for(var n=t.depth+1;n<=e.depth;n++){var r=e.node(n),o=r.type.contentMatch.fillBefore(r.content,!0,e.index(n));this.openFrontierNode(r.type,r.attrs,o)}return!0},I.prototype.openFrontierNode=function(e,t,n){var o=this.frontier[this.depth];o.match=o.match.matchType(e),this.placed=j(this.placed,this.depth,r.Fragment.from(e.create(t,n))),this.frontier.push({type:e,match:e.contentMatch})},I.prototype.closeFrontierNode=function(){var e=this.frontier.pop().match.fillBefore(r.Fragment.empty,!0);e.childCount&&(this.placed=j(this.placed,this.frontier.length,e))},Object.defineProperties(I.prototype,L),c.prototype.replaceRange=function(e,t,n){if(!n.size)return this.deleteRange(e,t);var o=this.doc.resolve(e),i=this.doc.resolve(t);if(A(o,i,n))return this.step(new y(e,t,n));var a=H(o,this.doc.resolve(t));0==a[a.length-1]&&a.pop();var s=-(o.depth+1);a.unshift(s);for(var l=o.depth,u=o.pos-1;l>0;l--,u--){var c=o.node(l).type.spec;if(c.defining||c.isolating)break;a.indexOf(l)>-1?s=l:o.before(l)==u&&a.splice(1,0,-l)}for(var p=a.indexOf(s),d=[],h=n.openStart,f=n.content,m=0;;m++){var v=f.firstChild;if(d.push(v),m==n.openStart)break;f=v.content}h>0&&d[h-1].type.spec.defining&&o.node(p).type!=d[h-1].type?h-=1:h>=2&&d[h-1].isTextblock&&d[h-2].type.spec.defining&&o.node(p).type!=d[h-2].type&&(h-=2);for(var g=n.openStart;g>=0;g--){var b=(g+h+1)%(n.openStart+1),w=d[b];if(w)for(var x=0;x=0&&(this.replace(e,t,n),!(this.steps.length>N));O--){var M=a[O];O<0||(e=o.before(M),t=i.after(M))}return this},c.prototype.replaceRangeWith=function(e,t,n){if(!n.isInline&&e==t&&this.doc.resolve(e).parent.content.size){var o=O(this.doc,e,n.type);null!=o&&(e=t=o)}return this.replaceRange(e,t,new r.Slice(r.Fragment.from(n),0,0))},c.prototype.deleteRange=function(e,t){for(var n=this.doc.resolve(e),r=this.doc.resolve(t),o=H(n,r),i=0;i0&&(s||n.node(a-1).canReplace(n.index(a-1),r.indexAfter(a-1))))return this.delete(n.before(a),r.after(a))}for(var l=1;l<=n.depth&&l<=r.depth;l++)if(e-n.start(l)==n.depth-l&&t>n.end(l)&&r.end(l)-t!=r.depth-l)return this.delete(n.before(l),t);return this.delete(e,t)}},function(e,t,n){"use strict";n.d(t,"b",(function(){return V})),n.d(t,"a",(function(){return J})),n.d(t,"c",(function(){return pe}));var r,o=n(0),i=n(1),a=n(2),s=n(11),l=n(14),u=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),c=function(){return(c=Object.assign||function(e){for(var t,n=1,r=arguments.length;nn)){for(t=0;t=r)return this.translateTo(0),this.changePage(0,e),void(this.container.scrollTop=0);o!==this.listTranslate&&(this.translateTo(o),this.changePage(this.skip-t,e))}},e.prototype.localScrollDown=function(e){var t,n=this.itemHeight,r=this.container.scrollTop,o=this.listTranslate,i=this.list.children.length;for(t=0;t=r);t++)o+=n;o=this.validateTranslate(o),t>=i&&this.skip+t>=this.total?(this.translateTo(o),this.changePage(this.total-1,e)):o!==this.listTranslate&&(this.translateTo(o),this.changePage(this.skip+t,e))},e.prototype.scrollNonStrict=function(e){var t=this.total*this.prevScrollPos/this.containerHeight,n=Math.min(Math.floor(t),this.total-1),r=this.containerHeight*t/this.total;r=this.validateTranslate(r),this.translateTo(r),this.changePage(n,e)},e.prototype.scrollHandler=function(e){var t=this.container?this.container.scrollTop:0,n=this.prevScrollPos;this.prevScrollPos=t,this.enabled&&this.list&&this.container&&!this.scrollSyncing&&(t-n<=0&&t>this.listTranslate-this.list.scrollHeight/10?this.localScrollUp(e):t-n>0&&t=0){var o=this.vs,i=o.container||n.parentNode,a=void 0!==t?t:o.enabled;!function(e,t,n,r,o){var i=e.offsetHeight,a=t*n+(o?r-e.scrollTop:0);if(o){var s=0;a+t>i?s=a+t-i:a<0&&(s=a),0!==s?e.scrollTop+=s:0===e.scrollTop&&0!==r&&(e.scrollTop=r)}else a+t>i+e.scrollTop?e.scrollTop=a+t-i:a0&&this.component.setState(e.data);var n={syntheticEvent:e.syntheticEvent,nativeEvent:e.syntheticEvent?e.syntheticEvent.nativeEvent:void 0,target:this.component,value:this.component.value};e.events.forEach((function(e){var r=e.type;delete e.type;var o=t.component.props[r];o&&o.call(void 0,z({},n,e))}))},e.prototype.triggerOnPageChange=function(e,t,n){var r=this.component.props.virtual;if(r){var o=Math.min(Math.max(0,t),Math.max(0,r.total-n));o!==r.skip&&e.events.push({type:"onPageChange",page:{skip:o,take:n}})}},e.prototype.triggerPageChangeCornerItems=function(e,t){var n=this.component.props,r=n.data,o=void 0===r?[]:r,i=n.dataItemKey,a=n.virtual,s=void 0!==n.opened?n.opened:this.component.state.opened;e&&a&&this.vs.enabled&&(a.skip>0&&k(e,o[0],i)?this.triggerOnPageChange(t,a.skip-1,a.pageSize):!s&&a.skip+a.pageSizei.length;l||u||!a?t._suggested="":t.suggestValue(i)}void 0===t.props.filter&&(n.data.text=i),void 0!==t.state.focusedItem&&(n.data.focusedItem=void 0),r||t.base.togglePopup(n),t.base.filterChanged(i,n),t.applyState(n)},t.clearButtonClick=function(e){var n=t.base.initState();n.syntheticEvent=e,e.stopPropagation(),t._suggested="",t.base.filterChanged("",n),void 0===t.props.filter&&void 0!==t.state.text&&(n.data.text=void 0),t.triggerOnChange(null,n),(void 0!==t.props.opened?t.props.opened:t.state.opened)&&t.base.togglePopup(n),t.applyState(n)},t.setValidity=function(){t._input&&t._input.setCustomValidity&&t._input.setCustomValidity(t.validity.valid?"":t.props.validationMessage||"Please enter a valid value!")},t}return $(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._element},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return void 0!==this._valueDuringOnChange?this._valueDuringOnChange:void 0!==this.props.value?this.props.value:void 0!==this.state.value?this.state.value:void 0!==this.props.defaultValue?this.props.defaultValue:void 0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"index",{get:function(){var e=this.props,t=e.data,n=void 0===t?[]:t,r=e.dataItemKey,o=this.value;return n.findIndex((function(e){return k(e,o,r)}))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this.props.name},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"validity",{get:function(){var e=void 0!==this.props.validationMessage,t=!this.required||null!==this.value&&""!==this.value&&void 0!==this.value;return{customError:e,valid:void 0!==this.props.valid?this.props.valid:t,valueMissing:null===this.value}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"validityStyles",{get:function(){return void 0!==this.props.validityStyles?this.props.validityStyles:t.defaultProps.validityStyles},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"required",{get:function(){return void 0!==this.props.required?this.props.required:t.defaultProps.required},enumerable:!0,configurable:!0}),t.prototype.componentDidUpdate=function(e,t){var n=this.props,r=n.data,o=void 0===r?[]:r,i=n.dataItemKey,a=n.virtual,s=e.virtual?e.virtual.total:0,l=void 0!==this.props.opened?this.props.opened:this.state.opened,u=void 0!==e.opened?e.opened:t.opened,c=!u&&l,p=this.value;if(this._valueOnDidUpdate=p,a&&a.total!==s)this.base.vs.calcScrollElementHeight(),this.base.vs.reset();else{var d=void 0!==e.value?e.value:t.value,h=o.findIndex((function(e){return k(e,p,i)})),f=!k(d,p,i);c&&a?this.base.scrollToVirtualItem(a,h):(c&&!a||l&&u&&p&&f)&&this.base.scrollToItem(h)}c&&this._input&&this._input.focus(),this.setValidity()},t.prototype.componentDidMount=function(){this.base.didMount(),this.setValidity()},t.prototype.render=function(){var e=this,n=this.props,r=n.dir,i=n.disabled,l=n.clearButton,u=void 0===l?t.defaultProps.clearButton:l,c=n.label,p=n.textField,d=n.className,h=n.style,m=n.loading,y=n.iconClassName,v=n.virtual,g=this.state.focused,b=!this.validityStyles||this.validity.valid,x=void 0!==this.props.filter?this.props.filter:this.state.text,k=w(this.value,p),_=f(x)?x:k,C=u&&(!!_||f(this.value)),S=this.base,N=S.vs,O=this.props.id||this._inputId;N.enabled=void 0!==v,void 0!==v&&(N.skip=v.skip,N.total=v.total,N.pageSize=v.pageSize);var M=o.createElement("span",{className:Object(a.d)("k-widget k-combobox k-header",{"k-combobox-clearable":u,"k-state-invalid":!b},d),ref:function(t){return e._element=t},style:c?X({},h,{width:void 0}):h,dir:r},o.createElement("span",{ref:function(e){return S.wrapper=e},className:Object(a.d)("k-dropdown-wrap",{"k-state-default":!i,"k-state-disabled":i,"k-state-focused":g&&!i})},this.renderSearchBar(C,_||"",O),o.createElement("span",{className:"k-select",onClick:this.toggleBtnClick,onMouseDown:function(e){return e.preventDefault()}},o.createElement("span",{className:Object(a.d)("k-icon",y,{"k-i-arrow-s":!m&&!y,"k-i-loading":m&&!y})}))),this.renderListContainer());return c?o.createElement(s.b,{label:c,editorId:O,editorValue:_,editorValid:b,editorDisabled:i,style:{width:h?h.width:void 0},children:M}):M},t.prototype.onNavigate=function(e,t){var n=this.props,r=n.data,o=void 0===r?[]:r,i=n.virtual,a=void 0===i?{skip:0}:i,s=this.props.filter?this.props.filter:this.state.text,l=this.getFocusedIndex(),u=this.base.vs,c=this.value;if(this._suggested="",-1===l||f(c))if(""===s)this.handleItemSelect(0,e);else{var p=a.skip+l,d=this.base.navigation.navigate({keyCode:t,current:p,max:(u.enabled?u.total:o.length)-1,min:0});void 0!==d&&this.handleItemSelect(d,e)}else this.handleItemSelect(l,e)},t.prototype.applyValueOnEnter=function(e,t){var n,r=this.props,o=r.data,i=void 0===o?[]:o,a=r.textField,s=r.allowCustom,l=void 0!==this.props.opened?this.props.opened:this.state.opened,u=w(this.value,a)===e?this.index:b(i,e,a),c=-1!==u,p=void 0;if(this._suggested="",c)p=i[u];else{if(!s)return this.selectFocusedItem(e,t);p=void 0!==a?((n={})[a]=e,n):e}this.triggerOnChange(p,t),l&&this.base.togglePopup(t),void 0===this.props.filter&&void 0!==this.state.text&&(t.data.text=void 0),this.applyState(t)},t.prototype.applyValueOnRejectSuggestions=function(e,t){var n,r=this.props,o=r.data,i=void 0===o?[]:o,a=r.textField,s=r.allowCustom,l=void 0!==this.props.opened?this.props.opened:this.state.opened,u=w(this.value,a);if(this._suggested="",e===u||""===e&&!f(u))return l&&this.base.togglePopup(t),this.applyState(t);var c=b(i,e,a,!0),p=null;-1!==c?p=i[c]:s&&(p=e?a?((n={})[a]=e,n):e:null),this.triggerOnChange(p,t),void 0!==this.state.text&&(t.data.text=void 0,this.base.filterChanged("",t)),l&&this.base.togglePopup(t),this.applyState(t)},t.prototype.selectFocusedItem=function(e,t){var n=void 0!==this.props.opened?this.props.opened:this.state.opened,r=this.props,o=r.data,i=void 0===o?[]:o,a=r.textField,s=r.virtual,l=void 0===s?{skip:0}:s,u=r.focusedItemIndex,c=void 0===u?g:u,p=l.skip,d=""===e&&0===p?0:c(i,e,a);return-1!==d?this.handleItemSelect(d+p,t):(this.triggerOnChange(null,t),void 0!==this.state.text&&(t.data.text=void 0)),n&&this.base.togglePopup(t),this.applyState(t)},t.prototype.renderListContainer=function(){var e=this.base,t=this.props,n=t.dir,r=t.header,i=t.footer,s=void 0!==this.props.opened?this.props.opened:this.state.opened,l=e.getPopupSettings(),u=void 0!==l.width?l.width:e.popupWidth;return o.createElement(p,{onMouseDown:function(e){return e.preventDefault()},width:u,popupSettings:{animate:l.animate,anchor:this.element||void 0,show:s,className:Object(a.d)("k-list-container k-reset",l.className),appendTo:l.appendTo},dir:void 0!==n?n:this.base.dirCalculated},r,e.renderScrollWrapper([this.renderList(),e.renderScrollElement()]),i)},t.prototype.renderList=function(){var e=this,t=this.base,n=this.props,r=n.textField,i=n.dataItemKey,a=n.listNoDataRender,s=n.itemRender,l=n.data,u=void 0===l?[]:l,c=n.virtual,p=void 0===c?{skip:0}:c,d=t.getPopupSettings(),h=t.vs,m=p.skip,y=void 0!==this.props.opened?this.props.opened:this.state.opened,v="translateY("+h.translate+"px)",g=y?this.getFocusedIndex():void 0,b=void 0!==this.props.filter?this.props.filter:this.state.text,x=w(this.value,r),k=f(b)&&b!==x?null:this.value;return o.createElement(R,{id:t.listBoxId,show:y,data:u,focusedIndex:g,value:k,textField:r,valueField:i,optionsGuid:t.guid,listRef:function(t){return h.list=e.base.list=t},wrapperStyle:h.enabled?{float:"left",width:"100%"}:{maxHeight:d.height},wrapperCssClass:h.enabled?void 0:"k-list-scroller",listStyle:h.enabled?{transform:v}:void 0,key:"listkey",skip:m,onClick:this.handleItemClick,itemRender:s,noDataRender:a})},t.prototype.renderSearchBar=function(e,t,n){var r=this,i=this.props,a=i.placeholder,s=i.tabIndex,l=i.disabled,u=i.data,c=void 0===u?[]:u,p=i.dataItemKey,d=i.virtual,h=void 0===d?{skip:0}:d,f=void 0!==this.props.opened?this.props.opened:this.state.opened,m=this.value,y=Math.max(0,c.findIndex((function(e){return k(e,m,p)})));return this._suggested&&!k(this._valueOnDidUpdate,m,p)&&(this._suggested=""),o.createElement(Y,{id:n,placeholder:a,tabIndex:s||void 0,accessKey:this.props.accessKey,value:t+this._suggested,suggestedText:this._suggested,ref:function(e){return r._input=e&&e.input},onKeyDown:this.onInputKeyDown,onChange:this.inputOnChange,onFocus:this.base.handleFocus,onBlur:this.handleBlur,disabled:l,expanded:f,owns:this.base.listBoxId,activedescendant:this.base.guid+"-"+(y+h.skip),clearButton:e,clearButtonClick:this.clearButtonClick,ariaLabelledBy:this.props.ariaLabelledBy,ariaDescribedBy:this.props.ariaDescribedBy})},t.prototype.triggerOnChange=function(e,t){var n=this.value;!f(n)&&!f(e)||k(n,e,this.props.dataItemKey)||(void 0===this.props.value&&(t.data.value=e),this._valueDuringOnChange=e,t.events.push({type:"onChange"}))},t.prototype.getFocusedIndex=function(){var e=this.value,t=this.props,n=t.data,r=void 0===n?[]:n,o=t.textField,i=t.dataItemKey,a=t.virtual,s=void 0===a?{skip:0}:a,l=t.focusedItemIndex,u=void 0===l?g:l,c=this.props.filter?this.props.filter:this.state.text;return f(e)&&void 0===c?r.findIndex((function(t){return k(t,e,i)})):c?u(r,c,o):0===s.skip?0:-1},t.prototype.suggestValue=function(e){var t=this.props,n=t.data,r=t.textField;this._suggested=function(e,t,n){void 0===t&&(t=[]);var r="";if(e){var o=t[g(t,e,n)];if(o){var i=w(o,n);e.toLowerCase()!==i.toLowerCase()&&(r=i.substring(e.length))}}return r}(e,n,r)},t.prototype.applyState=function(e){this.base.applyState(e),this._valueDuringOnChange=void 0},t.propTypes=X({},B.propTypes,{dataItemKey:i.string,suggest:i.bool,placeholder:i.string,allowCustom:i.bool,clearButton:i.bool,iconClassName:i.string,validationMessage:i.string,required:i.bool,id:i.string,ariaLabelledBy:i.string,ariaDescribedBy:i.string}),t.defaultProps=X({},B.defaultProps,{allowCustom:!1,clearButton:!0,required:!1}),t}(o.Component),Q=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ee=function(){return(ee=Object.assign||function(e){for(var t,n=1,r=arguments.length;no.length,p=t.props.suggest,d=void 0!==t.props.opened?t.props.opened:t.state.opened;if(void 0!==p&&!1!==p){u||c||!i?t._suggested="":t.suggestValue(o);var h=o+t._suggested,f={userInput:o,value:t._suggested};t.triggerOnChange(h,n,{suggestion:f})}else t._suggested="",t.triggerOnChange(o,n);(!d&&o||d&&!o)&&t.togglePopup(n),n.data.focusedItem=void 0,t.applyState(n)},t.clearButtonClick=function(e){var n=t.base.initState(),r=void 0!==t.props.opened?t.props.opened:t.state.opened;n.syntheticEvent=e;t._suggested="",t.triggerOnChange("",n),void 0!==t.state.focusedItem&&(n.data.focusedItem=void 0),r&&t.togglePopup(n),t.applyState(n)},t.onInputKeyDown=function(e){var n=e.keyCode,r=void 0!==t.props.opened?t.props.opened:t.state.opened,o=t.base.initState();o.syntheticEvent=e;var i=function(){r&&e.preventDefault()};n===a.b.enter||n===a.b.esc?(i(),t.applyInputValue(e.currentTarget.value,o,e.keyCode)):n!==a.b.up&&n!==a.b.down||(i(),t.onNavigate(o,n))},t.handleBlur=function(e){if(t.state.focused){var n=t.base.initState();n.data.focused=!1,n.events.push({type:"onBlur"}),n.syntheticEvent=e,t.applyInputValue(e.currentTarget.value,n)}},t}Q(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._element},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return void 0!==this._valueDuringOnChange?this._valueDuringOnChange:void 0!==this.props.value?this.props.value:void 0!==this.state.value?this.state.value:void 0!==this.props.defaultValue?this.props.defaultValue:""},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this.props.name},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"validity",{get:function(){var e=void 0!==this.props.validationMessage,t=!this.required||""!==this.value;return{customError:e,valid:void 0!==this.props.valid?this.props.valid:t,valueMissing:null===this.value}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"validityStyles",{get:function(){return void 0!==this.props.validityStyles?this.props.validityStyles:t.defaultProps.validityStyles},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"required",{get:function(){return void 0!==this.props.required?this.props.required:t.defaultProps.required},enumerable:!0,configurable:!0}),t.prototype.componentDidUpdate=function(e,t){var n=this.props.data,r=void 0===n?[]:n,o=e.data,i=void 0===o?[]:o,a=this.focusedIndex(),s=r[a],l=i!==r,u=void 0!==s&&t.focusedItem!==s,c=void 0!==this.props.opened?this.props.opened:this.state.opened,p=void 0!==e.opened?e.opened:t.opened;(c&&(u||l)||!p&&c)&&this.base.scrollToItem(a),this.setValidity()},t.prototype.componentDidMount=function(){this.base.didMount(),this.setValidity()},t.prototype.render=function(){var e=this,t=this.props,n=t.dir,r=t.disabled,i=t.label,l=t.className,u=t.style,c=t.loading,p=t.suggest,d=!this.validityStyles||this.validity.valid,h=this.state.focused,f=this.base,m=this.value,y=!c&&!!m,v=this.props.id||this._inputId;"string"===typeof p&&(this._suggested=p);var g=o.createElement("span",{className:Object(a.d)("k-widget k-autocomplete k-header",l,{"k-state-disabled":r,"k-state-focused":h&&!r,"k-state-invalid":!d}),ref:function(t){e._element=t,f.wrapper=t},style:i?ee({},u,{width:void 0}):u,dir:n},this.renderSearchBar(y,m||"",v),c&&o.createElement("span",{className:"k-icon k-i-loading"}),this.renderListContainer());return i?o.createElement(s.b,{label:i,editorId:v,editorValue:m,editorValid:d,editorDisabled:r,style:{width:u?u.width:void 0},children:g}):g},t.prototype.onNavigate=function(e,t){var n=this,r=this.value,o=this.props,i=o.data,a=void 0===i?[]:i,s=o.textField,l=o.focusedItemIndex,u=void 0!==this.state.focusedItem?a.findIndex((function(e){return k(e,n.state.focusedItem,s)})):l?l(a,r,s):a.indexOf(_(a,r,s)),c=this.base.navigation.navigate({keyCode:t,current:u,max:a.length-1,min:0});void 0!==c&&this.itemFocus(c,e),this.applyState(e)},t.prototype.applyInputValue=function(e,t,n){var r=void 0!==this.props.opened?this.props.opened:this.state.opened,o=this.props,i=o.data,s=void 0===i?[]:i,l=o.textField;if(this._suggested="",r&&n===a.b.enter){var u=w(s[this.focusedIndex(e)],l);this.triggerOnChange(u,t)}r&&this.togglePopup(t),this.applyState(t)},t.prototype.renderSearchBar=function(e,t,n){var r=this,i=this.base,a=this.props,s=a.placeholder,l=a.tabIndex,u=a.disabled,c=a.readonly,p=this.state.focused,d=void 0!==this.props.opened?this.props.opened:this.state.opened;return o.createElement(Y,{id:n,placeholder:s,tabIndex:l||void 0,accessKey:this.props.accessKey,value:t,suggestedText:this._suggested,focused:p,name:this.props.name,ref:function(e){return r._input=e&&e.input},onKeyDown:this.onInputKeyDown,onChange:this.onChangeHandler,onFocus:i.handleFocus,onBlur:this.handleBlur,disabled:u,readOnly:c,expanded:d,owns:i.listBoxId,activedescendant:"option-"+i.guid+"-"+this.focusedIndex(),clearButton:e,clearButtonClick:this.clearButtonClick,ariaLabelledBy:this.props.ariaLabelledBy,ariaDescribedBy:this.props.ariaDescribedBy})},t.prototype.renderListContainer=function(){var e=this.base,t=this.props,n=t.dir,r=t.header,i=t.footer,s=e.getPopupSettings(),l=void 0!==this.props.opened?this.props.opened:this.state.opened,u=void 0!==s.width?s.width:e.popupWidth;return o.createElement(p,{onMouseDown:function(e){return e.preventDefault()},width:u,popupSettings:{animate:s.animate,anchor:this.element||void 0,show:l,className:Object(a.d)("k-list-container k-reset",s.className),appendTo:s.appendTo},dir:void 0!==n?n:this.base.dirCalculated},r,this.renderList(),i)},t.prototype.renderList=function(){var e=this.base,t=e.getPopupSettings(),n=this.props,r=n.textField,i=n.data,a=void 0===i?[]:i,s=n.listNoDataRender,l=n.itemRender,u=this.value,c=void 0!==this.props.opened?this.props.opened:this.state.opened;return o.createElement(R,{id:e.listBoxId,show:c,data:a.slice(),focusedIndex:this.focusedIndex(),value:u,textField:r,valueField:r,highlightSelected:!1,optionsGuid:e.guid,listRef:function(t){return e.list=t},wrapperStyle:{maxHeight:t.height},wrapperCssClass:"k-list-scroller",onClick:this.handleItemClick,itemRender:l,noDataRender:s})},t.prototype.triggerOnChange=function(e,t,n){(this.value!==e||n)&&(t.data.value=e,this._valueDuringOnChange=e,t.events.push(ee({type:"onChange"},n||{})))},t.prototype.applyState=function(e){this.base.applyState(e),this._valueDuringOnChange=void 0},t.prototype.suggestValue=function(e){if(this._suggested="",e){var t=this.props,n=t.data,r=void 0===n?[]:n,o=t.textField,i=r[g(r,e,o)];if(i){var a=w(i,o);e.toLowerCase()!==a.toLowerCase()&&(this._suggested=a.substring(e.length))}}},t.prototype.focusedIndex=function(e){var t=this,n=this.props,r=n.data,o=void 0===r?[]:r,i=n.textField,a=n.focusedItemIndex,s=void 0!==e?e:this.value;return void 0!==this.state.focusedItem?o.findIndex((function(e){return k(e,t.state.focusedItem,i)})):a?a(o,s,i):Math.max(0,o.indexOf(_(o,s,i)))},t.propTypes=ee({},B.basicPropTypes,{suggest:i.oneOfType([i.bool,i.string]),placeholder:i.string,value:i.string,defaultValue:i.string,validationMessage:i.string,required:i.bool,readonly:i.bool,id:i.string,ariaLabelledBy:i.string,ariaDescribedBy:i.string}),t.defaultProps=ee({},B.defaultProps)}(o.Component),function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),ne=function(e){return e.preventDefault()},re=function(e){return e.stopPropagation()},oe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return te(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.data,r=t.guid;return o.createElement("ul",{className:"k-reset",role:"listbox",id:"tagslist-"+r},n.map((function(t){var i=o.createElement("li",{className:t===e.props.focused?"k-button k-state-focused":"k-button",key:t.text,id:"tag-"+r+"-"+t.text.replace(/\s+/g,"-"),onMouseDown:ne,onClick:re,"aria-selected":!0,role:"option","aria-setsize":n.length},o.createElement("span",null,t.text),o.createElement("span",{"aria-label":"delete",className:"k-select",onClick:function(n){return e.props.onTagDelete.call(void 0,t.data,n)}},o.createElement("span",{className:"k-icon k-i-close"})));return e.props.tagRender?e.props.tagRender(t,i):i})))},t}(o.Component);!function(e){e[e.PopupList=0]="PopupList",e[e.TagsList=1]="TagsList"}(q||(q={}));var ie,ae=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),se=function(){return(se=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&t.triggerOnChange([],r),void 0!==t.state.focusedIndex&&(r.data.focusedIndex=void 0),n&&t.base.togglePopup(r);var o=void 0!==t.props.filter?t.props.filter:t.state.text;f(o)&&""!==o&&t.base.filterChanged("",r),t.state.text&&(r.data.text=""),t.applyState(r)},t.onInputKeyDown=function(e){var n=e.keyCode,r=void 0!==t.props.filter?t.props.filter:t.state.text,o=void 0!==t.props.opened?t.props.opened:t.state.opened,i=t.getFocusedState().focusedItem,s=t.base.initState();if(s.syntheticEvent=e,!r&&t.value.length>0&&(n===a.b.left||n===a.b.right||n===a.b.home||n===a.b.end||n===a.b.delete||n===a.b.backspace))return t.onTagsNavigate(e,s);var l=function(){e.preventDefault(),t.base.togglePopup(s),t.applyState(s)};o?e.altKey&&n===a.b.up?l():n===a.b.up||n===a.b.down?(e.preventDefault(),t.onNavigate(s,n)):n===a.b.enter?(e.preventDefault(),t.props.allowCustom&&r&&null===i?t.customItemSelect(e):t.selectFocusedItem(e)):n===a.b.esc&&l():e.altKey&&n===a.b.down&&l()},t.renderListContainer=function(){var e=t.base,n=t.props,r=n.header,i=n.footer,s=n.allowCustom,l=n.dir,u=t.base.getPopupSettings(),c=void 0!==t.props.opened?t.props.opened:t.state.opened,d=void 0!==t.props.filter?t.props.filter:t.state.text,h=void 0!==t.props.virtual,f=void 0!==u.width?u.width:e.popupWidth,m={onMouseDown:le,dir:void 0!==l?l:e.dirCalculated,onBlur:t.handleBlur,width:f,popupSettings:{className:Object(a.d)("k-list-container k-reset",u.className),animate:u.animate,anchor:t.element||void 0,show:c,open:t.onPopupOpened,close:t.onPopupClosed,appendTo:u.appendTo}},y=t.getFocusedState().focusedType,v=s&&d&&o.createElement("div",{className:"k-list",key:"customitem",onClick:t.customItemSelect},o.createElement("div",{className:Object(a.d)("k-item k-custom-item",{"k-state-focused":ce(y)})},d,o.createElement("span",{className:"k-icon k-i-plus",style:{float:"right"}})));return o.createElement(p,se({},m),h&&r,t.base.renderScrollWrapper(o.createElement(o.Fragment,null,!h&&r,v,t.renderList(),!h&&i,t.base.renderScrollElement())),h&&i)},t.renderList=function(){var e=t.props,n=e.data,r=void 0===n?[]:n,i=e.textField,a=e.listNoDataRender,s=e.itemRender,l=e.dataItemKey,u=e.virtual,c=t.base.vs,p=u?u.skip:0,d=void 0!==t.props.opened?t.props.opened:t.state.opened,h=t.getFocusedState().focusedIndex,f=t.base.getPopupSettings(),m="translateY("+c.translate+"px)";return o.createElement(R,{id:t.base.listBoxId,show:d,data:r.slice(),focusedIndex:h-p,value:t.value,textField:i,valueField:l,optionsGuid:t.base.guid,listRef:function(e){return c.list=t.base.list=e},wrapperStyle:c.enabled?{float:"left",width:"100%"}:{maxHeight:f.height},wrapperCssClass:c.enabled?void 0:"k-list-scroller",listStyle:c.enabled?{transform:m}:void 0,key:"listKey",skip:p,onClick:t.handleItemClick,itemRender:s,noDataRender:a})},t.customItemSelect=function(e){var n,r=void 0!==t.props.filter?t.props.filter:t.state.text,o=t.props.textField;if(r){var i=t.base.initState();i.syntheticEvent=e;var a=o?((n={})[o]=r,n):r;void 0!==t.state.text&&(i.data.text=""),i.data.focusedIndex=void 0,t.base.filterChanged("",i);var s=t.value.concat([a]);t.triggerOnChange(s,i),t.base.togglePopup(i),t.applyState(i)}},t.handleWrapperClick=function(e){var n=void 0!==t.props.opened?t.props.opened:t.state.opened,r=t._input;!n&&r&&t.focusElement(r);var o=t.base.initState();o.syntheticEvent=e,t.state.focused||(o.events.push({type:"onFocus"}),o.data.focused=!0),t.base.togglePopup(o),t.applyState(o)},t.handleItemClick=function(e,n){var r=t.base.initState();r.syntheticEvent=n,t.handleItemSelect(e,r),t.props.autoClose&&t.base.togglePopup(r),t.applyState(r)},t.handleBlur=function(e){if(t.state.focused&&!t._skipFocusEvent){var n=void 0!==t.props.opened?t.props.opened:t.state.opened,r=t.base.initState(),o=t.props,i=o.allowCustom,a=o.filterable;r.syntheticEvent=e,r.data.focused=!1,r.events.push({type:"onBlur"}),n&&(t.state.opened&&(r.data.opened=!1),r.events.push({type:"onClose"})),i||a||!t.state.text||(r.data.text=""),t.applyState(r)}},t.handleFocus=function(e){t._skipFocusEvent||t.base.handleFocus(e)},t.onPopupOpened=function(){t._input&&t.state.focused&&t.focusElement(t._input)},t.onPopupClosed=function(){t.state.focused&&setTimeout((function(){t.state.focused&&t.focusElement(t._input)}),0)},t.setValidity=function(){t._input&&t._input.setCustomValidity&&t._input.setCustomValidity(t.validity.valid?"":t.props.validationMessage||"Please enter a valid value!")},t}return ae(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._element},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){var e=[];return this._valueItemsDuringOnChange?e.push.apply(e,this._valueItemsDuringOnChange):this.props.value?e.push.apply(e,this.props.value):this.state.value?e.push.apply(e,this.state.value):this.props.defaultValue&&e.push.apply(e,this.props.defaultValue),e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this.props.name},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"validity",{get:function(){var e=void 0!==this.props.validationMessage,t=!this.required||null!==this.value&&this.value.length>0&&void 0!==this.value;return{customError:e,valid:void 0!==this.props.valid?this.props.valid:t,valueMissing:null===this.value}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"required",{get:function(){return void 0!==this.props.required?this.props.required:t.defaultProps.required},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"validityStyles",{get:function(){return void 0!==this.props.validityStyles?this.props.validityStyles:t.defaultProps.validityStyles},enumerable:!0,configurable:!0}),t.prototype.componentDidUpdate=function(e,t){var n=this.props,r=n.virtual,o=n.data,i=r?r.skip:0,a=e.virtual?e.virtual.total:0,s=void 0!==this.props.opened?this.props.opened:this.state.opened,l=void 0!==e.opened?e.opened:t.opened,u=!l&&s,c=l&&!s;if(!this.base.getPopupSettings().animate&&c&&this.onPopupClosed(),r&&r.total!==a)this.base.vs.calcScrollElementHeight(),this.base.vs.reset();else{var p=this.getFocusedState(),d=p.focusedItem,h=p.focusedIndex,f=void 0!==h&&t.focusedIndex!==h,m=e.data;u&&r?this.base.scrollToVirtualItem(r,h-i):u&&!r?this.base.scrollToItem(h):s&&l&&d&&(f||m!==o)&&this.base.scrollToItem(h-i)}this.setValidity()},t.prototype.componentDidMount=function(){this.base.didMount(),this.setValidity()},t.prototype.onNavigate=function(e,t){var n=this.props,r=n.allowCustom,o=n.data,i=void 0===o?[]:o,s=void 0!==this.props.opened?this.props.opened:this.state.opened,l=void 0!==this.props.filter?this.props.filter:this.state.text,u=this.getFocusedState(),c=u.focusedType,p=u.focusedIndex,d=r&&l,h=ce(c),f=this.base,m=f.vs;if(s&&t===a.b.up&&h)void 0!==this.state.focusedIndex&&(e.data.focusedIndex=void 0);else{var y=f.navigation.navigate({keyCode:t,current:p,max:(m.enabled?m.total:i.length)-1,min:d?-1:0});void 0!==y&&this.itemFocus(y,e)}this.applyState(e)},t.prototype.render=function(){var e=this,t=this.props,n=t.style,r=t.className,i=t.label,l=t.dir,u=t.disabled,c=t.tags,p=t.textField,d=t.dataItemKey,h=t.virtual,f=this.state,m=f.focused,y=f.text,v=f.focusedTag,g=this.base.vs,b=this.props.id||this._inputId;g.enabled=void 0!==h,void 0!==h&&(g.skip=h.skip,g.total=h.total,g.pageSize=h.pageSize);var x=[];void 0===c?this.value.forEach((function(e){x.push({text:w(e,p),data:[e]})})):x.push.apply(x,c),this.setItems(x,this._tags);var k=!this.validityStyles||this.validity.valid,_=o.createElement("span",{ref:function(t){return e._element=t},className:Object(a.d)("k-widget k-multiselect k-header",r,{"k-state-focused":m&&!u,"k-state-invalid":!k,"k-state-disabled":u}),style:i?se({},n,{width:void 0}):n,dir:l,onFocus:this.handleFocus,onBlur:this.handleBlur},o.createElement("div",{onClick:this.handleWrapperClick,ref:function(t){return e.base.wrapper=t},className:"k-multiselect-wrap k-floatwrap",onMouseDown:C},x.length>0&&o.createElement(oe,{tagRender:this.props.tagRender,onTagDelete:this.onTagDelete,data:x,guid:this.base.guid,focused:v?x.find((function(e){return ue(e,v,d)})):void 0}),this.renderSearchbar(b),this.props.loading&&o.createElement("span",{className:"k-icon k-i-loading"})),this.renderListContainer());return i?o.createElement(s.b,{label:i,editorId:b,editorValue:y||w(this.value[0],p),editorValid:k,editorDisabled:u,style:{width:n?n.width:void 0},children:_}):_},t.prototype.renderSearchbar=function(e){var t=this.state,n=t.activedescendant,r=t.focusedTag,i=this.props,a=i.disabled,s=i.placeholder,l=(void 0!==this.props.filter?this.props.filter:this.state.text)||"",u=void 0!==this.props.opened?this.props.opened:this.state.opened,c=this.getFocusedState().focusedIndex,p=!!l||this.value.length>0,d=0!==this.value.length||l?void 0:s,h=n===q.TagsList&&void 0!==r?"tag-"+this.base.guid+"-"+r.text.replace(/\s+/g,"-"):"option-"+this.base.guid+"-"+c;return o.createElement(Y,{id:e,size:Math.max((d||"").length,l.length,1),tabIndex:this.props.tabIndex,accessKey:this.props.accessKey,placeholder:d,value:l,onChange:this.onChangeHandler,onKeyDown:this.onInputKeyDown,ref:this.searchbarRef,disabled:a,expanded:u,owns:this.base.listBoxId,activedescendant:h,ariaDescribedBy:"tagslist-"+this.base.guid+" "+(this.props.ariaDescribedBy||""),clearButton:p,clearButtonClick:this.clearButtonClick,ariaLabelledBy:this.props.ariaLabelledBy})},t.prototype.onTagsNavigate=function(e,t){var n=e.keyCode,r=this.state.focusedTag,o=this._tags,i=this.props.dataItemKey,s=r?o.findIndex((function(e){return ue(e,r,i)})):-1,l=void 0,u=-1!==s;if(n===a.b.left)l=o[s=u?Math.max(0,s-1):o.length-1];else if(n===a.b.right)s===o.length-1?l=void 0:u&&(l=o[s=Math.min(o.length-1,s+1)]);else if(n===a.b.home)l=o[0];else if(n===a.b.end)l=o[o.length-1];else if(n===a.b.delete){if(u){var c=this.value;x(c,o[s].data,i),this.triggerOnChange(c,t)}}else if(n===a.b.backspace){c=this.value;if(u)x(c,o[s].data,i),this.triggerOnChange(c,t);else if(!u&&o.length){var p=o.pop();x(c,p.data,i),this.triggerOnChange(c,t)}}l!==r&&(t.data.focusedTag=l,t.data.activedescendant=q.TagsList),this.applyState(t)},t.prototype.triggerOnChange=function(e,t){void 0===this.props.value&&(t.data.value=e.slice()),this._valueItemsDuringOnChange=[],this.setItems(e,this._valueItemsDuringOnChange),t.events.push({type:"onChange"})},t.prototype.selectFocusedItem=function(e){var t=this.props,n=t.data,r=void 0===n?[]:n,o=t.virtual,i=this.getFocusedState().focusedIndex;void 0!==r[i-(o?o.skip:0)]&&this.handleItemClick(i,e)},t.prototype.setItems=function(e,t){t.length=0,t.push.apply(t,e)},t.prototype.getFocusedState=function(){var e,t=this.state.focusedIndex,n=void 0!==this.props.filter?this.props.filter:this.state.text,r=this.props,o=r.allowCustom,i=r.data,a=void 0===i?[]:i,s=r.dataItemKey,l=r.virtual,u=r.textField,c=r.focusedItemIndex,p=void 0===c?g:c,d=l&&l.skip||0;if(void 0!==t)return{focusedIndex:t,focusedItem:a[t-d],focusedType:ie.ListItem};var h=this.value;if(o&&n)return{focusedItem:null,focusedIndex:-1,focusedType:ie.CustomItem};if(n)return{focusedItem:a[e=p(a,n,u)],focusedIndex:e+d,focusedType:ie.ListItem};if(h.length){var f=h[h.length-1];return e=a.findIndex((function(e){return k(e,f,s)})),void 0!==a[e]?{focusedIndex:e+d,focusedItem:a[e],focusedType:ie.ListItem}:{focusedType:ie.None,focusedIndex:-1}}return 0===d?{focusedItem:a[0],focusedIndex:0,focusedType:ie.ListItem}:{focusedType:ie.None,focusedIndex:-1}},t.prototype.focusElement=function(e){var t=this;this._skipFocusEvent=!0,e.focus(),setTimeout((function(){return t._skipFocusEvent=!1}),30)},t.prototype.applyState=function(e){this.base.applyState(e),this._valueItemsDuringOnChange=null},t.propTypes=se({},B.propTypes,{autoClose:i.bool,value:i.arrayOf(i.any),defaultValue:i.arrayOf(i.any),dataItemKey:i.string,placeholder:i.string,tags:i.arrayOf(i.shape({text:i.string,data:i.arrayOf(i.any)})),tagRender:i.func,id:i.string,ariaLabelledBy:i.string,ariaDescribedBy:i.string}),t.defaultProps=se({},B.defaultProps,{autoClose:!0,required:!1}),t}(o.Component)},function(e,t,n){"use strict";n.d(t,"b",(function(){return h})),n.d(t,"d",(function(){return u})),n.d(t,"a",(function(){return c})),n.d(t,"c",(function(){return p}));var r,o=n(0),i=n(1),a=n(2),s=((r={})["labels.optional"]="(Optional)",r),l=n(4),u=function(e){var t=e.id,n=e.editorId,r=e.editorRef,i=e.editorDisabled,u=e.children,c=e.editorValid,p=e.style,d=e.className,h=e.optional,f=Object(l.j)(),m=h?f.toLanguageString("labels.optional",s["labels.optional"]):"",y=m&&o.createElement("span",{className:"k-label-optional"},m),v=o.useCallback((function(e){if(r&&r.current&&!i){r.current.focus&&(e.preventDefault(),r.current.focus());var t=r.current.actionElement;t&&(e.preventDefault(),t.click())}}),[r]),g=Object(a.d)({"k-label":!0,"k-label-empty":!u,"k-text-error":!1===c,"k-text-disabled":!0===i},d);return o.createElement("label",{id:t,htmlFor:n,onClick:v,style:p,className:g},u,y)};u.propTypes={id:i.string,editorId:i.string,editorRef:i.oneOfType([i.func,i.shape({current:i.any})]),editorValid:i.bool,editorDisabled:i.bool,style:i.object,className:i.string,optional:i.bool},u.displayName="KendoReactLabel";var c=function(e){var t=Object(a.d)({"k-form-error":!0,"k-text-start":"start"===e.direction,"k-text-end":"end"===e.direction},e.className);return o.createElement("div",{id:e.id,role:"alert",style:e.style,className:t},e.children)};c.propTypes={id:i.string,direction:i.oneOf(["start","end"]),children:i.oneOfType([i.element,i.node]),style:i.object,className:i.string},c.defaultProps={direction:"start"},c.displayName="KendoReactError";var p=function(e){var t=Object(a.d)({"k-form-hint":!0,"k-text-start":"start"===e.direction,"k-text-end":"end"===e.direction},e.className);return o.createElement("div",{id:e.id,style:e.style,className:t},e.children)};p.propTypes={id:i.string,direction:i.oneOf(["start","end"]),children:i.oneOfType([i.element,i.node]),style:i.object,className:i.string},p.defaultProps={direction:"start"},p.displayName="KendoReactHint";var d=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={focused:!1},t.handleFocus=function(e){t.setState({focused:!0})},t.handleBlur=function(e){t.setState({focused:!1})},t}return d(t,e),t.prototype.render=function(){var e=this.props,t=e.label,n=e.editorId,r=e.className,i=e.editorValue,u=e.editorPlaceholder,c=e.editorValid,p=e.editorDisabled,d=e.style,h=e.id,f=e.optional,m=Object(l.f)(this),y=f?m.toLanguageString("labels.optional",s["labels.optional"]):"",v=y&&o.createElement("span",{className:"k-label-optional"},y),g=Object(a.d)({"k-textbox-container":!0,"k-state-focused":this.state.focused,"k-state-empty":!(i||u),"k-text-disabled":p,"k-rtl":"rtl"===this.props.dir},r),b=Object(a.d)({"k-label":!0,"k-text-error":!1===c,"k-text-disabled":p});return o.createElement("span",{className:g,onFocus:this.handleFocus,onBlur:this.handleBlur,style:d,dir:this.props.dir},this.props.children,t?n?o.createElement("label",{id:h,htmlFor:n,className:b},t,v):o.createElement("span",{id:h,className:b},t,v):null)},t.propTypes={label:i.string,editorId:i.string,editorValue:i.string,editorPlaceholder:i.string,editorValid:i.bool,editorDisabled:i.bool,id:i.string,style:i.object,className:i.string,optional:i.bool},t}(o.Component);Object(l.h)(h)},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"c",(function(){return d})),n.d(t,"b",(function(){return h})),n.d(t,"d",(function(){return y}));var r=n(0),o=r.createContext(null),i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=n?n:e},l=n(3),u=function(e,t,n){void 0===n&&(n=!0);if(-1===["hex","rgba"].indexOf(t))throw new Error("Unsupported color output format '"+t+"'. The available options are 'hex' or 'rgba'.");if(a(e)){var r=Object(l.f)(e.trim(),n);if(a(r))return"hex"===t?r.toCss():r.toCssRgba()}},c=function(e,t){void 0===t&&(t=!0);var n=Object(l.f)(e,t);return a(n)?n.toHSV():{}},p=function(e,t){void 0===t&&(t=!0);var n=Object(l.f)(e,t);return a(n)?n.toBytes():{}},d=function(e){var t=s(e.h,0,359.9),n=s(e.s,0,1),r=s(e.v,0,1),o=s(e.a,0,1);return l.b.fromHSV(t,n,r,o).toCssRgba()},h=function(e){return d({h:e,s:1,v:1,a:1})},f={};var m,y=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),v=function(e){function t(t){var n=e.call(this,t)||this;return n.onChange=function(e){var t=e.target.value,r=u(t,"rgba");n.setState({hex:t}),a(r)&&n.props.onHexChange(t,r,e)},n.onBlur=function(){a(u(n.state.hex,"rgba"))||n.setState({hex:n.state.originalHex})},n.state={hex:n.props.hex,originalHex:n.props.hex},n}return y(t,e),t.prototype.render=function(){return r.createElement("input",{value:this.state.hex,className:"k-textbox k-hex-value",onChange:this.onChange,onBlur:this.onBlur,disabled:this.props.disabled})},t.getDerivedStateFromProps=function(e,t){return e.hex!==t.originalHex?{hex:e.hex,originalHex:e.hex}:null},t}(r.Component),g=n(4),b=((m={})["numerictextbox.increment"]="Increase value",m["numerictextbox.decrement"]="Decrease value",m["slider.increment"]="Increase",m["slider.decrement"]="Decrease",m["slider.dragTitle"]="Drag",m["colorGradient.r"]="r",m["colorGradient.g"]="g",m["colorGradient.b"]="b",m["colorGradient.a"]="a",m["colorGradient.hex"]="hex",m["checkbox.validation"]="Please check this box if you want to proceed!",m["radioButton.validation"]="Please select option if you want to proceed!",m["switch.validation"]="Please turn on if you want to proceed!",m),w=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),x=function(){return(x=Object.assign||function(e){for(var t,n=1,r=arguments.length;nt?t:e},e}(),O={basic:{colors:["#000000","#7f7f7f","#880015","#ed1c24","#ff7f27","#fff200","#22b14c","#00a2e8","#3f48cc","#a349a4"," ffffff","#c3c3c3","#b97a57","#ffaec9","#ffc90e","#efe4b0","#b5e61d","#99d9ea","#7092be","#c8bfe7"],columns:10},office:{colors:["#ffffff","#000000","#e6e6e6","#435569","#4371c4","#ed7e32","#a5a4a5","#febf04","#5a9bd5","#71ae48","#f2f2f3","#7f7f7f","#d1cece","#d5dde3","#dae1f4","#fce5d4","#deeded","#fff2cc","#deeaf6","#e1efd9","#d7d8d8","#585959","#aeabab","#adbaca","#b4c5e7","#f6caac","#dbdbdb","#ffe498","#bcd6ee","#c5e0b2","#bfbfc0","#3f3f3f","#767070","#8595b1","#8fabdb","#f5b183","#c9c8c9","#fed965","#9bc4e5","#a8d08d","#a5a5a6","#262625","#393939","#334050","#2e5496","#c45a11","#7b7b7a","#bf9000","#2f75b5","#548235","#7f7f7f","#0b0c0c","#161616","#222a34","#203764","#843d0b","#525252","#7f6000","#1d4d79","#375623"],columns:10},apex:{colors:["#ffffff","#000000","#c9c2d1","#69676d","#ceb966","#9cb084","#6bb1c9","#6585cf","#7e6bc9","#a379bb","#f2f2f2","#7f7f7f","#f4f2f5","#e0e0e2","#f5f1e0","#ebefe6","#e1eff4","#e0e6f5","#e5e1f4","#ece4f1","#d8d8d8","#595959","#e9e6ec","#c2c1c5","#ebe3c1","#d7dfcd","#c3dfe9","#c1ceeb","#cbc3e9","#dac9e3","#bfbfbf","#3f3f3f","#dedae3","#a4a3a8","#e1d5a3","#c3cfb5","#a6d0de","#a2b5e2","#b1a6de","#c7aed6","#a5a5a5","#262626","#9688a5","#4e4d51","#ae9638","#758c5a","#3d8da9","#365bb0","#533da9","#7d4d99","#7f7f7f","#0c0c0c","#635672","#343336","#746425","#4e5d3c","#295e70","#243c75","#372970","#533366"],columns:10},austin:{colors:["#ffffff","#000000","#caf278","#3e3d2d","#94c600","#71685a","#ff6700","#909465","#956b43","#fea022","#f2f2f2","#7f7f7f","#f4fce4","#dddcd0","#efffc0","#e3e1dc","#ffe0cb","#e8e9df","#ece1d6","#feecd2","#d8d8d8","#595959","#e9f9c9","#bbb9a1","#dfff82","#c8c3ba","#ffc299","#d2d4c0","#dac3ad","#fed9a6","#bfbfbf","#3f3f3f","#dff7ae","#ada598","#cfff43","#ada598","#ffa365","#bcbfa1","#c8a585","#fec67a","#a5a5a5","#262626","#a9ea25","#2e2d21","#6f9400","#544e43","#bf4d00","#6c6f4b","#6f5032","#d77b00","#7f7f7f","#0c0c0c","#74a50f","#1f1e16","#4a6300","#38342d","#7f3300","#484a32","#4a3521","#8f5200"],columns:10},clarity:{colors:["#ffffff","#292934","#f3f2dc","#d2533c","#93a299","#ad8f67","#726056","#4c5a6a","#808da0","#79463d","#f2f2f2","#e7e7ec","#e7e5b9","#f6dcd8","#e9ecea","#eee8e0","#e4dedb","#d8dde3","#e5e8ec","#e9d6d3","#d8d8d8","#c4c4d1","#d5d185","#edbab1","#d3d9d6","#ded2c2","#c9beb8","#b2bcc8","#ccd1d9","#d3aea7","#bfbfbf","#8a8aa3","#aca73b","#e4978a","#bec7c1","#cdbba3","#af9e94","#8c9bac","#b2bac6","#bd857c","#a5a5a5","#56566e","#56531d","#a43925","#6b7c72","#866b48","#554840","#39434f","#5c697b","#5a342d","#7f7f7f","#3b3b4b","#22210b","#6d2619","#47534c","#594730","#39302b","#262d35","#3d4652","#3c231e"],columns:10},slipstream:{colors:["#ffffff","#000000","#b4dcfa","#212745","#4e67c8","#5eccf3","#a7ea52","#5dceaf","#ff8021","#f14124","#f2f2f2","#7f7f7f","#8bc9f7","#c7cce4","#dbe0f4","#def4fc","#edfadc","#def5ef","#ffe5d2","#fcd9d3","#d8d8d8","#595959","#4facf3","#909aca","#b8c2e9","#beeafa","#dbf6b9","#beebdf","#ffcca6","#f9b3a7","#bfbfbf","#3f3f3f","#0d78c9","#5967af","#94a3de","#9ee0f7","#caf297","#9de1cf","#ffb279","#f68d7b","#a5a5a5","#262626","#063c64","#181d33","#31479f","#11b2eb","#81d319","#34ac8b","#d85c00","#c3260c","#7f7f7f","#0c0c0c","#021828","#101322","#202f6a","#0b769c","#568c11","#22725c","#903d00","#821908"],columns:10},metro:{colors:["#ffffff","#000000","#d6ecff","#4e5b6f","#7fd13b","#ea157a","#feb80a","#00addc","#738ac8","#1ab39f","#f2f2f2","#7f7f7f","#a7d6ff","#d9dde4","#e5f5d7","#fad0e4","#fef0cd","#c5f2ff","#e2e7f4","#c9f7f1","#d8d8d8","#595959","#60b5ff","#b3bcca","#cbecb0","#f6a1c9","#fee29c","#8be6ff","#c7d0e9","#94efe3","#bfbfbf","#3f3f3f","#007dea","#8d9baf","#b2e389","#f272af","#fed46b","#51d9ff","#aab8de","#5fe7d5","#a5a5a5","#262626","#003e75","#3a4453","#5ea226","#af0f5b","#c58c00","#0081a5","#425ea9","#138677","#7f7f7f","#0c0c0c","#00192e","#272d37","#3f6c19","#750a3d","#835d00","#00566e","#2c3f71","#0c594f"],columns:10},flow:{colors:["#ffffff","#000000","#dbf5f9","#04617b","#0f6fc6","#009dd9","#0bd0d9","#10cf9b","#7cca62","#a5c249","#f2f2f2","#7f7f7f","#b2e9f2","#b4ecfc","#c7e2fa","#c4eeff","#c9fafc","#c9faed","#e4f4df","#edf2da","#d8d8d8","#595959","#76d9e8","#6adafa","#90c6f6","#89deff","#93f5f9","#94f6db","#cae9c0","#dbe6b6","#bfbfbf","#3f3f3f","#21b2c8","#20c8f7","#59a9f2","#4fceff","#5df0f6","#5ff2ca","#b0dfa0","#c9da91","#a5a5a5","#262626","#105964","#02485c","#0b5394","#0075a2","#089ca2","#0b9b74","#54a838","#7e9532","#7f7f7f","#0c0c0c","#062328","#01303d","#073763","#004e6c","#05686c","#07674d","#387025","#546321"],columns:10},hardcover:{colors:["#ffffff","#000000","#ece9c6","#895d1d","#873624","#d6862d","#d0be40","#877f6c","#972109","#aeb795","#f2f2f2","#7f7f7f","#e1dca5","#f2e0c6","#f0d0c9","#f6e6d5","#f5f2d8","#e7e5e1","#fbc7bc","#eef0e9","#d8d8d8","#595959","#d0c974","#e6c28d","#e2a293","#eeceaa","#ece5b2","#cfccc3","#f78f7a","#dee2d4","#bfbfbf","#3f3f3f","#a29a36","#daa454","#d4735e","#e6b681","#e2d88c","#b7b2a5","#f35838","#ced3bf","#a5a5a5","#262626","#514d1b","#664515","#65281a","#a2641f","#a39428","#655f50","#711806","#879464","#7f7f7f","#0c0c0c","#201e0a","#442e0e","#431b11","#6c4315","#6d621a","#433f35","#4b1004","#5a6243"],columns:10},trek:{colors:["#ffffff","#000000","#fbeec9","#4e3b30","#f0a22e","#a5644e","#b58b80","#c3986d","#a19574","#c17529","#f2f2f2","#7f7f7f","#f7e09e","#e1d6cf","#fcecd5","#eddfda","#f0e7e5","#f3eae1","#ece9e3","#f5e3d1","#d8d8d8","#595959","#f3cc5f","#c4ad9f","#f9d9ab","#dcc0b6","#e1d0cc","#e7d5c4","#d9d4c7","#ebc7a3","#bfbfbf","#3f3f3f","#d29f0f","#a78470","#f6c781","#cba092","#d2b9b2","#dbc1a7","#c6bfab","#e1ac76","#a5a5a5","#262626","#694f07","#3a2c24","#c87d0e","#7b4b3a","#926255","#a17242","#7b7153","#90571e","#7f7f7f","#0c0c0c","#2a1f03","#271d18","#855309","#523226","#614138","#6b4c2c","#524b37","#603a14"],columns:10},verve:{colors:["#ffffff","#000000","#d2d2d2","#666666","#ff388c","#e40059","#9c007f","#68007f","#005bd3","#00349e","#f2f2f2","#7f7f7f","#bdbdbd","#e0e0e0","#ffd7e8","#ffc6dc","#ffb8f1","#f1b2ff","#c3dcff","#b8cfff","#d8d8d8","#595959","#9d9d9d","#c1c1c1","#ffafd1","#ff8eba","#ff71e4","#e365ff","#87baff","#72a0ff","#bfbfbf","#3f3f3f","#696969","#a3a3a3","#ff87ba","#ff5597","#ff2ad7","#d519ff","#4b98ff","#2b71ff","#a5a5a5","#262626","#343434","#4c4c4c","#e90062","#ab0042","#75005f","#4e005f","#00449e","#002676","#7f7f7f","#0c0c0c","#151515","#333333","#9b0041","#72002c","#4e003f","#34003f","#002d69","#00194f"],columns:10},monochrome:{colors:["#000000","#1a1a1a","#333333","#4d4d4d","#666666","#808080","#999999","#b3b3b3","#cccccc","#e6e6e6","#f2f2f2","#ffffff"],columns:12}},M=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),T=function(e){function t(t){var n=e.call(this,t)||this;return n.wrapper=null,n.guid=Object(i.l)(),n.focus=function(){n.wrapper&&n.wrapper.focus()},n.onKeyDown=function(e){switch(e.keyCode){case i.b.down:n.handleCellNavigation(0,1);break;case i.b.up:n.handleCellNavigation(0,-1);break;case i.b.right:n.handleCellNavigation(1,0);break;case i.b.left:n.handleCellNavigation(-1,0);break;case i.b.enter:n.handleEnter(e);break;default:return}e.preventDefault()},n.onColorClick=function(e,t){n.isUncontrolled?n.setState({selectedColor:e,focusedColor:e}):n.setState({focusedColor:e}),n.dispatchChangeEvent(e,t)},n.onFocus=function(){n.setState({focusedColor:n.state.selectedColor||n.paletteService.colorRows[0][0]})},n.onBlur=function(){n.setState({focusedColor:void 0})},n.state={selectedColor:void 0!==n.props.value?n.props.value:n.props.defaultValue,isFirstRender:!0},n}return M(t,e),t.prototype.render=function(){var e=this,t=this.getPaletteInfo(),n=this.paletteService=new N;n.setColorMatrix(t.colors,t.columns);var o=n.getCellCoordsFor(this.state.selectedColor),a=n.getCellCoordsFor(this.state.focusedColor),s=Object(i.d)("k-widget k-colorpalette",{"k-state-disabled":this.props.disabled});return t.colors.length?r.createElement("div",{id:this.props.id,className:s,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,"aria-disabled":this.props.disabled?"true":void 0,"aria-activedescendant":o&&this.createCellId(o),"aria-labelledby":this.props.ariaLabelledBy,"aria-describedby":this.props.ariaDescribedBy,tabIndex:Object(i.j)(this.props.tabIndex,this.props.disabled),ref:function(t){return e.wrapper=t}},r.createElement("div",{role:"grid"},r.createElement("table",{className:"k-palette k-reset",role:"presentation"},r.createElement("tbody",null,this.renderRows(n.colorRows,o,a))))):""},t.getDerivedStateFromProps=function(e,t){if(t.isFirstRender||void 0===e.value){if(t.isFirstRender)return{isFirstRender:!1}}else{if(""===e.value&&void 0!==t.selectedColor)return{selectedColor:void 0};if(""!==e.value&&e.value!==t.selectedColor)return{selectedColor:e.value}}return null},t.prototype.handleCellNavigation=function(e,t){if(this.focusedColorCooridanates){var n=this.paletteService.getNextCell(this.focusedColorCooridanates,e,t);this.setState({focusedColor:this.paletteService.getColorAt(n)})}else this.setState({focusedColor:this.paletteService.colorRows[0][0]})},t.prototype.handleEnter=function(e){this.isUncontrolled&&this.setState({selectedColor:this.state.focusedColor}),this.dispatchChangeEvent(this.state.focusedColor,e)},t.prototype.dispatchChangeEvent=function(e,t){Object(i.h)(this.props.onChange,t,this,{value:e,rgbaValue:u(e,"rgba")})},Object.defineProperty(t.prototype,"focusedColorCooridanates",{get:function(){return this.state.focusedColor?this.paletteService.getCellCoordsFor(this.state.focusedColor):void 0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isUncontrolled",{get:function(){return void 0===this.props.value},enumerable:!0,configurable:!0}),t.prototype.getPaletteInfo=function(){if("string"===typeof this.props.palette){var e=O[this.props.palette];return a(e)?{colors:e.colors,columns:this.props.columns||e.columns||10}:{colors:[],columns:0}}return{colors:this.props.palette||[],columns:this.props.columns||10}},t.prototype.renderRows=function(e,t,n){var o=this;return e.map((function(e,i){return r.createElement("tr",{role:"row",key:i},o.renderColumns(e,i,t,n))}))},t.prototype.renderColumns=function(e,t,n,o){var a=this,s=void 0!==n&&n.row===t,l=n&&n.col,u=void 0!==o&&o.row===t,c=o&&o.col,p="number"!==typeof this.props.tileSize?this.props.tileSize:{width:this.props.tileSize,height:this.props.tileSize},d=p.width+"px",h=p.height+"px";return e.map((function(e,n){var o=s&&l===n,p=Object(i.d)("k-item",{"k-state-selected":o,"k-state-focused":u&&c===n});return r.createElement("td",{className:p,"aria-label":e,"aria-selected":!!o||!!a.props.disabled&&void 0,style:{backgroundColor:e,width:d,height:h,minWidth:d},onClick:function(t){return a.onColorClick(e,t)},id:a.createCellId({row:t,col:n}),key:n})}))},t.prototype.createCellId=function(e){return this.guid+"_"+e.row+"_"+e.col},t.propTypes={palette:o.oneOfType([o.arrayOf(o.string),o.string]),columns:o.number,tileSize:o.any,defaultValue:o.string,value:o.string,disabled:o.bool,tabIndex:o.number,onChange:o.func,id:o.string,ariaLabelledBy:o.string,ariaDescribedBy:o.string},t.defaultProps={palette:"office",tileSize:24},t}(r.Component),E=n(14),P=function(){return(P=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=this.input.length},e.prototype.next=function(){return{char:this.input[this.inputCursor++],control:this.control[this.controlCursor++]}},e.prototype.peek=function(){return{char:this.input[this.inputCursor],control:this.control[this.controlCursor]}},e.prototype.eat_input=function(){this.inputCursor++},e.prototype.eat_control=function(){this.controlCursor++},e.prototype.eat=function(){this.inputCursor++,this.controlCursor++},e}(),G=function(e){return(e||"").split("")},K=function(){function e(e){this.parse=e}return e.prototype.run=function(e,t){return void 0===t&&(t=""),e instanceof Z?this.parse(e):this.parse(new Z(G(e),G(t)))},e.prototype.map=function(t){var n=this;return new e((function(e){return n.parse(e).map(t)}))},e.prototype.chain=function(t){var n=this;return new e((function(e){return n.parse(e).chain((function(e,n){return t(e).run(n)}))}))},e.prototype.isLiteral=function(e){return this.run(e).type===j.Literal},e}(),q=function(e,t){return new K((function(n){var r=n.next().char,o=e[r];return"\\"===r?(r=n.next().char,new V(t.literal(r),n)):new V(o?t.mask(o):t.literal(r),n)}))},W=function(e){var t=e.prompt,n=e.promptPlaceholder;return new K((function(e){var r=e.next().char;return new V(r===t?n:r,e)}))},Y=function(e){return new K((function(t){var n=t.next().char;return new V(e?n:"",t)}))},$=function(e){return e.reduce((function(e,t){return n=t,e.chain((function(e){return n.map((function(t){return e.concat([t])}))}));var n}),(t=[],new K((function(e){return new V(t,e)}))));var t},X=function(e){return new K((function(t){for(var n=new V([],t);!t.eof();)n=n.concat(e.run(t));return n}))},J=function(){function e(){this.rules={},this.prompt="_",this.mask="",this.promptPlaceholder=" ",this.includeLiterals=!1,this.maskTokens=[],this.unmaskTokens=[],this.rawTokens=[],this.validationTokens=[]}return e.prototype.update=function(e){var t=e.mask,n=void 0===t?"":t,r=e.prompt,o=void 0===r?"":r,i=e.promptPlaceholder,a=void 0===i?" ":i,s=e.rules,l=void 0===s?{}:s,u=e.includeLiterals,c=void 0!==u&&u;this.mask=n,this.prompt=o,this.promptPlaceholder=a,this.rules=l,this.includeLiterals=c,this.tokenize()},e.prototype.validationValue=function(e){void 0===e&&(e="");var t=e;return $(this.validationTokens).run(e).fold((function(e){t=e.join("")})),t},e.prototype.rawValue=function(e){void 0===e&&(e="");var t=e;return this.rawTokens.length?($(this.rawTokens).run(e).fold((function(e){t=e.join("")})),t):t},e.prototype.maskRaw=function(e){void 0===e&&(e="");var t=e;return this.maskTokens.length?($(this.maskTokens).run(e).fold((function(e){t=e.join("")})),t):t},e.prototype.maskInput=function(e,t,n){return e.length1||e<1||1===e?void 0!==n&&void 0!==t&&nn&&(e=n),void 0!==t&&er)n.selectionStart=n.selectionEnd=r;else{n.selectionStart>e.length&&(n.selectionStart=n.selectionEnd=e.length);var o=function(e,t){var n=t.findIndex((function(t){var n=t[0];t[1];return Boolean(n)&&0===e.indexOf(n)}));return-1===n?-1:t[n][0].length}(e,t);-1!==o&&n.selectionStart-1?n:be(e,ie)},ge=function(e){return e.split("").reverse().join("")},be=function(e,t){return e.length-ge(e).search(t)},we=function(e){return e.split(e[e.search(ie)])[0]},xe=function(e){var t=ge(e);return ge(t.split(t[t.search(ie)])[0])},ke=function(e,t){return e.search(t)},_e=function(e,t){var n=e.indexOf(t);return n>-1?e.length-n-1:0},Ce=function(e,t,n,r,o){var i="0"===e.replace(o,"")[0],a="0"===t.replace(o,"")[0];if(i&&!a)return n-1;if(a&&r)return n+1;for(var s=0,l=0;l0&&t.length>u;)ie.test(t.charAt(u))&&s--,u++;return u},Se=function(e,t,n){var r=oe({},e),o=r.prevLooseValue,i=n.numberSymbols(),a=function(e,t){var n=t.formatNumber(1111111.1111111,e),r=t.formatNumber(-1111111.1111111,e),o=t.formatNumber(0,e),i=t.formatNumber(1,e),a=t.numberSymbols(),s=new RegExp("[\\d\\"+a.decimal+a.group+"]","g");return[n,r,o,i].map((function(e){return e.replace(s,"")})).join("").split("").filter((function(e,t,n){return n.indexOf(e)===t})).join("")}(t,n),s=String(r.currentLooseValue),l=String(o),u=new RegExp("[^\\d\\"+i.decimal+"]","g"),c=new RegExp("[^\\d\\"+i.decimal+"\\"+i.group+"]","g"),p=new RegExp("[\\d\\"+i.decimal+"\\"+i.group+"]"),d=s.replace(u,""),h=ke(s,ie),f=-1===h?-1:be(s,ie),m=s.indexOf(i.decimal),y=(s.substring(0,h)+s.substring(h,f).replace(c,"")+s.substring(f,s.length)).split("").filter((function(e){return-1!==a.indexOf(e)||-1!==e.search(p)})).join(""),v=n.formatNumber(.31111111111111117,t).replace(u,""),g=v.indexOf(i.decimal),b=g>-1?v.length-g-1:0,w=n.formatNumber(1,t).replace(u,""),x=w.indexOf(i.decimal),k=x>-1?w.length-x-1:0,_=function(e,t){var n=t.formatNumber(1111111.1111111,e),r=t.formatNumber(-1111111.1111111,e),o=t.formatNumber(0,e),i=t.formatNumber(1,e),a=we(n),s=we(r),l=we(o),u=we(i);return{positiveInfo:[a,xe(n)],negativeInfo:[s,xe(r)],zeroInfo:[l,xe(o)],oneInfo:[u,xe(i)]}}(t,n),C=[_.positiveInfo,_.negativeInfo,_.zeroInfo,_.oneInfo],S=1!==C.findIndex((function(e){return-1!==e.findIndex((function(e){return Boolean(e)}))})),N=s.length>0&&s.length0){var P=be(E,ie);r.currentLooseValue=E.substring(0,P)+i.decimal+E.substring(P)}else r.currentLooseValue=E;return me(r,ve(r.currentLooseValue,i)+1,r.currentLooseValue,C),r}if(function(e,t){return String(e.currentLooseValue).split(t.decimal).length>2}(r,i))return ye(r,t,C,n),r;if("p"===t&&s&&-1===s.indexOf(i.percentSign))return r.eventValue=n.parseNumber(s,t)/100,r.currentLooseValue=se(r.eventValue,t,n),r;if(String(r.currentLooseValue).replace(/[^\d]/g,"").length>15)return ye(r,t,C,n),r;if(d!==s&&s&&S)if(-1===C.findIndex((function(e){var t=e[0],n=e[1],r=s.indexOf(t),o=s.indexOf(n),a=0===r,l=o===s.length-n.length,u=r+t.length!==h&&-1!==h&&s[r+t.length]!==i.decimal,c=o!==f&&-1!==f&&s[o-1]!==i.decimal;return t&&n?!u&&!c&&(a&&l):t?!u&&a:!!n&&(!c&&l)})))return ye(r,t,C,n),r;if(d[d.length-1]===i.decimal&&b>0)return r.eventValue=n.parseNumber(s,t),r.currentLooseValue=y,r;if(r.currentLooseValue&&o)if((a+i.decimal+i.group).split("").findIndex((function(e){return s.split("").filter((function(t){return t===e})).length-1)return r.eventValue=n.parseNumber(e.prevLooseValue,t),r.currentLooseValue=e.prevLooseValue,r;var D=_e(d,i.decimal),A="0"===d[d.length-1];if(N&&A&&D0){var I=s.substring(0,m);if(A&&(!I||0!==l.indexOf(I))){r.eventValue=n.parseNumber(r.currentLooseValue,t);var L=se(r.eventValue,t,n);return me(r,Ce(s,L,r.selectionEnd,N,u),L,C),r.currentLooseValue=L,r}if(D>b){var R=s.indexOf(i.decimal),j=s.substring(0,R)+s.substring(R,R+1+b)+s.substring(f,String(r.currentLooseValue).length);return r.eventValue=n.parseNumber(j,t),r.currentLooseValue=j,me(r,r.selectionStart,j,C),r}if(k!==b&&D<=b&&A)return r.eventValue=n.parseNumber(r.currentLooseValue,t),r.currentLooseValue=y,r;if(Dn.selectionStart&&n.selectionEnd-n.selectionStart===String(n.currentLooseValue).length)){switch(t.keyCode){case 38:pe(r,n,e.step,e.min,e.max,e.format,a);break;case 40:de(r,n,e.step,e.min,e.max,e.format,a);break;case 13:if(!1===e.rangeOnEnter)return;var o=se(he(r,e.min,e.max),e.format,a),i=he(a.parseNumber(o,e.format),e.min,e.max);n.eventValue=i,n.currentLooseValue=se(i,e.format,a),n.selectionStart=n.selectionEnd=n.currentLooseValue.length;break;case 110:var s=l.current,u=a.numberSymbols();s&&(n.currentLooseValue=n.currentLooseValue.slice(0,n.selectionStart)+u.decimal+n.currentLooseValue.slice(n.selectionEnd),n.selectionStart=n.selectionEnd=n.selectionStart+1,n=Se(n,e.format,a));break;default:return}t.preventDefault(),E(t,n)}}),[e.format,e.min,e.max,e.step,e.onChange,e.rangeOnEnter,E,T]),A=r.useCallback((function(){m.current=!0}),[]),I=r.useCallback((function(t){var n=T();pe(a.parseNumber(String(n.currentLooseValue),e.format),n,e.step,e.min,e.max,e.format,a),E(t,n)}),[e.format,e.min,e.max,e.step,e.onChange,E,T]),L=r.useCallback((function(t){var n=T();de(a.parseNumber(String(n.currentLooseValue),e.format),n,e.step,e.min,e.max,e.format,a),E(t,n)}),[e.format,e.min,e.max,e.step,e.onChange,E,T]),R=r.useCallback((function(e){document&&document.activeElement===l.current&&l.current&&(e.nativeEvent.deltaY<0&&I(e),e.nativeEvent.deltaY>0&&L(e))}),[I,L]),j=r.useCallback((function(t){f.current.currentLooseValue=y.current,f.current.focused=!0,Object(i.h)(e.onFocus,t,M(),{}),h((function(e){return!e}))}),[e.onFocus,h,M]),z=r.useCallback((function(t){f.current={eventValue:null,prevLooseValue:"",currentLooseValue:"",focused:!1,selectionStart:void 0,selectionEnd:void 0,decimalSelect:!1,valueIsCorrected:!1,valueIsOutOfRange:!1},Object(i.h)(e.onBlur,t,M(),{}),h((function(e){return!e}))}),[e.onBlur,h,M]),B=r.useCallback((function(e){document&&l.current&&(e.preventDefault(),document.activeElement!==l.current&&l.current.focus())}),[]);r.useLayoutEffect((function(){l.current&&void 0!==f.current.selectionStart&&void 0!==f.current.selectionEnd&&(l.current.selectionStart=f.current.selectionStart,l.current.selectionEnd=f.current.selectionEnd,f.current.selectionStart=void 0,f.current.selectionEnd=void 0)}),[d]);var U=!N()||S().valid,H=r.createElement("span",{dir:e.dir,style:e.label?void 0:{width:e.width},className:"k-widget k-numerictextbox"+(e.className?" "+e.className:""),"aria-disabled":e.disabled?"true":void 0},r.createElement("span",{className:Object(i.d)("k-numeric-wrap",{"k-state-disabled":e.disabled,"k-state-invalid":!U}),ref:u},r.createElement("input",{value:null===w?"":w,tabIndex:Object(i.j)(e.tabIndex,e.disabled),accessKey:e.accessKey,disabled:e.disabled,title:e.title,"aria-valuemin":e.min,"aria-valuemax":e.max,"aria-labelledby":e.ariaLabelledBy,"aria-describedby":e.ariaDescribedBy,placeholder:e.placeholder,spellCheck:!1,autoComplete:"off",autoCorrect:"off",type:e.inputType||"tel",className:"k-input k-formatted-value",id:o,name:e.name,onChange:P,onFocus:j,onBlur:z,onKeyDown:D,onPaste:A,onWheel:R,ref:l}),e.children,e.spinners&&r.createElement("span",{className:"k-select",onMouseDown:B},r.createElement("span",{className:"k-link k-link-increase","aria-label":s.toLanguageString("numerictextbox.increment",b["numerictextbox.increment"]),title:s.toLanguageString("numerictextbox.increment",b["numerictextbox.increment"]),onClick:I},r.createElement("span",{className:"k-icon k-i-arrow-n"})),r.createElement("span",{className:"k-link k-link-decrease","aria-label":s.toLanguageString("numerictextbox.decrement",b["numerictextbox.decrement"]),title:s.toLanguageString("numerictextbox.decrement",b["numerictextbox.decrement"]),onClick:L},r.createElement("span",{className:"k-icon k-i-arrow-s"})))));return e.label?r.createElement(F.b,{label:e.label,editorId:o,editorValue:null===w?"":w,editorValid:U,editorDisabled:e.disabled,editorPlaceholder:e.placeholder,children:H,style:{width:e.width},dir:e.dir}):H}));Ne.propTypes={value:o.number,defaultValue:o.number,step:o.number,format:o.oneOfType([o.string,o.shape({style:o.oneOf(["decimal","currency","percent","scientific","accounting"]),currency:o.string,currencyDisplay:o.oneOf(["symbol","code","name"]),useGrouping:o.bool,minimumIntegerDigits:o.number,minimumFractionDigits:o.number,maximumFractionDigits:o.number})]),width:o.oneOfType([o.string,o.number]),tabIndex:o.number,accessKey:o.string,title:o.string,placeholder:o.string,min:o.number,max:o.number,spinners:o.bool,disabled:o.bool,dir:o.string,name:o.string,label:o.string,validationMessage:o.string,required:o.bool,id:o.string,rangeOnEnter:o.bool,ariaLabelledBy:o.string,ariaDescribedBy:o.string,onChange:o.func,onFocus:o.func,onBlur:o.func},Ne.displayName="KendoNumericTextBox",Ne.defaultProps={step:1,spinners:!0,disabled:!1,required:!1,validityStyles:!0,rangeOnEnter:!0,onChange:function(e){},onFocus:function(e){},onBlur:function(e){}};var Oe=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Me=function(){return(Me=Object.assign||function(e){for(var t,n=1,r=arguments.length;nr-o?r-o:e},o.toggle=function(e,t){o.setState({checked:e}),o.valueDuringOnChange=e,Object(i.h)(o.props.onChange,t,o,{value:e}),o.valueDuringOnChange=void 0},o._id=Object(i.l)(),o.defaultValidationMessage=Object(g.f)(o),o.focus=function(){o._element&&o._element.focus()},o.dummyInput=function(e){return r.createElement("input",{type:"checkbox",checked:o.props.checked,ref:function(e){o._input=e},tabIndex:-1,"aria-hidden":!0,value:e,style:{opacity:0,width:1,border:0,zIndex:-1,position:"absolute",left:"50%"},onChange:i.m})},o.handleClick=function(e){o.toggle(!o.value,e)},o.handleKeyDown=function(e){if(!o.props.disabled){var t=e.keyCode;t!==i.b.space&&t!==i.b.enter||o.toggle(!o.value,e)}},o.handleWrapperFocus=function(e){if(!o.props.disabled){o.setState({focused:!0});var t=o.props.onFocus;t&&t.call(void 0,e)}},o.handleWrapperBlur=function(e){if(!o.props.disabled){o.setState({focused:!1});var t=o.props.onBlur;t&&t.call(void 0,e)}},o.state={checked:n.defaultChecked||t.defaultProps.defaultChecked,focused:!1},o}return De(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return void 0!==this.valueDuringOnChange?this.valueDuringOnChange:void 0!==this.props.checked?this.props.checked:this.state.checked},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this._element},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"actionElement",{get:function(){return this._wrapper},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this.props.name},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"validity",{get:function(){var e=void 0!==this.props.validationMessage,t=void 0!==this.props.valid?this.props.valid:!this.props.required||!!this.value;return{customError:e,valid:void 0!==this.props.valid?this.props.valid:t,valueMissing:null===this.value}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"validityStyles",{get:function(){return void 0!==this.props.validityStyles?this.props.validityStyles:t.defaultProps.validityStyles},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"required",{get:function(){return void 0!==this.props.required?this.props.required:t.defaultProps.required},enumerable:!0,configurable:!0}),t.prototype.componentDidMount=function(){this.setValidity(),this.forceUpdate()},t.prototype.componentDidUpdate=function(){this.setValidity()},t.prototype.render=function(){var e=this,t=this.state.focused,n=this.props,o=n.dir,a=n.disabled,s=n.id,l=n.offLabel,u=n.onLabel,c=n.tabIndex;this.dir=o||this._wrapper&&getComputedStyle(this._wrapper).direction||void 0;var p=!this.validityStyles||this.validity.valid,d=Object(i.d)({"k-widget":!0,"k-switch":!0,"k-switch-on":this.value,"k-switch-off":!this.value,"k-state-focused":t,"k-state-disabled":a,"k-state-invalid":!p},this.props.className),h={"aria-checked":this.value,"aria-disabled":a||void 0};return r.createElement("span",{ref:function(t){e._wrapper=t},className:d,dir:this.dir,onKeyDown:this.handleKeyDown,onClick:this.handleClick,onBlur:this.handleWrapperBlur,onFocus:this.handleWrapperFocus},r.createElement("span",Ae({className:"k-switch-container",id:s||this._id,role:"switch"},h,{"aria-labelledby":this.props.ariaLabelledBy,"aria-describedby":this.props.ariaDescribedBy,ref:function(t){e._element=t},tabIndex:Object(i.j)(c,a,void 0),accessKey:this.props.accessKey}),this.dummyInput(this.value),r.createElement("span",{className:"k-switch-label-on"},u),r.createElement("span",{className:"k-switch-label-off"},l),r.createElement("span",{className:"k-switch-handle"})))},t.propTypes={accessKey:o.string,checked:o.bool,className:o.string,disabled:o.bool,defaultChecked:o.bool,dir:o.string,id:o.string,ariaLabelledBy:o.string,ariaDescribedBy:o.string,offLabel:o.string,required:o.bool,tabIndex:o.number,valid:o.bool,validate:o.bool,validationMessage:o.string,onBlur:o.any,onChange:o.any,onFocus:o.any,onLabel:o.string},t.defaultProps={disabled:!1,defaultChecked:!1,offLabel:"OFF",onBlur:i.m,onFocus:i.m,onLabel:"ON",required:!1,validityStyles:!0},t}(r.Component),Le=function(){return(Le=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&(r.width-=w()),r}var k=function(e){if(!e.getBoundingClientRect){var t=x(e);return{bottom:t.height,left:0,right:t.width,top:0}}var n=e.getBoundingClientRect();return{bottom:n.bottom,left:n.left,right:n.right,top:n.top}},_=function(e){for(var t=e.offsetParent;t&&"static"===t.style.position;)t=t.offsetParent;return t||g(e)},C=function(e){return _(e)===e.ownerDocument.body},S=function(e){var t=e.getBoundingClientRect(),n=t.left,r=t.top;return t.height||t.width||(t=function(e){var t=e.style,n=t.display,r=t.left,o=t.position;e.style.display="",e.style.left="-10000px",e.style.position="absolute";var i=e.getBoundingClientRect();return e.style.display=n,e.style.left=r,e.style.position=o,i}(e)),{top:r,left:n,height:t.height,width:t.width}},N=function(e,t){for(var n=[],r=e.parentNode;r&&(n.push(r),r!==t);)r=r.parentNode;return n};function O(e){var t=g(e),n=v(e);return{x:n.pageXOffset||t.scrollLeft||0,y:n.pageYOffset||t.scrollTop||0}}var M=function(e){return e===(e.ownerDocument||{}).body?O(e):{x:e.scrollLeft,y:e.scrollTop}};var T=function(e,t){var n=v(e),r=n.getComputedStyle(e),o=S(e),i=t||_(e),a=e.ownerDocument,s=i!==a.body&&i!==a.documentElement,l={top:0,left:0};if("fixed"!==r.position&&s){var u=n.getComputedStyle(i);(l=S(i)).top+=parseInt(u.borderTopWidth,10),l.left+=parseInt(u.borderLeftWidth,10)}return{top:o.top-l.top,left:o.left-l.left,height:o.height,width:o.width}},E=function(e,t){return e?M(e):function(e){var t=_(e);return t?M(t):{x:0,y:0}}(t)};var P="fit",D="flip",A=function(e,t,n){var r=0;return e+t>n&&(r=n-(e+t)),e<0&&(r=-e),r},I=function(e){var t=e.offset,n=e.size,r=e.anchorSize,o=e.viewPortSize,i=e.anchorAlignPoint,a=e.elementAlignPoint,s=0,l=2*e.margin;if(a!==i&&!(a===c||a===p)&&!(i===c||i===p)){var u=i===f||i===d;t<0&&u?t+(s=n+r+l)+n>o&&(s=0):t>=0&&!u&&(t+n>o&&(s+=-(r+n+l)),t+s<0&&(s=0))}return s},L=function(e){var t=e.anchorRect,n=e.anchorAlign,r=e.elementRect,o=e.elementAlign,i=e.collisions,a=e.viewPort,s=e.margin;void 0===s&&(s={});var l=r.top,u=r.left,c=r.height,p=r.width,d=a.height,h=a.width,f=s.horizontal||0,m=s.vertical||0,y=0,v=0,g=i.horizontal===D,b=i.vertical===D;i.vertical===P&&(v+=A(l,c,d)),i.horizontal===P&&(y+=A(u,p,h)),b&&(v+=I({margin:m,offset:l,size:c,anchorSize:t.height,viewPortSize:d,anchorAlignPoint:n.vertical,elementAlignPoint:o.vertical})),g&&(y+=I({margin:f,offset:u,size:p,anchorSize:t.width,viewPortSize:h,anchorAlignPoint:n.horizontal,elementAlignPoint:o.horizontal}));var w=g&&0!==y,x=b&&0!==v;return{flipped:w||x,flip:{horizontal:w,vertical:x},offset:{left:y,top:v}}},R=function(e){for(var t=[],n=e.parentNode.firstElementChild;n;)n!==e&&t.push(n),n=n.nextElementSibling;return t},j=function(e,t){for(var n,r,o=N(e),i=t;i&&(n=R(i),!(r=o.reduce((function(e,t){return e.concat(n.filter((function(e){return e===t})))}),[])[0]));)i=i.parentElement;return r},F=function(e,t){return e||{height:0,left:t.left,top:t.top,width:0}},z=/auto|scroll/,B=function(e){var t=window.getComputedStyle(e);return""+t.overflow+t.overflowX+t.overflowY},U=function(){if(!l.c||!document.body)return!1;var e=document.createElement("div");e.style.transform="matrix(10, 0, 0, 10, 0, 0)",e.innerHTML='
child
',document.body.appendChild(e);var t=10!==e.children[0].getBoundingClientRect().top;return document.body.removeChild(e),t}(),H="fit",V="flip",Z="left",G="center",K="right",q="bottom",W="top",Y=function(){function e(e){this._dom=e}return e.prototype.alignElement=function(e){var t=e.anchor,n=e.element,r=e.anchorAlign,o=e.elementAlign,i=e.offset,a=!this._dom.hasOffsetParent(n)?this.absoluteRect(t,n,i):this.relativeRect(t,n,i);return this._dom.align({anchorAlign:r,anchorRect:a,elementAlign:o,elementRect:this._dom.offset(n)})},e.prototype.absoluteRect=function(e,t,n){var r=this._dom,o=function(e,t){return t?{height:e.height,left:e.left-t.left,top:e.top-t.top,width:e.width}:e}(F(r.offset(e),n),r.stackingElementOffset(t)),i=r.stackingElementScroll(t),a=r.addScroll(o,i),s=this.elementScrollPosition(e,t),l=r.removeScroll(a,s);return l.left+=window.scrollX||window.pageXOffset,l.top+=window.scrollY||window.pageYOffset,l},e.prototype.elementScrollPosition=function(e,t){return e?{x:0,y:0}:this._dom.scrollPosition(t)},e.prototype.relativeRect=function(e,t,n){return F(this._dom.position(e,t),n)},e}(),$=function(){function e(){}return e.prototype.addOffset=function(e,t){return{left:e.left+t.left,top:e.top+t.top}},e.prototype.align=function(e){return m(e)},e.prototype.boundingOffset=function(e){return k(e)},e.prototype.getWindow=function(){return l.c?window:null},e.prototype.isBodyOffset=function(e){return C(e)},e.prototype.hasOffsetParent=function(e){if(!e)return!1;var t=e.offsetParent;return t&&!("BODY"===t.nodeName&&"static"===window.getComputedStyle(t).position)},e.prototype.offset=function(e){return e?S(e):null},e.prototype.staticOffset=function(e){if(!e)return null;var t=e.style,n=t.left,r=t.top;e.style.left="0px",e.style.top="0px";var o=S(e);return e.style.left=n,e.style.top=r,o},e.prototype.position=function(e,t){return e&&t?function(e,t,n){void 0===n&&(n=1);var r=t?_(t):null,o=T(e,r),i=o.top,a=o.left,s=o.height,l=o.width,u=E(r,e),c=u.x,p=u.y,d=e.ownerDocument,h=r===d.body||r===d.documentElement?1:n;return{top:i+p*h,left:a+c*h,height:s,width:l}}(e,j(e,t)):null},e.prototype.relativeOffset=function(e,t){return function(e,t,n){var r=e.top,o=e.left;return n&&(o=0,r=0),{top:r+t.top,left:o+t.left,height:e.height,width:e.width}}(this.offset(e),t,this.isBodyOffset(e))},e.prototype.addScroll=function(e,t){return function(e,t){return{top:e.top+t.y,left:e.left+t.x,height:e.height,width:e.width}}(e,t)},e.prototype.removeScroll=function(e,t){return function(e,t){return{top:e.top-t.y,left:e.left-t.x,height:e.height,width:e.width}}(e,t)},e.prototype.restrictToView=function(e){return L(e)},e.prototype.scrollPosition=function(e){return O(e)},e.prototype.scrollableParents=function(e){return function(e){var t=[];if(!l.c)return t;for(var n=e.parentElement;n;)z.test(B(n))&&t.push(n),n=n.parentElement;return t.push(window),t}(e)},e.prototype.stackingElementOffset=function(e){var t=this.getRelativeContextElement(e);return t?S(t):null},e.prototype.stackingElementScroll=function(e){var t=this.getRelativeContextElement(e);return t?{x:t.scrollLeft,y:t.scrollTop}:{x:0,y:0}},e.prototype.stackingElementViewPort=function(e){var t=this.getRelativeContextElement(e);return t?{height:t.scrollHeight,width:t.scrollWidth}:null},e.prototype.getRelativeContextElement=function(e){if(!e||!U)return null;for(var t=e.parentElement;t;){if("none"!==window.getComputedStyle(t).transform)return t;t=t.parentElement}return null},e.prototype.useRelativePosition=function(e){return!!this.getRelativeContextElement(e)},e.prototype.windowViewPort=function(e){return x(e)},e.prototype.zIndex=function(e,t){return function(e,t){if(!e||!l.c)return null;var n=j(e,t);if(!n)return null;var r=[e].concat(N(e,n)).reduce((function(e,t){var n=t.style.zIndex||window.getComputedStyle(t).zIndex,r=parseInt(n,10);return r>e?r:e}),0);return r?r+1:null}(e,t)},e.prototype.zoomLevel=function(){return l.c?parseFloat((document.documentElement.clientWidth/window.innerWidth).toFixed(2)):1},e.prototype.isZoomed=function(){return this.zoomLevel()>1},e}(),X=function(){function e(e){this._dom=e}return e.prototype.positionElement=function(e){var t,n,r=e.anchor,o=e.currentLocation,i=e.element,a=e.anchorAlign,s=e.elementAlign,l=e.collisions,u=this._dom,c=e.viewPort||u.stackingElementViewPort(i)||u.windowViewPort(i),p=F(u.offset(r),o),d=(t=u.staticOffset(i),(n=o)?{height:t.height,left:n.left,top:n.top,width:t.width}:t),h=this.elementRect(i,d),f=u.restrictToView({anchorAlign:a,anchorRect:p,collisions:l,elementAlign:s,elementRect:h,viewPort:c});return{flipped:f.flipped,offset:u.addOffset(d,f.offset)}},e.prototype.elementRect=function(e,t){return this._dom.removeScroll(t,this._dom.scrollPosition(e))},e}(),J=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Q=function(){return(Q=Object.assign||function(e){for(var t,n=1,r=arguments.length;nt?(r&&(clearTimeout(r),r=null),s=u,a=e.apply(o,i),r||(o=i=null)):r||!1===n.trailing||(r=setTimeout(l,c)),a}}(n.reposition.bind(n),1e3/60),n}return J(t,e),t.prototype.componentDidUpdate=function(){this._prevShow=this.props.show},t.prototype.componentWillUnmount=function(){this.detachRepositionHandlers()},t.prototype.render=function(){var e=this.props,t=e.children,n=e.className,i=e.popupClass,a=e.show,u=e.id,c=e.appendTo,p=void 0===c?l.c?document.body:void 0:c;if(a){var d=this.calculatePosition(this.props,p);this._offset=d.offset,this._flipped=!!d.flipped}var h=this._flipped&&a?"up":"down",f=this.transitionDuration,m=f.transitionEnterDuration,y=f.transitionExitDuration,v=Object.assign({},{position:"absolute"},this.props.style||{},Q({},this._offset));if(this._exitingAnimation=this._exitingAnimation||this._prevShow&&!a,(a||this._exitingAnimation)&&p){var g=r.createElement(s.c,{componentChildClassName:Object(l.d)(i,"k-popup"),className:Object(l.d)(n),id:u,onEntered:this.onOpened,onExiting:this.onClosing,onExited:this.onClosed,direction:h,style:v,transitionEnterDuration:m,transitionExitDuration:y,appear:!0},a?t:null);return o.createPortal(g,p)}return null},Object.defineProperty(t.prototype,"transitionDuration",{get:function(){var e=this.props.animate,t=0,n=0;return e&&(!0===e?t=n=void 0:(t=e.openDuration,n=e.closeDuration)),{transitionEnterDuration:t,transitionExitDuration:n}},enumerable:!0,configurable:!0}),t.prototype.calculatePosition=function(e,t){if(!t||!l.c)return{flipped:!1,offset:e.offset};var n=document.createElement("div");t.appendChild(n);var o=Object.assign({},e.style||{},Q({visibility:"hidden"},ee)),i={className:Object(l.d)(e.popupClass,"k-popup","k-child-animation-container")},s=r.createElement("div",{className:Object(l.d)("k-animation-container","k-animation-container-shown",e.className),style:o},r.Children.map(e.children,(function(e,t){return r.createElement("div",Q({key:t},i),e)})));n.innerHTML=a.renderToStaticMarkup(s);var u=this.position(e,n.firstChild,e.anchor);return n.parentNode.removeChild(n),u},t.prototype.attachRepositionHandlers=function(e){var t=this;this.detachRepositionHandlers(),this._scrollableParents=this._domService.scrollableParents(this.props.anchor||e),this._scrollableParents.map((function(e){return e.addEventListener("scroll",t.reposition)})),window.addEventListener("resize",this.reposition)},t.prototype.detachRepositionHandlers=function(){var e=this;this._scrollableParents&&(this._scrollableParents.map((function(t){return t.removeEventListener("scroll",e.reposition)})),this._scrollableParents=void 0),window.removeEventListener("resize",this.reposition)},t.prototype.reposition=function(){this.forceUpdate()},t.propTypes={anchor:function(e){var t=e.anchor;if(t&&"number"!==typeof t.nodeType)return new Error("Invalid prop `anchor` supplied to `Kendo React Popup`. Validation failed.")},appendTo:function(e){var t=e.appendTo;if(t&&"number"!==typeof t.nodeType)return new Error("Invalid prop `appendTo` supplied to `Kendo React Popup`. Validation failed.")},className:i.string,id:i.string,popupClass:i.string,collision:i.shape({horizontal:i.oneOf([H,V]),vertical:i.oneOf([H,V])}),anchorAlign:i.shape({horizontal:i.oneOf([Z,G,K]),vertical:i.oneOf([W,G,q])}),popupAlign:i.shape({horizontal:i.oneOf([Z,G,K]),vertical:i.oneOf([W,G,q])}),offset:i.shape({left:i.number,top:i.number}),children:i.oneOfType([i.element,i.node]),show:i.bool,animate:i.oneOfType([i.bool,i.shape({openDuration:i.number,closeDuration:i.number})])},t.defaultProps={collision:{horizontal:H,vertical:V},anchorAlign:{horizontal:Z,vertical:q},popupAlign:{horizontal:Z,vertical:W},offset:ee,animate:!0,show:!1},t}(r.Component)},function(e,t,n){"use strict";n.d(t,"a",(function(){return It})),n.d(t,"b",(function(){return mn})),n.d(t,"c",(function(){return gr})),n.d(t,"d",(function(){return Sr}));var r,o=n(0),i=n(1),a=n(2),s=function(e){return e?new Date(e.getTime()):null},l=function(e,t){var n=s(e);return 0===t&&23===n.getHours()&&n.setHours(n.getHours()+2),n},u=function(e,t){var n=s(e);return n.setDate(n.getDate()+t),l(n,e.getHours())},c=function(e,t,n,r,o,i,a){void 0===r&&(r=0),void 0===o&&(o=0),void 0===i&&(i=0),void 0===a&&(a=0);var s=new Date(e,t,n,r,o,i,a);return e>-1&&e<100&&s.setFullYear(s.getFullYear()-1900),l(s,r)},p=function(e){var t=c(e.getFullYear(),e.getMonth()+1,1,e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds());return u(t,-1)},d=function(e,t){var n=s(e),r=(12+(n.getMonth()+t)%12)%12;return n.setMonth(n.getMonth()+t),function(e,t){return e.getMonth()!==t?p(d(e,-1)):e}(l(n,e.getHours()),r)},h=function(e,t){return u(e,7*t)},f=function(e,t){var n=e.getMonth(),r=c(t,n,e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds());return r.getMonth()===n?r:p(d(r,-1))},m=function(e,t){return l(f(e,e.getFullYear()+t),e.getHours())},y=function(e,t){return m(e,10*t)},v=function(e,t){return m(e,100*t)};!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(r||(r={}));var g,b=function(e,t,n){void 0===n&&(n=r.Forward);var o=s(e),i=(t-o.getDay()+7*n)%7;return o.setDate(o.getDate()+i),l(o,e.getHours())};!function(e){e[e.Sunday=0]="Sunday",e[e.Monday=1]="Monday",e[e.Tuesday=2]="Tuesday",e[e.Wednesday=3]="Wednesday",e[e.Thursday=4]="Thursday",e[e.Friday=5]="Friday",e[e.Saturday=6]="Saturday"}(g||(g={}));var w,x,k,_,C=function(e,t){return 12*(t.getFullYear()-e.getFullYear())+(t.getMonth()-e.getMonth())},S=function(e,t){return t.getFullYear()-e.getFullYear()},N=function(e,t){return f(e,t(e.getFullYear()))},O=function(e){return N(e,(function(e){return e-e%10}))},M=function(e,t){return(O(t).getFullYear()-O(e).getFullYear())/10},T=function(e){return N(e,(function(e){return e-e%100}))},E=function(e,t){return(T(t).getFullYear()-T(e).getFullYear())/100},P=function(e){return c(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0)},D=function(e){return c(e.getFullYear(),e.getMonth(),1,e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())},A=function(e,t){var n=e.getDate(),r=c(e.getFullYear(),t,n,e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds());return r.getDate()===n?r:p(d(r,-1))},I=function(e){return A(e,0)},L=function(e,t){return!e&&!t||e&&t&&e.getTime()===t.getTime()},R=function(e,t){return!e&&!t||e&&t&&L(P(e),P(t))},j=function(e){return A(e,11)},F=function(e){return N(e,(function(e){return e-e%10+9}))},z=function(e){return N(e,(function(e){return e-e%100+90}))},B=function(e,t){return t!==g.Monday?u(function(e,t){return b(e,t,r.Backward)}(e,t),4):u(e,4-(e.getDay()||7))},U=function(e,t){var n=c(e.getFullYear(),0,1,-6),r=B(e,t).getTime()-n.getTime(),o=Math.floor(r/864e5);return 1+Math.floor(o/7)},H=n(4),V=function(){function e(e,t,n){void 0===e&&(e=0),this.total=e,this.rowHeight=t,this.detailRowHeight=n,this.offsets=[],this.heights=[];for(var r=0,o=0;othis.rowHeight&&this.updateRowHeight(e,-1*this.detailRowHeight)},e.prototype.index=function(e){for(var t=0;t=i;this.lastScrollTop=i;var l=this.rowHeightService.index(Z(i-this.topOffset)),u=this.rowHeightService.index(Z(i+a-this.bottomOffset));if(!s&&u>=this.lastLoaded&&this.lastLoadede}},k),ee=function(e){function t(n){var r=e.call(this,n)||this;return r.animationInProgress=!1,r.scrollTo=function(e){var t="vertical"===r.direction?"scrollTop":"scrollLeft";r.scrollContainer&&(r.scrollContainer[t]=e)},r.scrollToIndex=function(e){r.rowHeightService&&(r.animationInProgress=!1,r.scrollTo(r.rowHeightService.offset(e)))},r.animateToIndex=function(e){if(r.rowHeightService&&window){window.cancelAnimationFrame(r.cancelAnimation);var t=r.rowHeightService.offset(e),n=r.getContainerScrollDirection(t),o=r.scrollRange(t,n),i=o.start,a=o.end;if(i!==a){var s=r.scrollStep(i,a),l=X[n](s),u=J[n](a),c=Q[n](l(a));r.cancelAnimation=window.requestAnimationFrame((function(){!function e(t){r.animationInProgress=!0;var n=l(t);r.scrollTo(u(n)),c(n)?r.cancelAnimation=window.requestAnimationFrame((function(){e(n)})):r.animationInProgress=!1}(i)}))}}},r.scrollToBottom=function(){r.rowHeightService&&r.scrollTo(r.rowHeightService.totalHeight()+r.props.bottomOffset)},r.scrollStep=function(e,n){var o=r.props.scrollDuration||t.defaultProps.scrollDuration;return Math.abs(n-e)/(o/17)},r.scrollRange=function(e,t){var n=r.containerScrollPosition;if(parseInt(""+e,10)===parseInt(""+n,10))return{start:e,end:e};var o,i,a,s=r.containerMaxScroll(),l=t===_.Backward?1:-1,u=(o=n,i=e,a=r.props.maxScrollDifference,Math.min(Math.abs(i-o),a)),c=Math.min(e,s);return{start:Math.min(Math.max(c+l*u,0),s),end:c}},r.containerMaxScroll=function(){return r.containerScrollSize-r.containerOffsetSize},r.getContainerScrollDirection=function(e){return e=t&&o<=n},t.prototype.isListScrolled=function(e){return!!this.rowHeightService&&this.containerScrollPosition!==this.rowHeightService.offset(e)},t.prototype.componentDidMount=function(){var e=this.props.onMount;e&&e.call(void 0,this)},t.prototype.render=function(){var e=this;this.lastTotal===this.props.total&&this.lastDirection===this.direction&&this.lastTake===this.props.take||(this.initServices(),this.lastTotal=this.props.total,this.lastDirection=this.direction,this.lastTake=this.props.take);var t=""+((this.rowHeightService?this.rowHeightService.totalHeight():0)+this.props.bottomOffset),n="vertical"===this.direction?{height:t+"px"}:{width:t+"px"},r=Object(a.d)("k-content k-scrollable",{"k-scrollable-horizontal":"horizontal"===this.direction},this.props.className),i=Object(a.d)("k-scrollable-placeholder",{"k-scrollable-horizontal-placeholder":"horizontal"===this.direction});return o.createElement("div",{ref:function(t){e.scrollContainer=t},onScroll:this.handleScroll,className:r,tabIndex:this.props.tabIndex,role:this.props.role},this.props.children,o.createElement("div",{style:n,className:i}))},t.propTypes={bottomOffset:i.number.isRequired,className:i.string,direction:i.oneOf(["horizontal","vertical"]),forceScroll:i.bool,itemHeight:i.number,itemWidth:i.number,maxScrollDifference:i.number,onScroll:i.func,onScrollAction:i.func,scrollDuration:i.number,scrollOffsetSize:i.number,skip:i.number.isRequired,tabIndex:i.number,take:i.number.isRequired,topOffset:i.number.isRequired,total:i.number.isRequired,role:i.string},t.defaultProps={direction:"vertical",forceScroll:!1,scrollOffsetSize:0,maxScrollDifference:100,scrollDuration:100},t}(o.Component),te=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ne=function(){return(ne=Object.assign||function(e){for(var t,n=1,r=arguments.length;ne||n&&nP(e)||n&&P(n)n?s(n):e:e},Me=function(e){return function(t,n,r){void 0===n&&(n=""),void 0===r&&(r={});var o=document.createElement(e);return o.className=n,Object.keys(r).map((function(e){return o.style[e]=r[e]})),"string"===typeof t?o.innerHTML=t||"":(t||[]).forEach((function(e){return e&&o.appendChild(e)})),o}},Te=[[]],Ee=((le={})[Y.Left]=function(e){return y(e,-1)},le[Y.Up]=function(e){return y(e,-5)},le[Y.Right]=function(e){return y(e,1)},le[Y.Down]=function(e){return y(e,5)},le[Y.PrevView]=function(e){return v(e,-1)},le[Y.NextView]=function(e){return v(e,1)},le[Y.FirstInView]=function(e){return T(e)},le[Y.LastInView]=function(e){return z(e)},le),Pe=function(){function e(){}return e.prototype.addToDate=function(e,t){return v(e,t)},e.prototype.datesList=function(e,t){return Se(0,t).map((function(t){return v(e,t)}))},e.prototype.data=function(e){var t=this,n=e.cellUID,r=e.focusedDate,o=e.isActiveView,i=e.max,a=e.min,s=e.selectedDate,l=e.selectionRange,u=void 0===l?he:l,c=e.viewDate;if(!c)return Te;var p=Se(0,5),d=T(c),h=z(c),f=xe();return Se(0,2).map((function(e){var l=y(d,5*e);return p.map((function(e){var c=t.normalize(y(l,e),a,i),p=t.isEqual(c,u.start),m=t.isEqual(c,u.end),v=!p&&!m&&Ce(c,u),g=o&&(Array.isArray(s)?t.isSelectedFromArray(c,s,a,i):ke(s,a,i)&&t.isEqual(c,s));return{formattedValue:t.value(c),id:""+n+c.getTime(),isFocused:t.isEqual(c,r),isSelected:g,isWeekend:!1,isInRange:ke(c,a,i),isRangeStart:p,isRangeMid:v,isRangeEnd:m,isRangeSplitEnd:v&&t.isEqual(c,h),isRangeSplitStart:v&&t.isEqual(c,d),isToday:t.isEqual(c,f),title:t.cellTitle(c),value:c}}))}))},e.prototype.isSelectedFromArray=function(e,t,n,r){var o=this,i=!1;return t.forEach((function(t){ke(e,n,r)&&o.isEqual(e,t)&&(i=!0)})),i},e.prototype.isEqual=function(e,t){return!(!e||!t)&&O(e).getFullYear()===O(t).getFullYear()},e.prototype.isInArray=function(e,t){if(!t.length)return!1;var n=e.getFullYear();return t[0].getFullYear()<=n&&n<=t[t.length-1].getFullYear()+99},e.prototype.isInRange=function(e,t,n){var r=O(e).getFullYear(),o=!t||O(t).getFullYear()<=r,i=!n||r<=O(n).getFullYear();return o&&i},e.prototype.isInSameView=function(e,t){return 0===E(e,t)},e.prototype.isRangeStart=function(e){return e.getFullYear()%1e3===0},e.prototype.move=function(e,t){var n=Ee[t];return n?n(e):e},e.prototype.cellTitle=function(e){return O(e).getFullYear().toString()},e.prototype.navigationTitle=function(e){return e?T(e).getFullYear().toString():""},e.prototype.title=function(e){return e?T(e).getFullYear()+" - "+z(e).getFullYear():""},e.prototype.rowLength=function(e){return 5},e.prototype.skip=function(e,t){return E(t,e)},e.prototype.total=function(e,t){return E(e,t)+1},e.prototype.value=function(e){return e?O(e).getFullYear().toString():""},e.prototype.viewDate=function(e,t,n){return void 0===n&&(n=1),E(e,t)n&&this.isEqual(e,n)?s(n):e},e}(),De=[[]],Ae=((ue={})[Y.Left]=function(e){return m(e,-1)},ue[Y.Up]=function(e){return m(e,-5)},ue[Y.Right]=function(e){return m(e,1)},ue[Y.Down]=function(e){return m(e,5)},ue[Y.PrevView]=function(e){return y(e,-1)},ue[Y.NextView]=function(e){return y(e,1)},ue[Y.FirstInView]=function(e){return O(e)},ue[Y.LastInView]=function(e){return F(e)},ue),Ie=function(){function e(){}return e.prototype.addToDate=function(e,t){return y(e,t)},e.prototype.datesList=function(e,t){return Se(0,t).map((function(t){return y(e,t)}))},e.prototype.data=function(e){var t=this,n=e.cellUID,r=e.focusedDate,o=e.isActiveView,i=e.max,a=e.min,s=e.selectedDate,l=e.selectionRange,u=void 0===l?he:l,c=e.viewDate;if(!c)return De;var p=Se(0,5),d=O(c),h=F(c),f=xe();return Se(0,2).map((function(e){var l=m(d,5*e);return p.map((function(e){var c=t.normalize(m(l,e),a,i),p=t.isEqual(c,u.start),y=t.isEqual(c,u.end),v=!p&&!y&&Ce(c,u),g=o&&(Array.isArray(s)?t.isSelectedFromArray(c,s,a,i):ke(s,a,i)&&t.isEqual(c,s));return{formattedValue:t.value(c),id:""+n+c.getTime(),isFocused:t.isEqual(c,r),isSelected:g,isWeekend:!1,isInRange:ke(c,a,i),isRangeStart:p,isRangeMid:v,isRangeEnd:y,isRangeSplitEnd:v&&t.isEqual(c,h),isRangeSplitStart:v&&t.isEqual(c,d),isToday:t.isEqual(c,f),title:t.cellTitle(c),value:c}}))}))},e.prototype.isSelectedFromArray=function(e,t,n,r){var o=this,i=!1;return t.forEach((function(t){ke(e,n,r)&&o.isEqual(e,t)&&(i=!0)})),i},e.prototype.isEqual=function(e,t){return!(!e||!t)&&e.getFullYear()===t.getFullYear()},e.prototype.isInArray=function(e,t){if(!t.length)return!1;var n=e.getFullYear();return t[0].getFullYear()<=n&&n<=t[t.length-1].getFullYear()+9},e.prototype.isInRange=function(e,t,n){var r=e.getFullYear(),o=!t||t.getFullYear()<=r,i=!n||r<=n.getFullYear();return o&&i},e.prototype.isRangeStart=function(e){return e.getFullYear()%100===0},e.prototype.isInSameView=function(e,t){return 0===M(e,t)},e.prototype.move=function(e,t){var n=Ae[t];return n?n(e):e},e.prototype.cellTitle=function(e){return e.getFullYear().toString()},e.prototype.navigationTitle=function(e){return e?O(e).getFullYear().toString():""},e.prototype.title=function(e){return e?O(e).getFullYear()+" - "+F(e).getFullYear():""},e.prototype.rowLength=function(e){return 5},e.prototype.skip=function(e,t){return M(t,e)},e.prototype.total=function(e,t){return M(e,t)+1},e.prototype.value=function(e){return e?e.getFullYear().toString():""},e.prototype.viewDate=function(e,t,n){return void 0===n&&(n=1),M(e,t)n&&this.isEqual(e,n)?s(n):e},e}(),Le=[[]],Re=((ce={})[Y.Left]=function(e){return u(e,-1)},ce[Y.Up]=function(e){return h(e,-1)},ce[Y.Right]=function(e){return u(e,1)},ce[Y.Down]=function(e){return h(e,1)},ce[Y.PrevView]=function(e){return d(e,-1)},ce[Y.NextView]=function(e){return d(e,1)},ce[Y.FirstInView]=function(e){return D(e)},ce[Y.LastInView]=function(e){return p(e)},ce),je=function(){function e(e){this.intl=e}return e.prototype.addToDate=function(e,t){return d(e,t)},e.prototype.datesList=function(e,t){return Se(0,t).map((function(t){return d(e,t)}))},e.prototype.data=function(e){var t=this,n=e.cellUID,r=e.focusedDate,o=e.isActiveView,i=e.max,a=e.min,s=e.selectedDate,l=e.selectionRange,c=void 0===l?he:l,d=e.viewDate;if(!d)return Le;var h=D(d),f=p(d),m=b(h,this.intl.firstDay(),-1),y=Se(0,7),v=xe();return Se(0,6).map((function(e){var l=u(m,7*e);return y.map((function(e){var p=t.normalize(u(l,e),a,i);if(pf)return null;var d=t.isEqual(p,c.start),m=t.isEqual(p,c.end),y=!d&&!m&&Ce(p,c),g=o&&(Array.isArray(s)?t.isSelectedFromArray(p,s,a,i):ke(s,a,i)&&t.isEqual(p,s));return{formattedValue:t.value(p),id:""+n+p.getTime(),isFocused:t.isEqual(p,r),isSelected:g,isInRange:ke(p,a,i),isWeekend:t.isWeekend(p),isRangeStart:d,isRangeMid:y,isRangeEnd:m,isRangeSplitStart:y&&t.isEqual(p,h),isRangeSplitEnd:y&&t.isEqual(p,f),isToday:t.isEqual(p,v),title:t.cellTitle(p),value:p}}))}))},e.prototype.isEqual=function(e,t){return!(!e||!t)&&P(e).getTime()===P(t).getTime()},e.prototype.isSelectedFromArray=function(e,t,n,r){var o=this,i=!1;return t.forEach((function(t){ke(e,n,r)&&o.isEqual(e,t)&&(i=!0)})),i},e.prototype.isInArray=function(e,t){return!!t.length&&D(t[0])<=e&&e<=p(t[t.length-1])},e.prototype.isInRange=function(e,t,n){var r=P(e),o=!t||P(t)<=r,i=!n||r<=P(n);return o&&i},e.prototype.isInSameView=function(e,t){return 0===C(e,t)},e.prototype.isRangeStart=function(e){return!e.getMonth()},e.prototype.move=function(e,t){var n=Re[t];return n?n(e):e},e.prototype.cellTitle=function(e){return this.intl.formatDate(e,"D")},e.prototype.navigationTitle=function(e){return e?this.isRangeStart(e)?e.getFullYear().toString():this.abbrMonthNames()[e.getMonth()]:""},e.prototype.title=function(e){return this.wideMonthNames()[e.getMonth()]+" "+e.getFullYear()},e.prototype.rowLength=function(e){return 7+(e?1:0)},e.prototype.skip=function(e,t){return C(t,e)},e.prototype.total=function(e,t){return C(e,t)+1},e.prototype.value=function(e){return e?e.getDate().toString():""},e.prototype.viewDate=function(e,t,n){return void 0===n&&(n=1),C(e,t)n&&this.isEqual(e,n)?P(n):e},e.prototype.wideMonthNames=function(){return this.intl.dateFormatNames({nameType:"wide",type:"months"})},e}(),Fe=[[]],ze=((pe={})[Y.Left]=function(e){return d(e,-1)},pe[Y.Up]=function(e){return d(e,(t=e.getMonth())>4?-5:t<2?-2:-7);var t},pe[Y.Right]=function(e){return d(e,1)},pe[Y.Down]=function(e){return d(e,(t=e.getMonth())<7?5:t<10?7:2);var t},pe[Y.PrevView]=function(e){return m(e,-1)},pe[Y.NextView]=function(e){return m(e,1)},pe[Y.FirstInView]=function(e){return I(e)},pe[Y.LastInView]=function(e){return j(e)},pe),Be=function(){function e(e){this._intl=e}return e.prototype.addToDate=function(e,t){return m(e,t)},e.prototype.datesList=function(e,t){return Se(0,t).map((function(t){return m(e,t)}))},e.prototype.data=function(e){var t=this,n=e.cellUID,r=e.focusedDate,o=e.isActiveView,i=e.max,a=e.min,s=e.selectedDate,l=e.selectionRange,u=void 0===l?he:l,c=e.viewDate;if(!c)return Fe;var p=this.abbrMonthNames(),h=I(c),f=j(c),m=h.getFullYear(),y=Se(0,5),v=xe();return Se(0,3).map((function(e){var l=d(h,5*e);return y.map((function(e){var c=t.normalize(d(l,e),a,i);if(mn&&this.isEqual(e,n)?Object(a.f)(n):e},e}(),Ue=((de={})[$.month]=je,de[$.year]=Be,de[$.decade]=Ie,de[$.century]=Pe,de),He=function(){function e(e){this.bottom=$.month,this.top=$.century,this.onViewChanged=e}return e.prototype.configure=function(e,t){this.bottom=e,this.top=t},e.prototype.service=function(e,t){return new Ue[""+e](t)},e.prototype.moveDown=function(e,t){this.move(e,-1,t)},e.prototype.moveUp=function(e,t){this.move(e,1,t)},e.prototype.moveToBottom=function(e){e!==this.bottom&&this.onViewChanged({view:this.bottom})},e.prototype.canMoveDown=function(e){return this.bottomthis.top?this.top:e},e.prototype.move=function(e,t,n){var r=this.clamp(function(e,t){var n=$[$[e+t]];return void 0!==n?n:e}(e,t));r!==e&&this.onViewChanged({view:r},n)},e}(),Ve=function(){function e(){this.didCalculate=!1}return e.prototype.ensureHeights=function(){void 0===this.calendarHeight&&this.calculateHeights()},e.prototype.calculateHeights=function(e){var t=this;if(a.c){var n=Me("div"),r=Me("ul"),o=Me("li"),i=Me("td"),s=Me("th"),l=Me("tr"),u=Me("tbody"),c=Me("thead"),p=Me("table"),d=function(){return n('\n March 2017\n TODAY\n ',"k-calendar-header")},h=function(e,t){return new Array(e).fill("1").map(t)},f=function(e){return n(e,"k-content k-scrollable")},m=function(){var e;return function(){return a.c?(e||(e=n([f([r([o("FEB")])])],"k-calendar-navigation",{left:"0px",position:"absolute"})),e):null}}(),y=function(e,t,r){var o,m=e.cells,y=e.rows;return function(){return a.c?(o||(o=function(e,t,r){return n(r?[d(),p([c([l([s("MO")])])],"k-calendar-weekdays"),f([e,e])]:[d(),f([e,e])],t,{left:"-10000px",position:"absolute"})}(function(e,t){return void 0===t&&(t=1),p([u([l([s("1")])].concat(h(e,(function(){return l(h(t,(function(e){return i(''+e+"")})))}))))])}(y,m),t,r)),o):null}},v=function(e){return e.querySelector(".k-scrollable")},g=function(e){var t=v(e);return t.className=t.className+" k-scrollable-horizontal",e},b=y({cells:7,rows:6},"k-calendar-view k-calendar-monthview",!0),w=y({cells:5,rows:3},"k-calendar-view k-calendar-yearview",!1),x=y({cells:5,rows:2},"k-calendar-view k-calendar-decadeview",!1),k=function(e){return parseFloat(window.getComputedStyle(e).height)||e.offsetHeight},_=function(e){var t=window.getComputedStyle(e);return parseFloat(t.width)+parseFloat(t.paddingLeft)+parseFloat(t.paddingRight)||e.offsetWidth},C=function(e){return e.querySelector("tbody")};this.didCalculate=!0,e&&(this.hostContainer=e),this.batch(b(),(function(e){var n=C(e);t.calendarHeight=k(e),t.monthViewHeight=k(n),t.headerHeight=k(n.children[0]),t.scrollableContentHeight=k(v(e))})),this.batch(g(b()),(function(e){var n=C(e);t.calendarWidth=_(e),t.monthViewWidth=_(n),t.scrollableContentWidth=_(v(e))})),this.batch(w(),(function(e){t.yearViewHeight=k(C(e)),t.scrollableYearContentHeight=k(v(e))})),this.batch(g(w()),(function(e){t.yearViewWidth=_(C(e))})),this.batch(x(),(function(e){t.decadeViewHeight=k(C(e)),t.centuryViewHeight=t.decadeViewHeight})),this.batch(g(x()),(function(e){t.decadeViewWidth=_(C(e)),t.centuryViewWidth=t.decadeViewWidth})),this.batch(m(),(function(e){t.navigationItemHeight=k(e.querySelector("li"))}))}},e.prototype.viewHeight=function(e){return this.viewDimension(e,"height")},e.prototype.viewWidth=function(e){return this.viewDimension(e,"width")},e.prototype.viewDimension=function(e,t){var n="height"===t?"ViewHeight":"ViewWidth";switch(e){case $.month:return this["month"+n];case $.year:return this["year"+n];case $.decade:return this["decade"+n];case $.century:return this["century"+n];default:return 1}},e.prototype.batch=function(e,t){var n=this.hostContainer||document.body,r=n.appendChild(e);t(r),n.removeChild(r)},e}(),Ze={33:Y.PrevView,34:Y.NextView,35:Y.LastInView,36:Y.FirstInView,37:Y.Left,38:Y.Up,39:Y.Right,40:Y.Down,"meta+38":Y.UpperView,"meta+40":Y.LowerView},Ge=function(){function e(e){this.bus=e}return e.prototype.action=function(e){var t=(e.ctrlKey||e.metaKey?"meta+":"")+e.keyCode;return Ze[t]},e.prototype.move=function(e,t,n,r,o){return r?t===Y.UpperView&&this.bus.canMoveUp(n)?(this.bus.moveUp(n,o),e):t===Y.LowerView&&this.bus.canMoveDown(n)?(this.bus.moveDown(n,o),e):r.move(e,t):e},e}(),Ke=function(){function e(e){this.dom=e,this.monthScrolled=!1,this.navScrolled=!1}return e.prototype.configure=function(e){var t=Math.max(this.dom.viewHeight(e)/this.dom.navigationItemHeight,1);this.divideByMagnitude=function(e){return function(t){return Math.floor(t/e)}}(t),this.powerByMagnitude=function(e){return function(t){return t*e}}(t)},e.prototype.sync=function(e,t,n){if(e&&t){if(this.navigator=e,this.view=t,n.target===this.navigator.element){if(this.monthScrolled)return void(this.monthScrolled=!1);this.navScrolled=!0,this.scrollSiblingOf(this.navigator.element)}if(n.target===this.view.element){if(this.navScrolled)return void(this.navScrolled=!1);this.monthScrolled=!0,this.scrollSiblingOf(this.view.element)}}},e.prototype.scrollSiblingOf=function(e){var t=this.siblingComponent(e),n=this.calculateScroll(t,e.scrollTop);t.scrollTo(n)},e.prototype.siblingComponent=function(e){return this.navigator.element===e?this.view:this.navigator},e.prototype.calculateScroll=function(e,t){return(e===this.navigator?this.divideByMagnitude:this.powerByMagnitude)(t)},e}(),qe=function(){function e(e){this.intl=e}return e.prototype.getWeekNames=function(e){void 0===e&&(e=!1);var t=Ne(this.intl.dateFormatNames({nameType:"short",type:"days"}),this.intl.firstDay());return e?[""].concat(t):t},e}(),We=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ye=function(){return(Ye=Object.assign||function(e){for(var t,n=1,r=arguments.length;n1?1:o}(e,this.intl.firstDay()):null},t.propTypes={activeRangeEnd:i.oneOf(["start","end",null]),activeView:i.number.isRequired,cellUID:i.string.isRequired,direction:i.oneOf(["horizontal","vertical"]),focusedDate:i.instanceOf(Date).isRequired,max:i.instanceOf(Date).isRequired,min:i.instanceOf(Date).isRequired,onChange:i.func,selectedDate:i.oneOfType([i.instanceOf(Date),i.arrayOf(i.instanceOf(Date))]),showWeekNumbers:i.bool,viewDate:i.instanceOf(Date).isRequired},t.defaultProps={direction:"vertical",selectedDate:xe(),showWeekNumbers:!1},t}(o.Component);Object(H.g)(Xe);var Je,Qe=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),et=function(){return(et=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0?r:0},n}return Ot(t,e),Object.defineProperty(t.prototype,"take",{get:function(){return void 0!==this.props.take?this.props.take:t.defaultProps.take},enumerable:!0,configurable:!0}),t.prototype.componentDidUpdate=function(e,t){void 0!==this.indexToScroll&&this.virtualization&&this.virtualization.scrollToIndex(this.indexToScroll),this.lastView=this.props.activeView,this.lastFocus=this.props.focusedDate,this.indexToScroll=void 0},t.prototype.render=function(){var e=this;this.calculateHeights();var t=this.lastView!==this.props.activeView,n=Oe(this.props.focusedDate,this.props.min,this.props.max),r=t?this.props.service.skip(n,this.props.min):this.state.skip,i=this.props.service.total(this.props.min,this.props.max),a=this.getTake(r,i),s=this.props.service.addToDate(this.props.min,r),l=this.props.service.datesList(s,a);this.props.activeView===this.lastView&&L(n,this.lastFocus)||(this.indexToScroll=this.props.service.skip(n,this.props.min));var u=o.createElement(ee,{skip:r,take:this.take,total:i,itemHeight:this.itemHeight,topOffset:this.topOffset,bottomOffset:this.bottomOffset,maxScrollDifference:this.maxViewHeight,onScrollAction:this.handleScrollAction,onMount:this.handleVirtualizationMount},o.createElement("ul",{ref:function(t){e.list=t},className:"k-reset"},l.map((function(t){return e.buildNavigationItem(t)}))));return o.createElement("div",{className:"k-calendar-navigation"},o.createElement("span",{className:"k-calendar-navigation-highlight"}),this.props.dom.didCalculate?u:null)},t.prototype.getTake=function(e,t){return Math.min(t-e,this.take)},t.propTypes={activeView:i.number.isRequired,focusedDate:i.instanceOf(Date).isRequired,max:i.instanceOf(Date).isRequired,min:i.instanceOf(Date).isRequired,onChange:i.func,take:i.number},t.defaultProps={take:30},t}(o.Component),Et=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Pt=function(){return(Pt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n$[o])return new Error("Invalid prop + "+t+" suplied to "+n+".\n "+t+" can not be bigger than topView.\n ")}},t.defaultProps={disabled:!1,min:ft,max:mt,navigation:!0,defaultActiveView:"month",defaultValue:null,smoothScroll:!0,topView:"century",bottomView:"month"},t}(o.Component);Object(H.g)(It);var Lt=function(){this.symbols=""},Rt=function(e,t,n,r){var o=e[r+e.length-n.length],i=e.substring(0,r+e.length-n.length),a=n.substring(0,r),s=[];if(i===a&&r>0)return s.push([t[r-1],a[r-1]]),s;if(0===i.indexOf(a)&&(0===a.length||t[a.length-1]!==t[a.length])){var l="";1===a.length&&s.push([t[0],a[0]]);for(var u=a.length;u0&&"0"===u.charAt(0);)u=u.slice(1);u.length>=4&&(u="");for(f=0;f<2;f++){var v=u+t,g=parseInt(v,10);if(!(m=this.intl.parseDate(l+v+h,this.format))&&!isNaN(g)&&!isNaN(parseInt(t,10))){if("M"===e&&!y){var b=g-1;b>-1&&b<12&&((m=s(this.value)).setMonth(b),m.getMonth()!==b&&(m=p(d(m,-1))))}"y"===e&&(m=c(parseInt(v,10),this.month?this.value.getMonth():0,this.date?this.value.getDate():1,this.hours?this.value.getHours():0,this.minutes?this.value.getMinutes():0,this.seconds?this.value.getSeconds():0,this.milliseconds?this.value.getMilliseconds():0),this.date&&m.getDate()!==this.value.getDate()&&(m=p(d(m,-1))))}if(m)return this._value=m,this.setExisting(e,!0),{value:this.value};u=""}return y&&(m=this.intl.parseDate(l+y+h,this.format))?(this._value=m,this.setExisting(e,!0),{value:this.value}):("0"===t&&(this.leadingZero=this.isAbbrMonth(o.partMap,e)?null:((n={})[e]=!0,n),this.setExisting(e,!1)),{value:null})},e.prototype.symbolMap=function(e){return this.intl.splitDateFormat(this.format).reduce(jt,{})[e]},e.prototype.resetLeadingZero=function(){var e=null!==this.leadingZero;return this.leadingZero=null,e},e.prototype.isAbbrMonth=function(e,t){var n=this.partPattern(e,t);return"month"===n.type&&n.names},e.prototype.partPattern=function(e,t){return e.filter((function(e){return-1!==e.pattern.indexOf(t)}))[0]},e.prototype.matchMonth=function(e){if(this.typedMonthPart+=e.toLowerCase(),0===this.monthNames.length)return"";for(;this.typedMonthPart.length>0;){for(var t=0;t=1&&n<=12&&n.toString()===this.typedMonthPart)return this.monthNames[n-1];this.typedMonthPart=this.typedMonthPart.substring(1,this.typedMonthPart.length)}return""},e.prototype.allFormatedMonths=function(){for(var e=this.intl.splitDateFormat(this.format),t=0;t0;)r.push(this.symbols[n[i].pattern[0]]||"_"),o.push(n[i]),a--;var s=new Lt;return s.symbols=r.join(""),s.partMap=o,s},e.prototype.merge=function(e,t){for(var n="",r="",o=t.symbols,i=o.length-1;i>=0;i--)if(-1===this.knownParts.indexOf(o[i])||this.getExisting(o[i]))n=e[i]+n,r=o[i]+r;else{for(var a=o[i];i>=0&&a===o[i];)i--;for(i++,n=this.leadingZero&&this.leadingZero[a]?"0"+n:this.dateFieldName(t.partMap[i])+n;r.length0&&(e.preventDefault(),n.decreasePart(e)))},n.increasePart=function(e){n.modifyDateSegmentValue(1,e)},n.decreasePart=function(e){n.modifyDateSegmentValue(-1,e)},n.elementKeyDown=function(e){if(!e.altKey){switch(e.keyCode){case 37:n.switchDateSegment(-1);break;case 38:n.modifyDateSegmentValue(1,e);break;case 39:n.switchDateSegment(1);break;case 40:n.modifyDateSegmentValue(-1,e);break;default:return}e.preventDefault()}},n.elementOnFocus=function(e){n.wrapper&&n.wrapper.classList.add("k-state-focused")},n.elementOnBlur=function(e){n.wrapper&&n.wrapper.classList.remove("k-state-focused")},n}return an(t,e),t.prototype.componentDidMount=function(){this.setValidity()},t.prototype.componentDidUpdate=function(){this._lastSelectedSymbol&&this.setSelection(this.selectionBySymbol(this._lastSelectedSymbol)),this.setValidity()},t.prototype.render=function(){var e=this;this.props._ref&&this.props._ref(this);var n=Object(H.f)(this),r=sn({},t.defaultProps,this.props),i=r.formatPlaceholder,s=r.format,l=r.value,u=r.min,c=r.max,p=r.name,d=r.label,h=r.id,f=r.defaultValue;null===this.kendoDate?(this.kendoDate=new zt(this.intl.bind(this),i,s),this.kendoDate.setValue(l||f||null)):(this.kendoDate.format=s,this.kendoDate.formatPlaceholder=i),void 0!==l&&this.value!==l&&this.kendoDate.setValue(l);var m=this.kendoDate.getTextAndFormat(),y=m.text,v=m.format;this.currentFormat=v;var g=h||this._inputId,b=!this.validityStyles||this.validity.valid,w={"aria-valuemin":null===u?void 0:u.getTime(),"aria-valuemax":null===c?void 0:c.getTime(),"aria-valuetext":y};null!==this.value&&(w["aria-valuenow"]=this.value.getTime());var x=Ft.slice();this.props.className&&x.push(this.props.className);var k=o.createElement("span",{style:d?void 0:{width:this.props.width},dir:this.props.dir,className:x.join(" ")},o.createElement("span",{className:Object(a.d)("k-dateinput-wrap",{"k-state-disabled":this.props.disabled,"k-state-invalid":!b}),ref:function(t){e._wrapper=t},onFocus:this.elementOnFocus,onBlur:this.elementOnBlur},o.createElement("input",sn({role:"spinbutton",tabIndex:this.props.tabIndex,disabled:this.props.disabled,title:void 0!==this.props.title?this.props.title:y,type:"text",spellCheck:!1,autoComplete:"off",autoCorrect:"off",className:"k-input",id:g,"aria-labelledby":this.props.ariaLabelledBy,"aria-describedby":this.props.ariaDescribedBy,onWheel:this.wheel,onClick:this.elementClick,onInput:this.elementChange,onKeyDown:this.elementKeyDown,onChange:a.m,value:y,name:p},w,{ref:function(t){return e._element=t}})),this.props.children,this.props.spinners&&o.createElement("span",{className:"k-select",onMouseDown:this.spinnersMouseDown},o.createElement("span",{className:"k-link k-link-increase","aria-label":n.toLanguageString(it,dt[it]),title:n.toLanguageString(it,dt[it]),onClick:this.increasePart},o.createElement("span",{className:"k-icon k-i-arrow-n"})),o.createElement("span",{className:"k-link k-link-decrease","aria-label":n.toLanguageString(at,dt[at]),title:n.toLanguageString(at,dt[at]),onClick:this.decreasePart},o.createElement("span",{className:"k-icon k-i-arrow-s"})))));return d?o.createElement(Bt.b,{label:d,editorId:g,editorValue:y,editorValid:b,editorDisabled:this.props.disabled,children:k,style:{width:this.props.width}}):k},Object.defineProperty(t.prototype,"value",{get:function(){return void 0!==this.valueDuringOnChange?this.valueDuringOnChange:this.kendoDate&&this.kendoDate.getDateObject()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this.props.name},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"min",{get:function(){return void 0!==this.props.min?this.props.min:t.defaultProps.min},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"max",{get:function(){return void 0!==this.props.max?this.props.max:t.defaultProps.max},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"validity",{get:function(){var e,t,n,r=(e=this.value,t=this.min,n=this.max,(null===e||!(t&&t>e||n&&n=0;n++,r--){if(n=0&&"_"!==this.currentFormat[r]){t=this.selectionBySymbol(this.currentFormat[r]);break}}return t},t.prototype.switchDateSegment=function(e){var t=this.selection,n=t.start,r=t.end;if(n0?n:r-1));else{for(var o=this.currentFormat[n],i=n+e;i>0&&i=0&&aa&&(a+1!==n||i+1!==r)?this.setSelection({start:a+1,end:i+1}):i=t&&e<=n},kn=function(e,t,n){return!t&&!n||e>=t||e<=n},_n=function(){function e(e){this.intl=e}return e.prototype.apply=function(e,t){var n=e.getHours(),r=wn(n),o=wn(t.getHours());if(r&&o||!r&&!o)return e;var i=this.normalizedRange(),a=i[0],s=i[1],l=void 0===s?24:s,u=n+(o?-12:12);return bn(e,Math.min(Math.max(a,u),l||24))},e.prototype.configure=function(e){var t=e.min,n=void 0===t?this.min:t,r=e.max,o=void 0===r?this.max:r,i=e.part,a=void 0===i?this.part:i;this.min=n,this.max=o,this.part=a},e.prototype.data=function(e){var t=this.part.names;if(!t)return[];var n,r=[],o=this.normalizedRange(),i=o[0],a=o[1],s=this.intl.dateFormatNames(t);return wn(i)&&r.push({text:s.am,value:bn(this.min,i)}),null!==(n=a)&&(!n||n>11)&&r.push({text:s.pm,value:bn(this.min,Math.max(12,a))}),this.min.getHours()!==i?r.reverse():r},e.prototype.isRangeChanged=function(e,t){return!1},e.prototype.limitRange=function(e,t,n){return[e,t]},e.prototype.total=function(){var e=this.normalizedRange(),t=e[0],n=e[1];return(t||n)&&(t>11||n<12)?1:2},e.prototype.selectedIndex=function(e){if(!this.valueInList(e))return-1;var t=Math.floor(e.getHours()/12);return this.min.getHours()===this.normalizedRange()[0]?t:0===t?1:0},e.prototype.valueInList=function(e){return(this.min.getHours()!==this.normalizedRange()[0]?kn:xn)(e.getHours(),this.min.getHours(),this.max.getHours())},e.prototype.normalizedRange=function(){var e=this.min.getHours(),t=this.max.getHours();return[Math.min(e,t),Math.max(e,t)]},e}(),Cn=function(){function e(){this.didCalculate=!1}return e.prototype.ensureHeights=function(){void 0===this.timeListHeight&&this.calculateHeights()},e.prototype.calculateHeights=function(e){if(a.c){var t=Me("div"),n=Me("ul"),r=Me("li"),o=t([t([t([n([r("02","k-item")],"k-reset")],"k-time-container k-content k-scrollable")],"k-time-list")],"k-time-list-wrapper",{left:"-10000px",position:"absolute"}),i=e&&e.querySelector(".k-time-container")||document.body,s=i.appendChild(o);this.timeListHeight=s.querySelector(".k-scrollable").offsetHeight,this.itemHeight=s.querySelector("li").offsetHeight,i.removeChild(s),this.didCalculate=!0}},e}(),Sn=(yn=24,function(e){return e%yn}),Nn=function(e,t){return Sn(24+e-t)},On=function(e){return function(t,n){return!n||P(t).getTime()===P(n).getTime()?t:$t(t,e)}},Mn=On(0),Tn=On(23),En=function(){function e(e){this.intl=e,this.boundRange=!1,this.insertUndividedMax=!1}return e.prototype.apply=function(e,t){return $t(e,t.getHours())},e.prototype.configure=function(e){var t=this,n=e.boundRange,r=void 0===n?this.boundRange:n,o=e.insertUndividedMax,i=void 0===o?this.insertUndividedMax:o,a=e.min,s=void 0===a?this.min:a,l=e.max,u=void 0===l?this.max:l,c=e.part,p=e.step,d=void 0===p?this.step:p;this.boundRange=r,this.insertUndividedMax=i,this.toListItem=function(e){var n=$t(me,e);return{text:t.intl.formatDate(n,c.pattern),value:n}},this.min=s,this.max=u,this.step=d},e.prototype.data=function(e){var t,n,r=this,o=this.range(e)[0],i=(t=o,n=this.step,function(e){return Sn(t+e*n)}),a=en(0,this.countFromMin(e)).map((function(e){return r.toListItem(i(e))}));return this.addLast(a),e&&this.addMissing(a,e),a},e.prototype.isRangeChanged=function(e,t){return!L(this.min,e)||!L(this.max,t)},e.prototype.limitRange=function(e,t,n){return this.boundRange?[Mn(e,n),Tn(t,n)]:[e,t]},e.prototype.total=function(e){var t=this.insertUndividedMax&&this.isLastMissing(e)?1:0,n=this.isMissing(e)?1:0;return this.countFromMin(e)+n+t},e.prototype.selectedIndex=function(e){return Math.ceil(this.divideByStep(e))},e.prototype.valueInList=function(e){return!e||(this.insertUndividedMax&&this.lastHour(e)===e.getHours()||!this.isMissing(e))},e.prototype.addLast=function(e,t){return this.insertUndividedMax&&this.isLastMissing(t)&&e.push(this.toListItem(this.lastHour(t))),e},e.prototype.addMissing=function(e,t){if(this.valueInList(t))return e;var n=this.toListItem(t.getHours());return e.splice(this.selectedIndex(t),0,n),e},e.prototype.countFromMin=function(e){var t=this.range(e),n=t[0],r=t[1];return Math.floor(Nn(r,n)/this.step)+1},e.prototype.isMissing=function(e){return!!e&&this.selectedIndex(e)!==this.divideByStep(e)},e.prototype.isLastMissing=function(e){return this.isMissing($t(this.max,this.lastHour(e)))},e.prototype.divideByStep=function(e){return Nn(e.getHours(),this.min.getHours())/this.step},e.prototype.lastHour=function(e){return this.range(e)[1]},e.prototype.range=function(e){var t=this.limitRange(this.min,this.max,e),n=t[0],r=t[1];return[n.getHours(),r.getHours()]},e}(),Pn=function(e){return function(t){return t%e}}(60),Dn=function(e,t){return Pn(60+e-t)},An=function(e){return function(t,n){return!n||t.getHours()===n.getHours()?t:Xt(t,e)}},In=An(0),Ln=An(59),Rn=function(){function e(e){this.intl=e,this.insertUndividedMax=!1}return e.prototype.apply=function(e,t){return Xt(e,t.getMinutes())},e.prototype.configure=function(e){var t=this,n=e.insertUndividedMax,r=void 0===n?this.insertUndividedMax:n,o=e.min,i=void 0===o?this.min:o,a=e.max,s=void 0===a?this.max:a,l=e.part,u=e.step,c=void 0===u?this.step:u;this.insertUndividedMax=r,this.toListItem=function(e){var n=Xt(me,e);return{text:t.intl.formatDate(n,l.pattern),value:n}},this.min=i,this.max=s,this.step=c},e.prototype.data=function(e){var t,n,r=this,o=this.range(e)[0],i=(t=o,n=this.step,function(e){return Pn(t+e*n)}),a=en(0,this.countFromMin(e)).map((function(e){return r.toListItem(i(e))}));return this.addLast(a),e&&this.addMissing(a,e),a},e.prototype.isRangeChanged=function(e,t){return!L(this.min,e)||!L(this.max,t)},e.prototype.limitRange=function(e,t,n){return[In(e,n),Ln(t,n)]},e.prototype.total=function(e){var t=this.insertUndividedMax&&this.isLastMissing(e)?1:0,n=this.isMissing(e)?1:0;return this.countFromMin(e)+n+t},e.prototype.selectedIndex=function(e){return Math.ceil(this.divideByStep(e))},e.prototype.valueInList=function(e){return!e||(this.insertUndividedMax&&this.lastMinute(e)===e.getMinutes()||!this.isMissing(e))},e.prototype.addLast=function(e,t){return this.insertUndividedMax&&this.isLastMissing(t)&&e.push(this.toListItem(this.lastMinute(t))),e},e.prototype.addMissing=function(e,t){if(this.valueInList(t))return e;var n=this.toListItem(t.getMinutes());return e.splice(this.selectedIndex(t),0,n),e},e.prototype.countFromMin=function(e){var t=this.range(e),n=t[0],r=t[1];return Math.floor(Dn(r,n)/this.step)+1},e.prototype.isMissing=function(e){return!!e&&this.selectedIndex(e)!==this.divideByStep(e)},e.prototype.isLastMissing=function(e){return this.isMissing(Xt(this.max,this.lastMinute(e)))},e.prototype.divideByStep=function(e){return Dn(e.getMinutes(),this.min.getMinutes())/this.step},e.prototype.lastMinute=function(e){return this.range(e)[1]},e.prototype.range=function(e){var t=this.limitRange(this.min,this.max,e),n=t[0],r=t[1];return[n.getMinutes(),r.getMinutes()]},e}(),jn=function(e){return function(t){return t%e}}(60),Fn=function(e,t){return jn(60+e-t)},zn=function(e){return function(t,n){return!n||t.getMinutes()===n.getMinutes()&&t.getHours()===n.getHours()?t:Jt(t,e)}},Bn=zn(0),Un=zn(59),Hn=function(){function e(e){this.intl=e,this.insertUndividedMax=!1}return e.prototype.apply=function(e,t){return Jt(e,t.getSeconds())},e.prototype.configure=function(e){var t=this,n=e.insertUndividedMax,r=void 0===n?this.insertUndividedMax:n,o=e.min,i=void 0===o?this.min:o,a=e.max,s=void 0===a?this.max:a,l=e.part,u=e.step,c=void 0===u?this.step:u;this.insertUndividedMax=r,this.toListItem=function(e){var n=Jt(me,e);return{text:t.intl.formatDate(n,l.pattern),value:n}},this.min=i,this.max=s,this.step=c},e.prototype.data=function(e){var t,n,r=this,o=this.range(e)[0],i=(t=o,n=this.step,function(e){return jn(t+e*n)}),a=en(0,this.countFromMin(e)).map((function(e){return r.toListItem(i(e))}));return this.addLast(a),e&&this.addMissing(a,e),a},e.prototype.isRangeChanged=function(e,t){return!L(this.min,e)||!L(this.max,t)},e.prototype.limitRange=function(e,t,n){return[Bn(e,n),Un(t,n)]},e.prototype.total=function(e){var t=this.insertUndividedMax&&this.isLastMissing(e)?1:0,n=this.isMissing(e)?1:0;return this.countFromMin(e)+n+t},e.prototype.selectedIndex=function(e){return Math.ceil(this.divideByStep(e))},e.prototype.valueInList=function(e){return!e||(this.insertUndividedMax&&this.lastSecond(e)===e.getSeconds()||!this.isMissing(e))},e.prototype.divideByStep=function(e){return Fn(e.getSeconds(),this.min.getSeconds())/this.step},e.prototype.addLast=function(e,t){return this.insertUndividedMax&&this.isLastMissing(t)&&e.push(this.toListItem(this.lastSecond(t))),e},e.prototype.addMissing=function(e,t){if(this.valueInList(t))return e;var n=this.toListItem(t.getSeconds());return e.splice(this.selectedIndex(t),0,n),e},e.prototype.countFromMin=function(e){var t=this.range(e),n=t[0],r=t[1];return Math.floor(Fn(r,n)/this.step)+1},e.prototype.isMissing=function(e){return!!e&&this.selectedIndex(e)!==this.divideByStep(e)},e.prototype.isLastMissing=function(e){return this.isMissing(Jt(this.max,this.lastSecond(e)))},e.prototype.lastSecond=function(e){return this.range(e)[1]},e.prototype.range=function(e){var t=this.limitRange(this.min,this.max,e),n=t[0],r=t[1];return[n.getSeconds(),r.getSeconds()]},e}(),Vn=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Zn=((vn={})[a.b.end]=function(e,t){return e[e.length-1]},vn[a.b.home]=function(e,t){return e[0]},vn[a.b.up]=function(e,t){return e[t-1]},vn[a.b.down]=function(e,t){return e[t+1]},vn),Gn=((gn={})[Ut]=_n,gn[Ht]=En,gn[Vt]=Rn,gn[Zt]=Hn,gn),Kn=function(e){function t(n){var r=e.call(this,n)||this;return r.animateToIndex=!1,r.focus=function(e){Promise.resolve().then((function(){r.element&&r.element.focus(e)}))},r.itemOffset=function(e){if(!r.virtualization)return-1;var t=r.service.selectedIndex(r.props.value),n=r.virtualization.activeIndex(),o=r.virtualization.itemOffset(n),i=Math.abs(Math.ceil(e)-o);if(t===n&&i<2)return o;var a=t>n;return a&&i>=r.bottomThreshold||!a&&i>r.topThreshold?r.virtualization.itemOffset(n+1):o},r.calculateHeights=function(){r.dom.didCalculate&&(r.itemHeight=r.dom.itemHeight,r.listHeight=r.dom.timeListHeight,r.topOffset=(r.listHeight-r.itemHeight)/2,r.bottomOffset=r.listHeight-r.itemHeight,r.topThreshold=.05*r.itemHeight,r.bottomThreshold=.95*r.itemHeight)},r.configureServices=function(e){var t=void 0===e?r.props:e,n=t.min,o=t.max,i=t.value,a=r.service.limitRange(n||r.min,o||r.max,i||r.props.value),s=a[0],l=a[1];r.service.configure(r.serviceSettings({min:s,max:l}))},r.serviceSettings=function(e){var n={boundRange:r.props.boundRange||t.defaultProps.boundRange,insertUndividedMax:!1,min:s(r.min),max:s(r.max),part:r.props.part,step:r.step},o=Object.assign({},n,e);return o.boundRange="hour"!==o.part.type||r.props.boundRange||t.defaultProps.boundRange,o},r.handleScrollAction=function(e){var t=e.target,n=e.animationInProgress;if(r.virtualization&&t&&!n){r.animateToIndex=!1;var o=r.virtualization.itemIndex(r.itemOffset(t.scrollTop)),i=r.service.data(r.props.value)[o];r.handleChange(i)}},r.handleFocus=function(e){var t=r.props.onFocus;t&&t.call(void 0,e)},r.handleBlur=function(e){var t=r.props.onBlur;t&&t.call(void 0,e)},r.handleMouseOver=function(){r._element&&document&&document.activeElement!==r._element&&r._element.focus({preventScroll:!0})},r.handleKeyDown=function(e){var t=e.keyCode;t!==a.b.down&&t!==a.b.up&&t!==a.b.end&&t!==a.b.home||e.preventDefault();var n=(Zn[e.keyCode]||a.m)(r.service.data(r.props.value),r.service.selectedIndex(r.props.value));n&&r.handleChange(n)},r.handleChange=function(e){var t=r.service.apply(r.props.value,e.value);if(r.props.value.getTime()!==t.getTime()){r.setState({value:t});var n=r.props.onChange;n&&n.call(void 0,t)}},r.dom=new Cn,r}return Vn(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._element},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"animate",{get:function(){return Boolean(this.props.smoothScroll&&this.animateToIndex)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"min",{get:function(){return this.props.min||t.defaultProps.min},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"max",{get:function(){return this.props.max||t.defaultProps.max},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"step",{get:function(){return void 0!==this.props.step&&0!==this.props.step?Math.floor(this.props.step):t.defaultProps.step},enumerable:!0,configurable:!0}),t.prototype.componentDidMount=function(){var e=this;Promise.resolve().then((function(){e._element&&(e.dom.calculateHeights(e._element),e.forceUpdate())}))},t.prototype.componentDidUpdate=function(){if(this.virtualization){var e=this.service.selectedIndex(this.props.value);this.virtualization[this.animate?"animateToIndex":"scrollToIndex"](e),this.animateToIndex=!0}},t.prototype.render=function(){var e=this;if(this.props.part.type&&Gn[this.props.part.type]){this.calculateHeights(),this.intl=Object(H.e)(this),this.service=new Gn[this.props.part.type](this.intl),this.configureServices();var t=this.service.data(this.props.value),n="translateY("+this.topOffset+"px)",r=this.service.total(this.props.value),i=o.createElement("ul",{style:{transform:n,msTransform:n},className:"k-reset"},t.map((function(t,n){return o.createElement("li",{key:n,className:"k-item",onClick:function(){e.handleChange(t)}},o.createElement("span",null,t.text))})));return o.createElement("div",{className:"k-time-list",id:String(this.props.id||""),tabIndex:this.props.disabled?-1:0,ref:function(t){e._element=t},onKeyDown:this.handleKeyDown,onFocus:this.handleFocus,onBlur:this.handleBlur,onMouseOver:this.handleMouseOver},this.dom.didCalculate?o.createElement(ee,{bottomOffset:this.bottomOffset,children:i,className:"k-time-container",itemHeight:this.itemHeight,maxScrollDifference:this.listHeight,onScrollAction:this.handleScrollAction,ref:function(t){e.virtualization=t},role:"presentation",skip:0,tabIndex:-1,take:r,topOffset:this.topOffset,total:r}):o.createElement("div",{className:"k-time-container"},i))}},t.propTypes={id:i.number,max:i.instanceOf(Date),min:i.instanceOf(Date),part:function(e,t,n){var r=e[t];if(!r||!Gn[r.type])throw new Error("\n Invalid prop '"+t+"' supplied to "+n+".\n Supported part types are hour|minute|second|dayperiod.\n ")},step:function(e,t,n){var r=e[t];if(void 0!==r&&r<=0)throw new Error("\n Invalid prop '"+t+"' supplied to "+n+".\n "+t+" cannot be less than 1.\n ")},value:i.instanceOf(Date),smoothScroll:i.bool},t.defaultProps={boundRange:!1,max:be,min:me,step:1,smoothScroll:!0},t}(o.Component);Object(H.g)(Kn);var qn,Wn=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Yn=function(){return(Yn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=1&&n[t-1];return r&&r&&"literal"===e.type?$n.test(r.type||""):$n.test(e.type||"")},r.focusList=function(e){r.timeLists.length&&r.timeLists.reduce(r.listReducer,[]).map((function(t){return e===qn.Right?t.next:t.prev})).map((function(e){return e&&e.element&&e.element.focus({preventScroll:!0})}))},r.listReducer=function(e,t,n,o){return e.length||t.props.id!==r.state.activeListIndex?e:[{next:o[n+1]||t,prev:o[n-1]||t}]},r.showNowButton=function(){return!r.hasSteps()&&r.props.nowButton&&nn(Qt(),r.min,r.max)},r.handleKeyDown=function(e){switch(e.keyCode){case a.b.left:return e.preventDefault(),void r.focusList(qn.Left);case a.b.right:return e.preventDefault(),void r.focusList(qn.Right);default:return}},r.handleListBlur=function(){r.nextTick((function(){r.setState({activeListIndex:-1})}))},r.handleListFocus=function(e){clearTimeout(r.nextTickId),r.setState({activeListIndex:e})},r.handleChange=function(e){var t=r.props.onChange;t&&t.call(void 0,e)},r.snapTime=Yt(Wt(r.props.steps,r.props.min||t.defaultProps.min)),r.state={activeListIndex:-1},r.hasActiveButton=r.hasActiveButton.bind(r),r}return Wn(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._element},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return function(e,t,n){if(!e||!t||!n)return e;var r=tn(e,t,n),o=r.candidateValue,i=r.minValue,a=r.maxValue;return oa?we(e,n):e}(this.snapTime(s(this.props.value||me)),this.min,this.max)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"intl",{get:function(){return Object(H.e)(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"min",{get:function(){return this.snapTime(this.props.min||t.defaultProps.min)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"max",{get:function(){return this.snapTime(this.props.max||t.defaultProps.max)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"steps",{get:function(){return this.props.steps||t.defaultProps.steps},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"boundRange",{get:function(){return void 0!==this.props.boundRange?this.props.boundRange:t.defaultProps.boundRange},enumerable:!0,configurable:!0}),t.prototype.componentWillUnmount=function(){clearTimeout(this.nextTickId)},t.prototype.componentDidMount=function(){var e=this.props.onMount;e&&e.call(void 0,this.value)},t.prototype.render=function(){var e=this,n=this.props,r=n.format,i=n.smoothScroll,s=n.onNowClick,l=n.className,u=n.disabled;this.snapTime=Yt(Wt(this.steps,this.min)),this.dateFormatParts=this.intl.splitDateFormat(r||t.defaultProps.format).filter(this.timeFormatFilter);var c=Object(a.d)({"k-state-disabled":u},l,"k-time-part");this.timeLists=[];var p=Object(H.f)(this),d=p.toLanguageString(ct,dt[ct]);return o.createElement("div",{className:c},o.createElement("div",{className:"k-time-header"},o.createElement("span",{className:"k-title"},this.intl.formatDate(this.value,this.dateFormatParts.reduce(this.timeFormatReducer,""))),this.showNowButton()&&o.createElement("button",Yn({ref:function(t){e._nowButton=t},className:"k-button k-bare k-time-now",title:d},{"aria-label":d},{onClick:s,tabIndex:u?-1:0}),p.toLanguageString("timepicker.now",dt["timepicker.now"]))),o.createElement("div",{className:"k-time-list-container",onKeyDown:this.handleKeyDown},o.createElement("span",{className:"k-time-highlight"}),this.dateFormatParts.map((function(t,n){return"literal"!==t.type?o.createElement("div",{key:n,className:Object(a.d)("k-time-list-wrapper",{"k-state-focused":n===e.state.activeListIndex}),role:"presentation",tabIndex:-1},o.createElement("span",{className:"k-title",onMouseDown:function(e){e.preventDefault()}},e.intl.dateFieldName(t)),o.createElement(Kn,{min:e.min,max:e.max,boundRange:e.boundRange,part:t,step:t.type?e.steps[t.type]:1,smoothScroll:i,ref:function(t){t&&e.timeLists.push(t)},id:n,onFocus:function(){e.handleListFocus(n)},onBlur:e.handleListBlur,onChange:e.handleChange,value:e.value,disabled:u})):o.createElement("div",{key:n,className:"k-time-separator"},t.pattern)}))))},t.prototype.nextTick=function(e){clearTimeout(this.nextTickId),this.nextTickId=setTimeout((function(){return e()}))},t.prototype.hasActiveButton=function(){return document.activeElement===this._nowButton},t.prototype.hasSteps=function(){var e=this,t=Object.keys(this.steps);return t.length!==t.reduce((function(t,n){return t+e.steps[n]}),0)},t.propTypes={cancelButton:i.bool,disabled:i.bool,format:i.oneOfType([i.string,i.shape({skeleton:i.string,pattern:i.string,date:i.oneOf(["short","medium","long","full"]),time:i.oneOf(["short","medium","long","full"]),datetime:i.oneOf(["short","medium","long","full"]),era:i.oneOf(["narrow","short","long"]),year:i.oneOf(["numeric","2-digit"]),month:i.oneOf(["numeric","2-digit","narrow","short","long"]),day:i.oneOf(["numeric","2-digit"]),weekday:i.oneOf(["narrow","short","long"]),hour:i.oneOf(["numeric","2-digit"]),hour12:i.bool,minute:i.oneOf(["numeric","2-digit"]),second:i.oneOf(["numeric","2-digit"]),timeZoneName:i.oneOf(["short","long"])})]),max:i.instanceOf(Date),min:i.instanceOf(Date),nowButton:i.bool,steps:i.shape({hour:i.number,minute:i.number,second:i.number}),smoothScroll:i.bool,tabIndex:i.number,value:i.instanceOf(Date)},t.defaultProps={value:null,disabled:!1,nowButton:!0,cancelButton:!0,format:"hh:mm a",min:ge,max:be,steps:{},boundRange:!1},t}(o.Component);Object(H.g)(Xn),Object(H.h)(Xn);var Jn,Qn=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),er=function(){return(er=Object.assign||function(e){for(var t,n=1,r=arguments.length;ne[Math.max(0,(r.props.views||t.defaultProps.views)-1)]},r.navigate=function(e){r.calculateFocusFromValue=!1;var t=r.move(e);r.setState({focusedDate:t})},r.move=function(e){return r.clampDate(r.service.move(r.focusedDate,e))},r.clampDate=function(e){return Oe(e,r.min,r.max)},r.shouldAutoCorrect=function(e,t){var n=t.end,o=t.start;return"end"!==r.activeRange?null!==n&&e>n:null!==o&&e0}(e(t))}},S=function(e,t){return h(e,t,k)},N=function(e,t){return function(n){return e(n).map(t).join("~")}},O=f.apply(void 0,[['"',""],[":","-"]].map((function(e){var t=e[0],n=e[1];return function(e){return e.replace(new RegExp(t,"g"),n)}}))),M=(b=".",function(e){return e.slice(0,e.indexOf(b))}),T=function(e){var t=e.field,n=e.dir;return t+"-"+(void 0===n?"asc":n)},E=w("take"),P=w("aggregates"),D=w("skip"),A=w("group"),I=w("sort",!0),L=N(I,T),R=N(A,T),j=N(P,(function(e){return e.field+"-"+e.aggregate})),F=f((function(e){return"datetime'"+e+"'"}),M,O,JSON.stringify,m),z=f(x("page"),(function(e){var t=e.skip,n=e.take;return Math.floor((t||0)/n)+1})),B=f(x("pageSize"),E),U=f(x("group"),R),H=f(x("sort"),L),V=f(x("aggregate"),j),Z=(S(_(D),z),S(_(E),B),S(C(A),U),S(_(P),V),f(S(C(I),H),(function(e){return Object.assign({},e,{sort:(I(e)||[]).filter((function(e){var t=e.dir;return u(t)}))})})),function(e){return e.field+"~"+e.operator+"~"+e.value}),G=(h(y,f(Z,(function(e){var t=e.field,n=e.value,r=e.ignoreCase,o=e.operator;return{value:F(n),field:t,ignoreCase:r,operator:o}})),Z),function(e,t,n){return t[e]=n,t}),K=function(e){return function(t){var n,r=t[e];return o(r)?r:t[(n=e,n.replace(/(^[A-Z])/g,(function(e,t){return t.toLowerCase()})))]}},q=(K("Member"),K("AggregateMethodName"),K("Value"),function(e){return function(t){return Object.keys(t).reduce(e.bind(null,t),{})}}),W=q((function(e,t,n){return G(n.toLowerCase(),t,e[n])})),Y=q((function(e,t,n){return G(n,t,W(e[n]))})),$=function(e,t){return o(e)?e:t},X=f((function(e){var t=e.field,n=e.hasSubgroups,r=e.value,o=e.aggregates,i=e.items;return{aggregates:Y(o),field:t,items:n?i.map(X):i,value:r}}),(function(e){return{aggregates:e.Aggregates||e.aggregates,field:e.Member||e.member||e.field,hasSubgroups:e.HasSubgroups||e.hasSubgroups||!1,items:e.Items||e.items,value:$(e.Key,$(e.key,e.value))}})),J=function(e,t){return i(e)?e===t?0:-1:i(t)?1:e.localeCompare?e.localeCompare(t):e>t?1:et&&(c(t)||p(t))&&(e=t)},result:function(){return e}}},sum:function(){var e=0;return{calc:function(t){return e+=t},result:function(){return e}}}}[e]()}(n);return s.calc(t(i)),a[e.aggregate]=s,o[e.field]=a,o}}));return function(e,n){return t.reduce((function(e,t){return t(e,n)}),e)}},oe=function(e,t){return e.push(t),e},ie=function(e){return function(t){return function(n,r,o){return t(n,e(r,o))}}},ae=function(e){return function(t){return function(n,r){return e(r)?t(n,r):n}}},se=function(e){return o(e.__value)},le=function(e){return se(e)?e:{__value:e,reduced:!0}},ue=function(e,t,n){for(var r=t,o=0,i=n.length;o":"gt",">=":"gte",equal:"eq",equals:"eq",equalto:"eq",ge:"gte",greater:"gt",greaterthan:"gt",greaterthanequal:"gte",isempty:"isempty",isequalto:"eq",isgreaterthan:"gt",isgreaterthanorequalto:"gte",islessthan:"lt",islessthanorequalto:"lte",isnotempty:"isnotempty",isnotequalto:"neq",isnull:"isnull",le:"lte",less:"lt",lessthan:"lt",lessthanequal:"lte",ne:"neq",notequal:"neq",notequals:"neq",notequalto:"neq",notsubstringof:"doesnotcontain"}[(n=t.operator).toLowerCase()]||n),d(t)&&e(r),r})))}(e=function(e){return d(e)?Object.assign({},e):{filters:a(e)?e:[e],logic:"and"}}(e)),e},he={or:{concat:function(e,t){return function(n){return e(n)||t(n)}},identity:function(){return!1}},and:{concat:function(e,t){return function(n){return e(n)&&t(n)}},identity:function(){return!0}}},fe={contains:function(e,t){return(e||"").indexOf(t)>=0},doesnotcontain:function(e,t){return-1===(e||"").indexOf(t)},doesnotendwith:function(e,t){return(e||"").indexOf(t,(e||"").length-(t||"").length)<0},doesnotstartwith:function(e,t){return-1===(e||"").lastIndexOf(t,0)},endswith:function(e,t){return(e||"").indexOf(t,(e||"").length-(t||"").length)>=0},eq:function(e,t){return e===t},gt:function(e,t){return e>t},gte:function(e,t){return e>=t},isempty:function(e){return""===e},isnotempty:function(e){return""!==e},isnotnull:function(e){return o(e)},isnull:function(e){return i(e)},lt:function(e,t){return e1?e(u.items,n.slice(1),we,p):u.items,value:u.value}}))})),l},ke=function(e,t){if(t.some((function(e){return o(e.dir)}))){e=e.slice(0);var n=function(e){return e.filter((function(e){return o(e.dir)})).map((function(e){return ee(e)})).reduce((function(e,t){return function(n,r){return e(n,r)||t(n,r)}}),te)}(t);!function e(t,n,r,o){if(!(r-n<2)){var i=n+r>>>1;e(t,n,i,o),e(t,i,r,o),function(e,t,n,r,o){for(var i=n-t,a=r-n,s=[],l=0;l0&&i>0);for(;i;)e[p++]=s[u++],i--;for(;a;)e[p++]=e[c++],a--}(t,n,i,r,o)}}(e,0,e.length,n)}return e},_e=function(e,t){var n=t.skip,r=t.take,i=t.filter,a=t.sort,s=t.group,l=be(s||[]).concat(a||[]);l.length&&(e=ke(e,l));var u,c=o(i)&&ae.length,p=o(s)&&s.length;if(!c&&!p)return{data:r?e.slice(n,n+r):e,total:e.length};var d,h,m=[];if(c?(u=function(e,t){for(var n=0,r=0,o=e.length;r0?t(n,r):le(n)}}}(r))),m.length){var y=f.apply(void 0,m);return{data:p?xe(e,s,y,function(e,t){return t?e.filter(t):e}(e,d)):ue(y(oe),[],e),total:u}}return{data:p?xe(e,s):e,total:u}}},function(e,t,n){"use strict";n.d(t,"f",(function(){return ye})),n.d(t,"j",(function(){return ke})),n.d(t,"e",(function(){return Ye})),n.d(t,"i",(function(){return gt})),n.d(t,"k",(function(){return kt})),n.d(t,"g",(function(){return P})),n.d(t,"a",(function(){return D})),n.d(t,"b",(function(){return A})),n.d(t,"c",(function(){return W})),n.d(t,"h",(function(){return Y})),n.d(t,"l",(function(){return Ct})),n.d(t,"d",(function(){return St}));var r={en:{name:"en",identity:{version:{_number:"$Revision: 12418 $",_cldrVersion:"29"},language:"en"},territory:"US",numbers:{symbols:{decimal:".",group:",",list:";",percentSign:"%",plusSign:"+",minusSign:"-",exponential:"E",superscriptingExponent:"\xd7",perMille:"\u2030",infinity:"\u221e",nan:"NaN",timeSeparator:":"},decimal:{patterns:["n"],groupSize:[3]},scientific:{patterns:["nEn"],groupSize:[]},percent:{patterns:["n%"],groupSize:[3]},currency:{patterns:["$n"],groupSize:[3],"unitPattern-count-one":"n $","unitPattern-count-other":"n $"},currencies:{BGN:{displayName:"Bulgarian Lev","displayName-count-one":"Bulgarian lev","displayName-count-other":"Bulgarian leva",symbol:"BGN"},EUR:{displayName:"Euro","displayName-count-one":"euro","displayName-count-other":"euros",symbol:"\u20ac","symbol-alt-narrow":"\u20ac"},USD:{displayName:"US Dollar","displayName-count-one":"US dollar","displayName-count-other":"US dollars",symbol:"$","symbol-alt-narrow":"$"}},localeCurrency:"USD",accounting:{patterns:["$n","($n)"],groupSize:[3]}},calendar:{gmtFormat:"GMT{0}",gmtZeroFormat:"GMT",patterns:{d:"M/d/y",D:"EEEE, MMMM d, y",m:"MMM d",M:"MMMM d",y:"MMM y",Y:"MMMM y",F:"EEEE, MMMM d, y h:mm:ss a",g:"M/d/y h:mm a",G:"M/d/y h:mm:ss a",t:"h:mm a",T:"h:mm:ss a",s:"yyyy'-'MM'-'dd'T'HH':'mm':'ss",u:"yyyy'-'MM'-'dd HH':'mm':'ss'Z'"},dateTimeFormats:{full:"{1} 'at' {0}",long:"{1} 'at' {0}",medium:"{1}, {0}",short:"{1}, {0}",availableFormats:{Bh:"h B",Bhm:"h:mm B",Bhms:"h:mm:ss B",d:"d",E:"ccc",EBhm:"E h:mm B",EBhms:"E h:mm:ss B",Ed:"d E",Ehm:"E h:mm a",EHm:"E HH:mm",Ehms:"E h:mm:ss a",EHms:"E HH:mm:ss",Gy:"y G",GyMMM:"MMM y G",GyMMMd:"MMM d, y G",GyMMMEd:"E, MMM d, y G",h:"h a",H:"HH",hm:"h:mm a",Hm:"HH:mm",hms:"h:mm:ss a",Hms:"HH:mm:ss",hmsv:"h:mm:ss a v",Hmsv:"HH:mm:ss v",hmv:"h:mm a v",Hmv:"HH:mm v",M:"L",Md:"M/d",MEd:"E, M/d",MMM:"LLL",MMMd:"MMM d",MMMEd:"E, MMM d",MMMMd:"MMMM d","MMMMW-count-one":"'week' W 'of' MMMM","MMMMW-count-other":"'week' W 'of' MMMM",ms:"mm:ss",y:"y",yM:"M/y",yMd:"M/d/y",yMEd:"E, M/d/y",yMMM:"MMM y",yMMMd:"MMM d, y",yMMMEd:"E, MMM d, y",yMMMM:"MMMM y",yQQQ:"QQQ y",yQQQQ:"QQQQ y","yw-count-one":"'week' w 'of' Y","yw-count-other":"'week' w 'of' Y"}},timeFormats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},dateFormats:{full:"EEEE, MMMM d, y",long:"MMMM d, y",medium:"MMM d, y",short:"M/d/yy"},days:{format:{abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},"stand-alone":{abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},months:{format:{abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},"stand-alone":{abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]}},quarters:{format:{abbreviated:["Q1","Q2","Q3","Q4"],narrow:["1","2","3","4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},"stand-alone":{abbreviated:["Q1","Q2","Q3","Q4"],narrow:["1","2","3","4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]}},dayPeriods:{format:{abbreviated:{midnight:"midnight",am:"AM","am-alt-variant":"am",noon:"noon",pm:"PM","pm-alt-variant":"pm",morning1:"in the morning",afternoon1:"in the afternoon",evening1:"in the evening",night1:"at night"},narrow:{midnight:"mi",am:"a","am-alt-variant":"am",noon:"n",pm:"p","pm-alt-variant":"pm",morning1:"in the morning",afternoon1:"in the afternoon",evening1:"in the evening",night1:"at night"},wide:{midnight:"midnight",am:"AM","am-alt-variant":"am",noon:"noon",pm:"PM","pm-alt-variant":"pm",morning1:"in the morning",afternoon1:"in the afternoon",evening1:"in the evening",night1:"at night"}},"stand-alone":{abbreviated:{midnight:"midnight",am:"AM","am-alt-variant":"am",noon:"noon",pm:"PM","pm-alt-variant":"pm",morning1:"morning",afternoon1:"afternoon",evening1:"evening",night1:"night"},narrow:{midnight:"midnight",am:"AM","am-alt-variant":"am",noon:"noon",pm:"PM","pm-alt-variant":"pm",morning1:"morning",afternoon1:"afternoon",evening1:"evening",night1:"night"},wide:{midnight:"midnight",am:"AM","am-alt-variant":"am",noon:"noon",pm:"PM","pm-alt-variant":"pm",morning1:"morning",afternoon1:"afternoon",evening1:"evening",night1:"night"}}},eras:{format:{wide:{0:"Before Christ",1:"Anno Domini","0-alt-variant":"Before Common Era","1-alt-variant":"Common Era"},abbreviated:{0:"BC",1:"AD","0-alt-variant":"BCE","1-alt-variant":"CE"},narrow:{0:"B",1:"A","0-alt-variant":"BCE","1-alt-variant":"CE"}}},dateFields:{era:{wide:"era"},year:{wide:"year",short:"yr.",narrow:"yr."},quarter:{wide:"quarter",short:"qtr.",narrow:"qtr."},month:{wide:"month",short:"mo.",narrow:"mo."},week:{wide:"week",short:"wk.",narrow:"wk."},day:{wide:"day",short:"day",narrow:"day"},weekday:{wide:"day of the week"},dayperiod:{wide:"AM/PM"},hour:{wide:"hour",short:"hr.",narrow:"hr."},minute:{wide:"minute",short:"min.",narrow:"min."},second:{wide:"second",short:"sec.",narrow:"sec."},zone:{wide:"time zone"}}}},supplemental:{likelySubtags:{en:"en-Latn-US"},currencyData:{region:{US:[{USD:{_from:"1792-01-01"}}]}},weekData:{firstDay:{US:"sun"},weekendStart:{"001":"sat"},weekendEnd:{"001":"sun"}}}};function o(e){return"string"===typeof e}var i=/\{(\d+)}?\}/g,a=function(e){var t=e.name,n=e.message;if(!t||!n)throw new Error("{ name: string, message: string } object is required!");this.name=t,this.message=n};a.prototype.formatMessage=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=s(e),r=this.message.replace(i,(function(e,t){return n[parseInt(t,10)]}));return this.name+": "+r},a.prototype.error=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new Error(this.formatMessage(e))};var s=function(e){return e.reduce((function(e,t){return e.concat(t)}),[])},l=function(e){return Object.keys(e).reduce((function(t,n){return t[n]=new a({name:n,message:e[n]}),t}),{})}({NoLocale:"Missing locale info for '{0}'",NoCurrency:"Cannot determine currency information. Please load the locale currencies data.",NoSupplementalCurrency:"Cannot determine currency. Please load the supplemental currencyData.",NoCurrencyRegion:"No currency data for region '{0}'",NoCurrencyDisplay:"Cannot determine currency display information. Please load the locale currencies data. The default culture does not include the all currencies data.",NoGMTInfo:"Cannot determine locale GMT format. Please load the locale timeZoneNames data.",NoWeekData:"Cannot determine locale first day of week. Please load the supplemental weekData.",NoFirstDay:"Cannot determine locale first day of week. Please load the supplemental weekData. The default culture includes only the 'en-US' first day info.",NoValidCurrency:"Cannot determine a default currency for the {0} locale. Please specify explicitly the currency with the format options.",NoDateFieldNames:"Cannot determine the locale date field names. Please load the locale dateFields data."});var u=r;function c(e){return o(e)?p(e):e}function p(e){if(u[e])return u[e];if(u.supplemental.likelySubtags){var t=e.split("-"),n=t[0],r=t.slice(1),o=function(e,t){for(var n=u.supplemental.likelySubtags,r=0;r=1;i--){var a=r[i];a!==t.variant&&a!==t.script||r.splice(i,1)}var s=r.length;if(s>1)return r[s-1].toUpperCase()}(n,r),e.territory=t,t}function E(e,t){for(var n in t)"numbers"===n?v(e,t[n]):"dates"===n&&M(e,t[n])}function P(){for(var e=arguments,t=arguments.length,n=0;n=l){for(var h=d,f=[];h>-1;){var m=c.substring(h-l,h);m&&f.push(m),h-=l;var y=s.shift();if(0===(l=void 0!==y?y:l)){(m=c.substring(0,h))&&f.push(m);break}}c=f.reverse().join(i.group),p=e.substring(0,t)+c+e.substring(u)}return p}function Q(e){return"currency"===e||"accounting"===e}function ee(e,t,n){void 0===t&&(t=2),void 0===n&&(n=!1);var r=t-String(e).length,o=e;if(r>0){var i=new Array(r+1).join("0");o=n?e+i:i+e}return o}function te(e,t){var n=e,r=t||0;return n=n.toString().split("e"),n=(n=Math.round(Number(n[0]+"e"+(n[1]?Number(n[1])+r:r)))).toString().split("e"),(n=Number(n[0]+"e"+(n[1]?Number(n[1])-r:-r))).toFixed(Math.min(r,20))}var ne=/0+$/;function re(e){var t,n=e.minimumFractionDigits,r=e.maximumFractionDigits,o=e.style,i=Q(o);return i&&(t=function(e){var t=2,n=2,r=((u.supplemental.currencyData||{}).fractions||{})[e];return r&&r._digits&&(n=t=parseInt(r._digits,10)),{minimumFractionDigits:t,maximumFractionDigits:n}}(e.currency)),void 0===n&&(n=i?t.minimumFractionDigits:0),void 0===r&&(r="percent"===o?Math.max(n,0):i?Math.max(n,t.maximumFractionDigits):Math.max(n,3)),{minimumFractionDigits:n,maximumFractionDigits:r}}var oe=/(\\.)|(['][^']*[']?)|(["][^"]*["]?)/g;function ie(e,t){var n=e.format;-1!==n.indexOf("%")&&(e.style="percent",e.symbol=t.numbers.symbols.percentSign,e.number*=100),-1!==n.indexOf("$")&&(e.style="currency",e.symbol=X(t))}function ae(e){var t=e.format;if(t.indexOf("'")>-1||t.indexOf('"')>-1||t.indexOf("\\")>-1){var n=e.literals=[];e.format=t.replace(oe,(function(e){var t=e.charAt(0).replace("\\",""),r=e.slice(1).replace(t,"");return n.push(r),"__??__"}))}}var se=/(\.(?:[0-9]*[1-9])?)0+$/g,le=/\.$/,ue=/\,/g;function ce(e){var t=e.number,n=e.format,r=n.indexOf(".");if(-1!==r){var o=n.lastIndexOf("0")-r,i=n.lastIndexOf("#")-r,a=o>-1,s=i>-1,l=t.toString().split("e"),u=(l=(l=l[1]?te(t,Math.abs(l[1])):l[0]).split(".")[1]||"").length,c=-1;a||s?a&&o>i?u=o:i>o&&(s&&u>i?u=i:a&&u-1&&(t=te(t,u),c>-1&&(t=function(e,t){var n;return n=0===t?se:new RegExp("(\\.[0-9]{"+t+"}[1-9]*)0+$","g"),e.replace(n,"$1").replace(le,"")}(t,c)))}else t=te(t);e.negative&&-1*t>=0&&!e.negativeZero&&(e.negative=!1),e.number=t,e.decimalIndex=r}function pe(e,t,n){return-1===e&&-1!==t?t:-1!==e&&-1===t?e:n?Math.min(e,t):Math.max(e,t)}function de(e,t){var n=e.number;return-1!==e.start&&(n=function(e,t){var n=e;if(t)for(var r=t.length,o=0;o-1&&(p+=f,g=s),s===g){p+=(m?t.numbers.symbols.decimal:"")+m,g+=r-s+1;continue}"0"===b?(p+=b,v=b):"#"===b&&(p+=v)}return c&&(p=J(p,n+(o&&!u?1:0),Math.max(r,y+n),t.numbers.decimal,t)),r>=n&&(p+=a.substring(r+1)),p}(e,t),e.style,e.symbol),e.literals)),n}function he(e,t,n){var r={negative:e<0,number:Math.abs(e),negativeZero:$(e),format:t};return function(e){var t=e.number,n=e.format;if(n=n.split(";"),(e.negative||e.negativeZero)&&n[1])n=n[1],e.hasNegativeFormat=!0;else if(0===t){var r=n[2];n=r||n[0],r&&function(e){return-1===e.indexOf("#")&&-1===e.indexOf("0")}(r)&&(e.constant=r)}else n=n[0];e.format=n}(r),r.constant?r.constant:(ae(r),ie(r,n),function(e){e.hasGroup=e.format.indexOf(",")>-1,e.hasGroup&&(e.format=e.format.replace(ue,""))}(r),ce(r),function(e){var t=e.format,n=t.indexOf("#"),r=t.indexOf("0"),o=pe(n,r,!0),i=pe(n=t.lastIndexOf("#"),r=t.lastIndexOf("0"));o===t.length&&(i=o),e.start=o,e.end=i,e.lastZeroIndex=r}(r),de(r,n))}var fe=/^(n|c|p|e|a)(\d*)$/i;function me(e){return o(e)?function(e){var t=fe.exec(e);if(t){var n={style:"decimal"},r=t[1].toLowerCase();return"c"===r?n.style="currency":"a"===r?n.style="accounting":"p"===r?n.style="percent":"e"===r&&(n.style="scientific"),t[2]&&(n.minimumFractionDigits=n.maximumFractionDigits=parseInt(t[2],10)),n}}(e):e}function ye(e,t,n){if(void 0===t&&(t="n"),void 0===n&&(n="en"),void 0===e||null===e)return"";if(!isFinite(e))return String(e);var r,o=p(n),i=me(t);if(i){var a=i.style||"decimal";r=function(e,t,n){var r=n.numbers.symbols,o=t.style,i=Q(o);if("scientific"===o)return(void 0!==t.minimumFractionDigits?e.toExponential(t.minimumFractionDigits):e.toExponential()).replace(".",r.decimal);var a,s=e;i&&(t.value=s,a=X(n,t)),"percent"===o&&(s*=100,a=r.percentSign);var l=re(t),u=l.minimumFractionDigits,c=(s=te(s,l.maximumFractionDigits))<0,p=$(e),d=s.split("."),h=d[0],f=ee(d[1]?d[1].replace(ne,""):"",u,!0);c&&(h=h.substring(1)),t.minimumIntegerDigits&&(h=ee(h,t.minimumIntegerDigits));var m,y=!1!==t.useGrouping?J(h,0,h.length,t,n):h;if(f&&(y+=r.decimal+f),i&&"name"===t.currencyDisplay)m=function(e,t){var n=e.numbers.currency,r=1!==t?n["unitPattern-count-other"]:n["unitPattern-count-one"];return t<0&&(r=r.replace("n","-n")),r}(n,e);else{var v=t.patterns;m=c||p?v[1]||"-"+v[0]:v[0]}return"n"!==m||c?function(e,t,n){for(var r="",o=0,i=t.length;o1){var n=(t[1]||"").replace("$","").split("n");if(e.indexOf(n[0])>-1&&e.indexOf(n[1])>-1)return e.replace(n[0],"").replace(n[1],"")}}function xe(e,t,n){var r,o=me(n)||{},i=Q(o.style),a=e,s=o.currency||Z(t,i);if(s){var l=function(e,t,n){void 0===n&&(n=!0);var r=U(e,t,n);if(r){if(!r.displays){var o=[t];for(var i in r)o.push(r[i]);o.sort(H),r.displays=o}return r.displays}}(t,s,i);if(l)for(var u=0;u-1)&&(s=s.replace(a.percentSign,""),r=!0),ge.test(s))return s=parseFloat(s.replace(a.decimal,".")),isNaN(s)?null:s;var u=xe(s,i,l),c=u.negative,d=u.number,h=(s=String(d).trim()).indexOf("-");if(h>0)return null;var f=h>-1;return f=void 0!==c?c:f,s=s.replace("-","").replace(be," ").split(a.group.replace(be," ")).join("").replace(a.decimal,"."),s=parseFloat(s),isNaN(s)?s=null:f&&(s*=-1),s&&r&&(s/=100),s}var _e=/\{(\d+)}/g;function Ce(e){var t=arguments;return e.replace(_e,(function(e,n){return t[parseInt(n,10)+1]}))}var Se=[2,1,5,3,4],Ne={};Ne[(-2).toString()]=8,Ne[(-1).toString()]=6,Ne[2..toString()]=6,Ne[1..toString()]=3;var Oe={numeric:1,"2-digit":2,short:3,long:4,narrow:5},Me=/[hHmsSzZoOvVxX]/;var Te=[{key:"era",specifier:"G"},{key:"year",specifier:"y"},{key:"month",specifier:"M"},{key:"day",specifier:"d"},{key:"weekday",specifier:"E"},{key:"hour",getSpecifier:function(e){return e.hour12?"h":"H"}},{key:"minute",specifier:"m"},{key:"second",specifier:"s"},{key:"timeZoneName",specifier:"z"}],Ee={e:"c",E:"c",M:"L",Q:"q"},Pe={},De={};function Ae(e){return Pe[e]||(Pe[e]=new RegExp(e+"+")),Pe[e]}function Ie(e){for(var t=[],n=e.charAt(0),r=n,o=1;oi&&(i=u,n=s,r=t[a])}r=r.replace("v","z");for(var f=0;f0){var i=e.substr(0,o),a=e.substr(o);r=Ce(t.calendar.dateTimeFormats.short,n[a]||Le(Ie(a),n),n[i]||Le(Ie(i),n))}else r=Le(Ie(e),n);return function(e,t,n){De[n]||(De[n]={}),De[n][e]=t}(e,r,t.name),r}function je(e,t){var n,r=t.calendar;if(o(e))n=r.patterns[e]?r.patterns[e]:e;else if(e){if(e.pattern)return e.pattern;var i=e.skeleton;i||(e.datetime?n=Ce(r.dateTimeFormats[e.datetime],r.timeFormats[e.datetime],r.dateFormats[e.datetime]):e.date?n=r.dateFormats[e.date]:e.time?n=r.timeFormats[e.time]:i=function(e){for(var t=[],n=0;n3,localizedName:4===t,zZeroOffset:5===t})},We.x=function(e,t,n){return Ke(e,n,{optionalMinutes:1===t,separator:3===t||5===t})},We.X=function(e,t,n){return Ke(e,n,{optionalMinutes:1===t,separator:3===t||5===t,zZeroOffset:!0})},We.G=function(e,t,n){var r=e.getFullYear()>=0?1:0;return ze(n,"eras",t)[r]},We.e=qe,We.c=function(e,t,n){return qe(e,t,n,!0)},We.q=function(e,t,n){return Ge(e,t,n,!0)},We.Q=Ge;var Xe=/([+|\-]\d{1,2})(:?)(\d{2})?/,Je=/^\/Date\((.*?)\)\/$/,Qe=/[+-]\d*/,et={2:/^\d{1,2}/,3:/^\d{1,3}/,4:/^\d{4}/},tt=/\d+/,nt=/^ */,rt=/ *$/,ot=["yyyy/MM/dd HH:mm:ss","yyyy/MM/dd HH:mm","yyyy/MM/dd","E MMM dd yyyy HH:mm:ss","yyyy-MM-ddTHH:mm:ss.SSSSSSSXXX","yyyy-MM-ddTHH:mm:ss.SSSXXX","yyyy-MM-ddTHH:mm:ss.SSXXX","yyyy-MM-ddTHH:mm:ssXXX","yyyy-MM-ddTHH:mm:ss.SSSSSSS","yyyy-MM-ddTHH:mm:ss.SSS","yyyy-MM-ddTHH:mmXXX","yyyy-MM-ddTHH:mmX","yyyy-MM-ddTHH:mm:ss","yyyy-MM-ddTHH:mm","yyyy-MM-dd HH:mm:ss","yyyy-MM-dd HH:mm","yyyy-MM-dd","HH:mm:ss","HH:mm"],it=["G","g","F","Y","y","M","m","D","d","y","T","t"];function at(e,t,n){return!(e>=t&&e<=n)}function st(e,t){for(var n=t.format,r=t.idx,o=0;n[r]===e;)o++,r++;return o>0&&(r-=1),t.idx=r,o}function lt(e,t){var n=e?et[e]||new RegExp("^\\d{1,"+e+"}"):tt,r=t.value.substr(t.valueIdx,e).match(n);return r?(r=r[0],t.valueIdx+=r.length,parseInt(r,10)):null}function ut(e,t,n){for(var r,o,i,a=0,s=e.length,l=0,u=0;al&&(l=o,u=a);return l?(t.valueIdx+=l,u+1):null}function ct(e){var t=!1;return e.value.charAt(e.valueIdx)===e.format[e.idx]&&(e.valueIdx++,t=!0),t}function pt(e,t,n){var r=n.shortHours,o=n.noSeparator,i=n.optionalMinutes,a=n.localizedName,s=n.zLiteral;if(e.UTC=!0,s&&"Z"===e.value.charAt(e.valueIdx))return e.valueIdx++,!1;if(a&&!ut(function(e){var t=e.gmtFormat,n=e.gmtZeroFormat;if(!t)throw l.NoGMTInfo.error();return[t.replace("{0}","").toLowerCase(),n.replace("{0}","").toLowerCase()]}(t.calendar),e,!0))return!0;var u=Xe.exec(e.value.substr(e.valueIdx,6));if(!u)return!a;var c=u[1],p=u[3],d=parseInt(c,10),h=u[2],f=parseInt(p,10);return!!(isNaN(d)||!r&&3!==c.length||!i&&isNaN(f)||o&&h)||(isNaN(f)&&(f=null),!!(at(d,-12,13)||f&&at(f,0,59))||(e.valueIdx+=u[0].length,e.hoursOffset=d,void(e.minutesOffset=f)))}function dt(e,t,n){var r=st(e,t),o=ze(n,"months",r,"L"===e,!0),i=r<3?lt(2,t):ut(o,t,!0);if(null===i||at(i,1,12))return!0;t.month=i-1}function ht(e,t,n){var r=st(e,t),o=ze(n,"days",r,"c"===e,!0),i=r<3?lt(1,t):ut(o,t,!0);if(!i&&0!==i||at(i,1,7))return!0}var ft={};function mt(e,t){return""+nt.exec(t)[0]+e+rt.exec(t)[0]}function yt(e,t,n){for(var r=je(t,n).split(""),o={format:r,idx:0,value:mt(e,t),valueIdx:0,year:null,month:null,day:null,hours:null,minutes:null,seconds:null,milliseconds:null},i=r.length,a=!1;o.idx2029&&(n-=100)}e.year=n},ft.h=function(e){st("h",e);var t=lt(2,e);if(12===t&&(t=0),null===t||at(t,0,11))return!0;e.hours=t},ft.K=function(e){st("K",e);var t=lt(2,e);if(null===t||at(t,0,11))return!0;e.hours=t},ft.a=function(e,t){var n=ze(t,"dayPeriods",st("a",e),!1,!0),r=ut([n.pm],e,!0);if(!r&&!ut([n.am],e,!0))return!0;e.pmHour=r},ft.H=function(e){st("H",e);var t=lt(2,e);if(null===t||at(t,0,23))return!0;e.hours=t},ft.k=function(e){st("k",e);var t=lt(2,e);if(null===t||at(t,1,24))return!0;e.hours=24===t?0:t},ft.m=function(e){st("m",e);var t=lt(2,e);if(null===t||at(t,0,59))return!0;e.minutes=t},ft.s=function(e){st("s",e);var t=lt(2,e);if(null===t||at(t,0,59))return!0;e.seconds=t},ft.S=function(e){var t=st("S",e),n=e.value.substr(e.valueIdx,t),r=null;if(isNaN(parseInt(n,10))||(r=te(r=parseFloat("0."+n,10),3),r*=1e3,e.valueIdx+=t),null===r||at(r,0,999))return!0;e.milliseconds=r},ft.z=function(e,t){var n=st("z",e)<4,r=pt(e,t,{shortHours:n,optionalMinutes:n,localizedName:!0});if(r)return r},ft.Z=function(e,t){var n=st("Z",e),r=pt(e,t,{noSeparator:n<4,zLiteral:5===n,localizedName:4===n});if(r)return r},ft.x=function(e,t){var n=st("x",e),r=pt(e,t,{noSeparator:3!==n&&5!==n,optionalMinutes:1===n});if(r)return r},ft.X=function(e,t){var n=st("X",e),r=pt(e,t,{noSeparator:3!==n&&5!==n,optionalMinutes:1===n,zLiteral:!0});if(r)return r},ft.G=function(e,t){var n=ze(t,"eras",st("G",e),!1,!0);if(null===ut([n[0],n[1]],e,!0))return!0},ft.e=function(e,t){return ht("e",e,t)},ft.c=function(e,t){return ht("c",e,t)};var bt={month:{type:"months",minLength:3,standAlone:"L"},quarter:{type:"quarters",minLength:3,standAlone:"q"},weekday:{type:"days",minLength:{E:0,c:3,e:3},standAlone:"c"},dayperiod:{type:"dayPeriods",minLength:0},era:{type:"eras",minLength:0}};function wt(e,t){var n=e[e.length-1];n&&"literal"===n.type?n.pattern+=t:e.push({type:"literal",pattern:t})}function xt(e){return"h"===e||"K"===e}function kt(e,t){void 0===t&&(t="en");for(var n=je(e,p(t)),r=[],o=Ve.lastIndex=0,i=Ve.exec(n);i;){var a=i[0];if(o=d&&(u.names={type:c.type,nameType:Fe(h),standAlone:c.standAlone===s})}r.push(u)}o=Ve.lastIndex,i=Ve.exec(n)}return o=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}n.d(t,"a",(function(){return r}))},,function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(55);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 i(e){for(var t=1;t=0&&a-(o+s)<0&&(p.top=e.pageY,p.height=o+s),t.direction.indexOf("s")>=0&&a-c<0&&(p.height=c),t.direction.indexOf("w")>=0&&i-(r+l)<0&&(p.left=e.pageX,p.width=r+l),t.direction.indexOf("e")>=0&&i-u<0&&(p.width=u),n.setState(p),n.dispatchMoveEvent(n.props.onResize,e,!0,t.end)},n.dispatchMoveEvent=function(e,t,r,o){e&&e.call(void 0,{nativeEvent:t.nativeEvent?t.nativeEvent:t.originalEvent,drag:r,end:o,target:n,left:n.state.left,top:n.state.top,width:n.state.width,hight:n.state.height,height:n.state.height})},n.handleBrowserWindowResize=function(){n.windowStage===r.FULLSCREEN&&n.setState({width:window.innerWidth,height:window.innerHeight})},n.state={stage:n.props.stage||r.DEFAULT,isDragging:!1,top:n.props.top||n.props.initialTop||n.getInitialTop(),left:n.props.left||n.props.initialLeft||n.getInitialLeft(),width:n.props.width||n.props.initialWidth||300,height:n.props.height||n.props.initialHeight||300},n.windowCoordinatesState={leftBeforeAction:n.props.left||n.props.initialLeft||n.getInitialLeft(),topBeforeAction:n.props.top||n.props.initialTop||n.getInitialTop(),widthBeforeAction:n.props.width||n.props.initialWidth||300,heightBeforeAction:n.props.height||n.props.initialHeight||300},n}w(t,e),t.prototype.componentDidMount=function(){window&&window.addEventListener("resize",this.handleBrowserWindowResize)},t.prototype.componentWillUnmount=function(){window&&window.removeEventListener("resize",this.handleBrowserWindowResize)},t.prototype.render=function(){var e=this,t=Object(l.d)("k-widget","k-window","k-window-wrapper",{"k-window-minimized":"MINIMIZED"===this.state.stage});return o.createElement(o.Fragment,null,this.props.modal&&o.createElement("div",{className:"k-overlay"}),o.createElement("div",{tabIndex:0,onFocus:function(e){return e.target.classList.add("k-state-focused")},onBlur:function(e){return e.target.classList.remove("k-state-focused")},onKeyDown:this.handleKeyDown,ref:function(t){return e.windowElement=t},className:t,style:x({top:this.top,left:this.left,width:this.width,height:this.height||""},this.props.style)},o.createElement(b,{shouldUpdateOnDrag:this.props.shouldUpdateOnDrag||!1,isDragging:this.state.isDragging},o.createElement(l.a,{onPress:this.onPress,onDrag:this.onDrag,onRelease:this.onRelease,ref:function(t){return e.draggable=t}},o.createElement(f,{stage:this.windowStage,onDoubleClick:this.props.doubleClickStageChange?this.handleDoubleClick:void 0,onMinimizeButtonClick:this.handleMinimize,onFullScreenButtonClick:this.handleFullscreen,onRestoreButtonClick:this.handleRestore,onCloseButtonClick:this.handleCloseWindow,closeButton:this.props.closeButton,minimizeButton:this.props.minimizeButton,maximizeButton:this.props.maximizeButton,restoreButton:this.props.restoreButton},this.props.title)),this.windowStage!==r.MINIMIZED?o.createElement("div",{className:"k-content k-window-content"},this.props.children):null,this.windowStage===r.DEFAULT&&this.props.resizable?o.createElement(v,{onResize:this.handleResize}):null)))},Object.defineProperty(t.prototype,"top",{get:function(){return this.windowStage!==r.FULLSCREEN?Math.max(this.props.top||this.state.top,0):0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"left",{get:function(){return this.windowStage!==r.FULLSCREEN?Math.max(this.props.left||this.state.left,0):0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){var e=this.props.width||this.state.width;return this.windowStage===r.FULLSCREEN&&(e=window.innerWidth),e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){var e=this.props.height||this.state.height;return this.windowStage===r.FULLSCREEN?e=window.innerHeight:this.windowStage===r.MINIMIZED&&(e=0),e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"windowStage",{get:function(){return this.props.stage||this.state.stage},enumerable:!0,configurable:!0}),t.propTypes={id:i.string,width:i.oneOfType([i.number,i.string]),height:i.oneOfType([i.number,i.string]),left:i.oneOfType([i.number,i.string]),top:i.oneOfType([i.number,i.string]),initialwidth:i.oneOfType([i.number,i.string]),initialHeight:i.oneOfType([i.number,i.string]),initialLeft:i.oneOfType([i.number,i.string]),initialTop:i.oneOfType([i.number,i.string]),minWidth:i.oneOfType([i.number,i.string]),minHeight:i.oneOfType([i.number,i.string]),resizable:i.bool,draggable:i.bool,title:i.any,shouldUpdateOnDrag:i.bool,stage:i.oneOf(["DEFAULT","MINIMIZED","FULLSCREEN"])},t.defaultProps={minWidth:120,minHeight:100,resizable:!0,draggable:!0,modal:!1,doubleClickStageChange:!0}}(o.Component)},function(e,t,n){"use strict";n.r(t),n.d(t,"autoJoin",(function(){return E})),n.d(t,"baseKeymap",(function(){return j})),n.d(t,"chainCommands",(function(){return P})),n.d(t,"createParagraphNear",(function(){return w})),n.d(t,"deleteSelection",(function(){return a})),n.d(t,"exitCode",(function(){return b})),n.d(t,"joinBackward",(function(){return s})),n.d(t,"joinDown",(function(){return m})),n.d(t,"joinForward",(function(){return p})),n.d(t,"joinUp",(function(){return f})),n.d(t,"lift",(function(){return y})),n.d(t,"liftEmptyBlock",(function(){return x})),n.d(t,"macBaseKeymap",(function(){return L})),n.d(t,"newlineInCode",(function(){return v})),n.d(t,"pcBaseKeymap",(function(){return I})),n.d(t,"selectAll",(function(){return S})),n.d(t,"selectNodeBackward",(function(){return u})),n.d(t,"selectNodeForward",(function(){return d})),n.d(t,"selectParentNode",(function(){return C})),n.d(t,"setBlockType",(function(){return M})),n.d(t,"splitBlock",(function(){return k})),n.d(t,"splitBlockKeepMarks",(function(){return _})),n.d(t,"toggleMark",(function(){return T})),n.d(t,"wrapIn",(function(){return O}));var r=n(9),o=n(5),i=n(6);function a(e,t){return!e.selection.empty&&(t&&t(e.tr.deleteSelection().scrollIntoView()),!0)}function s(e,t,n){var o=e.selection.$cursor;if(!o||(n?!n.endOfTextblock("backward",e):o.parentOffset>0))return!1;var a=c(o);if(!a){var s=o.blockRange(),u=s&&Object(r.liftTarget)(s);return null!=u&&(t&&t(e.tr.lift(s,u).scrollIntoView()),!0)}var p=a.nodeBefore;if(!p.type.spec.isolating&&N(e,a,t))return!0;if(0==o.parent.content.size&&(l(p,"end")||i.NodeSelection.isSelectable(p))){if(t){var d=e.tr.deleteRange(o.before(),o.after());d.setSelection(l(p,"end")?i.Selection.findFrom(d.doc.resolve(d.mapping.map(a.pos,-1)),-1):i.NodeSelection.create(d.doc,a.pos-p.nodeSize)),t(d.scrollIntoView())}return!0}return!(!p.isAtom||a.depth!=o.depth-1)&&(t&&t(e.tr.delete(a.pos-p.nodeSize,a.pos).scrollIntoView()),!0)}function l(e,t){for(;e;e="start"==t?e.firstChild:e.lastChild)if(e.isTextblock)return!0;return!1}function u(e,t,n){var r=e.selection,o=r.$head,a=o;if(!r.empty)return!1;if(o.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):o.parentOffset>0)return!1;a=c(o)}var s=a&&a.nodeBefore;return!(!s||!i.NodeSelection.isSelectable(s))&&(t&&t(e.tr.setSelection(i.NodeSelection.create(e.doc,a.pos-s.nodeSize)).scrollIntoView()),!0)}function c(e){if(!e.parent.type.spec.isolating)for(var t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function p(e,t,n){var r=e.selection.$cursor;if(!r||(n?!n.endOfTextblock("forward",e):r.parentOffset=0;t--){var n=e.node(t);if(e.index(t)+11&&n.after()!=n.end(-1)){var o=n.before();if(Object(r.canSplit)(e.doc,o))return t&&t(e.tr.split(o).scrollIntoView()),!0}var i=n.blockRange(),a=i&&Object(r.liftTarget)(i);return null!=a&&(t&&t(e.tr.lift(i,a).scrollIntoView()),!0)}function k(e,t){var n=e.selection,a=n.$from,s=n.$to;if(e.selection instanceof i.NodeSelection&&e.selection.node.isBlock)return!(!a.parentOffset||!Object(r.canSplit)(e.doc,a.pos))&&(t&&t(e.tr.split(a.pos).scrollIntoView()),!0);if(!a.parent.isBlock)return!1;if(t){var l=s.parentOffset==s.parent.content.size,u=e.tr;e.selection instanceof i.TextSelection&&u.deleteSelection();var c=0==a.depth?null:g(a.node(-1).contentMatchAt(a.indexAfter(-1))),p=l&&c?[{type:c}]:null,d=Object(r.canSplit)(u.doc,u.mapping.map(a.pos),1,p);p||d||!Object(r.canSplit)(u.doc,u.mapping.map(a.pos),1,c&&[{type:c}])||(p=[{type:c}],d=!0),d&&(u.split(u.mapping.map(a.pos),1,p),l||a.parentOffset||a.parent.type==c||!a.node(-1).canReplace(a.index(-1),a.indexAfter(-1),o.Fragment.from(c.create(),a.parent))||u.setNodeMarkup(u.mapping.map(a.before()),c)),t(u.scrollIntoView())}return!0}function _(e,t){return k(e,t&&function(n){var r=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();r&&n.ensureMarks(r),t(n)})}function C(e,t){var n,r=e.selection,o=r.$from,a=r.to,s=o.sharedDepth(a);return 0!=s&&(n=o.before(s),t&&t(e.tr.setSelection(i.NodeSelection.create(e.doc,n))),!0)}function S(e,t){return t&&t(e.tr.setSelection(new i.AllSelection(e.doc))),!0}function N(e,t,n){var a,s,l=t.nodeBefore,u=t.nodeAfter;if(l.type.spec.isolating||u.type.spec.isolating)return!1;if(function(e,t,n){var o=t.nodeBefore,i=t.nodeAfter,a=t.index();return!!(o&&i&&o.type.compatibleContent(i.type))&&(!o.content.size&&t.parent.canReplace(a-1,a)?(n&&n(e.tr.delete(t.pos-o.nodeSize,t.pos).scrollIntoView()),!0):!(!t.parent.canReplace(a,a+1)||!i.isTextblock&&!Object(r.canJoin)(e.doc,t.pos))&&(n&&n(e.tr.clearIncompatible(t.pos,o.type,o.contentMatchAt(o.childCount)).join(t.pos).scrollIntoView()),!0))}(e,t,n))return!0;if(t.parent.canReplace(t.index(),t.index()+1)&&(a=(s=l.contentMatchAt(l.childCount)).findWrapping(u.type))&&s.matchType(a[0]||u.type).validEnd){if(n){for(var c=t.pos+u.nodeSize,p=o.Fragment.empty,d=a.length-1;d>=0;d--)p=o.Fragment.from(a[d].create(null,p));p=o.Fragment.from(l.copy(p));var h=e.tr.step(new r.ReplaceAroundStep(t.pos-1,c,t.pos,c,new o.Slice(p,1,0),a.length,!0)),f=c+2*a.length;Object(r.canJoin)(h.doc,f)&&h.join(f),n(h.scrollIntoView())}return!0}var m=i.Selection.findFrom(t,1),y=m&&m.$from.blockRange(m.$to),v=y&&Object(r.liftTarget)(y);return null!=v&&v>=t.depth&&(n&&n(e.tr.lift(y,v).scrollIntoView()),!0)}function O(e,t){return function(n,o){var i=n.selection,a=i.$from,s=i.$to,l=a.blockRange(s),u=l&&Object(r.findWrapping)(l,e,t);return!!u&&(o&&o(n.tr.wrap(l,u).scrollIntoView()),!0)}}function M(e,t){return function(n,r){var o=n.selection,i=o.from,a=o.to,s=!1;return n.doc.nodesBetween(i,a,(function(r,o){if(s)return!1;if(r.isTextblock&&!r.hasMarkup(e,t))if(r.type==e)s=!0;else{var i=n.doc.resolve(o),a=i.index();s=i.parent.canReplaceWith(a,a+1,e)}})),!!s&&(r&&r(n.tr.setBlockType(i,a,e,t).scrollIntoView()),!0)}}function T(e,t){return function(n,r){var o=n.selection,i=o.empty,a=o.$cursor,s=o.ranges;if(i&&!a||!function(e,t,n){for(var r=function(r){var o=t[r],i=o.$from,a=o.$to,s=0==i.depth&&e.type.allowsMarkType(n);if(e.nodesBetween(i.pos,a.pos,(function(e){if(s)return!1;s=e.inlineContent&&e.type.allowsMarkType(n)})),s)return{v:!0}},o=0;o-1}}return function(n,o){return e(n,o&&function(e,t){return function(n){if(!n.isGeneric)return e(n);for(var o=[],i=0;i=0;b--)Object(r.canJoin)(n.doc,l[b])&&n.join(l[b]);e(n)}}(o,t))}}function P(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return function(t,n,r){for(var o=0;o-1?r.createElement(m,v({index:t},e,{style:o})):null},n.firstNavigatableTab=function(){var e=n.children(),t=r.Children.count(e);if(e)for(var o=0;o0;o--)if(!e[o].props.disabled)return o},n.prevNavigatableTab=function(){var e=n.children(),t=n.props.selected,r=t?t-1:-1;if(r<0)return n.lastNavigatableTab();if(e)for(var o=r;o>-1;o--){if(!e[o].props.disabled)return o;if(0===o)return n.lastNavigatableTab()}},n.nextNavigatableTab=function(){var e=n.children(),t=n.props.selected,o=t?t+1:1,i=r.Children.count(e);if(o>=i)return n.firstNavigatableTab();if(e)for(var a=o;a-1&&a,!1,l.concat([p]))),r.cloneElement(i,k({},i.props,{animation:void 0!==i.props.animation?i.props.animation:t,id:i.props.id||"k-panelbar-item-default-"+p,uniquePrivateKey:p,parentUniquePrivateKey:l,parentExpanded:a,root:s,expanded:(n.expanded||[]).indexOf(p)>-1&&a,focused:n.focused===p&&n.wrapperFocused,selected:n.selected===p,children:c,onSelect:o}))}return r.createElement("div",{className:"k-content"},i)}))};var C;(C||(C={})).mapItemsToComponents=function e(t){return t.map((function(t,n){var o;return t.content&&(o=t.content),t.children&&(o=e(t.children)),r.createElement(x,k({},t,{children:o,key:t.id||n}))}))};var S,N=function(){function e(e,t,n){var o=this;this.flatChildren=function(e,t){return void 0===t&&(t=[]),r.Children.forEach(e,(function(e){e&&e.props&&!e.props.disabled&&(t.push(e),e.props.children&&o.flatChildren(e.props.children,t))})),t},this.flatVisibleChildren=function(e,t){return void 0===t&&(t=[]),r.Children.forEach(e,(function(e){e&&e.props&&!e.props.disabled&&(e.props.expanded||e.props.parentExpanded)&&(t.push(e),e.props.children&&o.flatVisibleChildren(e.props.children,t))})),t},this.onSelect=e,this.onFocus=t,this.expandMode=n}return e.prototype.select=function(e,t,n){var o,i,a,s;switch(this.flatChildren(r.Children.toArray(t)).forEach((function(t){t.props.uniquePrivateKey===e&&(o=t)})),this.expandMode){case"single":i=o.props.parentUniquePrivateKey.concat([o.props.uniquePrivateKey]),s=i,(a=n).length===s.length&&a.every((function(e,t){return e===s[t]}))&&(i=o.props.parentUniquePrivateKey?o.props.parentUniquePrivateKey.slice():[]);break;case"multiple":var l=(i=n.slice()).indexOf(o.props.uniquePrivateKey);-1===l?i.push(o.props.uniquePrivateKey):i.splice(l,1);break;default:i=n.slice()}this.onSelect(o,i)},e.prototype.focus=function(e,t,n){var o,i=this.flatVisibleChildren(r.Children.toArray(n));i.forEach((function(n,r){if(n.props.uniquePrivateKey===e){var a=r+t<0?0:r+t>=i.length?i.length-1:r+t;o=i[a]}})),this.onFocus(o)},e.prototype.setExpandMode=function(e){this.expandMode=e},e}();!function(e){e[e.Toggle=0]="Toggle",e[e.Next=1]="Next",e[e.Previous=2]="Previous"}(S||(S={}));var O=function(){function e(e){this.onNavigate=e}return e.prototype.navigate=function(e,t){var n;switch(e.keyCode){case i.b.left:n=t?S.Next:S.Previous;break;case i.b.up:n=S.Previous;break;case i.b.right:n=t?S.Previous:S.Next;break;case i.b.down:n=S.Next;break;case i.b.space:case i.b.enter:n=S.Toggle;break;default:n=null}null!==n&&(e.preventDefault(),this.onNavigate(n))},e}(),M=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),T=function(){return(T=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0?(Number(t)-1).toString():(n-1).toString():t}var B=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),U=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return B(t,e),t.prototype.render=function(){return null},t.propTypes={text:o.string,url:o.string,icon:o.string,disabled:o.bool,cssClass:o.string,cssStyle:o.object,render:o.any,linkRender:o.any,contentRender:o.any,data:o.any},t}(r.Component);function H(e,t){if(e&&e.length>0)return{items:G(e),inputItems:e};if(Z(t).length>0){var n=function e(t){for(var n=[],r=0;r0&&(i.items=a),n.push(i)}return n}(Z(t));return{items:G(n),inputItems:n}}return{items:[],inputItems:[]}}function V(e,t){var n={},r=e||t.props,o=r.text,i=r.url,a=r.icon,s=r.disabled,l=r.cssClass,u=r.cssStyle,c=r.render,p=r.linkRender,d=r.contentRender,h=r.data;return void 0!==o&&(n.text=o),void 0!==i&&(n.url=i),void 0!==a&&(n.icon=a),void 0!==s&&(n.disabled=s),void 0!==l&&(n.cssClass=l),void 0!==u&&(n.cssStyle=u),void 0!==c&&(n.render=c),void 0!==p&&(n.linkRender=p),void 0!==d&&(n.contentRender=d),void 0!==h&&(n.data=h),n}function Z(e){return r.Children.toArray(e).filter((function(e){return e&&e.type===U}))}function G(e,t){for(var n=[],r=0;r0}function y(e){return w(!1,e)}function v(e){return w(!0,e)}function g(){return R(t)?e:f(I(t),e).items}function b(e,n){void 0===n&&(n=t);var r=f(n);return m(n)&&!r.disabled?e?D(n):function(e){var t=f(e).items;return t[t.length-1].id}(n):n}function w(n,r){if(void 0===r&&(r=t),R(r))return z(n,r,e.length);var o=I(r);return A(z(n,F(r),f(o).items.length),o)}}var Y=n(14),$=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),X=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $(t,e),t.prototype.render=function(){return this.props.url?r.createElement("a",{className:this.getMenuItemClassName(),role:"presentation",href:this.props.url,tabIndex:-1},this.props.children):r.createElement("span",{className:this.getMenuItemClassName(),role:"presentation"},this.props.children)},t.prototype.getMenuItemClassName=function(){return Object(i.d)("k-link","k-menu-link",{"k-state-active":this.props.opened})},t.propTypes={opened:o.bool,url:o.string},t}(r.Component),J={vertical:"top",horizontal:"left"},Q={vertical:"top",horizontal:"right"},ee={vertical:"flip",horizontal:"fit"},te={vertical:"fit",horizontal:"flip"},ne={downward:{anchorAlign:{vertical:"bottom",horizontal:"right"},popupAlign:Q,collision:ee},leftward:{anchorAlign:{vertical:"top",horizontal:"left"},popupAlign:Q,collision:te}},re={downward:{anchorAlign:{vertical:"bottom",horizontal:"left"},popupAlign:J,collision:ee},rightward:{anchorAlign:{vertical:"top",horizontal:"right"},popupAlign:J,collision:te}};function oe(e,t,n){return R(e)?t?n?"leftward":"rightward":"downward":n?"leftward":"rightward"}function ie(e){return e?"rtl":"ltr"}function ae(e,t){return e+"_"+t}var se,le,ue,ce,pe,de=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),he=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return de(t,e),t.prototype.render=function(){return r.createElement("span",{className:this.getArrowClassName(),role:"presentation"})},t.prototype.getArrowClassName=function(){var e,t=oe(this.props.itemId,!0===this.props.verticalMenu,"rtl"===this.props.dir);return Object(i.d)("k-icon","k-menu-expand-arrow",((e={})["k-i-arrow-60-down"]="downward"===t,e["k-i-arrow-60-right"]="rightward"===t,e["k-i-arrow-60-left"]="leftward"===t,e))},t.propTypes={itemId:o.string,dir:o.string,verticalMenu:o.bool},t}(r.Component),fe=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),me=function(e){function t(t){var n=e.call(this,t)||this;return n.isFirstRender=!0,n.onMouseOver=function(e){n.props.onMouseOver(n.props.item.id),e.stopPropagation()},n.onMouseLeave=function(e){n.props.onMouseLeave(n.props.item.id),e.stopPropagation()},n.state={opened:!1},n}return fe(t,e),t.prototype.componentDidMount=function(){var e=this.props.focusedItemId,t=this.props.item.id;e&&e===t&&this.itemElement.focus(),this.isFirstRender=!1},t.prototype.componentDidUpdate=function(e){var t=this.props.focusedItemId,n=this.props.item.id;t?e.focusedItemId===t||t!==n||this.itemElement.contains(document.activeElement)||this.itemElement.focus():document.activeElement===this.itemElement&&this.itemElement.blur()},t.prototype.render=function(){var e=this,t=this.props.item,n=t.id;return[r.createElement("li",{className:this.getMenuItemClassName(t),style:t.cssStyle,tabIndex:n===this.props.tabbableItemId?0:-1,onMouseOver:this.onMouseOver,onMouseLeave:this.onMouseLeave,onMouseDown:function(t){return e.props.onMouseDown(t)},onBlur:function(){return e.props.onBlur(n)},onFocus:function(){return e.props.onFocus(n)},onClick:function(t){return e.props.onClick(t,n)},role:"menuitem","aria-disabled":!!t.disabled||void 0,"aria-haspopup":t.items.length>0||void 0,"aria-expanded":t.items.length>0?this.Opened:void 0,"aria-label":t.text,"aria-owns":this.Opened?ae(this.props.menuGuid,n):void 0,ref:function(t){return e.itemElement=t},key:"0"},this.contentRender?this.renderContent():this.renderMenuItemLink()),this.renderPopupIfOpened()]},t.prototype.renderContent=function(){var e=this.props.item.contentParentItemId;return r.createElement("div",{className:"k-content",role:"presentation"},r.createElement(this.contentRender,{item:this.props.onOriginalItemNeeded(e),itemId:e}))},t.prototype.renderMenuItemLink=function(){var e=this.props.item;if(this.linkRender)return r.createElement(this.linkRender,{item:this.props.onOriginalItemNeeded(e.id),itemId:e.id,opened:this.Opened,dir:ie(this.props.isDirectionRightToLeft)});var t=this.itemRender?r.createElement(this.itemRender,{item:this.props.onOriginalItemNeeded(e.id),itemId:e.id,key:"1"}):e.text;return r.createElement(X,{url:e.url,opened:this.Opened},[this.renderMenuIconIfApplicable(),t,this.renderArrowIfApplicable()])},t.prototype.renderPopupIfOpened=function(){if(this.Opened){var e=this.props.item.id,t=function(e,t,n){var r=oe(e,t,n);return n?"downward"===r?ne.downward:ne.leftward:"downward"===r?re.downward:re.rightward}(e,this.props.isMenuVertical,this.props.isDirectionRightToLeft),n=t.anchorAlign,o=t.popupAlign,i=t.collision;return r.createElement(Y.a,{anchor:this.itemElement,show:!0,popupClass:this.getPopupClassName(),anchorAlign:n,popupAlign:o,collision:i,animate:!1,key:"1"},r.createElement(ve,{parentItemId:e,items:this.props.item.items,menuGuid:this.props.menuGuid,focusedItemId:this.props.focusedItemId,lastItemIdToBeOpened:this.props.lastItemIdToBeOpened,tabbableItemId:this.props.tabbableItemId,itemRender:this.props.itemRender,linkRender:this.props.linkRender,isMenuVertical:this.props.isMenuVertical,isDirectionRightToLeft:this.props.isDirectionRightToLeft,className:"k-group k-menu-group k-reset",onMouseOver:this.props.onMouseOver,onMouseLeave:this.props.onMouseLeave,onMouseDown:this.props.onMouseDown,onBlur:this.props.onBlur,onFocus:this.props.onFocus,onClick:this.props.onClick,onOriginalItemNeeded:this.props.onOriginalItemNeeded}))}return null},t.prototype.renderMenuIconIfApplicable=function(){return this.props.item.icon?r.createElement("span",{className:"k-icon k-i-"+this.props.item.icon,role:"presentation",key:"0"}):null},t.prototype.renderArrowIfApplicable=function(){return this.props.item.items.length>0?r.createElement(he,{itemId:this.props.item.id,verticalMenu:this.props.isMenuVertical,dir:ie(this.props.isDirectionRightToLeft),key:"2"}):null},Object.defineProperty(t.prototype,"itemRender",{get:function(){return this.props.item.render||this.props.itemRender},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"linkRender",{get:function(){return this.props.item.linkRender||this.props.linkRender},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"contentRender",{get:function(){return this.props.item.contentParentItemId?this.props.item.contentRender:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"Opened",{get:function(){var e,t,n=this.props;return n.item.items.length>0&&(e=n.item.id,0===(t=n.lastItemIdToBeOpened).indexOf(e)&&(t.length===e.length||"_"===t.charAt(e.length)))&&!this.isFirstRender},enumerable:!0,configurable:!0}),t.prototype.getPopupClassName=function(){return Object(i.d)("k-menu-popup",{"k-rtl":this.props.isDirectionRightToLeft})},t.prototype.getMenuItemClassName=function(e){return Object(i.d)("k-item","k-menu-item",{"k-first":(t=e.id,"0"===F(t)),"k-last":e.isLastFromSiblings,"k-state-disabled":e.disabled},e.cssClass);var t},t}(r.Component),ye=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ve=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onMouseOver=function(e){t.props.onMouseOver(t.props.parentItemId),e.stopPropagation()},t.onMouseLeave=function(e){t.props.onMouseLeave(t.props.parentItemId),e.stopPropagation()},t}return ye(t,e),t.prototype.render=function(){var e=this.props.parentItemId;return r.createElement("ul",{className:this.props.className,role:void 0!==e?"menu":"menubar",id:void 0!==e?ae(this.props.menuGuid,e):void 0,onMouseOver:void 0!==e?this.onMouseOver:void 0,onMouseLeave:void 0!==e?this.onMouseLeave:void 0,"aria-orientation":this.props["aria-orientation"]},this.renderChildItems())},t.prototype.renderChildItems=function(){var e=this;return this.props.items.length>0?this.props.items.map((function(t,n){return r.createElement(me,{item:t,isMenuVertical:e.props.isMenuVertical,isDirectionRightToLeft:e.props.isDirectionRightToLeft,focusedItemId:e.props.focusedItemId,lastItemIdToBeOpened:e.props.lastItemIdToBeOpened,tabbableItemId:e.props.tabbableItemId,itemRender:e.props.itemRender,linkRender:e.props.linkRender,menuGuid:e.props.menuGuid,onMouseOver:e.props.onMouseOver,onMouseLeave:e.props.onMouseLeave,onMouseDown:e.props.onMouseDown,onBlur:e.props.onBlur,onFocus:e.props.onFocus,onClick:e.props.onClick,onOriginalItemNeeded:e.props.onOriginalItemNeeded,key:n})})):null},t}(r.Component),ge=function(){function e(){this.phase="Initialized"}return e.prototype.getIsDirectionRightToLeft=function(){return this.isDirectionRightToLeft},e.prototype.setIsDirectionRightToLeft=function(e){this.phase="NotInitialized"===this.phase?"Initialized":"NewValueReceived",this.previousIsDirectionRightToLeft=this.isDirectionRightToLeft,this.isDirectionRightToLeft=e},e.prototype.hasDirectionChanged=function(){return"NewValueReceived"===this.phase&&this.previousIsDirectionRightToLeft!==this.isDirectionRightToLeft},e}(),be=function(){function e(e,t,n){this.openOnClick=e,this.resetMenu=t,this.openItem=n,this.openOnClick=e,this.isMouseOverEnabled=!e}return Object.defineProperty(e.prototype,"OpenOnClick",{set:function(e){Boolean(e)!==Boolean(this.openOnClick)&&(this.mouseDown=!1,this.isMouseOverEnabled=!e),this.openOnClick=e},enumerable:!0,configurable:!0}),e.prototype.handleItemSelectedViaKeyboard=function(){this.openOnClick&&(this.isMouseOverEnabled=!1,this.resetMenu())},Object.defineProperty(e.prototype,"IsMouseOverEnabled",{get:function(){return this.isMouseOverEnabled},enumerable:!0,configurable:!0}),e.prototype.handleItemMouseDown=function(){this.mouseDown=!0},e.prototype.handleItemFocus=function(){this.openOnClick&&!this.mouseDown&&(this.isMouseOverEnabled=!0),this.mouseDown=!1},e.prototype.handleItemClick=function(e,t){this.openOnClick&&(this.isMouseOverEnabled?t&&(this.isMouseOverEnabled=!1,this.resetMenu()):(this.isMouseOverEnabled=!0,this.openItem(e)))},e}(),we=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),xe={focusedItemId:"",hoveredItemId:"",tabbableItemId:"0"},ke=(function(e){function t(t){var n=e.call(this,t)||this;return n.guid=Object(i.l)(),n.directionHolder=new ge,n.reset=function(){n.clearItemHoverAndLeaveRequestsIfApplicable(),n.setState(xe)},n.onKeyDown=function(e){if(""!==n.state.focusedItemId){var t=E(n.state.focusedItemId,n.items),r=W(n.items,t.id,e.keyCode,e.key,n.props.vertical,n.directionHolder.getIsDirectionRightToLeft());t.id!==r&&(e.preventDefault(),n.setFocusedItemId(r)),e.keyCode!==i.b.enter&&e.keyCode!==i.b.space||t.disabled||(n.mouseOverHandler.handleItemSelectedViaKeyboard(),n.dispatchSelectEventIfWired(e,t.id),!e.isDefaultPrevented()&&0===t.items.length&&t.url&&window.location.assign(t.url))}},n.onItemMouseOver=function(e){n.mouseOverHandler.IsMouseOverEnabled&&(n.clearItemHoverAndLeaveRequestsIfApplicable(),n.itemHoverRequest=setTimeout((function(){n.setHoveredItemId(e),n.itemHoverRequest=null}),function(e){return void 0!==e.hoverOpenDelay?e.hoverOpenDelay:e.openOnClick?0:100}(n.props)))},n.onItemMouseLeave=function(e){n.mouseOverHandler.IsMouseOverEnabled&&n.isItemWithDefaultClose(e)&&(n.clearItemHoverAndLeaveRequestsIfApplicable(),n.itemLeaveRequest=setTimeout((function(){n.setHoveredItemId(""),n.itemLeaveRequest=null}),function(e){return void 0!==e.hoverCloseDelay?e.hoverCloseDelay:100}(n.props)))},n.onItemMouseDown=function(){n.mouseOverHandler.handleItemMouseDown()},n.onItemFocus=function(e){n.setFocusedItemId(e),n.mouseOverHandler.handleItemFocus()},n.onItemClick=function(e,t){var r=E(t,n.items);r.disabled||(n.setFocusedItemId(t),n.mouseOverHandler.handleItemClick(t,n.isItemWithDefaultClose(t)),n.dispatchSelectEventIfWired(e,t),!e.isDefaultPrevented()&&r.url&&window.location.assign(r.url))},n.onItemBlur=function(e){n.isItemWithDefaultClose(e)&&n.setFocusedItemId("")},n.getInputItem=function(e){return E(e,n.inputItems)},n.mouseOverHandler=new be(n.props.openOnClick,n.reset,n.onItemMouseOver),n.state=Object.assign({},xe,{isFirstRender:!0}),n}we(t,e),t.prototype.render=function(){var e=this;this.prepareItems(),this.state.isFirstRender||this.directionHolder.setIsDirectionRightToLeft(this.checkIsDirectionRightToLeft());var t=this.state.hoveredItemId?this.state.hoveredItemId:this.state.focusedItemId?I(this.state.focusedItemId):"";return r.createElement("div",{onKeyDown:this.onKeyDown,style:this.props.style,className:this.getMenuWrapperClassName(),ref:function(t){return e.menuWrapperEl=t}},r.createElement(ve,{className:this.getMenuClassName(),"aria-orientation":this.props.vertical?"vertical":void 0,items:this.items,isMenuVertical:this.props.vertical,isDirectionRightToLeft:this.directionHolder.getIsDirectionRightToLeft(),focusedItemId:this.state.focusedItemId,lastItemIdToBeOpened:t,tabbableItemId:this.state.tabbableItemId,itemRender:this.props.itemRender,linkRender:this.props.linkRender,menuGuid:this.guid,onMouseLeave:this.onItemMouseLeave,onMouseOver:this.onItemMouseOver,onMouseDown:this.onItemMouseDown,onFocus:this.onItemFocus,onClick:this.onItemClick,onBlur:this.onItemBlur,onOriginalItemNeeded:this.getInputItem}))},t.prototype.componentDidMount=function(){this.setState({isFirstRender:!1})},t.prototype.componentDidUpdate=function(e){(Boolean(e.vertical)!==Boolean(this.props.vertical)||this.directionHolder.hasDirectionChanged())&&this.reset(),this.mouseOverHandler.OpenOnClick=this.props.openOnClick},t.prototype.componentWillUnmount=function(){this.clearItemHoverAndLeaveRequestsIfApplicable()},t.prototype.setFocusedItemId=function(e){this.setState((function(t){var n=""===e?t.tabbableItemId:P(e);return{hoveredItemId:""===e||L(t.hoveredItemId)&&L(e)?t.hoveredItemId:"",focusedItemId:e,tabbableItemId:n}}))},t.prototype.setHoveredItemId=function(e){this.setState((function(t){return L(e)&&L(t.focusedItemId)?{hoveredItemId:e,focusedItemId:t.focusedItemId,tabbableItemId:t.tabbableItemId}:{hoveredItemId:e,focusedItemId:"",tabbableItemId:"0"}}))},t.prototype.getMenuWrapperClassName=function(){return Object(i.d)({"k-rtl":this.directionHolder.getIsDirectionRightToLeft()},this.props.className)},t.prototype.getMenuClassName=function(){return Object(i.d)("k-widget","k-reset","k-header","k-menu",{"k-menu-horizontal":!this.props.vertical},{"k-menu-vertical":this.props.vertical})},t.prototype.clearItemHoverAndLeaveRequestsIfApplicable=function(){this.itemHoverRequest&&(clearTimeout(this.itemHoverRequest),this.itemHoverRequest=null),this.itemLeaveRequest&&(clearTimeout(this.itemLeaveRequest),this.itemLeaveRequest=null)},t.prototype.isItemWithDefaultClose=function(e){return!this.props.customCloseItemIds||-1===this.props.customCloseItemIds.indexOf(e)},t.prototype.checkIsDirectionRightToLeft=function(){return void 0!==this.props.dir?"rtl"===this.props.dir:this.menuWrapperEl&&"rtl"===getComputedStyle(this.menuWrapperEl).direction},t.prototype.prepareItems=function(){var e=H(this.props.items,this.props.children),t=e.items,n=e.inputItems;this.items=t,this.inputItems=n},t.prototype.dispatchSelectEventIfWired=function(e,t){Object(i.h)(this.props.onSelect,e,this,{item:this.getInputItem(t),itemId:t})},t.propTypes={vertical:o.bool,items:o.arrayOf(o.object),style:o.object,dir:o.string,hoverOpenDelay:o.number,hoverCloseDelay:o.number,openOnClick:o.bool,itemRender:o.any,linkRender:o.any,customCloseItemIds:o.arrayOf(o.string),onSelect:o.func},t.defaultProps={vertical:!1}}(r.Component),function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),_e=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ke(t,e),t.prototype.render=function(){var e,t=this.props,n=t.size,o=t.collapsed,a=t.overlay,s=t.containsSplitter,l=t.collapsible,u=t.resizable,c=t.scrollable,p=t.keepMounted,d=n&&n.length>0,h={flexBasis:n},f=Object(i.d)("k-pane",((e={})["k-state-hidden"]=o,e.hidden=o,e["k-pane-flex"]=s,e["k-pane-static"]=!u&&!l||d,e["k-scrollable"]=c,e));return r.createElement("div",{style:h,className:f},!o||p?this.props.children:void 0,a?r.createElement("div",{className:"k-splitter-overlay k-overlay"}):void 0)},t}(r.Component),Ce=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Se=function(e){function t(t){var n=e.call(this,t)||this;return n.onDrag=function(e,t,r){var o=e.event,i=n.props,a=i.onDrag,s=i.index,l=n.draggable&&n.draggable.element;!r&&o&&o.originalEvent.preventDefault(),l&&!n.isStatic&&n.isDraggable&&a(o,l,s,t,r)},n.onFocus=function(){n.setState({focused:!0})},n.onBlur=function(){n.setState({focused:!1})},n.onToggle=function(e){var t=n.props,r=t.onToggle,o=t.index,i=t.prev,a=t.next;(i.collapsible||a.collapsible)&&r(i.collapsible?o:o+1,e)},n.onPrevToggle=function(e){var t=n.props,r=t.onToggle,o=t.index;t.prev.collapsible&&r(o,e)},n.onNextToggle=function(e){var t=n.props,r=t.onToggle,o=t.index;t.next.collapsible&&r(o+1,e)},n.onKeyDown=function(e){var t=e&&e.keyCode,r=n.isHorizontal,o=n.props.index,a=n.draggable&&n.draggable.element,s=function(t,r,o){e.preventDefault(),n.props.onKeyboardResize(t,r,o,e)};a&&(t===i.b.enter?(e.preventDefault(),n.onToggle(e)):n.isDraggable&&(r&&t===i.b.left?s(a,o,-10):r&&t===i.b.right?s(a,o,10):r||t!==i.b.up?r||t!==i.b.down||s(a,o,10):s(a,o,-10)))},n.previousArrowClass=function(e){var t,r=n.props.prev,o=r.collapsible,a=r.collapsed;return Object(i.d)("k-icon",((t={})["k-hidden"]=!o,t["k-collapse-prev"]=o,t["k-i-arrow-60-left"]=o&&e&&!a,t["k-i-arrow-60-right"]=o&&e&&a,t["k-i-arrow-60-up"]=o&&!e&&!a,t["k-i-arrow-60-down"]=o&&!e&&a,t))},n.nextArrowClass=function(e){var t,r=n.props.next,o=r.collapsible,a=r.collapsed;return Object(i.d)("k-icon",((t={})["k-hidden"]=!o,t["k-collapse-next"]=o,t["k-i-arrow-60-right"]=o&&e&&!a,t["k-i-arrow-60-left"]=o&&e&&a,t["k-i-arrow-60-down"]=o&&!e&&!a,t["k-i-arrow-60-up"]=o&&!e&&a,t))},n.state={focused:!1},n}return Ce(t,e),Object.defineProperty(t.prototype,"isStatic",{get:function(){var e=this.props,t=e.prev,n=e.next,r=t.resizable&&n.resizable,o=t.collapsible||n.collapsible;return!r&&!o},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isDraggable",{get:function(){var e=this.props,t=e.prev,n=e.next,r=t.resizable&&n.resizable,o=t.collapsed||n.collapsed;return!!r&&!o},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isHorizontal",{get:function(){return"horizontal"===this.props.orientation},enumerable:!0,configurable:!0}),t.prototype.render=function(){var e,t=this,n=this.isDraggable,o=this.isStatic,a=this.isHorizontal,s=Object(i.d)("k-splitbar",((e={})["k-state-focused"]=this.state.focused,e["k-splitbar-horizontal"]=a,e["k-splitbar-vertical"]=!a,e["k-splitbar-draggable-horizontal"]=a&&n,e["k-splitbar-draggable-vertical"]=!a&&n,e["k-splitbar-static-horizontal"]=a&&o,e["k-splitbar-static-vertical"]=!a&&o,e)),l=this.previousArrowClass(a),u=this.nextArrowClass(a);return r.createElement(i.a,{onPress:function(e){return t.onDrag(e,!0,!1)},onDrag:function(e){return t.onDrag(e,!1,!1)},onRelease:function(e){return t.onDrag(e,!1,!0)},ref:function(e){t.draggable=e}},r.createElement("div",{tabIndex:o?-1:0,role:"separator",className:s,style:{touchAction:"none"},onFocus:this.onFocus,onBlur:this.onBlur,onDoubleClick:this.onToggle,onKeyDown:this.onKeyDown},r.createElement("div",{className:l,onClick:this.onPrevToggle}),r.createElement("div",{className:"k-resize-handle"}),r.createElement("div",{className:u,onClick:this.onNextToggle})))},t}(r.Component),Ne=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Oe=function(){return(Oe=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0},n.state={isDragging:!1,dragIndex:void 0,startTime:0,originalX:0,originalY:0,originalPrevSize:0,originalNextSize:0,panes:t.defaultPanes||[]},n}Ne(t,e),Object.defineProperty(t.prototype,"isControlledState",{get:function(){return void 0!==this.props.panes},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"panes",{get:function(){return void 0!==this.panesDuringOnChange?this.panesDuringOnChange:this.isControlledState?this.props.panes:this.state.panes},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"orientation",{get:function(){return this.props.orientation||"horizontal"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isRtl",{get:function(){return this._container&&"rtl"===getComputedStyle(this._container).direction||!1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"panesContent",{get:function(){return r.Children.toArray(this.props.children).filter((function(e){return e}))},enumerable:!0,configurable:!0}),t.prototype.render=function(){var e=this,t=this.panesContent,n=this.panesOptions(t),o=Object(i.d)("k-widget","k-splitter","k-splitter-flex","k-splitter-"+this.orientation,this.props.className);return this.validatePanes(n),r.createElement("div",{style:this.props.style,ref:function(t){return e._container=t},className:o},this.mapSplitterPanes(n,t))},t.prototype.surroudingPanes=function(e){return{prevElement:e.previousElementSibling,nextElement:e.nextElementSibling}},t.prototype.isPercent=function(e){return/%$/.test(e)},t.prototype.toPixels=function(e,t){var n=parseInt(e,10);return this.isPercent(e)&&(n=t*n/100),n},t.prototype.resetDragState=function(){this.setState({isDragging:!1,dragIndex:void 0,startTime:0,originalX:0,originalY:0,originalPrevSize:0,originalNextSize:0})},t.prototype.resize=function(e,t,n,r,o,i,a){var s,l,u=this,c=this.panesOptions(this.panesContent),p=c[e],d=c[t],h=n+r,f=this.containerSize(),m=function(e){return u.toPixels(e,f)},y={index:e,initialSize:n,min:m(p.min)||h-m(d.max)||0,max:m(p.max)||h-m(d.min)||h},v={index:t,initialSize:r,min:m(d.min)||h-m(p.max)||0,max:m(d.max)||h-m(p.min)||h},g=function(e,t){var n=c[e.index],r=u.clamp(e.min,e.max,e.initialSize+t);return u.isPercent(n.size||"")?100*r/f+"%":r+"px"};this.fixedSize(p.size)&&this.fixedSize(d.size)?(s=g(y,o),l=g(v,-o)):d.collapsible||this.fixedSize(d.size)?l=g(v,-o):s=g(y,o);var b=c.map((function(n,r){var o=u.getPaneProps(n);return r===e?Oe({},o,{size:s}):r===t?Oe({},o,{size:l}):Oe({},o)}));this.panesDuringOnChange=b,this.isControlledState||this.setState({panes:b}),this.props.onLayoutChange&&this.props.onLayoutChange(b,i,a),this.props.onChange&&this.props.onChange({newState:b,isLast:i,nativeEvent:a}),this.panesDuringOnChange=void 0},t.prototype.getPaneProps=function(e){e.orientation,e.overlay,e.containsSplitter;return Me(e,["orientation","overlay","containsSplitter"])},t.displayName="Splitter"}(r.Component);!function(e){e.CIRCLE="circle",e.SQUARE="square",e.ROUNDED="rounded"}(se||(se={})),function(e){e.INITIALS="initials",e.IMAGE="image",e.ICON="icon"}(le||(le={})),function(e){e.HORIZONTAL="horizontal",e.VERTICAL="vertical"}(ue||(ue={})),function(e){e.DEFAULT="default",e.primary="primary",e.INFO="info",e.SUCCESS="success",e.WARNING="warning",e.ERROR="error"}(ce||(ce={})),function(e){e.START="start",e.CENTER="center",e.END="end",e.STRETCHED="stretched"}(pe||(pe={}));var Ee=function(e){var t;return r.createElement("div",{dir:e.dir,style:e.style,className:Object(i.d)("k-card",e.className,(t={},t["k-state-"+e.type]=e.type!==ce.DEFAULT,t),e.orientation!==ue.HORIZONTAL?"k-card-vertical":"k-card-horizontal")},e.children)};Ee.propTypes={className:o.string,type:o.oneOf(["default","primary","info","success","warning","error"]),orientation:o.oneOf(["horizontal","vertical"])},Ee.defaultProps={type:ce.DEFAULT,orientation:ue.VERTICAL,dir:"ltr"};var Pe=Ee,De=function(e){return r.createElement("div",{style:e.style,className:Object(i.d)("k-card-header",e.className)},e.children)};De.propTypes={className:o.string};var Ae=De,Ie=function(e){return r.createElement("div",{style:e.style,className:Object(i.d)("k-card-title",e.className)},e.children)};Ie.propTypes={className:o.string};var Le=Ie,Re=function(e){return r.createElement("div",{style:e.style,className:Object(i.d)("k-card-body",e.className)},e.children)};Re.propTypes={className:o.string};var je=function(e){return r.createElement("div",{style:e.style,className:Object(i.d)("k-card-actions",e.className,"k-card-actions-"+e.layout,e.orientation!==ue.VERTICAL?"k-card-actions-horizontal":"k-card-actions-vertical")},e.children)};je.propTypes={layout:o.oneOf(["stretched","start","center","end"]),orientation:o.oneOf(["horizontal","vertical"])},je.defaultProps={layout:pe.START,orientation:ue.HORIZONTAL};var Fe=function(e){return r.createElement("img",{style:e.style,className:Object(i.d)("k-card-image",e.className),src:e.src})};Fe.propTypes={className:o.string,src:o.string},Fe.defaultProps={src:""};var ze=function(e){return r.createElement("div",{style:e.style,className:Object(i.d)("k-card-subtitle",e.className)},e.children)};ze.propTypes={className:o.string};var Be=ze,Ue=function(e){return r.createElement("div",{style:e.style,className:Object(i.d)("k-card-footer",e.className)},e.children)};Ue.propTypes={className:o.string};var He=function(e){return r.createElement("div",{style:e.style,className:Object(i.d)("k-avatar","k-avatar-"+e.shape,"k-avatar-"+e.type,e.className)},e.children)};He.propTypes={className:o.string,shape:o.oneOf(["circle","square","rounded"]),type:o.oneOf(["initials","image","icon"])},He.defaultProps={type:le.INITIALS,shape:se.SQUARE};var Ve=He,Ze=r.createContext({animation:!0,expanded:!1,mode:"overlay",position:"start",mini:!1,dir:"ltr",width:240,miniWidth:50}),Ge=function(){return(Ge=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0;)t[n]=arguments[n+1];var r=this.intl;return T(e)&&e.match(d)?r.format.apply(r,[e].concat(t)):r.toString(t[0],e)},G.prototype.localeAuto=function(e,t,n){var r=this.intl;return T(e)&&e.match(d)?e.replace(Z,(function(e,o,i){var a=t[parseInt(o,10)];return r.toString(a,i?i.substring(1):"",n)})):r.toString(t[0],e,n)},Object.defineProperties(G.prototype,K);var q=G,W=function(e,t){void 0===t&&(t={}),this._intlService=t.intlService,this.sender=t.sender||e,this.format=new q(t.intlService),this.chart=e,this.rtl=Boolean(t.rtl)},Y={intl:{configurable:!0}};Y.intl.get=function(){return this._intlService||V.implementation},Y.intl.set=function(e){this._intlService=e,this.format.intl=e},W.prototype.notify=function(e,t){this.chart&&this.chart.trigger(e,t)},W.prototype.isPannable=function(e){var t=((this.chart||{}).options||{}).pannable;return t&&t.lock!==e},Object.defineProperties(W.prototype,Y);var $,X=W,J=function(){};J.register=function(e){$=e},J.create=function(e,t){if($)return $.create(e,t)};var Q=J,ee={compile:function(e){return e}},te=function(){};te.register=function(e){ee=e},te.compile=function(e){return ee.compile(e)};var ne=te;function re(e){var t;return void 0===e&&(e={}),e.template?e.template=t=ne.compile(e.template):P(e.content)&&(t=e.content),t}var oe=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g,ie={};function ae(e){if(ie[e])return ie[e];var t=[];return e.replace(oe,(function(e,n,r,o){t.push(S.c.util.defined(n)?n:r||o)})),ie[e]=function(e){for(var n=e,r=0;r0;)t[n]=arguments[n+1];return this.observer[e].apply(this.observer,t)},he.prototype.requiresHandlers=function(e){if(this.observer.requiresHandlers)return this.observer.requiresHandlers(e);for(var t=0;t0?Math.ceil(t):Math.floor(t)),e.detail&&(t=S.c.util.round(e.detail/3)),t}var ve=S.c.util,ge=ve.append,be=ve.bindEvents,we=ve.defined,xe=ve.deg,ke=ve.elementOffset,_e=ve.elementSize,Ce=ve.eventElement,Se=ve.eventCoordinates,Ne=ve.last,Oe=ve.limitValue,Me=ve.objectKey,Te=ve.rad,Ee=ve.round,Pe=ve.unbindEvents,De=ve.valueOrDefault,Ae=function(){};Ae.fetchFonts=function(e,t,n){void 0===n&&(n={depth:0});!e||n.depth>5||!document.fonts||Object.keys(e).forEach((function(r){var o=e[r];"dataSource"!==r&&"$"!==r[0]&&o&&("font"===r?t.push(o):"object"===typeof o&&(n.depth++,Ae.fetchFonts(o,t,n),n.depth--))}))},Ae.loadFonts=function(e,t){var n=[];if(e.length>0&&document.fonts){try{n=e.map((function(e){return document.fonts.load(e)}))}catch(r){Object(S.e)(r)}Promise.all(n).then(t,t)}else t()},Ae.preloadFonts=function(e,t){var n=[];Ae.fetchFonts(e,n),Ae.loadFonts(n,t)};var Ie=Ae;function Le(e,t){var n=e.prototype;n.options?n.options=A({},n.options,t):n.options=t}function Re(e){for(var t=f,n=m,r=0,o=e.length;r=this.x1&&e.x<=this.x2&&e.y>=this.y1&&e.y<=this.y2},t.prototype.points=function(){return[new Fe(this.x1,this.y1),new Fe(this.x2,this.y1),new Fe(this.x2,this.y2),new Fe(this.x1,this.y2)]},t.prototype.getHash=function(){return[this.x1,this.y1,this.x2,this.y2].join(",")},t.prototype.overlaps=function(e){return!(e.y2=n*n&&h<=r*r},t.prototype.getBBox=function(){var e,t=new Be(f,f,m,m),n=Ee(this.startAngle%360),r=Ee((n+this.angle)%360),o=this.innerRadius,i=[0,90,180,270,n,r].sort(Ue),a=i.indexOf(n),s=i.indexOf(r);e=n===r?i:a0&&n===r&&(r+=.001);var o=new S.d.Point(e.center.x,e.center.y),i=Math.max(e.radius,0),a=Math.max(e.innerRadius,0),s=new S.d.Arc(o,{startAngle:n,endAngle:r,radiusX:i,radiusY:i}),l=S.c.Path.fromArc(s,t).close();if(a){s.radiusX=s.radiusY=a;var u=s.pointAt(r);l.lineTo(u.x,u.y),l.arc(r,n,a,a,!0)}else l.lineTo(o.x,o.y);return l},t}(S.a));Ve.current=new Ve;var Ze=Ve,Ge=function(e){function t(t){e.call(this),this.children=[],this.options=A({},this.options,this.initUserOptions(t))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.initUserOptions=function(e){return e},t.prototype.reflow=function(e){for(var t,n=this.children,r=0;rn)break}this.visual.insert(t,e)},t.prototype.traverse=function(e){for(var t=this.children,n=t.length,r=0;r0&&e.width()>0}))[0]}var Qe=function(e){function t(t){e.call(this,t);var n=this.options;n.width=parseInt(n.width,10),n.height=parseInt(n.height,10),this.gradients={}}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.reflow=function(){var e=this.options,t=this.children,n=new Be(0,0,e.width,e.height);this.box=n.unpad(e.margin);for(var r=0;ra&&(l.push({groupElements:h,groupSize:u,groupElementsSize:c}),d=Math.max(d,c),p+=i+u,u=0,c=0,h=[]),u=Math.max(u,y[r]),c>0&&(c+=o),c+=y[n],h.push(m)}return l.push({groupElements:h,groupSize:u,groupElementsSize:c}),{groups:l,groupsSize:p+=u,maxGroupElementsSize:d=Math.max(d,c)}},t.prototype.elementSize=function(e){return{width:e.box.width(),height:e.box.height()}},t.prototype.createVisual=function(){},t}(Ke);Le(tt,{vertical:!0,wrap:!0,vSpacing:0,spacing:0});var nt=tt,rt=S.c.Text,ot=function(e){function t(t,n){e.call(this,n),this.content=t,this.reflow(new Be)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.reflow=function(e){var t=this.options,n=t.size=S.c.util.measureText(this.content,{font:t.font});this.baseline=n.baseline,this.box=new Be(e.x1,e.y1,e.x1+n.width,e.y1+n.height)},t.prototype.createVisual=function(){var e=this.options,t=e.font,n=e.color,r=e.opacity,o=e.cursor;this.visual=new rt(this.content,this.box.toRect().topLeft(),{font:t,fill:{color:n,opacity:r},cursor:o})},t}(Ke);Le(ot,{font:"12px sans-serif",color:s});var it=ot;function at(e){var t=e.origin,n=e.bottomRight();return new Be(t.x,t.y,n.x,n.y)}var st=/\n/m,lt=function(e){function t(t,n,r){e.call(this,n),this.content=t,this.data=r,this._initContainer(),!1!==this.options._autoReflow&&this.reflow(new Be)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._initContainer=function(){var e=this.options,t=String(this.content).split(st),n=new nt({vertical:!0,align:e.align,wrap:!1}),r=A({},e,{opacity:1,animation:null});this.container=n,this.append(n);for(var o=0;o0&&t.visible){var r=new S.c.Path({stroke:{width:t.width,color:t.color,dashType:t.dashType}});r.moveTo(n.x1,n.y1).lineTo(n.x2,n.y2),e._alignLines&&N(r);var o=this._lineGroup=new S.c.Group;o.append(r),this.visual.append(o),this.createTicks(o)}},t.prototype.getActualTickSize=function(){var e=this.options,t=0;return e.majorTicks.visible&&e.minorTicks.visible?t=Math.max(e.majorTicks.size,e.minorTicks.size):e.majorTicks.visible?t=e.majorTicks.size:e.minorTicks.visible&&(t=e.minorTicks.size),t},t.prototype.createBackground=function(){var e=this.options,t=this.box,n=e.background;n&&(this._backgroundPath=S.c.Path.fromRect(t.toRect(),{fill:{color:n},stroke:null}),this.visual.append(this._backgroundPath))},t.prototype.createPlotBands=function(){var e=this,t=this.options,n=t.plotBands||[],r=t.vertical,o=this.plotArea;if(0!==n.length){for(var i=this._plotbandGroup=new S.c.Group({zIndex:-1}),a=se(this.pane.axes,(function(t){return t.options.vertical!==e.options.vertical}))[0],s=0;so){if(i.height()>o){e=-90;break}e=-45}}if(e){for(var a=0;a0&&(!we(i.max)||r<=i.max))return null;if(t0||rr&&o>0&&(l=Oe(t,n,r),s=Oe(t-a,n,r-a)),{min:s,max:l}},t.prototype.valueRange=function(){return{min:this.seriesMin,max:this.seriesMax}},t.prototype.labelsBetweenTicks=function(){return!this.options.justified},t.prototype.prepareUserOptions=function(){},t}(Ke);Le(vt,{labels:{visible:!0,rotation:0,mirror:!1,step:1,skip:0},line:{width:1,color:s,visible:!0},title:{visible:!0,position:u},majorTicks:{align:"outside",size:4,skip:0,step:1},minorTicks:{align:"outside",size:3,skip:0,step:1},axisCrossingValue:0,majorTickType:"outside",minorTickType:"none",majorGridLines:{skip:0,step:1},minorGridLines:{visible:!1,width:1,color:s,skip:0,step:1},margin:5,visible:!0,reverse:!1,justified:!0,notes:{label:{text:""}},_alignLines:!0,_deferLabels:!1});var gt=vt,bt="days",wt="years",xt={years:31536e6,months:26784e5,weeks:6048e5,days:864e5,hours:36e5,minutes:6e4,seconds:1e3,milliseconds:1};function kt(e,t){return e.getTime()-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset())}function _t(e,t){return new Date(e.getTime()+t)}function Ct(e){var t;return e instanceof Date?t=e:e&&(t=new Date(e)),t}function St(e,t){return 0===t&&23===e.getHours()&&(e.setHours(e.getHours()+2),!0)}function Nt(e,t,n,r){var o=e;if(e){var i=Ct(e),a=i.getHours();n===wt?St(o=new Date(i.getFullYear()+t,0,1),0):"months"===n?St(o=new Date(i.getFullYear(),i.getMonth()+t,1),a):"weeks"===n?St(o=Nt(function(e,t){void 0===t&&(t=0);var n=0,r=e.getDay();if(!isNaN(r))for(;r!==t;)0===r?r=6:r--,n++;return _t(e,864e5*-n)}(i,r),7*t,bt),a):n===bt?St(o=new Date(i.getFullYear(),i.getMonth(),i.getDate()+t),a):"hours"===n?o=function(e,t){var n=new Date(e);n.setMinutes(0,0,0);var r=6e4*(e.getTimezoneOffset()-n.getTimezoneOffset());return _t(n,r+36e5*t)}(i,t):"minutes"===n?(o=_t(i,6e4*t)).getSeconds()>0&&o.setSeconds(0):"seconds"===n?o=_t(i,1e3*t):"milliseconds"===n&&(o=_t(i,t)),"milliseconds"!==n&&o.getMilliseconds()>0&&o.setMilliseconds(0)}return o}function Ot(e,t,n){return Nt(Ct(e),0,t,n)}function Mt(e,t,n){var r=Ct(e);return r&&Ot(r,t,n).getTime()===r.getTime()?r:Nt(r,1,t,n)}function Tt(e,t){return e&&t?e.getTime()-t.getTime():-1}function Et(e,t){return e.getTime()-t}function Pt(e){if(k(e)){for(var t=[],n=0;no||i.box[n+2]o||a.box[n+2]=0;)a--;return e.slice(i,a+1)},t.prototype.getSlot=function(e,t,n){var r=this.options,o=r.reverse,i=r.justified,a=r.vertical,s=this.scaleOptions(),l=s.scale,u=s.box,c=s.min,p=a?x:w,d=u[p+(o?2:1)],h=u.clone(),f=!we(t),m=De(e,0),y=De(t,m);y=Math.max(y-1,m);var v=d+(m-c)*l,g=d+((y=Math.max(m,y))+1-c)*l;return f&&i&&(g=v),n&&(v=Oe(v,u[p+1],u[p+2]),g=Oe(g,u[p+1],u[p+2])),h[p+1]=o?g:v,h[p+2]=o?v:g,h},t.prototype.limitSlot=function(e){var t=this.options.vertical?x:w,n=this.lineBox(),r=e.clone();return r[t+1]=Oe(e[t+1],n[t+1],n[t+2]),r[t+2]=Oe(e[t+2],n[t+1],n[t+2]),r},t.prototype.slot=function(t,n,r){var o=Math.floor(this.options.min||0),i=t,a=n;return"string"===typeof i?i=this.categoryIndex(i):M(i)&&(i-=o),"string"===typeof a?a=this.categoryIndex(a):M(a)&&(a-=o),e.prototype.slot.call(this,i,a,r)},t.prototype.pointCategoryIndex=function(e){var t=this.options,n=t.reverse,r=t.justified,o=t.vertical?x:w,i=this.scaleOptions(),a=i.scale,s=i.box,l=i.min,u=i.max,c=n?u:l,p=s[o+1],d=s[o+2],h=e[o];if(hd)return null;var f=c+(h-p)/a,m=f%1;return r?f=Math.round(f):0===m&&f>0&&f--,Math.floor(f)},t.prototype.getCategory=function(e){var t=this.pointCategoryIndex(e);return null===t?null:this.options.categories[t]},t.prototype.categoryIndex=function(e){return this.totalIndex(e)-Math.floor(this.options.min||0)},t.prototype.categoryAt=function(e,t){var n=this.options;return(t?n.srcCategories:n.categories)[e]},t.prototype.categoriesCount=function(){return(this.options.categories||[]).length},t.prototype.translateRange=function(e){var t=this.options,n=this.lineBox(),r=t.vertical?n.height():n.width(),o=t.categories.length,i=Ee(e/(r/o),10);return{min:i,max:o+i}},t.prototype.zoomRange=function(e){var t=this.totalRangeIndices(),n=this.totalRange(),r=n.min,o=n.max,i=Oe(t.min+e,r,o),a=Oe(t.max-e,r,o);if(a-i>0)return{min:i,max:a}},t.prototype.scaleRange=function(e){var t=this.options.categories.length,n=e*t;return{min:-n,max:t+n}},t.prototype.labelsCount=function(){var e=this.labelsRange();return e.max-e.min},t.prototype.labelsRange=function(){var e=this.options,t=e.justified,n=e.labels,r=this.totalRangeIndices(!0),o=r.min,i=r.max,a=Math.floor(o);return t?(o=Math.ceil(o),i=Math.floor(i)):(o=Math.floor(o),i=Math.ceil(i)),{min:(o>n.skip?n.skip+n.step*Math.ceil((o-n.skip)/n.step):n.skip)-a,max:(e.categories.length?i+(t?1:0):0)-a}},t.prototype.createAxisLabel=function(e,t){var n=this.options,r=n.dataItems?n.dataItems[e]:null,o=De(n.categories[e],""),i=this.axisLabelText(o,r,t);return new dt(o,i,e,r,t)},t.prototype.shouldRenderNote=function(e){var t=this.totalRangeIndices();return Math.floor(t.min)<=e&&e<=Math.ceil(t.max)},t.prototype.noteSlot=function(e){var t=this.options,n=e-Math.floor(t.min||0);return this.getSlot(n)},t.prototype.arrangeNotes=function(){e.prototype.arrangeNotes.call(this),this.hideOutOfRangeNotes()},t.prototype.hideOutOfRangeNotes=function(){var e=this.notes,t=this.box;if(e&&e.length)for(var n=this.options.vertical?x:w,r=t[n+1],o=t[n+2],i=0;i=.01)return{min:h,max:f}},t.prototype.valueRange=function(){return this.range()},t.prototype.totalIndex=function(e){var t=this.options;return this._categoriesMap?this._categoriesMap.get(e):function(e,t){if(e instanceof Date){for(var n=t.length,r=0;r=u;){r=r||l[d].slice(0);do{i=r.shift()}while(i&&t===d&&iu&&(o=Math.ceil(f/u));break}d=Ut[p++]||Ne(Ut),f=s/xt[d],r=null}}e.baseUnitStep=o,e.baseUnit=d}function Kt(e){var t=(e.baseUnit||"").toLowerCase();return"fit"!==t&&!pe(t,Ut)&&function(e){for(var t,n,r=e.categories,o=we(r)?r.length:0,i=f,a=0;a0&&(n=(i=Math.min(i,l))>=31536e6?wt:i>=24192e5?"months":i>=6048e5?"weeks":i>=864e5?bt:i>=36e5?"hours":i>=6e4?"minutes":"seconds")}t=s}e.baseUnit=n||bt}(e),"fit"!==t&&"auto"!==e.baseUnitStep||Gt(e),e}Zt.prototype.displayRange=function(){return{min:this.displayStart,max:this.displayEnd}},Zt.prototype.displayIndices=function(){if(!this._indices){var e=this.options,t=e.baseUnit,n=e.baseUnitStep,r=It(this.displayStart,this.valueStart,t,n),o=It(this.displayEnd,this.valueStart,t,n);this._indices={min:r,max:o}}return this._indices},Zt.prototype.total=function(){return{min:this.start,max:this.end}},Zt.prototype.totalCount=function(){return this.totalIndex(this.end)+(this.options.justified?1:0)},Zt.prototype.valueRange=function(){return{min:this.valueStart,max:this.valueEnd}},Zt.prototype.valueIndex=function(e){var t=this.options;return Math.floor(It(e,this.valueStart,t.baseUnit,t.baseUnitStep))},Zt.prototype.totalIndex=function(e){var t=this.options;return Math.floor(It(e,this.start,t.baseUnit,t.baseUnitStep))},Zt.prototype.dateIndex=function(e){var t=this.options;return It(e,this.valueStart,t.baseUnit,t.baseUnitStep)},Zt.prototype.valuesCount=function(){return this.valueIndex(this.valueEnd)+1},Zt.prototype.values=function(){var e=this._values;if(!e){var t=this.options,n=this.valueRange();this._values=e=[];for(var r=n.min;r<=n.max;)e.push(r),r=Nt(r,t.baseUnitStep,t.baseUnit,t.weekStartDay)}return e},Zt.prototype.dateAt=function(e,t){var n=this.options;return Nt(t?this.start:this.valueStart,n.baseUnitStep*e,n.baseUnit,n.weekStartDay)},Zt.prototype.roundToTotalStep=function(e,t,n){var r=this.options,o=r.baseUnit,i=r.baseUnitStep,a=r.weekStartDay,s=this.start,l=It(e,s,o,i),u=t?Math.ceil(l):Math.floor(l);return n&&(u+=n),Nt(s,u*i,o,a)};var qt=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.clone=function(){var e=new t(Object.assign({},this.options),this.chartService);return e.createLabels(),e},t.prototype.categoriesHash=function(){var e=this.dataRange.total().min;return this.options.baseUnit+this.options.baseUnitStep+e},t.prototype.initUserOptions=function(e){return e},t.prototype.initFields=function(){e.prototype.initFields.call(this);var t=this.chartService,n=t.intl,r=this.options,o=r.categories||[];if(o._parsed||((o=jt(n,o))._parsed=!0),r=A({roundToBaseUnit:!0},r,{categories:o,min:Rt(n,r.min),max:Rt(n,r.max)}),t.panning&&t.isPannable(r.vertical?x:w)&&(r.roundToBaseUnit=!1),r.userSetBaseUnit=r.userSetBaseUnit||r.baseUnit,r.userSetBaseUnitStep=r.userSetBaseUnitStep||r.baseUnitStep,this.options=r,r.srcCategories=o,o.length>0){var i=Ht(o),a=r.maxDivisions;if(this.dataRange=new Zt(i.min,i.max,Kt(r)),a){var s=this.dataRange.displayRange(),l=Object.assign({},r,{justified:!0,roundToBaseUnit:!1,baseUnit:"fit",min:s.min,max:s.max,maxDateGroups:a}),u=this.dataRange.options;Gt(l,u.baseUnit,u.baseUnitStep),this.divisionRange=new Zt(i.min,i.max,l)}else this.divisionRange=this.dataRange}else r.baseUnit=r.baseUnit||bt,this.dataRange=this.divisionRange=new Vt(r)},t.prototype.tickIndices=function(t){var n=this.dataRange,r=this.divisionRange,o=r.valuesCount();if(!this.options.maxDivisions||!o)return e.prototype.tickIndices.call(this,t);var i=[],a=r.values(),s=0;this.options.justified||(a=a.concat(r.dateAt(o)),s=.5);for(var l=0;l=1){var u=i.length-1;i.splice(l,0,i[u-1]+(i[u]-i[u-1])*t)}return i},t.prototype.shouldRenderNote=function(e){var t=this.range(),n=this.options.categories||[];return Tt(e,t.min)>=0&&Tt(e,t.max)<=0&&n.length},t.prototype.parseNoteValue=function(e){return Rt(this.chartService.intl,e)},t.prototype.noteSlot=function(e){return this.getSlot(e)},t.prototype.translateRange=function(e){var t=this.options,n=t.baseUnit,r=t.weekStartDay,o=t.vertical,i=this.lineBox(),a=o?i.height():i.width(),s=this.range(),l=a/(s.max-s.min),u=Ee(e/l,10);if(s.min&&s.max){var c=_t(t.min||s.min,u),p=_t(t.max||s.max,u);s={min:Nt(c,0,n,r),max:Nt(p,0,n,r)}}return s},t.prototype.scaleRange=function(e){var t=Math.abs(e),n=this.range(),r=n.min,o=n.max;if(r&&o){for(;t--;){var i=Et(r,o),a=Math.round(.1*i);e<0?(r=_t(r,a),o=_t(o,-a)):(r=_t(r,-a),o=_t(o,a))}n={min:r,max:o}}return n},t.prototype.labelsRange=function(){return{min:this.options.labels.skip,max:this.divisionRange.valuesCount()}},t.prototype.pan=function(e){if(this.isEmpty())return null;var t=this.options,n=this.lineBox(),r=t.vertical?n.height():n.width(),o=this.dataRange.displayRange(),i=o.min,a=o.max,s=this.dataRange.total(),l=Ee(e/(r/(a-i)),10)*(t.reverse?-1:1),u=_t(i,l),c=_t(a,l),p=this.limitRange(Pt(u),Pt(c),Pt(s.min),Pt(s.max),l);return p?(p.min=Ct(p.min),p.max=Ct(p.max),p.baseUnit=t.baseUnit,p.baseUnitStep=t.baseUnitStep||1,p.userSetBaseUnit=t.userSetBaseUnit,p.userSetBaseUnitStep=t.userSetBaseUnitStep,p):void 0},t.prototype.pointsRange=function(t,n){if(this.isEmpty())return null;var r=e.prototype.pointsRange.call(this,t,n),o=this.dataRange.displayRange(),i=this.dataRange.displayIndices(),a=Et(o.max,o.min)/(i.max-i.min),s=this.options;return{min:_t(o.min,r.min*a),max:_t(o.min,r.max*a),baseUnit:s.userSetBaseUnit||s.baseUnit,baseUnitStep:s.userSetBaseUnitStep||s.baseUnitStep}},t.prototype.zoomRange=function(e){if(this.isEmpty())return null;var t=this.options,n="fit"===t.userSetBaseUnit,r=this.dataRange.total(),o=this.dataRange.displayRange(),i=o.min,a=o.max,s=this.dataRange.options,l=s.weekStartDay,u=s.baseUnit,c=s.baseUnitStep,p=Nt(i,e*c,u,l),d=Nt(a,-e*c,u,l);if(n){var h,f,m=t.autoBaseUnitSteps,y=t.maxDateGroups,v=Ne(m[u])*y*xt[u],g=Et(a,i),b=Et(d,p),w=Ut.indexOf(u);if(bv&&u!==wt){var x=0;do{w++,u=Ut[w],x=0,f=2*xt[u];do{h=m[u][x],x++}while(x0&&(p=_t(i,-f),d=_t(a,f),p=_t(p,Oe(d,r.min,r.max)-d),d=_t(d,Oe(p,r.min,r.max)-p))}}return pr.max&&(d=r.max),p&&d&&Et(d,p)>0?{min:p,max:d,baseUnit:t.userSetBaseUnit||t.baseUnit,baseUnitStep:t.userSetBaseUnitStep||t.baseUnitStep}:void 0},t.prototype.range=function(){return this.dataRange.displayRange()},t.prototype.createAxisLabel=function(e,t){var n=this.options,r=n.dataItems&&!n.maxDivisions?n.dataItems[e]:null,o=this.divisionRange.dateAt(e),i=t.dateFormats[this.divisionRange.options.baseUnit];t.format=t.format||i;var a=this.axisLabelText(o,r,t);if(a)return new dt(o,a,e,r,t)},t.prototype.categoryIndex=function(e){return this.dataRange.valueIndex(e)},t.prototype.slot=function(e,t,n){var r=this.dataRange,o=e,i=t;o instanceof Date&&(o=r.dateIndex(o)),i instanceof Date&&(i=r.dateIndex(i));var a=this.getSlot(o,i,n);if(a)return a.toRect()},t.prototype.getSlot=function(t,n,r){var o=t,i=n;return"object"===typeof o&&(o=this.categoryIndex(o)),"object"===typeof i&&(i=this.categoryIndex(i)),e.prototype.getSlot.call(this,o,i,r)},t.prototype.valueRange=function(){var e=Ht(this.options.srcCategories);return{min:Ct(e.min),max:Ct(e.max)}},t.prototype.categoryAt=function(e,t){return this.dataRange.dateAt(e,t)},t.prototype.categoriesCount=function(){return this.dataRange.valuesCount()},t.prototype.rangeIndices=function(){return this.dataRange.displayIndices()},t.prototype.labelsBetweenTicks=function(){return!this.divisionRange.options.justified},t.prototype.prepareUserOptions=function(){this.isEmpty()||(this.options.categories=this.dataRange.values())},t.prototype.getCategory=function(e){var t=this.pointCategoryIndex(e);return null===t?null:this.dataRange.dateAt(t)},t.prototype.totalIndex=function(e){return this.dataRange.totalIndex(e)},t.prototype.currentRangeIndices=function(){var e=this.dataRange.valueRange();return{min:this.dataRange.totalIndex(e.min),max:this.dataRange.totalIndex(e.max)}},t.prototype.totalRange=function(){return this.dataRange.total()},t.prototype.totalCount=function(){return this.dataRange.totalCount()},t.prototype.isEmpty=function(){return!this.options.srcCategories.length},t.prototype.roundedRange=function(){if(!1!==this.options.roundToBaseUnit||this.isEmpty())return this.range();var e=this.options,t=Ht(e.srcCategories);return new Zt(t.min,t.max,Object.assign({},e,{justified:!1,roundToBaseUnit:!0,justifyEnd:e.justified})).displayRange()},t}(zt);Le(qt,{type:p,labels:{dateFormats:Bt},autoBaseUnitSteps:{milliseconds:[1,10,100],seconds:[1,2,5,15,30],minutes:[1,2,5,15,30],hours:[1,2,3],days:[1,2,3],weeks:[1,2],months:[1,2,3,6],years:[1,2,3,5,10,25,50]},maxDateGroups:10});var Wt=qt;function Yt(e,t){return Ee(Math.floor(e/t)*t,10)}function $t(e,t){return Ee(Math.ceil(e/t)*t,10)}function Xt(e){return Math.max(Math.min(e,3e5),-3e5)}var Jt=Math.pow(10,-9),Qt=function(e){function t(t,n,r,o){e.call(this,Object.assign({},r,{seriesMin:t,seriesMax:n}),o)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.initUserOptions=function(e){var t=function(e,t,n){var r=n.narrowRange,o=function(e,t,n){if(!e&&!t)return 0;var r;if(e>=0&&t>=0){var o=e===t?0:e;if(!1===n||!n&&(t-o)/t>.2)return 0;r=Math.max(0,o-(t-o)/2)}else r=e;return r}(e,t,r),i=function(e,t,n){if(!e&&!t)return 1;var r;if(e<=0&&t<=0){var o=e===t?0:t,i=Math.abs((o-e)/o);if(!1===n||!n&&i>.2)return 0;r=Math.min(0,o-(e-o)/2)}else r=t;return r}(e,t,r),a=je(o,i),s={majorUnit:a};!1!==n.roundToMajorUnit&&(o<0&&en(o,a,1/3)&&(o-=a),i>0&&en(i,a,1/3)&&(i+=a));return s.min=Yt(o,a),s.max=$t(i,a),s}(e.seriesMin,e.seriesMax,e);return this.totalOptions=function(e,t){return{min:we(t.min)?Math.min(e.min,t.min):e.min,max:we(t.max)?Math.max(e.max,t.max):e.max,majorUnit:e.majorUnit}}(t,e),function(e,t){var n,r,o=t;if(t){!function(e,t){for(var n=0;n0?t.min=0:t.max=1),t.majorUnit?(e.min=Yt(e.min,t.majorUnit),e.max=$t(e.max,t.majorUnit)):i&&(o=A(e,t),e.majorUnit=je(o.min,o.max))}e.minorUnit=(o.majorUnit||e.majorUnit)/5;var a=A(e,o);a.min>=a.max&&(n&&!r?a.max=a.min+a.majorUnit:!n&&r&&(a.min=a.max-a.majorUnit));return a}(t,e)},t.prototype.initFields=function(){this.totalMin=this.totalOptions.min,this.totalMax=this.totalOptions.max,this.totalMajorUnit=this.totalOptions.majorUnit,this.seriesMin=this.options.seriesMin,this.seriesMax=this.options.seriesMax},t.prototype.clone=function(){return new t(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},t.prototype.startValue=function(){return 0},t.prototype.range=function(){var e=this.options;return{min:e.min,max:e.max}},t.prototype.getDivisions=function(e){if(0===e)return 1;var t=this.options,n=t.max-t.min;return Math.floor(Ee(n/e,3))+1},t.prototype.getTickPositions=function(e,t){var n=this.options,r=n.vertical,o=n.reverse,i=this.lineBox(),a=e*((r?i.height():i.width())/(n.max-n.min)),s=this.getDivisions(e),l=(r?-1:1)*(o?-1:1),u=[],c=i[(r?x:w)+(1===l?1:2)],p=0;t&&(p=t/e);for(var d=0;du?null:Ee(n?o-p:i+p,10)},t.prototype.translateRange=function(e){var t=this.options,n=t.vertical,r=t.reverse,o=t.max,i=t.min,a=this.lineBox(),s=n?a.height():a.width(),l=Ee(e/(s/(o-i)),10);return!n&&!r||n&&r||(l=-l),{min:i+l,max:o+l,offset:l}},t.prototype.scaleRange=function(e){var t=this.options,n=-e*t.majorUnit;return{min:t.min-n,max:t.max+n}},t.prototype.labelsCount=function(){return this.getDivisions(this.options.majorUnit)},t.prototype.createAxisLabel=function(e,t){var n=this.options,r=Ee(n.min+e*n.majorUnit,10),o=this.axisLabelText(r,null,t);return new dt(r,o,e,null,t)},t.prototype.shouldRenderNote=function(e){var t=this.range();return t.min<=e&&e<=t.max},t.prototype.pan=function(e){var t=this.translateRange(e);return this.limitRange(t.min,t.max,this.totalMin,this.totalMax,t.offset)},t.prototype.pointsRange=function(e,t){var n=this.getValue(e),r=this.getValue(t),o=Math.min(n,r),i=Math.max(n,r);if(this.isValidRange(o,i))return{min:o,max:i}},t.prototype.zoomRange=function(e){var t=this.totalMin,n=this.totalMax,r=this.scaleRange(e),o=Oe(r.min,t,n),i=Oe(r.max,t,n);if(this.isValidRange(o,i))return{min:o,max:i}},t.prototype.isValidRange=function(e,t){return t-e>Jt},t}(gt);function en(e,t,n){var r=Ee(Math.abs(e%t),10);return 0===r||r>t*(1-n)}Le(Qt,{type:"numeric",min:0,max:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:s},labels:{format:"#.####################"},zIndex:1});var tn=Qt,nn=function(e){function t(t,n,r,o){var i=Ct(t),a=Ct(n),s=o.intl,l=r||{};l=function(e,t,n){var r=n.min||e,o=n.max||t,i=n.baseUnit||(o&&r?function(e){var t="hours";e>=31536e6?t=wt:e>=26784e5?t="months":e>=6048e5?t="weeks":e>=864e5&&(t=bt);return t}(kt(o,r)):"hours"),a=xt[i],s=n.weekStartDay||0,l=Ot(Pt(r)-1,i,s)||Ct(o),u=Mt(Pt(o)+1,i,s),c=(n.majorUnit?n.majorUnit:void 0)||$t(je(l.getTime(),u.getTime()),a)/a,p=Lt(l,u,i),d=$t(p,c)-p,h=Math.floor(d/2),f=d-h;n.baseUnit||delete n.baseUnit;return n.baseUnit=n.baseUnit||i,n.min=n.min||Nt(l,-h,i,s),n.max=n.max||Nt(u,f,i,s),n.minorUnit=n.minorUnit||c/5,n.majorUnit=c,n}(i,a,l=A(l||{},{min:Rt(s,l.min),max:Rt(s,l.max),axisCrossingValue:jt(s,l.axisCrossingValues||l.axisCrossingValue)})),e.call(this,l,o),this.intlService=s,this.seriesMin=i,this.seriesMax=a;var u=l.weekStartDay||0;this.totalMin=Pt(Ot(Pt(i)-1,l.baseUnit,u)),this.totalMax=Pt(Mt(Pt(a)+1,l.baseUnit,u))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.clone=function(){return new t(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},t.prototype.range=function(){var e=this.options;return{min:e.min,max:e.max}},t.prototype.getDivisions=function(e){var t=this.options;return Math.floor(Lt(t.min,t.max,t.baseUnit)/e+1)},t.prototype.getTickPositions=function(e){for(var t=this.options,n=t.vertical,r=this.lineBox(),o=(n?-1:1)*(t.reverse?-1:1),i=r[(n?x:w)+(1===o?1:2)],a=this.getDivisions(e),s=Et(t.max,t.min),l=(n?r.height():r.width())/s,u=t.weekStartDay||0,c=[i],p=1;p0&&(i=Nt(i,r,n.baseUnit,o));var a=t.dateFormats[n.baseUnit];t.format=t.format||a;var s=this.axisLabelText(i,null,t);return new dt(i,s,e,null,t)},t.prototype.translateRange=function(e,t){var n=this.options,r=n.baseUnit,o=n.weekStartDay||0,i=this.lineBox(),a=n.vertical?i.height():i.width(),s=this.range(),l=a/Et(s.max,s.min),u=Ee(e/l,10)*(n.reverse?-1:1),c=_t(n.min,u),p=_t(n.max,u);return t||(c=Nt(c,0,r,o),p=Nt(p,0,r,o)),{min:c,max:p,offset:u}},t.prototype.scaleRange=function(e){for(var t=this.options,n=t.min,r=t.max,o=Math.abs(e);o--;){var i=Et(n,r),a=Math.round(.1*i);e<0?(n=_t(n,a),r=_t(r,-a)):(n=_t(n,-a),r=_t(r,a))}return{min:n,max:r}},t.prototype.shouldRenderNote=function(e){var t=this.range();return Tt(e,t.min)>=0&&Tt(e,t.max)<=0},t.prototype.pan=function(e){var t=this.translateRange(e,!0),n=this.limitRange(Pt(t.min),Pt(t.max),this.totalMin,this.totalMax,t.offset);if(n)return{min:Ct(n.min),max:Ct(n.max)}},t.prototype.pointsRange=function(e,t){var n=this.getValue(e),r=this.getValue(t),o=Math.min(n,r),i=Math.max(n,r);return{min:Ct(o),max:Ct(i)}},t.prototype.zoomRange=function(e){var t=this.scaleRange(e);return{min:Ct(Oe(Pt(t.min),this.totalMin,this.totalMax)),max:Ct(Oe(Pt(t.max),this.totalMin,this.totalMax))}},t}(gt);Le(nn,{type:p,majorGridLines:{visible:!0,width:1,color:s},labels:{dateFormats:Bt}});var rn=nn,on=function(e){function t(t,n,r,o){var i=A({majorUnit:10,min:t,max:n},r),a=i.majorUnit,s=function(e,t){var n,r=Ee(sn(e,t),10)%1;n=e<=0?t:0!==r&&(r<.3||r>.9)?Math.pow(t,sn(e,t)+.2):Math.pow(t,Math.ceil(sn(e,t)));return n}(n,a),l=function(e,t,n){var r=n.majorUnit,o=e;e<=0?o=t<=1?Math.pow(r,-2):1:n.narrowRange||(o=Math.pow(r,Math.floor(sn(e,r))));return o}(t,n,i),u=function(e,t,n,r){var o=n.min,i=n.max;we(n.axisCrossingValue)&&n.axisCrossingValue<=0&&an();we(r.max)?r.max<=0&&an():i=t;we(r.min)?r.min<=0&&an():o=e;return{min:o,max:i}}(l,s,i,r);i.max=u.max,i.min=u.min,i.minorUnit=r.minorUnit||Ee(a-1,10),e.call(this,i,o),this.totalMin=we(r.min)?Math.min(l,r.min):l,this.totalMax=we(r.max)?Math.max(s,r.max):s,this.logMin=Ee(sn(u.min,a),10),this.logMax=Ee(sn(u.max,a),10),this.seriesMin=t,this.seriesMax=n,this.createLabels()}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.clone=function(){return new t(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},t.prototype.startValue=function(){return this.options.min},t.prototype.getSlot=function(e,t,n){var r,o,i=this.options,a=this.logMin,s=this.logMax,l=i.reverse,u=i.vertical,c=i.majorUnit,p=u?x:w,d=this.lineBox(),h=d[p+(l?2:1)],f=(l?-1:1)*((u?d.height():d.width())/(s-a)),m=new Be(d.x1,d.y1,d.x1,d.y1),y=e,v=t;return we(y)||(y=v||1),we(v)||(v=y||1),y<=0||v<=0?null:(n&&(y=Math.max(Math.min(y,i.max),i.min),v=Math.max(Math.min(v,i.max),i.min)),y=sn(y,c),v=sn(v,c),u?(r=s-Math.max(y,v),o=s-Math.min(y,v)):(r=Math.min(y,v)-a,o=Math.max(y,v)-a),m[p+1]=Xt(h+f*(l?o:r)),m[p+2]=Xt(h+f*(l?r:o)),m)},t.prototype.getValue=function(e){var t=this.options,n=this.logMin,r=this.logMax,o=t.reverse,i=t.vertical,a=t.majorUnit,s=this.lineBox(),l=i===o?1:-1,u=1===l?1:2,c=i?s.height():s.width(),p=(r-n)/c,d=i?x:w,h=s[d+u],f=l*(e[d]-h);if(f<0||f>c)return null;var m=n+f*p;return Ee(Math.pow(a,m),10)},t.prototype.range=function(){var e=this.options;return{min:e.min,max:e.max}},t.prototype.scaleRange=function(e){var t=this.options.majorUnit,n=-e;return{min:Math.pow(t,this.logMin-n),max:Math.pow(t,this.logMax+n)}},t.prototype.translateRange=function(e){var t=this.options,n=this.logMin,r=this.logMax,o=t.reverse,i=t.vertical,a=t.majorUnit,s=this.lineBox(),l=i?s.height():s.width(),u=Ee(e/(l/(r-n)),10);return!i&&!o||i&&o||(u=-u),{min:Math.pow(a,n+u),max:Math.pow(a,r+u),offset:u}},t.prototype.labelsCount=function(){var e=Math.floor(this.logMax);return Math.floor(e-this.logMin)+1},t.prototype.getMajorTickPositions=function(){var e=[];return this.traverseMajorTicksPositions((function(t){e.push(t)}),{step:1,skip:0}),e},t.prototype.createTicks=function(e){var t=this.options,n=t.majorTicks,r=t.minorTicks,o=t.vertical,i=t.labels.mirror,a=this.lineBox(),s={vertical:o};function l(t,n){s.tickX=i?a.x2:a.x2-n.size,s.tickY=i?a.y1-n.size:a.y1,s.position=t,e.append(mt(s,n))}return n.visible&&this.traverseMajorTicksPositions(l,n),r.visible&&this.traverseMinorTicksPositions(l,r),[]},t.prototype.createGridLines=function(e){var t=this.options,n=t.minorGridLines,r=t.majorGridLines,o=t.vertical,i=e.lineBox(),a={lineStart:i[o?"x1":"y1"],lineEnd:i[o?"x2":"y2"],vertical:o},s=[],l=this.gridLinesVisual();function u(e,t){pe(e,s)||(a.position=e,l.append(yt(a,t)),s.push(e))}return r.visible&&this.traverseMajorTicksPositions(u,r),n.visible&&this.traverseMinorTicksPositions(u,n),l.children},t.prototype.traverseMajorTicksPositions=function(e,t){for(var n=this._lineOptions(),r=n.lineStart,o=n.step,i=this.logMin,a=this.logMax,s=Math.ceil(i)+t.skip;s<=a;s+=t.step){e(Ee(r+o*(s-i),10),t)}},t.prototype.traverseMinorTicksPositions=function(e,t){for(var n=this.options,r=n.min,o=n.max,i=n.minorUnit,a=n.majorUnit,s=this._lineOptions(),l=s.lineStart,u=s.step,c=this.logMin,p=this.logMax,d=Math.floor(c);do)break;if(m>=r)e(Ee(l+u*(sn(m,a)-c),10),t)}},t.prototype.createAxisLabel=function(e,t){var n=Math.ceil(this.logMin+e),r=Math.pow(this.options.majorUnit,n),o=this.axisLabelText(r,null,t);return new dt(r,o,e,null,t)},t.prototype.shouldRenderNote=function(e){var t=this.range();return t.min<=e&&e<=t.max},t.prototype.pan=function(e){var t=this.translateRange(e);return this.limitRange(t.min,t.max,this.totalMin,this.totalMax,t.offset)},t.prototype.pointsRange=function(e,t){var n=this.getValue(e),r=this.getValue(t);return{min:Math.min(n,r),max:Math.max(n,r)}},t.prototype.zoomRange=function(e){var t=this.options,n=this.totalMin,r=this.totalMax,o=this.scaleRange(e),i=Oe(o.min,n,r),a=Oe(o.max,n,r),s=t.majorUnit,l=a>i&&t.min&&t.max&&Ee(sn(t.max,s)-sn(t.min,s),10)<1,u=!(t.min===n&&t.max===r)&&Ee(sn(a,s)-sn(i,s),10)>=1;if(l||u)return{min:i,max:a}},t.prototype._minorIntervalOptions=function(e){var t=this.options,n=t.minorUnit,r=t.majorUnit,o=Math.pow(r,e);return{value:o,minorStep:(Math.pow(r,e+1)-o)/n}},t.prototype._lineOptions=function(){var e=this.options,t=e.reverse,n=e.vertical,r=n?x:w,o=this.lineBox(),i=n===t?1:-1,a=1===i?1:2;return{step:i*((n?o.height():o.width())/(this.logMax-this.logMin)),lineStart:o[r+a],lineBox:o}},t}(gt);function an(){throw new Error("Non positive values cannot be used for a logarithmic axis")}function sn(e,t){return Math.log(e)/Math.log(t)}Le(on,{type:"log",majorUnit:10,minorUnit:1,axisCrossingValue:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:s},zIndex:1,_deferLabels:!0});var ln=on,un={createGridLines:function(e){var t,n,r=this.options,o=Math.abs(this.box.center().y-e.lineBox().y1),i=[],a=!1;return r.majorGridLines.visible&&(t=this.majorGridLineAngles(e),a=!0,i=this.renderMajorGridLines(t,o,r.majorGridLines)),r.minorGridLines.visible&&(n=this.minorGridLineAngles(e,a),ge(i,this.renderMinorGridLines(n,o,r.minorGridLines,e,a))),i},renderMajorGridLines:function(e,t,n){return this.renderGridLines(e,t,n)},renderMinorGridLines:function(e,t,n,r,o){var i=this.radiusCallback&&this.radiusCallback(t,r,o);return this.renderGridLines(e,t,n,i)},renderGridLines:function(e,t,n,r){for(var o={stroke:{width:n.width,color:n.color,dashType:n.dashType}},i=this.box.center(),a=new S.d.Circle([i.x,i.y],t),s=this.gridLinesVisual(),l=0;l0){var p=new S.d.Circle([e.x,e.y],c);if(r.type===a)l.append(new S.c.Circle(p,o));else{for(var d=new S.c.Path(o),h=0;h1){var l=e.x-o.x,u=e.y-o.y,c=(xe(Math.atan2(u,l))+540)%360;r.sort((function(e,t){return fn(e,c)-fn(t,c)}));var p=90-fn(r[0],r[1])/2,d=180-fn(c,r[0])-p;s=i*(Math.sin(Te(d))/Math.sin(Te(p)))}return this.axisType().prototype.getValue.call(this,new Fe(t.x1,t.y2-s))}},yn=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.radarMajorGridLinePositions=function(){return this.getTickPositions(this.options.majorUnit)},t.prototype.radarMinorGridLinePositions=function(){var e=this.options,t=0;return e.majorGridLines.visible&&(t=e.majorUnit),this.getTickPositions(e.minorUnit,t)},t.prototype.axisType=function(){return e},t}(tn);A(yn.prototype,mn);var vn=yn,gn=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.radarMajorGridLinePositions=function(){var e=[];return this.traverseMajorTicksPositions((function(t){e.push(t)}),this.options.majorGridLines),e},t.prototype.radarMinorGridLinePositions=function(){var e=[];return this.traverseMinorTicksPositions((function(t){e.push(t)}),this.options.minorGridLines),e},t.prototype.axisType=function(){return e},t}(ln);A(gn.prototype,mn);var bn=gn;function wn(e){return e<=0?-1:1}var xn=function(e){function t(t){e.call(this),this.closed=t}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.process=function(e){var t=e.slice(0),n=[],r=this.closed,o=t.length;if(o>2&&(this.removeDuplicates(0,t),o=t.length),o<2||2===o&&t[0].equals(t[1]))return n;var i,a,s=t[0],l=t[1],u=t[2];for(n.push(new S.d.Segment(s));s.equals(t[o-1]);)r=!0,t.pop(),o--;if(2===o){var c=this.tangent(s,l,w,x);return Ne(n).controlOut(this.firstControlPoint(c,s,l,w,x)),n.push(new S.d.Segment(l,this.secondControlPoint(c,s,l,w,x))),n}if(r){s=t[o-1],l=t[0],u=t[1];var p=this.controlPoints(s,l,u);i=p[1],a=p[0]}else{var d=this.tangent(s,l,w,x);i=this.firstControlPoint(d,s,l,w,x)}for(var h=i,f=0;f<=o-3;f++)if(this.removeDuplicates(f,t),f+3<=(o=t.length)){s=t[f],l=t[f+1],u=t[f+2];var m=this.controlPoints(s,l,u);Ne(n).controlOut(h),h=m[1];var y=m[0];n.push(new S.d.Segment(l,y))}if(r){s=t[o-2],l=t[o-1],u=t[0];var v=this.controlPoints(s,l,u);Ne(n).controlOut(h),n.push(new S.d.Segment(l,v[0])),Ne(n).controlOut(v[1]),n.push(new S.d.Segment(u,a))}else{var g=this.tangent(l,u,w,x);Ne(n).controlOut(h),n.push(new S.d.Segment(u,this.secondControlPoint(g,l,u,w,x)))}return n},t.prototype.removeDuplicates=function(e,t){for(;t[e+1]&&(t[e].equals(t[e+1])||t[e+1].equals(t[e+2]));)t.splice(e+1,1)},t.prototype.invertAxis=function(e,t,n){var r=!1;if(e.x===t.x)r=!0;else if(t.x===n.x)(t.y=i||(r=!0)}return r},t.prototype.isLine=function(e,t,n){var r=this.lineFunction(e,t),o=this.calculateFunction(r,n.x);return e.x===t.x&&t.x===n.x||Ee(o,1)===Ee(n.y,1)},t.prototype.lineFunction=function(e,t){var n=(t.y-e.y)/(t.x-e.x);return[e.y-n*e.x,n]},t.prototype.controlPoints=function(e,t,n){var r,o=w,i=x,a=!1,s=!1;if(this.isLine(e,t,n))r=this.tangent(e,t,w,x);else{var l={x:this.isMonotonicByField(e,t,n,w),y:this.isMonotonicByField(e,t,n,x)};if(l.x&&l.y)r=this.tangent(e,n,w,x),a=!0;else if(this.invertAxis(e,t,n)&&(o=x,i=w),l[o])r=0;else r=.01*(n[i]t[r]&&t[r]>e[r]||n[r]0&&(n=Mn.sum(e)/t),n},first:function(e){for(var t=e.length,n=0;n=0){this.valueGetter=this.createValueGetter(t,n);var u=this.getStandardError(r,this.getAverage(r));this.globalRange=function(e){return{low:e-u,high:e+u}}}},t.prototype.createValueGetter=function(e,t){var n,r=e.data,o=Dn.current,i=o.valueFields(e),a=we(r[0])?r[0]:{};if(k(a))n=ae("["+(t?i.indexOf(t):0)+"]");else if(M(a))n=ae();else if("object"===typeof a){n=ae(o.sourceFields(e,i)[i.indexOf(t)])}return n},t.prototype.getErrorRange=function(e,t){var n,r,o;if(!we(t))return null;if(this.globalRange)return this.globalRange(e);if(k(t))n=e-t[0],r=e+t[1];else if(M(o=parseFloat(t)))n=e-o,r=e+o;else{if(!(o=An.exec(t)))throw new Error("Invalid ErrorBar value: "+t);var i=e*(parseFloat(o[1])/100);n=e-Math.abs(i),r=e+Math.abs(i)}return{low:n,high:r}},t.prototype.getStandardError=function(e,t){return this.getStandardDeviation(e,t,!0)/Math.sqrt(t.count)},t.prototype.getStandardDeviation=function(e,t,n){for(var r=e.length,o=n?t.count-1:t.count,i=0,a=0;a5)return null;for(var s in e)if(!pe(s,n.excluded)&&e.hasOwnProperty(s)){var l=e[s];P(l)?(a=!0,r||(e[s]=De(l(t),o[s]))):I(l)&&(r||(n.defaults=o[s]),n.depth++,a=Yn(l,t,n,r)||a,n.depth--)}return a}function $n(e){for(var t=e.length,n=0,r=0;r0)return e.value/o}return e.value},t.prototype.plotRange=function(e,t){void 0===t&&(t=0);var n=this.categoryPoints[e.categoryIx];if(this.options.isStacked){for(var r=this.plotValue(e),o=r>=0,i=t,a=!1,s=0;s=0&&o||p<0&&!o)&&(i+=p,r+=p,a=!0,this.options.isStacked100&&(r=Math.min(r,1)))}return a&&(i-=t),[i,r]}var d=e.series,h=this.seriesValueAxis(d),f=this.categoryAxisCrossingValue(h);return[f,E(e.value)?e.value:f]},t.prototype.stackLimits=function(e,t){for(var n=f,r=m,o=0;o0&&(this.errorTotals.positive[t]=Math.max(this.errorTotals.positive[t]||0,o)),{low:r,high:o}},t.prototype.addValue=function(e,t){var n=t.categoryIx,r=t.series,o=t.seriesIx,i=this.categoryPoints[n];i||(this.categoryPoints[n]=i=[]);var a=this.seriesPoints[o];a||(this.seriesPoints[o]=a=[]);var s=this.createPoint(e,t);s&&(Object.assign(s,t),s.owner=this,s.noteText=e.fields.noteText,we(s.dataItem)||(s.dataItem=r.data[n]),this.addErrorBar(s,e,n)),this.points.push(s),a.push(s),i.push(s),this.updateRange(e.valueFields,t)},t.prototype.evalPointOptions=function(e,t,n,r,o,i){var a={defaults:o._defaults,excluded:["data","aggregate","_events","tooltip","content","template","visual","toggle","_outOfRangeMinPoint","_outOfRangeMaxPoint"]},s=this._evalSeries[i];we(s)||(this._evalSeries[i]=s=Yn(e,{},a,!0));var l=e;return s&&Yn(l=A({},l),{value:t,category:n,index:r,series:o,dataItem:o.data[r]},a),l},t.prototype.updateRange=function(e,t){var n=t.series.axis,r=e.value,o=this.valueAxisRanges[n];isFinite(r)&&null!==r&&((o=this.valueAxisRanges[n]=o||{min:f,max:m}).min=Math.min(o.min,r),o.max=Math.max(o.max,r))},t.prototype.seriesValueAxis=function(e){var t=this.plotArea,n=e.axis,r=n?t.namedValueAxes[n]:t.valueAxis;if(!r)throw new Error("Unable to locate value axis with name "+n);return r},t.prototype.reflow=function(e){var t=this,n=this.categorySlots=[],r=this.points,o=this.categoryAxis,i=0;this.traverseDataPoints((function(e,a){var s=a.categoryIx,l=a.series,u=t.seriesValueAxis(l),c=r[i++],p=n[s];if(p||(n[s]=p=t.categorySlot(o,s,u)),c){var d=t.plotRange(c,u.startValue()),h=t.valueSlot(u,d);if(h){var f=t.pointSlot(p,h);c.aboveAxis=t.aboveAxis(c,u),c.stackValue=d[1],t.options.isStacked100&&(c.percentage=t.plotValue(c)),t.reflowPoint(c,f)}else c.visible=!1}})),this.reflowCategories(n),!this.options.clip&&this.options.limitPoints&&this.points.length&&this.limitPoints(),this.box=e},t.prototype.valueSlot=function(e,t){return e.getSlot(t[0],t[1],!this.options.clip)},t.prototype.limitPoints=function(){for(var e=this.categoryPoints,t=e[0].concat(Ne(e)),n=0;n=n},t.prototype.categoryAxisCrossingValue=function(e){var t=this.categoryAxis,n=e.options;return[].concat(n.axisCrossingValues||n.axisCrossingValue)[t.axisIndex||0]||0},t.prototype.reflowPoint=function(e,t){e.reflow(t)},t.prototype.reflowCategories=function(){},t.prototype.pointSlot=function(e,t){var n=this.options.invertAxes,r=n?t:e,o=n?e:t;return new Be(r.x1,o.y1,r.x2,o.y2)},t.prototype.categorySlot=function(e,t){return e.getSlot(t)},t.prototype.traverseDataPoints=function(e){for(var t=this.options.series,n=$n(t),r=t.length,o=0;o1&&(e=this.createSegment(u,a,i,e),this._addSegment(e)),u=[])}u.length>1&&(e=this.createSegment(u,a,i,e),this._addSegment(e))}this.children.unshift.apply(this.children,this._segments)},_addSegment:function(e){this._segments.push(e),e.parent=this},sortPoints:function(e){return e},seriesMissingValues:function(e){var t=e.missingValues;return!t&&this.options.isStacked?Fn:t||"interpolate"},getNearestPoint:function(e,t,n){for(var r,o=new Fe(e,t),i=this.seriesPoints[n],a=f,s=0;s0&&!1!==n.visible&&this.createStroke({stroke:A({color:r,opacity:e.opacity,lineCap:"butt"},n)})},t.prototype.strokeSegments=function(){var e=this._strokeSegments;return e||(e=this._strokeSegments=this.createStrokeSegments()),e},t.prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.points())},t.prototype.stackSegments=function(){return this.prevSegment?this.prevSegment.createStackSegments(this.stackPoints):this.createStackSegments(this.stackPoints)},t.prototype.createStackSegments=function(e){return this.segmentsFromPoints(this.toGeometryPoints(e)).reverse()},t.prototype.segmentsFromPoints=function(e){return e.map((function(e){return new S.d.Segment(e)}))},t.prototype.createStroke=function(e){var t=new S.c.Path(e);t.segments.push.apply(t.segments,this.strokeSegments()),this.visual.append(t)},t.prototype.hasStackSegment=function(){return this.prevSegment||this.stackPoints&&this.stackPoints.length},t.prototype.createFill=function(e){var t=this.strokeSegments(),n=t.slice(0),r=this.hasStackSegment();if(r){var o=this.stackSegments();ge(n,o)}var i=new S.c.Path(e);i.segments.push.apply(i.segments,n),!r&&t.length>1&&this.fillToAxes(i),this.visual.append(i)},t.prototype.fillToAxes=function(e){var t=this.parent,n=t.options.invertAxes,r=t.seriesValueAxis(this.series),o=t.categoryAxisCrossingValue(r),i=r.getSlot(o,o,!0),a=this.strokeSegments(),s=a[0].anchor(),l=Ne(a).anchor(),u=n?i.x1:i.y1;n?e.lineTo(u,l.y).lineTo(u,s.y):e.lineTo(l.x,u).lineTo(s.x,u)},t}(or),gr=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.calculateStepPoints(this.linePoints))},t.prototype.createStackSegments=function(e){return this.segmentsFromPoints(this.calculateStepPoints(e)).reverse()},t}(vr);A(gr.prototype,ar);var br=gr,wr=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.createStrokeSegments=function(){var e=new xn(this.options.closed),t=this.points();return e.process(t)},t.prototype.createStackSegments=function(){for(var e=this.strokeSegments(),t=[],n=e.length-1;n>=0;n--){var r=e[n];t.push(new S.d.Segment(r.anchor(),r.controlOut(),r.controlIn()))}return t},t}(vr),xr=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.createSegment=function(e,t,n,r){var o,i,a=this.options.isStacked,s=(t.line||{}).style;a&&n>0&&r&&("gap"!==this.seriesMissingValues(t)?(i=r.linePoints,o=r):i=this._gapStackPoints(e,n,s));return new("step"===s?br:"smooth"===s?wr:vr)(e,t,n,o,i)},t.prototype.reflow=function(t){e.prototype.reflow.call(this,t);var n=this._stackPoints;if(n)for(var r=0;r0&&!d);if(d)"step"!==n&&u>o&&!r[p][c-1]&&l.push(this._previousSegmentPoint(u,c,c-1,p)),l.push(d),"step"!==n&&u+10&&!o;)o=i[--a][n];return o?o=i[a][t]:(o=this._createGapStackPoint(e),this._stackPoints.push(o)),o},t.prototype._createGapStackPoint=function(e){var t=this.pointOptions({},0),n=new nr(0,t);return n.categoryIx=e,n.series={},n},t.prototype.seriesMissingValues=function(e){return e.missingValues||Fn},t}(yr),kr=function(e){function t(){e.call(this),this.axisRanges={}}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.update=function(e){var t=this.axisRanges;for(var n in e){var r=e[n],o=t[n];t[n]=o=o||{min:f,max:m},o.min=Math.min(o.min,r.min),o.max=Math.max(o.max,r.max)}},t.prototype.reset=function(e){this.axisRanges[e]=void 0},t.prototype.query=function(e){return this.axisRanges[e]},t}(S.a),_r=function(e){function t(t,n,r){e.call(this,n),this.textBox=new lt(t,this.options,r),this.append(this.textBox)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.createVisual=function(){this.textBox.options.noclip=this.options.noclip},t.prototype.reflow=function(e){var t=this.options,n=t.vertical,r=t.aboveAxis,o=this.children[0],i=o.options,a=o.box,s=o.options.padding,c=e;i.align=n?u:h,i.vAlign=n?v:u,"insideEnd"===t.position?n?(i.vAlign=v,!r&&a.height()0&&n.height()>0&&this.createRect(this.visual)},t.prototype.createRect=function(e){var t=this.options,n=t.border,r=we(n.opacity)?n.opacity:t.opacity,o=this.box.toRect();o.size.width=Math.round(o.size.width);var i=this.rectVisual=S.c.Path.fromRect(o,{fill:{color:this.color,opacity:t.opacity},stroke:{color:this.getBorderColor(),width:n.width,opacity:r,dashType:n.dashType}}),a=this.box.width(),s=this.box.height();if((t.vertical?a:s)>6&&(N(i),(a<1||s<1)&&(i.options.stroke.lineJoin="round")),e.append(i),Sr(t)){var l=this.createGradientOverlay(i,{baseColor:this.color},A({end:t.vertical?void 0:[0,1]},t.overlay));e.append(l)}},t.prototype.createHighlight=function(e){return N(S.c.Path.fromRect(this.box.toRect(),e))},t.prototype.highlightVisual=function(){return this.rectVisual},t.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},t.prototype.getBorderColor=function(){var e=this.color,t=this.options.border,n=t._brightness||.8,r=t.color;return we(r)||(r=new S.b(e).brightness(n).toHex()),r},t.prototype.tooltipAnchor=function(){var e,t,n=this.options,r=this.box,o=this.aboveAxis,i=this.owner.pane.clipBox()||r,a=h,s=v;if(n.vertical)e=Math.min(r.x2,i.x2)+5,o?t=Math.max(r.y1,i.y1):(t=Math.min(r.y2,i.y2),s=l);else{var u=Math.max(r.x1,i.x1),c=Math.min(r.x2,i.x2);n.isStacked?(s=l,o?(a=y,e=c):e=u,t=Math.max(r.y1,i.y1)-5):(o?e=c+5:(e=u-5,a=y),t=Math.max(r.y1,i.y1))}return{point:new Fe(e,t),align:{horizontal:a,vertical:s}}},t.prototype.overlapsBox=function(e){return this.box.overlaps(e)},t.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,stackValue:this.stackValue,runningTotal:this.runningTotal,total:this.total,series:this.series}},t}(Ke);A(Nr.prototype,Qn),A(Nr.prototype,er),Nr.prototype.defaults={border:{width:1},vertical:!0,overlay:{gradient:"glass"},labels:{visible:!1,format:"{0}"},opacity:1,notes:{label:{}}};var Or=Nr;function Mr(e,t){e.forEach(t)}function Tr(e,t){for(var n=e.length,r=n-1;r>=0;r--)t(e[r],r-n-1)}var Er=function(e){function t(t){e.call(this,t),this.forEach=t.rtl?Tr:Mr}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.reflow=function(e){var t=this.options,n=t.vertical,r=t.gap,o=t.spacing,i=this.children,a=i.length,s=n?x:w,l=a+r+o*(a-1),u=(n?e.height():e.width())/l,c=e[s+1]+u*(r/2);this.forEach(i,(function(t,n){var r=(t.box||e).clone();r[s+1]=c,r[s+2]=c+u,t.reflow(r),n0&&n.options.set("stroke",{color:this.getBorderColor(),width:t.border.width,dashType:t.border.dashType,opacity:De(t.border.opacity,t.opacity)}),N(n),e.append(n),Sr(t)&&e.append(this.createGradientOverlay(n,{baseColor:this.color},A({end:t.vertical?void 0:[0,1]},t.overlay)))},t.prototype.createLines=function(e,t){this.drawLines(e,t,this.lines,t.line)},t.prototype.drawLines=function(e,t,n,r){if(n)for(var o={stroke:{color:r.color||this.color,opacity:De(r.opacity,t.opacity),width:r.width,dashType:r.dashType,lineCap:"butt"}},i=0;i{4:d}Open:{0:C}High:{1:C}Low:{2:C}Close:{3:C}"},highlight:{opacity:1,border:{width:1,opacity:1},line:{width:1,opacity:1}},notes:{visible:!0,label:{}}}),A(Rr.prototype,Qn),A(Rr.prototype,er);var jr=Rr;function Fr(e){return On(e)===e.length}var zr=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.reflowCategories=function(e){for(var t=this.children,n=t.length,r=0;rs.close&&(u=e.fields.downColor||o.downColor||o.color),P(o.color)&&(u=l.color),l.vertical=!this.options.invertAxes;var c=new a(s,l);return c.color=u,c},t.prototype.splitValue=function(e){return[e.low,e.open,e.close,e.high]},t.prototype.updateRange=function(e,t){var n=t.series.axis,r=this.splitValue(e),o=this.valueAxisRanges[n];o=this.valueAxisRanges[n]=o||{min:f,max:m},o=this.valueAxisRanges[n]={min:Math.min.apply(Math,r.concat([o.min])),max:Math.max.apply(Math,r.concat([o.max]))}},t.prototype.formatPointValue=function(e,t){var n=e.value;return this.chartService.format.auto(t,n.open,n.high,n.low,n.close,e.category)},t.prototype.animationPoints=function(){return this.points},t}(Jn);A(zr.prototype,fr);var Br=zr,Ur=function(e){function t(t,n){e.call(this,t,n),this.createNote()}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.reflow=function(e){var t,n,r=this.options,o=this.value,i=this.owner.seriesValueAxis(r);this.boxSlot=n=i.getSlot(o.q1,o.q3),this.realBody=n,this.reflowBoxSlot(e),this.whiskerSlot=t=i.getSlot(o.lower,o.upper),this.reflowWhiskerSlot(e);var a=i.getSlot(o.median);if(o.mean){var s=i.getSlot(o.mean);this.meanPoints=this.calcMeanPoints(e,s)}this.whiskerPoints=this.calcWhiskerPoints(n,t),this.medianPoints=this.calcMedianPoints(e,a),this.box=t.clone().wrap(n),this.reflowNote()},t.prototype.reflowBoxSlot=function(e){this.boxSlot.x1=e.x1,this.boxSlot.x2=e.x2},t.prototype.reflowWhiskerSlot=function(e){this.whiskerSlot.x1=e.x1,this.whiskerSlot.x2=e.x2},t.prototype.calcMeanPoints=function(e,t){return[[[e.x1,t.y1],[e.x2,t.y1]]]},t.prototype.calcWhiskerPoints=function(e,t){var n=t.center().x;return[[[n-5,t.y1],[n+5,t.y1],[n,t.y1],[n,e.y1]],[[n-5,t.y2],[n+5,t.y2],[n,t.y2],[n,e.y2]]]},t.prototype.calcMedianPoints=function(e,t){return[[[e.x1,t.y1],[e.x2,t.y1]]]},t.prototype.renderOutliers=function(e){for(var t=this.value,n=t.outliers||[],r=3*Math.abs(t.q3-t.q1),o=[],i=e.markers||{},a=0;at.q1-r?e.outliers:e.extremes).border);we(l.color)||(we(this.color)?l.color=this.color:l.color=new S.b(i.background).brightness(.8).toHex());var u=new $e({type:i.type,width:i.size,height:i.size,rotation:i.rotation,background:i.background,border:l,opacity:i.opacity});u.value=s,o.push(u)}return this.reflowOutliers(o),o},t.prototype.reflowOutliers=function(e){for(var t=this.owner.seriesValueAxis(this.options),n=this.box.center(),r=0;r{6:d}Lower:{0:C}Q1:{1:C}Median:{2:C}Mean:{5:C}Q3:{3:C}Upper:{4:C}"},highlight:{opacity:1,border:{width:1,opacity:1},line:{width:1,opacity:1}},notes:{visible:!0,label:{}},outliers:{visible:!0,size:8,type:"cross",background:b,border:{width:2,opacity:1},opacity:0},extremes:{visible:!0,size:8,type:c,background:b,border:{width:2,opacity:1},opacity:0}}),A(Ur.prototype,Qn);var Hr=Ur,Vr=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.reflowBoxSlot=function(e){this.boxSlot.y1=e.y1,this.boxSlot.y2=e.y2},t.prototype.reflowWhiskerSlot=function(e){this.whiskerSlot.y1=e.y1,this.whiskerSlot.y2=e.y2},t.prototype.calcMeanPoints=function(e,t){return[[[t.x1,e.y1],[t.x1,e.y2]]]},t.prototype.calcWhiskerPoints=function(e,t){var n=t.center().y;return[[[t.x1,n-5],[t.x1,n+5],[t.x1,n],[e.x1,n]],[[t.x2,n-5],[t.x2,n+5],[t.x2,n],[e.x2,n]]]},t.prototype.calcMedianPoints=function(e,t){return[[[t.x1,e.y1],[t.x1,e.y2]]]},t}(Hr),Zr=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.addValue=function(e,t){var n,r=t.categoryIx,o=t.category,i=t.series,a=t.seriesIx,s=this.children,l=this.options,u=e.valueFields,c=Fr(this.splitValue(u)),p=i.data[r],d=this.categoryPoints[r];d||(this.categoryPoints[r]=d=[]),c&&(n=this.createPoint(e,t));var h=s[r];h||(h=new Pr({vertical:l.invertAxes,gap:l.gap,spacing:l.spacing,rtl:!l.invertAxes&&(this.chartService||{}).rtl}),this.append(h)),n&&(this.updateRange(u,t),h.append(n),n.categoryIx=r,n.category=o,n.series=i,n.seriesIx=a,n.owner=this,n.dataItem=p),this.points.push(n),d.push(n)},t.prototype.pointType=function(){return this.options.invertAxes?Vr:Hr},t.prototype.splitValue=function(e){return[e.lower,e.q1,e.median,e.q3,e.upper]},t.prototype.updateRange=function(e,t){var n=t.series.axis,r=this.valueAxisRanges[n],o=this.splitValue(e).concat(this.filterOutliers(e.outliers));we(e.mean)&&(o=o.concat(e.mean)),r=this.valueAxisRanges[n]=r||{min:f,max:m},r=this.valueAxisRanges[n]={min:Math.min.apply(Math,o.concat([r.min])),max:Math.max.apply(Math,o.concat([r.max]))}},t.prototype.formatPointValue=function(e,t){var n=e.value;return this.chartService.format.auto(t,n.lower,n.q1,n.median,n.q3,n.upper,n.mean,e.category)},t.prototype.filterOutliers=function(e){for(var t=(e||[]).length,n=[],r=0;r0||t.size<0&&n.series.negativeValues.visible)?(this._maxSize=Math.max(this._maxSize,Math.abs(t.size)),e.prototype.addValue.call(this,t,n)):(this.points.push(null),this.seriesPoints[n.seriesIx].push(null))},t.prototype.reflow=function(t){this.updateBubblesSize(t),e.prototype.reflow.call(this,t)},t.prototype.pointType=function(){return $r},t.prototype.createPoint=function(e,t){var n=t.series,r=n.data.length,o=t.pointIx*(600/r),i={delay:o,duration:600-o,type:"bubble"},a=t.color||n.color;e.size<0&&n.negativeValues.visible&&(a=De(n.negativeValues.color,a));var s=A({labels:{animation:{delay:o,duration:600-o}}},this.pointOptions(n,t.seriesIx),{markers:{type:c,border:n.border,opacity:n.opacity,animation:i}});s=this.evalPointOptions(s,e,t),P(n.color)&&(a=s.color),s.markers.background=a;var l=new $r(e,s);return l.color=a,this.append(l),l},t.prototype.updateBubblesSize=function(e){for(var t=this.options.series,n=Math.min(e.width(),e.height()),r=0;r0&&n.options.set("stroke",{color:t.border.color||this.color,width:t.border.width,dashType:t.border.dashType,opacity:De(t.border.opacity,t.opacity)}),this.bodyVisual=n,N(n),this.visual.append(n)},t.prototype.createAnimation=function(){this.bodyVisual&&(this.animation=S.c.Animation.create(this.bodyVisual,this.options.animation))},t.prototype.createHighlight=function(e){return S.c.Path.fromRect(this.box.toRect(),e)},t.prototype.highlightVisual=function(){return this.bodyVisual},t.prototype.highlightVisualArgs=function(){return{rect:this.box.toRect(),visual:this.bodyVisual,options:this.options}},t.prototype.formatValue=function(e){return this.owner.formatPointValue(this,e)},t}(Ke);to.prototype.tooltipAnchor=Or.prototype.tooltipAnchor,Le(to,{border:{width:1},vertical:!1,opacity:1,target:{shape:"",border:{width:0,color:"green"},line:{width:2}},tooltip:{format:"Current: {0}
Target: {1}"}}),A(to.prototype,Qn),A(to.prototype,er);var no=to,ro=function(e){function t(t,n){!function(e){for(var t=e.series,n=0;n0},t.prototype.createAnimation=function(){var e=this.points;this._setAnimationOptions();for(var t=0;t180&&(e.className="k-chart-tooltip-inverse"),this.chartService.notify("showTooltip",e),this.visible=!0},t.prototype.hide=function(){this.chartService&&this.chartService.notify("hideTooltip"),this.visible=!1},t.prototype.destroy=function(){delete this.chartService},t}(S.a);Le(io,{border:{width:1},opacity:1});var ao=io,so=function(e){function t(t,n,r){e.call(this,t,r),this.crosshair=n,this.formatService=t.format,this.initAxisName()}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.initAxisName=function(){var e,t=this.crosshair.axis;e=t.plotArea.categoryAxis?t.getCategory?"categoryAxis":"valueAxis":t.options.vertical?"yAxis":"xAxis",this.axisName=e},t.prototype.showAt=function(e){var t=this.crosshair.axis,n=this.options,r=t[n.stickyMode?"getCategory":"getValue"](e),o=r;n.format?o=this.formatService.auto(n.format,r):t.options.type===p&&(o=this.formatService.auto(t.options.labels.dateFormats[t.options.baseUnit],r)),this.show({point:e,anchor:this.getAnchor(),crosshair:this.crosshair,value:o,axisName:this.axisName,axisIndex:this.crosshair.axis.axisIndex},this.options)},t.prototype.hide=function(){this.chartService.notify("hideTooltip",{crosshair:this.crosshair,axisName:this.axisName,axisIndex:this.crosshair.axis.axisIndex})},t.prototype.getAnchor=function(){var e,t,n,r=this.crosshair,o=this.options,i=o.position,a=o.padding,s=!r.axis.options.vertical,c=r.line.bbox();return s?(e=u,i===l?(t=v,n=c.bottomLeft().translate(0,a)):(t=l,n=c.topLeft().translate(0,-a))):(t=u,i===h?(e=y,n=c.topLeft().translate(-a,0)):(e=h,n=c.topRight().translate(a,0))),{point:n,align:{horizontal:e,vertical:t}}},t}(ao);Le(so,{padding:10});var lo=so,uo=function(e){function t(t,n,r){e.call(this,r),this.axis=n,this.stickyMode=n instanceof zt;var o=this.options.tooltip;o.visible&&(this.tooltip=new lo(t,this,A({},o,{stickyMode:this.stickyMode})))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.showAt=function(e){this.point=e,this.moveLine(),this.line.visible(!0),this.tooltip&&this.tooltip.showAt(e)},t.prototype.hide=function(){this.line.visible(!1),this.tooltip&&this.tooltip.hide()},t.prototype.moveLine=function(){var e,t=this.axis,n=this.point,r=t.options.vertical,o=this.getBox(),i=r?x:w,a=new S.d.Point(o.x1,o.y1);if(e=r?new S.d.Point(o.x2,o.y1):new S.d.Point(o.x1,o.y2),n)if(this.stickyMode){var s=t.getSlot(t.pointCategoryIndex(n));a[i]=e[i]=s.center()[i]}else a[i]=e[i]=n[i];this.box=o,this.line.moveTo(a).lineTo(e)},t.prototype.getBox=function(){for(var e,t=this.axis,n=t.pane.axes,r=n.length,o=t.options.vertical,i=t.lineBox().clone(),a=o?w:x,s=0;s0&&i=0;r--)for(var o=0;o0&&(r=Math.max(r,n.width()-i.contentBox.width()))}if(0!==r)for(var a=0;a0){var s=Po(i),l=Math.max(a.y1-s.y1,a.y2-s.y2);n=Math.max(n,a.x1-s.x1);for(var u=0;u0&&t.y.length>0&&(this.alignAxes(t.x,t.y),this.shrinkAxisWidth(e),this.autoRotateAxisLabels(t),this.alignAxes(t.x,t.y),this.shrinkAxisWidth(e)&&this.alignAxes(t.x,t.y),this.shrinkAxisHeight(e),this.alignAxes(t.x,t.y),this.shrinkAxisHeight(e)&&this.alignAxes(t.x,t.y),this.fitAxes(e))},t.prototype.autoRotateAxisLabels=function(e){for(var t,n=this.panes,r=Ao(n),o=0;o0&&e.y.length>0&&(this.alignAxes(e.x,e.y),this.shrinkAxisWidth(n))}},t.prototype.reflowPaneAxes=function(e){var t=e.axes,n=t.length;if(n>0)for(var r=0;r-1){for(var i=e.split(".");i.length>1;)o=i.shift(),we(r[o])||(r[o]={}),r=r[o];o=i.shift()}r[o]=n}var jo=function(e){function t(t,n,r){e.call(this);var o=n.canonicalFields(t),i=n.valueFields(t),a=n.sourceFields(t,o),s=this._seriesFields=[],l=r.query(t.type),u=t.aggregate||l;this._series=t,this._binder=n;for(var c=0;cr.to,t.reflow(e)),n&&(n.options.aboveAxis=r.to>r.from,n.reflow(e)),this.note&&this.note.reflow(e)},t}(Or);Bo.prototype.defaults=A({},Bo.prototype.defaults,{labels:{format:"{0} - {1}"},tooltip:{format:"{1}"}});var Uo=Bo,Ho=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.pointType=function(){return Uo},t.prototype.pointValue=function(e){return e.valueFields},t.prototype.formatPointValue=function(e,t){return null===e.value.from&&null===e.value.to?"":this.chartService.format.auto(t,e.value.from,e.value.to)},t.prototype.plotRange=function(e){return e?[e.value.from,e.value.to]:0},t.prototype.updateRange=function(e,t){var n=t.series.axis,r=e.from,o=e.to,i=this.valueAxisRanges[n];null!==e&&M(r)&&M(o)&&((i=this.valueAxisRanges[n]=i||{min:f,max:m}).min=Math.min(i.min,r),i.max=Math.max(i.max,r),i.min=Math.min(i.min,o),i.max=Math.max(i.max,o))},t.prototype.aboveAxis=function(e){var t=e.value;return t.from=0},t.prototype.plotRange=function(e){return[e.from,e.to]},t.prototype.createSegments=function(){for(var e=this.options.series,t=this.seriesPoints,n=this.segments=[],r=0;r0){this.invertAxes=pe(e[0].type,[zn,"bullet",Vn,"verticalArea","verticalRangeArea","rangeBar","horizontalWaterfall","verticalBoxPlot"]);for(var t=0;t0)for(i=o.options.categories=o.options.categories.slice(0);a--;)i.push("");this.valueAxisRangeTracker.update(t.valueAxisRanges),e.prototype.appendChart.call(this,t,n)},t.prototype.seriesPaneName=function(e){var t=this.options,n=e.axis,r=se([].concat(t.valueAxis),(function(e){return e.name===n}))[0],o=((t.panes||[{}])[0]||{}).name||"default";return(r||{}).pane||o},t.prototype.seriesCategoryAxis=function(e){var t=e.categoryAxis,n=t?this.namedCategoryAxes[t]:this.categoryAxis;if(!n)throw new Error("Unable to locate category axis with name "+t);return n},t.prototype.stackableChartOptions=function(e,t){var n=e.stack;return{isStacked:n,isStacked100:n&&"100%"===n.type,clip:t.options.clip}},t.prototype.groupSeriesByCategoryAxis=function(e){for(var t=[],n={},r=0;r0&&s.length>0&&e.trigger(n,{element:Ce(t),originalEvent:t,category:Co(a),value:Co(s)})}},t.prototype.pointPane=function(e){for(var t=this.panes,n=0;nt.x2&&(l=t.x2-n.x),rt.y2&&(u=t.y2-n.y),o0},t.prototype.reflow=function(e){var t=this.options,n=e.clone();this.hasItems()?"custom"===t.position?(this.containerCustomReflow(n),this.box=n):this.containerReflow(n):this.box=n},t.prototype.containerReflow=function(e){var t=this.options,n=this.container,r=t.position,o=t.width,i=t.height,a=r===v||r===l?w:x,s=this.isVertical(),u=e.clone(),c=e.clone();r!==h&&r!==y||(c.y1=u.y1=0),s&&i?(c.y2=c.y1+i,c.align(u,x,n.options.vAlign)):!s&&o&&(c.x2=c.x1+o,c.align(u,w,n.options.align)),n.reflow(c);var p=(c=n.box).clone();(t.offsetX||t.offsetY)&&(c.translate(t.offsetX,t.offsetY),this.container.reflow(c)),p[a+1]=e[a+1],p[a+2]=e[a+2],this.box=p},t.prototype.containerCustomReflow=function(e){var t=this.options,n=this.container,r=t.offsetX,o=t.offsetY,i=t.width,a=t.height,s=this.isVertical(),l=e.clone();s&&a?l.y2=l.y1+a:!s&&i&&(l.x2=l.x1+i),n.reflow(l),l=n.box,n.reflow(new Be(r,o,r+l.width(),o+l.height()))},t.prototype.renderVisual=function(){this.hasItems()&&e.prototype.renderVisual.call(this)},t}(Ke);Le(xi,{position:y,items:[],offsetX:0,offsetY:0,margin:z(5),padding:z(5),border:{color:s,width:0},item:{cursor:"pointer",spacing:6},spacing:6,background:"",zIndex:1,markers:{border:{width:0},width:15,height:3,type:"rect",align:h,vAlign:u}});var ki=xi,_i=function(e){function t(){e.call(this),this._registry=[]}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.register=function(e,t){this._registry.push({type:e,seriesTypes:t})},t.prototype.create=function(e,t,n){for(var r,o=this._registry,i=o[0],a=0;a0){i=s;break}}return new i.type(r,t,n)},t}(S.a);_i.current=new _i;var Ci=_i;function Si(e){var t=document.createElement("div");return e&&(t.className=e),t}function Ni(e){for(var t=e;t&&!le(t,"k-handle");)t=t.parentNode;return t}var Oi=function(e){function t(t,n,r,o){e.call(this);var i=t.element;this.options=A({},this.options,r),this.chart=t,this.observer=o,this.chartElement=i,this.categoryAxis=n,this._dateAxis=this.categoryAxis instanceof Wt,this.initOptions(),this.visible=this.options.visible&&i.offsetHeight,this.visible&&(this.createElements(),this.set(this._index(this.options.from),this._index(this.options.to)),this.bindEvents())}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.onPane=function(e){return this.categoryAxis.pane===e},t.prototype.createElements=function(){var e=this.options,t=this.wrapper=Si("k-selector");F(t,{top:e.offset.top,left:e.offset.left,width:e.width,height:e.height,direction:"ltr"});var n=this.selection=Si("k-selection");this.leftMask=Si("k-mask"),this.rightMask=Si("k-mask"),t.appendChild(this.leftMask),t.appendChild(this.rightMask),t.appendChild(n),n.appendChild(Si("k-selection-bg"));var r=this.leftHandle=Si("k-handle k-left-handle"),o=this.rightHandle=Si("k-handle k-right-handle");r.appendChild(Si()),o.appendChild(Si()),n.appendChild(r),n.appendChild(o),this.chartElement.appendChild(t);var i=F(n,["borderLeftWidth","borderRightWidth","height"]),a=F(r,"height").height,s=F(o,"height").height;e.selection={border:{left:i.borderLeftWidth,right:i.borderRightWidth}},F(r,{top:(i.height-a)/2}),F(o,{top:(i.height-s)/2}),t.style.cssText=t.style.cssText},t.prototype.bindEvents=function(){var e;!1!==this.options.mousewheel&&(this._mousewheelHandler=this._mousewheel.bind(this),be(this.wrapper,((e={})[Gn]=this._mousewheelHandler,e))),this._domEvents=Q.create(this.wrapper,{stopPropagation:!0,start:this._start.bind(this),move:this._move.bind(this),end:this._end.bind(this),tap:this._tap.bind(this),press:this._press.bind(this),gesturestart:this._gesturestart.bind(this),gesturechange:this._gesturechange.bind(this),gestureend:this._gestureend.bind(this)})},t.prototype.initOptions=function(){var e=this.options,t=this.categoryAxis.pane.chartsBox(),n=this.chart.chartService.intl;this._dateAxis&&A(e,{min:Rt(n,e.min),max:Rt(n,e.max),from:Rt(n,e.from),to:Rt(n,e.to)});var r=F(this.chartElement,["paddingLeft","paddingTop"]),o=r.paddingLeft,i=r.paddingTop;this.options=A({},{width:t.width(),height:t.height()+.1,padding:{left:o,top:i},offset:{left:t.x1+o,top:t.y1+i},from:e.min,to:e.max},e)},t.prototype.destroy=function(){var e;this._domEvents&&(this._domEvents.destroy(),delete this._domEvents),clearTimeout(this._mwTimeout),this._state=null,this.wrapper&&(this._mousewheelHandler&&(Pe(this.wrapper,((e={})[Gn]=this._mousewheelHandler,e)),this._mousewheelHandler=null),this.chartElement.removeChild(this.wrapper),this.wrapper=null)},t.prototype._rangeEventArgs=function(e){return{axis:this.categoryAxis.options,from:this._value(e.from),to:this._value(e.to)}},t.prototype._start=function(e){var t=this.options,n=Ce(e);if(!this._state&&n){this.chart._unsetActivePoint(),this._state={moveTarget:Ni(n)||n,startLocation:e.x?e.x.location:0,range:{from:this._index(t.from),to:this._index(t.to)}};var r=this._rangeEventArgs({from:this._index(t.from),to:this._index(t.to)});this.trigger("selectStart",r)&&(this._state=null)}},t.prototype._press=function(e){var t;(t=this._state?this._state.moveTarget:Ni(Ce(e)))&&_(t,"k-handle-active")},t.prototype._move=function(e){if(this._state){var t=this._state,n=this.options,r=this.categoryAxis,o=t.range,i=t.moveTarget,a=r.options.reverse,s=this._index(n.from),l=this._index(n.to),u=this._index(n.min),c=this._index(n.max),p=t.startLocation-e.x.location,d=o.from,h=o.to,f=o.to-o.from,m=F(this.wrapper,"width").width/(r.categoriesCount()-1),y=Math.round(p/m)*(a?-1:1);if(i){var v=le(i,"k-left-handle"),g=le(i,"k-right-handle");le(i,"k-selection k-selection-bg")?(o.from=Math.min(Math.max(u,s-y),c-f),o.to=Math.min(o.from+f,c)):v&&!a||g&&a?(o.from=Math.min(Math.max(u,s-y),c-1),o.to=Math.max(o.from+1,o.to)):(v&&a||g&&!a)&&(o.to=Math.min(Math.max(u+1,l-y),c),o.from=Math.min(o.to-1,o.from)),o.from===d&&o.to===h||(this.move(o.from,o.to),this.trigger("select",this._rangeEventArgs(o)))}}},t.prototype._end=function(){if(this._state){var e=this._state.moveTarget;e&&(r="k-handle-active",(n=e)&&n.className&&(n.className=n.className.replace(r,"").replace(C," ")));var t=this._state.range;this.set(t.from,t.to),this.trigger("selectEnd",this._rangeEventArgs(t)),delete this._state}var n,r},t.prototype._tap=function(e){var t=this.options,n=this.categoryAxis,r=this.chart._eventCoordinates(e),o=n.pointCategoryIndex(new Fe(r.x,n.box.y1)),i=this._index(t.from),a=this._index(t.to),s=this._index(t.min),l=this._index(t.max),u=a-i,c=i+u/2,p={},d=3===e.event.which,h=Math.round(c-o);this._state||d||(this.chart._unsetActivePoint(),n.options.justified||h--,p.from=Math.min(Math.max(s,i-h),l-u),p.to=Math.min(p.from+u,l),this._start(e),this._state&&(this._state.range=p,this.trigger("select",this._rangeEventArgs(p)),this._end()))},t.prototype._mousewheel=function(e){var t=this,n=ye(e);if(this._start({target:this.selection}),this._state){var r=this._state.range;e.preventDefault(),e.stopPropagation(),Math.abs(n)>1&&(n*=3),this.options.mousewheel.reverse&&(n*=-1),this.expand(n)&&this.trigger("select",{axis:this.categoryAxis.options,delta:n,originalEvent:e,from:this._value(r.from),to:this._value(r.to)}),this._mwTimeout&&clearTimeout(this._mwTimeout),this._mwTimeout=setTimeout((function(){t._end()}),150)}},t.prototype._gesturestart=function(e){var t=this.options;this._state={range:{from:this._index(t.from),to:this._index(t.to)}};var n=this._rangeEventArgs(this._state.range);this.trigger("selectStart",n)?this._state=null:e.preventDefault()},t.prototype._gestureend=function(){this._state&&(this.trigger("selectEnd",this._rangeEventArgs(this._state.range)),delete this._state)},t.prototype._gesturechange=function(e){var t=this.chart,n=this._state,r=this.options,o=this.categoryAxis,i=n.range,a=t._toModelCoordinates(e.touches[0].x.location).x,s=t._toModelCoordinates(e.touches[1].x.location).x,l=Math.min(a,s),u=Math.max(a,s);e.preventDefault(),i.from=o.pointCategoryIndex(new Fe(l))||r.min,i.to=o.pointCategoryIndex(new Fe(u))||r.max,this.move(i.from,i.to),this.trigger("select",this._rangeEventArgs(i))},t.prototype._index=function(e){var t=e;return e instanceof Date&&(t=this.categoryAxis.categoryIndex(e)),t},t.prototype._value=function(e){var t=e;return this._dateAxis&&(t=this.categoryAxis.categoryAt(e))>this.options.max&&(t=this.options.max),t},t.prototype._slot=function(e){var t=this.categoryAxis,n=this._index(e);return t.getSlot(n,n,!0)},t.prototype.move=function(e,t){var n=this.options,r=this.categoryAxis.options.reverse,o=n.offset,i=n.padding,a=n.selection.border,s=r?t:e,l=r?e:t,u="x"+(r?2:1),c=this._slot(s),p=Ee(c[u]-o.left+i.left);F(this.leftMask,{width:p}),F(this.selection,{left:p}),c=this._slot(l);var d=Ee(n.width-(c[u]-o.left+i.left));F(this.rightMask,{width:d});var h=n.width-d;h!==n.width&&(h+=a.right),F(this.rightMask,{left:h}),F(this.selection,{width:Math.max(n.width-(p+d)-a.right,0)})},t.prototype.set=function(e,t){var n=this.options,r=this._index(n.min),o=this._index(n.max),i=Oe(this._index(e),r,o),a=Oe(this._index(t),i+1,o);n.visible&&this.move(i,a),n.from=this._value(i),n.to=this._value(a)},t.prototype.expand=function(e){var t=this.options,n=this._index(t.min),r=this._index(t.max),o=t.mousewheel.zoom,i=this._index(t.from),a=this._index(t.to),s={from:i,to:a},l=A({},s);if(this._state&&(s=this._state.range),o!==y&&(s.from=Oe(Oe(i-e,0,a-1),n,r)),o!==h&&(s.to=Oe(Oe(a+e,s.from+1,r),n,r)),s.from!==l.from||s.to!==l.to)return this.set(s.from,s.to),!0},t.prototype.trigger=function(e,t){return(this.observer||this.chart).trigger(e,t)},t}(S.a);Le(Oi,{visible:!0,mousewheel:{zoom:"both"},min:m,max:f});var Mi=Oi,Ti=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.show=function(t){if(t&&t.tooltipAnchor&&(!this._current||this._current!==t)){var n=A({},this.options,t.options.tooltip),r=t.tooltipAnchor();r?(this._current=t,e.prototype.show.call(this,{point:t,anchor:r},n,t)):this.hide()}},t.prototype.hide=function(){delete this._current,e.prototype.hide.call(this)},t}(ao),Ei=function(e){function t(t,n){e.call(this,t.chartService,n),this.plotArea=t,this.formatService=t.chartService.format}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.showAt=function(e,t){var n=se(e,(function(e){var t=e.series.tooltip;return!(t&&!1===t.visible)}));if(n.length>0){var r=n[0],o=this.plotArea.categoryAxis.getSlot(r.categoryIx),i=t?this._slotAnchor(t,o):this._defaultAnchor(r,o);this.show({anchor:i,shared:!0,points:e,category:r.category,categoryText:this.formatService.auto(this.options.categoryFormat,r.category),series:this.plotArea.series},this.options)}},t.prototype._slotAnchor=function(e,t){return this.plotArea.categoryAxis.options.vertical||(e.x=t.center().x),{point:e,align:{horizontal:"left",vertical:"center"}}},t.prototype._defaultAnchor=function(e,t){var n=e.owner.pane.chartsBox(),r=this.plotArea.categoryAxis.options.vertical,o=n.center(),i=t.center();return{point:r?new Fe(o.x,i.y):new Fe(i.x,o.y),align:{horizontal:"center",vertical:"center"}}},t}(ao);Le(Ei,{categoryFormat:"{0:d}"});var Pi=Ei,Di=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.setup=function(){var e=this.element,t=this.options;if(e.bbox()){this.origin=t.origin;var n=t.vertical?x:w,r=this.fromScale=new S.d.Point(1,1);r[n]=jn,e.transform(S.d.transform().scale(r.x,r.y))}else this.abort()},t.prototype.step=function(e){var t=de(this.fromScale.x,1,e),n=de(this.fromScale.y,1,e);this.element.transform(S.d.transform().scale(t,n,this.origin))},t.prototype.abort=function(){e.prototype.abort.call(this),this.element.transform(null)},t}(S.c.Animation);Le(Di,{duration:600}),S.c.AnimationFactory.current.register(zn,Di);var Ai=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.setup=function(){var e=this.center=this.element.bbox().center();this.element.transform(S.d.transform().scale(jn,jn,e))},t.prototype.step=function(e){this.element.transform(S.d.transform().scale(e,e,this.center))},t}(S.c.Animation);Le(Ai,{easing:"easeOutElastic"}),S.c.AnimationFactory.current.register("bubble",Ai);var Ii=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.setup=function(){this.fadeTo=this.element.opacity(),this.element.opacity(0)},t.prototype.step=function(e){this.element.opacity(e*this.fadeTo)},t}(S.c.Animation);Le(Ii,{duration:200,easing:"linear"}),S.c.AnimationFactory.current.register("fadeIn",Ii);var Li=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.setup=function(){this.element.transform(S.d.transform().scale(jn,jn,this.options.center))},t.prototype.step=function(e){this.element.transform(S.d.transform().scale(e,e,this.options.center))},t}(S.c.Animation);Le(Li,{easing:"easeOutElastic",duration:600}),S.c.AnimationFactory.current.register(Hn,Li);var Ri=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.render=function(){e.prototype.render.call(this),this.renderSegments()},t.prototype.createSegment=function(e,t,n){return new("smooth"===t.style?ur:or)(e,t,n)},t.prototype.animationPoints=function(){return e.prototype.animationPoints.call(this).concat(this._segments)},t.prototype.createMissingValue=function(e,t){if(t===Fn){var n={x:e.x,y:e.y};return Kr(n.x)||(n.x=0),Kr(n.y)||(n.y=0),n}},t}(Wr);A(Ri.prototype,cr);var ji=Ri,Fi=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.initFields=function(){this.namedXAxes={},this.namedYAxes={},this.xAxisRangeTracker=new kr,this.yAxisRangeTracker=new kr},t.prototype.render=function(e){void 0===e&&(e=this.panes);for(var t=this.groupSeriesByPane(),n=0;n0&&this.appendChart(new Wr(this,{series:e,clip:t.options.clip}),t)},t.prototype.createScatterLineChart=function(e,t){e.length>0&&this.appendChart(new ji(this,{series:e,clip:t.options.clip}),t)},t.prototype.createBubbleChart=function(e,t){e.length>0&&this.appendChart(new Jr(this,{series:e,clip:t.options.clip}),t)},t.prototype.createXYAxis=function(e,t,n){for(var r,o=e.name,i=t?this.namedYAxes:this.namedXAxes,a=t?this.yAxisRangeTracker:this.xAxisRangeTracker,s=A({reverse:!t&&this.chartService.rtl},e,{vertical:t}),l=wo(s.type,"log"),u=a.query(),c=l?{min:.1,max:1}:{min:0,max:1},d=a.query(o)||u||c,h=[s.min,s.max],f=this.series,m=0;m0&&l.length>0&&e.trigger(n,{element:Ce(t),originalEvent:t,x:Co(s),y:Co(l)})},t.prototype.updateAxisOptions=function(e,t){var n=e.options.vertical,r=this.groupAxes(this.panes),o=(n?r.y:r.x).indexOf(e);zi(this.options,o,n,t),zi(this.originalOptions,o,n,t)},t}(Io);function zi(e,t,n,r){A([].concat(n?e.yAxis:e.xAxis)[t],r)}Le(Fi,{xAxis:{},yAxis:{}}),A(Fi.prototype,Lo);var Bi=Fi,Ui=function(e){function t(t,n,r){e.call(this,r),this.value=t,this.sector=n}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.render=function(){var e=this.options.labels,t=this.owner.chartService,n=this.value;if(!this._rendered&&!1!==this.visible){this._rendered=!0;var r=re(e),o=this.pointData();if(r?n=r(o):e.format&&(n=t.format.auto(e.format,n)),e.visible&&(n||0===n)){if(e.position===u||"insideEnd"===e.position){if(!e.color){var i=new S.b(this.options.color).percBrightness();e.color=i>180?s:b}e.background||(e.background=this.options.color)}else{var a=t.theme.seriesDefaults.labels;e.color=e.color||a.color,e.background=e.background||a.background}this.label=new lt(n,A({},e,{align:u,vAlign:"",animation:{type:"fadeIn",delay:this.animationDelay}}),o),this.append(this.label)}}},t.prototype.reflow=function(e){this.render(),this.box=e,this.reflowLabel()},t.prototype.reflowLabel=function(){var e=this.options.labels,t=this.label,n=this.sector.clone(),r=e.distance,o=n.middle();if(t){var i,a=t.box.height(),s=t.box.width();if(e.position===u)n.radius=Math.abs((n.radius-a)/2)+a,i=n.point(o),t.reflow(new Be(i.x,i.y-a/2,i.x,i.y));else if("insideEnd"===e.position)n.radius=n.radius-a/2,i=n.point(o),t.reflow(new Be(i.x,i.y-a/2,i.x,i.y));else{var l;(i=n.clone().expand(r).point(o)).x>=n.center.x?(l=i.x+s,t.orientation=y):(l=i.x-s,t.orientation=h),t.reflow(new Be(l,i.y-a,i.x,i.y))}}},t.prototype.createVisual=function(){var t=this,n=this.sector,r=this.options;if(e.prototype.createVisual.call(this),this.value)if(r.visual){var o=(n.startAngle+180)%360,i=r.visual({category:this.category,dataItem:this.dataItem,value:this.value,series:this.series,percentage:this.percentage,center:new S.d.Point(n.center.x,n.center.y),radius:n.radius,innerRadius:n.innerRadius,startAngle:o,endAngle:o+n.angle,options:r,sender:this.getSender(),createVisual:function(){var e=new S.c.Group;return t.createSegmentVisual(e),e}});i&&this.visual.append(i)}else this.createSegmentVisual(this.visual)},t.prototype.createSegmentVisual=function(e){var t=this.sector,n=this.options,r=n.border||{},o=r.width>0?{stroke:{color:r.color,width:r.width,opacity:r.opacity,dashType:r.dashType}}:{},i=n.color,a={color:i,opacity:n.opacity},s=this.createSegment(t,A({fill:a,stroke:{opacity:n.opacity},zIndex:n.zIndex},o));e.append(s),Sr(n)&&e.append(this.createGradientOverlay(s,{baseColor:i,fallbackFill:a},A({center:[t.center.x,t.center.y],innerRadius:t.innerRadius,radius:t.radius,userSpace:!0},n.overlay)))},t.prototype.createSegment=function(e,t){return t.singleSegment?new S.c.Circle(new S.d.Circle(new S.d.Point(e.center.x,e.center.y),e.radius),t):Ze.current.createRing(e,t)},t.prototype.createAnimation=function(){var t=this.options,n=this.sector.center;A(t,{animation:{center:[n.x,n.y],delay:this.animationDelay}}),e.prototype.createAnimation.call(this)},t.prototype.createHighlight=function(e){var t=this.options.highlight||{},n=t.border||{};return this.createSegment(this.sector,A({},e,{fill:{color:t.color,opacity:t.opacity},stroke:{opacity:n.opacity,width:n.width,color:n.color}}))},t.prototype.highlightVisual=function(){return this.visual.children[0]},t.prototype.highlightVisualArgs=function(){var e=this.sector;return{options:this.options,radius:e.radius,innerRadius:e.innerRadius,center:new S.d.Point(e.center.x,e.center.y),startAngle:e.startAngle,endAngle:e.angle+e.startAngle,visual:this.visual}},t.prototype.tooltipAnchor=function(){var e=this.sector.clone().expand(5),t=e.middle();return{point:e.point(t),align:Zi(t+180)}},t.prototype.formatValue=function(e){return this.owner.formatPointValue(this,e)},t.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,series:this.series,percentage:this.percentage}},t}(Ke),Hi=Ee(Te(30),10),Vi=Ee(Te(60),10);function Zi(e){var t=Te(e),n=Ee(Math.sin(t),10),r=Ee(Math.cos(t),10);return{horizontal:Math.abs(n)>Vi?u:r<0?y:h,vertical:Math.abs(n)s-5?s-5:m,u.translate(p.x-c.x,p.y-c.y);for(var v=s-m,g=new Fe(v+u.x1+m,v+u.y1+m),b=0;b0&&(h.sort(this.labelComparator(!0)),this.leftLabelsReflow(h)),f.length>0&&(f.sort(this.labelComparator(!1)),this.rightLabelsReflow(f)),this.box=u},t.prototype.leftLabelsReflow=function(e){var t=this.distanceBetweenLabels(e);this.distributeLabels(t,e)},t.prototype.rightLabelsReflow=function(e){var t=this.distanceBetweenLabels(e);this.distributeLabels(t,e)},t.prototype.distanceBetweenLabels=function(e){var t=Ne(this.points),n=t.sector,r=e.length-1,o=n.radius+t.options.labels.distance,i=[],a=e[0].box,s=Ee(a.y1-(n.center.y-o-a.height()-a.height()/2));i.push(s);for(var l=0;l0&&(n>=0||r0){var i=Math.min(e[n],o);o-=i,e[n]-=i,e[t]+=i}return o},t.prototype.reflowLabels=function(e,t){var n,r=Ne(this.points),o=r.sector,i=r.options.labels,a=t.length,s=i.distance,l=o.center.y-(o.radius+s)-t[0].box.height();e[0]+=2;for(var u=0;ua.center.x?(m=a.center.x-a.radius-4,i.options.labels.align!==Bn?m>f.x?c.lineTo(m,h.y):c.lineTo(h.x-8,h.y):c.lineTo(m,h.y),c.lineTo(f.x,v.y)):(g.y=v.y,c.lineTo(g.x,g.y))),c.lineTo(v.x,v.y),this._connectorLines.push(c),this.visual.append(c)}}}},t.prototype.renderVisual=function(){if(e.prototype.renderVisual.call(this),this.options.series.find((function(e){return e.autoFit}))){var t=this.targetBox,n=this.box.center(),r=this.visual.bbox();if(!r)return;var o=r.bottomRight(),i=Math.min((n.y-t.y1)/(n.y-r.origin.y),(t.y2-n.y)/(o.y-n.y),(n.x-t.x1)/(n.x-r.origin.x),(t.x2-n.x)/(o.x-n.x));i<1&&this.visual.transform(S.d.transform().scale(i,i,[n.x,n.y]))}},t.prototype.labelComparator=function(e){var t=e?-1:1;return function(e,n){return((e.parent.sector.middle()+270)%360-(n.parent.sector.middle()+270)%360)*t}},t.prototype.hAlignLabel=function(e,t,n,r,o){var i=t.radius,a=t.center,s=a.x,l=a.y,u=Math.min(Math.abs(l-n),Math.abs(l-r));return u>i?e:s+Math.sqrt(i*i-u*u)*(o?1:-1)},t.prototype.pointInCircle=function(e,t,n){return Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)a-5?a-5:c),d=0,h=0;h1)for(var t=function(e){for(var t=[],n=0;n1&&Ne(r).linePoints.push(r[0].linePoints[0])}},t.prototype.createSegment=function(e,t,n){var r=new("smooth"===t.style?ur:or)(e,t,n);return e.length===t.data.length&&(r.options.closed=!0),r},t}(yr);Le(ha,{clip:!1,limitPoints:!1});var fa=ha,ma=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.fillToAxes=function(){},t}(wr),ya=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.fillToAxes=function(){},t}(vr),va=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.createSegment=function(e,t,n,r){var o,i,a,s=this.options.isStacked,l=(t.line||{}).style;return s&&n>0&&r&&(i=r.linePoints.slice(0),o=r),"smooth"===l?(a=new ma(e,t,n,o,i)).options.closed=!0:(e.push(e[0]),a=new ya(e,t,n,o,i)),a},t.prototype.seriesMissingValues=function(e){return e.missingValues||Fn},t}(fa),ga=function(e){function t(t,n){e.call(this,t,null,n)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(Ji);Le(ga,{overlay:{gradient:"none"},labels:{distance:10}});var ba=ga,wa=function(e){function t(t){e.call(this,t),this.forEach=t.rtl?Tr:Mr}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.reflow=function(e){var t=this.options,n=this.children,r=t.gap,o=t.spacing,i=n.length,a=i+r+o*(i-1),s=e.angle/a,l=e.startAngle+s*(r/2);this.forEach(n,(function(t){var n=e.clone();n.startAngle=l,n.angle=s,t.sector&&(n.radius=t.sector.radius),t.reflow(n),t.sector=n,l+=s+s*o}))},t}(Ke);Le(wa,{gap:1,spacing:0});var xa=wa,ka=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.reflow=function(e){var t=this.options.reverse,n=this.children,r=n.length,o=t?r-1:0,i=t?-1:1;this.box=new Be;for(var a=o;a>=0&&a1,t.isStacked100=o&&"100%"===o.type&&r.length>1,t.isStacked100&&(this._isStacked100=!0)}return t},t.prototype.createAreaChart=function(e,t){if(0!==e.length){var n=new va(this,this.chartOptions(e));this.appendChart(n,t)}},t.prototype.createLineChart=function(e,t){if(0!==e.length){var n=new fa(this,this.chartOptions(e));this.appendChart(n,t)}},t.prototype.createBarChart=function(e,t){if(0!==e.length){var n=e[0],r=this.chartOptions(e);r.gap=n.gap,r.spacing=n.spacing;var o=new Ca(this,r);this.appendChart(o,t),this._hasBarCharts=!0}},t.prototype.seriesCategoryAxis=function(){return this.categoryAxis},t.prototype._dispatchEvent=function(e,t,n){var r=e._eventCoordinates(t),o=new Fe(r.x,r.y),i=this.categoryAxis.getCategory(o),a=this.valueAxis.getValue(o);null!==i&&null!==a&&e.trigger(n,{element:Ce(t),category:i,value:a})},t.prototype.createCrosshairs=function(){},t}(na);A(Sa.prototype,Lo,{appendChart:ui.prototype.appendChart,aggregateSeries:ui.prototype.aggregateSeries,seriesSourcePoints:ui.prototype.seriesSourcePoints}),Le(Sa,{categoryAxis:{categories:[]},valueAxis:{}});var Na=Sa,Oa=function(e){function t(t,n,r){e.call(this,n),this.value=t,this.options.index=r.index}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.reflow=function(e){var t=this.points,n=this.children[0];this.box=new Be(t[0].x,t[0].y,t[1].x,t[2].y),n&&n.reflow(new Be(e.x1,t[0].y,e.x2,t[2].y))},t.prototype.createVisual=function(){var t,n=this,r=this.options;e.prototype.createVisual.call(this),(t=r.visual?r.visual({category:this.category,dataItem:this.dataItem,value:this.value,series:this.series,percentage:this.percentage,points:this.points,options:r,sender:this.getSender(),createVisual:function(){return n.createPath()}}):this.createPath())&&this.visual.append(t)},t.prototype.createPath=function(){var e=this.options,t=e.border;return S.c.Path.fromPoints(this.points,{fill:{color:e.color,opacity:e.opacity},stroke:{color:t.color,opacity:t.opacity,width:t.width}}).close()},t.prototype.createHighlight=function(e){return S.c.Path.fromPoints(this.points,e)},t.prototype.highlightVisual=function(){return this.visual.children[0]},t.prototype.highlightVisualArgs=function(){var e=S.c.Path.fromPoints(this.points).close();return{options:this.options,path:e}},t.prototype.tooltipAnchor=function(){var e=this.box;return{point:new Fe(e.center().x,e.y1),align:{horizontal:"center",vertical:"top"}}},t.prototype.formatValue=function(e){return this.owner.formatPointValue(this,e)},t}(Ke);Le(Oa,{color:b,border:{width:1}}),A(Oa.prototype,Qn);var Ma=Oa,Ta=function(e){function t(t,n){e.call(this,n),this.plotArea=t,this.points=[],this.labels=[],this.legendItems=[],this.render()}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.formatPointValue=function(e,t){return this.chartService.format.auto(t,e.value)},t.prototype.render=function(){var e=this.options,t=this.plotArea.options.seriesColors;void 0===t&&(t=[]);var n=e.series[0],r=n.data;if(r)for(var o=bo(n),i=o.total,a=o.points,s=0;s180?s:b,o.background||(o.background=n.color)}this.evalSegmentOptions(o,e,t);var c=new lt(i,A({vAlign:o.position},o),l);return this.labels.push(c),c}},t.prototype.labelPadding=function(){for(var e=this.labels,t={left:0,right:0},n=0;ns.percentage&&(s=o[l]);for(var u=a.percentage/s.percentage*t,c=(t-u)/2,p=0,d=0;d0||t.height>0;e||r&&(!n||t.width!==n.width||t.height!==n.height)?(this._size=t,this._resize(t,e),this.trigger("resize",t)):r&&this._selections&&this._selections.find((function(e){return!e.visible}))&&(this._destroySelections(),this._setupSelection())},t.prototype._resize=function(){this._noTransitionsRedraw()},t.prototype.redraw=function(e){if(this.applyDefaults(this.options),this.applySeriesColors(),e){var t=this._model._plotArea,n=t.findPane(e);t.redraw(n)}else this._redraw()},t.prototype.getAxis=function(e){return _n(e,this._plotArea.axes)},t.prototype.findAxisByName=function(e){return this.getAxis(e)},t.prototype.findPaneByName=function(e){for(var t=this._plotArea.panes,n=0;n=0){var a=this._plotArea.pointsByCategoryIndex(n);o.showAt(a)}}else t&&o.show(t)},t.prototype.hideTooltip=function(){this._tooltip.hide()},t.prototype._initSurface=function(){var e=this.surface,t=this._surfaceWrap(),n=this.options.chartArea||{};n.width&&_e(t,{width:n.width}),n.height&&_e(t,{height:n.height}),e&&e.options.type===this.options.renderAs?(this.surface.clear(),this.surface.resize()):(this._destroySurface(),this.surface=S.c.Surface.create(t,{type:this.options.renderAs}),this.surface.bind("mouseenter",this._surfaceMouseenterHandler),this.surface.bind("mouseleave",this._surfaceMouseleaveHandler))},t.prototype._surfaceWrap=function(){return this.element},t.prototype._redraw=function(){var e=this._getModel();this._size={width:e.options.width,height:e.options.height},this._destroyView(),this._model=e,this._plotArea=e._plotArea,e.renderVisual(),!1!==this.options.transitions&&e.traverse((function(e){e.animation&&e.animation.setup()})),this._initSurface(),this.surface.draw(e.visual),!1!==this.options.transitions&&e.traverse((function(e){e.animation&&e.animation.play()})),this._tooltip=this._createTooltip(),this._highlight=new pi,this._setupSelection(),this._createPannable(),this._createZoomSelection(),this._createMousewheelZoom(),this.trigger("render"),Ha(this._plotArea.panes),this._navState||this._cancelDomEvents()},t.prototype.exportVisual=function(e){var t;if(e&&(e.width||e.height||e.options)){var n=this.options,r=A({},e.options,{chartArea:{width:e.width,height:e.height}});Ua(this._originalOptions,r),this.options=A({},this._originalOptions,r),this._initTheme(this.options,this._theme),this.bindCategories();var o=this._getModel();o.renderVisual(),Ha(o._plotArea.panes),t=o.visual,this.options=n}else t=this.surface.exportVisual();return t},t.prototype._sharedTooltip=function(){return this._plotArea instanceof ui&&this.options.tooltip&&this.options.tooltip.shared},t.prototype._createPannable=function(){var e=this.options;!1!==e.pannable&&(this._pannable=new mi(this._plotArea,e.pannable))},t.prototype._createZoomSelection=function(){var e=this.options.zoomable,t=(e||{}).selection;!1!==e&&!1!==t&&(this._zoomSelection=new vi(this,t))},t.prototype._createMousewheelZoom=function(){var e=this.options.zoomable,t=(e||{}).mousewheel;!1!==e&&!1!==t&&(this._mousewheelZoom=new gi(this,t))},t.prototype._toggleDragZoomEvents=function(){var e=this.options.pannable,t=this.options.zoomable,n=(t||{}).selection,r=(t||{}).mousewheel,o=!e&&(!1===t||!1===n)&&!this.requiresHandlers(["dragStart","drag","dragEnd"]),i=(!1===t||!1===r)&&!this.requiresHandlers(["zoomStart","zoom","zoomEnd"]),a=this.element;this._dragZoomEnabled&&o&&i?(a.style.touchAction=this._touchAction||"",this._dragZoomEnabled=!1):this._dragZoomEnabled||o&&i||(a.style.touchAction="none",this._dragZoomEnabled=!0),this._toggleDomEvents(!o,!i)},t.prototype._toggleDomEvents=function(e,t){var n=this.domEvents;n&&(n.toggleDrag&&n.toggleDrag(e),n.toggleZoom&&n.toggleZoom(t))},t.prototype._createTooltip=function(){var e=this.options.tooltip;return this._sharedTooltip()?this._createSharedTooltip(e):new Ti(this.chartService,e)},t.prototype._createSharedTooltip=function(e){return new Pi(this._plotArea,e)},t.prototype.applyDefaults=function(e,t){!function(e,t){var n,r,o,i=(t||{}).axisDefaults||{};function a(e){var t=(e||{}).color||r.color,o=A({},i,i[n],r,r[n],{line:{color:t},labels:{color:t},title:{color:t}},e);return delete o[n],o}for(var s=0;s1?o:o[0]}(e,t),function(e,t){var n=e.series,r=n.length,o=e.seriesDefaults,i=A({},e.seriesDefaults),a=t?A({},t.seriesDefaults):{},s=A({},a);Fa(i),Fa(s);for(var l=0;l=0&&this.observers.splice(t,1)},t.prototype.requiresHandlers=function(e){for(var t=this.observers,n=0;n=.1){r=Math.round(10*r),this._gestureDistance=e.distance;var o={delta:r,axisRanges:za(this._plotArea.axes),originalEvent:e};if(this._zooming||!this.trigger("zoomStart",o))this._zooming||(this._zooming=!0),(o.axisRanges=t.updateRanges(r))&&!this.trigger("zoom",o)&&t.zoom()}}},t.prototype._mouseout=function(e){if(e.element){var t=this._drawingChartElement(e.element,e);t&&t.leave&&t.leave(this,e.originalEvent)}},t.prototype._start=function(e){var t=this._eventCoordinates(e);!this._stopChartHandlers(e)&&this._plotArea.backgroundContainsPoint(t)&&(this.requiresHandlers(["dragStart","drag","dragEnd"])&&this._startNavigation(e,t,"dragStart"),this._pannable&&this._pannable.start(e)&&(this.surface.suspendTracking(),this._unsetActivePoint(),this._suppressHover=!0,this.chartService.panning=!0),this._zoomSelection&&this._zoomSelection.start(e)&&this.trigger("zoomStart",{axisRanges:za(this._plotArea.axes),originalEvent:e}))},t.prototype._move=function(e){var t=this._navState,n=this._pannable;if(!this._stopChartHandlers(e)){if(n){var r=n.move(e);r&&!this.trigger("drag",{axisRanges:r,originalEvent:e})&&n.pan()}else if(t){for(var o={},i=t.axes,a=0;a0&&!this.trigger("seriesHover",p)?(r.visible&&a.showAt(u,e),s.show(u),this._sharedHighlight=!0):a.hide(),this._tooltipCategoryIx=l}else n&&this._sharedHighlight&&(s.hide(),a.hide(),this._sharedHighlight=!1)}else this._sharedHighlight&&(s.hide(),a.hide(),this._tooltipCategoryIx=null,this._sharedHighlight=!1)}},t.prototype.hideElements=function(){var e=this._plotArea;this._mousemove.cancel(),e.hideCrosshairs(),this._unsetActivePoint()},t.prototype._unsetActivePoint=function(){var e=this._tooltip,t=this._highlight;this._activePoint=null,this._hoveredPoint=null,e&&e.hide(),this._tooltipCategoryIx=null,this._sharedHighlight=!1,t&&t.hide()},t.prototype._deferRedraw=function(){this._redraw()},t.prototype._clearRedrawTimeout=function(){this._redrawTimeout&&(clearInterval(this._redrawTimeout),this._redrawTimeout=null)},t.prototype.bindCategories=function(){for(var e=this.options,t=[].concat(e.categoryAxis),n=0;n0)for(var f=(n=_o(e,En(u.categoryField,p[0])))?ko:En,m=0;m0){n&&(a=function(e,t){void 0===t&&(t=Tt);for(var n=function(e,t){void 0===t&&(t=Tt);for(var n=1,r=e.length;n0?[n[0]]:[],i=1;i0;)e.shift().destroy()},t.prototype._destroyView=function(){var e=this._model;e&&(e.destroy(),this._model=null),this._unsetActivePoint(),this._destroySelections(),this._tooltip&&this._tooltip.destroy(),this._highlight&&this._highlight.destroy(),this._zoomSelection&&(this._zoomSelection.destroy(),delete this._zoomSelection),this._pannable&&(this._pannable.destroy(),delete this._pannable),this._mousewheelZoom&&(this._mousewheelZoom.destroy(),delete this._mousewheelZoom)},t}(S.a);function ja(e,t){if(e)for(var n=0;n0&&(p+=n.left+n.right),p},t.prototype._createSharedTooltip=function(e){return new Za(this._plotArea,e)},t.normalizeOptions=function(e){var t=Wa(e);return(t=k(t)?{seriesDefaults:{data:t}}:A({},t)).series||(t.series=[{data:Wa(t.data)}]),A(t,{seriesDefaults:{type:t.type}}),(pe(t.series[0].type,Ga)||pe(t.seriesDefaults.type,Ga))&&(t=A({},{categoryAxis:{crosshair:{visible:!1}}},t)),t},t}(Va);Le(Ya,{chartArea:{margin:2},axisDefaults:{visible:!1,majorGridLines:{visible:!1},valueAxis:{narrowRange:!0}},seriesDefaults:{type:"line",area:{line:{width:.5}},bar:{stack:!0},padding:2,width:.5,overlay:{gradient:null},highlight:{visible:!1},border:{width:0},markers:{size:2,visible:!1}},tooltip:{visible:!0,shared:!0},categoryAxis:{crosshair:{visible:!0,tooltip:{visible:!1}}},legend:{visible:!1},transitions:!1,pointWidth:5,panes:[{clip:!1}]});var $a=Ya,Xa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.setup=function(){this._initialOpacity=parseFloat(F(this.element,"opacity").opacity)},t.prototype.step=function(e){F(this.element,{opacity:String(de(this._initialOpacity,0,e))})},t.prototype.abort=function(){e.prototype.abort.call(this),F(this.element,{display:"none",opacity:String(this._initialOpacity)})},t.prototype.cancel=function(){e.prototype.abort.call(this),F(this.element,{opacity:String(this._initialOpacity)})},t}(S.c.Animation);function Ja(e,t){var n=document.createElement("div");return n.className=e,t&&(n.style.cssText=t),n}var Qa=function(e){function t(t,n,r){e.call(this),this.options=A({},this.options,r),this.container=t,this.chartService=n;var o=F(t,["paddingLeft","paddingTop"]);this.chartPadding={top:o.paddingTop,left:o.paddingLeft},this.createElements(),t.appendChild(this.element)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.createElements=function(){var e=this.element=Ja("k-navigator-hint","display: none; position: absolute; top: 1px; left: 1px;"),t=this.tooltip=Ja("k-tooltip k-chart-tooltip"),n=this.scroll=Ja("k-scroll");t.innerHTML=" ",e.appendChild(t),e.appendChild(n)},t.prototype.show=function(e,t,n){var r=this.element,o=this.options,i=this.scroll,a=this.tooltip,s=Ct(Pt(e)+Pt(t-e)/2),l=.4*n.width(),u=n.center().x-l,c=(n.center().x-u)/(o.max-o.min),p=s-o.min,d=this.chartService.intl.format(o.format,e,t),h=re(o);this.clearHideTimeout(),this._visible||(F(r,{visibility:"hidden",display:"block"}),this._visible=!0),h&&(d=h({from:e,to:t})),a.innerHTML=d,F(a,{left:n.center().x-a.offsetWidth/2,top:n.y1});var f=F(a,["marginTop","borderTopWidth","height"]);F(i,{width:l,left:u+p*c,top:n.y1+f.marginTop+f.borderTopWidth+f.height/2}),F(r,{visibility:"visible"})},t.prototype.clearHideTimeout=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this._hideAnimation&&this._hideAnimation.cancel()},t.prototype.hide=function(){var e=this;this.clearHideTimeout(),this._hideTimeout=setTimeout((function(){e._visible=!1,e._hideAnimation=new Xa(e.element),e._hideAnimation.setup(),e._hideAnimation.play()}),this.options.hideDelay)},t.prototype.destroy=function(){this.clearHideTimeout(),this.container&&this.container.removeChild(this.element),delete this.container,delete this.chartService,delete this.element,delete this.tooltip,delete this.scroll},t}(S.a);Le(Qa,{format:"{0:d} - {1:d}",hideDelay:500});var es=Qa;function ts(){}var ns=function(e){function t(t){var n;e.call(this),this.chart=t;var r=this.options=A({},this.options,t.options.navigator),o=r.select;o&&(o.from=this.parseDate(o.from),o.to=this.parseDate(o.to)),we(r.hint.visible)||(r.hint.visible=r.visible),this.chartObserver=new fe(this,((n={}).drag="_drag",n.dragEnd="_dragEnd",n.zoom="_zoom",n.zoomEnd="_zoomEnd",n)),t.addObserver(this.chartObserver)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.parseDate=function(e){return Rt(this.chart.chartService.intl,e)},t.prototype.clean=function(){this.selection&&(this.selection.destroy(),this.selection=null),this.hint&&(this.hint.destroy(),this.hint=null)},t.prototype.destroy=function(){this.chart&&(this.chart.removeObserver(this.chartObserver),delete this.chart),this.clean()},t.prototype.redraw=function(){this._redrawSelf(),this.initSelection()},t.prototype.initSelection=function(){var e,t=this.chart,n=this.options,r=this.mainAxis(),o=r.roundedRange(),i=o.min,a=o.max,s=n.select,l=s.from,u=s.to,c=s.mousewheel,p=(e=r,ts.prototype=e,new ts);0!==r.categoriesCount()&&(this.clean(),p.box=r.box,this.selection=new Mi(t,p,{min:i,max:a,from:l||i,to:u||a,mousewheel:De(c,{zoom:"left"}),visible:n.visible},new fe(this,{selectStart:"_selectStart",select:"_select",selectEnd:"_selectEnd"})),n.hint.visible&&(this.hint=new es(t.element,t.chartService,{min:i,max:a,template:re(n.hint),format:n.hint.format})))},t.prototype.setRange=function(){var e=this.chart._createPlotArea(!0).namedCategoryAxes._navigator.roundedRange(),t=e.min,n=e.max,r=this.options.select||{},o=r.from||t;on&&(i=n),this.options.select=A({},r,{from:o,to:i}),this.filterAxes()},t.prototype._redrawSelf=function(e){var t=this.chart._plotArea;t&&t.redraw(Ne(t.panes),e)},t.prototype.redrawSlaves=function(){var e=this.chart,t=e._plotArea,n=t.panes.slice(0,-1);t.srcSeries=e.options.series,t.options.categoryAxis=e.options.categoryAxis,t.clearSeriesPointsCache(),t.redraw(n)},t.prototype._drag=function(e){var t,n=this.chart,r=this.selection,o=n._eventCoordinates(e.originalEvent),i=this.mainAxis(),a=i.roundedRange(),s=i.pane.box.containsPoint(o),l=n._plotArea.categoryAxis,u=e.axisRanges[l.options.name],c=this.options.select;if(u&&!s&&r){t=c.from&&c.to?Pt(c.to)-Pt(c.from):Pt(r.options.to)-Pt(r.options.from);var p=Ct(Oe(Pt(u.min),a.min,Pt(a.max)-t)),d=Ct(Oe(Pt(p)+t,Pt(a.min)+t,a.max));this.options.select={from:p,to:d},this.options.liveDrag&&(this.filterAxes(),this.redrawSlaves()),r.set(p,d),this.showHint(p,d)}},t.prototype._dragEnd=function(){this.filterAxes(),this.filter(),this.redrawSlaves(),this.hint&&this.hint.hide()},t.prototype.readSelection=function(){var e=this.selection.options,t=e.from,n=e.to,r=this.options.select;r.from=t,r.to=n},t.prototype.filterAxes=function(){var e=this.options.select;void 0===e&&(e={});for(var t=this.chart.options.categoryAxis,n=e.from,r=e.to,o=0;o1&&(s*=3),u-l>1?(n.expand(s),this.readSelection()):(t.options.min=o.from,o.from=t.scaleRange(-e.delta).min),i&&(this.filterAxes(),this.redrawSlaves()),n.set(o.from,o.to),this.showHint(this.options.select.from,this.options.select.to)}},t.prototype._zoomEnd=function(e){this._dragEnd(e)},t.prototype.showHint=function(e,t){var n=this.chart._plotArea;this.hint&&this.hint.show(e,t,n.backgroundBox())},t.prototype._selectStart=function(e){return this.chart._selectStart(e)},t.prototype._select=function(e){return this.showHint(e.from,e.to),this.chart._select(e)},t.prototype._selectEnd=function(e){return this.hint&&this.hint.hide(),this.readSelection(),this.filterAxes(),this.filter(),this.redrawSlaves(),this.chart._selectEnd(e)},t.prototype.mainAxis=function(){var e=this.chart._plotArea;if(e)return e.namedCategoryAxes._navigator},t.prototype.select=function(e,t){var n=this.options.select;return e&&t&&(n.from=this.parseDate(e),n.to=this.parseDate(t),this.filterAxes(),this.filter(),this.redrawSlaves(),this.selection.set(e,t)),{from:n.from,to:n.to}},t.setup=function(e,n){if(void 0===e&&(e={}),void 0===n&&(n={}),!e.__navi){e.__navi=!0;var r=A({},n.navigator,e.navigator),o=e.panes=[].concat(e.panes),i=A({},r.pane,{name:"_navigator"});r.visible||(i.visible=!1,i.height=.1),o.push(i),t.attachAxes(e,r),t.attachSeries(e,r,n)}},t.attachAxes=function(e,t){var n=t.series||[],r=e.categoryAxis=[].concat(e.categoryAxis),o=e.valueAxis=[].concat(e.valueAxis),i=0===xo(n,Zn).length,a=A({type:"date",pane:"_navigator",roundToBaseUnit:!i,justified:i,_collapse:!1,majorTicks:{visible:!0},tooltip:{visible:!1},labels:{step:1},autoBind:t.autoBindElements,autoBaseUnitSteps:{minutes:[1],hours:[1,2],days:[1,2],weeks:[],months:[1],years:[1]}}),s=t.categoryAxis;r.push(A({},a,{maxDateGroups:200},s,{name:"_navigator",title:null,baseUnit:"fit",baseUnitStep:"auto",labels:{visible:!1},majorTicks:{visible:!1}}),A({},a,s,{name:"_navigator_labels",maxDateGroups:20,baseUnitStep:"auto",labels:{position:""},plotBands:[],autoBaseUnitSteps:{minutes:[]},_overlap:!0}),A({},a,s,{name:"_navigator_ticks",maxDateGroups:200,majorTicks:{width:.5},plotBands:[],title:null,labels:{visible:!1,mirror:!0},_overlap:!0})),o.push(A({name:"_navigator",pane:"_navigator",majorGridLines:{visible:!1},visible:!1},t.valueAxis))},t.attachSeries=function(e,t,n){for(var r=e.series=e.series||[],o=[].concat(t.series||[]),i=n.seriesColors,a=t.seriesDefaults,s=0;s0&&(r=ds(r,n.width)),hs.fromRect(r,{stroke:{color:n.width?n.color:"",width:n.width,dashType:n.dashType,lineJoin:"round",lineCap:"round"},fill:{color:e.background}})},t.prototype._initSurface=function(){var e=this.options,t=this.surface,n=this._surfaceElement(),r=this._surfaceSize();_e(n,r),t&&t.options.type===e.renderAs?(this.surface.clear(),this.surface.resize()):(t&&t.destroy(),this.surface=fs.create(n,{type:e.renderAs}))},t.prototype._surfaceSize=function(){var e=this.options,t=this._getSize();return e.gaugeArea&&A(t,e.gaugeArea),t},t.prototype._surfaceElement=function(){return this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.element.appendChild(this.surfaceElement)),this.surfaceElement},t.prototype.getSize=function(){return this._getSize()},t.prototype._getSize=function(){var e=this.element,t=this._defaultSize(),n=e.offsetWidth,r=e.offsetHeight;return n||(n=t.width),r||(r=t.height),{width:n,height:r}},t.prototype._defaultSize=function(){return{width:200,height:200}},t.prototype._toggleTransitions=function(e){this.options.transitions=e;for(var t=0;t0&&e.visible){var r=new vs({stroke:{color:e.color,dashType:e.dashType,width:e.width}});r.moveTo(t.x1,t.y1).lineTo(t.x2,t.y2),n.append(r)}return n},t.prototype.renderTicks=function(){var e=new gs,t=this.options,n=t.majorTicks.visible?t.majorUnit:0,r={vertical:t.vertical,mirror:t.labels.mirror,lineBox:this.lineBox()};return xs(e,this.getMajorTickPositions(),r,t.majorTicks),xs(e,this.getMinorTickPositions(),r,A({},{skipUnit:n/t.minorUnit},t.minorTicks)),e},t}(tn);Le(ks,{min:0,max:50,majorTicks:{size:15,align:"inside",color:s,width:.5,visible:!0},minorTicks:{size:10,align:"inside",color:s,width:.5,visible:!0},line:{width:.5},labels:{position:"inside",padding:2},mirror:!1,_alignLines:!1});var _s=ks,Cs=function(e){function t(t,n){e.call(this);var r=t.options,o=r.min,i=r.max,a=this.options=A({},this.options,n);a.fill=a.color,this.scale=t,we(a.value)?a.value=Oe(a.value,o,i):a.value=o}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.value=function(e){var t=this.options,n=t.value;if(0===arguments.length)return n;var r=this.scale.options,o=r.min,i=r.max;t._oldValue=we(t._oldValue)?t.value:o,t.value=Oe(e,o,i),this.elements&&this.repaint()},t}(S.a);Le(Cs,{color:s});var Ss=Cs,Ns=function(e){function t(t,n){e.call(this,t,n),this.options=A({track:{visible:we(n.track)}},this.options)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.reflow=function(){var e,t,n,r=this.options,o=this.scale,i=o.options,a=i.mirror,s=i.vertical,l=o.lineBox(),u=r.track.size||r.size,c=r.size/2,p=z(r.margin),d=s?p[a?"left":"right"]:p[a?"bottom":"top"];d=a?-d:d,s?(n=new Be(l.x1+d,l.y1,l.x1+d,l.y2),a?n.x1-=u:n.x2+=u,"barPointer"!==r.shape&&(e=t=new Be(l.x2+d,l.y1-c,l.x2+d,l.y2+c))):(n=new Be(l.x1,l.y1-d,l.x2,l.y1-d),a?n.y2+=u:n.y1-=u,"barPointer"!==r.shape&&(e=t=new Be(l.x1-c,l.y1-d,l.x2+c,l.y1-d))),this.trackBox=n,this.pointerRangeBox=t,this.box=e||n.clone().pad(r.border.width)},t.prototype.getElementOptions=function(){var e=this.options;return{fill:{color:e.color,opacity:e.opacity},stroke:we(e.border)?{color:e.border.width?e.border.color||e.color:"",width:e.border.width,dashType:e.border.dashType,opacity:e.opacity}:null}},t.prototype._margin=function(){var e=this.scale,t=this.options,n=e.options,r=n.mirror,o=n.vertical,i=z(t.margin);return o?i[r?"left":"right"]:i[r?"bottom":"top"]},t}(Ss);Le(Ns,{shape:"barPointer",track:{border:{width:1}},color:s,border:{width:1},opacity:1,margin:z(3),animation:{type:"barPointer"},visible:!0});var Os=Ns,Ms=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.setup=function(){var e=this.options,t=e.margin,n=e.from,r=e.to,o=e.vertical,i=o?"x1":"y1";e.mirror===o?(n[i]-=t,r[i]-=t):(n[i]+=t,r[i]+=t);var a=this.fromScale=new S.d.Point(n.x1,n.y1),s=this.toScale=new S.d.Point(r.x1,r.y1);0!==e.duration&&(e.duration=Math.max(a.distanceTo(s)/e.duration*1e3,1))},t.prototype.step=function(e){var t=de(this.fromScale.x,this.toScale.x,e),n=de(this.fromScale.y,this.toScale.y,e);this.element.transform(S.d.transform().translate(t,n))},t}(S.c.Animation);Le(Ms,{easing:"linear",duration:250}),S.c.AnimationFactory.current.register("arrowPointer",Ms);var Ts=Ms,Es=S.d.Point,Ps=S.c.Path,Ds=function(e){function t(t,n){e.call(this,t,n),we(this.options.size)||(this.options.size=.6*this.scale.options.majorTicks.size)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.pointerShape=function(){var e=this.scale,t=this.options.size,n=t/2,r=e.options.mirror?-1:1;return e.options.vertical?[new Es(0,0-n),new Es(0-r*t,0),new Es(0,0+n)]:[new Es(0-n,0),new Es(0,0+r*t),new Es(0+n,0)]},t.prototype.repaint=function(){var e=this.scale,t=this.options,n=new Ts(this.elements,A(t.animation,{vertical:e.options.vertical,mirror:e.options.mirror,margin:this._margin(t.margin),from:e.getSlot(t._oldValue),to:e.getSlot(t.value)}));!1===t.animation.transitions&&(n.options.duration=0),n.setup(),n.play()},t.prototype.render=function(){var e=this.scale,t=this.options,n=this.getElementOptions(),r=this.pointerShape(t.value);t.animation.type="arrowPointer";var o=new Ps({stroke:n.stroke,fill:n.fill}).moveTo(r[0]).lineTo(r[1]).lineTo(r[2]).close(),i=e.getSlot(t.value);return o.transform(S.d.transform().translate(i.x1,i.y1)),this.elements=o,o},t}(Os),As=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.setup=function(){var e=this.options,t=this.axis=e.vertical?x:w,n=this.to=e.newPoints[0][t],r=this.from=e.oldPoints[0][t];0!==e.duration&&(e.duration=Math.max(Math.abs(n-r)/e.speed*1e3,1)),this._set(r)},t.prototype.step=function(e){var t=de(this.from,this.to,e);this._set(t)},t.prototype._set=function(e){var t="set"+this.axis.toUpperCase(),n=this.options.newPoints;n[0][t](e),n[1][t](e)},t}(S.c.Animation);Le(As,{easing:"linear",speed:250}),S.c.AnimationFactory.current.register("barPointer",As);var Is=As,Ls=S.c.Group,Rs=S.c.Path,js=function(e){function t(t,n){e.call(this,t,n),we(this.options.size)||(this.options.size=.3*this.scale.options.majorTicks.size)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.pointerShape=function(e){var t=this.scale,n=this.options,r=t.options,o=r.mirror,i=r.vertical,a=o===i?-1:1,s=n.size*a,l=t.getSlot(t.options.min),u=t.getSlot(e),c=i?x:w,p=i?w:x,d=this._margin()*a,h=new S.d.Point;h[c]=l[c+"1"],h[p]=l[p+"1"];var f=new S.d.Point;f[c]=u[c+"1"],f[p]=u[p+"1"],i?(h.translate(d,0),f.translate(d,0)):(h.translate(0,d),f.translate(0,d));var m=f.clone(),y=h.clone();return i?(m.translate(s,0),y.translate(s,0)):(m.translate(0,s),y.translate(0,s)),[h,f,m,y]},t.prototype.repaint=function(){var e=this.scale,t=this.options,n=this.pointerShape(t.value),r=this.pointerPath,o=this.pointerShape(t._oldValue);r.moveTo(n[0]).lineTo(n[1]).lineTo(n[2]).lineTo(n[3]).close();var i=new Is(r,A(t.animation,{reverse:e.options.reverse,vertical:e.options.vertical,oldPoints:[o[1],o[2]],newPoints:[n[1],n[2]]}));!1===t.animation.transitions&&(i.options.duration=0),i.setup(),i.play()},t.prototype.render=function(){var e=new Ls,t=this.getElementOptions();this.options.track.visible&&e.append(this.renderTrack());var n=this.pointerPath=new Rs({stroke:t.stroke,fill:t.fill});return e.append(n),this.elements=e,e},t.prototype.renderTrack=function(){var e=this.options.track,t=e.border||{},n=this.trackBox.clone().pad(t.width||0);return new Rs.fromRect(n.toRect(),{fill:{color:e.color,opacity:e.opacity},stroke:{color:t.width?t.color||e.color:"",width:t.width,dashType:t.dashType}})},t}(Os),Fs=S.c.Group,zs=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.reflow=function(e){var t=this.pointers,n=e.origin.x,r=e.origin.y,o=new Be(n,r,n+e.width(),r+e.height());this.scale.reflow(o),this._shrinkScaleWidth(o);for(var i=0;i0&&(t.box.shrink(n,0),t.box.alignTo(e,"center"),t.reflow(t.box))}},t.prototype._shrinkElements=function(){for(var e=this.scale,t=this.pointers,n=e.box.clone(),r=e.options.vertical?"y":"x",o=t[0].box,i=0;i0){var t=this.options,n=t.rangeDistance,r=t.rangeSize,o=this.getRangeRadius();"inside"===this.options.labels.position&&(o+=r+n);for(var i=o+r/2,a=0;a=0;r--)r%n===0&&e.splice(r,1);return e},t.prototype.tickAngles=function(e,t){var n=this.options,r=n.reverse,o=n.max-n.min,i=e.endAngle-e.startAngle,a=o/t,s=e.startAngle,l=i/a;r&&(s+=i,l=-l);for(var u=[],c=0;c5)&&!(u!==o&&0<=(t=this.getPlotBox(u,e,a))&&t<=2)&&!(c!==o&&0<=(r=this.getPlotBox(c,e,a))&&r<=2)&&(o=t>0&&r>0?2*u:t<0&&r<0?2*c:Ee((u+c)/2||1,3),!(0<=(n=this.getPlotBox(o,e,a))&&n<=2));)i=r,n>0?(c=o,r=n):(u=o,t=n)},t.prototype.getPlotBox=function(e,t,n){var r=this.scale,o=this.pointers,i=n.getRadiusX(),a=n.clone();a.setRadiusX(i+e).setRadiusY(i+e),r.arc=a,r.reflow(t),this.plotBbox=r.bbox;for(var s=0;sn.width&&(o-=a-n.width)}if(tl&&(i-=u-l)}return{left:o,top:i}}}(nl),"Arial, Helvetica, sans-serif"),cl="12px "+ul,pl="16px "+ul,dl=function(){return{icon:{border:{width:1}},label:{font:cl,padding:3},line:{length:10,width:2},visible:!0}},hl=function(e){return{visible:!0,labels:{font:"11px Arial, Helvetica, sans-serif"},overlay:e.gradients?{}:{gradient:"none"},area:{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.4},rangeArea:{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.4},verticalRangeArea:{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.4},bar:{gap:1.5,spacing:.4},boxPlot:{outliersField:"",meanField:"",border:{_brightness:.8,width:1},downColor:"#fff",gap:1,highlight:{border:{opacity:1,width:2},whiskers:{width:3},mean:{width:2},median:{width:2}},mean:{width:2},median:{width:2},spacing:.3,whiskers:{width:2}},bubble:{border:{width:0},labels:{background:"transparent"},opacity:.6},bullet:{gap:1.5,spacing:.4,target:{color:"#ff0000"}},candlestick:{border:{_brightness:.8,width:1},downColor:"#fff",gap:1,highlight:{border:{opacity:1,width:2},line:{width:2}},line:{color:"#000",width:1},spacing:.3},column:{gap:1.5,spacing:.4},pie:{labels:{background:"",color:"",padding:{top:5,bottom:5,left:7,right:7}}},donut:{margin:1},funnel:{labels:{background:"",color:"",padding:{top:5,bottom:5,left:7,right:7}}},horizontalWaterfall:{gap:.5,line:{color:"#000",width:1},spacing:.4},line:{width:2},notes:dl(),ohlc:{gap:1,highlight:{line:{opacity:1,width:3}},line:{width:1},spacing:.3},radarArea:{line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.5},radarLine:{markers:{visible:!1},width:2},polarArea:{line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.5},polarLine:{markers:{visible:!1},width:2},rangeBar:{gap:1.5,spacing:.4},rangeColumn:{gap:1.5,spacing:.4},scatterLine:{width:1},verticalArea:{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.4},verticalBoxPlot:{outliersField:"",meanField:"",border:{_brightness:.8,width:1},downColor:"#fff",gap:1,highlight:{border:{opacity:1,width:2},whiskers:{width:3},mean:{width:2},median:{width:2}},mean:{width:2},median:{width:2},spacing:.3,whiskers:{width:2}},verticalBullet:{gap:1.5,spacing:.4,target:{color:"#ff0000"}},verticalLine:{width:2},waterfall:{gap:.5,line:{color:"#000",width:1},spacing:.4}}},fl=function(e){return void 0===e&&(e={}),{axisDefaults:{labels:{font:cl},notes:dl(),title:{font:pl,margin:5}},categoryAxis:{majorGridLines:{visible:!0}},navigator:{pane:{height:90,margin:{top:10}}},seriesDefaults:hl(e),title:{font:pl},legend:{labels:{font:cl}}}},ml=n(2);function yl(e,t){for(var n=e;n&&n!==t;)n=n.parentNode;return!!n}function vl(e,t,n,r){var o=e[t];if(o&&Array.isArray(o))for(var i=0,a=o;i1){var s=n[0],l=n[1];a=Math.sqrt(Math.pow(s.pageX-l.pageX,2)+Math.pow(s.pageY-l.pageY,2))}return{distance:a,event:e.srcEvent,preventDefault:function(){e.preventDefault()},target:e.target,touches:n.map(bl),type:e.type,x:{delta:t?o-t.x.location:0,initialDelta:e.deltaX,location:o,startLocation:o-e.deltaX},y:{delta:t?i-t.y.location:0,initialDelta:e.deltaY,location:i,startLocation:i-e.deltaY}}}(t,this.previous);return this.eventHandlers[e]&&this.eventHandlers[e](n),n},e.prototype.bind=function(e){void 0===e&&(e={}),this.unbind(),this.eventHandlers=e;for(var t=0;t0;)n=n[l]=n[l]||{},l=s.shift();return n[l]=a,r}},Cu=Wt.prototype.options.labels.dateFormats,Su=rn.prototype.options.labels.dateFormats,Nu={milliseconds:"HH:mm:ss.SSS",seconds:{time:"medium"},minutes:{time:"short"},hours:{time:"short"},days:{skeleton:"Md"},weeks:{skeleton:"Md"},months:{skeleton:"yyMMM"},years:{skeleton:"y"}};Object.assign(Cu,Nu),Object.assign(Su,Nu);var Ou=function(){function e(e,t){this.value=e.value,this.category=e.category,this.categoryIndex=e.categoryIx,this.series=e.series,this.dataItem=e.dataItem,this.percentage=e.percentage,this.runningTotal=e.runningTotal,this.total=e.total,this.low=e.low,this.high=e.high,this.xLow=e.xLow,this.xHigh=e.xHigh,this.yLow=e.yLow,this.yHigh=e.yHigh,this.point=e,this.format=((e.options||{}).tooltip||{}).format||t}return Object.defineProperty(e.prototype,"formattedValue",{get:function(){return this.format?this.point.formatValue(this.format):String(this.value)},enumerable:!0,configurable:!0}),e}(),Mu=function(e){var t=e.categoryText,n=e.colorMarker,o=e.colspan,i=e.nameColumn,a=e.points;return r.createElement("table",null,r.createElement("thead",null,r.createElement("tr",null,r.createElement("th",{colSpan:o},t))),r.createElement("tbody",null,a.map((function(e,t){return r.createElement("tr",{key:t},n&&r.createElement("td",null,r.createElement("span",{className:"k-chart-shared-tooltip-marker",style:{backgroundColor:e.series.color}})),i&&r.createElement("td",null,e.series.name),r.createElement("td",{dangerouslySetInnerHTML:{__html:e.formattedValue}}))}))))},Tu=n(14),Eu=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Pu={horizontal:"fit",vertical:"fit"},Du="k-chart-tooltip",Au=function(e){function t(t,n){var r=e.call(this,t)||this;return r.onChartMouseLeave=function(e){return!!yl(e.syntheticEvent.relatedTarget,r.element)},r.onMouseLeave=function(e){var t=yu(r,e);r.context.childrenObserver.trigger("onMouseLeave",t)&&e.preventDefault()},r.chartObserver=new fe(r,{onMouseLeave:"onChartMouseLeave"}),n.observersStore.dispatch({type:"add",payload:r.chartObserver}),r}return Eu(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.popupShown,o=t.popupAlign,i=t.popupOffset,a=t.popupStyles,s=t.popupContent,l=t.className,u=[Du,l].join(" ").trim();return r.createElement(Tu.a,{animate:!1,popupAlign:o,offset:i,show:n,collision:Pu,className:"k-chart-tooltip-wrapper"},r.createElement("div",{className:u,style:a,onMouseLeave:this.onMouseLeave,ref:function(t){return e.element=t}},s()))},t.prototype.componentWillUnmount=function(){this.context.observersStore.dispatch({type:"remove",payload:this.chartObserver})},t.contextTypes={observersStore:o.object,childrenObserver:o.object},t}(r.Component),Iu=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Lu=function(){return(Lu=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0,o=e.series.length>1,i=1;return r&&i++,o&&i++,{categoryText:n,colorMarker:o,colspan:i,nameColumn:r,points:e.points.map((function(t){return new Ou(t,e.format)}))}},t.prototype.createTooltipContext=function(e){var t=e.point,n=e.format;return{point:new Ou(t,n)}},t.prototype.findRenderFunctionByIndex=function(e){var t=this.context.optionsStore.getState().series;return void 0!==t&&Array.isArray(t)&&void 0!==t[e]&&t[e].hasOwnProperty("tooltip")&&t[e].tooltip.hasOwnProperty("render")?t[e].tooltip.render:null},t.prototype.findRenderFunction=function(){var e=this.context.optionsStore.getState().tooltip;return void 0!==e&&e.hasOwnProperty("render")?e.render:null},t.contextTypes={optionsStore:o.object,observersStore:o.object},t}(r.Component),Fu=function(e){return e.children};Fu.displayName="Container";var zu=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Bu=function(){return(Bu=Object.assign||function(e){for(var t,n=1,r=arguments.length;n\n
\n
\n\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n\n
\n
\n
\n
\n\n
\n
\n
\n
\n
\n\n
\n
\n
\n
\n
\n
\n
\n
\n',document.body.appendChild(r);try{e.dispatch({type:"push",payload:fl()}),n.setColors(),n.setFonts(),n.setSeriesColors()}finally{document.body.removeChild(n.element),delete n.element,t()}}else e.dispatch({type:"push",payload:fl()})}(this.themeStore,this.instantiateCoreChart.bind(this)),this.optionsUnsubscriber=this.optionsStore.subscribe(this.refresh.bind(this)),this.themeUnsubscriber=this.themeStore.subscribe(this.refresh.bind(this)),window.addEventListener("resize",this.onWindowResize)},t.prototype.componentWillUnmount=function(){this.optionsUnsubscriber(),this.themeUnsubscriber(),null!==this.chartInstance&&(this.chartInstance.destroy(),this.chartInstance=null),window.removeEventListener("resize",this.onWindowResize)},t.prototype.componentDidUpdate=function(e){var t=this.props,n=t.dir,r=(t.children,$u(t,["dir","children"]));if(null!==this.chartInstance){var o=Object(i.e)(this),a=this.chartInstance.chartService,s=o.locale!==a._intlService.locale,l=Object.entries(e).filter((function(e){return"dir"!==e[0]&&"children"!==e[0]})).some((function(e){var t=e[0],n=e[1];return!(r.hasOwnProperty(t)&&r[t]===n)}));s&&(this.chartInstance.chartService._intlService=o,this.chartInstance.chartService.format._intlService=o,l||this.chartInstance.noTransitionsRedraw()),l&&this.refresh(),e.dir!==n&&this.chartInstance.setDirection(this.getDirection(n))}},t.prototype.render=function(){var e=this,t=this.props,n=t.style,o=void 0===n?{}:n,i=t.wrapperClassName,a=t.wrapper,s=t.children,l=Object.assign({},o,{position:"relative"}),u=r.createElement(a,{className:i,style:l,key:"chartElement"},r.createElement("div",{onMouseLeave:this.onChartMouseLeave,ref:function(t){return e._element=t},className:"k-chart-surface"},s));return[r.createElement(ju,{key:"seriesTooltip"}),r.createElement(Wu,{key:"crosshairTooltips"}),u]},t.prototype.getChildContext=function(){return{optionsStore:this.optionsStore,observersStore:this.observersStore,childrenObserver:this.childrenObserver}},t.prototype.getDirection=function(e){var t=this;return"rtl"===(void 0!==e?e:ml.c&&window.getComputedStyle(t.element).direction||"ltr")},t.prototype.getChartOptions=function(){var e=this.props,t=e.renderAs,n=e.pannable,r=e.zoomable,o=e.transitions,i=e.seriesColors,a=e.seriesDefaults,s=e.axisDefaults,l=e.deriveOptionsFromParent,u={};return void 0!==t&&(u.renderAs=t),void 0!==n&&(u.pannable=n),void 0!==r&&(u.zoomable=r),void 0!==o&&(u.transitions=o),void 0!==i&&(u.seriesColors=i),void 0!==a&&(u.seriesDefaults=a),void 0!==s&&(u.axisDefaults=s),u=Object.assign(u,this.optionsStore.getState()),l&&(u=l(u)),u},t.prototype.refresh=function(){if(null!==this.chartInstance){var e=this.themeStore.getState(),t=this.getChartOptions();this.props.onRefresh?this.props.onRefresh.call(void 0,t,e,this.chartInstance):this.chartInstance.setOptions(t,e)}},t.prototype.instantiateCoreChart=function(){var e=this.props,t=e.dir,n=e.chartConstructor,r=this.getChartOptions();this.chartInstance=new n(this.element,r,this.themeStore.getState(),{rtl:this.getDirection(t),intlService:Object(i.e)(this),observer:this.chartObserver,sender:this})},t.prototype.trigger=function(e,t){for(var n=function(e,t,n){if(fu[e])return new fu[e](t,n)}(e,t,this.props.getTarget()),r="on"+e.charAt(0).toUpperCase()+e.slice(1),o=this.observersStore.getState(),i=!1,a=0;a=0;d--){var h=a[d];"."===h?i(a,d):".."===h?(i(a,d),p++):p&&(i(a,d),p--)}if(!u)for(;p--;p)a.unshift("..");!u||""===a[0]||a[0]&&o(a[0])||a.unshift("");var f=a.join("/");return n&&"/"!==f.substr(-1)&&(f+="/"),f};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),o=s(n);return r!==t||o!==n?e(r,o):Object.keys(Object.assign({},t,n)).every((function(r){return e(t[r],n[r])}))}return!1},u=n(29);function c(e){return"/"===e.charAt(0)?e:"/"+e}function p(e){return"/"===e.charAt(0)?e.substr(1):e}function d(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 h(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function f(e){var t=e.pathname,n=e.search,r=e.hash,o=t||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}function m(e,t,n,o){var i;"string"===typeof e?(i=function(e){var t=e||"/",n="",r="",o=t.indexOf("#");-1!==o&&(r=t.substr(o),t=t.substr(0,o));var i=t.indexOf("?");return-1!==i&&(n=t.substr(i),t=t.substr(0,i)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e)).state=t:(void 0===(i=Object(r.a)({},e)).pathname&&(i.pathname=""),i.search?"?"!==i.search.charAt(0)&&(i.search="?"+i.search):i.search="",i.hash?"#"!==i.hash.charAt(0)&&(i.hash="#"+i.hash):i.hash="",void 0!==t&&void 0===i.state&&(i.state=t));try{i.pathname=decodeURI(i.pathname)}catch(s){throw s instanceof URIError?new URIError('Pathname "'+i.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):s}return n&&(i.key=n),o?i.pathname?"/"!==i.pathname.charAt(0)&&(i.pathname=a(i.pathname,o.pathname)):i.pathname=o.pathname:i.pathname||(i.pathname="/"),i}function y(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 v(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,o){if(null!=e){var i="function"===typeof e?e(t,n):e;"string"===typeof i?"function"===typeof r?r(i,o):o(!0):o(!1!==i)}else o(!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),p({action:"PUSH",location:r,index:t,entries:n})}}))},replace:function(e,t){var r=m(e,t,d(),w.location);c.confirmTransitionTo(r,"REPLACE",n,(function(e){e&&(w.entries[w.index]=r,p({action:"REPLACE",location:r}))}))},go:b,goBack:function(){b(-1)},goForward:function(){b(1)},canGo:function(e){var t=w.index+e;return t>=0&&t0},y=function(e,t){var n,r=e.selection,o=r.from,i=r.$from,a=r.to,s=r.empty,l=[],u={style:t.name,value:t.value};return s?(n=f(e.storedMarks||i.marks(),u)).changed&&(l=n.styleMatches):e.doc.nodesBetween(o,a,(function(e,t,r){e.isInline&&((n=f(e.marks,u)).changed?l.push.apply(l,n.styleMatches):l.push(null))})),l.filter((function(e){return null!==e}))},v=function(e,t){return function(n,r,o){var i=n.selection,a=i.empty,s=i.$cursor,l=i.ranges;if(a&&!s||!w(n.doc,l,e))return!1;var u=!1;if(r)if(o=o||n.tr,s){var c=n.storedMarks||s.marks();if(e.isInSet(c)){var p=f(c,t),d=c.find((function(e){return"style"===e.type.name})),y=h.a({},d?d.attrs:{},{style:p.style||null});r(o.removeStoredMark(e)),Object.keys(y).some((function(e){return null!==y[e]}))&&r(o.addStoredMark(e.create(y))),u=!0}}else{for(var v=0;v=0;r--){var o=n.index(r);if(n.node(r).canReplaceWith(o,o,t))return!0}return!1},M=function(e){return e instanceof c.Node?e.type.name:e.name},T=function(e,t){return void 0===t&&(t=1),function(n){return function(e,t){return void 0===t&&(t=1),function(n){for(var r=n.$from,o=r.depth;o>0;o--){var i=r.node(o);if(e(i)&&0===(t-=1))return{depth:o,node:i}}}}((function(t){return M(t)===M(e)}),t)(n)}},E=function(e,t){return function(n,r){var o=n.tr.replaceSelectionWith(e);t&&o.scrollIntoView(),r(o)}},P=function(e){return e.replace(/<\/(p|li|ul|ol|h[1-6]|table|tr|td|th)>/gi,"\n").replace(/<(ul|ol)([^>]*)>
  • \n/gi,"
    \n").replace(/\n$/,"")},D=function(e,t,n){var r,o=document.createElement("div");return o.innerHTML=function(e){return void 0===e||null===e}(r=e)?"":r.toString(),c.DOMParser.fromSchema(t).parse(o,n)},A=function(e){var t=c.DOMSerializer.fromSchema(e.schema).serializeFragment(e.doc.content),n=document.createElement("div");return n.appendChild(t),n.innerHTML},I=function(e,t,n){return void 0===t&&(t="setHTML"),void 0===n&&(n={preserveWhitespace:"full"}),function(r,o){return o(r.tr.setSelection(new p.AllSelection(r.doc)).replaceSelectionWith(D(e,r.schema,n)).setMeta("commandName",t))}},L=function(e,t){return function(n,r){var o=n.selection.$cursor;if(o){var i=o.parent,a=o.index(),s=n.schema.marks[e.mark],l=i.child(a).marks.find((function(e){return e.type===s})),u=i.childCount,c=o.pos-o.textOffset,p=i.child(a).nodeSize,d=void 0,h=void 0;for(d=a-1;d>=0&&l.isInSet(i.child(d).marks);)p+=h=i.child(d).nodeSize,c-=h,d-=1;for(d=a+1;d=0&&p.isInSet(u.child(m).marks);)f+=y=u.child(m).nodeSize,h-=y,m-=1;for(m=c+1;m0?""+l.step+l.unit:""};if(t.attrs.style){var p=new RegExp(u+":\\s?(\\d+)"+l.unit,"i"),d=t.attrs.style.match(p);if(d){var h=parseFloat(d[1])+l.step;h=h<=0?"":h,c.value=""+h+(h?l.unit:"")}}i=U(t,[c])}i&&(s=j(r,o,a,t,t.type,i)||s)}})),s&&o(a.scrollIntoView()),s}}),W=function(e,t,n){var r=F(e),o=!1;return r.forEach((function(e){if(!o&&e.type.isTextblock&&e.attrs.style){var r=t.find((function(t){return t.node===e.type.name}));if(r){var i="rtl"===n?r.rtlStyle:r.style,a=new RegExp(i+":\\s?\\d+"+r.unit,"i");o=a.test(e.attrs.style)}}})),o},Y=function(e,t){return Object(G.sinkListItem)(t)(e)},$=function(e,t){var n=e.schema.nodes[t.listsTypes.listItem],r=e.schema.nodes[t.listsTypes.orderedList],o=e.schema.nodes[t.listsTypes.bulletList],i=!!T(r,2)(e.selection),a=!!T(o,2)(e.selection);return(i||a)&&Object(G.liftListItem)(n)(e)},X=n(25),J=function(e,t,n){for(var r=t.depth,o=e.nodes[n.bulletList],i=e.nodes[n.orderedList],a=e.nodes[n.listItem],s=t.depth;s>0;s--){var l=t.node(s);if(l.type!==o&&l.type!==i||(r=s),l.type!==o&&l.type!==i&&l.type!==a)break}return r-1};var Q=function(e,t,n,r,o){var i=r.listType,a=e.selection,s=a.$from.node(a.$from.depth-2),l=a.$to.node(a.$to.depth-2);if(s&&s.type.name===i&&l&&l.type.name===i){var u=n.state.schema.nodes,c={bulletList:u[r.bulletList],orderedList:u[r.orderedList],listItem:u[r.listItem]},d=function(e,t){for(var n,r=t.bulletList,o=t.orderedList,i=t.listItem,a=e.depth-1;a>0;a--){var s=e.node(a);if(s.type!==r&&s.type!==o||(n=a),s.type!==r&&s.type!==o&&s.type!==i)break}return n}(a.$to,c),h=function(e,t,n,r,o,i){i||(i=e.schema.nodes.listItem);var a=!1;return o.doc.nodesBetween(t,n,(function(n,s){if(!a&&n.type===i&&s>t){a=!0;for(var l=r+3;l>r+2;){var u=o.doc.resolve(o.mapping.map(s));l=u.depth;var c=o.doc.resolve(o.mapping.map(s+n.textContent.length)),d=new p.TextSelection(u,c);o=ee(e,d,o,i)}}})),o}(e,a.$to.pos,a.$to.end(d),d,n.state.tr,c.listItem);return(h=function(e,t,n){var r=e.selection,o=r.from,i=r.to,a=e.schema.nodes,s=a.paragraph,l=a.heading,u=[];t.doc.nodesBetween(o,i,(function(e,t){e.type!==s&&e.type!==l||u.push({node:e,pos:t})}));for(var c=u.length-1;c>=0;c--){var p=u[c],d=t.doc.resolve(t.mapping.map(p.pos));if(d.depth>0){var h=void 0;h=p.node.textContent&&p.node.textContent.length>0?t.doc.resolve(t.mapping.map(p.pos+p.node.textContent.length)):t.doc.resolve(t.mapping.map(p.pos+1));var f=d.blockRange(h);f&&t.lift(f,J(e.schema,d,n))}}return t}(e,h,r)).setMeta("commandName",o),t(h),!0}return function(e){return function(t,n,r){if(!r)return!1;var o,i=(t=r.state).schema.nodes[e.listType],a=t.selection,s=a.$from,l=a.$to,u=s.node(-2),c=s.node(-3),p=function(e,t,n,r){return 0===function(e,t,n){var r=Array(),o=function(e,t){var n=["blockquote","bulletList","orderedList"];if(1===t.depth)return t;var r=t.node(t.depth),o=t;for(;t.depth>=1;)t=e.resolve(t.before(t.depth)),(r=t.node(t.depth))&&-1!==n.indexOf(r.type.name)&&(o=t);return o}(e,t).depth,i=e.resolve(t.start(o));for(;i.pos<=n.start(n.depth);){var a=Math.min(i.depth,o),s=i.node(a);if(s&&r.push(s),0===a)break;var l=e.resolve(i.after(a));if(l.start(a)>=e.nodeSize-2)break;l.depth!==i.depth&&(l=e.resolve(l.pos+2)),i=l.depth?e.resolve(l.start(l.depth)):e.resolve(l.end(l.depth))}return r}(e,t,n).filter((function(e){return e.type!==r})).length}(t.doc,s,l,i);return(u&&u.type===i||c&&c.type===i)&&p?te(e)(t,n):(p||(te(e)(t,n),t=r.state),(o=i,Object(X.autoJoin)(Object(G.wrapInList)(o),(function(e,t){return e.type===t.type&&e.type===o})))(t,n))}}(r)(e,t,n)};function ee(e,t,n,r){r||(r=e.schema.nodes.listItem);var o=t.$from,i=t.$to,a=o.blockRange(i,(function(e){return e.childCount&&e.firstChild.type===r}));if(!a||a.depth<2||o.node(a.depth-1).type!==r)return n;var s=a.end,l=i.end(a.depth);return s/gi,"")).replace(/<\/?[^>]+?\/?>/gm,"")},xe=function(e,t){var n=document.createElement(e);return n.style.listStyleType=t,n},ke=function(e){var t=null;return/^\d/.test(e)||(t=(/^[a-z]/.test(e)?"lower-":"upper-")+(/^[ivxlcdm]/i.test(e)?"roman":"alpha")),t},_e=function(e){var t,n=e.innerHTML,r=function(e){return e.replace(/^(?: |[\u00a0\n\r\s])+/,"")};return n=n.replace(/<\/?\w+[^>]*>/g,"").replace(/ /g,"\xa0"),/^[\u2022\u00b7\u00a7\u00d8o\xd8\xfcvn][\u00a0 ]+/.test(n)?{tag:"ul",style:(t=r(we(e)),/^[\u2022\u00b7\u00FC\u00D8\u002dv-]/.test(t)?null:/^o/.test(t)?"circle":"square")}:/^\s*\w+[\.\)][\u00a0 ]{2,}/.test(n)?{tag:"ol",style:ke(r(we(e)))}:void 0},Ce=function(e){var t,n=e.nodeName.toLowerCase();e.firstChild&&e.firstChild.nodeType===Node.COMMENT_NODE&&e.removeChild(e.firstChild),1===e.childNodes.length?t=e.firstChild.nodeType===Node.TEXT_NODE?we(e):e.firstChild.innerHTML.replace(/^\w+[\.\)]( )+ /,""):(e.removeChild(e.firstChild),3===e.firstChild.nodeType&&/^[ivxlcdm]+\.$/i.test(e.firstChild.nodeValue)&&e.removeChild(e.firstChild),/^( |\s)+$/i.test(e.firstChild.innerHTML)&&e.removeChild(e.firstChild),t="p"!==n?"<"+n+">"+e.innerHTML+"":e.innerHTML),e.parentNode.removeChild(e);var r=document.createElement("li");return r.innerHTML=t,r},Se=function(e){var t=document.createElement("div");t.innerHTML=function(e){return e=e.replace(ge,(function(e,t,n){return'datalist="'+t+'" datalevel="'+n+'" '+e}))}(e);var n=new Set;return function e(t,n){var r=[];Array.from(t).forEach((function(t){if(t.nodeType===Node.ELEMENT_NODE){var o=t;o.getAttribute("datalist")?(r.push(t),n.add(r)):be(o)&&r.length?r.push(t):(r=[],"DIV"===o.nodeName?e(o.children,n):"TABLE"===o.nodeName&&Array.from(o.querySelectorAll("td,th")).forEach((function(t){e(t.children,n)})))}}))}(t.children,n),n.forEach((function(e){return function(e){var t,n,r,o,i,a,s,l,u,c,p,d,h,f=-1,m={};for(l=0;lf||!d)&&(d=xe(c,v&&v.style),m[p][g]=d,t.appendChild(d)),t=Ce(u),d.appendChild(t),i?n=f=-1:f=p}}else!t||i&&!be(u)||(u.style.marginLeft&&(u.style.marginLeft=""),u.style.marginLeft&&(u.style.margin=""),t.appendChild(u))}}(e)})),t.innerHTML},Ne=function(e,t){return e.replace(new RegExp("<\\/?("+t+")(?:\\s[^>]*?)?>","gi"),"")},Oe=function(e){e.ownerElement&&e.ownerElement.removeAttribute(e.name)},Me=/\s*;\s*/,Te=/\s*:\s*/,Ee=function(e,t){var n=e;if(t.convertMsLists&&(n=Se(n)),t.stripTags&&(n=Ne(n,t.stripTags)),t.attributes){var r=document.createElement("div");r.innerHTML=n,Array.from(r.querySelectorAll("*")).forEach((function(e){return function(e,t){if(e.nodeType===Node.ELEMENT_NODE){for(var n=e.attributes.length-1;n>=0;n--){var r=e.attributes[n];t[r.name]?t[r.name](r):t["*"]&&t["*"](r)}"SPAN"===e.nodeName&&0===e.attributes.length&&function(e){var t=e.parentNode;if(t){for(;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)}}(e)}}(e,t.attributes)})),n=r.innerHTML}return n},Pe=function(e,t,n){for(var r,o=e.table,i=e.table_row,a=e.table_cell,s=[],l=0;l .k-content {\n outline: 0;\n height: 100%;\n}\n\n.k-content > p {\n margin: 0 0 1em;\n}\n\n.k-content .ProseMirror-selectednode {\n outline: 2px solid #8cf;\n}\n\n.ProseMirror-hideselection *::selection { background: transparent; }\n.ProseMirror-hideselection *::-moz-selection { background: transparent; }\n.ProseMirror-hideselection { caret-color: transparent; }\n\n.ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n}\n\n.ProseMirror-gapcursor:after {\n content: "";\n display: block;\n position: absolute;\n top: -2px;\n width: 20px;\n border-top: 1px solid black;\n animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n to {\n visibility: hidden;\n }\n}\n\n.ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n}\n',Le='\n .ProseMirror .tableWrapper {\n overflow-x: auto;\n margin: 1em 0;\n }\n\n .ProseMirror table {\n margin: 0;\n border-collapse: collapse;\n table-layout: fixed;\n width: 100%;\n overflow: hidden;\n }\n\n .ProseMirror td, .ProseMirror th {\n min-width: 1em;\n border: 1px solid #ddd;\n padding: 3px 5px;\n vertical-align: top;\n box-sizing: border-box;\n position: relative;\n }\n\n .ProseMirror th {\n font-weight: bold;\n text-align: left;\n }\n\n .ProseMirror .column-resize-handle {\n position: absolute;\n right: -2px; top: 0; bottom: 0;\n width: 4px;\n z-index: 20;\n background-color: #adf;\n pointer-events: none;\n }\n\n .ProseMirror.resize-cursor {\n cursor: ew-resize;\n cursor: col-resize;\n }\n\n /* Give selected cells a blue overlay */\n .ProseMirror .selectedCell:after {\n z-index: 2;\n position: absolute;\n content: "";\n left: 0; right: 0; top: 0; bottom: 0;\n background: rgba(200, 200, 255, 0.4);\n pointer-events: none;\n }\n',Re=n(49),je=n(34),Fe=n(60),ze=n(61),Be=((ne={})["editor.bold"]="Bold",ne["editor.italic"]="Italic",ne["editor.underline"]="Underline",ne["editor.strikethrough"]="Strikethrough",ne["editor.subscript"]="Subscript",ne["editor.superscript"]="Superscript",ne["editor.unlink"]="Remove hyperlink",ne["editor.undo"]="Undo",ne["editor.redo"]="Redo",ne["editor.fontSize"]="Font Size",ne["editor.fontName"]="Font Name",ne["editor.format"]="Format",ne["editor.alignLeft"]="Align text left",ne["editor.alignRight"]="Align text right",ne["editor.alignCenter"]="Center text",ne["editor.alignJustify"]="Justify",ne["editor.indent"]="Indent",ne["editor.outdent"]="Outdent",ne["editor.orderedList"]="Insert ordered list",ne["editor.bulletList"]="Insert unordered list",ne["editor.createTable"]="Create a table",ne["editor.insertTableHint"]="Create a {0} x {1} table",ne["editor.addRowBefore"]="Add row above",ne["editor.addRowAfter"]="Add row below",ne["editor.addColumnBefore"]="Add column on the left",ne["editor.addColumnAfter"]="Add column on the right",ne["editor.deleteRow"]="Delete row",ne["editor.deleteColumn"]="Delete column",ne["editor.deleteTable"]="Delete table",ne["editor.mergeCells"]="Merge cells",ne["editor.splitCell"]="Split cell",ne["editor.hyperlink"]="Insert hyperlink",ne["editor.hyperlink-dialog-title"]="Insert hyperlink",ne["editor.hyperlink-dialog-content-address"]="Web address",ne["editor.hyperlink-dialog-content-title"]="Title",ne["editor.hyperlink-dialog-content-newwindow"]="Open link in new window",ne["editor.hyperlink-dialog-cancel"]="Cancel",ne["editor.hyperlink-dialog-insert"]="Insert",ne["editor.image"]="Insert image",ne["editor.image-dialog-title"]="Insert image",ne["editor.image-address"]="Web address",ne["editor.image-title"]="Title",ne["editor.image-altText"]="Alternate text",ne["editor.image-width"]="Width (px)",ne["editor.image-height"]="Height (px)",ne["editor.image-cancel"]="Cancel",ne["editor.image-insert"]="Insert",ne["editor.viewHtml"]="View HTML",ne["editor.viewHtml-dialog-title"]="View HTML",ne["editor.viewHtml-cancel"]="Cancel",ne["editor.viewHtml-update"]="Update",ne),Ue="editor.bold",He="editor.italic",Ve="editor.underline",Ze="editor.strikethrough",Ge="editor.subscript",Ke="editor.superscript",qe="editor.unlink",We="editor.undo",Ye="editor.redo",$e="editor.fontSize",Xe="editor.fontName",Je="editor.format",Qe="editor.alignLeft",et="editor.alignRight",tt="editor.alignCenter",nt="editor.alignJustify",rt="editor.indent",ot="editor.outdent",it="editor.orderedList",at="editor.bulletList",st="editor.createTable",lt="editor.insertTableHint",ut="editor.addRowBefore",ct="editor.addRowAfter",pt="editor.addColumnBefore",dt="editor.addColumnAfter",ht="editor.deleteRow",ft="editor.deleteColumn",mt="editor.deleteTable",yt="editor.mergeCells",vt="editor.splitCell",gt="editor.hyperlink",bt="editor.hyperlink-dialog-title",wt="editor.hyperlink-dialog-content-address",xt="editor.hyperlink-dialog-content-title",kt="editor.hyperlink-dialog-content-newwindow",_t="editor.hyperlink-dialog-cancel",Ct="editor.hyperlink-dialog-insert",St="editor.image",Nt="editor.image-dialog-title",Ot="editor.image-address",Mt="editor.image-title",Tt="editor.image-altText",Et="editor.image-width",Pt="editor.image-height",Dt="editor.image-cancel",At="editor.image-insert",It="editor.viewHtml",Lt="editor.viewHtml-dialog-title",Rt="editor.viewHtml-cancel",jt="editor.viewHtml-update",Ft=function(){return(Ft=Object.assign||function(e){for(var t,n=1,r=arguments.length;n/g,"")}(e)},Xt.removeTag=function(e,t){return Ne(e,t)},Xt.pasteCleanup=function(e,t){return Ee(e,t)},Xt.sanitizeClassAttr=function(e){!function(e){/^Mso/.test(e.value)&&Oe(e)}(e)},Xt.sanitizeStyleAttr=function(e){!function(e){var t,n,r=e.value.split(Me).filter((function(e){return Boolean(e)})),o=e.ownerElement.style,i="";r.forEach((function(e){var r;r=e.split(Te),t=r[0],n=r[1],void 0!==o[t]&&(i+=t+": "+n+"; ")})),(i=i.trim())?e.value=i:Oe(e)}(e)},Xt.removeAttribute=function(e){Oe(e)},Xt.sanitize=function(e){return function(e){return e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(/^[\s\S]+?\s*([\s\S]*?)\s*[\s\S]+$/,"$1")).replace(/<\/?[ovw]:[^>]*?>/gi,"")).replace(/<\\?\??xml[^>]*>/gi,"")).replace(/<(?:link|meta) [^>]+?>/gi,"")).replace(/]*?>\s*<\/style>/gi,"")).replace(/<\/?st1:.*?>/gi,"")).replace(//gim,"")).replace(/v:shapes?="[^"]+"/gi,"")).replace(//gi,"")).replace(//gi,"")}(e)},Xt.setHtml=function(e,t,n,r){I(t,n,r)(e.state,e.dispatch)},Xt.toggleInlineFormat=function(e,t,n,r){return g(t,n,r)(e.state,e.dispatch)},Xt.toggleList=function(e,t,n){return Q(e.state,e.dispatch,e,t,n)},Xt.getShortcuts=function(e){return function(e){var t=Object(u.chainCommands)(u.exitCode,(function(t,n){var r=e&&e.types&&e.types.hardBreak||"hard_break",o=t.schema.nodes[r];return n&&n(t.tr.replaceSelectionWith(o.create()).scrollIntoView()),!0})),n=e&&e.types&&e.types.listItem||"list_item",r=e&&e.toolsSettings||{};return tn({"Mod-b":function(e,t){return g(r.bold||nn)(e,t)},"Mod-i":function(e,t){return g(r.italic||on)(e,t)},"Mod-u":function(e,t){return g(r.underline||rn)(e,t)},"Mod-z":je.undo,"Shift-Mod-z":je.redo},tn({},an?{}:{"Mod-y":je.redo}),{Backspace:en.undoInputRule,"Mod-Enter":t,"Shift-Enter":t},tn({},an?{"Ctrl-Enter":t}:{}),{Enter:function(e,t){return Object(Qt.splitListItem)(e.schema.nodes[n])(e,t)},Tab:Object(Jt.goToNextCell)(1),"Shift-Tab":Object(Jt.goToNextCell)(-1)})}(e)},Xt.marks=sn({},ye),Xt.nodes=sn({},Ae);var ln,un=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),cn=function(){return(cn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&r.createElement(i.c,null,d.map((function(e,t){return e.type===i.e?e:r.createElement(i.d,{className:"k-tool-group",key:t},e)}))),"iframe"===l?r.createElement("iframe",{onLoad:vn?function(){e.initialize()}:void 0,ref:function(t){return e.iframe=t},frameBorder:"0",style:c,className:"k-content"}):r.createElement("div",{style:c,className:"k-content"},r.createElement("div",{ref:function(t){return e._contentElement=t},style:{boxSizing:"border-box",overflowY:"scroll",padding:"0 4px"},className:"k-editable-area",suppressContentEditableWarning:!0})),this.renderDialog(Wt.InsertLinkDialog,pn,"linkDialog"),this.renderDialog(Wt.InsertImageDialog,dn,"imageDialog"),this.renderDialog(Wt.ViewHtmlDialog,hn,"viewHtmlDialog"))},t.prototype.initialize=function(){var e=this,t=this.iframe&&this.iframe.contentWindow;if(t){var n=t.document;[Ie,Le,"rtl"===this.props.dir?"body { direction: rtl }":void 0].forEach((function(e){if(e){var t=n.createElement("style");t.appendChild(n.createTextNode(e)),n.head.appendChild(t)}}));var r=n.createElement("meta");r.setAttribute("charset","utf-8"),n.head.appendChild(r),this._contentElement=n.createElement("div"),n.body.appendChild(this._contentElement),this._contentElement.classList.add("k-content")}var o=this._contentElement;if(o){var i=this,c=[new a.Plugin({view:function(){return{update:e.updateTools}},key:new a.PluginKey("toolbar-tools-update-plugin")}),new a.Plugin({filterTransaction:function(t,n){return!1!==(e.props.onExecute&&e.props.onExecute.call(void 0,{target:i,transaction:t,state:n}))},key:new a.PluginKey("onExecute-event-plugin")}),Object(je.history)(),Object(Fe.dropCursor)(),Object(ze.gapCursor)(),Object(Jt.tableEditing)()],p=cn({},$t.getShortcuts({types:{listItem:"list_item",hardBreak:"hard_break"},toolsSettings:{bold:fn,italic:mn,underline:yn}}),{"Mod-k":function(){var t=e.state,n=t.linkDialog,r=t.view;if(r){var o=r.state,i=o.selection.empty,a=S(o,o.schema.marks[pn.mark]);n||i&&!a||e.setState({linkDialog:!0})}return!n}}),d=this.props,h=d.defaultContent,f=d.value,m=d.onMount,y=f&&"string"!==typeof f?f:$t.createDocument(new l.Schema({nodes:Ae,marks:ye}),f||h||""),v={state:a.EditorState.create({plugins:c.concat([Object(Re.keymap)(p),Object(Re.keymap)(u.baseKeymap)]),doc:y}),transformPastedHTML:this.onPasteHtml,dispatchTransaction:this.dispatchTransaction,handleDOMEvents:{focus:this.onFocus,blur:this.onBlur}},g=m&&m.call(void 0,{plugins:c,shortcuts:p,target:i,viewProps:v,dom:o})||new s.EditorView({mount:o},v);this.setState({view:g})}},t.propTypes={defaultContent:o.string,value:o.oneOfType([o.object,o.string]),defaultEditMode:o.oneOf(["iframe","div"]),contentStyle:o.object,dir:o.string,className:o.string,style:o.object,tools:o.arrayOf(o.any),onMount:o.func,onFocus:o.func,onBlur:o.func,onChange:o.func,onPasteHtml:o.func,onExecute:o.func},t.defaultProps={defaultContent:"",defaultEditMode:"iframe",contentStyle:{height:"300px"},tools:[]},t}(r.Component),bn={onMouseDown:function(e){return e.preventDefault()},onPointerDown:function(e){return e.preventDefault()}},wn={userSelect:"none"},xn=n(14),kn=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),_n=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={row:-1,col:-1},t}return kn(t,e),t.prototype.renderCell=function(e,t,n){var o=this,i=Math.floor(e/this.props.columns),a=e%this.props.columns,s=a<=n&&i<=t;return r.createElement("span",{className:"k-ct-cell k-state-disabled"+(s?" k-state-selected":""),onMouseEnter:function(){return o.setState({row:i,col:a})},onClick:function(){return o.props.onCellClick.call(void 0,i,a)},key:e})},t.prototype.render=function(){var e=this,t=[],n=this.props.columns*this.props.rows,o=this.state,i=o.row,a=o.col,s=this.props.onDown,l=this.props.createTableMessage;a>-1&&(l=function(e){for(var t=[],n=1;n=2&&s.node(u.depth-1).type.compatibleContent(e)&&0==u.startIndex){if(0==s.index(u.depth-1))return!1;var d=n.doc.resolve(u.start-2);p=new o.NodeRange(d,d,u.depth),u.endIndex=0;l--)s=o.Fragment.from(n[l].type.create(n[l].attrs,s));e.step(new r.ReplaceAroundStep(t.start-(i?2:0),t.end,t.start,t.end,new o.Slice(s,0,0),n.length,!0));for(var u=0,c=0;c0,d=a.depth-(p?1:2);d>=a.depth-3;d--)c=o.Fragment.from(a.node(d).copy(c));c=c.append(o.Fragment.from(e.createAndFill()));var h=t.tr.replace(a.before(p?null:-1),a.after(-3),new o.Slice(c,p?3:2,2));h.setSelection(t.selection.constructor.near(h.doc.resolve(a.pos+(p?3:2)))),n(h.scrollIntoView())}return!0}var f=s.pos==a.end()?u.contentMatchAt(0).defaultType:null,m=t.tr.delete(a.pos,s.pos),y=f&&[null,{type:f}];return!!Object(r.canSplit)(m.doc,a.pos,2,y)&&(n&&n(m.split(a.pos,2,y).scrollIntoView()),!0)}}function m(e){return function(t,n){var i=t.selection,a=i.$from,s=i.$to,l=a.blockRange(s,(function(t){return t.childCount&&t.firstChild.type==e}));return!!l&&(!n||(a.node(l.depth-1).type==e?function(e,t,n,i){var a=e.tr,s=i.end,l=i.$to.end(i.depth);su;l--)s-=a.child(l).nodeSize,i.delete(s-1,s+1);var c=i.doc.resolve(n.start),p=c.nodeAfter,d=0==n.startIndex,h=n.endIndex==a.childCount,f=c.node(-1),m=c.index(-1);if(!f.canReplace(m+(d?0:1),m+1,p.content.append(h?o.Fragment.empty:o.Fragment.from(a))))return!1;var y=c.pos,v=y+p.nodeSize;return i.step(new r.ReplaceAroundStep(y-(d?1:0),v+(h?1:0),y+1,v-1,new o.Slice((d?o.Fragment.empty:o.Fragment.from(a.copy(o.Fragment.empty))).append(h?o.Fragment.empty:o.Fragment.from(a.copy(o.Fragment.empty))),d?0:1,h?0:1),d?0:1)),t(i.scrollIntoView()),!0}(t,n,l)))}}function y(e){return function(t,n){var i=t.selection,a=i.$from,s=i.$to,l=a.blockRange(s,(function(t){return t.childCount&&t.firstChild.type==e}));if(!l)return!1;var u=l.startIndex;if(0==u)return!1;var c=l.parent,p=c.child(u-1);if(p.type!=e)return!1;if(n){var d=p.lastChild&&p.lastChild.type==c.type,h=o.Fragment.from(d?e.create():null),f=new o.Slice(o.Fragment.from(e.create(null,o.Fragment.from(c.type.create(null,h)))),d?3:1,0),m=l.start,y=l.end;n(t.tr.step(new r.ReplaceAroundStep(m-(d?3:1),y,m,y,f,1,!0)).scrollIntoView())}return!0}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function(e){return e?new Date(e.getTime()):null}},function(e,t,n){"use strict";n.d(t,"a",(function(){return O})),n.d(t,"b",(function(){return _})),n.d(t,"c",(function(){return A})),n.d(t,"d",(function(){return k})),n.d(t,"e",(function(){return N})),n.d(t,"f",(function(){return R})),n.d(t,"g",(function(){return I}));var r=n(36),o=n(0),i=n.n(o),a=n(1),s=n.n(a),l=n(32),u=n(69),c=n.n(u),p=n(84),d=n.n(p);function h(e){var t=[];return{on:function(e){t.push(e)},off:function(e){t=t.filter((function(t){return t!==e}))},get:function(){return e},set:function(n,r){e=n,t.forEach((function(t){return t(e,r)}))}}}var f=i.a.createContext||function(e,t){var n,r,i="__create-react-context-"+d()()+"__",a=function(e){function n(){var t;return(t=e.apply(this,arguments)||this).emitter=h(t.props.value),t}c()(n,e);var r=n.prototype;return r.getChildContext=function(){var e;return(e={})[i]=this.emitter,e},r.componentWillReceiveProps=function(e){if(this.props.value!==e.value){var n,r=this.props.value,o=e.value;((i=r)===(a=o)?0!==i||1/i===1/a:i!==i&&a!==a)?n=0:(n="function"===typeof t?t(r,o):1073741823,0!==(n|=0)&&this.emitter.set(e.value,n))}var i,a},r.render=function(){return this.props.children},n}(o.Component);a.childContextTypes=((n={})[i]=s.a.object.isRequired,n);var l=function(t){function n(){var e;return(e=t.apply(this,arguments)||this).state={value:e.getValue()},e.onUpdate=function(t,n){0!==((0|e.observedBits)&n)&&e.setState({value:e.getValue()})},e}c()(n,t);var r=n.prototype;return r.componentWillReceiveProps=function(e){var t=e.observedBits;this.observedBits=void 0===t||null===t?1073741823:t},r.componentDidMount=function(){this.context[i]&&this.context[i].on(this.onUpdate);var e=this.props.observedBits;this.observedBits=void 0===e||null===e?1073741823:e},r.componentWillUnmount=function(){this.context[i]&&this.context[i].off(this.onUpdate)},r.getValue=function(){return this.context[i]?this.context[i].get():e},r.render=function(){return(e=this.props.children,Array.isArray(e)?e[0]:e)(this.state.value);var e},n}(o.Component);return l.contextTypes=((r={})[i]=s.a.object,r),{Provider:a,Consumer:l}},m=n(29),y=n(22),v=n(70),g=n.n(v),b=(n(81),n(43)),w=n(85),x=n.n(w),k=function(e){var t=f();return t.displayName=e,t}("Router"),_=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()},n.render=function(){return i.a.createElement(k.Provider,{children:this.props.children||null,value:{history:this.props.history,location:this.state.location,match:t.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}})},t}(i.a.Component);i.a.Component;i.a.Component;var C={},S=0;function N(e,t){void 0===t&&(t={}),("string"===typeof t||Array.isArray(t))&&(t={path:t});var n=t,r=n.path,o=n.exact,i=void 0!==o&&o,a=n.strict,s=void 0!==a&&a,l=n.sensitive,u=void 0!==l&&l;return[].concat(r).reduce((function(t,n){if(!n&&""!==n)return null;if(t)return t;var r=function(e,t){var n=""+t.end+t.strict+t.sensitive,r=C[n]||(C[n]={});if(r[e])return r[e];var o=[],i={regexp:g()(e,o,t),keys:o};return S<1e4&&(r[e]=i,S++),i}(n,{end:i,strict:s,sensitive:u}),o=r.regexp,a=r.keys,l=o.exec(e);if(!l)return null;var c=l[0],p=l.slice(1),d=e===c;return i&&!d?null:{path:n,url:"/"===n&&""===c?"/":c,isExact:d,params:a.reduce((function(e,t,n){return e[t.name]=p[n],e}),{})}}),null)}var O=function(e){function t(){return e.apply(this,arguments)||this}return Object(r.a)(t,e),t.prototype.render=function(){var e=this;return i.a.createElement(k.Consumer,null,(function(t){t||Object(m.a)(!1);var n=e.props.location||t.location,r=e.props.computedMatch?e.props.computedMatch:e.props.path?N(n.pathname,e.props):t.match,o=Object(y.a)({},t,{location:n,match:r}),a=e.props,s=a.children,l=a.component,u=a.render;return Array.isArray(s)&&0===s.length&&(s=null),i.a.createElement(k.Provider,{value:o},o.match?s?"function"===typeof s?s(o):s:l?i.a.createElement(l,o):u?u(o):null:"function"===typeof s?s(o):null)}))},t}(i.a.Component);function M(e){return"/"===e.charAt(0)?e:"/"+e}function T(e,t){if(!e)return t;var n=M(e);return 0!==t.pathname.indexOf(n)?t:Object(y.a)({},t,{pathname:t.pathname.substr(n.length)})}function E(e){return"string"===typeof e?e:Object(l.e)(e)}function P(e){return function(){Object(m.a)(!1)}}function D(){}i.a.Component;var A=function(e){function t(){return e.apply(this,arguments)||this}return Object(r.a)(t,e),t.prototype.render=function(){var e=this;return i.a.createElement(k.Consumer,null,(function(t){t||Object(m.a)(!1);var n,r,o=e.props.location||t.location;return i.a.Children.forEach(e.props.children,(function(e){if(null==r&&i.a.isValidElement(e)){n=e;var a=e.props.path||e.props.from;r=a?N(o.pathname,Object(y.a)({},e.props,{path:a})):t.match}})),r?i.a.cloneElement(n,{location:o,computedMatch:r}):null}))},t}(i.a.Component);function I(e){var t="withRouter("+(e.displayName||e.name)+")",n=function(t){var n=t.wrappedComponentRef,r=Object(b.a)(t,["wrappedComponentRef"]);return i.a.createElement(k.Consumer,null,(function(t){return t||Object(m.a)(!1),i.a.createElement(e,Object(y.a)({},r,t,{ref:n}))}))};return n.displayName=t,n.WrappedComponent=e,x()(n,e)}var L=i.a.useContext;function R(){return L(k).history}},function(e,t,n){e.exports=n(5)},function(e,t,n){e.exports=n(25)},function(e,t,n){e.exports=n(68)},function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}n.d(t,"a",(function(){return r}))},function(e,t,n){e.exports=n(37)},function(e,t,n){e.exports=n(47)},function(e,t,n){"use strict";n.d(t,"c",(function(){return Wt})),n.d(t,"a",(function(){return Ra})),n.d(t,"d",(function(){return za})),n.d(t,"e",(function(){return Va})),n.d(t,"b",(function(){return $a}));var r={};n.r(r),n.d(r,"byMonth",(function(){return hr})),n.d(r,"byMonthDay",(function(){return fr})),n.d(r,"byYearDay",(function(){return mr})),n.d(r,"byWeekNumber",(function(){return yr})),n.d(r,"byWeekDay",(function(){return vr})),n.d(r,"byHour",(function(){return gr})),n.d(r,"byMinute",(function(){return br})),n.d(r,"bySecond",(function(){return wr}));var o=n(0),i=n(1),a=function(e){return e?new Date(e.getTime()):null},s=function(e,t){var n=a(e);return 0===t&&23===n.getHours()&&n.setHours(n.getHours()+2),n},l=function(e,t,n,r,o,i,a){void 0===r&&(r=0),void 0===o&&(o=0),void 0===i&&(i=0),void 0===a&&(a=0);var l=new Date(e,t,n,r,o,i,a);return e>-1&&e<100&&l.setFullYear(l.getFullYear()-1900),s(l,r)},u=function(e){return l(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0)},c=function(){return(c=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0?t.height+"px":""))},v=function e(){for(var t=[],n=0;n1||t._ignoreMouse||(O(document,"mousemove",t._mousemove),O(document,"mouseup",t._mouseup),t._pressHandler(e))},this._mousemove=function(e){t._dragHandler(e)},this._mouseup=function(e){M(document,"mousemove",t._mousemove),M(document,"mouseup",t._mouseup),t._releaseHandler(e)},this._pointerdown=function(e){e.isPrimary&&0===e.button&&(O(document,"pointermove",t._pointermove),O(document,"pointerup",t._pointerup),O(document,"pointercancel",t._pointerup),O(document,"contextmenu",E),t._pressHandler(e))},this._pointermove=function(e){e.isPrimary&&t._dragHandler(e)},this._pointerup=function(e){e.isPrimary&&(M(document,"pointermove",t._pointermove),M(document,"pointerup",t._pointerup),M(document,"pointercancel",t._pointerup),M(document,"contextmenu",E),t._releaseHandler(e))}};A.supportPointerEvent=function(){return"undefined"!==typeof window&&window.PointerEvent},A.prototype.bindTo=function(e){e!==this._element&&(this._element&&this._unbindFromCurrent(),this._element=e,this._bindToCurrent())},A.prototype._bindToCurrent=function(){var e=this._element;this._usePointers()?O(e,"pointerdown",this._pointerdown):(O(e,"mousedown",this._mousedown),this._mouseOnly||(O(e,"touchstart",this._touchstart),O(e,"touchmove",this._touchmove),O(e,"touchend",this._touchend)))},A.prototype._unbindFromCurrent=function(){var e=this._element;if(this._usePointers())return M(e,"pointerdown",this._pointerdown),M(document,"pointermove",this._pointermove),M(document,"pointerup",this._pointerup),M(document,"contextmenu",E),void M(document,"pointercancel",this._pointerup);M(e,"mousedown",this._mousedown),this._mouseOnly||(M(e,"touchstart",this._touchstart),M(e,"touchmove",this._touchmove),M(e,"touchend",this._touchend))},A.prototype._usePointers=function(){return!this._mouseOnly&&A.supportPointerEvent()},A.prototype.destroy=function(){this._unbindFromCurrent(),this._element=null},A.default=A;var I=A,L=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),R=(function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.element=null,t.draggable=new I({press:function(e){t.element&&t.props.onPress&&t.props.onPress.call(void 0,{target:t,event:e,element:t.element})},drag:function(e){t.element&&t.props.onDrag&&t.props.onDrag.call(void 0,{target:t,event:e,element:t.element})},release:function(e){t.element&&t.props.onRelease&&t.props.onRelease.call(void 0,{target:t,event:e})}}),t.assingRef=function(e){t.element=e},t}L(t,e),t.prototype.componentDidMount=function(){this.element&&this.draggable.bindTo(this.element)},t.prototype.componentWillUnmount=function(){this.draggable.destroy()},t.prototype.render=function(){return o.cloneElement(o.Children.only(this.props.children),{ref:this.assingRef})},t.propTypes={children:i.element.isRequired}}(o.Component),/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g);function j(e){var t=[];return e.replace(R,(function(e,n,r,o){t.push(void 0!==n?n:r||o)})),t}var F={};function z(e){if(F[e])return F[e];var t=j(e);return F[e]=function(e){for(var n=e,r=0;ru?7:0))}else if(i.indexOf(">=")>=0){r=new Date(Date.UTC(e,q[o],i.substr(5),a[0],a[1],a[2],0)+s);l=W[i.substr(0,3)],u=r.getUTCDay();r.setUTCDate(r.getUTCDate()+l-u+(l1&&(i=60*o[0]+Number(o[1])),[-1e6,"max","-","Jan",1,[0,0,0],i,"-"]}var a=new Date(t).getUTCFullYear();(r=r.filter((function(e){var t=e[0],n=e[1];return t<=a&&(n>=a||t===a&&"only"===n||"max"===n)}))).push(t),r.sort((function(e,t){return"number"!==typeof e&&(e=Number(Y(a,e,n))),"number"!==typeof t&&(t=Number(Y(a,t,n))),e-t}));var s=r[r.indexOf(t)-1]||r[r.length-1];return isNaN(s)?s:null},J="The required {0} timezone information is not provided!",Q=/\{(\d+)}?\}/g,ee=function(e){return e.reduce((function(e,t){return e.concat(t)}),[])},te=function(e){for(var t=[],n=1;n=0;r--){var o=n[r][3];if(o&&t>o)break}var i=n[r+1];if(!i)throw new Error(te(J,e));return i},re=function(e,t){var n=t.getTime(),r=ne(e,n);return{rule:X(r[1],n,r[0]),zone:r}},oe=function(e,t){if(void 0===t&&(t=new Date),"Etc/UTC"===e||"Etc/GMT"===e)return 0;if(""===e)return t.getTimezoneOffset();var n=re(e,t),r=n.rule,o=n.zone;return parseFloat(r?o[0]-r[6]:o[0])};function ie(e){return new Date(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds())}var ae=function(e,t){return new Date(e.getTime()+6e4*t)},se=function(e,t){return new Date(e.getTime()+36e5*t)},le=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],ue=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dev"],ce=function(e,t){return void 0===t&&(t=2),(e<0?"-":"")+new Array(t).concat([Math.abs(e)]).join("0").slice(-t)};function pe(e,t){var n=oe(t,e),r=se(e,-1);return n0?-1:1);var s=se(r,a);return e.fromUTCDate(s,n)},e.fromUTCDate=function(t,n){return void 0===n&&(n=""),new e(t,n)},e.prototype.toLocalDate=function(){return a(this._localDate)},e.prototype.toUTCDate=function(){return a(this._utcDate)},e.prototype.toTimezone=function(t){if(this.timezone===t)return this.clone();var n=oe(this.timezone,this._utcDate),r=ae(this._utcDate,n);return e.fromLocalDate(r,t)},e.prototype.clone=function(){return e.fromUTCDate(this._utcDate,this.timezone)},e.prototype.addDays=function(t){var n=new Date(this._utcDate.getTime());return n.setUTCDate(n.getUTCDate()+t),e.fromUTCDate(n,this.timezone)},e.prototype.addTime=function(t){var n=de(new Date(this._utcDate.getTime()),this.timezone);n.setTime(n.getTime()+t);var r=de(n,this.timezone);return e.fromUTCDate(r,this.timezone)},e.prototype.stripTime=function(){var t=this._utcDate,n=Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),0,0,0);return e.fromUTCDate(new Date(n),this.timezone)},e.prototype.getTime=function(){return this._localDate.getTime()},e.prototype.getTimezoneOffset=function(){return this.timezoneOffset},e.prototype.getFullYear=function(){return this._utcDate.getUTCFullYear()},e.prototype.getMonth=function(){return this._utcDate.getUTCMonth()},e.prototype.getDate=function(){return this._utcDate.getUTCDate()},e.prototype.getDay=function(){return this._utcDate.getUTCDay()},e.prototype.getHours=function(){return this._utcDate.getUTCHours()},e.prototype.getMinutes=function(){return this._utcDate.getUTCMinutes()},e.prototype.getSeconds=function(){return this._utcDate.getUTCSeconds()},e.prototype.getMilliseconds=function(){return this._utcDate.getUTCMilliseconds()},e.prototype.getUTCDate=function(){return this._localDate.getUTCDate()},e.prototype.getUTCDay=function(){return this._localDate.getUTCDay()},e.prototype.getUTCFullYear=function(){return this._localDate.getUTCFullYear()},e.prototype.getUTCHours=function(){return this._localDate.getUTCHours()},e.prototype.getUTCMilliseconds=function(){return this._localDate.getUTCMilliseconds()},e.prototype.getUTCMinutes=function(){return this._localDate.getUTCMinutes()},e.prototype.getUTCMonth=function(){return this._localDate.getUTCMonth()},e.prototype.getUTCSeconds=function(){return this._localDate.getUTCSeconds()},e.prototype.setTime=function(e){throw new Error("Method not implemented.")},e.prototype.setMilliseconds=function(e){throw new Error("Method not implemented.")},e.prototype.setUTCMilliseconds=function(e){throw new Error("Method not implemented.")},e.prototype.setSeconds=function(e,t){throw new Error("Method not implemented.")},e.prototype.setUTCSeconds=function(e,t){throw new Error("Method not implemented.")},e.prototype.setMinutes=function(e,t,n){throw new Error("Method not implemented.")},e.prototype.setUTCMinutes=function(e,t,n){throw new Error("Method not implemented.")},e.prototype.setHours=function(e,t,n,r){throw new Error("Method not implemented.")},e.prototype.setUTCHours=function(e,t,n,r){throw new Error("Method not implemented.")},e.prototype.setDate=function(e){throw new Error("Method not implemented.")},e.prototype.setUTCDate=function(e){throw new Error("Method not implemented.")},e.prototype.setMonth=function(e,t){throw new Error("Method not implemented.")},e.prototype.setUTCMonth=function(e,t){throw new Error("Method not implemented.")},e.prototype.setFullYear=function(e,t,n){throw new Error("Method not implemented.")},e.prototype.setUTCFullYear=function(e,t,n){throw new Error("Method not implemented.")},e.prototype.toISOString=function(){return this._localDate.toISOString()},e.prototype.toJSON=function(){return this._localDate.toJSON()},e.prototype.toString=function(){var e,t=(e=this._utcDate,le[e.getUTCDay()]+" "+ue[e.getUTCMonth()]),n=this.toTimeString();return t+" "+this.getDate()+" "+this.getFullYear()+" "+n},e.prototype.toDateString=function(){return ie(this._utcDate).toDateString()},e.prototype.toTimeString=function(){var e=ce(this.getHours())+":"+ce(this.getMinutes())+":"+ce(this.getSeconds()),t=function(e){var t=e<=0?"+":"-",n=Math.abs(e);return"GMT"+t+ce(Math.floor(n/60))+ce(n%60)}(this.timezoneOffset),n=function(e,t){if(void 0===t&&(t=new Date),"Etc/UTC"===e)return"UTC";if("Etc/GMT"===e)return"GMT";if(""===e)return"";var n=re(e,t),r=n.zone,o=n.rule,i=r[2];return i.indexOf("/")>=0?i.split("/")[o&&+o[6]?1:0]:i.indexOf("%s")>=0?i.replace("%s",o&&"-"!==o[7]?o[7]:""):i}(this.timezone,this._utcDate);return n&&(n=" ("+n+")"),e+" "+t+n},e.prototype.toLocaleString=function(e,t){return this._localDate.toLocaleString(e,t)},e.prototype.toLocaleDateString=function(e,t){return this._localDate.toLocaleDateString(e,t)},e.prototype.toLocaleTimeString=function(e,t){return this._localDate.toLocaleTimeString(e,t)},e.prototype.toUTCString=function(){return this.toTimezone("Etc/UTC").toString()},e.prototype[Symbol.toPrimitive]=function(e){return"string"===e||"default"===e?this.toString():this._localDate.getTime()},e.prototype.valueOf=function(){return this.getTime()},e.prototype.getVarDate=function(){throw new Error("Not implemented.")},e.prototype.format=function(e){throw new Error("Not implemented.")},e.prototype.formatUTC=function(e){throw new Error("Not implemented.")},e}(),me=(new Date(1980,0,1),[{}]),ye=new Date(1900,0,1),ve=new Date(2099,11,31),ge=(fe.fromLocalDate(ye),fe.fromLocalDate(ve),n(16)),be=function(){return(be=Object.assign||function(e){for(var t,n=1,r=arguments.length;n1||t._ignoreMouse||(Ue(document,"mousemove",t._mousemove),Ue(document,"mouseup",t._mouseup),t._pressHandler(e))},this._mousemove=function(e){t._dragHandler(e)},this._mouseup=function(e){He(document,"mousemove",t._mousemove),He(document,"mouseup",t._mouseup),t._releaseHandler(e)},this._pointerdown=function(e){e.isPrimary&&0===e.button&&(Ue(document,"pointermove",t._pointermove),Ue(document,"pointerup",t._pointerup),Ue(document,"pointercancel",t._pointerup),Ue(document,"contextmenu",Ze),t._pressHandler(e))},this._pointermove=function(e){e.isPrimary&&t._dragHandler(e)},this._pointerup=function(e){e.isPrimary&&(He(document,"pointermove",t._pointermove),He(document,"pointerup",t._pointerup),He(document,"pointercancel",t._pointerup),He(document,"contextmenu",Ze),t._releaseHandler(e))}};qe.supportPointerEvent=function(){return"undefined"!==typeof window&&window.PointerEvent},qe.prototype.bindTo=function(e){e!==this._element&&(this._element&&this._unbindFromCurrent(),this._element=e,this._bindToCurrent())},qe.prototype._bindToCurrent=function(){var e=this._element;this._usePointers()?Ue(e,"pointerdown",this._pointerdown):(Ue(e,"mousedown",this._mousedown),this._mouseOnly||(Ue(e,"touchstart",this._touchstart),Ue(e,"touchmove",this._touchmove),Ue(e,"touchend",this._touchend)))},qe.prototype._unbindFromCurrent=function(){var e=this._element;if(this._usePointers())return He(e,"pointerdown",this._pointerdown),He(document,"pointermove",this._pointermove),He(document,"pointerup",this._pointerup),He(document,"contextmenu",Ze),void He(document,"pointercancel",this._pointerup);He(e,"mousedown",this._mousedown),this._mouseOnly||(He(e,"touchstart",this._touchstart),He(e,"touchmove",this._touchmove),He(e,"touchend",this._touchend))},qe.prototype._usePointers=function(){return!this._mouseOnly&&qe.supportPointerEvent()},qe.prototype.update=function(e){var t=e.press;void 0===t&&(t=Ve);var n=e.drag;void 0===n&&(n=Ve);var r=e.release;void 0===r&&(r=Ve);var o=e.mouseOnly;void 0===o&&(o=!1),this._pressHandler=Be(Ke,t),this._dragHandler=Be(Ke,n),this._releaseHandler=Be(Ke,r),this._mouseOnly=o},qe.prototype.destroy=function(){this._unbindFromCurrent(),this._element=null},qe.default=qe;var We,Ye=qe,$e=function(e,t){var n=t.onPress,r=t.onDrag,i=t.onRelease,a=o.useMemo((function(){return new Ye({press:n,drag:r,release:i})}),[]);o.useEffect((function(){var t=e.current;if(t)return a.bindTo(t),function(){a.destroy()}}),[]),o.useEffect((function(){a.update({press:n,drag:r,release:i})}),[n,r,i])},Xe=function(e,t){var n=e.element;o.useLayoutEffect((function(){if(n&&n.current){var t=[],r=0,o=n.current.querySelectorAll(e.selector);o.forEach((function(n){var o=n.clientWidth,i=e.explicitDepth&&void 0!==e.attribute?n.getAttribute(e.attribute):0,a=m(n,!0);a>r&&(r=a),null!==i&&(!t[i]||o>t[i])&&(t[i]=o)})),o.forEach((function(n){var o=e.explicitDepth?n.getAttribute(e.attribute):0;null!==o&&(n.style.minWidth=t[o]-r+"px")}))}}),t)},Je=o.createContext({}),Qe=function(e){var t=o.useContext(Je),n=void 0!==e?e:t.editable||!1,r=!0===n||void 0!==n&&!1!==n&&!0===n.edit,i=!0===n||void 0!==n&&!1!==n&&!0===n.resize,a=!0===n||void 0!==n&&!1!==n&&!0===n.remove,s=!0===n||void 0!==n&&!1!==n&&!0===n.drag;return{add:!0===n||void 0!==n&&!1!==n&&!0===n.add,edit:r,drag:s,remove:a,resize:i,select:!0===n||void 0!==n&&!1!==n&&!0===n.select}};!function(e){e[e.add=0]="add",e[e.remove=1]="remove"}(We||(We={}));var et,tt=function(e){void 0===e&&(e=[]);var t=o.useRef(e),n=o.useCallback((function(e){switch(e.type){case We.add:t.current.push(e.item);break;case We.remove:var n=t.current.indexOf(e.item);t.current.splice(n,1)}}),[]);return[t,n]},nt=o.createContext([{current:null},Ie]),rt=function(){return o.useContext(nt)},ot=o.createContext([{current:null},Ie]),it=function(){return o.useContext(ot)},at=function(e,t){var n=function(e,t){var n=o.useState(t),r=n[0],i=n[1];return void 0!==e?[e,C]:[r,i]}(e,t),r=n[0],i=n[1],a=o.useCallback((function(){i(!r)}),[r,i]);return[r,a]},st=o.createContext([new Date,Ie]),lt=o.createContext(Te),ut=o.createContext([[],Ie]),ct=o.createContext([{index:0,resources:[]}]),pt=o.createContext(null),dt=o.createContext({start:new Date,end:new Date}),ht=o.createContext(["day",Ie]),ft=o.createContext([null,C]),mt=o.createContext([[],C]),yt=o.createContext([]),vt=o.createContext([]),gt=function(){return o.useContext(vt)},bt=function(e){var t=e.date,n=e.data,r=e.view,i=e.views,a=e.props,s=e.items,l=e.slots,u=e.fields,c=e.groups,p=e.children,d=e.resources,h=e.dateRange,f=e.orientation,m=e.selectedItem,y=e.selectedSlots;return o.createElement(yt.Provider,{value:i},o.createElement(ft.Provider,{value:m},o.createElement(mt.Provider,{value:y},o.createElement(ht.Provider,{value:r},o.createElement(dt.Provider,{value:h},o.createElement(st.Provider,{value:t},o.createElement(lt.Provider,{value:u},o.createElement(Je.Provider,{value:a},o.createElement(nt.Provider,{value:s},o.createElement(ot.Provider,{value:l},o.createElement(ut.Provider,{value:n},o.createElement(ct.Provider,{value:c},o.createElement(vt.Provider,{value:d},o.createElement(pt.Provider,{value:f},p))))))))))))))},wt=function(){return(wt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n23328e5,M=s.format(e.dateFormat,O?f:a.start,new Date(O?f.getTime()-1:a.end.getTime()-1)),T=s.format(e.shortDateFormat,O?f:a.start,O?f:a.end);return o.createElement("ul",{ref:n,className:"k-scheduler-navigation k-reset"},o.createElement("li",{className:"k-state-default k-header k-nav-today"},o.createElement("a",{tabIndex:-1,href:"#",role:"button",className:"k-link",onClick:C},b)),o.createElement("li",{className:"k-state-default k-header k-nav-prev"},o.createElement("a",{tabIndex:-1,href:"#",role:"button",className:"k-link",title:w,"aria-label":w,onClick:S},o.createElement("span",{className:"k-icon k-i-arrow-60-left"}))),o.createElement("li",{className:"k-state-default k-header k-nav-next"},o.createElement("a",{tabIndex:-1,href:"#",role:"button",className:"k-link",title:x,"aria-label":x,onClick:N},o.createElement("span",{className:"k-icon k-i-arrow-60-right"}))),o.createElement("li",{className:"k-state-default k-nav-current"},o.createElement("a",{tabIndex:-1,href:"#",role:"button",ref:i,className:"k-link",onClick:k},o.createElement("span",{className:"k-icon k-i-calendar"}),o.createElement("span",{className:"k-sm-date-format"},T),o.createElement("span",{className:"k-lg-date-format"},M)),o.createElement(_t.a,{show:v,anchor:i.current||void 0},o.createElement(Ct.a,{value:f,onChange:_}))))}));Ft.displayName="KendoReactSchedulerToolbarNavigation";var zt=function(){var e=o.useState(!1),t=e[0],n=e[1],r=jt(),i=Rt(),a=i[0],s=i[1],l=r.find((function(e){return e.props.name===a})),u=Object(kt.j)(),c=o.useCallback((function(e){var t=r.find((function(t){return t.props.name===e.target.getAttribute("data-name")}));t&&t.props.name&&s&&(e.preventDefault(),n(!1),s(t.props.name))}),[n]),p=o.useCallback((function(e){e.preventDefault(),n((function(e){return!e}))}),[t,n]);return o.createElement("ul",{className:v("k-scheduler-views k-reset",{"k-state-expanded":t})},l&&o.createElement("li",{className:"k-current-view"},o.createElement("a",{tabIndex:-1,role:"button",href:"#",className:"k-link",onClick:p},"function"===typeof l.props.title?l.props.title.call(void 0,u):l.props.title)),r.map((function(e,t){return o.createElement("li",{key:t,className:v("k-state-default",{"k-state-selected":l&&e.props.name===l.props.name})},o.createElement("a",{tabIndex:-1,role:"button",href:"#","data-name":e.props.name,className:"k-link",onClick:c},"function"===typeof e.props.title?e.props.title.call(void 0,u):e.props.title))})))},Bt=function(e){var t=e.dateFormat||Ut.dateFormat,n=e.shortDateFormat||Ut.shortDateFormat;return o.createElement("div",{className:"k-scheduler-toolbar k-header k-floatwrap"},o.createElement(Ft,{dateFormat:t,shortDateFormat:n}),o.createElement(zt,null))},Ut={dateFormat:"{0:D}",shortDateFormat:"{0:d}"};Bt.displayName="KendoReactSchedulerToolbar";var Ht,Vt,Zt,Gt,Kt,qt=function(){return(qt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&w.current[0].element&&"-1"===w.current[0].element.getAttribute("tabIndex")&&w.current[0].element.setAttribute("tabIndex","0")})),o.createElement(o.Fragment,null,o.createElement(bt,{props:e,views:P,fields:u,groups:I,dateRange:z,resources:L,orientation:R,data:[A,q],date:[N,O],items:[w,x],slots:[_,C],view:[T,W],selectedItem:[y,G],selectedSlots:[h,K]},o.createElement("div",{ref:i,id:e.id,style:X,className:J,tabIndex:e.tabIndex,dir:s,role:e.role,"aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,onFocus:Y,onBlur:$},o.createElement(Bt,{dateFormat:j,shortDateFormat:F}),D&&o.createElement(D.type,qt({editable:e.editable,key:D.props.name,item:e.item,viewItem:e.viewItem,editItem:e.editItem,task:e.task,viewTask:e.viewTask,editTask:e.viewTask,slot:e.slot,viewSlot:e.viewSlot,editSlot:e.editSlot,onDataAction:q},D.props)))))})),Yt={data:[],height:600,tabIndex:-1,defaultView:"day",editable:!1,defaultDate:new Date};Wt.propTypes={data:i.array,editable:i.oneOfType([i.bool,i.shape({add:i.bool,drag:i.bool,edit:i.bool,remove:i.bool,resize:i.bool})]),view:i.string,defaultView:i.string,date:i.instanceOf(Date),defaultDate:i.instanceOf(Date),rtl:i.bool,height:i.oneOfType([i.number,i.string]),children:i.any,timezone:i.string,group:i.any,resources:i.any,modelFields:i.shape({id:i.string,start:i.string,startTimezone:i.string,end:i.string,endTimezone:i.string,isAllDay:i.string,title:i.string,description:i.string,recurrenceRule:i.string,recurrenceId:i.string,recurrenceException:i.string})},Wt.defaultProps=Yt,Wt.displayName="KendoReactScheduler";var $t=Object(o.createContext)({props:{},ranges:[],slots:[]}),Xt=o.forwardRef((function(e,t){var n=o.useRef(null);o.useImperativeHandle(t,(function(){return n.current})),Xe({element:n,selector:".k-group-cell",attribute:"data-depth-index",explicitDepth:!0}),Xe({element:n,selector:".k-side-cell",attribute:"data-depth-index",explicitDepth:!1});var r=o.useMemo((function(){return v("k-scheduler-layout k-scheduler-layout-flex",e.className)}),[e.className]);return o.createElement($t.Provider,{value:{props:e.props,ranges:e.ranges,slots:e.slots}},o.createElement("div",{ref:n,style:e.style,className:r,role:"presentation"},e.children))}));Xt.displayName="KendoReactSchedulerBaseView";var Jt=Object(o.createContext)({resource:{},groupIndex:0}),Qt=function(e){var t=e.nested,n=e.wrapGroup,r=e.children,i=e.cellContent||ln,a=d(e.group,e.resources);return o.createElement("div",{className:"k-scheduler-group"},t?n?o.createElement("div",{className:"k-scheduler-row"},o.createElement("div",{className:"k-sticky-cell"},nn({resources:a,children:r,cellContent:i,depth:0,groupIndex:0})),o.createElement("div",{className:"k-scheduler-cell k-group-content"},tn({resources:a,children:r,cellContent:i,depth:0,groupIndex:0},!1))):tn({resources:a,children:r,cellContent:i,depth:0,groupIndex:0},!0):n?o.createElement("div",{className:"k-scheduler-row"},o.createElement("div",{className:"k-sticky-cell"},en({resources:a,children:r,cellContent:i,depth:0,groupIndex:0})),o.createElement("div",{className:"k-scheduler-cell k-group-content"},r)):rn({resources:a,children:r,cellContent:i,depth:0,groupIndex:0}))},en=function(e){return o.createElement("div",{className:"k-scheduler-row"},o.createElement("div",{className:"k-scheduler-row"},e.resources.map((function(e,t){return o.createElement("div",{key:t,className:"k-scheduler-cell k-resource-cell k-heading-cell","data-depth-index":t})}))))},tn=function e(t,n){void 0===n&&(n=!0);var r=t.resources,i=t.children,a=t.cellContent,s=t.groupIndex,l=t.depth,u=r.length>0;if(l===r.length||!u)return o.createElement(Jt.Provider,{value:{resource:r[l],groupIndex:u?s:0}},i);var c=r[l].data.length;return r[l].data.map((function(t,u){return o.createElement("div",{key:u,className:"k-scheduler-row"},n&&o.createElement("div",{className:"k-scheduler-cell k-group-cell k-heading-cell","data-depth-index":l},t.text),o.createElement("div",{className:"k-scheduler-cell k-group-content k-resource-row","data-depth-index":l,"data-resource-index":c*s+u},e({resources:r,children:i,cellContent:a,groupIndex:c*s+u,depth:l+1},n)))}))},nn=function e(t){var n=t.resources,r=t.children,i=t.cellContent,a=t.groupIndex,s=t.depth,l=n.length?n[s].data.length:0;return n[s]?n[s].data.map((function(t,u){return o.createElement("div",{key:u,className:"k-scheduler-row"},o.createElement("div",{className:"k-scheduler-cell k-resource-cell k-resource-row k-heading-cell","data-depth-index":s,"data-resource-index":l*a+u},t.text),s+1!==n.length&&o.createElement("div",{className:"k-scheduler-cell k-resource-content"},e({resources:n,children:r,cellContent:i,groupIndex:l*a+u,depth:s+1})))})):null},rn=function(e){var t=e.resources,n=e.children,r=e.groupIndex,i=e.cellContent;return o.createElement("div",{className:"k-scheduler-row"},an(t),i,on(n,t,r))},on=function(e,t,n){var r=t.length>0;return o.createElement("div",{className:"k-scheduler-cell k-group-content"},o.createElement(Jt.Provider,{value:{resource:t[n],groupIndex:r?n:void 0}},e))},an=function(e){return e.map((function(e,t){return o.createElement("div",{key:t,className:"k-scheduler-cell k-group-cell k-heading-cell","data-depth-index":t})}))};Qt.displayName="KendoReactSchedulerVerticalResourceIterator";var sn,ln=null;!function(e){e[e.Sunday=0]="Sunday",e[e.Monday=1]="Monday",e[e.Tuesday=2]="Tuesday",e[e.Wednesday=3]="Wednesday",e[e.Thursday=4]="Thursday",e[e.Friday=5]="Friday",e[e.Saturday=6]="Saturday"}(sn||(sn={}));var un=function(e,t){void 0===t&&(t=sn.Sunday);for(var n=a(e);n.getDay()!==t;)n.setDate(n.getDate()-1);return n},cn=function(e,t){for(var n=t.step,r=t.timezone,o=[],i=e.start.getTime(),a=e.end.getTime(),s=i,l=0,u=0;su?7:0))}else if(i.indexOf(">=")>=0){r=new Date(Date.UTC(e,hn[o],i.substr(5),a[0],a[1],a[2],0)+s);l=fn[i.substr(0,3)],u=r.getUTCDay();r.setUTCDate(r.getUTCDate()+l-u+(l1&&(i=60*o[0]+Number(o[1])),[-1e6,"max","-","Jan",1,[0,0,0],i,"-"]}var a=new Date(t).getUTCFullYear();(r=r.filter((function(e){var t=e[0],n=e[1];return t<=a&&(n>=a||t===a&&"only"===n||"max"===n)}))).push(t),r.sort((function(e,t){return"number"!==typeof e&&(e=Number(mn(a,e,n))),"number"!==typeof t&&(t=Number(mn(a,t,n))),e-t}));var s=r[r.indexOf(t)-1]||r[r.length-1];return isNaN(s)?s:null},gn="The required {0} timezone information is not provided!",bn=/\{(\d+)}?\}/g,wn=function(e){return e.reduce((function(e,t){return e.concat(t)}),[])},xn=function(e){for(var t=[],n=1;n=0;r--){var o=n[r][3];if(o&&t>o)break}var i=n[r+1];if(!i)throw new Error(xn(gn,e));return i},_n=function(e,t){var n=t.getTime(),r=kn(e,n);return{rule:vn(r[1],n,r[0]),zone:r}},Cn=function(e,t){if(void 0===t&&(t=new Date),"Etc/UTC"===e||"Etc/GMT"===e)return 0;if(""===e)return t.getTimezoneOffset();var n=_n(e,t),r=n.rule,o=n.zone;return parseFloat(r?o[0]-r[6]:o[0])};var Sn=function(e,t){return new Date(e.getTime()+6e4*t)},Nn=function(e,t){return new Date(e.getTime()+36e5*t)},On=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],Mn=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dev"],Tn=function(e,t){return void 0===t&&(t=2),(e<0?"-":"")+new Array(t).concat([Math.abs(e)]).join("0").slice(-t)};function En(e,t){var n=Cn(t,e),r=Nn(e,-1);return n0?-1:1);var s=Nn(r,a);return e.fromUTCDate(s,n)},e.fromUTCDate=function(t,n){return void 0===n&&(n=""),new e(t,n)},e.prototype.toLocalDate=function(){return Object(pn.a)(this._localDate)},e.prototype.toUTCDate=function(){return Object(pn.a)(this._utcDate)},e.prototype.toTimezone=function(t){if(this.timezone===t)return this.clone();var n=Cn(this.timezone,this._utcDate),r=Sn(this._utcDate,n);return e.fromLocalDate(r,t)},e.prototype.clone=function(){return e.fromUTCDate(this._utcDate,this.timezone)},e.prototype.addDays=function(t){var n=new Date(this._utcDate.getTime());return n.setUTCDate(n.getUTCDate()+t),e.fromUTCDate(n,this.timezone)},e.prototype.addTime=function(t){var n=Pn(new Date(this._utcDate.getTime()),this.timezone);n.setTime(n.getTime()+t);var r=Pn(n,this.timezone);return e.fromUTCDate(r,this.timezone)},e.prototype.stripTime=function(){var t=this._utcDate,n=Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),0,0,0);return e.fromUTCDate(new Date(n),this.timezone)},e.prototype.getTime=function(){return this._localDate.getTime()},e.prototype.getTimezoneOffset=function(){return this.timezoneOffset},e.prototype.getFullYear=function(){return this._utcDate.getUTCFullYear()},e.prototype.getMonth=function(){return this._utcDate.getUTCMonth()},e.prototype.getDate=function(){return this._utcDate.getUTCDate()},e.prototype.getDay=function(){return this._utcDate.getUTCDay()},e.prototype.getHours=function(){return this._utcDate.getUTCHours()},e.prototype.getMinutes=function(){return this._utcDate.getUTCMinutes()},e.prototype.getSeconds=function(){return this._utcDate.getUTCSeconds()},e.prototype.getMilliseconds=function(){return this._utcDate.getUTCMilliseconds()},e.prototype.getUTCDate=function(){return this._localDate.getUTCDate()},e.prototype.getUTCDay=function(){return this._localDate.getUTCDay()},e.prototype.getUTCFullYear=function(){return this._localDate.getUTCFullYear()},e.prototype.getUTCHours=function(){return this._localDate.getUTCHours()},e.prototype.getUTCMilliseconds=function(){return this._localDate.getUTCMilliseconds()},e.prototype.getUTCMinutes=function(){return this._localDate.getUTCMinutes()},e.prototype.getUTCMonth=function(){return this._localDate.getUTCMonth()},e.prototype.getUTCSeconds=function(){return this._localDate.getUTCSeconds()},e.prototype.setTime=function(e){throw new Error("Method not implemented.")},e.prototype.setMilliseconds=function(e){throw new Error("Method not implemented.")},e.prototype.setUTCMilliseconds=function(e){throw new Error("Method not implemented.")},e.prototype.setSeconds=function(e,t){throw new Error("Method not implemented.")},e.prototype.setUTCSeconds=function(e,t){throw new Error("Method not implemented.")},e.prototype.setMinutes=function(e,t,n){throw new Error("Method not implemented.")},e.prototype.setUTCMinutes=function(e,t,n){throw new Error("Method not implemented.")},e.prototype.setHours=function(e,t,n,r){throw new Error("Method not implemented.")},e.prototype.setUTCHours=function(e,t,n,r){throw new Error("Method not implemented.")},e.prototype.setDate=function(e){throw new Error("Method not implemented.")},e.prototype.setUTCDate=function(e){throw new Error("Method not implemented.")},e.prototype.setMonth=function(e,t){throw new Error("Method not implemented.")},e.prototype.setUTCMonth=function(e,t){throw new Error("Method not implemented.")},e.prototype.setFullYear=function(e,t,n){throw new Error("Method not implemented.")},e.prototype.setUTCFullYear=function(e,t,n){throw new Error("Method not implemented.")},e.prototype.toISOString=function(){return this._localDate.toISOString()},e.prototype.toJSON=function(){return this._localDate.toJSON()},e.prototype.toString=function(){var e,t=(e=this._utcDate,On[e.getUTCDay()]+" "+Mn[e.getUTCMonth()]),n=this.toTimeString();return t+" "+this.getDate()+" "+this.getFullYear()+" "+n},e.prototype.toDateString=function(){return(e=this._utcDate,new Date(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds())).toDateString();var e},e.prototype.toTimeString=function(){var e=Tn(this.getHours())+":"+Tn(this.getMinutes())+":"+Tn(this.getSeconds()),t=function(e){var t=e<=0?"+":"-",n=Math.abs(e);return"GMT"+t+Tn(Math.floor(n/60))+Tn(n%60)}(this.timezoneOffset),n=function(e,t){if(void 0===t&&(t=new Date),"Etc/UTC"===e)return"UTC";if("Etc/GMT"===e)return"GMT";if(""===e)return"";var n=_n(e,t),r=n.zone,o=n.rule,i=r[2];return i.indexOf("/")>=0?i.split("/")[o&&+o[6]?1:0]:i.indexOf("%s")>=0?i.replace("%s",o&&"-"!==o[7]?o[7]:""):i}(this.timezone,this._utcDate);return n&&(n=" ("+n+")"),e+" "+t+n},e.prototype.toLocaleString=function(e,t){return this._localDate.toLocaleString(e,t)},e.prototype.toLocaleDateString=function(e,t){return this._localDate.toLocaleDateString(e,t)},e.prototype.toLocaleTimeString=function(e,t){return this._localDate.toLocaleTimeString(e,t)},e.prototype.toUTCString=function(){return this.toTimezone("Etc/UTC").toString()},e.prototype[Symbol.toPrimitive]=function(e){return"string"===e||"default"===e?this.toString():this._localDate.getTime()},e.prototype.valueOf=function(){return this.getTime()},e.prototype.getVarDate=function(){throw new Error("Not implemented.")},e.prototype.format=function(e){throw new Error("Not implemented.")},e.prototype.formatUTC=function(e){throw new Error("Not implemented.")},e}(),Ln=n(8),Rn=n(149);!function(e){e[e.Sunday=0]="Sunday",e[e.Monday=1]="Monday",e[e.Tuesday=2]="Tuesday",e[e.Wednesday=3]="Wednesday",e[e.Thursday=4]="Thursday",e[e.Friday=5]="Friday",e[e.Saturday=6]="Saturday"}(An||(An={}));var jn=function(e){return e instanceof Array&&e.length>0},Fn=function(e){return jn(e.bySecond)||jn(e.byMinute)||jn(e.byHour)||jn(e.byYearDay)||jn(e.byMonthDay)||jn(e.byWeekDay)||jn(e.byMonth)||jn(e.byWeekNumber)},zn=function(e){for(var t=e.split(";"),n=[],r=null,o=0;or||0===e&&n<0},Zn=function(e,t){return e-t},Gn=function(e,t){for(var n=[],r=0;rQn(o.getUTCDay(),n);return r<0?r=i+(r+1-(l?1:0)):s&&(r+=1),i-=l?1:0,r<(s?1:0)||r>i?null:r},or=function(e,t,n){return tr(e,n)===rr(e,t,n)},ir=function(e,t){return tr(new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth()+1,0)),t)},ar=[0,31,60,91,121,152,182,213,244,274,305,335,366],sr=[0,31,59,90,120,151,181,212,243,273,304,334,365],lr=function(e){return(e=e.getUTCFullYear())%4===0&&e%100!==0||e%400===0},ur=function(e){var t=e.getUTCMonth();return(lr(e)?ar[t]:sr[t])+e.getUTCDate()},cr=[31,28,31,30,31,30,31,31,30,31,30,31],pr=function(e){var t=e.getUTCMonth();return 1===t?1===new Date(Date.UTC(e.getUTCFullYear(),1,29)).getUTCMonth()?29:28:cr[t]},dr=function(e,t,n){for(var r=e.length,o=[],i=0;i59&&(a%=60,i=(i+1)%24)),n._startTime.setUTCHours(i,a,e.getUTCSeconds())),s},xr=["byMonth","byWeekNumber","byYearDay","byMonthDay","byWeekDay","byHour","byMinute","bySecond"],kr=xr.length,_r=function(e,t){var n;return 0!==e&&e.99&&(r=Math.round(n)),r},e}(),Sr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ln.b(t,e),t.prototype.next=function(e,t){return Cr.prototype.next.call(this,e,t)||this._hour(e,t,1),!1},t.prototype.normalize=function(e){var t=e.rule;4===e.idx&&(t._startTime.setUTCHours(0),this._hour(e.date,t))},t}(Cr),Nr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ln.b(t,e),t.prototype.next=function(e,t){return Cr.prototype.next.call(this,e,t)||this[t.byHour?"_hour":"_date"](e,t,1),!1},t}(Cr),Or=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ln.b(t,e),t.prototype.setup=function(e,t){e.byWeekDay||(e.byWeekDay=[{day:t.getUTCDay(),offset:0}])},t}(Nr),Mr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ln.b(t,e),t.prototype.next=function(e,t){var n;if(!Cr.prototype.next.call(this,e,t))if(t.byHour)this._hour(e,t,1);else if(t.byMonthDay||t.byWeekDay||t.byYearDay||t.byWeekNumber)this._date(e,t,1);else{for(n=e.getUTCDate(),e.setUTCMonth(e.getUTCMonth()+1);e.getUTCDate()!==n;)e.setUTCDate(n);this._hour(e,t)}return!1},t.prototype.normalize=function(t){var n=t.rule,r=t.date;0!==t.idx||n.byMonthDay||n.byWeekDay?e.prototype.normalize.call(this,t):r.setUTCDate(t.day)},t.prototype.setup=function(e,t,n){e.byMonthDay||e.byWeekDay||n.setUTCDate(t.getUTCDate())},t}(Cr),Tr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ln.b(t,e),t.prototype.next=function(e,t){var n;if(!Cr.prototype.next.call(this,e,t))if(t.byHour)this._hour(e,t,1);else if(t.byMonthDay||t.byWeekDay||t.byYearDay||t.byWeekNumber)this._date(e,t,1);else if(t.byMonth){for(n=e.getUTCDate(),e.setUTCMonth(e.getUTCMonth()+1);e.getUTCDate()!==n;)e.setUTCDate(n);this._hour(e,t)}else e.setUTCFullYear(e.getUTCFullYear()+1),this._hour(e,t);return!1},t.prototype.setup=function(){},t}(Mr),Er={hourly:new Sr,daily:new Nr,weekly:new Or,monthly:new Mr,yearly:new Tr},Pr=function(e){return In.fromLocalDate(e.toLocalDate(),e.timezone)},Dr=function(e){return 36e5*e.getHours()+6e4*e.getMinutes()+1e3*e.getSeconds()+e.getMilliseconds()},Ar=function(e,t){if(!e)return!1;for(var n=t.getTime()-t.getMilliseconds(),r=e.length,o=0;o=t&&i.push(l)}return i},Rr=function(e,t){for(var n=[],r=0;re.end.getTime())return{success:!1,errorMessage:"Invalid recurrence rule: Start date ("+e.start+")is greater than End date "+e.start,events:[]};if(!a)return{success:!1,errorMessage:'Invalid recurrence frequency "'+i+'"',events:[]};var u=[],c=e.bySetPosition,p=c?0:1,d=e.exceptionDates,h=n.toTimezone(s.timezone),f=h,m=r.toTimezone(s.timezone),y=e.count;e.until&&e.until.getTime()1||w)h=s.clone();else{e.byHour||(v=s.getHours()),e.byMinute||(g=s.getMinutes()),e.bySecond||(b=s.getSeconds());var x=h.toUTCDate();x.setUTCHours(v,g,b,s.getMilliseconds()),h=In.fromUTCDate(x,h.timezone)}if(e._startPeriod=h.clone(),c){if(h=function(e,t){var n=e.toUTCDate();switch(t.freq){case"yearly":n.setUTCFullYear(n.getFullYear(),0,1);break;case"monthly":n.setUTCFullYear(n.getFullYear(),n.getMonth(),1);break;case"weekly":Jn(n,t.weekStart,-1)}return t.byHour&&n.setUTCHours(0),t.byMinute&&n.setUTCMinutes(0),t.bySecond&&n.setUTCSeconds(0),In.fromUTCDate(n,e.timezone)}(h,e),m=Ir(m,e),Dr(m)-Dr(h)<0){var k=m.toUTCDate();k.setUTCHours(h.getHours(),h.getMinutes(),h.getSeconds(),h.getMilliseconds()),m=In.fromUTCDate(k,m.timezone)}e._startPeriod=h.clone(),o=Ir(h,e)}var _=Dr(h);e._startTime=new Date(_);var C=h.toUTCDate();for(a.setup&&(a.setup(e,s,C),h=In.fromUTCDate(C,h.timezone)),C=h.toUTCDate(),a.limit(C,m.toUTCDate(),e),h=In.fromUTCDate(C,h.timezone);h<=m;){var S=h.addTime(l);if(((h>=f||S>f)&&!Ar(d,h)||c)&&(u.push({start:Pr(h),end:Pr(S)}),"hourly"!==i&&"minutely"!==i&&"secondly"!==i||(_=Dr(Pr(h)),e._startTime=new Date(_))),c){if(C=h.toUTCDate(),a.next(C,e),a.limit(C,m.toUTCDate(),e),(h=In.fromUTCDate(C,h.timezone))>o){var N=Lr(u.slice(p),s,c);N=Rr(N,d),u=u.slice(0,p).concat(N),o=Ir(h,e),p=u.length}if(y&&y===p)break}else{if(y&&y===p)break;p+=1,C=h.toUTCDate(),a.next(C,e),a.limit(C,m.toUTCDate(),e),h=In.fromUTCDate(C,h.timezone)}}return{success:!0,errorMessage:"",events:u}}var Fr=function(e,t){return e+(e1&&(r+=";INTERVAL="+e.interval),e.count&&(r+=";COUNT="+e.count),s&&(r+=";UNTIL="+Object(Un.l)(s.toTimezone("Etc/UTC"),"yyyyMMddTHHmmss")+"Z"),e.byMonth&&(r+=";BYMONTH="+e.byMonth),e.byWeekNumber&&(r+=";BYWEEKNO="+e.byWeekNumber),e.byYearDay&&(r+=";BYYEARDAY="+e.byYearDay),e.byMonthDay&&(r+=";BYMONTHDAY="+e.byMonthDay),e.byWeekDay&&(r+=";BYDAY="+function(e){for(var t,n=e.length,r=[],o=0;o-1}(e.value);return o.createElement(zo.a,{key:e.value,"data-key":e.value,"data-selected":t,togglable:!0,selected:t,onClick:l},Pe(e.text))})))))},Jo=n(10),Qo=function(){return(Qo=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0?e.byMonthDay[0]:t.getDate()}(c,t),w=o.useMemo((function(){return function(e){return Ce(e.byWeekDay)?"weekday":Ce(e.byMonthDay)?"monthday":void 0}(c)}),[c.byWeekDay,c.byMonthDay]),x=o.useCallback((function(e){"never"===e.freq?a({value:null}):(void 0===e.weekStart&&(e.weekStart=s.firstDay()),a({value:Hr(e)}))}),[a,n]),k=o.useCallback((function(e){var n={};n.freq=e,n.interval=1,"weekly"===e&&(n.byWeekDay=[{day:t.getDay(),offset:0}]),"monthly"!==e&&"yearly"!==e||(n.byMonthDay=[t.getDate()]),"yearly"===e&&(n.byMonth=[t.getMonth()+1]),x(n)}),[x,t]),_=o.useCallback((function(e){x(Object.assign({},c,{interval:e.value}))}),[x,c]),C=o.useCallback((function(e){x(Object.assign({},c,{count:e}))}),[x,c]),S=o.useCallback((function(e){x(Object.assign({},c,{until:fe.fromLocalDate(e,n)}))}),[x,c,n]),N=o.useCallback((function(e,t){var n="false"===t,r=parseInt(e,10),o=(c.byWeekDay||[]).map((function(e){return ni({},e)}));if(n)o.push({offset:0,day:r});else{var i=o.findIndex((function(e){return e.day===r}));i>-1&&o.splice(i,1)}x(Object.assign({},c,{byWeekDay:o}))}),[x,c]),O=o.useCallback((function(e,t){var n=Object.assign({},c);"string"===typeof e?(n.byWeekDay=qo(e),n.bySetPosition=[t]):n.byWeekDay=[{day:e,offset:t}],x(n)}),[x,c]),M=o.useCallback((function(e){x(Object.assign({},c,{byMonthDay:e}))}),[x,c]),T=o.useCallback((function(e){x(Object.assign({},c,{byMonth:e}))}),[x,c]),E=o.useCallback((function(e){var t=Object.assign({},c);"count"===e.value?(t.until=void 0,t.count=e.count):"until"===e.value?(t.until=fe.fromLocalDate(e.until,n),t.count=void 0):(t.until=void 0,t.count=void 0),x(t)}),[x,c,n]),P=o.useCallback((function(e,t,n){var r=Object.assign({},c);"monthday"===e?(r.byWeekDay=void 0,r.bySetPosition=void 0,r.byMonthDay=[b]):"weekday"===e&&(r.byMonthDay=void 0,"string"===typeof t?(r.bySetPosition=[n],r.byWeekDay=qo(t)):r.byWeekDay=[{day:t,offset:n}]),x(r)}),[x,c,b]),D=o.useCallback((function(e){var t=Object.assign({},c);if(Ce(t.byWeekDay))switch(t.byWeekDay.length){case 7:case 5:case 2:t.bySetPosition=[e];break;case 1:t.byWeekDay[0].offset=e}x(t)}),[x,c]),A=o.useCallback((function(){r()}),[r]),I=o.useCallback((function(){i()}),[i]);return o.createElement(o.Fragment,null,o.createElement("div",{onFocus:A,onBlur:I},o.createElement(Bo,{titleClassName:"k-edit-label",editorClassName:"k-edit-field",title:u("scheduler.recurrenceEditorRepeat",!0),frequency:d,frequencies:p,onFrequencyChange:k})),"never"!==d&&o.createElement("div",{onFocus:A,onBlur:I},o.createElement(Uo,{titleClassName:"k-edit-label",editorClassName:"k-edit-field",title:u(Pe(d)+"RepeatEvery"),frequencyText:u(Pe(d)+"Interval"),interval:c.interval,onIntervalChange:_})),"weekly"===d&&o.createElement("div",{onFocus:A,onBlur:I},o.createElement(Xo,{titleClassName:"k-edit-label",editorClassName:"k-edit-field",title:u("scheduler.recurrenceEditorWeeklyRepeatOn",!0),weekDays:m,byWeekDay:c.byWeekDay,onWeekDaysChange:N})),("monthly"===d||"yearly"===d)&&o.createElement("div",{onFocus:A,onBlur:I},o.createElement(ti,{titleClassName:"k-edit-label",editorClassName:"k-edit-field",titleMonthly:u("scheduler.recurrenceEditorMonthlyRepeatOn",!0),titleYearly:u("scheduler.recurrenceEditorYearlyRepeatOn",!0),monthlyDayTitle:u("scheduler.recurrenceEditorMonthlyDay",!0),yearlyOf:u("scheduler.recurrenceEditorYearlyOf",!0),monthDay:b,frequency:d,repeatOnRule:w,start:t,rrule:c,months:f,extendedWeekDays:y,offsetPositions:v,onRepeatOnRuleChange:P,onMonthDaysChange:M,onMonthsChange:T,onOffsetPositionChange:D,onWeekDayChange:O})),"never"!==d&&o.createElement("div",{onFocus:A,onBlur:I},o.createElement($o,{title:u("scheduler.recurrenceEditorEndLabel",!0),endAfter:u("scheduler.recurrenceEditorEndAfter",!0),endNever:u("scheduler.recurrenceEditorEndNever",!0),endOccurrence:u("scheduler.recurrenceEditorEndOccurrence",!0),endOn:u("scheduler.recurrenceEditorEndOn",!0),titleClassName:"k-edit-label",editorClassName:"k-edit-field",count:c.count,endRule:g,start:t,until:h,timezone:n,onCountChange:C,onUntilChange:S,onEndRuleChange:E})))};ri.defaultProps={value:""},ri.displayName="KendoReactSchedulerRepeatEditor";var oi=function(){return(oi=Object.assign||function(e){for(var t,n=1,r=arguments.length;n-1}));return o.createElement("div",{style:{display:"inline-block",width:"100%"}},o.createElement(Jo.c,yi({style:{width:"100%"},value:f,valid:i,data:h,textField:l,dataItemKey:s,itemRender:function(e,t){var n=o.createElement(o.Fragment,null,u&&o.createElement("span",{key:1,className:"k-scheduler-mark",style:{backgroundColor:t.dataItem[u],marginRight:Ce(t.dataItem[s])?"8px":"4px"}},"\xa0"),o.createElement("span",{key:2},"\xa0 ",e.props.children));return o.cloneElement(e,yi({},e.props),n)},tagRender:function(e,t){var n=o.createElement(o.Fragment,null,u&&o.createElement("span",{className:"k-scheduler-mark",style:{backgroundColor:e.data[0][u],marginRight:Ce(e.data[0][s])?"8px":"4px"}},"\xa0"),"\xa0",t.props.children);return o.cloneElement(t,yi({},t.props),n)},onChange:d},c)),o.createElement(_o,{validationMessage:r,valid:i}))},bi=function(e){var t=e.onChange,n=e.valueGetter,r=e.resources,i=e.fields,a=e.timezone,s=Object(kt.j)(),l=function(e){return s.toLanguageString(e,At[e])},u=l("scheduler.editorValidationRequired"),c=l("scheduler.editorValidationStart"),p=l("scheduler.editorValidationEnd"),d=l("scheduler.editorEventTitle"),h=l("scheduler.editorEventStart"),f=l("scheduler.editorEventEnd"),m=l("scheduler.editorEventDescription"),y=l("scheduler.editorEventAllDay"),v=l("scheduler.editorEventTimeZone"),g=l("scheduler.editorEventSeparateTimeZones"),b=o.useCallback((function(e,t){return Boolean(e&&t(i.end)&&e.getTime()>t(i.end).getTime())?c:void 0}),[i,c]),w=o.useCallback((function(e,t){return Boolean(e&&t(i.start)&&e.getTime()o&&(o=t)}})),y(n,{height:(r.items?r.items.length:0)*(o+1)-(i||0)},!0)}}}))}(l,e.expandable),o.createElement(a,Si({},i,{_ref:l}))})),Mi={slot:Ci};Oi.defaultProps=Mi,Oi.displayName="KendoReactSchedulerViewSlot";var Ti=o.createContext([null]),Ei=function(e){return o.createElement(Ti.Provider,{value:e.form},e.children)},Pi=function(){return(Pi=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0;return o.createElement("div",{className:"k-scheduler-row"},o.createElement(s,Vi({resources:t},i),(a.length?a:me).map((function(e,t){return o.createElement("div",{key:t,className:"k-scheduler-cell k-group-cell"},o.createElement(Jt.Provider,{value:{resource:e,groupIndex:l?t:0}},r))}))))};Zi.displayName="KendoReactSchedulerHorizontalResourceIterator";var qi=function(e){return e.children},Wi=o.createElement("div",{className:"k-scheduler-cell k-side-cell"}),Yi=function(e){return o.createElement(o.Fragment,null,o.createElement("div",{className:"k-sticky-cell"},Wi),e.children)},$i=function(e){var t=Object(kt.j)();return o.createElement(o.Fragment,null,o.createElement("div",{className:"k-sticky-cell"},o.createElement("div",{className:"k-scheduler-cell k-heading-cell k-side-cell k-scheduler-times-all-day","data-range-index":0},t.toLanguageString(St,At[St]))),e.children)},Xi=function(){return o.useContext(pt)},Ji=function(){return o.useContext($t)},Qi=function(){return(Qi=Object.assign||function(e){for(var t,n=1,r=arguments.length;nt&&(t=e.items.length)})),t}(e.slots),o=f(v&&v._ref.current&&v._ref.current.element);o&&(o.width=e.vertical?e.resizeHint||e.dragHint?o.width:o.width/r-1:o.width*e.slots.length-1,o.height=e.vertical?o.height*e.slots.length-1:e.resizeHint||e.dragHint?o.height:25,o.left=e.vertical?o.left+t*o.width+1*t:o.left,o.top=e.vertical?o.top:o.top+t*o.height+1*t,y(n,o),m(!0))}else p(!1)})),o.createElement(l,ta({},i,{_ref:a,style:ta({visibility:h?void 0:"hidden",display:c?void 0:"none"},e.style)}))})),oa={item:ea};ra.defaultProps=oa,ra.displayName="KendoReactSchedulerViewItem";var ia=function(){return(ia=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=e.end)return;var i=V(e.dataItem);_e(i,B.start,o),_e(i,B.recurrenceRule,null),be.current=n,ie(i,t)}e.onResizeStartDrag&&e.onResizeStartDrag.call(void 0,null)}),[be,me,e.dataItem,B.start,ie]),Ae=o.useCallback((function(t){if(F.resize){var n=xe(t.dragEvent.clientX,t.dragEvent.clientY,7);if(!n)return;if(n===be.current)return;var r=n.getAttribute("data-slot-end"),o=new Date(Number(r)-me.current);if(o<=e.start)return;var i=V(e.dataItem);_e(i,B.end,o),_e(i,B.recurrenceRule,null),be.current=n,ie(i,t)}e.onResizeEndDrag&&e.onResizeEndDrag.call(void 0,t)}),[be,e.start,e.dataItem,B.end,ie]),Ie=o.useCallback((function(t){F.resize&&oe&&(e.isRecurring&&!e.isException?fe(!0,t):(r&&r.call(void 0,{type:Vt.update,series:!1,dataItem:oe}),ie(null,t))),e.onResizeRelease&&e.onResizeRelease.call(void 0,t)}),[oe,e.isRecurring,e.isException,fe,r,ie]),ze=o.useCallback((function(e){r&&r.call(void 0,{type:Vt.update,series:Y,dataItem:e.value}),Q(null,e)}),[Y,r,Q]),Be=o.useCallback((function(e){$(null),le(null,e),Q(null,e),ne(null,e),ie(null,e),pe(!1,e),fe(!1,e)}),[$,le,Q,ne,ie,pe,fe]),Ue=o.useCallback((function(t){if(te){if(r){var n=V(te);_e(n,B.recurrenceRule,ke(e.dataItem,B.recurrenceRule)),r.call(void 0,{type:Vt.update,series:!1,dataItem:n})}ne(null,t)}if(oe){if(r){n=V(te);_e(n,B.recurrenceRule,ke(e.dataItem,B.recurrenceRule)),r.call(void 0,{type:Vt.update,series:!1,dataItem:n})}ie(null,t)}J&&($(!1),Q(e.dataItem,t)),se&&($(!1),le(e.dataItem,t),pe(!0,t)),fe(!1,t)}),[$,r,e.dataItem,J,Q,te,ne,oe,ie,se,le,pe]),He=o.useCallback((function(t){if(te){var n=V(te);_e(n,B.start,ke(te,B.start)),_e(n,B.end,ke(te,B.end)),_e(n,B.recurrenceRule,ke(e.dataItem,B.recurrenceRule)),r&&r.call(void 0,{type:Vt.update,series:!0,dataItem:n}),ne(null,t)}if(oe){n=V(oe);_e(n,B.start,ke(oe,B.start)),_e(n,B.end,ke(oe,B.end)),_e(n,B.recurrenceRule,ke(e.dataItem,B.recurrenceRule)),r&&r.call(void 0,{type:Vt.update,series:!0,dataItem:n}),ie(null,t)}if(J){$(!0);n=V(Ne(J,B,U));Q(n,t)}if(se){$(!0);n=V(se);le(n,t),pe(!0,t)}fe(!1,t)}),[$,B,J,te,oe,se]),Ve=o.useCallback((function(t){var n,r=e.slots.length&&e.slots[0]._ref.current;switch(t.syntheticEvent.keyCode){case b:if(!F.edit)return;Q(e.dataItem,t),e.isRecurring&&fe(!0,t);break;case g:if(!H.current)return;var o=function(e,t,n,r){void 0===n&&(n=!1),void 0===r&&(r=!1);var o=t.filter((function(e){return null!==e.element})),i=Object(ge.d)(o,[{field:"props.group.index",dir:"asc"},{field:"props.range.index",dir:"asc"},n?{field:""}:{field:"props.isAllDay",dir:"desc"},{field:"props.start",dir:"asc"}]),a=i.findIndex((function(t){return Boolean(t.props.uid===e.props.uid&&(void 0===t.props.occurrenceId||t.props.occurrenceId===e.props.occurrenceId)&&t.props.group.index===e.props.group.index&&t.props.range.index===e.props.range.index&&(n||t.props.isAllDay===e.props.isAllDay))}));return i[a+(r?-1:1)]}(t.target,H.current,e.ignoreIsAllDay,t.syntheticEvent.shiftKey);o&&o.element&&(t.syntheticEvent.preventDefault(),o.element.focus());break;case w:r&&Z.current&&(n=Le(r,Z.current));break;case k:r&&Z.current&&(n=je(r,Z.current));break;case x:r&&Z.current&&(n=Re(r,Z.current));break;case _:r&&Z.current&&(n=Fe(r,Z.current))}n&&n.element&&(t.syntheticEvent.preventDefault(),n.element.focus()),e.onKeyDown&&e.onKeyDown.call(void 0,t)}),[Z,e.slots,Q,e.dataItem,e.isRecurring,fe,e.ignoreIsAllDay]),Ze=o.useCallback((function(e){r&&se&&r.call(void 0,{type:Vt.remove,series:Y,dataItem:se}),le(null,e),pe(!1,e)}),[Y,E,se,r,le,pe]),Ge=o.useCallback((function(e,t){Q&&Q(e,t)}),[Q]),Ke=o.useCallback((function(e,t){ne&&ne(e,t)}),[ne]),qe=o.useCallback((function(e,t){ie&&ie(e,t)}),[ie]),We=o.useCallback((function(e,t){le&&le(e,t)}),[le]),Ye=o.useCallback((function(e,t){pe&&pe(e,t)}),[pe]),$e=o.useCallback((function(e,t){fe&&fe(e,t)}),[fe]);return o.createElement(va,{form:[J,Ge],drag:[te,Ke],resize:[oe,qe],remove:[se,We],showRemoveDialog:[ce,Ye],showOccurrenceDialog:[he,$e]},o.createElement(D,ga({},e,{_ref:P,selected:we,onKeyDown:Ve,onFocus:Ce,onDoubleClick:Se,onRemoveClick:Oe,onPress:Me,onDrag:Te,onRelease:Ee,onResizePress:Pe,onResizeEndDrag:Ae,onResizeStartDrag:De,onResizeRelease:Ie})),te&&F.drag&&o.createElement(A,{ignoreIsAllDay:i,dataItem:te,vertical:e.vertical,viewItem:D,item:e.item}),oe&&F.resize&&o.createElement(I,{ignoreIsAllDay:i,dataItem:oe,item:e.item,vertical:e.vertical}),J&&!he&&F.edit&&o.createElement(L,{dataItem:J,onSubmit:ze,onClose:Be,onCancel:Be}),he&&o.createElement(R,{dataItem:J||te||oe||se,isRemove:null!==se,onClose:Be,onOccurrenceClick:Ue,onSeriesClick:He}),ce&&se&&F.remove&&o.createElement(j,{dataItem:se,onClose:Be,onCancel:Be,onConfirm:Ze}))})),wa={viewItem:ra,drag:aa,resize:ua,form:ki,occurrenceDialog:mo,removeDialog:fo};ba.defaultProps=wa,ba.displayName="KendoReactSchedulerEditItem";var xa=function(){return(xa=Object.assign||function(e){for(var t,n=1,r=arguments.length;nt[o][i])&&(t[o][i]=r-1))})),Array.from(n.current.querySelectorAll(e.applyTo)).forEach((function(n){var r=n.getAttribute(e.horizontalAttribute),o=n.getAttribute(e.verticalAttribute);if(null!==r&&null!==o){var i=m(n),a=t[r][o]-i;y(n,{height:a},!0)}}))}}),t)}({element:l,selector:".k-resource-row",horizontalAttribute:"data-depth-index",verticalAttribute:"data-resource-index",applyTo:".k-resource-cell"}),o.createElement(o.Fragment,null,o.createElement(Xt,{ref:l,id:e.id,style:xa({},e.style),className:j,props:e,slots:P,ranges:E},o.createElement("div",{className:"k-scheduler-head",style:{width:I}},"horizontal"===c?o.createElement(Zi,{nested:!0,group:n,resources:i,rowContent:Yi},L):o.createElement(Qt,{wrapGroup:!0,group:n,resources:i},L)),o.createElement("div",{className:"k-scheduler-body",style:{width:I}},"horizontal"===c?o.createElement(Zi,{group:n,resources:i,rowContent:$i},R):o.createElement(Qt,{nested:!0,wrapGroup:!0,group:n,resources:i},R),A.map((function(t){return o.createElement(a,xa({key:t.isRecurring?t.uid+":"+t.group.index+":"+t.range.index+":"+t.originalStart:t.uid+":"+t.group.index+":"+t.range.index},t,{onDataAction:e.onDataAction,item:e.item,viewItem:e.viewItem,editable:e.editable,ignoreIsAllDay:!0,vertical:!1}))})))),o.createElement(Hi,{showWorkHours:N,onItemClick:O}))},_a={name:"multi-day-timeline",title:"Multi Day Timeline",dateRange:function(e){var t=e.date,n=e.numberOfDays,r=void 0===n?1:n,o=e.timezone;return{start:fe.fromUTCDate(Se(function(e){return u(e)}(t)),o),end:fe.fromUTCDate(Se(function(e,t){return u(ze(e,t||1))}(t,r)),o)}},selectedDateFormat:"{0:D} - {1:D}",selectedShortDateFormat:"{0:d} - {1:d}",step:1,numberOfDays:1,startTime:"00:00",endTime:"00:00",isWorkDayStart:"8:00",isWorkDayEnd:"17:00",workWeekStart:sn.Monday,workWeekEnd:sn.Friday,slotDivisions:2,slotDuration:60,defaultShowWorkHours:!0,columnWidth:100};ka.defaultProps=_a;var Ca=function(){return(Ca=Object.assign||function(e){for(var t,n=1,r=arguments.length;ni?7-o+i+1:i-o+1,s=function(e){return u(e)}(un(t,o)),l=function(e,t){return u(ze(e,t||1))}(s,a),c=fe.fromUTCDate(Se(s),n),p=fe.fromUTCDate(Se(l),n);return{start:new Date(c.getTime()),end:new Date(p.getTime())}},title:function(e){return e.toLanguageString("scheduler.workWeekViewTitle",At["scheduler.workWeekViewTitle"])},workWeekStart:sn.Monday,workWeekEnd:sn.Friday,selectedDateFormat:"{0:D} - {1:D}",selectedShortDateFormat:"{0:d} - {1:d}"};Va.defaultProps=Za,Va.displayName="KendoReactSchedulerWorkWeekView";var Ga=function(){return(Ga=Object.assign||function(e){for(var t,n=1,r=arguments.length;nu.bottom-_(r,"bottom")&&(p=t.bottom-u.bottom+_(o,"bottom")),t.leftu.right-_(r,"right")&&(c=t.right-u.right+_(o,"right")),c||p)if(l)a.scrollBy(c,p);else{var d=s.scrollLeft,f=s.scrollTop;p&&(s.scrollTop+=p),c&&(s.scrollLeft+=c);var m=s.scrollLeft-d,y=s.scrollTop-f;t={left:t.left-m,top:t.top-y,right:t.right-m,bottom:t.bottom-y}}if(l)break}}function S(e){for(var t=[],n=e.ownerDocument;e&&(t.push({dom:e,top:e.scrollTop,left:e.scrollLeft}),e!=n);e=h(e));return t}function N(e,t){for(var n=0;n=s){a=Math.max(d.bottom,a),s=Math.min(d.top,s);var h=d.left>t.left?d.left-t.left:d.right=(d.left+d.right)/2?1:0));continue}}!n&&(t.left>=d.right&&t.top>=d.top||t.left>=d.left&&t.top>=d.bottom)&&(i=u+1)}}return n&&3==n.nodeType?function(e,t){for(var n=e.nodeValue.length,r=document.createRange(),o=0;o=(i.left+i.right)/2?1:0)}}return{node:e,offset:0}}(n,r):!n||o&&1==n.nodeType?{node:e,offset:i}:M(n,r)}function T(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function E(e,t){var n,r,o,i,s=e.root;if(s.caretPositionFromPoint)try{var l=s.caretPositionFromPoint(t.left,t.top);l&&(o=(n=l).offsetNode,i=n.offset)}catch(y){}if(!o&&s.caretRangeFromPoint){var u=s.caretRangeFromPoint(t.left,t.top);u&&(o=(r=u).startContainer,i=r.startOffset)}var c,p=s.elementFromPoint(t.left,t.top+1);if(!p||!e.dom.contains(1!=p.nodeType?p.parentNode:p)){var d=e.dom.getBoundingClientRect();if(!T(t,d))return null;if(!(p=function e(t,n,r){var o=t.childNodes.length;if(o&&r.topt.top&&i++}o==e.dom&&i==o.childNodes.length-1&&1==o.lastChild.nodeType&&t.top>o.lastChild.getBoundingClientRect().bottom?c=e.state.doc.content.size:0!=i&&1==o.nodeType&&"BR"==o.childNodes[i-1].nodeName||(c=function(e,t,n,r){for(var o=-1,i=t;i!=e.dom;){var a=e.docView.nearestDesc(i,!0);if(!a)return null;if(a.node.isBlock&&a.parent){var s=a.dom.getBoundingClientRect();if(s.left>r.left||s.top>r.top)o=a.posBefore;else{if(!(s.right-1?o:e.docView.posFromDOM(t,n)}(e,o,i,t))}null==c&&(c=function(e,t,n){var r=M(t,n),o=r.node,i=r.offset,a=-1;if(1==o.nodeType&&!o.firstChild){var s=o.getBoundingClientRect();a=s.left!=s.right&&n.left>(s.left+s.right)/2?1:-1}return e.docView.posFromDOM(o,i,a)}(e,p,t));var m=e.docView.nearestDesc(p,!0);return{pos:c,inside:m?m.posAtStart-m.border:-1}}function P(e,t){var n=e.getClientRects();return n.length?n[t<0?0:n.length-1]:e.getBoundingClientRect()}function D(e,t){var n=e.docView.domFromPos(t),r=n.node,o=n.offset;if(3==r.nodeType&&(a.webkit||a.gecko)){var i=P(f(r,o,o),0);if(a.gecko&&o&&/\s/.test(r.nodeValue[o-1])&&o0&&ou.top&&("up"==n?u.bottomi.bottom-1))return!1}}return!0}))}(e,t,n):function(e,t,n){var r=t.selection.$head;if(!r.parent.isTextblock)return!1;var o=r.parentOffset,i=!o,a=o==r.parent.content.size,s=getSelection();return L.test(r.parent.textContent)&&s.modify?I(e,t,(function(){var t=s.getRangeAt(0),o=s.focusNode,i=s.focusOffset,a=s.caretBidiLevel;s.modify("move",n,"character");var l=!(r.depth?e.docView.domAfterPos(r.before()):e.dom).contains(1==s.focusNode.nodeType?s.focusNode:s.focusNode.parentNode)||o==s.focusNode&&i==s.focusOffset;return s.removeAllRanges(),s.addRange(t),null!=a&&(s.caretBidiLevel=a),l})):"left"==n||"backward"==n?i:a}(e,t,n))}var B=function(e,t,n,r){this.parent=e,this.children=t,this.dom=n,n.pmViewDesc=this,this.contentDOM=r,this.dirty=0},U={beforePosition:{configurable:!0},size:{configurable:!0},border:{configurable:!0},posBefore:{configurable:!0},posAtStart:{configurable:!0},posAfter:{configurable:!0},posAtEnd:{configurable:!0},contentLost:{configurable:!0}};B.prototype.matchesWidget=function(){return!1},B.prototype.matchesMark=function(){return!1},B.prototype.matchesNode=function(){return!1},B.prototype.matchesHack=function(){return!1},U.beforePosition.get=function(){return!1},B.prototype.parseRule=function(){return null},B.prototype.stopEvent=function(){return!1},U.size.get=function(){for(var e=0,t=0;t0:s)?this.posAtEnd:this.posAtStart},B.prototype.nearestDesc=function(e,t){for(var n=!0,r=e;r;r=r.parentNode){var o=this.getDesc(r);if(o&&(!t||o.node)){if(!n||!o.nodeDOM||(1==o.nodeDOM.nodeType?o.nodeDOM.contains(1==e.nodeType?e:e.parentNode):o.nodeDOM==e))return o;n=!1}}},B.prototype.getDesc=function(e){for(var t=e.pmViewDesc,n=t;n;n=n.parent)if(n==this)return t},B.prototype.posFromDOM=function(e,t,n){for(var r=e;;r=r.parentNode){var o=this.getDesc(r);if(o)return o.localPosFromDOM(e,t,n)}},B.prototype.descAt=function(e){for(var t=0,n=0;t=u&&t<=l-s.border&&s.node&&s.contentDOM&&this.contentDOM.contains(s.contentDOM))return s.parseRange(e,t,u);e=i;for(var c=a;c>0;c--){var p=this.children[c-1];if(p.size&&p.dom.parentNode==this.contentDOM&&!p.emptyChildAt(1)){r=d(p.dom)+1;break}e-=p.size}-1==r&&(r=0)}if(r>-1&&t<=l){t=l;for(var h=a+1;hs&&it){var f=c;c=p,p=f}var y=document.createRange();y.setEnd(p.node,p.offset),y.setStart(c.node,c.offset),d.removeAllRanges(),d.addRange(y)}}},B.prototype.ignoreMutation=function(e){return!this.contentDOM&&"selection"!=e.type},U.contentLost.get=function(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)},B.prototype.markDirty=function(e,t){for(var n=0,r=0;r=n:en){var a=n+o.border,s=i-o.border;if(e>=a&&t<=s)return this.dirty=e==n||t==i?2:1,void(e!=a||t!=s||!o.contentLost&&o.dom.parentNode==this.contentDOM?o.markDirty(e-a,t-a):o.dirty=3);o.dirty=3}n=i}this.dirty=2},B.prototype.markParentsDirty=function(){for(var e=1,t=this.parent;t;t=t.parent,e++){var n=1==e?2:1;t.dirty0&&(i=se(i,0,e,r));for(var s=0;s=0&&!l&&s.syncToMarks(a==n.node.childCount?o.Mark.none:n.node.child(a).marks,r,e),s.placeWidget(t,e,i)}),(function(t,n,o,a){s.syncToMarks(t.marks,r,e),s.findNodeMatch(t,n,o,a)||s.updateNextNode(t,n,o,e,a)||s.addNode(t,n,o,e,i),i+=t.nodeSize})),s.syncToMarks(H,r,e),this.node.isTextblock&&s.addTextblockHacks(),s.destroyRest(),(s.changed||2==this.dirty)&&(a&&this.protectLocalComposition(e,a),this.renderChildren())},t.prototype.renderChildren=function(){!function e(t,n){for(var r=t.firstChild,o=0;ot+this.node.content.size)){var a=e.root.getSelection(),s=function(e,t){for(;;){if(3==e.nodeType)return e;if(1==e.nodeType&&t>0){if(e.childNodes.length>t&&3==e.childNodes[t].nodeType)return e.childNodes[t];e=e.childNodes[t-1],t=g(e)}else{if(!(1==e.nodeType&&t=n){var c=l.lastIndexOf(t,r-s);if(c>=0&&c+t.length+s>=n)return s+c}}}return-1}(this.node.content,l,o-t,i-t);return u<0?null:{node:s,pos:u,text:l}}}},t.prototype.protectLocalComposition=function(e,t){var n=t.node,r=t.pos,o=t.text;if(!this.getDesc(n)){for(var i=n;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=null)}var a=new Z(this,i,n,o);e.compositionNodes.push(a),this.children=se(this.children,r,r+o.length,e,a)}},t.prototype.update=function(e,t,n,r){return!(3==this.dirty||!e.sameMarkup(this.node))&&(this.updateInner(e,t,n,r),!0)},t.prototype.updateInner=function(e,t,n,r){this.updateOuterDeco(t),this.node=e,this.innerDeco=n,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=0},t.prototype.updateOuterDeco=function(e){if(!re(e,this.outerDeco)){var t=1!=this.nodeDOM.nodeType,n=this.dom;this.dom=ee(this.dom,this.nodeDOM,Q(this.outerDeco,this.node,t),Q(e,this.node,t)),this.dom!=n&&(n.pmViewDesc=null,this.dom.pmViewDesc=this),this.outerDeco=e}},t.prototype.selectNode=function(){this.nodeDOM.classList.add("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.dom.draggable=!0)},t.prototype.deselectNode=function(){this.nodeDOM.classList.remove("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||this.dom.removeAttribute("draggable")},Object.defineProperties(t.prototype,n),t}(B);function q(e,t,n,r,o){return ne(r,t,e),new K(null,e,t,n,r,r,r,o,0)}var W=function(e){function t(t,n,r,o,i,a,s){e.call(this,t,n,r,o,i,null,a,s)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.parseRule=function(){return{skip:this.nodeDOM.parentNode||!0}},t.prototype.update=function(e,t){return!(3==this.dirty||0!=this.dirty&&!this.inParent()||!e.sameMarkup(this.node))&&(this.updateOuterDeco(t),0==this.dirty&&e.text==this.node.text||e.text==this.nodeDOM.nodeValue||(this.nodeDOM.nodeValue=e.text),this.node=e,this.dirty=0,!0)},t.prototype.inParent=function(){for(var e=this.parent.contentDOM,t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1},t.prototype.domFromPos=function(e){return{node:this.nodeDOM,offset:e}},t.prototype.localPosFromDOM=function(t,n,r){return t==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):e.prototype.localPosFromDOM.call(this,t,n,r)},t.prototype.ignoreMutation=function(e){return"characterData"!=e.type&&"selection"!=e.type},t.prototype.slice=function(e,n,r){var o=this.node.cut(e,n),i=document.createTextNode(o.text);return new t(this.parent,o,this.outerDeco,this.innerDeco,i,i,r)},t}(K),Y=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.parseRule=function(){return{ignore:!0}},t.prototype.matchesHack=function(){return 0==this.dirty},t}(B),$=function(e){function t(t,n,r,o,i,a,s,l,u,c){e.call(this,t,n,r,o,i,a,s,u,c),this.spec=l}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.update=function(t,n,r,o){if(3==this.dirty)return!1;if(this.spec.update){var i=this.spec.update(t,n);return i&&this.updateInner(t,n,r,o),i}return!(!this.contentDOM&&!t.isLeaf)&&e.prototype.update.call(this,t,n,r,o)},t.prototype.selectNode=function(){this.spec.selectNode?this.spec.selectNode():e.prototype.selectNode.call(this)},t.prototype.deselectNode=function(){this.spec.deselectNode?this.spec.deselectNode():e.prototype.deselectNode.call(this)},t.prototype.setSelection=function(t,n,r,o){this.spec.setSelection?this.spec.setSelection(t,n,r):e.prototype.setSelection.call(this,t,n,r,o)},t.prototype.destroy=function(){this.spec.destroy&&this.spec.destroy(),e.prototype.destroy.call(this)},t.prototype.stopEvent=function(e){return!!this.spec.stopEvent&&this.spec.stopEvent(e)},t.prototype.ignoreMutation=function(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):e.prototype.ignoreMutation.call(this,t)},t}(K);function X(e){e&&(this.nodeName=e)}X.prototype=Object.create(null);var J=[new X];function Q(e,t,n){if(0==e.length)return J;for(var r=n?J[0]:new X,o=[r],i=0;i0&&o>=0;o--){var i=t[o],a=i.node;if(a){if(a!=e.child(r-1))break;n.push(i),--r}}return{nodes:n.reverse(),offset:r}}(e.node.content,e.children);this.preMatched=n.nodes,this.preMatchOffset=n.offset};function ae(e,t){return e.type.side-t.type.side}function se(e,t,n,r,o){for(var i=[],a=0,s=0;a=n||c<=t?i.push(l):(un&&i.push(l.slice(n-u,l.size,r)))}return i}function le(e,t){var n=e.selection,o=n.$anchor,i=n.$head,a=t>0?o.max(i):o.min(i),s=a.parent.inlineContent?a.depth?e.doc.resolve(t>0?a.after():a.before()):null:a;return s&&r.Selection.findFrom(s,t)}function ue(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function ce(e,t,n){var o=e.state.selection;if(o instanceof r.TextSelection){if(!o.empty||n.indexOf("s")>-1)return!1;if(e.endOfTextblock(t>0?"right":"left")){var i=le(e.state,t);return!!(i&&i instanceof r.NodeSelection)&&ue(e,i)}var s,l=o.$head,u=l.textOffset?null:t<0?l.nodeBefore:l.nodeAfter;if(!u||u.isText)return!1;var c=t<0?l.pos-u.nodeSize:l.pos;return!!(u.isAtom||(s=e.docView.descAt(c))&&!s.contentDOM)&&(r.NodeSelection.isSelectable(u)?ue(e,new r.NodeSelection(t<0?e.state.doc.resolve(l.pos-u.nodeSize):l)):!!a.webkit&&ue(e,new r.TextSelection(e.state.doc.resolve(t<0?c:c+u.nodeSize))))}if(o instanceof r.NodeSelection&&o.node.isInline)return ue(e,new r.TextSelection(t>0?o.$to:o.$from));var p=le(e.state,t);return!!p&&ue(e,p)}function pe(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function de(e){var t=e.pmViewDesc;return t&&0==t.size&&(e.nextSibling||"BR"!=e.nodeName)}function he(e){var t=e.root.getSelection(),n=t.focusNode,r=t.focusOffset;if(n){var o,i,s=!1;for(a.gecko&&1==n.nodeType&&r0){if(1!=n.nodeType)break;var l=n.childNodes[r-1];if(de(l))o=n,i=--r;else{if(3!=l.nodeType)break;r=(n=l).nodeValue.length}}else{if(me(n))break;for(var u=n.previousSibling;u&&de(u);)o=n.parentNode,i=d(u),u=u.previousSibling;if(u)r=pe(n=u);else{if((n=n.parentNode)==e.dom)break;r=0}}s?ye(e,t,n,r):o&&ye(e,t,o,i)}}function fe(e){var t=e.root.getSelection(),n=t.focusNode,r=t.focusOffset;if(n){for(var o,i,a=pe(n);;)if(r-1)return!1;var i=o.$from,a=o.$to;if(!i.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){var s=le(e.state,t);if(s&&s instanceof r.NodeSelection)return ue(e,s)}if(!i.parent.inlineContent){var l=r.Selection.findFrom(t<0?i:a,t);return!l||ue(e,l)}return!1}function ge(e,t){if(!(e.state.selection instanceof r.TextSelection))return!0;var n=e.state.selection,o=n.$head,i=n.$anchor,a=n.empty;if(!o.sameParent(i))return!0;if(!a)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;var s=!o.textOffset&&(t<0?o.nodeBefore:o.nodeAfter);if(s&&!s.isText){var l=e.state.tr;return t<0?l.delete(o.pos-s.nodeSize,o.pos):l.delete(o.pos,o.pos+s.nodeSize),e.dispatch(l),!0}return!1}function be(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function we(e,t){var n=t.keyCode,r=function(e){var t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}(t);return 8==n||a.mac&&72==n&&"c"==r?ge(e,-1)||he(e):46==n||a.mac&&68==n&&"c"==r?ge(e,1)||fe(e):13==n||27==n||(37==n?ce(e,-1,r)||he(e):39==n?ce(e,1,r)||fe(e):38==n?ve(e,-1,r)||he(e):40==n?function(e){if(a.chrome&&!(e.state.selection.$head.parentOffset>0)){var t=e.root.getSelection(),n=t.focusNode,r=t.focusOffset;if(n&&1==n.nodeType&&0==r&&n.firstChild&&"false"==n.firstChild.contentEditable){var o=n.firstChild;be(e,o,!0),setTimeout((function(){return be(e,o,!1)}),20)}}}(e)||ve(e,1,r)||fe(e):r==(a.mac?"m":"c")&&(66==n||73==n||89==n||90==n))}function xe(e,t){var n,o,i=e.root.getSelection(),a=e.state.doc,s=e.docView.nearestDesc(i.focusNode),l=s&&0==s.size,u=e.docView.posFromDOM(i.focusNode,i.focusOffset),c=a.resolve(u);if(w(i)){for(n=c;s&&!s.node;)s=s.parent;if(s&&s.node.isAtom&&r.NodeSelection.isSelectable(s.node)&&s.parent&&(!s.node.isInline||!function(e,t,n){for(var r=0==t,o=t==g(e);r||o;){if(e==n)return!0;var i=d(e);if(!(e=e.parentNode))return!1;r=r&&0==i,o=o&&i==g(e)}}(i.focusNode,i.focusOffset,s.dom))){var p=s.posBefore;o=new r.NodeSelection(u==p?c:a.resolve(p))}}else n=a.resolve(e.docView.posFromDOM(i.anchorNode,i.anchorOffset));o||(o=Te(e,n,c,"pointer"==t||e.state.selection.head=this.preMatchOffset?this.preMatched[e-this.preMatchOffset]:null},ie.prototype.destroyBetween=function(e,t){if(e!=t){for(var n=e;n>1,i=Math.min(o,e.length);r-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{var l=G.create(this.top,e[o],t,n);this.top.children.splice(this.index,0,l),this.top=l,this.changed=!0}this.index=0,o++}},ie.prototype.findNodeMatch=function(e,t,n,r){var o=-1,i=r<0?void 0:this.getPreMatch(r),a=this.top.children;if(i&&i.matchesNode(e,t,n))o=a.indexOf(i);else for(var s=this.index,l=Math.min(a.length,s+5);s-1&&s+this.preMatchOffset!=o)return!1;var l=a.dom;if(!(this.lock&&(l==this.lock||1==l.nodeType&&l.contains(this.lock.parentNode))&&!(e.isText&&a.node&&a.node.isText&&a.nodeDOM.nodeValue==e.text&&3!=a.dirty&&re(t,a.outerDeco)))&&a.update(e,t,n,r))return this.destroyBetween(this.index,i),a.dom!=l&&(this.changed=!0),this.index++,!0;break}}return!1},ie.prototype.addNode=function(e,t,n,r,o){this.top.children.splice(this.index++,0,K.create(this.top,e,t,n,r,o)),this.changed=!0},ie.prototype.placeWidget=function(e,t,n){if(this.indexDate.now()-50?e.lastSelectionOrigin:null,u=xe(e,l);if(!e.state.selection.eq(u)){var c=e.state.tr.setSelection(u);"pointer"==l?c.setMeta("pointer",!0):"key"==l&&c.scrollIntoView(),e.dispatch(c)}}else{var p=e.state.doc.resolve(t),d=p.sharedDepth(n);t=p.before(d+1),n=e.state.doc.resolve(n).after(d+1);var h,f,m=e.state.selection,y=function(e,t,n){var r=e.docView.parseRange(t,n),i=r.node,s=r.fromOffset,l=r.toOffset,u=r.from,c=r.to,p=e.root.getSelection(),d=null,h=p.anchorNode;if(h&&e.dom.contains(1==h.nodeType?h:h.parentNode)&&(d=[{node:h,offset:p.anchorOffset}],w(p)||d.push({node:p.focusNode,offset:p.focusOffset})),a.chrome&&8===e.lastKeyCode)for(var f=l;f>s;f--){var m=i.childNodes[f-1],y=m.pmViewDesc;if("BR"==m.nodeType&&!y){l=f;break}if(!y||y.size)break}var v=e.state.doc,g=e.someProp("domParser")||o.DOMParser.fromSchema(e.state.schema),b=v.resolve(u),x=null,k=g.parse(i,{topNode:b.parent,topMatch:b.parent.contentMatchAt(b.index()),topOpen:!0,from:s,to:l,preserveWhitespace:!b.parent.type.spec.code||"full",editableContent:!0,findPositions:d,ruleFromNode:Pe,context:b});if(d&&null!=d[0].pos){var _=d[0].pos,C=d[1]&&d[1].pos;null==C&&(C=_),x={anchor:_+u,head:C+u}}return{doc:k,sel:x,from:u,to:c}}(e,t,n),v=e.state.doc,g=v.slice(y.from,y.to);8===e.lastKeyCode&&Date.now()-100=s?i-r:0)+(l-s),s=i}else if(l=l?i-r:0)+(s-l),l=i}return{start:i,endA:s,endB:l}}(g.content,y.doc.content,y.from,h,f);if(!b){if(!(i&&m instanceof r.TextSelection&&!m.empty&&m.$head.sameParent(m.$anchor))||e.composing||y.sel&&y.sel.anchor!=y.sel.head){if(y.sel){var k=Ae(e,e.state.doc,y.sel);k&&!k.eq(e.state.selection)&&e.dispatch(e.state.tr.setSelection(k))}return}b={start:m.from,endA:m.to,endB:m.to}}e.domChangeCount++,e.state.selection.frome.state.selection.from&&b.start<=e.state.selection.from+2?b.start=e.state.selection.from:b.endA=e.state.selection.to-2&&(b.endB+=e.state.selection.to-b.endA,b.endA=e.state.selection.to)),a.ie&&a.ie_version<=11&&b.endB==b.start+1&&b.endA==b.start&&b.start>y.from&&" \xa0"==y.doc.textBetween(b.start-y.from-1,b.start-y.from+1)&&(b.start--,b.endA--,b.endB--);var _,C=y.doc.resolveNoCache(b.start-y.from),S=y.doc.resolveNoCache(b.endB-y.from);if((a.ios&&e.lastIOSEnter>Date.now()-100&&(!C.sameParent(S)||s.some((function(e){return"DIV"==e.nodeName})))||!C.sameParent(S)&&C.posb.start&&function(e,t,n,r,o){if(!r.parent.isTextblock||n-t<=o.pos-r.pos||Ie(r,!0,!1)n||Ie(a,!0,!1)t.content.size?null:Te(e,t.resolve(n.anchor),t.resolve(n.head))}function Ie(e,t,n){for(var r=e.depth,o=t?e.end():e.pos;r>0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,o++,t=!1;if(n)for(var i=e.node(r).maybeChild(e.indexAfter(r));i&&!i.isLeaf;)i=i.firstChild,o++;return o}function Le(e,t){for(var n=[],r=t.content,i=t.openStart,a=t.openEnd;i>1&&a>1&&1==r.childCount&&1==r.firstChild.childCount;){i--,a--;var s=r.firstChild;n.push(s.type.name,s.type.hasRequiredAttrs()?s.attrs:null),r=s.content}var l=e.someProp("clipboardSerializer")||o.DOMSerializer.fromSchema(e.state.schema),u=Ue(),c=u.createElement("div");c.appendChild(l.serializeFragment(r,{document:u}));for(var p,d=c.firstChild;d&&1==d.nodeType&&(p=ze[d.nodeName.toLowerCase()]);){for(var h=p.length-1;h>=0;h--){for(var f=u.createElement(p[h]);c.firstChild;)f.appendChild(c.firstChild);c.appendChild(f)}d=c.firstChild}return d&&1==d.nodeType&&d.setAttribute("data-pm-slice",i+" "+a+" "+JSON.stringify(n)),{dom:c,text:e.someProp("clipboardTextSerializer",(function(e){return e(t)}))||t.content.textBetween(0,t.content.size,"\n\n")}}function Re(e,t,n,r,i){var a,s,l=i.parent.type.spec.code;if(!n&&!t)return null;var u=t&&(r||l||!n);if(u){if(e.someProp("transformPastedText",(function(e){t=e(t)})),l)return new o.Slice(o.Fragment.from(e.state.schema.text(t)),0,0);var c=e.someProp("clipboardTextParser",(function(e){return e(t,i)}));c?s=c:(a=document.createElement("div"),t.trim().split(/(?:\r\n?|\n)+/).forEach((function(e){a.appendChild(document.createElement("p")).textContent=e})))}else e.someProp("transformPastedHTML",(function(e){n=e(n)})),a=function(e){var t=/(\s*]*>)*/.exec(e);t&&(e=e.slice(t[0].length));var n,r=Ue().createElement("div"),o=/(?:]*>)*<([a-z][^>\s]+)/i.exec(e),i=0;(n=o&&ze[o[1].toLowerCase()])&&(e=n.map((function(e){return"<"+e+">"})).join("")+e+n.map((function(e){return""})).reverse().join(""),i=n.length);r.innerHTML=e;for(var a=0;a=0;l-=2){var u=r.nodes[n[l]];if(!u||u.hasRequiredAttrs())break;i=o.Fragment.from(u.create(n[l+1],i)),a++,s++}return new o.Slice(i,a,s)}(function(e,t,n){t=0;r--){var i=n(r);if(i)return i.v}return e}(s.content,i),!1),e.someProp("transformPasted",(function(e){s=e(s)})),s}function je(e,t,n){void 0===n&&(n=0);for(var r=t.length-1;r>=n;r--)e=t[r].create(null,o.Fragment.from(e));return e}function Fe(e,t,n,r,i,a){var s=t<0?e.firstChild:e.lastChild,l=s.content;return i=n&&(l=t<0?s.contentMatchAt(0).fillBefore(l,e.childCount>1||a<=i).append(l):l.append(s.contentMatchAt(s.childCount).fillBefore(o.Fragment.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,s.copy(l))}var ze={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]},Be=null;function Ue(){return Be||(Be=document.implementation.createHTMLDocument("title"))}var He={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},Ve=a.ie&&a.ie_version<=11,Ze=function(){this.anchorNode=this.anchorOffset=this.focusNode=this.focusOffset=null};Ze.prototype.set=function(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset},Ze.prototype.eq=function(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset};var Ge=function(e,t){var n=this;this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=window.MutationObserver&&new window.MutationObserver((function(e){for(var t=0;te.target.nodeValue.length}))?n.flushSoon():n.flush()})),this.currentSelection=new Ze,Ve&&(this.onCharData=function(e){n.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),n.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.suppressingSelectionUpdates=!1};Ge.prototype.flushSoon=function(){var e=this;this.flushingSoon<0&&(this.flushingSoon=window.setTimeout((function(){e.flushingSoon=-1,e.flush()}),20))},Ge.prototype.forceFlush=function(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())},Ge.prototype.start=function(){this.observer&&this.observer.observe(this.view.dom,He),Ve&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()},Ge.prototype.stop=function(){var e=this;if(this.observer){var t=this.observer.takeRecords();if(t.length){for(var n=0;n-1)){var e=this.observer?this.observer.takeRecords():[];this.queue.length&&(e=this.queue.concat(e),this.queue.length=0);var t=this.view.root.getSelection(),n=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(t)&&Ee(this.view)&&!this.ignoreSelectionChange(t),r=-1,o=-1,i=!1,s=[];if(this.view.editable)for(var l=0;l1){var c=s.filter((function(e){return"BR"==e.nodeName}));if(2==c.length){var p=c[0],d=c[1];p.parentNode&&p.parentNode.parentNode==d.parentNode?d.remove():p.remove()}}(r>-1||n)&&(r>-1&&(this.view.docView.markDirty(r,o),function(e){if(Ke)return;Ke=!0,"normal"==getComputedStyle(e.dom).whiteSpace&&console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package.")}(this.view)),this.handleDOMChange(r,o,i,s),this.view.docView.dirty?this.view.updateState(this.view.state):this.currentSelection.eq(t)||ke(this.view))}},Ge.prototype.registerMutation=function(e,t){if(t.indexOf(e.target)>-1)return null;var n=this.view.docView.nearestDesc(e.target);if("attributes"==e.type&&(n==this.view.docView||"contenteditable"==e.attributeName||"style"==e.attributeName&&!e.oldValue&&!e.target.getAttribute("style")))return null;if(!n||n.ignoreMutation(e))return null;if("childList"==e.type){var r=e.previousSibling,o=e.nextSibling;if(a.ie&&a.ie_version<=11&&e.addedNodes.length)for(var i=0;ii.depth?t(e,n,i.nodeAfter,i.before(r),o,!0):t(e,n,i.node(r),i.before(r),o,!1)})))return{v:!0}},s=i.depth+1;s>0;s--){var l=a(s);if(l)return l.v}return!1}function et(e,t,n){e.focused||e.focus();var r=e.state.tr.setSelection(t);"pointer"==n&&r.setMeta("pointer",!0),e.dispatch(r)}function tt(e,t,n,o,i){return Qe(e,"handleClickOn",t,n,o)||e.someProp("handleClick",(function(n){return n(e,t,o)}))||(i?function(e,t){if(-1==t)return!1;var n,o,i=e.state.selection;i instanceof r.NodeSelection&&(n=i.node);for(var a=e.state.doc.resolve(t),s=a.depth+1;s>0;s--){var l=s>a.depth?a.nodeAfter:a.node(s);if(r.NodeSelection.isSelectable(l)){o=n&&i.$from.depth>0&&s>=i.$from.depth&&a.before(i.$from.depth+1)==i.$from.pos?a.before(i.$from.depth):a.before(s);break}}return null!=o&&(et(e,r.NodeSelection.create(e.state.doc,o),"pointer"),!0)}(e,n):function(e,t){if(-1==t)return!1;var n=e.state.doc.resolve(t),o=n.nodeAfter;return!!(o&&o.isAtom&&r.NodeSelection.isSelectable(o))&&(et(e,new r.NodeSelection(n),"pointer"),!0)}(e,n))}function nt(e,t,n,r){return Qe(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",(function(n){return n(e,t,r)}))}function rt(e,t,n,o){return Qe(e,"handleTripleClickOn",t,n,o)||e.someProp("handleTripleClick",(function(n){return n(e,t,o)}))||function(e,t){var n=e.state.doc;if(-1==t)return!!n.inlineContent&&(et(e,r.TextSelection.create(n,0,n.content.size),"pointer"),!0);for(var o=n.resolve(t),i=o.depth+1;i>0;i--){var a=i>o.depth?o.nodeAfter:o.node(i),s=o.before(i);if(a.inlineContent)et(e,r.TextSelection.create(n,s+1,s+1+a.content.size),"pointer");else{if(!r.NodeSelection.isSelectable(a))continue;et(e,r.NodeSelection.create(n,s),"pointer")}return!0}}(e,n)}function ot(e){return ct(e)}We.keydown=function(e,t){if(e.shiftKey=16==t.keyCode||t.shiftKey,!st(e,t))if(e.domObserver.forceFlush(),e.lastKeyCode=t.keyCode,e.lastKeyCodeTime=Date.now(),!a.ios||13!=t.keyCode||t.ctrlKey||t.altKey||t.metaKey)e.someProp("handleKeyDown",(function(n){return n(e,t)}))||we(e,t)?t.preventDefault():Ye(e,"key");else{var n=Date.now();e.lastIOSEnter=n,setTimeout((function(){e.lastIOSEnter==n&&(e.someProp("handleKeyDown",(function(t){return t(e,x(13,"Enter"))})),e.lastIOSEnter=0)}),50)}},We.keyup=function(e,t){16==t.keyCode&&(e.shiftKey=!1)},We.keypress=function(e,t){if(!(st(e,t)||!t.charCode||t.ctrlKey&&!t.altKey||a.mac&&t.metaKey))if(e.someProp("handleKeyPress",(function(n){return n(e,t)})))t.preventDefault();else{var n=e.state.selection;if(!(n instanceof r.TextSelection)||!n.$from.sameParent(n.$to)){var o=String.fromCharCode(t.charCode);e.someProp("handleTextInput",(function(t){return t(e,n.$from.pos,n.$to.pos,o)}))||e.dispatch(e.state.tr.insertText(o).scrollIntoView()),t.preventDefault()}}};var it=a.mac?"metaKey":"ctrlKey";qe.mousedown=function(e,t){e.shiftKey=t.shiftKey;var n=ot(e),r=Date.now(),o="singleClick";r-e.lastClick.time<500&&function(e,t){var n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}(t,e.lastClick)&&!t[it]&&("singleClick"==e.lastClick.type?o="doubleClick":"doubleClick"==e.lastClick.type&&(o="tripleClick")),e.lastClick={time:r,x:t.clientX,y:t.clientY,type:o};var i=e.posAtCoords(Je(t));i&&("singleClick"==o?e.mouseDown=new at(e,i,t,n):("doubleClick"==o?nt:rt)(e,i.pos,i.inside,t)?t.preventDefault():Ye(e,"pointer"))};var at=function(e,t,n,o){var i,s,l=this;if(this.view=e,this.startDoc=e.state.doc,this.pos=t,this.event=n,this.flushed=o,this.selectNode=n[it],this.allowDefault=n.shiftKey,t.inside>-1)i=e.state.doc.nodeAt(t.inside),s=t.inside;else{var u=e.state.doc.resolve(t.pos);i=u.parent,s=u.depth?u.before():0}this.mightDrag=null;var c=o?null:n.target,p=c?e.docView.nearestDesc(c,!0):null;this.target=p?p.dom:null,(i.type.spec.draggable&&!1!==i.type.spec.selectable||e.state.selection instanceof r.NodeSelection&&s==e.state.selection.from)&&(this.mightDrag={node:i,pos:s,addAttr:this.target&&!this.target.draggable,setUneditable:this.target&&a.gecko&&!this.target.hasAttribute("contentEditable")}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout((function(){return l.target.setAttribute("contentEditable","false")}),20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),Ye(e,"pointer")};function st(e,t){return!!e.composing||!!(a.safari&&Math.abs(t.timeStamp-e.compositionEndedAt)<500)&&(e.compositionEndedAt=-2e8,!0)}at.prototype.done=function(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.view.mouseDown=null},at.prototype.up=function(e){if(this.done(),this.view.dom.contains(3==e.target.nodeType?e.target.parentNode:e.target)){var t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(Je(e))),this.allowDefault||!t?Ye(this.view,"pointer"):tt(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():!this.flushed&&(!a.chrome||this.view.state.selection instanceof r.TextSelection||t.pos!=this.view.state.selection.from&&t.pos!=this.view.state.selection.to)?Ye(this.view,"pointer"):(et(this.view,r.Selection.near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault())}},at.prototype.move=function(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0),Ye(this.view,"pointer")},qe.touchdown=function(e){ot(e),Ye(e,"pointer")},qe.contextmenu=function(e){return ot(e)};var lt=a.android?5e3:-1;function ut(e,t){clearTimeout(e.composingTimeout),t>-1&&(e.composingTimeout=setTimeout((function(){return ct(e)}),t))}function ct(e,t){for(e.domObserver.forceFlush(),e.composing=!1;e.compositionNodes.length>0;)e.compositionNodes.pop().markParentsDirty();if(t||e.docView.dirty){var n=xe(e);return n.eq(e.state.selection)?e.updateState(e.state):e.dispatch(e.state.tr.setSelection(n)),!0}return!1}We.compositionstart=We.compositionupdate=function(e){if(!e.composing){e.domObserver.flush();var t=e.state,n=t.selection.$from;if(t.selection.empty&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some((function(e){return!1===e.type.spec.inclusive}))))e.markCursor=e.state.storedMarks||n.marks(),ct(e,!0),e.markCursor=null;else if(ct(e),a.gecko&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length)for(var r=e.root.getSelection(),o=r.focusNode,i=r.focusOffset;o&&1==o.nodeType&&0!=i;){var s=i<0?o.lastChild:o.childNodes[i-1];if(!s)break;if(3==s.nodeType){r.collapse(s,s.nodeValue.length);break}o=s,i=-1}e.composing=!0}ut(e,lt)},We.compositionend=function(e,t){e.composing&&(e.composing=!1,e.compositionEndedAt=t.timeStamp,ut(e,20))};var pt=a.ie&&a.ie_version<15||a.ios&&a.webkit_version<604;function dt(e,t,n,r){var i=Re(e,t,n,e.shiftKey,e.state.selection.$from);if(!e.someProp("handlePaste",(function(t){return t(e,r,i||o.Slice.empty)}))&&i){var a=function(e){return 0==e.openStart&&0==e.openEnd&&1==e.content.childCount?e.content.firstChild:null}(i),s=a?e.state.tr.replaceSelectionWith(a,e.shiftKey):e.state.tr.replaceSelection(i);e.dispatch(s.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste"))}}qe.copy=We.cut=function(e,t){var n=e.state.selection,r="cut"==t.type;if(!n.empty){var o=pt?null:t.clipboardData,i=Le(e,n.content()),a=i.dom,s=i.text;o?(t.preventDefault(),o.clearData(),o.setData("text/html",a.innerHTML),o.setData("text/plain",s)):function(e,t){var n=e.dom.ownerDocument,r=n.body.appendChild(n.createElement("div"));r.appendChild(t),r.style.cssText="position: fixed; left: -10000px; top: 10px";var o=getSelection(),i=n.createRange();i.selectNodeContents(t),e.dom.blur(),o.removeAllRanges(),o.addRange(i),setTimeout((function(){n.body.removeChild(r),e.focus()}),50)}(e,a),r&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))}},We.paste=function(e,t){var n=pt?null:t.clipboardData,r=n&&n.getData("text/html"),o=n&&n.getData("text/plain");n&&(r||o||n.files.length)?(dt(e,o,r,t),t.preventDefault()):function(e,t){var n=e.dom.ownerDocument,r=e.shiftKey||e.state.selection.$from.parent.type.spec.code,o=n.body.appendChild(n.createElement(r?"textarea":"div"));r||(o.contentEditable="true"),o.style.cssText="position: fixed; left: -10000px; top: 10px",o.focus(),setTimeout((function(){e.focus(),n.body.removeChild(o),r?dt(e,o.value,null,t):dt(e,o.textContent,o.innerHTML,t)}),50)}(e,t)};var ht=function(e,t){this.slice=e,this.move=t},ft=a.mac?"altKey":"ctrlKey";for(var mt in qe.dragstart=function(e,t){var n=e.mouseDown;if(n&&n.done(),t.dataTransfer){var o=e.state.selection,i=o.empty?null:e.posAtCoords(Je(t));if(i&&i.pos>=o.from&&i.pos<=(o instanceof r.NodeSelection?o.to-1:o.to));else if(n&&n.mightDrag)e.dispatch(e.state.tr.setSelection(r.NodeSelection.create(e.state.doc,n.mightDrag.pos)));else if(t.target&&1==t.target.nodeType){var a=e.docView.nearestDesc(t.target,!0);if(!a||!a.node.type.spec.draggable||a==e.docView)return;e.dispatch(e.state.tr.setSelection(r.NodeSelection.create(e.state.doc,a.posBefore)))}var s=e.state.selection.content(),l=Le(e,s),u=l.dom,c=l.text;t.dataTransfer.clearData(),t.dataTransfer.setData(pt?"Text":"text/html",u.innerHTML),pt||t.dataTransfer.setData("text/plain",c),e.dragging=new ht(s,!t[ft])}},qe.dragend=function(e){window.setTimeout((function(){return e.dragging=null}),50)},We.dragover=We.dragenter=function(e,t){return t.preventDefault()},We.drop=function(e,t){var n=e.dragging;if(e.dragging=null,t.dataTransfer){var a=e.posAtCoords(Je(t));if(a){var s=e.state.doc.resolve(a.pos);if(s){var l=n&&n.slice||Re(e,t.dataTransfer.getData(pt?"Text":"text/plain"),pt?null:t.dataTransfer.getData("text/html"),!1,s);if(e.someProp("handleDrop",(function(r){return r(e,t,l||o.Slice.empty,n&&n.move)})))t.preventDefault();else if(l){t.preventDefault();var u=l?Object(i.dropPoint)(e.state.doc,s.pos,l):s.pos;null==u&&(u=s.pos);var c=e.state.tr;n&&n.move&&c.deleteSelection();var p=c.mapping.map(u),d=0==l.openStart&&0==l.openEnd&&1==l.content.childCount,h=c.doc;if(d?c.replaceRangeWith(p,p,l.content.firstChild):c.replaceRange(p,p,l),!c.doc.eq(h)){var f=c.doc.resolve(p);d&&r.NodeSelection.isSelectable(l.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(l.content.firstChild)?c.setSelection(new r.NodeSelection(f)):c.setSelection(Te(e,f,c.doc.resolve(c.mapping.map(u)))),e.focus(),e.dispatch(c.setMeta("uiEvent","drop"))}}}}}},qe.focus=function(e){e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout((function(){e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.root.getSelection())&&ke(e)}),20))},qe.blur=function(e){e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),e.domObserver.currentSelection.set({}),e.focused=!1)},qe.beforeinput=function(e,t){if(a.chrome&&a.android&&"deleteContentBackward"==t.inputType){var n=e.domChangeCount;setTimeout((function(){if(e.domChangeCount==n&&(e.dom.blur(),e.focus(),!e.someProp("handleKeyDown",(function(t){return t(e,x(8,"Backspace"))})))){var t=e.state.selection.$cursor;t&&t.pos>0&&e.dispatch(e.state.tr.delete(t.pos-1,t.pos).scrollIntoView())}}),50)}},We)qe[mt]=We[mt];function yt(e,t){if(e==t)return!0;for(var n in e)if(e[n]!==t[n])return!1;for(var r in t)if(!(r in e))return!1;return!0}var vt=function(e,t){this.spec=t||_t,this.side=this.spec.side||0,this.toDOM=e};vt.prototype.map=function(e,t,n,r){var o=e.mapResult(t.from+r,this.side<0?-1:1),i=o.pos;return o.deleted?null:new wt(i-n,i-n,this)},vt.prototype.valid=function(){return!0},vt.prototype.eq=function(e){return this==e||e instanceof vt&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&yt(this.spec,e.spec))};var gt=function(e,t){this.spec=t||_t,this.attrs=e};gt.prototype.map=function(e,t,n,r){var o=e.map(t.from+r,this.spec.inclusiveStart?-1:1)-n,i=e.map(t.to+r,this.spec.inclusiveEnd?1:-1)-n;return o>=i?null:new wt(o,i,this)},gt.prototype.valid=function(e,t){return t.from=e&&(!o||o(a.spec))&&n.push(a.copy(a.from+r,a.to+r))}for(var s=0;se){var l=this.children[s]+1;this.children[s+2].findInner(e-l,t-l,n,r+l,o)}},Ct.prototype.map=function(e,t,n){return this==St||0==e.maps.length?this:this.mapInner(e,t,0,0,n||_t)},Ct.prototype.mapInner=function(e,t,n,r,o){for(var i,a=0;al+i||(t>=s[a]+i?s[a+1]=-1:n>=o&&(u=r-n-(t-e))&&(s[a]+=u,s[a+1]+=u))}},u=0;u=r.content.size){c=!0;continue}var f=n.map(e[p+1]+i,-1)-o,m=r.content.findIndex(h),y=m.index,v=m.offset,g=r.maybeChild(y);if(g&&v==h&&v+g.nodeSize==f){var b=s[p+2].mapInner(n,g,d+1,s[p]+i+1,a);b!=St?(s[p]=h,s[p+1]=f,s[p+2]=b):(s[p+1]=-2,c=!0)}else c=!0}if(c){var w=Et(function(e,t,n,r,o,i,a){function s(e,t){for(var i=0;ia&&u.to=e){this.children[o]==e&&(n=this.children[o+2]);break}for(var i=e+1,a=i+t.content.size,s=0;si&&l.type instanceof gt){var u=Math.max(i,l.from)-i,c=Math.min(a,l.to)-i;un&&a.to0;)t++;e.splice(t,0,n)}function It(e){var t=[];return e.someProp("decorations",(function(n){var r=n(e.state);r&&r!=St&&t.push(r)})),e.cursorWrapper&&t.push(Ct.create(e.state.doc,[e.cursorWrapper.deco])),Nt.from(t)}Nt.prototype.forChild=function(e,t){if(t.isLeaf)return Ct.empty;for(var n=[],r=0;ro.scrollToSelection?"to selection":"preserve",p=i||!this.docView.matchesNode(e.doc,u,l),d=p||!e.selection.eq(o.selection),h="preserve"==c&&d&&null==this.dom.style.overflowAnchor&&function(e){for(var t,n,r=e.dom.getBoundingClientRect(),o=Math.max(0,r.top),i=(r.left+r.right)/2,a=o+1;a=o-20){t=s,n=l.top;break}}}return{refDOM:t,refTop:n,stack:S(e.dom)}}(this);if(d){this.domObserver.stop();var f=p&&(a.ie||a.chrome)&&!this.composing&&!o.selection.empty&&!e.selection.empty&&function(e,t){var n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}(o.selection,e.selection);if(p){var y=a.chrome&&Ut(this.root);!i&&this.docView.update(e.doc,u,l,this)||(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=q(e.doc,u,l,this.dom,this)),y&&function(e,t){var n=Ut(t);if(!n||3==n[0].nodeType)return!1;for(var r=0;re.length)&&(t=e.length);for(var n=0,r=new Array(t);n=t?r.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},r.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},r.prototype.forEach=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length),t<=n?this.forEachInner(e,t,n,0):this.forEachInvertedInner(e,t,n,0)},r.prototype.map=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length);var r=[];return this.forEach((function(t,n){return r.push(e(t,n))}),t,n),r},r.from=function(e){return e instanceof r?e:e&&e.length?new o(e):r.empty};var o=function(e){function t(t){e.call(this),this.values=t}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(e,n){return 0==e&&n==this.length?this:new t(this.values.slice(e,n))},t.prototype.getInner=function(e){return this.values[e]},t.prototype.forEachInner=function(e,t,n,r){for(var o=t;o=n;o--)if(!1===e(this.values[o],r+o))return!1},t.prototype.leafAppend=function(e){if(this.length+e.length<=200)return new t(this.values.concat(e.flatten()))},t.prototype.leafPrepend=function(e){if(this.length+e.length<=200)return new t(e.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(r);r.empty=new o([]);var i=function(e){function t(t,n){e.call(this),this.left=t,this.right=n,this.length=t.length+n.length,this.depth=Math.max(t.depth,n.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(e){return eo&&!1===this.right.forEachInner(e,Math.max(t-o,0),Math.min(this.length,n)-o,r+o))&&void 0)},t.prototype.forEachInvertedInner=function(e,t,n,r){var o=this.left.length;return!(t>o&&!1===this.right.forEachInvertedInner(e,t-o,Math.max(n,o)-o,r+o))&&(!(n=n?this.right.slice(e-n,t-n):this.left.slice(e,n).append(this.right.slice(0,t-n))},t.prototype.leafAppend=function(e){var n=this.right.leafAppend(e);if(n)return new t(this.left,n)},t.prototype.leafPrepend=function(e){var n=this.left.leafPrepend(e);if(n)return new t(n,this.right)},t.prototype.appendInner=function(e){return this.left.depth>=Math.max(this.right.depth,e.depth)+1?new t(this.left,new t(this.right,e)):new t(this,e)},t}(r),a=r,s=n(9),l=n(6),u=function(e,t){this.items=e,this.eventCount=t};u.prototype.popEvent=function(e,t){var n=this;if(0==this.eventCount)return null;for(var r,o,i=this.items.length;;i--){if(this.items.get(i-1).selection){--i;break}}t&&(r=this.remapping(i,this.items.length),o=r.maps.length);var a,s,l=e.tr,p=[],d=[];return this.items.forEach((function(e,t){if(!e.step)return r||(r=n.remapping(i,t+1),o=r.maps.length),o--,void d.push(e);if(r){d.push(new c(e.map));var h,f=e.step.map(r.slice(o));f&&l.maybeStep(f).doc&&(h=l.mapping.maps[l.mapping.maps.length-1],p.push(new c(h,null,null,p.length+d.length))),o--,h&&r.appendMap(h,o)}else l.maybeStep(e.step);return e.selection?(a=r?e.selection.map(r.slice(o)):e.selection,s=new u(n.items.slice(0,i).append(d.reverse().concat(p)),n.eventCount-1),!1):void 0}),this.items.length,0),{remaining:s,transform:l,selection:a}},u.prototype.addTransform=function(e,t,n,r){for(var o=[],i=this.eventCount,a=this.items,s=!r&&a.length?a.get(a.length-1):null,l=0;ld&&(a=function(e,t){var n;return e.forEach((function(e,r){if(e.selection&&0==t--)return n=r,!1})),e.slice(n)}(a,m),i-=m),new u(a.append(o),i)},u.prototype.remapping=function(e,t){var n=new s.Mapping;return this.items.forEach((function(t,r){var o=null!=t.mirrorOffset&&r-t.mirrorOffset>=e?n.maps.length-t.mirrorOffset:null;n.appendMap(t.map,o)}),e,t),n},u.prototype.addMaps=function(e){return 0==this.eventCount?this:new u(this.items.append(e.map((function(e){return new c(e)}))),this.eventCount)},u.prototype.rebased=function(e,t){if(!this.eventCount)return this;var n=[],r=Math.max(0,this.items.length-t),o=e.mapping,i=e.steps.length,a=this.eventCount;this.items.forEach((function(e){e.selection&&a--}),r);var s=t;this.items.forEach((function(t){var r=o.getMirror(--s);if(null!=r){i=Math.min(i,r);var l=o.maps[r];if(t.step){var u=e.steps[r].invert(e.docs[r]),p=t.selection&&t.selection.map(o.slice(s+1,r));p&&a++,n.push(new c(l,u,p))}else n.push(new c(l))}}),r);for(var l=[],p=t;p500&&(h=h.compress(this.items.length-n.length)),h},u.prototype.emptyItemCount=function(){var e=0;return this.items.forEach((function(t){t.step||e++})),e},u.prototype.compress=function(e){void 0===e&&(e=this.items.length);var t=this.remapping(0,e),n=t.maps.length,r=[],o=0;return this.items.forEach((function(i,a){if(a>=e)r.push(i),i.selection&&o++;else if(i.step){var s=i.step.map(t.slice(n)),l=s&&s.getMap();if(n--,l&&t.appendMap(l,n),s){var u=i.selection&&i.selection.map(t.slice(n));u&&o++;var p,d=new c(l.invert(),s,u),h=r.length-1;(p=r.length&&r[h].merge(d))?r[h]=p:r.push(d)}}else i.map&&n--}),this.items.length,0),new u(a.from(r.reverse()),o)},u.empty=new u(a.empty,0);var c=function(e,t,n,r){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=r};c.prototype.merge=function(e){if(this.step&&e.step&&!e.selection){var t=e.step.merge(this.step);if(t)return new c(t.getMap().invert(),t,this.selection)}};var p=function(e,t,n,r){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=r},d=20;function h(e){var t=[];return e.forEach((function(e,n,r,o){return t.push(r,o)})),t}function f(e,t){if(!e)return null;for(var n=[],r=0;r=t[o]&&(n=!0)})),n}(n,e.prevRanges)),l=a?f(e.prevRanges,n.mapping):h(n.mapping.maps[n.steps.length-1]);return new p(e.done.addTransform(n,s?t.selection.getBookmark():null,r,g(t)),u.empty,l,n.time)}(n,r,t,e)}},config:e})}function _(e,t){var n=w.getState(e);return!(!n||0==n.done.eventCount)&&(t&&m(n,e,t,!1),!0)}function C(e,t){var n=w.getState(e);return!(!n||0==n.undone.eventCount)&&(t&&m(n,e,t,!0),!0)}function S(e){var t=w.getState(e);return t?t.done.eventCount:0}function N(e){var t=w.getState(e);return t?t.undone.eventCount:0}},function(e,t,n){"use strict";n.d(t,"a",(function(){return Qt})),n.d(t,"b",(function(){return Me})),n.d(t,"d",(function(){return cn})),n.d(t,"c",(function(){return kn}));var r,o=n(0),i=n(23),a=n(1),s=n(2),l=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handlePageChange=function(e,n){e.preventDefault(),t.props.pageChange(n,e)},t}return l(t,e),t.prototype.render=function(){for(var e=this,t=this.start>1&&this.renderDots(this.start-1),n=this.endt){var n=e%t;return 0===n?e-t+1:e-n+1}return 1},enumerable:!0,configurable:!0}),t}(o.Component),c=n(4),p=((r={})["pager.itemsPerPage"]="items per page",r["pager.info"]="{0} - {1} of {2} items",r["pager.firstPage"]="Go to the first page",r["pager.previousPage"]="Go to the previous page",r["pager.nextPage"]="Go to the next page",r["pager.lastPage"]="Go to the last page",r["pager.page"]="Page",r["pager.of"]="Of",r["pager.totalPages"]="{0}",r["filter.eqOperator"]="Is equal to",r["filter.notEqOperator"]="Is not equal to",r["filter.isNullOperator"]="Is null",r["filter.isNotNullOperator"]="Is not null",r["filter.isEmptyOperator"]="Is empty",r["filter.isNotEmptyOperator"]="Is not empty",r["filter.startsWithOperator"]="Starts with",r["filter.containsOperator"]="Contains",r["filter.notContainsOperator"]="Does not contain",r["filter.endsWithOperator"]="Ends with",r["filter.gteOperator"]="Is greater than or equal to",r["filter.gtOperator"]="Is greater than",r["filter.lteOperator"]="Is less than or equal to",r["filter.ltOperator"]="Is less than",r["filter.isTrue"]="Is true",r["filter.isFalse"]="Is false",r["filter.afterOrEqualOperator"]="Is after or equal to",r["filter.afterOperator"]="Is after",r["filter.beforeOperator"]="Is before",r["filter.beforeOrEqualOperator"]="Is before or equal to",r["filter.andLogic"]="And",r["filter.orLogic"]="Or",r["filter.addExpression"]="Add Expression",r["filter.addGroup"]="Add Group",r["filter.close"]="Close",r["columnMenu.filterClearButton"]="Clear",r["columnMenu.filterSubmitButton"]="Filter",r["columnMenu.filterTitle"]="Filter",r["columnMenu.sortAscending"]="Sort Ascending",r["columnMenu.sortDescending"]="Sort Descending",r["columnMenu.filterEqOperator"]="Is equal to",r["columnMenu.filterNotEqOperator"]="Is not equal to",r["columnMenu.filterIsNullOperator"]="Is null",r["columnMenu.filterIsNotNullOperator"]="Is not null",r["columnMenu.filterIsEmptyOperator"]="Is empty",r["columnMenu.filterIsNotEmptyOperator"]="Is not empty",r["columnMenu.filterStartsWithOperator"]="Starts with",r["columnMenu.filterContainsOperator"]="Contains",r["columnMenu.filterNotContainsOperator"]="Does not contain",r["columnMenu.filterEndsWithOperator"]="Ends with",r["columnMenu.filterGteOperator"]="Is greater than or equal to",r["columnMenu.filterGtOperator"]="Is greater than",r["columnMenu.filterLteOperator"]="Is less than or equal to",r["columnMenu.filterLtOperator"]="Is less than",r["columnMenu.filterIsTrue"]="Is true",r["columnMenu.filterAfterOrEqualOperator"]="Is after or equal to",r["columnMenu.filterAfterOperator"]="Is after",r["columnMenu.filterBeforeOperator"]="Is before",r["columnMenu.filterBeforeOrEqualOperator"]="Is before or equal to",r["columnMenu.filterAndLogic"]="And",r["columnMenu.filterOrLogic"]="Or",r),d=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._text=void 0,t.onChange=function(e){var n=t._text=e.target.value.replace(/\D/g,"");t.forceUpdate(),n&&t.props.pageChange(parseInt(n,10),e)},t.value=function(){var e=void 0===t._text?t.props.currentPage.toString():t._text;return t._text=void 0,e},t}return d(t,e),t.prototype.render=function(){var e=this,t=Object(c.e)(this),n=Object(c.f)(this),r=this.props.messagesMap?this.props.messagesMap("pager.page"):{messageKey:"pager.page",defaultMessage:p["pager.page"]},i=this.props.messagesMap?this.props.messagesMap("pager.of"):{messageKey:"pager.of",defaultMessage:p["pager.of"]},a=this.props.messagesMap?this.props.messagesMap("pager.totalPages"):{messageKey:"pager.totalPages",defaultMessage:p["pager.totalPages"]};return o.createElement("span",{className:"k-pager-input k-label"},n.toLanguageString(r.messageKey,r.defaultMessage),o.createElement("input",{className:"k-textbox",value:this.value(),onBlur:function(){return e.forceUpdate()},onChange:this.onChange}),n.toLanguageString(i.messageKey,i.defaultMessage)+" "+t.format(n.toLanguageString(a.messageKey,a.defaultMessage),[this.props.totalPages]))},t}(o.Component);Object(c.h)(h);var f=n(10),m=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),y=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.pageSizeChange=function(e){t.props.pageChange&&t.props.pageChange({skip:0,take:parseInt(e.target.value,10)},e)},t}return m(t,e),t.prototype.render=function(){var e=this,t=this.props.pageSizes.slice();0===t.filter((function(t){return t===e.props.pageSize})).length&&t.unshift(this.props.pageSize);var n=this.props.messagesMap?this.props.messagesMap("pager.itemsPerPage"):{messageKey:"pager.itemsPerPage",defaultMessage:p["pager.itemsPerPage"]};return o.createElement("span",{className:"k-pager-sizes k-label"},o.createElement(f.b,{value:this.props.pageSize,data:t,onChange:this.pageSizeChange}),Object(c.f)(this).toLanguageString(n.messageKey,n.defaultMessage))},t}(o.Component);Object(c.h)(y);var v=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),g=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.changePage=function(e,n){t.props.onPageChange&&e>0&&e<=t.totalPages&&t.props.onPageChange({target:t,skip:(e-1)*t.props.take,take:t.props.take,syntheticEvent:n,nativeEvent:n.nativeEvent})},t}return v(t,e),t.prototype.render=function(){var e,t,n,r,i=this.props,a=i.skip,s=i.take,l=i.total,d=i.pageSizes,f=i.className,m=i.messagesMap,v=Object(c.f)(this),g=Object(c.e)(this),b=Math.floor(a/s)+1,w="numeric"===this.props.type?o.createElement(u,{buttonCount:this.props.buttonCount||0,totalPages:this.totalPages,currentPage:b,pageChange:this.changePage}):o.createElement(h,{currentPage:b,totalPages:this.totalPages,pageChange:this.changePage,messagesMap:m}),x=m?m("pager.firstPage"):{messageKey:"pager.firstPage",defaultMessage:p["pager.firstPage"]},k=m?m("pager.previousPage"):{messageKey:"pager.previousPage",defaultMessage:p["pager.previousPage"]},_=m?m("pager.nextPage"):{messageKey:"pager.nextPage",defaultMessage:p["pager.nextPage"]},C=m?m("pager.lastPage"):{messageKey:"pager.lastPage",defaultMessage:p["pager.lastPage"]},S=m?m("pager.info"):{messageKey:"pager.info",defaultMessage:p["pager.info"]};this.props.previousNext&&(e=this.renderButton(1,"k-link k-pager-nav k-pager-first"+(1===b?" k-state-disabled":""),v.toLanguageString(x.messageKey,x.defaultMessage),"k-icon k-i-arrow-end-left"),t=this.renderButton(b-1,"k-link k-pager-nav"+(1===b?" k-state-disabled":""),v.toLanguageString(k.messageKey,k.defaultMessage),"k-icon k-i-arrow-60-left"),n=this.renderButton(b+1,"k-link k-pager-nav"+(b>=this.totalPages?" k-state-disabled":""),v.toLanguageString(_.messageKey,_.defaultMessage),"k-icon k-i-arrow-60-right"),r=this.renderButton(this.totalPages,"k-link k-pager-nav k-pager-last"+(b>=this.totalPages?" k-state-disabled":""),v.toLanguageString(C.messageKey,C.defaultMessage),"k-icon k-i-arrow-end-right"));var N=d&&o.createElement(y,{pageChange:this.props.onPageChange,pageSize:s,pageSizes:d,messagesMap:m}),O=this.props.info&&o.createElement("div",{className:"k-pager-info k-label"},g.format(v.toLanguageString(S.messageKey,S.defaultMessage),[Math.min(a+1,l),Math.min(a+s,l),l]));return o.createElement("div",{className:"k-pager-wrap k-floatwrap k-widget"+(f?" "+f:""),style:this.props.style},e,t,w,n,r,N,O)},t.prototype.renderButton=function(e,t,n,r){var i=this;return o.createElement("a",{onClick:function(t){t.preventDefault(),i.changePage(e,t)},href:"#",className:t,title:n},o.createElement("span",{className:r,"aria-label":n}))},Object.defineProperty(t.prototype,"totalPages",{get:function(){return Math.ceil((this.props.total||0)/this.props.take)},enumerable:!0,configurable:!0}),t.propTypes={className:a.string,style:a.object,total:a.number.isRequired,skip:a.number.isRequired,take:a.number.isRequired,buttonCount:a.number,info:a.bool,type:a.oneOf(["numeric","input"]),pageSizes:a.arrayOf(a.number),previousNext:a.bool,onPageChange:a.func,messagesMap:a.func},t.defaultProps={buttonCount:10,info:!0,type:"numeric"},t}(o.Component);Object(c.g)(g),Object(c.h)(g);var b=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),w=function(){return(w=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=0&&t.props.sort[l].dir||"none",c={field:r.field,onClick:s&&function(e){return t.cellClick(e,r)}||void 0,selectionChange:t.props.selectionChange,title:r.title,selectionValue:r.headerSelectionValue,render:t.props.cellRender,children:t.sortIcon(l)},p=(r.kFirst?"k-first ":"")+t.cellClass(r.field,r.headerClassName,r.locked),d=void 0!==r.locked?{left:r.left,right:r.right,borderRightWidth:r.rightBorder?"1px":""}:{},h=r.columnMenu||t.props.columnMenu;return o.createElement("th",{"aria-sort":s?K[u]:void 0,key:n,colSpan:r.colSpan,rowSpan:r.rowSpan,className:p,style:d},0===r.children.length&&h&&o.createElement(h,{sort:t.props.sort,onSortChange:t.props.sortChange,filter:t.props.columnMenuFilter,onFilterChange:t.props.columnMenuFilterChange,field:r.field}),r.headerCell&&o.createElement(r.headerCell,Z({},c))||o.createElement(j,Z({},c)),a&&i&&o.createElement(B,{key:"ColumnResizer",resize:function(e,t,n){return i.dragHandler(e,r,t,n)}}))}))},t}V(t,e),t.prototype.cellClass=function(e,t,n){var r="k-header"+(n?" k-grid-header-sticky":"")+(t?" "+t:"");return this.props.sort&&this.props.sort.some((function(t){return t.field===e}))&&(r+=" k-sorted"),r},t.prototype.sortIcon=function(e){return this.props.sort?e>=0&&[o.createElement("span",{key:1,className:"k-icon k-i-sort-"+this.props.sort[e].dir+"-sm"}),this.props.sort.length>1&&o.createElement("span",{key:2,className:"k-sort-order"},e+1)]:null},t.prototype.render=function(){var e=this;return this.props.columnsMap.map((function(t,n){return e.props.pressHandler&&o.createElement(H,{key:n,pressHandler:e.props.pressHandler,dragHandler:e.props.dragHandler,releaseHandler:e.props.releaseHandler},e.cells(t))||o.createElement("tr",null,e.cells(t))}))}}(o.Component);(function(){function e(e){var t=this;this.resizable=!1,this.isRtl=!1,this.setIsRtl=function(e){t.isRtl=e},this.onResize=e,this.dragHandler=this.dragHandler.bind(this)}e.prototype.dragHandler=function(e,t,n,r){var o=e.originalEvent;r||(o.preventDefault(),o.stopPropagation(),o.stopImmediatePropagation());var i=n.parentElement;if(i&&i.parentElement){var a,s=i.clientWidth;if(this.isRtl?(a=n.getBoundingClientRect().right-n.offsetWidth/2-e.clientX,a+=s):a=s+e.clientX-n.getBoundingClientRect().left-n.offsetWidth/2,r||!(Math.abs(a-s)<1)){this.setWidths(t,Math.floor(a)/s);var l=this.columns.filter((function(e){return!e.children.length})).indexOf(t);this.onResize(l,s,a,o,r)}}},e.prototype.setWidths=function(e,t){for(var n=this.columns.indexOf(e),r=[],o=e.children.length,i=n+1;o>0&&i=0){var o=r.columns[n];(o.reorderable&&r.reorderable||o.groupable&&r.groupable)&&(r.startColumn=n)}},this.dragHandler=function(e,t){if(e.isTouch||e.originalEvent.preventDefault(),e.originalEvent.stopPropagation(),-1!==r.startColumn||-1!==r.startGroup){r.currentColumn=r.getColumnIndex(e,t),r.currentGroup=r.getGroupIndex(e),r.groupPanelDivElement&&r.startGroup>=0&&(r.currentGroup=Math.min(r.currentGroup,r.groupPanelDivElement.children.length-2));var n=!r.isValid();n&&(r.currentColumn=-1,r.currentGroup=-1);var o=r.currentColumn>=0?t.children[r.columns[r.currentColumn].index]:r.groupPanelDivElement&&r.groupPanelDivElement.children[r.currentGroup];r.updateDragElementClue(e,t,o,n),r.updateDropElementClue(e,t,o,n)}},this.releaseHandler=function(e){var t=r.startColumn,n=r.currentColumn,o=r.startGroup,i=r.currentGroup;r.dropElementClue&&r.dropElementClue.setState({visible:!1}),r.dragElementClue&&r.dragElementClue.setState({visible:!1});var a=r.isValid();r.startColumn=r.startGroup=r.currentColumn=r.currentGroup=-1,a&&(t>=0&&n>=0?r.columnReorder(t,n,e.originalEvent):o>=0&&i>=0?r.groupReorder(o,i,e.originalEvent):t>=0&&i>=0&&r.columnToGroup(t,i,e.originalEvent))},this.columnReorder=e,this.groupReorder=t,this.columnToGroup=n}e.prototype.getColumnIndex=function(e,t){if(!t||t.parentElement===this.groupPanelDivElement)return-1;var n=I(e,t);if(-1===n)return-1;for(var r=function(e){if(t.parentNode.children[e]===t)return{value:o.columns.findIndex((function(t){return t.index===n&&t.depth===e}))}},o=this,i=0;i=0?this.currentGroup>=0&&this.currentGroup!==this.startGroup:-1!==this.startColumn&&(this.currentGroup>=0?!0===this.columns[this.startColumn].groupable&&!0===this.groupable:!0===this.reorderable&&this.currentColumn>=0&&this.currentColumn!==this.startColumn&&!0===this.columns[this.startColumn].reorderable&&this.columns[this.currentColumn].parentIndex===this.columns[this.startColumn].parentIndex)},e.prototype.updateDragElementClue=function(e,t,n,r){if(this.dragElementClue){var o=this.startColumn>=0?t.children[this.columns[this.startColumn].index].innerText:t.innerText;this.dragElementClue.setState({visible:!0,top:e.pageY+10,left:e.pageX,innerText:o,status:r||!n?"k-i-cancel":"k-i-add"})}},e.prototype.updateDropElementClue=function(e,t,n,r){if(this.dropElementClue)if(!r&&n){var o=n.getBoundingClientRect(),i=o.left+e.pageX-e.clientX-6;(this.currentColumn>this.startColumn||this.currentGroup>this.startGroup&&-1!==this.startGroup)&&(i+=o.width);var a=o.top+e.pageY-e.clientY;this.dropElementClue.setState({visible:!0,top:a,left:i,height:this.currentColumn>=0?t.clientHeight:o.height})}else this.dropElementClue.setState({visible:!1})}}();var q=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),W=(function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={visible:!1,top:0,left:0,innerText:"",status:"k-i-cancel"},t}q(t,e),t.prototype.render=function(){return this.state.visible&&o.createElement("div",{className:"k-header k-drag-clue",style:{display:"block",position:"absolute",zIndex:2e4,padding:"8px 12px",top:this.state.top+"px",left:this.state.left+"px"}},o.createElement("span",{className:"k-icon k-drag-status "+this.state.status+" k-icon-with-modifier"},o.createElement("span",{className:"k-icon k-icon-modifier"})),this.state.innerText)}}(o.PureComponent),function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),Y=(function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={height:0,visible:!1,left:0,top:0},t}W(t,e),t.prototype.render=function(){return this.state.visible&&o.createElement("div",{className:"k-grouping-dropclue",style:{zIndex:1e4,display:"block",top:this.state.top+"px",left:this.state.left+"px",height:this.state.height+"px"}})}}(o.PureComponent),function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),$=function(){return($=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&o.createElement("ul",{className:"k-filter-lines"},i.filters.map((function(n,i){return o.createElement("li",{key:i,className:"k-filter-item"},Object(ye.c)(n)?o.createElement(t,{filter:n,fields:r,onChange:e.onChange,onRemove:e.onRemove,defaultGroupFilter:e.props.defaultGroupFilter}):o.createElement(me,{filter:n,fields:r,onChange:e.onChange,onRemove:e.onRemove}))}))))},t.propTypes={filter:a.object.isRequired,fields:a.array.isRequired,onChange:a.func.isRequired,onRemove:a.func.isRequired,defaultGroupFilter:a.object.isRequired},t}(o.Component);Object(c.h)(be);var we=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),xe=function(){return(xe=Object.assign||function(e){for(var t,n=1,r=arguments.length;n.")},value:a.object.isRequired,onChange:a.func.isRequired}}(o.Component),n(14)),_e=[{text:"columnMenu.filterContainsOperator",operator:"contains"},{text:"columnMenu.filterNotContainsOperator",operator:"doesnotcontain"},{text:"columnMenu.filterEqOperator",operator:"eq"},{text:"columnMenu.filterNotEqOperator",operator:"neq"},{text:"columnMenu.filterStartsWithOperator",operator:"startswith"},{text:"columnMenu.filterEndsWithOperator",operator:"endswith"},{text:"columnMenu.filterIsNullOperator",operator:"isnull"},{text:"columnMenu.filterIsNotNullOperator",operator:"isnotnull"},{text:"columnMenu.filterIsEmptyOperator",operator:"isempty"},{text:"columnMenu.filterIsNotEmptyOperator",operator:"isnotempty"}],Ce=[{text:"columnMenu.filterEqOperator",operator:"eq"},{text:"columnMenu.filterNotEqOperator",operator:"neq"},{text:"columnMenu.filterGteOperator",operator:"gte"},{text:"columnMenu.filterGtOperator",operator:"gt"},{text:"columnMenu.filterLteOperator",operator:"lte"},{text:"columnMenu.filterLtOperator",operator:"lt"},{text:"columnMenu.filterIsNullOperator",operator:"isnull"},{text:"columnMenu.filterIsNotNullOperator",operator:"isnotnull"}],Se=[{text:"columnMenu.filterEqOperator",operator:"eq"},{text:"columnMenu.filterNotEqOperator",operator:"neq"},{text:"columnMenu.filterAfterOrEqualOperator",operator:"gte"},{text:"columnMenu.filterAfterOperator",operator:"gt"},{text:"columnMenu.filterBeforeOperator",operator:"lt"},{text:"columnMenu.filterBeforeOrEqualOperator",operator:"lte"},{text:"columnMenu.filterIsNullOperator",operator:"isnull"},{text:"columnMenu.filterIsNotNullOperator",operator:"isnotnull"}],Ne=[{text:"columnMenu.filterIsTrue",operator:""}],Oe=(function(){function e(){}Object.defineProperty(e,"text",{get:function(){return _e.slice()},enumerable:!0,configurable:!0}),Object.defineProperty(e,"numeric",{get:function(){return Ce.slice()},enumerable:!0,configurable:!0}),Object.defineProperty(e,"date",{get:function(){return Se.slice()},enumerable:!0,configurable:!0}),Object.defineProperty(e,"boolean",{get:function(){return Ne.slice()},enumerable:!0,configurable:!0})}(),n(35));var Me=function(e){return null};function Te(e,t){var n=(e||"").split("."),r=t;return n.forEach((function(e){r=r?r[e]:void 0})),r}Me.displayName="KendoReactGridColumn",Me.defaultProps={filterable:!0,editable:!0,sortable:!0,resizable:!0,reorderable:!0,groupable:!0},Me.propTypes={field:a.string,title:a.string,editable:a.bool,sortable:a.oneOfType([a.bool,a.shape({allowUnsort:a.bool})]),cell:a.any,filterCell:a.any,filterable:a.bool,filter:a.oneOf(["text","numeric","boolean","date"]),editor:a.oneOf(["text","numeric","boolean","date"]),width:a.oneOfType([a.string,a.number]),minResizableWidth:a.number,headerCell:a.any,footerCell:a.any,headerSelectionValue:a.bool,format:a.string,headerClassName:a.string,className:a.string,reorderable:a.bool,resizable:a.bool,orderIndex:a.number,groupable:a.bool,columnMenu:a.any,locked:a.bool};var Ee,Pe=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),De=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._inputId=Object(s.l)(),t.handleOnChange=function(e){t.props.selectionChange&&t.props.selectionChange({syntheticEvent:e})},t}return Pe(t,e),t.prototype.render=function(){var e=Te(this.props.field,this.props.dataItem),t="groupHeader"!==this.props.rowType?o.createElement("td",{colSpan:this.props.colSpan,style:this.props.style,className:this.props.className},o.createElement("input",{checked:e,id:this._inputId,type:"checkbox",className:"k-checkbox",onChange:this.handleOnChange}),o.createElement("label",{className:"k-checkbox-label",htmlFor:this._inputId})):null;return this.props.render?this.props.render.call(void 0,t,this.props):t},t}(o.Component),Ae=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ie=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ae(t,e),t.prototype.render=function(){var e=this,t=null;if("groupFooter"===this.props.rowType)t=o.createElement("td",{className:"k-hierarchy-cell"});else if("groupHeader"!==this.props.rowType){var n=Te(this.props.field,this.props.dataItem),r=n?"k-icon k-minus":"k-icon k-plus";t=o.createElement("td",{className:"k-hierarchy-cell"},o.createElement("a",{onClick:function(t){t.preventDefault(),e.props.onChange&&e.props.onChange({dataItem:e.props.dataItem,syntheticEvent:t,field:e.props.field,value:!n})},className:r,href:"#",tabIndex:-1}))}return this.props.render?this.props.render.call(void 0,t,this.props):t},t}(o.Component),Le=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Re=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._inputId=Object(s.l)(),t.handleOnChange=function(e){if(t.props.onChange){var n="checkbox"===e.target.type?e.target.checked:e.target.value;t.props.onChange({dataItem:t.props.dataItem,field:t.props.field,syntheticEvent:e,value:n})}},t.inputChange=function(e){t.props.onChange&&t.props.onChange({dataItem:t.props.dataItem,field:t.props.field,syntheticEvent:e.syntheticEvent,value:e.value})},t}return Le(t,e),t.prototype.render=function(){var e=Te(this.props.field,this.props.dataItem),t=null,n=Object(s.d)("k-grid-edit-cell",this.props.className);switch(this.props.editor){case"numeric":t=o.createElement("td",{colSpan:this.props.colSpan,style:this.props.style,className:n},o.createElement(O.d,{width:"100%",value:void 0===e?null:e,onChange:this.inputChange}));break;case"date":t=o.createElement("td",{colSpan:this.props.colSpan,style:this.props.style,className:n},o.createElement(C.b,{width:"100%",value:e,onChange:this.inputChange}));break;case"boolean":t=o.createElement("td",{colSpan:this.props.colSpan,style:this.props.style,className:n},o.createElement("input",{checked:e||!1,id:this._inputId,type:"checkbox",className:"k-checkbox",onChange:this.handleOnChange}),o.createElement("label",{className:"k-checkbox-label",htmlFor:this._inputId}));break;default:t=o.createElement("td",{colSpan:this.props.colSpan,style:this.props.style,className:n},o.createElement("input",{style:{width:"100%"},className:"k-textbox",value:e||"",onChange:this.handleOnChange}))}return this.props.render?this.props.render.call(void 0,t,this.props):t},t}(o.Component),je=function(){return"undefined"!==typeof document?document:{}},Fe=function(){function e(){}return Object.defineProperty(e.prototype,"scrollbarWidth",{get:function(){var e=je();if(!this.scrollbar&&e&&e.createElement){var t=e.createElement("div");t.style.cssText="overflow:scroll;overflow-x:hidden;zoom:1;clear:both;display:block",t.innerHTML=" ",e.body.appendChild(t),this.scrollbar=t.offsetWidth-t.scrollWidth,e.body.removeChild(t)}return this.scrollbar},enumerable:!0,configurable:!0}),e}(),ze=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Be=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.divStyle={},t.element=null,t.headerWrap=null,t.table=null,t.syncScroll=!1,t.onScroll=function(e){if(t.syncScroll)t.syncScroll=!1;else{var n=e.target.scrollLeft,r=t.props.scrollableDataElement();r&&r.scrollLeft!==n&&(r.scrollLeft=n)}},t}return ze(t,e),t.prototype.componentDidMount=function(){var e=A(this.element);this.props.columnResize&&this.props.columnResize.setIsRtl(e);var t=(new Fe).scrollbarWidth,n=Math.max(0,t-1)+"px",r=e?0:n,o=e?n:0;this.divStyle={padding:"0 "+r+" 0 "+o},this.forceUpdate()},t.prototype.setScrollLeft=function(e){this.headerWrap&&this.headerWrap.scrollLeft!==e&&(this.syncScroll=!0,this.headerWrap.scrollLeft=e)},t.prototype.setWidth=function(e){this.table&&(this.table.style.width=e+"px")},t.prototype.render=function(){var e=this;return this.props.staticHeaders?o.createElement("div",{ref:function(t){e.element=t},className:"k-grid-header",style:this.divStyle,role:"presentation"},o.createElement("div",{ref:function(t){e.headerWrap=t},className:"k-grid-header-wrap",onScroll:this.onScroll,role:"presentation"},o.createElement("table",{ref:function(t){e.table=t},role:"presentation"},o.createElement("colgroup",{ref:function(t){e.props.columnResize.colGroupHeader=t},role:"presentation"},this.props.cols),o.createElement("thead",{role:"presentation"},this.props.headerRow,this.props.filterRow)))):o.createElement("thead",{className:"k-grid-header"},this.props.headerRow,this.props.filterRow)},t}(o.Component),Ue=function(){for(var e=[],t=0;t=0&&n.props.sort[s].dir||"none",u={field:i.field,onClick:a&&function(e){return n.cellClick(e,i)}||void 0,selectionChange:n.props.selectionChange,title:i.title,selectionValue:i.headerSelectionValue,render:n.props.cellRender,children:n.sortIcon(s),key:1},c=(i.kFirst?"k-first ":"")+n.cellClass(i.field,i.headerClassName,i.locked),p=null===i.columnMenu?null:i.columnMenu||n.props.columnMenu,d=void 0!==i.locked?{left:i.left,right:i.right,borderRightWidth:i.rightBorder?"1px":""}:{},h=e>=t?{"aria-sort":nt[l],role:"columnheader","aria-colindex":e-t+1,"aria-selected":!1}:{role:"presentation"};return o.createElement("th",et({key:r,colSpan:i.colSpan,rowSpan:i.rowSpan,className:c,style:d},h),[0===i.children.length&&p&&o.createElement(Je,{key:0,column:{field:i.field,filter:i.filter},sortable:a&&n.props.sortable,sort:n.props.sort,onSortChange:n.props.sortChange,filter:n.props.filter,filterable:n.props.filterable&&i.filterable,filterOperators:n.props.filterOperators,onFilterChange:n.props.filterChange,render:p}),i.headerCell&&o.createElement(i.headerCell,et({},u))||o.createElement(We,et({},u)),n.props.columnResize&&n.props.columnResize.resizable&&i.resizable&&o.createElement(Ve,{key:2,resize:function(e,t,r){return n.props.columnResize&&n.props.columnResize.dragHandler(e,i,t,r)}})])}))},n.cellClick=n.cellClick.bind(n),n}return Qe(t,e),t.prototype.cellClick=function(e,t){if(e.preventDefault(),this.props.sortChange){var n=Ue(this.props.sortable||!1,t.sortable||!1),r=n.allowUnsort,o=n.mode,i=(this.props.sort||[]).filter((function(e){return e.field===t.field}))[0],a=tt[r][i&&i.dir||""],s="single"===o?[]:(this.props.sort||[]).filter((function(e){return e.field!==t.field}));""!==a&&t.field&&s.push({field:t.field,dir:a}),this.props.sortChange(s,e)}},t.prototype.cellClass=function(e,t,n){var r="k-header "+(n?"k-grid-header-sticky":"")+(t?" "+t:"");return this.props.sort&&this.props.sort.filter((function(t){return t.field===e})).length>0&&(r+=" k-sorted"),r},t.prototype.sortIcon=function(e){return this.props.sort?e>=0&&[o.createElement("span",{key:1,className:"k-icon k-i-sort-"+this.props.sort[e].dir+"-sm"}),this.props.sort.length>1&&o.createElement("span",{key:2,className:"k-sort-order"},e+1)]:null},t.prototype.render=function(){var e=this;return this.props.columnsMap.map((function(t,n){return e.props.pressHandler&&o.createElement(Ge,{key:n,pressHandler:e.props.pressHandler,dragHandler:e.props.dragHandler,releaseHandler:e.props.releaseHandler},e.cells(t,e.props.columns.findIndex((function(e){return-1!==e.declarationIndex}))))||o.createElement("tr",{role:"row"},e.cells(t))}))},t}(o.Component),ot="grid.filterClearButton",it="grid.filterTitle",at=((Ee={})["grid.noRecords"]="No records available",Ee["grid.groupPanelEmpty"]="Drag a column header and drop it here to group by that column",Ee[ot]="Clear",Ee["grid.filterSubmitButton"]="Filter",Ee[it]="Filter",Ee["grid.sortAscending"]="Sort Ascending",Ee["grid.sortDescending"]="Sort Descending",Ee["grid.pagerItemsPerPage"]="items per page",Ee["grid.pagerInfo"]="{0} - {1} of {2} items",Ee["grid.pagerFirstPage"]="Go to the first page",Ee["grid.pagerPreviousPage"]="Go to the previous page",Ee["grid.pagerNextPage"]="Go to the next page",Ee["grid.pagerLastPage"]="Go to the last page",Ee["grid.pagerPage"]="Page",Ee["grid.pagerOf"]="of",Ee["grid.pagerTotalPages"]="{0}",Ee["grid.searchPlaceholder"]="Search",Ee["grid.filterCheckAll"]="Check All",Ee["grid.filterEqOperator"]="Is equal to",Ee["grid.filterNotEqOperator"]="Is not equal to",Ee["grid.filterIsNullOperator"]="Is null",Ee["grid.filterIsNotNullOperator"]="Is not null",Ee["grid.filterIsEmptyOperator"]="Is empty",Ee["grid.filterIsNotEmptyOperator"]="Is not empty",Ee["grid.filterStartsWithOperator"]="Starts with",Ee["grid.filterContainsOperator"]="Contains",Ee["grid.filterNotContainsOperator"]="Does not contain",Ee["grid.filterEndsWithOperator"]="Ends with",Ee["grid.filterGteOperator"]="Is greater than or equal to",Ee["grid.filterGtOperator"]="Is greater than",Ee["grid.filterLteOperator"]="Is less than or equal to",Ee["grid.filterLtOperator"]="Is less than",Ee["grid.filterIsTrue"]="Is true",Ee["grid.filterIsFalse"]="Is false",Ee["grid.filterBooleanAll"]="(All)",Ee["grid.filterAfterOrEqualOperator"]="Is after or equal to",Ee["grid.filterAfterOperator"]="Is after",Ee["grid.filterBeforeOperator"]="Is before",Ee["grid.filterBeforeOrEqualOperator"]="Is before or equal to",Ee["grid.filterAndLogic"]="And",Ee["grid.filterOrLogic"]="Or",Ee);function st(e){var t=e.replace(/^pager\.([a-z])/,(function(e,t){return"grid.pager"+t.toUpperCase()}));return{messageKey:t,defaultMessage:at[t]}}var lt=[{text:"grid.filterAndLogic",operator:"and"},{text:"grid.filterOrLogic",operator:"or"}],ut={text:[{text:"grid.filterContainsOperator",operator:"contains"},{text:"grid.filterNotContainsOperator",operator:"doesnotcontain"},{text:"grid.filterEqOperator",operator:"eq"},{text:"grid.filterNotEqOperator",operator:"neq"},{text:"grid.filterStartsWithOperator",operator:"startswith"},{text:"grid.filterEndsWithOperator",operator:"endswith"},{text:"grid.filterIsNullOperator",operator:"isnull"},{text:"grid.filterIsNotNullOperator",operator:"isnotnull"},{text:"grid.filterIsEmptyOperator",operator:"isempty"},{text:"grid.filterIsNotEmptyOperator",operator:"isnotempty"}],numeric:[{text:"grid.filterEqOperator",operator:"eq"},{text:"grid.filterNotEqOperator",operator:"neq"},{text:"grid.filterGteOperator",operator:"gte"},{text:"grid.filterGtOperator",operator:"gt"},{text:"grid.filterLteOperator",operator:"lte"},{text:"grid.filterLtOperator",operator:"lt"},{text:"grid.filterIsNullOperator",operator:"isnull"},{text:"grid.filterIsNotNullOperator",operator:"isnotnull"}],date:[{text:"grid.filterEqOperator",operator:"eq"},{text:"grid.filterNotEqOperator",operator:"neq"},{text:"grid.filterAfterOrEqualOperator",operator:"gte"},{text:"grid.filterAfterOperator",operator:"gt"},{text:"grid.filterBeforeOperator",operator:"lt"},{text:"grid.filterBeforeOrEqualOperator",operator:"lte"},{text:"grid.filterIsNullOperator",operator:"isnull"},{text:"grid.filterIsNotNullOperator",operator:"isnotnull"}],boolean:[{text:"grid.filterEqOperator",operator:"eq"}]},ct=function(e){return"isnull"===e||"isnotnull"===e||"isempty"===e||"isnotempty"===e},pt=function(e,t){return e.map((function(e){return{text:t.toLanguageString(e.text,at[e.text]),operator:e.operator}}))},dt=[{text:"grid.filterBooleanAll",operator:""},{text:"grid.filterIsTrue",operator:!0},{text:"grid.filterIsFalse",operator:!1}],ht={text:!1,numeric:!1,date:!1,boolean:!0},ft=function(e,t,n){var r=mt(n.operators),o=n.operator;switch(n.filterType){case"numeric":case"date":o&&!ct(o)||(o=r),null===e&&o===r&&(o="");break;case"text":o&&!ct(o)||(o=r),e||o!==r||(o="");break;default:return}n.onChange({value:e,operator:o,syntheticEvent:t})},mt=function(e,t){return t?e[t][0].operator:e[0].operator},yt=function(e){return e||"text"},vt=function(e,t){var n=e.target.value;t({value:n.operator,operator:""===n.operator?"":"eq",syntheticEvent:e.syntheticEvent})},gt=function(e,t,n){var r=t,o=e.target.value;e.target.state.opened&&(ct(o.operator)&&(r=null),n({value:r,operator:o.operator,syntheticEvent:e.syntheticEvent}))},bt=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),wt=function(e){function t(t){var n=e.call(this,t)||this;return n.renderOperatorEditor=function(){if("boolean"!==n.props.filterType){var e=n.props.operators.find((function(e){return e.operator===n.props.operator}))||null;return o.createElement(f.b,{value:e,onChange:n.operatorChange,className:"k-dropdown-operator",iconClassName:"k-i-filter k-icon",data:n.props.operators,textField:"text",popupSettings:{width:""}})}},n.inputChange=n.inputChange.bind(n),n.clear=n.clear.bind(n),n.operatorChange=n.operatorChange.bind(n),n.boolDropdownChange=n.boolDropdownChange.bind(n),n}return bt(t,e),t.prototype.render=function(){var e=Object(c.f)(this),t=o.createElement("div",{className:"k-filtercell"},o.createElement("div",{className:"k-filtercell-wrapper"},this.filterComponent(this.props.filterType,this.props.value,this.props.booleanValues),o.createElement("div",{className:"k-filtercell-operator"},this.renderOperatorEditor(),o.createElement("button",{className:null!==this.props.value&&""!==this.props.value||this.props.operator?"k-button k-button-icon k-clear-button-visible":"k-button k-button-icon",title:e.toLanguageString(ot,at[ot]),type:"button",onClick:this.clear},o.createElement("span",{className:"k-icon k-i-filter-clear"})))));return this.props.render?this.props.render.call(void 0,t,this.props):t},t.prototype.inputChange=function(e,t){ft(e,t,this.props)},t.prototype.operatorChange=function(e){gt(e,this.props.value,this.props.onChange)},t.prototype.boolDropdownChange=function(e){vt(e,this.props.onChange)},t.prototype.clear=function(e){e.preventDefault(),this.props.onChange({value:"",operator:"",syntheticEvent:e})},t.prototype.filterComponent=function(e,t,n){var r=this;switch(e){case"numeric":return o.createElement(O.d,{value:t,onChange:function(e){r.inputChange(e.value,e.syntheticEvent)}});case"date":return o.createElement(C.b,{value:t,onChange:function(e){r.inputChange(e.value,e.syntheticEvent)}});case"boolean":return o.createElement(f.b,{onChange:this.boolDropdownChange,value:n.find((function(e){return e.operator===(null===(n=t)||void 0===n?"":t);var n})),data:n,textField:"text"});default:return o.createElement("input",{className:"k-textbox",value:t||"",onChange:function(e){r.inputChange(e.target.value,e)}})}},t}(o.Component);Object(c.h)(wt);var xt=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),kt=function(){return(kt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&(n+=" k-sorted"),n},t.prototype.setFilter=function(e,t,n,r){if(this.props.filterChange){var o=[];if((""!==e&&null!==e||""!==t)&&o.push({field:n,operator:t,value:e}),this.props.filter&&this.props.filter.filters)(this.props.filter.filters||[]).forEach((function(e){var t=e;t&&t.field!==n&&o.push(t)}));this.props.filterChange(o.length>0?{logic:"and",filters:o}:null,r)}},t.prototype.render=function(){var e=this,t=Object(c.f)(this),n=this.props.filter&&this.props.filter.filters||[],r=function(e,t){void 0===t&&(t=null);var r=n.filter((function(t){return t.field===e}))[0];return r?r.value:t},i=function(e){var t=n.filter((function(t){return t.field===e}))[0];return t?t.operator:null},a=0,s=-1,l=this.props.columns.filter((function(e){return 0===e.children.length})).map((function(n){var l=yt(n.filter),u=n.filterable&&{render:e.props.cellRender,field:n.field,value:r(n.field,"text"===l?"":null),operator:i(n.field),operators:pt(e.props.filterOperators[l]||[],t),booleanValues:pt(dt,t),filterType:l,onChange:function(t){e.setFilter(t.value,t.operator,n.field,t.syntheticEvent)}},c=n.declarationIndex>=0?++s:--a,p=s>=0?{"aria-label":"Filter","aria-colindex":s+1}:{};return o.createElement("th",kt({key:c,style:void 0!==n.left&&{left:n.left,right:n.right,borderRightWidth:n.rightBorder?"1px":""}||{},className:e.headerCellClassName(n.field,n.locked)||void 0},p),u&&(n.filterCell?o.createElement(n.filterCell,kt({},u)):o.createElement(wt,kt({},u))))}));return o.createElement("tr",{className:"k-filter-row",role:"row"},l)},t}(o.Component);Object(c.h)(_t);var Ct=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),St=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onPress=function(e){var n=t.draggable&&t.draggable.element;n&&t.props.onPress&&t.props.onPress(e.event,n)},t.onDrag=function(e){var n=t.draggable&&t.draggable.element;n&&t.props.onDrag&&t.props.onDrag(e.event,n)},t.onRelease=function(e){t.draggable&&t.draggable.element&&t.props.onRelease&&t.props.onRelease(e.event)},t.sortChange=function(e){if(e.preventDefault(),t.props.onSortChange){var n="asc"===t.props.dir?"desc":"asc";t.props.onSortChange(e,n)}},t.groupRemove=function(e){e.preventDefault(),t.props.onRemove&&t.props.onRemove(e)},t}return Ct(t,e),t.prototype.render=function(){var e=this;return o.createElement(s.a,{onPress:this.onPress,onDrag:this.onDrag,onRelease:this.onRelease,ref:function(t){e.draggable=t}},o.createElement("div",{className:"k-indicator-container",style:{touchAction:"none"}},o.createElement("div",{className:"k-group-indicator"},o.createElement("a",{className:"k-link",href:"#",tabIndex:-1,onClick:this.sortChange},o.createElement("span",{className:"k-icon k-i-sort-"+this.props.dir+"-sm"}),this.props.title),o.createElement("a",{className:"k-button k-button-icon k-bare",tabIndex:-1,onClick:this.groupRemove},o.createElement("span",{className:"k-icon k-i-group-delete"})))))},t}(o.Component),Nt=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ot=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onGroupRemove=function(e,n){var r=t.props.group.slice();r.splice(n,1),t.props.groupChange(r,e)},t.onGroupSortChange=function(e,n,r,o){var i=Object.assign({},r,{dir:o}),a=t.props.group.slice();a.splice(n,1,i),t.props.groupChange(a,e)},t}return Nt(t,e),t.prototype.render=function(){var e=this,t=(this.props.group||[]).map((function(t,n){return o.createElement(St,{key:n,dir:t.dir||"asc",title:e.props.resolveTitle(t.field),onRemove:function(t){e.onGroupRemove(t,n)},onSortChange:function(r,o){e.onGroupSortChange(r,n,t,o)},onPress:e.props.pressHandler,onDrag:e.props.dragHandler,onRelease:e.props.releaseHandler})}));return o.createElement("div",{ref:this.props.refCallback,className:"k-grouping-header k-grouping-header-flex"},t,o.createElement("div",{className:"k-indicator-container"},!t.length&&Object(c.f)(this).toLanguageString("grid.groupPanelEmpty",at["grid.groupPanelEmpty"])))},t}(o.Component);Object(c.h)(Ot);var Mt=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Tt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.divStyle={},t.element=null,t.footerWrap=null,t.table=null,t}return Mt(t,e),t.prototype.componentDidMount=function(){this.setState({});var e=(new Fe).scrollbarWidth,t=A(this.element),n=e+"px",r=t?0:n,o=t?n:0;this.divStyle={padding:"0 "+r+" 0 "+o}},t.prototype.setScrollLeft=function(e){this.footerWrap&&(this.footerWrap.scrollLeft=e)},t.prototype.setWidth=function(e){this.table&&(this.table.style.width=e+"px")},t.prototype.render=function(){var e=this;return this.props.staticHeaders?o.createElement("div",{ref:function(t){e.element=t},className:"k-grid-footer",style:this.divStyle,role:"presentation"},o.createElement("div",{ref:function(t){e.footerWrap=t},className:"k-grid-footer-wrap",role:"presentation"},o.createElement("table",{ref:function(t){e.table=t},role:"presentation"},o.createElement("colgroup",{ref:function(t){e.props.columnResize.colGroupFooter=t},role:"presentation"},this.props.cols),o.createElement("tfoot",{role:"presentation"},this.props.row)))):o.createElement("tfoot",{className:"k-grid-footer"},this.props.row)},t}(o.Component),Et=function(){function e(e){this.containerHeight=0,this.topCacheCount=0,this.attendedSkip=0,this.propsSkip=0,this.total=0,this.scrollableVirtual=!1,this.realSkip=0,this.pageSize=0,this.heightContainer=null,this.prevScrollPos=0,this.tableTranslate=0,this.scrollSyncing=!1,e&&(this.topCacheCount=4,this.attendedSkip=-this.topCacheCount),this.scrollHandler=this.scrollHandler.bind(this)}return Object.defineProperty(e.prototype,"rowHeights",{get:function(){for(var e=[],t=this.tableBody&&this.tableBody.children||[],n=0,r=0;r-1?n+=t[r].scrollHeight:t[r].className.indexOf("k-detail-row")>-1?e[e.length-1].line+=t[r].scrollHeight:(e.push({line:t[r].scrollHeight,acc:n}),n=0);return e},enumerable:!0,configurable:!0}),e.prototype.changePage=function(e,t){this.attendedSkip=e-this.topCacheCount,this.PageChange({skip:Math.max(0,e-this.topCacheCount),take:this.pageSize},t)},e.prototype.translate=function(e){this.tableTranslate=e,this.scrollableVirtual&&this.table&&(this.table.style.transform="translateY("+e+"px)")},e.prototype.syncScroll=function(){if(this.scrollableVirtual&&this.container){this.syncTimeout=null;var e=this.container.scrollTop,t=this.containerHeight,n=this.rowHeights,r=(e-this.tableTranslate)/n[0].line,o=Math.floor(t*(this.propsSkip+r)/this.total);this.container.scrollTop!==(this.prevScrollPos=o)&&(this.scrollSyncing=!0,this.container.scrollTop=this.prevScrollPos=o),this.translate(this.tableTranslate+o-e)}},e.prototype.reset=function(){this.scrollSyncing=!0,this.container&&(this.container.scrollTop=0),this.translate(0)},e.prototype.localScrollUp=function(e){if(this.container){var t=this.rowHeights,n=this.container.scrollTop,r=this.tableTranslate,o=0,i=n-r;if(!(i>0)){for(;o0&&!(r+(t[t.length-1-o].line+t[t.length-1-o].acc)+i<=n);)r-=t[t.length-1-o].line+t[t.length-1-o].acc,o++;if(0===o&&0===this.topCacheCount&&this.attendedSkip>0&&(r=Math.max(r-t[0].line,0),o=1),this.propsSkip-o<=0&&r>n)return this.translate(0),this.changePage(0,e),void(this.container.scrollTop=0);r>n&&(r=n),r!==this.tableTranslate&&(this.translate(r),this.changePage(this.propsSkip-o,e))}}},e.prototype.localScrollDown=function(e){if(this.container){for(var t=this.rowHeights,n=this.container.scrollTop,r=this.tableTranslate,o=0;on);)r+=t[o].line+t[o].acc,o++;o>=t.length-this.topCacheCount&&this.propsSkip+o>=this.total?(this.translate(r),this.changePage(this.total-1,e)):r!==this.tableTranslate&&(this.translate(r),this.changePage(this.propsSkip+o,e))}},e.prototype.scrollNonStrict=function(e){var t=this.total*this.prevScrollPos/this.containerHeight,n=Math.floor(t);n>=this.total&&(n=this.total-1);var r=Math.min(t-n,1),o=0,i=n-this.propsSkip,a=this.rowHeights;i>=0&&i<=1?o=-(a[0].line+a[0].acc)*r:-1===i&&(o=-(a[a.length-1].line+a[a.length-1].acc)*r),this.translate(o+this.containerHeight*t/this.total),this.changePage(n,e)},e.prototype.scrollHandler=function(e){if(this.scrollableVirtual)if(!this.scrollSyncing&&this.container&&this.table){var t=this;clearTimeout(this.syncTimeout),this.syncTimeout=setTimeout((function(){t.syncScroll()}),200);var n=this.container.scrollTop,r=this.prevScrollPos;this.prevScrollPos=n,n-r<0&&n>this.tableTranslate-this.table.scrollHeight/10?this.localScrollUp(e):n-r>0&&n0&&i=0){var o=r.columns[n];(o.reorderable&&r.reorderable||o.groupable&&r.groupable)&&(r.startColumn=n)}},this.dragHandler=function(e,t){if(e.isTouch||e.originalEvent.preventDefault(),e.originalEvent.stopPropagation(),-1!==r.startColumn||-1!==r.startGroup){r.currentColumn=r.getColumnIndex(e,t),r.currentGroup=r.getGroupIndex(e),r.groupPanelDivElement&&r.startGroup>=0&&(r.currentGroup=Math.min(r.currentGroup,r.groupPanelDivElement.children.length-2));var n=!r.isValid();n&&(r.currentColumn=-1,r.currentGroup=-1);var o=r.currentColumn>=0?t.children[r.columns[r.currentColumn].index]:r.groupPanelDivElement&&r.groupPanelDivElement.children[r.currentGroup];r.updateDragElementClue(e,t,o,n),r.updateDropElementClue(e,t,o,n)}},this.releaseHandler=function(e){var t=r.startColumn,n=r.currentColumn,o=r.startGroup,i=r.currentGroup;r.dropElementClue&&r.dropElementClue.setState({visible:!1}),r.dragElementClue&&r.dragElementClue.setState({visible:!1});var a=r.isValid();r.startColumn=r.startGroup=r.currentColumn=r.currentGroup=-1,a&&(t>=0&&n>=0?r.columnReorder(t,n,e.originalEvent):o>=0&&i>=0?r.groupReorder(o,i,e.originalEvent):t>=0&&i>=0&&r.columnToGroup(t,i,e.originalEvent))},this.columnReorder=e,this.groupReorder=t,this.columnToGroup=n}return e.prototype.getColumnIndex=function(e,t){if(!t||t.parentElement===this.groupPanelDivElement)return-1;var n=I(e,t);if(-1===n)return-1;for(var r=function(e){if(t.parentNode.children[e]===t)return{value:o.columns.findIndex((function(t){return t.index===n&&t.depth===e}))}},o=this,i=0;i=0?this.currentGroup>=0&&this.currentGroup!==this.startGroup:-1!==this.startColumn&&(this.currentGroup>=0?!0===this.columns[this.startColumn].groupable&&!0===this.groupable:!0===this.reorderable&&this.currentColumn>=0&&this.currentColumn!==this.startColumn&&!0===this.columns[this.startColumn].reorderable&&this.columns[this.currentColumn].parentIndex===this.columns[this.startColumn].parentIndex)},e.prototype.updateDragElementClue=function(e,t,n,r){if(this.dragElementClue){var o=this.startColumn>=0?t.children[this.columns[this.startColumn].index].innerText:t.innerText;this.dragElementClue.setState({visible:!0,top:e.pageY+10,left:e.pageX,innerText:o,status:r||!n?"k-i-cancel":"k-i-add"})}},e.prototype.updateDropElementClue=function(e,t,n,r){if(this.dropElementClue)if(!r&&n){var o=n.getBoundingClientRect(),i=o.left+e.pageX-e.clientX-6;(this.currentColumn>this.startColumn||this.currentGroup>this.startGroup&&-1!==this.startGroup)&&(i+=o.width);var a=o.top+e.pageY-e.clientY;this.dropElementClue.setState({visible:!0,top:a,left:i,height:this.currentColumn>=0?t.clientHeight:o.height})}else this.dropElementClue.setState({visible:!1})},e}(),At=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),It=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={visible:!1,top:0,left:0,innerText:"",status:"k-i-cancel"},t}return At(t,e),t.prototype.render=function(){return this.state.visible&&o.createElement("div",{className:"k-header k-drag-clue",style:{display:"block",position:"absolute",zIndex:2e4,padding:"8px 12px",top:this.state.top+"px",left:this.state.left+"px"}},o.createElement("span",{className:"k-icon k-drag-status "+this.state.status+" k-icon-with-modifier"},o.createElement("span",{className:"k-icon k-icon-modifier"})),this.state.innerText)},t}(o.PureComponent),Lt=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Rt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={height:0,visible:!1,left:0,top:0},t}return Lt(t,e),t.prototype.render=function(){return this.state.visible&&o.createElement("div",{className:"k-grouping-dropclue",style:{zIndex:1e4,display:"block",top:this.state.top+"px",left:this.state.left+"px",height:this.state.height+"px"}})},t}(o.PureComponent),jt=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ft=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return jt(t,e),t.prototype.render=function(){var e=null;if("groupFooter"===this.props.rowType)e=o.createElement("td",{className:this.props.className});else if(void 0!==this.props.field&&"groupHeader"!==this.props.rowType){var t=Te(this.props.field,this.props.dataItem),n="";void 0!==t&&null!==t&&(n=this.props.format?Object(c.e)(this).format(this.props.format,t):t.toString()),e=o.createElement("td",{colSpan:this.props.colSpan,style:this.props.style,className:this.props.className,role:"gridcell","aria-colindex":(this.props.columnIndex||0)-(this.props.level||0)+1,"aria-selected":!1},n)}return this.props.render?this.props.render.call(void 0,e,this.props):e},t}(o.Component);Object(c.g)(Ft);var zt=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Bt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return zt(t,e),t.prototype.render=function(){var e=null,t=this.props,n=t.columnIndex,r=t.level,i=t.columnsCount,a=t.rowType,s=t.dataItem,l=t.field,u=t.onChange,c=t.expanded,p=t.render,d=l||"";return void 0===n||void 0===r||n0))}))).map(this.renderCell));var e},t}(o.Component),$t=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Xt=function(){return(Xt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=0&&-1===e.parentIndex})))},enumerable:!0,configurable:!0}),t.prototype.componentWillUnmount=function(){clearTimeout(this.forceUpdateTimeout),this.columnResize.columns=[],this.dragLogic.columns=[],this._columns=[]},t.prototype.render=function(){var e=this,t=this.props.total||0,n=[];Array.isArray(this.props.data)?n=this.props.data:this.props.data&&(n=this.props.data.data,t=t||this.props.data.total);var r=!0===this.props.groupable||"object"===typeof this.props.groupable&&!1!==this.props.groupable.enabled;this.columnResize.resizable=this.props.resizable||!1,this.dragLogic.reorderable=this.props.reorderable||!1,this.dragLogic.groupable=r,t!==this.vs.total&&(this.vs.reset(),this.vs=new Et(r||void 0===this.props.rowHeight||0===this.props.rowHeight)),this.vs.PageChange=this.pageChange,this.vs.realSkip=this.props.skip||0,this.vs.pageSize=(void 0!==this.props.take?this.props.take:this.props.pageSize)||0,this.vs.scrollableVirtual="virtual"===this.props.scrollable,this.vs.total=t,this.vs.propsSkip=(this.props.skip||0)+("virtual"===this.props.scrollable?this.vs.topCacheCount+(this.vs.attendedSkip-(this.props.skip||0)):0),void 0!==this.props.rowHeight&&this.props.rowHeight>0&&!r?this.vs.containerHeight=Math.min(1533915,this.props.rowHeight*(t||0)):this.vs.containerHeight=1533915;var a="object"===typeof this.props.groupable&&this.props.groupable.footer||"none",s=[],l=function e(t,n,r,o,i,a,s){void 0===s&&(s=0);for(var l=s,u=0;u=0;c--)if(!r[c].locked){if(!(u+2*l[c]=s.length-_},M=function(t){return t+(e.vs.propsSkip||0)},T=this.vs.propsSkip||0,E=s.length&&s.map((function(t,n){"data"===t.rowType&&T++;var r=T%2===0,i=function(t){var n=!1;return{row:e._columns.map((function(r,i){if(k[i])return null;var a=(r.className?r.className+" ":"")+(r.locked?"k-grid-content-sticky":""),s={colSpan:x[i],dataItem:t.dataItem,field:r.field,editor:r.editor,format:r.format,className:a,render:e.props.cellRender,onChange:e.itemChange,selectionChange:e.props.onSelectionChange?function(n){e.selectionChange(n,t.dataItem)}:void 0,columnIndex:i,columnsCount:e._columns.filter((function(e){return!e.children.length})).length,rowType:t.rowType,level:t.level,expanded:t.expanded,dataIndex:t.dataIndex,style:void 0!==r.left&&{left:r.left,right:r.right,borderRightWidth:r.rightBorder?"1px":""}||{}};if(r.cell)return o.createElement(r.cell,Xt({key:i},s));if(r.editable&&e.props.editField){var l=Te(e.props.editField,t.dataItem);if(!0===l||l===r.field)return n=!0,o.createElement(Re,Xt({key:i},s))}return o.createElement(Ft,Xt({key:i},s))})),isInEdit:n}}(t);return[o.createElement(Ht,{key:2*M(n),dataItem:t.dataItem,isAltRow:r,isInEdit:i.isInEdit,rowType:t.rowType,isHidden:O(n),onClick:function(n){return e.rowClick(n,t)},onDoubleClick:function(n){return e.rowDblClick(n,t)},selectedField:e.props.selectedField,rowHeight:e.props.rowHeight,render:e.props.rowRender},i.row),e.props.detail&&"data"===t.rowType&&t.expanded&&o.createElement("tr",{key:2*M(n)+1,className:r?"k-detail-row k-alt":"k-detail-row",style:{visibility:O(n)?"hidden":""}},e.props.group&&e.props.group.map((function(e,n){return o.createElement(Bt,{dataIndex:t.dataIndex,field:e.field,dataItem:t.dataItem,key:n,style:{}})})),e.props.expandField&&o.createElement("td",{className:"k-hierarchy-cell"}),o.createElement("td",{className:"k-detail-cell",colSpan:e._columns.filter((function(e){return!e.children.length})).length-(e.props.expandField?1:0)-(e.props.group?e.props.group.length:0)||1},o.createElement(e.props.detail,{dataItem:t.dataItem})))]}))||o.createElement("tr",{className:"k-grid-norecords"},o.createElement("td",{colSpan:this._columns.filter((function(e){return!e.children.length})).length},p.length?p:o.createElement(Kt,null))),P=this.props.pageable&&o.createElement(g,Xt({className:"k-grid-pager",onPageChange:this.pageChange,total:t,skip:this.vs.propsSkip||0,take:(void 0!==this.props.take?this.props.take:this.props.pageSize)||10,messagesMap:st},function(e){var t=e.buttonCount,n=void 0===t?10:t,r=e.info,o=void 0===r||r,i=e.type,a=void 0===i?"numeric":i,s=e.pageSizes,l=void 0===s?void 0:s,u=e.previousNext;return{buttonCount:n,info:o,pageSizes:!0===l?[5,10,20]:l||void 0,previousNext:void 0===u||u,type:a}}(!0===(N=this.props.pageable)?{}:N))),D=o.createElement("colgroup",{ref:function(t){e.columnResize.colGroupMain=t},role:"presentation"},d.map((function(t,n){return o.createElement("col",{key:n.toString(),className:(r=t.field,e.props.sort&&e.props.sort.filter((function(e){return e.field===r})).length>0?"k-sorted":void 0),width:void 0!==t.width?Math.floor(parseFloat(t.width.toString()))+"px":void 0});var r})));if("none"===this.props.scrollable)return o.createElement("div",{style:this.props.style,className:"k-widget k-grid "+(this.props.className||"")},c,h,o.createElement("table",{ref:function(t){e.vs.table=t,e.resetTableWidth()}},D,m,o.createElement("tbody",null,E),y),P,f);var A=this.props.style||{};return"virtual"===this.props.scrollable&&(A.height||(A=Object.assign({},A,{height:"450px"}))),o.createElement("div",{style:A,className:"k-widget k-grid"+("virtual"===this.props.scrollable?" k-grid-virtual ":" ")+(this.props.className||""),ref:function(){e.resetTableWidth()},role:"grid"},c,h,m,o.createElement("div",{className:"k-grid-container",role:"presentation"},o.createElement("div",{ref:function(t){e.vs.container=t},className:"k-grid-content k-virtual-content",onScroll:this.scrollHandler,role:"presentation"},o.createElement("div",{style:{position:"relative"},role:"presentation"},o.createElement("table",{className:"k-grid-table",ref:function(t){return e.vs.table=t},role:"presentation"},D,o.createElement("tbody",{ref:function(t){e.vs.tableBody=t},role:"presentation"},E))),o.createElement("div",{className:"k-height-container",role:"presentation"},o.createElement("div",{style:"virtual"===this.props.scrollable?{height:this.vs.containerHeight+"px"}:{}})))),y,P,f)},t.prototype.selectionChange=function(e,t){this.props.onSelectionChange&&this.props.onSelectionChange.call(void 0,Xt({},this.getArguments(e.syntheticEvent),{dataItem:t}))},t.prototype.raiseDataEvent=function(e,t,n,r){var o=this.props.onDataStateChange;e?e.call(void 0,Xt({},this.getArguments(r),t)):o&&o.call(void 0,Xt({},this.getArguments(r),{data:Xt({},this.getDataState(),n),dataState:Xt({},this.getDataState(),n)}))},t.prototype.columnReorder=function(e,t,n){var r,o=this,i=this._columns[e].depth,a=function(e){do{e++}while(ei);return e},s=this._columns.splice(e,a(e)-e);(r=this._columns).splice.apply(r,[e=0})).forEach((function(e,t){return e.orderIndex=t}));var l=this.columns;this.forceUpdate(),this.props.onColumnReorder&&this.props.onColumnReorder.call(void 0,{target:this,columns:l,nativeEvent:n})},t.prototype.groupReorder=function(e,t,n){if(void 0!==this.props.group){var r=this.props.group.slice();r.splice.apply(r,[t,0].concat(r.splice(e,1))),this.groupChange(r,n)}},t.prototype.columnToGroup=function(e,t,n){var r=this._columns[e].field;if(r){var o=(this.props.group||[]).slice();o.splice(t,0,{field:r}),this.groupChange(o,n)}},t.prototype.resetTableWidth=function(){var e=0;if(this.columnResize.colGroupMain){for(var t=this.columnResize.colGroupMain.children,n=0;n0){var i=r[0];if(t)for(var a=0;a=0&&(e.parentIndex+=o)})),this._columnsMap=function(e){for(var t=[[]],n=0,r=e.length-1;r>=0;r--)n=Math.max(n,e[r].depth),e[r].colSpan=e[r].colSpan||1,-1!==e[r].parentIndex&&(e[e[r].parentIndex].colSpan=(e[e[r].parentIndex].colSpan||0)+e[r].colSpan);var o=1;e.forEach((function(e,r){t[e.depth]=t[e.depth]||[];var i=!1;0===t[e.depth].length&&(o<=1?o=1+(e.children.length>0?0:n-e.depth):(o--,i=!0)),e.rowSpan=1+(e.children.length>0?0:n-e.depth),e.kFirst=i,e.index=t[e.depth].length,t[e.depth].push(r)}));var i=new Array(t.length).fill(0),a=0;e.forEach((function(e){if(e.locked)if(e.left=i[e.depth],a=e.width?parseFloat(e.width.toString()):0,0===e.children.length)for(var t=e.depth;t=0;l--){var u=e[l];if(u.locked){if(u.right=s[u.depth],a=u.width?parseFloat(u.width.toString()):0,0===u.children.length)for(var c=u.depth;c-1&&"asc"===t[e].dir)},un=function(e,t){return!!(t&&e>-1&&"desc"===t[e].dir)},cn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onAscClick=function(e){t.onSort(e,"asc"),t.props.onCloseMenu&&t.props.onCloseMenu()},t.onDescClick=function(e){t.onSort(e,"desc"),t.props.onCloseMenu&&t.props.onCloseMenu()},t}return on(t,e),t.prototype.onSort=function(e,t){if(e.preventDefault(),this.props.onSortChange){var n=this.props,r=n.column,o=n.sortable,i=n.sort,a=Ue(o||!1,!1),s=a.allowUnsort,l=a.mode,u=(i||[]).filter((function(e){return e.field===r.field}))[0],c=an[s][u&&u.dir||""][t],p="single"===l?[]:(this.props.sort||[]).filter((function(e){return e.field!==r.field}));""!==c&&r.field&&p.push({field:r.field,dir:c}),this.props.onSortChange(p,e)}},t.prototype.render=function(){var e=this.props,t=e.sort,n=e.column,r=sn(n.field,t),i=Object(c.f)(this);return o.createElement(rn,null,o.createElement(tn,{title:i.toLanguageString("grid.sortAscending",at["grid.sortAscending"]),iconClass:"k-i-sort-asc-sm",selected:ln(r,t),onClick:this.onAscClick}),o.createElement(tn,{title:i.toLanguageString("grid.sortDescending",at["grid.sortDescending"]),iconClass:"k-i-sort-desc-sm",selected:un(r,t),onClick:this.onDescClick}))},t.active=function(e,t){var n=sn(e,t);return un(n,t)||ln(n,t)},t}(o.Component);Object(c.g)(cn),Object(c.h)(cn);var pn=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),dn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return pn(t,e),t.prototype.render=function(){return o.createElement("div",{className:"k-columnmenu-item-content"},o.createElement(Oe.b,{style:{position:"relative",display:"block"}},this.props.show?this.props.children:null))},t}(o.Component),hn=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),fn=function(e){function t(t){var n=e.call(this,t)||this;return n.renderOperatorEditor=function(){if("boolean"!==n.props.filterType){var e=n.props.operators.find((function(e){return e.operator===n.props.operator}))||null;return o.createElement(f.b,{value:e,onChange:n.operatorChange,data:n.props.operators,textField:"text"})}},n.inputChange=n.inputChange.bind(n),n.operatorChange=n.operatorChange.bind(n),n.boolDropdownChange=n.boolDropdownChange.bind(n),n}return hn(t,e),t.prototype.render=function(){return o.createElement("div",null,this.renderOperatorEditor(),this.filterComponent(this.props.filterType,this.props.value,this.props.booleanValues))},t.prototype.inputChange=function(e,t){ft(e,t,this.props)},t.prototype.operatorChange=function(e){gt(e,this.props.value,this.props.onChange)},t.prototype.boolDropdownChange=function(e){vt(e,this.props.onChange)},t.prototype.filterComponent=function(e,t,n){var r=this;switch(e){case"numeric":return o.createElement(O.d,{value:t,onChange:function(e){r.inputChange(e.value,e.syntheticEvent)}});case"date":return o.createElement(C.b,{value:t,onChange:function(e){r.inputChange(e.value,e.syntheticEvent)}});case"boolean":return o.createElement(f.b,{onChange:this.boolDropdownChange,value:n.find((function(e){return e.operator===(null===(n=t)||void 0===n?"":t);var n})),data:n,textField:"text"});default:return o.createElement("input",{className:"k-textbox",value:t||"",onChange:function(e){r.inputChange(e.target.value,e)}})}},t}(o.Component),mn=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),yn=function(){return(yn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0){var s=n.filters.map((function(e){return e===o?i:e}));a=bn({},n,{filters:s})}else if(0===i.filters.length){(s=n.filters.filter((function(e){return e!==o}))).length&&(a=bn({},n,{filters:s}))}else a=bn({},n,{filters:n.filters.concat([i])});r.props.onFilterChange(a,e),r.props.onCloseMenu&&r.props.onCloseMenu()}},t.column&&t.column.field){var o=yt(t.column.filter),i=mt(t.filterOperators,o);1===(n=(n=xn(t.column.field,t.filter))?bn({},n,{filters:n.filters.map((function(e){return bn({},e)}))}):{logic:"and",filters:[{field:t.column.field,operator:i},{field:t.column.field,operator:i}]}).filters.filter((function(e){return e.field===t.column.field})).length&&n.filters.splice(1,0,{field:t.column.field,operator:i})}return r.state={expanded:t.expanded||!1,filterGroup:n},r}return gn(t,e),t.prototype.removeGroup=function(e,t){var n=t.filters.slice(),r=n.findIndex((function(t){return t===e}));return r>-1&&n.splice(r,1),bn({},t,{filters:n})},t.prototype.insertGroup=function(e,t){return bn({},t,{filters:[e].concat(t.filters)})},t.prototype.filterChange=function(e,t){var n=this.state.filterGroup.filters.map((function(n,r){return r===e?bn({},n,{value:t.value,operator:t.operator}):n}));this.setState({filterGroup:bn({},this.state.filterGroup,{filters:n})})},t.prototype.render=function(){var e=this.props,t=e.column,n=e.filterUI,r=e.hideSecondFilter,i=e.filterOperators;if(!t||!t.field)return o.createElement("div",null);var a=yt(t.filter),s=void 0!==r?r:ht[a],l=Object(c.f)(this),u=this.state.filterGroup.filters,p=pt(i[a],l),d=pt(dt,l),h={field:t.field,value:u[0].value,operator:u[0].operator,operators:p,booleanValues:d,onChange:this.firstFilterChange,filterType:a},f={field:t.field,value:u[1].value,operator:u[1].operator,operators:p,booleanValues:d,onChange:this.secondFilterChange,filterType:a},m=this.state.filterGroup.logic,y=pt(lt,l),v={value:y.find((function(e){return e.operator===(null===m?"":m)})),onChange:this.logicChange,data:y},g=n,b={firstFilterProps:h,secondFilterProps:f,logicData:v.data,logicValue:v.value,onLogicChange:v.onChange,hideSecondFilter:s},w=0!==this.currentFilterGroup().filters.length,x=this.isControlled()?this.props.expanded:this.state.expanded;return o.createElement(rn,null,o.createElement(tn,{title:l.toLanguageString(it,at[it]),iconClass:"k-i-filter",onClick:this.onFilterExpand}),o.createElement(dn,{show:!!x},o.createElement("div",{className:"kendo-grid-filter-menu-container"},o.createElement("form",{className:"k-filter-menu k-group k-reset k-state-border-up",onSubmit:this.submit,onReset:this.clear},o.createElement("div",{className:"k-filter-menu-container"},g?o.createElement(g,bn({},b)):o.createElement(vn,bn({},b)),o.createElement("div",{className:"k-columnmenu-actions"},o.createElement("button",{className:"k-button",type:"reset"},l.toLanguageString(ot,at[ot])),o.createElement("button",{className:"k-button k-primary",disabled:!w},l.toLanguageString("grid.filterSubmitButton",at["grid.filterSubmitButton"]))))))))},t.active=function(e,t){return!!xn(e,t)},t}(o.Component);Object(c.h)(kn);var _n=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Cn=function(){return(Cn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=0})))}return e},n.compositeFilterIndex=n.getFilterIndex(),n.state={expanded:t.expanded||!1,value:"",data:n.parseData(n.props.data,n.props.uniqueData)||[],dataFromProps:n.parseData(n.props.data,!1)||[],currentFilter:n.props.filter||{filters:[],logic:"and"}},n}return _n(t,e),t.prototype.componentDidUpdate=function(){var e,t,n=this.props.column.field||"",r=this.props.data.map((function(e){return e[n]}));e=r,t=this.state.dataFromProps,e.length===t.length&&e.every((function(e,n){return e===t[n]}))||this.setState({data:r,dataFromProps:r})},t.prototype.render=function(){var e=this,t=this.props.column;if(!t||!t.field)return o.createElement("div",null);var n=Object(c.f)(this),r=this.isControlled()?this.props.expanded:this.state.expanded,i=[];if(this.state.currentFilter){var a=this.state.currentFilter.filters.slice();this.compositeFilterIndex=a.findIndex((function(e){return e.filters.length>0&&e.filters[0].field===t.field})),-1!==this.compositeFilterIndex&&a[this.compositeFilterIndex].filters.length>0&&a[this.compositeFilterIndex].filters.forEach((function(t){t.field===e.props.column.field&&i.push(t.value)}))}var s=this.props.searchBox?o.createElement(this.props.searchBox,{value:this.state.value,onChange:this.handleSearchChange}):o.createElement("div",{className:"k-textbox k-space-right"},o.createElement("input",{placeholder:n.toLanguageString("grid.searchPlaceholder",at["grid.searchPlaceholder"]),value:this.state.value,onChange:this.handleSearchChange}),o.createElement("span",{className:"k-icon k-i-zoom"})),l=i.filter((function(e,t){return i.indexOf(e)===t}));return o.createElement(rn,null,o.createElement(tn,{title:n.toLanguageString(it,at[it]),iconClass:"k-i-filter",onClick:this.onFilterExpand}),o.createElement(dn,{show:!!r},o.createElement("div",{className:"kendo-grid-filter-menu-container"},o.createElement("form",{className:"k-filter-menu k-group k-reset k-state-border-up",onSubmit:this.submit,onReset:this.clear},o.createElement("div",{className:"k-filter-menu-container"},s,o.createElement("ul",{className:"k-reset k-multicheck-wrap"},o.createElement("li",{className:"k-item"},o.createElement(O.a,{label:n.toLanguageString("grid.filterCheckAll",at["grid.filterCheckAll"]),onChange:function(t){return e.handleCheckBoxChange(t,"all")},checked:this.isAllSelected()})),this.state.data.map((function(t,n){return o.createElement("li",{className:"k-item",key:n},o.createElement(O.a,{label:String(t),onChange:function(n){return e.handleCheckBoxChange(n,t)},checked:l.includes(t)}))}))),o.createElement("div",{className:"k-columnmenu-actions"},o.createElement("button",{className:"k-button",type:"reset"},n.toLanguageString(ot,at[ot])),o.createElement("button",{className:"k-button k-primary"},n.toLanguageString("grid.filterSubmitButton",at["grid.filterSubmitButton"]))))))))},t.defaultProps={uniqueData:!0},t}(o.Component);Object(c.h)(Sn);var Nn=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),On=(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Nn(t,e),t.prototype.render=function(){return null}}(o.Component),function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}());!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}On(t,e),t.prototype.render=function(){return o.createElement("div",{className:"k-header k-grid-toolbar"},this.props.children)},t.displayName="KendoReactGridToolbar"}(o.Component)},,function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(39),o=n(36),i=n(0),a=n.n(i),s=n(32),l=(n(1),n(22)),u=n(43),c=n(29);a.a.Component;var p=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"',229:"Q"},i="undefined"!=typeof navigator&&/Chrome\/(\d+)/.exec(navigator.userAgent),a="undefined"!=typeof navigator&&/Apple Computer/.test(navigator.vendor),s="undefined"!=typeof navigator&&/Gecko\/\d+/.test(navigator.userAgent),l="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),u="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),c=i&&(l||+i[1]<57)||s&&l,p=0;p<10;p++)r[48+p]=r[96+p]=String(p);for(p=1;p<=24;p++)r[p+111]="F"+p;for(p=65;p<=90;p++)r[p]=String.fromCharCode(p+32),o[p]=String.fromCharCode(p);for(var d in r)o.hasOwnProperty(d)||(o[d]=r[d]);var h=n(6),f="undefined"!=typeof navigator&&/Mac/.test(navigator.platform);function m(e){var t,n,r,o,i=e.split(/-(?!$)/),a=i[i.length-1];"Space"==a&&(a=" ");for(var s=0;s-1&&e<100&&l.setFullYear(l.getFullYear()-1900),Object(r.a)(l,o)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(38),o=function(e,t){var n=Object(r.a)(e);return 0===t&&23===n.getHours()&&n.setHours(n.getHours()+2),n}},function(e,t,n){e.exports=n(125)},function(e,t,n){e.exports=n(126)},,function(e,t,n){e.exports=n(127)},,function(e,t,n){"use strict";var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(e){if(null===e||void 0===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(o){return!1}}()?Object.assign:function(e,t){for(var n,s,l=a(e),u=1;u=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(e){s.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){s.headers[e]=r.merge(i)})),e.exports=s}).call(this,n(130))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o,i=n(6),a=n(47),s=n(5),l=n(9),u=n(54);if("undefined"!=typeof WeakMap){var c=new WeakMap;r=function(e){return c.get(e)},o=function(e,t){return c.set(e,t),t}}else{var p=[],d=0;r=function(e){for(var t=0;tr&&(i+=u.attrs.colspan)}for(var c=0;c1&&(n=!0)}-1==t?t=i:t!=i&&(t=Math.max(t,i))}return t}(e),n=e.childCount,r=[],o=0,i=null,a=[],s=0,l=t*n;s=n){(i||(i=[])).push({type:"overlong_rowspan",pos:c,n:g-w});break}for(var x=o+w*t,k=0;k0;t--)if("row"==e.node(t).type.spec.tableRole)return e.node(0).resolve(e.before(t+1));return null}function g(e){for(var t=e.selection.$head,n=t.depth;n>0;n--)if("row"==t.node(n).type.spec.tableRole)return!0;return!1}function b(e){var t=e.selection;return t.$anchorCell?t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell:t.node&&"cell"==t.node.type.spec.tableRole?t.$anchor:v(t.$head)||function(e){for(var t=e.nodeAfter,n=e.pos;t;t=t.firstChild,n++){var r=t.type.spec.tableRole;if("cell"==r||"header_cell"==r)return e.doc.resolve(n)}for(var o=e.nodeBefore,i=e.pos;o;o=o.lastChild,i--){var a=o.type.spec.tableRole;if("cell"==a||"header_cell"==a)return e.doc.resolve(i-o.nodeSize)}}(t.$head)}function w(e){return"row"==e.parent.type.spec.tableRole&&e.nodeAfter}function x(e){return e.node(0).resolve(e.pos+e.nodeAfter.nodeSize)}function k(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function _(e,t,n){var r=e.start(-1),o=f.get(e.node(-1)).nextCell(e.pos-r,t,n);return null==o?null:e.node(0).resolve(r+o)}function C(e,t,n){var r={};for(var o in e)r[o]=e[o];return r[t]=n,r}function S(e,t,n){void 0===n&&(n=1);var r=C(e,"colspan",e.colspan-n);return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(t,n),r.colwidth.some((function(e){return e>0}))||(r.colwidth=null)),r}function N(e,t,n){void 0===n&&(n=1);var r=C(e,"colspan",e.colspan+n);if(r.colwidth){r.colwidth=r.colwidth.slice();for(var o=0;o0||y>0){var v=h.attrs;m>0&&(v=S(v,0,m)),y>0&&(v=S(v,v.colspan-y,y)),h=d.leftr.bottom){var g=C(h.attrs,"rowspan",Math.min(d.bottom,r.bottom)-Math.max(d.top,r.top));h=d.top0)return!1;var n=e+this.$anchorCell.nodeAfter.attrs.rowspan,r=t+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(n,r)==this.$headCell.node(-1).childCount},t.colSelection=function(e,n){void 0===n&&(n=e);var r=f.get(e.node(-1)),o=e.start(-1),i=r.findCell(e.pos-o),a=r.findCell(n.pos-o),s=e.node(0);return i.top<=a.top?(i.top>0&&(e=s.resolve(o+r.map[i.left])),a.bottom0&&(n=s.resolve(o+r.map[a.left])),i.bottom0)return!1;var o=n+this.$anchorCell.nodeAfter.attrs.colspan,i=r+this.$headCell.nodeAfter.attrs.colspan;return Math.max(o,i)==e.width},t.prototype.eq=function(e){return e instanceof t&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos},t.rowSelection=function(e,n){void 0===n&&(n=e);var r=f.get(e.node(-1)),o=e.start(-1),i=r.findCell(e.pos-o),a=r.findCell(n.pos-o),s=e.node(0);return i.left<=a.left?(i.left>0&&(e=s.resolve(o+r.map[i.top*r.width])),a.right0&&(n=s.resolve(o+r.map[a.top*r.width])),i.right0&&r>0||"table"==t.firstChild.type.spec.tableRole);)n--,r--,t=t.firstChild.content;var o=t.firstChild,i=o.type.spec.tableRole,a=o.type.schema,l=[];if("row"==i)for(var u=0;u=0;i--)for(var a=o.child(i).attrs,l=a.rowspan,u=a.colspan,c=r;c=t.length&&t.push(s.Fragment.empty),n[h]t&&(f=f.type.create(S(f.attrs,f.attrs.colspan,d+f.attrs.colspan-t),f.content)),p.push(f),d+=f.attrs.colspan;for(var m=1;mn&&(k=k.type.create(C(k.attrs,"rowspan",n-k.attrs.rowspan),k.content)),b.push(k)}y.push(s.Fragment.from(b))}i=y,o=n}return{width:r,height:o,rows:i}}function R(e,t,n,r,o,i,a,s){if(0==a||a==t.height)return!1;for(var l=!1,u=o;ut.width)for(var p=0,d=0;pt.height){for(var v=[],g=0,b=(t.height-1)*t.width;g=t.width)&&n.nodeAt(t.map[b+g]).type==c.header_cell;v.push(w?u||(u=c.header_cell.createAndFill()):l||(l=c.cell.createAndFill()))}for(var x=c.row.create(null,s.Fragment.from(v)),k=[],_=t.height;_=0;o--){var a=r.node(o);if((n<0?r.index(o):r.indexAfter(o))!=(n<0?0:a.childCount))return null;if("cell"==a.type.spec.tableRole||"header_cell"==a.type.spec.tableRole){var s=r.before(o),l="vert"==t?n>0?"down":"up":n>0?"right":"left";return e.endOfTextblock(l)?s:null}}return null}function W(e,t){for(;t&&t!=e.dom;t=t.parentNode)if("TD"==t.nodeName||"TH"==t.nodeName)return t}function Y(e,t){var n=e.posAtCoords({left:t.clientX,top:t.clientY});return n&&n?v(e.state.doc.resolve(n.pos)):null}var $=new i.PluginKey("fix-tables");function X(e,t){var n,r=function(t,r){"table"==t.type.spec.tableRole&&(n=function(e,t,n,r){var o=f.get(t);if(!o.problems)return r;r||(r=e.tr);for(var i,a,s=[],l=0;l0){var k="cell";b.firstChild&&(k=b.firstChild.type.spec.tableRole);for(var _=[],N=0;N0?-1:0;(function(e,t,n){for(var r=D(t.type.schema).header_cell,o=0;o0&&n0&&r.map[l-1]==u||n0?-1:0;(function(e,t,n){for(var r=D(t.type.schema).header_cell,o=0;o0&&n0&&d==r.map[p-r.width]){var h=o.nodeAt(d).attrs;e.setNodeMarkup(e.mapping.slice(u).map(d+i),null,C(h,"rowspan",h.rowspan-1)),c+=h.colspan-1}else if(n0;t--){var n=e.node(t).type.spec.tableRole;if("cell"===n||"header_cell"===n)return e.node(t)}return null}(i.$from)))return!1;o=v(i.$from).pos}if(1==r.attrs.colspan&&1==r.attrs.rowspan)return!1;if(n){var a=r.attrs,s=[],l=a.colwidth;a.rowspan>1&&(a=C(a,"rowspan",1)),a.colspan>1&&(a=C(a,"colspan",1));for(var u,c=J(t),p=t.tr,d=0;d-1&&e.docChanged){var r=e.mapping.map(t.activeHandle,-1);w(e.doc.resolve(r))||(r=null),t=new he(r,t.dragging)}return t},t.tableEditing=function(e){void 0===e&&(e={});var t=e.allowTableNodeSelection;return void 0===t&&(t=!1),new i.Plugin({key:y,state:{init:function(){return null},apply:function(e,t){var n=e.getMeta(y);if(null!=n)return-1==n?null:n;if(null==t||!e.docChanged)return t;var r=e.mapping.mapResult(t),o=r.deleted,i=r.pos;return o?null:i}},props:{decorations:T,handleDOMEvents:{mousedown:K},createSelectionBetween:function(e){if(null!=y.getState(e.state))return e.state.selection},handleTripleClick:Z,handleKeyDown:z,handlePaste:G},appendTransaction:function(e,n,r){return function(e,t,n){var r,o,a=(t||e).selection,s=(t||e).doc;if(a instanceof i.NodeSelection&&(o=a.node.type.spec.tableRole)){if("cell"==o||"header_cell"==o)r=O.create(s,a.from);else if("row"==o){var l=s.resolve(a.from+1);r=O.rowSelection(l,l)}else if(!n){var u=f.get(a.node),c=a.from+1,p=c+u.map[u.width*u.height-1];r=O.create(s,c+1,p)}}else a instanceof i.TextSelection&&function(e){var t=e.$from,n=e.$to;if(t.pos==n.pos||t.pos=0&&!(t.after(i+1)=0&&!(n.before(a+1)>n.start(a));a--,o--);return r==o&&/row|table/.test(t.node(i).type.spec.tableRole)}(a)?r=i.TextSelection.create(s,a.from):a instanceof i.TextSelection&&function(e){for(var t,n,r=e.$from,o=e.$to,i=r.depth;i>0;i--){var a=r.node(i);if("cell"===a.type.spec.tableRole||"header_cell"===a.type.spec.tableRole){t=a;break}}for(var s=o.depth;s>0;s--){var l=o.node(s);if("cell"===l.type.spec.tableRole||"header_cell"===l.type.spec.tableRole){n=l;break}}return t!==n&&0===o.parentOffset}(a)&&(r=i.TextSelection.create(s,a.$from.start(),a.$from.end()));return r&&(t||(t=e.tr)).setSelection(r),t}(r,X(r,n),t)}})},t.fixTables=X,t.handlePaste=G,t.fixTablesKey=$,t.tableEditingKey=y,t.cellAround=v,t.isInTable=g,t.selectionCell=b,t.moveCellForward=x,t.inSameTable=k,t.findCell=function(e){return f.get(e.node(-1)).findCell(e.pos-e.start(-1))},t.colCount=function(e){return f.get(e.node(-1)).colCount(e.pos-e.start(-1))},t.nextCell=_,t.tableNodes=function(e){var t=e.cellAttributes||{},n={colspan:{default:1},rowspan:{default:1},colwidth:{default:null}};for(var r in t)n[r]={default:t[r].default};return{table:{content:"table_row+",tableRole:"table",isolating:!0,group:e.tableGroup,parseDOM:[{tag:"table"}],toDOM:function(){return["table",["tbody",0]]}},table_row:{content:"(table_cell | table_header)*",tableRole:"row",parseDOM:[{tag:"tr"}],toDOM:function(){return["tr",0]}},table_cell:{content:e.cellContent,attrs:n,tableRole:"cell",isolating:!0,parseDOM:[{tag:"td",getAttrs:function(e){return E(e,t)}}],toDOM:function(e){return["td",P(e,t),0]}},table_header:{content:e.cellContent,attrs:n,tableRole:"header_cell",isolating:!0,parseDOM:[{tag:"th",getAttrs:function(e){return E(e,t)}}],toDOM:function(e){return["th",P(e,t),0]}}}},t.CellSelection=O,t.TableMap=f,t.columnResizing=function(e){void 0===e&&(e={});var t=e.handleWidth;void 0===t&&(t=5);var n=e.cellMinWidth;void 0===n&&(n=25);var r=e.View;void 0===r&&(r=ce);var o=e.lastColumnResizable;return void 0===o&&(o=!0),new i.Plugin({key:de,state:{init:function(e,t){return this.spec.props.nodeViews[D(t.schema).table.name]=function(e,t){return new r(e,n,t)},new he(-1,!1)},apply:function(e,t){return t.apply(e)}},props:{attributes:function(e){return de.getState(e).activeHandle>-1?{class:"resize-cursor"}:null},handleDOMEvents:{mousemove:function(e,n){!function(e,t,n,r,o){var i=de.getState(e.state);if(!i.dragging){var a=function(e){for(;e&&"TD"!=e.nodeName&&"TH"!=e.nodeName;)e=e.classList.contains("ProseMirror")?null:e.parentNode;return e}(t.target),s=-1;if(a){var l=a.getBoundingClientRect(),u=l.left,c=l.right;t.clientX-u<=n?s=fe(e,t,"left"):c-t.clientX<=n&&(s=fe(e,t,"right"))}if(s!=i.activeHandle){if(!o&&-1!==s){var p=e.state.doc.resolve(s),d=p.node(-1),h=f.get(d),m=p.start(-1);if(h.colCount(p.pos-m)+p.nodeAfter.attrs.colspan-1==h.width-1)return}ye(e,s)}}}(e,n,t,0,o)},mouseleave:function(e){!function(e){var t=de.getState(e.state);t.activeHandle>-1&&!t.dragging&&ye(e,-1)}(e)},mousedown:function(e,t){!function(e,t,n){var r=de.getState(e.state);if(-1==r.activeHandle||r.dragging)return!1;var o=e.state.doc.nodeAt(r.activeHandle),i=function(e,t,n){var r=n.colspan,o=n.colwidth,i=o&&o[o.length-1];if(i)return i;var a=e.domAtPos(t),s=a.node.childNodes[a.offset].offsetWidth,l=r;if(o)for(var u=0;u-1)return function(e,t){for(var n=[],r=e.doc.resolve(t),o=r.node(-1),i=f.get(o),s=r.start(-1),l=i.colCount(r.pos-s)+r.nodeAfter.attrs.colspan,u=0;u0&&o[a]==o[a-1]||t.right0&&o[i]==o[i-n]||t.bottom=0;r--){var i=e.node(-1).child(r);if(i.childCount)return o-1-i.lastChild.nodeSize;o-=i.nodeSize}}else{if(e.index()0;r--){if("table"==n.node(r).type.spec.tableRole)return t&&t(e.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0}return!1}},function(e,t,n){"use strict";n.r(t),n.d(t,"InputRule",(function(){return i})),n.d(t,"closeDoubleQuote",(function(){return d})),n.d(t,"closeSingleQuote",(function(){return f})),n.d(t,"ellipsis",(function(){return c})),n.d(t,"emDash",(function(){return u})),n.d(t,"inputRules",(function(){return a})),n.d(t,"openDoubleQuote",(function(){return p})),n.d(t,"openSingleQuote",(function(){return h})),n.d(t,"smartQuotes",(function(){return m})),n.d(t,"textblockTypeInputRule",(function(){return v})),n.d(t,"undoInputRule",(function(){return l})),n.d(t,"wrappingInputRule",(function(){return y}));var r=n(6),o=n(9),i=function(e,t){var n;this.match=e,this.handler="string"==typeof t?(n=t,function(e,t,r,o){var i=n;if(t[1]){var a=t[0].lastIndexOf(t[1]);i+=t[0].slice(a+t[1].length);var s=(r+=a)-o;s>0&&(i=t[0].slice(a-s,a)+i,r=o)}return e.tr.insertText(i,r,o)}):t};function a(e){var t=e.rules,n=new r.Plugin({state:{init:function(){return null},apply:function(e,t){var n=e.getMeta(this);return n||(e.selectionSet||e.docChanged?null:t)}},props:{handleTextInput:function(e,r,o,i){return s(e,r,o,i,t,n)},handleDOMEvents:{compositionend:function(e){setTimeout((function(){var r=e.state.selection.$cursor;r&&s(e,r.pos,r.pos,"",t,n)}))}}},isInputRules:!0});return n}function s(e,t,n,r,o,i){if(e.composing)return!1;var a=e.state,s=a.doc.resolve(t);if(s.parent.type.spec.code)return!1;for(var l=s.parent.textBetween(Math.max(0,s.parentOffset-500),s.parentOffset,null,"\ufffc")+r,u=0;u=0;l--)a.step(s.steps[l].invert(s.docs[l]));var u=a.doc.resolve(i.from).marks();t(a.replaceWith(i.from,i.to,e.schema.text(i.text,u)))}return!0}}return!1}var u=new i(/--$/,"\u2014"),c=new i(/\.\.\.$/,"\u2026"),p=new i(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,"\u201c"),d=new i(/"$/,"\u201d"),h=new i(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,"\u2018"),f=new i(/'$/,"\u2019"),m=[p,d,h,f];function y(e,t,n,r){return new i(e,(function(e,i,a,s){var l=n instanceof Function?n(i):n,u=e.tr.delete(a,s),c=u.doc.resolve(a).blockRange(),p=c&&Object(o.findWrapping)(c,t,l);if(!p)return null;u.wrap(c,p);var d=u.doc.resolve(a-1).nodeBefore;return d&&d.type==t&&Object(o.canJoin)(u.doc,a-1)&&(!r||r(i,d))&&u.join(a-1),u}))}function v(e,t,n){return new i(e,(function(e,r,o,i){var a=e.doc.resolve(o),s=n instanceof Function?n(r):n;return a.node(-1).canReplaceWith(a.index(-1),a.indexAfter(-1),t)?e.tr.delete(o,i).setBlockType(o,o,t,s):null}))}},function(e,t){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}},function(e,t,n){var r=n(146);e.exports=h,e.exports.parse=i,e.exports.compile=function(e,t){return s(i(e,t),t)},e.exports.tokensToFunction=s,e.exports.tokensToRegExp=d;var o=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function i(e,t){for(var n,r=[],i=0,a=0,s="",c=t&&t.delimiter||"/";null!=(n=o.exec(e));){var p=n[0],d=n[1],h=n.index;if(s+=e.slice(a,h),a=h+p.length,d)s+=d[1];else{var f=e[a],m=n[2],y=n[3],v=n[4],g=n[5],b=n[6],w=n[7];s&&(r.push(s),s="");var x=null!=m&&null!=f&&f!==m,k="+"===b||"*"===b,_="?"===b||"*"===b,C=n[2]||c,S=v||g;r.push({name:y||i++,prefix:m||"",delimiter:C,optional:_,repeat:k,partial:x,asterisk:!!w,pattern:S?u(S):w?".*":"[^"+l(C)+"]+?"})}}return a=0||(o[n]=e[n]);return o}(t,["children"]);if(delete r.in,delete r.mountOnEnter,delete r.unmountOnExit,delete r.appear,delete r.enter,delete r.exit,delete r.timeout,delete r.addEndListener,delete r.onEnter,delete r.onEntering,delete r.onEntered,delete r.onExit,delete r.onExiting,delete r.onExited,"function"===typeof n)return n(e,r);var i=o.default.Children.only(n);return o.default.cloneElement(i,r)},r}(o.default.Component);function u(){}l.contextTypes={transitionGroup:r.object},l.childContextTypes={transitionGroup:function(){}},l.propTypes={},l.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:u,onEntering:u,onEntered:u,onExit:u,onExiting:u,onExited:u},l.UNMOUNTED=0,l.EXITED=1,l.ENTERING=2,l.ENTERED=3,l.EXITING=4;var c=(0,a.polyfill)(l);t.default=c},function(e,t,n){"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!==e&&void 0!==e&&this.setState(e)}function o(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!==n&&void 0!==n?n:null}.bind(this))}function i(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function a(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!==typeof e.getDerivedStateFromProps&&"function"!==typeof t.getSnapshotBeforeUpdate)return e;var n=null,a=null,s=null;if("function"===typeof t.componentWillMount?n="componentWillMount":"function"===typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"===typeof t.componentWillReceiveProps?a="componentWillReceiveProps":"function"===typeof t.UNSAFE_componentWillReceiveProps&&(a="UNSAFE_componentWillReceiveProps"),"function"===typeof t.componentWillUpdate?s="componentWillUpdate":"function"===typeof t.UNSAFE_componentWillUpdate&&(s="UNSAFE_componentWillUpdate"),null!==n||null!==a||null!==s){var l=e.displayName||e.name,u="function"===typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+l+" uses "+u+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==a?"\n "+a:"")+(null!==s?"\n "+s:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"===typeof e.getDerivedStateFromProps&&(t.componentWillMount=r,t.componentWillReceiveProps=o),"function"===typeof t.getSnapshotBeforeUpdate){if("function"!==typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=i;var c=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;c.call(this,e,t,r)}}return e}n.r(t),n.d(t,"polyfill",(function(){return a})),r.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0},function(e,t,n){"use strict";t.__esModule=!0,t.classNamesShape=t.timeoutsShape=void 0;var r;(r=n(1))&&r.__esModule;t.timeoutsShape=null;t.classNamesShape=null},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=s(n(1)),o=s(n(0)),i=n(73),a=n(124);function s(e){return e&&e.__esModule?e:{default:e}}function l(){return(l=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,["component","childFactory"]),i=c(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?i:o.default.createElement(t,r,i)},r}(o.default.Component);p.childContextTypes={transitionGroup:r.default.object.isRequired},p.propTypes={},p.defaultProps={component:"div",childFactory:function(e){return e}};var d=(0,i.polyfill)(p);t.default=d,e.exports=t.default},function(e,t,n){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r=252?6:s>=248?5:s>=240?4:s>=224?3:s>=192?2:1;function l(e,t){if(t<65534&&(e.subarray&&i||!e.subarray&&o))return String.fromCharCode.apply(null,r.shrinkBuf(e,t));for(var n="",a=0;a>>6,t[a++]=128|63&n):n<65536?(t[a++]=224|n>>>12,t[a++]=128|n>>>6&63,t[a++]=128|63&n):(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63,t[a++]=128|n>>>6&63,t[a++]=128|63&n);return t},n.buf2binstring=function(e){return l(e,e.length)},n.binstring2buf=function(e){for(var t=new r.Buf8(e.length),n=0,o=t.length;n4)u[r++]=65533,n+=i-1;else{for(o&=2===i?31:3===i?15:7;i>1&&n1?u[r++]=65533:o<65536?u[r++]=o:(o-=65536,u[r++]=55296|o>>10&1023,u[r++]=56320|1023&o)}return l(u,r)},n.utf8border=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;n>=0&&128===(192&e[n]);)n--;return n<0||0===n?t:n+a[e[n]]>t?n:t}},{"./common":1}],3:[function(e,t,n){"use strict";t.exports=function(e,t,n,r){for(var o=65535&e|0,i=e>>>16&65535|0,a=0;0!==n;){n-=a=n>2e3?2e3:n;do{i=i+(o=o+t[r++]|0)|0}while(--a);o%=65521,i%=65521}return o|i<<16|0}},{}],4:[function(e,t,n){"use strict";var r=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t,n,o){var i=r,a=o+n;e^=-1;for(var s=o;s>>8^i[255&(e^t[s])];return-1^e}},{}],5:[function(e,t,n){"use strict";var r,o=e("../utils/common"),i=e("./trees"),a=e("./adler32"),s=e("./crc32"),l=e("./messages");function u(e,t){return e.msg=l[t],t}function c(e){return(e<<1)-(e>4?9:0)}function p(e){for(var t=e.length;--t>=0;)e[t]=0}function d(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(o.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))}function h(e,t){i._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,d(e.strm)}function f(e,t){e.pending_buf[e.pending++]=t}function m(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function y(e,t,n,r){var i=e.avail_in;return i>r&&(i=r),0===i?0:(e.avail_in-=i,o.arraySet(t,e.input,e.next_in,i,n),1===e.state.wrap?e.adler=a(e.adler,t,i,n):2===e.state.wrap&&(e.adler=s(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)}function v(e,t){var n,r,o=e.max_chain_length,i=e.strstart,a=e.prev_length,s=e.nice_match,l=e.strstart>e.w_size-262?e.strstart-(e.w_size-262):0,u=e.window,c=e.w_mask,p=e.prev,d=e.strstart+258,h=u[i+a-1],f=u[i+a];e.prev_length>=e.good_match&&(o>>=2),s>e.lookahead&&(s=e.lookahead);do{if(u[(n=t)+a]===f&&u[n+a-1]===h&&u[n]===u[i]&&u[++n]===u[i+1]){i+=2,n++;do{}while(u[++i]===u[++n]&&u[++i]===u[++n]&&u[++i]===u[++n]&&u[++i]===u[++n]&&u[++i]===u[++n]&&u[++i]===u[++n]&&u[++i]===u[++n]&&u[++i]===u[++n]&&ia){if(e.match_start=t,a=r,r>=s)break;h=u[i+a-1],f=u[i+a]}}}while((t=p[t&c])>l&&0!==--o);return a<=e.lookahead?a:e.lookahead}function g(e){var t,n,r,i,a,s=e.w_size;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=s+(s-262)){o.arraySet(e.window,e.window,s,s,0),e.match_start-=s,e.strstart-=s,e.block_start-=s,t=n=e.hash_size;do{r=e.head[--t],e.head[t]=r>=s?r-s:0}while(--n);t=n=s;do{r=e.prev[--t],e.prev[t]=r>=s?r-s:0}while(--n);i+=s}if(0===e.strm.avail_in)break;if(n=y(e.strm,e.window,e.strstart+e.lookahead,i),e.lookahead+=n,e.lookahead+e.insert>=3)for(a=e.strstart-e.insert,e.ins_h=e.window[a],e.ins_h=(e.ins_h<=3&&(e.ins_h=(e.ins_h<=3)if(r=i._tr_tally(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<=3&&(e.ins_h=(e.ins_h<4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){o=e.strstart+e.lookahead-3,r=i._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=o&&(e.ins_h=(e.ins_h<15&&(s=2,r-=16),i<1||i>9||8!==n||r<8||r>15||t<0||t>9||a<0||a>4)return u(e,-2);8===r&&(r=9);var l=new k;return e.state=l,l.strm=e,l.wrap=s,l.gzhead=null,l.w_bits=r,l.w_size=1<e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(g(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((0===e.strstart||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,h(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-262&&(h(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(h(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(h(e,!1),e.strm.avail_out),1)})),new x(4,4,8,4,b),new x(4,5,16,8,b),new x(4,6,32,32,b),new x(4,4,16,16,w),new x(8,16,32,32,w),new x(8,16,128,128,w),new x(8,32,128,256,w),new x(32,128,258,1024,w),new x(32,258,258,4096,w)],n.deflateInit=function(e,t){return S(e,t,8,15,8,0)},n.deflateInit2=S,n.deflateReset=C,n.deflateResetKeep=_,n.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?-2:(e.state.gzhead=t,0):-2},n.deflate=function(e,t){var n,o,a,l;if(!e||!e.state||t>5||t<0)return e?u(e,-2):-2;if(o=e.state,!e.output||!e.input&&0!==e.avail_in||666===o.status&&4!==t)return u(e,0===e.avail_out?-5:-2);if(o.strm=e,n=o.last_flush,o.last_flush=t,42===o.status)if(2===o.wrap)e.adler=0,f(o,31),f(o,139),f(o,8),o.gzhead?(f(o,(o.gzhead.text?1:0)+(o.gzhead.hcrc?2:0)+(o.gzhead.extra?4:0)+(o.gzhead.name?8:0)+(o.gzhead.comment?16:0)),f(o,255&o.gzhead.time),f(o,o.gzhead.time>>8&255),f(o,o.gzhead.time>>16&255),f(o,o.gzhead.time>>24&255),f(o,9===o.level?2:o.strategy>=2||o.level<2?4:0),f(o,255&o.gzhead.os),o.gzhead.extra&&o.gzhead.extra.length&&(f(o,255&o.gzhead.extra.length),f(o,o.gzhead.extra.length>>8&255)),o.gzhead.hcrc&&(e.adler=s(e.adler,o.pending_buf,o.pending,0)),o.gzindex=0,o.status=69):(f(o,0),f(o,0),f(o,0),f(o,0),f(o,0),f(o,9===o.level?2:o.strategy>=2||o.level<2?4:0),f(o,3),o.status=113);else{var y=8+(o.w_bits-8<<4)<<8;y|=(o.strategy>=2||o.level<2?0:o.level<6?1:6===o.level?2:3)<<6,0!==o.strstart&&(y|=32),y+=31-y%31,o.status=113,m(o,y),0!==o.strstart&&(m(o,e.adler>>>16),m(o,65535&e.adler)),e.adler=1}if(69===o.status)if(o.gzhead.extra){for(a=o.pending;o.gzindex<(65535&o.gzhead.extra.length)&&(o.pending!==o.pending_buf_size||(o.gzhead.hcrc&&o.pending>a&&(e.adler=s(e.adler,o.pending_buf,o.pending-a,a)),d(e),a=o.pending,o.pending!==o.pending_buf_size));)f(o,255&o.gzhead.extra[o.gzindex]),o.gzindex++;o.gzhead.hcrc&&o.pending>a&&(e.adler=s(e.adler,o.pending_buf,o.pending-a,a)),o.gzindex===o.gzhead.extra.length&&(o.gzindex=0,o.status=73)}else o.status=73;if(73===o.status)if(o.gzhead.name){a=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>a&&(e.adler=s(e.adler,o.pending_buf,o.pending-a,a)),d(e),a=o.pending,o.pending===o.pending_buf_size)){l=1;break}l=o.gzindexa&&(e.adler=s(e.adler,o.pending_buf,o.pending-a,a)),0===l&&(o.gzindex=0,o.status=91)}else o.status=91;if(91===o.status)if(o.gzhead.comment){a=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>a&&(e.adler=s(e.adler,o.pending_buf,o.pending-a,a)),d(e),a=o.pending,o.pending===o.pending_buf_size)){l=1;break}l=o.gzindexa&&(e.adler=s(e.adler,o.pending_buf,o.pending-a,a)),0===l&&(o.status=103)}else o.status=103;if(103===o.status&&(o.gzhead.hcrc?(o.pending+2>o.pending_buf_size&&d(e),o.pending+2<=o.pending_buf_size&&(f(o,255&e.adler),f(o,e.adler>>8&255),e.adler=0,o.status=113)):o.status=113),0!==o.pending){if(d(e),0===e.avail_out)return o.last_flush=-1,0}else if(0===e.avail_in&&c(t)<=c(n)&&4!==t)return u(e,-5);if(666===o.status&&0!==e.avail_in)return u(e,-5);if(0!==e.avail_in||0!==o.lookahead||0!==t&&666!==o.status){var v=2===o.strategy?function(e,t){for(var n;;){if(0===e.lookahead&&(g(e),0===e.lookahead)){if(0===t)return 1;break}if(e.match_length=0,n=i._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(h(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(h(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(h(e,!1),0===e.strm.avail_out)?1:2}(o,t):3===o.strategy?function(e,t){for(var n,r,o,a,s=e.window;;){if(e.lookahead<=258){if(g(e),e.lookahead<=258&&0===t)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(r=s[o=e.strstart-1])===s[++o]&&r===s[++o]&&r===s[++o]){a=e.strstart+258;do{}while(r===s[++o]&&r===s[++o]&&r===s[++o]&&r===s[++o]&&r===s[++o]&&r===s[++o]&&r===s[++o]&&r===s[++o]&&oe.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(n=i._tr_tally(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=i._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(h(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(h(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(h(e,!1),0===e.strm.avail_out)?1:2}(o,t):r[o.level].func(o,t);if(3!==v&&4!==v||(o.status=666),1===v||3===v)return 0===e.avail_out&&(o.last_flush=-1),0;if(2===v&&(1===t?i._tr_align(o):5!==t&&(i._tr_stored_block(o,0,0,!1),3===t&&(p(o.head),0===o.lookahead&&(o.strstart=0,o.block_start=0,o.insert=0))),d(e),0===e.avail_out))return o.last_flush=-1,0}return 4!==t?0:o.wrap<=0?1:(2===o.wrap?(f(o,255&e.adler),f(o,e.adler>>8&255),f(o,e.adler>>16&255),f(o,e.adler>>24&255),f(o,255&e.total_in),f(o,e.total_in>>8&255),f(o,e.total_in>>16&255),f(o,e.total_in>>24&255)):(m(o,e.adler>>>16),m(o,65535&e.adler)),d(e),o.wrap>0&&(o.wrap=-o.wrap),0!==o.pending?0:1)},n.deflateEnd=function(e){var t;return e&&e.state?42!==(t=e.state.status)&&69!==t&&73!==t&&91!==t&&103!==t&&113!==t&&666!==t?u(e,-2):(e.state=null,113===t?u(e,-3):0):-2},n.deflateSetDictionary=function(e,t){var n,r,i,s,l,u,c,d,h=t.length;if(!e||!e.state)return-2;if(2===(s=(n=e.state).wrap)||1===s&&42!==n.status||n.lookahead)return-2;for(1===s&&(e.adler=a(e.adler,t,h,0)),n.wrap=0,h>=n.w_size&&(0===s&&(p(n.head),n.strstart=0,n.block_start=0,n.insert=0),d=new o.Buf8(n.w_size),o.arraySet(d,t,h-n.w_size,n.w_size,0),t=d,h=n.w_size),l=e.avail_in,u=e.next_in,c=e.input,e.avail_in=h,e.next_in=0,e.input=t,g(n);n.lookahead>=3;){r=n.strstart,i=n.lookahead-2;do{n.ins_h=(n.ins_h<=0;)e[t]=0}var i=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],a=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],s=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],l=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],u=new Array(576);o(u);var c=new Array(60);o(c);var p=new Array(512);o(p);var d=new Array(256);o(d);var h=new Array(29);o(h);var f,m,y,v=new Array(30);function g(e,t,n,r,o){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=o,this.has_stree=e&&e.length}function b(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function w(e){return e<256?p[e]:p[256+(e>>>7)]}function x(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function k(e,t,n){e.bi_valid>16-n?(e.bi_buf|=t<>16-e.bi_valid,e.bi_valid+=n-16):(e.bi_buf|=t<>>=1,n<<=1}while(--t>0);return n>>>1}function S(e,t,n){var r,o,i=new Array(16),a=0;for(r=1;r<=15;r++)i[r]=a=a+n[r-1]<<1;for(o=0;o<=t;o++){var s=e[2*o+1];0!==s&&(e[2*o]=C(i[s]++,s))}}function N(e){var t;for(t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function O(e){e.bi_valid>8?x(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function M(e,t,n,r){var o=2*t,i=2*n;return e[o]>1;n>=1;n--)T(e,i,n);o=l;do{n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],T(e,i,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,i[2*o]=i[2*n]+i[2*r],e.depth[o]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,i[2*n+1]=i[2*r+1]=o,e.heap[1]=o++,T(e,i,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,r,o,i,a,s,l=t.dyn_tree,u=t.max_code,c=t.stat_desc.static_tree,p=t.stat_desc.has_stree,d=t.stat_desc.extra_bits,h=t.stat_desc.extra_base,f=t.stat_desc.max_length,m=0;for(i=0;i<=15;i++)e.bl_count[i]=0;for(l[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n<573;n++)(i=l[2*l[2*(r=e.heap[n])+1]+1]+1)>f&&(i=f,m++),l[2*r+1]=i,r>u||(e.bl_count[i]++,a=0,r>=h&&(a=d[r-h]),s=l[2*r],e.opt_len+=s*(i+a),p&&(e.static_len+=s*(c[2*r+1]+a)));if(0!==m){do{for(i=f-1;0===e.bl_count[i];)i--;e.bl_count[i]--,e.bl_count[i+1]+=2,e.bl_count[f]--,m-=2}while(m>0);for(i=f;0!==i;i--)for(r=e.bl_count[i];0!==r;)(o=e.heap[--n])>u||(l[2*o+1]!==i&&(e.opt_len+=(i-l[2*o+1])*l[2*o],l[2*o+1]=i),r--)}}(e,t),S(i,u,e.bl_count)}function D(e,t,n){var r,o,i=-1,a=t[1],s=0,l=7,u=4;for(0===a&&(l=138,u=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)o=a,a=t[2*(r+1)+1],++s>=7;r<30;r++)for(v[r]=o<<7,e=0;e<1<0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<256;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),P(e,e.l_desc),P(e,e.d_desc),a=function(e){var t;for(D(e,e.dyn_ltree,e.l_desc.max_code),D(e,e.dyn_dtree,e.d_desc.max_code),P(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*l[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),o=e.opt_len+3+7>>>3,(i=e.static_len+3+7>>>3)<=o&&(o=i)):o=i=n+5,n+4<=o&&-1!==t?L(e,t,n,r):4===e.strategy||i===o?(k(e,2+(r?1:0),3),E(e,u,c)):(k(e,4+(r?1:0),3),function(e,t,n,r){var o;for(k(e,t-257,5),k(e,n-1,5),k(e,r-4,4),o=0;o>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(d[n]+256+1)]++,e.dyn_dtree[2*w(t)]++),e.last_lit===e.lit_bufsize-1},n._tr_align=function(e){k(e,2,3),_(e,256,u),function(e){16===e.bi_valid?(x(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},{"../utils/common":1}],8:[function(e,t,n){"use strict";t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],"/lib/deflate.js":[function(e,t,n){"use strict";var r=e("./zlib/deflate"),o=e("./utils/common"),i=e("./utils/strings"),a=e("./zlib/messages"),s=e("./zlib/zstream"),l=Object.prototype.toString;function u(e){if(!(this instanceof u))return new u(e);this.options=o.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new s,this.strm.avail_out=0;var n=r.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(0!==n)throw new Error(a[n]);if(t.header&&r.deflateSetHeader(this.strm,t.header),t.dictionary){var c;if(c="string"===typeof t.dictionary?i.string2buf(t.dictionary):"[object ArrayBuffer]"===l.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,0!==(n=r.deflateSetDictionary(this.strm,c)))throw new Error(a[n]);this._dict_set=!0}}function c(e,t){var n=new u(t);if(n.push(e,!0),n.err)throw n.msg||a[n.err];return n.result}u.prototype.push=function(e,t){var n,a,s=this.strm,u=this.options.chunkSize;if(this.ended)return!1;a=t===~~t?t:!0===t?4:0,"string"===typeof e?s.input=i.string2buf(e):"[object ArrayBuffer]"===l.call(e)?s.input=new Uint8Array(e):s.input=e,s.next_in=0,s.avail_in=s.input.length;do{if(0===s.avail_out&&(s.output=new o.Buf8(u),s.next_out=0,s.avail_out=u),1!==(n=r.deflate(s,a))&&0!==n)return this.onEnd(n),this.ended=!0,!1;0!==s.avail_out&&(0!==s.avail_in||4!==a&&2!==a)||("string"===this.options.to?this.onData(i.buf2binstring(o.shrinkBuf(s.output,s.next_out))):this.onData(o.shrinkBuf(s.output,s.next_out)))}while((s.avail_in>0||0===s.avail_out)&&1!==n);return 4===a?(n=r.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,0===n):2!==a||(this.onEnd(0),s.avail_out=0,!0)},u.prototype.onData=function(e){this.chunks.push(e)},u.prototype.onEnd=function(e){0===e&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},n.Deflate=u,n.deflate=c,n.deflateRaw=function(e,t){return(t=t||{}).raw=!0,c(e,t)},n.gzip=function(e,t){return(t=t||{}).gzip=!0,c(e,t)}},{"./utils/common":1,"./utils/strings":2,"./zlib/deflate":5,"./zlib/messages":6,"./zlib/zstream":8}]},{},[])("/lib/deflate.js")},function(e,t,n){"use strict";(function(t){var n="__global_unique_id__";e.exports=function(){return t[n]=(t[n]||0)+1}}).call(this,n(145))},function(e,t,n){"use strict";var r=n(81),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={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]||o}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var u=Object.defineProperty,c=Object.getOwnPropertyNames,p=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,h=Object.getPrototypeOf,f=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(f){var o=h(n);o&&o!==f&&e(t,o,r)}var a=c(n);p&&(a=a.concat(p(n)));for(var s=l(t),m=l(n),y=0;y/g,g=function(e){return(""+e).replace(h,"&").replace(f,"<").replace(v,">").replace(m,""").replace(y,"'")},b=function(e){var t=e.match(/\.([^\.]+)$/);return t?t[0]:""},w=function(e){var t=e.name,n=e.size;return{extension:b(t),name:g(t),getRawFile:function(){return e},size:n,status:r.Selected,progress:0,uid:""}},x=function(e){return!!(e.validationErrors&&e.validationErrors.length>0)},k=x,_=function(e){for(var t=0,n=e;t0){var n=Object(s.f)(this),r="upload."+e.validationErrors[0];t=n.toLanguageString(r,d[r])}return t},t.prototype.renderValidationError=function(e){return[o.createElement("span",{className:"k-file-invalid-extension-wrapper",key:"1"},o.createElement("span",{className:"k-file-invalid-icon"},"!"),o.createElement("span",{className:"k-file-state"})),o.createElement("span",{className:"k-file-name-size-wrapper",key:"2"},o.createElement("span",{className:"k-file-name k-file-name-invalid",title:e.name},e.name),o.createElement("span",{className:"k-file-validation-message"},this.getFileValidationMessage(e)))]},t.prototype.renderFileDetails=function(e){return[o.createElement("span",{className:"k-file-extension-wrapper",key:"1"},o.createElement("span",{className:"k-file-extension"},this.getFileExtension(e)),o.createElement("span",{className:"k-file-state"})),o.createElement("span",{className:"k-file-name-size-wrapper",key:"2"},o.createElement("span",{className:"k-file-name",title:e.name},e.name),o.createElement("span",{className:"k-file-size"},C([e])))]},t.prototype.render=function(){var e=this.props,t=e.files,n=P(e,["files"]),r=t[0],a=Object(i.d)("k-file-single");return o.createElement("div",{className:a},o.createElement("span",{className:"k-progress",style:{width:(r.progress||0)+"%",transition:"opacity .5s ease-in-out"}}),r.validationErrors&&r.validationErrors.length>0?this.renderValidationError(r):void 0,r.validationErrors&&0!==r.validationErrors.length?void 0:this.renderFileDetails(r),o.createElement(M,E({uid:r.uid,status:r.status,progress:r.progress},n)))},t}(o.Component);Object(s.h)(D);var A=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),I=function(){return(I=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&!t.props.disabled&&t.props.onAdd&&t.props.onAdd.call(void 0,n)},t.isDragOver=function(e){return(new Date).getTime()-(e||new Date).getTime()>100},t}return ne(t,e),Object.defineProperty(t.prototype,"documentActive",{get:function(){return this._documentActive},set:function(e){var t=this.documentActive;this._documentActive=e,e!==t&&this.forceUpdate()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"elementActive",{get:function(){return this._elementActive},set:function(e){var t=this._elementActive;this._elementActive=e,e!==t&&this.setState({})},enumerable:!0,configurable:!0}),t.prototype.componentDidMount=function(){document.addEventListener("dragenter",this.onDocumentDragEnter),document.addEventListener("dragover",this.onDocumentDragOver)},t.prototype.componentWillUnmount=function(){document.removeEventListener("dragenter",this.onDocumentDragEnter),document.removeEventListener("dragover",this.onDocumentDragOver)},t.prototype.render=function(){var e=this.props,t=e.addButtonComponent,n=e.statusComponent,r=Object(s.f)(this).toLanguageString("upload.dropFilesHere",d["upload.dropFilesHere"]),a=Object(i.d)("k-dropzone",this.documentActive?"k-dropzone-active":"",this.elementActive?"k-dropzone-hovered":"");return o.createElement("div",{className:a,onDrop:this.onDrop,onDragEnter:this.onElementDragEnter,onDragOver:this.onElementDragOver},t,o.createElement("div",{className:"k-dropzone-hint"},r),n)},t}(o.Component);Object(s.h)(re);var oe=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ie=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.focus=function(){if(t._uploadAddButton)return t._uploadAddButton.focus()},t.onAdd=function(e){t.props.onAdd&&t.props.onAdd.call(void 0,e)},t.onRetry=function(e){t.props.onRetry&&t.props.onRetry.call(void 0,e)},t.onCancel=function(e){t.props.onCancel&&t.props.onCancel.call(void 0,e)},t.onClear=function(){t.props.onClear&&t.props.onClear.call(void 0)},t.onUpload=function(){t.props.onUpload&&t.props.onUpload.call(void 0)},t.onRemove=function(e){t.props.onRemove&&t.props.onRemove.call(void 0,e)},t.onKeyDown=function(e){t.props.onKeyDown&&t.props.onKeyDown.call(void 0,e,t.isRtl)},t.onFocus=function(e){t.props.onFocus&&t.props.onFocus.call(void 0,e)},t.onBlur=function(e){t.props.onBlur&&t.props.onBlur.call(void 0,e)},t.onClick=function(e){t.props.onClick&&t.props.onClick.call(void 0,e)},t}return oe(t,e),Object.defineProperty(t.prototype,"async",{get:function(){var e=this.props;return{autoUpload:e.autoUpload,batch:e.batch,withCredentials:e.withCredentials,saveField:e.saveField,saveHeaders:e.saveHeaders,saveMethod:e.saveMethod,saveUrl:e.saveUrl,responseType:e.responseType,removeField:e.removeField,removeHeaders:e.removeHeaders,removeMethod:e.removeMethod,removeUrl:e.removeUrl}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"groupsCount",{get:function(){return Object.keys(this.props.groupedFiles).length},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"lastGroupIndex",{get:function(){return this.groupsCount-1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"addButtonIndex",{get:function(){return-1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"clearButtonIndex",{get:function(){return this.lastGroupIndex+1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"uploadButtonIndex",{get:function(){return this.lastGroupIndex+2},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isRtl",{get:function(){return this._container&&"rtl"===getComputedStyle(this._container).direction||!1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"actionElement",{get:function(){if(this._uploadAddButton)return this._uploadAddButton.actionElement},enumerable:!0,configurable:!0}),t.prototype.render=function(){var e=this,t=this.props,n=t.multiple,r=t.disabled,a=t.tabIndex,s=t.accept,l=t.showFileList,u=t.groupedFiles,c=t.navigationIndex,p=t.showActionButtons,d=t.notFocusedIndex,h=t.listItemUI,f=t.id,m=t.ariaLabelledBy,y=t.ariaDescribedBy,v=Object(i.d)("k-widget","k-upload","k-header",this.props.className,r?"k-state-disabled":""),g=o.createElement(te,{fileGroup:u}),b=o.createElement(X,{id:f,ariaLabelledBy:m,ariaDescribedBy:y,ref:function(t){return e._uploadAddButton=t},accept:s,async:this.async,addButtonIndex:this.addButtonIndex,navigationIndex:c,notFocusedIndex:d,tabIndex:a,multiple:n,disabled:r,onAdd:this.onAdd,onClick:this.onClick});return o.createElement("div",{ref:function(t){return e._container=t},className:v,onKeyDown:this.onKeyDown,onFocus:this.onFocus,onBlur:this.onBlur},o.createElement(re,{addButtonComponent:b,statusComponent:g,disabled:r,onAdd:this.onAdd}),l?o.createElement(V,{groupedFiles:u,disabled:r,async:this.async,navigationIndex:c,listItemUI:h,onCancel:this.onCancel,onRemove:this.onRemove,onRetry:this.onRetry,onClick:this.onClick}):void 0,p?o.createElement(Q,{disabled:r,navigationIndex:c,clearButtonIndex:this.clearButtonIndex,uploadButtonIndex:this.uploadButtonIndex,onUpload:this.onUpload,onClear:this.onClear,onClick:this.onClick}):void 0)},t.defaultProps={disabled:!1,groupedFiles:{},multiple:!0},t}(o.Component),ae=n(1),se=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),le=function(){return(le=Object.assign||function(e){for(var t,n=1,r=arguments.length;n-1&&(p=c-1);break;case i.b.down:r=0&&r<=a&&n.onRetry(o[r]);break;case i.b.space:-1!==r&&-2!==r||n.actionElement&&n.actionElement.click();break;case i.b.tab:p=-2;break;case i.b.delete:r>=0&&r<=a&&(p=c-1,n.onRemove(o[r]));break;case i.b.esc:r>=0&&r<=a&&(p=c-1,n.onCancel(o[r]))}n.navIndex=p},n.onCancel=function(e){n.props.onCancel&&n.props.onCancel.call(void 0,e)},n.onClear=function(){n.navIndex=-1,n.props.onClear&&n.props.onClear.call(void 0)},n.onUpload=function(){n.navIndex=-1,n.props.onUpload&&n.props.onUpload.call(void 0)},n.onRetry=function(e){n.props.onRetry&&n.props.onRetry.call(void 0,e)},n.onRemove=function(e){n.navIndex=n.navIndex>-1?n.navIndex-1:-1,n.props.onRemove&&n.props.onRemove.call(void 0,e)},n.onAdd=function(e){n.navIndex=-1,n.props.onAdd&&n.props.onAdd.call(void 0,e)},n.onClick=function(e){n.navIndex=e},n.onFocus=function(){n._blurTimeout&&(clearTimeout(n._blurTimeout),n._blurTimeout=void 0)},n.onBlurTimeout=function(){n.navIndex=-2,n._blurTimeout=void 0},n.onBlur=function(){clearTimeout(n._blurTimeout),n._blurTimeout=setTimeout(n.onBlurTimeout)},n._navIndex=-2,n}return se(t,e),Object.defineProperty(t.prototype,"navIndex",{get:function(){return this._navIndex},set:function(e){var t=this.navIndex;this._navIndex=e,e!==t&&this.forceUpdate()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"actionElement",{get:function(){if(this._uploadUI)return this._uploadUI.actionElement},enumerable:!0,configurable:!0}),t.prototype.componentDidUpdate=function(e){var t=Object.keys(e.groupedFiles).length,n=Object.keys(this.props.groupedFiles).length;t>n&&this.navIndex>-1&&(this.navIndex=this.navIndex-(t-n))},t.prototype.render=function(){var e=this,t=this.props,n=(t.onClear,t.onRemove,t.onRetry,t.onCancel,t.onUpload,t.onAdd,ue(t,["onClear","onRemove","onRetry","onCancel","onUpload","onAdd"]));return o.createElement(ie,le({ref:function(t){return e._uploadUI=t},className:this.props.className,onKeyDown:this.onKeyDown,navigationIndex:this.navIndex,notFocusedIndex:-2,onAdd:this.onAdd,onClear:this.onClear,onUpload:this.onUpload,onRemove:this.onRemove,onRetry:this.onRetry,onCancel:this.onCancel,onClick:this.onClick,onFocus:this.onFocus,onBlur:this.onBlur},n))},t}(o.Component),pe=n(63),de=n.n(pe),he=function(){return(he=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&(o=!1)})),o&&(t[n]=e)})),t},setFilesStatus:function(e,t){me(e,(function(e){e.forEach((function(e){e.status=t}))}))},flatFileGroup:function(e){var t=[];return me(e,(function(e){t.push.apply(t,e)})),t},groupForEach:me},ve=function(){return(ve=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&t.indexOf((e.extension||"").toLowerCase())<0&&(e.validationErrors=e.validationErrors||[],e.validationErrors.indexOf("invalidFileExtension")<0&&e.validationErrors.push("invalidFileExtension"))},Ne=function(e,t,n){0!==t&&(e.size||0)n&&(e.validationErrors=e.validationErrors||[],e.validationErrors.indexOf("invalidMaxFileSize")<0&&e.validationErrors.push("invalidMaxFileSize"))},Oe=function(e,t){var n,r=(t.allowedExtensions||[]).map((function(e){return("."===e.substring(0,1)?e:"."+e).toLowerCase()})),o=t.maxFileSize||0,i=t.minFileSize||0;for(n=0;n-1){var s=((t={})[e]=i,t);ye.setFilesStatus(s,r.Removing),n.removeFiles(s);var l=function(){if(n.props.onStatusChange){var e={target:n,newState:o,affectedFiles:i};n.props.onStatusChange.call(void 0,e)}};n.isControlled?l():n.setState({files:o},l)}else{var u=function(){if(n.props.onRemove){var e={target:n,newState:a,affectedFiles:i};n.props.onRemove.call(void 0,e)}};n.isControlled?u():n.setState({files:a},u)}},n.onRemoveSuccess=function(e,t){var r=n.fileStateCopy,o=r.filter((function(t){return t.uid===e})),i=r.filter((function(t){return t.uid!==e})),a=function(){if(n.props.onRemove){var e={target:n,newState:i,affectedFiles:o,response:t?Ce(t):void 0};n.props.onRemove.call(void 0,e)}};n.isControlled?a():n.setState({files:i},a)},n.onRemoveError=function(e,t){var o=n.fileStateCopy,i=o.filter((function(t){return t.uid===e}));i.forEach((function(e){e.status=r.RemoveFailed}));var a=function(){if(n.props.onStatusChange){var e={target:n,newState:o,affectedFiles:i,response:t?Ce(t):void 0};n.props.onStatusChange.call(void 0,e)}};n.isControlled?a():n.setState({files:o},a)},n.onRetry=function(e){var t=n.fileStateCopy,o=ye.groupFilesByUid(t.filter((function(t){return t.uid===e})));ye.setFilesStatus(o,r.Uploading),n.uploadFiles(o);var i=function(){if(n.props.onStatusChange){var e={target:n,newState:t,affectedFiles:ye.flatFileGroup(o)};n.props.onStatusChange.call(void 0,e)}};n.isControlled?i():n.setState({files:t},i)},n.onCancel=function(e){var t=n.fileStateCopy,r=t.filter((function(t){return t.uid!==e})),o=t.filter((function(t){return t.uid===e}));if(n._httpSubscriptions[e]&&(n._httpSubscriptions[e].cancel(),delete n._httpSubscriptions[e]),n.props.onCancel){var i={target:n,uid:e};n.props.onCancel.call(void 0,i)}var a=function(){if(n.props.onRemove){var e={target:n,newState:r,affectedFiles:o};n.props.onRemove.call(void 0,e)}};n.isControlled?a():n.setState({files:r},a)},n.onClear=function(){if(n.files.length){Object.keys(n._httpSubscriptions).forEach((function(e){n._httpSubscriptions[e].cancel()})),n._httpSubscriptions={};var e=function(){if(n.props.onRemove){var e={target:n,newState:[],affectedFiles:n.fileStateCopy};n.props.onRemove.call(void 0,e)}};n.isControlled?e():n.setState({files:[]},e)}},n.state={files:t.defaultFiles||[]},n}return Me(t,e),Object.defineProperty(t.prototype,"async",{get:function(){var e=this.props;return{autoUpload:e.autoUpload,batch:e.batch,removeField:e.removeField,removeHeaders:e.removeHeaders,removeMethod:e.removeMethod,removeUrl:e.removeUrl,responseType:e.responseType,saveField:e.saveField,saveHeaders:e.saveHeaders,saveMethod:e.saveMethod,saveUrl:e.saveUrl,withCredentials:e.withCredentials}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"files",{get:function(){return(this.isControlled?this.props.files:this.state.files)||[]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isControlled",{get:function(){return!this.props.defaultFiles},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isCustomSave",{get:function(){return this.props.saveUrl&&"function"===typeof this.props.saveUrl},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isCustomRemove",{get:function(){return this.props.removeUrl&&"function"===typeof this.props.removeUrl},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"fileStateCopy",{get:function(){return this.isControlled?ye.copyState(this.props.files):ye.copyState(this.state.files)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"actionElement",{get:function(){if(this._uploadNavigation)return this._uploadNavigation.actionElement},enumerable:!0,configurable:!0}),t.prototype.render=function(){var e=this,t=this.props,n=t.showFileList,r=(t.onAdd,t.onRemove,t.onCancel,t.autoUpload),a=t.showActionButtons,s=t.tabIndex,l=t.tabindex,u=t.disabled,c=Ee(t,["showFileList","onAdd","onRemove","onCancel","autoUpload","showActionButtons","tabIndex","tabindex","disabled"]),p=void 0!==s?s:l,d=ye.groupFilesByUid(this.files),h=ye.filesForUpload(d);return o.createElement(ce,Te({groupedFiles:d,className:this.props.className,showFileList:n&&!!Object.keys(d).length,showActionButtons:a&&!r&&!!Object.keys(h).length,autoUpload:r,disabled:u,onAdd:this.onAdd,onRemove:this.onRemove,onClear:this.onClear,onUpload:this.onUpload,onRetry:this.onRetry,onCancel:this.onCancel,tabIndex:Object(i.j)(p,u),ref:function(t){return e._uploadNavigation=t}},c))},t.defaultProps={autoUpload:!0,batch:!1,removeField:"fileNames",removeHeaders:{},removeMethod:"POST",removeUrl:"",responseType:"json",saveField:"files",saveHeaders:{},saveMethod:"POST",saveUrl:"",withCredentials:!0,restrictions:{allowedExtensions:[],maxFileSize:0,minFileSize:0},multiple:!0,showFileList:!0,showActionButtons:!0,disabled:!1},t.propTypes={autoUpload:ae.bool,batch:ae.bool,withCredentials:ae.bool,saveField:ae.string,saveHeaders:ae.object,saveMethod:ae.string,saveUrl:ae.oneOfType([ae.string,ae.func]),responseType:ae.oneOf(["arraybuffer","blob","json","text"]),removeField:ae.string,removeHeaders:ae.object,removeMethod:ae.string,removeUrl:ae.oneOfType([ae.string,ae.func]),multiple:ae.bool,disabled:ae.bool,showFileList:ae.bool,showActionButtons:ae.bool,tabindex:ae.number,tabIndex:ae.number,accept:ae.string,listItemUI:ae.oneOfType([ae.func,ae.string,ae.shape({render:ae.func.isRequired})]),restrictions:ae.shape({allowedExtensions:ae.arrayOf(ae.string),maxFileSize:ae.number,minFileSize:ae.number}),files:ae.arrayOf(ae.shape({uid:ae.string,name:ae.string,extension:ae.string,size:ae.number,validationErrors:ae.arrayOf(ae.string),status:ae.oneOf([r.Initial,r.RemoveFailed,r.Removing,r.Selected,r.UploadFailed,r.Uploaded,r.Uploading]),progress:ae.number,getRawFile:ae.func})),defaultFiles:ae.arrayOf(ae.shape({uid:ae.string,name:ae.string,extension:ae.string,size:ae.number,validationErrors:ae.arrayOf(ae.string),status:ae.oneOf([r.Initial,r.RemoveFailed,r.Removing,r.Selected,r.UploadFailed,r.Uploaded,r.Uploading]),progress:ae.number,getRawFile:ae.func}))},t}(o.Component)},function(e,t,n){"use strict";function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function o(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}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)}function a(e,t){return!t||"object"!==i(t)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function s(e){return function(){var t,n=r(e);if(o()){var i=r(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return a(this,t)}}n.d(t,"a",(function(){return s}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(48);var o=n(56);function i(e){return function(e){if(Array.isArray(e))return Object(r.a)(e)}(e)||function(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Object(o.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(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}}),t&&r(e,t)}n.d(t,"a",(function(){return o}))},,function(e,t,n){"use strict";var r=n(65),o="function"===typeof Symbol&&Symbol.for,i=o?Symbol.for("react.element"):60103,a=o?Symbol.for("react.portal"):60106,s=o?Symbol.for("react.fragment"):60107,l=o?Symbol.for("react.strict_mode"):60108,u=o?Symbol.for("react.profiler"):60114,c=o?Symbol.for("react.provider"):60109,p=o?Symbol.for("react.context"):60110,d=o?Symbol.for("react.forward_ref"):60112,h=o?Symbol.for("react.suspense"):60113,f=o?Symbol.for("react.memo"):60115,m=o?Symbol.for("react.lazy"):60116,y="function"===typeof Symbol&&Symbol.iterator;function v(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;nE.length&&E.push(e)}function A(e,t,n){return null==e?0:function e(t,n,r,o){var s=typeof t;"undefined"!==s&&"boolean"!==s||(t=null);var l=!1;if(null===t)l=!0;else switch(s){case"string":case"number":l=!0;break;case"object":switch(t.$$typeof){case i:case a:l=!0}}if(l)return r(o,t,""===n?"."+I(t,0):n),1;if(l=0,n=""===n?".":n+":",Array.isArray(t))for(var u=0;u