From 8fa870e8eb27548969d2c1b3700f7c84e463e118 Mon Sep 17 00:00:00 2001 From: Chris Hunt Date: Sat, 17 Feb 2024 19:06:51 +0000 Subject: [PATCH 1/5] Initial commit --- app/Http/Controllers/ItemController.php | 30 +++++++++++++++++++------ database/seeders/SettingsSeeder.php | 23 +++++++++++++++++++ lang/en/app.php | 4 ++++ resources/assets/sass/_app.scss | 3 +++ resources/views/sortable.blade.php | 25 +++++++++++++++++---- resources/views/welcome.blade.php | 2 +- 6 files changed, 75 insertions(+), 12 deletions(-) diff --git a/app/Http/Controllers/ItemController.php b/app/Http/Controllers/ItemController.php index fa4c1ae34..a3385a73a 100644 --- a/app/Http/Controllers/ItemController.php +++ b/app/Http/Controllers/ItemController.php @@ -35,16 +35,32 @@ public function __construct() */ public function dash(): View { - $data['apps'] = Item::whereHas('parents', function ($query) { - $query->where('id', 0); - })->orWhere('type', 1)->pinned()->orderBy('order', 'asc')->get(); + $treat_tags_as = \App\Setting::fetch('treat_tags_as'); - $data['all_apps'] = Item::whereHas('parents', function ($query) { - $query->where('id', 0); - })->orWhere('type', 1)->orderBy('order', 'asc')->get(); + $data["treat_tags_as"] = $treat_tags_as; + + if ($treat_tags_as == 'categories') { + $data['categories'] = Item::whereHas('children')->with('children')->get(); + + + $data['all_apps'] = Item::whereHas('parents', function ($query) { + $query->whereNot('id', 0); + })->orderBy('order', 'asc')->get(); + + + } else { + + $data['apps'] = Item::whereHas('parents', function ($query) { + $query->where('id', 0); + })->orWhere('type', 1)->pinned()->orderBy('order', 'asc')->get(); + + $data['all_apps'] = Item::whereHas('parents', function ($query) { + $query->where('id', 0); + })->orWhere('type', 1)->orderBy('order', 'asc')->get(); + } //$data['all_apps'] = Item::doesntHave('parents')->get(); - //die(print_r($data['apps'])); + // die(print_r($data)); return view('welcome', $data); } diff --git a/database/seeders/SettingsSeeder.php b/database/seeders/SettingsSeeder.php index 75ba8faa2..9594d2fb9 100644 --- a/database/seeders/SettingsSeeder.php +++ b/database/seeders/SettingsSeeder.php @@ -327,5 +327,28 @@ public function run(): void $app->parents()->attach(0); } } + + $tag_options = json_encode([ + 'folders' => 'app.settings.folders', + 'tags' => 'app.settings.tags', + 'categories' => 'app.settings.categories', + ]); + + if (! $setting = Setting::find(14)) { + $setting = new Setting; + $setting->id = 14; + $setting->group_id = 2; + $setting->key = 'treat_tags_as'; + $setting->type = 'select'; + $setting->options = $tag_options; + $setting->value = 'folders'; + $setting->label = 'app.settings.treat_tags_as'; + $setting->save(); + } else { + $setting->options = $tag_options; + $setting->label = 'app.settings.treat_tags_as'; + $setting->save(); + } + } } diff --git a/lang/en/app.php b/lang/en/app.php index d2e166d8c..bfd976495 100644 --- a/lang/en/app.php +++ b/lang/en/app.php @@ -28,6 +28,10 @@ 'settings.view' => 'View', 'settings.custom_css' => 'Custom CSS', 'settings.custom_js' => 'Custom JavaScript', + 'settings.treat_tags_as' => 'Treat Tags As:', + 'settings.folders' => 'Folders', + 'settings.tags' => 'Tags', + 'settings.categories' => 'Categories', 'options.none' => '- not set -', 'options.google' => 'Google', 'options.ddg' => 'DuckDuckGo', diff --git a/resources/assets/sass/_app.scss b/resources/assets/sass/_app.scss index 844844a86..154f73939 100644 --- a/resources/assets/sass/_app.scss +++ b/resources/assets/sass/_app.scss @@ -180,6 +180,9 @@ body { list-style: none; margin: 0; } + #sortable.categories { + align-content: flex-start; + } } #config-buttons { position: fixed; diff --git a/resources/views/sortable.blade.php b/resources/views/sortable.blade.php index a69cfa6c7..7b3c9c17b 100644 --- a/resources/views/sortable.blade.php +++ b/resources/views/sortable.blade.php @@ -1,6 +1,23 @@ -
- @foreach($apps as $app) - @include('item') - @endforeach +
+ @if($treat_tags_as == 'categories') + + @foreach($categories as $category) + children; ?> +
+ {{ $category->title }} + @foreach($apps as $app) + @include('item') + @endforeach +
+ @endforeach + + + @else + + @foreach($apps as $app) + @include('item') + @endforeach + @endif + @include('add')
diff --git a/resources/views/welcome.blade.php b/resources/views/welcome.blade.php index 4deb09df3..e7376b570 100644 --- a/resources/views/welcome.blade.php +++ b/resources/views/welcome.blade.php @@ -3,7 +3,7 @@ @section('content') @include('partials.search') - @if($apps->first()) + @if((isset($apps) && $apps->first()) || (isset($categories) && $categories->first())) @include('sortable') @else
From a0726a43ad3b1edd503277a985b241bf1dc9f210 Mon Sep 17 00:00:00 2001 From: Chris Hunt Date: Sat, 17 Feb 2024 20:49:17 +0000 Subject: [PATCH 2/5] Updates --- resources/assets/sass/_app.scss | 11 ++++++++++- resources/views/sortable.blade.php | 4 ++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/resources/assets/sass/_app.scss b/resources/assets/sass/_app.scss index 154f73939..e34d3512f 100644 --- a/resources/assets/sass/_app.scss +++ b/resources/assets/sass/_app.scss @@ -181,7 +181,16 @@ body { margin: 0; } #sortable.categories { - align-content: flex-start; + align-items: flex-start; + .category { + margin:10px; + background-color: #00000038; + border-radius: 10px; + > .title { + padding: 20px 20px 0; + color: white; + } + } } } #config-buttons { diff --git a/resources/views/sortable.blade.php b/resources/views/sortable.blade.php index 7b3c9c17b..10bdbc118 100644 --- a/resources/views/sortable.blade.php +++ b/resources/views/sortable.blade.php @@ -3,8 +3,8 @@ @foreach($categories as $category) children; ?> -
- {{ $category->title }} +
+
{{ $category->title }}
@foreach($apps as $app) @include('item') @endforeach From d276bf8b1d0bf72b9abf35572e5bb47359dcd4e6 Mon Sep 17 00:00:00 2001 From: Chris Hunt Date: Sun, 18 Feb 2024 18:16:46 +0000 Subject: [PATCH 3/5] Add alternate tag types --- app/Http/Controllers/ItemController.php | 16 ++++++------ public/css/app.css | 2 +- public/js/app.js | 2 +- public/mix-manifest.json | 4 +-- resources/assets/js/app.js | 12 ++++++++- resources/assets/sass/_app.scss | 30 ++++++++++++++++++++-- resources/views/partials/taglist.blade.php | 13 ++++++++++ resources/views/sortable.blade.php | 11 ++++---- resources/views/welcome.blade.php | 1 + 9 files changed, 71 insertions(+), 20 deletions(-) create mode 100644 resources/views/partials/taglist.blade.php diff --git a/app/Http/Controllers/ItemController.php b/app/Http/Controllers/ItemController.php index a3385a73a..39a2f6b5b 100644 --- a/app/Http/Controllers/ItemController.php +++ b/app/Http/Controllers/ItemController.php @@ -40,14 +40,14 @@ public function dash(): View $data["treat_tags_as"] = $treat_tags_as; if ($treat_tags_as == 'categories') { - $data['categories'] = Item::whereHas('children')->with('children')->get(); - - - $data['all_apps'] = Item::whereHas('parents', function ($query) { - $query->whereNot('id', 0); - })->orderBy('order', 'asc')->get(); - - + $data['categories'] = Item::whereHas('children')->with('children', function ($query) { + $query->pinned()->orderBy('order', 'asc'); + })->pinned()->orderBy('order', 'asc')->get(); + + } elseif ($treat_tags_as == 'tags') { + $data['apps'] = Item::with('parents')->where('type', 0)->pinned()->orderBy('order', 'asc')->get(); + $data['all_apps'] = Item::where('type', 0)->orderBy('order', 'asc')->get(); + $data['taglist'] = Item::where('type', 1)->pinned()->orderBy('order', 'asc')->get(); } else { $data['apps'] = Item::whereHas('parents', function ($query) { diff --git a/public/css/app.css b/public/css/app.css index 2f54f817a..31616d5ad 100644 --- a/public/css/app.css +++ b/public/css/app.css @@ -1,4 +1,4 @@ -/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;font-family:sans-serif}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}html{box-sizing:border-box}*,:after,:before{box-sizing:inherit}body{background:#cfd2d4}#switchuser{align-items:center;background:rgba(0,0,0,.5);border-radius:0 9px 0 0;border-right:2px solid hsla(0,0%,100%,.15);border-top:2px solid hsla(0,0%,100%,.15);bottom:0;box-shadow:0 0 10px 0 rgba(0,0,0,.4);color:#fff;display:flex;flex-direction:column;font-size:14px;justify-content:center;left:0;line-height:1.5;padding:10px;position:absolute;text-align:center}#switchuser img{border-radius:50%;margin-bottom:5px;width:50px}#switchuser .btn{background:hsla(0,0%,100%,.15);border-radius:0;color:#fff;font-size:13px;margin:8px -10px -10px;text-decoration:none;transition:all .35s ease-in-out;width:calc(100% + 22px)}#switchuser .btn:hover{background:#d64d55}#tile-preview{align-items:center}.create .textarea{margin:0 20px;width:100%}.create .textarea textarea{border:1px solid #dedfe2;border-radius:6px;font-size:14px;height:100px;padding:15px;width:100%}.create .textarea label:not(.switch){color:#9094a5;display:block;font-size:13px;font-weight:300;margin-bottom:15px;width:100%}.appoptions{flex-direction:column;gap:5px;padding:20px}.appoptions,.appoptions .optdetails{display:flex}.appoptions .optdetails .input{margin:0 20px;width:200px}.appoptions .optvalue{align-items:center;display:flex;height:0;opacity:0;overflow:hidden;width:0}.appoptions .optvalue.active{height:auto;opacity:1;overflow:visible;width:auto}.appoptions button.dark{background:#1b1b1b;border:none;border-radius:4px;color:#fff;min-width:240px;padding:12px 15px}#app{background-image:url(../img/bg1.jpg);background-position:bottom;background-repeat:no-repeat;background-size:cover;min-height:100vh}#app,#app nav{display:flex;flex-direction:column}#app nav{background:rgba(0,0,0,.7);color:#fff;height:100%;left:-340px;position:absolute;transition:all .35s ease-in-out;width:340px;z-index:2}#app .content{display:flex;flex-direction:column;flex-grow:1}#app .content .appheader{background:rgba(0,0,0,.4);height:58px;position:absolute;text-align:center;top:-58px;transition:all .35s ease-in-out;width:100%;z-index:1}#app .content .appheader ul{border-left:1px solid rgba(0,0,0,.6);border-right:1px solid hsla(0,0%,100%,.1);display:inline-block;height:58px;list-style:none;margin:0;padding:0}#app .content .appheader li{border-left:1px solid hsla(0,0%,100%,.1);border-right:1px solid rgba(0,0,0,.6);display:inline-block}#app .content .appheader a{color:#fff;display:inline-block;padding:20px;text-decoration:none}#app main{flex-direction:column}#app #sortable,#app main{align-content:center;align-items:center;display:flex;flex:1;flex-wrap:wrap;justify-content:center;list-style:none;margin:0;padding:30px 10px;position:relative}#config-buttons{bottom:0;display:flex;flex-direction:column;position:fixed;right:0}#config-buttons a{align-items:center;background:rgba(0,0,0,.8);border:1px solid transparent;color:#fff;display:flex;height:50px;justify-content:center;margin-top:1px;position:relative;width:50px}#config-buttons a img{height:26px;margin-top:12px;width:26px}#config-buttons a .tooltip{bottom:50%;left:auto;line-height:1.2;padding:10px 15px;right:55px;transform:translate(200px,50%);white-space:nowrap}#config-buttons a .tooltip.active{transform:translateY(50%)}.userlist,.userlist .user{align-items:center;display:flex;justify-content:center}.userlist .user{background:rgba(0,0,0,.5);border:5px solid hsla(0,0%,100%,.7);border-radius:15px;box-shadow:0 0 10px 0 rgba(0,0,0,.4);color:#fff;flex-direction:column;margin:20px;padding:15px;text-decoration:none}.userlist .user-img{border-radius:50%;height:130px;margin:10px 10px 15px;width:130px}.userlist #password{color:#2f313a;margin:15px -5px;padding:5px 10px;width:100%}.userlist .btn{width:100%}.userlist .forgot{color:#fff;font-size:12px;margin-top:25px}.item-container{position:relative}.item-container .item-edit{background:rgba(0,0,0,.7);border-radius:50%;bottom:20px;color:#fff;display:none;height:30px;left:8px;line-height:30px;position:absolute;text-align:center;width:30px;z-index:1}.tooltip{-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);background:rgba(0,0,0,.784);border-radius:5px;bottom:120px;color:#fff;font-size:13px;left:0;opacity:0;padding:25px;position:absolute;right:0;transform:translateY(-20px);transition:all .3s;z-index:0}.tooltip.active{opacity:1;transform:translateY(0);z-index:4}.tile-actions{align-items:center;background:rgba(0,0,0,.851);border-radius:6px;cursor:pointer;display:flex;flex-direction:column;font-size:12px;height:90px;justify-content:center;left:0;line-height:1;opacity:0;padding:7px;position:absolute;text-align:center;top:0;transition:all .3s;width:80px}.tile-actions.active{opacity:1}.refresh{z-index:3}.refresh .icon{font-size:20px;margin-bottom:5px}.black{color:#000!important}.white{color:#fff!important}.message-container,.message-container2{padding:10px 20px;width:100%}.alert{background:#f1f4f7;box-shadow:0 0 15px 3px rgba(0,0,0,.3);display:flex;justify-content:center;margin:30px auto;max-width:800px;padding:5px 20px 5px 80px;text-align:center}.alert.alert-danger,.alert.alert-success{position:relative}.alert.alert-danger:before,.alert.alert-success:before{align-items:center;background:#0eb584;bottom:0;color:#fff;content:"\f00c";display:flex;font-family:Font Awesome\ 5 Pro;font-size:24px;font-weight:900;justify-content:center;left:0;line-height:57px;position:absolute;text-align:center;top:0;width:60px}.alert.alert-danger:before{background:#d64d55;content:"\f00d"}.alert a{color:#91a1b3}#app.header .add-item,#app.header .item{margin:20px 0;opacity:.8;transform:scale(.9)}#app.sidebar nav{left:0}.add-item{border:4px dashed hsla(0,0%,100%,.7);border-radius:6px;box-shadow:0 0 20px 2px rgba(0,0,0,.3);color:#fff;display:none;flex:0 0 280px;height:90px;margin:20px;outline:1px solid transparent;overflow:hidden;padding:20px;position:relative;width:280px}.add-item a,.add-item.active{display:block}.add-item a{color:#fff;font-size:19px;line-height:40px;text-align:center;width:100%}.item{align-items:center;-webkit-background-clip:padding-box;background-clip:padding-box;background-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.25));border:1px solid #4a4a4a;border:1px solid rgba(76,76,76,.4);border-radius:6px;color:#fff;display:flex;flex:0 0 280px;height:90px;margin:20px;outline:1px solid transparent;overflow:hidden;padding:15px 55px 15px 15px;position:relative;transition:all .35s ease-in-out;width:280px}.item:after{background:hsla(0,0%,100%,.1);border-radius:50%;box-shadow:0 0 40px 0 rgba(0,0,0,.2);content:"";height:90px;position:absolute;right:-48px;top:0;width:90px}.item .link{color:#fff;font-size:24px;height:100%;line-height:90px;padding-right:10px;position:absolute;right:0;text-align:right;top:0;width:100%;z-index:1}.item .title{font-size:16px}.item .details{width:100%}.text-center{text-align:center!important}.module-container{background:#f9fafd;border:1px solid #cdced8;border-radius:5px;box-shadow:0 0 10px 0 rgba(0,0,0,.4);margin:10px 40px;max-width:1000px;overflow:hidden;width:100%}.module-container footer,.module-container header{align-items:center;background:#f2f3f6;border-bottom:1px solid #dbdce3;border-top:1px solid #fff;display:flex;font-size:16px;height:60px;justify-content:space-between;position:relative}.module-container footer .section-title,.module-container header .section-title{color:#5b5b5b;font-size:18px;margin-left:25px}.module-container footer{border-top:1px solid #dbdce3}.module-container .table{background:#fff;margin:0;width:100%}.module-container .table thead th{background:#f2f3f6;border-top:1px solid #fff;color:#767d94;font-size:13px;padding:15px 25px;text-align:left;text-transform:uppercase}.module-container .table tbody tr:hover{background:#fefbf2}.module-container .table tbody tr:hover td:first-child{position:relative}.module-container .table tbody tr:hover td:first-child:before{background:#0eb584;bottom:0;content:"";left:0;position:absolute;top:0;width:5px}.module-container .table tbody td{color:#2f313a;font-size:13px;max-width:500px;padding:20px 25px;word-break:break-word}.module-container .table tbody td.form-error{background:#e69191;color:#fff;text-align:center}.module-container .table tbody a{color:#2f313a}.homesearch{height:51px}.toggleinput{color:#ababab;display:flex;flex-direction:column-reverse;font-size:9px;font-weight:400;line-height:1;padding:0 20px;text-transform:uppercase}.toggleinput label.name{margin-top:6px}.module-actions{align-items:center;display:flex;justify-content:space-between}.module-actions .button{align-items:center;background:transparent;border:none;border-left:1px solid #cdced8;box-sizing:border-box;color:#515564;display:flex;flex-direction:column;font-size:18px;height:60px;justify-content:center;line-height:1;min-width:65px;padding:0 10px;position:relative;text-decoration:none}.module-actions .button:after{border-right:1px solid #fff;bottom:0;content:"";left:0;position:absolute;top:0}.module-actions .button span{color:#ababab;display:inline-block;font-size:9px;font-weight:400;line-height:1;margin:0;position:relative;text-transform:uppercase;top:4px}.input{position:relative}.input .help{bottom:-22px;color:#c00;left:10px;position:absolute}div.create{display:flex;flex-wrap:wrap;padding:30px 15px}div.create .input{margin:20px;width:280px}div.create .input label:not(.switch){color:#9094a5;display:block;font-size:13px;font-weight:300;margin-bottom:15px;width:100%}div.create .input input,div.create .input select{border:1px solid #dedfe2;border-radius:6px;padding:10px;width:100%}.app-icon-container{align-items:center;display:flex;flex:0 0 60px;height:60px;justify-content:center;margin-right:15px;width:60px}.app-icon{display:block;max-height:60px;max-width:60px}.sidenav{position:relative}.sidenav .close-sidenav{color:#ccc;font-size:24px;position:absolute;right:20px;top:20px}.sidenav h2{font-weight:300;margin:0;padding:20px}.sidenav ul{list-style:none;margin:0;padding:20px}.sidenav ul li{display:flex;justify-content:space-between;padding:5px}.sidenav ul li a{color:#2b3542}.sidenav ul li a.active{color:#46b0e6}.trashed{color:#91a1b3;font-size:11px;margin-left:20px}#websiteiconoptions{display:flex;flex-direction:column;padding:20px}#websiteiconoptions .results{align-items:center;display:flex;flex-wrap:wrap;gap:8px}#websiteiconoptions .header{align-items:center;display:flex;gap:10px;justify-content:space-between;padding:10px 0}#websiteiconoptions .selectclose,.iconbutton{cursor:pointer}.iconbutton{align-items:center;border:1px solid #ccc;border-radius:4px;display:flex;height:160px;justify-content:center;width:160px}.selecticon{height:auto;max-width:120px}.switch{display:inline-block;height:20px;position:relative;width:36px}.switch input{display:none}.slider{background-color:#4a556b;bottom:0;cursor:pointer;left:0;right:0;top:0}.slider,.slider:before{position:absolute;transition:.4s}.slider:before{background-color:#fff;bottom:3px;content:"";height:14px;left:3px;width:14px}input:checked+.slider{background-color:#2196f3}input:focus+.slider{box-shadow:0 0 1px #2196f3}input:checked+.slider:before{transform:translateX(16px)}.slider.round{border-radius:20px}.slider.round:before{border-radius:50%}@keyframes autofill{to{background:#f5f5f5;color:#2f313a;font-weight:700}}input:-webkit-autofill{-webkit-animation-fill-mode:both;-webkit-animation-name:autofill}input:autofill{animation-fill-mode:both;animation-name:autofill}button.link{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:none}a.settinglink{color:#2f313a;display:inline-block;font-size:13px;font-weight:700;margin:15px 5px}.setting-view-image{display:inline-block;margin-bottom:20px}.setting-view-image img{max-width:330px}.searchform{align-self:flex-start;background:rgba(0,0,0,.2);border-bottom:1px solid hsla(0,0%,100%,.35);border-radius:14px;border-top:1px solid rgba(0,0,0,.5);box-shadow:inset 0 1px 6px 0 rgba(0,0,0,.3);display:flex;margin:50px auto;max-width:620px;padding:14px;position:relative;text-align:center;width:100%;z-index:4}.searchform form{width:100%}.searchform .input-container{background:#fff;border-radius:5px;box-shadow:0 0 5px 0 rgba(0,0,0,.4);display:flex;overflow:hidden;position:relative}.searchform input{background:transparent;border:0;font-size:15px;padding:17px 15px;width:100%}.searchform button{background:#d64d55;border:none;border-bottom-right-radius:5px;border-top-right-radius:5px;color:#fff;font-size:16px;font-weight:500;line-height:38px;padding:7px 15px;position:absolute;right:0;text-transform:uppercase;top:0}.searchform select{background:#f5f5f5;border:none;border-right:1px solid #ddd;padding:0 10px}.ui-autocomplete{-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box;background-color:#fff;border:1px solid rgba(0,0,0,.2);*border-bottom-width:2px;border-radius:5px;*border-right-width:2px;box-shadow:0 5px 10px rgba(0,0,0,.2);display:none;float:left;left:0;list-style:none;margin:0 0 10px 25px;min-width:160px;padding:4px 0;position:absolute;top:100%;z-index:1000}.ui-menu-item{clear:both;color:#555;display:block;font-weight:400;line-height:18px;padding:3px 15px;text-decoration:none;white-space:nowrap}.ui-state-active,.ui-state-hover{font-weight:700}#appimage img{width:95px}#sapconfig,.newblock{display:none;width:100%}#sapconfig h2,.newblock h2{align-items:center;background:#f2f3f6;border-bottom:1px solid #dbdce3;border-top:1px solid #dbdce3;color:#5b5b5b;display:flex;font-size:18px;font-weight:500;height:60px;justify-content:space-between;margin-left:-15px;padding:2px 25px;width:calc(100% + 30px)}#sapconfig .items,.newblock .items{display:flex}hr{border-style:none;border-width:0;border-bottom:1px solid #fff;border-top:1px solid #eaeaea;height:0;margin:23px 0 18px}.upload-btn-wrapper{display:inline-block;overflow:hidden;position:relative}.btn{background-color:#d64d55;border:none;border-radius:8px;padding:8px 12px}.btn,.btn.test{color:#fff;font-size:16px}.btn.test{background:#207774;border-bottom-right-radius:5px;border-top-right-radius:5px;font-weight:500;padding:8px 50px;text-transform:uppercase}.upload-btn-wrapper input[type=file]{font-size:100px;left:0;opacity:0;position:absolute;top:0}.icon-container{align-items:center;display:flex}.icon-container img{margin-right:15px}.ui-helper-hidden-accessible{display:none}.livestats-container .livestats{display:flex;justify-content:space-between;list-style:none;margin:5px 0 0;padding:0;width:100%}.livestats-container .livestats span{display:block;display:flex;font-size:11px;font-weight:500;line-height:1;opacity:.5;text-align:left;text-transform:uppercase}.livestats-container .livestats strong{align-items:center;color:#fff;display:block;display:flex;font-size:12px;line-height:1;line-height:1.2}.livestats-container .livestats strong span{margin-left:4px}.livestats-container .livestats li{line-height:1;margin:0;text-align:center}.livestats-container .livestats li.right{text-align:right}.livestats-container .livestats li.right span{justify-content:flex-end}.livestats-container .livestats.flexcolumn{flex-direction:column}.livestats-container.black .livestats strong{color:#000}input:-webkit-autofill,input:-webkit-autofill:focus input:-webkit-autofill,input:-webkit-autofill:hover,select:-webkit-autofill,select:-webkit-autofill:focus,select:-webkit-autofill:hover,textarea:-webkit-autofill,textarea:-webkit-autofill:hover textarea:-webkit-autofill:focus{-webkit-text-fill-color:inherit;border:inherit;-webkit-box-shadow:inherit;color:#2f313a!important;-webkit-transition:inherit;transition:inherit}.sortable-drag{opacity:1!important}#sortable .sortable-ghost:not(.sortable-drag){opacity:0}#sortable:focus-within .item:focus-within{outline:1px solid hsla(0,0%,100%,.569)}#sortable:focus-within .item:not(:focus-within){opacity:.4}#config-buttons:focus-within a:focus{border:1px solid hsla(0,0%,100%,.569);outline:0}#config-buttons:focus-within a:not(:focus-within){opacity:.4}.import-status{list-style:none}.import-status li{align-items:center;display:flex;margin:6px 0}.import-status li svg{margin-right:8px}.import-status li.success svg{color:#0eb584}.import-status li.fail svg{color:#d64d55}.title-marquee{align-items:flex-start;display:flex;margin-top:2px;overflow:hidden;width:125px}.title-marquee>span,.title-marquee>strong{animation:marquee 8s linear;transform:translate(0);white-space:nowrap}.no-marquee .title,.title-marquee .title{margin-right:4px}@keyframes marquee{0%{transform:translate(0)}20%{transform:translate(0)}95%{transform:translate(-200%)}to{transform:translate(-200%)}} +/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;font-family:sans-serif}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}html{box-sizing:border-box}*,:after,:before{box-sizing:inherit}body{background:#cfd2d4}#switchuser{align-items:center;background:rgba(0,0,0,.5);border-radius:0 9px 0 0;border-right:2px solid hsla(0,0%,100%,.15);border-top:2px solid hsla(0,0%,100%,.15);bottom:0;box-shadow:0 0 10px 0 rgba(0,0,0,.4);color:#fff;display:flex;flex-direction:column;font-size:14px;justify-content:center;left:0;line-height:1.5;padding:10px;position:absolute;text-align:center}#switchuser img{border-radius:50%;margin-bottom:5px;width:50px}#switchuser .btn{background:hsla(0,0%,100%,.15);border-radius:0;color:#fff;font-size:13px;margin:8px -10px -10px;text-decoration:none;transition:all .35s ease-in-out;width:calc(100% + 22px)}#switchuser .btn:hover{background:#d64d55}#tile-preview{align-items:center}.create .textarea{margin:0 20px;width:100%}.create .textarea textarea{border:1px solid #dedfe2;border-radius:6px;font-size:14px;height:100px;padding:15px;width:100%}.create .textarea label:not(.switch){color:#9094a5;display:block;font-size:13px;font-weight:300;margin-bottom:15px;width:100%}.appoptions{flex-direction:column;gap:5px;padding:20px}.appoptions,.appoptions .optdetails{display:flex}.appoptions .optdetails .input{margin:0 20px;width:200px}.appoptions .optvalue{align-items:center;display:flex;height:0;opacity:0;overflow:hidden;width:0}.appoptions .optvalue.active{height:auto;opacity:1;overflow:visible;width:auto}.appoptions button.dark{background:#1b1b1b;border:none;border-radius:4px;color:#fff;min-width:240px;padding:12px 15px}#app{background-image:url(../img/bg1.jpg);background-position:bottom;background-repeat:no-repeat;background-size:cover;min-height:100vh}#app,#app nav{display:flex;flex-direction:column}#app nav{background:rgba(0,0,0,.7);color:#fff;height:100%;left:-340px;position:absolute;transition:all .35s ease-in-out;width:340px;z-index:2}#app .content{display:flex;flex-direction:column;flex-grow:1}#app .content .appheader{background:rgba(0,0,0,.4);height:58px;position:absolute;text-align:center;top:-58px;transition:all .35s ease-in-out;width:100%;z-index:1}#app .content .appheader ul{border-left:1px solid rgba(0,0,0,.6);border-right:1px solid hsla(0,0%,100%,.1);display:inline-block;height:58px;list-style:none;margin:0;padding:0}#app .content .appheader li{border-left:1px solid hsla(0,0%,100%,.1);border-right:1px solid rgba(0,0,0,.6);display:inline-block}#app .content .appheader a{color:#fff;display:inline-block;padding:20px;text-decoration:none}#app main{flex-direction:column}#app #sortable,#app main{align-content:center;align-items:center;display:flex;flex:1;flex-wrap:wrap;justify-content:center;list-style:none;margin:0;padding:30px 10px;position:relative}#app #sortable.categories{align-items:flex-start}#app #sortable.categories .category{background-color:rgba(0,0,0,.22);border-radius:10px;margin:10px}#app #sortable.categories .category>.title{padding:20px 20px 0}#app #sortable.categories .category>.title a{color:#fff;text-decoration:none}#config-buttons{bottom:0;display:flex;flex-direction:column;position:fixed;right:0}#config-buttons a{align-items:center;background:rgba(0,0,0,.8);border:1px solid transparent;color:#fff;display:flex;height:50px;justify-content:center;margin-top:1px;position:relative;width:50px}#config-buttons a img{height:26px;margin-top:12px;width:26px}#config-buttons a .tooltip{bottom:50%;left:auto;line-height:1.2;padding:10px 15px;right:55px;transform:translate(200px,50%);white-space:nowrap}#config-buttons a .tooltip.active{transform:translateY(50%)}.userlist,.userlist .user{align-items:center;display:flex;justify-content:center}.userlist .user{background:rgba(0,0,0,.5);border:5px solid hsla(0,0%,100%,.7);border-radius:15px;box-shadow:0 0 10px 0 rgba(0,0,0,.4);color:#fff;flex-direction:column;margin:20px;padding:15px;text-decoration:none}.userlist .user-img{border-radius:50%;height:130px;margin:10px 10px 15px;width:130px}.userlist #password{color:#2f313a;margin:15px -5px;padding:5px 10px;width:100%}.userlist .btn{width:100%}.userlist .forgot{color:#fff;font-size:12px;margin-top:25px}.item-container{position:relative}.item-container .item-edit{background:rgba(0,0,0,.7);border-radius:50%;bottom:20px;color:#fff;display:none;height:30px;left:8px;line-height:30px;position:absolute;text-align:center;width:30px;z-index:1}.categorytitle{color:#fff!important}.tooltip{-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);background:rgba(0,0,0,.784);border-radius:5px;bottom:120px;color:#fff;font-size:13px;left:0;opacity:0;padding:25px;pointer-events:none;position:absolute;right:0;transform:translateY(-20px);transition:all .3s;z-index:0}.tooltip.active{opacity:1;transform:translateY(0);z-index:4}.taglist{display:flex;flex-wrap:wrap;gap:5px}.taglist .tag{background:rgba(0,0,0,.608);border-radius:6px;cursor:pointer;font-size:12px;opacity:.6;padding:10px 20px}.taglist .tag.current{opacity:1}.taglist .tag:hover:not(.current){opacity:.8}.tile-actions{align-items:center;background:rgba(0,0,0,.851);border-radius:6px;cursor:pointer;display:flex;flex-direction:column;font-size:12px;height:90px;justify-content:center;left:0;line-height:1;opacity:0;padding:7px;position:absolute;text-align:center;top:0;transition:all .3s;width:80px}.tile-actions.active{opacity:1}.refresh{z-index:3}.refresh .icon{font-size:20px;margin-bottom:5px}.black{color:#000!important}.white{color:#fff!important}.message-container,.message-container2{padding:10px 20px;width:100%}.alert{background:#f1f4f7;box-shadow:0 0 15px 3px rgba(0,0,0,.3);display:flex;justify-content:center;margin:30px auto;max-width:800px;padding:5px 20px 5px 80px;text-align:center}.alert.alert-danger,.alert.alert-success{position:relative}.alert.alert-danger:before,.alert.alert-success:before{align-items:center;background:#0eb584;bottom:0;color:#fff;content:"\f00c";display:flex;font-family:Font Awesome\ 5 Pro;font-size:24px;font-weight:900;justify-content:center;left:0;line-height:57px;position:absolute;text-align:center;top:0;width:60px}.alert.alert-danger:before{background:#d64d55;content:"\f00d"}.alert a{color:#91a1b3}#app.header .add-item,#app.header .item{margin:20px 0;opacity:.8;transform:scale(.9)}#app.sidebar nav{left:0}.add-item{border:4px dashed hsla(0,0%,100%,.7);border-radius:6px;box-shadow:0 0 20px 2px rgba(0,0,0,.3);color:#fff;display:none;flex:0 0 280px;height:90px;margin:20px;outline:1px solid transparent;overflow:hidden;padding:20px;position:relative;width:280px}.add-item a,.add-item.active{display:block}.add-item a{color:#fff;font-size:19px;line-height:40px;text-align:center;width:100%}.item{align-items:center;-webkit-background-clip:padding-box;background-clip:padding-box;background-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.25));border:1px solid #4a4a4a;border:1px solid rgba(76,76,76,.4);border-radius:6px;color:#fff;display:flex;flex:0 0 280px;height:90px;margin:20px;outline:1px solid transparent;overflow:hidden;padding:15px 55px 15px 15px;position:relative;transition:all .35s ease-in-out;width:280px}.item:after{background:hsla(0,0%,100%,.1);border-radius:50%;box-shadow:0 0 40px 0 rgba(0,0,0,.2);content:"";height:90px;position:absolute;right:-48px;top:0;width:90px}.item .link{color:#fff;font-size:24px;height:100%;line-height:90px;padding-right:10px;position:absolute;right:0;text-align:right;top:0;width:100%;z-index:1}.item .title{font-size:16px}.item .details{width:100%}.text-center{text-align:center!important}.module-container{background:#f9fafd;border:1px solid #cdced8;border-radius:5px;box-shadow:0 0 10px 0 rgba(0,0,0,.4);margin:10px 40px;max-width:1000px;overflow:hidden;width:100%}.module-container footer,.module-container header{align-items:center;background:#f2f3f6;border-bottom:1px solid #dbdce3;border-top:1px solid #fff;display:flex;font-size:16px;height:60px;justify-content:space-between;position:relative}.module-container footer .section-title,.module-container header .section-title{color:#5b5b5b;font-size:18px;margin-left:25px}.module-container footer{border-top:1px solid #dbdce3}.module-container .table{background:#fff;margin:0;width:100%}.module-container .table thead th{background:#f2f3f6;border-top:1px solid #fff;color:#767d94;font-size:13px;padding:15px 25px;text-align:left;text-transform:uppercase}.module-container .table tbody tr:hover{background:#fefbf2}.module-container .table tbody tr:hover td:first-child{position:relative}.module-container .table tbody tr:hover td:first-child:before{background:#0eb584;bottom:0;content:"";left:0;position:absolute;top:0;width:5px}.module-container .table tbody td{color:#2f313a;font-size:13px;max-width:500px;padding:20px 25px;word-break:break-word}.module-container .table tbody td.form-error{background:#e69191;color:#fff;text-align:center}.module-container .table tbody a{color:#2f313a}.homesearch{height:51px}.toggleinput{color:#ababab;display:flex;flex-direction:column-reverse;font-size:9px;font-weight:400;line-height:1;padding:0 20px;text-transform:uppercase}.toggleinput label.name{margin-top:6px}.module-actions{align-items:center;display:flex;justify-content:space-between}.module-actions .button{align-items:center;background:transparent;border:none;border-left:1px solid #cdced8;box-sizing:border-box;color:#515564;display:flex;flex-direction:column;font-size:18px;height:60px;justify-content:center;line-height:1;min-width:65px;padding:0 10px;position:relative;text-decoration:none}.module-actions .button:after{border-right:1px solid #fff;bottom:0;content:"";left:0;position:absolute;top:0}.module-actions .button span{color:#ababab;display:inline-block;font-size:9px;font-weight:400;line-height:1;margin:0;position:relative;text-transform:uppercase;top:4px}.input{position:relative}.input .help{bottom:-22px;color:#c00;left:10px;position:absolute}div.create{display:flex;flex-wrap:wrap;padding:30px 15px}div.create .input{margin:20px;width:280px}div.create .input label:not(.switch){color:#9094a5;display:block;font-size:13px;font-weight:300;margin-bottom:15px;width:100%}div.create .input input,div.create .input select{border:1px solid #dedfe2;border-radius:6px;padding:10px;width:100%}.app-icon-container{align-items:center;display:flex;flex:0 0 60px;height:60px;justify-content:center;margin-right:15px;width:60px}.app-icon{display:block;max-height:60px;max-width:60px}.sidenav{position:relative}.sidenav .close-sidenav{color:#ccc;font-size:24px;position:absolute;right:20px;top:20px}.sidenav h2{font-weight:300;margin:0;padding:20px}.sidenav ul{list-style:none;margin:0;padding:20px}.sidenav ul li{display:flex;justify-content:space-between;padding:5px}.sidenav ul li a{color:#2b3542}.sidenav ul li a.active{color:#46b0e6}.trashed{color:#91a1b3;font-size:11px;margin-left:20px}#websiteiconoptions{display:flex;flex-direction:column;padding:20px}#websiteiconoptions .results{align-items:center;display:flex;flex-wrap:wrap;gap:8px}#websiteiconoptions .header{align-items:center;display:flex;gap:10px;justify-content:space-between;padding:10px 0}#websiteiconoptions .selectclose,.iconbutton{cursor:pointer}.iconbutton{align-items:center;border:1px solid #ccc;border-radius:4px;display:flex;height:160px;justify-content:center;width:160px}.selecticon{height:auto;max-width:120px}.switch{display:inline-block;height:20px;position:relative;width:36px}.switch input{display:none}.slider{background-color:#4a556b;bottom:0;cursor:pointer;left:0;right:0;top:0}.slider,.slider:before{position:absolute;transition:.4s}.slider:before{background-color:#fff;bottom:3px;content:"";height:14px;left:3px;width:14px}input:checked+.slider{background-color:#2196f3}input:focus+.slider{box-shadow:0 0 1px #2196f3}input:checked+.slider:before{transform:translateX(16px)}.slider.round{border-radius:20px}.slider.round:before{border-radius:50%}@keyframes autofill{to{background:#f5f5f5;color:#2f313a;font-weight:700}}input:-webkit-autofill{-webkit-animation-fill-mode:both;-webkit-animation-name:autofill}input:autofill{animation-fill-mode:both;animation-name:autofill}button.link{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:none}a.settinglink{color:#2f313a;display:inline-block;font-size:13px;font-weight:700;margin:15px 5px}.setting-view-image{display:inline-block;margin-bottom:20px}.setting-view-image img{max-width:330px}.searchform{align-self:flex-start;background:rgba(0,0,0,.2);border-bottom:1px solid hsla(0,0%,100%,.35);border-radius:14px;border-top:1px solid rgba(0,0,0,.5);box-shadow:inset 0 1px 6px 0 rgba(0,0,0,.3);display:flex;margin:50px auto;max-width:620px;padding:14px;position:relative;text-align:center;width:100%;z-index:4}.searchform form{width:100%}.searchform .input-container{background:#fff;border-radius:5px;box-shadow:0 0 5px 0 rgba(0,0,0,.4);display:flex;overflow:hidden;position:relative}.searchform input{background:transparent;border:0;font-size:15px;padding:17px 15px;width:100%}.searchform button{background:#d64d55;border:none;border-bottom-right-radius:5px;border-top-right-radius:5px;color:#fff;font-size:16px;font-weight:500;line-height:38px;padding:7px 15px;position:absolute;right:0;text-transform:uppercase;top:0}.searchform select{background:#f5f5f5;border:none;border-right:1px solid #ddd;padding:0 10px}.ui-autocomplete{-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box;background-color:#fff;border:1px solid rgba(0,0,0,.2);*border-bottom-width:2px;border-radius:5px;*border-right-width:2px;box-shadow:0 5px 10px rgba(0,0,0,.2);display:none;float:left;left:0;list-style:none;margin:0 0 10px 25px;min-width:160px;padding:4px 0;position:absolute;top:100%;z-index:1000}.ui-menu-item{clear:both;color:#555;display:block;font-weight:400;line-height:18px;padding:3px 15px;text-decoration:none;white-space:nowrap}.ui-state-active,.ui-state-hover{font-weight:700}#appimage img{width:95px}#sapconfig,.newblock{display:none;width:100%}#sapconfig h2,.newblock h2{align-items:center;background:#f2f3f6;border-bottom:1px solid #dbdce3;border-top:1px solid #dbdce3;color:#5b5b5b;display:flex;font-size:18px;font-weight:500;height:60px;justify-content:space-between;margin-left:-15px;padding:2px 25px;width:calc(100% + 30px)}#sapconfig .items,.newblock .items{display:flex}hr{border-style:none;border-width:0;border-bottom:1px solid #fff;border-top:1px solid #eaeaea;height:0;margin:23px 0 18px}.upload-btn-wrapper{display:inline-block;overflow:hidden;position:relative}.btn{background-color:#d64d55;border:none;border-radius:8px;padding:8px 12px}.btn,.btn.test{color:#fff;font-size:16px}.btn.test{background:#207774;border-bottom-right-radius:5px;border-top-right-radius:5px;font-weight:500;padding:8px 50px;text-transform:uppercase}.upload-btn-wrapper input[type=file]{font-size:100px;left:0;opacity:0;position:absolute;top:0}.icon-container{align-items:center;display:flex}.icon-container img{margin-right:15px}.ui-helper-hidden-accessible{display:none}.livestats-container .livestats{display:flex;justify-content:space-between;list-style:none;margin:5px 0 0;padding:0;width:100%}.livestats-container .livestats span{display:block;display:flex;font-size:11px;font-weight:500;line-height:1;opacity:.5;text-align:left;text-transform:uppercase}.livestats-container .livestats strong{align-items:center;color:#fff;display:block;display:flex;font-size:12px;line-height:1;line-height:1.2}.livestats-container .livestats strong span{margin-left:4px}.livestats-container .livestats li{line-height:1;margin:0;text-align:center}.livestats-container .livestats li.right{text-align:right}.livestats-container .livestats li.right span{justify-content:flex-end}.livestats-container .livestats.flexcolumn{flex-direction:column}.livestats-container.black .livestats strong{color:#000}input:-webkit-autofill,input:-webkit-autofill:focus input:-webkit-autofill,input:-webkit-autofill:hover,select:-webkit-autofill,select:-webkit-autofill:focus,select:-webkit-autofill:hover,textarea:-webkit-autofill,textarea:-webkit-autofill:hover textarea:-webkit-autofill:focus{-webkit-text-fill-color:inherit;border:inherit;-webkit-box-shadow:inherit;color:#2f313a!important;-webkit-transition:inherit;transition:inherit}.sortable-drag{opacity:1!important}#sortable .sortable-ghost:not(.sortable-drag){opacity:0}#sortable:focus-within .item:focus-within{outline:1px solid hsla(0,0%,100%,.569)}#sortable:focus-within .item:not(:focus-within){opacity:.4}#config-buttons:focus-within a:focus{border:1px solid hsla(0,0%,100%,.569);outline:0}#config-buttons:focus-within a:not(:focus-within){opacity:.4}.import-status{list-style:none}.import-status li{align-items:center;display:flex;margin:6px 0}.import-status li svg{margin-right:8px}.import-status li.success svg{color:#0eb584}.import-status li.fail svg{color:#d64d55}.title-marquee{align-items:flex-start;display:flex;margin-top:2px;overflow:hidden;width:125px}.title-marquee>span,.title-marquee>strong{animation:marquee 8s linear;transform:translate(0);white-space:nowrap}.no-marquee .title,.title-marquee .title{margin-right:4px}@keyframes marquee{0%{transform:translate(0)}20%{transform:translate(0)}95%{transform:translate(-200%)}to{transform:translate(-200%)}} /*! Huebee v2.0.0 http://huebee.buzz ---------------------------------------------- */.huebee{position:absolute;transform:translateY(0);transition:opacity .15s,transform .15s;z-index:1}.huebee.is-hidden{opacity:0;transform:translateY(10px)}.huebee.is-static-open{position:relative;z-index:auto}.huebee__container{background:#eee;border-radius:5px;box-shadow:0 5px 10px rgba(0,0,0,.3);left:0;padding:10px;position:absolute;top:5px}.huebee.is-static-open .huebee__container{box-shadow:none;display:inline-block;left:auto;position:relative;top:auto}.huebee__canvas{cursor:pointer;display:block}.huebee__cursor{border:3px solid #fff;border-radius:5px;box-sizing:content-box;height:15px;left:0;pointer-events:none;position:absolute;top:0;width:15px}.huebee__cursor.is-hidden{opacity:0}.huebee__close-button{background:#222;border-radius:12px;display:block;height:24px;position:absolute;right:-9px;top:-9px;width:24px}.huebee__close-button__x{stroke:#fff;stroke-width:3;stroke-linecap:round}.huebee__close-button:hover{background:#fff;cursor:pointer}.huebee__close-button:hover .huebee__close-button__x{stroke:#222}.select2-container{box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle}.select2-container .select2-selection--single{box-sizing:border-box;cursor:pointer;display:block;height:28px;-moz-user-select:none;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--single .select2-selection__rendered{display:block;overflow:hidden;padding-left:8px;padding-right:20px;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-selection--single .select2-selection__clear{position:relative}.select2-container[dir=rtl] .select2-selection--single .select2-selection__rendered{padding-left:20px;padding-right:8px}.select2-container .select2-selection--multiple{box-sizing:border-box;cursor:pointer;display:block;min-height:39px;-moz-user-select:none;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline-block;overflow:hidden;padding-left:8px;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-search--inline{float:left}.select2-container .select2-search--inline .select2-search__field{border:none;box-sizing:border-box;font-size:100%;margin-top:5px;padding:0}.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-dropdown{background-color:#fff;border:1px solid #aaa;border-radius:4px;box-sizing:border-box;display:block;left:-100000px;position:absolute;width:100%;z-index:1051}.select2-results{display:block}.select2-results__options{list-style:none;margin:0;padding:0}.select2-results__option{padding:6px;-moz-user-select:none;user-select:none;-webkit-user-select:none}.select2-results__option[aria-selected]{cursor:pointer}.select2-container--open .select2-dropdown{left:0}.select2-container--open .select2-dropdown--above{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--open .select2-dropdown--below{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-search--dropdown{display:block;padding:4px}.select2-search--dropdown .select2-search__field{box-sizing:border-box;padding:4px;width:100%}.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-search--dropdown.select2-search--hide{display:none}.select2-close-mask{background-color:#fff;border:0;display:block;filter:alpha(opacity=0);height:auto;left:0;margin:0;min-height:100%;min-width:100%;opacity:0;padding:0;position:fixed;top:0;width:auto;z-index:99}.select2-hidden-accessible{clip:rect(0 0 0 0)!important;border:0!important;-webkit-clip-path:inset(50%)!important;clip-path:inset(50%)!important;height:1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;white-space:nowrap!important;width:1px!important}.select2-container--default .select2-selection--single{background-color:#fff;border:1px solid #aaa;border-radius:4px}.select2-container--default .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--default .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:700}.select2-container--default .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--default .select2-selection--single .select2-selection__arrow{height:26px;position:absolute;right:1px;top:1px;width:20px}.select2-container--default .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent;border-style:solid;border-width:5px 4px 0;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--default[dir=rtl] .select2-selection--single .select2-selection__clear{float:left}.select2-container--default[dir=rtl] .select2-selection--single .select2-selection__arrow{left:1px;right:auto}.select2-container--default.select2-container--disabled .select2-selection--single{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear{display:none}.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888;border-width:0 4px 5px}.select2-container--default .select2-selection--multiple{background-color:#fff;border:1px solid #dedfe2;border-radius:4px;cursor:text}.select2-container--default .select2-selection--multiple .select2-selection__rendered{box-sizing:border-box;list-style:none;margin:0;padding:0 5px;width:100%}.select2-container--default .select2-selection--multiple .select2-selection__rendered li{list-style:none}.select2-container--default .select2-selection--multiple .select2-selection__placeholder{color:#999;float:left;margin-top:5px}.select2-container--default .select2-selection--multiple .select2-selection__clear{cursor:pointer;float:right;font-weight:700;margin-right:10px;margin-top:5px}.select2-container--default .select2-selection--multiple .select2-selection__choice{background-color:#f2f3f6;border:1px solid #dedfe2;border-radius:4px;cursor:default;float:left;font-size:13px;font-weight:300;margin-right:5px;margin-top:5px;padding:5px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{color:#999;cursor:pointer;display:inline-block;font-weight:700;margin-right:2px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover{color:#333}.select2-container--default[dir=rtl] .select2-selection--multiple .select2-search--inline,.select2-container--default[dir=rtl] .select2-selection--multiple .select2-selection__choice,.select2-container--default[dir=rtl] .select2-selection--multiple .select2-selection__placeholder{float:right}.select2-container--default[dir=rtl] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--default[dir=rtl] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--default.select2-container--focus .select2-selection--multiple{border:1px solid #dedfe2;outline:0}.select2-container--default.select2-container--disabled .select2-selection--multiple{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection__choice__remove{display:none}.select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple,.select2-container--default.select2-container--open.select2-container--above .select2-selection--single{border-top-left-radius:0;border-top-right-radius:0}.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple,.select2-container--default.select2-container--open.select2-container--below .select2-selection--single{border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--default .select2-search--dropdown .select2-search__field{border:1px solid #aaa}.select2-container--default .select2-search--inline .select2-search__field{-webkit-appearance:textfield;background:transparent;border:none;box-shadow:none;outline:0}.select2-container--default .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--default .select2-results__option[role=group]{padding:0}.select2-container--default .select2-results__option[aria-disabled=true]{color:#999}.select2-container--default .select2-results__option[aria-selected=true]{background-color:#ddd}.select2-container--default .select2-results__option .select2-results__option{padding-left:1em}.select2-container--default .select2-results__option .select2-results__option .select2-results__group{padding-left:0}.select2-container--default .select2-results__option .select2-results__option .select2-results__option{margin-left:-1em;padding-left:2em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-2em;padding-left:3em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-3em;padding-left:4em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-4em;padding-left:5em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-5em;padding-left:6em}.select2-container--default .select2-results__option--highlighted[aria-selected]{background-color:#5897fb;color:#fff}.select2-container--default .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic .select2-selection--single{background-color:#f7f7f7;background-image:linear-gradient(180deg,#fff 50%,#eee);background-repeat:repeat-x;border:1px solid #aaa;border-radius:4px;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#FFFFFFFF",endColorstr="#FFEEEEEE",GradientType=0);outline:0}.select2-container--classic .select2-selection--single:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--classic .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:700;margin-right:10px}.select2-container--classic .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--classic .select2-selection--single .select2-selection__arrow{background-color:#ddd;background-image:linear-gradient(180deg,#eee 50%,#ccc);background-repeat:repeat-x;border:none;border-bottom-right-radius:4px;border-left:1px solid #aaa;border-top-right-radius:4px;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#FFEEEEEE",endColorstr="#FFCCCCCC",GradientType=0);height:26px;position:absolute;right:1px;top:1px;width:20px}.select2-container--classic .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent;border-style:solid;border-width:5px 4px 0;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--classic[dir=rtl] .select2-selection--single .select2-selection__clear{float:left}.select2-container--classic[dir=rtl] .select2-selection--single .select2-selection__arrow{border:none;border-radius:0;border-bottom-left-radius:4px;border-right:1px solid #aaa;border-top-left-radius:4px;left:1px;right:auto}.select2-container--classic.select2-container--open .select2-selection--single{border:1px solid #5897fb}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow{background:transparent;border:none}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888;border-width:0 4px 5px}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single{background-image:linear-gradient(180deg,#fff 0,#eee 50%);background-repeat:repeat-x;border-top:none;border-top-left-radius:0;border-top-right-radius:0;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#FFFFFFFF",endColorstr="#FFEEEEEE",GradientType=0)}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single{background-image:linear-gradient(180deg,#eee 50%,#fff);background-repeat:repeat-x;border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#FFEEEEEE",endColorstr="#FFFFFFFF",GradientType=0)}.select2-container--classic .select2-selection--multiple{background-color:#fff;border:1px solid #aaa;border-radius:4px;cursor:text;outline:0}.select2-container--classic .select2-selection--multiple:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--multiple .select2-selection__rendered{list-style:none;margin:0;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__clear{display:none}.select2-container--classic .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove{color:#888;cursor:pointer;display:inline-block;font-weight:700;margin-right:2px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover{color:#555}.select2-container--classic[dir=rtl] .select2-selection--multiple .select2-selection__choice{float:right;margin-left:5px;margin-right:auto}.select2-container--classic[dir=rtl] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--classic.select2-container--open .select2-selection--multiple{border:1px solid #5897fb}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--classic .select2-search--dropdown .select2-search__field{border:1px solid #aaa;outline:0}.select2-container--classic .select2-search--inline .select2-search__field{box-shadow:none;outline:0}.select2-container--classic .select2-dropdown{background-color:#fff;border:1px solid transparent}.select2-container--classic .select2-dropdown--above{border-bottom:none}.select2-container--classic .select2-dropdown--below{border-top:none}.select2-container--classic .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--classic .select2-results__option[role=group]{padding:0}.select2-container--classic .select2-results__option[aria-disabled=true]{color:grey}.select2-container--classic .select2-results__option--highlighted[aria-selected]{background-color:#3875d7;color:#fff}.select2-container--classic .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic.select2-container--open .select2-dropdown{border-color:#5897fb} diff --git a/public/js/app.js b/public/js/app.js index 8c3e02f44..9d41df205 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -1 +1 @@ -function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}!function(t,e){"object"==("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).Sortable=e()}(this,(function(){"use strict";function t(t,e){var i,n=Object.keys(t);return Object.getOwnPropertySymbols&&(i=Object.getOwnPropertySymbols(t),e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)),n}function e(e){for(var i=1;it.length)&&(e=t.length);for(var i=0,n=new Array(e);i"===e[0]&&(e=e.substring(1)),t))try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(t){return}}function _(t,e,i,n){if(t){i=i||document;do{if(null!=e&&(">"!==e[0]||t.parentNode===i)&&v(t,e)||n&&t===i)return t}while(t!==i&&(t=(o=t).host&&o!==document&&o.host.nodeType?o.host:o.parentNode))}var o;return null}var b,y=/\s+/g;function w(t,e,i){var n;t&&e&&(t.classList?t.classList[i?"add":"remove"](e):(n=(" "+t.className+" ").replace(y," ").replace(" "+e+" "," "),t.className=(n+(i?" "+e:"")).replace(y," ")))}function E(t,e,i){var n=t&&t.style;if(n){if(void 0===i)return document.defaultView&&document.defaultView.getComputedStyle?i=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(i=t.currentStyle),void 0===e?i:i[e];n[e=e in n||-1!==e.indexOf("webkit")?e:"-webkit-"+e]=i+("string"==typeof i?"":"px")}}function C(t,e){var i="";if("string"==typeof t)i=t;else do{var n=E(t,"transform")}while(n&&"none"!==n&&(i=n+" "+i),!e&&(t=t.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(i)}function P(t,e,i){if(t){var n=t.getElementsByTagName(e),o=0,s=n.length;if(i)for(;o=e.left-n&&o<=e.right+n,n=s>=e.top-n&&s<=e.bottom+n;return i&&n?r=t:void 0}})),r);if(e){var i,n={};for(i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[F]._onDragOver(n)}}var o,s,r}function Lt(t){q&&q.parentNode[F]._isOutsideThisEl(t.target)}function Rt(t,i){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=i=n({},i),t[F]=this;var o,s,r={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return At(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Rt.supportPointer&&"PointerEvent"in window&&!u,emptyInsertThreshold:5};for(o in Y.initializePlugins(this,t,r),r)o in i||(i[o]=r[o]);for(s in Mt(i),this)"_"===s.charAt(0)&&"function"==typeof this[s]&&(this[s]=this[s].bind(this));this.nativeDraggable=!i.forceFallback&&Tt,this.nativeDraggable&&(this.options.touchStartThreshold=1),i.supportPointer?m(t,"pointerdown",this._onTapStart):(m(t,"mousedown",this._onTapStart),m(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(m(t,"dragover",this),m(t,"dragenter",this)),yt.push(this.el),i.store&&i.store.get&&this.sort(i.store.get(this)||[]),n(this,function(){var t,i=[];return{captureAnimationState:function(){i=[],this.options.animation&&[].slice.call(this.el.children).forEach((function(t){var n,o;"none"!==E(t,"display")&&t!==Rt.ghost&&(i.push({target:t,rect:x(t)}),n=e({},i[i.length-1].rect),!t.thisAnimationDuration||(o=C(t,!0))&&(n.top-=o.f,n.left-=o.e),t.fromRect=n)}))},addAnimationState:function(t){i.push(t)},removeAnimationState:function(t){i.splice(function(t,e){for(var i in t)if(t.hasOwnProperty(i))for(var n in e)if(e.hasOwnProperty(n)&&e[n]===t[i][n])return Number(i);return-1}(i,{target:t}),1)},animateAll:function(e){var n=this;if(!this.options.animation)return clearTimeout(t),void("function"==typeof e&&e());var o=!1,s=0;i.forEach((function(t){var e=0,i=t.target,r=i.fromRect,a=x(i),l=i.prevFromRect,h=i.prevToRect,c=t.rect,u=C(i,!0);u&&(a.top-=u.f,a.left-=u.e),i.toRect=a,i.thisAnimationDuration&&k(l,a)&&!k(r,a)&&(c.top-a.top)/(c.left-a.left)==(r.top-a.top)/(r.left-a.left)&&(t=c,u=l,l=h,h=n.options,e=Math.sqrt(Math.pow(u.top-t.top,2)+Math.pow(u.left-t.left,2))/Math.sqrt(Math.pow(u.top-l.top,2)+Math.pow(u.left-l.left,2))*h.animation),k(a,r)||(i.prevFromRect=r,i.prevToRect=a,e=e||n.options.animation,n.animate(i,c,a,e)),e&&(o=!0,s=Math.max(s,e),clearTimeout(i.animationResetTimer),i.animationResetTimer=setTimeout((function(){i.animationTime=0,i.prevFromRect=null,i.fromRect=null,i.prevToRect=null,i.thisAnimationDuration=null}),e),i.thisAnimationDuration=e)})),clearTimeout(t),o?t=setTimeout((function(){"function"==typeof e&&e()}),s):"function"==typeof e&&e(),i=[]},animate:function(t,e,i,n){var o,s;n&&(E(t,"transition",""),E(t,"transform",""),o=(s=C(this.el))&&s.a,s=s&&s.d,o=(e.left-i.left)/(o||1),s=(e.top-i.top)/(s||1),t.animatingX=!!o,t.animatingY=!!s,E(t,"transform","translate3d("+o+"px,"+s+"px,0)"),this.forRepaintDummy=t.offsetWidth,E(t,"transition","transform "+n+"ms"+(this.options.easing?" "+this.options.easing:"")),E(t,"transform","translate3d(0,0,0)"),"number"==typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout((function(){E(t,"transition",""),E(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1}),n))}}}())}function Wt(t,e,i,n,o,s,r,a){var c,u,p=t[F],d=p.options.onMove;return!window.CustomEvent||l||h?(c=document.createEvent("Event")).initEvent("move",!0,!0):c=new CustomEvent("move",{bubbles:!0,cancelable:!0}),c.to=e,c.from=t,c.dragged=i,c.draggedRect=n,c.related=o||e,c.relatedRect=s||x(e),c.willInsertAfter=a,c.originalEvent=r,t.dispatchEvent(c),d?d.call(p,c,r):u}function Ft(t){t.draggable=!1}function Bt(){Pt=!1}function Xt(t){return setTimeout(t,0)}function Yt(t){return clearTimeout(t)}xt&&!d&&document.addEventListener("click",(function(t){if(bt)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),bt=!1}),!0),Rt.prototype={constructor:Rt,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(ft=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,q):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,i=this.el,n=this.options,o=n.preventOnFilter,s=t.type,r=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,a=(r||t).target,l=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||a,h=n.filter;if(function(t){St.length=0;for(var e=t.getElementsByTagName("input"),i=e.length;i--;){var n=e[i];n.checked&&St.push(n)}}(i),!q&&!(/mousedown|pointerdown/.test(s)&&0!==t.button||n.disabled)&&!l.isContentEditable&&(this.nativeDraggable||!u||!a||"SELECT"!==a.tagName.toUpperCase())&&!((a=_(a,n.draggable,i,!1))&&a.animated||J===a)){if(et=O(a),nt=O(a,n.draggable),"function"==typeof h){if(h.call(this,t,a,this))return j({sortable:e,rootEl:l,name:"filter",targetEl:a,toEl:i,fromEl:i}),z("filter",e,{evt:t}),void(o&&t.cancelable&&t.preventDefault())}else if(h=h&&h.split(",").some((function(n){if(n=_(l,n.trim(),i,!1))return j({sortable:e,rootEl:n,name:"filter",targetEl:a,fromEl:i,toEl:i}),z("filter",e,{evt:t}),!0})))return void(o&&t.cancelable&&t.preventDefault());n.handle&&!_(l,n.handle,i,!1)||this._prepareDragStart(t,r,a)}}},_prepareDragStart:function(t,e,i){var n,o=this,s=o.el,r=o.options,a=s.ownerDocument;i&&!q&&i.parentNode===s&&(n=x(i),V=s,G=(q=i).parentNode,Q=q.nextSibling,J=i,st=r.group,at={target:Rt.dragged=q,clientX:(e||t).clientX,clientY:(e||t).clientY},ut=at.clientX-n.left,pt=at.clientY-n.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,q.style["will-change"]="all",n=function(){z("delayEnded",o,{evt:t}),Rt.eventCanceled?o._onDrop():(o._disableDelayedDragEvents(),!c&&o.nativeDraggable&&(q.draggable=!0),o._triggerDragStart(t,e),j({sortable:o,name:"choose",originalEvent:t}),w(q,r.chosenClass,!0))},r.ignore.split(",").forEach((function(t){P(q,t.trim(),Ft)})),m(a,"dragover",Ht),m(a,"mousemove",Ht),m(a,"touchmove",Ht),m(a,"mouseup",o._onDrop),m(a,"touchend",o._onDrop),m(a,"touchcancel",o._onDrop),c&&this.nativeDraggable&&(this.options.touchStartThreshold=4,q.draggable=!0),z("delayStart",this,{evt:t}),!r.delay||r.delayOnTouchOnly&&!e||this.nativeDraggable&&(h||l)?n():Rt.eventCanceled?this._onDrop():(m(a,"mouseup",o._disableDelayedDrag),m(a,"touchend",o._disableDelayedDrag),m(a,"touchcancel",o._disableDelayedDrag),m(a,"mousemove",o._delayedDragTouchMoveHandler),m(a,"touchmove",o._delayedDragTouchMoveHandler),r.supportPointer&&m(a,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(n,r.delay)))},_delayedDragTouchMoveHandler:function(t){t=t.touches?t.touches[0]:t,Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){q&&Ft(q),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;g(t,"mouseup",this._disableDelayedDrag),g(t,"touchend",this._disableDelayedDrag),g(t,"touchcancel",this._disableDelayedDrag),g(t,"mousemove",this._delayedDragTouchMoveHandler),g(t,"touchmove",this._delayedDragTouchMoveHandler),g(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?m(document,"pointermove",this._onTouchMove):m(document,e?"touchmove":"mousemove",this._onTouchMove):(m(q,"dragend",this),m(V,"dragstart",this._onDragStart));try{document.selection?Xt((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){var i;_t=!1,V&&q?(z("dragStarted",this,{evt:e}),this.nativeDraggable&&m(document,"dragover",Lt),i=this.options,t||w(q,i.dragClass,!1),w(q,i.ghostClass,!0),Rt.active=this,t&&this._appendGhost(),j({sortable:this,name:"start",originalEvent:e})):this._nulling()},_emulateDragOver:function(){if(lt){this._lastX=lt.clientX,this._lastY=lt.clientY,kt();for(var t=document.elementFromPoint(lt.clientX,lt.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(lt.clientX,lt.clientY))!==e;)e=t;if(q.parentNode[F]._isOutsideThisEl(t),e)do{if(e[F]&&e[F]._onDragOver({clientX:lt.clientX,clientY:lt.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break}while(e=(t=e).parentNode);Nt()}},_onTouchMove:function(t){if(at){var e=(a=this.options).fallbackTolerance,i=a.fallbackOffset,n=t.touches?t.touches[0]:t,o=K&&C(K,!0),s=K&&o&&o.a,r=K&&o&&o.d,a=It&&vt&&A(vt);s=(n.clientX-at.clientX+i.x)/(s||1)+(a?a[0]-Ct[0]:0)/(s||1),r=(n.clientY-at.clientY+i.y)/(r||1)+(a?a[1]-Ct[1]:0)/(r||1);if(!Rt.active&&!_t){if(e&&Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))i.right+10||t.clientX<=i.right&&t.clientY>i.bottom&&t.clientX>=i.left:t.clientX>i.right&&t.clientY>i.top||t.clientX<=i.right&&t.clientY>i.bottom+10}(t,o,this)&&!y.animated){if(y===q)return W(!1);if((a=y&&r===t.target?y:a)&&(C=x(a)),!1!==Wt(V,r,q,i,a,C,t,!!a))return R(),y&&y.nextSibling?r.insertBefore(q,y.nextSibling):r.appendChild(q),G=r,B(),W(!0)}else if(y&&function(t,e,i){return i=x(D(i.el,0,i.options,!0)),e?t.clientX",options:{classes:{},disabled:!1,create:null},_createWidget:function(e,i){i=t(i||this.defaultElement||this)[0],this.element=t(i),this.uuid=u++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classesElementLookup={},i!==this&&(t.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===i&&this.destroy()}}),this.document=t(i.style?i.ownerDocument:i.document||i),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classesElementLookup,(function(t,i){e._removeClass(i,t)})),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var n,o,s,r=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(r={},e=(n=e.split(".")).shift(),n.length){for(o=r[e]=t.widget.extend({},this.options[e]),s=0;s
"),o=n.children()[0];return t("body").append(n),e=o.offsetWidth,n.css("overflow","scroll"),e===(o=o.offsetWidth)&&(o=n[0].clientWidth),n.remove(),i=e-o},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),n=e.isWindow||e.isDocument?"":e.element.css("overflow-y");i="scroll"===i||"auto"===i&&e.widthn(o(r),o(d))?f.important="horizontal":f.important="vertical",e.using.call(this,t,f)}),a.offset(t.extend(S,{using:r}))}))},t.ui.position={fit:{left:function(t,e){var i=e.within,o=i.isWindow?i.scrollLeft:i.offset.left,s=i.width,r=t.left-e.collisionPosition.marginLeft,a=o-r,l=r+e.collisionWidth-s-o;e.collisionWidth>s?0s?0=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),t.ui.plugin={add:function(e,i,n){var o,s=t.ui[e].prototype;for(o in n)s.plugins[o]=s.plugins[o]||[],s.plugins[o].push([i,n[o]])},call:function(t,e,i,n){var o,s=t.plugins[e];if(s&&(n||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(o=0;o").css("position","absolute").appendTo(e.parent()).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).offset(e.offset())[0]}))},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(e){var i=t.ui.safeActiveElement(this.document[0]);t(e.target).closest(i).length||t.ui.safeBlur(i)},_mouseStart:function(e){var i=this.options;return this.helper=this._createHelper(e),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),t.ui.ddmanager&&(t.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=0i[2]&&(s=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3]&&(r=i[3]+this.offset.click.top)),n.grid&&(t=n.grid[1]?this.originalPageY+Math.round((r-this.originalPageY)/n.grid[1])*n.grid[1]:this.originalPageY,r=!i||t-this.offset.click.top>=i[1]||t-this.offset.click.top>i[3]?t:t-this.offset.click.top>=i[1]?t-n.grid[1]:t+n.grid[1],t=n.grid[0]?this.originalPageX+Math.round((s-this.originalPageX)/n.grid[0])*n.grid[0]:this.originalPageX,s=!i||t-this.offset.click.left>=i[0]||t-this.offset.click.left>i[2]?t:t-this.offset.click.left>=i[0]?t-n.grid[0]:t+n.grid[0]),"y"===n.axis&&(s=this.originalPageX),"x"===n.axis&&(r=this.originalPageY)),{top:r-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:o?0:this.offset.scroll.top),left:s-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:o?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(e,i,n){return n=n||this._uiHash(),t.ui.plugin.call(this,e,[i,n,this],!0),/^(drag|start|stop)/.test(e)&&(this.positionAbs=this._convertPositionTo("absolute"),n.offset=this.positionAbs),t.Widget.prototype._trigger.call(this,e,i,n)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),t.ui.plugin.add("draggable","connectToSortable",{start:function(e,i,n){var o=t.extend({},i,{item:n.element});n.sortables=[],t(n.options.connectToSortable).each((function(){var i=t(this).sortable("instance");i&&!i.options.disabled&&(n.sortables.push(i),i.refreshPositions(),i._trigger("activate",e,o))}))},stop:function(e,i,n){var o=t.extend({},i,{item:n.element});n.cancelHelperRemoval=!1,t.each(n.sortables,(function(){var t=this;t.isOver?(t.isOver=0,n.cancelHelperRemoval=!0,t.cancelHelperRemoval=!1,t._storedCSS={position:t.placeholder.css("position"),top:t.placeholder.css("top"),left:t.placeholder.css("left")},t._mouseStop(e),t.options.helper=t.options._helper):(t.cancelHelperRemoval=!0,t._trigger("deactivate",e,o))}))},drag:function(e,i,n){t.each(n.sortables,(function(){var o=!1,s=this;s.positionAbs=n.positionAbs,s.helperProportions=n.helperProportions,s.offset.click=n.offset.click,s._intersectsWith(s.containerCache)&&(o=!0,t.each(n.sortables,(function(){return this.positionAbs=n.positionAbs,this.helperProportions=n.helperProportions,this.offset.click=n.offset.click,o=(this===s||!this._intersectsWith(this.containerCache)||!t.contains(s.element[0],this.element[0]))&&o}))),o?(s.isOver||(s.isOver=1,n._parent=i.helper.parent(),s.currentItem=i.helper.appendTo(s.element).data("ui-sortable-item",!0),s.options._helper=s.options.helper,s.options.helper=function(){return i.helper[0]},e.target=s.currentItem[0],s._mouseCapture(e,!0),s._mouseStart(e,!0,!0),s.offset.click.top=n.offset.click.top,s.offset.click.left=n.offset.click.left,s.offset.parent.left-=n.offset.parent.left-s.offset.parent.left,s.offset.parent.top-=n.offset.parent.top-s.offset.parent.top,n._trigger("toSortable",e),n.dropped=s.element,t.each(n.sortables,(function(){this.refreshPositions()})),n.currentItem=n.element,s.fromOutside=n),s.currentItem&&(s._mouseDrag(e),i.position=s.position)):s.isOver&&(s.isOver=0,s.cancelHelperRemoval=!0,s.options._revert=s.options.revert,s.options.revert=!1,s._trigger("out",e,s._uiHash(s)),s._mouseStop(e,!0),s.options.revert=s.options._revert,s.options.helper=s.options._helper,s.placeholder&&s.placeholder.remove(),i.helper.appendTo(n._parent),n._refreshOffsets(e),i.position=n._generatePosition(e,!0),n._trigger("fromSortable",e),n.dropped=!1,t.each(n.sortables,(function(){this.refreshPositions()})))}))}}),t.ui.plugin.add("draggable","cursor",{start:function(e,i,n){var o=t("body");n=n.options;o.css("cursor")&&(n._cursor=o.css("cursor")),o.css("cursor",n.cursor)},stop:function(e,i,n){(n=n.options)._cursor&&t("body").css("cursor",n._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:function(e,i,n){i=t(i.helper),n=n.options,i.css("opacity")&&(n._opacity=i.css("opacity")),i.css("opacity",n.opacity)},stop:function(e,i,n){(n=n.options)._opacity&&t(i.helper).css("opacity",n._opacity)}}),t.ui.plugin.add("draggable","scroll",{start:function(t,e,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1)),i.scrollParentNotHidden[0]!==i.document[0]&&"HTML"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(e,i,n){var o=n.options,s=!1,r=n.scrollParentNotHidden[0],a=n.document[0];r!==a&&"HTML"!==r.tagName?(o.axis&&"x"===o.axis||(n.overflowOffset.top+r.offsetHeight-e.pageY *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(t,e,i){return e<=t&&t*{ cursor: "+r.cursor+" !important; }").appendTo(s)),r.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",r.zIndex)),r.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",r.opacity)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!n)for(o=this.containers.length-1;0<=o;o--)this.containers[o]._trigger("activate",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!r.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this._addClass(this.helper,"ui-sortable-helper"),this.helper.parent().is(this.appendTo)||(this.helper.detach().appendTo(this.appendTo),this.offset.parent=this._getParentOffset()),this.position=this.originalPosition=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,this.lastPositionAbs=this.positionAbs=this._convertPositionTo("absolute"),this._mouseDrag(e),!0},_scroll:function(t){var e=this.options,i=!1;return this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageYt[this.floating?"width":"height"]?h&&c:s",e.document[0]);return e._addClass(o,"ui-sortable-placeholder",i||e.currentItem[0].className)._removeClass(o,"ui-sortable-helper"),"tbody"===n?e._createTrPlaceholder(e.currentItem.find("tr").eq(0),t("",e.document[0]).appendTo(o)):"tr"===n?e._createTrPlaceholder(e.currentItem,o):"img"===n&&o.attr("src",e.currentItem.attr("src")),i||o.css("visibility","hidden"),o},update:function(t,s){i&&!o.forcePlaceholderSize||(s.height()&&(!o.forcePlaceholderSize||"tbody"!==n&&"tr"!==n)||s.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),s.width()||s.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10)))}}),e.placeholder=t(o.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),o.placeholder.update(e,e.placeholder)},_createTrPlaceholder:function(e,i){var n=this;e.children().each((function(){t(" ",n.document[0]).attr("colspan",t(this).attr("colspan")||1).appendTo(i)}))},_contactContainers:function(e){for(var i,n,o,s,r,a,l,h,c,u=null,p=null,d=this.containers.length-1;0<=d;d--)t.contains(this.currentItem[0],this.containers[d].element[0])||(this._intersectsWith(this.containers[d].containerCache)?u&&t.contains(this.containers[d].element[0],u.element[0])||(u=this.containers[d],p=d):this.containers[d].containerCache.over&&(this.containers[d]._trigger("out",e,this._uiHash(this)),this.containers[d].containerCache.over=0));if(u)if(1===this.containers.length)this.containers[p].containerCache.over||(this.containers[p]._trigger("over",e,this._uiHash(this)),this.containers[p].containerCache.over=1);else{for(n=1e4,o=null,s=(h=u.floating||this._isFloating(this.currentItem))?"left":"top",r=h?"width":"height",c=h?"pageX":"pageY",i=this.items.length-1;0<=i;i--)t.contains(this.containers[p].element[0],this.items[i].item[0])&&this.items[i].item[0]!==this.currentItem[0]&&(a=this.items[i].item.offset()[s],l=!1,e[c]-a>this.items[i][r]/2&&(l=!0),Math.abs(e[c]-a)this.containment[2]&&(n=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(o=this.containment[3]+this.offset.click.top)),i.grid&&(e=this.originalPageY+Math.round((o-this.originalPageY)/i.grid[1])*i.grid[1],o=!this.containment||e-this.offset.click.top>=this.containment[1]&&e-this.offset.click.top<=this.containment[3]?e:e-this.offset.click.top>=this.containment[1]?e-i.grid[1]:e+i.grid[1],e=this.originalPageX+Math.round((n-this.originalPageX)/i.grid[0])*i.grid[0],n=!this.containment||e-this.offset.click.left>=this.containment[0]&&e-this.offset.click.left<=this.containment[2]?e:e-this.offset.click.left>=this.containment[0]?e-i.grid[0]:e+i.grid[0])),{top:o-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():r?0:s.scrollTop()),left:n-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():r?0:s.scrollLeft())}},_rearrange:function(t,e,i,n){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var o=this.counter;this._delay((function(){o===this.counter&&this.refreshPositions(!n)}))},_clear:function(t,e){this.reverting=!1;var i,n=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(i in this._storedCSS)"auto"!==this._storedCSS[i]&&"static"!==this._storedCSS[i]||(this._storedCSS[i]="");this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();function o(t,e,i){return function(n){i._trigger(t,n,e._uiHash(e))}}for(this.fromOutside&&!e&&n.push((function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))})),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||n.push((function(t){this._trigger("update",t,this._uiHash())})),this!==this.currentContainer&&(e||(n.push((function(t){this._trigger("remove",t,this._uiHash())})),n.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),n.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),i=this.containers.length-1;0<=i;i--)e||n.push(o("deactivate",this,this.containers[i])),this.containers[i].containerCache.over&&(n.push(o("out",this,this.containers[i])),this.containers[i].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!e){for(i=0;i",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.lastMousePosition={x:null,y:null},this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault(),this._activateItem(t)},"click .ui-menu-item":function(e){var i=t(e.target),n=t(t.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(e),e.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(e):!this.element.is(":focus")&&n.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":"_activateItem","mousemove .ui-menu-item":"_activateItem",mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this._menuItems().first();e||this.focus(t,i)},blur:function(e){this._delay((function(){t.contains(this.element[0],t.ui.safeActiveElement(this.document[0]))||this.collapseAll(e)}))},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&this.collapseAll(t,!0),this.mouseHandled=!1}})},_activateItem:function(e){var i,n;this.previousFilter||e.clientX===this.lastMousePosition.x&&e.clientY===this.lastMousePosition.y||(this.lastMousePosition={x:e.clientX,y:e.clientY},i=t(e.target).closest(".ui-menu-item"),n=t(e.currentTarget),i[0]===n[0]&&(n.is(".ui-state-active")||(this._removeClass(n.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(e,n))))},_destroy:function(){var e=this.element.find(".ui-menu-item").removeAttr("role aria-disabled").children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),e.children().each((function(){var e=t(this);e.data("ui-menu-submenu-caret")&&e.remove()}))},_keydown:function(e){var i,n,o,s=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:i=this.previousFilter||"",o=s=!1,n=96<=e.keyCode&&e.keyCode<=105?(e.keyCode-96).toString():String.fromCharCode(e.keyCode),clearTimeout(this.filterTimer),n===i?o=!0:n=i+n,i=this._filterMenuItems(n),(i=o&&-1!==i.index(this.active.next())?this.active.nextAll(".ui-menu-item"):i).length||(n=String.fromCharCode(e.keyCode),i=this._filterMenuItems(n)),i.length?(this.focus(e,i),this.previousFilter=n,this.filterTimer=this._delay((function(){delete this.previousFilter}),1e3)):delete this.previousFilter}s&&e.preventDefault()},_activate:function(t){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var e,i,n=this,o=this.options.icons.submenu,s=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),i=s.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each((function(){var e=t(this),i=e.prev(),s=t("").data("ui-menu-submenu-caret",!0);n._addClass(s,"ui-menu-icon","ui-icon "+o),i.attr("aria-haspopup","true").prepend(s),e.attr("aria-labelledby",i.attr("id"))})),this._addClass(i,"ui-menu","ui-widget ui-widget-content ui-front"),(e=s.add(this.element).find(this.options.items)).not(".ui-menu-item").each((function(){var e=t(this);n._isDivider(e)&&n._addClass(e,"ui-menu-divider","ui-widget-content")})),s=(i=e.not(".ui-menu-item, .ui-menu-divider")).children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(i,"ui-menu-item")._addClass(s,"ui-menu-item-wrapper"),e.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){var i;"icons"===t&&(i=this.element.find(".ui-menu-icon"),this._removeClass(i,null,this.options.icons.submenu)._addClass(i,null,e.submenu)),this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",String(t)),this._toggleClass(null,"ui-state-disabled",!!t)},focus:function(t,e){var i;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),i=this.active.children(".ui-menu-item-wrapper"),this._addClass(i,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",i.attr("id")),i=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(i,null,"ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay((function(){this._close()}),this.delay),(i=e.children(".ui-menu")).length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var i,n,o;this._hasScroll()&&(n=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,o=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,i=e.offset().top-this.activeMenu.offset().top-n-o,n=this.activeMenu.scrollTop(),o=this.activeMenu.height(),e=e.outerHeight(),i<0?this.activeMenu.scrollTop(n+i):o",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,liveRegionTimer:null,_create:function(){var e,i,n,o="textarea"===(s=this.element[0].nodeName.toLowerCase()),s="input"===s;this.isMultiLine=o||!s&&this._isContentEditable(this.element),this.valueMethod=this.element[o||s?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(o){if(this.element.prop("readOnly"))i=n=e=!0;else{i=n=e=!1;var s=t.ui.keyCode;switch(o.keyCode){case s.PAGE_UP:e=!0,this._move("previousPage",o);break;case s.PAGE_DOWN:e=!0,this._move("nextPage",o);break;case s.UP:e=!0,this._keyEvent("previous",o);break;case s.DOWN:e=!0,this._keyEvent("next",o);break;case s.ENTER:this.menu.active&&(e=!0,o.preventDefault(),this.menu.select(o));break;case s.TAB:this.menu.active&&this.menu.select(o);break;case s.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(o),o.preventDefault());break;default:i=!0,this._searchTimeout(o)}}},keypress:function(n){if(e)return e=!1,void(this.isMultiLine&&!this.menu.element.is(":visible")||n.preventDefault());if(!i){var o=t.ui.keyCode;switch(n.keyCode){case o.PAGE_UP:this._move("previousPage",n);break;case o.PAGE_DOWN:this._move("nextPage",n);break;case o.UP:this._keyEvent("previous",n);break;case o.DOWN:this._keyEvent("next",n)}}},input:function(t){if(n)return n=!1,void t.preventDefault();this._searchTimeout(t)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){clearTimeout(this.searching),this.close(t),this._change(t)}}),this._initSource(),this.menu=t("
    ").appendTo(this._appendTo()).menu({role:null}).hide().attr({unselectable:"on"}).menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(t){t.preventDefault()},menufocus:function(e,i){var n,o;if(this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type)))return this.menu.blur(),void this.document.one("mousemove",(function(){t(e.target).trigger(e.originalEvent)}));o=i.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",e,{item:o})&&e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(o.value),(n=i.item.attr("aria-label")||o.value)&&String.prototype.trim.call(n).length&&(clearTimeout(this.liveRegionTimer),this.liveRegionTimer=this._delay((function(){this.liveRegion.html(t("
    ").text(n))}),100))},menuselect:function(e,i){var n=i.item.data("ui-autocomplete-item"),o=this.previous;this.element[0]!==t.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=o,this._delay((function(){this.previous=o,this.selectedItem=n}))),!1!==this._trigger("select",e,{item:n})&&this._value(n.value),this.term=this._value(),this.close(e),this.selectedItem=n}}),this.liveRegion=t("
    ",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(e){var i=this.menu.element[0];return e.target===this.element[0]||e.target===i||t.contains(i,e.target)},_closeOnClickOutside:function(t){this._isEventTargetInWidget(t)||this.close()},_appendTo:function(){var e=this.options.appendTo;return(e=(e=e&&(e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)))&&e[0]?e:this.element.closest(".ui-front, dialog")).length?e:this.document[0].body},_initSource:function(){var e,i,n=this;Array.isArray(this.options.source)?(e=this.options.source,this.source=function(i,n){n(t.ui.autocomplete.filter(e,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(e,o){n.xhr&&n.xhr.abort(),n.xhr=t.ajax({url:i,data:e,dataType:"json",success:function(t){o(t)},error:function(){o([])}})}):this.source=this.options.source},_searchTimeout:function(t){clearTimeout(this.searching),this.searching=this._delay((function(){var e=this.term===this._value(),i=this.menu.element.is(":visible"),n=t.altKey||t.ctrlKey||t.metaKey||t.shiftKey;e&&(i||n)||(this.selectedItem=null,this.search(null,t))}),this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length").append(t("
    ").text(i.label)).appendTo(e)},_move:function(t,e){if(this.menu.element.is(":visible"))return this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this.isMultiLine||this._value(this.term),void this.menu.blur()):void this.menu[t](e);this.search(null,e)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){this.isMultiLine&&!this.menu.element.is(":visible")||(this._move(t,e),e.preventDefault())},_isContentEditable:function(t){if(!t.length)return!1;var e=t.prop("contentEditable");return"inherit"===e?this._isContentEditable(t.parent()):"true"===e}}),t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,i){var n=new RegExp(t.ui.autocomplete.escapeRegex(i),"i");return t.grep(e,(function(t){return n.test(t.label||t.value||t)}))}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(1").text(i))}),100))}}),t.ui.autocomplete})),function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==("undefined"==typeof module?"undefined":_typeof(module))&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,(function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},n=i[t]=i[t]||[];return-1==n.indexOf(e)&&n.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{};return(i[t]=i[t]||{})[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=i.indexOf(e);return-1!=n&&i.splice(n,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=0,o=i[n];e=e||[];for(var s=this._onceEvents&&this._onceEvents[t];o;){var r=s&&s[o];r&&(this.off(t,o),delete s[o]),o.apply(this,e),o=i[n+=r?0:1]}return this}},t})),function(t,e){"function"==typeof define&&define.amd?define("unipointer/unipointer",["ev-emitter/ev-emitter"],(function(i){return e(t,i)})):"object"==("undefined"==typeof module?"undefined":_typeof(module))&&module.exports?module.exports=e(t,require("ev-emitter")):t.Unipointer=e(t,t.EvEmitter)}(window,(function(t,e){function i(){}var n=i.prototype=Object.create(e.prototype);n.bindStartEvent=function(t){this._bindStartEvent(t,!0)},n.unbindStartEvent=function(t){this._bindStartEvent(t,!1)},n._bindStartEvent=function(e,i){var n=(i=void 0===i||!!i)?"addEventListener":"removeEventListener";t.navigator.pointerEnabled?e[n]("pointerdown",this):t.navigator.msPointerEnabled?e[n]("MSPointerDown",this):(e[n]("mousedown",this),e[n]("touchstart",this))},n.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},n.getTouch=function(t){for(var e=0;e.5;var o=this.colorGrid[e.toUpperCase()];this.updateCursor(o),this.setTexts(),this.setBackgrounds(),i||this.emitEvent("change",[e,t.hue,t.sat,t.lum])}},h.setTexts=function(){if(this.setTextElems)for(var t=0;t0&&n.attr("value",i)}$(".message-container").length&&setTimeout((function(){$(".message-container").fadeOut()}),3500),$("#upload").change((function(){!function(t){if(t.files&&t.files[0]){var e=new FileReader;e.onload=function(t){$("#appimage img").attr("src",t.target.result)},e.readAsDataURL(t.files[0])}}(this)}));var o,s=document.getElementById("sortable");null!==s&&(o=Sortable.create(s,{disabled:!0,animation:150,forceFallback:!(navigator.userAgent.toLowerCase().indexOf("firefox")>-1),draggable:".item-container",onEnd:function(){var e=o.toArray();$.post("".concat(t,"order"),{order:e})}}),navigator.userAgent.toLowerCase().indexOf("firefox")>-1&&(o.option("setData",(function(t){t.setData("Text","")})),s.addEventListener("dragstart",(function(t){"a"===t.target.nodeName.toLowerCase()&&(t.preventDefault(),t.stopPropagation(),t.dataTransfer.setData("Text",""))})))),$("#main").on("mouseenter","#sortable .item",(function(){$(this).siblings(".tooltip").addClass("active"),$(".refresh",this).addClass("active")})).on("mouseleave",".item",(function(){$(this).siblings(".tooltip").removeClass("active"),$(".refresh",this).removeClass("active")})),$("#config-buttons").on("mouseenter","a",(function(){$(".tooltip",this).addClass("active")})).on("mouseleave","a",(function(){$(".tooltip",this).removeClass("active")})),$(".searchform > form").on("submit",(function(t){"tiles"===$("#search-container select[name=provider]").val()&&t.preventDefault()})),$("#search-container").on("input","input[name=q]",(function(){var t=this.value,e=$("#sortable").children(".item-container");"tiles"===$("#search-container select[name=provider]").val()&&t.length>0?(e.hide(),e.filter((function(){return $(this).data("name").toLowerCase().includes(t.toLowerCase())})).show()):e.show()})).on("change","select[name=provider]",(function(){var t=$("#sortable").children(".item-container");if("tiles"===$(this).val()){$("#search-container button").hide();var e=$("#search-container input[name=q]").val();e.length>0?(t.hide(),t.filter((function(){return $(this).data("name").toLowerCase().includes(e.toLowerCase())})).show()):t.show()}else $("#search-container button").show(),t.show()})),$("#app").on("click","#config-button",(function(t){t.preventDefault();var e=$("#app"),i=e.hasClass("header");e.toggleClass("header"),i?($(".add-item").hide(),$(".item-edit").hide(),$("#app").removeClass("sidebar"),$("#sortable .tooltip").css("display",""),void 0!==o&&o.option("disabled",!0)):($("#sortable .tooltip").css("display","none"),void 0!==o&&o.option("disabled",!1),setTimeout((function(){$(".add-item").fadeIn(),$(".item-edit").fadeIn()}),350))})).on("click","#add-item, #pin-item",(function(t){t.preventDefault(),$("#app").toggleClass("sidebar")})).on("click",".close-sidenav",(function(t){t.preventDefault(),$("#app").removeClass("sidebar")})).on("click","#test_config",(function(e){e.preventDefault();var n=$("#create input[name=url]").val(),o=$('#sapconfig input[name="config[override_url]"]').val();"string"==typeof o&&""!==o&&(n=o);var s={};s.url=n,$(".config-item").each((function(){var t=$(this).data("config");s[t]=$(this).val()})),s.id=$("form[data-item-id]").data("item-id"),s.password&&s.password===i&&(s.password=""),$.post("".concat(t,"test_config"),{data:s}).done((function(t){alert(t)})).fail((function(t){alert("Something went wrong: ".concat(t.responseText.substring(0,100)))}))})),$("#pinlist").on("click","a",(function(e){e.preventDefault();var i=$(this),n=i.data("id"),o=i.data("tag");$.get("".concat(t,"items/pintoggle/").concat(n,"/true/").concat(o),(function(t){var e=$(t).filter("#sortable").html();$("#sortable").html(e),i.toggleClass("active")}))})),$("#itemform").on("submit",(function(){var t=$('input[name="config[password]"]').first();t.length>0&&t.attr("value")===i&&t.attr("value","")}))}));var focusSearch=function(t){var e=document.querySelector('input[name="q"]');e&&(t.preventDefault(),e.focus())},openFirstNonHiddenItem=function(t){if(t.target===document.querySelector('input[name="q"]')&&"tiles"===document.querySelector("#search-container select[name=provider]").value){var e=document.querySelector('#sortable section.item-container:not([style="display: none;"]) a');"href"in e&&(t.preventDefault(),window.open(e.href))}},KEY_BINDINGS={"/":focusSearch,Enter:openFirstNonHiddenItem};document.addEventListener("keydown",(function(t){try{t.key in KEY_BINDINGS&&KEY_BINDINGS[t.key](t)}catch(t){}}));var EXPORT_FILE_NAME="HeimdallExport.json",EXPORT_API_URL="api/item";function triggerFileDownload(t,e){var i=document.createElement("a"),n=new Blob([e],{type:"text/plain"});i.href=URL.createObjectURL(n),i.download=EXPORT_FILE_NAME,i.click()}var exportItems=function(t){t.preventDefault(),fetch(EXPORT_API_URL).then((function(t){return 200!==t.status&&window.alert("An error occurred while exporting..."),t.json()})).then((function(t){var e=JSON.stringify(t,null,2);triggerFileDownload(EXPORT_FILE_NAME,e)}))},exportButton=document.querySelector("#item-export");exportButton&&exportButton.addEventListener("click",exportItems);var IMPORT_API_URL="api/item",APP_LOAD_URL="appload",updateStatus=function(t){var e,i=t.item,n=t.errors;console.log(i,n),e=0===n.length?'
  • Imported: '.concat(i.title,"
  • "):'
  • Failed: '.concat(i.title," - ").concat(n[0],"
  • "),document.querySelector(".import-status").innerHTML+=e};function clearStatus(){document.querySelector(".import-status").innerHTML=""}var postToApi=function(t,e){return fetch(IMPORT_API_URL,{method:"POST",cache:"no-cache",redirect:"follow",headers:{"Content-Type":"application/json","X-CSRF-TOKEN":e},body:JSON.stringify(t)})},getCSRFToken=function(){return document.querySelector('input[name="_token"]').value},mergeItemWithAppDetails=function(t,e){return{pinned:1,tags:[0],appid:t.appid,title:t.title,colour:t.colour,url:t.url,appdescription:t.appdescription?t.appdescription:e.description,website:e.website,icon:e.iconview,config:t.description?JSON.parse(t.description):null}},fetchAppDetails=function(t){return null===t||"null"===t?Promise.resolve({}):fetch(APP_LOAD_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({app:t})}).then((function(t){return t.json()}))},importItems=function(t){t.forEach((function(t){var e=[];fetchAppDetails(t.appid).catch((function(){return e.push(new Error("Failed to find app id: ".concat(t.appid)))})).then((function(e){var i=mergeItemWithAppDetails(t,e),n=getCSRFToken();return postToApi(i,n)})).catch((function(){return e.push(new Error("Failed to create item: ".concat(t.title)))})).finally((function(){updateStatus({item:t,errors:e})}))}))},readJSON=function(t){return new Promise((function(e,i){try{var n=new FileReader;n.onload=function(t){var i=t.target.result;e(JSON.parse(i))},n.readAsText(t)}catch(t){i(new Error("Unable to read file"))}}))},openFileForImport=function(t){return clearStatus(),readJSON(t).catch((function(t){console.error(t)})).then(importItems)},fileInput=document.querySelector("input[name='import']"),importButtons=document.querySelectorAll(".import-button");fileInput&&importButtons&&(importButtons.forEach((function(t){t.addEventListener("click",(function(){var t=fileInput.files[0];t&&openFileForImport(t)}))})),fileInput.addEventListener("change",openFileForImport,!1));var REFRESH_INTERVAL_SMALL=5e3,REFRESH_INTERVAL_BIG=3e4,QUEUE_PROCESSING_INTERVAL=1e3,CONTAINER_SELECTOR=".livestats-container";function createQueue(){var t=[],e=!1;return document.addEventListener("visibilitychange",(function(){e=document.hidden})),setInterval((function(){0!==t.length&&!0!==e&&t.shift()()}),QUEUE_PROCESSING_INTERVAL),t}function getContainers(){return document.querySelectorAll(CONTAINER_SELECTOR)}function getQueueInterval(t,e){return t?REFRESH_INTERVAL_BIG:e?REFRESH_INTERVAL_SMALL:REFRESH_INTERVAL_BIG}function createUpdateJob(t,e){var i=t.getAttribute("data-id"),n="1"===t.getAttribute("data-dataonly");return function(){return fetch("get_stats/".concat(i)).then((function(t){if(t.ok)return t.json();throw new Error("Network response was not ok: ".concat(t.status))})).then((function(i){t.innerHTML=i.html;var o="active"===i.status;e&&setTimeout((function(){e.push(createUpdateJob(t,e))}),getQueueInterval(n,o))})).catch((function(t){console.error(t)}))}}var livestatContainers=getContainers();if(livestatContainers.length>0){var myQueue=createQueue();livestatContainers.forEach((function(t){createUpdateJob(t,myQueue)()}))} +function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}!function(t,e){"object"==("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).Sortable=e()}(this,(function(){"use strict";function t(t,e){var i,n=Object.keys(t);return Object.getOwnPropertySymbols&&(i=Object.getOwnPropertySymbols(t),e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)),n}function e(e){for(var i=1;it.length)&&(e=t.length);for(var i=0,n=new Array(e);i"===e[0]&&(e=e.substring(1)),t))try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(t){return}}function _(t,e,i,n){if(t){i=i||document;do{if(null!=e&&(">"!==e[0]||t.parentNode===i)&&v(t,e)||n&&t===i)return t}while(t!==i&&(t=(o=t).host&&o!==document&&o.host.nodeType?o.host:o.parentNode))}var o;return null}var b,y=/\s+/g;function w(t,e,i){var n;t&&e&&(t.classList?t.classList[i?"add":"remove"](e):(n=(" "+t.className+" ").replace(y," ").replace(" "+e+" "," "),t.className=(n+(i?" "+e:"")).replace(y," ")))}function E(t,e,i){var n=t&&t.style;if(n){if(void 0===i)return document.defaultView&&document.defaultView.getComputedStyle?i=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(i=t.currentStyle),void 0===e?i:i[e];n[e=e in n||-1!==e.indexOf("webkit")?e:"-webkit-"+e]=i+("string"==typeof i?"":"px")}}function C(t,e){var i="";if("string"==typeof t)i=t;else do{var n=E(t,"transform")}while(n&&"none"!==n&&(i=n+" "+i),!e&&(t=t.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(i)}function P(t,e,i){if(t){var n=t.getElementsByTagName(e),o=0,s=n.length;if(i)for(;o=e.left-n&&o<=e.right+n,n=s>=e.top-n&&s<=e.bottom+n;return i&&n?r=t:void 0}})),r);if(e){var i,n={};for(i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[B]._onDragOver(n)}}var o,s,r}function Rt(t){G&&G.parentNode[B]._isOutsideThisEl(t.target)}function Wt(t,i){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=i=n({},i),t[B]=this;var o,s,r={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Mt(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Wt.supportPointer&&"PointerEvent"in window&&!u,emptyInsertThreshold:5};for(o in U.initializePlugins(this,t,r),r)o in i||(i[o]=r[o]);for(s in kt(i),this)"_"===s.charAt(0)&&"function"==typeof this[s]&&(this[s]=this[s].bind(this));this.nativeDraggable=!i.forceFallback&&At,this.nativeDraggable&&(this.options.touchStartThreshold=1),i.supportPointer?m(t,"pointerdown",this._onTapStart):(m(t,"mousedown",this._onTapStart),m(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(m(t,"dragover",this),m(t,"dragenter",this)),wt.push(this.el),i.store&&i.store.get&&this.sort(i.store.get(this)||[]),n(this,function(){var t,i=[];return{captureAnimationState:function(){i=[],this.options.animation&&[].slice.call(this.el.children).forEach((function(t){var n,o;"none"!==E(t,"display")&&t!==Wt.ghost&&(i.push({target:t,rect:x(t)}),n=e({},i[i.length-1].rect),!t.thisAnimationDuration||(o=C(t,!0))&&(n.top-=o.f,n.left-=o.e),t.fromRect=n)}))},addAnimationState:function(t){i.push(t)},removeAnimationState:function(t){i.splice(function(t,e){for(var i in t)if(t.hasOwnProperty(i))for(var n in e)if(e.hasOwnProperty(n)&&e[n]===t[i][n])return Number(i);return-1}(i,{target:t}),1)},animateAll:function(e){var n=this;if(!this.options.animation)return clearTimeout(t),void("function"==typeof e&&e());var o=!1,s=0;i.forEach((function(t){var e=0,i=t.target,r=i.fromRect,a=x(i),l=i.prevFromRect,h=i.prevToRect,c=t.rect,u=C(i,!0);u&&(a.top-=u.f,a.left-=u.e),i.toRect=a,i.thisAnimationDuration&&k(l,a)&&!k(r,a)&&(c.top-a.top)/(c.left-a.left)==(r.top-a.top)/(r.left-a.left)&&(t=c,u=l,l=h,h=n.options,e=Math.sqrt(Math.pow(u.top-t.top,2)+Math.pow(u.left-t.left,2))/Math.sqrt(Math.pow(u.top-l.top,2)+Math.pow(u.left-l.left,2))*h.animation),k(a,r)||(i.prevFromRect=r,i.prevToRect=a,e=e||n.options.animation,n.animate(i,c,a,e)),e&&(o=!0,s=Math.max(s,e),clearTimeout(i.animationResetTimer),i.animationResetTimer=setTimeout((function(){i.animationTime=0,i.prevFromRect=null,i.fromRect=null,i.prevToRect=null,i.thisAnimationDuration=null}),e),i.thisAnimationDuration=e)})),clearTimeout(t),o?t=setTimeout((function(){"function"==typeof e&&e()}),s):"function"==typeof e&&e(),i=[]},animate:function(t,e,i,n){var o,s;n&&(E(t,"transition",""),E(t,"transform",""),o=(s=C(this.el))&&s.a,s=s&&s.d,o=(e.left-i.left)/(o||1),s=(e.top-i.top)/(s||1),t.animatingX=!!o,t.animatingY=!!s,E(t,"transform","translate3d("+o+"px,"+s+"px,0)"),this.forRepaintDummy=t.offsetWidth,E(t,"transition","transform "+n+"ms"+(this.options.easing?" "+this.options.easing:"")),E(t,"transform","translate3d(0,0,0)"),"number"==typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout((function(){E(t,"transition",""),E(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1}),n))}}}())}function Ft(t,e,i,n,o,s,r,a){var c,u,p=t[B],d=p.options.onMove;return!window.CustomEvent||l||h?(c=document.createEvent("Event")).initEvent("move",!0,!0):c=new CustomEvent("move",{bubbles:!0,cancelable:!0}),c.to=e,c.from=t,c.dragged=i,c.draggedRect=n,c.related=o||e,c.relatedRect=s||x(e),c.willInsertAfter=a,c.originalEvent=r,t.dispatchEvent(c),d?d.call(p,c,r):u}function Bt(t){t.draggable=!1}function Xt(){St=!1}function Yt(t){return setTimeout(t,0)}function Ut(t){return clearTimeout(t)}It&&!d&&document.addEventListener("click",(function(t){if(yt)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),yt=!1}),!0),Wt.prototype={constructor:Wt,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(mt=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,G):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,i=this.el,n=this.options,o=n.preventOnFilter,s=t.type,r=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,a=(r||t).target,l=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||a,h=n.filter;if(function(t){xt.length=0;for(var e=t.getElementsByTagName("input"),i=e.length;i--;){var n=e[i];n.checked&&xt.push(n)}}(i),!G&&!(/mousedown|pointerdown/.test(s)&&0!==t.button||n.disabled)&&!l.isContentEditable&&(this.nativeDraggable||!u||!a||"SELECT"!==a.tagName.toUpperCase())&&!((a=_(a,n.draggable,i,!1))&&a.animated||Z===a)){if(it=A(a),ot=A(a,n.draggable),"function"==typeof h){if(h.call(this,t,a,this))return q({sortable:e,rootEl:l,name:"filter",targetEl:a,toEl:i,fromEl:i}),z("filter",e,{evt:t}),void(o&&t.cancelable&&t.preventDefault())}else if(h=h&&h.split(",").some((function(n){if(n=_(l,n.trim(),i,!1))return q({sortable:e,rootEl:n,name:"filter",targetEl:a,fromEl:i,toEl:i}),z("filter",e,{evt:t}),!0})))return void(o&&t.cancelable&&t.preventDefault());n.handle&&!_(l,n.handle,i,!1)||this._prepareDragStart(t,r,a)}}},_prepareDragStart:function(t,e,i){var n,o=this,s=o.el,r=o.options,a=s.ownerDocument;i&&!G&&i.parentNode===s&&(n=x(i),Q=s,K=(G=i).parentNode,J=G.nextSibling,Z=i,rt=r.group,lt={target:Wt.dragged=G,clientX:(e||t).clientX,clientY:(e||t).clientY},pt=lt.clientX-n.left,dt=lt.clientY-n.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,G.style["will-change"]="all",n=function(){z("delayEnded",o,{evt:t}),Wt.eventCanceled?o._onDrop():(o._disableDelayedDragEvents(),!c&&o.nativeDraggable&&(G.draggable=!0),o._triggerDragStart(t,e),q({sortable:o,name:"choose",originalEvent:t}),w(G,r.chosenClass,!0))},r.ignore.split(",").forEach((function(t){P(G,t.trim(),Bt)})),m(a,"dragover",Lt),m(a,"mousemove",Lt),m(a,"touchmove",Lt),m(a,"mouseup",o._onDrop),m(a,"touchend",o._onDrop),m(a,"touchcancel",o._onDrop),c&&this.nativeDraggable&&(this.options.touchStartThreshold=4,G.draggable=!0),z("delayStart",this,{evt:t}),!r.delay||r.delayOnTouchOnly&&!e||this.nativeDraggable&&(h||l)?n():Wt.eventCanceled?this._onDrop():(m(a,"mouseup",o._disableDelayedDrag),m(a,"touchend",o._disableDelayedDrag),m(a,"touchcancel",o._disableDelayedDrag),m(a,"mousemove",o._delayedDragTouchMoveHandler),m(a,"touchmove",o._delayedDragTouchMoveHandler),r.supportPointer&&m(a,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(n,r.delay)))},_delayedDragTouchMoveHandler:function(t){t=t.touches?t.touches[0]:t,Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){G&&Bt(G),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;g(t,"mouseup",this._disableDelayedDrag),g(t,"touchend",this._disableDelayedDrag),g(t,"touchcancel",this._disableDelayedDrag),g(t,"mousemove",this._delayedDragTouchMoveHandler),g(t,"touchmove",this._delayedDragTouchMoveHandler),g(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?m(document,"pointermove",this._onTouchMove):m(document,e?"touchmove":"mousemove",this._onTouchMove):(m(G,"dragend",this),m(Q,"dragstart",this._onDragStart));try{document.selection?Yt((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){var i;bt=!1,Q&&G?(z("dragStarted",this,{evt:e}),this.nativeDraggable&&m(document,"dragover",Rt),i=this.options,t||w(G,i.dragClass,!1),w(G,i.ghostClass,!0),Wt.active=this,t&&this._appendGhost(),q({sortable:this,name:"start",originalEvent:e})):this._nulling()},_emulateDragOver:function(){if(ht){this._lastX=ht.clientX,this._lastY=ht.clientY,Nt();for(var t=document.elementFromPoint(ht.clientX,ht.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(ht.clientX,ht.clientY))!==e;)e=t;if(G.parentNode[B]._isOutsideThisEl(t),e)do{if(e[B]&&e[B]._onDragOver({clientX:ht.clientX,clientY:ht.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break}while(e=(t=e).parentNode);Ht()}},_onTouchMove:function(t){if(lt){var e=(a=this.options).fallbackTolerance,i=a.fallbackOffset,n=t.touches?t.touches[0]:t,o=V&&C(V,!0),s=V&&o&&o.a,r=V&&o&&o.d,a=Dt&&_t&&O(_t);s=(n.clientX-lt.clientX+i.x)/(s||1)+(a?a[0]-Pt[0]:0)/(s||1),r=(n.clientY-lt.clientY+i.y)/(r||1)+(a?a[1]-Pt[1]:0)/(r||1);if(!Wt.active&&!bt){if(e&&Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))S.right+10||O.clientY>R.bottom&&O.clientX>R.left:O.clientY>S.bottom+10||O.clientX>R.right&&O.clientY>R.top)||v.animated)){if(v&&(s=t,r=o,k=x(D((M=this).el,0,M.options,!0)),M=F(M.el,M.options,V),r?s.clientX",options:{classes:{},disabled:!1,create:null},_createWidget:function(e,i){i=t(i||this.defaultElement||this)[0],this.element=t(i),this.uuid=u++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classesElementLookup={},i!==this&&(t.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===i&&this.destroy()}}),this.document=t(i.style?i.ownerDocument:i.document||i),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classesElementLookup,(function(t,i){e._removeClass(i,t)})),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var n,o,s,r=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(r={},e=(n=e.split(".")).shift(),n.length){for(o=r[e]=t.widget.extend({},this.options[e]),s=0;s
    "),o=n.children()[0];return t("body").append(n),e=o.offsetWidth,n.css("overflow","scroll"),e===(o=o.offsetWidth)&&(o=n[0].clientWidth),n.remove(),i=e-o},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),n=e.isWindow||e.isDocument?"":e.element.css("overflow-y");i="scroll"===i||"auto"===i&&e.widthn(o(r),o(d))?f.important="horizontal":f.important="vertical",e.using.call(this,t,f)}),a.offset(t.extend(S,{using:r}))}))},t.ui.position={fit:{left:function(t,e){var i=e.within,o=i.isWindow?i.scrollLeft:i.offset.left,s=i.width,r=t.left-e.collisionPosition.marginLeft,a=o-r,l=r+e.collisionWidth-s-o;e.collisionWidth>s?0s?0=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),t.ui.plugin={add:function(e,i,n){var o,s=t.ui[e].prototype;for(o in n)s.plugins[o]=s.plugins[o]||[],s.plugins[o].push([i,n[o]])},call:function(t,e,i,n){var o,s=t.plugins[e];if(s&&(n||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(o=0;o").css("position","absolute").appendTo(e.parent()).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).offset(e.offset())[0]}))},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(e){var i=t.ui.safeActiveElement(this.document[0]);t(e.target).closest(i).length||t.ui.safeBlur(i)},_mouseStart:function(e){var i=this.options;return this.helper=this._createHelper(e),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),t.ui.ddmanager&&(t.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=0i[2]&&(s=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3]&&(r=i[3]+this.offset.click.top)),n.grid&&(t=n.grid[1]?this.originalPageY+Math.round((r-this.originalPageY)/n.grid[1])*n.grid[1]:this.originalPageY,r=!i||t-this.offset.click.top>=i[1]||t-this.offset.click.top>i[3]?t:t-this.offset.click.top>=i[1]?t-n.grid[1]:t+n.grid[1],t=n.grid[0]?this.originalPageX+Math.round((s-this.originalPageX)/n.grid[0])*n.grid[0]:this.originalPageX,s=!i||t-this.offset.click.left>=i[0]||t-this.offset.click.left>i[2]?t:t-this.offset.click.left>=i[0]?t-n.grid[0]:t+n.grid[0]),"y"===n.axis&&(s=this.originalPageX),"x"===n.axis&&(r=this.originalPageY)),{top:r-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:o?0:this.offset.scroll.top),left:s-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:o?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(e,i,n){return n=n||this._uiHash(),t.ui.plugin.call(this,e,[i,n,this],!0),/^(drag|start|stop)/.test(e)&&(this.positionAbs=this._convertPositionTo("absolute"),n.offset=this.positionAbs),t.Widget.prototype._trigger.call(this,e,i,n)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),t.ui.plugin.add("draggable","connectToSortable",{start:function(e,i,n){var o=t.extend({},i,{item:n.element});n.sortables=[],t(n.options.connectToSortable).each((function(){var i=t(this).sortable("instance");i&&!i.options.disabled&&(n.sortables.push(i),i.refreshPositions(),i._trigger("activate",e,o))}))},stop:function(e,i,n){var o=t.extend({},i,{item:n.element});n.cancelHelperRemoval=!1,t.each(n.sortables,(function(){var t=this;t.isOver?(t.isOver=0,n.cancelHelperRemoval=!0,t.cancelHelperRemoval=!1,t._storedCSS={position:t.placeholder.css("position"),top:t.placeholder.css("top"),left:t.placeholder.css("left")},t._mouseStop(e),t.options.helper=t.options._helper):(t.cancelHelperRemoval=!0,t._trigger("deactivate",e,o))}))},drag:function(e,i,n){t.each(n.sortables,(function(){var o=!1,s=this;s.positionAbs=n.positionAbs,s.helperProportions=n.helperProportions,s.offset.click=n.offset.click,s._intersectsWith(s.containerCache)&&(o=!0,t.each(n.sortables,(function(){return this.positionAbs=n.positionAbs,this.helperProportions=n.helperProportions,this.offset.click=n.offset.click,o=(this===s||!this._intersectsWith(this.containerCache)||!t.contains(s.element[0],this.element[0]))&&o}))),o?(s.isOver||(s.isOver=1,n._parent=i.helper.parent(),s.currentItem=i.helper.appendTo(s.element).data("ui-sortable-item",!0),s.options._helper=s.options.helper,s.options.helper=function(){return i.helper[0]},e.target=s.currentItem[0],s._mouseCapture(e,!0),s._mouseStart(e,!0,!0),s.offset.click.top=n.offset.click.top,s.offset.click.left=n.offset.click.left,s.offset.parent.left-=n.offset.parent.left-s.offset.parent.left,s.offset.parent.top-=n.offset.parent.top-s.offset.parent.top,n._trigger("toSortable",e),n.dropped=s.element,t.each(n.sortables,(function(){this.refreshPositions()})),n.currentItem=n.element,s.fromOutside=n),s.currentItem&&(s._mouseDrag(e),i.position=s.position)):s.isOver&&(s.isOver=0,s.cancelHelperRemoval=!0,s.options._revert=s.options.revert,s.options.revert=!1,s._trigger("out",e,s._uiHash(s)),s._mouseStop(e,!0),s.options.revert=s.options._revert,s.options.helper=s.options._helper,s.placeholder&&s.placeholder.remove(),i.helper.appendTo(n._parent),n._refreshOffsets(e),i.position=n._generatePosition(e,!0),n._trigger("fromSortable",e),n.dropped=!1,t.each(n.sortables,(function(){this.refreshPositions()})))}))}}),t.ui.plugin.add("draggable","cursor",{start:function(e,i,n){var o=t("body");n=n.options;o.css("cursor")&&(n._cursor=o.css("cursor")),o.css("cursor",n.cursor)},stop:function(e,i,n){(n=n.options)._cursor&&t("body").css("cursor",n._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:function(e,i,n){i=t(i.helper),n=n.options,i.css("opacity")&&(n._opacity=i.css("opacity")),i.css("opacity",n.opacity)},stop:function(e,i,n){(n=n.options)._opacity&&t(i.helper).css("opacity",n._opacity)}}),t.ui.plugin.add("draggable","scroll",{start:function(t,e,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1)),i.scrollParentNotHidden[0]!==i.document[0]&&"HTML"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(e,i,n){var o=n.options,s=!1,r=n.scrollParentNotHidden[0],a=n.document[0];r!==a&&"HTML"!==r.tagName?(o.axis&&"x"===o.axis||(n.overflowOffset.top+r.offsetHeight-e.pageY *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(t,e,i){return e<=t&&t*{ cursor: "+r.cursor+" !important; }").appendTo(s)),r.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",r.zIndex)),r.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",r.opacity)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!n)for(o=this.containers.length-1;0<=o;o--)this.containers[o]._trigger("activate",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!r.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this._addClass(this.helper,"ui-sortable-helper"),this.helper.parent().is(this.appendTo)||(this.helper.detach().appendTo(this.appendTo),this.offset.parent=this._getParentOffset()),this.position=this.originalPosition=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,this.lastPositionAbs=this.positionAbs=this._convertPositionTo("absolute"),this._mouseDrag(e),!0},_scroll:function(t){var e=this.options,i=!1;return this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageYt[this.floating?"width":"height"]?h&&c:s",e.document[0]);return e._addClass(o,"ui-sortable-placeholder",i||e.currentItem[0].className)._removeClass(o,"ui-sortable-helper"),"tbody"===n?e._createTrPlaceholder(e.currentItem.find("tr").eq(0),t("",e.document[0]).appendTo(o)):"tr"===n?e._createTrPlaceholder(e.currentItem,o):"img"===n&&o.attr("src",e.currentItem.attr("src")),i||o.css("visibility","hidden"),o},update:function(t,s){i&&!o.forcePlaceholderSize||(s.height()&&(!o.forcePlaceholderSize||"tbody"!==n&&"tr"!==n)||s.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),s.width()||s.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10)))}}),e.placeholder=t(o.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),o.placeholder.update(e,e.placeholder)},_createTrPlaceholder:function(e,i){var n=this;e.children().each((function(){t(" ",n.document[0]).attr("colspan",t(this).attr("colspan")||1).appendTo(i)}))},_contactContainers:function(e){for(var i,n,o,s,r,a,l,h,c,u=null,p=null,d=this.containers.length-1;0<=d;d--)t.contains(this.currentItem[0],this.containers[d].element[0])||(this._intersectsWith(this.containers[d].containerCache)?u&&t.contains(this.containers[d].element[0],u.element[0])||(u=this.containers[d],p=d):this.containers[d].containerCache.over&&(this.containers[d]._trigger("out",e,this._uiHash(this)),this.containers[d].containerCache.over=0));if(u)if(1===this.containers.length)this.containers[p].containerCache.over||(this.containers[p]._trigger("over",e,this._uiHash(this)),this.containers[p].containerCache.over=1);else{for(n=1e4,o=null,s=(h=u.floating||this._isFloating(this.currentItem))?"left":"top",r=h?"width":"height",c=h?"pageX":"pageY",i=this.items.length-1;0<=i;i--)t.contains(this.containers[p].element[0],this.items[i].item[0])&&this.items[i].item[0]!==this.currentItem[0]&&(a=this.items[i].item.offset()[s],l=!1,e[c]-a>this.items[i][r]/2&&(l=!0),Math.abs(e[c]-a)this.containment[2]&&(n=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(o=this.containment[3]+this.offset.click.top)),i.grid&&(e=this.originalPageY+Math.round((o-this.originalPageY)/i.grid[1])*i.grid[1],o=!this.containment||e-this.offset.click.top>=this.containment[1]&&e-this.offset.click.top<=this.containment[3]?e:e-this.offset.click.top>=this.containment[1]?e-i.grid[1]:e+i.grid[1],e=this.originalPageX+Math.round((n-this.originalPageX)/i.grid[0])*i.grid[0],n=!this.containment||e-this.offset.click.left>=this.containment[0]&&e-this.offset.click.left<=this.containment[2]?e:e-this.offset.click.left>=this.containment[0]?e-i.grid[0]:e+i.grid[0])),{top:o-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():r?0:s.scrollTop()),left:n-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():r?0:s.scrollLeft())}},_rearrange:function(t,e,i,n){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var o=this.counter;this._delay((function(){o===this.counter&&this.refreshPositions(!n)}))},_clear:function(t,e){this.reverting=!1;var i,n=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(i in this._storedCSS)"auto"!==this._storedCSS[i]&&"static"!==this._storedCSS[i]||(this._storedCSS[i]="");this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();function o(t,e,i){return function(n){i._trigger(t,n,e._uiHash(e))}}for(this.fromOutside&&!e&&n.push((function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))})),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||n.push((function(t){this._trigger("update",t,this._uiHash())})),this!==this.currentContainer&&(e||(n.push((function(t){this._trigger("remove",t,this._uiHash())})),n.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),n.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),i=this.containers.length-1;0<=i;i--)e||n.push(o("deactivate",this,this.containers[i])),this.containers[i].containerCache.over&&(n.push(o("out",this,this.containers[i])),this.containers[i].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!e){for(i=0;i",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.lastMousePosition={x:null,y:null},this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault(),this._activateItem(t)},"click .ui-menu-item":function(e){var i=t(e.target),n=t(t.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(e),e.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(e):!this.element.is(":focus")&&n.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":"_activateItem","mousemove .ui-menu-item":"_activateItem",mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this._menuItems().first();e||this.focus(t,i)},blur:function(e){this._delay((function(){t.contains(this.element[0],t.ui.safeActiveElement(this.document[0]))||this.collapseAll(e)}))},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&this.collapseAll(t,!0),this.mouseHandled=!1}})},_activateItem:function(e){var i,n;this.previousFilter||e.clientX===this.lastMousePosition.x&&e.clientY===this.lastMousePosition.y||(this.lastMousePosition={x:e.clientX,y:e.clientY},i=t(e.target).closest(".ui-menu-item"),n=t(e.currentTarget),i[0]===n[0]&&(n.is(".ui-state-active")||(this._removeClass(n.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(e,n))))},_destroy:function(){var e=this.element.find(".ui-menu-item").removeAttr("role aria-disabled").children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),e.children().each((function(){var e=t(this);e.data("ui-menu-submenu-caret")&&e.remove()}))},_keydown:function(e){var i,n,o,s=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:i=this.previousFilter||"",o=s=!1,n=96<=e.keyCode&&e.keyCode<=105?(e.keyCode-96).toString():String.fromCharCode(e.keyCode),clearTimeout(this.filterTimer),n===i?o=!0:n=i+n,i=this._filterMenuItems(n),(i=o&&-1!==i.index(this.active.next())?this.active.nextAll(".ui-menu-item"):i).length||(n=String.fromCharCode(e.keyCode),i=this._filterMenuItems(n)),i.length?(this.focus(e,i),this.previousFilter=n,this.filterTimer=this._delay((function(){delete this.previousFilter}),1e3)):delete this.previousFilter}s&&e.preventDefault()},_activate:function(t){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var e,i,n=this,o=this.options.icons.submenu,s=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),i=s.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each((function(){var e=t(this),i=e.prev(),s=t("").data("ui-menu-submenu-caret",!0);n._addClass(s,"ui-menu-icon","ui-icon "+o),i.attr("aria-haspopup","true").prepend(s),e.attr("aria-labelledby",i.attr("id"))})),this._addClass(i,"ui-menu","ui-widget ui-widget-content ui-front"),(e=s.add(this.element).find(this.options.items)).not(".ui-menu-item").each((function(){var e=t(this);n._isDivider(e)&&n._addClass(e,"ui-menu-divider","ui-widget-content")})),s=(i=e.not(".ui-menu-item, .ui-menu-divider")).children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(i,"ui-menu-item")._addClass(s,"ui-menu-item-wrapper"),e.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){var i;"icons"===t&&(i=this.element.find(".ui-menu-icon"),this._removeClass(i,null,this.options.icons.submenu)._addClass(i,null,e.submenu)),this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",String(t)),this._toggleClass(null,"ui-state-disabled",!!t)},focus:function(t,e){var i;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),i=this.active.children(".ui-menu-item-wrapper"),this._addClass(i,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",i.attr("id")),i=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(i,null,"ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay((function(){this._close()}),this.delay),(i=e.children(".ui-menu")).length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var i,n,o;this._hasScroll()&&(n=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,o=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,i=e.offset().top-this.activeMenu.offset().top-n-o,n=this.activeMenu.scrollTop(),o=this.activeMenu.height(),e=e.outerHeight(),i<0?this.activeMenu.scrollTop(n+i):o",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,liveRegionTimer:null,_create:function(){var e,i,n,o="textarea"===(s=this.element[0].nodeName.toLowerCase()),s="input"===s;this.isMultiLine=o||!s&&this._isContentEditable(this.element),this.valueMethod=this.element[o||s?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(o){if(this.element.prop("readOnly"))i=n=e=!0;else{i=n=e=!1;var s=t.ui.keyCode;switch(o.keyCode){case s.PAGE_UP:e=!0,this._move("previousPage",o);break;case s.PAGE_DOWN:e=!0,this._move("nextPage",o);break;case s.UP:e=!0,this._keyEvent("previous",o);break;case s.DOWN:e=!0,this._keyEvent("next",o);break;case s.ENTER:this.menu.active&&(e=!0,o.preventDefault(),this.menu.select(o));break;case s.TAB:this.menu.active&&this.menu.select(o);break;case s.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(o),o.preventDefault());break;default:i=!0,this._searchTimeout(o)}}},keypress:function(n){if(e)return e=!1,void(this.isMultiLine&&!this.menu.element.is(":visible")||n.preventDefault());if(!i){var o=t.ui.keyCode;switch(n.keyCode){case o.PAGE_UP:this._move("previousPage",n);break;case o.PAGE_DOWN:this._move("nextPage",n);break;case o.UP:this._keyEvent("previous",n);break;case o.DOWN:this._keyEvent("next",n)}}},input:function(t){if(n)return n=!1,void t.preventDefault();this._searchTimeout(t)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){clearTimeout(this.searching),this.close(t),this._change(t)}}),this._initSource(),this.menu=t("
      ").appendTo(this._appendTo()).menu({role:null}).hide().attr({unselectable:"on"}).menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(t){t.preventDefault()},menufocus:function(e,i){var n,o;if(this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type)))return this.menu.blur(),void this.document.one("mousemove",(function(){t(e.target).trigger(e.originalEvent)}));o=i.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",e,{item:o})&&e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(o.value),(n=i.item.attr("aria-label")||o.value)&&String.prototype.trim.call(n).length&&(clearTimeout(this.liveRegionTimer),this.liveRegionTimer=this._delay((function(){this.liveRegion.html(t("
      ").text(n))}),100))},menuselect:function(e,i){var n=i.item.data("ui-autocomplete-item"),o=this.previous;this.element[0]!==t.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=o,this._delay((function(){this.previous=o,this.selectedItem=n}))),!1!==this._trigger("select",e,{item:n})&&this._value(n.value),this.term=this._value(),this.close(e),this.selectedItem=n}}),this.liveRegion=t("
      ",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(e){var i=this.menu.element[0];return e.target===this.element[0]||e.target===i||t.contains(i,e.target)},_closeOnClickOutside:function(t){this._isEventTargetInWidget(t)||this.close()},_appendTo:function(){var e=this.options.appendTo;return(e=(e=e&&(e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)))&&e[0]?e:this.element.closest(".ui-front, dialog")).length?e:this.document[0].body},_initSource:function(){var e,i,n=this;Array.isArray(this.options.source)?(e=this.options.source,this.source=function(i,n){n(t.ui.autocomplete.filter(e,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(e,o){n.xhr&&n.xhr.abort(),n.xhr=t.ajax({url:i,data:e,dataType:"json",success:function(t){o(t)},error:function(){o([])}})}):this.source=this.options.source},_searchTimeout:function(t){clearTimeout(this.searching),this.searching=this._delay((function(){var e=this.term===this._value(),i=this.menu.element.is(":visible"),n=t.altKey||t.ctrlKey||t.metaKey||t.shiftKey;e&&(i||n)||(this.selectedItem=null,this.search(null,t))}),this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length").append(t("
      ").text(i.label)).appendTo(e)},_move:function(t,e){if(this.menu.element.is(":visible"))return this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this.isMultiLine||this._value(this.term),void this.menu.blur()):void this.menu[t](e);this.search(null,e)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){this.isMultiLine&&!this.menu.element.is(":visible")||(this._move(t,e),e.preventDefault())},_isContentEditable:function(t){if(!t.length)return!1;var e=t.prop("contentEditable");return"inherit"===e?this._isContentEditable(t.parent()):"true"===e}}),t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,i){var n=new RegExp(t.ui.autocomplete.escapeRegex(i),"i");return t.grep(e,(function(t){return n.test(t.label||t.value||t)}))}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(1").text(i))}),100))}}),t.ui.autocomplete})),function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==("undefined"==typeof module?"undefined":_typeof(module))&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,(function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},n=i[t]=i[t]||[];return-1==n.indexOf(e)&&n.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{};return(i[t]=i[t]||{})[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=i.indexOf(e);return-1!=n&&i.splice(n,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=0,o=i[n];e=e||[];for(var s=this._onceEvents&&this._onceEvents[t];o;){var r=s&&s[o];r&&(this.off(t,o),delete s[o]),o.apply(this,e),o=i[n+=r?0:1]}return this}},t})),function(t,e){"function"==typeof define&&define.amd?define("unipointer/unipointer",["ev-emitter/ev-emitter"],(function(i){return e(t,i)})):"object"==("undefined"==typeof module?"undefined":_typeof(module))&&module.exports?module.exports=e(t,require("ev-emitter")):t.Unipointer=e(t,t.EvEmitter)}(window,(function(t,e){function i(){}var n=i.prototype=Object.create(e.prototype);n.bindStartEvent=function(t){this._bindStartEvent(t,!0)},n.unbindStartEvent=function(t){this._bindStartEvent(t,!1)},n._bindStartEvent=function(e,i){var n=(i=void 0===i||!!i)?"addEventListener":"removeEventListener";t.navigator.pointerEnabled?e[n]("pointerdown",this):t.navigator.msPointerEnabled?e[n]("MSPointerDown",this):(e[n]("mousedown",this),e[n]("touchstart",this))},n.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},n.getTouch=function(t){for(var e=0;e.5;var o=this.colorGrid[e.toUpperCase()];this.updateCursor(o),this.setTexts(),this.setBackgrounds(),i||this.emitEvent("change",[e,t.hue,t.sat,t.lum])}},h.setTexts=function(){if(this.setTextElems)for(var t=0;t0&&n.attr("value",i)}$(".message-container").length&&setTimeout((function(){$(".message-container").fadeOut()}),3500),$("#upload").change((function(){!function(t){if(t.files&&t.files[0]){var e=new FileReader;e.onload=function(t){$("#appimage img").attr("src",t.target.result)},e.readAsDataURL(t.files[0])}}(this)}));var o,s=document.getElementById("sortable");null!==s&&(o=Sortable.create(s,{disabled:!0,animation:150,forceFallback:!(navigator.userAgent.toLowerCase().indexOf("firefox")>-1),draggable:".item-container",onEnd:function(){var e=o.toArray();$.post("".concat(t,"order"),{order:e})}}),navigator.userAgent.toLowerCase().indexOf("firefox")>-1&&(o.option("setData",(function(t){t.setData("Text","")})),s.addEventListener("dragstart",(function(t){"a"===t.target.nodeName.toLowerCase()&&(t.preventDefault(),t.stopPropagation(),t.dataTransfer.setData("Text",""))})))),$("#main").on("mouseenter","#sortable .item",(function(){$(this).siblings(".tooltip").addClass("active"),$(".refresh",this).addClass("active")})).on("mouseleave",".item",(function(){$(this).siblings(".tooltip").removeClass("active"),$(".refresh",this).removeClass("active")})),$("#config-buttons").on("mouseenter","a",(function(){$(".tooltip",this).addClass("active")})).on("mouseleave","a",(function(){$(".tooltip",this).removeClass("active")})),$(".searchform > form").on("submit",(function(t){"tiles"===$("#search-container select[name=provider]").val()&&t.preventDefault()})),$("#search-container").on("input","input[name=q]",(function(){var t=this.value,e=$("#sortable").children(".item-container");"tiles"===$("#search-container select[name=provider]").val()&&t.length>0?(e.hide(),e.filter((function(){return $(this).data("name").toLowerCase().includes(t.toLowerCase())})).show()):e.show()})).on("change","select[name=provider]",(function(){var t=$("#sortable").children(".item-container");if("tiles"===$(this).val()){$("#search-container button").hide();var e=$("#search-container input[name=q]").val();e.length>0?(t.hide(),t.filter((function(){return $(this).data("name").toLowerCase().includes(e.toLowerCase())})).show()):t.show()}else $("#search-container button").show(),t.show()})),$("#app").on("click","#config-button",(function(t){t.preventDefault();var e=$("#app"),i=e.hasClass("header");e.toggleClass("header"),i?($(".add-item").hide(),$(".item-edit").hide(),$("#app").removeClass("sidebar"),$("#sortable .tooltip").css("display",""),void 0!==o&&o.option("disabled",!0)):($("#sortable .tooltip").css("display","none"),void 0!==o&&o.option("disabled",!1),setTimeout((function(){$(".add-item").fadeIn(),$(".item-edit").fadeIn()}),350))})).on("click",".tag",(function(t){t.preventDefault();var e=$(t.target).data("tag");$("#taglist .tag").removeClass("current"),$(t.target).addClass("current"),$("#sortable .item-container").show(),"all"!==e&&$("#sortable .item-container:not(."+e+")").hide()})).on("click","#add-item, #pin-item",(function(t){t.preventDefault(),$("#app").toggleClass("sidebar")})).on("click",".close-sidenav",(function(t){t.preventDefault(),$("#app").removeClass("sidebar")})).on("click","#test_config",(function(e){e.preventDefault();var n=$("#create input[name=url]").val(),o=$('#sapconfig input[name="config[override_url]"]').val();"string"==typeof o&&""!==o&&(n=o);var s={};s.url=n,$(".config-item").each((function(){var t=$(this).data("config");s[t]=$(this).val()})),s.id=$("form[data-item-id]").data("item-id"),s.password&&s.password===i&&(s.password=""),$.post("".concat(t,"test_config"),{data:s}).done((function(t){alert(t)})).fail((function(t){alert("Something went wrong: ".concat(t.responseText.substring(0,100)))}))})),$("#pinlist").on("click","a",(function(e){e.preventDefault();var i=$(this),n=i.data("id"),o=i.data("tag");$.get("".concat(t,"items/pintoggle/").concat(n,"/true/").concat(o),(function(t){var e=$(t).filter("#sortable").html();$("#sortable").html(e),i.toggleClass("active")}))})),$("#itemform").on("submit",(function(){var t=$('input[name="config[password]"]').first();t.length>0&&t.attr("value")===i&&t.attr("value","")}))}));var focusSearch=function(t){var e=document.querySelector('input[name="q"]');e&&(t.preventDefault(),e.focus())},openFirstNonHiddenItem=function(t){if(t.target===document.querySelector('input[name="q"]')&&"tiles"===document.querySelector("#search-container select[name=provider]").value){var e=document.querySelector('#sortable section.item-container:not([style="display: none;"]) a');"href"in e&&(t.preventDefault(),window.open(e.href))}},KEY_BINDINGS={"/":focusSearch,Enter:openFirstNonHiddenItem};document.addEventListener("keydown",(function(t){try{t.key in KEY_BINDINGS&&KEY_BINDINGS[t.key](t)}catch(t){}}));var EXPORT_FILE_NAME="HeimdallExport.json",EXPORT_API_URL="api/item";function triggerFileDownload(t,e){var i=document.createElement("a"),n=new Blob([e],{type:"text/plain"});i.href=URL.createObjectURL(n),i.download=EXPORT_FILE_NAME,i.click()}var exportItems=function(t){t.preventDefault(),fetch(EXPORT_API_URL).then((function(t){return 200!==t.status&&window.alert("An error occurred while exporting..."),t.json()})).then((function(t){var e=JSON.stringify(t,null,2);triggerFileDownload(EXPORT_FILE_NAME,e)}))},exportButton=document.querySelector("#item-export");exportButton&&exportButton.addEventListener("click",exportItems);var IMPORT_API_URL="api/item",APP_LOAD_URL="appload",updateStatus=function(t){var e,i=t.item,n=t.errors;console.log(i,n),e=0===n.length?'
    • Imported: '.concat(i.title,"
    • "):'
    • Failed: '.concat(i.title," - ").concat(n[0],"
    • "),document.querySelector(".import-status").innerHTML+=e};function clearStatus(){document.querySelector(".import-status").innerHTML=""}var postToApi=function(t,e){return fetch(IMPORT_API_URL,{method:"POST",cache:"no-cache",redirect:"follow",headers:{"Content-Type":"application/json","X-CSRF-TOKEN":e},body:JSON.stringify(t)})},getCSRFToken=function(){return document.querySelector('input[name="_token"]').value},mergeItemWithAppDetails=function(t,e){return{pinned:1,tags:[0],appid:t.appid,title:t.title,colour:t.colour,url:t.url,appdescription:t.appdescription?t.appdescription:e.description,website:e.website,icon:e.iconview,config:t.description?JSON.parse(t.description):null}},fetchAppDetails=function(t){return null===t||"null"===t?Promise.resolve({}):fetch(APP_LOAD_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({app:t})}).then((function(t){return t.json()}))},importItems=function(t){t.forEach((function(t){var e=[];fetchAppDetails(t.appid).catch((function(){return e.push(new Error("Failed to find app id: ".concat(t.appid)))})).then((function(e){var i=mergeItemWithAppDetails(t,e),n=getCSRFToken();return postToApi(i,n)})).catch((function(){return e.push(new Error("Failed to create item: ".concat(t.title)))})).finally((function(){updateStatus({item:t,errors:e})}))}))},readJSON=function(t){return new Promise((function(e,i){try{var n=new FileReader;n.onload=function(t){var i=t.target.result;e(JSON.parse(i))},n.readAsText(t)}catch(t){i(new Error("Unable to read file"))}}))},openFileForImport=function(t){return clearStatus(),readJSON(t).catch((function(t){console.error(t)})).then(importItems)},fileInput=document.querySelector("input[name='import']"),importButtons=document.querySelectorAll(".import-button");fileInput&&importButtons&&(importButtons.forEach((function(t){t.addEventListener("click",(function(){var t=fileInput.files[0];t&&openFileForImport(t)}))})),fileInput.addEventListener("change",openFileForImport,!1));var REFRESH_INTERVAL_SMALL=5e3,REFRESH_INTERVAL_BIG=3e4,QUEUE_PROCESSING_INTERVAL=1e3,CONTAINER_SELECTOR=".livestats-container";function createQueue(){var t=[],e=!1;return document.addEventListener("visibilitychange",(function(){e=document.hidden})),setInterval((function(){0!==t.length&&!0!==e&&t.shift()()}),QUEUE_PROCESSING_INTERVAL),t}function getContainers(){return document.querySelectorAll(CONTAINER_SELECTOR)}function getQueueInterval(t,e){return t?REFRESH_INTERVAL_BIG:e?REFRESH_INTERVAL_SMALL:REFRESH_INTERVAL_BIG}function createUpdateJob(t,e){var i=t.getAttribute("data-id"),n="1"===t.getAttribute("data-dataonly");return function(){return fetch("get_stats/".concat(i)).then((function(t){if(t.ok)return t.json();throw new Error("Network response was not ok: ".concat(t.status))})).then((function(i){t.innerHTML=i.html;var o="active"===i.status;e&&setTimeout((function(){e.push(createUpdateJob(t,e))}),getQueueInterval(n,o))})).catch((function(t){console.error(t)}))}}var livestatContainers=getContainers();if(livestatContainers.length>0){var myQueue=createQueue();livestatContainers.forEach((function(t){createUpdateJob(t,myQueue)()}))} diff --git a/public/mix-manifest.json b/public/mix-manifest.json index 4fa71b2e5..0b69f40c5 100644 --- a/public/mix-manifest.json +++ b/public/mix-manifest.json @@ -1,4 +1,4 @@ { - "/css/app.css": "/css/app.css?id=55e02812d34a73b4386802d27fbcd6e8", - "/js/app.js": "/js/app.js?id=3377b9b80073713e4dc54937c94aa6ad" + "/css/app.css": "/css/app.css?id=9ac09de3efefe57251cba47c5747c556", + "/js/app.js": "/js/app.js?id=3e28afce465cda43c0b0da9d29ad69a1" } diff --git a/resources/assets/js/app.js b/resources/assets/js/app.js index e2d5a3eca..67500337d 100644 --- a/resources/assets/js/app.js +++ b/resources/assets/js/app.js @@ -52,7 +52,7 @@ $.when($.ready).then(() => { } }); */ - const sortableEl = document.getElementById("sortable"); + let sortableEl = document.getElementById("sortable"); let sortable; if (sortableEl !== null) { // eslint-disable-next-line no-undef @@ -171,6 +171,16 @@ $.when($.ready).then(() => { }, 350); } }) + .on("click", ".tag", (e) => { + e.preventDefault(); + const tag = $(e.target).data('tag') + $('#taglist .tag').removeClass('current') + $(e.target).addClass('current') + $('#sortable .item-container').show() + if (tag !== 'all') { + $('#sortable .item-container:not(.'+tag+')').hide() + } + }) .on("click", "#add-item, #pin-item", (e) => { e.preventDefault(); const app = $("#app"); diff --git a/resources/assets/sass/_app.scss b/resources/assets/sass/_app.scss index e34d3512f..c658582b7 100644 --- a/resources/assets/sass/_app.scss +++ b/resources/assets/sass/_app.scss @@ -188,7 +188,11 @@ body { border-radius: 10px; > .title { padding: 20px 20px 0; - color: white; + + a { + color: white; + text-decoration: none; + } } } } @@ -291,6 +295,9 @@ body { z-index: 1; } } +.categorytitle { + color: #fff!important; +} .tooltip { padding: 25px; border-radius: 5px; @@ -306,13 +313,32 @@ body { opacity: 0; transform: translateY(-20px); transition: all 0.3s; + pointer-events: none; &.active { transform: translateY(0); opacity: 1; z-index: 4; } } - +.taglist { + display: flex; + flex-wrap: wrap; + gap: 5px; + .tag { + padding: 10px 20px; + background: rgba(0, 0, 0, 0.608); + border-radius: 6px; + font-size: 12px; + cursor: pointer; + opacity: 0.6; + &.current { + opacity: 1; + } + &:hover:not(.current) { + opacity: 0.8; + } + } +} .tile-actions { position: absolute; top: 0px; diff --git a/resources/views/partials/taglist.blade.php b/resources/views/partials/taglist.blade.php new file mode 100644 index 000000000..9225e095e --- /dev/null +++ b/resources/views/partials/taglist.blade.php @@ -0,0 +1,13 @@ + +@if( $treat_tags_as == 'tags') + @if($taglist->first()) +
      +
      All
      + @foreach($taglist as $tag) +
      {{ $tag->title }}
      + @endforeach +
      + @endif +@endif diff --git a/resources/views/sortable.blade.php b/resources/views/sortable.blade.php index 10bdbc118..08aa03e10 100644 --- a/resources/views/sortable.blade.php +++ b/resources/views/sortable.blade.php @@ -1,10 +1,10 @@ -
      - @if($treat_tags_as == 'categories') +
      + @if(isset($treat_tags_as) && $treat_tags_as == 'categories') @foreach($categories as $category) children; ?> -
      -
      {{ $category->title }}
      +
      + @foreach($apps as $app) @include('item') @endforeach @@ -17,7 +17,8 @@ @foreach($apps as $app) @include('item') @endforeach + @include('add') @endif - @include('add') +
      diff --git a/resources/views/welcome.blade.php b/resources/views/welcome.blade.php index e7376b570..09a96546d 100644 --- a/resources/views/welcome.blade.php +++ b/resources/views/welcome.blade.php @@ -1,6 +1,7 @@ @extends('layouts.app') @section('content') + @include('partials.taglist') @include('partials.search') @if((isset($apps) && $apps->first()) || (isset($categories) && $categories->first())) From 70252b7a43f9dfc08046e6b50b941508686d8309 Mon Sep 17 00:00:00 2001 From: Chris Hunt Date: Sun, 18 Feb 2024 18:26:34 +0000 Subject: [PATCH 4/5] Fix prettier complaints --- resources/assets/js/app.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/resources/assets/js/app.js b/resources/assets/js/app.js index 67500337d..df08d4ee7 100644 --- a/resources/assets/js/app.js +++ b/resources/assets/js/app.js @@ -52,7 +52,7 @@ $.when($.ready).then(() => { } }); */ - let sortableEl = document.getElementById("sortable"); + const sortableEl = document.getElementById("sortable"); let sortable; if (sortableEl !== null) { // eslint-disable-next-line no-undef @@ -173,12 +173,12 @@ $.when($.ready).then(() => { }) .on("click", ".tag", (e) => { e.preventDefault(); - const tag = $(e.target).data('tag') - $('#taglist .tag').removeClass('current') - $(e.target).addClass('current') - $('#sortable .item-container').show() - if (tag !== 'all') { - $('#sortable .item-container:not(.'+tag+')').hide() + const tag = $(e.target).data("tag") + $("#taglist .tag").removeClass("current") + $(e.target).addClass("current") + $("#sortable .item-container").show() + if (tag !== "all") { + $("#sortable .item-container:not(."+tag+")").hide() } }) .on("click", "#add-item, #pin-item", (e) => { From b7c0fd29c6e42e6b7764daa31046e724332d0e3f Mon Sep 17 00:00:00 2001 From: Chris Hunt Date: Sun, 18 Feb 2024 18:33:47 +0000 Subject: [PATCH 5/5] Fix extra prettier complaints --- resources/assets/js/app.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/resources/assets/js/app.js b/resources/assets/js/app.js index df08d4ee7..46e4dea24 100644 --- a/resources/assets/js/app.js +++ b/resources/assets/js/app.js @@ -173,12 +173,12 @@ $.when($.ready).then(() => { }) .on("click", ".tag", (e) => { e.preventDefault(); - const tag = $(e.target).data("tag") - $("#taglist .tag").removeClass("current") - $(e.target).addClass("current") - $("#sortable .item-container").show() + const tag = $(e.target).data("tag"); + $("#taglist .tag").removeClass("current"); + $(e.target).addClass("current"); + $("#sortable .item-container").show(); if (tag !== "all") { - $("#sortable .item-container:not(."+tag+")").hide() + $("#sortable .item-container:not(." + tag + ")").hide(); } }) .on("click", "#add-item, #pin-item", (e) => {