diff --git a/.gitignore b/.gitignore index 00083d5a4..a7c50c44a 100755 --- a/.gitignore +++ b/.gitignore @@ -37,3 +37,4 @@ public/mapping.json storage/module.zip tests/database.sqlite tests/database.sqlite-journal +storage/snapshots/*.sql \ No newline at end of file diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index d2ad6cb77..afa7e6a22 100755 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -33,6 +33,7 @@ class Kernel extends ConsoleKernel */ protected function schedule(Schedule $schedule) { + $schedule->command( 'telescope:prune' )->daily(); $schedule->job( new TaskSchedulingPingJob )->hourly(); $schedule->job( new ExecuteExpensesJob )->daily( '00:01' ); $schedule->job( new StockProcurementJob() )->daily( '00:05' ); diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index c8aa584c8..876518cd6 100755 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -2,7 +2,9 @@ namespace App\Exceptions; +use App\Exceptions\QueryException as ExceptionsQueryException; use Illuminate\Auth\AuthenticationException; +use Illuminate\Database\QueryException; use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; use Illuminate\Validation\ValidationException as MainValidationException; use Throwable; @@ -45,6 +47,8 @@ public function report(Throwable $exception) /** * We want to use our defined route * instead of what is provided by laravel. + * @return \Illuminate\Routing\Redirector + * */ protected function unauthenticated($request, AuthenticationException $exception) { @@ -71,6 +75,11 @@ public function render($request, Throwable $exception) ->render( $request ); } + if ( $exception instanceof QueryException ) { + return ( new ExceptionsQueryException( $exception->getMessage() ) ) + ->render( $request ); + } + return parent::render($request, $exception); } } diff --git a/app/Exceptions/QueryException.php b/app/Exceptions/QueryException.php new file mode 100644 index 000000000..94b0ba722 --- /dev/null +++ b/app/Exceptions/QueryException.php @@ -0,0 +1,15 @@ +getMessage(); + $title = __( 'Query Exception' ); + return response()->view( 'pages.errors.db-exception', compact( 'message', 'title' ), 500 ); + } +} diff --git a/app/Http/Controllers/Dashboard/CustomersController.php b/app/Http/Controllers/Dashboard/CustomersController.php index 8f82d9387..577f04b1d 100755 --- a/app/Http/Controllers/Dashboard/CustomersController.php +++ b/app/Http/Controllers/Dashboard/CustomersController.php @@ -13,6 +13,7 @@ use App\Crud\CustomerCrud; use App\Crud\CustomerOrderCrud; use App\Crud\CustomerRewardCrud; +use App\Exceptions\NotFoundException; use App\Models\Customer; use Illuminate\Http\Request; @@ -65,8 +66,12 @@ public function get( $customer_id = null ) { $customer = Customer::with( 'group' )->find( $customer_id ); - if ( $customer instanceof Customer ) { - return $customer; + if ( $customer_id !== null ) { + if ( $customer instanceof Customer ) { + return $customer; + } + + throw new NotFoundException( __( 'The requested customer cannot be fonud.' ) ); } return $this->customerService->get(); diff --git a/app/Providers/ModulesServiceProvider.php b/app/Providers/ModulesServiceProvider.php index 49de2e469..e10d25cb8 100755 --- a/app/Providers/ModulesServiceProvider.php +++ b/app/Providers/ModulesServiceProvider.php @@ -9,6 +9,7 @@ class ModulesServiceProvider extends ServiceProvider { protected $modulesCommands = []; + protected $modules; /** * Bootstrap the application services. @@ -43,16 +44,16 @@ public function register() { // register module singleton $this->app->singleton( ModulesService::class, function( $app ) { - $modules = new ModulesService; - $modules->load(); - - collect( $modules->getEnabled() )->each( fn( $module ) => $modules->boot( $module ) ); - + $this->modules = new ModulesService; + $this->modules->load(); + + collect( $this->modules->getEnabled() )->each( fn( $module ) => $this->modules->boot( $module ) ); + /** * trigger register method only for enabled modules * service providers that extends ModulesServiceProvider. */ - collect( $modules->getEnabled() )->each( function( $module ) use ( $modules ) { + collect( $this->modules->getEnabled() )->each( function( $module ) { /** * register module commands */ @@ -61,12 +62,12 @@ public function register() array_keys( $module[ 'commands' ] ) ); - $modules->triggerServiceProviders( $module, 'register', ServiceProvider::class ); + $this->modules->triggerServiceProviders( $module, 'register', ServiceProvider::class ); }); - event( new ModulesLoadedEvent( $modules->get() ) ); + event( new ModulesLoadedEvent( $this->modules->get() ) ); - return $modules; + return $this->modules; }); } } diff --git a/app/Services/Helpers/App.php b/app/Services/Helpers/App.php index 2aa40cd1a..9ea922aaf 100755 --- a/app/Services/Helpers/App.php +++ b/app/Services/Helpers/App.php @@ -1,9 +1,12 @@ getPdo() ){ + return Schema::hasTable( 'nexopos_options' ); + } + } catch (\Exception $e) { + return false; } - - return false; } /** @@ -32,6 +36,8 @@ static function LoadInterface( $path, $data = [] ) static function pageTitle( $string ) { - return sprintf( __( '%s — NexoPOS 4' ), $string ); + return sprintf( + Hook::filter( 'ns-page-title', __( '%s — NexoPOS 4' ) ), + $string ); } } \ No newline at end of file diff --git a/app/Services/OrdersService.php b/app/Services/OrdersService.php index 36223922f..eb3618191 100755 --- a/app/Services/OrdersService.php +++ b/app/Services/OrdersService.php @@ -752,20 +752,6 @@ public function makeOrderSinglePayment( $payment, Order $order ) if ( $paymentToday->count() === 0 ) { throw new NotFoundException( __( 'No payment is expected at the moment. If the customer want to pay early, consider adjusting instalment payments date.' ) ); } - - /** - * @todo don't think this restriction is actually necessary. - */ - // if ( - // ns()->currency->getRaw( $paymentToday->sum( 'amount' ) ) !== - // ns()->currency->getRaw( $payment[ 'value' ] ) ) { - // throw new NotAllowedException( - // sprintf( - // __( 'The provided payment doesn\'t match the expected payment : %s. If the customer want to pay a different amount, consider adjusting the instalment amount.' ), - // ( string ) Currency::define( $paymentToday->sum( 'amount' ) ) - // ) - // ); - // } } $this->__saveOrderSinglePayment( $payment, $order ); @@ -1536,7 +1522,7 @@ public function computeOrderTaxes( Order $order ) $taxType = ns()->option->get( 'ns_pos_tax_type' ); $subTotal = $order->products()->sum( 'total_price' ); $taxValue = $order->taxes->map( function( $tax ) use ( $taxType, $subTotal ) { - $tax->tax_value = $this->taxService->getComputedTaxValue( $taxType, $tax->rate, $subTotal ); + $tax->tax_value = $this->taxService->getVatValue( $taxType, $tax->rate, $subTotal ); $tax->save(); return $tax->tax_value; @@ -2365,8 +2351,8 @@ public function void( Order $order, $reason ) public function getPaidSales( $startDate, $endDate ) { return Order::paid() - ->where( 'created_at', '>=', Carbon::parse( $startDate )->startOfDay()->toDateTimeString() ) - ->where( 'created_at', '<=', Carbon::parse( $endDate )->endOfDay()->toDateTimeString() ) + ->where( 'created_at', '>=', Carbon::parse( $startDate )->toDateTimeString() ) + ->where( 'created_at', '<=', Carbon::parse( $endDate )->toDateTimeString() ) ->get(); } @@ -2378,8 +2364,8 @@ public function getPaidSales( $startDate, $endDate ) */ public function getSoldStock( $startDate, $endDate ) { - $rangeStarts = Carbon::parse( $startDate )->startOfDay()->toDateTimeString(); - $rangeEnds = Carbon::parse( $endDate )->endOfDay()->toDateTimeString(); + $rangeStarts = Carbon::parse( $startDate )->toDateTimeString(); + $rangeEnds = Carbon::parse( $endDate )->toDateTimeString(); $products = OrderProduct::whereHas( 'order', function( Builder $query ) { $query->where( 'payment_status', Order::PAYMENT_PAID ); diff --git a/app/Services/ProductCategoryService.php b/app/Services/ProductCategoryService.php index a8fcade07..24f8d0c12 100755 --- a/app/Services/ProductCategoryService.php +++ b/app/Services/ProductCategoryService.php @@ -39,9 +39,9 @@ public function getUsingName( $name ) * @param array details * @return array */ - public function create( $data ) + public function create( $data, ProductCategory $productCategory = null ) { - $category = new ProductCategory; + $category = $productCategory === null ? new ProductCategory : $productCategory; $category->author = Auth::id(); $category->description = $data[ 'description' ] ?? ''; $category->preview_url = $data[ 'preview_url' ] ?? ''; diff --git a/config/filesystems.php b/config/filesystems.php index e6992f76a..81ff8e6c6 100755 --- a/config/filesystems.php +++ b/config/filesystems.php @@ -48,6 +48,11 @@ 'root' => storage_path('app'), ], + 'snapshots' => [ + 'driver' => 'local', + 'root' => storage_path( 'snapshots' ) + ], + 'public' => [ 'driver' => 'local', 'root' => storage_path('app/public'), diff --git a/phpunit.ci.xml b/phpunit.ci.xml index bf008603b..87c8c70a4 100755 --- a/phpunit.ci.xml +++ b/phpunit.ci.xml @@ -64,6 +64,6 @@ - + diff --git a/public/css/app.css b/public/css/app.css index 562a96f68..a69280c7f 100755 --- a/public/css/app.css +++ b/public/css/app.css @@ -2,6 +2,6 @@ /*! tailwindcss v2.2.7 | MIT License | https://tailwindcss.com*/ -/*! modern-normalize v1.1.0 | MIT License | https://github.com/sindresorhus/modern-normalize */html{-webkit-text-size-adjust:100%;line-height:1.15;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji;margin:0}hr{color:inherit;height:0}abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}legend{padding:0}progress{vertical-align:baseline}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}button{background-color:transparent;background-image:none}fieldset,ol,ul{margin:0;padding:0}ol,ul{list-style:none}html{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}body{font-family:inherit;line-height:inherit}*,:after,:before{border:0 solid;box-sizing:border-box}hr{border-top-width:1px}img{border-style:solid}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}table{border-collapse:collapse}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}button,input,optgroup,select,textarea{color:inherit;line-height:inherit;padding:0}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}*,:after,:before{--tw-border-opacity:1;border-color:rgba(229,231,235,var(--tw-border-opacity))}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.pointer-events-none{pointer-events:none!important}.visible{visibility:visible!important}.invisible{visibility:hidden!important}.static{position:static!important}.fixed{position:fixed!important}.absolute{position:absolute!important}.relative{position:relative!important}.inset-y-0{bottom:0!important}.inset-y-0,.top-0{top:0!important}.top-4{top:1rem!important}.-top-10{top:-5em!important}.right-4{right:1rem!important}.bottom-0{bottom:0!important}.left-0{left:0!important}.isolate{isolation:isolate!important}.z-10{z-index:10!important}.z-30{z-index:30!important}.z-40{z-index:40!important}.z-50{z-index:50!important}.col-span-2{grid-column:span 2/span 2!important}.col-span-3{grid-column:span 3/span 3!important}.m-1{margin:.25rem!important}.m-2{margin:.5rem!important}.m-4{margin:1rem!important}.-m-2{margin:-.5rem!important}.-m-3{margin:-.75rem!important}.-m-4{margin:-1rem!important}.mx-1{margin-left:.25rem!important;margin-right:.25rem!important}.mx-2{margin-left:.5rem!important;margin-right:.5rem!important}.mx-4{margin-left:1rem!important;margin-right:1rem!important}.mx-auto{margin-left:auto!important;margin-right:auto!important}.-mx-1{margin-left:-.25rem!important;margin-right:-.25rem!important}.-mx-2{margin-left:-.5rem!important;margin-right:-.5rem!important}.-mx-3{margin-left:-.75rem!important;margin-right:-.75rem!important}.-mx-4{margin-left:-1rem!important;margin-right:-1rem!important}.my-1{margin-bottom:.25rem!important;margin-top:.25rem!important}.my-2{margin-bottom:.5rem!important;margin-top:.5rem!important}.my-3{margin-bottom:.75rem!important;margin-top:.75rem!important}.my-4{margin-bottom:1rem!important;margin-top:1rem!important}.my-5{margin-bottom:1.25rem!important;margin-top:1.25rem!important}.-my-1{margin-bottom:-.25rem!important;margin-top:-.25rem!important}.-my-2{margin-bottom:-.5rem!important;margin-top:-.5rem!important}.mt-1{margin-top:.25rem!important}.mt-2{margin-top:.5rem!important}.mt-4{margin-top:1rem!important}.-mt-4{margin-top:-1rem!important}.-mt-8{margin-top:-2rem!important}.mr-1{margin-right:.25rem!important}.mr-2{margin-right:.5rem!important}.mb-1{margin-bottom:.25rem!important}.mb-2{margin-bottom:.5rem!important}.mb-3{margin-bottom:.75rem!important}.mb-4{margin-bottom:1rem!important}.mb-6{margin-bottom:1.5rem!important}.mb-8{margin-bottom:2rem!important}.-mb-2{margin-bottom:-.5rem!important}.-mb-6{margin-bottom:-1.5rem!important}.ml-1{margin-left:.25rem!important}.ml-2{margin-left:.5rem!important}.ml-3{margin-left:.75rem!important}.-ml-6{margin-left:-1.5rem!important}.-ml-32{margin-left:-8rem!important}.block{display:block!important}.inline-block{display:inline-block!important}.inline{display:inline!important}.flex{display:flex!important}.table{display:table!important}.grid{display:grid!important}.contents{display:contents!important}.hidden{display:none!important}.h-0{height:0!important}.h-6{height:1.5rem!important}.h-8{height:2rem!important}.h-10{height:2.5rem!important}.h-12{height:3rem!important}.h-14{height:3.5rem!important}.h-16{height:4rem!important}.h-20{height:5rem!important}.h-24{height:6rem!important}.h-28{height:7rem!important}.h-32{height:8rem!important}.h-36{height:9rem!important}.h-40{height:10rem!important}.h-44{height:11rem!important}.h-48{height:12rem!important}.h-52{height:13rem!important}.h-56{height:14rem!important}.h-64{height:16rem!important}.h-72{height:18rem!important}.h-84{height:21rem!important}.h-96{height:24rem!important}.h-120{height:30rem!important}.h-full{height:100%!important}.h-screen{height:100vh!important}.h-6\/7-screen{height:85.71vh!important}.h-5\/7-screen{height:71.42vh!important}.h-3\/5-screen{height:60vh!important}.h-2\/5-screen{height:40vh!important}.h-half{height:50vh!important}.h-95vh{height:95vh!important}.min-h-2\/5-screen{min-height:40vh!important}.w-0{width:0!important}.w-3{width:.75rem!important}.w-6{width:1.5rem!important}.w-8{width:2rem!important}.w-10{width:2.5rem!important}.w-12{width:3rem!important}.w-14{width:3.5rem!important}.w-16{width:4rem!important}.w-24{width:6rem!important}.w-28{width:7rem!important}.w-32{width:8rem!important}.w-36{width:9rem!important}.w-40{width:10rem!important}.w-48{width:12rem!important}.w-56{width:14rem!important}.w-64{width:16rem!important}.w-72{width:18rem!important}.w-1\/2{width:50%!important}.w-1\/3{width:33.333333%!important}.w-1\/4{width:25%!important}.w-3\/4{width:75%!important}.w-3\/5{width:60%!important}.w-1\/6{width:16.666667%!important}.w-11\/12{width:91.666667%!important}.w-full{width:100%!important}.w-screen{width:100vw!important}.w-6\/7-screen{width:85.71vw!important}.w-5\/7-screen{width:71.42vw!important}.w-4\/5-screen{width:80vw!important}.w-3\/4-screen{width:75vw!important}.w-2\/3-screen{width:66.66vw!important}.w-95vw{width:95vw!important}.flex-auto{flex:1 1 auto!important}.flex-shrink-0{flex-shrink:0!important}.origin-bottom-right{transform-origin:bottom right!important}.transform{--tw-translate-x:0!important;--tw-translate-y:0!important;--tw-rotate:0!important;--tw-skew-x:0!important;--tw-skew-y:0!important;--tw-scale-x:1!important;--tw-scale-y:1!important;transform:translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}@-webkit-keyframes spin{to{transform:rotate(1turn)}}@keyframes spin{to{transform:rotate(1turn)}}@-webkit-keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@-webkit-keyframes pulse{50%{opacity:.5}}@keyframes pulse{50%{opacity:.5}}@-webkit-keyframes bounce{0%,to{-webkit-animation-timing-function:cubic-bezier(.8,0,1,1);animation-timing-function:cubic-bezier(.8,0,1,1);transform:translateY(-25%)}50%{-webkit-animation-timing-function:cubic-bezier(0,0,.2,1);animation-timing-function:cubic-bezier(0,0,.2,1);transform:none}}@keyframes bounce{0%,to{-webkit-animation-timing-function:cubic-bezier(.8,0,1,1);animation-timing-function:cubic-bezier(.8,0,1,1);transform:translateY(-25%)}50%{-webkit-animation-timing-function:cubic-bezier(0,0,.2,1);animation-timing-function:cubic-bezier(0,0,.2,1);transform:none}}.animate-spin{-webkit-animation:spin 1s linear infinite!important;animation:spin 1s linear infinite!important}.cursor-pointer{cursor:pointer!important}.cursor-not-allowed{cursor:not-allowed!important}.resize{resize:both!important}.grid-flow-row{grid-auto-flow:row!important}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))!important}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))!important}.grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))!important}.grid-rows-1{grid-template-rows:repeat(1,minmax(0,1fr))!important}.grid-rows-2{grid-template-rows:repeat(2,minmax(0,1fr))!important}.grid-rows-3{grid-template-rows:repeat(3,minmax(0,1fr))!important}.flex-row{flex-direction:row!important}.flex-row-reverse{flex-direction:row-reverse!important}.flex-col{flex-direction:column!important}.flex-col-reverse{flex-direction:column-reverse!important}.flex-wrap{flex-wrap:wrap!important}.items-start{align-items:flex-start!important}.items-end{align-items:flex-end!important}.items-center{align-items:center!important}.justify-start{justify-content:flex-start!important}.justify-end{justify-content:flex-end!important}.justify-center{justify-content:center!important}.justify-between{justify-content:space-between!important}.gap-0{gap:0!important}.gap-2{gap:.5rem!important}.divide-y-4>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0!important;border-bottom-width:calc(4px*var(--tw-divide-y-reverse))!important;border-top-width:calc(4px*(1 - var(--tw-divide-y-reverse)))!important}.overflow-auto{overflow:auto!important}.overflow-hidden{overflow:hidden!important}.overflow-scroll{overflow:scroll!important}.overflow-x-auto{overflow-x:auto!important}.overflow-y-auto{overflow-y:auto!important}.overflow-y-hidden{overflow-y:hidden!important}.overflow-y-scroll{overflow-y:scroll!important}.truncate{overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}.whitespace-pre-wrap{white-space:pre-wrap!important}.rounded{border-radius:.25rem!important}.rounded-md{border-radius:.375rem!important}.rounded-lg{border-radius:.5rem!important}.rounded-full{border-radius:9999px!important}.rounded-t-lg{border-top-left-radius:.5rem!important;border-top-right-radius:.5rem!important}.rounded-tl{border-top-left-radius:.25rem!important}.rounded-tl-lg{border-top-left-radius:.5rem!important}.rounded-tr{border-top-right-radius:.25rem!important}.rounded-tr-lg{border-top-right-radius:.5rem!important}.rounded-br-lg{border-bottom-right-radius:.5rem!important}.rounded-bl-lg{border-bottom-left-radius:.5rem!important}.border-0{border-width:0!important}.border-2{border-width:2px!important}.border-4{border-width:4px!important}.border{border-width:1px!important}.border-t-0{border-top-width:0!important}.border-t-2{border-top-width:2px!important}.border-t{border-top-width:1px!important}.border-r-0{border-right-width:0!important}.border-r-2{border-right-width:2px!important}.border-r{border-right-width:1px!important}.border-b-0{border-bottom-width:0!important}.border-b-2{border-bottom-width:2px!important}.border-b{border-bottom-width:1px!important}.border-l-0{border-left-width:0!important}.border-l-2{border-left-width:2px!important}.border-l-4{border-left-width:4px!important}.border-l-8{border-left-width:8px!important}.border-l{border-left-width:1px!important}.border-dashed{border-style:dashed!important}.border-transparent{border-color:transparent!important}.border-black{border-color:rgba(0,0,0,var(--tw-border-opacity))!important}.border-black,.border-white{--tw-border-opacity:1!important}.border-white{border-color:rgba(255,255,255,var(--tw-border-opacity))!important}.border-gray-100{--tw-border-opacity:1!important;border-color:rgba(243,244,246,var(--tw-border-opacity))!important}.border-gray-200{--tw-border-opacity:1!important;border-color:rgba(229,231,235,var(--tw-border-opacity))!important}.border-gray-300{--tw-border-opacity:1!important;border-color:rgba(209,213,219,var(--tw-border-opacity))!important}.border-gray-400{--tw-border-opacity:1!important;border-color:rgba(156,163,175,var(--tw-border-opacity))!important}.border-gray-500{--tw-border-opacity:1!important;border-color:rgba(107,114,128,var(--tw-border-opacity))!important}.border-gray-600{--tw-border-opacity:1!important;border-color:rgba(75,85,99,var(--tw-border-opacity))!important}.border-gray-700{--tw-border-opacity:1!important;border-color:rgba(55,65,81,var(--tw-border-opacity))!important}.border-gray-800{--tw-border-opacity:1!important;border-color:rgba(31,41,55,var(--tw-border-opacity))!important}.border-red-200{--tw-border-opacity:1!important;border-color:rgba(254,202,202,var(--tw-border-opacity))!important}.border-red-300{--tw-border-opacity:1!important;border-color:rgba(252,165,165,var(--tw-border-opacity))!important}.border-red-400{--tw-border-opacity:1!important;border-color:rgba(248,113,113,var(--tw-border-opacity))!important}.border-red-500{--tw-border-opacity:1!important;border-color:rgba(239,68,68,var(--tw-border-opacity))!important}.border-red-600{--tw-border-opacity:1!important;border-color:rgba(220,38,38,var(--tw-border-opacity))!important}.border-green-200{--tw-border-opacity:1!important;border-color:rgba(167,243,208,var(--tw-border-opacity))!important}.border-green-400{--tw-border-opacity:1!important;border-color:rgba(52,211,153,var(--tw-border-opacity))!important}.border-green-600{--tw-border-opacity:1!important;border-color:rgba(5,150,105,var(--tw-border-opacity))!important}.border-blue-200{--tw-border-opacity:1!important;border-color:rgba(191,219,254,var(--tw-border-opacity))!important}.border-blue-300{--tw-border-opacity:1!important;border-color:rgba(147,197,253,var(--tw-border-opacity))!important}.border-blue-400{--tw-border-opacity:1!important;border-color:rgba(96,165,250,var(--tw-border-opacity))!important}.border-blue-500{--tw-border-opacity:1!important;border-color:rgba(59,130,246,var(--tw-border-opacity))!important}.border-blue-600{--tw-border-opacity:1!important;border-color:rgba(37,99,235,var(--tw-border-opacity))!important}.border-blue-800{--tw-border-opacity:1!important;border-color:rgba(30,64,175,var(--tw-border-opacity))!important}.border-indigo-200{--tw-border-opacity:1!important;border-color:rgba(199,210,254,var(--tw-border-opacity))!important}.border-indigo-400{--tw-border-opacity:1!important;border-color:rgba(129,140,248,var(--tw-border-opacity))!important}.border-purple-300{--tw-border-opacity:1!important;border-color:rgba(196,181,253,var(--tw-border-opacity))!important}.border-teal-200{--tw-border-opacity:1!important;border-color:rgba(153,246,228,var(--tw-border-opacity))!important}.border-orange-300{--tw-border-opacity:1!important;border-color:rgba(253,186,116,var(--tw-border-opacity))!important}.hover\:border-transparent:hover{border-color:transparent!important}.hover\:border-red-400:hover{--tw-border-opacity:1!important;border-color:rgba(248,113,113,var(--tw-border-opacity))!important}.hover\:border-red-500:hover{--tw-border-opacity:1!important;border-color:rgba(239,68,68,var(--tw-border-opacity))!important}.hover\:border-red-600:hover{--tw-border-opacity:1!important;border-color:rgba(220,38,38,var(--tw-border-opacity))!important}.hover\:border-green-500:hover{--tw-border-opacity:1!important;border-color:rgba(16,185,129,var(--tw-border-opacity))!important}.hover\:border-green-600:hover{--tw-border-opacity:1!important;border-color:rgba(5,150,105,var(--tw-border-opacity))!important}.hover\:border-blue-400:hover{--tw-border-opacity:1!important;border-color:rgba(96,165,250,var(--tw-border-opacity))!important}.hover\:border-blue-500:hover{--tw-border-opacity:1!important;border-color:rgba(59,130,246,var(--tw-border-opacity))!important}.hover\:border-blue-600:hover{--tw-border-opacity:1!important;border-color:rgba(37,99,235,var(--tw-border-opacity))!important}.hover\:border-teal-500:hover{--tw-border-opacity:1!important;border-color:rgba(20,184,166,var(--tw-border-opacity))!important}.focus\:border-blue-400:focus{--tw-border-opacity:1!important;border-color:rgba(96,165,250,var(--tw-border-opacity))!important}.hover\:border-opacity-0:hover{--tw-border-opacity:0!important}.bg-transparent{background-color:transparent!important}.bg-black{background-color:rgba(0,0,0,var(--tw-bg-opacity))!important}.bg-black,.bg-white{--tw-bg-opacity:1!important}.bg-white{background-color:rgba(255,255,255,var(--tw-bg-opacity))!important}.bg-gray-50{background-color:rgba(249,250,251,var(--tw-bg-opacity))!important}.bg-gray-50,.bg-gray-100{--tw-bg-opacity:1!important}.bg-gray-100{background-color:rgba(243,244,246,var(--tw-bg-opacity))!important}.bg-gray-200{background-color:rgba(229,231,235,var(--tw-bg-opacity))!important}.bg-gray-200,.bg-gray-300{--tw-bg-opacity:1!important}.bg-gray-300{background-color:rgba(209,213,219,var(--tw-bg-opacity))!important}.bg-gray-400{background-color:rgba(156,163,175,var(--tw-bg-opacity))!important}.bg-gray-400,.bg-gray-500{--tw-bg-opacity:1!important}.bg-gray-500{background-color:rgba(107,114,128,var(--tw-bg-opacity))!important}.bg-gray-600{background-color:rgba(75,85,99,var(--tw-bg-opacity))!important}.bg-gray-600,.bg-gray-700{--tw-bg-opacity:1!important}.bg-gray-700{background-color:rgba(55,65,81,var(--tw-bg-opacity))!important}.bg-gray-800{background-color:rgba(31,41,55,var(--tw-bg-opacity))!important}.bg-gray-800,.bg-gray-900{--tw-bg-opacity:1!important}.bg-gray-900{background-color:rgba(17,24,39,var(--tw-bg-opacity))!important}.bg-red-50{background-color:rgba(254,242,242,var(--tw-bg-opacity))!important}.bg-red-50,.bg-red-100{--tw-bg-opacity:1!important}.bg-red-100{background-color:rgba(254,226,226,var(--tw-bg-opacity))!important}.bg-red-200{background-color:rgba(254,202,202,var(--tw-bg-opacity))!important}.bg-red-200,.bg-red-400{--tw-bg-opacity:1!important}.bg-red-400{background-color:rgba(248,113,113,var(--tw-bg-opacity))!important}.bg-red-500{background-color:rgba(239,68,68,var(--tw-bg-opacity))!important}.bg-red-500,.bg-red-600{--tw-bg-opacity:1!important}.bg-red-600{background-color:rgba(220,38,38,var(--tw-bg-opacity))!important}.bg-yellow-100{--tw-bg-opacity:1!important;background-color:rgba(254,243,199,var(--tw-bg-opacity))!important}.bg-yellow-200{--tw-bg-opacity:1!important;background-color:rgba(253,230,138,var(--tw-bg-opacity))!important}.bg-yellow-400{--tw-bg-opacity:1!important;background-color:rgba(251,191,36,var(--tw-bg-opacity))!important}.bg-yellow-500{--tw-bg-opacity:1!important;background-color:rgba(245,158,11,var(--tw-bg-opacity))!important}.bg-green-50{background-color:rgba(236,253,245,var(--tw-bg-opacity))!important}.bg-green-50,.bg-green-100{--tw-bg-opacity:1!important}.bg-green-100{background-color:rgba(209,250,229,var(--tw-bg-opacity))!important}.bg-green-200{--tw-bg-opacity:1!important;background-color:rgba(167,243,208,var(--tw-bg-opacity))!important}.bg-green-400{--tw-bg-opacity:1!important;background-color:rgba(52,211,153,var(--tw-bg-opacity))!important}.bg-green-500{background-color:rgba(16,185,129,var(--tw-bg-opacity))!important}.bg-blue-50,.bg-green-500{--tw-bg-opacity:1!important}.bg-blue-50{background-color:rgba(239,246,255,var(--tw-bg-opacity))!important}.bg-blue-100{background-color:rgba(219,234,254,var(--tw-bg-opacity))!important}.bg-blue-100,.bg-blue-200{--tw-bg-opacity:1!important}.bg-blue-200{background-color:rgba(191,219,254,var(--tw-bg-opacity))!important}.bg-blue-300{background-color:rgba(147,197,253,var(--tw-bg-opacity))!important}.bg-blue-300,.bg-blue-400{--tw-bg-opacity:1!important}.bg-blue-400{background-color:rgba(96,165,250,var(--tw-bg-opacity))!important}.bg-blue-500{background-color:rgba(59,130,246,var(--tw-bg-opacity))!important}.bg-blue-500,.bg-blue-800{--tw-bg-opacity:1!important}.bg-blue-800{background-color:rgba(30,64,175,var(--tw-bg-opacity))!important}.bg-indigo-100{--tw-bg-opacity:1!important;background-color:rgba(224,231,255,var(--tw-bg-opacity))!important}.bg-indigo-400{--tw-bg-opacity:1!important;background-color:rgba(129,140,248,var(--tw-bg-opacity))!important}.bg-purple-200{--tw-bg-opacity:1!important;background-color:rgba(221,214,254,var(--tw-bg-opacity))!important}.bg-purple-400{--tw-bg-opacity:1!important;background-color:rgba(167,139,250,var(--tw-bg-opacity))!important}.bg-teal-100{background-color:rgba(204,251,241,var(--tw-bg-opacity))!important}.bg-teal-100,.bg-teal-200{--tw-bg-opacity:1!important}.bg-teal-200{background-color:rgba(153,246,228,var(--tw-bg-opacity))!important}.bg-teal-400{background-color:rgba(45,212,191,var(--tw-bg-opacity))!important}.bg-teal-400,.bg-teal-500{--tw-bg-opacity:1!important}.bg-teal-500{background-color:rgba(20,184,166,var(--tw-bg-opacity))!important}.bg-orange-200{--tw-bg-opacity:1!important;background-color:rgba(254,215,170,var(--tw-bg-opacity))!important}.bg-orange-400{--tw-bg-opacity:1!important;background-color:rgba(251,146,60,var(--tw-bg-opacity))!important}.hover\:bg-white:hover{--tw-bg-opacity:1!important;background-color:rgba(255,255,255,var(--tw-bg-opacity))!important}.hover\:bg-gray-100:hover{--tw-bg-opacity:1!important;background-color:rgba(243,244,246,var(--tw-bg-opacity))!important}.hover\:bg-gray-200:hover{--tw-bg-opacity:1!important;background-color:rgba(229,231,235,var(--tw-bg-opacity))!important}.hover\:bg-gray-300:hover{--tw-bg-opacity:1!important;background-color:rgba(209,213,219,var(--tw-bg-opacity))!important}.hover\:bg-gray-400:hover{--tw-bg-opacity:1!important;background-color:rgba(156,163,175,var(--tw-bg-opacity))!important}.hover\:bg-gray-700:hover{--tw-bg-opacity:1!important;background-color:rgba(55,65,81,var(--tw-bg-opacity))!important}.hover\:bg-red-100:hover{--tw-bg-opacity:1!important;background-color:rgba(254,226,226,var(--tw-bg-opacity))!important}.hover\:bg-red-200:hover{--tw-bg-opacity:1!important;background-color:rgba(254,202,202,var(--tw-bg-opacity))!important}.hover\:bg-red-400:hover{--tw-bg-opacity:1!important;background-color:rgba(248,113,113,var(--tw-bg-opacity))!important}.hover\:bg-red-500:hover{--tw-bg-opacity:1!important;background-color:rgba(239,68,68,var(--tw-bg-opacity))!important}.hover\:bg-red-600:hover{--tw-bg-opacity:1!important;background-color:rgba(220,38,38,var(--tw-bg-opacity))!important}.hover\:bg-green-100:hover{--tw-bg-opacity:1!important;background-color:rgba(209,250,229,var(--tw-bg-opacity))!important}.hover\:bg-green-500:hover{--tw-bg-opacity:1!important;background-color:rgba(16,185,129,var(--tw-bg-opacity))!important}.hover\:bg-green-600:hover{--tw-bg-opacity:1!important;background-color:rgba(5,150,105,var(--tw-bg-opacity))!important}.hover\:bg-blue-50:hover{--tw-bg-opacity:1!important;background-color:rgba(239,246,255,var(--tw-bg-opacity))!important}.hover\:bg-blue-100:hover{--tw-bg-opacity:1!important;background-color:rgba(219,234,254,var(--tw-bg-opacity))!important}.hover\:bg-blue-200:hover{--tw-bg-opacity:1!important;background-color:rgba(191,219,254,var(--tw-bg-opacity))!important}.hover\:bg-blue-400:hover{--tw-bg-opacity:1!important;background-color:rgba(96,165,250,var(--tw-bg-opacity))!important}.hover\:bg-blue-500:hover{--tw-bg-opacity:1!important;background-color:rgba(59,130,246,var(--tw-bg-opacity))!important}.hover\:bg-blue-600:hover{--tw-bg-opacity:1!important;background-color:rgba(37,99,235,var(--tw-bg-opacity))!important}.hover\:bg-indigo-100:hover{--tw-bg-opacity:1!important;background-color:rgba(224,231,255,var(--tw-bg-opacity))!important}.hover\:bg-teal-100:hover{--tw-bg-opacity:1!important;background-color:rgba(204,251,241,var(--tw-bg-opacity))!important}.hover\:bg-teal-500:hover{--tw-bg-opacity:1!important;background-color:rgba(20,184,166,var(--tw-bg-opacity))!important}.focus\:bg-gray-100:focus{--tw-bg-opacity:1!important;background-color:rgba(243,244,246,var(--tw-bg-opacity))!important}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))!important}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))!important}.bg-gradient-to-bl{background-image:linear-gradient(to bottom left,var(--tw-gradient-stops))!important}.from-red-300{--tw-gradient-from:#fca5a5!important;--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to,hsla(0,94%,82%,0))!important}.from-red-400{--tw-gradient-from:#f87171!important;--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to,hsla(0,91%,71%,0))!important}.from-red-500{--tw-gradient-from:#ef4444!important;--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to,rgba(239,68,68,0))!important}.from-green-400{--tw-gradient-from:#34d399!important;--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to,rgba(52,211,153,0))!important}.from-blue-200{--tw-gradient-from:#bfdbfe!important;--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to,rgba(191,219,254,0))!important}.from-blue-400{--tw-gradient-from:#60a5fa!important;--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to,rgba(96,165,250,0))!important}.from-blue-500{--tw-gradient-from:#3b82f6!important;--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to,rgba(59,130,246,0))!important}.from-indigo-400{--tw-gradient-from:#818cf8!important;--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to,rgba(129,140,248,0))!important}.from-purple-400{--tw-gradient-from:#a78bfa!important;--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to,rgba(167,139,250,0))!important}.from-purple-500{--tw-gradient-from:#8b5cf6!important;--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to,rgba(139,92,246,0))!important}.from-pink-400{--tw-gradient-from:#f472b6!important;--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to,rgba(244,114,182,0))!important}.via-red-400{--tw-gradient-stops:var(--tw-gradient-from),#f87171,var(--tw-gradient-to,hsla(0,91%,71%,0))!important}.to-red-500{--tw-gradient-to:#ef4444!important}.to-red-600{--tw-gradient-to:#dc2626!important}.to-red-700{--tw-gradient-to:#b91c1c!important}.to-green-600{--tw-gradient-to:#059669!important}.to-green-700{--tw-gradient-to:#047857!important}.to-blue-400{--tw-gradient-to:#60a5fa!important}.to-blue-600{--tw-gradient-to:#2563eb!important}.to-blue-700{--tw-gradient-to:#1d4ed8!important}.to-indigo-400{--tw-gradient-to:#818cf8!important}.to-indigo-500{--tw-gradient-to:#6366f1!important}.to-indigo-600{--tw-gradient-to:#4f46e5!important}.to-purple-600{--tw-gradient-to:#7c3aed!important}.to-pink-500{--tw-gradient-to:#ec4899!important}.to-teal-500{--tw-gradient-to:#14b8a6!important}.bg-clip-text{-webkit-background-clip:text!important;background-clip:text!important}.object-contain{-o-object-fit:contain!important;object-fit:contain!important}.object-cover{-o-object-fit:cover!important;object-fit:cover!important}.p-0{padding:0!important}.p-1{padding:.25rem!important}.p-2{padding:.5rem!important}.p-3{padding:.75rem!important}.p-4{padding:1rem!important}.p-8{padding:2rem!important}.p-10{padding:2.5rem!important}.px-1{padding-left:.25rem!important;padding-right:.25rem!important}.px-2{padding-left:.5rem!important;padding-right:.5rem!important}.px-3{padding-left:.75rem!important;padding-right:.75rem!important}.px-4{padding-left:1rem!important;padding-right:1rem!important}.py-1{padding-bottom:.25rem!important;padding-top:.25rem!important}.py-2{padding-bottom:.5rem!important;padding-top:.5rem!important}.py-3{padding-bottom:.75rem!important;padding-top:.75rem!important}.py-4{padding-bottom:1rem!important;padding-top:1rem!important}.py-5{padding-bottom:1.25rem!important;padding-top:1.25rem!important}.py-6{padding-bottom:1.5rem!important;padding-top:1.5rem!important}.py-10{padding-bottom:2.5rem!important;padding-top:2.5rem!important}.pt-2{padding-top:.5rem!important}.pt-6{padding-top:1.5rem!important}.pr-1{padding-right:.25rem!important}.pr-2{padding-right:.5rem!important}.pr-8{padding-right:2rem!important}.pr-12{padding-right:3rem!important}.pb-1{padding-bottom:.25rem!important}.pb-2{padding-bottom:.5rem!important}.pb-4{padding-bottom:1rem!important}.pb-10{padding-bottom:2.5rem!important}.pl-1{padding-left:.25rem!important}.pl-2{padding-left:.5rem!important}.pl-3{padding-left:.75rem!important}.pl-7{padding-left:1.75rem!important}.pl-8{padding-left:2rem!important}.text-left{text-align:left!important}.text-center{text-align:center!important}.text-right{text-align:right!important}.font-body{font-family:Graphik,sans-serif!important}.text-xs{font-size:.75rem!important;line-height:1rem!important}.text-sm{font-size:.875rem!important;line-height:1.25rem!important}.text-lg{font-size:1.125rem!important}.text-lg,.text-xl{line-height:1.75rem!important}.text-xl{font-size:1.25rem!important}.text-2xl{font-size:1.5rem!important;line-height:2rem!important}.text-3xl{font-size:1.875rem!important;line-height:2.25rem!important}.text-4xl{font-size:2.25rem!important;line-height:2.5rem!important}.text-5xl{font-size:3rem!important}.text-5xl,.text-6xl{line-height:1!important}.text-6xl{font-size:3.75rem!important}.text-8xl{font-size:6rem!important}.text-8xl,.text-9xl{line-height:1!important}.text-9xl{font-size:8rem!important}.font-medium{font-weight:500!important}.font-semibold{font-weight:600!important}.font-bold{font-weight:700!important}.font-black{font-weight:900!important}.uppercase{text-transform:uppercase!important}.lowercase{text-transform:lowercase!important}.italic{font-style:italic!important}.leading-5{line-height:1.25rem!important}.text-transparent{color:transparent!important}.text-white{color:rgba(255,255,255,var(--tw-text-opacity))!important}.text-gray-100,.text-white{--tw-text-opacity:1!important}.text-gray-100{color:rgba(243,244,246,var(--tw-text-opacity))!important}.text-gray-200{--tw-text-opacity:1!important;color:rgba(229,231,235,var(--tw-text-opacity))!important}.text-gray-300{--tw-text-opacity:1!important;color:rgba(209,213,219,var(--tw-text-opacity))!important}.text-gray-400{--tw-text-opacity:1!important;color:rgba(156,163,175,var(--tw-text-opacity))!important}.text-gray-500{--tw-text-opacity:1!important;color:rgba(107,114,128,var(--tw-text-opacity))!important}.text-gray-600{--tw-text-opacity:1!important;color:rgba(75,85,99,var(--tw-text-opacity))!important}.text-gray-700{--tw-text-opacity:1!important;color:rgba(55,65,81,var(--tw-text-opacity))!important}.text-gray-800{--tw-text-opacity:1!important;color:rgba(31,41,55,var(--tw-text-opacity))!important}.text-gray-900{color:rgba(17,24,39,var(--tw-text-opacity))!important}.text-gray-900,.text-red-400{--tw-text-opacity:1!important}.text-red-400{color:rgba(248,113,113,var(--tw-text-opacity))!important}.text-red-500{color:rgba(239,68,68,var(--tw-text-opacity))!important}.text-red-500,.text-red-600{--tw-text-opacity:1!important}.text-red-600{color:rgba(220,38,38,var(--tw-text-opacity))!important}.text-red-700{color:rgba(185,28,28,var(--tw-text-opacity))!important}.text-red-700,.text-red-800{--tw-text-opacity:1!important}.text-red-800{color:rgba(153,27,27,var(--tw-text-opacity))!important}.text-green-500{--tw-text-opacity:1!important;color:rgba(16,185,129,var(--tw-text-opacity))!important}.text-green-600{--tw-text-opacity:1!important;color:rgba(5,150,105,var(--tw-text-opacity))!important}.text-green-700{--tw-text-opacity:1!important;color:rgba(4,120,87,var(--tw-text-opacity))!important}.text-blue-500{--tw-text-opacity:1!important;color:rgba(59,130,246,var(--tw-text-opacity))!important}.text-blue-600{--tw-text-opacity:1!important;color:rgba(37,99,235,var(--tw-text-opacity))!important}.text-blue-700{--tw-text-opacity:1!important;color:rgba(29,78,216,var(--tw-text-opacity))!important}.hover\:text-white:hover{--tw-text-opacity:1!important;color:rgba(255,255,255,var(--tw-text-opacity))!important}.hover\:text-gray-700:hover{--tw-text-opacity:1!important;color:rgba(55,65,81,var(--tw-text-opacity))!important}.hover\:text-gray-800:hover{--tw-text-opacity:1!important;color:rgba(31,41,55,var(--tw-text-opacity))!important}.hover\:text-gray-900:hover{--tw-text-opacity:1!important;color:rgba(17,24,39,var(--tw-text-opacity))!important}.hover\:text-red-400:hover{--tw-text-opacity:1!important;color:rgba(248,113,113,var(--tw-text-opacity))!important}.hover\:text-red-500:hover{--tw-text-opacity:1!important;color:rgba(239,68,68,var(--tw-text-opacity))!important}.hover\:text-green-700:hover{--tw-text-opacity:1!important;color:rgba(4,120,87,var(--tw-text-opacity))!important}.hover\:text-blue-400:hover{--tw-text-opacity:1!important;color:rgba(96,165,250,var(--tw-text-opacity))!important}.hover\:text-blue-600:hover{--tw-text-opacity:1!important;color:rgba(37,99,235,var(--tw-text-opacity))!important}.focus\:text-gray-900:focus{--tw-text-opacity:1!important;color:rgba(17,24,39,var(--tw-text-opacity))!important}.hover\:underline:hover,.underline{text-decoration:underline!important}.opacity-0{opacity:0!important}*,:after,:before{--tw-shadow:0 0 #0000}.shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,0.05)!important}.shadow,.shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,0.1),0 1px 2px 0 rgba(0,0,0,0.06)!important}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,0.1),0 4px 6px -2px rgba(0,0,0,0.05)!important}.shadow-lg,.shadow-xl{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}.shadow-xl{--tw-shadow:0 20px 25px -5px rgba(0,0,0,0.1),0 10px 10px -5px rgba(0,0,0,0.04)!important}.shadow-inner{--tw-shadow:inset 0 2px 4px 0 rgba(0,0,0,0.06)!important}.hover\:shadow-lg:hover,.shadow-inner{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}.hover\:shadow-lg:hover{--tw-shadow:0 10px 15px -3px rgba(0,0,0,0.1),0 4px 6px -2px rgba(0,0,0,0.05)!important}.hover\:shadow-none:hover{--tw-shadow:0 0 #0000!important}.focus\:shadow-sm:focus,.hover\:shadow-none:hover{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}.focus\:shadow-sm:focus{--tw-shadow:0 1px 2px 0 rgba(0,0,0,0.05)!important}.focus\:outline-none:focus,.outline-none{outline:2px solid transparent!important;outline-offset:2px!important}*,:after,:before{--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000}.ring-4{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)!important;--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color)!important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)!important}.ring-blue-500{--tw-ring-opacity:1!important;--tw-ring-color:rgba(59,130,246,var(--tw-ring-opacity))!important}.ring-opacity-50{--tw-ring-opacity:0.5!important}.filter{--tw-blur:var(--tw-empty,/*!*/ /*!*/)!important;--tw-brightness:var(--tw-empty,/*!*/ /*!*/)!important;--tw-contrast:var(--tw-empty,/*!*/ /*!*/)!important;--tw-grayscale:var(--tw-empty,/*!*/ /*!*/)!important;--tw-hue-rotate:var(--tw-empty,/*!*/ /*!*/)!important;--tw-invert:var(--tw-empty,/*!*/ /*!*/)!important;--tw-saturate:var(--tw-empty,/*!*/ /*!*/)!important;--tw-sepia:var(--tw-empty,/*!*/ /*!*/)!important;--tw-drop-shadow:var(--tw-empty,/*!*/ /*!*/)!important;filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}.blur{--tw-blur:blur(8px)!important}.transition-all{transition-duration:.15s!important;transition-property:all!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.transition{transition-duration:.15s!important;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter!important;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter!important;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.duration-100{transition-duration:.1s!important}.ease-linear{transition-timing-function:linear!important}@-webkit-keyframes ZoomOutEntrance{0%{opacity:0;transform:scale(1.1)}to{opacity:1;transform:scale(1)}}@keyframes ZoomOutEntrance{0%{opacity:0;transform:scale(1.1)}to{opacity:1;transform:scale(1)}}@-webkit-keyframes ZoomInEntrance{0%{opacity:0;transform:scale(.9)}to{opacity:1;transform:scale(1)}}@keyframes ZoomInEntrance{0%{opacity:0;transform:scale(.9)}to{opacity:1;transform:scale(1)}}@-webkit-keyframes ZoomOutExit{0%{opacity:0;transform:scale(1)}to{opacity:1;transform:scale(.9)}}@keyframes ZoomOutExit{0%{opacity:0;transform:scale(1)}to{opacity:1;transform:scale(.9)}}@-webkit-keyframes ZoomInExit{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(1.1)}}@keyframes ZoomInExit{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(1.1)}}@-webkit-keyframes FadeInEntrance{0%{opacity:0}70%{opacity:.5}to{opacity:1}}@keyframes FadeInEntrance{0%{opacity:0}70%{opacity:.5}to{opacity:1}}@-webkit-keyframes FadeOutExit{0%{opacity:1}70%{opacity:.5}to{opacity:0}}@keyframes FadeOutExit{0%{opacity:1}70%{opacity:.5}to{opacity:0}}.zoom-out-entrance{-webkit-animation:ZoomOutEntrance .5s;animation:ZoomOutEntrance .5s}.zoom-in-entrance{-webkit-animation:ZoomInEntrance;animation:ZoomInEntrance}.zoom-in-exit{-webkit-animation:ZoomInExit .3s;animation:ZoomInExit .3s}.zoom-out-exit{-webkit-animation:ZoomOutExit;animation:ZoomOutExit}.fade-in-entrance{-webkit-animation:FadeInEntrance;animation:FadeInEntrance}.fade-out-exit{-webkit-animation:FadeOutExit;animation:FadeOutExit}.anim-duration-100{-webkit-animation-duration:.1s;animation-duration:.1s}.anim-duration-101{-webkit-animation-duration:101ms;animation-duration:101ms}.anim-duration-102{-webkit-animation-duration:102ms;animation-duration:102ms}.anim-duration-103{-webkit-animation-duration:103ms;animation-duration:103ms}.anim-duration-104{-webkit-animation-duration:104ms;animation-duration:104ms}.anim-duration-105{-webkit-animation-duration:105ms;animation-duration:105ms}.anim-duration-106{-webkit-animation-duration:106ms;animation-duration:106ms}.anim-duration-107{-webkit-animation-duration:107ms;animation-duration:107ms}.anim-duration-108{-webkit-animation-duration:108ms;animation-duration:108ms}.anim-duration-109{-webkit-animation-duration:109ms;animation-duration:109ms}.anim-duration-110{-webkit-animation-duration:.11s;animation-duration:.11s}.anim-duration-111{-webkit-animation-duration:111ms;animation-duration:111ms}.anim-duration-112{-webkit-animation-duration:112ms;animation-duration:112ms}.anim-duration-113{-webkit-animation-duration:113ms;animation-duration:113ms}.anim-duration-114{-webkit-animation-duration:114ms;animation-duration:114ms}.anim-duration-115{-webkit-animation-duration:115ms;animation-duration:115ms}.anim-duration-116{-webkit-animation-duration:116ms;animation-duration:116ms}.anim-duration-117{-webkit-animation-duration:117ms;animation-duration:117ms}.anim-duration-118{-webkit-animation-duration:118ms;animation-duration:118ms}.anim-duration-119{-webkit-animation-duration:119ms;animation-duration:119ms}.anim-duration-120{-webkit-animation-duration:.12s;animation-duration:.12s}.anim-duration-121{-webkit-animation-duration:121ms;animation-duration:121ms}.anim-duration-122{-webkit-animation-duration:122ms;animation-duration:122ms}.anim-duration-123{-webkit-animation-duration:123ms;animation-duration:123ms}.anim-duration-124{-webkit-animation-duration:124ms;animation-duration:124ms}.anim-duration-125{-webkit-animation-duration:125ms;animation-duration:125ms}.anim-duration-126{-webkit-animation-duration:126ms;animation-duration:126ms}.anim-duration-127{-webkit-animation-duration:127ms;animation-duration:127ms}.anim-duration-128{-webkit-animation-duration:128ms;animation-duration:128ms}.anim-duration-129{-webkit-animation-duration:129ms;animation-duration:129ms}.anim-duration-130{-webkit-animation-duration:.13s;animation-duration:.13s}.anim-duration-131{-webkit-animation-duration:131ms;animation-duration:131ms}.anim-duration-132{-webkit-animation-duration:132ms;animation-duration:132ms}.anim-duration-133{-webkit-animation-duration:133ms;animation-duration:133ms}.anim-duration-134{-webkit-animation-duration:134ms;animation-duration:134ms}.anim-duration-135{-webkit-animation-duration:135ms;animation-duration:135ms}.anim-duration-136{-webkit-animation-duration:136ms;animation-duration:136ms}.anim-duration-137{-webkit-animation-duration:137ms;animation-duration:137ms}.anim-duration-138{-webkit-animation-duration:138ms;animation-duration:138ms}.anim-duration-139{-webkit-animation-duration:139ms;animation-duration:139ms}.anim-duration-140{-webkit-animation-duration:.14s;animation-duration:.14s}.anim-duration-141{-webkit-animation-duration:141ms;animation-duration:141ms}.anim-duration-142{-webkit-animation-duration:142ms;animation-duration:142ms}.anim-duration-143{-webkit-animation-duration:143ms;animation-duration:143ms}.anim-duration-144{-webkit-animation-duration:144ms;animation-duration:144ms}.anim-duration-145{-webkit-animation-duration:145ms;animation-duration:145ms}.anim-duration-146{-webkit-animation-duration:146ms;animation-duration:146ms}.anim-duration-147{-webkit-animation-duration:147ms;animation-duration:147ms}.anim-duration-148{-webkit-animation-duration:148ms;animation-duration:148ms}.anim-duration-149{-webkit-animation-duration:149ms;animation-duration:149ms}.anim-duration-150{-webkit-animation-duration:.15s;animation-duration:.15s}.anim-duration-151{-webkit-animation-duration:151ms;animation-duration:151ms}.anim-duration-152{-webkit-animation-duration:152ms;animation-duration:152ms}.anim-duration-153{-webkit-animation-duration:153ms;animation-duration:153ms}.anim-duration-154{-webkit-animation-duration:154ms;animation-duration:154ms}.anim-duration-155{-webkit-animation-duration:155ms;animation-duration:155ms}.anim-duration-156{-webkit-animation-duration:156ms;animation-duration:156ms}.anim-duration-157{-webkit-animation-duration:157ms;animation-duration:157ms}.anim-duration-158{-webkit-animation-duration:158ms;animation-duration:158ms}.anim-duration-159{-webkit-animation-duration:159ms;animation-duration:159ms}.anim-duration-160{-webkit-animation-duration:.16s;animation-duration:.16s}.anim-duration-161{-webkit-animation-duration:161ms;animation-duration:161ms}.anim-duration-162{-webkit-animation-duration:162ms;animation-duration:162ms}.anim-duration-163{-webkit-animation-duration:163ms;animation-duration:163ms}.anim-duration-164{-webkit-animation-duration:164ms;animation-duration:164ms}.anim-duration-165{-webkit-animation-duration:165ms;animation-duration:165ms}.anim-duration-166{-webkit-animation-duration:166ms;animation-duration:166ms}.anim-duration-167{-webkit-animation-duration:167ms;animation-duration:167ms}.anim-duration-168{-webkit-animation-duration:168ms;animation-duration:168ms}.anim-duration-169{-webkit-animation-duration:169ms;animation-duration:169ms}.anim-duration-170{-webkit-animation-duration:.17s;animation-duration:.17s}.anim-duration-171{-webkit-animation-duration:171ms;animation-duration:171ms}.anim-duration-172{-webkit-animation-duration:172ms;animation-duration:172ms}.anim-duration-173{-webkit-animation-duration:173ms;animation-duration:173ms}.anim-duration-174{-webkit-animation-duration:174ms;animation-duration:174ms}.anim-duration-175{-webkit-animation-duration:175ms;animation-duration:175ms}.anim-duration-176{-webkit-animation-duration:176ms;animation-duration:176ms}.anim-duration-177{-webkit-animation-duration:177ms;animation-duration:177ms}.anim-duration-178{-webkit-animation-duration:178ms;animation-duration:178ms}.anim-duration-179{-webkit-animation-duration:179ms;animation-duration:179ms}.anim-duration-180{-webkit-animation-duration:.18s;animation-duration:.18s}.anim-duration-181{-webkit-animation-duration:181ms;animation-duration:181ms}.anim-duration-182{-webkit-animation-duration:182ms;animation-duration:182ms}.anim-duration-183{-webkit-animation-duration:183ms;animation-duration:183ms}.anim-duration-184{-webkit-animation-duration:184ms;animation-duration:184ms}.anim-duration-185{-webkit-animation-duration:185ms;animation-duration:185ms}.anim-duration-186{-webkit-animation-duration:186ms;animation-duration:186ms}.anim-duration-187{-webkit-animation-duration:187ms;animation-duration:187ms}.anim-duration-188{-webkit-animation-duration:188ms;animation-duration:188ms}.anim-duration-189{-webkit-animation-duration:189ms;animation-duration:189ms}.anim-duration-190{-webkit-animation-duration:.19s;animation-duration:.19s}.anim-duration-191{-webkit-animation-duration:191ms;animation-duration:191ms}.anim-duration-192{-webkit-animation-duration:192ms;animation-duration:192ms}.anim-duration-193{-webkit-animation-duration:193ms;animation-duration:193ms}.anim-duration-194{-webkit-animation-duration:194ms;animation-duration:194ms}.anim-duration-195{-webkit-animation-duration:195ms;animation-duration:195ms}.anim-duration-196{-webkit-animation-duration:196ms;animation-duration:196ms}.anim-duration-197{-webkit-animation-duration:197ms;animation-duration:197ms}.anim-duration-198{-webkit-animation-duration:198ms;animation-duration:198ms}.anim-duration-199{-webkit-animation-duration:199ms;animation-duration:199ms}.anim-duration-200{-webkit-animation-duration:.2s;animation-duration:.2s}.anim-duration-201{-webkit-animation-duration:201ms;animation-duration:201ms}.anim-duration-202{-webkit-animation-duration:202ms;animation-duration:202ms}.anim-duration-203{-webkit-animation-duration:203ms;animation-duration:203ms}.anim-duration-204{-webkit-animation-duration:204ms;animation-duration:204ms}.anim-duration-205{-webkit-animation-duration:205ms;animation-duration:205ms}.anim-duration-206{-webkit-animation-duration:206ms;animation-duration:206ms}.anim-duration-207{-webkit-animation-duration:207ms;animation-duration:207ms}.anim-duration-208{-webkit-animation-duration:208ms;animation-duration:208ms}.anim-duration-209{-webkit-animation-duration:209ms;animation-duration:209ms}.anim-duration-210{-webkit-animation-duration:.21s;animation-duration:.21s}.anim-duration-211{-webkit-animation-duration:211ms;animation-duration:211ms}.anim-duration-212{-webkit-animation-duration:212ms;animation-duration:212ms}.anim-duration-213{-webkit-animation-duration:213ms;animation-duration:213ms}.anim-duration-214{-webkit-animation-duration:214ms;animation-duration:214ms}.anim-duration-215{-webkit-animation-duration:215ms;animation-duration:215ms}.anim-duration-216{-webkit-animation-duration:216ms;animation-duration:216ms}.anim-duration-217{-webkit-animation-duration:217ms;animation-duration:217ms}.anim-duration-218{-webkit-animation-duration:218ms;animation-duration:218ms}.anim-duration-219{-webkit-animation-duration:219ms;animation-duration:219ms}.anim-duration-220{-webkit-animation-duration:.22s;animation-duration:.22s}.anim-duration-221{-webkit-animation-duration:221ms;animation-duration:221ms}.anim-duration-222{-webkit-animation-duration:222ms;animation-duration:222ms}.anim-duration-223{-webkit-animation-duration:223ms;animation-duration:223ms}.anim-duration-224{-webkit-animation-duration:224ms;animation-duration:224ms}.anim-duration-225{-webkit-animation-duration:225ms;animation-duration:225ms}.anim-duration-226{-webkit-animation-duration:226ms;animation-duration:226ms}.anim-duration-227{-webkit-animation-duration:227ms;animation-duration:227ms}.anim-duration-228{-webkit-animation-duration:228ms;animation-duration:228ms}.anim-duration-229{-webkit-animation-duration:229ms;animation-duration:229ms}.anim-duration-230{-webkit-animation-duration:.23s;animation-duration:.23s}.anim-duration-231{-webkit-animation-duration:231ms;animation-duration:231ms}.anim-duration-232{-webkit-animation-duration:232ms;animation-duration:232ms}.anim-duration-233{-webkit-animation-duration:233ms;animation-duration:233ms}.anim-duration-234{-webkit-animation-duration:234ms;animation-duration:234ms}.anim-duration-235{-webkit-animation-duration:235ms;animation-duration:235ms}.anim-duration-236{-webkit-animation-duration:236ms;animation-duration:236ms}.anim-duration-237{-webkit-animation-duration:237ms;animation-duration:237ms}.anim-duration-238{-webkit-animation-duration:238ms;animation-duration:238ms}.anim-duration-239{-webkit-animation-duration:239ms;animation-duration:239ms}.anim-duration-240{-webkit-animation-duration:.24s;animation-duration:.24s}.anim-duration-241{-webkit-animation-duration:241ms;animation-duration:241ms}.anim-duration-242{-webkit-animation-duration:242ms;animation-duration:242ms}.anim-duration-243{-webkit-animation-duration:243ms;animation-duration:243ms}.anim-duration-244{-webkit-animation-duration:244ms;animation-duration:244ms}.anim-duration-245{-webkit-animation-duration:245ms;animation-duration:245ms}.anim-duration-246{-webkit-animation-duration:246ms;animation-duration:246ms}.anim-duration-247{-webkit-animation-duration:247ms;animation-duration:247ms}.anim-duration-248{-webkit-animation-duration:248ms;animation-duration:248ms}.anim-duration-249{-webkit-animation-duration:249ms;animation-duration:249ms}.anim-duration-250{-webkit-animation-duration:.25s;animation-duration:.25s}.anim-duration-251{-webkit-animation-duration:251ms;animation-duration:251ms}.anim-duration-252{-webkit-animation-duration:252ms;animation-duration:252ms}.anim-duration-253{-webkit-animation-duration:253ms;animation-duration:253ms}.anim-duration-254{-webkit-animation-duration:254ms;animation-duration:254ms}.anim-duration-255{-webkit-animation-duration:255ms;animation-duration:255ms}.anim-duration-256{-webkit-animation-duration:256ms;animation-duration:256ms}.anim-duration-257{-webkit-animation-duration:257ms;animation-duration:257ms}.anim-duration-258{-webkit-animation-duration:258ms;animation-duration:258ms}.anim-duration-259{-webkit-animation-duration:259ms;animation-duration:259ms}.anim-duration-260{-webkit-animation-duration:.26s;animation-duration:.26s}.anim-duration-261{-webkit-animation-duration:261ms;animation-duration:261ms}.anim-duration-262{-webkit-animation-duration:262ms;animation-duration:262ms}.anim-duration-263{-webkit-animation-duration:263ms;animation-duration:263ms}.anim-duration-264{-webkit-animation-duration:264ms;animation-duration:264ms}.anim-duration-265{-webkit-animation-duration:265ms;animation-duration:265ms}.anim-duration-266{-webkit-animation-duration:266ms;animation-duration:266ms}.anim-duration-267{-webkit-animation-duration:267ms;animation-duration:267ms}.anim-duration-268{-webkit-animation-duration:268ms;animation-duration:268ms}.anim-duration-269{-webkit-animation-duration:269ms;animation-duration:269ms}.anim-duration-270{-webkit-animation-duration:.27s;animation-duration:.27s}.anim-duration-271{-webkit-animation-duration:271ms;animation-duration:271ms}.anim-duration-272{-webkit-animation-duration:272ms;animation-duration:272ms}.anim-duration-273{-webkit-animation-duration:273ms;animation-duration:273ms}.anim-duration-274{-webkit-animation-duration:274ms;animation-duration:274ms}.anim-duration-275{-webkit-animation-duration:275ms;animation-duration:275ms}.anim-duration-276{-webkit-animation-duration:276ms;animation-duration:276ms}.anim-duration-277{-webkit-animation-duration:277ms;animation-duration:277ms}.anim-duration-278{-webkit-animation-duration:278ms;animation-duration:278ms}.anim-duration-279{-webkit-animation-duration:279ms;animation-duration:279ms}.anim-duration-280{-webkit-animation-duration:.28s;animation-duration:.28s}.anim-duration-281{-webkit-animation-duration:281ms;animation-duration:281ms}.anim-duration-282{-webkit-animation-duration:282ms;animation-duration:282ms}.anim-duration-283{-webkit-animation-duration:283ms;animation-duration:283ms}.anim-duration-284{-webkit-animation-duration:284ms;animation-duration:284ms}.anim-duration-285{-webkit-animation-duration:285ms;animation-duration:285ms}.anim-duration-286{-webkit-animation-duration:286ms;animation-duration:286ms}.anim-duration-287{-webkit-animation-duration:287ms;animation-duration:287ms}.anim-duration-288{-webkit-animation-duration:288ms;animation-duration:288ms}.anim-duration-289{-webkit-animation-duration:289ms;animation-duration:289ms}.anim-duration-290{-webkit-animation-duration:.29s;animation-duration:.29s}.anim-duration-291{-webkit-animation-duration:291ms;animation-duration:291ms}.anim-duration-292{-webkit-animation-duration:292ms;animation-duration:292ms}.anim-duration-293{-webkit-animation-duration:293ms;animation-duration:293ms}.anim-duration-294{-webkit-animation-duration:294ms;animation-duration:294ms}.anim-duration-295{-webkit-animation-duration:295ms;animation-duration:295ms}.anim-duration-296{-webkit-animation-duration:296ms;animation-duration:296ms}.anim-duration-297{-webkit-animation-duration:297ms;animation-duration:297ms}.anim-duration-298{-webkit-animation-duration:298ms;animation-duration:298ms}.anim-duration-299{-webkit-animation-duration:299ms;animation-duration:299ms}.anim-duration-300{-webkit-animation-duration:.3s;animation-duration:.3s}.anim-duration-301{-webkit-animation-duration:301ms;animation-duration:301ms}.anim-duration-302{-webkit-animation-duration:302ms;animation-duration:302ms}.anim-duration-303{-webkit-animation-duration:303ms;animation-duration:303ms}.anim-duration-304{-webkit-animation-duration:304ms;animation-duration:304ms}.anim-duration-305{-webkit-animation-duration:305ms;animation-duration:305ms}.anim-duration-306{-webkit-animation-duration:306ms;animation-duration:306ms}.anim-duration-307{-webkit-animation-duration:307ms;animation-duration:307ms}.anim-duration-308{-webkit-animation-duration:308ms;animation-duration:308ms}.anim-duration-309{-webkit-animation-duration:309ms;animation-duration:309ms}.anim-duration-310{-webkit-animation-duration:.31s;animation-duration:.31s}.anim-duration-311{-webkit-animation-duration:311ms;animation-duration:311ms}.anim-duration-312{-webkit-animation-duration:312ms;animation-duration:312ms}.anim-duration-313{-webkit-animation-duration:313ms;animation-duration:313ms}.anim-duration-314{-webkit-animation-duration:314ms;animation-duration:314ms}.anim-duration-315{-webkit-animation-duration:315ms;animation-duration:315ms}.anim-duration-316{-webkit-animation-duration:316ms;animation-duration:316ms}.anim-duration-317{-webkit-animation-duration:317ms;animation-duration:317ms}.anim-duration-318{-webkit-animation-duration:318ms;animation-duration:318ms}.anim-duration-319{-webkit-animation-duration:319ms;animation-duration:319ms}.anim-duration-320{-webkit-animation-duration:.32s;animation-duration:.32s}.anim-duration-321{-webkit-animation-duration:321ms;animation-duration:321ms}.anim-duration-322{-webkit-animation-duration:322ms;animation-duration:322ms}.anim-duration-323{-webkit-animation-duration:323ms;animation-duration:323ms}.anim-duration-324{-webkit-animation-duration:324ms;animation-duration:324ms}.anim-duration-325{-webkit-animation-duration:325ms;animation-duration:325ms}.anim-duration-326{-webkit-animation-duration:326ms;animation-duration:326ms}.anim-duration-327{-webkit-animation-duration:327ms;animation-duration:327ms}.anim-duration-328{-webkit-animation-duration:328ms;animation-duration:328ms}.anim-duration-329{-webkit-animation-duration:329ms;animation-duration:329ms}.anim-duration-330{-webkit-animation-duration:.33s;animation-duration:.33s}.anim-duration-331{-webkit-animation-duration:331ms;animation-duration:331ms}.anim-duration-332{-webkit-animation-duration:332ms;animation-duration:332ms}.anim-duration-333{-webkit-animation-duration:333ms;animation-duration:333ms}.anim-duration-334{-webkit-animation-duration:334ms;animation-duration:334ms}.anim-duration-335{-webkit-animation-duration:335ms;animation-duration:335ms}.anim-duration-336{-webkit-animation-duration:336ms;animation-duration:336ms}.anim-duration-337{-webkit-animation-duration:337ms;animation-duration:337ms}.anim-duration-338{-webkit-animation-duration:338ms;animation-duration:338ms}.anim-duration-339{-webkit-animation-duration:339ms;animation-duration:339ms}.anim-duration-340{-webkit-animation-duration:.34s;animation-duration:.34s}.anim-duration-341{-webkit-animation-duration:341ms;animation-duration:341ms}.anim-duration-342{-webkit-animation-duration:342ms;animation-duration:342ms}.anim-duration-343{-webkit-animation-duration:343ms;animation-duration:343ms}.anim-duration-344{-webkit-animation-duration:344ms;animation-duration:344ms}.anim-duration-345{-webkit-animation-duration:345ms;animation-duration:345ms}.anim-duration-346{-webkit-animation-duration:346ms;animation-duration:346ms}.anim-duration-347{-webkit-animation-duration:347ms;animation-duration:347ms}.anim-duration-348{-webkit-animation-duration:348ms;animation-duration:348ms}.anim-duration-349{-webkit-animation-duration:349ms;animation-duration:349ms}.anim-duration-350{-webkit-animation-duration:.35s;animation-duration:.35s}.anim-duration-351{-webkit-animation-duration:351ms;animation-duration:351ms}.anim-duration-352{-webkit-animation-duration:352ms;animation-duration:352ms}.anim-duration-353{-webkit-animation-duration:353ms;animation-duration:353ms}.anim-duration-354{-webkit-animation-duration:354ms;animation-duration:354ms}.anim-duration-355{-webkit-animation-duration:355ms;animation-duration:355ms}.anim-duration-356{-webkit-animation-duration:356ms;animation-duration:356ms}.anim-duration-357{-webkit-animation-duration:357ms;animation-duration:357ms}.anim-duration-358{-webkit-animation-duration:358ms;animation-duration:358ms}.anim-duration-359{-webkit-animation-duration:359ms;animation-duration:359ms}.anim-duration-360{-webkit-animation-duration:.36s;animation-duration:.36s}.anim-duration-361{-webkit-animation-duration:361ms;animation-duration:361ms}.anim-duration-362{-webkit-animation-duration:362ms;animation-duration:362ms}.anim-duration-363{-webkit-animation-duration:363ms;animation-duration:363ms}.anim-duration-364{-webkit-animation-duration:364ms;animation-duration:364ms}.anim-duration-365{-webkit-animation-duration:365ms;animation-duration:365ms}.anim-duration-366{-webkit-animation-duration:366ms;animation-duration:366ms}.anim-duration-367{-webkit-animation-duration:367ms;animation-duration:367ms}.anim-duration-368{-webkit-animation-duration:368ms;animation-duration:368ms}.anim-duration-369{-webkit-animation-duration:369ms;animation-duration:369ms}.anim-duration-370{-webkit-animation-duration:.37s;animation-duration:.37s}.anim-duration-371{-webkit-animation-duration:371ms;animation-duration:371ms}.anim-duration-372{-webkit-animation-duration:372ms;animation-duration:372ms}.anim-duration-373{-webkit-animation-duration:373ms;animation-duration:373ms}.anim-duration-374{-webkit-animation-duration:374ms;animation-duration:374ms}.anim-duration-375{-webkit-animation-duration:375ms;animation-duration:375ms}.anim-duration-376{-webkit-animation-duration:376ms;animation-duration:376ms}.anim-duration-377{-webkit-animation-duration:377ms;animation-duration:377ms}.anim-duration-378{-webkit-animation-duration:378ms;animation-duration:378ms}.anim-duration-379{-webkit-animation-duration:379ms;animation-duration:379ms}.anim-duration-380{-webkit-animation-duration:.38s;animation-duration:.38s}.anim-duration-381{-webkit-animation-duration:381ms;animation-duration:381ms}.anim-duration-382{-webkit-animation-duration:382ms;animation-duration:382ms}.anim-duration-383{-webkit-animation-duration:383ms;animation-duration:383ms}.anim-duration-384{-webkit-animation-duration:384ms;animation-duration:384ms}.anim-duration-385{-webkit-animation-duration:385ms;animation-duration:385ms}.anim-duration-386{-webkit-animation-duration:386ms;animation-duration:386ms}.anim-duration-387{-webkit-animation-duration:387ms;animation-duration:387ms}.anim-duration-388{-webkit-animation-duration:388ms;animation-duration:388ms}.anim-duration-389{-webkit-animation-duration:389ms;animation-duration:389ms}.anim-duration-390{-webkit-animation-duration:.39s;animation-duration:.39s}.anim-duration-391{-webkit-animation-duration:391ms;animation-duration:391ms}.anim-duration-392{-webkit-animation-duration:392ms;animation-duration:392ms}.anim-duration-393{-webkit-animation-duration:393ms;animation-duration:393ms}.anim-duration-394{-webkit-animation-duration:394ms;animation-duration:394ms}.anim-duration-395{-webkit-animation-duration:395ms;animation-duration:395ms}.anim-duration-396{-webkit-animation-duration:396ms;animation-duration:396ms}.anim-duration-397{-webkit-animation-duration:397ms;animation-duration:397ms}.anim-duration-398{-webkit-animation-duration:398ms;animation-duration:398ms}.anim-duration-399{-webkit-animation-duration:399ms;animation-duration:399ms}.anim-duration-400{-webkit-animation-duration:.4s;animation-duration:.4s}.anim-duration-401{-webkit-animation-duration:401ms;animation-duration:401ms}.anim-duration-402{-webkit-animation-duration:402ms;animation-duration:402ms}.anim-duration-403{-webkit-animation-duration:403ms;animation-duration:403ms}.anim-duration-404{-webkit-animation-duration:404ms;animation-duration:404ms}.anim-duration-405{-webkit-animation-duration:405ms;animation-duration:405ms}.anim-duration-406{-webkit-animation-duration:406ms;animation-duration:406ms}.anim-duration-407{-webkit-animation-duration:407ms;animation-duration:407ms}.anim-duration-408{-webkit-animation-duration:408ms;animation-duration:408ms}.anim-duration-409{-webkit-animation-duration:409ms;animation-duration:409ms}.anim-duration-410{-webkit-animation-duration:.41s;animation-duration:.41s}.anim-duration-411{-webkit-animation-duration:411ms;animation-duration:411ms}.anim-duration-412{-webkit-animation-duration:412ms;animation-duration:412ms}.anim-duration-413{-webkit-animation-duration:413ms;animation-duration:413ms}.anim-duration-414{-webkit-animation-duration:414ms;animation-duration:414ms}.anim-duration-415{-webkit-animation-duration:415ms;animation-duration:415ms}.anim-duration-416{-webkit-animation-duration:416ms;animation-duration:416ms}.anim-duration-417{-webkit-animation-duration:417ms;animation-duration:417ms}.anim-duration-418{-webkit-animation-duration:418ms;animation-duration:418ms}.anim-duration-419{-webkit-animation-duration:419ms;animation-duration:419ms}.anim-duration-420{-webkit-animation-duration:.42s;animation-duration:.42s}.anim-duration-421{-webkit-animation-duration:421ms;animation-duration:421ms}.anim-duration-422{-webkit-animation-duration:422ms;animation-duration:422ms}.anim-duration-423{-webkit-animation-duration:423ms;animation-duration:423ms}.anim-duration-424{-webkit-animation-duration:424ms;animation-duration:424ms}.anim-duration-425{-webkit-animation-duration:425ms;animation-duration:425ms}.anim-duration-426{-webkit-animation-duration:426ms;animation-duration:426ms}.anim-duration-427{-webkit-animation-duration:427ms;animation-duration:427ms}.anim-duration-428{-webkit-animation-duration:428ms;animation-duration:428ms}.anim-duration-429{-webkit-animation-duration:429ms;animation-duration:429ms}.anim-duration-430{-webkit-animation-duration:.43s;animation-duration:.43s}.anim-duration-431{-webkit-animation-duration:431ms;animation-duration:431ms}.anim-duration-432{-webkit-animation-duration:432ms;animation-duration:432ms}.anim-duration-433{-webkit-animation-duration:433ms;animation-duration:433ms}.anim-duration-434{-webkit-animation-duration:434ms;animation-duration:434ms}.anim-duration-435{-webkit-animation-duration:435ms;animation-duration:435ms}.anim-duration-436{-webkit-animation-duration:436ms;animation-duration:436ms}.anim-duration-437{-webkit-animation-duration:437ms;animation-duration:437ms}.anim-duration-438{-webkit-animation-duration:438ms;animation-duration:438ms}.anim-duration-439{-webkit-animation-duration:439ms;animation-duration:439ms}.anim-duration-440{-webkit-animation-duration:.44s;animation-duration:.44s}.anim-duration-441{-webkit-animation-duration:441ms;animation-duration:441ms}.anim-duration-442{-webkit-animation-duration:442ms;animation-duration:442ms}.anim-duration-443{-webkit-animation-duration:443ms;animation-duration:443ms}.anim-duration-444{-webkit-animation-duration:444ms;animation-duration:444ms}.anim-duration-445{-webkit-animation-duration:445ms;animation-duration:445ms}.anim-duration-446{-webkit-animation-duration:446ms;animation-duration:446ms}.anim-duration-447{-webkit-animation-duration:447ms;animation-duration:447ms}.anim-duration-448{-webkit-animation-duration:448ms;animation-duration:448ms}.anim-duration-449{-webkit-animation-duration:449ms;animation-duration:449ms}.anim-duration-450{-webkit-animation-duration:.45s;animation-duration:.45s}.anim-duration-451{-webkit-animation-duration:451ms;animation-duration:451ms}.anim-duration-452{-webkit-animation-duration:452ms;animation-duration:452ms}.anim-duration-453{-webkit-animation-duration:453ms;animation-duration:453ms}.anim-duration-454{-webkit-animation-duration:454ms;animation-duration:454ms}.anim-duration-455{-webkit-animation-duration:455ms;animation-duration:455ms}.anim-duration-456{-webkit-animation-duration:456ms;animation-duration:456ms}.anim-duration-457{-webkit-animation-duration:457ms;animation-duration:457ms}.anim-duration-458{-webkit-animation-duration:458ms;animation-duration:458ms}.anim-duration-459{-webkit-animation-duration:459ms;animation-duration:459ms}.anim-duration-460{-webkit-animation-duration:.46s;animation-duration:.46s}.anim-duration-461{-webkit-animation-duration:461ms;animation-duration:461ms}.anim-duration-462{-webkit-animation-duration:462ms;animation-duration:462ms}.anim-duration-463{-webkit-animation-duration:463ms;animation-duration:463ms}.anim-duration-464{-webkit-animation-duration:464ms;animation-duration:464ms}.anim-duration-465{-webkit-animation-duration:465ms;animation-duration:465ms}.anim-duration-466{-webkit-animation-duration:466ms;animation-duration:466ms}.anim-duration-467{-webkit-animation-duration:467ms;animation-duration:467ms}.anim-duration-468{-webkit-animation-duration:468ms;animation-duration:468ms}.anim-duration-469{-webkit-animation-duration:469ms;animation-duration:469ms}.anim-duration-470{-webkit-animation-duration:.47s;animation-duration:.47s}.anim-duration-471{-webkit-animation-duration:471ms;animation-duration:471ms}.anim-duration-472{-webkit-animation-duration:472ms;animation-duration:472ms}.anim-duration-473{-webkit-animation-duration:473ms;animation-duration:473ms}.anim-duration-474{-webkit-animation-duration:474ms;animation-duration:474ms}.anim-duration-475{-webkit-animation-duration:475ms;animation-duration:475ms}.anim-duration-476{-webkit-animation-duration:476ms;animation-duration:476ms}.anim-duration-477{-webkit-animation-duration:477ms;animation-duration:477ms}.anim-duration-478{-webkit-animation-duration:478ms;animation-duration:478ms}.anim-duration-479{-webkit-animation-duration:479ms;animation-duration:479ms}.anim-duration-480{-webkit-animation-duration:.48s;animation-duration:.48s}.anim-duration-481{-webkit-animation-duration:481ms;animation-duration:481ms}.anim-duration-482{-webkit-animation-duration:482ms;animation-duration:482ms}.anim-duration-483{-webkit-animation-duration:483ms;animation-duration:483ms}.anim-duration-484{-webkit-animation-duration:484ms;animation-duration:484ms}.anim-duration-485{-webkit-animation-duration:485ms;animation-duration:485ms}.anim-duration-486{-webkit-animation-duration:486ms;animation-duration:486ms}.anim-duration-487{-webkit-animation-duration:487ms;animation-duration:487ms}.anim-duration-488{-webkit-animation-duration:488ms;animation-duration:488ms}.anim-duration-489{-webkit-animation-duration:489ms;animation-duration:489ms}.anim-duration-490{-webkit-animation-duration:.49s;animation-duration:.49s}.anim-duration-491{-webkit-animation-duration:491ms;animation-duration:491ms}.anim-duration-492{-webkit-animation-duration:492ms;animation-duration:492ms}.anim-duration-493{-webkit-animation-duration:493ms;animation-duration:493ms}.anim-duration-494{-webkit-animation-duration:494ms;animation-duration:494ms}.anim-duration-495{-webkit-animation-duration:495ms;animation-duration:495ms}.anim-duration-496{-webkit-animation-duration:496ms;animation-duration:496ms}.anim-duration-497{-webkit-animation-duration:497ms;animation-duration:497ms}.anim-duration-498{-webkit-animation-duration:498ms;animation-duration:498ms}.anim-duration-499{-webkit-animation-duration:499ms;animation-duration:499ms}.anim-duration-500{-webkit-animation-duration:.5s;animation-duration:.5s}.anim-duration-501{-webkit-animation-duration:501ms;animation-duration:501ms}.anim-duration-502{-webkit-animation-duration:502ms;animation-duration:502ms}.anim-duration-503{-webkit-animation-duration:503ms;animation-duration:503ms}.anim-duration-504{-webkit-animation-duration:504ms;animation-duration:504ms}.anim-duration-505{-webkit-animation-duration:505ms;animation-duration:505ms}.anim-duration-506{-webkit-animation-duration:506ms;animation-duration:506ms}.anim-duration-507{-webkit-animation-duration:507ms;animation-duration:507ms}.anim-duration-508{-webkit-animation-duration:508ms;animation-duration:508ms}.anim-duration-509{-webkit-animation-duration:509ms;animation-duration:509ms}.anim-duration-510{-webkit-animation-duration:.51s;animation-duration:.51s}.anim-duration-511{-webkit-animation-duration:511ms;animation-duration:511ms}.anim-duration-512{-webkit-animation-duration:512ms;animation-duration:512ms}.anim-duration-513{-webkit-animation-duration:513ms;animation-duration:513ms}.anim-duration-514{-webkit-animation-duration:514ms;animation-duration:514ms}.anim-duration-515{-webkit-animation-duration:515ms;animation-duration:515ms}.anim-duration-516{-webkit-animation-duration:516ms;animation-duration:516ms}.anim-duration-517{-webkit-animation-duration:517ms;animation-duration:517ms}.anim-duration-518{-webkit-animation-duration:518ms;animation-duration:518ms}.anim-duration-519{-webkit-animation-duration:519ms;animation-duration:519ms}.anim-duration-520{-webkit-animation-duration:.52s;animation-duration:.52s}.anim-duration-521{-webkit-animation-duration:521ms;animation-duration:521ms}.anim-duration-522{-webkit-animation-duration:522ms;animation-duration:522ms}.anim-duration-523{-webkit-animation-duration:523ms;animation-duration:523ms}.anim-duration-524{-webkit-animation-duration:524ms;animation-duration:524ms}.anim-duration-525{-webkit-animation-duration:525ms;animation-duration:525ms}.anim-duration-526{-webkit-animation-duration:526ms;animation-duration:526ms}.anim-duration-527{-webkit-animation-duration:527ms;animation-duration:527ms}.anim-duration-528{-webkit-animation-duration:528ms;animation-duration:528ms}.anim-duration-529{-webkit-animation-duration:529ms;animation-duration:529ms}.anim-duration-530{-webkit-animation-duration:.53s;animation-duration:.53s}.anim-duration-531{-webkit-animation-duration:531ms;animation-duration:531ms}.anim-duration-532{-webkit-animation-duration:532ms;animation-duration:532ms}.anim-duration-533{-webkit-animation-duration:533ms;animation-duration:533ms}.anim-duration-534{-webkit-animation-duration:534ms;animation-duration:534ms}.anim-duration-535{-webkit-animation-duration:535ms;animation-duration:535ms}.anim-duration-536{-webkit-animation-duration:536ms;animation-duration:536ms}.anim-duration-537{-webkit-animation-duration:537ms;animation-duration:537ms}.anim-duration-538{-webkit-animation-duration:538ms;animation-duration:538ms}.anim-duration-539{-webkit-animation-duration:539ms;animation-duration:539ms}.anim-duration-540{-webkit-animation-duration:.54s;animation-duration:.54s}.anim-duration-541{-webkit-animation-duration:541ms;animation-duration:541ms}.anim-duration-542{-webkit-animation-duration:542ms;animation-duration:542ms}.anim-duration-543{-webkit-animation-duration:543ms;animation-duration:543ms}.anim-duration-544{-webkit-animation-duration:544ms;animation-duration:544ms}.anim-duration-545{-webkit-animation-duration:545ms;animation-duration:545ms}.anim-duration-546{-webkit-animation-duration:546ms;animation-duration:546ms}.anim-duration-547{-webkit-animation-duration:547ms;animation-duration:547ms}.anim-duration-548{-webkit-animation-duration:548ms;animation-duration:548ms}.anim-duration-549{-webkit-animation-duration:549ms;animation-duration:549ms}.anim-duration-550{-webkit-animation-duration:.55s;animation-duration:.55s}.anim-duration-551{-webkit-animation-duration:551ms;animation-duration:551ms}.anim-duration-552{-webkit-animation-duration:552ms;animation-duration:552ms}.anim-duration-553{-webkit-animation-duration:553ms;animation-duration:553ms}.anim-duration-554{-webkit-animation-duration:554ms;animation-duration:554ms}.anim-duration-555{-webkit-animation-duration:555ms;animation-duration:555ms}.anim-duration-556{-webkit-animation-duration:556ms;animation-duration:556ms}.anim-duration-557{-webkit-animation-duration:557ms;animation-duration:557ms}.anim-duration-558{-webkit-animation-duration:558ms;animation-duration:558ms}.anim-duration-559{-webkit-animation-duration:559ms;animation-duration:559ms}.anim-duration-560{-webkit-animation-duration:.56s;animation-duration:.56s}.anim-duration-561{-webkit-animation-duration:561ms;animation-duration:561ms}.anim-duration-562{-webkit-animation-duration:562ms;animation-duration:562ms}.anim-duration-563{-webkit-animation-duration:563ms;animation-duration:563ms}.anim-duration-564{-webkit-animation-duration:564ms;animation-duration:564ms}.anim-duration-565{-webkit-animation-duration:565ms;animation-duration:565ms}.anim-duration-566{-webkit-animation-duration:566ms;animation-duration:566ms}.anim-duration-567{-webkit-animation-duration:567ms;animation-duration:567ms}.anim-duration-568{-webkit-animation-duration:568ms;animation-duration:568ms}.anim-duration-569{-webkit-animation-duration:569ms;animation-duration:569ms}.anim-duration-570{-webkit-animation-duration:.57s;animation-duration:.57s}.anim-duration-571{-webkit-animation-duration:571ms;animation-duration:571ms}.anim-duration-572{-webkit-animation-duration:572ms;animation-duration:572ms}.anim-duration-573{-webkit-animation-duration:573ms;animation-duration:573ms}.anim-duration-574{-webkit-animation-duration:574ms;animation-duration:574ms}.anim-duration-575{-webkit-animation-duration:575ms;animation-duration:575ms}.anim-duration-576{-webkit-animation-duration:576ms;animation-duration:576ms}.anim-duration-577{-webkit-animation-duration:577ms;animation-duration:577ms}.anim-duration-578{-webkit-animation-duration:578ms;animation-duration:578ms}.anim-duration-579{-webkit-animation-duration:579ms;animation-duration:579ms}.anim-duration-580{-webkit-animation-duration:.58s;animation-duration:.58s}.anim-duration-581{-webkit-animation-duration:581ms;animation-duration:581ms}.anim-duration-582{-webkit-animation-duration:582ms;animation-duration:582ms}.anim-duration-583{-webkit-animation-duration:583ms;animation-duration:583ms}.anim-duration-584{-webkit-animation-duration:584ms;animation-duration:584ms}.anim-duration-585{-webkit-animation-duration:585ms;animation-duration:585ms}.anim-duration-586{-webkit-animation-duration:586ms;animation-duration:586ms}.anim-duration-587{-webkit-animation-duration:587ms;animation-duration:587ms}.anim-duration-588{-webkit-animation-duration:588ms;animation-duration:588ms}.anim-duration-589{-webkit-animation-duration:589ms;animation-duration:589ms}.anim-duration-590{-webkit-animation-duration:.59s;animation-duration:.59s}.anim-duration-591{-webkit-animation-duration:591ms;animation-duration:591ms}.anim-duration-592{-webkit-animation-duration:592ms;animation-duration:592ms}.anim-duration-593{-webkit-animation-duration:593ms;animation-duration:593ms}.anim-duration-594{-webkit-animation-duration:594ms;animation-duration:594ms}.anim-duration-595{-webkit-animation-duration:595ms;animation-duration:595ms}.anim-duration-596{-webkit-animation-duration:596ms;animation-duration:596ms}.anim-duration-597{-webkit-animation-duration:597ms;animation-duration:597ms}.anim-duration-598{-webkit-animation-duration:598ms;animation-duration:598ms}.anim-duration-599{-webkit-animation-duration:599ms;animation-duration:599ms}.anim-duration-600{-webkit-animation-duration:.6s;animation-duration:.6s}.anim-duration-601{-webkit-animation-duration:601ms;animation-duration:601ms}.anim-duration-602{-webkit-animation-duration:602ms;animation-duration:602ms}.anim-duration-603{-webkit-animation-duration:603ms;animation-duration:603ms}.anim-duration-604{-webkit-animation-duration:604ms;animation-duration:604ms}.anim-duration-605{-webkit-animation-duration:605ms;animation-duration:605ms}.anim-duration-606{-webkit-animation-duration:606ms;animation-duration:606ms}.anim-duration-607{-webkit-animation-duration:607ms;animation-duration:607ms}.anim-duration-608{-webkit-animation-duration:608ms;animation-duration:608ms}.anim-duration-609{-webkit-animation-duration:609ms;animation-duration:609ms}.anim-duration-610{-webkit-animation-duration:.61s;animation-duration:.61s}.anim-duration-611{-webkit-animation-duration:611ms;animation-duration:611ms}.anim-duration-612{-webkit-animation-duration:612ms;animation-duration:612ms}.anim-duration-613{-webkit-animation-duration:613ms;animation-duration:613ms}.anim-duration-614{-webkit-animation-duration:614ms;animation-duration:614ms}.anim-duration-615{-webkit-animation-duration:615ms;animation-duration:615ms}.anim-duration-616{-webkit-animation-duration:616ms;animation-duration:616ms}.anim-duration-617{-webkit-animation-duration:617ms;animation-duration:617ms}.anim-duration-618{-webkit-animation-duration:618ms;animation-duration:618ms}.anim-duration-619{-webkit-animation-duration:619ms;animation-duration:619ms}.anim-duration-620{-webkit-animation-duration:.62s;animation-duration:.62s}.anim-duration-621{-webkit-animation-duration:621ms;animation-duration:621ms}.anim-duration-622{-webkit-animation-duration:622ms;animation-duration:622ms}.anim-duration-623{-webkit-animation-duration:623ms;animation-duration:623ms}.anim-duration-624{-webkit-animation-duration:624ms;animation-duration:624ms}.anim-duration-625{-webkit-animation-duration:625ms;animation-duration:625ms}.anim-duration-626{-webkit-animation-duration:626ms;animation-duration:626ms}.anim-duration-627{-webkit-animation-duration:627ms;animation-duration:627ms}.anim-duration-628{-webkit-animation-duration:628ms;animation-duration:628ms}.anim-duration-629{-webkit-animation-duration:629ms;animation-duration:629ms}.anim-duration-630{-webkit-animation-duration:.63s;animation-duration:.63s}.anim-duration-631{-webkit-animation-duration:631ms;animation-duration:631ms}.anim-duration-632{-webkit-animation-duration:632ms;animation-duration:632ms}.anim-duration-633{-webkit-animation-duration:633ms;animation-duration:633ms}.anim-duration-634{-webkit-animation-duration:634ms;animation-duration:634ms}.anim-duration-635{-webkit-animation-duration:635ms;animation-duration:635ms}.anim-duration-636{-webkit-animation-duration:636ms;animation-duration:636ms}.anim-duration-637{-webkit-animation-duration:637ms;animation-duration:637ms}.anim-duration-638{-webkit-animation-duration:638ms;animation-duration:638ms}.anim-duration-639{-webkit-animation-duration:639ms;animation-duration:639ms}.anim-duration-640{-webkit-animation-duration:.64s;animation-duration:.64s}.anim-duration-641{-webkit-animation-duration:641ms;animation-duration:641ms}.anim-duration-642{-webkit-animation-duration:642ms;animation-duration:642ms}.anim-duration-643{-webkit-animation-duration:643ms;animation-duration:643ms}.anim-duration-644{-webkit-animation-duration:644ms;animation-duration:644ms}.anim-duration-645{-webkit-animation-duration:645ms;animation-duration:645ms}.anim-duration-646{-webkit-animation-duration:646ms;animation-duration:646ms}.anim-duration-647{-webkit-animation-duration:647ms;animation-duration:647ms}.anim-duration-648{-webkit-animation-duration:648ms;animation-duration:648ms}.anim-duration-649{-webkit-animation-duration:649ms;animation-duration:649ms}.anim-duration-650{-webkit-animation-duration:.65s;animation-duration:.65s}.anim-duration-651{-webkit-animation-duration:651ms;animation-duration:651ms}.anim-duration-652{-webkit-animation-duration:652ms;animation-duration:652ms}.anim-duration-653{-webkit-animation-duration:653ms;animation-duration:653ms}.anim-duration-654{-webkit-animation-duration:654ms;animation-duration:654ms}.anim-duration-655{-webkit-animation-duration:655ms;animation-duration:655ms}.anim-duration-656{-webkit-animation-duration:656ms;animation-duration:656ms}.anim-duration-657{-webkit-animation-duration:657ms;animation-duration:657ms}.anim-duration-658{-webkit-animation-duration:658ms;animation-duration:658ms}.anim-duration-659{-webkit-animation-duration:659ms;animation-duration:659ms}.anim-duration-660{-webkit-animation-duration:.66s;animation-duration:.66s}.anim-duration-661{-webkit-animation-duration:661ms;animation-duration:661ms}.anim-duration-662{-webkit-animation-duration:662ms;animation-duration:662ms}.anim-duration-663{-webkit-animation-duration:663ms;animation-duration:663ms}.anim-duration-664{-webkit-animation-duration:664ms;animation-duration:664ms}.anim-duration-665{-webkit-animation-duration:665ms;animation-duration:665ms}.anim-duration-666{-webkit-animation-duration:666ms;animation-duration:666ms}.anim-duration-667{-webkit-animation-duration:667ms;animation-duration:667ms}.anim-duration-668{-webkit-animation-duration:668ms;animation-duration:668ms}.anim-duration-669{-webkit-animation-duration:669ms;animation-duration:669ms}.anim-duration-670{-webkit-animation-duration:.67s;animation-duration:.67s}.anim-duration-671{-webkit-animation-duration:671ms;animation-duration:671ms}.anim-duration-672{-webkit-animation-duration:672ms;animation-duration:672ms}.anim-duration-673{-webkit-animation-duration:673ms;animation-duration:673ms}.anim-duration-674{-webkit-animation-duration:674ms;animation-duration:674ms}.anim-duration-675{-webkit-animation-duration:675ms;animation-duration:675ms}.anim-duration-676{-webkit-animation-duration:676ms;animation-duration:676ms}.anim-duration-677{-webkit-animation-duration:677ms;animation-duration:677ms}.anim-duration-678{-webkit-animation-duration:678ms;animation-duration:678ms}.anim-duration-679{-webkit-animation-duration:679ms;animation-duration:679ms}.anim-duration-680{-webkit-animation-duration:.68s;animation-duration:.68s}.anim-duration-681{-webkit-animation-duration:681ms;animation-duration:681ms}.anim-duration-682{-webkit-animation-duration:682ms;animation-duration:682ms}.anim-duration-683{-webkit-animation-duration:683ms;animation-duration:683ms}.anim-duration-684{-webkit-animation-duration:684ms;animation-duration:684ms}.anim-duration-685{-webkit-animation-duration:685ms;animation-duration:685ms}.anim-duration-686{-webkit-animation-duration:686ms;animation-duration:686ms}.anim-duration-687{-webkit-animation-duration:687ms;animation-duration:687ms}.anim-duration-688{-webkit-animation-duration:688ms;animation-duration:688ms}.anim-duration-689{-webkit-animation-duration:689ms;animation-duration:689ms}.anim-duration-690{-webkit-animation-duration:.69s;animation-duration:.69s}.anim-duration-691{-webkit-animation-duration:691ms;animation-duration:691ms}.anim-duration-692{-webkit-animation-duration:692ms;animation-duration:692ms}.anim-duration-693{-webkit-animation-duration:693ms;animation-duration:693ms}.anim-duration-694{-webkit-animation-duration:694ms;animation-duration:694ms}.anim-duration-695{-webkit-animation-duration:695ms;animation-duration:695ms}.anim-duration-696{-webkit-animation-duration:696ms;animation-duration:696ms}.anim-duration-697{-webkit-animation-duration:697ms;animation-duration:697ms}.anim-duration-698{-webkit-animation-duration:698ms;animation-duration:698ms}.anim-duration-699{-webkit-animation-duration:699ms;animation-duration:699ms}.anim-duration-700{-webkit-animation-duration:.7s;animation-duration:.7s}.anim-duration-701{-webkit-animation-duration:701ms;animation-duration:701ms}.anim-duration-702{-webkit-animation-duration:702ms;animation-duration:702ms}.anim-duration-703{-webkit-animation-duration:703ms;animation-duration:703ms}.anim-duration-704{-webkit-animation-duration:704ms;animation-duration:704ms}.anim-duration-705{-webkit-animation-duration:705ms;animation-duration:705ms}.anim-duration-706{-webkit-animation-duration:706ms;animation-duration:706ms}.anim-duration-707{-webkit-animation-duration:707ms;animation-duration:707ms}.anim-duration-708{-webkit-animation-duration:708ms;animation-duration:708ms}.anim-duration-709{-webkit-animation-duration:709ms;animation-duration:709ms}.anim-duration-710{-webkit-animation-duration:.71s;animation-duration:.71s}.anim-duration-711{-webkit-animation-duration:711ms;animation-duration:711ms}.anim-duration-712{-webkit-animation-duration:712ms;animation-duration:712ms}.anim-duration-713{-webkit-animation-duration:713ms;animation-duration:713ms}.anim-duration-714{-webkit-animation-duration:714ms;animation-duration:714ms}.anim-duration-715{-webkit-animation-duration:715ms;animation-duration:715ms}.anim-duration-716{-webkit-animation-duration:716ms;animation-duration:716ms}.anim-duration-717{-webkit-animation-duration:717ms;animation-duration:717ms}.anim-duration-718{-webkit-animation-duration:718ms;animation-duration:718ms}.anim-duration-719{-webkit-animation-duration:719ms;animation-duration:719ms}.anim-duration-720{-webkit-animation-duration:.72s;animation-duration:.72s}.anim-duration-721{-webkit-animation-duration:721ms;animation-duration:721ms}.anim-duration-722{-webkit-animation-duration:722ms;animation-duration:722ms}.anim-duration-723{-webkit-animation-duration:723ms;animation-duration:723ms}.anim-duration-724{-webkit-animation-duration:724ms;animation-duration:724ms}.anim-duration-725{-webkit-animation-duration:725ms;animation-duration:725ms}.anim-duration-726{-webkit-animation-duration:726ms;animation-duration:726ms}.anim-duration-727{-webkit-animation-duration:727ms;animation-duration:727ms}.anim-duration-728{-webkit-animation-duration:728ms;animation-duration:728ms}.anim-duration-729{-webkit-animation-duration:729ms;animation-duration:729ms}.anim-duration-730{-webkit-animation-duration:.73s;animation-duration:.73s}.anim-duration-731{-webkit-animation-duration:731ms;animation-duration:731ms}.anim-duration-732{-webkit-animation-duration:732ms;animation-duration:732ms}.anim-duration-733{-webkit-animation-duration:733ms;animation-duration:733ms}.anim-duration-734{-webkit-animation-duration:734ms;animation-duration:734ms}.anim-duration-735{-webkit-animation-duration:735ms;animation-duration:735ms}.anim-duration-736{-webkit-animation-duration:736ms;animation-duration:736ms}.anim-duration-737{-webkit-animation-duration:737ms;animation-duration:737ms}.anim-duration-738{-webkit-animation-duration:738ms;animation-duration:738ms}.anim-duration-739{-webkit-animation-duration:739ms;animation-duration:739ms}.anim-duration-740{-webkit-animation-duration:.74s;animation-duration:.74s}.anim-duration-741{-webkit-animation-duration:741ms;animation-duration:741ms}.anim-duration-742{-webkit-animation-duration:742ms;animation-duration:742ms}.anim-duration-743{-webkit-animation-duration:743ms;animation-duration:743ms}.anim-duration-744{-webkit-animation-duration:744ms;animation-duration:744ms}.anim-duration-745{-webkit-animation-duration:745ms;animation-duration:745ms}.anim-duration-746{-webkit-animation-duration:746ms;animation-duration:746ms}.anim-duration-747{-webkit-animation-duration:747ms;animation-duration:747ms}.anim-duration-748{-webkit-animation-duration:748ms;animation-duration:748ms}.anim-duration-749{-webkit-animation-duration:749ms;animation-duration:749ms}.anim-duration-750{-webkit-animation-duration:.75s;animation-duration:.75s}.anim-duration-751{-webkit-animation-duration:751ms;animation-duration:751ms}.anim-duration-752{-webkit-animation-duration:752ms;animation-duration:752ms}.anim-duration-753{-webkit-animation-duration:753ms;animation-duration:753ms}.anim-duration-754{-webkit-animation-duration:754ms;animation-duration:754ms}.anim-duration-755{-webkit-animation-duration:755ms;animation-duration:755ms}.anim-duration-756{-webkit-animation-duration:756ms;animation-duration:756ms}.anim-duration-757{-webkit-animation-duration:757ms;animation-duration:757ms}.anim-duration-758{-webkit-animation-duration:758ms;animation-duration:758ms}.anim-duration-759{-webkit-animation-duration:759ms;animation-duration:759ms}.anim-duration-760{-webkit-animation-duration:.76s;animation-duration:.76s}.anim-duration-761{-webkit-animation-duration:761ms;animation-duration:761ms}.anim-duration-762{-webkit-animation-duration:762ms;animation-duration:762ms}.anim-duration-763{-webkit-animation-duration:763ms;animation-duration:763ms}.anim-duration-764{-webkit-animation-duration:764ms;animation-duration:764ms}.anim-duration-765{-webkit-animation-duration:765ms;animation-duration:765ms}.anim-duration-766{-webkit-animation-duration:766ms;animation-duration:766ms}.anim-duration-767{-webkit-animation-duration:767ms;animation-duration:767ms}.anim-duration-768{-webkit-animation-duration:768ms;animation-duration:768ms}.anim-duration-769{-webkit-animation-duration:769ms;animation-duration:769ms}.anim-duration-770{-webkit-animation-duration:.77s;animation-duration:.77s}.anim-duration-771{-webkit-animation-duration:771ms;animation-duration:771ms}.anim-duration-772{-webkit-animation-duration:772ms;animation-duration:772ms}.anim-duration-773{-webkit-animation-duration:773ms;animation-duration:773ms}.anim-duration-774{-webkit-animation-duration:774ms;animation-duration:774ms}.anim-duration-775{-webkit-animation-duration:775ms;animation-duration:775ms}.anim-duration-776{-webkit-animation-duration:776ms;animation-duration:776ms}.anim-duration-777{-webkit-animation-duration:777ms;animation-duration:777ms}.anim-duration-778{-webkit-animation-duration:778ms;animation-duration:778ms}.anim-duration-779{-webkit-animation-duration:779ms;animation-duration:779ms}.anim-duration-780{-webkit-animation-duration:.78s;animation-duration:.78s}.anim-duration-781{-webkit-animation-duration:781ms;animation-duration:781ms}.anim-duration-782{-webkit-animation-duration:782ms;animation-duration:782ms}.anim-duration-783{-webkit-animation-duration:783ms;animation-duration:783ms}.anim-duration-784{-webkit-animation-duration:784ms;animation-duration:784ms}.anim-duration-785{-webkit-animation-duration:785ms;animation-duration:785ms}.anim-duration-786{-webkit-animation-duration:786ms;animation-duration:786ms}.anim-duration-787{-webkit-animation-duration:787ms;animation-duration:787ms}.anim-duration-788{-webkit-animation-duration:788ms;animation-duration:788ms}.anim-duration-789{-webkit-animation-duration:789ms;animation-duration:789ms}.anim-duration-790{-webkit-animation-duration:.79s;animation-duration:.79s}.anim-duration-791{-webkit-animation-duration:791ms;animation-duration:791ms}.anim-duration-792{-webkit-animation-duration:792ms;animation-duration:792ms}.anim-duration-793{-webkit-animation-duration:793ms;animation-duration:793ms}.anim-duration-794{-webkit-animation-duration:794ms;animation-duration:794ms}.anim-duration-795{-webkit-animation-duration:795ms;animation-duration:795ms}.anim-duration-796{-webkit-animation-duration:796ms;animation-duration:796ms}.anim-duration-797{-webkit-animation-duration:797ms;animation-duration:797ms}.anim-duration-798{-webkit-animation-duration:798ms;animation-duration:798ms}.anim-duration-799{-webkit-animation-duration:799ms;animation-duration:799ms}.anim-duration-800{-webkit-animation-duration:.8s;animation-duration:.8s}.anim-duration-801{-webkit-animation-duration:801ms;animation-duration:801ms}.anim-duration-802{-webkit-animation-duration:802ms;animation-duration:802ms}.anim-duration-803{-webkit-animation-duration:803ms;animation-duration:803ms}.anim-duration-804{-webkit-animation-duration:804ms;animation-duration:804ms}.anim-duration-805{-webkit-animation-duration:805ms;animation-duration:805ms}.anim-duration-806{-webkit-animation-duration:806ms;animation-duration:806ms}.anim-duration-807{-webkit-animation-duration:807ms;animation-duration:807ms}.anim-duration-808{-webkit-animation-duration:808ms;animation-duration:808ms}.anim-duration-809{-webkit-animation-duration:809ms;animation-duration:809ms}.anim-duration-810{-webkit-animation-duration:.81s;animation-duration:.81s}.anim-duration-811{-webkit-animation-duration:811ms;animation-duration:811ms}.anim-duration-812{-webkit-animation-duration:812ms;animation-duration:812ms}.anim-duration-813{-webkit-animation-duration:813ms;animation-duration:813ms}.anim-duration-814{-webkit-animation-duration:814ms;animation-duration:814ms}.anim-duration-815{-webkit-animation-duration:815ms;animation-duration:815ms}.anim-duration-816{-webkit-animation-duration:816ms;animation-duration:816ms}.anim-duration-817{-webkit-animation-duration:817ms;animation-duration:817ms}.anim-duration-818{-webkit-animation-duration:818ms;animation-duration:818ms}.anim-duration-819{-webkit-animation-duration:819ms;animation-duration:819ms}.anim-duration-820{-webkit-animation-duration:.82s;animation-duration:.82s}.anim-duration-821{-webkit-animation-duration:821ms;animation-duration:821ms}.anim-duration-822{-webkit-animation-duration:822ms;animation-duration:822ms}.anim-duration-823{-webkit-animation-duration:823ms;animation-duration:823ms}.anim-duration-824{-webkit-animation-duration:824ms;animation-duration:824ms}.anim-duration-825{-webkit-animation-duration:825ms;animation-duration:825ms}.anim-duration-826{-webkit-animation-duration:826ms;animation-duration:826ms}.anim-duration-827{-webkit-animation-duration:827ms;animation-duration:827ms}.anim-duration-828{-webkit-animation-duration:828ms;animation-duration:828ms}.anim-duration-829{-webkit-animation-duration:829ms;animation-duration:829ms}.anim-duration-830{-webkit-animation-duration:.83s;animation-duration:.83s}.anim-duration-831{-webkit-animation-duration:831ms;animation-duration:831ms}.anim-duration-832{-webkit-animation-duration:832ms;animation-duration:832ms}.anim-duration-833{-webkit-animation-duration:833ms;animation-duration:833ms}.anim-duration-834{-webkit-animation-duration:834ms;animation-duration:834ms}.anim-duration-835{-webkit-animation-duration:835ms;animation-duration:835ms}.anim-duration-836{-webkit-animation-duration:836ms;animation-duration:836ms}.anim-duration-837{-webkit-animation-duration:837ms;animation-duration:837ms}.anim-duration-838{-webkit-animation-duration:838ms;animation-duration:838ms}.anim-duration-839{-webkit-animation-duration:839ms;animation-duration:839ms}.anim-duration-840{-webkit-animation-duration:.84s;animation-duration:.84s}.anim-duration-841{-webkit-animation-duration:841ms;animation-duration:841ms}.anim-duration-842{-webkit-animation-duration:842ms;animation-duration:842ms}.anim-duration-843{-webkit-animation-duration:843ms;animation-duration:843ms}.anim-duration-844{-webkit-animation-duration:844ms;animation-duration:844ms}.anim-duration-845{-webkit-animation-duration:845ms;animation-duration:845ms}.anim-duration-846{-webkit-animation-duration:846ms;animation-duration:846ms}.anim-duration-847{-webkit-animation-duration:847ms;animation-duration:847ms}.anim-duration-848{-webkit-animation-duration:848ms;animation-duration:848ms}.anim-duration-849{-webkit-animation-duration:849ms;animation-duration:849ms}.anim-duration-850{-webkit-animation-duration:.85s;animation-duration:.85s}.anim-duration-851{-webkit-animation-duration:851ms;animation-duration:851ms}.anim-duration-852{-webkit-animation-duration:852ms;animation-duration:852ms}.anim-duration-853{-webkit-animation-duration:853ms;animation-duration:853ms}.anim-duration-854{-webkit-animation-duration:854ms;animation-duration:854ms}.anim-duration-855{-webkit-animation-duration:855ms;animation-duration:855ms}.anim-duration-856{-webkit-animation-duration:856ms;animation-duration:856ms}.anim-duration-857{-webkit-animation-duration:857ms;animation-duration:857ms}.anim-duration-858{-webkit-animation-duration:858ms;animation-duration:858ms}.anim-duration-859{-webkit-animation-duration:859ms;animation-duration:859ms}.anim-duration-860{-webkit-animation-duration:.86s;animation-duration:.86s}.anim-duration-861{-webkit-animation-duration:861ms;animation-duration:861ms}.anim-duration-862{-webkit-animation-duration:862ms;animation-duration:862ms}.anim-duration-863{-webkit-animation-duration:863ms;animation-duration:863ms}.anim-duration-864{-webkit-animation-duration:864ms;animation-duration:864ms}.anim-duration-865{-webkit-animation-duration:865ms;animation-duration:865ms}.anim-duration-866{-webkit-animation-duration:866ms;animation-duration:866ms}.anim-duration-867{-webkit-animation-duration:867ms;animation-duration:867ms}.anim-duration-868{-webkit-animation-duration:868ms;animation-duration:868ms}.anim-duration-869{-webkit-animation-duration:869ms;animation-duration:869ms}.anim-duration-870{-webkit-animation-duration:.87s;animation-duration:.87s}.anim-duration-871{-webkit-animation-duration:871ms;animation-duration:871ms}.anim-duration-872{-webkit-animation-duration:872ms;animation-duration:872ms}.anim-duration-873{-webkit-animation-duration:873ms;animation-duration:873ms}.anim-duration-874{-webkit-animation-duration:874ms;animation-duration:874ms}.anim-duration-875{-webkit-animation-duration:875ms;animation-duration:875ms}.anim-duration-876{-webkit-animation-duration:876ms;animation-duration:876ms}.anim-duration-877{-webkit-animation-duration:877ms;animation-duration:877ms}.anim-duration-878{-webkit-animation-duration:878ms;animation-duration:878ms}.anim-duration-879{-webkit-animation-duration:879ms;animation-duration:879ms}.anim-duration-880{-webkit-animation-duration:.88s;animation-duration:.88s}.anim-duration-881{-webkit-animation-duration:881ms;animation-duration:881ms}.anim-duration-882{-webkit-animation-duration:882ms;animation-duration:882ms}.anim-duration-883{-webkit-animation-duration:883ms;animation-duration:883ms}.anim-duration-884{-webkit-animation-duration:884ms;animation-duration:884ms}.anim-duration-885{-webkit-animation-duration:885ms;animation-duration:885ms}.anim-duration-886{-webkit-animation-duration:886ms;animation-duration:886ms}.anim-duration-887{-webkit-animation-duration:887ms;animation-duration:887ms}.anim-duration-888{-webkit-animation-duration:888ms;animation-duration:888ms}.anim-duration-889{-webkit-animation-duration:889ms;animation-duration:889ms}.anim-duration-890{-webkit-animation-duration:.89s;animation-duration:.89s}.anim-duration-891{-webkit-animation-duration:891ms;animation-duration:891ms}.anim-duration-892{-webkit-animation-duration:892ms;animation-duration:892ms}.anim-duration-893{-webkit-animation-duration:893ms;animation-duration:893ms}.anim-duration-894{-webkit-animation-duration:894ms;animation-duration:894ms}.anim-duration-895{-webkit-animation-duration:895ms;animation-duration:895ms}.anim-duration-896{-webkit-animation-duration:896ms;animation-duration:896ms}.anim-duration-897{-webkit-animation-duration:897ms;animation-duration:897ms}.anim-duration-898{-webkit-animation-duration:898ms;animation-duration:898ms}.anim-duration-899{-webkit-animation-duration:899ms;animation-duration:899ms}.anim-duration-900{-webkit-animation-duration:.9s;animation-duration:.9s}.anim-duration-901{-webkit-animation-duration:901ms;animation-duration:901ms}.anim-duration-902{-webkit-animation-duration:902ms;animation-duration:902ms}.anim-duration-903{-webkit-animation-duration:903ms;animation-duration:903ms}.anim-duration-904{-webkit-animation-duration:904ms;animation-duration:904ms}.anim-duration-905{-webkit-animation-duration:905ms;animation-duration:905ms}.anim-duration-906{-webkit-animation-duration:906ms;animation-duration:906ms}.anim-duration-907{-webkit-animation-duration:907ms;animation-duration:907ms}.anim-duration-908{-webkit-animation-duration:908ms;animation-duration:908ms}.anim-duration-909{-webkit-animation-duration:909ms;animation-duration:909ms}.anim-duration-910{-webkit-animation-duration:.91s;animation-duration:.91s}.anim-duration-911{-webkit-animation-duration:911ms;animation-duration:911ms}.anim-duration-912{-webkit-animation-duration:912ms;animation-duration:912ms}.anim-duration-913{-webkit-animation-duration:913ms;animation-duration:913ms}.anim-duration-914{-webkit-animation-duration:914ms;animation-duration:914ms}.anim-duration-915{-webkit-animation-duration:915ms;animation-duration:915ms}.anim-duration-916{-webkit-animation-duration:916ms;animation-duration:916ms}.anim-duration-917{-webkit-animation-duration:917ms;animation-duration:917ms}.anim-duration-918{-webkit-animation-duration:918ms;animation-duration:918ms}.anim-duration-919{-webkit-animation-duration:919ms;animation-duration:919ms}.anim-duration-920{-webkit-animation-duration:.92s;animation-duration:.92s}.anim-duration-921{-webkit-animation-duration:921ms;animation-duration:921ms}.anim-duration-922{-webkit-animation-duration:922ms;animation-duration:922ms}.anim-duration-923{-webkit-animation-duration:923ms;animation-duration:923ms}.anim-duration-924{-webkit-animation-duration:924ms;animation-duration:924ms}.anim-duration-925{-webkit-animation-duration:925ms;animation-duration:925ms}.anim-duration-926{-webkit-animation-duration:926ms;animation-duration:926ms}.anim-duration-927{-webkit-animation-duration:927ms;animation-duration:927ms}.anim-duration-928{-webkit-animation-duration:928ms;animation-duration:928ms}.anim-duration-929{-webkit-animation-duration:929ms;animation-duration:929ms}.anim-duration-930{-webkit-animation-duration:.93s;animation-duration:.93s}.anim-duration-931{-webkit-animation-duration:931ms;animation-duration:931ms}.anim-duration-932{-webkit-animation-duration:932ms;animation-duration:932ms}.anim-duration-933{-webkit-animation-duration:933ms;animation-duration:933ms}.anim-duration-934{-webkit-animation-duration:934ms;animation-duration:934ms}.anim-duration-935{-webkit-animation-duration:935ms;animation-duration:935ms}.anim-duration-936{-webkit-animation-duration:936ms;animation-duration:936ms}.anim-duration-937{-webkit-animation-duration:937ms;animation-duration:937ms}.anim-duration-938{-webkit-animation-duration:938ms;animation-duration:938ms}.anim-duration-939{-webkit-animation-duration:939ms;animation-duration:939ms}.anim-duration-940{-webkit-animation-duration:.94s;animation-duration:.94s}.anim-duration-941{-webkit-animation-duration:941ms;animation-duration:941ms}.anim-duration-942{-webkit-animation-duration:942ms;animation-duration:942ms}.anim-duration-943{-webkit-animation-duration:943ms;animation-duration:943ms}.anim-duration-944{-webkit-animation-duration:944ms;animation-duration:944ms}.anim-duration-945{-webkit-animation-duration:945ms;animation-duration:945ms}.anim-duration-946{-webkit-animation-duration:946ms;animation-duration:946ms}.anim-duration-947{-webkit-animation-duration:947ms;animation-duration:947ms}.anim-duration-948{-webkit-animation-duration:948ms;animation-duration:948ms}.anim-duration-949{-webkit-animation-duration:949ms;animation-duration:949ms}.anim-duration-950{-webkit-animation-duration:.95s;animation-duration:.95s}.anim-duration-951{-webkit-animation-duration:951ms;animation-duration:951ms}.anim-duration-952{-webkit-animation-duration:952ms;animation-duration:952ms}.anim-duration-953{-webkit-animation-duration:953ms;animation-duration:953ms}.anim-duration-954{-webkit-animation-duration:954ms;animation-duration:954ms}.anim-duration-955{-webkit-animation-duration:955ms;animation-duration:955ms}.anim-duration-956{-webkit-animation-duration:956ms;animation-duration:956ms}.anim-duration-957{-webkit-animation-duration:957ms;animation-duration:957ms}.anim-duration-958{-webkit-animation-duration:958ms;animation-duration:958ms}.anim-duration-959{-webkit-animation-duration:959ms;animation-duration:959ms}.anim-duration-960{-webkit-animation-duration:.96s;animation-duration:.96s}.anim-duration-961{-webkit-animation-duration:961ms;animation-duration:961ms}.anim-duration-962{-webkit-animation-duration:962ms;animation-duration:962ms}.anim-duration-963{-webkit-animation-duration:963ms;animation-duration:963ms}.anim-duration-964{-webkit-animation-duration:964ms;animation-duration:964ms}.anim-duration-965{-webkit-animation-duration:965ms;animation-duration:965ms}.anim-duration-966{-webkit-animation-duration:966ms;animation-duration:966ms}.anim-duration-967{-webkit-animation-duration:967ms;animation-duration:967ms}.anim-duration-968{-webkit-animation-duration:968ms;animation-duration:968ms}.anim-duration-969{-webkit-animation-duration:969ms;animation-duration:969ms}.anim-duration-970{-webkit-animation-duration:.97s;animation-duration:.97s}.anim-duration-971{-webkit-animation-duration:971ms;animation-duration:971ms}.anim-duration-972{-webkit-animation-duration:972ms;animation-duration:972ms}.anim-duration-973{-webkit-animation-duration:973ms;animation-duration:973ms}.anim-duration-974{-webkit-animation-duration:974ms;animation-duration:974ms}.anim-duration-975{-webkit-animation-duration:975ms;animation-duration:975ms}.anim-duration-976{-webkit-animation-duration:976ms;animation-duration:976ms}.anim-duration-977{-webkit-animation-duration:977ms;animation-duration:977ms}.anim-duration-978{-webkit-animation-duration:978ms;animation-duration:978ms}.anim-duration-979{-webkit-animation-duration:979ms;animation-duration:979ms}.anim-duration-980{-webkit-animation-duration:.98s;animation-duration:.98s}.anim-duration-981{-webkit-animation-duration:981ms;animation-duration:981ms}.anim-duration-982{-webkit-animation-duration:982ms;animation-duration:982ms}.anim-duration-983{-webkit-animation-duration:983ms;animation-duration:983ms}.anim-duration-984{-webkit-animation-duration:984ms;animation-duration:984ms}.anim-duration-985{-webkit-animation-duration:985ms;animation-duration:985ms}.anim-duration-986{-webkit-animation-duration:986ms;animation-duration:986ms}.anim-duration-987{-webkit-animation-duration:987ms;animation-duration:987ms}.anim-duration-988{-webkit-animation-duration:988ms;animation-duration:988ms}.anim-duration-989{-webkit-animation-duration:989ms;animation-duration:989ms}.anim-duration-990{-webkit-animation-duration:.99s;animation-duration:.99s}.anim-duration-991{-webkit-animation-duration:991ms;animation-duration:991ms}.anim-duration-992{-webkit-animation-duration:992ms;animation-duration:992ms}.anim-duration-993{-webkit-animation-duration:993ms;animation-duration:993ms}.anim-duration-994{-webkit-animation-duration:994ms;animation-duration:994ms}.anim-duration-995{-webkit-animation-duration:995ms;animation-duration:995ms}.anim-duration-996{-webkit-animation-duration:996ms;animation-duration:996ms}.anim-duration-997{-webkit-animation-duration:997ms;animation-duration:997ms}.anim-duration-998{-webkit-animation-duration:998ms;animation-duration:998ms}.anim-duration-999{-webkit-animation-duration:999ms;animation-duration:999ms}.anim-duration-1000{-webkit-animation-duration:1s;animation-duration:1s}@font-face{font-display:swap;font-family:Jost;font-style:italic;font-weight:100;src:url(/fonts/92zUtBhPNqw73oHt5D4hTxM.woff2) format("woff2");unicode-range:U+0400-045f,U+0490-0491,U+04b0-04b1,U+2116}@font-face{font-display:swap;font-family:Jost;font-style:italic;font-weight:100;src:url(/fonts/92zUtBhPNqw73oHt7j4hTxM.woff2) format("woff2");unicode-range:U+0100-024f,U+0259,U+1e??,U+2020,U+20a0-20ab,U+20ad-20cf,U+2113,U+2c60-2c7f,U+a720-a7ff}@font-face{font-display:swap;font-family:Jost;font-style:italic;font-weight:100;src:url(/fonts/92zUtBhPNqw73oHt4D4h.woff2) format("woff2");unicode-range:U+00??,U+0131,U+0152-0153,U+02bb-02bc,U+02c6,U+02da,U+02dc,U+2000-206f,U+2074,U+20ac,U+2122,U+2191,U+2193,U+2212,U+2215,U+feff,U+fffd}@font-face{font-display:swap;font-family:Jost;font-style:italic;font-weight:200;src:url(/fonts/92zUtBhPNqw73oHt5D4hTxM.woff2) format("woff2");unicode-range:U+0400-045f,U+0490-0491,U+04b0-04b1,U+2116}@font-face{font-display:swap;font-family:Jost;font-style:italic;font-weight:200;src:url(/fonts/92zUtBhPNqw73oHt7j4hTxM.woff2) format("woff2");unicode-range:U+0100-024f,U+0259,U+1e??,U+2020,U+20a0-20ab,U+20ad-20cf,U+2113,U+2c60-2c7f,U+a720-a7ff}@font-face{font-display:swap;font-family:Jost;font-style:italic;font-weight:200;src:url(/fonts/92zUtBhPNqw73oHt4D4h.woff2) format("woff2");unicode-range:U+00??,U+0131,U+0152-0153,U+02bb-02bc,U+02c6,U+02da,U+02dc,U+2000-206f,U+2074,U+20ac,U+2122,U+2191,U+2193,U+2212,U+2215,U+feff,U+fffd}@font-face{font-display:swap;font-family:Jost;font-style:italic;font-weight:300;src:url(/fonts/92zUtBhPNqw73oHt5D4hTxM.woff2) format("woff2");unicode-range:U+0400-045f,U+0490-0491,U+04b0-04b1,U+2116}@font-face{font-display:swap;font-family:Jost;font-style:italic;font-weight:300;src:url(/fonts/92zUtBhPNqw73oHt7j4hTxM.woff2) format("woff2");unicode-range:U+0100-024f,U+0259,U+1e??,U+2020,U+20a0-20ab,U+20ad-20cf,U+2113,U+2c60-2c7f,U+a720-a7ff}@font-face{font-display:swap;font-family:Jost;font-style:italic;font-weight:300;src:url(/fonts/92zUtBhPNqw73oHt4D4h.woff2) format("woff2");unicode-range:U+00??,U+0131,U+0152-0153,U+02bb-02bc,U+02c6,U+02da,U+02dc,U+2000-206f,U+2074,U+20ac,U+2122,U+2191,U+2193,U+2212,U+2215,U+feff,U+fffd}@font-face{font-display:swap;font-family:Jost;font-style:italic;font-weight:400;src:url(/fonts/92zUtBhPNqw73oHt5D4hTxM.woff2) format("woff2");unicode-range:U+0400-045f,U+0490-0491,U+04b0-04b1,U+2116}@font-face{font-display:swap;font-family:Jost;font-style:italic;font-weight:400;src:url(/fonts/92zUtBhPNqw73oHt7j4hTxM.woff2) format("woff2");unicode-range:U+0100-024f,U+0259,U+1e??,U+2020,U+20a0-20ab,U+20ad-20cf,U+2113,U+2c60-2c7f,U+a720-a7ff}@font-face{font-display:swap;font-family:Jost;font-style:italic;font-weight:400;src:url(/fonts/92zUtBhPNqw73oHt4D4h.woff2) format("woff2");unicode-range:U+00??,U+0131,U+0152-0153,U+02bb-02bc,U+02c6,U+02da,U+02dc,U+2000-206f,U+2074,U+20ac,U+2122,U+2191,U+2193,U+2212,U+2215,U+feff,U+fffd}@font-face{font-display:swap;font-family:Jost;font-style:italic;font-weight:500;src:url(/fonts/92zUtBhPNqw73oHt5D4hTxM.woff2) format("woff2");unicode-range:U+0400-045f,U+0490-0491,U+04b0-04b1,U+2116}@font-face{font-display:swap;font-family:Jost;font-style:italic;font-weight:500;src:url(/fonts/92zUtBhPNqw73oHt7j4hTxM.woff2) format("woff2");unicode-range:U+0100-024f,U+0259,U+1e??,U+2020,U+20a0-20ab,U+20ad-20cf,U+2113,U+2c60-2c7f,U+a720-a7ff}@font-face{font-display:swap;font-family:Jost;font-style:italic;font-weight:500;src:url(/fonts/92zUtBhPNqw73oHt4D4h.woff2) format("woff2");unicode-range:U+00??,U+0131,U+0152-0153,U+02bb-02bc,U+02c6,U+02da,U+02dc,U+2000-206f,U+2074,U+20ac,U+2122,U+2191,U+2193,U+2212,U+2215,U+feff,U+fffd}@font-face{font-display:swap;font-family:Jost;font-style:italic;font-weight:600;src:url(/fonts/92zUtBhPNqw73oHt5D4hTxM.woff2) format("woff2");unicode-range:U+0400-045f,U+0490-0491,U+04b0-04b1,U+2116}@font-face{font-display:swap;font-family:Jost;font-style:italic;font-weight:600;src:url(/fonts/92zUtBhPNqw73oHt7j4hTxM.woff2) format("woff2");unicode-range:U+0100-024f,U+0259,U+1e??,U+2020,U+20a0-20ab,U+20ad-20cf,U+2113,U+2c60-2c7f,U+a720-a7ff}@font-face{font-display:swap;font-family:Jost;font-style:italic;font-weight:600;src:url(/fonts/92zUtBhPNqw73oHt4D4h.woff2) format("woff2");unicode-range:U+00??,U+0131,U+0152-0153,U+02bb-02bc,U+02c6,U+02da,U+02dc,U+2000-206f,U+2074,U+20ac,U+2122,U+2191,U+2193,U+2212,U+2215,U+feff,U+fffd}@font-face{font-display:swap;font-family:Jost;font-style:italic;font-weight:700;src:url(/fonts/92zUtBhPNqw73oHt5D4hTxM.woff2) format("woff2");unicode-range:U+0400-045f,U+0490-0491,U+04b0-04b1,U+2116}@font-face{font-display:swap;font-family:Jost;font-style:italic;font-weight:700;src:url(/fonts/92zUtBhPNqw73oHt7j4hTxM.woff2) format("woff2");unicode-range:U+0100-024f,U+0259,U+1e??,U+2020,U+20a0-20ab,U+20ad-20cf,U+2113,U+2c60-2c7f,U+a720-a7ff}@font-face{font-display:swap;font-family:Jost;font-style:italic;font-weight:700;src:url(/fonts/92zUtBhPNqw73oHt4D4h.woff2) format("woff2");unicode-range:U+00??,U+0131,U+0152-0153,U+02bb-02bc,U+02c6,U+02da,U+02dc,U+2000-206f,U+2074,U+20ac,U+2122,U+2191,U+2193,U+2212,U+2215,U+feff,U+fffd}@font-face{font-display:swap;font-family:Jost;font-style:italic;font-weight:800;src:url(/fonts/92zUtBhPNqw73oHt5D4hTxM.woff2) format("woff2");unicode-range:U+0400-045f,U+0490-0491,U+04b0-04b1,U+2116}@font-face{font-display:swap;font-family:Jost;font-style:italic;font-weight:800;src:url(/fonts/92zUtBhPNqw73oHt7j4hTxM.woff2) format("woff2");unicode-range:U+0100-024f,U+0259,U+1e??,U+2020,U+20a0-20ab,U+20ad-20cf,U+2113,U+2c60-2c7f,U+a720-a7ff}@font-face{font-display:swap;font-family:Jost;font-style:italic;font-weight:800;src:url(/fonts/92zUtBhPNqw73oHt4D4h.woff2) format("woff2");unicode-range:U+00??,U+0131,U+0152-0153,U+02bb-02bc,U+02c6,U+02da,U+02dc,U+2000-206f,U+2074,U+20ac,U+2122,U+2191,U+2193,U+2212,U+2215,U+feff,U+fffd}@font-face{font-display:swap;font-family:Jost;font-style:italic;font-weight:900;src:url(/fonts/92zUtBhPNqw73oHt5D4hTxM.woff2) format("woff2");unicode-range:U+0400-045f,U+0490-0491,U+04b0-04b1,U+2116}@font-face{font-display:swap;font-family:Jost;font-style:italic;font-weight:900;src:url(/fonts/92zUtBhPNqw73oHt7j4hTxM.woff2) format("woff2");unicode-range:U+0100-024f,U+0259,U+1e??,U+2020,U+20a0-20ab,U+20ad-20cf,U+2113,U+2c60-2c7f,U+a720-a7ff}@font-face{font-display:swap;font-family:Jost;font-style:italic;font-weight:900;src:url(/fonts/92zUtBhPNqw73oHt4D4h.woff2) format("woff2");unicode-range:U+00??,U+0131,U+0152-0153,U+02bb-02bc,U+02c6,U+02da,U+02dc,U+2000-206f,U+2074,U+20ac,U+2122,U+2191,U+2193,U+2212,U+2215,U+feff,U+fffd}@font-face{font-display:swap;font-family:Jost;font-style:normal;font-weight:100;src:url(/fonts/92zatBhPNqw73oDd4iYl.woff2) format("woff2");unicode-range:U+0400-045f,U+0490-0491,U+04b0-04b1,U+2116}@font-face{font-display:swap;font-family:Jost;font-style:normal;font-weight:100;src:url(/fonts/92zatBhPNqw73ord4iYl.woff2) format("woff2");unicode-range:U+0100-024f,U+0259,U+1e??,U+2020,U+20a0-20ab,U+20ad-20cf,U+2113,U+2c60-2c7f,U+a720-a7ff}@font-face{font-display:swap;font-family:Jost;font-style:normal;font-weight:100;src:url(/fonts/92zatBhPNqw73oTd4g.woff2) format("woff2");unicode-range:U+00??,U+0131,U+0152-0153,U+02bb-02bc,U+02c6,U+02da,U+02dc,U+2000-206f,U+2074,U+20ac,U+2122,U+2191,U+2193,U+2212,U+2215,U+feff,U+fffd}@font-face{font-display:swap;font-family:Jost;font-style:normal;font-weight:200;src:url(/fonts/92zatBhPNqw73oDd4iYl.woff2) format("woff2");unicode-range:U+0400-045f,U+0490-0491,U+04b0-04b1,U+2116}@font-face{font-display:swap;font-family:Jost;font-style:normal;font-weight:200;src:url(/fonts/92zatBhPNqw73ord4iYl.woff2) format("woff2");unicode-range:U+0100-024f,U+0259,U+1e??,U+2020,U+20a0-20ab,U+20ad-20cf,U+2113,U+2c60-2c7f,U+a720-a7ff}@font-face{font-display:swap;font-family:Jost;font-style:normal;font-weight:200;src:url(/fonts/92zatBhPNqw73oTd4g.woff2) format("woff2");unicode-range:U+00??,U+0131,U+0152-0153,U+02bb-02bc,U+02c6,U+02da,U+02dc,U+2000-206f,U+2074,U+20ac,U+2122,U+2191,U+2193,U+2212,U+2215,U+feff,U+fffd}@font-face{font-display:swap;font-family:Jost;font-style:normal;font-weight:300;src:url(/fonts/92zatBhPNqw73oDd4iYl.woff2) format("woff2");unicode-range:U+0400-045f,U+0490-0491,U+04b0-04b1,U+2116}@font-face{font-display:swap;font-family:Jost;font-style:normal;font-weight:300;src:url(/fonts/92zatBhPNqw73ord4iYl.woff2) format("woff2");unicode-range:U+0100-024f,U+0259,U+1e??,U+2020,U+20a0-20ab,U+20ad-20cf,U+2113,U+2c60-2c7f,U+a720-a7ff}@font-face{font-display:swap;font-family:Jost;font-style:normal;font-weight:300;src:url(/fonts/92zatBhPNqw73oTd4g.woff2) format("woff2");unicode-range:U+00??,U+0131,U+0152-0153,U+02bb-02bc,U+02c6,U+02da,U+02dc,U+2000-206f,U+2074,U+20ac,U+2122,U+2191,U+2193,U+2212,U+2215,U+feff,U+fffd}@font-face{font-display:swap;font-family:Jost;font-style:normal;font-weight:400;src:url(/fonts/92zatBhPNqw73oDd4iYl.woff2) format("woff2");unicode-range:U+0400-045f,U+0490-0491,U+04b0-04b1,U+2116}@font-face{font-display:swap;font-family:Jost;font-style:normal;font-weight:400;src:url(/fonts/92zatBhPNqw73ord4iYl.woff2) format("woff2");unicode-range:U+0100-024f,U+0259,U+1e??,U+2020,U+20a0-20ab,U+20ad-20cf,U+2113,U+2c60-2c7f,U+a720-a7ff}@font-face{font-display:swap;font-family:Jost;font-style:normal;font-weight:400;src:url(/fonts/92zatBhPNqw73oTd4g.woff2) format("woff2");unicode-range:U+00??,U+0131,U+0152-0153,U+02bb-02bc,U+02c6,U+02da,U+02dc,U+2000-206f,U+2074,U+20ac,U+2122,U+2191,U+2193,U+2212,U+2215,U+feff,U+fffd}@font-face{font-display:swap;font-family:Jost;font-style:normal;font-weight:500;src:url(/fonts/92zatBhPNqw73oDd4iYl.woff2) format("woff2");unicode-range:U+0400-045f,U+0490-0491,U+04b0-04b1,U+2116}@font-face{font-display:swap;font-family:Jost;font-style:normal;font-weight:500;src:url(/fonts/92zatBhPNqw73ord4iYl.woff2) format("woff2");unicode-range:U+0100-024f,U+0259,U+1e??,U+2020,U+20a0-20ab,U+20ad-20cf,U+2113,U+2c60-2c7f,U+a720-a7ff}@font-face{font-display:swap;font-family:Jost;font-style:normal;font-weight:500;src:url(/fonts/92zatBhPNqw73oTd4g.woff2) format("woff2");unicode-range:U+00??,U+0131,U+0152-0153,U+02bb-02bc,U+02c6,U+02da,U+02dc,U+2000-206f,U+2074,U+20ac,U+2122,U+2191,U+2193,U+2212,U+2215,U+feff,U+fffd}@font-face{font-display:swap;font-family:Jost;font-style:normal;font-weight:600;src:url(/fonts/92zatBhPNqw73oDd4iYl.woff2) format("woff2");unicode-range:U+0400-045f,U+0490-0491,U+04b0-04b1,U+2116}@font-face{font-display:swap;font-family:Jost;font-style:normal;font-weight:600;src:url(/fonts/92zatBhPNqw73ord4iYl.woff2) format("woff2");unicode-range:U+0100-024f,U+0259,U+1e??,U+2020,U+20a0-20ab,U+20ad-20cf,U+2113,U+2c60-2c7f,U+a720-a7ff}@font-face{font-display:swap;font-family:Jost;font-style:normal;font-weight:600;src:url(/fonts/92zatBhPNqw73oTd4g.woff2) format("woff2");unicode-range:U+00??,U+0131,U+0152-0153,U+02bb-02bc,U+02c6,U+02da,U+02dc,U+2000-206f,U+2074,U+20ac,U+2122,U+2191,U+2193,U+2212,U+2215,U+feff,U+fffd}@font-face{font-display:swap;font-family:Jost;font-style:normal;font-weight:700;src:url(/fonts/92zatBhPNqw73oDd4iYl.woff2) format("woff2");unicode-range:U+0400-045f,U+0490-0491,U+04b0-04b1,U+2116}@font-face{font-display:swap;font-family:Jost;font-style:normal;font-weight:700;src:url(/fonts/92zatBhPNqw73ord4iYl.woff2) format("woff2");unicode-range:U+0100-024f,U+0259,U+1e??,U+2020,U+20a0-20ab,U+20ad-20cf,U+2113,U+2c60-2c7f,U+a720-a7ff}@font-face{font-display:swap;font-family:Jost;font-style:normal;font-weight:700;src:url(/fonts/92zatBhPNqw73oTd4g.woff2) format("woff2");unicode-range:U+00??,U+0131,U+0152-0153,U+02bb-02bc,U+02c6,U+02da,U+02dc,U+2000-206f,U+2074,U+20ac,U+2122,U+2191,U+2193,U+2212,U+2215,U+feff,U+fffd}@font-face{font-display:swap;font-family:Jost;font-style:normal;font-weight:800;src:url(/fonts/92zatBhPNqw73oDd4iYl.woff2) format("woff2");unicode-range:U+0400-045f,U+0490-0491,U+04b0-04b1,U+2116}@font-face{font-display:swap;font-family:Jost;font-style:normal;font-weight:800;src:url(/fonts/92zatBhPNqw73ord4iYl.woff2) format("woff2");unicode-range:U+0100-024f,U+0259,U+1e??,U+2020,U+20a0-20ab,U+20ad-20cf,U+2113,U+2c60-2c7f,U+a720-a7ff}@font-face{font-display:swap;font-family:Jost;font-style:normal;font-weight:800;src:url(/fonts/92zatBhPNqw73oTd4g.woff2) format("woff2");unicode-range:U+00??,U+0131,U+0152-0153,U+02bb-02bc,U+02c6,U+02da,U+02dc,U+2000-206f,U+2074,U+20ac,U+2122,U+2191,U+2193,U+2212,U+2215,U+feff,U+fffd}@font-face{font-display:swap;font-family:Jost;font-style:normal;font-weight:900;src:url(/fonts/92zatBhPNqw73oDd4iYl.woff2) format("woff2");unicode-range:U+0400-045f,U+0490-0491,U+04b0-04b1,U+2116}@font-face{font-display:swap;font-family:Jost;font-style:normal;font-weight:900;src:url(/fonts/92zatBhPNqw73ord4iYl.woff2) format("woff2");unicode-range:U+0100-024f,U+0259,U+1e??,U+2020,U+20a0-20ab,U+20ad-20cf,U+2113,U+2c60-2c7f,U+a720-a7ff}@font-face{font-display:swap;font-family:Jost;font-style:normal;font-weight:900;src:url(/fonts/92zatBhPNqw73oTd4g.woff2) format("woff2");unicode-range:U+00??,U+0131,U+0152-0153,U+02bb-02bc,U+02c6,U+02da,U+02dc,U+2000-206f,U+2074,U+20ac,U+2122,U+2191,U+2193,U+2212,U+2215,U+feff,U+fffd}.lab,.lar,.las{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;text-rendering:auto;display:inline-block;font-style:normal;font-variant:normal;line-height:1}@font-face{font-display:auto;font-family:Line Awesome Brands;font-style:normal;font-weight:400;src:url(../fonts/la-brands-400.eot);src:url(../fonts/la-brands-400.eot?#iefix) format("embedded-opentype"),url(../fonts/la-brands-400.woff2) format("woff2"),url(../fonts/la-brands-400.woff) format("woff"),url(../fonts/la-brands-400.ttf) format("truetype"),url(../fonts/la-brands-400.svg#lineawesome) format("svg")}.lab{font-family:Line Awesome Brands}@font-face{font-display:auto;font-family:Line Awesome Free;font-style:normal;font-weight:400;src:url(../fonts/la-regular-400.eot);src:url(../fonts/la-regular-400.eot?#iefix) format("embedded-opentype"),url(../fonts/la-regular-400.woff2) format("woff2"),url(../fonts/la-regular-400.woff) format("woff"),url(../fonts/la-regular-400.ttf) format("truetype"),url(../fonts/la-regular-400.svg#lineawesome) format("svg")}.lab,.lar{font-weight:400}@font-face{font-display:auto;font-family:Line Awesome Free;font-style:normal;font-weight:900;src:url(../fonts/la-solid-900.eot);src:url(../fonts/la-solid-900.eot?#iefix) format("embedded-opentype"),url(../fonts/la-solid-900.woff2) format("woff2"),url(../fonts/la-solid-900.woff) format("woff"),url(../fonts/la-solid-900.ttf) format("truetype"),url(../fonts/la-solid-900.svg#lineawesome) format("svg")}.lar,.las{font-family:Line Awesome Free}.las{font-weight:900}.la-lg{font-size:1.33333em;line-height:.75em;vertical-align:-.0667em}.la-xs{font-size:.75em}.la-2x{font-size:1em;font-size:2em}.la-3x{font-size:3em}.la-4x{font-size:4em}.la-5x{font-size:5em}.la-6x{font-size:6em}.la-7x{font-size:7em}.la-8x{font-size:8em}.la-9x{font-size:9em}.la-10x{font-size:10em}.la-fw{text-align:center;width:1.25em}.la-ul{list-style-type:none;margin-left:1.4285714286em;padding-left:0}.la-ul>li{position:relative}.la-li{left:-2em;line-height:inherit;position:absolute;text-align:center;width:1.4285714286em}.la-li.la-lg{left:-1.1428571429em}.la-border{border:.08em solid #eee;border-radius:.1em;padding:.2em .25em .15em}.la.la-pull-left{margin-right:.3em}.la.la-pull-right{margin-left:.3em}.la.pull-left{margin-right:.3em}.la.pull-right{margin-left:.3em}.la-pull-left{float:left}.la-pull-right{float:right}.la.la-pull-left,.lab.la-pull-left,.lal.la-pull-left,.lar.la-pull-left,.las.la-pull-left{margin-right:.3em}.la.la-pull-right,.lab.la-pull-right,.lal.la-pull-right,.lar.la-pull-right,.las.la-pull-right{margin-left:.3em}.la-spin{-webkit-animation:la-spin 2s linear infinite;animation:la-spin 2s linear infinite}.la-pulse{-webkit-animation:la-spin 1s steps(8) infinite;animation:la-spin 1s steps(8) infinite}@-webkit-keyframes la-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes la-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.la-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";transform:rotate(90deg)}.la-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";transform:rotate(180deg)}.la-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";transform:rotate(270deg)}.la-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";transform:scaleX(-1)}.la-flip-vertical{transform:scaleY(-1)}.la-flip-both,.la-flip-horizontal.la-flip-vertical,.la-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)"}.la-flip-both,.la-flip-horizontal.la-flip-vertical{transform:scale(-1)}:root .la-flip-both,:root .la-flip-horizontal,:root .la-flip-vertical,:root .la-rotate-90,:root .la-rotate-180,:root .la-rotate-270{filter:none}.la-stack{display:inline-block;height:2em;line-height:2em;position:relative;vertical-align:middle;width:2.5em}.la-stack-1x,.la-stack-2x{left:0;position:absolute;text-align:center;width:100%}.la-stack-1x{line-height:inherit}.la-stack-2x{font-size:2em}.la-inverse{color:#fff}.la-500px:before{content:""}.la-accessible-icon:before{content:""}.la-accusoft:before{content:""}.la-acquisitions-incorporated:before{content:""}.la-ad:before{content:""}.la-address-book:before{content:""}.la-address-card:before{content:""}.la-adjust:before{content:""}.la-adn:before{content:""}.la-adobe:before{content:""}.la-adversal:before{content:""}.la-affiliatetheme:before{content:""}.la-air-freshener:before{content:""}.la-airbnb:before{content:""}.la-algolia:before{content:""}.la-align-center:before{content:""}.la-align-justify:before{content:""}.la-align-left:before{content:""}.la-align-right:before{content:""}.la-alipay:before{content:""}.la-allergies:before{content:""}.la-amazon:before{content:""}.la-amazon-pay:before{content:""}.la-ambulance:before{content:""}.la-american-sign-language-interpreting:before{content:""}.la-amilia:before{content:""}.la-anchor:before{content:""}.la-android:before{content:""}.la-angellist:before{content:""}.la-angle-double-down:before{content:""}.la-angle-double-left:before{content:""}.la-angle-double-right:before{content:""}.la-angle-double-up:before{content:""}.la-angle-down:before{content:""}.la-angle-left:before{content:""}.la-angle-right:before{content:""}.la-angle-up:before{content:""}.la-angry:before{content:""}.la-angrycreative:before{content:""}.la-angular:before{content:""}.la-ankh:before{content:""}.la-app-store:before{content:""}.la-app-store-ios:before{content:""}.la-apper:before{content:""}.la-apple:before{content:""}.la-apple-alt:before{content:""}.la-apple-pay:before{content:""}.la-archive:before{content:""}.la-archway:before{content:""}.la-arrow-alt-circle-down:before{content:""}.la-arrow-alt-circle-left:before{content:""}.la-arrow-alt-circle-right:before{content:""}.la-arrow-alt-circle-up:before{content:""}.la-arrow-circle-down:before{content:""}.la-arrow-circle-left:before{content:""}.la-arrow-circle-right:before{content:""}.la-arrow-circle-up:before{content:""}.la-arrow-down:before{content:""}.la-arrow-left:before{content:""}.la-arrow-right:before{content:""}.la-arrow-up:before{content:""}.la-arrows-alt:before{content:""}.la-arrows-alt-h:before{content:""}.la-arrows-alt-v:before{content:""}.la-artstation:before{content:""}.la-assistive-listening-systems:before{content:""}.la-asterisk:before{content:""}.la-asymmetrik:before{content:""}.la-at:before{content:""}.la-atlas:before{content:""}.la-atlassian:before{content:""}.la-atom:before{content:""}.la-audible:before{content:""}.la-audio-description:before{content:""}.la-autoprefixer:before{content:""}.la-avianex:before{content:""}.la-aviato:before{content:""}.la-award:before{content:""}.la-aws:before{content:""}.la-baby:before{content:""}.la-baby-carriage:before{content:""}.la-backspace:before{content:""}.la-backward:before{content:""}.la-bacon:before{content:""}.la-balance-scale:before{content:""}.la-balance-scale-left:before{content:""}.la-balance-scale-right:before{content:""}.la-ban:before{content:""}.la-band-aid:before{content:""}.la-bandcamp:before{content:""}.la-barcode:before{content:""}.la-bars:before{content:""}.la-baseball-ball:before{content:""}.la-basketball-ball:before{content:""}.la-bath:before{content:""}.la-battery-empty:before{content:""}.la-battery-full:before{content:""}.la-battery-half:before{content:""}.la-battery-quarter:before{content:""}.la-battery-three-quarters:before{content:""}.la-battle-net:before{content:""}.la-bed:before{content:""}.la-beer:before{content:""}.la-behance:before{content:""}.la-behance-square:before{content:""}.la-bell:before{content:""}.la-bell-slash:before{content:""}.la-bezier-curve:before{content:""}.la-bible:before{content:""}.la-bicycle:before{content:""}.la-biking:before{content:""}.la-bimobject:before{content:""}.la-binoculars:before{content:""}.la-biohazard:before{content:""}.la-birthday-cake:before{content:""}.la-bitbucket:before{content:""}.la-bitcoin:before{content:""}.la-bity:before{content:""}.la-black-tie:before{content:""}.la-blackberry:before{content:""}.la-blender:before{content:""}.la-blender-phone:before{content:""}.la-blind:before{content:""}.la-blog:before{content:""}.la-blogger:before{content:""}.la-blogger-b:before{content:""}.la-bluetooth:before{content:""}.la-bluetooth-b:before{content:""}.la-bold:before{content:""}.la-bolt:before{content:""}.la-bomb:before{content:""}.la-bone:before{content:""}.la-bong:before{content:""}.la-book:before{content:""}.la-book-dead:before{content:""}.la-book-medical:before{content:""}.la-book-open:before{content:""}.la-book-reader:before{content:""}.la-bookmark:before{content:""}.la-bootstrap:before{content:""}.la-border-all:before{content:""}.la-border-none:before{content:""}.la-border-style:before{content:""}.la-bowling-ball:before{content:""}.la-box:before{content:""}.la-box-open:before{content:""}.la-boxes:before{content:""}.la-braille:before{content:""}.la-brain:before{content:""}.la-bread-slice:before{content:""}.la-briefcase:before{content:""}.la-briefcase-medical:before{content:""}.la-broadcast-tower:before{content:""}.la-broom:before{content:""}.la-brush:before{content:""}.la-btc:before{content:""}.la-buffer:before{content:""}.la-bug:before{content:""}.la-building:before{content:""}.la-bullhorn:before{content:""}.la-bullseye:before{content:""}.la-burn:before{content:""}.la-buromobelexperte:before{content:""}.la-bus:before{content:""}.la-bus-alt:before{content:""}.la-business-time:before{content:""}.la-buysellads:before{content:""}.la-calculator:before{content:""}.la-calendar:before{content:""}.la-calendar-alt:before{content:""}.la-calendar-check:before{content:""}.la-calendar-day:before{content:""}.la-calendar-minus:before{content:""}.la-calendar-plus:before{content:""}.la-calendar-times:before{content:""}.la-calendar-week:before{content:""}.la-camera:before{content:""}.la-camera-retro:before{content:""}.la-campground:before{content:""}.la-canadian-maple-leaf:before{content:""}.la-candy-cane:before{content:""}.la-cannabis:before{content:""}.la-capsules:before{content:""}.la-car:before{content:""}.la-car-alt:before{content:""}.la-car-battery:before{content:""}.la-car-crash:before{content:""}.la-car-side:before{content:""}.la-caret-down:before{content:""}.la-caret-left:before{content:""}.la-caret-right:before{content:""}.la-caret-square-down:before{content:""}.la-caret-square-left:before{content:""}.la-caret-square-right:before{content:""}.la-caret-square-up:before{content:""}.la-caret-up:before{content:""}.la-carrot:before{content:""}.la-cart-arrow-down:before{content:""}.la-cart-plus:before{content:""}.la-cash-register:before{content:""}.la-cat:before{content:""}.la-cc-amazon-pay:before{content:""}.la-cc-amex:before{content:""}.la-cc-apple-pay:before{content:""}.la-cc-diners-club:before{content:""}.la-cc-discover:before{content:""}.la-cc-jcb:before{content:""}.la-cc-mastercard:before{content:""}.la-cc-paypal:before{content:""}.la-cc-stripe:before{content:""}.la-cc-visa:before{content:""}.la-centercode:before{content:""}.la-centos:before{content:""}.la-certificate:before{content:""}.la-chair:before{content:""}.la-chalkboard:before{content:""}.la-chalkboard-teacher:before{content:""}.la-charging-station:before{content:""}.la-chart-area:before{content:""}.la-chart-bar:before{content:""}.la-chart-line:before{content:""}.la-chart-pie:before{content:""}.la-check:before{content:""}.la-check-circle:before{content:""}.la-check-double:before{content:""}.la-check-square:before{content:""}.la-cheese:before{content:""}.la-chess:before{content:""}.la-chess-bishop:before{content:""}.la-chess-board:before{content:""}.la-chess-king:before{content:""}.la-chess-knight:before{content:""}.la-chess-pawn:before{content:""}.la-chess-queen:before{content:""}.la-chess-rook:before{content:""}.la-chevron-circle-down:before{content:""}.la-chevron-circle-left:before{content:""}.la-chevron-circle-right:before{content:""}.la-chevron-circle-up:before{content:""}.la-chevron-down:before{content:""}.la-chevron-left:before{content:""}.la-chevron-right:before{content:""}.la-chevron-up:before{content:""}.la-child:before{content:""}.la-chrome:before{content:""}.la-chromecast:before{content:""}.la-church:before{content:""}.la-circle:before{content:""}.la-circle-notch:before{content:""}.la-city:before{content:""}.la-clinic-medical:before{content:""}.la-clipboard:before{content:""}.la-clipboard-check:before{content:""}.la-clipboard-list:before{content:""}.la-clock:before{content:""}.la-clone:before{content:""}.la-closed-captioning:before{content:""}.la-cloud:before{content:""}.la-cloud-download-alt:before{content:""}.la-cloud-meatball:before{content:""}.la-cloud-moon:before{content:""}.la-cloud-moon-rain:before{content:""}.la-cloud-rain:before{content:""}.la-cloud-showers-heavy:before{content:""}.la-cloud-sun:before{content:""}.la-cloud-sun-rain:before{content:""}.la-cloud-upload-alt:before{content:""}.la-cloudscale:before{content:""}.la-cloudsmith:before{content:""}.la-cloudversify:before{content:""}.la-cocktail:before{content:""}.la-code:before{content:""}.la-code-branch:before{content:""}.la-codepen:before{content:""}.la-codiepie:before{content:""}.la-coffee:before{content:""}.la-cog:before{content:""}.la-cogs:before{content:""}.la-coins:before{content:""}.la-columns:before{content:""}.la-comment:before{content:""}.la-comment-alt:before{content:""}.la-comment-dollar:before{content:""}.la-comment-dots:before{content:""}.la-comment-medical:before{content:""}.la-comment-slash:before{content:""}.la-comments:before{content:""}.la-comments-dollar:before{content:""}.la-compact-disc:before{content:""}.la-compass:before{content:""}.la-compress:before{content:""}.la-compress-arrows-alt:before{content:""}.la-concierge-bell:before{content:""}.la-confluence:before{content:""}.la-connectdevelop:before{content:""}.la-contao:before{content:""}.la-cookie:before{content:""}.la-cookie-bite:before{content:""}.la-copy:before{content:""}.la-copyright:before{content:""}.la-cotton-bureau:before{content:""}.la-couch:before{content:""}.la-cpanel:before{content:""}.la-creative-commons:before{content:""}.la-creative-commons-by:before{content:""}.la-creative-commons-nc:before{content:""}.la-creative-commons-nc-eu:before{content:""}.la-creative-commons-nc-jp:before{content:""}.la-creative-commons-nd:before{content:""}.la-creative-commons-pd:before{content:""}.la-creative-commons-pd-alt:before{content:""}.la-creative-commons-remix:before{content:""}.la-creative-commons-sa:before{content:""}.la-creative-commons-sampling:before{content:""}.la-creative-commons-sampling-plus:before{content:""}.la-creative-commons-share:before{content:""}.la-creative-commons-zero:before{content:""}.la-credit-card:before{content:""}.la-critical-role:before{content:""}.la-crop:before{content:""}.la-crop-alt:before{content:""}.la-cross:before{content:""}.la-crosshairs:before{content:""}.la-crow:before{content:""}.la-crown:before{content:""}.la-crutch:before{content:""}.la-css3:before{content:""}.la-css3-alt:before{content:""}.la-cube:before{content:""}.la-cubes:before{content:""}.la-cut:before{content:""}.la-cuttlefish:before{content:""}.la-d-and-d:before{content:""}.la-d-and-d-beyond:before{content:""}.la-dashcube:before{content:""}.la-database:before{content:""}.la-deaf:before{content:""}.la-delicious:before{content:""}.la-democrat:before{content:""}.la-deploydog:before{content:""}.la-deskpro:before{content:""}.la-desktop:before{content:""}.la-dev:before{content:""}.la-deviantart:before{content:""}.la-dharmachakra:before{content:""}.la-dhl:before{content:""}.la-diagnoses:before{content:""}.la-diaspora:before{content:""}.la-dice:before{content:""}.la-dice-d20:before{content:""}.la-dice-d6:before{content:""}.la-dice-five:before{content:""}.la-dice-four:before{content:""}.la-dice-one:before{content:""}.la-dice-six:before{content:""}.la-dice-three:before{content:""}.la-dice-two:before{content:""}.la-digg:before{content:""}.la-digital-ocean:before{content:""}.la-digital-tachograph:before{content:""}.la-directions:before{content:""}.la-discord:before{content:""}.la-discourse:before{content:""}.la-divide:before{content:""}.la-dizzy:before{content:""}.la-dna:before{content:""}.la-dochub:before{content:""}.la-docker:before{content:""}.la-dog:before{content:""}.la-dollar-sign:before{content:""}.la-dolly:before{content:""}.la-dolly-flatbed:before{content:""}.la-donate:before{content:""}.la-door-closed:before{content:""}.la-door-open:before{content:""}.la-dot-circle:before{content:""}.la-dove:before{content:""}.la-download:before{content:""}.la-draft2digital:before{content:""}.la-drafting-compass:before{content:""}.la-dragon:before{content:""}.la-draw-polygon:before{content:""}.la-dribbble:before{content:""}.la-dribbble-square:before{content:""}.la-dropbox:before{content:""}.la-drum:before{content:""}.la-drum-steelpan:before{content:""}.la-drumstick-bite:before{content:""}.la-drupal:before{content:""}.la-dumbbell:before{content:""}.la-dumpster:before{content:""}.la-dumpster-fire:before{content:""}.la-dungeon:before{content:""}.la-dyalog:before{content:""}.la-earlybirds:before{content:""}.la-ebay:before{content:""}.la-edge:before{content:""}.la-edit:before{content:""}.la-egg:before{content:""}.la-eject:before{content:""}.la-elementor:before{content:""}.la-ellipsis-h:before{content:""}.la-ellipsis-v:before{content:""}.la-ello:before{content:""}.la-ember:before{content:""}.la-empire:before{content:""}.la-envelope:before{content:""}.la-envelope-open:before{content:""}.la-envelope-open-text:before{content:""}.la-envelope-square:before{content:""}.la-envira:before{content:""}.la-equals:before{content:""}.la-eraser:before{content:""}.la-erlang:before{content:""}.la-ethereum:before{content:""}.la-ethernet:before{content:""}.la-etsy:before{content:""}.la-euro-sign:before{content:""}.la-evernote:before{content:""}.la-exchange-alt:before{content:""}.la-exclamation:before{content:""}.la-exclamation-circle:before{content:""}.la-exclamation-triangle:before{content:""}.la-expand:before{content:""}.la-expand-arrows-alt:before{content:""}.la-expeditedssl:before{content:""}.la-external-link-alt:before{content:""}.la-external-link-square-alt:before{content:""}.la-eye:before{content:""}.la-eye-dropper:before{content:""}.la-eye-slash:before{content:""}.la-facebook:before{content:""}.la-facebook-f:before{content:""}.la-facebook-messenger:before{content:""}.la-facebook-square:before{content:""}.la-fan:before{content:""}.la-fantasy-flight-games:before{content:""}.la-fast-backward:before{content:""}.la-fast-forward:before{content:""}.la-fax:before{content:""}.la-feather:before{content:""}.la-feather-alt:before{content:""}.la-fedex:before{content:""}.la-fedora:before{content:""}.la-female:before{content:""}.la-fighter-jet:before{content:""}.la-figma:before{content:""}.la-file:before{content:""}.la-file-alt:before{content:""}.la-file-archive:before{content:""}.la-file-audio:before{content:""}.la-file-code:before{content:""}.la-file-contract:before{content:""}.la-file-csv:before{content:""}.la-file-download:before{content:""}.la-file-excel:before{content:""}.la-file-export:before{content:""}.la-file-image:before{content:""}.la-file-import:before{content:""}.la-file-invoice:before{content:""}.la-file-invoice-dollar:before{content:""}.la-file-medical:before{content:""}.la-file-medical-alt:before{content:""}.la-file-pdf:before{content:""}.la-file-powerpoint:before{content:""}.la-file-prescription:before{content:""}.la-file-signature:before{content:""}.la-file-upload:before{content:""}.la-file-video:before{content:""}.la-file-word:before{content:""}.la-fill:before{content:""}.la-fill-drip:before{content:""}.la-film:before{content:""}.la-filter:before{content:""}.la-fingerprint:before{content:""}.la-fire:before{content:""}.la-fire-alt:before{content:""}.la-fire-extinguisher:before{content:""}.la-firefox:before{content:""}.la-first-aid:before{content:""}.la-first-order:before{content:""}.la-first-order-alt:before{content:""}.la-firstdraft:before{content:""}.la-fish:before{content:""}.la-fist-raised:before{content:""}.la-flag:before{content:""}.la-flag-checkered:before{content:""}.la-flag-usa:before{content:""}.la-flask:before{content:""}.la-flickr:before{content:""}.la-flipboard:before{content:""}.la-flushed:before{content:""}.la-fly:before{content:""}.la-folder:before{content:""}.la-folder-minus:before{content:""}.la-folder-open:before{content:""}.la-folder-plus:before{content:""}.la-font:before{content:""}.la-font-awesome:before{content:""}.la-font-awesome-alt:before{content:""}.la-font-awesome-flag:before{content:""}.la-fonticons:before{content:""}.la-fonticons-fi:before{content:""}.la-football-ball:before{content:""}.la-fort-awesome:before{content:""}.la-fort-awesome-alt:before{content:""}.la-forumbee:before{content:""}.la-forward:before{content:""}.la-foursquare:before{content:""}.la-free-code-camp:before{content:""}.la-freebsd:before{content:""}.la-frog:before{content:""}.la-frown:before{content:""}.la-frown-open:before{content:""}.la-fulcrum:before{content:""}.la-funnel-dollar:before{content:""}.la-futbol:before{content:""}.la-galactic-republic:before{content:""}.la-galactic-senate:before{content:""}.la-gamepad:before{content:""}.la-gas-pump:before{content:""}.la-gavel:before{content:""}.la-gem:before{content:""}.la-genderless:before{content:""}.la-get-pocket:before{content:""}.la-gg:before{content:""}.la-gg-circle:before{content:""}.la-ghost:before{content:""}.la-gift:before{content:""}.la-gifts:before{content:""}.la-git:before{content:""}.la-git-alt:before{content:""}.la-git-square:before{content:""}.la-github:before{content:""}.la-github-alt:before{content:""}.la-github-square:before{content:""}.la-gitkraken:before{content:""}.la-gitlab:before{content:""}.la-gitter:before{content:""}.la-glass-cheers:before{content:""}.la-glass-martini:before{content:""}.la-glass-martini-alt:before{content:""}.la-glass-whiskey:before{content:""}.la-glasses:before{content:""}.la-glide:before{content:""}.la-glide-g:before{content:""}.la-globe:before{content:""}.la-globe-africa:before{content:""}.la-globe-americas:before{content:""}.la-globe-asia:before{content:""}.la-globe-europe:before{content:""}.la-gofore:before{content:""}.la-golf-ball:before{content:""}.la-goodreads:before{content:""}.la-goodreads-g:before{content:""}.la-google:before{content:""}.la-google-drive:before{content:""}.la-google-play:before{content:""}.la-google-plus:before{content:""}.la-google-plus-g:before{content:""}.la-google-plus-square:before{content:""}.la-google-wallet:before{content:""}.la-gopuram:before{content:""}.la-graduation-cap:before{content:""}.la-gratipay:before{content:""}.la-grav:before{content:""}.la-greater-than:before{content:""}.la-greater-than-equal:before{content:""}.la-grimace:before{content:""}.la-grin:before{content:""}.la-grin-alt:before{content:""}.la-grin-beam:before{content:""}.la-grin-beam-sweat:before{content:""}.la-grin-hearts:before{content:""}.la-grin-squint:before{content:""}.la-grin-squint-tears:before{content:""}.la-grin-stars:before{content:""}.la-grin-tears:before{content:""}.la-grin-tongue:before{content:""}.la-grin-tongue-squint:before{content:""}.la-grin-tongue-wink:before{content:""}.la-grin-wink:before{content:""}.la-grip-horizontal:before{content:""}.la-grip-lines:before{content:""}.la-grip-lines-vertical:before{content:""}.la-grip-vertical:before{content:""}.la-gripfire:before{content:""}.la-grunt:before{content:""}.la-guitar:before{content:""}.la-gulp:before{content:""}.la-h-square:before{content:""}.la-hacker-news:before{content:""}.la-hacker-news-square:before{content:""}.la-hackerrank:before{content:""}.la-hamburger:before{content:""}.la-hammer:before{content:""}.la-hamsa:before{content:""}.la-hand-holding:before{content:""}.la-hand-holding-heart:before{content:""}.la-hand-holding-usd:before{content:""}.la-hand-lizard:before{content:""}.la-hand-middle-finger:before{content:""}.la-hand-paper:before{content:""}.la-hand-peace:before{content:""}.la-hand-point-down:before{content:""}.la-hand-point-left:before{content:""}.la-hand-point-right:before{content:""}.la-hand-point-up:before{content:""}.la-hand-pointer:before{content:""}.la-hand-rock:before{content:""}.la-hand-scissors:before{content:""}.la-hand-spock:before{content:""}.la-hands:before{content:""}.la-hands-helping:before{content:""}.la-handshake:before{content:""}.la-hanukiah:before{content:""}.la-hard-hat:before{content:""}.la-hashtag:before{content:""}.la-hat-wizard:before{content:""}.la-haykal:before{content:""}.la-hdd:before{content:""}.la-heading:before{content:""}.la-headphones:before{content:""}.la-headphones-alt:before{content:""}.la-headset:before{content:""}.la-heart:before{content:""}.la-heart-broken:before{content:""}.la-heartbeat:before{content:""}.la-helicopter:before{content:""}.la-highlighter:before{content:""}.la-hiking:before{content:""}.la-hippo:before{content:""}.la-hips:before{content:""}.la-hire-a-helper:before{content:""}.la-history:before{content:""}.la-hockey-puck:before{content:""}.la-holly-berry:before{content:""}.la-home:before{content:""}.la-hooli:before{content:""}.la-hornbill:before{content:""}.la-horse:before{content:""}.la-horse-head:before{content:""}.la-hospital:before{content:""}.la-hospital-alt:before{content:""}.la-hospital-symbol:before{content:""}.la-hot-tub:before{content:""}.la-hotdog:before{content:""}.la-hotel:before{content:""}.la-hotjar:before{content:""}.la-hourglass:before{content:""}.la-hourglass-end:before{content:""}.la-hourglass-half:before{content:""}.la-hourglass-start:before{content:""}.la-house-damage:before{content:""}.la-houzz:before{content:""}.la-hryvnia:before{content:""}.la-html5:before{content:""}.la-hubspot:before{content:""}.la-i-cursor:before{content:""}.la-ice-cream:before{content:""}.la-icicles:before{content:""}.la-icons:before{content:""}.la-id-badge:before{content:""}.la-id-card:before{content:""}.la-id-card-alt:before{content:""}.la-igloo:before{content:""}.la-image:before{content:""}.la-images:before{content:""}.la-imdb:before{content:""}.la-inbox:before{content:""}.la-indent:before{content:""}.la-industry:before{content:""}.la-infinity:before{content:""}.la-info:before{content:""}.la-info-circle:before{content:""}.la-instagram:before{content:""}.la-intercom:before{content:""}.la-internet-explorer:before{content:""}.la-invision:before{content:""}.la-ioxhost:before{content:""}.la-italic:before{content:""}.la-itch-io:before{content:""}.la-itunes:before{content:""}.la-itunes-note:before{content:""}.la-java:before{content:""}.la-jedi:before{content:""}.la-jedi-order:before{content:""}.la-jenkins:before{content:""}.la-jira:before{content:""}.la-joget:before{content:""}.la-joint:before{content:""}.la-joomla:before{content:""}.la-journal-whills:before{content:""}.la-js:before{content:""}.la-js-square:before{content:""}.la-jsfiddle:before{content:""}.la-kaaba:before{content:""}.la-kaggle:before{content:""}.la-key:before{content:""}.la-keybase:before{content:""}.la-keyboard:before{content:""}.la-keycdn:before{content:""}.la-khanda:before{content:""}.la-kickstarter:before{content:""}.la-kickstarter-k:before{content:""}.la-kiss:before{content:""}.la-kiss-beam:before{content:""}.la-kiss-wink-heart:before{content:""}.la-kiwi-bird:before{content:""}.la-korvue:before{content:""}.la-landmark:before{content:""}.la-language:before{content:""}.la-laptop:before{content:""}.la-laptop-code:before{content:""}.la-laptop-medical:before{content:""}.la-laravel:before{content:""}.la-lastfm:before{content:""}.la-lastfm-square:before{content:""}.la-laugh:before{content:""}.la-laugh-beam:before{content:""}.la-laugh-squint:before{content:""}.la-laugh-wink:before{content:""}.la-layer-group:before{content:""}.la-leaf:before{content:""}.la-leanpub:before{content:""}.la-lemon:before{content:""}.la-less:before{content:""}.la-less-than:before{content:""}.la-less-than-equal:before{content:""}.la-level-down-alt:before{content:""}.la-level-up-alt:before{content:""}.la-life-ring:before{content:""}.la-lightbulb:before{content:""}.la-line:before{content:""}.la-link:before{content:""}.la-linkedin:before{content:""}.la-linkedin-in:before{content:""}.la-linode:before{content:""}.la-linux:before{content:""}.la-lira-sign:before{content:""}.la-list:before{content:""}.la-list-alt:before{content:""}.la-list-ol:before{content:""}.la-list-ul:before{content:""}.la-location-arrow:before{content:""}.la-lock:before{content:""}.la-lock-open:before{content:""}.la-long-arrow-alt-down:before{content:""}.la-long-arrow-alt-left:before{content:""}.la-long-arrow-alt-right:before{content:""}.la-long-arrow-alt-up:before{content:""}.la-low-vision:before{content:""}.la-luggage-cart:before{content:""}.la-lyft:before{content:""}.la-magento:before{content:""}.la-magic:before{content:""}.la-magnet:before{content:""}.la-mail-bulk:before{content:""}.la-mailchimp:before{content:""}.la-male:before{content:""}.la-mandalorian:before{content:""}.la-map:before{content:""}.la-map-marked:before{content:""}.la-map-marked-alt:before{content:""}.la-map-marker:before{content:""}.la-map-marker-alt:before{content:""}.la-map-pin:before{content:""}.la-map-signs:before{content:""}.la-markdown:before{content:""}.la-marker:before{content:""}.la-mars:before{content:""}.la-mars-double:before{content:""}.la-mars-stroke:before{content:""}.la-mars-stroke-h:before{content:""}.la-mars-stroke-v:before{content:""}.la-mask:before{content:""}.la-mastodon:before{content:""}.la-maxcdn:before{content:""}.la-medal:before{content:""}.la-medapps:before{content:""}.la-medium:before{content:""}.la-medium-m:before{content:""}.la-medkit:before{content:""}.la-medrt:before{content:""}.la-meetup:before{content:""}.la-megaport:before{content:""}.la-meh:before{content:""}.la-meh-blank:before{content:""}.la-meh-rolling-eyes:before{content:""}.la-memory:before{content:""}.la-mendeley:before{content:""}.la-menorah:before{content:""}.la-mercury:before{content:""}.la-meteor:before{content:""}.la-microchip:before{content:""}.la-microphone:before{content:""}.la-microphone-alt:before{content:""}.la-microphone-alt-slash:before{content:""}.la-microphone-slash:before{content:""}.la-microscope:before{content:""}.la-microsoft:before{content:""}.la-minus:before{content:""}.la-minus-circle:before{content:""}.la-minus-square:before{content:""}.la-mitten:before{content:""}.la-mix:before{content:""}.la-mixcloud:before{content:""}.la-mizuni:before{content:""}.la-mobile:before{content:""}.la-mobile-alt:before{content:""}.la-modx:before{content:""}.la-monero:before{content:""}.la-money-bill:before{content:""}.la-money-bill-alt:before{content:""}.la-money-bill-wave:before{content:""}.la-money-bill-wave-alt:before{content:""}.la-money-check:before{content:""}.la-money-check-alt:before{content:""}.la-monument:before{content:""}.la-moon:before{content:""}.la-mortar-pestle:before{content:""}.la-mosque:before{content:""}.la-motorcycle:before{content:""}.la-mountain:before{content:""}.la-mouse-pointer:before{content:""}.la-mug-hot:before{content:""}.la-music:before{content:""}.la-napster:before{content:""}.la-neos:before{content:""}.la-network-wired:before{content:""}.la-neuter:before{content:""}.la-newspaper:before{content:""}.la-nimblr:before{content:""}.la-node:before{content:""}.la-node-js:before{content:""}.la-not-equal:before{content:""}.la-notes-medical:before{content:""}.la-npm:before{content:""}.la-ns8:before{content:""}.la-nutritionix:before{content:""}.la-object-group:before{content:""}.la-object-ungroup:before{content:""}.la-odnoklassniki:before{content:""}.la-odnoklassniki-square:before{content:""}.la-oil-can:before{content:""}.la-old-republic:before{content:""}.la-om:before{content:""}.la-opencart:before{content:""}.la-openid:before{content:""}.la-opera:before{content:""}.la-optin-monster:before{content:""}.la-osi:before{content:""}.la-otter:before{content:""}.la-outdent:before{content:""}.la-page4:before{content:""}.la-pagelines:before{content:""}.la-pager:before{content:""}.la-paint-brush:before{content:""}.la-paint-roller:before{content:""}.la-palette:before{content:""}.la-palfed:before{content:""}.la-pallet:before{content:""}.la-paper-plane:before{content:""}.la-paperclip:before{content:""}.la-parachute-box:before{content:""}.la-paragraph:before{content:""}.la-parking:before{content:""}.la-passport:before{content:""}.la-pastafarianism:before{content:""}.la-paste:before{content:""}.la-patreon:before{content:""}.la-pause:before{content:""}.la-pause-circle:before{content:""}.la-paw:before{content:""}.la-paypal:before{content:""}.la-peace:before{content:""}.la-pen:before{content:""}.la-pen-alt:before{content:""}.la-pen-fancy:before{content:""}.la-pen-nib:before{content:""}.la-pen-square:before{content:""}.la-pencil-alt:before{content:""}.la-pencil-ruler:before{content:""}.la-penny-arcade:before{content:""}.la-people-carry:before{content:""}.la-pepper-hot:before{content:""}.la-percent:before{content:""}.la-percentage:before{content:""}.la-periscope:before{content:""}.la-person-booth:before{content:""}.la-phabricator:before{content:""}.la-phoenix-framework:before{content:""}.la-phoenix-squadron:before{content:""}.la-phone:before{content:""}.la-phone-alt:before{content:""}.la-phone-slash:before{content:""}.la-phone-square:before{content:""}.la-phone-square-alt:before{content:""}.la-phone-volume:before{content:""}.la-photo-video:before{content:""}.la-php:before{content:""}.la-pied-piper:before{content:""}.la-pied-piper-alt:before{content:""}.la-pied-piper-hat:before{content:""}.la-pied-piper-pp:before{content:""}.la-piggy-bank:before{content:""}.la-pills:before{content:""}.la-pinterest:before{content:""}.la-pinterest-p:before{content:""}.la-pinterest-square:before{content:""}.la-pizza-slice:before{content:""}.la-place-of-worship:before{content:""}.la-plane:before{content:""}.la-plane-arrival:before{content:""}.la-plane-departure:before{content:""}.la-play:before{content:""}.la-play-circle:before{content:""}.la-playstation:before{content:""}.la-plug:before{content:""}.la-plus:before{content:""}.la-plus-circle:before{content:""}.la-plus-square:before{content:""}.la-podcast:before{content:""}.la-poll:before{content:""}.la-poll-h:before{content:""}.la-poo:before{content:""}.la-poo-storm:before{content:""}.la-poop:before{content:""}.la-portrait:before{content:""}.la-pound-sign:before{content:""}.la-power-off:before{content:""}.la-pray:before{content:""}.la-praying-hands:before{content:""}.la-prescription:before{content:""}.la-prescription-bottle:before{content:""}.la-prescription-bottle-alt:before{content:""}.la-print:before{content:""}.la-procedures:before{content:""}.la-product-hunt:before{content:""}.la-project-diagram:before{content:""}.la-pushed:before{content:""}.la-puzzle-piece:before{content:""}.la-python:before{content:""}.la-qq:before{content:""}.la-qrcode:before{content:""}.la-question:before{content:""}.la-question-circle:before{content:""}.la-quidditch:before{content:""}.la-quinscape:before{content:""}.la-quora:before{content:""}.la-quote-left:before{content:""}.la-quote-right:before{content:""}.la-quran:before{content:""}.la-r-project:before{content:""}.la-radiation:before{content:""}.la-radiation-alt:before{content:""}.la-rainbow:before{content:""}.la-random:before{content:""}.la-raspberry-pi:before{content:""}.la-ravelry:before{content:""}.la-react:before{content:""}.la-reacteurope:before{content:""}.la-readme:before{content:""}.la-rebel:before{content:""}.la-receipt:before{content:""}.la-recycle:before{content:""}.la-red-river:before{content:""}.la-reddit:before{content:""}.la-reddit-alien:before{content:""}.la-reddit-square:before{content:""}.la-redhat:before{content:""}.la-redo:before{content:""}.la-redo-alt:before{content:""}.la-registered:before{content:""}.la-remove-format:before{content:""}.la-renren:before{content:""}.la-reply:before{content:""}.la-reply-all:before{content:""}.la-replyd:before{content:""}.la-republican:before{content:""}.la-researchgate:before{content:""}.la-resolving:before{content:""}.la-restroom:before{content:""}.la-retweet:before{content:""}.la-rev:before{content:""}.la-ribbon:before{content:""}.la-ring:before{content:""}.la-road:before{content:""}.la-robot:before{content:""}.la-rocket:before{content:""}.la-rocketchat:before{content:""}.la-rockrms:before{content:""}.la-route:before{content:""}.la-rss:before{content:""}.la-rss-square:before{content:""}.la-ruble-sign:before{content:""}.la-ruler:before{content:""}.la-ruler-combined:before{content:""}.la-ruler-horizontal:before{content:""}.la-ruler-vertical:before{content:""}.la-running:before{content:""}.la-rupee-sign:before{content:""}.la-sad-cry:before{content:""}.la-sad-tear:before{content:""}.la-safari:before{content:""}.la-salesforce:before{content:""}.la-sass:before{content:""}.la-satellite:before{content:""}.la-satellite-dish:before{content:""}.la-save:before{content:""}.la-schlix:before{content:""}.la-school:before{content:""}.la-screwdriver:before{content:""}.la-scribd:before{content:""}.la-scroll:before{content:""}.la-sd-card:before{content:""}.la-search:before{content:""}.la-search-dollar:before{content:""}.la-search-location:before{content:""}.la-search-minus:before{content:""}.la-search-plus:before{content:""}.la-searchengin:before{content:""}.la-seedling:before{content:""}.la-sellcast:before{content:""}.la-sellsy:before{content:""}.la-server:before{content:""}.la-servicestack:before{content:""}.la-shapes:before{content:""}.la-share:before{content:""}.la-share-alt:before{content:""}.la-share-alt-square:before{content:""}.la-share-square:before{content:""}.la-shekel-sign:before{content:""}.la-shield-alt:before{content:""}.la-ship:before{content:""}.la-shipping-fast:before{content:""}.la-shirtsinbulk:before{content:""}.la-shoe-prints:before{content:""}.la-shopping-bag:before{content:""}.la-shopping-basket:before{content:""}.la-shopping-cart:before{content:""}.la-shopware:before{content:""}.la-shower:before{content:""}.la-shuttle-van:before{content:""}.la-sign:before{content:""}.la-sign-in-alt:before{content:""}.la-sign-language:before{content:""}.la-sign-out-alt:before{content:""}.la-signal:before{content:""}.la-signature:before{content:""}.la-sim-card:before{content:""}.la-simplybuilt:before{content:""}.la-sistrix:before{content:""}.la-sitemap:before{content:""}.la-sith:before{content:""}.la-skating:before{content:""}.la-sketch:before{content:""}.la-skiing:before{content:""}.la-skiing-nordic:before{content:""}.la-skull:before{content:""}.la-skull-crossbones:before{content:""}.la-skyatlas:before{content:""}.la-skype:before{content:""}.la-slack:before{content:""}.la-slack-hash:before{content:""}.la-slash:before{content:""}.la-sleigh:before{content:""}.la-sliders-h:before{content:""}.la-slideshare:before{content:""}.la-smile:before{content:""}.la-smile-beam:before{content:""}.la-smile-wink:before{content:""}.la-smog:before{content:""}.la-smoking:before{content:""}.la-smoking-ban:before{content:""}.la-sms:before{content:""}.la-snapchat:before{content:""}.la-snapchat-ghost:before{content:""}.la-snapchat-square:before{content:""}.la-snowboarding:before{content:""}.la-snowflake:before{content:""}.la-snowman:before{content:""}.la-snowplow:before{content:""}.la-socks:before{content:""}.la-solar-panel:before{content:""}.la-sort:before{content:""}.la-sort-alpha-down:before{content:""}.la-sort-alpha-down-alt:before{content:""}.la-sort-alpha-up:before{content:""}.la-sort-alpha-up-alt:before{content:""}.la-sort-amount-down:before{content:""}.la-sort-amount-down-alt:before{content:""}.la-sort-amount-up:before{content:""}.la-sort-amount-up-alt:before{content:""}.la-sort-down:before{content:""}.la-sort-numeric-down:before{content:""}.la-sort-numeric-down-alt:before{content:""}.la-sort-numeric-up:before{content:""}.la-sort-numeric-up-alt:before{content:""}.la-sort-up:before{content:""}.la-soundcloud:before{content:""}.la-sourcetree:before{content:""}.la-spa:before{content:""}.la-space-shuttle:before{content:""}.la-speakap:before{content:""}.la-speaker-deck:before{content:""}.la-spell-check:before{content:""}.la-spider:before{content:""}.la-spinner:before{content:""}.la-splotch:before{content:""}.la-spotify:before{content:""}.la-spray-can:before{content:""}.la-square:before{content:""}.la-square-full:before{content:""}.la-square-root-alt:before{content:""}.la-squarespace:before{content:""}.la-stack-exchange:before{content:""}.la-stack-overflow:before{content:""}.la-stackpath:before{content:""}.la-stamp:before{content:""}.la-star:before{content:""}.la-star-and-crescent:before{content:""}.la-star-half:before{content:""}.la-star-half-alt:before{content:""}.la-star-of-david:before{content:""}.la-star-of-life:before{content:""}.la-staylinked:before{content:""}.la-steam:before{content:""}.la-steam-square:before{content:""}.la-steam-symbol:before{content:""}.la-step-backward:before{content:""}.la-step-forward:before{content:""}.la-stethoscope:before{content:""}.la-sticker-mule:before{content:""}.la-sticky-note:before{content:""}.la-stop:before{content:""}.la-stop-circle:before{content:""}.la-stopwatch:before{content:""}.la-store:before{content:""}.la-store-alt:before{content:""}.la-strava:before{content:""}.la-stream:before{content:""}.la-street-view:before{content:""}.la-strikethrough:before{content:""}.la-stripe:before{content:""}.la-stripe-s:before{content:""}.la-stroopwafel:before{content:""}.la-studiovinari:before{content:""}.la-stumbleupon:before{content:""}.la-stumbleupon-circle:before{content:""}.la-subscript:before{content:""}.la-subway:before{content:""}.la-suitcase:before{content:""}.la-suitcase-rolling:before{content:""}.la-sun:before{content:""}.la-superpowers:before{content:""}.la-superscript:before{content:""}.la-supple:before{content:""}.la-surprise:before{content:""}.la-suse:before{content:""}.la-swatchbook:before{content:""}.la-swimmer:before{content:""}.la-swimming-pool:before{content:""}.la-symfony:before{content:""}.la-synagogue:before{content:""}.la-sync:before{content:""}.la-sync-alt:before{content:""}.la-syringe:before{content:""}.la-table:before{content:""}.la-table-tennis:before{content:""}.la-tablet:before{content:""}.la-tablet-alt:before{content:""}.la-tablets:before{content:""}.la-tachometer-alt:before{content:""}.la-tag:before{content:""}.la-tags:before{content:""}.la-tape:before{content:""}.la-tasks:before{content:""}.la-taxi:before{content:""}.la-teamspeak:before{content:""}.la-teeth:before{content:""}.la-teeth-open:before{content:""}.la-telegram:before{content:""}.la-telegram-plane:before{content:""}.la-temperature-high:before{content:""}.la-temperature-low:before{content:""}.la-tencent-weibo:before{content:""}.la-tenge:before{content:""}.la-terminal:before{content:""}.la-text-height:before{content:""}.la-text-width:before{content:""}.la-th:before{content:""}.la-th-large:before{content:""}.la-th-list:before{content:""}.la-the-red-yeti:before{content:""}.la-theater-masks:before{content:""}.la-themeco:before{content:""}.la-themeisle:before{content:""}.la-thermometer:before{content:""}.la-thermometer-empty:before{content:""}.la-thermometer-full:before{content:""}.la-thermometer-half:before{content:""}.la-thermometer-quarter:before{content:""}.la-thermometer-three-quarters:before{content:""}.la-think-peaks:before{content:""}.la-thumbs-down:before{content:""}.la-thumbs-up:before{content:""}.la-thumbtack:before{content:""}.la-ticket-alt:before{content:""}.la-times:before{content:""}.la-times-circle:before{content:""}.la-tint:before{content:""}.la-tint-slash:before{content:""}.la-tired:before{content:""}.la-toggle-off:before{content:""}.la-toggle-on:before{content:""}.la-toilet:before{content:""}.la-toilet-paper:before{content:""}.la-toolbox:before{content:""}.la-tools:before{content:""}.la-tooth:before{content:""}.la-torah:before{content:""}.la-torii-gate:before{content:""}.la-tractor:before{content:""}.la-trade-federation:before{content:""}.la-trademark:before{content:""}.la-traffic-light:before{content:""}.la-train:before{content:""}.la-tram:before{content:""}.la-transgender:before{content:""}.la-transgender-alt:before{content:""}.la-trash:before{content:""}.la-trash-alt:before{content:""}.la-trash-restore:before{content:""}.la-trash-restore-alt:before{content:""}.la-tree:before{content:""}.la-trello:before{content:""}.la-tripadvisor:before{content:""}.la-trophy:before{content:""}.la-truck:before{content:""}.la-truck-loading:before{content:""}.la-truck-monster:before{content:""}.la-truck-moving:before{content:""}.la-truck-pickup:before{content:""}.la-tshirt:before{content:""}.la-tty:before{content:""}.la-tumblr:before{content:""}.la-tumblr-square:before{content:""}.la-tv:before{content:""}.la-twitch:before{content:""}.la-twitter:before{content:""}.la-twitter-square:before{content:""}.la-typo3:before{content:""}.la-uber:before{content:""}.la-ubuntu:before{content:""}.la-uikit:before{content:""}.la-umbrella:before{content:""}.la-umbrella-beach:before{content:""}.la-underline:before{content:""}.la-undo:before{content:""}.la-undo-alt:before{content:""}.la-uniregistry:before{content:""}.la-universal-access:before{content:""}.la-university:before{content:""}.la-unlink:before{content:""}.la-unlock:before{content:""}.la-unlock-alt:before{content:""}.la-untappd:before{content:""}.la-upload:before{content:""}.la-ups:before{content:""}.la-usb:before{content:""}.la-user:before{content:""}.la-user-alt:before{content:""}.la-user-alt-slash:before{content:""}.la-user-astronaut:before{content:""}.la-user-check:before{content:""}.la-user-circle:before{content:""}.la-user-clock:before{content:""}.la-user-cog:before{content:""}.la-user-edit:before{content:""}.la-user-friends:before{content:""}.la-user-graduate:before{content:""}.la-user-injured:before{content:""}.la-user-lock:before{content:""}.la-user-md:before{content:""}.la-user-minus:before{content:""}.la-user-ninja:before{content:""}.la-user-nurse:before{content:""}.la-user-plus:before{content:""}.la-user-secret:before{content:""}.la-user-shield:before{content:""}.la-user-slash:before{content:""}.la-user-tag:before{content:""}.la-user-tie:before{content:""}.la-user-times:before{content:""}.la-users:before{content:""}.la-users-cog:before{content:""}.la-usps:before{content:""}.la-ussunnah:before{content:""}.la-utensil-spoon:before{content:""}.la-utensils:before{content:""}.la-vaadin:before{content:""}.la-vector-square:before{content:""}.la-venus:before{content:""}.la-venus-double:before{content:""}.la-venus-mars:before{content:""}.la-viacoin:before{content:""}.la-viadeo:before{content:""}.la-viadeo-square:before{content:""}.la-vial:before{content:""}.la-vials:before{content:""}.la-viber:before{content:""}.la-video:before{content:""}.la-video-slash:before{content:""}.la-vihara:before{content:""}.la-vimeo:before{content:""}.la-vimeo-square:before{content:""}.la-vimeo-v:before{content:""}.la-vine:before{content:""}.la-vk:before{content:""}.la-vnv:before{content:""}.la-voicemail:before{content:""}.la-volleyball-ball:before{content:""}.la-volume-down:before{content:""}.la-volume-mute:before{content:""}.la-volume-off:before{content:""}.la-volume-up:before{content:""}.la-vote-yea:before{content:""}.la-vr-cardboard:before{content:""}.la-vuejs:before{content:""}.la-walking:before{content:""}.la-wallet:before{content:""}.la-warehouse:before{content:""}.la-water:before{content:""}.la-wave-square:before{content:""}.la-waze:before{content:""}.la-weebly:before{content:""}.la-weibo:before{content:""}.la-weight:before{content:""}.la-weight-hanging:before{content:""}.la-weixin:before{content:""}.la-whatsapp:before{content:""}.la-whatsapp-square:before{content:""}.la-wheelchair:before{content:""}.la-whmcs:before{content:""}.la-wifi:before{content:""}.la-wikipedia-w:before{content:""}.la-wind:before{content:""}.la-window-close:before{content:""}.la-window-maximize:before{content:""}.la-window-minimize:before{content:""}.la-window-restore:before{content:""}.la-windows:before{content:""}.la-wine-bottle:before{content:""}.la-wine-glass:before{content:""}.la-wine-glass-alt:before{content:""}.la-wix:before{content:""}.la-wizards-of-the-coast:before{content:""}.la-wolf-pack-battalion:before{content:""}.la-won-sign:before{content:""}.la-wordpress:before{content:""}.la-wordpress-simple:before{content:""}.la-wpbeginner:before{content:""}.la-wpexplorer:before{content:""}.la-wpforms:before{content:""}.la-wpressr:before{content:""}.la-wrench:before{content:""}.la-x-ray:before{content:""}.la-xbox:before{content:""}.la-xing:before{content:""}.la-xing-square:before{content:""}.la-y-combinator:before{content:""}.la-yahoo:before{content:""}.la-yammer:before{content:""}.la-yandex:before{content:""}.la-yandex-international:before{content:""}.la-yarn:before{content:""}.la-yelp:before{content:""}.la-yen-sign:before{content:""}.la-yin-yang:before{content:""}.la-yoast:before{content:""}.la-youtube:before{content:""}.la-youtube-square:before{content:""}.la-zhihu:before{content:""}.la-hat-cowboy:before{content:""}.la-hat-cowboy-side:before{content:""}.la-mdb:before{content:""}.la-mouse:before{content:""}.la-orcid:before{content:""}.la-record-vinyl:before{content:""}.la-swift:before{content:""}.la-umbraco:before{content:""}.la-buy-n-large:before{content:""}.sr-only{clip:rect(0,0,0,0);border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.sr-only-focusable:active,.sr-only-focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}body,html{font-family:Jost;height:100%;width:100%}.bg-overlay{background:rgba(51,51,51,.26)}[v-cloak]>*{display:none}.loader{border-top-color:#3498db!important}.loader.slow{-webkit-animation:spinner 1.5s linear infinite;animation:spinner 1.5s linear infinite}.loader.fast{-webkit-animation:spinner .7s linear infinite;animation:spinner .7s linear infinite}@-webkit-keyframes spinner{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(1turn)}}@keyframes spinner{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.form-input label{--tw-text-opacity:1;color:rgba(31,41,55,var(--tw-text-opacity));font-weight:600;padding-bottom:.5rem;padding-top:.5rem}.form-input input{--tw-border-opacity:1;--tw-bg-opacity:1;background-color:rgba(219,234,254,var(--tw-bg-opacity));border-color:rgba(191,219,254,var(--tw-border-opacity));border-radius:.25rem;border-width:2px;padding:.5rem;width:100%}.form-input input[disabled]{--tw-bg-opacity:1;background-color:rgba(209,213,219,var(--tw-bg-opacity))}.form-input p{--tw-text-opacity:1;color:rgba(75,85,99,var(--tw-text-opacity));font-size:.75rem;line-height:1rem;padding-bottom:.25rem;padding-top:.25rem}.form-input-invalid label{--tw-text-opacity:1;color:rgba(239,68,68,var(--tw-text-opacity));font-weight:600;padding-bottom:.5rem;padding-top:.5rem}.form-input-invalid input{--tw-border-opacity:1;--tw-bg-opacity:1;background-color:rgba(254,226,226,var(--tw-bg-opacity));border-color:rgba(248,113,113,var(--tw-border-opacity));border-radius:.25rem;border-width:2px;padding:.5rem;width:100%}.form-input-invalid p{--tw-text-opacity:1;color:rgba(239,68,68,var(--tw-text-opacity));font-size:.75rem;line-height:1rem;padding-bottom:.25rem;padding-top:.25rem}.btn{--tw-shadow:0 1px 3px 0 rgba(0,0,0,0.1),0 1px 2px 0 rgba(0,0,0,0.06);border-radius:.25rem;border-width:1px;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);padding:.5rem .75rem;text-align:center}.btn-blue{background-color:rgba(37,99,235,var(--tw-bg-opacity));border-color:rgba(37,99,235,var(--tw-border-opacity))}.btn-blue,.btn-red{--tw-border-opacity:1;--tw-bg-opacity:1;--tw-text-opacity:1;color:rgba(255,255,255,var(--tw-text-opacity))}.btn-red{background-color:rgba(220,38,38,var(--tw-bg-opacity));border-color:rgba(220,38,38,var(--tw-border-opacity))}.pos-button-clicked{box-shadow:inset 0 0 5px 0 #a4a5a7}.ns-table{width:100%}.ns-table thead th{--tw-border-opacity:1;--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgba(229,231,235,var(--tw-bg-opacity));border-color:rgba(209,213,219,var(--tw-border-opacity));border-width:1px;color:rgba(55,65,81,var(--tw-text-opacity));padding:.5rem}.ns-table tbody td,.ns-table tfoot td{--tw-border-opacity:1;--tw-text-opacity:1;border-color:rgba(229,231,235,var(--tw-border-opacity));border-width:1px;color:rgba(55,65,81,var(--tw-text-opacity));padding:.5rem}.ns-table tbody>tr.info{--tw-bg-opacity:1;background-color:rgba(191,219,254,var(--tw-bg-opacity))}.ns-table tbody>tr.danger{--tw-bg-opacity:1;background-color:rgba(254,202,202,var(--tw-bg-opacity))}.ns-table tbody>tr.success{--tw-bg-opacity:1;background-color:rgba(167,243,208,var(--tw-bg-opacity))}.ns-table tbody>tr.green{--tw-bg-opacity:1;background-color:rgba(253,230,138,var(--tw-bg-opacity))}#editor h1{font-size:3rem;font-weight:700;line-height:1}#editor h2{font-size:2.25rem;font-weight:700;line-height:2.5rem}#editor h3{font-size:1.875rem;font-weight:700;line-height:2.25rem}#editor h4{font-size:1.5rem;font-weight:700;line-height:2rem}#editor h5{font-size:1.25rem;font-weight:700;line-height:1.75rem}#grid-items .vue-recycle-scroller__item-wrapper{display:grid;gap:0;grid-template-columns:repeat(2,minmax(0,1fr));overflow-y:auto}@media (min-width:768px){#grid-items .vue-recycle-scroller__item-wrapper{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width:1024px){#grid-items .vue-recycle-scroller__item-wrapper{grid-template-columns:repeat(4,minmax(0,1fr))}}@media (min-width:1280px){#grid-items .vue-recycle-scroller__item-wrapper{grid-template-columns:repeat(5,minmax(0,1fr))}}#grid-items .vue-recycle-scroller__item-view{--tw-border-opacity:1;align-items:center;border-color:rgba(229,231,235,var(--tw-border-opacity));border-width:1px;cursor:pointer;display:flex;flex-direction:column;height:8rem;justify-content:center;overflow:hidden}@media (min-width:1024px){#grid-items .vue-recycle-scroller__item-view{height:10rem}}#grid-items .vue-recycle-scroller__item-view:hover{--tw-bg-opacity:1;background-color:rgba(229,231,235,var(--tw-bg-opacity))}.popup-heading{align-items:center;display:flex;justify-content:space-between;padding:.5rem}.popup-heading h3{font-weight:600}@media (min-width:640px){.sm\:relative{position:relative!important}.sm\:mx-auto{margin-left:auto!important;margin-right:auto!important}.sm\:hidden{display:none!important}.sm\:h-108{height:27rem!important}.sm\:w-64{width:16rem!important}.sm\:rounded-lg{border-radius:.5rem!important}.sm\:text-sm{font-size:.875rem!important}.sm\:leading-5,.sm\:text-sm{line-height:1.25rem!important}}@media (min-width:768px){.md\:visible{visibility:visible!important}.md\:static{position:static!important}.md\:m-0{margin:0!important}.md\:mx-auto{margin-left:auto!important;margin-right:auto!important}.md\:-mx-2{margin-left:-.5rem!important;margin-right:-.5rem!important}.md\:-mx-4{margin-left:-1rem!important;margin-right:-1rem!important}.md\:my-0{margin-bottom:0!important;margin-top:0!important}.md\:my-2{margin-bottom:.5rem!important;margin-top:.5rem!important}.md\:mt-0{margin-top:0!important}.md\:mt-2{margin-top:.5rem!important}.md\:mb-0{margin-bottom:0!important}.md\:inline-block{display:inline-block!important}.md\:inline{display:inline!important}.md\:hidden{display:none!important}.md\:h-56{height:14rem!important}.md\:h-full{height:100%!important}.md\:h-6\/7-screen{height:85.71vh!important}.md\:h-5\/7-screen{height:71.42vh!important}.md\:h-5\/6-screen{height:83.33vh!important}.md\:h-4\/5-screen{height:80vh!important}.md\:h-3\/5-screen{height:60vh!important}.md\:h-2\/3-screen{height:66.66vh!important}.md\:h-half{height:50vh!important}.md\:w-16{width:4rem!important}.md\:w-24{width:6rem!important}.md\:w-56{width:14rem!important}.md\:w-72{width:18rem!important}.md\:w-auto{width:auto!important}.md\:w-1\/2{width:50%!important}.md\:w-1\/3{width:33.333333%!important}.md\:w-2\/3{width:66.666667%!important}.md\:w-2\/5{width:40%!important}.md\:w-3\/5{width:60%!important}.md\:w-full{width:100%!important}.md\:w-6\/7-screen{width:85.71vw!important}.md\:w-5\/7-screen{width:71.42vw!important}.md\:w-4\/7-screen{width:57.14vw!important}.md\:w-3\/7-screen{width:42.85vw!important}.md\:w-4\/6-screen{width:66.66vw!important}.md\:w-3\/6-screen{width:50vw!important}.md\:w-4\/5-screen{width:80vw!important}.md\:w-3\/5-screen{width:60vw!important}.md\:w-2\/5-screen{width:40vw!important}.md\:w-3\/4-screen{width:75vw!important}.md\:w-2\/4-screen{width:50vw!important}.md\:w-2\/3-screen{width:66.66vw!important}.md\:w-1\/3-screen{width:33.33vw!important}.md\:flex-auto{flex:1 1 auto!important}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))!important}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))!important}.md\:flex-row{flex-direction:row!important}.md\:flex-col{flex-direction:column!important}.md\:flex-nowrap{flex-wrap:nowrap!important}.md\:items-start{align-items:flex-start!important}.md\:justify-end{justify-content:flex-end!important}.md\:overflow-hidden{overflow:hidden!important}.md\:overflow-y-auto{overflow-y:auto!important}.md\:rounded-lg{border-radius:.5rem!important}.md\:border-l{border-left-width:1px!important}.md\:p-0{padding:0!important}.md\:px-4{padding-left:1rem!important;padding-right:1rem!important}.md\:py-4{padding-bottom:1rem!important;padding-top:1rem!important}.md\:text-base{font-size:1rem!important;line-height:1.5rem!important}.md\:text-3xl{font-size:1.875rem!important;line-height:2.25rem!important}.md\:text-4xl{font-size:2.25rem!important;line-height:2.5rem!important}}@media (min-width:1024px){.lg\:my-1{margin-bottom:.25rem!important;margin-top:.25rem!important}.lg\:my-8{margin-bottom:2rem!important;margin-top:2rem!important}.lg\:block{display:block!important}.lg\:flex{display:flex!important}.lg\:hidden{display:none!important}.lg\:h-full{height:100%!important}.lg\:h-5\/7-screen{height:71.42vh!important}.lg\:h-3\/7-screen{height:42.85vh!important}.lg\:h-5\/6-screen{height:83.33vh!important}.lg\:h-4\/5-screen{height:80vh!important}.lg\:h-2\/3-screen{height:66.66vh!important}.lg\:w-56{width:14rem!important}.lg\:w-auto{width:auto!important}.lg\:w-1\/2{width:50%!important}.lg\:w-1\/3{width:33.333333%!important}.lg\:w-2\/3{width:66.666667%!important}.lg\:w-1\/4{width:25%!important}.lg\:w-2\/4{width:50%!important}.lg\:w-2\/5{width:40%!important}.lg\:w-1\/6{width:16.666667%!important}.lg\:w-2\/6{width:33.333333%!important}.lg\:w-4\/6{width:66.666667%!important}.lg\:w-full{width:100%!important}.lg\:w-4\/7-screen{width:57.14vw!important}.lg\:w-3\/7-screen{width:42.85vw!important}.lg\:w-2\/7-screen{width:28.57vw!important}.lg\:w-4\/6-screen{width:66.66vw!important}.lg\:w-3\/6-screen{width:50vw!important}.lg\:w-2\/6-screen{width:33.33vw!important}.lg\:w-3\/5-screen{width:60vw!important}.lg\:w-2\/5-screen{width:40vw!important}.lg\:w-2\/4-screen{width:50vw!important}.lg\:w-2\/3-screen{width:66.66vw!important}.lg\:w-1\/3-screen{width:33.33vw!important}.lg\:w-half{width:50vw!important}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))!important}.lg\:flex-row{flex-direction:row!important}.lg\:items-start{align-items:flex-start!important}.lg\:border-t{border-top-width:1px!important}.lg\:border-b{border-bottom-width:1px!important}.lg\:px-0{padding-left:0!important;padding-right:0!important}.lg\:py-1{padding-bottom:.25rem!important;padding-top:.25rem!important}.lg\:text-lg{font-size:1.125rem!important}.lg\:text-lg,.lg\:text-xl{line-height:1.75rem!important}.lg\:text-xl{font-size:1.25rem!important}.lg\:text-2xl{font-size:1.5rem!important;line-height:2rem!important}.lg\:text-3xl{font-size:1.875rem!important;line-height:2.25rem!important}.lg\:text-5xl{font-size:3rem!important;line-height:1!important}}@media (min-width:1280px){.xl\:h-2\/5-screen{height:40vh!important}.xl\:w-108{width:27rem!important}.xl\:w-1\/2{width:50%!important}.xl\:w-1\/4{width:25%!important}.xl\:w-2\/4{width:50%!important}.xl\:w-2\/6-screen{width:33.33vw!important}.xl\:w-2\/5-screen{width:40vw!important}.xl\:w-1\/3-screen{width:33.33vw!important}.xl\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))!important}.xl\:border-none{border-style:none!important}.xl\:text-xl{font-size:1.25rem!important;line-height:1.75rem!important}}@media print{.print\:w-1\/2{width:50%!important}.print\:w-1\/3{width:33.333333%!important}} +/*! modern-normalize v1.1.0 | MIT License | https://github.com/sindresorhus/modern-normalize */html{-webkit-text-size-adjust:100%;line-height:1.15;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji;margin:0}hr{color:inherit;height:0}abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}legend{padding:0}progress{vertical-align:baseline}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}button{background-color:transparent;background-image:none}fieldset,ol,ul{margin:0;padding:0}ol,ul{list-style:none}html{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}body{font-family:inherit;line-height:inherit}*,:after,:before{border:0 solid;box-sizing:border-box}hr{border-top-width:1px}img{border-style:solid}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}table{border-collapse:collapse}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}button,input,optgroup,select,textarea{color:inherit;line-height:inherit;padding:0}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}*,:after,:before{--tw-border-opacity:1;border-color:rgba(229,231,235,var(--tw-border-opacity))}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.pointer-events-none{pointer-events:none!important}.visible{visibility:visible!important}.invisible{visibility:hidden!important}.static{position:static!important}.fixed{position:fixed!important}.absolute{position:absolute!important}.relative{position:relative!important}.inset-y-0{bottom:0!important}.inset-y-0,.top-0{top:0!important}.top-4{top:1rem!important}.-top-10{top:-5em!important}.right-4{right:1rem!important}.bottom-0{bottom:0!important}.left-0{left:0!important}.isolate{isolation:isolate!important}.z-10{z-index:10!important}.z-30{z-index:30!important}.z-40{z-index:40!important}.z-50{z-index:50!important}.col-span-2{grid-column:span 2/span 2!important}.col-span-3{grid-column:span 3/span 3!important}.m-1{margin:.25rem!important}.m-2{margin:.5rem!important}.m-4{margin:1rem!important}.-m-2{margin:-.5rem!important}.-m-3{margin:-.75rem!important}.-m-4{margin:-1rem!important}.mx-1{margin-left:.25rem!important;margin-right:.25rem!important}.mx-2{margin-left:.5rem!important;margin-right:.5rem!important}.mx-4{margin-left:1rem!important;margin-right:1rem!important}.mx-auto{margin-left:auto!important;margin-right:auto!important}.-mx-1{margin-left:-.25rem!important;margin-right:-.25rem!important}.-mx-2{margin-left:-.5rem!important;margin-right:-.5rem!important}.-mx-3{margin-left:-.75rem!important;margin-right:-.75rem!important}.-mx-4{margin-left:-1rem!important;margin-right:-1rem!important}.my-1{margin-bottom:.25rem!important;margin-top:.25rem!important}.my-2{margin-bottom:.5rem!important;margin-top:.5rem!important}.my-3{margin-bottom:.75rem!important;margin-top:.75rem!important}.my-4{margin-bottom:1rem!important;margin-top:1rem!important}.my-5{margin-bottom:1.25rem!important;margin-top:1.25rem!important}.-my-1{margin-bottom:-.25rem!important;margin-top:-.25rem!important}.-my-2{margin-bottom:-.5rem!important;margin-top:-.5rem!important}.mt-1{margin-top:.25rem!important}.mt-2{margin-top:.5rem!important}.mt-4{margin-top:1rem!important}.-mt-4{margin-top:-1rem!important}.-mt-8{margin-top:-2rem!important}.mr-1{margin-right:.25rem!important}.mr-2{margin-right:.5rem!important}.mb-1{margin-bottom:.25rem!important}.mb-2{margin-bottom:.5rem!important}.mb-3{margin-bottom:.75rem!important}.mb-4{margin-bottom:1rem!important}.mb-6{margin-bottom:1.5rem!important}.mb-8{margin-bottom:2rem!important}.-mb-2{margin-bottom:-.5rem!important}.-mb-6{margin-bottom:-1.5rem!important}.ml-1{margin-left:.25rem!important}.ml-2{margin-left:.5rem!important}.ml-3{margin-left:.75rem!important}.-ml-6{margin-left:-1.5rem!important}.-ml-32{margin-left:-8rem!important}.block{display:block!important}.inline-block{display:inline-block!important}.inline{display:inline!important}.flex{display:flex!important}.table{display:table!important}.grid{display:grid!important}.contents{display:contents!important}.hidden{display:none!important}.h-0{height:0!important}.h-6{height:1.5rem!important}.h-8{height:2rem!important}.h-10{height:2.5rem!important}.h-12{height:3rem!important}.h-14{height:3.5rem!important}.h-16{height:4rem!important}.h-20{height:5rem!important}.h-24{height:6rem!important}.h-28{height:7rem!important}.h-32{height:8rem!important}.h-36{height:9rem!important}.h-40{height:10rem!important}.h-44{height:11rem!important}.h-48{height:12rem!important}.h-52{height:13rem!important}.h-56{height:14rem!important}.h-64{height:16rem!important}.h-72{height:18rem!important}.h-84{height:21rem!important}.h-96{height:24rem!important}.h-120{height:30rem!important}.h-full{height:100%!important}.h-screen{height:100vh!important}.h-6\/7-screen{height:85.71vh!important}.h-5\/7-screen{height:71.42vh!important}.h-3\/5-screen{height:60vh!important}.h-2\/5-screen{height:40vh!important}.h-half{height:50vh!important}.h-95vh{height:95vh!important}.min-h-2\/5-screen{min-height:40vh!important}.w-0{width:0!important}.w-3{width:.75rem!important}.w-6{width:1.5rem!important}.w-8{width:2rem!important}.w-10{width:2.5rem!important}.w-12{width:3rem!important}.w-14{width:3.5rem!important}.w-16{width:4rem!important}.w-24{width:6rem!important}.w-28{width:7rem!important}.w-32{width:8rem!important}.w-36{width:9rem!important}.w-40{width:10rem!important}.w-48{width:12rem!important}.w-56{width:14rem!important}.w-64{width:16rem!important}.w-72{width:18rem!important}.w-1\/2{width:50%!important}.w-1\/3{width:33.333333%!important}.w-1\/4{width:25%!important}.w-3\/4{width:75%!important}.w-3\/5{width:60%!important}.w-1\/6{width:16.666667%!important}.w-11\/12{width:91.666667%!important}.w-full{width:100%!important}.w-screen{width:100vw!important}.w-6\/7-screen{width:85.71vw!important}.w-5\/7-screen{width:71.42vw!important}.w-4\/5-screen{width:80vw!important}.w-3\/4-screen{width:75vw!important}.w-2\/3-screen{width:66.66vw!important}.w-95vw{width:95vw!important}.flex-auto{flex:1 1 auto!important}.flex-shrink-0{flex-shrink:0!important}.origin-bottom-right{transform-origin:bottom right!important}.transform{--tw-translate-x:0!important;--tw-translate-y:0!important;--tw-rotate:0!important;--tw-skew-x:0!important;--tw-skew-y:0!important;--tw-scale-x:1!important;--tw-scale-y:1!important;transform:translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}@-webkit-keyframes spin{to{transform:rotate(1turn)}}@keyframes spin{to{transform:rotate(1turn)}}@-webkit-keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@-webkit-keyframes pulse{50%{opacity:.5}}@keyframes pulse{50%{opacity:.5}}@-webkit-keyframes bounce{0%,to{-webkit-animation-timing-function:cubic-bezier(.8,0,1,1);animation-timing-function:cubic-bezier(.8,0,1,1);transform:translateY(-25%)}50%{-webkit-animation-timing-function:cubic-bezier(0,0,.2,1);animation-timing-function:cubic-bezier(0,0,.2,1);transform:none}}@keyframes bounce{0%,to{-webkit-animation-timing-function:cubic-bezier(.8,0,1,1);animation-timing-function:cubic-bezier(.8,0,1,1);transform:translateY(-25%)}50%{-webkit-animation-timing-function:cubic-bezier(0,0,.2,1);animation-timing-function:cubic-bezier(0,0,.2,1);transform:none}}.animate-spin{-webkit-animation:spin 1s linear infinite!important;animation:spin 1s linear infinite!important}.cursor-pointer{cursor:pointer!important}.cursor-not-allowed{cursor:not-allowed!important}.resize{resize:both!important}.grid-flow-row{grid-auto-flow:row!important}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))!important}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))!important}.grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))!important}.grid-rows-1{grid-template-rows:repeat(1,minmax(0,1fr))!important}.grid-rows-2{grid-template-rows:repeat(2,minmax(0,1fr))!important}.grid-rows-3{grid-template-rows:repeat(3,minmax(0,1fr))!important}.flex-row{flex-direction:row!important}.flex-row-reverse{flex-direction:row-reverse!important}.flex-col{flex-direction:column!important}.flex-col-reverse{flex-direction:column-reverse!important}.flex-wrap{flex-wrap:wrap!important}.items-start{align-items:flex-start!important}.items-end{align-items:flex-end!important}.items-center{align-items:center!important}.justify-start{justify-content:flex-start!important}.justify-end{justify-content:flex-end!important}.justify-center{justify-content:center!important}.justify-between{justify-content:space-between!important}.gap-0{gap:0!important}.gap-2{gap:.5rem!important}.divide-y-4>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0!important;border-bottom-width:calc(4px*var(--tw-divide-y-reverse))!important;border-top-width:calc(4px*(1 - var(--tw-divide-y-reverse)))!important}.overflow-auto{overflow:auto!important}.overflow-hidden{overflow:hidden!important}.overflow-scroll{overflow:scroll!important}.overflow-x-auto{overflow-x:auto!important}.overflow-y-auto{overflow-y:auto!important}.overflow-y-hidden{overflow-y:hidden!important}.overflow-y-scroll{overflow-y:scroll!important}.truncate{overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}.whitespace-pre-wrap{white-space:pre-wrap!important}.rounded{border-radius:.25rem!important}.rounded-md{border-radius:.375rem!important}.rounded-lg{border-radius:.5rem!important}.rounded-full{border-radius:9999px!important}.rounded-t-lg{border-top-left-radius:.5rem!important;border-top-right-radius:.5rem!important}.rounded-tl{border-top-left-radius:.25rem!important}.rounded-tl-lg{border-top-left-radius:.5rem!important}.rounded-tr{border-top-right-radius:.25rem!important}.rounded-tr-lg{border-top-right-radius:.5rem!important}.rounded-br-lg{border-bottom-right-radius:.5rem!important}.rounded-bl-lg{border-bottom-left-radius:.5rem!important}.border-0{border-width:0!important}.border-2{border-width:2px!important}.border-4{border-width:4px!important}.border{border-width:1px!important}.border-t-0{border-top-width:0!important}.border-t-2{border-top-width:2px!important}.border-t{border-top-width:1px!important}.border-r-0{border-right-width:0!important}.border-r-2{border-right-width:2px!important}.border-r{border-right-width:1px!important}.border-b-0{border-bottom-width:0!important}.border-b-2{border-bottom-width:2px!important}.border-b{border-bottom-width:1px!important}.border-l-0{border-left-width:0!important}.border-l-2{border-left-width:2px!important}.border-l-4{border-left-width:4px!important}.border-l-8{border-left-width:8px!important}.border-l{border-left-width:1px!important}.border-dashed{border-style:dashed!important}.border-transparent{border-color:transparent!important}.border-black{border-color:rgba(0,0,0,var(--tw-border-opacity))!important}.border-black,.border-white{--tw-border-opacity:1!important}.border-white{border-color:rgba(255,255,255,var(--tw-border-opacity))!important}.border-gray-100{--tw-border-opacity:1!important;border-color:rgba(243,244,246,var(--tw-border-opacity))!important}.border-gray-200{--tw-border-opacity:1!important;border-color:rgba(229,231,235,var(--tw-border-opacity))!important}.border-gray-300{--tw-border-opacity:1!important;border-color:rgba(209,213,219,var(--tw-border-opacity))!important}.border-gray-400{--tw-border-opacity:1!important;border-color:rgba(156,163,175,var(--tw-border-opacity))!important}.border-gray-500{--tw-border-opacity:1!important;border-color:rgba(107,114,128,var(--tw-border-opacity))!important}.border-gray-600{--tw-border-opacity:1!important;border-color:rgba(75,85,99,var(--tw-border-opacity))!important}.border-gray-700{--tw-border-opacity:1!important;border-color:rgba(55,65,81,var(--tw-border-opacity))!important}.border-gray-800{--tw-border-opacity:1!important;border-color:rgba(31,41,55,var(--tw-border-opacity))!important}.border-red-200{--tw-border-opacity:1!important;border-color:rgba(254,202,202,var(--tw-border-opacity))!important}.border-red-300{--tw-border-opacity:1!important;border-color:rgba(252,165,165,var(--tw-border-opacity))!important}.border-red-400{--tw-border-opacity:1!important;border-color:rgba(248,113,113,var(--tw-border-opacity))!important}.border-red-500{--tw-border-opacity:1!important;border-color:rgba(239,68,68,var(--tw-border-opacity))!important}.border-red-600{--tw-border-opacity:1!important;border-color:rgba(220,38,38,var(--tw-border-opacity))!important}.border-green-200{--tw-border-opacity:1!important;border-color:rgba(167,243,208,var(--tw-border-opacity))!important}.border-green-400{--tw-border-opacity:1!important;border-color:rgba(52,211,153,var(--tw-border-opacity))!important}.border-green-600{--tw-border-opacity:1!important;border-color:rgba(5,150,105,var(--tw-border-opacity))!important}.border-blue-200{--tw-border-opacity:1!important;border-color:rgba(191,219,254,var(--tw-border-opacity))!important}.border-blue-300{--tw-border-opacity:1!important;border-color:rgba(147,197,253,var(--tw-border-opacity))!important}.border-blue-400{--tw-border-opacity:1!important;border-color:rgba(96,165,250,var(--tw-border-opacity))!important}.border-blue-500{--tw-border-opacity:1!important;border-color:rgba(59,130,246,var(--tw-border-opacity))!important}.border-blue-600{--tw-border-opacity:1!important;border-color:rgba(37,99,235,var(--tw-border-opacity))!important}.border-blue-800{--tw-border-opacity:1!important;border-color:rgba(30,64,175,var(--tw-border-opacity))!important}.border-indigo-200{--tw-border-opacity:1!important;border-color:rgba(199,210,254,var(--tw-border-opacity))!important}.border-indigo-400{--tw-border-opacity:1!important;border-color:rgba(129,140,248,var(--tw-border-opacity))!important}.border-purple-300{--tw-border-opacity:1!important;border-color:rgba(196,181,253,var(--tw-border-opacity))!important}.border-teal-200{--tw-border-opacity:1!important;border-color:rgba(153,246,228,var(--tw-border-opacity))!important}.border-orange-300{--tw-border-opacity:1!important;border-color:rgba(253,186,116,var(--tw-border-opacity))!important}.hover\:border-transparent:hover{border-color:transparent!important}.hover\:border-red-400:hover{--tw-border-opacity:1!important;border-color:rgba(248,113,113,var(--tw-border-opacity))!important}.hover\:border-red-500:hover{--tw-border-opacity:1!important;border-color:rgba(239,68,68,var(--tw-border-opacity))!important}.hover\:border-red-600:hover{--tw-border-opacity:1!important;border-color:rgba(220,38,38,var(--tw-border-opacity))!important}.hover\:border-green-500:hover{--tw-border-opacity:1!important;border-color:rgba(16,185,129,var(--tw-border-opacity))!important}.hover\:border-green-600:hover{--tw-border-opacity:1!important;border-color:rgba(5,150,105,var(--tw-border-opacity))!important}.hover\:border-blue-400:hover{--tw-border-opacity:1!important;border-color:rgba(96,165,250,var(--tw-border-opacity))!important}.hover\:border-blue-500:hover{--tw-border-opacity:1!important;border-color:rgba(59,130,246,var(--tw-border-opacity))!important}.hover\:border-blue-600:hover{--tw-border-opacity:1!important;border-color:rgba(37,99,235,var(--tw-border-opacity))!important}.hover\:border-teal-500:hover{--tw-border-opacity:1!important;border-color:rgba(20,184,166,var(--tw-border-opacity))!important}.focus\:border-blue-400:focus{--tw-border-opacity:1!important;border-color:rgba(96,165,250,var(--tw-border-opacity))!important}.hover\:border-opacity-0:hover{--tw-border-opacity:0!important}.bg-transparent{background-color:transparent!important}.bg-black{background-color:rgba(0,0,0,var(--tw-bg-opacity))!important}.bg-black,.bg-white{--tw-bg-opacity:1!important}.bg-white{background-color:rgba(255,255,255,var(--tw-bg-opacity))!important}.bg-gray-50{background-color:rgba(249,250,251,var(--tw-bg-opacity))!important}.bg-gray-50,.bg-gray-100{--tw-bg-opacity:1!important}.bg-gray-100{background-color:rgba(243,244,246,var(--tw-bg-opacity))!important}.bg-gray-200{background-color:rgba(229,231,235,var(--tw-bg-opacity))!important}.bg-gray-200,.bg-gray-300{--tw-bg-opacity:1!important}.bg-gray-300{background-color:rgba(209,213,219,var(--tw-bg-opacity))!important}.bg-gray-400{background-color:rgba(156,163,175,var(--tw-bg-opacity))!important}.bg-gray-400,.bg-gray-500{--tw-bg-opacity:1!important}.bg-gray-500{background-color:rgba(107,114,128,var(--tw-bg-opacity))!important}.bg-gray-600{background-color:rgba(75,85,99,var(--tw-bg-opacity))!important}.bg-gray-600,.bg-gray-700{--tw-bg-opacity:1!important}.bg-gray-700{background-color:rgba(55,65,81,var(--tw-bg-opacity))!important}.bg-gray-800{background-color:rgba(31,41,55,var(--tw-bg-opacity))!important}.bg-gray-800,.bg-gray-900{--tw-bg-opacity:1!important}.bg-gray-900{background-color:rgba(17,24,39,var(--tw-bg-opacity))!important}.bg-red-50{background-color:rgba(254,242,242,var(--tw-bg-opacity))!important}.bg-red-50,.bg-red-100{--tw-bg-opacity:1!important}.bg-red-100{background-color:rgba(254,226,226,var(--tw-bg-opacity))!important}.bg-red-200{background-color:rgba(254,202,202,var(--tw-bg-opacity))!important}.bg-red-200,.bg-red-400{--tw-bg-opacity:1!important}.bg-red-400{background-color:rgba(248,113,113,var(--tw-bg-opacity))!important}.bg-red-500{background-color:rgba(239,68,68,var(--tw-bg-opacity))!important}.bg-red-500,.bg-red-600{--tw-bg-opacity:1!important}.bg-red-600{background-color:rgba(220,38,38,var(--tw-bg-opacity))!important}.bg-yellow-100{--tw-bg-opacity:1!important;background-color:rgba(254,243,199,var(--tw-bg-opacity))!important}.bg-yellow-200{--tw-bg-opacity:1!important;background-color:rgba(253,230,138,var(--tw-bg-opacity))!important}.bg-yellow-400{--tw-bg-opacity:1!important;background-color:rgba(251,191,36,var(--tw-bg-opacity))!important}.bg-yellow-500{--tw-bg-opacity:1!important;background-color:rgba(245,158,11,var(--tw-bg-opacity))!important}.bg-green-50{background-color:rgba(236,253,245,var(--tw-bg-opacity))!important}.bg-green-50,.bg-green-100{--tw-bg-opacity:1!important}.bg-green-100{background-color:rgba(209,250,229,var(--tw-bg-opacity))!important}.bg-green-200{--tw-bg-opacity:1!important;background-color:rgba(167,243,208,var(--tw-bg-opacity))!important}.bg-green-400{--tw-bg-opacity:1!important;background-color:rgba(52,211,153,var(--tw-bg-opacity))!important}.bg-green-500{background-color:rgba(16,185,129,var(--tw-bg-opacity))!important}.bg-blue-50,.bg-green-500{--tw-bg-opacity:1!important}.bg-blue-50{background-color:rgba(239,246,255,var(--tw-bg-opacity))!important}.bg-blue-100{background-color:rgba(219,234,254,var(--tw-bg-opacity))!important}.bg-blue-100,.bg-blue-200{--tw-bg-opacity:1!important}.bg-blue-200{background-color:rgba(191,219,254,var(--tw-bg-opacity))!important}.bg-blue-300{background-color:rgba(147,197,253,var(--tw-bg-opacity))!important}.bg-blue-300,.bg-blue-400{--tw-bg-opacity:1!important}.bg-blue-400{background-color:rgba(96,165,250,var(--tw-bg-opacity))!important}.bg-blue-500{background-color:rgba(59,130,246,var(--tw-bg-opacity))!important}.bg-blue-500,.bg-blue-800{--tw-bg-opacity:1!important}.bg-blue-800{background-color:rgba(30,64,175,var(--tw-bg-opacity))!important}.bg-indigo-100{--tw-bg-opacity:1!important;background-color:rgba(224,231,255,var(--tw-bg-opacity))!important}.bg-indigo-400{--tw-bg-opacity:1!important;background-color:rgba(129,140,248,var(--tw-bg-opacity))!important}.bg-purple-200{--tw-bg-opacity:1!important;background-color:rgba(221,214,254,var(--tw-bg-opacity))!important}.bg-purple-400{--tw-bg-opacity:1!important;background-color:rgba(167,139,250,var(--tw-bg-opacity))!important}.bg-teal-100{background-color:rgba(204,251,241,var(--tw-bg-opacity))!important}.bg-teal-100,.bg-teal-200{--tw-bg-opacity:1!important}.bg-teal-200{background-color:rgba(153,246,228,var(--tw-bg-opacity))!important}.bg-teal-400{background-color:rgba(45,212,191,var(--tw-bg-opacity))!important}.bg-teal-400,.bg-teal-500{--tw-bg-opacity:1!important}.bg-teal-500{background-color:rgba(20,184,166,var(--tw-bg-opacity))!important}.bg-orange-200{--tw-bg-opacity:1!important;background-color:rgba(254,215,170,var(--tw-bg-opacity))!important}.bg-orange-400{--tw-bg-opacity:1!important;background-color:rgba(251,146,60,var(--tw-bg-opacity))!important}.hover\:bg-white:hover{--tw-bg-opacity:1!important;background-color:rgba(255,255,255,var(--tw-bg-opacity))!important}.hover\:bg-gray-100:hover{--tw-bg-opacity:1!important;background-color:rgba(243,244,246,var(--tw-bg-opacity))!important}.hover\:bg-gray-200:hover{--tw-bg-opacity:1!important;background-color:rgba(229,231,235,var(--tw-bg-opacity))!important}.hover\:bg-gray-300:hover{--tw-bg-opacity:1!important;background-color:rgba(209,213,219,var(--tw-bg-opacity))!important}.hover\:bg-gray-400:hover{--tw-bg-opacity:1!important;background-color:rgba(156,163,175,var(--tw-bg-opacity))!important}.hover\:bg-gray-700:hover{--tw-bg-opacity:1!important;background-color:rgba(55,65,81,var(--tw-bg-opacity))!important}.hover\:bg-red-100:hover{--tw-bg-opacity:1!important;background-color:rgba(254,226,226,var(--tw-bg-opacity))!important}.hover\:bg-red-200:hover{--tw-bg-opacity:1!important;background-color:rgba(254,202,202,var(--tw-bg-opacity))!important}.hover\:bg-red-400:hover{--tw-bg-opacity:1!important;background-color:rgba(248,113,113,var(--tw-bg-opacity))!important}.hover\:bg-red-500:hover{--tw-bg-opacity:1!important;background-color:rgba(239,68,68,var(--tw-bg-opacity))!important}.hover\:bg-red-600:hover{--tw-bg-opacity:1!important;background-color:rgba(220,38,38,var(--tw-bg-opacity))!important}.hover\:bg-green-100:hover{--tw-bg-opacity:1!important;background-color:rgba(209,250,229,var(--tw-bg-opacity))!important}.hover\:bg-green-500:hover{--tw-bg-opacity:1!important;background-color:rgba(16,185,129,var(--tw-bg-opacity))!important}.hover\:bg-green-600:hover{--tw-bg-opacity:1!important;background-color:rgba(5,150,105,var(--tw-bg-opacity))!important}.hover\:bg-blue-50:hover{--tw-bg-opacity:1!important;background-color:rgba(239,246,255,var(--tw-bg-opacity))!important}.hover\:bg-blue-100:hover{--tw-bg-opacity:1!important;background-color:rgba(219,234,254,var(--tw-bg-opacity))!important}.hover\:bg-blue-200:hover{--tw-bg-opacity:1!important;background-color:rgba(191,219,254,var(--tw-bg-opacity))!important}.hover\:bg-blue-400:hover{--tw-bg-opacity:1!important;background-color:rgba(96,165,250,var(--tw-bg-opacity))!important}.hover\:bg-blue-500:hover{--tw-bg-opacity:1!important;background-color:rgba(59,130,246,var(--tw-bg-opacity))!important}.hover\:bg-blue-600:hover{--tw-bg-opacity:1!important;background-color:rgba(37,99,235,var(--tw-bg-opacity))!important}.hover\:bg-indigo-100:hover{--tw-bg-opacity:1!important;background-color:rgba(224,231,255,var(--tw-bg-opacity))!important}.hover\:bg-teal-100:hover{--tw-bg-opacity:1!important;background-color:rgba(204,251,241,var(--tw-bg-opacity))!important}.hover\:bg-teal-500:hover{--tw-bg-opacity:1!important;background-color:rgba(20,184,166,var(--tw-bg-opacity))!important}.focus\:bg-gray-100:focus{--tw-bg-opacity:1!important;background-color:rgba(243,244,246,var(--tw-bg-opacity))!important}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))!important}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))!important}.bg-gradient-to-bl{background-image:linear-gradient(to bottom left,var(--tw-gradient-stops))!important}.from-red-300{--tw-gradient-from:#fca5a5!important;--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to,hsla(0,94%,82%,0))!important}.from-red-400{--tw-gradient-from:#f87171!important;--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to,hsla(0,91%,71%,0))!important}.from-red-500{--tw-gradient-from:#ef4444!important;--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to,rgba(239,68,68,0))!important}.from-green-400{--tw-gradient-from:#34d399!important;--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to,rgba(52,211,153,0))!important}.from-blue-200{--tw-gradient-from:#bfdbfe!important;--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to,rgba(191,219,254,0))!important}.from-blue-400{--tw-gradient-from:#60a5fa!important;--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to,rgba(96,165,250,0))!important}.from-blue-500{--tw-gradient-from:#3b82f6!important;--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to,rgba(59,130,246,0))!important}.from-indigo-400{--tw-gradient-from:#818cf8!important;--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to,rgba(129,140,248,0))!important}.from-purple-400{--tw-gradient-from:#a78bfa!important;--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to,rgba(167,139,250,0))!important}.from-purple-500{--tw-gradient-from:#8b5cf6!important;--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to,rgba(139,92,246,0))!important}.from-pink-400{--tw-gradient-from:#f472b6!important;--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to,rgba(244,114,182,0))!important}.from-teal-500{--tw-gradient-from:#14b8a6!important;--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to,rgba(20,184,166,0))!important}.via-red-400{--tw-gradient-stops:var(--tw-gradient-from),#f87171,var(--tw-gradient-to,hsla(0,91%,71%,0))!important}.to-red-500{--tw-gradient-to:#ef4444!important}.to-red-600{--tw-gradient-to:#dc2626!important}.to-red-700{--tw-gradient-to:#b91c1c!important}.to-green-600{--tw-gradient-to:#059669!important}.to-green-700{--tw-gradient-to:#047857!important}.to-blue-400{--tw-gradient-to:#60a5fa!important}.to-blue-500{--tw-gradient-to:#3b82f6!important}.to-blue-600{--tw-gradient-to:#2563eb!important}.to-blue-700{--tw-gradient-to:#1d4ed8!important}.to-indigo-400{--tw-gradient-to:#818cf8!important}.to-indigo-500{--tw-gradient-to:#6366f1!important}.to-indigo-600{--tw-gradient-to:#4f46e5!important}.to-purple-600{--tw-gradient-to:#7c3aed!important}.to-pink-500{--tw-gradient-to:#ec4899!important}.to-teal-500{--tw-gradient-to:#14b8a6!important}.bg-clip-text{-webkit-background-clip:text!important;background-clip:text!important}.object-contain{-o-object-fit:contain!important;object-fit:contain!important}.object-cover{-o-object-fit:cover!important;object-fit:cover!important}.p-0{padding:0!important}.p-1{padding:.25rem!important}.p-2{padding:.5rem!important}.p-3{padding:.75rem!important}.p-4{padding:1rem!important}.p-8{padding:2rem!important}.p-10{padding:2.5rem!important}.px-1{padding-left:.25rem!important;padding-right:.25rem!important}.px-2{padding-left:.5rem!important;padding-right:.5rem!important}.px-3{padding-left:.75rem!important;padding-right:.75rem!important}.px-4{padding-left:1rem!important;padding-right:1rem!important}.py-1{padding-bottom:.25rem!important;padding-top:.25rem!important}.py-2{padding-bottom:.5rem!important;padding-top:.5rem!important}.py-3{padding-bottom:.75rem!important;padding-top:.75rem!important}.py-4{padding-bottom:1rem!important;padding-top:1rem!important}.py-5{padding-bottom:1.25rem!important;padding-top:1.25rem!important}.py-6{padding-bottom:1.5rem!important;padding-top:1.5rem!important}.py-10{padding-bottom:2.5rem!important;padding-top:2.5rem!important}.pt-2{padding-top:.5rem!important}.pt-6{padding-top:1.5rem!important}.pr-1{padding-right:.25rem!important}.pr-2{padding-right:.5rem!important}.pr-8{padding-right:2rem!important}.pr-12{padding-right:3rem!important}.pb-1{padding-bottom:.25rem!important}.pb-2{padding-bottom:.5rem!important}.pb-4{padding-bottom:1rem!important}.pb-10{padding-bottom:2.5rem!important}.pl-1{padding-left:.25rem!important}.pl-2{padding-left:.5rem!important}.pl-3{padding-left:.75rem!important}.pl-7{padding-left:1.75rem!important}.pl-8{padding-left:2rem!important}.text-left{text-align:left!important}.text-center{text-align:center!important}.text-right{text-align:right!important}.text-justify{text-align:justify!important}.font-body{font-family:Graphik,sans-serif!important}.text-xs{font-size:.75rem!important;line-height:1rem!important}.text-sm{font-size:.875rem!important;line-height:1.25rem!important}.text-lg{font-size:1.125rem!important}.text-lg,.text-xl{line-height:1.75rem!important}.text-xl{font-size:1.25rem!important}.text-2xl{font-size:1.5rem!important;line-height:2rem!important}.text-3xl{font-size:1.875rem!important;line-height:2.25rem!important}.text-4xl{font-size:2.25rem!important;line-height:2.5rem!important}.text-5xl{font-size:3rem!important}.text-5xl,.text-6xl{line-height:1!important}.text-6xl{font-size:3.75rem!important}.text-8xl{font-size:6rem!important}.text-8xl,.text-9xl{line-height:1!important}.text-9xl{font-size:8rem!important}.font-medium{font-weight:500!important}.font-semibold{font-weight:600!important}.font-bold{font-weight:700!important}.font-black{font-weight:900!important}.uppercase{text-transform:uppercase!important}.lowercase{text-transform:lowercase!important}.italic{font-style:italic!important}.ordinal{--tw-ordinal:var(--tw-empty,/*!*/ /*!*/)!important;--tw-slashed-zero:var(--tw-empty,/*!*/ /*!*/)!important;--tw-numeric-figure:var(--tw-empty,/*!*/ /*!*/)!important;--tw-numeric-spacing:var(--tw-empty,/*!*/ /*!*/)!important;--tw-numeric-fraction:var(--tw-empty,/*!*/ /*!*/)!important;--tw-ordinal:ordinal!important;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)!important}.leading-5{line-height:1.25rem!important}.text-transparent{color:transparent!important}.text-white{color:rgba(255,255,255,var(--tw-text-opacity))!important}.text-gray-100,.text-white{--tw-text-opacity:1!important}.text-gray-100{color:rgba(243,244,246,var(--tw-text-opacity))!important}.text-gray-200{--tw-text-opacity:1!important;color:rgba(229,231,235,var(--tw-text-opacity))!important}.text-gray-300{--tw-text-opacity:1!important;color:rgba(209,213,219,var(--tw-text-opacity))!important}.text-gray-400{--tw-text-opacity:1!important;color:rgba(156,163,175,var(--tw-text-opacity))!important}.text-gray-500{--tw-text-opacity:1!important;color:rgba(107,114,128,var(--tw-text-opacity))!important}.text-gray-600{--tw-text-opacity:1!important;color:rgba(75,85,99,var(--tw-text-opacity))!important}.text-gray-700{--tw-text-opacity:1!important;color:rgba(55,65,81,var(--tw-text-opacity))!important}.text-gray-800{--tw-text-opacity:1!important;color:rgba(31,41,55,var(--tw-text-opacity))!important}.text-gray-900{color:rgba(17,24,39,var(--tw-text-opacity))!important}.text-gray-900,.text-red-400{--tw-text-opacity:1!important}.text-red-400{color:rgba(248,113,113,var(--tw-text-opacity))!important}.text-red-500{color:rgba(239,68,68,var(--tw-text-opacity))!important}.text-red-500,.text-red-600{--tw-text-opacity:1!important}.text-red-600{color:rgba(220,38,38,var(--tw-text-opacity))!important}.text-red-700{color:rgba(185,28,28,var(--tw-text-opacity))!important}.text-red-700,.text-red-800{--tw-text-opacity:1!important}.text-red-800{color:rgba(153,27,27,var(--tw-text-opacity))!important}.text-green-500{--tw-text-opacity:1!important;color:rgba(16,185,129,var(--tw-text-opacity))!important}.text-green-600{--tw-text-opacity:1!important;color:rgba(5,150,105,var(--tw-text-opacity))!important}.text-green-700{--tw-text-opacity:1!important;color:rgba(4,120,87,var(--tw-text-opacity))!important}.text-blue-500{--tw-text-opacity:1!important;color:rgba(59,130,246,var(--tw-text-opacity))!important}.text-blue-600{--tw-text-opacity:1!important;color:rgba(37,99,235,var(--tw-text-opacity))!important}.text-blue-700{--tw-text-opacity:1!important;color:rgba(29,78,216,var(--tw-text-opacity))!important}.hover\:text-white:hover{--tw-text-opacity:1!important;color:rgba(255,255,255,var(--tw-text-opacity))!important}.hover\:text-gray-700:hover{--tw-text-opacity:1!important;color:rgba(55,65,81,var(--tw-text-opacity))!important}.hover\:text-gray-800:hover{--tw-text-opacity:1!important;color:rgba(31,41,55,var(--tw-text-opacity))!important}.hover\:text-gray-900:hover{--tw-text-opacity:1!important;color:rgba(17,24,39,var(--tw-text-opacity))!important}.hover\:text-red-400:hover{--tw-text-opacity:1!important;color:rgba(248,113,113,var(--tw-text-opacity))!important}.hover\:text-red-500:hover{--tw-text-opacity:1!important;color:rgba(239,68,68,var(--tw-text-opacity))!important}.hover\:text-green-700:hover{--tw-text-opacity:1!important;color:rgba(4,120,87,var(--tw-text-opacity))!important}.hover\:text-blue-400:hover{--tw-text-opacity:1!important;color:rgba(96,165,250,var(--tw-text-opacity))!important}.hover\:text-blue-600:hover{--tw-text-opacity:1!important;color:rgba(37,99,235,var(--tw-text-opacity))!important}.focus\:text-gray-900:focus{--tw-text-opacity:1!important;color:rgba(17,24,39,var(--tw-text-opacity))!important}.hover\:underline:hover,.underline{text-decoration:underline!important}.opacity-0{opacity:0!important}*,:after,:before{--tw-shadow:0 0 #0000}.shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,0.05)!important}.shadow,.shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,0.1),0 1px 2px 0 rgba(0,0,0,0.06)!important}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,0.1),0 4px 6px -2px rgba(0,0,0,0.05)!important}.shadow-lg,.shadow-xl{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}.shadow-xl{--tw-shadow:0 20px 25px -5px rgba(0,0,0,0.1),0 10px 10px -5px rgba(0,0,0,0.04)!important}.shadow-inner{--tw-shadow:inset 0 2px 4px 0 rgba(0,0,0,0.06)!important}.hover\:shadow-lg:hover,.shadow-inner{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}.hover\:shadow-lg:hover{--tw-shadow:0 10px 15px -3px rgba(0,0,0,0.1),0 4px 6px -2px rgba(0,0,0,0.05)!important}.hover\:shadow-none:hover{--tw-shadow:0 0 #0000!important}.focus\:shadow-sm:focus,.hover\:shadow-none:hover{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}.focus\:shadow-sm:focus{--tw-shadow:0 1px 2px 0 rgba(0,0,0,0.05)!important}.focus\:outline-none:focus,.outline-none{outline:2px solid transparent!important;outline-offset:2px!important}*,:after,:before{--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000}.ring-4{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)!important;--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color)!important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)!important}.ring-blue-500{--tw-ring-opacity:1!important;--tw-ring-color:rgba(59,130,246,var(--tw-ring-opacity))!important}.ring-opacity-50{--tw-ring-opacity:0.5!important}.filter{--tw-blur:var(--tw-empty,/*!*/ /*!*/)!important;--tw-brightness:var(--tw-empty,/*!*/ /*!*/)!important;--tw-contrast:var(--tw-empty,/*!*/ /*!*/)!important;--tw-grayscale:var(--tw-empty,/*!*/ /*!*/)!important;--tw-hue-rotate:var(--tw-empty,/*!*/ /*!*/)!important;--tw-invert:var(--tw-empty,/*!*/ /*!*/)!important;--tw-saturate:var(--tw-empty,/*!*/ /*!*/)!important;--tw-sepia:var(--tw-empty,/*!*/ /*!*/)!important;--tw-drop-shadow:var(--tw-empty,/*!*/ /*!*/)!important;filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}.blur{--tw-blur:blur(8px)!important}.grayscale{--tw-grayscale:grayscale(100%)!important}.invert{--tw-invert:invert(100%)!important}.transition-all{transition-duration:.15s!important;transition-property:all!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.transition{transition-duration:.15s!important;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter!important;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter!important;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.duration-100{transition-duration:.1s!important}.ease-linear{transition-timing-function:linear!important}@-webkit-keyframes ZoomOutEntrance{0%{opacity:0;transform:scale(1.1)}to{opacity:1;transform:scale(1)}}@keyframes ZoomOutEntrance{0%{opacity:0;transform:scale(1.1)}to{opacity:1;transform:scale(1)}}@-webkit-keyframes ZoomInEntrance{0%{opacity:0;transform:scale(.9)}to{opacity:1;transform:scale(1)}}@keyframes ZoomInEntrance{0%{opacity:0;transform:scale(.9)}to{opacity:1;transform:scale(1)}}@-webkit-keyframes ZoomOutExit{0%{opacity:0;transform:scale(1)}to{opacity:1;transform:scale(.9)}}@keyframes ZoomOutExit{0%{opacity:0;transform:scale(1)}to{opacity:1;transform:scale(.9)}}@-webkit-keyframes ZoomInExit{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(1.1)}}@keyframes ZoomInExit{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(1.1)}}@-webkit-keyframes FadeInEntrance{0%{opacity:0}70%{opacity:.5}to{opacity:1}}@keyframes FadeInEntrance{0%{opacity:0}70%{opacity:.5}to{opacity:1}}@-webkit-keyframes FadeOutExit{0%{opacity:1}70%{opacity:.5}to{opacity:0}}@keyframes FadeOutExit{0%{opacity:1}70%{opacity:.5}to{opacity:0}}.zoom-out-entrance{-webkit-animation:ZoomOutEntrance .5s;animation:ZoomOutEntrance .5s}.zoom-in-entrance{-webkit-animation:ZoomInEntrance;animation:ZoomInEntrance}.zoom-in-exit{-webkit-animation:ZoomInExit .3s;animation:ZoomInExit .3s}.zoom-out-exit{-webkit-animation:ZoomOutExit;animation:ZoomOutExit}.fade-in-entrance{-webkit-animation:FadeInEntrance;animation:FadeInEntrance}.fade-out-exit{-webkit-animation:FadeOutExit;animation:FadeOutExit}.anim-duration-100{-webkit-animation-duration:.1s;animation-duration:.1s}.anim-duration-101{-webkit-animation-duration:101ms;animation-duration:101ms}.anim-duration-102{-webkit-animation-duration:102ms;animation-duration:102ms}.anim-duration-103{-webkit-animation-duration:103ms;animation-duration:103ms}.anim-duration-104{-webkit-animation-duration:104ms;animation-duration:104ms}.anim-duration-105{-webkit-animation-duration:105ms;animation-duration:105ms}.anim-duration-106{-webkit-animation-duration:106ms;animation-duration:106ms}.anim-duration-107{-webkit-animation-duration:107ms;animation-duration:107ms}.anim-duration-108{-webkit-animation-duration:108ms;animation-duration:108ms}.anim-duration-109{-webkit-animation-duration:109ms;animation-duration:109ms}.anim-duration-110{-webkit-animation-duration:.11s;animation-duration:.11s}.anim-duration-111{-webkit-animation-duration:111ms;animation-duration:111ms}.anim-duration-112{-webkit-animation-duration:112ms;animation-duration:112ms}.anim-duration-113{-webkit-animation-duration:113ms;animation-duration:113ms}.anim-duration-114{-webkit-animation-duration:114ms;animation-duration:114ms}.anim-duration-115{-webkit-animation-duration:115ms;animation-duration:115ms}.anim-duration-116{-webkit-animation-duration:116ms;animation-duration:116ms}.anim-duration-117{-webkit-animation-duration:117ms;animation-duration:117ms}.anim-duration-118{-webkit-animation-duration:118ms;animation-duration:118ms}.anim-duration-119{-webkit-animation-duration:119ms;animation-duration:119ms}.anim-duration-120{-webkit-animation-duration:.12s;animation-duration:.12s}.anim-duration-121{-webkit-animation-duration:121ms;animation-duration:121ms}.anim-duration-122{-webkit-animation-duration:122ms;animation-duration:122ms}.anim-duration-123{-webkit-animation-duration:123ms;animation-duration:123ms}.anim-duration-124{-webkit-animation-duration:124ms;animation-duration:124ms}.anim-duration-125{-webkit-animation-duration:125ms;animation-duration:125ms}.anim-duration-126{-webkit-animation-duration:126ms;animation-duration:126ms}.anim-duration-127{-webkit-animation-duration:127ms;animation-duration:127ms}.anim-duration-128{-webkit-animation-duration:128ms;animation-duration:128ms}.anim-duration-129{-webkit-animation-duration:129ms;animation-duration:129ms}.anim-duration-130{-webkit-animation-duration:.13s;animation-duration:.13s}.anim-duration-131{-webkit-animation-duration:131ms;animation-duration:131ms}.anim-duration-132{-webkit-animation-duration:132ms;animation-duration:132ms}.anim-duration-133{-webkit-animation-duration:133ms;animation-duration:133ms}.anim-duration-134{-webkit-animation-duration:134ms;animation-duration:134ms}.anim-duration-135{-webkit-animation-duration:135ms;animation-duration:135ms}.anim-duration-136{-webkit-animation-duration:136ms;animation-duration:136ms}.anim-duration-137{-webkit-animation-duration:137ms;animation-duration:137ms}.anim-duration-138{-webkit-animation-duration:138ms;animation-duration:138ms}.anim-duration-139{-webkit-animation-duration:139ms;animation-duration:139ms}.anim-duration-140{-webkit-animation-duration:.14s;animation-duration:.14s}.anim-duration-141{-webkit-animation-duration:141ms;animation-duration:141ms}.anim-duration-142{-webkit-animation-duration:142ms;animation-duration:142ms}.anim-duration-143{-webkit-animation-duration:143ms;animation-duration:143ms}.anim-duration-144{-webkit-animation-duration:144ms;animation-duration:144ms}.anim-duration-145{-webkit-animation-duration:145ms;animation-duration:145ms}.anim-duration-146{-webkit-animation-duration:146ms;animation-duration:146ms}.anim-duration-147{-webkit-animation-duration:147ms;animation-duration:147ms}.anim-duration-148{-webkit-animation-duration:148ms;animation-duration:148ms}.anim-duration-149{-webkit-animation-duration:149ms;animation-duration:149ms}.anim-duration-150{-webkit-animation-duration:.15s;animation-duration:.15s}.anim-duration-151{-webkit-animation-duration:151ms;animation-duration:151ms}.anim-duration-152{-webkit-animation-duration:152ms;animation-duration:152ms}.anim-duration-153{-webkit-animation-duration:153ms;animation-duration:153ms}.anim-duration-154{-webkit-animation-duration:154ms;animation-duration:154ms}.anim-duration-155{-webkit-animation-duration:155ms;animation-duration:155ms}.anim-duration-156{-webkit-animation-duration:156ms;animation-duration:156ms}.anim-duration-157{-webkit-animation-duration:157ms;animation-duration:157ms}.anim-duration-158{-webkit-animation-duration:158ms;animation-duration:158ms}.anim-duration-159{-webkit-animation-duration:159ms;animation-duration:159ms}.anim-duration-160{-webkit-animation-duration:.16s;animation-duration:.16s}.anim-duration-161{-webkit-animation-duration:161ms;animation-duration:161ms}.anim-duration-162{-webkit-animation-duration:162ms;animation-duration:162ms}.anim-duration-163{-webkit-animation-duration:163ms;animation-duration:163ms}.anim-duration-164{-webkit-animation-duration:164ms;animation-duration:164ms}.anim-duration-165{-webkit-animation-duration:165ms;animation-duration:165ms}.anim-duration-166{-webkit-animation-duration:166ms;animation-duration:166ms}.anim-duration-167{-webkit-animation-duration:167ms;animation-duration:167ms}.anim-duration-168{-webkit-animation-duration:168ms;animation-duration:168ms}.anim-duration-169{-webkit-animation-duration:169ms;animation-duration:169ms}.anim-duration-170{-webkit-animation-duration:.17s;animation-duration:.17s}.anim-duration-171{-webkit-animation-duration:171ms;animation-duration:171ms}.anim-duration-172{-webkit-animation-duration:172ms;animation-duration:172ms}.anim-duration-173{-webkit-animation-duration:173ms;animation-duration:173ms}.anim-duration-174{-webkit-animation-duration:174ms;animation-duration:174ms}.anim-duration-175{-webkit-animation-duration:175ms;animation-duration:175ms}.anim-duration-176{-webkit-animation-duration:176ms;animation-duration:176ms}.anim-duration-177{-webkit-animation-duration:177ms;animation-duration:177ms}.anim-duration-178{-webkit-animation-duration:178ms;animation-duration:178ms}.anim-duration-179{-webkit-animation-duration:179ms;animation-duration:179ms}.anim-duration-180{-webkit-animation-duration:.18s;animation-duration:.18s}.anim-duration-181{-webkit-animation-duration:181ms;animation-duration:181ms}.anim-duration-182{-webkit-animation-duration:182ms;animation-duration:182ms}.anim-duration-183{-webkit-animation-duration:183ms;animation-duration:183ms}.anim-duration-184{-webkit-animation-duration:184ms;animation-duration:184ms}.anim-duration-185{-webkit-animation-duration:185ms;animation-duration:185ms}.anim-duration-186{-webkit-animation-duration:186ms;animation-duration:186ms}.anim-duration-187{-webkit-animation-duration:187ms;animation-duration:187ms}.anim-duration-188{-webkit-animation-duration:188ms;animation-duration:188ms}.anim-duration-189{-webkit-animation-duration:189ms;animation-duration:189ms}.anim-duration-190{-webkit-animation-duration:.19s;animation-duration:.19s}.anim-duration-191{-webkit-animation-duration:191ms;animation-duration:191ms}.anim-duration-192{-webkit-animation-duration:192ms;animation-duration:192ms}.anim-duration-193{-webkit-animation-duration:193ms;animation-duration:193ms}.anim-duration-194{-webkit-animation-duration:194ms;animation-duration:194ms}.anim-duration-195{-webkit-animation-duration:195ms;animation-duration:195ms}.anim-duration-196{-webkit-animation-duration:196ms;animation-duration:196ms}.anim-duration-197{-webkit-animation-duration:197ms;animation-duration:197ms}.anim-duration-198{-webkit-animation-duration:198ms;animation-duration:198ms}.anim-duration-199{-webkit-animation-duration:199ms;animation-duration:199ms}.anim-duration-200{-webkit-animation-duration:.2s;animation-duration:.2s}.anim-duration-201{-webkit-animation-duration:201ms;animation-duration:201ms}.anim-duration-202{-webkit-animation-duration:202ms;animation-duration:202ms}.anim-duration-203{-webkit-animation-duration:203ms;animation-duration:203ms}.anim-duration-204{-webkit-animation-duration:204ms;animation-duration:204ms}.anim-duration-205{-webkit-animation-duration:205ms;animation-duration:205ms}.anim-duration-206{-webkit-animation-duration:206ms;animation-duration:206ms}.anim-duration-207{-webkit-animation-duration:207ms;animation-duration:207ms}.anim-duration-208{-webkit-animation-duration:208ms;animation-duration:208ms}.anim-duration-209{-webkit-animation-duration:209ms;animation-duration:209ms}.anim-duration-210{-webkit-animation-duration:.21s;animation-duration:.21s}.anim-duration-211{-webkit-animation-duration:211ms;animation-duration:211ms}.anim-duration-212{-webkit-animation-duration:212ms;animation-duration:212ms}.anim-duration-213{-webkit-animation-duration:213ms;animation-duration:213ms}.anim-duration-214{-webkit-animation-duration:214ms;animation-duration:214ms}.anim-duration-215{-webkit-animation-duration:215ms;animation-duration:215ms}.anim-duration-216{-webkit-animation-duration:216ms;animation-duration:216ms}.anim-duration-217{-webkit-animation-duration:217ms;animation-duration:217ms}.anim-duration-218{-webkit-animation-duration:218ms;animation-duration:218ms}.anim-duration-219{-webkit-animation-duration:219ms;animation-duration:219ms}.anim-duration-220{-webkit-animation-duration:.22s;animation-duration:.22s}.anim-duration-221{-webkit-animation-duration:221ms;animation-duration:221ms}.anim-duration-222{-webkit-animation-duration:222ms;animation-duration:222ms}.anim-duration-223{-webkit-animation-duration:223ms;animation-duration:223ms}.anim-duration-224{-webkit-animation-duration:224ms;animation-duration:224ms}.anim-duration-225{-webkit-animation-duration:225ms;animation-duration:225ms}.anim-duration-226{-webkit-animation-duration:226ms;animation-duration:226ms}.anim-duration-227{-webkit-animation-duration:227ms;animation-duration:227ms}.anim-duration-228{-webkit-animation-duration:228ms;animation-duration:228ms}.anim-duration-229{-webkit-animation-duration:229ms;animation-duration:229ms}.anim-duration-230{-webkit-animation-duration:.23s;animation-duration:.23s}.anim-duration-231{-webkit-animation-duration:231ms;animation-duration:231ms}.anim-duration-232{-webkit-animation-duration:232ms;animation-duration:232ms}.anim-duration-233{-webkit-animation-duration:233ms;animation-duration:233ms}.anim-duration-234{-webkit-animation-duration:234ms;animation-duration:234ms}.anim-duration-235{-webkit-animation-duration:235ms;animation-duration:235ms}.anim-duration-236{-webkit-animation-duration:236ms;animation-duration:236ms}.anim-duration-237{-webkit-animation-duration:237ms;animation-duration:237ms}.anim-duration-238{-webkit-animation-duration:238ms;animation-duration:238ms}.anim-duration-239{-webkit-animation-duration:239ms;animation-duration:239ms}.anim-duration-240{-webkit-animation-duration:.24s;animation-duration:.24s}.anim-duration-241{-webkit-animation-duration:241ms;animation-duration:241ms}.anim-duration-242{-webkit-animation-duration:242ms;animation-duration:242ms}.anim-duration-243{-webkit-animation-duration:243ms;animation-duration:243ms}.anim-duration-244{-webkit-animation-duration:244ms;animation-duration:244ms}.anim-duration-245{-webkit-animation-duration:245ms;animation-duration:245ms}.anim-duration-246{-webkit-animation-duration:246ms;animation-duration:246ms}.anim-duration-247{-webkit-animation-duration:247ms;animation-duration:247ms}.anim-duration-248{-webkit-animation-duration:248ms;animation-duration:248ms}.anim-duration-249{-webkit-animation-duration:249ms;animation-duration:249ms}.anim-duration-250{-webkit-animation-duration:.25s;animation-duration:.25s}.anim-duration-251{-webkit-animation-duration:251ms;animation-duration:251ms}.anim-duration-252{-webkit-animation-duration:252ms;animation-duration:252ms}.anim-duration-253{-webkit-animation-duration:253ms;animation-duration:253ms}.anim-duration-254{-webkit-animation-duration:254ms;animation-duration:254ms}.anim-duration-255{-webkit-animation-duration:255ms;animation-duration:255ms}.anim-duration-256{-webkit-animation-duration:256ms;animation-duration:256ms}.anim-duration-257{-webkit-animation-duration:257ms;animation-duration:257ms}.anim-duration-258{-webkit-animation-duration:258ms;animation-duration:258ms}.anim-duration-259{-webkit-animation-duration:259ms;animation-duration:259ms}.anim-duration-260{-webkit-animation-duration:.26s;animation-duration:.26s}.anim-duration-261{-webkit-animation-duration:261ms;animation-duration:261ms}.anim-duration-262{-webkit-animation-duration:262ms;animation-duration:262ms}.anim-duration-263{-webkit-animation-duration:263ms;animation-duration:263ms}.anim-duration-264{-webkit-animation-duration:264ms;animation-duration:264ms}.anim-duration-265{-webkit-animation-duration:265ms;animation-duration:265ms}.anim-duration-266{-webkit-animation-duration:266ms;animation-duration:266ms}.anim-duration-267{-webkit-animation-duration:267ms;animation-duration:267ms}.anim-duration-268{-webkit-animation-duration:268ms;animation-duration:268ms}.anim-duration-269{-webkit-animation-duration:269ms;animation-duration:269ms}.anim-duration-270{-webkit-animation-duration:.27s;animation-duration:.27s}.anim-duration-271{-webkit-animation-duration:271ms;animation-duration:271ms}.anim-duration-272{-webkit-animation-duration:272ms;animation-duration:272ms}.anim-duration-273{-webkit-animation-duration:273ms;animation-duration:273ms}.anim-duration-274{-webkit-animation-duration:274ms;animation-duration:274ms}.anim-duration-275{-webkit-animation-duration:275ms;animation-duration:275ms}.anim-duration-276{-webkit-animation-duration:276ms;animation-duration:276ms}.anim-duration-277{-webkit-animation-duration:277ms;animation-duration:277ms}.anim-duration-278{-webkit-animation-duration:278ms;animation-duration:278ms}.anim-duration-279{-webkit-animation-duration:279ms;animation-duration:279ms}.anim-duration-280{-webkit-animation-duration:.28s;animation-duration:.28s}.anim-duration-281{-webkit-animation-duration:281ms;animation-duration:281ms}.anim-duration-282{-webkit-animation-duration:282ms;animation-duration:282ms}.anim-duration-283{-webkit-animation-duration:283ms;animation-duration:283ms}.anim-duration-284{-webkit-animation-duration:284ms;animation-duration:284ms}.anim-duration-285{-webkit-animation-duration:285ms;animation-duration:285ms}.anim-duration-286{-webkit-animation-duration:286ms;animation-duration:286ms}.anim-duration-287{-webkit-animation-duration:287ms;animation-duration:287ms}.anim-duration-288{-webkit-animation-duration:288ms;animation-duration:288ms}.anim-duration-289{-webkit-animation-duration:289ms;animation-duration:289ms}.anim-duration-290{-webkit-animation-duration:.29s;animation-duration:.29s}.anim-duration-291{-webkit-animation-duration:291ms;animation-duration:291ms}.anim-duration-292{-webkit-animation-duration:292ms;animation-duration:292ms}.anim-duration-293{-webkit-animation-duration:293ms;animation-duration:293ms}.anim-duration-294{-webkit-animation-duration:294ms;animation-duration:294ms}.anim-duration-295{-webkit-animation-duration:295ms;animation-duration:295ms}.anim-duration-296{-webkit-animation-duration:296ms;animation-duration:296ms}.anim-duration-297{-webkit-animation-duration:297ms;animation-duration:297ms}.anim-duration-298{-webkit-animation-duration:298ms;animation-duration:298ms}.anim-duration-299{-webkit-animation-duration:299ms;animation-duration:299ms}.anim-duration-300{-webkit-animation-duration:.3s;animation-duration:.3s}.anim-duration-301{-webkit-animation-duration:301ms;animation-duration:301ms}.anim-duration-302{-webkit-animation-duration:302ms;animation-duration:302ms}.anim-duration-303{-webkit-animation-duration:303ms;animation-duration:303ms}.anim-duration-304{-webkit-animation-duration:304ms;animation-duration:304ms}.anim-duration-305{-webkit-animation-duration:305ms;animation-duration:305ms}.anim-duration-306{-webkit-animation-duration:306ms;animation-duration:306ms}.anim-duration-307{-webkit-animation-duration:307ms;animation-duration:307ms}.anim-duration-308{-webkit-animation-duration:308ms;animation-duration:308ms}.anim-duration-309{-webkit-animation-duration:309ms;animation-duration:309ms}.anim-duration-310{-webkit-animation-duration:.31s;animation-duration:.31s}.anim-duration-311{-webkit-animation-duration:311ms;animation-duration:311ms}.anim-duration-312{-webkit-animation-duration:312ms;animation-duration:312ms}.anim-duration-313{-webkit-animation-duration:313ms;animation-duration:313ms}.anim-duration-314{-webkit-animation-duration:314ms;animation-duration:314ms}.anim-duration-315{-webkit-animation-duration:315ms;animation-duration:315ms}.anim-duration-316{-webkit-animation-duration:316ms;animation-duration:316ms}.anim-duration-317{-webkit-animation-duration:317ms;animation-duration:317ms}.anim-duration-318{-webkit-animation-duration:318ms;animation-duration:318ms}.anim-duration-319{-webkit-animation-duration:319ms;animation-duration:319ms}.anim-duration-320{-webkit-animation-duration:.32s;animation-duration:.32s}.anim-duration-321{-webkit-animation-duration:321ms;animation-duration:321ms}.anim-duration-322{-webkit-animation-duration:322ms;animation-duration:322ms}.anim-duration-323{-webkit-animation-duration:323ms;animation-duration:323ms}.anim-duration-324{-webkit-animation-duration:324ms;animation-duration:324ms}.anim-duration-325{-webkit-animation-duration:325ms;animation-duration:325ms}.anim-duration-326{-webkit-animation-duration:326ms;animation-duration:326ms}.anim-duration-327{-webkit-animation-duration:327ms;animation-duration:327ms}.anim-duration-328{-webkit-animation-duration:328ms;animation-duration:328ms}.anim-duration-329{-webkit-animation-duration:329ms;animation-duration:329ms}.anim-duration-330{-webkit-animation-duration:.33s;animation-duration:.33s}.anim-duration-331{-webkit-animation-duration:331ms;animation-duration:331ms}.anim-duration-332{-webkit-animation-duration:332ms;animation-duration:332ms}.anim-duration-333{-webkit-animation-duration:333ms;animation-duration:333ms}.anim-duration-334{-webkit-animation-duration:334ms;animation-duration:334ms}.anim-duration-335{-webkit-animation-duration:335ms;animation-duration:335ms}.anim-duration-336{-webkit-animation-duration:336ms;animation-duration:336ms}.anim-duration-337{-webkit-animation-duration:337ms;animation-duration:337ms}.anim-duration-338{-webkit-animation-duration:338ms;animation-duration:338ms}.anim-duration-339{-webkit-animation-duration:339ms;animation-duration:339ms}.anim-duration-340{-webkit-animation-duration:.34s;animation-duration:.34s}.anim-duration-341{-webkit-animation-duration:341ms;animation-duration:341ms}.anim-duration-342{-webkit-animation-duration:342ms;animation-duration:342ms}.anim-duration-343{-webkit-animation-duration:343ms;animation-duration:343ms}.anim-duration-344{-webkit-animation-duration:344ms;animation-duration:344ms}.anim-duration-345{-webkit-animation-duration:345ms;animation-duration:345ms}.anim-duration-346{-webkit-animation-duration:346ms;animation-duration:346ms}.anim-duration-347{-webkit-animation-duration:347ms;animation-duration:347ms}.anim-duration-348{-webkit-animation-duration:348ms;animation-duration:348ms}.anim-duration-349{-webkit-animation-duration:349ms;animation-duration:349ms}.anim-duration-350{-webkit-animation-duration:.35s;animation-duration:.35s}.anim-duration-351{-webkit-animation-duration:351ms;animation-duration:351ms}.anim-duration-352{-webkit-animation-duration:352ms;animation-duration:352ms}.anim-duration-353{-webkit-animation-duration:353ms;animation-duration:353ms}.anim-duration-354{-webkit-animation-duration:354ms;animation-duration:354ms}.anim-duration-355{-webkit-animation-duration:355ms;animation-duration:355ms}.anim-duration-356{-webkit-animation-duration:356ms;animation-duration:356ms}.anim-duration-357{-webkit-animation-duration:357ms;animation-duration:357ms}.anim-duration-358{-webkit-animation-duration:358ms;animation-duration:358ms}.anim-duration-359{-webkit-animation-duration:359ms;animation-duration:359ms}.anim-duration-360{-webkit-animation-duration:.36s;animation-duration:.36s}.anim-duration-361{-webkit-animation-duration:361ms;animation-duration:361ms}.anim-duration-362{-webkit-animation-duration:362ms;animation-duration:362ms}.anim-duration-363{-webkit-animation-duration:363ms;animation-duration:363ms}.anim-duration-364{-webkit-animation-duration:364ms;animation-duration:364ms}.anim-duration-365{-webkit-animation-duration:365ms;animation-duration:365ms}.anim-duration-366{-webkit-animation-duration:366ms;animation-duration:366ms}.anim-duration-367{-webkit-animation-duration:367ms;animation-duration:367ms}.anim-duration-368{-webkit-animation-duration:368ms;animation-duration:368ms}.anim-duration-369{-webkit-animation-duration:369ms;animation-duration:369ms}.anim-duration-370{-webkit-animation-duration:.37s;animation-duration:.37s}.anim-duration-371{-webkit-animation-duration:371ms;animation-duration:371ms}.anim-duration-372{-webkit-animation-duration:372ms;animation-duration:372ms}.anim-duration-373{-webkit-animation-duration:373ms;animation-duration:373ms}.anim-duration-374{-webkit-animation-duration:374ms;animation-duration:374ms}.anim-duration-375{-webkit-animation-duration:375ms;animation-duration:375ms}.anim-duration-376{-webkit-animation-duration:376ms;animation-duration:376ms}.anim-duration-377{-webkit-animation-duration:377ms;animation-duration:377ms}.anim-duration-378{-webkit-animation-duration:378ms;animation-duration:378ms}.anim-duration-379{-webkit-animation-duration:379ms;animation-duration:379ms}.anim-duration-380{-webkit-animation-duration:.38s;animation-duration:.38s}.anim-duration-381{-webkit-animation-duration:381ms;animation-duration:381ms}.anim-duration-382{-webkit-animation-duration:382ms;animation-duration:382ms}.anim-duration-383{-webkit-animation-duration:383ms;animation-duration:383ms}.anim-duration-384{-webkit-animation-duration:384ms;animation-duration:384ms}.anim-duration-385{-webkit-animation-duration:385ms;animation-duration:385ms}.anim-duration-386{-webkit-animation-duration:386ms;animation-duration:386ms}.anim-duration-387{-webkit-animation-duration:387ms;animation-duration:387ms}.anim-duration-388{-webkit-animation-duration:388ms;animation-duration:388ms}.anim-duration-389{-webkit-animation-duration:389ms;animation-duration:389ms}.anim-duration-390{-webkit-animation-duration:.39s;animation-duration:.39s}.anim-duration-391{-webkit-animation-duration:391ms;animation-duration:391ms}.anim-duration-392{-webkit-animation-duration:392ms;animation-duration:392ms}.anim-duration-393{-webkit-animation-duration:393ms;animation-duration:393ms}.anim-duration-394{-webkit-animation-duration:394ms;animation-duration:394ms}.anim-duration-395{-webkit-animation-duration:395ms;animation-duration:395ms}.anim-duration-396{-webkit-animation-duration:396ms;animation-duration:396ms}.anim-duration-397{-webkit-animation-duration:397ms;animation-duration:397ms}.anim-duration-398{-webkit-animation-duration:398ms;animation-duration:398ms}.anim-duration-399{-webkit-animation-duration:399ms;animation-duration:399ms}.anim-duration-400{-webkit-animation-duration:.4s;animation-duration:.4s}.anim-duration-401{-webkit-animation-duration:401ms;animation-duration:401ms}.anim-duration-402{-webkit-animation-duration:402ms;animation-duration:402ms}.anim-duration-403{-webkit-animation-duration:403ms;animation-duration:403ms}.anim-duration-404{-webkit-animation-duration:404ms;animation-duration:404ms}.anim-duration-405{-webkit-animation-duration:405ms;animation-duration:405ms}.anim-duration-406{-webkit-animation-duration:406ms;animation-duration:406ms}.anim-duration-407{-webkit-animation-duration:407ms;animation-duration:407ms}.anim-duration-408{-webkit-animation-duration:408ms;animation-duration:408ms}.anim-duration-409{-webkit-animation-duration:409ms;animation-duration:409ms}.anim-duration-410{-webkit-animation-duration:.41s;animation-duration:.41s}.anim-duration-411{-webkit-animation-duration:411ms;animation-duration:411ms}.anim-duration-412{-webkit-animation-duration:412ms;animation-duration:412ms}.anim-duration-413{-webkit-animation-duration:413ms;animation-duration:413ms}.anim-duration-414{-webkit-animation-duration:414ms;animation-duration:414ms}.anim-duration-415{-webkit-animation-duration:415ms;animation-duration:415ms}.anim-duration-416{-webkit-animation-duration:416ms;animation-duration:416ms}.anim-duration-417{-webkit-animation-duration:417ms;animation-duration:417ms}.anim-duration-418{-webkit-animation-duration:418ms;animation-duration:418ms}.anim-duration-419{-webkit-animation-duration:419ms;animation-duration:419ms}.anim-duration-420{-webkit-animation-duration:.42s;animation-duration:.42s}.anim-duration-421{-webkit-animation-duration:421ms;animation-duration:421ms}.anim-duration-422{-webkit-animation-duration:422ms;animation-duration:422ms}.anim-duration-423{-webkit-animation-duration:423ms;animation-duration:423ms}.anim-duration-424{-webkit-animation-duration:424ms;animation-duration:424ms}.anim-duration-425{-webkit-animation-duration:425ms;animation-duration:425ms}.anim-duration-426{-webkit-animation-duration:426ms;animation-duration:426ms}.anim-duration-427{-webkit-animation-duration:427ms;animation-duration:427ms}.anim-duration-428{-webkit-animation-duration:428ms;animation-duration:428ms}.anim-duration-429{-webkit-animation-duration:429ms;animation-duration:429ms}.anim-duration-430{-webkit-animation-duration:.43s;animation-duration:.43s}.anim-duration-431{-webkit-animation-duration:431ms;animation-duration:431ms}.anim-duration-432{-webkit-animation-duration:432ms;animation-duration:432ms}.anim-duration-433{-webkit-animation-duration:433ms;animation-duration:433ms}.anim-duration-434{-webkit-animation-duration:434ms;animation-duration:434ms}.anim-duration-435{-webkit-animation-duration:435ms;animation-duration:435ms}.anim-duration-436{-webkit-animation-duration:436ms;animation-duration:436ms}.anim-duration-437{-webkit-animation-duration:437ms;animation-duration:437ms}.anim-duration-438{-webkit-animation-duration:438ms;animation-duration:438ms}.anim-duration-439{-webkit-animation-duration:439ms;animation-duration:439ms}.anim-duration-440{-webkit-animation-duration:.44s;animation-duration:.44s}.anim-duration-441{-webkit-animation-duration:441ms;animation-duration:441ms}.anim-duration-442{-webkit-animation-duration:442ms;animation-duration:442ms}.anim-duration-443{-webkit-animation-duration:443ms;animation-duration:443ms}.anim-duration-444{-webkit-animation-duration:444ms;animation-duration:444ms}.anim-duration-445{-webkit-animation-duration:445ms;animation-duration:445ms}.anim-duration-446{-webkit-animation-duration:446ms;animation-duration:446ms}.anim-duration-447{-webkit-animation-duration:447ms;animation-duration:447ms}.anim-duration-448{-webkit-animation-duration:448ms;animation-duration:448ms}.anim-duration-449{-webkit-animation-duration:449ms;animation-duration:449ms}.anim-duration-450{-webkit-animation-duration:.45s;animation-duration:.45s}.anim-duration-451{-webkit-animation-duration:451ms;animation-duration:451ms}.anim-duration-452{-webkit-animation-duration:452ms;animation-duration:452ms}.anim-duration-453{-webkit-animation-duration:453ms;animation-duration:453ms}.anim-duration-454{-webkit-animation-duration:454ms;animation-duration:454ms}.anim-duration-455{-webkit-animation-duration:455ms;animation-duration:455ms}.anim-duration-456{-webkit-animation-duration:456ms;animation-duration:456ms}.anim-duration-457{-webkit-animation-duration:457ms;animation-duration:457ms}.anim-duration-458{-webkit-animation-duration:458ms;animation-duration:458ms}.anim-duration-459{-webkit-animation-duration:459ms;animation-duration:459ms}.anim-duration-460{-webkit-animation-duration:.46s;animation-duration:.46s}.anim-duration-461{-webkit-animation-duration:461ms;animation-duration:461ms}.anim-duration-462{-webkit-animation-duration:462ms;animation-duration:462ms}.anim-duration-463{-webkit-animation-duration:463ms;animation-duration:463ms}.anim-duration-464{-webkit-animation-duration:464ms;animation-duration:464ms}.anim-duration-465{-webkit-animation-duration:465ms;animation-duration:465ms}.anim-duration-466{-webkit-animation-duration:466ms;animation-duration:466ms}.anim-duration-467{-webkit-animation-duration:467ms;animation-duration:467ms}.anim-duration-468{-webkit-animation-duration:468ms;animation-duration:468ms}.anim-duration-469{-webkit-animation-duration:469ms;animation-duration:469ms}.anim-duration-470{-webkit-animation-duration:.47s;animation-duration:.47s}.anim-duration-471{-webkit-animation-duration:471ms;animation-duration:471ms}.anim-duration-472{-webkit-animation-duration:472ms;animation-duration:472ms}.anim-duration-473{-webkit-animation-duration:473ms;animation-duration:473ms}.anim-duration-474{-webkit-animation-duration:474ms;animation-duration:474ms}.anim-duration-475{-webkit-animation-duration:475ms;animation-duration:475ms}.anim-duration-476{-webkit-animation-duration:476ms;animation-duration:476ms}.anim-duration-477{-webkit-animation-duration:477ms;animation-duration:477ms}.anim-duration-478{-webkit-animation-duration:478ms;animation-duration:478ms}.anim-duration-479{-webkit-animation-duration:479ms;animation-duration:479ms}.anim-duration-480{-webkit-animation-duration:.48s;animation-duration:.48s}.anim-duration-481{-webkit-animation-duration:481ms;animation-duration:481ms}.anim-duration-482{-webkit-animation-duration:482ms;animation-duration:482ms}.anim-duration-483{-webkit-animation-duration:483ms;animation-duration:483ms}.anim-duration-484{-webkit-animation-duration:484ms;animation-duration:484ms}.anim-duration-485{-webkit-animation-duration:485ms;animation-duration:485ms}.anim-duration-486{-webkit-animation-duration:486ms;animation-duration:486ms}.anim-duration-487{-webkit-animation-duration:487ms;animation-duration:487ms}.anim-duration-488{-webkit-animation-duration:488ms;animation-duration:488ms}.anim-duration-489{-webkit-animation-duration:489ms;animation-duration:489ms}.anim-duration-490{-webkit-animation-duration:.49s;animation-duration:.49s}.anim-duration-491{-webkit-animation-duration:491ms;animation-duration:491ms}.anim-duration-492{-webkit-animation-duration:492ms;animation-duration:492ms}.anim-duration-493{-webkit-animation-duration:493ms;animation-duration:493ms}.anim-duration-494{-webkit-animation-duration:494ms;animation-duration:494ms}.anim-duration-495{-webkit-animation-duration:495ms;animation-duration:495ms}.anim-duration-496{-webkit-animation-duration:496ms;animation-duration:496ms}.anim-duration-497{-webkit-animation-duration:497ms;animation-duration:497ms}.anim-duration-498{-webkit-animation-duration:498ms;animation-duration:498ms}.anim-duration-499{-webkit-animation-duration:499ms;animation-duration:499ms}.anim-duration-500{-webkit-animation-duration:.5s;animation-duration:.5s}.anim-duration-501{-webkit-animation-duration:501ms;animation-duration:501ms}.anim-duration-502{-webkit-animation-duration:502ms;animation-duration:502ms}.anim-duration-503{-webkit-animation-duration:503ms;animation-duration:503ms}.anim-duration-504{-webkit-animation-duration:504ms;animation-duration:504ms}.anim-duration-505{-webkit-animation-duration:505ms;animation-duration:505ms}.anim-duration-506{-webkit-animation-duration:506ms;animation-duration:506ms}.anim-duration-507{-webkit-animation-duration:507ms;animation-duration:507ms}.anim-duration-508{-webkit-animation-duration:508ms;animation-duration:508ms}.anim-duration-509{-webkit-animation-duration:509ms;animation-duration:509ms}.anim-duration-510{-webkit-animation-duration:.51s;animation-duration:.51s}.anim-duration-511{-webkit-animation-duration:511ms;animation-duration:511ms}.anim-duration-512{-webkit-animation-duration:512ms;animation-duration:512ms}.anim-duration-513{-webkit-animation-duration:513ms;animation-duration:513ms}.anim-duration-514{-webkit-animation-duration:514ms;animation-duration:514ms}.anim-duration-515{-webkit-animation-duration:515ms;animation-duration:515ms}.anim-duration-516{-webkit-animation-duration:516ms;animation-duration:516ms}.anim-duration-517{-webkit-animation-duration:517ms;animation-duration:517ms}.anim-duration-518{-webkit-animation-duration:518ms;animation-duration:518ms}.anim-duration-519{-webkit-animation-duration:519ms;animation-duration:519ms}.anim-duration-520{-webkit-animation-duration:.52s;animation-duration:.52s}.anim-duration-521{-webkit-animation-duration:521ms;animation-duration:521ms}.anim-duration-522{-webkit-animation-duration:522ms;animation-duration:522ms}.anim-duration-523{-webkit-animation-duration:523ms;animation-duration:523ms}.anim-duration-524{-webkit-animation-duration:524ms;animation-duration:524ms}.anim-duration-525{-webkit-animation-duration:525ms;animation-duration:525ms}.anim-duration-526{-webkit-animation-duration:526ms;animation-duration:526ms}.anim-duration-527{-webkit-animation-duration:527ms;animation-duration:527ms}.anim-duration-528{-webkit-animation-duration:528ms;animation-duration:528ms}.anim-duration-529{-webkit-animation-duration:529ms;animation-duration:529ms}.anim-duration-530{-webkit-animation-duration:.53s;animation-duration:.53s}.anim-duration-531{-webkit-animation-duration:531ms;animation-duration:531ms}.anim-duration-532{-webkit-animation-duration:532ms;animation-duration:532ms}.anim-duration-533{-webkit-animation-duration:533ms;animation-duration:533ms}.anim-duration-534{-webkit-animation-duration:534ms;animation-duration:534ms}.anim-duration-535{-webkit-animation-duration:535ms;animation-duration:535ms}.anim-duration-536{-webkit-animation-duration:536ms;animation-duration:536ms}.anim-duration-537{-webkit-animation-duration:537ms;animation-duration:537ms}.anim-duration-538{-webkit-animation-duration:538ms;animation-duration:538ms}.anim-duration-539{-webkit-animation-duration:539ms;animation-duration:539ms}.anim-duration-540{-webkit-animation-duration:.54s;animation-duration:.54s}.anim-duration-541{-webkit-animation-duration:541ms;animation-duration:541ms}.anim-duration-542{-webkit-animation-duration:542ms;animation-duration:542ms}.anim-duration-543{-webkit-animation-duration:543ms;animation-duration:543ms}.anim-duration-544{-webkit-animation-duration:544ms;animation-duration:544ms}.anim-duration-545{-webkit-animation-duration:545ms;animation-duration:545ms}.anim-duration-546{-webkit-animation-duration:546ms;animation-duration:546ms}.anim-duration-547{-webkit-animation-duration:547ms;animation-duration:547ms}.anim-duration-548{-webkit-animation-duration:548ms;animation-duration:548ms}.anim-duration-549{-webkit-animation-duration:549ms;animation-duration:549ms}.anim-duration-550{-webkit-animation-duration:.55s;animation-duration:.55s}.anim-duration-551{-webkit-animation-duration:551ms;animation-duration:551ms}.anim-duration-552{-webkit-animation-duration:552ms;animation-duration:552ms}.anim-duration-553{-webkit-animation-duration:553ms;animation-duration:553ms}.anim-duration-554{-webkit-animation-duration:554ms;animation-duration:554ms}.anim-duration-555{-webkit-animation-duration:555ms;animation-duration:555ms}.anim-duration-556{-webkit-animation-duration:556ms;animation-duration:556ms}.anim-duration-557{-webkit-animation-duration:557ms;animation-duration:557ms}.anim-duration-558{-webkit-animation-duration:558ms;animation-duration:558ms}.anim-duration-559{-webkit-animation-duration:559ms;animation-duration:559ms}.anim-duration-560{-webkit-animation-duration:.56s;animation-duration:.56s}.anim-duration-561{-webkit-animation-duration:561ms;animation-duration:561ms}.anim-duration-562{-webkit-animation-duration:562ms;animation-duration:562ms}.anim-duration-563{-webkit-animation-duration:563ms;animation-duration:563ms}.anim-duration-564{-webkit-animation-duration:564ms;animation-duration:564ms}.anim-duration-565{-webkit-animation-duration:565ms;animation-duration:565ms}.anim-duration-566{-webkit-animation-duration:566ms;animation-duration:566ms}.anim-duration-567{-webkit-animation-duration:567ms;animation-duration:567ms}.anim-duration-568{-webkit-animation-duration:568ms;animation-duration:568ms}.anim-duration-569{-webkit-animation-duration:569ms;animation-duration:569ms}.anim-duration-570{-webkit-animation-duration:.57s;animation-duration:.57s}.anim-duration-571{-webkit-animation-duration:571ms;animation-duration:571ms}.anim-duration-572{-webkit-animation-duration:572ms;animation-duration:572ms}.anim-duration-573{-webkit-animation-duration:573ms;animation-duration:573ms}.anim-duration-574{-webkit-animation-duration:574ms;animation-duration:574ms}.anim-duration-575{-webkit-animation-duration:575ms;animation-duration:575ms}.anim-duration-576{-webkit-animation-duration:576ms;animation-duration:576ms}.anim-duration-577{-webkit-animation-duration:577ms;animation-duration:577ms}.anim-duration-578{-webkit-animation-duration:578ms;animation-duration:578ms}.anim-duration-579{-webkit-animation-duration:579ms;animation-duration:579ms}.anim-duration-580{-webkit-animation-duration:.58s;animation-duration:.58s}.anim-duration-581{-webkit-animation-duration:581ms;animation-duration:581ms}.anim-duration-582{-webkit-animation-duration:582ms;animation-duration:582ms}.anim-duration-583{-webkit-animation-duration:583ms;animation-duration:583ms}.anim-duration-584{-webkit-animation-duration:584ms;animation-duration:584ms}.anim-duration-585{-webkit-animation-duration:585ms;animation-duration:585ms}.anim-duration-586{-webkit-animation-duration:586ms;animation-duration:586ms}.anim-duration-587{-webkit-animation-duration:587ms;animation-duration:587ms}.anim-duration-588{-webkit-animation-duration:588ms;animation-duration:588ms}.anim-duration-589{-webkit-animation-duration:589ms;animation-duration:589ms}.anim-duration-590{-webkit-animation-duration:.59s;animation-duration:.59s}.anim-duration-591{-webkit-animation-duration:591ms;animation-duration:591ms}.anim-duration-592{-webkit-animation-duration:592ms;animation-duration:592ms}.anim-duration-593{-webkit-animation-duration:593ms;animation-duration:593ms}.anim-duration-594{-webkit-animation-duration:594ms;animation-duration:594ms}.anim-duration-595{-webkit-animation-duration:595ms;animation-duration:595ms}.anim-duration-596{-webkit-animation-duration:596ms;animation-duration:596ms}.anim-duration-597{-webkit-animation-duration:597ms;animation-duration:597ms}.anim-duration-598{-webkit-animation-duration:598ms;animation-duration:598ms}.anim-duration-599{-webkit-animation-duration:599ms;animation-duration:599ms}.anim-duration-600{-webkit-animation-duration:.6s;animation-duration:.6s}.anim-duration-601{-webkit-animation-duration:601ms;animation-duration:601ms}.anim-duration-602{-webkit-animation-duration:602ms;animation-duration:602ms}.anim-duration-603{-webkit-animation-duration:603ms;animation-duration:603ms}.anim-duration-604{-webkit-animation-duration:604ms;animation-duration:604ms}.anim-duration-605{-webkit-animation-duration:605ms;animation-duration:605ms}.anim-duration-606{-webkit-animation-duration:606ms;animation-duration:606ms}.anim-duration-607{-webkit-animation-duration:607ms;animation-duration:607ms}.anim-duration-608{-webkit-animation-duration:608ms;animation-duration:608ms}.anim-duration-609{-webkit-animation-duration:609ms;animation-duration:609ms}.anim-duration-610{-webkit-animation-duration:.61s;animation-duration:.61s}.anim-duration-611{-webkit-animation-duration:611ms;animation-duration:611ms}.anim-duration-612{-webkit-animation-duration:612ms;animation-duration:612ms}.anim-duration-613{-webkit-animation-duration:613ms;animation-duration:613ms}.anim-duration-614{-webkit-animation-duration:614ms;animation-duration:614ms}.anim-duration-615{-webkit-animation-duration:615ms;animation-duration:615ms}.anim-duration-616{-webkit-animation-duration:616ms;animation-duration:616ms}.anim-duration-617{-webkit-animation-duration:617ms;animation-duration:617ms}.anim-duration-618{-webkit-animation-duration:618ms;animation-duration:618ms}.anim-duration-619{-webkit-animation-duration:619ms;animation-duration:619ms}.anim-duration-620{-webkit-animation-duration:.62s;animation-duration:.62s}.anim-duration-621{-webkit-animation-duration:621ms;animation-duration:621ms}.anim-duration-622{-webkit-animation-duration:622ms;animation-duration:622ms}.anim-duration-623{-webkit-animation-duration:623ms;animation-duration:623ms}.anim-duration-624{-webkit-animation-duration:624ms;animation-duration:624ms}.anim-duration-625{-webkit-animation-duration:625ms;animation-duration:625ms}.anim-duration-626{-webkit-animation-duration:626ms;animation-duration:626ms}.anim-duration-627{-webkit-animation-duration:627ms;animation-duration:627ms}.anim-duration-628{-webkit-animation-duration:628ms;animation-duration:628ms}.anim-duration-629{-webkit-animation-duration:629ms;animation-duration:629ms}.anim-duration-630{-webkit-animation-duration:.63s;animation-duration:.63s}.anim-duration-631{-webkit-animation-duration:631ms;animation-duration:631ms}.anim-duration-632{-webkit-animation-duration:632ms;animation-duration:632ms}.anim-duration-633{-webkit-animation-duration:633ms;animation-duration:633ms}.anim-duration-634{-webkit-animation-duration:634ms;animation-duration:634ms}.anim-duration-635{-webkit-animation-duration:635ms;animation-duration:635ms}.anim-duration-636{-webkit-animation-duration:636ms;animation-duration:636ms}.anim-duration-637{-webkit-animation-duration:637ms;animation-duration:637ms}.anim-duration-638{-webkit-animation-duration:638ms;animation-duration:638ms}.anim-duration-639{-webkit-animation-duration:639ms;animation-duration:639ms}.anim-duration-640{-webkit-animation-duration:.64s;animation-duration:.64s}.anim-duration-641{-webkit-animation-duration:641ms;animation-duration:641ms}.anim-duration-642{-webkit-animation-duration:642ms;animation-duration:642ms}.anim-duration-643{-webkit-animation-duration:643ms;animation-duration:643ms}.anim-duration-644{-webkit-animation-duration:644ms;animation-duration:644ms}.anim-duration-645{-webkit-animation-duration:645ms;animation-duration:645ms}.anim-duration-646{-webkit-animation-duration:646ms;animation-duration:646ms}.anim-duration-647{-webkit-animation-duration:647ms;animation-duration:647ms}.anim-duration-648{-webkit-animation-duration:648ms;animation-duration:648ms}.anim-duration-649{-webkit-animation-duration:649ms;animation-duration:649ms}.anim-duration-650{-webkit-animation-duration:.65s;animation-duration:.65s}.anim-duration-651{-webkit-animation-duration:651ms;animation-duration:651ms}.anim-duration-652{-webkit-animation-duration:652ms;animation-duration:652ms}.anim-duration-653{-webkit-animation-duration:653ms;animation-duration:653ms}.anim-duration-654{-webkit-animation-duration:654ms;animation-duration:654ms}.anim-duration-655{-webkit-animation-duration:655ms;animation-duration:655ms}.anim-duration-656{-webkit-animation-duration:656ms;animation-duration:656ms}.anim-duration-657{-webkit-animation-duration:657ms;animation-duration:657ms}.anim-duration-658{-webkit-animation-duration:658ms;animation-duration:658ms}.anim-duration-659{-webkit-animation-duration:659ms;animation-duration:659ms}.anim-duration-660{-webkit-animation-duration:.66s;animation-duration:.66s}.anim-duration-661{-webkit-animation-duration:661ms;animation-duration:661ms}.anim-duration-662{-webkit-animation-duration:662ms;animation-duration:662ms}.anim-duration-663{-webkit-animation-duration:663ms;animation-duration:663ms}.anim-duration-664{-webkit-animation-duration:664ms;animation-duration:664ms}.anim-duration-665{-webkit-animation-duration:665ms;animation-duration:665ms}.anim-duration-666{-webkit-animation-duration:666ms;animation-duration:666ms}.anim-duration-667{-webkit-animation-duration:667ms;animation-duration:667ms}.anim-duration-668{-webkit-animation-duration:668ms;animation-duration:668ms}.anim-duration-669{-webkit-animation-duration:669ms;animation-duration:669ms}.anim-duration-670{-webkit-animation-duration:.67s;animation-duration:.67s}.anim-duration-671{-webkit-animation-duration:671ms;animation-duration:671ms}.anim-duration-672{-webkit-animation-duration:672ms;animation-duration:672ms}.anim-duration-673{-webkit-animation-duration:673ms;animation-duration:673ms}.anim-duration-674{-webkit-animation-duration:674ms;animation-duration:674ms}.anim-duration-675{-webkit-animation-duration:675ms;animation-duration:675ms}.anim-duration-676{-webkit-animation-duration:676ms;animation-duration:676ms}.anim-duration-677{-webkit-animation-duration:677ms;animation-duration:677ms}.anim-duration-678{-webkit-animation-duration:678ms;animation-duration:678ms}.anim-duration-679{-webkit-animation-duration:679ms;animation-duration:679ms}.anim-duration-680{-webkit-animation-duration:.68s;animation-duration:.68s}.anim-duration-681{-webkit-animation-duration:681ms;animation-duration:681ms}.anim-duration-682{-webkit-animation-duration:682ms;animation-duration:682ms}.anim-duration-683{-webkit-animation-duration:683ms;animation-duration:683ms}.anim-duration-684{-webkit-animation-duration:684ms;animation-duration:684ms}.anim-duration-685{-webkit-animation-duration:685ms;animation-duration:685ms}.anim-duration-686{-webkit-animation-duration:686ms;animation-duration:686ms}.anim-duration-687{-webkit-animation-duration:687ms;animation-duration:687ms}.anim-duration-688{-webkit-animation-duration:688ms;animation-duration:688ms}.anim-duration-689{-webkit-animation-duration:689ms;animation-duration:689ms}.anim-duration-690{-webkit-animation-duration:.69s;animation-duration:.69s}.anim-duration-691{-webkit-animation-duration:691ms;animation-duration:691ms}.anim-duration-692{-webkit-animation-duration:692ms;animation-duration:692ms}.anim-duration-693{-webkit-animation-duration:693ms;animation-duration:693ms}.anim-duration-694{-webkit-animation-duration:694ms;animation-duration:694ms}.anim-duration-695{-webkit-animation-duration:695ms;animation-duration:695ms}.anim-duration-696{-webkit-animation-duration:696ms;animation-duration:696ms}.anim-duration-697{-webkit-animation-duration:697ms;animation-duration:697ms}.anim-duration-698{-webkit-animation-duration:698ms;animation-duration:698ms}.anim-duration-699{-webkit-animation-duration:699ms;animation-duration:699ms}.anim-duration-700{-webkit-animation-duration:.7s;animation-duration:.7s}.anim-duration-701{-webkit-animation-duration:701ms;animation-duration:701ms}.anim-duration-702{-webkit-animation-duration:702ms;animation-duration:702ms}.anim-duration-703{-webkit-animation-duration:703ms;animation-duration:703ms}.anim-duration-704{-webkit-animation-duration:704ms;animation-duration:704ms}.anim-duration-705{-webkit-animation-duration:705ms;animation-duration:705ms}.anim-duration-706{-webkit-animation-duration:706ms;animation-duration:706ms}.anim-duration-707{-webkit-animation-duration:707ms;animation-duration:707ms}.anim-duration-708{-webkit-animation-duration:708ms;animation-duration:708ms}.anim-duration-709{-webkit-animation-duration:709ms;animation-duration:709ms}.anim-duration-710{-webkit-animation-duration:.71s;animation-duration:.71s}.anim-duration-711{-webkit-animation-duration:711ms;animation-duration:711ms}.anim-duration-712{-webkit-animation-duration:712ms;animation-duration:712ms}.anim-duration-713{-webkit-animation-duration:713ms;animation-duration:713ms}.anim-duration-714{-webkit-animation-duration:714ms;animation-duration:714ms}.anim-duration-715{-webkit-animation-duration:715ms;animation-duration:715ms}.anim-duration-716{-webkit-animation-duration:716ms;animation-duration:716ms}.anim-duration-717{-webkit-animation-duration:717ms;animation-duration:717ms}.anim-duration-718{-webkit-animation-duration:718ms;animation-duration:718ms}.anim-duration-719{-webkit-animation-duration:719ms;animation-duration:719ms}.anim-duration-720{-webkit-animation-duration:.72s;animation-duration:.72s}.anim-duration-721{-webkit-animation-duration:721ms;animation-duration:721ms}.anim-duration-722{-webkit-animation-duration:722ms;animation-duration:722ms}.anim-duration-723{-webkit-animation-duration:723ms;animation-duration:723ms}.anim-duration-724{-webkit-animation-duration:724ms;animation-duration:724ms}.anim-duration-725{-webkit-animation-duration:725ms;animation-duration:725ms}.anim-duration-726{-webkit-animation-duration:726ms;animation-duration:726ms}.anim-duration-727{-webkit-animation-duration:727ms;animation-duration:727ms}.anim-duration-728{-webkit-animation-duration:728ms;animation-duration:728ms}.anim-duration-729{-webkit-animation-duration:729ms;animation-duration:729ms}.anim-duration-730{-webkit-animation-duration:.73s;animation-duration:.73s}.anim-duration-731{-webkit-animation-duration:731ms;animation-duration:731ms}.anim-duration-732{-webkit-animation-duration:732ms;animation-duration:732ms}.anim-duration-733{-webkit-animation-duration:733ms;animation-duration:733ms}.anim-duration-734{-webkit-animation-duration:734ms;animation-duration:734ms}.anim-duration-735{-webkit-animation-duration:735ms;animation-duration:735ms}.anim-duration-736{-webkit-animation-duration:736ms;animation-duration:736ms}.anim-duration-737{-webkit-animation-duration:737ms;animation-duration:737ms}.anim-duration-738{-webkit-animation-duration:738ms;animation-duration:738ms}.anim-duration-739{-webkit-animation-duration:739ms;animation-duration:739ms}.anim-duration-740{-webkit-animation-duration:.74s;animation-duration:.74s}.anim-duration-741{-webkit-animation-duration:741ms;animation-duration:741ms}.anim-duration-742{-webkit-animation-duration:742ms;animation-duration:742ms}.anim-duration-743{-webkit-animation-duration:743ms;animation-duration:743ms}.anim-duration-744{-webkit-animation-duration:744ms;animation-duration:744ms}.anim-duration-745{-webkit-animation-duration:745ms;animation-duration:745ms}.anim-duration-746{-webkit-animation-duration:746ms;animation-duration:746ms}.anim-duration-747{-webkit-animation-duration:747ms;animation-duration:747ms}.anim-duration-748{-webkit-animation-duration:748ms;animation-duration:748ms}.anim-duration-749{-webkit-animation-duration:749ms;animation-duration:749ms}.anim-duration-750{-webkit-animation-duration:.75s;animation-duration:.75s}.anim-duration-751{-webkit-animation-duration:751ms;animation-duration:751ms}.anim-duration-752{-webkit-animation-duration:752ms;animation-duration:752ms}.anim-duration-753{-webkit-animation-duration:753ms;animation-duration:753ms}.anim-duration-754{-webkit-animation-duration:754ms;animation-duration:754ms}.anim-duration-755{-webkit-animation-duration:755ms;animation-duration:755ms}.anim-duration-756{-webkit-animation-duration:756ms;animation-duration:756ms}.anim-duration-757{-webkit-animation-duration:757ms;animation-duration:757ms}.anim-duration-758{-webkit-animation-duration:758ms;animation-duration:758ms}.anim-duration-759{-webkit-animation-duration:759ms;animation-duration:759ms}.anim-duration-760{-webkit-animation-duration:.76s;animation-duration:.76s}.anim-duration-761{-webkit-animation-duration:761ms;animation-duration:761ms}.anim-duration-762{-webkit-animation-duration:762ms;animation-duration:762ms}.anim-duration-763{-webkit-animation-duration:763ms;animation-duration:763ms}.anim-duration-764{-webkit-animation-duration:764ms;animation-duration:764ms}.anim-duration-765{-webkit-animation-duration:765ms;animation-duration:765ms}.anim-duration-766{-webkit-animation-duration:766ms;animation-duration:766ms}.anim-duration-767{-webkit-animation-duration:767ms;animation-duration:767ms}.anim-duration-768{-webkit-animation-duration:768ms;animation-duration:768ms}.anim-duration-769{-webkit-animation-duration:769ms;animation-duration:769ms}.anim-duration-770{-webkit-animation-duration:.77s;animation-duration:.77s}.anim-duration-771{-webkit-animation-duration:771ms;animation-duration:771ms}.anim-duration-772{-webkit-animation-duration:772ms;animation-duration:772ms}.anim-duration-773{-webkit-animation-duration:773ms;animation-duration:773ms}.anim-duration-774{-webkit-animation-duration:774ms;animation-duration:774ms}.anim-duration-775{-webkit-animation-duration:775ms;animation-duration:775ms}.anim-duration-776{-webkit-animation-duration:776ms;animation-duration:776ms}.anim-duration-777{-webkit-animation-duration:777ms;animation-duration:777ms}.anim-duration-778{-webkit-animation-duration:778ms;animation-duration:778ms}.anim-duration-779{-webkit-animation-duration:779ms;animation-duration:779ms}.anim-duration-780{-webkit-animation-duration:.78s;animation-duration:.78s}.anim-duration-781{-webkit-animation-duration:781ms;animation-duration:781ms}.anim-duration-782{-webkit-animation-duration:782ms;animation-duration:782ms}.anim-duration-783{-webkit-animation-duration:783ms;animation-duration:783ms}.anim-duration-784{-webkit-animation-duration:784ms;animation-duration:784ms}.anim-duration-785{-webkit-animation-duration:785ms;animation-duration:785ms}.anim-duration-786{-webkit-animation-duration:786ms;animation-duration:786ms}.anim-duration-787{-webkit-animation-duration:787ms;animation-duration:787ms}.anim-duration-788{-webkit-animation-duration:788ms;animation-duration:788ms}.anim-duration-789{-webkit-animation-duration:789ms;animation-duration:789ms}.anim-duration-790{-webkit-animation-duration:.79s;animation-duration:.79s}.anim-duration-791{-webkit-animation-duration:791ms;animation-duration:791ms}.anim-duration-792{-webkit-animation-duration:792ms;animation-duration:792ms}.anim-duration-793{-webkit-animation-duration:793ms;animation-duration:793ms}.anim-duration-794{-webkit-animation-duration:794ms;animation-duration:794ms}.anim-duration-795{-webkit-animation-duration:795ms;animation-duration:795ms}.anim-duration-796{-webkit-animation-duration:796ms;animation-duration:796ms}.anim-duration-797{-webkit-animation-duration:797ms;animation-duration:797ms}.anim-duration-798{-webkit-animation-duration:798ms;animation-duration:798ms}.anim-duration-799{-webkit-animation-duration:799ms;animation-duration:799ms}.anim-duration-800{-webkit-animation-duration:.8s;animation-duration:.8s}.anim-duration-801{-webkit-animation-duration:801ms;animation-duration:801ms}.anim-duration-802{-webkit-animation-duration:802ms;animation-duration:802ms}.anim-duration-803{-webkit-animation-duration:803ms;animation-duration:803ms}.anim-duration-804{-webkit-animation-duration:804ms;animation-duration:804ms}.anim-duration-805{-webkit-animation-duration:805ms;animation-duration:805ms}.anim-duration-806{-webkit-animation-duration:806ms;animation-duration:806ms}.anim-duration-807{-webkit-animation-duration:807ms;animation-duration:807ms}.anim-duration-808{-webkit-animation-duration:808ms;animation-duration:808ms}.anim-duration-809{-webkit-animation-duration:809ms;animation-duration:809ms}.anim-duration-810{-webkit-animation-duration:.81s;animation-duration:.81s}.anim-duration-811{-webkit-animation-duration:811ms;animation-duration:811ms}.anim-duration-812{-webkit-animation-duration:812ms;animation-duration:812ms}.anim-duration-813{-webkit-animation-duration:813ms;animation-duration:813ms}.anim-duration-814{-webkit-animation-duration:814ms;animation-duration:814ms}.anim-duration-815{-webkit-animation-duration:815ms;animation-duration:815ms}.anim-duration-816{-webkit-animation-duration:816ms;animation-duration:816ms}.anim-duration-817{-webkit-animation-duration:817ms;animation-duration:817ms}.anim-duration-818{-webkit-animation-duration:818ms;animation-duration:818ms}.anim-duration-819{-webkit-animation-duration:819ms;animation-duration:819ms}.anim-duration-820{-webkit-animation-duration:.82s;animation-duration:.82s}.anim-duration-821{-webkit-animation-duration:821ms;animation-duration:821ms}.anim-duration-822{-webkit-animation-duration:822ms;animation-duration:822ms}.anim-duration-823{-webkit-animation-duration:823ms;animation-duration:823ms}.anim-duration-824{-webkit-animation-duration:824ms;animation-duration:824ms}.anim-duration-825{-webkit-animation-duration:825ms;animation-duration:825ms}.anim-duration-826{-webkit-animation-duration:826ms;animation-duration:826ms}.anim-duration-827{-webkit-animation-duration:827ms;animation-duration:827ms}.anim-duration-828{-webkit-animation-duration:828ms;animation-duration:828ms}.anim-duration-829{-webkit-animation-duration:829ms;animation-duration:829ms}.anim-duration-830{-webkit-animation-duration:.83s;animation-duration:.83s}.anim-duration-831{-webkit-animation-duration:831ms;animation-duration:831ms}.anim-duration-832{-webkit-animation-duration:832ms;animation-duration:832ms}.anim-duration-833{-webkit-animation-duration:833ms;animation-duration:833ms}.anim-duration-834{-webkit-animation-duration:834ms;animation-duration:834ms}.anim-duration-835{-webkit-animation-duration:835ms;animation-duration:835ms}.anim-duration-836{-webkit-animation-duration:836ms;animation-duration:836ms}.anim-duration-837{-webkit-animation-duration:837ms;animation-duration:837ms}.anim-duration-838{-webkit-animation-duration:838ms;animation-duration:838ms}.anim-duration-839{-webkit-animation-duration:839ms;animation-duration:839ms}.anim-duration-840{-webkit-animation-duration:.84s;animation-duration:.84s}.anim-duration-841{-webkit-animation-duration:841ms;animation-duration:841ms}.anim-duration-842{-webkit-animation-duration:842ms;animation-duration:842ms}.anim-duration-843{-webkit-animation-duration:843ms;animation-duration:843ms}.anim-duration-844{-webkit-animation-duration:844ms;animation-duration:844ms}.anim-duration-845{-webkit-animation-duration:845ms;animation-duration:845ms}.anim-duration-846{-webkit-animation-duration:846ms;animation-duration:846ms}.anim-duration-847{-webkit-animation-duration:847ms;animation-duration:847ms}.anim-duration-848{-webkit-animation-duration:848ms;animation-duration:848ms}.anim-duration-849{-webkit-animation-duration:849ms;animation-duration:849ms}.anim-duration-850{-webkit-animation-duration:.85s;animation-duration:.85s}.anim-duration-851{-webkit-animation-duration:851ms;animation-duration:851ms}.anim-duration-852{-webkit-animation-duration:852ms;animation-duration:852ms}.anim-duration-853{-webkit-animation-duration:853ms;animation-duration:853ms}.anim-duration-854{-webkit-animation-duration:854ms;animation-duration:854ms}.anim-duration-855{-webkit-animation-duration:855ms;animation-duration:855ms}.anim-duration-856{-webkit-animation-duration:856ms;animation-duration:856ms}.anim-duration-857{-webkit-animation-duration:857ms;animation-duration:857ms}.anim-duration-858{-webkit-animation-duration:858ms;animation-duration:858ms}.anim-duration-859{-webkit-animation-duration:859ms;animation-duration:859ms}.anim-duration-860{-webkit-animation-duration:.86s;animation-duration:.86s}.anim-duration-861{-webkit-animation-duration:861ms;animation-duration:861ms}.anim-duration-862{-webkit-animation-duration:862ms;animation-duration:862ms}.anim-duration-863{-webkit-animation-duration:863ms;animation-duration:863ms}.anim-duration-864{-webkit-animation-duration:864ms;animation-duration:864ms}.anim-duration-865{-webkit-animation-duration:865ms;animation-duration:865ms}.anim-duration-866{-webkit-animation-duration:866ms;animation-duration:866ms}.anim-duration-867{-webkit-animation-duration:867ms;animation-duration:867ms}.anim-duration-868{-webkit-animation-duration:868ms;animation-duration:868ms}.anim-duration-869{-webkit-animation-duration:869ms;animation-duration:869ms}.anim-duration-870{-webkit-animation-duration:.87s;animation-duration:.87s}.anim-duration-871{-webkit-animation-duration:871ms;animation-duration:871ms}.anim-duration-872{-webkit-animation-duration:872ms;animation-duration:872ms}.anim-duration-873{-webkit-animation-duration:873ms;animation-duration:873ms}.anim-duration-874{-webkit-animation-duration:874ms;animation-duration:874ms}.anim-duration-875{-webkit-animation-duration:875ms;animation-duration:875ms}.anim-duration-876{-webkit-animation-duration:876ms;animation-duration:876ms}.anim-duration-877{-webkit-animation-duration:877ms;animation-duration:877ms}.anim-duration-878{-webkit-animation-duration:878ms;animation-duration:878ms}.anim-duration-879{-webkit-animation-duration:879ms;animation-duration:879ms}.anim-duration-880{-webkit-animation-duration:.88s;animation-duration:.88s}.anim-duration-881{-webkit-animation-duration:881ms;animation-duration:881ms}.anim-duration-882{-webkit-animation-duration:882ms;animation-duration:882ms}.anim-duration-883{-webkit-animation-duration:883ms;animation-duration:883ms}.anim-duration-884{-webkit-animation-duration:884ms;animation-duration:884ms}.anim-duration-885{-webkit-animation-duration:885ms;animation-duration:885ms}.anim-duration-886{-webkit-animation-duration:886ms;animation-duration:886ms}.anim-duration-887{-webkit-animation-duration:887ms;animation-duration:887ms}.anim-duration-888{-webkit-animation-duration:888ms;animation-duration:888ms}.anim-duration-889{-webkit-animation-duration:889ms;animation-duration:889ms}.anim-duration-890{-webkit-animation-duration:.89s;animation-duration:.89s}.anim-duration-891{-webkit-animation-duration:891ms;animation-duration:891ms}.anim-duration-892{-webkit-animation-duration:892ms;animation-duration:892ms}.anim-duration-893{-webkit-animation-duration:893ms;animation-duration:893ms}.anim-duration-894{-webkit-animation-duration:894ms;animation-duration:894ms}.anim-duration-895{-webkit-animation-duration:895ms;animation-duration:895ms}.anim-duration-896{-webkit-animation-duration:896ms;animation-duration:896ms}.anim-duration-897{-webkit-animation-duration:897ms;animation-duration:897ms}.anim-duration-898{-webkit-animation-duration:898ms;animation-duration:898ms}.anim-duration-899{-webkit-animation-duration:899ms;animation-duration:899ms}.anim-duration-900{-webkit-animation-duration:.9s;animation-duration:.9s}.anim-duration-901{-webkit-animation-duration:901ms;animation-duration:901ms}.anim-duration-902{-webkit-animation-duration:902ms;animation-duration:902ms}.anim-duration-903{-webkit-animation-duration:903ms;animation-duration:903ms}.anim-duration-904{-webkit-animation-duration:904ms;animation-duration:904ms}.anim-duration-905{-webkit-animation-duration:905ms;animation-duration:905ms}.anim-duration-906{-webkit-animation-duration:906ms;animation-duration:906ms}.anim-duration-907{-webkit-animation-duration:907ms;animation-duration:907ms}.anim-duration-908{-webkit-animation-duration:908ms;animation-duration:908ms}.anim-duration-909{-webkit-animation-duration:909ms;animation-duration:909ms}.anim-duration-910{-webkit-animation-duration:.91s;animation-duration:.91s}.anim-duration-911{-webkit-animation-duration:911ms;animation-duration:911ms}.anim-duration-912{-webkit-animation-duration:912ms;animation-duration:912ms}.anim-duration-913{-webkit-animation-duration:913ms;animation-duration:913ms}.anim-duration-914{-webkit-animation-duration:914ms;animation-duration:914ms}.anim-duration-915{-webkit-animation-duration:915ms;animation-duration:915ms}.anim-duration-916{-webkit-animation-duration:916ms;animation-duration:916ms}.anim-duration-917{-webkit-animation-duration:917ms;animation-duration:917ms}.anim-duration-918{-webkit-animation-duration:918ms;animation-duration:918ms}.anim-duration-919{-webkit-animation-duration:919ms;animation-duration:919ms}.anim-duration-920{-webkit-animation-duration:.92s;animation-duration:.92s}.anim-duration-921{-webkit-animation-duration:921ms;animation-duration:921ms}.anim-duration-922{-webkit-animation-duration:922ms;animation-duration:922ms}.anim-duration-923{-webkit-animation-duration:923ms;animation-duration:923ms}.anim-duration-924{-webkit-animation-duration:924ms;animation-duration:924ms}.anim-duration-925{-webkit-animation-duration:925ms;animation-duration:925ms}.anim-duration-926{-webkit-animation-duration:926ms;animation-duration:926ms}.anim-duration-927{-webkit-animation-duration:927ms;animation-duration:927ms}.anim-duration-928{-webkit-animation-duration:928ms;animation-duration:928ms}.anim-duration-929{-webkit-animation-duration:929ms;animation-duration:929ms}.anim-duration-930{-webkit-animation-duration:.93s;animation-duration:.93s}.anim-duration-931{-webkit-animation-duration:931ms;animation-duration:931ms}.anim-duration-932{-webkit-animation-duration:932ms;animation-duration:932ms}.anim-duration-933{-webkit-animation-duration:933ms;animation-duration:933ms}.anim-duration-934{-webkit-animation-duration:934ms;animation-duration:934ms}.anim-duration-935{-webkit-animation-duration:935ms;animation-duration:935ms}.anim-duration-936{-webkit-animation-duration:936ms;animation-duration:936ms}.anim-duration-937{-webkit-animation-duration:937ms;animation-duration:937ms}.anim-duration-938{-webkit-animation-duration:938ms;animation-duration:938ms}.anim-duration-939{-webkit-animation-duration:939ms;animation-duration:939ms}.anim-duration-940{-webkit-animation-duration:.94s;animation-duration:.94s}.anim-duration-941{-webkit-animation-duration:941ms;animation-duration:941ms}.anim-duration-942{-webkit-animation-duration:942ms;animation-duration:942ms}.anim-duration-943{-webkit-animation-duration:943ms;animation-duration:943ms}.anim-duration-944{-webkit-animation-duration:944ms;animation-duration:944ms}.anim-duration-945{-webkit-animation-duration:945ms;animation-duration:945ms}.anim-duration-946{-webkit-animation-duration:946ms;animation-duration:946ms}.anim-duration-947{-webkit-animation-duration:947ms;animation-duration:947ms}.anim-duration-948{-webkit-animation-duration:948ms;animation-duration:948ms}.anim-duration-949{-webkit-animation-duration:949ms;animation-duration:949ms}.anim-duration-950{-webkit-animation-duration:.95s;animation-duration:.95s}.anim-duration-951{-webkit-animation-duration:951ms;animation-duration:951ms}.anim-duration-952{-webkit-animation-duration:952ms;animation-duration:952ms}.anim-duration-953{-webkit-animation-duration:953ms;animation-duration:953ms}.anim-duration-954{-webkit-animation-duration:954ms;animation-duration:954ms}.anim-duration-955{-webkit-animation-duration:955ms;animation-duration:955ms}.anim-duration-956{-webkit-animation-duration:956ms;animation-duration:956ms}.anim-duration-957{-webkit-animation-duration:957ms;animation-duration:957ms}.anim-duration-958{-webkit-animation-duration:958ms;animation-duration:958ms}.anim-duration-959{-webkit-animation-duration:959ms;animation-duration:959ms}.anim-duration-960{-webkit-animation-duration:.96s;animation-duration:.96s}.anim-duration-961{-webkit-animation-duration:961ms;animation-duration:961ms}.anim-duration-962{-webkit-animation-duration:962ms;animation-duration:962ms}.anim-duration-963{-webkit-animation-duration:963ms;animation-duration:963ms}.anim-duration-964{-webkit-animation-duration:964ms;animation-duration:964ms}.anim-duration-965{-webkit-animation-duration:965ms;animation-duration:965ms}.anim-duration-966{-webkit-animation-duration:966ms;animation-duration:966ms}.anim-duration-967{-webkit-animation-duration:967ms;animation-duration:967ms}.anim-duration-968{-webkit-animation-duration:968ms;animation-duration:968ms}.anim-duration-969{-webkit-animation-duration:969ms;animation-duration:969ms}.anim-duration-970{-webkit-animation-duration:.97s;animation-duration:.97s}.anim-duration-971{-webkit-animation-duration:971ms;animation-duration:971ms}.anim-duration-972{-webkit-animation-duration:972ms;animation-duration:972ms}.anim-duration-973{-webkit-animation-duration:973ms;animation-duration:973ms}.anim-duration-974{-webkit-animation-duration:974ms;animation-duration:974ms}.anim-duration-975{-webkit-animation-duration:975ms;animation-duration:975ms}.anim-duration-976{-webkit-animation-duration:976ms;animation-duration:976ms}.anim-duration-977{-webkit-animation-duration:977ms;animation-duration:977ms}.anim-duration-978{-webkit-animation-duration:978ms;animation-duration:978ms}.anim-duration-979{-webkit-animation-duration:979ms;animation-duration:979ms}.anim-duration-980{-webkit-animation-duration:.98s;animation-duration:.98s}.anim-duration-981{-webkit-animation-duration:981ms;animation-duration:981ms}.anim-duration-982{-webkit-animation-duration:982ms;animation-duration:982ms}.anim-duration-983{-webkit-animation-duration:983ms;animation-duration:983ms}.anim-duration-984{-webkit-animation-duration:984ms;animation-duration:984ms}.anim-duration-985{-webkit-animation-duration:985ms;animation-duration:985ms}.anim-duration-986{-webkit-animation-duration:986ms;animation-duration:986ms}.anim-duration-987{-webkit-animation-duration:987ms;animation-duration:987ms}.anim-duration-988{-webkit-animation-duration:988ms;animation-duration:988ms}.anim-duration-989{-webkit-animation-duration:989ms;animation-duration:989ms}.anim-duration-990{-webkit-animation-duration:.99s;animation-duration:.99s}.anim-duration-991{-webkit-animation-duration:991ms;animation-duration:991ms}.anim-duration-992{-webkit-animation-duration:992ms;animation-duration:992ms}.anim-duration-993{-webkit-animation-duration:993ms;animation-duration:993ms}.anim-duration-994{-webkit-animation-duration:994ms;animation-duration:994ms}.anim-duration-995{-webkit-animation-duration:995ms;animation-duration:995ms}.anim-duration-996{-webkit-animation-duration:996ms;animation-duration:996ms}.anim-duration-997{-webkit-animation-duration:997ms;animation-duration:997ms}.anim-duration-998{-webkit-animation-duration:998ms;animation-duration:998ms}.anim-duration-999{-webkit-animation-duration:999ms;animation-duration:999ms}.anim-duration-1000{-webkit-animation-duration:1s;animation-duration:1s}@font-face{font-display:swap;font-family:Jost;font-style:italic;font-weight:100;src:url(/fonts/92zUtBhPNqw73oHt5D4hTxM.woff2) format("woff2");unicode-range:U+0400-045f,U+0490-0491,U+04b0-04b1,U+2116}@font-face{font-display:swap;font-family:Jost;font-style:italic;font-weight:100;src:url(/fonts/92zUtBhPNqw73oHt7j4hTxM.woff2) format("woff2");unicode-range:U+0100-024f,U+0259,U+1e??,U+2020,U+20a0-20ab,U+20ad-20cf,U+2113,U+2c60-2c7f,U+a720-a7ff}@font-face{font-display:swap;font-family:Jost;font-style:italic;font-weight:100;src:url(/fonts/92zUtBhPNqw73oHt4D4h.woff2) format("woff2");unicode-range:U+00??,U+0131,U+0152-0153,U+02bb-02bc,U+02c6,U+02da,U+02dc,U+2000-206f,U+2074,U+20ac,U+2122,U+2191,U+2193,U+2212,U+2215,U+feff,U+fffd}@font-face{font-display:swap;font-family:Jost;font-style:italic;font-weight:200;src:url(/fonts/92zUtBhPNqw73oHt5D4hTxM.woff2) format("woff2");unicode-range:U+0400-045f,U+0490-0491,U+04b0-04b1,U+2116}@font-face{font-display:swap;font-family:Jost;font-style:italic;font-weight:200;src:url(/fonts/92zUtBhPNqw73oHt7j4hTxM.woff2) format("woff2");unicode-range:U+0100-024f,U+0259,U+1e??,U+2020,U+20a0-20ab,U+20ad-20cf,U+2113,U+2c60-2c7f,U+a720-a7ff}@font-face{font-display:swap;font-family:Jost;font-style:italic;font-weight:200;src:url(/fonts/92zUtBhPNqw73oHt4D4h.woff2) format("woff2");unicode-range:U+00??,U+0131,U+0152-0153,U+02bb-02bc,U+02c6,U+02da,U+02dc,U+2000-206f,U+2074,U+20ac,U+2122,U+2191,U+2193,U+2212,U+2215,U+feff,U+fffd}@font-face{font-display:swap;font-family:Jost;font-style:italic;font-weight:300;src:url(/fonts/92zUtBhPNqw73oHt5D4hTxM.woff2) format("woff2");unicode-range:U+0400-045f,U+0490-0491,U+04b0-04b1,U+2116}@font-face{font-display:swap;font-family:Jost;font-style:italic;font-weight:300;src:url(/fonts/92zUtBhPNqw73oHt7j4hTxM.woff2) format("woff2");unicode-range:U+0100-024f,U+0259,U+1e??,U+2020,U+20a0-20ab,U+20ad-20cf,U+2113,U+2c60-2c7f,U+a720-a7ff}@font-face{font-display:swap;font-family:Jost;font-style:italic;font-weight:300;src:url(/fonts/92zUtBhPNqw73oHt4D4h.woff2) format("woff2");unicode-range:U+00??,U+0131,U+0152-0153,U+02bb-02bc,U+02c6,U+02da,U+02dc,U+2000-206f,U+2074,U+20ac,U+2122,U+2191,U+2193,U+2212,U+2215,U+feff,U+fffd}@font-face{font-display:swap;font-family:Jost;font-style:italic;font-weight:400;src:url(/fonts/92zUtBhPNqw73oHt5D4hTxM.woff2) format("woff2");unicode-range:U+0400-045f,U+0490-0491,U+04b0-04b1,U+2116}@font-face{font-display:swap;font-family:Jost;font-style:italic;font-weight:400;src:url(/fonts/92zUtBhPNqw73oHt7j4hTxM.woff2) format("woff2");unicode-range:U+0100-024f,U+0259,U+1e??,U+2020,U+20a0-20ab,U+20ad-20cf,U+2113,U+2c60-2c7f,U+a720-a7ff}@font-face{font-display:swap;font-family:Jost;font-style:italic;font-weight:400;src:url(/fonts/92zUtBhPNqw73oHt4D4h.woff2) format("woff2");unicode-range:U+00??,U+0131,U+0152-0153,U+02bb-02bc,U+02c6,U+02da,U+02dc,U+2000-206f,U+2074,U+20ac,U+2122,U+2191,U+2193,U+2212,U+2215,U+feff,U+fffd}@font-face{font-display:swap;font-family:Jost;font-style:italic;font-weight:500;src:url(/fonts/92zUtBhPNqw73oHt5D4hTxM.woff2) format("woff2");unicode-range:U+0400-045f,U+0490-0491,U+04b0-04b1,U+2116}@font-face{font-display:swap;font-family:Jost;font-style:italic;font-weight:500;src:url(/fonts/92zUtBhPNqw73oHt7j4hTxM.woff2) format("woff2");unicode-range:U+0100-024f,U+0259,U+1e??,U+2020,U+20a0-20ab,U+20ad-20cf,U+2113,U+2c60-2c7f,U+a720-a7ff}@font-face{font-display:swap;font-family:Jost;font-style:italic;font-weight:500;src:url(/fonts/92zUtBhPNqw73oHt4D4h.woff2) format("woff2");unicode-range:U+00??,U+0131,U+0152-0153,U+02bb-02bc,U+02c6,U+02da,U+02dc,U+2000-206f,U+2074,U+20ac,U+2122,U+2191,U+2193,U+2212,U+2215,U+feff,U+fffd}@font-face{font-display:swap;font-family:Jost;font-style:italic;font-weight:600;src:url(/fonts/92zUtBhPNqw73oHt5D4hTxM.woff2) format("woff2");unicode-range:U+0400-045f,U+0490-0491,U+04b0-04b1,U+2116}@font-face{font-display:swap;font-family:Jost;font-style:italic;font-weight:600;src:url(/fonts/92zUtBhPNqw73oHt7j4hTxM.woff2) format("woff2");unicode-range:U+0100-024f,U+0259,U+1e??,U+2020,U+20a0-20ab,U+20ad-20cf,U+2113,U+2c60-2c7f,U+a720-a7ff}@font-face{font-display:swap;font-family:Jost;font-style:italic;font-weight:600;src:url(/fonts/92zUtBhPNqw73oHt4D4h.woff2) format("woff2");unicode-range:U+00??,U+0131,U+0152-0153,U+02bb-02bc,U+02c6,U+02da,U+02dc,U+2000-206f,U+2074,U+20ac,U+2122,U+2191,U+2193,U+2212,U+2215,U+feff,U+fffd}@font-face{font-display:swap;font-family:Jost;font-style:italic;font-weight:700;src:url(/fonts/92zUtBhPNqw73oHt5D4hTxM.woff2) format("woff2");unicode-range:U+0400-045f,U+0490-0491,U+04b0-04b1,U+2116}@font-face{font-display:swap;font-family:Jost;font-style:italic;font-weight:700;src:url(/fonts/92zUtBhPNqw73oHt7j4hTxM.woff2) format("woff2");unicode-range:U+0100-024f,U+0259,U+1e??,U+2020,U+20a0-20ab,U+20ad-20cf,U+2113,U+2c60-2c7f,U+a720-a7ff}@font-face{font-display:swap;font-family:Jost;font-style:italic;font-weight:700;src:url(/fonts/92zUtBhPNqw73oHt4D4h.woff2) format("woff2");unicode-range:U+00??,U+0131,U+0152-0153,U+02bb-02bc,U+02c6,U+02da,U+02dc,U+2000-206f,U+2074,U+20ac,U+2122,U+2191,U+2193,U+2212,U+2215,U+feff,U+fffd}@font-face{font-display:swap;font-family:Jost;font-style:italic;font-weight:800;src:url(/fonts/92zUtBhPNqw73oHt5D4hTxM.woff2) format("woff2");unicode-range:U+0400-045f,U+0490-0491,U+04b0-04b1,U+2116}@font-face{font-display:swap;font-family:Jost;font-style:italic;font-weight:800;src:url(/fonts/92zUtBhPNqw73oHt7j4hTxM.woff2) format("woff2");unicode-range:U+0100-024f,U+0259,U+1e??,U+2020,U+20a0-20ab,U+20ad-20cf,U+2113,U+2c60-2c7f,U+a720-a7ff}@font-face{font-display:swap;font-family:Jost;font-style:italic;font-weight:800;src:url(/fonts/92zUtBhPNqw73oHt4D4h.woff2) format("woff2");unicode-range:U+00??,U+0131,U+0152-0153,U+02bb-02bc,U+02c6,U+02da,U+02dc,U+2000-206f,U+2074,U+20ac,U+2122,U+2191,U+2193,U+2212,U+2215,U+feff,U+fffd}@font-face{font-display:swap;font-family:Jost;font-style:italic;font-weight:900;src:url(/fonts/92zUtBhPNqw73oHt5D4hTxM.woff2) format("woff2");unicode-range:U+0400-045f,U+0490-0491,U+04b0-04b1,U+2116}@font-face{font-display:swap;font-family:Jost;font-style:italic;font-weight:900;src:url(/fonts/92zUtBhPNqw73oHt7j4hTxM.woff2) format("woff2");unicode-range:U+0100-024f,U+0259,U+1e??,U+2020,U+20a0-20ab,U+20ad-20cf,U+2113,U+2c60-2c7f,U+a720-a7ff}@font-face{font-display:swap;font-family:Jost;font-style:italic;font-weight:900;src:url(/fonts/92zUtBhPNqw73oHt4D4h.woff2) format("woff2");unicode-range:U+00??,U+0131,U+0152-0153,U+02bb-02bc,U+02c6,U+02da,U+02dc,U+2000-206f,U+2074,U+20ac,U+2122,U+2191,U+2193,U+2212,U+2215,U+feff,U+fffd}@font-face{font-display:swap;font-family:Jost;font-style:normal;font-weight:100;src:url(/fonts/92zatBhPNqw73oDd4iYl.woff2) format("woff2");unicode-range:U+0400-045f,U+0490-0491,U+04b0-04b1,U+2116}@font-face{font-display:swap;font-family:Jost;font-style:normal;font-weight:100;src:url(/fonts/92zatBhPNqw73ord4iYl.woff2) format("woff2");unicode-range:U+0100-024f,U+0259,U+1e??,U+2020,U+20a0-20ab,U+20ad-20cf,U+2113,U+2c60-2c7f,U+a720-a7ff}@font-face{font-display:swap;font-family:Jost;font-style:normal;font-weight:100;src:url(/fonts/92zatBhPNqw73oTd4g.woff2) format("woff2");unicode-range:U+00??,U+0131,U+0152-0153,U+02bb-02bc,U+02c6,U+02da,U+02dc,U+2000-206f,U+2074,U+20ac,U+2122,U+2191,U+2193,U+2212,U+2215,U+feff,U+fffd}@font-face{font-display:swap;font-family:Jost;font-style:normal;font-weight:200;src:url(/fonts/92zatBhPNqw73oDd4iYl.woff2) format("woff2");unicode-range:U+0400-045f,U+0490-0491,U+04b0-04b1,U+2116}@font-face{font-display:swap;font-family:Jost;font-style:normal;font-weight:200;src:url(/fonts/92zatBhPNqw73ord4iYl.woff2) format("woff2");unicode-range:U+0100-024f,U+0259,U+1e??,U+2020,U+20a0-20ab,U+20ad-20cf,U+2113,U+2c60-2c7f,U+a720-a7ff}@font-face{font-display:swap;font-family:Jost;font-style:normal;font-weight:200;src:url(/fonts/92zatBhPNqw73oTd4g.woff2) format("woff2");unicode-range:U+00??,U+0131,U+0152-0153,U+02bb-02bc,U+02c6,U+02da,U+02dc,U+2000-206f,U+2074,U+20ac,U+2122,U+2191,U+2193,U+2212,U+2215,U+feff,U+fffd}@font-face{font-display:swap;font-family:Jost;font-style:normal;font-weight:300;src:url(/fonts/92zatBhPNqw73oDd4iYl.woff2) format("woff2");unicode-range:U+0400-045f,U+0490-0491,U+04b0-04b1,U+2116}@font-face{font-display:swap;font-family:Jost;font-style:normal;font-weight:300;src:url(/fonts/92zatBhPNqw73ord4iYl.woff2) format("woff2");unicode-range:U+0100-024f,U+0259,U+1e??,U+2020,U+20a0-20ab,U+20ad-20cf,U+2113,U+2c60-2c7f,U+a720-a7ff}@font-face{font-display:swap;font-family:Jost;font-style:normal;font-weight:300;src:url(/fonts/92zatBhPNqw73oTd4g.woff2) format("woff2");unicode-range:U+00??,U+0131,U+0152-0153,U+02bb-02bc,U+02c6,U+02da,U+02dc,U+2000-206f,U+2074,U+20ac,U+2122,U+2191,U+2193,U+2212,U+2215,U+feff,U+fffd}@font-face{font-display:swap;font-family:Jost;font-style:normal;font-weight:400;src:url(/fonts/92zatBhPNqw73oDd4iYl.woff2) format("woff2");unicode-range:U+0400-045f,U+0490-0491,U+04b0-04b1,U+2116}@font-face{font-display:swap;font-family:Jost;font-style:normal;font-weight:400;src:url(/fonts/92zatBhPNqw73ord4iYl.woff2) format("woff2");unicode-range:U+0100-024f,U+0259,U+1e??,U+2020,U+20a0-20ab,U+20ad-20cf,U+2113,U+2c60-2c7f,U+a720-a7ff}@font-face{font-display:swap;font-family:Jost;font-style:normal;font-weight:400;src:url(/fonts/92zatBhPNqw73oTd4g.woff2) format("woff2");unicode-range:U+00??,U+0131,U+0152-0153,U+02bb-02bc,U+02c6,U+02da,U+02dc,U+2000-206f,U+2074,U+20ac,U+2122,U+2191,U+2193,U+2212,U+2215,U+feff,U+fffd}@font-face{font-display:swap;font-family:Jost;font-style:normal;font-weight:500;src:url(/fonts/92zatBhPNqw73oDd4iYl.woff2) format("woff2");unicode-range:U+0400-045f,U+0490-0491,U+04b0-04b1,U+2116}@font-face{font-display:swap;font-family:Jost;font-style:normal;font-weight:500;src:url(/fonts/92zatBhPNqw73ord4iYl.woff2) format("woff2");unicode-range:U+0100-024f,U+0259,U+1e??,U+2020,U+20a0-20ab,U+20ad-20cf,U+2113,U+2c60-2c7f,U+a720-a7ff}@font-face{font-display:swap;font-family:Jost;font-style:normal;font-weight:500;src:url(/fonts/92zatBhPNqw73oTd4g.woff2) format("woff2");unicode-range:U+00??,U+0131,U+0152-0153,U+02bb-02bc,U+02c6,U+02da,U+02dc,U+2000-206f,U+2074,U+20ac,U+2122,U+2191,U+2193,U+2212,U+2215,U+feff,U+fffd}@font-face{font-display:swap;font-family:Jost;font-style:normal;font-weight:600;src:url(/fonts/92zatBhPNqw73oDd4iYl.woff2) format("woff2");unicode-range:U+0400-045f,U+0490-0491,U+04b0-04b1,U+2116}@font-face{font-display:swap;font-family:Jost;font-style:normal;font-weight:600;src:url(/fonts/92zatBhPNqw73ord4iYl.woff2) format("woff2");unicode-range:U+0100-024f,U+0259,U+1e??,U+2020,U+20a0-20ab,U+20ad-20cf,U+2113,U+2c60-2c7f,U+a720-a7ff}@font-face{font-display:swap;font-family:Jost;font-style:normal;font-weight:600;src:url(/fonts/92zatBhPNqw73oTd4g.woff2) format("woff2");unicode-range:U+00??,U+0131,U+0152-0153,U+02bb-02bc,U+02c6,U+02da,U+02dc,U+2000-206f,U+2074,U+20ac,U+2122,U+2191,U+2193,U+2212,U+2215,U+feff,U+fffd}@font-face{font-display:swap;font-family:Jost;font-style:normal;font-weight:700;src:url(/fonts/92zatBhPNqw73oDd4iYl.woff2) format("woff2");unicode-range:U+0400-045f,U+0490-0491,U+04b0-04b1,U+2116}@font-face{font-display:swap;font-family:Jost;font-style:normal;font-weight:700;src:url(/fonts/92zatBhPNqw73ord4iYl.woff2) format("woff2");unicode-range:U+0100-024f,U+0259,U+1e??,U+2020,U+20a0-20ab,U+20ad-20cf,U+2113,U+2c60-2c7f,U+a720-a7ff}@font-face{font-display:swap;font-family:Jost;font-style:normal;font-weight:700;src:url(/fonts/92zatBhPNqw73oTd4g.woff2) format("woff2");unicode-range:U+00??,U+0131,U+0152-0153,U+02bb-02bc,U+02c6,U+02da,U+02dc,U+2000-206f,U+2074,U+20ac,U+2122,U+2191,U+2193,U+2212,U+2215,U+feff,U+fffd}@font-face{font-display:swap;font-family:Jost;font-style:normal;font-weight:800;src:url(/fonts/92zatBhPNqw73oDd4iYl.woff2) format("woff2");unicode-range:U+0400-045f,U+0490-0491,U+04b0-04b1,U+2116}@font-face{font-display:swap;font-family:Jost;font-style:normal;font-weight:800;src:url(/fonts/92zatBhPNqw73ord4iYl.woff2) format("woff2");unicode-range:U+0100-024f,U+0259,U+1e??,U+2020,U+20a0-20ab,U+20ad-20cf,U+2113,U+2c60-2c7f,U+a720-a7ff}@font-face{font-display:swap;font-family:Jost;font-style:normal;font-weight:800;src:url(/fonts/92zatBhPNqw73oTd4g.woff2) format("woff2");unicode-range:U+00??,U+0131,U+0152-0153,U+02bb-02bc,U+02c6,U+02da,U+02dc,U+2000-206f,U+2074,U+20ac,U+2122,U+2191,U+2193,U+2212,U+2215,U+feff,U+fffd}@font-face{font-display:swap;font-family:Jost;font-style:normal;font-weight:900;src:url(/fonts/92zatBhPNqw73oDd4iYl.woff2) format("woff2");unicode-range:U+0400-045f,U+0490-0491,U+04b0-04b1,U+2116}@font-face{font-display:swap;font-family:Jost;font-style:normal;font-weight:900;src:url(/fonts/92zatBhPNqw73ord4iYl.woff2) format("woff2");unicode-range:U+0100-024f,U+0259,U+1e??,U+2020,U+20a0-20ab,U+20ad-20cf,U+2113,U+2c60-2c7f,U+a720-a7ff}@font-face{font-display:swap;font-family:Jost;font-style:normal;font-weight:900;src:url(/fonts/92zatBhPNqw73oTd4g.woff2) format("woff2");unicode-range:U+00??,U+0131,U+0152-0153,U+02bb-02bc,U+02c6,U+02da,U+02dc,U+2000-206f,U+2074,U+20ac,U+2122,U+2191,U+2193,U+2212,U+2215,U+feff,U+fffd}.lab,.lar,.las{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;text-rendering:auto;display:inline-block;font-style:normal;font-variant:normal;line-height:1}@font-face{font-display:auto;font-family:Line Awesome Brands;font-style:normal;font-weight:400;src:url(../fonts/la-brands-400.eot);src:url(../fonts/la-brands-400.eot?#iefix) format("embedded-opentype"),url(../fonts/la-brands-400.woff2) format("woff2"),url(../fonts/la-brands-400.woff) format("woff"),url(../fonts/la-brands-400.ttf) format("truetype"),url(../fonts/la-brands-400.svg#lineawesome) format("svg")}.lab{font-family:Line Awesome Brands}@font-face{font-display:auto;font-family:Line Awesome Free;font-style:normal;font-weight:400;src:url(../fonts/la-regular-400.eot);src:url(../fonts/la-regular-400.eot?#iefix) format("embedded-opentype"),url(../fonts/la-regular-400.woff2) format("woff2"),url(../fonts/la-regular-400.woff) format("woff"),url(../fonts/la-regular-400.ttf) format("truetype"),url(../fonts/la-regular-400.svg#lineawesome) format("svg")}.lab,.lar{font-weight:400}@font-face{font-display:auto;font-family:Line Awesome Free;font-style:normal;font-weight:900;src:url(../fonts/la-solid-900.eot);src:url(../fonts/la-solid-900.eot?#iefix) format("embedded-opentype"),url(../fonts/la-solid-900.woff2) format("woff2"),url(../fonts/la-solid-900.woff) format("woff"),url(../fonts/la-solid-900.ttf) format("truetype"),url(../fonts/la-solid-900.svg#lineawesome) format("svg")}.lar,.las{font-family:Line Awesome Free}.las{font-weight:900}.la-lg{font-size:1.33333em;line-height:.75em;vertical-align:-.0667em}.la-xs{font-size:.75em}.la-2x{font-size:1em;font-size:2em}.la-3x{font-size:3em}.la-4x{font-size:4em}.la-5x{font-size:5em}.la-6x{font-size:6em}.la-7x{font-size:7em}.la-8x{font-size:8em}.la-9x{font-size:9em}.la-10x{font-size:10em}.la-fw{text-align:center;width:1.25em}.la-ul{list-style-type:none;margin-left:1.4285714286em;padding-left:0}.la-ul>li{position:relative}.la-li{left:-2em;line-height:inherit;position:absolute;text-align:center;width:1.4285714286em}.la-li.la-lg{left:-1.1428571429em}.la-border{border:.08em solid #eee;border-radius:.1em;padding:.2em .25em .15em}.la.la-pull-left{margin-right:.3em}.la.la-pull-right{margin-left:.3em}.la.pull-left{margin-right:.3em}.la.pull-right{margin-left:.3em}.la-pull-left{float:left}.la-pull-right{float:right}.la.la-pull-left,.lab.la-pull-left,.lal.la-pull-left,.lar.la-pull-left,.las.la-pull-left{margin-right:.3em}.la.la-pull-right,.lab.la-pull-right,.lal.la-pull-right,.lar.la-pull-right,.las.la-pull-right{margin-left:.3em}.la-spin{-webkit-animation:la-spin 2s linear infinite;animation:la-spin 2s linear infinite}.la-pulse{-webkit-animation:la-spin 1s steps(8) infinite;animation:la-spin 1s steps(8) infinite}@-webkit-keyframes la-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes la-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.la-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";transform:rotate(90deg)}.la-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";transform:rotate(180deg)}.la-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";transform:rotate(270deg)}.la-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";transform:scaleX(-1)}.la-flip-vertical{transform:scaleY(-1)}.la-flip-both,.la-flip-horizontal.la-flip-vertical,.la-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)"}.la-flip-both,.la-flip-horizontal.la-flip-vertical{transform:scale(-1)}:root .la-flip-both,:root .la-flip-horizontal,:root .la-flip-vertical,:root .la-rotate-90,:root .la-rotate-180,:root .la-rotate-270{filter:none}.la-stack{display:inline-block;height:2em;line-height:2em;position:relative;vertical-align:middle;width:2.5em}.la-stack-1x,.la-stack-2x{left:0;position:absolute;text-align:center;width:100%}.la-stack-1x{line-height:inherit}.la-stack-2x{font-size:2em}.la-inverse{color:#fff}.la-500px:before{content:""}.la-accessible-icon:before{content:""}.la-accusoft:before{content:""}.la-acquisitions-incorporated:before{content:""}.la-ad:before{content:""}.la-address-book:before{content:""}.la-address-card:before{content:""}.la-adjust:before{content:""}.la-adn:before{content:""}.la-adobe:before{content:""}.la-adversal:before{content:""}.la-affiliatetheme:before{content:""}.la-air-freshener:before{content:""}.la-airbnb:before{content:""}.la-algolia:before{content:""}.la-align-center:before{content:""}.la-align-justify:before{content:""}.la-align-left:before{content:""}.la-align-right:before{content:""}.la-alipay:before{content:""}.la-allergies:before{content:""}.la-amazon:before{content:""}.la-amazon-pay:before{content:""}.la-ambulance:before{content:""}.la-american-sign-language-interpreting:before{content:""}.la-amilia:before{content:""}.la-anchor:before{content:""}.la-android:before{content:""}.la-angellist:before{content:""}.la-angle-double-down:before{content:""}.la-angle-double-left:before{content:""}.la-angle-double-right:before{content:""}.la-angle-double-up:before{content:""}.la-angle-down:before{content:""}.la-angle-left:before{content:""}.la-angle-right:before{content:""}.la-angle-up:before{content:""}.la-angry:before{content:""}.la-angrycreative:before{content:""}.la-angular:before{content:""}.la-ankh:before{content:""}.la-app-store:before{content:""}.la-app-store-ios:before{content:""}.la-apper:before{content:""}.la-apple:before{content:""}.la-apple-alt:before{content:""}.la-apple-pay:before{content:""}.la-archive:before{content:""}.la-archway:before{content:""}.la-arrow-alt-circle-down:before{content:""}.la-arrow-alt-circle-left:before{content:""}.la-arrow-alt-circle-right:before{content:""}.la-arrow-alt-circle-up:before{content:""}.la-arrow-circle-down:before{content:""}.la-arrow-circle-left:before{content:""}.la-arrow-circle-right:before{content:""}.la-arrow-circle-up:before{content:""}.la-arrow-down:before{content:""}.la-arrow-left:before{content:""}.la-arrow-right:before{content:""}.la-arrow-up:before{content:""}.la-arrows-alt:before{content:""}.la-arrows-alt-h:before{content:""}.la-arrows-alt-v:before{content:""}.la-artstation:before{content:""}.la-assistive-listening-systems:before{content:""}.la-asterisk:before{content:""}.la-asymmetrik:before{content:""}.la-at:before{content:""}.la-atlas:before{content:""}.la-atlassian:before{content:""}.la-atom:before{content:""}.la-audible:before{content:""}.la-audio-description:before{content:""}.la-autoprefixer:before{content:""}.la-avianex:before{content:""}.la-aviato:before{content:""}.la-award:before{content:""}.la-aws:before{content:""}.la-baby:before{content:""}.la-baby-carriage:before{content:""}.la-backspace:before{content:""}.la-backward:before{content:""}.la-bacon:before{content:""}.la-balance-scale:before{content:""}.la-balance-scale-left:before{content:""}.la-balance-scale-right:before{content:""}.la-ban:before{content:""}.la-band-aid:before{content:""}.la-bandcamp:before{content:""}.la-barcode:before{content:""}.la-bars:before{content:""}.la-baseball-ball:before{content:""}.la-basketball-ball:before{content:""}.la-bath:before{content:""}.la-battery-empty:before{content:""}.la-battery-full:before{content:""}.la-battery-half:before{content:""}.la-battery-quarter:before{content:""}.la-battery-three-quarters:before{content:""}.la-battle-net:before{content:""}.la-bed:before{content:""}.la-beer:before{content:""}.la-behance:before{content:""}.la-behance-square:before{content:""}.la-bell:before{content:""}.la-bell-slash:before{content:""}.la-bezier-curve:before{content:""}.la-bible:before{content:""}.la-bicycle:before{content:""}.la-biking:before{content:""}.la-bimobject:before{content:""}.la-binoculars:before{content:""}.la-biohazard:before{content:""}.la-birthday-cake:before{content:""}.la-bitbucket:before{content:""}.la-bitcoin:before{content:""}.la-bity:before{content:""}.la-black-tie:before{content:""}.la-blackberry:before{content:""}.la-blender:before{content:""}.la-blender-phone:before{content:""}.la-blind:before{content:""}.la-blog:before{content:""}.la-blogger:before{content:""}.la-blogger-b:before{content:""}.la-bluetooth:before{content:""}.la-bluetooth-b:before{content:""}.la-bold:before{content:""}.la-bolt:before{content:""}.la-bomb:before{content:""}.la-bone:before{content:""}.la-bong:before{content:""}.la-book:before{content:""}.la-book-dead:before{content:""}.la-book-medical:before{content:""}.la-book-open:before{content:""}.la-book-reader:before{content:""}.la-bookmark:before{content:""}.la-bootstrap:before{content:""}.la-border-all:before{content:""}.la-border-none:before{content:""}.la-border-style:before{content:""}.la-bowling-ball:before{content:""}.la-box:before{content:""}.la-box-open:before{content:""}.la-boxes:before{content:""}.la-braille:before{content:""}.la-brain:before{content:""}.la-bread-slice:before{content:""}.la-briefcase:before{content:""}.la-briefcase-medical:before{content:""}.la-broadcast-tower:before{content:""}.la-broom:before{content:""}.la-brush:before{content:""}.la-btc:before{content:""}.la-buffer:before{content:""}.la-bug:before{content:""}.la-building:before{content:""}.la-bullhorn:before{content:""}.la-bullseye:before{content:""}.la-burn:before{content:""}.la-buromobelexperte:before{content:""}.la-bus:before{content:""}.la-bus-alt:before{content:""}.la-business-time:before{content:""}.la-buysellads:before{content:""}.la-calculator:before{content:""}.la-calendar:before{content:""}.la-calendar-alt:before{content:""}.la-calendar-check:before{content:""}.la-calendar-day:before{content:""}.la-calendar-minus:before{content:""}.la-calendar-plus:before{content:""}.la-calendar-times:before{content:""}.la-calendar-week:before{content:""}.la-camera:before{content:""}.la-camera-retro:before{content:""}.la-campground:before{content:""}.la-canadian-maple-leaf:before{content:""}.la-candy-cane:before{content:""}.la-cannabis:before{content:""}.la-capsules:before{content:""}.la-car:before{content:""}.la-car-alt:before{content:""}.la-car-battery:before{content:""}.la-car-crash:before{content:""}.la-car-side:before{content:""}.la-caret-down:before{content:""}.la-caret-left:before{content:""}.la-caret-right:before{content:""}.la-caret-square-down:before{content:""}.la-caret-square-left:before{content:""}.la-caret-square-right:before{content:""}.la-caret-square-up:before{content:""}.la-caret-up:before{content:""}.la-carrot:before{content:""}.la-cart-arrow-down:before{content:""}.la-cart-plus:before{content:""}.la-cash-register:before{content:""}.la-cat:before{content:""}.la-cc-amazon-pay:before{content:""}.la-cc-amex:before{content:""}.la-cc-apple-pay:before{content:""}.la-cc-diners-club:before{content:""}.la-cc-discover:before{content:""}.la-cc-jcb:before{content:""}.la-cc-mastercard:before{content:""}.la-cc-paypal:before{content:""}.la-cc-stripe:before{content:""}.la-cc-visa:before{content:""}.la-centercode:before{content:""}.la-centos:before{content:""}.la-certificate:before{content:""}.la-chair:before{content:""}.la-chalkboard:before{content:""}.la-chalkboard-teacher:before{content:""}.la-charging-station:before{content:""}.la-chart-area:before{content:""}.la-chart-bar:before{content:""}.la-chart-line:before{content:""}.la-chart-pie:before{content:""}.la-check:before{content:""}.la-check-circle:before{content:""}.la-check-double:before{content:""}.la-check-square:before{content:""}.la-cheese:before{content:""}.la-chess:before{content:""}.la-chess-bishop:before{content:""}.la-chess-board:before{content:""}.la-chess-king:before{content:""}.la-chess-knight:before{content:""}.la-chess-pawn:before{content:""}.la-chess-queen:before{content:""}.la-chess-rook:before{content:""}.la-chevron-circle-down:before{content:""}.la-chevron-circle-left:before{content:""}.la-chevron-circle-right:before{content:""}.la-chevron-circle-up:before{content:""}.la-chevron-down:before{content:""}.la-chevron-left:before{content:""}.la-chevron-right:before{content:""}.la-chevron-up:before{content:""}.la-child:before{content:""}.la-chrome:before{content:""}.la-chromecast:before{content:""}.la-church:before{content:""}.la-circle:before{content:""}.la-circle-notch:before{content:""}.la-city:before{content:""}.la-clinic-medical:before{content:""}.la-clipboard:before{content:""}.la-clipboard-check:before{content:""}.la-clipboard-list:before{content:""}.la-clock:before{content:""}.la-clone:before{content:""}.la-closed-captioning:before{content:""}.la-cloud:before{content:""}.la-cloud-download-alt:before{content:""}.la-cloud-meatball:before{content:""}.la-cloud-moon:before{content:""}.la-cloud-moon-rain:before{content:""}.la-cloud-rain:before{content:""}.la-cloud-showers-heavy:before{content:""}.la-cloud-sun:before{content:""}.la-cloud-sun-rain:before{content:""}.la-cloud-upload-alt:before{content:""}.la-cloudscale:before{content:""}.la-cloudsmith:before{content:""}.la-cloudversify:before{content:""}.la-cocktail:before{content:""}.la-code:before{content:""}.la-code-branch:before{content:""}.la-codepen:before{content:""}.la-codiepie:before{content:""}.la-coffee:before{content:""}.la-cog:before{content:""}.la-cogs:before{content:""}.la-coins:before{content:""}.la-columns:before{content:""}.la-comment:before{content:""}.la-comment-alt:before{content:""}.la-comment-dollar:before{content:""}.la-comment-dots:before{content:""}.la-comment-medical:before{content:""}.la-comment-slash:before{content:""}.la-comments:before{content:""}.la-comments-dollar:before{content:""}.la-compact-disc:before{content:""}.la-compass:before{content:""}.la-compress:before{content:""}.la-compress-arrows-alt:before{content:""}.la-concierge-bell:before{content:""}.la-confluence:before{content:""}.la-connectdevelop:before{content:""}.la-contao:before{content:""}.la-cookie:before{content:""}.la-cookie-bite:before{content:""}.la-copy:before{content:""}.la-copyright:before{content:""}.la-cotton-bureau:before{content:""}.la-couch:before{content:""}.la-cpanel:before{content:""}.la-creative-commons:before{content:""}.la-creative-commons-by:before{content:""}.la-creative-commons-nc:before{content:""}.la-creative-commons-nc-eu:before{content:""}.la-creative-commons-nc-jp:before{content:""}.la-creative-commons-nd:before{content:""}.la-creative-commons-pd:before{content:""}.la-creative-commons-pd-alt:before{content:""}.la-creative-commons-remix:before{content:""}.la-creative-commons-sa:before{content:""}.la-creative-commons-sampling:before{content:""}.la-creative-commons-sampling-plus:before{content:""}.la-creative-commons-share:before{content:""}.la-creative-commons-zero:before{content:""}.la-credit-card:before{content:""}.la-critical-role:before{content:""}.la-crop:before{content:""}.la-crop-alt:before{content:""}.la-cross:before{content:""}.la-crosshairs:before{content:""}.la-crow:before{content:""}.la-crown:before{content:""}.la-crutch:before{content:""}.la-css3:before{content:""}.la-css3-alt:before{content:""}.la-cube:before{content:""}.la-cubes:before{content:""}.la-cut:before{content:""}.la-cuttlefish:before{content:""}.la-d-and-d:before{content:""}.la-d-and-d-beyond:before{content:""}.la-dashcube:before{content:""}.la-database:before{content:""}.la-deaf:before{content:""}.la-delicious:before{content:""}.la-democrat:before{content:""}.la-deploydog:before{content:""}.la-deskpro:before{content:""}.la-desktop:before{content:""}.la-dev:before{content:""}.la-deviantart:before{content:""}.la-dharmachakra:before{content:""}.la-dhl:before{content:""}.la-diagnoses:before{content:""}.la-diaspora:before{content:""}.la-dice:before{content:""}.la-dice-d20:before{content:""}.la-dice-d6:before{content:""}.la-dice-five:before{content:""}.la-dice-four:before{content:""}.la-dice-one:before{content:""}.la-dice-six:before{content:""}.la-dice-three:before{content:""}.la-dice-two:before{content:""}.la-digg:before{content:""}.la-digital-ocean:before{content:""}.la-digital-tachograph:before{content:""}.la-directions:before{content:""}.la-discord:before{content:""}.la-discourse:before{content:""}.la-divide:before{content:""}.la-dizzy:before{content:""}.la-dna:before{content:""}.la-dochub:before{content:""}.la-docker:before{content:""}.la-dog:before{content:""}.la-dollar-sign:before{content:""}.la-dolly:before{content:""}.la-dolly-flatbed:before{content:""}.la-donate:before{content:""}.la-door-closed:before{content:""}.la-door-open:before{content:""}.la-dot-circle:before{content:""}.la-dove:before{content:""}.la-download:before{content:""}.la-draft2digital:before{content:""}.la-drafting-compass:before{content:""}.la-dragon:before{content:""}.la-draw-polygon:before{content:""}.la-dribbble:before{content:""}.la-dribbble-square:before{content:""}.la-dropbox:before{content:""}.la-drum:before{content:""}.la-drum-steelpan:before{content:""}.la-drumstick-bite:before{content:""}.la-drupal:before{content:""}.la-dumbbell:before{content:""}.la-dumpster:before{content:""}.la-dumpster-fire:before{content:""}.la-dungeon:before{content:""}.la-dyalog:before{content:""}.la-earlybirds:before{content:""}.la-ebay:before{content:""}.la-edge:before{content:""}.la-edit:before{content:""}.la-egg:before{content:""}.la-eject:before{content:""}.la-elementor:before{content:""}.la-ellipsis-h:before{content:""}.la-ellipsis-v:before{content:""}.la-ello:before{content:""}.la-ember:before{content:""}.la-empire:before{content:""}.la-envelope:before{content:""}.la-envelope-open:before{content:""}.la-envelope-open-text:before{content:""}.la-envelope-square:before{content:""}.la-envira:before{content:""}.la-equals:before{content:""}.la-eraser:before{content:""}.la-erlang:before{content:""}.la-ethereum:before{content:""}.la-ethernet:before{content:""}.la-etsy:before{content:""}.la-euro-sign:before{content:""}.la-evernote:before{content:""}.la-exchange-alt:before{content:""}.la-exclamation:before{content:""}.la-exclamation-circle:before{content:""}.la-exclamation-triangle:before{content:""}.la-expand:before{content:""}.la-expand-arrows-alt:before{content:""}.la-expeditedssl:before{content:""}.la-external-link-alt:before{content:""}.la-external-link-square-alt:before{content:""}.la-eye:before{content:""}.la-eye-dropper:before{content:""}.la-eye-slash:before{content:""}.la-facebook:before{content:""}.la-facebook-f:before{content:""}.la-facebook-messenger:before{content:""}.la-facebook-square:before{content:""}.la-fan:before{content:""}.la-fantasy-flight-games:before{content:""}.la-fast-backward:before{content:""}.la-fast-forward:before{content:""}.la-fax:before{content:""}.la-feather:before{content:""}.la-feather-alt:before{content:""}.la-fedex:before{content:""}.la-fedora:before{content:""}.la-female:before{content:""}.la-fighter-jet:before{content:""}.la-figma:before{content:""}.la-file:before{content:""}.la-file-alt:before{content:""}.la-file-archive:before{content:""}.la-file-audio:before{content:""}.la-file-code:before{content:""}.la-file-contract:before{content:""}.la-file-csv:before{content:""}.la-file-download:before{content:""}.la-file-excel:before{content:""}.la-file-export:before{content:""}.la-file-image:before{content:""}.la-file-import:before{content:""}.la-file-invoice:before{content:""}.la-file-invoice-dollar:before{content:""}.la-file-medical:before{content:""}.la-file-medical-alt:before{content:""}.la-file-pdf:before{content:""}.la-file-powerpoint:before{content:""}.la-file-prescription:before{content:""}.la-file-signature:before{content:""}.la-file-upload:before{content:""}.la-file-video:before{content:""}.la-file-word:before{content:""}.la-fill:before{content:""}.la-fill-drip:before{content:""}.la-film:before{content:""}.la-filter:before{content:""}.la-fingerprint:before{content:""}.la-fire:before{content:""}.la-fire-alt:before{content:""}.la-fire-extinguisher:before{content:""}.la-firefox:before{content:""}.la-first-aid:before{content:""}.la-first-order:before{content:""}.la-first-order-alt:before{content:""}.la-firstdraft:before{content:""}.la-fish:before{content:""}.la-fist-raised:before{content:""}.la-flag:before{content:""}.la-flag-checkered:before{content:""}.la-flag-usa:before{content:""}.la-flask:before{content:""}.la-flickr:before{content:""}.la-flipboard:before{content:""}.la-flushed:before{content:""}.la-fly:before{content:""}.la-folder:before{content:""}.la-folder-minus:before{content:""}.la-folder-open:before{content:""}.la-folder-plus:before{content:""}.la-font:before{content:""}.la-font-awesome:before{content:""}.la-font-awesome-alt:before{content:""}.la-font-awesome-flag:before{content:""}.la-fonticons:before{content:""}.la-fonticons-fi:before{content:""}.la-football-ball:before{content:""}.la-fort-awesome:before{content:""}.la-fort-awesome-alt:before{content:""}.la-forumbee:before{content:""}.la-forward:before{content:""}.la-foursquare:before{content:""}.la-free-code-camp:before{content:""}.la-freebsd:before{content:""}.la-frog:before{content:""}.la-frown:before{content:""}.la-frown-open:before{content:""}.la-fulcrum:before{content:""}.la-funnel-dollar:before{content:""}.la-futbol:before{content:""}.la-galactic-republic:before{content:""}.la-galactic-senate:before{content:""}.la-gamepad:before{content:""}.la-gas-pump:before{content:""}.la-gavel:before{content:""}.la-gem:before{content:""}.la-genderless:before{content:""}.la-get-pocket:before{content:""}.la-gg:before{content:""}.la-gg-circle:before{content:""}.la-ghost:before{content:""}.la-gift:before{content:""}.la-gifts:before{content:""}.la-git:before{content:""}.la-git-alt:before{content:""}.la-git-square:before{content:""}.la-github:before{content:""}.la-github-alt:before{content:""}.la-github-square:before{content:""}.la-gitkraken:before{content:""}.la-gitlab:before{content:""}.la-gitter:before{content:""}.la-glass-cheers:before{content:""}.la-glass-martini:before{content:""}.la-glass-martini-alt:before{content:""}.la-glass-whiskey:before{content:""}.la-glasses:before{content:""}.la-glide:before{content:""}.la-glide-g:before{content:""}.la-globe:before{content:""}.la-globe-africa:before{content:""}.la-globe-americas:before{content:""}.la-globe-asia:before{content:""}.la-globe-europe:before{content:""}.la-gofore:before{content:""}.la-golf-ball:before{content:""}.la-goodreads:before{content:""}.la-goodreads-g:before{content:""}.la-google:before{content:""}.la-google-drive:before{content:""}.la-google-play:before{content:""}.la-google-plus:before{content:""}.la-google-plus-g:before{content:""}.la-google-plus-square:before{content:""}.la-google-wallet:before{content:""}.la-gopuram:before{content:""}.la-graduation-cap:before{content:""}.la-gratipay:before{content:""}.la-grav:before{content:""}.la-greater-than:before{content:""}.la-greater-than-equal:before{content:""}.la-grimace:before{content:""}.la-grin:before{content:""}.la-grin-alt:before{content:""}.la-grin-beam:before{content:""}.la-grin-beam-sweat:before{content:""}.la-grin-hearts:before{content:""}.la-grin-squint:before{content:""}.la-grin-squint-tears:before{content:""}.la-grin-stars:before{content:""}.la-grin-tears:before{content:""}.la-grin-tongue:before{content:""}.la-grin-tongue-squint:before{content:""}.la-grin-tongue-wink:before{content:""}.la-grin-wink:before{content:""}.la-grip-horizontal:before{content:""}.la-grip-lines:before{content:""}.la-grip-lines-vertical:before{content:""}.la-grip-vertical:before{content:""}.la-gripfire:before{content:""}.la-grunt:before{content:""}.la-guitar:before{content:""}.la-gulp:before{content:""}.la-h-square:before{content:""}.la-hacker-news:before{content:""}.la-hacker-news-square:before{content:""}.la-hackerrank:before{content:""}.la-hamburger:before{content:""}.la-hammer:before{content:""}.la-hamsa:before{content:""}.la-hand-holding:before{content:""}.la-hand-holding-heart:before{content:""}.la-hand-holding-usd:before{content:""}.la-hand-lizard:before{content:""}.la-hand-middle-finger:before{content:""}.la-hand-paper:before{content:""}.la-hand-peace:before{content:""}.la-hand-point-down:before{content:""}.la-hand-point-left:before{content:""}.la-hand-point-right:before{content:""}.la-hand-point-up:before{content:""}.la-hand-pointer:before{content:""}.la-hand-rock:before{content:""}.la-hand-scissors:before{content:""}.la-hand-spock:before{content:""}.la-hands:before{content:""}.la-hands-helping:before{content:""}.la-handshake:before{content:""}.la-hanukiah:before{content:""}.la-hard-hat:before{content:""}.la-hashtag:before{content:""}.la-hat-wizard:before{content:""}.la-haykal:before{content:""}.la-hdd:before{content:""}.la-heading:before{content:""}.la-headphones:before{content:""}.la-headphones-alt:before{content:""}.la-headset:before{content:""}.la-heart:before{content:""}.la-heart-broken:before{content:""}.la-heartbeat:before{content:""}.la-helicopter:before{content:""}.la-highlighter:before{content:""}.la-hiking:before{content:""}.la-hippo:before{content:""}.la-hips:before{content:""}.la-hire-a-helper:before{content:""}.la-history:before{content:""}.la-hockey-puck:before{content:""}.la-holly-berry:before{content:""}.la-home:before{content:""}.la-hooli:before{content:""}.la-hornbill:before{content:""}.la-horse:before{content:""}.la-horse-head:before{content:""}.la-hospital:before{content:""}.la-hospital-alt:before{content:""}.la-hospital-symbol:before{content:""}.la-hot-tub:before{content:""}.la-hotdog:before{content:""}.la-hotel:before{content:""}.la-hotjar:before{content:""}.la-hourglass:before{content:""}.la-hourglass-end:before{content:""}.la-hourglass-half:before{content:""}.la-hourglass-start:before{content:""}.la-house-damage:before{content:""}.la-houzz:before{content:""}.la-hryvnia:before{content:""}.la-html5:before{content:""}.la-hubspot:before{content:""}.la-i-cursor:before{content:""}.la-ice-cream:before{content:""}.la-icicles:before{content:""}.la-icons:before{content:""}.la-id-badge:before{content:""}.la-id-card:before{content:""}.la-id-card-alt:before{content:""}.la-igloo:before{content:""}.la-image:before{content:""}.la-images:before{content:""}.la-imdb:before{content:""}.la-inbox:before{content:""}.la-indent:before{content:""}.la-industry:before{content:""}.la-infinity:before{content:""}.la-info:before{content:""}.la-info-circle:before{content:""}.la-instagram:before{content:""}.la-intercom:before{content:""}.la-internet-explorer:before{content:""}.la-invision:before{content:""}.la-ioxhost:before{content:""}.la-italic:before{content:""}.la-itch-io:before{content:""}.la-itunes:before{content:""}.la-itunes-note:before{content:""}.la-java:before{content:""}.la-jedi:before{content:""}.la-jedi-order:before{content:""}.la-jenkins:before{content:""}.la-jira:before{content:""}.la-joget:before{content:""}.la-joint:before{content:""}.la-joomla:before{content:""}.la-journal-whills:before{content:""}.la-js:before{content:""}.la-js-square:before{content:""}.la-jsfiddle:before{content:""}.la-kaaba:before{content:""}.la-kaggle:before{content:""}.la-key:before{content:""}.la-keybase:before{content:""}.la-keyboard:before{content:""}.la-keycdn:before{content:""}.la-khanda:before{content:""}.la-kickstarter:before{content:""}.la-kickstarter-k:before{content:""}.la-kiss:before{content:""}.la-kiss-beam:before{content:""}.la-kiss-wink-heart:before{content:""}.la-kiwi-bird:before{content:""}.la-korvue:before{content:""}.la-landmark:before{content:""}.la-language:before{content:""}.la-laptop:before{content:""}.la-laptop-code:before{content:""}.la-laptop-medical:before{content:""}.la-laravel:before{content:""}.la-lastfm:before{content:""}.la-lastfm-square:before{content:""}.la-laugh:before{content:""}.la-laugh-beam:before{content:""}.la-laugh-squint:before{content:""}.la-laugh-wink:before{content:""}.la-layer-group:before{content:""}.la-leaf:before{content:""}.la-leanpub:before{content:""}.la-lemon:before{content:""}.la-less:before{content:""}.la-less-than:before{content:""}.la-less-than-equal:before{content:""}.la-level-down-alt:before{content:""}.la-level-up-alt:before{content:""}.la-life-ring:before{content:""}.la-lightbulb:before{content:""}.la-line:before{content:""}.la-link:before{content:""}.la-linkedin:before{content:""}.la-linkedin-in:before{content:""}.la-linode:before{content:""}.la-linux:before{content:""}.la-lira-sign:before{content:""}.la-list:before{content:""}.la-list-alt:before{content:""}.la-list-ol:before{content:""}.la-list-ul:before{content:""}.la-location-arrow:before{content:""}.la-lock:before{content:""}.la-lock-open:before{content:""}.la-long-arrow-alt-down:before{content:""}.la-long-arrow-alt-left:before{content:""}.la-long-arrow-alt-right:before{content:""}.la-long-arrow-alt-up:before{content:""}.la-low-vision:before{content:""}.la-luggage-cart:before{content:""}.la-lyft:before{content:""}.la-magento:before{content:""}.la-magic:before{content:""}.la-magnet:before{content:""}.la-mail-bulk:before{content:""}.la-mailchimp:before{content:""}.la-male:before{content:""}.la-mandalorian:before{content:""}.la-map:before{content:""}.la-map-marked:before{content:""}.la-map-marked-alt:before{content:""}.la-map-marker:before{content:""}.la-map-marker-alt:before{content:""}.la-map-pin:before{content:""}.la-map-signs:before{content:""}.la-markdown:before{content:""}.la-marker:before{content:""}.la-mars:before{content:""}.la-mars-double:before{content:""}.la-mars-stroke:before{content:""}.la-mars-stroke-h:before{content:""}.la-mars-stroke-v:before{content:""}.la-mask:before{content:""}.la-mastodon:before{content:""}.la-maxcdn:before{content:""}.la-medal:before{content:""}.la-medapps:before{content:""}.la-medium:before{content:""}.la-medium-m:before{content:""}.la-medkit:before{content:""}.la-medrt:before{content:""}.la-meetup:before{content:""}.la-megaport:before{content:""}.la-meh:before{content:""}.la-meh-blank:before{content:""}.la-meh-rolling-eyes:before{content:""}.la-memory:before{content:""}.la-mendeley:before{content:""}.la-menorah:before{content:""}.la-mercury:before{content:""}.la-meteor:before{content:""}.la-microchip:before{content:""}.la-microphone:before{content:""}.la-microphone-alt:before{content:""}.la-microphone-alt-slash:before{content:""}.la-microphone-slash:before{content:""}.la-microscope:before{content:""}.la-microsoft:before{content:""}.la-minus:before{content:""}.la-minus-circle:before{content:""}.la-minus-square:before{content:""}.la-mitten:before{content:""}.la-mix:before{content:""}.la-mixcloud:before{content:""}.la-mizuni:before{content:""}.la-mobile:before{content:""}.la-mobile-alt:before{content:""}.la-modx:before{content:""}.la-monero:before{content:""}.la-money-bill:before{content:""}.la-money-bill-alt:before{content:""}.la-money-bill-wave:before{content:""}.la-money-bill-wave-alt:before{content:""}.la-money-check:before{content:""}.la-money-check-alt:before{content:""}.la-monument:before{content:""}.la-moon:before{content:""}.la-mortar-pestle:before{content:""}.la-mosque:before{content:""}.la-motorcycle:before{content:""}.la-mountain:before{content:""}.la-mouse-pointer:before{content:""}.la-mug-hot:before{content:""}.la-music:before{content:""}.la-napster:before{content:""}.la-neos:before{content:""}.la-network-wired:before{content:""}.la-neuter:before{content:""}.la-newspaper:before{content:""}.la-nimblr:before{content:""}.la-node:before{content:""}.la-node-js:before{content:""}.la-not-equal:before{content:""}.la-notes-medical:before{content:""}.la-npm:before{content:""}.la-ns8:before{content:""}.la-nutritionix:before{content:""}.la-object-group:before{content:""}.la-object-ungroup:before{content:""}.la-odnoklassniki:before{content:""}.la-odnoklassniki-square:before{content:""}.la-oil-can:before{content:""}.la-old-republic:before{content:""}.la-om:before{content:""}.la-opencart:before{content:""}.la-openid:before{content:""}.la-opera:before{content:""}.la-optin-monster:before{content:""}.la-osi:before{content:""}.la-otter:before{content:""}.la-outdent:before{content:""}.la-page4:before{content:""}.la-pagelines:before{content:""}.la-pager:before{content:""}.la-paint-brush:before{content:""}.la-paint-roller:before{content:""}.la-palette:before{content:""}.la-palfed:before{content:""}.la-pallet:before{content:""}.la-paper-plane:before{content:""}.la-paperclip:before{content:""}.la-parachute-box:before{content:""}.la-paragraph:before{content:""}.la-parking:before{content:""}.la-passport:before{content:""}.la-pastafarianism:before{content:""}.la-paste:before{content:""}.la-patreon:before{content:""}.la-pause:before{content:""}.la-pause-circle:before{content:""}.la-paw:before{content:""}.la-paypal:before{content:""}.la-peace:before{content:""}.la-pen:before{content:""}.la-pen-alt:before{content:""}.la-pen-fancy:before{content:""}.la-pen-nib:before{content:""}.la-pen-square:before{content:""}.la-pencil-alt:before{content:""}.la-pencil-ruler:before{content:""}.la-penny-arcade:before{content:""}.la-people-carry:before{content:""}.la-pepper-hot:before{content:""}.la-percent:before{content:""}.la-percentage:before{content:""}.la-periscope:before{content:""}.la-person-booth:before{content:""}.la-phabricator:before{content:""}.la-phoenix-framework:before{content:""}.la-phoenix-squadron:before{content:""}.la-phone:before{content:""}.la-phone-alt:before{content:""}.la-phone-slash:before{content:""}.la-phone-square:before{content:""}.la-phone-square-alt:before{content:""}.la-phone-volume:before{content:""}.la-photo-video:before{content:""}.la-php:before{content:""}.la-pied-piper:before{content:""}.la-pied-piper-alt:before{content:""}.la-pied-piper-hat:before{content:""}.la-pied-piper-pp:before{content:""}.la-piggy-bank:before{content:""}.la-pills:before{content:""}.la-pinterest:before{content:""}.la-pinterest-p:before{content:""}.la-pinterest-square:before{content:""}.la-pizza-slice:before{content:""}.la-place-of-worship:before{content:""}.la-plane:before{content:""}.la-plane-arrival:before{content:""}.la-plane-departure:before{content:""}.la-play:before{content:""}.la-play-circle:before{content:""}.la-playstation:before{content:""}.la-plug:before{content:""}.la-plus:before{content:""}.la-plus-circle:before{content:""}.la-plus-square:before{content:""}.la-podcast:before{content:""}.la-poll:before{content:""}.la-poll-h:before{content:""}.la-poo:before{content:""}.la-poo-storm:before{content:""}.la-poop:before{content:""}.la-portrait:before{content:""}.la-pound-sign:before{content:""}.la-power-off:before{content:""}.la-pray:before{content:""}.la-praying-hands:before{content:""}.la-prescription:before{content:""}.la-prescription-bottle:before{content:""}.la-prescription-bottle-alt:before{content:""}.la-print:before{content:""}.la-procedures:before{content:""}.la-product-hunt:before{content:""}.la-project-diagram:before{content:""}.la-pushed:before{content:""}.la-puzzle-piece:before{content:""}.la-python:before{content:""}.la-qq:before{content:""}.la-qrcode:before{content:""}.la-question:before{content:""}.la-question-circle:before{content:""}.la-quidditch:before{content:""}.la-quinscape:before{content:""}.la-quora:before{content:""}.la-quote-left:before{content:""}.la-quote-right:before{content:""}.la-quran:before{content:""}.la-r-project:before{content:""}.la-radiation:before{content:""}.la-radiation-alt:before{content:""}.la-rainbow:before{content:""}.la-random:before{content:""}.la-raspberry-pi:before{content:""}.la-ravelry:before{content:""}.la-react:before{content:""}.la-reacteurope:before{content:""}.la-readme:before{content:""}.la-rebel:before{content:""}.la-receipt:before{content:""}.la-recycle:before{content:""}.la-red-river:before{content:""}.la-reddit:before{content:""}.la-reddit-alien:before{content:""}.la-reddit-square:before{content:""}.la-redhat:before{content:""}.la-redo:before{content:""}.la-redo-alt:before{content:""}.la-registered:before{content:""}.la-remove-format:before{content:""}.la-renren:before{content:""}.la-reply:before{content:""}.la-reply-all:before{content:""}.la-replyd:before{content:""}.la-republican:before{content:""}.la-researchgate:before{content:""}.la-resolving:before{content:""}.la-restroom:before{content:""}.la-retweet:before{content:""}.la-rev:before{content:""}.la-ribbon:before{content:""}.la-ring:before{content:""}.la-road:before{content:""}.la-robot:before{content:""}.la-rocket:before{content:""}.la-rocketchat:before{content:""}.la-rockrms:before{content:""}.la-route:before{content:""}.la-rss:before{content:""}.la-rss-square:before{content:""}.la-ruble-sign:before{content:""}.la-ruler:before{content:""}.la-ruler-combined:before{content:""}.la-ruler-horizontal:before{content:""}.la-ruler-vertical:before{content:""}.la-running:before{content:""}.la-rupee-sign:before{content:""}.la-sad-cry:before{content:""}.la-sad-tear:before{content:""}.la-safari:before{content:""}.la-salesforce:before{content:""}.la-sass:before{content:""}.la-satellite:before{content:""}.la-satellite-dish:before{content:""}.la-save:before{content:""}.la-schlix:before{content:""}.la-school:before{content:""}.la-screwdriver:before{content:""}.la-scribd:before{content:""}.la-scroll:before{content:""}.la-sd-card:before{content:""}.la-search:before{content:""}.la-search-dollar:before{content:""}.la-search-location:before{content:""}.la-search-minus:before{content:""}.la-search-plus:before{content:""}.la-searchengin:before{content:""}.la-seedling:before{content:""}.la-sellcast:before{content:""}.la-sellsy:before{content:""}.la-server:before{content:""}.la-servicestack:before{content:""}.la-shapes:before{content:""}.la-share:before{content:""}.la-share-alt:before{content:""}.la-share-alt-square:before{content:""}.la-share-square:before{content:""}.la-shekel-sign:before{content:""}.la-shield-alt:before{content:""}.la-ship:before{content:""}.la-shipping-fast:before{content:""}.la-shirtsinbulk:before{content:""}.la-shoe-prints:before{content:""}.la-shopping-bag:before{content:""}.la-shopping-basket:before{content:""}.la-shopping-cart:before{content:""}.la-shopware:before{content:""}.la-shower:before{content:""}.la-shuttle-van:before{content:""}.la-sign:before{content:""}.la-sign-in-alt:before{content:""}.la-sign-language:before{content:""}.la-sign-out-alt:before{content:""}.la-signal:before{content:""}.la-signature:before{content:""}.la-sim-card:before{content:""}.la-simplybuilt:before{content:""}.la-sistrix:before{content:""}.la-sitemap:before{content:""}.la-sith:before{content:""}.la-skating:before{content:""}.la-sketch:before{content:""}.la-skiing:before{content:""}.la-skiing-nordic:before{content:""}.la-skull:before{content:""}.la-skull-crossbones:before{content:""}.la-skyatlas:before{content:""}.la-skype:before{content:""}.la-slack:before{content:""}.la-slack-hash:before{content:""}.la-slash:before{content:""}.la-sleigh:before{content:""}.la-sliders-h:before{content:""}.la-slideshare:before{content:""}.la-smile:before{content:""}.la-smile-beam:before{content:""}.la-smile-wink:before{content:""}.la-smog:before{content:""}.la-smoking:before{content:""}.la-smoking-ban:before{content:""}.la-sms:before{content:""}.la-snapchat:before{content:""}.la-snapchat-ghost:before{content:""}.la-snapchat-square:before{content:""}.la-snowboarding:before{content:""}.la-snowflake:before{content:""}.la-snowman:before{content:""}.la-snowplow:before{content:""}.la-socks:before{content:""}.la-solar-panel:before{content:""}.la-sort:before{content:""}.la-sort-alpha-down:before{content:""}.la-sort-alpha-down-alt:before{content:""}.la-sort-alpha-up:before{content:""}.la-sort-alpha-up-alt:before{content:""}.la-sort-amount-down:before{content:""}.la-sort-amount-down-alt:before{content:""}.la-sort-amount-up:before{content:""}.la-sort-amount-up-alt:before{content:""}.la-sort-down:before{content:""}.la-sort-numeric-down:before{content:""}.la-sort-numeric-down-alt:before{content:""}.la-sort-numeric-up:before{content:""}.la-sort-numeric-up-alt:before{content:""}.la-sort-up:before{content:""}.la-soundcloud:before{content:""}.la-sourcetree:before{content:""}.la-spa:before{content:""}.la-space-shuttle:before{content:""}.la-speakap:before{content:""}.la-speaker-deck:before{content:""}.la-spell-check:before{content:""}.la-spider:before{content:""}.la-spinner:before{content:""}.la-splotch:before{content:""}.la-spotify:before{content:""}.la-spray-can:before{content:""}.la-square:before{content:""}.la-square-full:before{content:""}.la-square-root-alt:before{content:""}.la-squarespace:before{content:""}.la-stack-exchange:before{content:""}.la-stack-overflow:before{content:""}.la-stackpath:before{content:""}.la-stamp:before{content:""}.la-star:before{content:""}.la-star-and-crescent:before{content:""}.la-star-half:before{content:""}.la-star-half-alt:before{content:""}.la-star-of-david:before{content:""}.la-star-of-life:before{content:""}.la-staylinked:before{content:""}.la-steam:before{content:""}.la-steam-square:before{content:""}.la-steam-symbol:before{content:""}.la-step-backward:before{content:""}.la-step-forward:before{content:""}.la-stethoscope:before{content:""}.la-sticker-mule:before{content:""}.la-sticky-note:before{content:""}.la-stop:before{content:""}.la-stop-circle:before{content:""}.la-stopwatch:before{content:""}.la-store:before{content:""}.la-store-alt:before{content:""}.la-strava:before{content:""}.la-stream:before{content:""}.la-street-view:before{content:""}.la-strikethrough:before{content:""}.la-stripe:before{content:""}.la-stripe-s:before{content:""}.la-stroopwafel:before{content:""}.la-studiovinari:before{content:""}.la-stumbleupon:before{content:""}.la-stumbleupon-circle:before{content:""}.la-subscript:before{content:""}.la-subway:before{content:""}.la-suitcase:before{content:""}.la-suitcase-rolling:before{content:""}.la-sun:before{content:""}.la-superpowers:before{content:""}.la-superscript:before{content:""}.la-supple:before{content:""}.la-surprise:before{content:""}.la-suse:before{content:""}.la-swatchbook:before{content:""}.la-swimmer:before{content:""}.la-swimming-pool:before{content:""}.la-symfony:before{content:""}.la-synagogue:before{content:""}.la-sync:before{content:""}.la-sync-alt:before{content:""}.la-syringe:before{content:""}.la-table:before{content:""}.la-table-tennis:before{content:""}.la-tablet:before{content:""}.la-tablet-alt:before{content:""}.la-tablets:before{content:""}.la-tachometer-alt:before{content:""}.la-tag:before{content:""}.la-tags:before{content:""}.la-tape:before{content:""}.la-tasks:before{content:""}.la-taxi:before{content:""}.la-teamspeak:before{content:""}.la-teeth:before{content:""}.la-teeth-open:before{content:""}.la-telegram:before{content:""}.la-telegram-plane:before{content:""}.la-temperature-high:before{content:""}.la-temperature-low:before{content:""}.la-tencent-weibo:before{content:""}.la-tenge:before{content:""}.la-terminal:before{content:""}.la-text-height:before{content:""}.la-text-width:before{content:""}.la-th:before{content:""}.la-th-large:before{content:""}.la-th-list:before{content:""}.la-the-red-yeti:before{content:""}.la-theater-masks:before{content:""}.la-themeco:before{content:""}.la-themeisle:before{content:""}.la-thermometer:before{content:""}.la-thermometer-empty:before{content:""}.la-thermometer-full:before{content:""}.la-thermometer-half:before{content:""}.la-thermometer-quarter:before{content:""}.la-thermometer-three-quarters:before{content:""}.la-think-peaks:before{content:""}.la-thumbs-down:before{content:""}.la-thumbs-up:before{content:""}.la-thumbtack:before{content:""}.la-ticket-alt:before{content:""}.la-times:before{content:""}.la-times-circle:before{content:""}.la-tint:before{content:""}.la-tint-slash:before{content:""}.la-tired:before{content:""}.la-toggle-off:before{content:""}.la-toggle-on:before{content:""}.la-toilet:before{content:""}.la-toilet-paper:before{content:""}.la-toolbox:before{content:""}.la-tools:before{content:""}.la-tooth:before{content:""}.la-torah:before{content:""}.la-torii-gate:before{content:""}.la-tractor:before{content:""}.la-trade-federation:before{content:""}.la-trademark:before{content:""}.la-traffic-light:before{content:""}.la-train:before{content:""}.la-tram:before{content:""}.la-transgender:before{content:""}.la-transgender-alt:before{content:""}.la-trash:before{content:""}.la-trash-alt:before{content:""}.la-trash-restore:before{content:""}.la-trash-restore-alt:before{content:""}.la-tree:before{content:""}.la-trello:before{content:""}.la-tripadvisor:before{content:""}.la-trophy:before{content:""}.la-truck:before{content:""}.la-truck-loading:before{content:""}.la-truck-monster:before{content:""}.la-truck-moving:before{content:""}.la-truck-pickup:before{content:""}.la-tshirt:before{content:""}.la-tty:before{content:""}.la-tumblr:before{content:""}.la-tumblr-square:before{content:""}.la-tv:before{content:""}.la-twitch:before{content:""}.la-twitter:before{content:""}.la-twitter-square:before{content:""}.la-typo3:before{content:""}.la-uber:before{content:""}.la-ubuntu:before{content:""}.la-uikit:before{content:""}.la-umbrella:before{content:""}.la-umbrella-beach:before{content:""}.la-underline:before{content:""}.la-undo:before{content:""}.la-undo-alt:before{content:""}.la-uniregistry:before{content:""}.la-universal-access:before{content:""}.la-university:before{content:""}.la-unlink:before{content:""}.la-unlock:before{content:""}.la-unlock-alt:before{content:""}.la-untappd:before{content:""}.la-upload:before{content:""}.la-ups:before{content:""}.la-usb:before{content:""}.la-user:before{content:""}.la-user-alt:before{content:""}.la-user-alt-slash:before{content:""}.la-user-astronaut:before{content:""}.la-user-check:before{content:""}.la-user-circle:before{content:""}.la-user-clock:before{content:""}.la-user-cog:before{content:""}.la-user-edit:before{content:""}.la-user-friends:before{content:""}.la-user-graduate:before{content:""}.la-user-injured:before{content:""}.la-user-lock:before{content:""}.la-user-md:before{content:""}.la-user-minus:before{content:""}.la-user-ninja:before{content:""}.la-user-nurse:before{content:""}.la-user-plus:before{content:""}.la-user-secret:before{content:""}.la-user-shield:before{content:""}.la-user-slash:before{content:""}.la-user-tag:before{content:""}.la-user-tie:before{content:""}.la-user-times:before{content:""}.la-users:before{content:""}.la-users-cog:before{content:""}.la-usps:before{content:""}.la-ussunnah:before{content:""}.la-utensil-spoon:before{content:""}.la-utensils:before{content:""}.la-vaadin:before{content:""}.la-vector-square:before{content:""}.la-venus:before{content:""}.la-venus-double:before{content:""}.la-venus-mars:before{content:""}.la-viacoin:before{content:""}.la-viadeo:before{content:""}.la-viadeo-square:before{content:""}.la-vial:before{content:""}.la-vials:before{content:""}.la-viber:before{content:""}.la-video:before{content:""}.la-video-slash:before{content:""}.la-vihara:before{content:""}.la-vimeo:before{content:""}.la-vimeo-square:before{content:""}.la-vimeo-v:before{content:""}.la-vine:before{content:""}.la-vk:before{content:""}.la-vnv:before{content:""}.la-voicemail:before{content:""}.la-volleyball-ball:before{content:""}.la-volume-down:before{content:""}.la-volume-mute:before{content:""}.la-volume-off:before{content:""}.la-volume-up:before{content:""}.la-vote-yea:before{content:""}.la-vr-cardboard:before{content:""}.la-vuejs:before{content:""}.la-walking:before{content:""}.la-wallet:before{content:""}.la-warehouse:before{content:""}.la-water:before{content:""}.la-wave-square:before{content:""}.la-waze:before{content:""}.la-weebly:before{content:""}.la-weibo:before{content:""}.la-weight:before{content:""}.la-weight-hanging:before{content:""}.la-weixin:before{content:""}.la-whatsapp:before{content:""}.la-whatsapp-square:before{content:""}.la-wheelchair:before{content:""}.la-whmcs:before{content:""}.la-wifi:before{content:""}.la-wikipedia-w:before{content:""}.la-wind:before{content:""}.la-window-close:before{content:""}.la-window-maximize:before{content:""}.la-window-minimize:before{content:""}.la-window-restore:before{content:""}.la-windows:before{content:""}.la-wine-bottle:before{content:""}.la-wine-glass:before{content:""}.la-wine-glass-alt:before{content:""}.la-wix:before{content:""}.la-wizards-of-the-coast:before{content:""}.la-wolf-pack-battalion:before{content:""}.la-won-sign:before{content:""}.la-wordpress:before{content:""}.la-wordpress-simple:before{content:""}.la-wpbeginner:before{content:""}.la-wpexplorer:before{content:""}.la-wpforms:before{content:""}.la-wpressr:before{content:""}.la-wrench:before{content:""}.la-x-ray:before{content:""}.la-xbox:before{content:""}.la-xing:before{content:""}.la-xing-square:before{content:""}.la-y-combinator:before{content:""}.la-yahoo:before{content:""}.la-yammer:before{content:""}.la-yandex:before{content:""}.la-yandex-international:before{content:""}.la-yarn:before{content:""}.la-yelp:before{content:""}.la-yen-sign:before{content:""}.la-yin-yang:before{content:""}.la-yoast:before{content:""}.la-youtube:before{content:""}.la-youtube-square:before{content:""}.la-zhihu:before{content:""}.la-hat-cowboy:before{content:""}.la-hat-cowboy-side:before{content:""}.la-mdb:before{content:""}.la-mouse:before{content:""}.la-orcid:before{content:""}.la-record-vinyl:before{content:""}.la-swift:before{content:""}.la-umbraco:before{content:""}.la-buy-n-large:before{content:""}.sr-only{clip:rect(0,0,0,0);border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.sr-only-focusable:active,.sr-only-focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}body,html{font-family:Jost;height:100%;width:100%}.bg-overlay{background:rgba(51,51,51,.26)}[v-cloak]>*{display:none}.loader{border-top-color:#3498db!important}.loader.slow{-webkit-animation:spinner 1.5s linear infinite;animation:spinner 1.5s linear infinite}.loader.fast{-webkit-animation:spinner .7s linear infinite;animation:spinner .7s linear infinite}@-webkit-keyframes spinner{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(1turn)}}@keyframes spinner{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.form-input label{--tw-text-opacity:1;color:rgba(31,41,55,var(--tw-text-opacity));font-weight:600;padding-bottom:.5rem;padding-top:.5rem}.form-input input{--tw-border-opacity:1;--tw-bg-opacity:1;background-color:rgba(219,234,254,var(--tw-bg-opacity));border-color:rgba(191,219,254,var(--tw-border-opacity));border-radius:.25rem;border-width:2px;padding:.5rem;width:100%}.form-input input[disabled]{--tw-bg-opacity:1;background-color:rgba(209,213,219,var(--tw-bg-opacity))}.form-input p{--tw-text-opacity:1;color:rgba(75,85,99,var(--tw-text-opacity));font-size:.75rem;line-height:1rem;padding-bottom:.25rem;padding-top:.25rem}.form-input-invalid label{--tw-text-opacity:1;color:rgba(239,68,68,var(--tw-text-opacity));font-weight:600;padding-bottom:.5rem;padding-top:.5rem}.form-input-invalid input{--tw-border-opacity:1;--tw-bg-opacity:1;background-color:rgba(254,226,226,var(--tw-bg-opacity));border-color:rgba(248,113,113,var(--tw-border-opacity));border-radius:.25rem;border-width:2px;padding:.5rem;width:100%}.form-input-invalid p{--tw-text-opacity:1;color:rgba(239,68,68,var(--tw-text-opacity));font-size:.75rem;line-height:1rem;padding-bottom:.25rem;padding-top:.25rem}.btn{--tw-shadow:0 1px 3px 0 rgba(0,0,0,0.1),0 1px 2px 0 rgba(0,0,0,0.06);border-radius:.25rem;border-width:1px;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);padding:.5rem .75rem;text-align:center}.btn-blue{background-color:rgba(37,99,235,var(--tw-bg-opacity));border-color:rgba(37,99,235,var(--tw-border-opacity))}.btn-blue,.btn-red{--tw-border-opacity:1;--tw-bg-opacity:1;--tw-text-opacity:1;color:rgba(255,255,255,var(--tw-text-opacity))}.btn-red{background-color:rgba(220,38,38,var(--tw-bg-opacity));border-color:rgba(220,38,38,var(--tw-border-opacity))}.pos-button-clicked{box-shadow:inset 0 0 5px 0 #a4a5a7}.ns-table{width:100%}.ns-table thead th{--tw-border-opacity:1;--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgba(229,231,235,var(--tw-bg-opacity));border-color:rgba(209,213,219,var(--tw-border-opacity));border-width:1px;color:rgba(55,65,81,var(--tw-text-opacity));padding:.5rem}.ns-table tbody td,.ns-table tfoot td{--tw-border-opacity:1;--tw-text-opacity:1;border-color:rgba(229,231,235,var(--tw-border-opacity));border-width:1px;color:rgba(55,65,81,var(--tw-text-opacity));padding:.5rem}.ns-table tbody>tr.info{--tw-bg-opacity:1;background-color:rgba(191,219,254,var(--tw-bg-opacity))}.ns-table tbody>tr.danger{--tw-bg-opacity:1;background-color:rgba(254,202,202,var(--tw-bg-opacity))}.ns-table tbody>tr.success{--tw-bg-opacity:1;background-color:rgba(167,243,208,var(--tw-bg-opacity))}.ns-table tbody>tr.green{--tw-bg-opacity:1;background-color:rgba(253,230,138,var(--tw-bg-opacity))}#editor h1{font-size:3rem;font-weight:700;line-height:1}#editor h2{font-size:2.25rem;font-weight:700;line-height:2.5rem}#editor h3{font-size:1.875rem;font-weight:700;line-height:2.25rem}#editor h4{font-size:1.5rem;font-weight:700;line-height:2rem}#editor h5{font-size:1.25rem;font-weight:700;line-height:1.75rem}#grid-items .vue-recycle-scroller__item-wrapper{display:grid;gap:0;grid-template-columns:repeat(2,minmax(0,1fr));overflow-y:auto}@media (min-width:768px){#grid-items .vue-recycle-scroller__item-wrapper{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width:1024px){#grid-items .vue-recycle-scroller__item-wrapper{grid-template-columns:repeat(4,minmax(0,1fr))}}@media (min-width:1280px){#grid-items .vue-recycle-scroller__item-wrapper{grid-template-columns:repeat(5,minmax(0,1fr))}}#grid-items .vue-recycle-scroller__item-view{--tw-border-opacity:1;align-items:center;border-color:rgba(229,231,235,var(--tw-border-opacity));border-width:1px;cursor:pointer;display:flex;flex-direction:column;height:8rem;justify-content:center;overflow:hidden}@media (min-width:1024px){#grid-items .vue-recycle-scroller__item-view{height:10rem}}#grid-items .vue-recycle-scroller__item-view:hover{--tw-bg-opacity:1;background-color:rgba(229,231,235,var(--tw-bg-opacity))}.popup-heading{align-items:center;display:flex;justify-content:space-between;padding:.5rem}.popup-heading h3{font-weight:600}@media (min-width:640px){.sm\:relative{position:relative!important}.sm\:mx-auto{margin-left:auto!important;margin-right:auto!important}.sm\:hidden{display:none!important}.sm\:h-108{height:27rem!important}.sm\:w-64{width:16rem!important}.sm\:rounded-lg{border-radius:.5rem!important}.sm\:text-sm{font-size:.875rem!important}.sm\:leading-5,.sm\:text-sm{line-height:1.25rem!important}}@media (min-width:768px){.md\:visible{visibility:visible!important}.md\:static{position:static!important}.md\:m-0{margin:0!important}.md\:mx-auto{margin-left:auto!important;margin-right:auto!important}.md\:-mx-2{margin-left:-.5rem!important;margin-right:-.5rem!important}.md\:-mx-4{margin-left:-1rem!important;margin-right:-1rem!important}.md\:my-0{margin-bottom:0!important;margin-top:0!important}.md\:my-2{margin-bottom:.5rem!important;margin-top:.5rem!important}.md\:mt-0{margin-top:0!important}.md\:mt-2{margin-top:.5rem!important}.md\:mb-0{margin-bottom:0!important}.md\:inline-block{display:inline-block!important}.md\:inline{display:inline!important}.md\:hidden{display:none!important}.md\:h-56{height:14rem!important}.md\:h-full{height:100%!important}.md\:h-6\/7-screen{height:85.71vh!important}.md\:h-5\/7-screen{height:71.42vh!important}.md\:h-5\/6-screen{height:83.33vh!important}.md\:h-4\/5-screen{height:80vh!important}.md\:h-3\/5-screen{height:60vh!important}.md\:h-2\/3-screen{height:66.66vh!important}.md\:h-half{height:50vh!important}.md\:w-16{width:4rem!important}.md\:w-24{width:6rem!important}.md\:w-56{width:14rem!important}.md\:w-72{width:18rem!important}.md\:w-auto{width:auto!important}.md\:w-1\/2{width:50%!important}.md\:w-1\/3{width:33.333333%!important}.md\:w-2\/3{width:66.666667%!important}.md\:w-3\/4{width:75%!important}.md\:w-2\/5{width:40%!important}.md\:w-3\/5{width:60%!important}.md\:w-full{width:100%!important}.md\:w-6\/7-screen{width:85.71vw!important}.md\:w-5\/7-screen{width:71.42vw!important}.md\:w-4\/7-screen{width:57.14vw!important}.md\:w-3\/7-screen{width:42.85vw!important}.md\:w-4\/6-screen{width:66.66vw!important}.md\:w-3\/6-screen{width:50vw!important}.md\:w-4\/5-screen{width:80vw!important}.md\:w-3\/5-screen{width:60vw!important}.md\:w-2\/5-screen{width:40vw!important}.md\:w-3\/4-screen{width:75vw!important}.md\:w-2\/4-screen{width:50vw!important}.md\:w-2\/3-screen{width:66.66vw!important}.md\:w-1\/3-screen{width:33.33vw!important}.md\:flex-auto{flex:1 1 auto!important}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))!important}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))!important}.md\:flex-row{flex-direction:row!important}.md\:flex-col{flex-direction:column!important}.md\:flex-nowrap{flex-wrap:nowrap!important}.md\:items-start{align-items:flex-start!important}.md\:justify-end{justify-content:flex-end!important}.md\:overflow-hidden{overflow:hidden!important}.md\:overflow-y-auto{overflow-y:auto!important}.md\:rounded{border-radius:.25rem!important}.md\:border-l{border-left-width:1px!important}.md\:p-0{padding:0!important}.md\:px-4{padding-left:1rem!important;padding-right:1rem!important}.md\:py-4{padding-bottom:1rem!important;padding-top:1rem!important}.md\:text-base{font-size:1rem!important;line-height:1.5rem!important}.md\:text-3xl{font-size:1.875rem!important;line-height:2.25rem!important}.md\:text-4xl{font-size:2.25rem!important;line-height:2.5rem!important}}@media (min-width:1024px){.lg\:my-1{margin-bottom:.25rem!important;margin-top:.25rem!important}.lg\:my-8{margin-bottom:2rem!important;margin-top:2rem!important}.lg\:block{display:block!important}.lg\:flex{display:flex!important}.lg\:hidden{display:none!important}.lg\:h-full{height:100%!important}.lg\:h-5\/7-screen{height:71.42vh!important}.lg\:h-3\/7-screen{height:42.85vh!important}.lg\:h-5\/6-screen{height:83.33vh!important}.lg\:h-4\/5-screen{height:80vh!important}.lg\:h-2\/3-screen{height:66.66vh!important}.lg\:w-56{width:14rem!important}.lg\:w-auto{width:auto!important}.lg\:w-1\/2{width:50%!important}.lg\:w-1\/3{width:33.333333%!important}.lg\:w-2\/3{width:66.666667%!important}.lg\:w-1\/4{width:25%!important}.lg\:w-2\/4{width:50%!important}.lg\:w-2\/5{width:40%!important}.lg\:w-3\/5{width:60%!important}.lg\:w-1\/6{width:16.666667%!important}.lg\:w-2\/6{width:33.333333%!important}.lg\:w-4\/6{width:66.666667%!important}.lg\:w-full{width:100%!important}.lg\:w-4\/7-screen{width:57.14vw!important}.lg\:w-3\/7-screen{width:42.85vw!important}.lg\:w-2\/7-screen{width:28.57vw!important}.lg\:w-4\/6-screen{width:66.66vw!important}.lg\:w-3\/6-screen{width:50vw!important}.lg\:w-2\/6-screen{width:33.33vw!important}.lg\:w-3\/5-screen{width:60vw!important}.lg\:w-2\/5-screen{width:40vw!important}.lg\:w-2\/4-screen{width:50vw!important}.lg\:w-2\/3-screen{width:66.66vw!important}.lg\:w-1\/3-screen{width:33.33vw!important}.lg\:w-half{width:50vw!important}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))!important}.lg\:flex-row{flex-direction:row!important}.lg\:items-start{align-items:flex-start!important}.lg\:border-t{border-top-width:1px!important}.lg\:border-b{border-bottom-width:1px!important}.lg\:px-0{padding-left:0!important;padding-right:0!important}.lg\:py-1{padding-bottom:.25rem!important;padding-top:.25rem!important}.lg\:text-lg{font-size:1.125rem!important}.lg\:text-lg,.lg\:text-xl{line-height:1.75rem!important}.lg\:text-xl{font-size:1.25rem!important}.lg\:text-2xl{font-size:1.5rem!important;line-height:2rem!important}.lg\:text-3xl{font-size:1.875rem!important;line-height:2.25rem!important}.lg\:text-5xl{font-size:3rem!important;line-height:1!important}}@media (min-width:1280px){.xl\:h-2\/5-screen{height:40vh!important}.xl\:w-108{width:27rem!important}.xl\:w-1\/2{width:50%!important}.xl\:w-1\/4{width:25%!important}.xl\:w-2\/4{width:50%!important}.xl\:w-2\/6-screen{width:33.33vw!important}.xl\:w-2\/5-screen{width:40vw!important}.xl\:w-1\/3-screen{width:33.33vw!important}.xl\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))!important}.xl\:border-none{border-style:none!important}.xl\:text-xl{font-size:1.25rem!important;line-height:1.75rem!important}}@media print{.print\:w-1\/2{width:50%!important}.print\:w-1\/3{width:33.333333%!important}} /*# sourceMappingURL=app.css.map*/ \ No newline at end of file diff --git a/public/js/app.min.js b/public/js/app.min.js index 3aaf29aa2..d0959ff71 100644 --- a/public/js/app.min.js +++ b/public/js/app.min.js @@ -1,2 +1,2 @@ -(self.webpackChunkNexoPOS_4x=self.webpackChunkNexoPOS_4x||[]).push([[219],{2328:(e,t,s)=>{"use strict";var r=s(538),i=s(4364),n=(s(824),s(7266)),a=s(162),o=s(7389);function l(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),s.push.apply(s,r)}return s}function c(e){for(var t=1;t=0)&&"hidden"!==e.type})).length>0})).length>0)return a.kX.error(this.$slots["error-no-valid-rules"]?this.$slots["error-no-valid-rules"]:(0,o.__)("No valid run were provided.")).subscribe();if(this.formValidation.validateForm(this.form).length>0)return a.kX.error(this.$slots["error-invalid-form"]?this.$slots["error-invalid-form"][0].text:(0,o.__)("Unable to proceed, the form is invalid."),this.$slots.okay?this.$slots.okay[0].text:(0,o.__)("OK")).subscribe();if(this.formValidation.disableForm(this.form),void 0===this.submitUrl)return a.kX.error(this.$slots["error-no-submit-url"]?this.$slots["error-no-submit-url"][0].text:(0,o.__)("Unable to proceed, no valid submit URL is defined."),this.$slots.okay?this.$slots.okay[0].text:(0,o.__)("OK")).subscribe();var t=c(c({},this.formValidation.extractForm(this.form)),{},{rules:this.form.rules.map((function(e){var t={};return e.forEach((function(e){t[e.name]=e.value})),t}))});a.ih[this.submitMethod?this.submitMethod.toLowerCase():"post"](this.submitUrl,t).subscribe((function(t){if("success"===t.status)return document.location=e.returnUrl;e.formValidation.enableForm(e.form)}),(function(t){e.formValidation.triggerError(e.form,t.response.data),e.formValidation.enableForm(e.form),a.kX.error(t.data.message||(0,o.__)("An unexpected error has occured"),void 0,{duration:5e3}).subscribe()}))},handleGlobalChange:function(e){this.globallyChecked=e,this.rows.forEach((function(t){return t.$checked=e}))},loadForm:function(){var e=this;a.ih.get("".concat(this.src)).subscribe((function(t){e.form=e.parseForm(t.form)}))},parseForm:function(e){e.main.value=void 0===e.main.value?"":e.main.value,e.main=this.formValidation.createFields([e.main])[0];var t=0;for(var s in e.tabs)0===t&&(e.tabs[s].active=!0),e.tabs[s].active=void 0!==e.tabs[s].active&&e.tabs[s].active,e.tabs[s].fields=this.formValidation.createFields(e.tabs[s].fields),t++;return e},getRuleForm:function(){return JSON.parse(JSON.stringify(this.form.ruleForm))},addRule:function(){this.form.rules.push(this.getRuleForm())},removeRule:function(e){this.form.rules.splice(e,1)}}};var f=s(1900);const p=(0,f.Z)(u,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"form flex-auto flex flex-col",attrs:{id:"crud-form"}},[0===Object.values(e.form).length?s("div",{staticClass:"flex items-center justify-center flex-auto"},[s("ns-spinner")],1):e._e(),e._v(" "),Object.values(e.form).length>0?[s("div",{staticClass:"flex flex-col"},[s("div",{staticClass:"flex justify-between items-center"},[s("label",{staticClass:"font-bold my-2 text-gray-700",attrs:{for:"title"}},[e._t("title",(function(){return[e._v(e._s(e.__("No title Provided")))]}))],2),e._v(" "),s("div",{staticClass:"text-sm my-2 text-gray-700",attrs:{for:"title"}},[e.returnUrl?s("a",{staticClass:"rounded-full border border-gray-400 hover:bg-red-600 hover:text-white bg-white px-2 py-1",attrs:{href:e.returnUrl}},[e._v("Return")]):e._e()])]),e._v(" "),s("div",{staticClass:"flex border-2 rounded overflow-hidden",class:e.form.main.disabled?"border-gray-500":e.form.main.errors.length>0?"border-red-600":"border-blue-500"},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.form.main.value,expression:"form.main.value"}],staticClass:"flex-auto text-gray-700 outline-none h-10 px-2",class:e.form.main.disabled?"bg-gray-400":"",attrs:{disabled:e.form.main.disabled,type:"text"},domProps:{value:e.form.main.value},on:{blur:function(t){return e.formValidation.checkField(e.form.main)},change:function(t){return e.formValidation.checkField(e.form.main)},input:function(t){t.target.composing||e.$set(e.form.main,"value",t.target.value)}}}),e._v(" "),s("button",{staticClass:"outline-none px-4 h-10 text-white border-l border-gray-400",class:e.form.main.disabled?"bg-gray-500":e.form.main.errors.length>0?"bg-red-500":"bg-blue-500",attrs:{disabled:e.form.main.disabled},on:{click:function(t){return e.submit()}}},[e._t("save",(function(){return[e._v(e._s(e.__("Save")))]}))],2)]),e._v(" "),e.form.main.description&&0===e.form.main.errors.length?s("p",{staticClass:"text-xs text-gray-600 py-1"},[e._v(e._s(e.form.main.description))]):e._e(),e._v(" "),e._l(e.form.main.errors,(function(t,r){return s("p",{key:r,staticClass:"text-xs py-1 text-red-500"},[s("span",[e._t("error-required",(function(){return[e._v(e._s(t.identifier))]}))],2)])}))],2),e._v(" "),s("div",{staticClass:"flex -mx-4 mt-4",attrs:{id:"points-wrapper"}},[s("div",{staticClass:"w-full md:w-1/3 lg:1/4 px-4"},[s("div",{staticClass:"bg-white rounded shadow"},[s("div",{staticClass:"header border-b border-gray-200 p-2"},[e._v(e._s(e.__("General")))]),e._v(" "),s("div",{staticClass:"body p-2"},e._l(e.form.tabs.general.fields,(function(e,t){return s("ns-field",{key:t,staticClass:"mb-2",attrs:{field:e}})})),1)]),e._v(" "),s("div",{staticClass:"rounded bg-gray-100 border border-gray-400 p-2 flex justify-between items-center my-3"},[e._t("add",(function(){return[s("span",{staticClass:"text-gray-700"},[e._v(e._s(e.__("Add Rule")))])]})),e._v(" "),s("button",{staticClass:"rounded bg-blue-500 text-white font-semibold flex items-center justify-center h-10 w-10",on:{click:function(t){return e.addRule()}}},[s("i",{staticClass:"las la-plus"})])],2)]),e._v(" "),s("div",{staticClass:"w-full md:w-2/3 lg:3/4 px-4 -m-3 flex flex-wrap items-start justify-start"},e._l(e.form.rules,(function(t,r){return s("div",{key:r,staticClass:"w-full md:w-1/2 p-3"},[s("div",{staticClass:"rounded shadow bg-white flex-auto"},[s("div",{staticClass:"body p-2"},e._l(t,(function(e,t){return s("ns-field",{key:t,staticClass:"mb-2",attrs:{field:e}})})),1),e._v(" "),s("div",{staticClass:"header border-t border-gray-200 p-2 flex justify-end"},[s("ns-button",{attrs:{type:"danger"},on:{click:function(t){return e.removeRule(r)}}},[s("i",{staticClass:"las la-times"})])],1)])])})),0)])]:e._e()],2)}),[],!1,null,null,null).exports;function m(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),s.push.apply(s,r)}return s}function h(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}const v={name:"ns-create-coupons",mounted:function(){this.loadForm()},computed:{validTabs:function(){if(this.form){var e=[];for(var t in this.form.tabs)["selected_products","selected_categories"].includes(t)&&e.push(this.form.tabs[t]);return e}return[]},activeValidTab:function(){return this.validTabs.filter((function(e){return e.active}))[0]},generalTab:function(){var e=[];for(var t in this.form.tabs)["general"].includes(t)&&e.push(this.form.tabs[t]);return e}},data:function(){return{formValidation:new n.Z,form:{},nsSnackBar:a.kX,nsHttpClient:a.ih,options:new Array(40).fill("").map((function(e,t){return{label:"Foo"+t,value:"bar"+t}}))}},props:["submit-method","submit-url","return-url","src","rules"],methods:{setTabActive:function(e){this.validTabs.forEach((function(e){return e.active=!1})),e.active=!0},submit:function(){var e=this;if(this.formValidation.validateForm(this.form).length>0)return a.kX.error(this.$slots["error-invalid-form"]?this.$slots["error-invalid-form"][0].text:"No error message provided for having an invalid form.",this.$slots.okay?this.$slots.okay[0].text:"OK").subscribe();if(void 0===this.submitUrl)return a.kX.error(this.$slots["error-no-submit-url"]?this.$slots["error-no-submit-url"][0].text:"No error message provided for not having a valid submit url.",this.$slots.okay?this.$slots.okay[0].text:"OK").subscribe();this.formValidation.disableForm(this.form);var t=function(e){for(var t=1;t=0&&(this.options[t].selected=!this.options[t].selected)},removeOption:function(e){var t=e.option;e.index;t.selected=!1},getRuleForm:function(){return this.form.ruleForm},addRule:function(){this.form.rules.push(this.getRuleForm())},removeRule:function(e){this.form.rules.splice(e,1)}}};const b=(0,f.Z)(v,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"form flex-auto flex flex-col",attrs:{id:"crud-form"}},[0===Object.values(e.form).length?s("div",{staticClass:"flex items-center justify-center flex-auto"},[s("ns-spinner")],1):e._e(),e._v(" "),Object.values(e.form).length>0?[s("div",{staticClass:"flex flex-col"},[s("div",{staticClass:"flex justify-between items-center"},[s("label",{staticClass:"font-bold my-2 text-gray-700",attrs:{for:"title"}},[e._t("title",(function(){return[e._v("No title Provided")]}))],2),e._v(" "),s("div",{staticClass:"text-sm my-2 text-gray-700",attrs:{for:"title"}},[e.returnUrl?s("a",{staticClass:"rounded-full border border-gray-400 hover:bg-red-600 hover:text-white bg-white px-2 py-1",attrs:{href:e.returnUrl}},[e._v("Return")]):e._e()])]),e._v(" "),s("div",{staticClass:"flex border-2 rounded overflow-hidden",class:e.form.main.disabled?"border-gray-500":e.form.main.errors.length>0?"border-red-600":"border-blue-500"},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.form.main.value,expression:"form.main.value"}],staticClass:"flex-auto text-gray-700 outline-none h-10 px-2",class:e.form.main.disabled?"bg-gray-400":"",attrs:{disabled:e.form.main.disabled,type:"text"},domProps:{value:e.form.main.value},on:{blur:function(t){return e.formValidation.checkField(e.form.main)},change:function(t){return e.formValidation.checkField(e.form.main)},input:function(t){t.target.composing||e.$set(e.form.main,"value",t.target.value)}}}),e._v(" "),s("button",{staticClass:"outline-none px-4 h-10 text-white border-l border-gray-400",class:e.form.main.disabled?"bg-gray-500":e.form.main.errors.length>0?"bg-red-500":"bg-blue-500",attrs:{disabled:e.form.main.disabled},on:{click:function(t){return e.submit()}}},[e._t("save",(function(){return[e._v("Save")]}))],2)]),e._v(" "),e.form.main.description&&0===e.form.main.errors.length?s("p",{staticClass:"text-xs text-gray-600 py-1"},[e._v(e._s(e.form.main.description))]):e._e(),e._v(" "),e._l(e.form.main.errors,(function(t,r){return s("p",{key:r,staticClass:"text-xs py-1 text-red-500"},[s("span",[e._t("error-required",(function(){return[e._v(e._s(t.identifier))]}))],2)])}))],2),e._v(" "),s("div",{staticClass:"-mx-4 flex flex-wrap mt-4",attrs:{id:"form-container"}},[s("div",{staticClass:"px-4 w-full md:w-1/2"},e._l(e.generalTab,(function(t,r){return s("div",{key:r,staticClass:"rounded bg-white shadow p-2"},e._l(t.fields,(function(e,t){return s("ns-field",{key:t,attrs:{field:e}})})),1)})),0),e._v(" "),s("div",{staticClass:"px-4 w-full md:w-1/2"},[s("div",{attrs:{id:"tabbed-card"}},[s("div",{staticClass:"flex flex-wrap",attrs:{id:"card-header"}},e._l(e.validTabs,(function(t,r){return s("div",{key:r,staticClass:"cursor-pointer px-4 py-2 rounded-tl-lg rounded-tr-lg",class:t.active?"bg-white":"bg-gray-100",on:{click:function(s){return e.setTabActive(t)}}},[e._v("\n "+e._s(t.label)+"\n ")])})),0),e._v(" "),s("div",{staticClass:"card-body bg-white rounded-br-lg rounded-bl-lg shadow p-2"},e._l(e.activeValidTab.fields,(function(e,t){return s("div",{key:t,staticClass:"flex flex-col"},[s("ns-field",{attrs:{field:e}})],1)})),0)])])])]:e._e()],2)}),[],!1,null,null,null).exports;const _={name:"ns-settings",props:["url"],data:function(){return{validation:new n.Z,form:{},test:""}},computed:{formDefined:function(){return Object.values(this.form).length>0},activeTab:function(){for(var e in this.form.tabs)if(!0===this.form.tabs[e].active)return this.form.tabs[e]}},mounted:function(){this.loadSettingsForm()},methods:{__:o.__,loadComponent:function(e){return nsExtraComponents[e]},submitForm:function(){var e=this;if(0===this.validation.validateForm(this.form).length)return this.validation.disableForm(this.form),a.ih.post(this.url,this.validation.extractForm(this.form)).subscribe((function(t){e.validation.enableForm(e.form),e.loadSettingsForm(),t.data&&t.data.results&&t.data.results.forEach((function(e){"failed"===e.status?a.kX.error(e.message).subscribe():a.kX.success(e.message).subscribe()})),a.kq.doAction("ns-settings-saved",{result:t,instance:e}),a.kX.success(t.message).subscribe()}),(function(t){e.validation.enableForm(e.form),e.validation.triggerFieldsErrors(e.form,t),a.kq.doAction("ns-settings-failed",{error:t,instance:e}),a.kX.error(t.message||(0,o.__)("Unable to proceed the form is not valid.")).subscribe()}));a.kX.error(this.$slots["error-form-invalid"][0].text||(0,o.__)("Unable to proceed the form is not valid.")).subscribe()},setActive:function(e){for(var t in this.form.tabs)this.form.tabs[t].active=!1;e.active=!0,a.kq.doAction("ns-settings-change-tab",{tab:e,instance:this})},loadSettingsForm:function(){var e=this;a.ih.get(this.url).subscribe((function(t){var s=0;Object.values(t.tabs).filter((function(e){return e.active})).length;for(var r in t.tabs)e.formDefined?t.tabs[r].active=e.form.tabs[r].active:(t.tabs[r].active=!1,0===s&&(t.tabs[r].active=!0)),s++;e.form=e.validation.createForm(t),a.kq.doAction("ns-settings-loaded",e),a.kq.doAction("ns-settings-change-tab",{tab:e.activeTab,instance:e})}))}}};const g=(0,f.Z)(_,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return e.formDefined?s("div",{attrs:{id:"tabbed-card"}},[s("div",{staticClass:"flex flex-wrap",attrs:{id:"card-header"}},e._l(e.form.tabs,(function(t,r){return s("div",{key:r,staticClass:"text-gray-700 cursor-pointer flex items-center px-4 py-2 rounded-tl-lg rounded-tr-lg",class:t.active?"bg-white":"bg-gray-300",on:{click:function(s){return e.setActive(t)}}},[s("span",[e._v(e._s(t.label))]),e._v(" "),t.errors.length>0?s("span",{staticClass:"ml-2 rounded-full bg-red-400 text-white text-sm h-6 w-6 flex items-center justify-center"},[e._v(e._s(t.errors.length))]):e._e()])})),0),e._v(" "),s("div",{staticClass:"card-body bg-white rounded-br-lg rounded-bl-lg shadow"},[s("div",{staticClass:"-mx-4 flex flex-wrap p-2"},[e.activeTab.fields?e._l(e.activeTab.fields,(function(e,t){return s("div",{key:t,staticClass:"w-full px-4 md:w-1/2 lg:w-1/3"},[s("div",{staticClass:"flex flex-col my-2"},[s("ns-field",{attrs:{field:e}})],1)])})):e._e(),e._v(" "),e.activeTab.component?s("div",{staticClass:"w-full px-4"},[s(e.loadComponent(e.activeTab.component),{tag:"component"})],1):e._e()],2),e._v(" "),e.activeTab.fields?s("div",{staticClass:"border-t border-gray-400 p-2 flex justify-end"},[s("ns-button",{attrs:{type:"info"},on:{click:function(t){return e.submitForm()}}},[e._t("submit-button",(function(){return[e._v(e._s(e.__("Save Settings")))]}))],2)],1):e._e()])]):e._e()}),[],!1,null,null,null).exports;const x={name:"ns-reset",props:["url"],methods:{__:o.__,submit:function(){if(!this.validation.validateFields(this.fields))return this.$forceUpdate(),a.kX.error(this.$slots["error-form-invalid"]?this.$slots["error-form-invalid"][0].text:"Invalid Form").subscribe();var e=this.validation.getValue(this.fields);confirm(this.$slots["confirm-message"]?this.$slots["confirm-message"][0].text:(0,o.__)("Would you like to proceed ?"))&&a.ih.post("/api/nexopos/v4/reset",e).subscribe((function(e){a.kX.success(e.message).subscribe()}),(function(e){a.kX.error(e.message).subscribe()}))}},data:function(){return{validation:new n.Z,fields:[{label:"Choose Option",name:"mode",description:(0,o.__)("Will apply various reset method on the system."),type:"select",options:[{label:(0,o.__)("Wipe Everything"),value:"wipe_all"},{label:(0,o.__)("Wipe + Grocery Demo"),value:"wipe_plus_grocery"}],validation:"required"}]}}};const y=(0,f.Z)(x,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{attrs:{id:"reset-app"}},[e._m(0),e._v(" "),s("div",{staticClass:"card-body bg-white rounded-br-lg rounded-bl-lg shadow"},[s("div",{staticClass:"-mx-4 flex flex-wrap p-2"},e._l(e.fields,(function(e,t){return s("div",{key:t,staticClass:"px-4"},[s("ns-field",{attrs:{field:e}})],1)})),0),e._v(" "),s("div",{staticClass:"card-body border-t border-gray-400 p-2 flex"},[s("div",[s("ns-button",{attrs:{type:"info"},on:{click:function(t){return e.submit()}}},[e._v(e._s(e.__("Proceed")))])],1)])])])}),[function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"flex flex-wrap",attrs:{id:"card-header"}},[s("div",{staticClass:"text-gray-700 bg-white cursor-pointer px-4 py-2 rounded-tl-lg rounded-tr-lg"},[e._v("\n Reset\n ")])])}],!1,null,null,null).exports;var w=s(7757),C=s.n(w),k=s(9127);function j(e,t,s,r,i,n,a){try{var o=e[n](a),l=o.value}catch(e){return void s(e)}o.done?t(l):Promise.resolve(l).then(r,i)}function $(e){return function(){var t=this,s=arguments;return new Promise((function(r,i){var n=e.apply(t,s);function a(e){j(n,r,i,a,o,"next",e)}function o(e){j(n,r,i,a,o,"throw",e)}a(void 0)}))}}var S;const P={name:"ns-modules",props:["url","upload"],data:function(){return{modules:[],total_enabled:0,total_disabled:0}},mounted:function(){this.loadModules().subscribe()},computed:{noModules:function(){return 0===Object.values(this.modules).length},noModuleMessage:function(){return this.$slots["no-modules-message"]?this.$slots["no-modules-message"][0].text:(0,o.__)("No module has been updated yet.")}},methods:{__:o.__,download:function(e){document.location="/dashboard/modules/download/"+e.namespace},performMigration:(S=$(C().mark((function e(t,s){var r,i,n,o;return C().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=function(){var e=$(C().mark((function e(s,r){return C().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e,i){a.ih.post("/api/nexopos/v4/modules/".concat(t.namespace,"/migrate"),{file:s,version:r}).subscribe((function(t){e(!0)}),(function(e){return a.kX.error(e.message,null,{duration:4e3}).subscribe()}))})));case 1:case"end":return e.stop()}}),e)})));return function(t,s){return e.apply(this,arguments)}}(),!(s=s||t.migrations)){e.next=19;break}t.migrating=!0,e.t0=C().keys(s);case 5:if((e.t1=e.t0()).done){e.next=17;break}i=e.t1.value,n=0;case 8:if(!(n0,name:e.namespace,label:null}})),t}))}))}}};const F=(0,f.Z)(T,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{attrs:{id:"permission-wrapper"}},[s("div",{staticClass:"rounded shadow bg-white flex"},[s("div",{staticClass:"w- bg-gray-800 flex-shrink-0",attrs:{id:"permissions"}},[s("div",{staticClass:"py-4 px-2 border-b border-gray-700 text-gray-100 flex justify-between items-center"},[e.toggled?e._e():s("span",[e._v(e._s(e.__("Permissions")))]),e._v(" "),s("div",[e.toggled?e._e():s("button",{staticClass:"rounded-full bg-white text-gray-700 h-6 w-6 flex items-center justify-center",on:{click:function(t){e.toggled=!e.toggled}}},[s("i",{staticClass:"las la-expand"})]),e._v(" "),e.toggled?s("button",{staticClass:"rounded-full bg-white text-gray-700 h-6 w-6 flex items-center justify-center",on:{click:function(t){e.toggled=!e.toggled}}},[s("i",{staticClass:"las la-compress"})]):e._e()])]),e._v(" "),e._l(e.permissions,(function(t){return s("div",{key:t.id,staticClass:"p-2 border-b border-gray-700 text-gray-100",class:e.toggled?"w-24":"w-54"},[s("a",{attrs:{href:"javascript:void(0)",title:t.namespace}},[e.toggled?e._e():s("span",[e._v(e._s(t.name))]),e._v(" "),e.toggled?s("span",[e._v(e._s(e._f("truncate")(t.name,5)))]):e._e()])])}))],2),e._v(" "),s("div",{staticClass:"flex flex-auto overflow-hidden"},[s("div",{staticClass:"overflow-y-auto"},[s("div",{staticClass:"text-gray-700 flex"},e._l(e.roles,(function(t){return s("div",{key:t.id,staticClass:"py-4 px-2 w-56 items-center border-b justify-center flex role flex-shrink-0 border-r border-gray-200"},[s("p",{staticClass:"mx-1"},[s("span",[e._v(e._s(t.name))])]),e._v(" "),s("span",{staticClass:"mx-1"},[s("ns-checkbox",{attrs:{field:t.field},on:{change:function(s){return e.selectAllPermissions(t)}}})],1)])})),0),e._v(" "),e._l(e.permissions,(function(t){return s("div",{key:t.id,staticClass:"permission flex"},e._l(e.roles,(function(r){return s("div",{key:r.id,staticClass:"border-b border-gray-200 w-56 flex-shrink-0 p-2 flex items-center justify-center border-r"},[s("ns-checkbox",{attrs:{field:r.fields[t.namespace]},on:{change:function(s){return e.submitPermissions(r,r.fields[t.namespace])}}})],1)})),0)}))],2)])])])}),[],!1,null,null,null).exports;var A=s(419);function V(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),s.push.apply(s,r)}return s}function q(e){for(var t=1;t0?t[0]:0},removeUnitPriceGroup:function(e,t){var s=this,r=e.filter((function(e){return"id"===e.name&&void 0!==e.value}));Popup.show(A.Z,{title:(0,o.__)("Confirm Your Action"),message:(0,o.__)("Would you like to delete this group ?"),onAction:function(i){if(i)if(r.length>0)s.confirmUnitQuantityDeletion({group_fields:e,group:t});else{var n=t.indexOf(e);t.splice(n,1)}}})},confirmUnitQuantityDeletion:function(e){var t=e.group_fields,s=e.group;Popup.show(A.Z,{title:(0,o.__)("Your Attention Is Required"),size:"w-3/4-screen h-2/5-screen",message:(0,o.__)("The current unit you're about to delete has a reference on the database and it might have already procured stock. Deleting that reference will remove procured stock. Would you proceed ?"),onAction:function(e){if(e){var r=t.filter((function(e){return"id"===e.name})).map((function(e){return e.value}))[0];a.ih.delete("/api/nexopos/v4/products/units/quantity/".concat(r)).subscribe((function(e){var r=s.indexOf(t);s.splice(r,1),a.kX.success(e.message).subscribe()}),(function(e){nsSnackbar.error(e.message).subscribe()}))}}})},addUnitGroup:function(e){if(0===e.options.length)return a.kX.error((0,o.__)("Please select at least one unit group before you proceed.")).subscribe();e.options.length>e.groups.length?e.groups.push(JSON.parse(JSON.stringify(e.fields))):a.kX.error((0,o.__)("There shoulnd't be more option than there are units.")).subscribe()},loadAvailableUnits:function(e){var t=this;a.ih.get(this.unitsUrl.replace("{id}",e.fields.filter((function(e){return"unit_group"===e.name}))[0].value)).subscribe((function(s){e.fields.forEach((function(e){"group"===e.type&&(e.options=s,e.fields.forEach((function(e){"unit_id"===e.name&&(console.log(e),e.options=s.map((function(e){return{label:e.name,value:e.id}})))})))})),t.$forceUpdate()}))},loadOptionsFor:function(e,t,s){var r=this;a.ih.get(this.unitsUrl.replace("{id}",t)).subscribe((function(t){r.form.variations[s].tabs.units.fields.forEach((function(s){s.name===e&&(s.options=t.map((function(e){return{label:e.name,value:e.id,selected:!1}})))})),r.$forceUpdate()}))},submit:function(){var e=this;if(this.formValidation.validateFields([this.form.main]),this.form.variations.map((function(t){return e.formValidation.validateForm(t)})).filter((function(e){return e.length>0})).length>0||Object.values(this.form.main.errors).length>0)return a.kX.error(this.$slots["error-form-invalid"]?this.$slots["error-form-invalid"][0].text:(0,o.__)("Unable to proceed the form is not valid.")).subscribe();var t=this.form.variations.map((function(e,t){return e.tabs.images.groups.filter((function(e){return e.filter((function(e){return"primary"===e.name&&1===e.value})).length>0}))}));if(t[0]&&t[0].length>1)return a.kX.error(this.$slots["error-multiple-primary"]?this.$slots["error-multiple-primary"][0].text:(0,o.__)("Unable to proceed, more than one product is set as primary")).subscribe();var s=[];if(this.form.variations.map((function(t,r){return t.tabs.units.fields.filter((function(e){return"group"===e.type})).forEach((function(t){new Object;t.groups.forEach((function(t){s.push(e.formValidation.validateFields(t))}))}))})),0===s.length)return a.kX.error(this.$slots["error-no-units-groups"]?this.$slots["error-no-units-groups"][0].text:(0,o.__)("Either Selling or Purchase unit isn't defined. Unable to proceed.")).subscribe();if(s.filter((function(e){return!1===e})).length>0)return this.$forceUpdate(),a.kX.error(this.$slots["error-invalid-unit-group"]?this.$slots["error-invalid-unit-group"][0].text:(0,o.__)("Unable to proceed as one of the unit group field is invalid")).subscribe();var r=q(q({},this.formValidation.extractForm(this.form)),{},{variations:this.form.variations.map((function(t,s){var r=e.formValidation.extractForm(t);0===s&&(r.$primary=!0),r.images=t.tabs.images.groups.map((function(t){return e.formValidation.extractFields(t)}));var i=new Object;return t.tabs.units.fields.filter((function(e){return"group"===e.type})).forEach((function(t){i[t.name]=t.groups.map((function(t){return e.formValidation.extractFields(t)}))})),r.units=q(q({},r.units),i),r}))});this.formValidation.disableForm(this.form),a.ih[this.submitMethod?this.submitMethod.toLowerCase():"post"](this.submitUrl,r).subscribe((function(t){if("success"===t.status){if(!1!==e.returnUrl)return document.location=e.returnUrl;e.$emit("save")}e.formValidation.enableForm(e.form)}),(function(t){a.kX.error(t.message,void 0,{duration:5e3}).subscribe(),e.formValidation.enableForm(e.form),t.response&&e.formValidation.triggerError(e.form,t.response.data)}))},deleteVariation:function(e){confirm(this.$slots["delete-variation"]?this.$slots["delete-variation"][0].text:(0,o.__)("Would you like to delete this variation ?"))&&this.form.variations.splice(e,1)},setTabActive:function(e,t){for(var s in t)s!==e&&(t[s].active=!1);t[e].active=!0,"units"===e&&this.loadAvailableUnits(t[e])},duplicate:function(e){this.form.variations.push(Object.assign({},e))},newVariation:function(){this.form.variations.push(this.defaultVariation)},getActiveTab:function(e){for(var t in e)if(e[t].active)return e[t];return!1},getActiveTabKey:function(e){for(var t in e)if(e[t].active)return t;return!1},parseForm:function(e){var t=this;return e.main.value=void 0===e.main.value?"":e.main.value,e.main=this.formValidation.createFields([e.main])[0],e.variations.forEach((function(e,s){var r=0;for(var i in e.tabs)0===r&&void 0===e.tabs[i].active?(e.tabs[i].active=!0,t._sampleVariation=Object.assign({},e),e.tabs[i].fields&&(e.tabs[i].fields=t.formValidation.createFields(e.tabs[i].fields.filter((function(e){return"name"!==e.name}))))):e.tabs[i].fields&&(e.tabs[i].fields=t.formValidation.createFields(e.tabs[i].fields)),e.tabs[i].active=void 0!==e.tabs[i].active&&e.tabs[i].active,r++})),e},loadForm:function(){var e=this;a.ih.get("".concat(this.src)).subscribe((function(t){e.form=e.parseForm(t.form)}))},addImage:function(e){e.tabs.images.groups.push(this.formValidation.createFields(JSON.parse(JSON.stringify(e.tabs.images.fields))))}},mounted:function(){this.loadForm()},name:"ns-manage-products"};const U=(0,f.Z)(M,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"form flex-auto",attrs:{id:"crud-form"}},[0===Object.values(e.form).length?s("div",{staticClass:"flex items-center h-full justify-center flex-auto"},[s("ns-spinner")],1):e._e(),e._v(" "),Object.values(e.form).length>0?[s("div",{staticClass:"flex flex-col"},[s("div",{staticClass:"flex justify-between items-center"},[s("label",{staticClass:"font-bold my-2 text-gray-700",attrs:{for:"title"}},[e._v(e._s(e.form.main.label))]),e._v(" "),s("div",{staticClass:"text-sm my-2 text-gray-700",attrs:{for:"title"}},[e.returnUrl?s("a",{staticClass:"rounded-full border border-gray-400 hover:bg-red-600 hover:text-white bg-white px-2 py-1",attrs:{href:e.returnUrl}},[e._v("Return")]):e._e()])]),e._v(" "),s("div",{staticClass:"flex border-2 rounded overflow-hidden",class:e.form.main.disabled?"border-gray-500":e.form.main.errors.length>0?"border-red-600":"border-blue-500"},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.form.main.value,expression:"form.main.value"}],staticClass:"flex-auto text-gray-700 outline-none h-10 px-2",class:e.form.main.disabled?"bg-gray-400":"",attrs:{disabled:e.form.main.disabled,type:"text"},domProps:{value:e.form.main.value},on:{blur:function(t){return e.formValidation.checkField(e.form.main)},change:function(t){return e.formValidation.checkField(e.form.main)},input:function(t){t.target.composing||e.$set(e.form.main,"value",t.target.value)}}}),e._v(" "),s("button",{staticClass:"outline-none px-4 h-10 text-white border-l border-gray-400",class:e.form.main.disabled?"bg-gray-500":e.form.main.errors.length>0?"bg-red-500":"bg-blue-500",attrs:{disabled:e.form.main.disabled},on:{click:function(t){return e.submit()}}},[e._t("save",(function(){return[e._v(e._s(e.__("Save")))]}))],2)]),e._v(" "),e.form.main.description&&0===e.form.main.errors.length?s("p",{staticClass:"text-xs text-gray-600 py-1"},[e._v(e._s(e.form.main.description))]):e._e(),e._v(" "),e._l(e.form.main.errors,(function(t,r){return s("p",{key:r,staticClass:"text-xs py-1 text-red-500"},[s("span",[e._t("error-required",(function(){return[e._v(e._s(t.identifier))]}))],2)])}))],2),e._v(" "),s("div",{staticClass:"-mx-4 flex flex-wrap mt-4",attrs:{id:"form-container"}},[s("div",{staticClass:"px-4 w-full"},e._l(e.form.variations,(function(t,r){return s("div",{key:r,staticClass:"mb-8",attrs:{id:"tabbed-card"}},[s("div",{staticClass:"flex flex-wrap justify-between",attrs:{id:"card-header"}},[s("div",{staticClass:"flex flex-wrap"},e._l(t.tabs,(function(r,i){return s("div",{key:i,staticClass:"cursor-pointer text-gray-700 px-4 py-2 rounded-tl-lg rounded-tr-lg flex justify-between",class:r.active?"bg-white":"bg-gray-100",on:{click:function(s){return e.setTabActive(i,t.tabs)}}},[s("span",{staticClass:"block mr-2"},[e._v(e._s(r.label))]),e._v(" "),r.errors&&r.errors.length>0?s("span",{staticClass:"rounded-full bg-red-400 text-white h-6 w-6 flex font-semibold items-center justify-center"},[e._v(e._s(r.errors.length))]):e._e()])})),0),e._v(" "),s("div",{staticClass:"flex items-center justify-center -mx-1"})]),e._v(" "),s("div",{staticClass:"card-body bg-white rounded-br-lg rounded-bl-lg shadow p-2"},[["images","units"].includes(e.getActiveTabKey(t.tabs))?e._e():s("div",{staticClass:"-mx-4 flex flex-wrap"},[e._l(e.getActiveTab(t.tabs).fields,(function(e,t){return[s("div",{key:t,staticClass:"flex flex-col px-4 w-full md:w-1/2 lg:w-1/3"},[s("ns-field",{attrs:{field:e}})],1)]}))],2),e._v(" "),"images"===e.getActiveTabKey(t.tabs)?s("div",{staticClass:"-mx-4 flex flex-wrap"},[s("div",{staticClass:"flex flex-col px-4 w-full md:w-1/2 lg:w-1/3"},[s("div",{staticClass:"rounded border flex bg-white justify-between p-2 items-center"},[s("span",[e._v(e._s(e.__("Add Images")))]),e._v(" "),s("button",{staticClass:"rounded-full border flex items-center justify-center w-8 h-8 bg-white hover:bg-blue-400 hover:text-white",on:{click:function(s){return e.addImage(t)}}},[s("i",{staticClass:"las la-plus-circle"})])])]),e._v(" "),e._l(e.getActiveTab(t.tabs).groups,(function(t,r){return s("div",{key:r,staticClass:"flex flex-col px-4 w-full md:w-1/2 lg:w-1/3 mb-4"},[s("div",{staticClass:"rounded border flex flex-col bg-white p-2"},e._l(t,(function(e,t){return s("ns-field",{key:t,attrs:{field:e}})})),1)])}))],2):e._e(),e._v(" "),"units"===e.getActiveTabKey(t.tabs)?s("div",{staticClass:"-mx-4 flex flex-wrap"},[s("div",{staticClass:"px-4 w-full md:w-1/2 lg:w-1/3"},[s("ns-field",{attrs:{field:e.getActiveTab(t.tabs).fields[0]},on:{change:function(s){e.loadAvailableUnits(e.getActiveTab(t.tabs))}}}),e._v(" "),s("ns-field",{attrs:{field:e.getActiveTab(t.tabs).fields[1]},on:{change:function(s){e.loadAvailableUnits(e.getActiveTab(t.tabs))}}})],1),e._v(" "),e._l(e.getActiveTab(t.tabs).fields,(function(t,r){return["group"===t.type?s("div",{key:r,staticClass:"px-4 w-full lg:w-2/3"},[s("div",{staticClass:"mb-2"},[s("label",{staticClass:"font-medium text-gray-700"},[e._v(e._s(t.label))]),e._v(" "),s("p",{staticClass:"py-1 text-sm text-gray-600"},[e._v(e._s(t.description))])]),e._v(" "),s("div",{staticClass:"mb-2"},[s("div",{staticClass:"border-dashed border-2 border-gray-200 p-1 bg-gray-100 flex justify-between items-center text-gray-700 cursor-pointer rounded-lg",on:{click:function(s){return e.addUnitGroup(t)}}},[e._m(0,!0),e._v(" "),s("span",[e._v(e._s(e.__("New Group")))])])]),e._v(" "),s("div",{staticClass:"-mx-4 flex flex-wrap"},e._l(t.groups,(function(r,i){return s("div",{key:i,staticClass:"px-4 w-full md:w-1/2 mb-4"},[s("div",{staticClass:"shadow rounded overflow-hidden"},[s("div",{staticClass:"border-b text-sm bg-blue-400 text-white border-blue-300 p-2 flex justify-between"},[s("span",[e._v(e._s(e.__("Available Quantity")))]),e._v(" "),s("span",[e._v(e._s(e.getUnitQuantity(r)))])]),e._v(" "),s("div",{staticClass:"p-2 mb-2"},e._l(r,(function(e,t){return s("ns-field",{key:t,attrs:{field:e}})})),1),e._v(" "),s("div",{staticClass:"p-1 text-red-800 hover:bg-red-200 border-t border-red-200 flex items-center justify-center cursor-pointer font-medium",on:{click:function(s){return e.removeUnitPriceGroup(r,t.groups)}}},[e._v("\n "+e._s(e.__("Delete"))+"\n ")])])])})),0)]):e._e()]}))],2):e._e()])])})),0)])]:e._e()],2)}),[function(){var e=this.$createElement,t=this._self._c||e;return t("span",{staticClass:"rounded-full border-2 border-gray-300 bg-white h-8 w-8 flex items-center justify-center"},[t("i",{staticClass:"las la-plus-circle"})])}],!1,null,null,null).exports;function R(e,t){for(var s=0;s0&&this.validTabs.filter((function(e){return e.active}))[0]}},data:function(){return{totalTaxValues:0,totalPurchasePrice:0,formValidation:new n.Z,form:{},nsSnackBar:a.kX,fields:[],searchResult:[],searchValue:"",debounceSearch:null,nsHttpClient:a.ih,taxes:[],validTabs:[{label:(0,o.__)("Details"),identifier:"details",active:!0},{label:(0,o.__)("Products"),identifier:"products",active:!1}],reloading:!1}},watch:{searchValue:function(e){var t=this;e&&(clearTimeout(this.debounceSearch),this.debounceSearch=setTimeout((function(){t.doSearch(e)}),500))}},components:{NsManageProducts:U},props:["submit-method","submit-url","return-url","src","rules"],methods:{__:o.__,computeTotal:function(){this.totalTaxValues=0,this.form.products.length>0&&(this.totalTaxValues=this.form.products.map((function(e){return e.procurement.tax_value})).reduce((function(e,t){return e+t}))),this.totalPurchasePrice=0,this.form.products.length>0&&(this.totalPurchasePrice=this.form.products.map((function(e){return parseFloat(e.procurement.total_purchase_price)})).reduce((function(e,t){return e+t})))},updateLine:function(e){var t=this.form.products[e],s=this.taxes.filter((function(e){return e.id===t.procurement.tax_group_id}));if(parseFloat(t.procurement.purchase_price_edit)>0&&parseFloat(t.procurement.quantity)>0){if(s.length>0){var r=s[0].taxes.map((function(e){return X.getTaxValue(t.procurement.tax_type,t.procurement.purchase_price_edit,parseFloat(e.rate))}));t.procurement.tax_value=r.reduce((function(e,t){return e+t})),"inclusive"===t.procurement.tax_type?(t.procurement.net_purchase_price=parseFloat(t.procurement.purchase_price_edit)-t.procurement.tax_value,t.procurement.gross_purchase_price=parseFloat(t.procurement.purchase_price_edit),t.procurement.purchase_price=parseFloat(t.procurement.gross_purchase_price)):(t.procurement.gross_purchase_price=parseFloat(t.procurement.purchase_price_edit)+t.procurement.tax_value,t.procurement.net_purchase_price=parseFloat(t.procurement.purchase_price_edit),t.procurement.purchase_price=parseFloat(t.procurement.gross_purchase_price))}else t.procurement.gross_purchase_price=parseFloat(t.procurement.purchase_price_edit),t.procurement.purchase_price=parseFloat(t.procurement.purchase_price_edit),t.procurement.net_purchase_price=parseFloat(t.procurement.purchase_price_edit),t.procurement.tax_value=0;t.procurement.tax_value=t.procurement.tax_value*parseFloat(t.procurement.quantity),t.procurement.total_purchase_price=t.procurement.purchase_price*parseFloat(t.procurement.quantity)}this.computeTotal(),this.$forceUpdate()},switchTaxType:function(e,t){e.procurement.tax_type="inclusive"===e.procurement.tax_type?"exclusive":"inclusive",this.updateLine(t)},doSearch:function(e){var t=this;a.ih.post("/api/nexopos/v4/procurements/products/search-product",{search:e}).subscribe((function(e){1===e.length?t.addProductList(e[0]):t.searchResult=e}))},reloadEntities:function(){var e=this;this.reloading=!0,(0,E.D)([a.ih.get("/api/nexopos/v4/categories"),a.ih.get("/api/nexopos/v4/products"),a.ih.get(this.src),a.ih.get("/api/nexopos/v4/taxes/groups")]).subscribe((function(t){e.reloading=!1,e.categories=t[0],e.products=t[1],e.taxes=t[3],e.form.general&&t[2].tabs.general.fieds.forEach((function(t,s){t.value=e.form.tabs.general.fields[s].value||""})),e.form=Object.assign(JSON.parse(JSON.stringify(t[2])),e.form),e.form=e.formValidation.createForm(e.form),e.form.tabs&&e.form.tabs.general.fields.forEach((function(e,s){e.options&&(e.options=t[2].tabs.general.fields[s].options)})),0===e.form.products.length&&(e.form.products=e.form.products.map((function(e){return["gross_purchase_price","purchase_price_edit","tax_value","net_purchase_price","purchase_price","total_price","total_purchase_price","quantity","tax_group_id"].forEach((function(t){void 0===e[t]&&(e[t]=void 0===e[t]?0:e[t])})),e.$invalid=e.$invalid||!1,e.purchase_price_edit=e.purchase_price,{name:e.name,purchase_units:e.purchase_units,procurement:e,unit_quantities:e.unit_quantities||[]}}))),e.$forceUpdate()}))},setTabActive:function(e){this.validTabs.forEach((function(e){return e.active=!1})),this.$forceUpdate(),this.$nextTick().then((function(){e.active=!0}))},addProductList:function(e){if(void 0===e.unit_quantities)return a.kX.error((0,o.__)("Unable to add product which doesn't unit quantities defined.")).subscribe();e.procurement=new Object,e.procurement.gross_purchase_price=0,e.procurement.purchase_price_edit=0,e.procurement.tax_value=0,e.procurement.net_purchase_price=0,e.procurement.purchase_price=0,e.procurement.total_price=0,e.procurement.total_purchase_price=0,e.procurement.quantity=1,e.procurement.expiration_date=null,e.procurement.tax_group_id=0,e.procurement.tax_type="inclusive",e.procurement.unit_id=0,e.procurement.product_id=e.id,e.procurement.procurement_id=null,e.procurement.$invalid=!1,this.searchResult=[],this.searchValue="",this.form.products.push(e)},submit:function(){var e=this;if(0===this.form.products.length)return a.kX.error(this.$slots["error-no-products"]?this.$slots["error-no-products"][0].text:(0,o.__)("Unable to proceed, no product were provided."),this.$slots.okay?this.$slots.okay[0].text:(0,o.__)("OK")).subscribe();if(this.form.products.forEach((function(e){!parseFloat(e.procurement.quantity)>=1||0===e.procurement.unit_id?e.procurement.$invalid=!0:e.procurement.$invalid=!1})),this.form.products.filter((function(e){return e.procurement.$invalid})).length>0)return a.kX.error(this.$slots["error-invalid-products"]?this.$slots["error-invalid-products"][0].text:(0,o.__)("Unable to proceed, one or more product has incorrect values."),this.$slots.okay?this.$slots.okay[0].text:(0,o.__)("OK")).subscribe();if(this.formValidation.validateForm(this.form).length>0)return this.setTabActive(this.activeTab),a.kX.error(this.$slots["error-invalid-form"]?this.$slots["error-invalid-form"][0].text:(0,o.__)("Unable to proceed, the procurement form is not valid."),this.$slots.okay?this.$slots.okay[0].text:(0,o.__)("OK")).subscribe();if(void 0===this.submitUrl)return a.kX.error(this.$slots["error-no-submit-url"]?this.$slots["error-no-submit-url"][0].text:(0,o.__)("Unable to submit, no valid submit URL were provided."),this.$slots.okay?this.$slots.okay[0].text:(0,o.__)("OK")).subscribe();this.formValidation.disableForm(this.form);var t=I(I({},this.formValidation.extractForm(this.form)),{products:this.form.products.map((function(e){return e.procurement}))});a.ih[this.submitMethod?this.submitMethod.toLowerCase():"post"](this.submitUrl,t).subscribe((function(t){if("success"===t.status)return document.location=e.returnUrl;e.formValidation.enableForm(e.form)}),(function(t){a.kX.error(t.message,void 0,{duration:5e3}).subscribe(),e.formValidation.enableForm(e.form),t.errors&&e.formValidation.triggerError(e.form,t.errors)}))},deleteProduct:function(e){this.form.products.splice(e,1),this.$forceUpdate()},handleGlobalChange:function(e){this.globallyChecked=e,this.rows.forEach((function(t){return t.$checked=e}))},setProductOptions:function(e){var t=this;new Promise((function(s,r){Popup.show(L,{product:t.form.products[e],resolve:s,reject:r})})).then((function(s){for(var r in s)t.form.products[e].procurement[r]=s[r];t.updateLine(e)}))}}};const B=(0,f.Z)(Y,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"form flex-auto flex flex-col",attrs:{id:"crud-form"}},[e.form.main?[s("div",{staticClass:"flex flex-col"},[s("div",{staticClass:"flex justify-between items-center"},[s("label",{staticClass:"font-bold my-2 text-gray-700",attrs:{for:"title"}},[e._t("title",(function(){return[e._v(e._s(e.__("No title is provided")))]}))],2),e._v(" "),s("div",{staticClass:"text-sm my-2 text-gray-700",attrs:{for:"title"}},[e.returnUrl?s("a",{staticClass:"rounded-full border border-gray-400 hover:bg-red-600 hover:text-white bg-white px-2 py-1",attrs:{href:e.returnUrl}},[e._v(e._s(e.__("Return")))]):e._e()])]),e._v(" "),s("div",{staticClass:"flex border-2 rounded overflow-hidden",class:e.form.main.disabled?"border-gray-500":e.form.main.errors.length>0?"border-red-600":"border-blue-500"},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.form.main.value,expression:"form.main.value"}],staticClass:"flex-auto text-gray-700 outline-none h-10 px-2",class:e.form.main.disabled?"bg-gray-400":"",attrs:{disabled:e.form.main.disabled,type:"text"},domProps:{value:e.form.main.value},on:{blur:function(t){return e.formValidation.checkField(e.form.main)},change:function(t){return e.formValidation.checkField(e.form.main)},input:function(t){t.target.composing||e.$set(e.form.main,"value",t.target.value)}}}),e._v(" "),s("button",{staticClass:"outline-none px-4 h-10 text-white border-l border-gray-400",class:e.form.main.disabled?"bg-gray-500":e.form.main.errors.length>0?"bg-red-500":"bg-blue-500",attrs:{disabled:e.form.main.disabled},on:{click:function(t){return e.submit()}}},[e._t("save",(function(){return[e._v(e._s(e.__("Save")))]}))],2),e._v(" "),s("button",{staticClass:"bg-white text-gray-700 outline-none px-4 h-10 border-gray-400",on:{click:function(t){return e.reloadEntities()}}},[s("i",{staticClass:"las la-sync",class:e.reloading?"animate animate-spin":""})])]),e._v(" "),e.form.main.description&&0===e.form.main.errors.length?s("p",{staticClass:"text-xs text-gray-600 py-1"},[e._v(e._s(e.form.main.description))]):e._e(),e._v(" "),e._l(e.form.main.errors,(function(t,r){return s("p",{key:r,staticClass:"text-xs py-1 text-red-500"},[s("span",[e._t("error-required",(function(){return[e._v(e._s(t.identifier))]}))],2)])}))],2),e._v(" "),s("div",{staticClass:"-mx-4 flex flex-wrap mt-4",attrs:{id:"form-container"}},[s("div",{staticClass:"px-4 w-full"},[s("div",{attrs:{id:"tabbed-card"}},[s("div",{staticClass:"flex flex-wrap",attrs:{id:"card-header"}},e._l(e.validTabs,(function(t,r){return s("div",{key:r,staticClass:"cursor-pointer px-4 py-2 rounded-tl-lg rounded-tr-lg text-gray-700",class:t.active?"bg-white":"bg-gray-100",on:{click:function(s){return e.setTabActive(t)}}},[e._v("\n "+e._s(t.label)+"\n ")])})),0),e._v(" "),"details"===e.activeTab.identifier?s("div",{staticClass:"card-body bg-white rounded-br-lg rounded-bl-lg shadow p-2"},[e.form.tabs?s("div",{staticClass:"-mx-4 flex flex-wrap"},e._l(e.form.tabs.general.fields,(function(e,t){return s("div",{key:t,staticClass:"flex px-4 w-full md:w-1/2 lg:w-1/3"},[s("ns-field",{attrs:{field:e}})],1)})),0):e._e()]):e._e(),e._v(" "),"products"===e.activeTab.identifier?s("div",{staticClass:"card-body bg-white rounded-br-lg rounded-bl-lg shadow p-2 "},[s("div",{staticClass:"mb-2"},[s("div",{staticClass:"border-blue-500 flex border-2 rounded overflow-hidden"},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.searchValue,expression:"searchValue"}],staticClass:"flex-auto text-gray-700 outline-none h-10 px-2",attrs:{type:"text",placeholder:e.$slots["search-placeholder"]?e.$slots["search-placeholder"][0].text:"SKU, Barcode, Name"},domProps:{value:e.searchValue},on:{input:function(t){t.target.composing||(e.searchValue=t.target.value)}}})]),e._v(" "),s("div",{staticClass:"h-0"},[s("div",{staticClass:"shadow bg-white relative z-10"},e._l(e.searchResult,(function(t,r){return s("div",{key:r,staticClass:"cursor-pointer border border-b border-gray-300 p-2 text-gray-700",on:{click:function(s){return e.addProductList(t)}}},[s("span",{staticClass:"block font-bold text-gray-700"},[e._v(e._s(t.name))]),e._v(" "),s("span",{staticClass:"block text-sm text-gray-600"},[e._v(e._s(e.__("SKU"))+" : "+e._s(t.sku))]),e._v(" "),s("span",{staticClass:"block text-sm text-gray-600"},[e._v(e._s(e.__("Barcode"))+" : "+e._s(t.barcode))])])})),0)])]),e._v(" "),s("div",{staticClass:"overflow-x-auto"},[s("table",{staticClass:"w-full"},[s("thead",[s("tr",e._l(e.form.columns,(function(t,r){return s("td",{key:r,staticClass:"text-gray-700 p-2 border border-gray-300 bg-gray-200",attrs:{width:"200"}},[e._v(e._s(t.label))])})),0)]),e._v(" "),s("tbody",[e._l(e.form.products,(function(t,r){return s("tr",{key:r,class:t.procurement.$invalid?"bg-red-200 border-2 border-red-500":"bg-gray-100"},[e._l(e.form.columns,(function(i,n){return["name"===i.type?s("td",{key:n,staticClass:"p-2 text-gray-600 border border-gray-300"},[s("span",{staticClass:"font-semibold"},[e._v(e._s(t.name))]),e._v(" "),s("div",{staticClass:"flex justify-between"},[s("div",{staticClass:"flex -mx-1 flex-col"},[s("div",{staticClass:"px-1"},[s("span",{staticClass:"text-xs text-red-500 cursor-pointer underline px-1",on:{click:function(t){return e.deleteProduct(r)}}},[e._v(e._s(e.__("Delete")))])])]),e._v(" "),s("div",{staticClass:"flex -mx-1 flex-col"},[s("div",{staticClass:"px-1"},[s("span",{staticClass:"text-xs text-red-500 cursor-pointer underline px-1",on:{click:function(t){return e.setProductOptions(r)}}},[e._v(e._s(e.__("Options")))])])])])]):e._e(),e._v(" "),"text"===i.type?s("td",{key:n,staticClass:"p-2 w-3 text-gray-600 border border-gray-300"},[s("div",{staticClass:"flex items-start"},[s("input",{directives:[{name:"model",rawName:"v-model",value:t.procurement[n],expression:"product.procurement[ key ]"}],staticClass:"w-24 border-2 p-2 border-blue-400 rounded",attrs:{type:"text"},domProps:{value:t.procurement[n]},on:{change:function(t){return e.updateLine(r)},input:function(s){s.target.composing||e.$set(t.procurement,n,s.target.value)}}})])]):e._e(),e._v(" "),"tax_group_id"===i.type?s("td",{key:n,staticClass:"p-2 text-gray-600 border border-gray-300"},[s("div",{staticClass:"flex items-start"},[s("select",{directives:[{name:"model",rawName:"v-model",value:t.procurement.tax_group_id,expression:"product.procurement.tax_group_id"}],staticClass:"rounded border-blue-500 border-2 p-2",on:{change:[function(s){var r=Array.prototype.filter.call(s.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(t.procurement,"tax_group_id",s.target.multiple?r:r[0])},function(t){return e.updateLine(r)}]}},e._l(e.taxes,(function(t){return s("option",{key:t.id,domProps:{value:t.id}},[e._v(e._s(t.name))])})),0)])]):e._e(),e._v(" "),"custom_select"===i.type?s("td",{key:n,staticClass:"p-2 text-gray-600 border border-gray-300"},[s("div",{staticClass:"flex items-start"},[s("select",{directives:[{name:"model",rawName:"v-model",value:t.procurement[n],expression:"product.procurement[ key ]"}],staticClass:"rounded border-blue-500 border-2 p-2",on:{change:[function(s){var r=Array.prototype.filter.call(s.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(t.procurement,n,s.target.multiple?r:r[0])},function(t){return e.updateLine(r)}]}},e._l(i.options,(function(t){return s("option",{key:t.value,domProps:{value:t.value}},[e._v(e._s(t.label))])})),0)])]):e._e(),e._v(" "),"currency"===i.type?s("td",{key:n,staticClass:"p-2 text-gray-600 border border-gray-300"},[s("div",{staticClass:"flex items-start flex-col justify-end"},[s("span",{staticClass:"text-sm text-gray-600"},[e._v(e._s(e._f("currency")(t.procurement[n])))])])]):e._e(),e._v(" "),"unit_quantities"===i.type?s("td",{key:n,staticClass:"p-2 text-gray-600 border border-gray-300"},[s("div",{staticClass:"flex items-start"},[s("select",{directives:[{name:"model",rawName:"v-model",value:t.procurement.unit_id,expression:"product.procurement.unit_id"}],staticClass:"rounded border-blue-500 border-2 p-2 w-32",on:{change:function(s){var r=Array.prototype.filter.call(s.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(t.procurement,"unit_id",s.target.multiple?r:r[0])}}},e._l(t.unit_quantities,(function(t){return s("option",{key:t.id,domProps:{value:t.unit.id}},[e._v(e._s(t.unit.name))])})),0)])]):e._e()]}))],2)})),e._v(" "),s("tr",{staticClass:"bg-gray-100"},[s("td",{staticClass:"p-2 text-gray-600 border border-gray-300",attrs:{colspan:Object.keys(e.form.columns).indexOf("tax_value")}}),e._v(" "),s("td",{staticClass:"p-2 text-gray-600 border border-gray-300"},[e._v(e._s(e._f("currency")(e.totalTaxValues)))]),e._v(" "),s("td",{staticClass:"p-2 text-gray-600 border border-gray-300",attrs:{colspan:Object.keys(e.form.columns).indexOf("total_purchase_price")-(Object.keys(e.form.columns).indexOf("tax_value")+1)}}),e._v(" "),s("td",{staticClass:"p-2 text-gray-600 border border-gray-300"},[e._v(e._s(e._f("currency")(e.totalPurchasePrice)))])])],2)])])]):e._e()])])])]:e._e()],2)}),[],!1,null,null,null).exports,H={template:"#ns-procurement-invoice",methods:{printInvoice:function(){this.$htmlToPaper("printable-container")}}};const G=(0,f.Z)(H,undefined,undefined,!1,null,null,null).exports;const Q={name:"ns-notifications",data:function(){return{notifications:[],visible:!1,interval:null}},mounted:function(){var e=this;document.addEventListener("click",this.checkClickedItem),ns.websocket.enabled?Echo.private("ns.private-channel").listen("App\\Events\\NotificationDispatchedEvent",(function(t){e.pushNotificationIfNew(t.notification)})).listen("App\\Events\\NotificationDeletedEvent",(function(t){e.deleteNotificationIfExists(t.notification)})):this.interval=setInterval((function(){e.loadNotifications()}),15e3),this.loadNotifications()},destroyed:function(){clearInterval(this.interval)},methods:{__:o.__,pushNotificationIfNew:function(e){var t=this.notifications.filter((function(t){return t.id===e.id})).length>0;console.log(e),t||this.notifications.push(e)},deleteNotificationIfExists:function(e){var t=this.notifications.filter((function(t){return t.id===e.id}));if(t.length>0){var s=this.notifications.indexOf(t[0]);this.notifications.splice(s,1)}},deleteAll:function(){Popup.show(A.Z,{title:(0,o.__)("Confirm Your Action"),message:(0,o.__)("Would you like to clear all the notifications ?"),onAction:function(e){e&&a.ih.delete("/api/nexopos/v4/notifications/all").subscribe((function(e){a.kX.success(e.message).subscribe()}))}})},checkClickedItem:function(e){var t;t=!!document.getElementById("notification-center")&&document.getElementById("notification-center").contains(e.srcElement);var s=document.getElementById("notification-button").contains(e.srcElement);t||s||!this.visible||(this.visible=!1)},loadNotifications:function(){var e=this;a.ih.get("/api/nexopos/v4/notifications").subscribe((function(t){e.notifications=t}))},triggerLink:function(e){if("url"!==e.url)return window.open(e.url,"_blank")},closeNotice:function(e,t){var s=this;a.ih.delete("/api/nexopos/v4/notifications/".concat(t.id)).subscribe((function(e){s.loadNotifications()})),e.stopPropagation()}}};const K=(0,f.Z)(Q,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[s("div",{staticClass:"hover:bg-white hover:text-gray-700 hover:shadow-lg hover:border-opacity-0 rounded-full h-12 w-12 cursor-pointer font-bold text-2xl justify-center items-center flex text-gray-800",class:e.visible?"bg-white border-0 shadow-lg":"border border-gray-400",attrs:{id:"notification-button"},on:{click:function(t){e.visible=!e.visible}}},[e.notifications.length>0?s("div",{staticClass:"relative float-right"},[s("div",{staticClass:"absolute -ml-6 -mt-8"},[s("div",{staticClass:"bg-blue-400 text-white w-8 h-8 rounded-full text-xs flex items-center justify-center"},[e._v(e._s(e._f("abbreviate")(e.notifications.length)))])])]):e._e(),e._v(" "),s("i",{staticClass:"las la-bell"})]),e._v(" "),e.visible?s("div",{staticClass:"h-0 w-0",attrs:{id:"notification-center"}},[s("div",{staticClass:"absolute left-0 top-0 sm:relative w-screen zoom-out-entrance anim-duration-300 h-5/7-screen sm:w-64 sm:h-108 flex flex-row-reverse"},[s("div",{staticClass:"z-50 sm:rounded-lg shadow-lg h-full w-full bg-white md:mt-2 overflow-y-hidden flex flex-col"},[s("div",{staticClass:"sm:hidden p-2 cursor-pointer flex items-center justify-center border-b border-gray-200",on:{click:function(t){e.visible=!1}}},[s("h3",{staticClass:"font-semibold hover:text-blue-400"},[e._v("Close")])]),e._v(" "),s("div",{staticClass:"overflow-y-auto flex flex-col flex-auto"},[e._l(e.notifications,(function(t){return s("div",{key:t.id,staticClass:"notice border-b border-gray-200"},[s("div",{staticClass:"p-2 cursor-pointer",on:{click:function(s){return e.triggerLink(t)}}},[s("div",{staticClass:"flex items-center justify-between"},[s("h1",{staticClass:"font-semibold text-gray-700"},[e._v(e._s(t.title))]),e._v(" "),s("ns-close-button",{on:{click:function(s){return e.closeNotice(s,t)}}})],1),e._v(" "),s("p",{staticClass:"py-1 text-gray-600 text-sm"},[e._v(e._s(t.description))])])])})),e._v(" "),0===e.notifications.length?s("div",{staticClass:"h-full w-full flex items-center justify-center"},[s("div",{staticClass:"flex flex-col items-center"},[s("i",{staticClass:"las la-laugh-wink text-5xl text-gray-800"}),e._v(" "),s("p",{staticClass:"text-gray-600 text-sm"},[e._v(e._s(e.__("Nothing to care about !")))])])]):e._e()],2),e._v(" "),s("div",{staticClass:"cursor-pointer"},[s("h3",{staticClass:"text-sm p-2 flex items-center justify-center hover:bg-red-100 w-full text-red-400 font-semibold hover:text-red-500",on:{click:function(t){return e.deleteAll()}}},[e._v(e._s(e.__("Clear All")))])])])])]):e._e()])}),[],!1,null,null,null).exports;var J=s(9576),ee=s(381),te=s.n(ee),se=s(6598);const re={name:"ns-sale-report",data:function(){return{startDate:te()(),endDate:te()(),orders:[],field:{type:"datetimepicker",value:"2021-02-07",name:"date"}}},components:{nsDatepicker:se.Z},computed:{totalDiscounts:function(){return this.orders.length>0?this.orders.map((function(e){return e.discount})).reduce((function(e,t){return e+t})):0},totalTaxes:function(){return this.orders.length>0?this.orders.map((function(e){return e.tax_value})).reduce((function(e,t){return e+t})):0},totalOrders:function(){return this.orders.length>0?this.orders.map((function(e){return e.total})).reduce((function(e,t){return e+t})):0}},methods:{printSaleReport:function(){this.$htmlToPaper("sale-report")},setStartDate:function(e){this.startDate=e.format(),console.log(this.startDate)},loadReport:function(){var e=this;if(null===this.startDate||null===this.endDate)return a.kX.error((0,o.__)("Unable to proceed. Select a correct time range.")).subscribe();var t=te()(this.startDate);if(te()(this.endDate).isBefore(t))return a.kX.error((0,o.__)("Unable to proceed. The current time range is not valid.")).subscribe();a.ih.post("/api/nexopos/v4/reports/sale-report",{startDate:this.startDate,endDate:this.endDate}).subscribe((function(t){e.orders=t}),(function(e){a.kX.error(e.message).subscribe()}))},setEndDate:function(e){this.endDate=e.format()}}};const ie=(0,f.Z)(re,(function(){var e=this.$createElement;return(this._self._c||e)("div")}),[],!1,null,null,null).exports;const ne={name:"ns-sold-stock-report",data:function(){return{startDate:te()(),endDate:te()(),products:[]}},components:{nsDatepicker:se.Z},computed:{totalQuantity:function(){return this.products.length>0?this.products.map((function(e){return e.quantity})).reduce((function(e,t){return e+t})):0},totalTaxes:function(){return this.products.length>0?this.products.map((function(e){return e.tax_value})).reduce((function(e,t){return e+t})):0},totalPrice:function(){return console.log(this.products),this.products.length>0?this.products.map((function(e){return e.total_price})).reduce((function(e,t){return e+t})):0}},methods:{printSaleReport:function(){this.$htmlToPaper("report-printable")},setStartDate:function(e){this.startDate=e.format()},loadReport:function(){var e=this;if(null===this.startDate||null===this.endDate)return a.kX.error((0,o.__)("Unable to proceed. Select a correct time range.")).subscribe();var t=te()(this.startDate);if(te()(this.endDate).isBefore(t))return a.kX.error((0,o.__)("Unable to proceed. The current time range is not valid.")).subscribe();a.ih.post("/api/nexopos/v4/reports/sold-stock-report",{startDate:this.startDate,endDate:this.endDate}).subscribe((function(t){e.products=t}),(function(e){a.kX.error(e.message).subscribe()}))},setEndDate:function(e){this.endDate=e.format()}}};const ae=(0,f.Z)(ne,(function(){var e=this.$createElement;return(this._self._c||e)("div")}),[],!1,null,null,null).exports;const oe={name:"ns-profit-report",data:function(){return{startDate:te()(),endDate:te()(),products:[]}},components:{nsDatepicker:se.Z},computed:{totalQuantities:function(){return this.products.length>0?this.products.map((function(e){return e.quantity})).reduce((function(e,t){return e+t})):0},totalPurchasePrice:function(){return this.products.length>0?this.products.map((function(e){return e.total_purchase_price})).reduce((function(e,t){return e+t})):0},totalSalePrice:function(){return this.products.length>0?this.products.map((function(e){return e.total_price})).reduce((function(e,t){return e+t})):0},totalProfit:function(){return this.products.length>0?this.products.map((function(e){return e.total_price-e.total_purchase_price})).reduce((function(e,t){return e+t})):0},totalTax:function(){return this.products.length>0?this.products.map((function(e){return e.tax_value})).reduce((function(e,t){return e+t})):0}},methods:{printSaleReport:function(){this.$htmlToPaper("profit-report")},setStartDate:function(e){this.startDate=e.format(),console.log(this.startDate)},loadReport:function(){var e=this;if(null===this.startDate||null===this.endDate)return a.kX.error((0,o.__)("Unable to proceed. Select a correct time range.")).subscribe();var t=te()(this.startDate);if(te()(this.endDate).isBefore(t))return a.kX.error((0,o.__)("Unable to proceed. The current time range is not valid.")).subscribe();a.ih.post("/api/nexopos/v4/reports/profit-report",{startDate:this.startDate,endDate:this.endDate}).subscribe((function(t){e.products=t}),(function(e){a.kX.error(e.message).subscribe()}))},setEndDate:function(e){this.endDate=e.format()}}};const le=(0,f.Z)(oe,(function(){var e=this.$createElement;return(this._self._c||e)("div")}),[],!1,null,null,null).exports,ce={name:"ns-cash-flow",mounted:function(){},components:{nsDatepicker:se.Z},data:function(){return{startDate:te()(),endDate:te()(),report:[]}},computed:{totalDebit:function(){return 0},totalCredit:function(){return 0}},methods:{setStartDate:function(e){this.startDate=e.format()},setEndDate:function(e){this.endDate=e.format()},loadReport:function(){var e=this,t=te()(this.startDate),s=te()(this.endDate);a.ih.post("/api/nexopos/v4/reports/cash-flow",{startDate:t,endDate:s}).subscribe((function(t){e.report=t,console.log(e.report)}),(function(e){a.kX.error(e.message).subscribe()}))}}};const de=(0,f.Z)(ce,undefined,undefined,!1,null,null,null).exports,ue={name:"ns-yearly-report",mounted:function(){this.loadReport()},components:{nsDatepicker:se.Z},data:function(){return{startDate:te()(),endDate:te()(),report:{},year:ns.date.getMoment().format("Y"),labels:["month_paid_orders","month_taxes","month_expenses","month_income"]}},computed:{totalDebit:function(){return 0},totalCredit:function(){return 0}},methods:{setStartDate:function(e){this.startDate=e.format()},setEndDate:function(e){this.endDate=e.format()},printSaleReport:function(){this.$htmlToPaper("annual-report")},sumOf:function(e){return Object.values(this.report).length>0?Object.values(this.report).map((function(t){return parseFloat(t[e])||0})).reduce((function(e,t){return e+t})):0},recomputeForSpecificYear:function(){var e=this;Popup.show(A.Z,{title:__("Would you like to proceed ?"),message:__("The report will be computed for the current year, a job will be dispatched and you'll be informed once it's completed."),onAction:function(t){t&&a.ih.post("/api/nexopos/v4/reports/compute/yearly",{year:e.year}).subscribe((function(e){a.kX.success(e.message).subscribe()}),(function(e){a.kX.success(e.message||__("An unexpected error has occured.")).subscribe()}))}})},getReportForMonth:function(e){return console.log(this.report,e),this.report[e]},loadReport:function(){var e=this,t=this.year;a.ih.post("/api/nexopos/v4/reports/annual-report",{year:t}).subscribe((function(t){e.report=t}),(function(e){a.kX.error(e.message).subscribe()}))}}};const fe=(0,f.Z)(ue,undefined,undefined,!1,null,null,null).exports,pe={name:"ns-best-products-report",mounted:function(){},components:{nsDatepicker:se.Z},data:function(){return{startDate:te()(),endDate:te()(),report:null,sort:""}},computed:{totalDebit:function(){return 0},totalCredit:function(){return 0}},methods:{setStartDate:function(e){this.startDate=e.format()},setEndDate:function(e){this.endDate=e.format()},printSaleReport:function(){this.$htmlToPaper("best-products-report")},loadReport:function(){var e=this,t=te()(this.startDate),s=te()(this.endDate);a.ih.post("/api/nexopos/v4/reports/products-report",{startDate:t.format("YYYY/MM/DD HH:mm"),endDate:s.format("YYYY/MM/DD HH:mm"),sort:this.sort}).subscribe((function(t){t.current.products=Object.values(t.current.products),e.report=t,console.log(e.report)}),(function(e){a.kX.error(e.message).subscribe()}))}}};const me=(0,f.Z)(pe,undefined,undefined,!1,null,null,null).exports;var he=s(8655);const ve={name:"ns-payment-types-report",data:function(){return{startDate:te()(),endDate:te()(),report:[],field:{type:"datetimepicker",value:"2021-02-07",name:"date"}}},components:{nsDatepicker:se.Z,nsDateTimePicker:he.V},computed:{},mounted:function(){},methods:{printSaleReport:function(){this.$htmlToPaper("sale-report")},setStartDate:function(e){console.log(e),this.startDate=e.format()},loadReport:function(){var e=this;if(null===this.startDate||null===this.endDate)return a.kX.error((0,o.__)("Unable to proceed. Select a correct time range.")).subscribe();var t=te()(this.startDate);if(te()(this.endDate).isBefore(t))return a.kX.error((0,o.__)("Unable to proceed. The current time range is not valid.")).subscribe();a.ih.post("/api/nexopos/v4/reports/payment-types",{startDate:this.startDate,endDate:this.endDate}).subscribe((function(t){e.report=t}),(function(e){a.kX.error(e.message).subscribe()}))},setEndDate:function(e){console.log(e),this.endDate=e.format()}}};const be=(0,f.Z)(ve,(function(){var e=this.$createElement;return(this._self._c||e)("div")}),[],!1,null,null,null).exports;const _e={name:"ns-dashboard-cards",data:function(){return{report:{}}},mounted:function(){this.loadReport(),console.log(nsLanguage.getEntries())},methods:{__:o.__,loadReport:function(){var e=this;a.ih.get("/api/nexopos/v4/dashboard/day").subscribe((function(t){e.report=t}))}}};const ge=(0,f.Z)(_e,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"-m-4 flex flex-wrap"},[s("div",{staticClass:"p-4 w-full md:w-1/2 lg:w-1/4"},[s("div",{staticClass:"flex flex-auto flex-col rounded-lg shadow-lg bg-gradient-to-br from-blue-400 to-blue-600 text-white px-3 py-5"},[s("div",{staticClass:"flex flex-row md:flex-col flex-auto"},[s("div",{staticClass:"w-1/2 md:w-full flex md:flex-col md:items-start items-center justify-center"},[s("h6",{staticClass:"font-bold hidden text-right md:inline-block"},[e._v(e._s(e.__("Total Sales")))]),e._v(" "),s("h3",{staticClass:"text-2xl font-black"},[e._v("\n "+e._s(e._f("currency")(e.report.total_paid_orders||0,"abbreviate"))+"\n ")])]),e._v(" "),s("div",{staticClass:"w-1/2 md:w-full flex flex-col px-2 justify-end items-end"},[s("h6",{staticClass:"font-bold inline-block text-right md:hidden"},[e._v(e._s(e.__("Total Sales")))]),e._v(" "),s("h4",{staticClass:"text-xs text-right"},[e._v("+"+e._s(e._f("currency")(e.report.day_paid_orders||0))+" "+e._s(e.__("Today")))])])])])]),e._v(" "),s("div",{staticClass:"p-4 w-full md:w-1/2 lg:w-1/4"},[s("div",{staticClass:"flex flex-auto flex-col rounded-lg shadow-lg bg-gradient-to-br from-green-400 to-green-600 text-white px-3 py-5"},[s("div",{staticClass:"flex flex-row md:flex-col flex-auto"},[s("div",{staticClass:"w-1/2 md:w-full flex md:flex-col md:items-start items-center justify-center"},[s("h6",{staticClass:"font-bold hidden text-right md:inline-block"},[e._v(e._s(e.__("Incomplete Orders")))]),e._v(" "),s("h3",{staticClass:"text-2xl font-black"},[e._v("\n "+e._s(e._f("currency")(e.report.total_partially_paid_orders+e.report.total_unpaid_orders||0,"abbreviate"))+"\n ")])]),e._v(" "),s("div",{staticClass:"w-1/2 md:w-full flex flex-col px-2 justify-end items-end"},[s("h6",{staticClass:"font-bold inline-block text-right md:hidden"},[e._v(e._s(e.__("Incomplete Orders")))]),e._v(" "),s("h4",{staticClass:"text-xs text-right"},[e._v("+"+e._s(e._f("currency")(e.report.day_unpaid_orders+e.report.day_partially_paid_orders||0))+" "+e._s(e.__("Today")))])])])])]),e._v(" "),s("div",{staticClass:"p-4 w-full md:w-1/2 lg:w-1/4"},[s("div",{staticClass:"flex flex-auto flex-col rounded-lg shadow-lg bg-gradient-to-br from-red-300 via-red-400 to-red-500 text-white px-3 py-5"},[s("div",{staticClass:"flex flex-row md:flex-col flex-auto"},[s("div",{staticClass:"w-1/2 md:w-full flex md:flex-col md:items-start items-center justify-center"},[s("h6",{staticClass:"font-bold hidden text-right md:inline-block"},[e._v(e._s(e.__("Wasted Goods")))]),e._v(" "),s("h3",{staticClass:"text-2xl font-black"},[e._v("\n "+e._s(e._f("currency")(e.report.total_wasted_goods||0,"abbreviate"))+"\n ")])]),e._v(" "),s("div",{staticClass:"w-1/2 md:w-full flex flex-col px-2 justify-end items-end"},[s("h6",{staticClass:"font-bold inline-block text-right md:hidden"},[e._v(e._s(e.__("Wasted Goods")))]),e._v(" "),s("h4",{staticClass:"text-xs text-right"},[e._v("+"+e._s(e._f("currency")(e.report.day_wasted_goods||0))+" "+e._s(e.__("Today")))])])])])]),e._v(" "),s("div",{staticClass:"p-4 w-full md:w-1/2 lg:w-1/4"},[s("div",{staticClass:"flex flex-auto flex-col rounded-lg shadow-lg bg-gradient-to-br from-indigo-400 to-indigo-600 text-white px-3 py-5"},[s("div",{staticClass:"flex flex-row md:flex-col flex-auto"},[s("div",{staticClass:"w-1/2 md:w-full flex md:flex-col md:items-start items-center justify-center"},[s("h6",{staticClass:"font-bold hidden text-right md:inline-block"},[e._v(e._s(e.__("Expenses")))]),e._v(" "),s("h3",{staticClass:"text-2xl font-black"},[e._v("\n "+e._s(e._f("currency")(e.report.total_expenses||0,"abbreviate"))+"\n ")])]),e._v(" "),s("div",{staticClass:"w-1/2 md:w-full flex flex-col px-2 justify-end items-end"},[s("h6",{staticClass:"font-bold inline-block text-right md:hidden"},[e._v(e._s(e.__("Expenses")))]),e._v(" "),s("h4",{staticClass:"text-xs text-right"},[e._v("+"+e._s(e._f("currency")(e.report.day_expenses||0))+" "+e._s(e.__("Today")))])])])])])])}),[],!1,null,null,null).exports;const xe={name:"ns-best-customers",mounted:function(){var e=this;this.hasLoaded=!1,this.subscription=Dashboard.bestCustomers.subscribe((function(t){e.hasLoaded=!0,e.customers=t}))},methods:{__:o.__},data:function(){return{customers:[],subscription:null,hasLoaded:!1}},destroyed:function(){this.subscription.unsubscribe()}};const ye=(0,f.Z)(xe,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"flex flex-auto flex-col shadow rounded-lg overflow-hidden"},[s("div",{staticClass:"head bg-white flex-auto"},[s("div",{staticClass:"head text-center border-b border-gray-200 text-gray-700 w-full py-2"},[s("h5",[e._v(e._s(e.__("Best Customers")))])]),e._v(" "),s("div",{staticClass:"body"},[e.hasLoaded?e._e():s("div",{staticClass:"h-56 w-full flex items-center justify-center"},[s("ns-spinner",{attrs:{size:"12",border:"4"}})],1),e._v(" "),e.hasLoaded&&0===e.customers.length?s("div",{staticClass:"h-56 flex items-center justify-center flex-col"},[s("i",{staticClass:"las la-grin-beam-sweat text-6xl text-gray-700"}),e._v(" "),s("p",{staticClass:"text-gray-600 text-sm"},[e._v(e._s(e.__("Well.. nothing to show for the meantime")))])]):e._e(),e._v(" "),e.customers.length>0?s("table",{staticClass:"table w-full"},[s("thead",e._l(e.customers,(function(t){return s("tr",{key:t.id,staticClass:"border-gray-300 border-b text-sm"},[s("th",{staticClass:"p-2"},[s("div",{staticClass:"-mx-1 flex justify-start items-center"},[e._m(0,!0),e._v(" "),s("div",{staticClass:"px-1 justify-center"},[s("h3",{staticClass:"font-semibold text-gray-600 items-center"},[e._v(e._s(t.name))])])])]),e._v(" "),s("th",{staticClass:"flex justify-end text-green-700 p-2"},[e._v(e._s(e._f("currency")(t.purchases_amount)))])])})),0)]):e._e()])])])}),[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"px-1"},[t("div",{staticClass:"rounded-full bg-gray-200 h-6 w-6 "},[t("img",{attrs:{src:"/images/user.png"}})])])}],!1,null,null,null).exports;const we={name:"ns-best-customers",data:function(){return{subscription:null,cashiers:[],hasLoaded:!1}},mounted:function(){var e=this;this.hasLoaded=!1,this.subscription=Dashboard.bestCashiers.subscribe((function(t){e.hasLoaded=!0,e.cashiers=t}))},methods:{__:o.__},destroyed:function(){this.subscription.unsubscribe()}};const Ce=(0,f.Z)(we,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"flex flex-auto flex-col shadow rounded-lg overflow-hidden"},[s("div",{staticClass:"head bg-white flex-auto"},[s("div",{staticClass:"head text-center border-b border-gray-200 text-gray-700 w-full py-2"},[s("h5",[e._v(e._s(e.__("Best Cashiers")))])]),e._v(" "),s("div",{staticClass:"body"},[e.cashiers.length>0?s("table",{staticClass:"table w-full"},[s("thead",[e._l(e.cashiers,(function(t){return s("tr",{key:t.id,staticClass:"border-gray-300 border-b text-sm"},[s("th",{staticClass:"p-2"},[s("div",{staticClass:"-mx-1 flex justify-start items-center"},[e._m(0,!0),e._v(" "),s("div",{staticClass:"px-1 justify-center"},[s("h3",{staticClass:"font-semibold text-gray-600 items-center"},[e._v(e._s(t.username))])])])]),e._v(" "),s("th",{staticClass:"flex justify-end text-green-700 p-2"},[e._v(e._s(e._f("currency")(t.total_sales,"abbreviate")))])])})),e._v(" "),0===e.cashiers.length?s("tr",[s("th",{attrs:{colspan:"2"}},[e._v(e._s(e.__("No result to display.")))])]):e._e()],2)]):e._e(),e._v(" "),e.hasLoaded?e._e():s("div",{staticClass:"h-56 flex items-center justify-center"},[s("ns-spinner",{attrs:{size:"8",border:"4"}})],1),e._v(" "),e.hasLoaded&&0===e.cashiers.length?s("div",{staticClass:"h-56 flex items-center justify-center flex-col"},[s("i",{staticClass:"las la-grin-beam-sweat text-6xl text-gray-700"}),e._v(" "),s("p",{staticClass:"text-gray-600 text-sm"},[e._v(e._s(e.__("Well.. nothing to show for the meantime.")))])]):e._e()])])])}),[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"px-1"},[t("div",{staticClass:"rounded-full bg-gray-200 h-6 w-6 "},[t("img",{attrs:{src:"/images/user.png"}})])])}],!1,null,null,null).exports;const ke={name:"ns-orders-summary",data:function(){return{orders:[],subscription:null,hasLoaded:!1}},mounted:function(){var e=this;this.hasLoaded=!1,this.subscription=Dashboard.recentOrders.subscribe((function(t){e.hasLoaded=!0,e.orders=t}))},methods:{__:o.__},destroyed:function(){this.subscription.unsubscribe()}};const je=(0,f.Z)(ke,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"flex flex-auto flex-col shadow rounded-lg overflow-hidden"},[s("div",{staticClass:"p-2 flex justify-between bg-white border-b"},[s("h3",{staticClass:"font-semibold text-gray-700"},[e._v(e._s(e.__("Recents Orders")))]),e._v(" "),s("div",{})]),e._v(" "),s("div",{staticClass:"head bg-gray-100 flex-auto flex-col flex h-56 overflow-y-auto"},[e.hasLoaded?e._e():s("div",{staticClass:"h-full flex items-center justify-center"},[s("ns-spinner",{attrs:{size:"8",border:"4"}})],1),e._v(" "),e.hasLoaded&&0===e.orders.length?s("div",{staticClass:"h-full flex items-center justify-center flex-col"},[s("i",{staticClass:"las la-grin-beam-sweat text-6xl text-gray-700"}),e._v(" "),s("p",{staticClass:"text-gray-600 text-sm"},[e._v(e._s(e.__("Well.. nothing to show for the meantime.")))])]):e._e(),e._v(" "),e._l(e.orders,(function(t){return s("div",{key:t.id,staticClass:"border-b border-gray-200 p-2 flex justify-between",class:"paid"===t.payment_status?"bg-green-50":"bg-white"},[s("div",[s("h3",{staticClass:"text-lg font-semibold text-gray-600"},[e._v(e._s(e.__("Order"))+" : "+e._s(t.code))]),e._v(" "),s("div",{staticClass:"flex -mx-2"},[s("div",{staticClass:"px-1"},[s("h4",{staticClass:"text-semibold text-xs text-gray-500"},[s("i",{staticClass:"lar la-user-circle"}),e._v(" "),s("span",[e._v(e._s(t.user.username))])])]),e._v(" "),s("div",{staticClass:"divide-y-4"}),e._v(" "),s("div",{staticClass:"px-1"},[s("h4",{staticClass:"text-semibold text-xs text-gray-600"},[s("i",{staticClass:"las la-clock"}),e._v(" "),s("span",[e._v(e._s(t.created_at))])])])])]),e._v(" "),s("div",[s("h2",{staticClass:"text-xl font-bold",class:"paid"===t.payment_status?"text-green-600":"text-gray-700"},[e._v(e._s(e._f("currency")(t.total)))])])])}))],2)])}),[],!1,null,null,null).exports;const $e={name:"ns-orders-chart",data:function(){return{totalWeeklySales:0,totalWeekTaxes:0,totalWeekExpenses:0,totalWeekIncome:0,chartOptions:{chart:{id:"vuechart-example",width:"100%",height:"100%"},stroke:{curve:"smooth",dashArray:[0,8]},xaxis:{categories:[]},colors:["#5f83f3","#AAA"]},series:[{name:(0,o.__)("Current Week"),data:[]},{name:(0,o.__)("Previous Week"),data:[]}],reportSubscription:null,report:null}},methods:{__:o.__},mounted:function(){var e=this;this.reportSubscription=Dashboard.weeksSummary.subscribe((function(t){void 0!==t.result&&(e.chartOptions.xaxis.categories=t.result.map((function(e){return e.label})),e.report=t,e.totalWeeklySales=0,e.totalWeekIncome=0,e.totalWeekExpenses=0,e.totalWeekTaxes=0,e.report.result.forEach((function(t,s){if(void 0!==t.current){var r=t.current.entries.map((function(e){return e.day_paid_orders})),i=0;r.length>0&&(i=r.reduce((function(e,t){return e+t})),e.totalWeekExpenses+=t.current.entries.map((function(e){return e.day_expenses})),e.totalWeekTaxes+=t.current.entries.map((function(e){return e.day_taxes})),e.totalWeekIncome+=t.current.entries.map((function(e){return e.day_income}))),e.series[0].data.push(i)}else e.series[0].data.push(0);if(void 0!==t.previous){var n=t.previous.entries.map((function(e){return e.day_paid_orders})),a=0;n.length>0&&(a=n.reduce((function(e,t){return e+t}))),e.series[1].data.push(a)}else e.series[1].data.push(0)})),e.totalWeeklySales=e.series[0].data.reduce((function(e,t){return e+t})))}))}};const Se=(0,f.Z)($e,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"flex flex-auto flex-col shadow rounded-lg overflow-hidden"},[s("div",{staticClass:"head bg-white flex-auto flex h-56"},[s("div",{staticClass:"w-full h-full pt-2"},[e.report?s("vue-apex-charts",{attrs:{height:"100%",type:"area",options:e.chartOptions,series:e.series}}):e._e()],1)]),e._v(" "),s("div",{staticClass:"p-2 bg-white -mx-4 flex flex-wrap"},[s("div",{staticClass:"flex w-full md:w-1/2 lg:w-full xl:w-1/2 lg:border-b lg:border-t xl:border-none border-gray-200 lg:py-1 lg:my-1"},[s("div",{staticClass:"px-4 w-1/2 lg:w-1/2 flex flex-col items-center justify-center"},[s("span",{staticClass:"text-xs text-gray-600"},[e._v(e._s(e.__("Weekly Sales")))]),e._v(" "),s("h2",{staticClass:"text-lg xl:text-xl text-gray-700 font-bold"},[e._v(e._s(e._f("currency")(e.totalWeeklySales,"abbreviate")))])]),e._v(" "),s("div",{staticClass:"px-4 w-1/2 lg:w-1/2 flex flex-col items-center justify-center"},[s("span",{staticClass:"text-xs text-gray-600"},[e._v(e._s(e.__("Week Taxes")))]),e._v(" "),s("h2",{staticClass:"text-lg xl:text-xl text-gray-700 font-bold"},[e._v(e._s(e._f("currency")(e.totalWeekTaxes,"abbreviate")))])])]),e._v(" "),s("div",{staticClass:"flex w-full md:w-1/2 lg:w-full xl:w-1/2"},[s("div",{staticClass:"px-4 w-full lg:w-1/2 flex flex-col items-center justify-center"},[s("span",{staticClass:"text-xs text-gray-600"},[e._v(e._s(e.__("Net Income")))]),e._v(" "),s("h2",{staticClass:"text-lg xl:text-xl text-gray-700 font-bold"},[e._v(e._s(e._f("currency")(e.totalWeekIncome,"abbreviate")))])]),e._v(" "),s("div",{staticClass:"px-4 w-full lg:w-1/2 flex flex-col items-center justify-center"},[s("span",{staticClass:"text-xs text-gray-600"},[e._v(e._s(e.__("Week Expenses")))]),e._v(" "),s("h2",{staticClass:"text-lg xl:text-xl text-gray-700 font-bold"},[e._v(e._s(e._f("currency")(e.totalWeekExpenses,"abbreviate")))])])])])])}),[],!1,null,null,null).exports;const Pe={name:"ns-cashier-dashboard",props:["showCommission"],data:function(){return{report:{}}},methods:{__,refreshReport:function(){Cashier.refreshReport()},getOrderStatus:function(e){switch(e){case"paid":return __("Paid");case"partially_paid":return __("Partially Paid");case"unpaid":return __("Unpaid");case"hold":return __("Hold");case"order_void":return __("Void");case"refunded":return __("Refunded");case"partially_refunded":return __("Partially Refunded");default:return $status}}},mounted:function(){var e=this;Cashier.mysales.subscribe((function(t){e.report=t}));var t=document.createRange().createContextualFragment('
\n
\n
\n \n
\n
\n
');document.querySelector(".top-tools-side").prepend(t),document.querySelector("#refresh-button").addEventListener("click",(function(){return e.refreshReport()}))}};const De=(0,f.Z)(Pe,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[s("div",{staticClass:"flex -mx-4 flex-wrap"},[s("div",{staticClass:"px-4 w-full mb-6",class:e.showCommission?"md:w-1/2 lg:w-1/4":"md:w-1/3"},[s("div",{staticClass:"flex flex-auto flex-col rounded-lg shadow-lg bg-gradient-to-br from-purple-400 to-purple-600 text-white px-3 py-5"},[s("div",{staticClass:"flex flex-row md:flex-col flex-auto"},[s("div",{staticClass:"w-1/2 md:w-full flex md:flex-col md:items-start items-center justify-center"},[s("h6",{staticClass:"font-bold hidden text-right md:inline-block"},[e._v(e._s(e.__("Total Sales")))]),e._v(" "),s("h3",{staticClass:"text-2xl font-black"},[e._v("\n "+e._s(e._f("currency")(e.report.total_sales_amount,"abbreviate"))+"\n ")])]),e._v(" "),s("div",{staticClass:"w-1/2 md:w-full flex flex-col px-2 justify-end items-end"},[s("h6",{staticClass:"font-bold inline-block text-right md:hidden"},[e._v(e._s(e.__("Total Sales")))]),e._v(" "),s("h4",{staticClass:"text-xs text-right"},[e._v("+"+e._s(e._f("currency")(e.report.total_sales_amount))+" "+e._s(e.__("Today")))])])])])]),e._v(" "),s("div",{staticClass:"px-4 w-full mb-6",class:e.showCommission?"md:w-1/2 lg:w-1/4":"md:w-1/3"},[s("div",{staticClass:"flex flex-auto flex-col rounded-lg shadow-lg bg-gradient-to-br from-red-400 to-red-600 text-white px-3 py-5"},[s("div",{staticClass:"flex flex-row md:flex-col flex-auto"},[s("div",{staticClass:"w-1/2 md:w-full flex md:flex-col md:items-start items-center justify-center"},[s("h6",{staticClass:"font-bold hidden text-right md:inline-block"},[e._v(e._s(e.__("Total Refunds")))]),e._v(" "),s("h3",{staticClass:"text-2xl font-black"},[e._v("\n "+e._s(e._f("currency")(e.report.total_refunds_amount,"abbreviate"))+"\n ")])]),e._v(" "),s("div",{staticClass:"w-1/2 md:w-full flex flex-col px-2 justify-end items-end"},[s("h6",{staticClass:"font-bold inline-block text-right md:hidden"},[e._v(e._s(e.__("Total Refunds")))]),e._v(" "),s("h4",{staticClass:"text-xs text-right"},[e._v("+"+e._s(e._f("currency")(e.report.today_refunds_amount))+" "+e._s(e.__("Today")))])])])])]),e._v(" "),s("div",{staticClass:"px-4 w-full mb-6",class:e.showCommission?"md:w-1/2 lg:w-1/4":"md:w-1/3"},[s("div",{staticClass:"flex flex-auto flex-col rounded-lg shadow-lg bg-gradient-to-br from-blue-400 to-blue-600 text-white px-3 py-5"},[s("div",{staticClass:"flex flex-row md:flex-col flex-auto"},[s("div",{staticClass:"w-1/2 md:w-full flex md:flex-col md:items-start items-center justify-center"},[s("h6",{staticClass:"font-bold hidden text-right md:inline-block"},[e._v(e._s(e.__("Clients Registered")))]),e._v(" "),s("h3",{staticClass:"text-2xl font-black"},[e._v("\n "+e._s(e.report.total_customers)+"\n ")])]),e._v(" "),s("div",{staticClass:"w-1/2 md:w-full flex flex-col px-2 justify-end items-end"},[s("h6",{staticClass:"font-bold inline-block text-right md:hidden"},[e._v(e._s(e.__("Clients Registered")))]),e._v(" "),s("h4",{staticClass:"text-xs text-right"},[e._v("+"+e._s(e.report.today_customers)+" "+e._s(e.__("Today")))])])])])]),e._v(" "),e.showCommission?s("div",{staticClass:"px-4 w-full mb-6",class:e.showCommission?"md:w-1/2 lg:w-1/4":"md:w-1/3"},[s("div",{staticClass:"flex flex-auto flex-col rounded-lg shadow-lg bg-gradient-to-br from-green-400 to-green-600 text-white px-3 py-5"},[s("div",{staticClass:"flex flex-row md:flex-col flex-auto"},[s("div",{staticClass:"w-1/2 md:w-full flex md:flex-col md:items-start items-center justify-center"},[s("h6",{staticClass:"font-bold hidden text-right md:inline-block"},[e._v(e._s(e.__("Commissions")))]),e._v(" "),s("h3",{staticClass:"text-2xl font-black"},[e._v("\n "+e._s(e._f("currency")(e.report.total_commissions))+"\n ")])]),e._v(" "),s("div",{staticClass:"w-1/2 md:w-full flex flex-col px-2 justify-end items-end"},[s("h6",{staticClass:"font-bold inline-block text-right md:hidden"},[e._v(e._s(e.__("Commissions")))]),e._v(" "),s("h4",{staticClass:"text-xs text-right"},[e._v("+"+e._s(e._f("currency")(e.report.today_commissions))+" "+e._s(e.__("Today")))])])])])]):e._e()]),e._v(" "),s("div",{staticClass:"py-4"},[e.report.today_orders&&e.report.today_orders.length>0?s("ul",{staticClass:"bg-white shadow-lg rounded overflow-hidden"},e._l(e.report.today_orders,(function(t){return s("li",{key:t.id,staticClass:"p-2 border-b-2 border-blue-400"},[s("h3",{staticClass:"font-semibold text-lg flex justify-between"},[s("span",[e._v(e._s(e.__("Total"))+" : "+e._s(e._f("currency")(t.total)))]),e._v(" "),s("span",[e._v(e._s(t.code))])]),e._v(" "),s("ul",{staticClass:"pt-2 flex -mx-1 text-sm text-gray-700"},[s("li",{staticClass:"px-1"},[e._v(e._s(e.__("Discount"))+" : "+e._s(e._f("currency")(t.discount)))]),e._v(" "),s("li",{staticClass:"px-1"},[e._v(e._s(e.__("Status"))+" : "+e._s(e.getOrderStatus(t.payment_status)))])])])})),0):e._e(),e._v(" "),e.report.today_orders&&0===e.report.today_orders.length?s("div",{staticClass:"flex items-center justify-center"},[s("i",{staticClass:"las la-frown"})]):e._e()])])}),[],!1,null,null,null).exports;var Oe=s(2242),Ee=s(7096),Te=s(1596);const Fe={name:"ns-stock-adjustment",props:["actions"],data:function(){return{search:"",timeout:null,suggestions:[],products:[]}},mounted:function(){console.log(this.actions)},methods:{__:o.__,searchProduct:function(e){var t=this;e.length>0&&a.ih.post("/api/nexopos/v4/procurements/products/search-procurement-product",{argument:e}).subscribe((function(e){if("products"===e.from){if(!(e.products.length>0))return t.closeSearch(),a.kX.error((0,o.__)("Looks like no products matched the searched term.")).subscribe();1===e.products.length?t.addSuggestion(e.products[0]):t.suggestions=e.products}else if("procurements"===e.from){if(null===e.product)return t.closeSearch(),a.kX.error((0,o.__)("Looks like no products matched the searched term.")).subscribe();t.addProductToList(e.product)}}))},addProductToList:function(e){if(this.products.filter((function(t){return t.procurement_product_id===e.id})).length>0)return this.closeSearch(),a.kX.error((0,o.__)("The product already exists on the table.")).subscribe();var t=new Object;e.unit_quantity.unit=e.unit,t.quantities=[e.unit_quantity],t.name=e.name,t.adjust_unit=e.unit_quantity,t.adjust_quantity=1,t.adjust_action="",t.adjust_reason="",t.adjust_value=0,t.id=e.product_id,t.accurate_tracking=1,t.available_quantity=e.available_quantity,t.procurement_product_id=e.id,t.procurement_history=[{label:"".concat(e.procurement.name," (").concat(e.available_quantity,")"),value:e.id}],this.products.push(t),this.closeSearch()},addSuggestion:function(e){var t=this;(0,E.D)([a.ih.get("/api/nexopos/v4/products/".concat(e.id,"/units/quantities"))]).subscribe((function(s){if(!(s[0].length>0))return a.kX.error((0,o.__)("This product does't have any stock to adjust.")).subscribe();e.quantities=s[0],e.adjust_quantity=1,e.adjust_action="",e.adjust_reason="",e.adjust_unit="",e.adjust_value=0,e.procurement_product_id=0,t.products.push(e),t.closeSearch(),e.accurate_tracking}))},closeSearch:function(){this.search="",this.suggestions=[]},recalculateProduct:function(e){""!==e.adjust_unit&&(["deleted","defective","lost"].includes(e.adjust_action)?e.adjust_value=-e.adjust_quantity*e.adjust_unit.sale_price:e.adjust_value=e.adjust_quantity*e.adjust_unit.sale_price),this.$forceUpdate()},openQuantityPopup:function(e){var t=this;e.quantity;new Promise((function(t,s){Oe.G.show(Ee.Z,{resolve:t,reject:s,quantity:e.adjust_quantity})})).then((function(s){if(!["added"].includes(e.adjust_action)){if(void 0!==e.accurate_tracking&&s.quantity>e.available_quantity)return a.kX.error((0,o.__)("The specified quantity exceed the available quantity.")).subscribe();if(s.quantity>e.adjust_unit.quantity)return a.kX.error((0,o.__)("The specified quantity exceed the available quantity.")).subscribe()}e.adjust_quantity=s.quantity,t.recalculateProduct(e)}))},proceedStockAdjustment:function(){var e=this;if(0===this.products.length)return a.kX.error((0,o.__)("Unable to proceed as the table is empty.")).subscribe();Oe.G.show(A.Z,{title:(0,o.__)("Confirm Your Action"),message:(0,o.__)("The stock adjustment is about to be made. Would you like to confirm ?"),onAction:function(t){t&&a.ih.post("/api/nexopos/v4/products/adjustments",{products:e.products}).subscribe((function(t){a.kX.success(t.message).subscribe(),e.products=[]}),(function(e){a.kX.error(e.message).subscribe()}))}})},provideReason:function(e){new Promise((function(t,s){Oe.G.show(Te.Z,{title:(0,o.__)("More Details"),resolve:t,reject:s,message:(0,o.__)("Useful to describe better what are the reasons that leaded to this adjustment."),input:e.adjust_reason,onAction:function(t){!1!==t&&(e.adjust_reason=t)}})})).then((function(e){a.kX.success((0,o.__)("The reason has been updated.")).susbcribe()})).catch((function(e){}))},removeProduct:function(e){var t=this;Oe.G.show(A.Z,{title:(0,o.__)("Confirm Your Action"),message:(0,o.__)("Would you like to remove this product from the table ?"),onAction:function(s){if(s){var r=t.products.indexOf(e);t.products.splice(r,1)}}})}},watch:{search:function(){var e=this;this.search.length>0?(clearTimeout(this.timeout),this.timeout=setTimeout((function(){e.searchProduct(e.search)}),500)):this.closeSearch()}}};const Ae=(0,f.Z)(Fe,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[s("div",{staticClass:"input-field flex border-2 border-blue-400 rounded"},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.search,expression:"search"}],staticClass:"p-2 bg-white flex-auto outline-none",attrs:{type:"text"},domProps:{value:e.search},on:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"esc",27,t.key,["Esc","Escape"])?null:e.closeSearch()},input:function(t){t.target.composing||(e.search=t.target.value)}}}),e._v(" "),s("button",{staticClass:"px-3 py-2 bg-blue-400 text-white"},[e._v(e._s(e.__("Search")))])]),e._v(" "),e.suggestions.length>0?s("div",{staticClass:"h-0"},[s("div",{staticClass:"shadow h-96 relative z-10 bg-white text-gray-700 zoom-in-entrance anim-duration-300 overflow-y-auto"},[s("ul",e._l(e.suggestions,(function(t){return s("li",{key:t.id,staticClass:"cursor-pointer hover:bg-gray-100 border-b border-gray-200 p-2 flex justify-between",on:{click:function(s){return e.addSuggestion(t)}}},[s("span",[e._v(e._s(t.name))])])})),0)])]):e._e(),e._v(" "),s("div",{staticClass:"table shadow bg-white my-2 w-full "},[s("table",{staticClass:"table w-full"},[s("thead",{staticClass:"border-b border-gray-400"},[s("tr",[s("td",{staticClass:"p-2 text-gray-700"},[e._v(e._s(e.__("Product")))]),e._v(" "),s("td",{staticClass:"p-2 text-center text-gray-700",attrs:{width:"120"}},[e._v(e._s(e.__("Unit")))]),e._v(" "),s("td",{staticClass:"p-2 text-center text-gray-700",attrs:{width:"120"}},[e._v(e._s(e.__("Operation")))]),e._v(" "),s("td",{staticClass:"p-2 text-center text-gray-700",attrs:{width:"120"}},[e._v(e._s(e.__("Procurement")))]),e._v(" "),s("td",{staticClass:"p-2 text-center text-gray-700",attrs:{width:"120"}},[e._v(e._s(e.__("Quantity")))]),e._v(" "),s("td",{staticClass:"p-2 text-center text-gray-700",attrs:{width:"120"}},[e._v(e._s(e.__("Value")))]),e._v(" "),s("td",{staticClass:"p-2 text-center text-gray-700",attrs:{width:"150"}},[e._v(e._s(e.__("Actions")))])])]),e._v(" "),s("tbody",[0===e.products.length?s("tr",[s("td",{staticClass:"p-2 text-center text-gray-700",attrs:{colspan:"6"}},[e._v(e._s(e.__("Search and add some products")))])]):e._e(),e._v(" "),e._l(e.products,(function(t){return s("tr",{key:t.id},[s("td",{staticClass:"p-2 text-gray-600"},[e._v(e._s(t.name)+" ("+e._s((1===t.accurate_tracking?t.available_quantity:t.adjust_unit.quantity)||0)+")")]),e._v(" "),s("td",{staticClass:"p-2 text-gray-600"},[s("select",{directives:[{name:"model",rawName:"v-model",value:t.adjust_unit,expression:"product.adjust_unit"}],staticClass:"outline-none p-2 bg-white w-full border-2 border-blue-400",on:{change:[function(s){var r=Array.prototype.filter.call(s.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(t,"adjust_unit",s.target.multiple?r:r[0])},function(s){return e.recalculateProduct(t)}]}},e._l(t.quantities,(function(t){return s("option",{key:t.id,domProps:{value:t}},[e._v(e._s(t.unit.name))])})),0)]),e._v(" "),s("td",{staticClass:"p-2 text-gray-600"},[s("select",{directives:[{name:"model",rawName:"v-model",value:t.adjust_action,expression:"product.adjust_action"}],staticClass:"outline-none p-2 bg-white w-full border-2 border-blue-400",attrs:{name:"",id:""},on:{change:[function(s){var r=Array.prototype.filter.call(s.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(t,"adjust_action",s.target.multiple?r:r[0])},function(s){return e.recalculateProduct(t)}]}},e._l(e.actions,(function(t){return s("option",{key:t.value,domProps:{value:t.value}},[e._v(e._s(t.label))])})),0)]),e._v(" "),s("td",{staticClass:"p-2 text-gray-600"},[1===t.accurate_tracking?s("select",{directives:[{name:"model",rawName:"v-model",value:t.procurement_product_id,expression:"product.procurement_product_id"}],staticClass:"outline-none p-2 bg-white w-full border-2 border-blue-400",attrs:{name:"",id:""},on:{change:[function(s){var r=Array.prototype.filter.call(s.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(t,"procurement_product_id",s.target.multiple?r:r[0])},function(s){return e.recalculateProduct(t)}]}},e._l(t.procurement_history,(function(t){return s("option",{key:t.value,domProps:{value:t.value}},[e._v(e._s(t.label))])})),0):e._e()]),e._v(" "),s("td",{staticClass:"p-2 text-gray-600 flex items-center justify-center cursor-pointer",on:{click:function(s){return e.openQuantityPopup(t)}}},[s("span",{staticClass:"border-b border-dashed border-blue-400 py-2 px-4"},[e._v(e._s(t.adjust_quantity))])]),e._v(" "),s("td",{staticClass:"p-2 text-gray-600"},[s("span",{staticClass:"border-b border-dashed border-blue-400 py-2 px-4"},[e._v(e._s(e._f("currency")(t.adjust_value)))])]),e._v(" "),s("td",{staticClass:"p-2 text-gray-600"},[s("div",{staticClass:"-mx-1 flex justify-end"},[s("div",{staticClass:"px-1"},[s("button",{staticClass:"bg-blue-400 text-white outline-none rounded-full shadow h-10 w-10",on:{click:function(s){return e.provideReason(t)}}},[s("i",{staticClass:"las la-comment-dots"})])]),e._v(" "),s("div",{staticClass:"px-1"},[s("button",{staticClass:"bg-red-400 text-white outline-none rounded-full shadow h-10 w-10",on:{click:function(s){return e.removeProduct(t)}}},[s("i",{staticClass:"las la-times"})])])])])])}))],2)]),e._v(" "),s("div",{staticClass:"border-t border-gray-200 p-2 flex justify-end"},[s("ns-button",{attrs:{type:"info"},on:{click:function(t){return e.proceedStockAdjustment()}}},[e._v(e._s(e.__("Proceed")))])],1)])])}),[],!1,null,null,null).exports;const Ve={props:["order","billing","shipping"],methods:{__:o.__,printTable:function(){this.$htmlToPaper("invoice-container")}}};const qe=(0,f.Z)(Ve,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"shadow bg-white"},[s("div",{staticClass:"head p-2 bg-gray-100 flex justify-between border-b border-gray-300"},[s("div",{staticClass:"-mx-2 flex flex-wrap"},[s("div",{staticClass:"px-2"},[s("ns-button",{attrs:{type:"info"},on:{click:function(t){return e.printTable()}}},[s("i",{staticClass:"las la-print"}),e._v(" "),s("span",[e._v(e._s(e.__("Print")))])])],1)])]),e._v(" "),s("div",{staticClass:"body flex flex-col px-2",attrs:{id:"invoice-container"}},[s("div",{staticClass:"flex -mx-2 flex-wrap",attrs:{id:"invoice-header"}},[s("div",{staticClass:"w-full print:w-1/3 md:w-1/3 px-2"},[s("div",{staticClass:"p-2"},[s("h3",{staticClass:"font-semibold text-xl text-gray-700 border-b border-blue-400 py-2"},[e._v(e._s(e.__("Store Details")))]),e._v(" "),s("div",{staticClass:"details"},[s("ul",{staticClass:"my-1"},[s("li",{staticClass:"flex justify-between text-gray-600 text-sm mb-1"},[s("span",{staticClass:"font-semibold"},[e._v(e._s(e.__("Order Code")))]),e._v(" "),s("span",[e._v(e._s(e.order.code))])]),e._v(" "),s("li",{staticClass:"flex justify-between text-gray-600 text-sm mb-1"},[s("span",{staticClass:"font-semibold"},[e._v(e._s(e.__("Cashier")))]),e._v(" "),s("span",[e._v(e._s(e.order.user.username))])]),e._v(" "),s("li",{staticClass:"flex justify-between text-gray-600 text-sm mb-1"},[s("span",{staticClass:"font-semibold"},[e._v(e._s(e.__("Date")))]),e._v(" "),s("span",[e._v(e._s(e.order.created_at))])]),e._v(" "),s("li",{staticClass:"flex justify-between text-gray-600 text-sm mb-1"},[s("span",{staticClass:"font-semibold"},[e._v(e._s(e.__("Customer")))]),e._v(" "),s("span",[e._v(e._s(e.order.customer.name))])]),e._v(" "),s("li",{staticClass:"flex justify-between text-gray-600 text-sm mb-1"},[s("span",{staticClass:"font-semibold"},[e._v(e._s(e.__("Type")))]),e._v(" "),s("span",[e._v(e._s(e.order.type))])]),e._v(" "),s("li",{staticClass:"flex justify-between text-gray-600 text-sm mb-1"},[s("span",{staticClass:"font-semibold"},[e._v(e._s(e.__("Payment Status")))]),e._v(" "),s("span",[e._v(e._s(e.order.payment_status))])]),e._v(" "),"delivery"===e.order.type?s("li",{staticClass:"flex justify-between text-gray-600 text-sm mb-1"},[s("span",{staticClass:"font-semibold"},[e._v(e._s(e.__("Delivery Status")))]),e._v(" "),s("span",[e._v(e._s(e.order.delivery_status))])]):e._e()])])])]),e._v(" "),s("div",{staticClass:"w-full print:w-1/3 md:w-1/3 px-2"},[s("div",{staticClass:"p-2"},[s("h3",{staticClass:"font-semibold text-xl text-gray-700 border-b border-blue-400 py-2"},[e._v(e._s(e.__("Billing Details")))]),e._v(" "),s("div",{staticClass:"details"},[s("ul",{staticClass:"my-1"},e._l(e.billing,(function(t){return s("li",{key:t.id,staticClass:"flex justify-between text-gray-600 text-sm mb-1"},[s("span",{staticClass:"font-semibold"},[e._v(e._s(t.label))]),e._v(" "),s("span",[e._v(e._s(e.order.billing_address[t.name]||"N/A"))])])})),0)])])]),e._v(" "),s("div",{staticClass:"w-full print:w-1/3 md:w-1/3 px-2"},[s("div",{staticClass:"p-2"},[s("h3",{staticClass:"font-semibold text-xl text-gray-700 border-b border-blue-400 py-2"},[e._v(e._s(e.__("Shipping Details")))]),e._v(" "),s("div",{staticClass:"details"},[s("ul",{staticClass:"my-1"},e._l(e.shipping,(function(t){return s("li",{key:t.id,staticClass:"flex justify-between text-gray-600 text-sm mb-1"},[s("span",{staticClass:"font-semibold"},[e._v(e._s(t.label))]),e._v(" "),s("span",[e._v(e._s(e.order.shipping_address[t.name]||"N/A"))])])})),0)])])])]),e._v(" "),s("div",{staticClass:"table w-full my-4"},[s("table",{staticClass:"table w-full"},[s("thead",{staticClass:"text-gray-600 bg-gray-100"},[s("tr",[s("th",{staticClass:"p-2 border border-gray-200",attrs:{width:"400"}},[e._v(e._s(e.__("Product")))]),e._v(" "),s("th",{staticClass:"p-2 border border-gray-200",attrs:{width:"200"}},[e._v(e._s(e.__("Unit Price")))]),e._v(" "),s("th",{staticClass:"p-2 border border-gray-200",attrs:{width:"200"}},[e._v(e._s(e.__("Quantity")))]),e._v(" "),s("th",{staticClass:"p-2 border border-gray-200",attrs:{width:"200"}},[e._v(e._s(e.__("Discount")))]),e._v(" "),s("th",{staticClass:"p-2 border border-gray-200",attrs:{width:"200"}},[e._v(e._s(e.__("Tax")))]),e._v(" "),s("th",{staticClass:"p-2 border border-gray-200",attrs:{width:"200"}},[e._v(e._s(e.__("Total Price")))])])]),e._v(" "),s("tbody",e._l(e.order.products,(function(t){return s("tr",{key:t.id},[s("td",{staticClass:"p-2 border border-gray-200"},[s("h3",{staticClass:"text-gray-700"},[e._v(e._s(t.name))]),e._v(" "),s("span",{staticClass:"text-sm text-gray-600"},[e._v(e._s(t.unit))])]),e._v(" "),s("td",{staticClass:"p-2 border border-gray-200 text-center text-gray-700"},[e._v(e._s(e._f("currency")(t.unit_price)))]),e._v(" "),s("td",{staticClass:"p-2 border border-gray-200 text-center text-gray-700"},[e._v(e._s(t.quantity))]),e._v(" "),s("td",{staticClass:"p-2 border border-gray-200 text-center text-gray-700"},[e._v(e._s(e._f("currency")(t.discount)))]),e._v(" "),s("td",{staticClass:"p-2 border border-gray-200 text-center text-gray-700"},[e._v(e._s(e._f("currency")(t.tax_value)))]),e._v(" "),s("td",{staticClass:"p-2 border border-gray-200 text-right text-gray-700"},[e._v(e._s(e._f("currency")(t.total_price)))])])})),0),e._v(" "),s("tfoot",{staticClass:"font-semibold bg-gray-100"},[s("tr",[s("td",{staticClass:"p-2 border border-gray-200 text-center text-gray-700",attrs:{colspan:"2"}},[["unpaid","partially_paid"].includes(e.order.payment_status)?s("div",{staticClass:"flex justify-between"},[s("span",[e._v("\n "+e._s(e.__("Expiration Date"))+"\n ")]),e._v(" "),s("span",[e._v(e._s(e.order.final_payment_date))])]):e._e()]),e._v(" "),s("td",{staticClass:"p-2 border border-gray-200 text-center text-gray-700",attrs:{colspan:"2"}}),e._v(" "),s("td",{staticClass:"p-2 border border-gray-200 text-gray-700 text-left"},[e._v(e._s(e.__("Sub Total")))]),e._v(" "),s("td",{staticClass:"p-2 border border-gray-200 text-right text-gray-700"},[e._v(e._s(e._f("currency")(e.order.subtotal)))])]),e._v(" "),e.order.discount>0?s("tr",[s("td",{staticClass:"p-2 border border-gray-200 text-center text-gray-700",attrs:{colspan:"4"}}),e._v(" "),s("td",{staticClass:"p-2 border border-gray-200 text-gray-700 text-left"},[e._v(e._s(e.__("Discount")))]),e._v(" "),s("td",{staticClass:"p-2 border border-gray-200 text-right text-gray-700"},[e._v(e._s(e._f("currency")(-e.order.discount)))])]):e._e(),e._v(" "),e.order.total_coupons>0?s("tr",[s("td",{staticClass:"p-2 border border-gray-200 text-center text-gray-700",attrs:{colspan:"4"}}),e._v(" "),s("td",{staticClass:"p-2 border border-gray-200 text-left text-gray-700"},[e._v(e._s(e.__("Coupons")))]),e._v(" "),s("td",{staticClass:"p-2 border border-gray-200 text-right text-gray-700"},[e._v(e._s(e._f("currency")(-e.order.total_coupons)))])]):e._e(),e._v(" "),e.order.shipping>0?s("tr",[s("td",{staticClass:"p-2 border border-gray-200 text-center text-gray-700",attrs:{colspan:"4"}}),e._v(" "),s("td",{staticClass:"p-2 border border-gray-200 text-gray-700 text-left"},[e._v(e._s(e.__("Shipping")))]),e._v(" "),s("td",{staticClass:"p-2 border border-gray-200 text-right text-gray-700"},[e._v(e._s(e._f("currency")(e.order.shipping)))])]):e._e(),e._v(" "),s("tr",[s("td",{staticClass:"p-2 border border-gray-200 text-center text-gray-700",attrs:{colspan:"4"}}),e._v(" "),s("td",{staticClass:"p-2 border border-gray-200 text-gray-700 text-left"},[e._v(e._s(e.__("Total")))]),e._v(" "),s("td",{staticClass:"p-2 border border-gray-200 text-right text-gray-700"},[e._v(e._s(e._f("currency")(e.order.total)))])]),e._v(" "),s("tr",[s("td",{staticClass:"p-2 border border-gray-200 text-center text-gray-700",attrs:{colspan:"4"}}),e._v(" "),s("td",{staticClass:"p-2 border border-gray-200 text-gray-700 text-left"},[e._v(e._s(e.__("Paid")))]),e._v(" "),s("td",{staticClass:"p-2 border border-gray-200 text-right text-gray-700"},[e._v(e._s(e._f("currency")(e.order.tendered)))])]),e._v(" "),["partially_paid","unpaid"].includes(e.order.payment_status)?s("tr",{staticClass:"bg-red-200 border-red-300"},[s("td",{staticClass:"p-2 border border-red-200 text-center text-red-700",attrs:{colspan:"4"}}),e._v(" "),s("td",{staticClass:"p-2 border border-red-200 text-red-700 text-left"},[e._v(e._s(e.__("Due")))]),e._v(" "),s("td",{staticClass:"p-2 border border-red-200 text-right text-red-700"},[e._v(e._s(e._f("currency")(e.order.change)))])]):s("tr",[s("td",{staticClass:"p-2 border border-gray-200 text-center text-gray-700",attrs:{colspan:"4"}}),e._v(" "),s("td",{staticClass:"p-2 border border-gray-200 text-gray-700 text-left"},[e._v(e._s(e.__("Change")))]),e._v(" "),s("td",{staticClass:"p-2 border border-gray-200 text-right text-gray-700"},[e._v(e._s(e._f("currency")(e.order.change)))])])])])])])])}),[],!1,null,null,null).exports;var Ne=s(2329),Me=s(1957),Ue=s(7166),Re=s.n(Ue),Xe=s(5675),Ze=s.n(Xe),Le=window.nsState,ze=window.nsScreen,Ie=window.nsExtraComponents;r.default.use(Ze(),{name:"_blank",specs:["fullscreen=yes","titlebar=yes","scrollbars=yes"],styles:["/css/app.css"]});var We=r.default.component("vue-apex-charts",Re()),Ye=Object.assign(Object.assign({NsModules:D,NsRewardsSystem:p,NsCreateCoupons:b,NsManageProducts:U,NsSettings:g,NsReset:y,NsPermissions:F,NsProcurement:B,NsProcurementInvoice:G,NsMedia:J.Z,NsDashboardCards:ge,NsCashierDashboard:De,NsBestCustomers:ye,NsBestCashiers:Ce,NsOrdersSummary:je,NsOrdersChart:Se,NsNotifications:K,NsSaleReport:ie,NsSoldStockReport:ae,NsProfitReport:le,NsCashFlowReport:de,NsYearlyReport:fe,NsPaymentTypesReport:be,NsBestProductsReport:me,NsStockAdjustment:Ae,NsPromptPopup:Te.Z,NsAlertPopup:Ne.Z,NsConfirmPopup:A.Z,NsPOSLoadingPopup:Me.Z,NsOrderInvoice:qe,VueApexCharts:We},i),Ie),Be=new r.default({el:"#dashboard-aside",data:{sidebar:"visible"},components:Ye,mounted:function(){var e=this;Le.behaviorState.subscribe((function(t){var s=t.object;e.sidebar=s.sidebar}))}});window.nsDashboardAside=Be,window.nsDashboardOverlay=new r.default({el:"#dashboard-overlay",data:{sidebar:null},components:Ye,mounted:function(){var e=this;Le.behaviorState.subscribe((function(t){var s=t.object;e.sidebar=s.sidebar}))},methods:{closeMenu:function(){Le.setState({sidebar:"hidden"===this.sidebar?"visible":"hidden"})}}}),window.nsDashboardHeader=new r.default({el:"#dashboard-header",data:{menuToggled:!1,sidebar:"visible"},components:Ye,methods:{toggleMenu:function(){this.menuToggled=!this.menuToggled},toggleSideMenu:function(){["lg","xl"].includes(ze.breakpoint),Le.setState({sidebar:"hidden"===this.sidebar?"visible":"hidden"})}},mounted:function(){var e=this;Le.behaviorState.subscribe((function(t){var s=t.object;e.sidebar=s.sidebar}))}}),window.nsComponents=Object.assign(Ye,i),window.nsDashboardContent=new r.default({el:"#dashboard-content",components:Ye})},162:(e,t,s)=>{"use strict";s.d(t,{l:()=>M,kq:()=>L,ih:()=>U,kX:()=>R});var r=s(6486),i=s(9669),n=s(2181),a=s(8345),o=s(9624),l=s(9248),c=s(230);function d(e,t){for(var s=0;s2&&void 0!==arguments[2]?arguments[2]:{};return this._request("post",e,t,s)}},{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._request("get",e,void 0,t)}},{key:"delete",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._request("delete",e,void 0,t)}},{key:"put",value:function(e,t){var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this._request("put",e,t,s)}},{key:"response",get:function(){return this._lastRequestData}},{key:"_request",value:function(e,t){var s=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return t=L.applyFilters("http-client-url",t.replace(/\/$/,"")),this._subject.next({identifier:"async.start",url:t,data:r}),new c.y((function(n){s._client[e](t,r,Object.assign(Object.assign({},s._client.defaults[e]),i)).then((function(e){s._lastRequestData=e,n.next(e.data),n.complete(),s._subject.next({identifier:"async.stop"})})).catch((function(e){var t;n.error((null===(t=e.response)||void 0===t?void 0:t.data)||e.response||e),s._subject.next({identifier:"async.stop"})}))}))}},{key:"subject",value:function(){return this._subject}},{key:"emit",value:function(e){var t=e.identifier,s=e.value;this._subject.next({identifier:t,value:s})}}])&&d(t.prototype,s),r&&d(t,r),e}(),f=s(3);function p(e,t){for(var s=0;s=1e3){for(var s,r=Math.floor((""+e).length/3),i=2;i>=1;i--){if(((s=parseFloat((0!=r?e/Math.pow(1e3,r):e).toPrecision(i)))+"").replace(/[^a-zA-Z 0-9]+/g,"").length<=2)break}s%1!=0&&(s=s.toFixed(1)),t=s+["","k","m","b","t"][r]}return t})),S=s(1356),P=s(9698);function D(e,t){for(var s=0;s0&&window.outerWidth<=480:this.breakpoint="xs";break;case window.outerWidth>480&&window.outerWidth<=640:this.breakpoint="sm";break;case window.outerWidth>640&&window.outerWidth<=1024:this.breakpoint="md";break;case window.outerWidth>1024&&window.outerWidth<=1280:this.breakpoint="lg";break;case window.outerWidth>1280:this.breakpoint="xl"}}}])&&q(t.prototype,s),r&&q(t,r),e}()),I=new b({sidebar:["xs","sm","md"].includes(z.breakpoint)?"hidden":"visible"});U.defineClient(i),window.nsEvent=M,window.nsHttpClient=U,window.nsSnackBar=R,window.nsCurrency=S.W,window.nsTruncate=P.b,window.nsRawCurrency=S.f,window.nsAbbreviate=$,window.nsState=I,window.nsUrl=X,window.nsScreen=z,window.ChartJS=n,window.EventEmitter=m,window.Popup=y.G,window.RxJS=g,window.FormValidation=C.Z,window.nsCrudHandler=Z},4364:(e,t,s)=>{"use strict";s.r(t),s.d(t,{nsAvatar:()=>Z,nsButton:()=>o,nsCheckbox:()=>p,nsCkeditor:()=>A,nsCloseButton:()=>P,nsCrud:()=>v,nsCrudForm:()=>x,nsDate:()=>j,nsDateTimePicker:()=>N.V,nsDatepicker:()=>L,nsField:()=>w,nsIconButton:()=>D,nsInput:()=>c,nsLink:()=>l,nsMediaInput:()=>S,nsMenu:()=>n,nsMultiselect:()=>C,nsNumpad:()=>M.Z,nsSelect:()=>d.R,nsSelectAudio:()=>f,nsSpinner:()=>_,nsSubmenu:()=>a,nsSwitch:()=>k,nsTableRow:()=>b,nsTabs:()=>V,nsTabsItem:()=>q,nsTextarea:()=>y});var r=s(538),i=s(162),n=r.default.component("ns-menu",{data:function(){return{defaultToggledState:!1,_save:0}},props:["href","label","icon","notification","toggled","identifier"],template:'\n \n ',mounted:function(){var e=this;this.defaultToggledState=void 0!==this.toggled?this.toggled:this.defaultToggledState,i.l.subject().subscribe((function(t){t.value!==e.identifier&&(e.defaultToggledState=!1)}))},methods:{toggleEmit:function(){var e=this;this.toggle().then((function(t){t&&i.l.emit({identifier:"side-menu.open",value:e.identifier})}))},toggle:function(){var e=this;return new Promise((function(t,s){0===e.href.length&&(e.defaultToggledState=!e.defaultToggledState,t(e.defaultToggledState))}))}}}),a=r.default.component("ns-submenu",{data:function(){return{}},props:["href","label","active"],mounted:function(){},template:'\n
\n
  • \n \n \n \n
  • \n
    \n '}),o=r.default.component("ns-button",{data:function(){return{clicked:!1,_save:0}},props:["type","disabled","link","href","routerLink","to"],template:'\n
    \n \n \n \n
    \n ',mounted:function(){},computed:{isDisabled:function(){return this.disabled&&(0===this.disabled.length||"disabled"===this.disabled||this.disabled)},buttonclass:function(){var e;switch(this.type){case"info":e="".concat(this.isDisabled?"bg-gray-400 border border-gray-500 cursor-not-allowed text-gray-600":"shadow bg-blue-400 text-white");break;case"success":e="".concat(this.isDisabled?"bg-gray-400 border border-gray-500 cursor-not-allowed text-gray-600":"shadow bg-green-400 text-white");break;case"danger":e="".concat(this.isDisabled?"bg-gray-400 border border-gray-500 cursor-not-allowed text-gray-600":"shadow bg-red-400 text-white");break;case"warning":e="".concat(this.isDisabled?"bg-gray-400 border border-gray-500 cursor-not-allowed text-gray-600":"shadow bg-orange-400 text-white");break;default:e="".concat(this.isDisabled?"bg-gray-400 border border-gray-500 cursor-not-allowed text-gray-600":"shadow bg-white text-gray-800")}return e}}}),l=r.default.component("ns-link",{data:function(){return{clicked:!1,_save:0}},props:["type","to","href"],template:'\n
    \n \n \n
    \n ',computed:{buttonclass:function(){switch(this.type){case"info":return"shadow bg-blue-400 text-white";case"success":return"shadow bg-green-400 text-white";case"danger":return"shadow bg-red-400 text-white";case"warning":return"shadow bg-orange-400 text-white";default:return"shadow bg-white text-gray-800"}}}}),c=r.default.component("ns-input",{data:function(){return{}},mounted:function(){},computed:{hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},disabledClass:function(){return this.field.disabled?"bg-gray-200 cursor-not-allowed":"bg-transparent"},inputClass:function(){return this.disabledClass+" "+this.leadClass},leadClass:function(){return this.leading?"pl-8":"px-4"}},props:["placeholder","leading","type","field"],template:'\n
    \n \n
    \n
    \n \n {{ leading }}\n \n
    \n \n
    \n

    \n

    \n This field is required.\n This field must contain a valid email address.\n {{ error.message }}\n

    \n
    \n '}),d=s(4451),u=s(7389),f=r.default.component("ns-select-audio",{data:function(){return{}},props:["name","placeholder","field"],computed:{hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},disabledClass:function(){return this.field.disabled?"bg-gray-200 cursor-not-allowed":"bg-transparent"},inputClass:function(){return this.disabledClass+" "+this.leadClass},leadClass:function(){return this.leading?"pl-8":"px-4"}},methods:{__:u.__,playSelectedSound:function(){this.field.value.length>0&&new Audio(this.field.value).play()}},template:'\n
    \n \n
    \n
    \n \n
    \n \n
    \n

    \n

    \n {{ __( \'This field is required.\' ) }}\n {{ __( \'This field must contain a valid email address.\' ) }}\n {{ error.message }}\n

    \n
    \n '}),p=r.default.component("ns-checkbox",{data:function(){return{}},props:["checked","field","label"],template:'\n
    \n
    \n \n
    \n {{ label }}\n {{ field.label }}\n
    \n ',computed:{isChecked:function(){return this.field?this.field.value:this.checked}},methods:{toggleIt:function(){void 0!==this.field&&(this.field.value=!this.field.value),this.$emit("change",!this.checked)}}}),m=s(2242),h=s(419),v=r.default.component("ns-crud",{data:function(){return{isRefreshing:!1,sortColumn:"",searchInput:"",searchQuery:"",page:1,bulkAction:"",bulkActions:[],columns:[],selectedEntries:[],globallyChecked:!1,result:{current_page:null,data:[],first_page_url:null,from:null,last_page:null,last_page_url:null,next_page_url:null,path:null,per_page:null,prev_page_url:null,to:null,total:null}}},mounted:function(){void 0!==this.identifier&&nsCrudHandler.defineInstance(this.identifier,this),this.loadConfig()},props:["src","create-url","mode","identifier","queryParams"],computed:{getParsedSrc:function(){return"".concat(this.src,"?").concat(this.sortColumn).concat(this.searchQuery).concat(this.queryPage).concat(this.getQueryParams()?"&"+this.getQueryParams():"")},getSelectedAction:function(){var e=this,t=this.bulkActions.filter((function(t){return t.identifier===e.bulkAction}));return t.length>0&&t[0]},pagination:function(){return this.result?this.pageNumbers(this.result.last_page,this.result.current_page):[]},queryPage:function(){return this.result?"&page=".concat(this.page):""},resultInfo:function(){return(0,u.__)("displaying {perPage} on {items} items").replace("{perPage}",this.result.total).replace("{items}",this.result.total)}},methods:{__:u.__,getQueryParams:function(){var e=this;return this.queryParams?Object.keys(this.queryParams).map((function(t){return"".concat(t,"=").concat(e.queryParams[t])})).join("&"):""},pageNumbers:function(e,t){var s=[];return t>e-3?s.push(e-2,e-1,e):s.push(t,t+1,t+2,"...",e),s.filter((function(e){return e>0||"string"==typeof e}))},downloadContent:function(){i.ih.post("".concat(this.src,"/export?").concat(this.getQueryParams()),{entries:this.selectedEntries.map((function(e){return e.$id}))}).subscribe((function(e){setTimeout((function(){return document.location=e.url}),300),i.kX.success((0,u.__)("The document has been generated.")).subscribe()}),(function(e){i.kX.error(e.message||(0,u.__)("Unexpected error occured.")).subscribe()}))},clearSelectedEntries:function(){var e=this;m.G.show(h.Z,{title:(0,u.__)("Clear Selected Entries ?"),message:(0,u.__)("Would you like to clear all selected entries ?"),onAction:function(t){t&&(e.selectedEntries=[])}})},refreshRow:function(e){if(!0===e.$checked){0===this.selectedEntries.filter((function(t){return t.$id===e.$id})).length&&this.selectedEntries.push(e)}else{var t=this.selectedEntries.filter((function(t){return t.$id===e.$id}));if(t.length>0){var s=this.selectedEntries.indexOf(t[0]);this.selectedEntries.splice(s,1)}}},handleShowOptions:function(e){this.result.data.forEach((function(t){t.$id!==e.$id&&(t.$toggled=!1)}))},handleGlobalChange:function(e){var t=this;this.globallyChecked=e,this.result.data.forEach((function(s){s.$checked=e,t.refreshRow(s)}))},loadConfig:function(){var e=this;i.ih.get("".concat(this.src,"/config?").concat(this.getQueryParams())).subscribe((function(t){e.columns=t.columns,e.bulkActions=t.bulkActions,e.refresh()}),(function(e){i.kX.error(e.message,"OK",{duration:!1}).subscribe()}))},cancelSearch:function(){this.searchInput="",this.search()},search:function(){this.searchInput?this.searchQuery="&search=".concat(this.searchInput):this.searchQuery="",this.refresh()},sort:function(e){for(var t in this.columns)t!==e&&(this.columns[t].$sorted=!1,this.columns[t].$direction="");switch(this.columns[e].$sorted=!0,this.columns[e].$direction){case"asc":this.columns[e].$direction="desc";break;case"desc":this.columns[e].$direction="";break;case"":this.columns[e].$direction="asc"}["asc","desc"].includes(this.columns[e].$direction)?this.sortColumn="active=".concat(e,"&direction=").concat(this.columns[e].$direction):this.sortColumn="",this.$emit("sort",this.columns[e]),this.refresh()},bulkDo:function(){var e=this;return this.bulkAction?this.selectedEntries.length>0?(console.log(this.getSelectedAction),confirm(this.getSelectedAction.confirm||this.$slots["error-bulk-confirmation"]||(0,u.__)("No bulk confirmation message provided on the CRUD class."))?i.ih.post("".concat(this.src,"/bulk-actions"),{action:this.bulkAction,entries:this.selectedEntries.map((function(e){return e.$id}))}).subscribe((function(t){i.kX.info(t.message).subscribe(),e.selectedEntries=[],e.refresh()}),(function(e){i.kX.error(e.message).subscribe()})):void 0):i.kX.error(this.$slots["error-no-selection"]?this.$slots["error-no-selection"][0].text:(0,u.__)("No selection has been made.")).subscribe():i.kX.error(this.$slots["error-no-action"]?this.$slots["error-no-action"][0].text:(0,u.__)("No action has been selected.")).subscribe()},refresh:function(){var e=this;this.globallyChecked=!1,this.isRefreshing=!0,i.ih.get("".concat(this.getParsedSrc)).subscribe((function(t){t.data=t.data.map((function(t){return e.selectedEntries.filter((function(e){return e.$id===t.$id})).length>0&&(t.$checked=!0),t})),e.isRefreshing=!1,e.result=t,e.page=t.current_page}),(function(t){e.isRefreshing=!1,i.kX.error(t.message).subscribe()}))}},template:'\n
    \n
    \n \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \n \n
    \n {{ column.label }}\n \n \n \n \n
    \n
    {{ __( \'There is nothing to display...\' ) }}
    \n
    \n
    \n
    \n
    \n \n \n
    \n
    \n
    {{ resultInfo }}
    \n \n
    \n
    \n
    \n '}),b=r.default.component("ns-table-row",{props:["options","row","columns"],data:function(){return{optionsToggled:!1}},mounted:function(){},methods:{sanitizeHTML:function(e){var t=document.createElement("div");t.innerHTML=e;for(var s=t.getElementsByTagName("script"),r=s.length;r--;)s[r].parentNode.removeChild(s[r]);return t.innerHTML},getElementOffset:function(e){var t=e.getBoundingClientRect();return{top:t.top+window.pageYOffset,left:t.left+window.pageXOffset}},toggleMenu:function(e){var t=this;if(this.row.$toggled=!this.row.$toggled,this.$emit("toggled",this.row),this.row.$toggled)setTimeout((function(){var e=t.$el.querySelectorAll(".relative > .absolute")[0],s=t.$el.querySelectorAll(".relative")[0],r=t.getElementOffset(s);e.style.top=r.top+"px",e.style.left=r.left+"px",s.classList.remove("relative"),s.classList.add("dropdown-holder")}),100);else{var s=this.$el.querySelectorAll(".dropdown-holder")[0];s.classList.remove("dropdown-holder"),s.classList.add("relative")}},handleChanged:function(e){this.row.$checked=e,this.$emit("updated",this.row)},triggerAsync:function(e){var t=this;e.confirm?confirm(e.confirm.message)&&i.ih[e.type.toLowerCase()](e.url).subscribe((function(e){i.kX.success(e.message).subscribe(),t.$emit("reload",t.row)}),(function(e){t.toggleMenu(),i.kX.error(e.message).subscribe()})):(i.l.emit({identifier:"ns-table-row-action",value:{action:e,row:this.row,component:this}}),this.toggleMenu())}},template:'\n \n \n \n \n \n \n \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n \n \n '}),_=r.default.component("ns-spinner",{data:function(){return{}},mounted:function(){},computed:{validatedSize:function(){return this.size||24},validatedBorder:function(){return this.border||8},validatedAnimation:function(){return this.animation||"fast"}},props:["color","size","border"],template:"\n
    \n
    \n
    \n "}),g=s(7266),x=r.default.component("ns-crud-form",{data:function(){return{form:{},globallyChecked:!1,formValidation:new g.Z,rows:[]}},mounted:function(){this.loadForm()},props:["src","create-url","field-class","return-url","submit-url","submit-method","disable-tabs"],computed:{activeTabFields:function(){for(var e in this.form.tabs)if(this.form.tabs[e].active)return this.form.tabs[e].fields;return[]}},methods:{toggle:function(e){for(var t in this.form.tabs)this.form.tabs[t].active=!1;this.form.tabs[e].active=!0},handleShowOptions:function(e){this.rows.forEach((function(t){t.$id!==e.$id&&(t.$toggled=!1)}))},submit:function(){var e=this;return this.formValidation.validateForm(this.form).length>0?i.kX.error(this.$slots["error-invalid-form"]?this.$slots["error-invalid-form"][0].text:"No error message provided for having an invalid form.",this.$slots.okay?this.$slots.okay[0].text:"OK").subscribe():(this.formValidation.disableForm(this.form),void 0===this.submitUrl?i.kX.error(this.$slots["error-no-submit-url"]?this.$slots["error-no-submit-url"][0].text:"No error message provided for not having a valid submit url.",this.$slots.okay?this.$slots.okay[0].text:"OK").subscribe():void i.ih[this.submitMethod?this.submitMethod.toLowerCase():"post"](this.submitUrl,this.formValidation.extractForm(this.form)).subscribe((function(t){if("success"===t.status){if(e.returnUrl&&e.returnUrl.length>0)return document.location=e.returnUrl;e.$emit("save",t)}e.formValidation.enableForm(e.form)}),(function(t){i.kX.error(t.message,void 0,{duration:5e3}).subscribe(),e.formValidation.triggerError(e.form,t),e.formValidation.enableForm(e.form)})))},handleGlobalChange:function(e){this.globallyChecked=e,this.rows.forEach((function(t){return t.$checked=e}))},loadForm:function(){var e=this;i.ih.get("".concat(this.src)).subscribe({next:function(t){e.form=e.parseForm(t.form),i.kq.doAction("ns-crud-form-loaded",e),e.$emit("updated",e.form)},error:function(e){i.kX.error(e.message,"OKAY",{duration:0}).subscribe()}})},parseForm:function(e){e.main.value=void 0===e.main.value?"":e.main.value,e.main=this.formValidation.createFields([e.main])[0];var t=0;for(var s in e.tabs)0===t&&(e.tabs[s].active=!0),e.tabs[s].active=void 0!==e.tabs[s].active&&e.tabs[s].active,e.tabs[s].fields=this.formValidation.createFields(e.tabs[s].fields),t++;return e}},template:'\n
    \n
    \n \n
    \n
    \n
    \n
    \n \n
    \n Return\n
    \n
    \n \n
    \n
    \n
    \n
    {{ tab.label }}
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n '}),y=r.default.component("ns-textarea",{data:function(){return{}},mounted:function(){},computed:{hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},disabledClass:function(){return this.field.disabled?"bg-gray-200 cursor-not-allowed":"bg-transparent"},inputClass:function(){return this.disabledClass+" "+this.leadClass},leadClass:function(){return this.leading?"p-8":"p-2"}},props:["placeholder","leading","type","field"],template:'\n
    \n \n
    \n
    \n \n {{ leading }}\n \n
    \n \n
    \n

    \n

    \n This field is required.\n This field must contain a valid email address.\n {{ error.message }}\n

    \n
    \n '}),w=r.default.component("ns-field",{data:function(){return{}},mounted:function(){},computed:{isInputField:function(){return["text","password","email","number","tel"].includes(this.field.type)},isDateField:function(){return["date"].includes(this.field.type)},isSelectField:function(){return["select"].includes(this.field.type)},isTextarea:function(){return["textarea"].includes(this.field.type)},isCheckbox:function(){return["checkbox"].includes(this.field.type)},isMultiselect:function(){return["multiselect"].includes(this.field.type)},isSelectAudio:function(){return["select-audio"].includes(this.field.type)},isSwitch:function(){return["switch"].includes(this.field.type)},isMedia:function(){return["media"].includes(this.field.type)},isCkEditor:function(){return["ckeditor"].includes(this.field.type)},isDateTimePicker:function(){return["datetimepicker"].includes(this.field.type)},isCustom:function(){return["custom"].includes(this.field.type)}},props:["field"],methods:{addOption:function(e){"select"===this.field.type&&this.field.options.forEach((function(e){return e.selected=!1})),e.selected=!0;var t=this.field.options.indexOf(e);this.field.options.splice(t,1),this.field.options.unshift(e),this.refreshMultiselect(),this.$emit("change",{action:"addOption",option:e})},refreshMultiselect:function(){this.field.value=this.field.options.filter((function(e){return e.selected})).map((function(e){return e.value}))},removeOption:function(e){e.selected=!1,this.refreshMultiselect(),this.$emit("change",{action:"removeOption",option:e})}},template:'\n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n '}),C=r.default.component("ns-multiselect",{data:function(){return{showPanel:!1,search:""}},props:["field"],computed:{hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},_options:function(){var e=this;return this.field.options.map((function(t){return t.selected=void 0!==t.selected&&t.selected,e.field.value&&e.field.value.includes(t.value)&&(t.selected=!0),t}))}},methods:{__:u.__,addOption:function(e){this.field.disabled||(this.$emit("addOption",e),this.$forceUpdate(),setTimeout((function(){}),100))},removeOption:function(e,t){var s=this;if(!this.field.disabled)return t.preventDefault(),t.stopPropagation(),this.$emit("removeOption",e),this.$forceUpdate(),setTimeout((function(){s.search=""}),100),!1}},mounted:function(){var e=this;this.field.value&&this.field.value.reverse().forEach((function(t){var s=e.field.options.filter((function(e){return e.value===t}));s.length>=0&&e.addOption(s[0])}))},template:'\n
    \n \n
    \n
    \n
    \n
    \n
    \n {{ option.label }}\n \n
    \n
    \n
    \n
    \n \n \n
    \n
    \n \n
    \n
    \n

    \n

    \n {{ __( \'This field is required.\' ) }}\n {{ __( \'This field must contain a valid email address.\' ) }}\n {{ error.message }}\n

    \n
    \n
    \n '}),k=r.default.component("ns-switch",{data:function(){return{}},mounted:function(){},computed:{_options:function(){var e=this;return this.field.options.map((function(t){return t.selected=t.value===e.field.value,t}))},hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},disabledClass:function(){return this.field.disabled?"bg-gray-200 cursor-not-allowed":""},sizeClass:function(){return" w-1/".concat(this._options.length<=4?this._options.length:4)},inputClass:function(){return this.disabledClass+" "+this.leadClass},leadClass:function(){return this.leading?"pl-8":"px-4"}},methods:{__:u.__,setSelected:function(e){this.field.value=e.value,this._options.forEach((function(e){return e.selected=!1})),e.selected=!0,this.$forceUpdate(),this.$emit("change",e.value)}},props:["placeholder","leading","type","field"],template:'\n
    \n \n
    \n \n
    \n

    \n

    \n {{ __( \'This field is required.\' ) }}\n

    \n
    \n '}),j=r.default.component("ns-date",{data:function(){return{}},mounted:function(){},computed:{hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},disabledClass:function(){return this.field.disabled?"bg-gray-200 cursor-not-allowed":"bg-transparent"},inputClass:function(){return this.disabledClass+" "+this.leadClass},leadClass:function(){return this.leading?"pl-8":"px-4"}},props:["placeholder","leading","type","field"],template:'\n
    \n \n
    \n
    \n \n {{ leading }}\n \n
    \n \n
    \n

    \n

    \n {{ __( \'This field is required.\' ) }}\n {{ __( \'This field must contain a valid email address.\' ) }}\n {{ error.message }}\n

    \n
    \n '}),$=s(9576),S=r.default.component("ns-media-input",{template:'\n
    \n \n
    \n
    \n \n {{ leading }}\n \n
    \n
    \n
    \n \n
    \n \n \n
    \n
    \n

    \n

    \n {{ __( \'This field is required.\' ) }}\n {{ __( \'This field must contain a valid email address.\' ) }}\n {{ error.message }}\n

    \n
    \n ',computed:{hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},disabledClass:function(){return this.field.disabled?"bg-gray-200 cursor-not-allowed":"bg-transparent"},inputClass:function(){return this.disabledClass+" "+this.leadClass},leadClass:function(){return this.leading?"pl-8":"px-4"}},data:function(){return{}},props:["placeholder","leading","type","field"],mounted:function(){},methods:{toggleMedia:function(){var e=this;new Promise((function(t,s){m.G.show($.Z,Object.assign({resolve:t,reject:s},e.field.data||{}))})).then((function(t){"use-selected"===t.event&&(e.field.data&&"url"!==e.field.data.type?e.field.data&&"model"!==e.field.data.type||(e.field.value=t.value[0]):e.field.value=t.value[0].sizes.original,e.$forceUpdate())}))}}}),P=r.default.component("ns-close-button",{template:'\n \n ',methods:{clicked:function(e){this.$emit("click",e)}}}),D=r.default.component("ns-icon-button",{template:'\n \n ',props:["className","buttonClass"],methods:{clicked:function(e){this.$emit("click",e)}}}),O=s(1272),E=s.n(O),T=s(5234),F=s.n(T),A=r.default.component("ns-ckeditor",{data:function(){return{editor:F()}},components:{ckeditor:E().component},mounted:function(){},methods:{__:u.__},computed:{hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},disabledClass:function(){return this.field.disabled?"bg-gray-200 cursor-not-allowed":"bg-transparent"},inputClass:function(){return this.disabledClass+" "+this.leadClass},leadClass:function(){return this.leading?"p-8":"p-2"}},props:["placeholder","leading","type","field"],template:'\n
    \n \n
    \n
    \n \n {{ leading }}\n \n
    \n \n
    \n

    \n

    \n {{ __( \'This field is required.\' ) }}\n {{ __( \'This field must contain a valid email address.\' ) }}\n {{ error.message }}\n

    \n
    \n '}),V=r.default.component("ns-tabs",{data:function(){return{childrens:[]}},props:["active"],computed:{activeComponent:function(){var e=this.$children.filter((function(e){return e.active}));return e.length>0&&e[0]}},methods:{toggle:function(e){this.$emit("active",e.identifier),this.$emit("changeTab",e.identifier)}},mounted:function(){this.childrens=this.$children},template:'\n
    \n
    \n
    {{ tab.label }}
    \n
    \n \n
    \n '}),q=r.default.component("ns-tabs-item",{data:function(){return{}},mounted:function(){},props:["label","identifier","padding"],template:'\n
    \n \n
    \n '}),N=s(8655),M=s(3968),U=s(1726),R=s(7259);const X=r.default.extend({methods:{__:u.__},data:function(){return{svg:""}},mounted:function(){this.svg=(0,U.createAvatar)(R,{seed:this.displayName})},computed:{avatarUrl:function(){return 0===this.url.length?"":this.url}},props:["url","display-name"]});const Z=(0,s(1900).Z)(X,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"flex justify-between items-center flex-shrink-0"},[s("span",{staticClass:"hidden md:inline-block text-gray-600 px-2"},[e._v(e._s(e.__("Howdy, {name}").replace("{name}",this.displayName)))]),e._v(" "),s("span",{staticClass:"md:hidden text-gray-600 px-2"},[e._v(e._s(e.displayName))]),e._v(" "),s("div",{staticClass:"px-2"},[s("div",{staticClass:"w-8 h-8 overflow-hidden rounded-full bg-gray-600"},[""!==e.avatarUrl?s("img",{staticClass:"w-8 h-8 overflow-hidden rounded-full",attrs:{src:e.avatarUrl,alt:e.displayName,srcset:""}}):e._e(),e._v(" "),""===e.avatarUrl?s("div",{domProps:{innerHTML:e._s(e.svg)}}):e._e()])])])}),[],!1,null,null,null).exports;var L=s(6598).Z},8655:(e,t,s)=>{"use strict";s.d(t,{V:()=>o});var r=s(538),i=s(381),n=s.n(i),a=s(7389),o=r.default.component("ns-date-time-picker",{template:'\n
    \n \n
    \n \n \n {{ currentDay.format( \'YYYY/MM/DD HH:mm\' ) }}\n N/A\n \n
    \n

    {{ field.description }}

    \n \n
    \n ',props:["field","date"],data:function(){return{visible:!1,hours:0,minutes:0,currentDay:null,daysOfWeek:new Array(7).fill("").map((function(e,t){return t})),calendar:[[]]}},watch:{visible:function(){var e=this;this.visible&&setTimeout((function(){e.$refs.hours.addEventListener("focus",(function(){this.select()})),e.$refs.minutes.addEventListener("focus",(function(){this.select()}))}),100)}},mounted:function(){var e=this;document.addEventListener("mousedown",(function(t){return e.checkClickedItem(t)})),this.field?this.currentDay=[void 0,null,""].includes(this.field.value)?n()():n()(this.field.value):this.currentDay=[void 0,null,""].includes(this.date)?n()():n()(this.date),this.hours=this.currentDay.format("HH"),this.minutes=this.currentDay.format("mm"),this.build()},methods:{__:a.__,detectHoursChange:function(){parseFloat(this.hours)<0&&(this.hours=0),parseFloat(this.hours)>23&&(this.hours=23),this.updateDateTime()},detectMinuteChange:function(){parseFloat(this.minutes)<0&&(this.minutes=0),parseFloat(this.minutes)>59&&(this.minutes=59),this.updateDateTime()},updateDateTime:function(){this.currentDay.hours(this.hours),this.currentDay.minutes(this.minutes),this.selectDate(this.currentDay)},checkClickedItem:function(e){!this.$el.contains(e.srcElement)&&this.visible&&(this.visible=!1)},selectDate:function(e){this.currentDay=e,this.currentDay.hours(this.hours),this.currentDay.minutes(this.minutes);var t=this.currentDay.format("YYYY/MM/DD HH:mm");this.field?(this.field.value=t,this.$emit("change",this.field)):this.$emit("change",this.currentDay)},subMonth:function(){this.currentDay.subtract(1,"month"),this.build()},addMonth:function(){this.currentDay.add(1,"month"),this.build()},resetCalendar:function(){this.calendar=[[]]},build:function(){this.resetCalendar();this.currentDay.clone().startOf("month");for(var e=this.currentDay.clone().startOf("month"),t=this.currentDay.clone().endOf("month");;){0===e.day()&&this.calendar[0].length>0&&this.calendar.push([]);var s=this.calendar.length-1;if(this.calendar[s].push({date:e.clone(),dayOfWeek:e.day(),isToday:e.isSame(n().now(),"day")}),e.isSame(t,"day"))break;e.add(1,"day")}}}})},4451:(e,t,s)=>{"use strict";s.d(t,{R:()=>i});var r=s(7389),i=s(538).default.component("ns-select",{data:function(){return{}},props:["name","placeholder","field"],computed:{hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},disabledClass:function(){return this.field.disabled?"bg-gray-200 cursor-not-allowed":"bg-transparent"},inputClass:function(){return this.disabledClass+" "+this.leadClass},leadClass:function(){return this.leading?"pl-8":"px-4"}},methods:{__:r.__},template:'\n
    \n \n
    \n \n
    \n

    \n

    \n {{ __( \'This field is required.\' ) }}\n {{ __( \'This field must contain a valid email address.\' ) }}\n {{ error.message }}\n

    \n
    \n '})},1356:(e,t,s)=>{"use strict";s.d(t,{W:()=>c,f:()=>d});var r=s(538),i=s(2077),n=s.n(i),a=s(6740),o=s.n(a),l=new Array(parseInt(ns.currency.ns_currency_precision)).fill("").map((function(e){return 0})).join(""),c=r.default.filter("currency",(function(e){var t,s,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"full";switch(ns.currency.ns_currency_prefered){case"iso":t=ns.currency.ns_currency_iso;break;case"symbol":t=ns.currency.ns_currency_symbol}if("full"===r){var i={decimal:ns.currency.ns_currency_decimal_separator,separator:ns.currency.ns_currency_thousand_separator,precision:parseInt(ns.currency.ns_currency_precision),symbol:""};s=o()(e,i).format()}else s=n()(e).format("0.0a");return"".concat("before"===ns.currency.ns_currency_position?t:"").concat(s).concat("after"===ns.currency.ns_currency_position?t:"")})),d=function(e){var t="0.".concat(l);return parseFloat(n()(e).format(t))}},9698:(e,t,s)=>{"use strict";s.d(t,{b:()=>r});var r=s(538).default.filter("truncate",(function(e,t){return e?(e=e.toString()).length>t?e.substring(0,t)+"...":e:""}))},7266:(e,t,s)=>{"use strict";function r(e,t){for(var s=0;si});var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,s,i;return t=e,(s=[{key:"validateFields",value:function(e){var t=this;return 0===e.map((function(e){return t.checkField(e),e.errors?0===e.errors.length:0})).filter((function(e){return!1===e})).length}},{key:"validateFieldsErrors",value:function(e){var t=this;return e.map((function(e){return t.checkField(e),e.errors})).flat()}},{key:"validateForm",value:function(e){e.main&&this.validateField(e.main);var t=[];for(var s in e.tabs){var r=[],i=this.validateFieldsErrors(e.tabs[s].fields);i.length>0&&r.push(i),e.tabs[s].errors=r.flat(),t.push(r.flat())}return t.flat().filter((function(e){return void 0!==e}))}},{key:"initializeTabs",value:function(e){var t=0;for(var s in e)0===t&&(e[s].active=!0),e[s].active=void 0!==e[s].active&&e[s].active,e[s].fields=this.createFields(e[s].fields),t++;return e}},{key:"validateField",value:function(e){return this.checkField(e)}},{key:"fieldsValid",value:function(e){return!(e.map((function(e){return e.errors&&e.errors.length>0})).filter((function(e){return e})).length>0)}},{key:"createFields",value:function(e){return e.map((function(e){return e.type=e.type||"text",e.errors=e.errors||[],e.disabled=e.disabled||!1,"custom"===e.type&&(e.component=nsExtraComponents[e.name]),e}))}},{key:"createForm",value:function(e){if(e.main&&(e.main=this.createFields([e.main])[0]),e.tabs)for(var t in e.tabs)e.tabs[t].fields=this.createFields(e.tabs[t].fields),e.tabs[t].errors=[];return e}},{key:"enableFields",value:function(e){return e.map((function(e){return e.disabled=!1}))}},{key:"disableFields",value:function(e){return e.map((function(e){return e.disabled=!0}))}},{key:"disableForm",value:function(e){for(var t in e.main&&(e.main.disabled=!0),e.tabs)e.tabs[t].fields.forEach((function(e){return e.disabled=!0}))}},{key:"enableForm",value:function(e){for(var t in e.main&&(e.main.disabled=!1),e.tabs)e.tabs[t].fields.forEach((function(e){return e.disabled=!1}))}},{key:"getValue",value:function(e){var t={};return e.forEach((function(e){t[e.name]=e.value})),t}},{key:"checkField",value:function(e){var t=this;return void 0!==e.validation&&(e.errors=[],this.detectValidationRules(e.validation).forEach((function(s){t.fieldPassCheck(e,s)}))),e}},{key:"extractForm",value:function(e){var t={};if(e.main&&(t[e.main.name]=e.main.value),e.tabs)for(var s in e.tabs)void 0===t[s]&&(t[s]={}),t[s]=this.extractFields(e.tabs[s].fields);return t}},{key:"extractFields",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.forEach((function(e){["multiselect"].includes(e.type)?t[e.name]=e.options.filter((function(e){return e.selected})).map((function(e){return e.value})):t[e.name]=e.value})),t}},{key:"detectValidationRules",value:function(e){var t=function(e){var t;return["email","required"].includes(e)?{identifier:e}:(t=/(min)\:([0-9])+/g.exec(e))||(t=/(max)\:([0-9])+/g.exec(e))?{identifier:t[1],value:t[2]}:e};return Array.isArray(e)?e.filter((function(e){return"string"==typeof e})).map(t):e.split("|").map(t)}},{key:"triggerError",value:function(e,t){if(t.errors){var s=function(s){var r=s.split(".").filter((function(e){return!/^\d+$/.test(e)}));2===r.length&&e.tabs[r[0]].fields.forEach((function(e){e.name===r[1]&&t.errors[s].forEach((function(t){var s={identifier:"invalid",invalid:!0,message:t,name:e.name};e.errors.push(s)}))})),s===e.main.name&&t.errors[s].forEach((function(t){e.main.errors.push({identifier:"invalid",invalid:!0,message:t,name:e.main.name})}))};for(var r in t.errors)s(r)}}},{key:"triggerFieldsErrors",value:function(e,t){if(t&&t.errors){var s=function(s){e.forEach((function(e){e.name===s&&t.errors[s].forEach((function(t){var s={identifier:"invalid",invalid:!0,message:t,name:e.name};e.errors.push(s)}))}))};for(var r in t.errors)s(r)}}},{key:"fieldPassCheck",value:function(e,t){if("required"===t.identifier){if(void 0===e.value||null===e.value||0===e.value.length)return e.errors.push({identifier:t.identifier,invalid:!0,name:e.name});e.errors.forEach((function(s,r){s.identifier===t.identifier&&!0===s.invalid&&e.errors.splice(r,1)}))}if("email"===t.identifier){if(!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(e.value))return e.errors.push({identifier:t.identifier,invalid:!0,name:e.name});e.errors.forEach((function(s,r){!0===s[t.identifier]&&e.errors.splice(r,1)}))}return e}}])&&r(t.prototype,s),i&&r(t,i),e}()},7389:(e,t,s)=>{"use strict";s.d(t,{__:()=>r,c:()=>i});var r=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"NexoPOS";return nsLanguage.getEntries(t)&&nsLanguage.getEntries(t)[e]||e},i=function(e,t){return nsLanguage.getEntries(t)&&nsLanguage.getEntries(t)[e]||e}},8603:(e,t,s)=>{"use strict";function r(){var e=this;Object.keys(this).includes("$popup")&&this.$popup.event.subscribe((function(t){"click-overlay"===t.event&&(e.$popupParams&&void 0!==e.$popupParams.reject&&e.$popupParams.reject(!1),e.$popup.close()),"press-esc"===t.event&&(e.$popupParams&&void 0!==e.$popupParams.reject&&e.$popupParams.reject(!1),e.$popup.close())}))}s.d(t,{Z:()=>r})},6386:(e,t,s)=>{"use strict";function r(e){void 0!==this.$popupParams.resolve&&this.$popupParams.reject&&(!1!==e?this.$popupParams.resolve(e):this.$popupParams.reject(e)),this.$popup.close()}s.d(t,{Z:()=>r})},2242:(e,t,s)=>{"use strict";s.d(t,{G:()=>a});var r=s(9248);function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var s=0;s0&&void 0!==arguments[0]?arguments[0]:{};if(i(this,e),this.config={primarySelector:void 0,popupClass:"shadow-lg h-half w-1/2 bg-white"},this.container=document.createElement("div"),this.popupBody=document.createElement("div"),this.config=Object.assign(this.config,t),void 0===this.config.primarySelector&&document.querySelectorAll(".is-popup").length>0){var s=document.querySelectorAll(".is-popup").length;this.parentWrapper=document.querySelectorAll(".is-popup")[s-1]}else this.parentWrapper=document.querySelector("body").querySelectorAll("div")[0];this.event=new r.x}var t,s,a;return t=e,a=[{key:"show",value:function(t){var s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=new e(r);return i.open(t,s),i}}],(s=[{key:"open",value:function(e){var t,s,r,i=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=document.querySelector("body").querySelectorAll("div")[0];this.parentWrapper.style.filter="blur(4px)",a.style.filter="blur(6px)",this.container.setAttribute("class","absolute top-0 left-0 w-full h-full flex items-center justify-center is-popup"),this.container.addEventListener("click",(function(e){i.event.next({event:"click-overlay",value:!0}),e.stopPropagation()})),this.popupBody.addEventListener("click",(function(e){e.stopImmediatePropagation()})),this.container.style.background="rgb(51 51 51 / 20%)",this.container.id="popup-container-"+document.querySelectorAll(".is-popup").length,this.popupBody.setAttribute("class"," zoom-out-entrance"),this.popupBody.innerHTML='',this.container.appendChild(this.popupBody),document.body.appendChild(this.container);var o=Vue.extend(e);this.instance=new o({propsData:{popup:this}}),this.instance.template=(null===(t=null==e?void 0:e.options)||void 0===t?void 0:t.template)||void 0,this.instance.render=e.render||void 0,this.instance.methods=(null===(s=null==e?void 0:e.options)||void 0===s?void 0:s.methods)||(null==e?void 0:e.methods),this.instance.data=(null===(r=null==e?void 0:e.options)||void 0===r?void 0:r.data)||(null==e?void 0:e.data),this.instance.$popup=this,this.instance.$popupParams=n,this.instance.$mount("#".concat(this.container.id," .popup-body"))}},{key:"close",value:function(){var e=this;this.instance.$destroy(),this.event.unsubscribe(),this.parentWrapper.style.filter="blur(0px)";var t=document.querySelector("body").querySelectorAll("div")[0];document.querySelectorAll(".is-popup").length<=1&&(t.style.filter="blur(0px)"),this.popupBody.classList.remove("zoom-out-entrance"),this.popupBody.classList.add("zoom-in-exit"),this.container.classList.remove("is-popup"),setTimeout((function(){e.container.remove()}),300)}}])&&n(t.prototype,s),a&&n(t,a),e}()},9624:(e,t,s)=>{"use strict";s.d(t,{S:()=>n});var r=s(3260);function i(e,t){for(var s=0;s2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"info"};return r.Observable.create((function(r){var n=s.__createSnack({message:e,label:t,type:i.type}),a=n.buttonNode,o=(n.textNode,n.snackWrapper,n.sampleSnack);a.addEventListener("click",(function(e){r.onNext(a),r.onCompleted(),o.remove()})),s.__startTimer(i.duration,o)}))}},{key:"error",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"error"};return this.show(e,t,Object.assign(Object.assign({},s),{type:"error"}))}},{key:"success",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"success"};return this.show(e,t,Object.assign(Object.assign({},s),{type:"success"}))}},{key:"info",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"info"};return this.show(e,t,Object.assign(Object.assign({},s),{type:"info"}))}},{key:"__startTimer",value:function(e,t){var s,r=function(){e>0&&!1!==e&&(s=setTimeout((function(){t.remove()}),e))};t.addEventListener("mouseenter",(function(){clearTimeout(s)})),t.addEventListener("mouseleave",(function(){r()})),r()}},{key:"__createSnack",value:function(e){var t=e.message,s=e.label,r=e.type,i=void 0===r?"info":r,n=document.getElementById("snack-wrapper")||document.createElement("div"),a=document.createElement("div"),o=document.createElement("p"),l=document.createElement("div"),c=document.createElement("button"),d="",u="";switch(i){case"info":d="text-white hover:bg-blue-400 bg-blue-500",u="bg-gray-900 text-white";break;case"error":d="text-red-700 hover:bg-white bg-white",u="bg-red-500 text-white";break;case"success":d="text-green-700 hover:bg-white bg-white",u="bg-green-500 text-white"}return o.textContent=t,s&&(c.textContent=s,c.setAttribute("class","px-3 py-2 shadow rounded-lg font-bold ".concat(d)),l.appendChild(c)),a.appendChild(o),a.appendChild(l),a.setAttribute("class","md:rounded-lg py-2 px-3 md:w-2/5 w-full z-10 md:my-2 shadow-lg flex justify-between items-center zoom-in-entrance anim-duration-300 ".concat(u)),n.appendChild(a),null===document.getElementById("snack-wrapper")&&(n.setAttribute("id","snack-wrapper"),n.setAttribute("class","absolute bottom-0 w-full flex justify-between items-center flex-col"),document.body.appendChild(n)),{snackWrapper:n,sampleSnack:a,buttonsWrapper:l,buttonNode:c,textNode:o}}}])&&i(t.prototype,s),n&&i(t,n),e}()},824:(e,t,s)=>{"use strict";var r=s(381),i=s.n(r);ns.date.moment=i()(ns.date.current),ns.date.interval=setInterval((function(){ns.date.moment.add(1,"seconds"),ns.date.current=i()(ns.date.current).add(1,"seconds").format("YYYY-MM-DD HH:mm:ss")}),1e3),ns.date.getNowString=function(){var e=Date.parse((new Date).toLocaleString("en-US",{timeZone:ns.date.timeZone}));return i()(e).format("YYYY-MM-DD HH:mm:ss")},ns.date.getMoment=function(){var e=Date.parse((new Date).toLocaleString("en-US",{timeZone:ns.date.timeZone}));return i()(e)}},6700:(e,t,s)=>{var r={"./af":2786,"./af.js":2786,"./ar":867,"./ar-dz":4130,"./ar-dz.js":4130,"./ar-kw":6135,"./ar-kw.js":6135,"./ar-ly":6440,"./ar-ly.js":6440,"./ar-ma":7702,"./ar-ma.js":7702,"./ar-sa":6040,"./ar-sa.js":6040,"./ar-tn":7100,"./ar-tn.js":7100,"./ar.js":867,"./az":1083,"./az.js":1083,"./be":9808,"./be.js":9808,"./bg":8338,"./bg.js":8338,"./bm":7438,"./bm.js":7438,"./bn":8905,"./bn-bd":6225,"./bn-bd.js":6225,"./bn.js":8905,"./bo":1560,"./bo.js":1560,"./br":1278,"./br.js":1278,"./bs":622,"./bs.js":622,"./ca":2468,"./ca.js":2468,"./cs":5822,"./cs.js":5822,"./cv":877,"./cv.js":877,"./cy":7373,"./cy.js":7373,"./da":4780,"./da.js":4780,"./de":9740,"./de-at":217,"./de-at.js":217,"./de-ch":894,"./de-ch.js":894,"./de.js":9740,"./dv":5300,"./dv.js":5300,"./el":837,"./el.js":837,"./en-au":8348,"./en-au.js":8348,"./en-ca":7925,"./en-ca.js":7925,"./en-gb":2243,"./en-gb.js":2243,"./en-ie":6436,"./en-ie.js":6436,"./en-il":7207,"./en-il.js":7207,"./en-in":4175,"./en-in.js":4175,"./en-nz":6319,"./en-nz.js":6319,"./en-sg":1662,"./en-sg.js":1662,"./eo":2915,"./eo.js":2915,"./es":7093,"./es-do":5251,"./es-do.js":5251,"./es-mx":6112,"./es-mx.js":6112,"./es-us":1146,"./es-us.js":1146,"./es.js":7093,"./et":5603,"./et.js":5603,"./eu":7763,"./eu.js":7763,"./fa":6959,"./fa.js":6959,"./fi":1897,"./fi.js":1897,"./fil":2549,"./fil.js":2549,"./fo":4694,"./fo.js":4694,"./fr":4470,"./fr-ca":3049,"./fr-ca.js":3049,"./fr-ch":2330,"./fr-ch.js":2330,"./fr.js":4470,"./fy":5044,"./fy.js":5044,"./ga":9295,"./ga.js":9295,"./gd":2101,"./gd.js":2101,"./gl":8794,"./gl.js":8794,"./gom-deva":7884,"./gom-deva.js":7884,"./gom-latn":3168,"./gom-latn.js":3168,"./gu":5349,"./gu.js":5349,"./he":4206,"./he.js":4206,"./hi":94,"./hi.js":94,"./hr":316,"./hr.js":316,"./hu":2138,"./hu.js":2138,"./hy-am":1423,"./hy-am.js":1423,"./id":9218,"./id.js":9218,"./is":135,"./is.js":135,"./it":626,"./it-ch":150,"./it-ch.js":150,"./it.js":626,"./ja":9183,"./ja.js":9183,"./jv":4286,"./jv.js":4286,"./ka":2105,"./ka.js":2105,"./kk":7772,"./kk.js":7772,"./km":8758,"./km.js":8758,"./kn":9282,"./kn.js":9282,"./ko":3730,"./ko.js":3730,"./ku":1408,"./ku.js":1408,"./ky":3291,"./ky.js":3291,"./lb":6841,"./lb.js":6841,"./lo":5466,"./lo.js":5466,"./lt":7010,"./lt.js":7010,"./lv":7595,"./lv.js":7595,"./me":9861,"./me.js":9861,"./mi":5493,"./mi.js":5493,"./mk":5966,"./mk.js":5966,"./ml":7341,"./ml.js":7341,"./mn":5115,"./mn.js":5115,"./mr":370,"./mr.js":370,"./ms":9847,"./ms-my":1237,"./ms-my.js":1237,"./ms.js":9847,"./mt":2126,"./mt.js":2126,"./my":6165,"./my.js":6165,"./nb":4924,"./nb.js":4924,"./ne":6744,"./ne.js":6744,"./nl":3901,"./nl-be":9814,"./nl-be.js":9814,"./nl.js":3901,"./nn":3877,"./nn.js":3877,"./oc-lnc":2135,"./oc-lnc.js":2135,"./pa-in":5858,"./pa-in.js":5858,"./pl":4495,"./pl.js":4495,"./pt":9520,"./pt-br":7971,"./pt-br.js":7971,"./pt.js":9520,"./ro":6459,"./ro.js":6459,"./ru":238,"./ru.js":238,"./sd":950,"./sd.js":950,"./se":490,"./se.js":490,"./si":124,"./si.js":124,"./sk":4249,"./sk.js":4249,"./sl":4985,"./sl.js":4985,"./sq":1104,"./sq.js":1104,"./sr":9131,"./sr-cyrl":9915,"./sr-cyrl.js":9915,"./sr.js":9131,"./ss":5893,"./ss.js":5893,"./sv":8760,"./sv.js":8760,"./sw":1172,"./sw.js":1172,"./ta":7333,"./ta.js":7333,"./te":3110,"./te.js":3110,"./tet":2095,"./tet.js":2095,"./tg":7321,"./tg.js":7321,"./th":9041,"./th.js":9041,"./tk":9005,"./tk.js":9005,"./tl-ph":5768,"./tl-ph.js":5768,"./tlh":9444,"./tlh.js":9444,"./tr":2397,"./tr.js":2397,"./tzl":8254,"./tzl.js":8254,"./tzm":1106,"./tzm-latn":699,"./tzm-latn.js":699,"./tzm.js":1106,"./ug-cn":9288,"./ug-cn.js":9288,"./uk":7691,"./uk.js":7691,"./ur":3795,"./ur.js":3795,"./uz":6791,"./uz-latn":588,"./uz-latn.js":588,"./uz.js":6791,"./vi":5666,"./vi.js":5666,"./x-pseudo":4378,"./x-pseudo.js":4378,"./yo":5805,"./yo.js":5805,"./zh-cn":3839,"./zh-cn.js":3839,"./zh-hk":5726,"./zh-hk.js":5726,"./zh-mo":9807,"./zh-mo.js":9807,"./zh-tw":4152,"./zh-tw.js":4152};function i(e){var t=n(e);return s(t)}function n(e){if(!s.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}i.keys=function(){return Object.keys(r)},i.resolve=n,e.exports=i,i.id=6700},6598:(e,t,s)=>{"use strict";s.d(t,{Z:()=>a});var r=s(381),i=s.n(r);const n={name:"ns-datepicker",props:["label","date"],data:function(){return{visible:!1,currentDay:null,daysOfWeek:new Array(7).fill("").map((function(e,t){return t})),calendar:[[]]}},mounted:function(){document.addEventListener("click",this.checkClickedItem),this.currentDay=[void 0,null].includes(this.date)?i()():i()(this.date),this.build()},methods:{__:s(7389).__,checkClickedItem:function(e){!this.$el.contains(e.srcElement)&&this.visible&&(this.visible=!1)},selectDate:function(e){this.currentDay=e,this.visible=!1,this.$emit("change",e)},subMonth:function(){this.currentDay.subtract(1,"month"),this.build()},addMonth:function(){this.currentDay.add(1,"month"),this.build()},resetCalendar:function(){this.calendar=[[]]},build:function(){this.resetCalendar();this.currentDay.clone().startOf("month");for(var e=this.currentDay.clone().startOf("month"),t=this.currentDay.clone().endOf("month");;){0===e.day()&&this.calendar[0].length>0&&this.calendar.push([]);var s=this.calendar.length-1;if(this.calendar[s].push({date:e.clone(),dayOfWeek:e.day(),isToday:e.isSame(i().now(),"day")}),e.isSame(t,"day"))break;e.add(1,"day")}}}};const a=(0,s(1900).Z)(n,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"picker"},[s("div",{staticClass:"rounded cursor-pointer bg-white shadow px-1 py-1 flex items-center text-gray-700",on:{click:function(t){e.visible=!e.visible}}},[s("i",{staticClass:"las la-clock text-2xl"}),e._v(" "),s("span",{staticClass:"mx-1 text-sm"},[s("span",[e._v(e._s(e.label||e.__("Date"))+" : ")]),e._v(" "),e.currentDay?s("span",[e._v(e._s(e.currentDay.format("YYYY/MM/DD")))]):e._e(),e._v(" "),null===e.currentDay?s("span",[e._v(e._s(e.__("N/A")))]):e._e()])]),e._v(" "),e.visible?s("div",{staticClass:"relative h-0 w-0 -mb-2"},[s("div",{staticClass:"w-72 mt-2 shadow rounded bg-white anim-duration-300 zoom-in-entrance flex flex-col"},[s("div",{staticClass:"flex-auto"},[s("div",{staticClass:"p-2 flex items-center"},[s("div",[s("button",{staticClass:"w-8 h-8 bg-gray-400 rounded",on:{click:function(t){return e.subMonth()}}},[s("i",{staticClass:"las la-angle-left"})])]),e._v(" "),s("div",{staticClass:"flex flex-auto font-semibold text-gray-700 justify-center"},[e._v(e._s(e.currentDay.format("MMM"))+" "+e._s(e.currentDay.format("YYYY")))]),e._v(" "),s("div",[s("button",{staticClass:"w-8 h-8 bg-gray-400 rounded",on:{click:function(t){return e.addMonth()}}},[s("i",{staticClass:"las la-angle-right"})])])]),e._v(" "),s("div",{staticClass:"grid grid-flow-row grid-cols-7 grid-rows-1 gap-0 text-gray-700"},[s("div",{staticClass:"border border-gray-200 h-8 flex justify-center items-center text-sm"},[e._v(e._s(e.__("Sun")))]),e._v(" "),s("div",{staticClass:"border border-gray-200 h-8 flex justify-center items-center text-sm"},[e._v(e._s(e.__("Mon")))]),e._v(" "),s("div",{staticClass:"border border-gray-200 h-8 flex justify-center items-center text-sm"},[e._v(e._s(e.__("Tue")))]),e._v(" "),s("div",{staticClass:"border border-gray-200 h-8 flex justify-center items-center text-sm"},[e._v(e._s(e.__("Wed")))]),e._v(" "),s("div",{staticClass:"border border-gray-200 h-8 flex justify-center items-center text-sm"},[e._v(e._s(e.__("Thr")))]),e._v(" "),s("div",{staticClass:"border border-gray-200 h-8 flex justify-center items-center text-sm"},[e._v(e._s(e.__("Fri")))]),e._v(" "),s("div",{staticClass:"border border-gray-200 h-8 flex justify-center items-center text-sm"},[e._v(e._s(e.__("Sat")))])]),e._v(" "),e._l(e.calendar,(function(t,r){return s("div",{key:r,staticClass:"grid grid-flow-row grid-cols-7 grid-rows-1 gap-0 text-gray-700"},e._l(e.daysOfWeek,(function(r,i){return s("div",{key:i,staticClass:"h-8 flex justify-center items-center text-sm"},[e._l(t,(function(t,i){return[t.dayOfWeek===r?s("div",{key:i,staticClass:"h-full w-full flex items-center justify-center cursor-pointer",class:t.date.format("DD")===e.currentDay.format("DD")?"bg-blue-400 text-white border border-blue-500":"hover:bg-gray-100 border border-gray-200",on:{click:function(s){return e.selectDate(t.date)}}},[e._v("\n "+e._s(t.date.format("DD"))+"\n ")]):e._e()]}))],2)})),0)}))],2),e._v(" "),s("div")])]):e._e()])}),[],!1,null,null,null).exports},3968:(e,t,s)=>{"use strict";s.d(t,{Z:()=>a});function r(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var s=Object.prototype.toString.call(e).slice(8,-1);"Object"===s&&e.constructor&&(s=e.constructor.name);if("Map"===s||"Set"===s)return Array.from(e);if("Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return i(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var s=0,r=new Array(t);s100?100:this.backValue))),"0"===this.backValue&&(this.backValue=""),this.$emit("changed",this.floating&&this.backValue.length>0?parseFloat(this.backValue/this.number):this.backValue)):this.$emit("next",this.floating&&this.backValue.length>0?parseFloat(this.backValue/this.number):this.backValue)}}};const a=(0,s(1900).Z)(n,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"grid grid-flow-row grid-cols-3 gap-2 grid-rows-3",staticStyle:{padding:"1px"},attrs:{id:"numpad"}},[e._l(e.keys,(function(t,r){return s("div",{key:r,staticClass:"hover:bg-gray-400 hover:text-gray-800 bg-gray-300 text-2xl text-gray-700 border h-16 flex items-center justify-center cursor-pointer",staticStyle:{margin:"-1px"},on:{click:function(s){return e.inputValue(t)}}},[void 0!==t.value?s("span",[e._v(e._s(t.value))]):e._e(),e._v(" "),t.icon?s("i",{staticClass:"las",class:t.icon}):e._e()])})),e._v(" "),e._t("numpad-footer")],2)}),[],!1,null,null,null).exports},9576:(e,t,s)=>{"use strict";s.d(t,{Z:()=>o});var r=s(162),i=s(8603),n=s(7389);const a={name:"ns-media",props:["popup"],components:{VueUpload:s(2948)},data:function(){return{pages:[{label:(0,n.__)("Upload"),name:"upload",selected:!1},{label:(0,n.__)("Gallery"),name:"gallery",selected:!0}],resources:[],response:{data:[],current_page:0,from:0,to:0,next_page_url:"",prev_page_url:"",path:"",per_page:0,total:0,last_page:0,first_page:0},queryPage:1,bulkSelect:!1,files:[]}},mounted:function(){this.popupCloser();var e=this.pages.filter((function(e){return"gallery"===e.name}))[0];this.select(e)},watch:{files:function(){this.files.filter((function(e){return"0.00"===e.progress})).length>0&&(this.$refs.upload.active=!0)}},computed:{postMedia:function(){return r.kq.applyFilters("http-client-url","/api/nexopos/v4/medias")},currentPage:function(){return this.pages.filter((function(e){return e.selected}))[0]},hasOneSelected:function(){return this.response.data.filter((function(e){return e.selected})).length>0},selectedResource:function(){return this.response.data.filter((function(e){return e.selected}))[0]},csrf:function(){return ns.authentication.csrf},isPopup:function(){return void 0!==this.$popup},user_id:function(){return this.isPopup&&this.$popupParams.user_id||0}},methods:{popupCloser:i.Z,__:n.__,cancelBulkSelect:function(){this.bulkSelect=!1,this.response.data.forEach((function(e){return e.selected=!1}))},deleteSelected:function(){var e=this;if(confirm("Delete selected resources ?"))return r.ih.post("/api/nexopos/v4/medias/bulk-delete",{ids:this.response.data.filter((function(e){return e.selected})).map((function(e){return e.id}))}).subscribe((function(t){r.kX.success(t.message).subscribe(),e.loadGallery()}),(function(e){r.kX.error(e.message).subscribe()}))},select:function(e){this.pages.forEach((function(e){return e.selected=!1})),e.selected=!0,"gallery"===e.name&&this.loadGallery()},loadGallery:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;t=null===t?this.queryPage:t,this.queryPage=t,r.ih.get("/api/nexopos/v4/medias?page=".concat(t,"&user_id=").concat(this.user_id)).subscribe((function(t){t.data.forEach((function(e){return e.selected=!1})),e.response=t}))},useSelectedEntries:function(){this.$popupParams.resolve({event:"use-selected",value:this.response.data.filter((function(e){return e.selected}))}),this.$popup.close()},selectResource:function(e){var t=this;this.bulkSelect||this.response.data.forEach((function(s,r){r!==t.response.data.indexOf(e)&&(s.selected=!1)})),e.selected=!e.selected}}};const o=(0,s(1900).Z)(a,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"flex bg-white shadow-xl overflow-hidden",class:e.isPopup?"w-6/7-screen h-6/7-screen":"w-full h-full"},[s("div",{staticClass:"sidebar w-48 bg-gray-200 h-full flex-shrink-0"},[s("h3",{staticClass:"text-xl font-bold text-gray-800 my-4 text-center"},[e._v(e._s(e.__("Medias Manager")))]),e._v(" "),s("ul",e._l(e.pages,(function(t,r){return s("li",{key:r,staticClass:"hover:bg-white py-2 px-3 text-gray-700 border-l-8 cursor-pointer",class:t.selected?"bg-white border-blue-400":"border-transparent",on:{click:function(s){return e.select(t)}}},[e._v(e._s(t.label))])})),0)]),e._v(" "),"upload"===e.currentPage.name?s("div",{staticClass:"content w-full overflow-hidden flex"},[s("vue-upload",{ref:"upload",staticClass:" flex-auto flex bg-white shadow",attrs:{drop:!0,multiple:!0,headers:{"X-Requested-With":"XMLHttpRequest","X-CSRF-TOKEN":e.csrf},accept:"image/*","post-action":e.postMedia},model:{value:e.files,callback:function(t){e.files=t},expression:"files"}},[s("div",{staticClass:"border-dashed border-2 flex flex-auto m-2 p-2 flex-col border-blue-400 items-center justify-center"},[s("h3",{staticClass:"text-3xl font-bold text-gray-600 mb-4"},[e._v(e._s(e.__("Click Here Or Drop Your File To Upload")))]),e._v(" "),s("div",{staticClass:"rounded w-full md:w-2/3 text-gray-700 bg-gray-500 h-56 overflow-y-auto p-2"},[s("ul",e._l(e.files,(function(t,r){return s("li",{key:r,staticClass:"p-2 mb-2 shadow bg-white flex items-center justify-between rounded"},[s("span",[e._v(e._s(t.name))]),e._v(" "),s("span",{staticClass:"rounded bg-blue-400 flex items-center justify-center text-xs p-2"},[e._v(e._s(t.progress)+"%")])])})),0)])])])],1):e._e(),e._v(" "),"gallery"===e.currentPage.name?s("div",{staticClass:"content flex-col w-full overflow-hidden flex"},[e.popup?s("div",{staticClass:"p-2 flex flex-shrink-0 justify-between bg-gray-200"},[s("div"),e._v(" "),s("div",[s("ns-close-button",{on:{click:function(t){return e.popup.close()}}})],1)]):e._e(),e._v(" "),s("div",{staticClass:"flex flex-auto overflow-hidden"},[s("div",{staticClass:"bg-white shadow content flex flex-auto flex-col overflow-y-auto",attrs:{id:"grid"}},[s("div",{staticClass:"flex flex-auto"},[s("div",{staticClass:"p-2 overflow-x-auto"},[s("div",{staticClass:"grid grid-cols-2 md:grid-cols-4 lg:grid-cols-4 xl:grid-cols-6"},e._l(e.response.data,(function(t,r){return s("div",{key:r},[s("div",{staticClass:"p-2"},[s("div",{staticClass:"rounded-lg w-32 h-32 bg-gray-500 m-2 overflow-hidden flex items-center justify-center",class:t.selected?"ring-4 ring-blue-500 ring-opacity-50":"",on:{click:function(s){return e.selectResource(t)}}},[s("img",{staticClass:"object-cover h-full",attrs:{src:t.sizes.thumb,alt:t.name}})])])])})),0)]),e._v(" "),0===e.response.data.length?s("div",{staticClass:"flex flex-auto items-center justify-center"},[s("h3",{staticClass:"text-2xl text-gray-600 font-bold"},[e._v(e._s(e.__("Nothing has already been uploaded")))])]):e._e()])]),e._v(" "),!e.bulkSelect&&e.hasOneSelected?s("div",{staticClass:"w-64 flex-shrink-0 bg-gray-200",attrs:{id:"preview"}},[s("div",{staticClass:"h-64 bg-gray-600 flex items-center justify-center"},[s("img",{attrs:{src:e.selectedResource.sizes.thumb,alt:e.selectedResource.name}})]),e._v(" "),s("div",{staticClass:"p-4 text-gray-700 text-sm",attrs:{id:"details"}},[s("p",{staticClass:"flex flex-col mb-2"},[s("strong",{staticClass:"font-bold block"},[e._v(e._s(e.__("File Name"))+": ")]),s("span",[e._v(e._s(e.selectedResource.name))])]),e._v(" "),s("p",{staticClass:"flex flex-col mb-2"},[s("strong",{staticClass:"font-bold block"},[e._v(e._s(e.__("Uploaded At"))+":")]),s("span",[e._v(e._s(e.selectedResource.created_at))])]),e._v(" "),s("p",{staticClass:"flex flex-col mb-2"},[s("strong",{staticClass:"font-bold block"},[e._v(e._s(e.__("By"))+" :")]),s("span",[e._v(e._s(e.selectedResource.user.username))])])])]):e._e()]),e._v(" "),s("div",{staticClass:"p-2 flex flex-shrink-0 justify-between bg-gray-200"},[s("div",{staticClass:"flex -mx-2 flex-shrink-0"},[s("div",{staticClass:"px-2 flex-shrink-0 flex"},[s("div",{staticClass:"rounded shadow overflow-hidden border-blue-400 flex text-sm text-gray-700"},[e.bulkSelect?s("button",{staticClass:"bg-white hover:bg-blue-400 hover:text-white py-2 px-3",on:{click:function(t){return e.cancelBulkSelect()}}},[s("i",{staticClass:"las la-times"})]):e._e(),e._v(" "),e.hasOneSelected&&!e.bulkSelect?s("button",{staticClass:"bg-white hover:bg-blue-400 hover:text-white py-2 px-3",on:{click:function(t){e.bulkSelect=!0}}},[s("i",{staticClass:"las la-check-circle"})]):e._e(),e._v(" "),e.hasOneSelected?s("button",{staticClass:"bg-red-400 text-white hover:bg-red-500 hover:text-white py-2 px-3",on:{click:function(t){return e.deleteSelected()}}},[s("i",{staticClass:"las la-trash"})]):e._e()])])]),e._v(" "),s("div",{staticClass:"flex-shrink-0 -mx-2 flex"},[s("div",{staticClass:"px-2"},[s("div",{staticClass:"rounded shadow overflow-hidden border-blue-400 flex text-sm text-gray-700"},[s("button",{staticClass:"p-2",class:1===e.response.current_page?"bg-gray-100 text-gray-600 cursor-not-allowed":"bg-white hover:bg-blue-400 hover:text-white",attrs:{disabled:1===e.response.current_page},on:{click:function(t){return e.loadGallery(e.response.current_page-1)}}},[e._v(e._s(e.__("Previous")))]),e._v(" "),s("hr",{staticClass:"border-r border-gray-700"}),e._v(" "),s("button",{staticClass:"p-2",class:e.response.current_page===e.response.last_page?"bg-gray-100 text-gray-600 cursor-not-allowed":"bg-white hover:bg-blue-400 hover:text-white",attrs:{disabled:e.response.current_page===e.response.last_page},on:{click:function(t){return e.loadGallery(e.response.current_page+1)}}},[e._v(e._s(e.__("Next")))])])]),e._v(" "),e.popup&&e.hasOneSelected?s("div",{staticClass:"px-2"},[s("button",{staticClass:"rounded shadow p-2 bg-blue-400 text-white text-sm",on:{click:function(t){return e.useSelectedEntries()}}},[e._v(e._s(e.__("Use Selected")))])]):e._e()])])]):e._e()])}),[],!1,null,null,null).exports},2329:(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});const r={data:function(){return{title:"",message:""}},computed:{size:function(){return this.$popupParams.size||"h-full w-full"}},mounted:function(){var e=this;this.title=this.$popupParams.title,this.message=this.$popupParams.message,this.$popup.event.subscribe((function(t){"click-overlay"===t.event&&(void 0!==e.$popupParams.onAction&&e.$popupParams.onAction(!1),e.$popup.close())}))},methods:{__:s(7389).__,emitAction:function(e){void 0!==this.$popupParams.onAction&&this.$popupParams.onAction(e),this.$popup.close()}}};const i=(0,s(1900).Z)(r,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"w-6/7-screen md:w-4/7-screen lg:w-3/7-screen flex flex-col bg-white shadow-lg",class:e.size,attrs:{id:"popup"}},[s("div",{staticClass:"flex items-center justify-center flex-col flex-auto p-4"},[e.title?s("h2",{staticClass:"text-3xl font-body text-gray-700"},[e._v(e._s(e.title))]):e._e(),e._v(" "),s("p",{staticClass:"py-4 text-gray-600 text-center"},[e._v(e._s(e.message))])]),e._v(" "),s("div",{staticClass:"flex border-t border-gray-200 text-gray-700 justify-end items-center p-2"},[s("ns-button",{attrs:{type:"info"},on:{click:function(t){return e.emitAction(!0)}}},[e._v(e._s(e.__("Ok")))])],1)])}),[],!1,null,null,null).exports},419:(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});const r={data:function(){return{title:"",message:""}},computed:{size:function(){return this.$popupParams.size||"h-full w-full"}},mounted:function(){var e=this;this.title=this.$popupParams.title,this.message=this.$popupParams.message,this.$popup.event.subscribe((function(t){"click-overlay"===t.event&&(e.$popupParams.onAction(!1),e.$popup.close())}))},methods:{__:s(7389).__,emitAction:function(e){this.$popupParams.onAction(e),this.$popup.close()}}};const i=(0,s(1900).Z)(r,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"flex flex-col bg-white shadow-lg w-5/7-screen md:w-4/7-screen lg:w-2/7-screen",class:e.size,attrs:{id:"popup"}},[s("div",{staticClass:"flex items-center justify-center flex-col flex-auto p-4"},[s("h2",{staticClass:"text-xl md:text-3xl font-body text-gray-700 text-center"},[e._v(e._s(e.title))]),e._v(" "),s("p",{staticClass:"py-4 text-sm md:text-base text-gray-600 text-center"},[e._v(e._s(e.message))])]),e._v(" "),s("div",{staticClass:"flex border-t border-gray-200 text-gray-700"},[s("button",{staticClass:"hover:bg-gray-100 flex-auto w-1/2 h-16 flex items-center justify-center uppercase",on:{click:function(t){return e.emitAction(!0)}}},[e._v(e._s(e.__("Yes")))]),e._v(" "),s("hr",{staticClass:"border-r border-gray-200"}),e._v(" "),s("button",{staticClass:"hover:bg-gray-100 flex-auto w-1/2 h-16 flex items-center justify-center uppercase",on:{click:function(t){return e.emitAction(!1)}}},[e._v(e._s(e.__("No")))])])])}),[],!1,null,null,null).exports},1957:(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});const r={name:"ns-pos-loading-popup"};const i=(0,s(1900).Z)(r,(function(){var e=this.$createElement;return(this._self._c||e)("ns-spinner")}),[],!1,null,null,null).exports},7096:(e,t,s)=>{"use strict";s.d(t,{Z:()=>l});var r=s(162),i=s(7389);function n(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return a(e,t);var s=Object.prototype.toString.call(e).slice(8,-1);"Object"===s&&e.constructor&&(s=e.constructor.name);if("Map"===s||"Set"===s)return Array.from(e);if("Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return a(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var s=0,r=new Array(t);s{"use strict";s.d(t,{Z:()=>i});const r={data:function(){return{title:"",message:"",input:""}},computed:{size:function(){return this.$popupParams.size||"h-full w-full"}},mounted:function(){var e=this;this.input=this.$popupParams.input||"",this.title=this.$popupParams.title,this.message=this.$popupParams.message,this.$popup.event.subscribe((function(t){"click-overlay"===t.event&&(e.$popupParams.reject(!1),e.$popup.close())}))},methods:{__:s(7389).__,emitAction:function(e){this.$popupParams.onAction(e?this.input:e),this.$popup.close()},reject:function(e){this.$popupParams.reject(e),this.$popup.close()}}};const i=(0,s(1900).Z)(r,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"w-5/7-screen md:w-3/7-screen flex flex-col bg-white shadow-lg",class:e.size,attrs:{id:"popup"}},[s("div",{staticClass:"flex items-center justify-center flex-col flex-auto p-2"},[s("h2",{staticClass:"text-3xl font-body text-gray-700"},[e._v(e._s(e.title))]),e._v(" "),s("p",{staticClass:"w-full md:mx-auto md:w-2/3 py-4 text-gray-600 text-center"},[e._v(e._s(e.message))])]),e._v(" "),s("div",{staticClass:"p-2"},[s("textarea",{directives:[{name:"model",rawName:"v-model",value:e.input,expression:"input"}],staticClass:"text-gray-700 w-full border-2 p-2 border-blue-400",attrs:{name:"",id:"",cols:"30",rows:"10"},domProps:{value:e.input},on:{input:function(t){t.target.composing||(e.input=t.target.value)}}})]),e._v(" "),s("div",{staticClass:"flex border-t border-gray-200 text-gray-700"},[s("button",{staticClass:"hover:bg-gray-100 flex-auto w-1/2 h-16 flex items-center justify-center uppercase",on:{click:function(t){return e.emitAction(!0)}}},[e._v(e._s(e.__("Ok")))]),e._v(" "),s("hr",{staticClass:"border-r border-gray-200"}),e._v(" "),s("button",{staticClass:"hover:bg-gray-100 flex-auto w-1/2 h-16 flex items-center justify-center uppercase",on:{click:function(t){return e.reject(!1)}}},[e._v(e._s(e.__("Cancel")))])])])}),[],!1,null,null,null).exports}},e=>{e.O(0,[898],(()=>{return t=2328,e(e.s=t);var t}));e.O()}]); +(self.webpackChunkNexoPOS_4x=self.webpackChunkNexoPOS_4x||[]).push([[219],{2328:(e,t,s)=>{"use strict";var r=s(538),i=s(4364),n=(s(824),s(7266)),a=s(162),o=s(7389);function l(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),s.push.apply(s,r)}return s}function c(e){for(var t=1;t=0)&&"hidden"!==e.type})).length>0})).length>0)return a.kX.error(this.$slots["error-no-valid-rules"]?this.$slots["error-no-valid-rules"]:(0,o.__)("No valid run were provided.")).subscribe();if(this.formValidation.validateForm(this.form).length>0)return a.kX.error(this.$slots["error-invalid-form"]?this.$slots["error-invalid-form"][0].text:(0,o.__)("Unable to proceed, the form is invalid."),this.$slots.okay?this.$slots.okay[0].text:(0,o.__)("OK")).subscribe();if(this.formValidation.disableForm(this.form),void 0===this.submitUrl)return a.kX.error(this.$slots["error-no-submit-url"]?this.$slots["error-no-submit-url"][0].text:(0,o.__)("Unable to proceed, no valid submit URL is defined."),this.$slots.okay?this.$slots.okay[0].text:(0,o.__)("OK")).subscribe();var t=c(c({},this.formValidation.extractForm(this.form)),{},{rules:this.form.rules.map((function(e){var t={};return e.forEach((function(e){t[e.name]=e.value})),t}))});a.ih[this.submitMethod?this.submitMethod.toLowerCase():"post"](this.submitUrl,t).subscribe((function(t){if("success"===t.status)return document.location=e.returnUrl;e.formValidation.enableForm(e.form)}),(function(t){e.formValidation.triggerError(e.form,t.response.data),e.formValidation.enableForm(e.form),a.kX.error(t.data.message||(0,o.__)("An unexpected error has occured"),void 0,{duration:5e3}).subscribe()}))},handleGlobalChange:function(e){this.globallyChecked=e,this.rows.forEach((function(t){return t.$checked=e}))},loadForm:function(){var e=this;a.ih.get("".concat(this.src)).subscribe((function(t){e.form=e.parseForm(t.form)}))},parseForm:function(e){e.main.value=void 0===e.main.value?"":e.main.value,e.main=this.formValidation.createFields([e.main])[0];var t=0;for(var s in e.tabs)0===t&&(e.tabs[s].active=!0),e.tabs[s].active=void 0!==e.tabs[s].active&&e.tabs[s].active,e.tabs[s].fields=this.formValidation.createFields(e.tabs[s].fields),t++;return e},getRuleForm:function(){return JSON.parse(JSON.stringify(this.form.ruleForm))},addRule:function(){this.form.rules.push(this.getRuleForm())},removeRule:function(e){this.form.rules.splice(e,1)}}};var f=s(1900);const p=(0,f.Z)(u,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"form flex-auto flex flex-col",attrs:{id:"crud-form"}},[0===Object.values(e.form).length?s("div",{staticClass:"flex items-center justify-center flex-auto"},[s("ns-spinner")],1):e._e(),e._v(" "),Object.values(e.form).length>0?[s("div",{staticClass:"flex flex-col"},[s("div",{staticClass:"flex justify-between items-center"},[s("label",{staticClass:"font-bold my-2 text-gray-700",attrs:{for:"title"}},[e._t("title",(function(){return[e._v(e._s(e.__("No title Provided")))]}))],2),e._v(" "),s("div",{staticClass:"text-sm my-2 text-gray-700",attrs:{for:"title"}},[e.returnUrl?s("a",{staticClass:"rounded-full border border-gray-400 hover:bg-red-600 hover:text-white bg-white px-2 py-1",attrs:{href:e.returnUrl}},[e._v("Return")]):e._e()])]),e._v(" "),s("div",{staticClass:"flex border-2 rounded overflow-hidden",class:e.form.main.disabled?"border-gray-500":e.form.main.errors.length>0?"border-red-600":"border-blue-500"},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.form.main.value,expression:"form.main.value"}],staticClass:"flex-auto text-gray-700 outline-none h-10 px-2",class:e.form.main.disabled?"bg-gray-400":"",attrs:{disabled:e.form.main.disabled,type:"text"},domProps:{value:e.form.main.value},on:{blur:function(t){return e.formValidation.checkField(e.form.main)},change:function(t){return e.formValidation.checkField(e.form.main)},input:function(t){t.target.composing||e.$set(e.form.main,"value",t.target.value)}}}),e._v(" "),s("button",{staticClass:"outline-none px-4 h-10 text-white border-l border-gray-400",class:e.form.main.disabled?"bg-gray-500":e.form.main.errors.length>0?"bg-red-500":"bg-blue-500",attrs:{disabled:e.form.main.disabled},on:{click:function(t){return e.submit()}}},[e._t("save",(function(){return[e._v(e._s(e.__("Save")))]}))],2)]),e._v(" "),e.form.main.description&&0===e.form.main.errors.length?s("p",{staticClass:"text-xs text-gray-600 py-1"},[e._v(e._s(e.form.main.description))]):e._e(),e._v(" "),e._l(e.form.main.errors,(function(t,r){return s("p",{key:r,staticClass:"text-xs py-1 text-red-500"},[s("span",[e._t("error-required",(function(){return[e._v(e._s(t.identifier))]}))],2)])}))],2),e._v(" "),s("div",{staticClass:"flex -mx-4 mt-4",attrs:{id:"points-wrapper"}},[s("div",{staticClass:"w-full md:w-1/3 lg:1/4 px-4"},[s("div",{staticClass:"bg-white rounded shadow"},[s("div",{staticClass:"header border-b border-gray-200 p-2"},[e._v(e._s(e.__("General")))]),e._v(" "),s("div",{staticClass:"body p-2"},e._l(e.form.tabs.general.fields,(function(e,t){return s("ns-field",{key:t,staticClass:"mb-2",attrs:{field:e}})})),1)]),e._v(" "),s("div",{staticClass:"rounded bg-gray-100 border border-gray-400 p-2 flex justify-between items-center my-3"},[e._t("add",(function(){return[s("span",{staticClass:"text-gray-700"},[e._v(e._s(e.__("Add Rule")))])]})),e._v(" "),s("button",{staticClass:"rounded bg-blue-500 text-white font-semibold flex items-center justify-center h-10 w-10",on:{click:function(t){return e.addRule()}}},[s("i",{staticClass:"las la-plus"})])],2)]),e._v(" "),s("div",{staticClass:"w-full md:w-2/3 lg:3/4 px-4 -m-3 flex flex-wrap items-start justify-start"},e._l(e.form.rules,(function(t,r){return s("div",{key:r,staticClass:"w-full md:w-1/2 p-3"},[s("div",{staticClass:"rounded shadow bg-white flex-auto"},[s("div",{staticClass:"body p-2"},e._l(t,(function(e,t){return s("ns-field",{key:t,staticClass:"mb-2",attrs:{field:e}})})),1),e._v(" "),s("div",{staticClass:"header border-t border-gray-200 p-2 flex justify-end"},[s("ns-button",{attrs:{type:"danger"},on:{click:function(t){return e.removeRule(r)}}},[s("i",{staticClass:"las la-times"})])],1)])])})),0)])]:e._e()],2)}),[],!1,null,null,null).exports;function m(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),s.push.apply(s,r)}return s}function h(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}const v={name:"ns-create-coupons",mounted:function(){this.loadForm()},computed:{validTabs:function(){if(this.form){var e=[];for(var t in this.form.tabs)["selected_products","selected_categories"].includes(t)&&e.push(this.form.tabs[t]);return e}return[]},activeValidTab:function(){return this.validTabs.filter((function(e){return e.active}))[0]},generalTab:function(){var e=[];for(var t in this.form.tabs)["general"].includes(t)&&e.push(this.form.tabs[t]);return e}},data:function(){return{formValidation:new n.Z,form:{},nsSnackBar:a.kX,nsHttpClient:a.ih,options:new Array(40).fill("").map((function(e,t){return{label:"Foo"+t,value:"bar"+t}}))}},props:["submit-method","submit-url","return-url","src","rules"],methods:{setTabActive:function(e){this.validTabs.forEach((function(e){return e.active=!1})),e.active=!0},submit:function(){var e=this;if(this.formValidation.validateForm(this.form).length>0)return a.kX.error(this.$slots["error-invalid-form"]?this.$slots["error-invalid-form"][0].text:"No error message provided for having an invalid form.",this.$slots.okay?this.$slots.okay[0].text:"OK").subscribe();if(void 0===this.submitUrl)return a.kX.error(this.$slots["error-no-submit-url"]?this.$slots["error-no-submit-url"][0].text:"No error message provided for not having a valid submit url.",this.$slots.okay?this.$slots.okay[0].text:"OK").subscribe();this.formValidation.disableForm(this.form);var t=function(e){for(var t=1;t=0&&(this.options[t].selected=!this.options[t].selected)},removeOption:function(e){var t=e.option;e.index;t.selected=!1},getRuleForm:function(){return this.form.ruleForm},addRule:function(){this.form.rules.push(this.getRuleForm())},removeRule:function(e){this.form.rules.splice(e,1)}}};const b=(0,f.Z)(v,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"form flex-auto flex flex-col",attrs:{id:"crud-form"}},[0===Object.values(e.form).length?s("div",{staticClass:"flex items-center justify-center flex-auto"},[s("ns-spinner")],1):e._e(),e._v(" "),Object.values(e.form).length>0?[s("div",{staticClass:"flex flex-col"},[s("div",{staticClass:"flex justify-between items-center"},[s("label",{staticClass:"font-bold my-2 text-gray-700",attrs:{for:"title"}},[e._t("title",(function(){return[e._v("No title Provided")]}))],2),e._v(" "),s("div",{staticClass:"text-sm my-2 text-gray-700",attrs:{for:"title"}},[e.returnUrl?s("a",{staticClass:"rounded-full border border-gray-400 hover:bg-red-600 hover:text-white bg-white px-2 py-1",attrs:{href:e.returnUrl}},[e._v("Return")]):e._e()])]),e._v(" "),s("div",{staticClass:"flex border-2 rounded overflow-hidden",class:e.form.main.disabled?"border-gray-500":e.form.main.errors.length>0?"border-red-600":"border-blue-500"},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.form.main.value,expression:"form.main.value"}],staticClass:"flex-auto text-gray-700 outline-none h-10 px-2",class:e.form.main.disabled?"bg-gray-400":"",attrs:{disabled:e.form.main.disabled,type:"text"},domProps:{value:e.form.main.value},on:{blur:function(t){return e.formValidation.checkField(e.form.main)},change:function(t){return e.formValidation.checkField(e.form.main)},input:function(t){t.target.composing||e.$set(e.form.main,"value",t.target.value)}}}),e._v(" "),s("button",{staticClass:"outline-none px-4 h-10 text-white border-l border-gray-400",class:e.form.main.disabled?"bg-gray-500":e.form.main.errors.length>0?"bg-red-500":"bg-blue-500",attrs:{disabled:e.form.main.disabled},on:{click:function(t){return e.submit()}}},[e._t("save",(function(){return[e._v("Save")]}))],2)]),e._v(" "),e.form.main.description&&0===e.form.main.errors.length?s("p",{staticClass:"text-xs text-gray-600 py-1"},[e._v(e._s(e.form.main.description))]):e._e(),e._v(" "),e._l(e.form.main.errors,(function(t,r){return s("p",{key:r,staticClass:"text-xs py-1 text-red-500"},[s("span",[e._t("error-required",(function(){return[e._v(e._s(t.identifier))]}))],2)])}))],2),e._v(" "),s("div",{staticClass:"-mx-4 flex flex-wrap mt-4",attrs:{id:"form-container"}},[s("div",{staticClass:"px-4 w-full md:w-1/2"},e._l(e.generalTab,(function(t,r){return s("div",{key:r,staticClass:"rounded bg-white shadow p-2"},e._l(t.fields,(function(e,t){return s("ns-field",{key:t,attrs:{field:e}})})),1)})),0),e._v(" "),s("div",{staticClass:"px-4 w-full md:w-1/2"},[s("div",{attrs:{id:"tabbed-card"}},[s("div",{staticClass:"flex flex-wrap",attrs:{id:"card-header"}},e._l(e.validTabs,(function(t,r){return s("div",{key:r,staticClass:"cursor-pointer px-4 py-2 rounded-tl-lg rounded-tr-lg",class:t.active?"bg-white":"bg-gray-100",on:{click:function(s){return e.setTabActive(t)}}},[e._v("\n "+e._s(t.label)+"\n ")])})),0),e._v(" "),s("div",{staticClass:"card-body bg-white rounded-br-lg rounded-bl-lg shadow p-2"},e._l(e.activeValidTab.fields,(function(e,t){return s("div",{key:t,staticClass:"flex flex-col"},[s("ns-field",{attrs:{field:e}})],1)})),0)])])])]:e._e()],2)}),[],!1,null,null,null).exports;const _={name:"ns-settings",props:["url"],data:function(){return{validation:new n.Z,form:{},test:""}},computed:{formDefined:function(){return Object.values(this.form).length>0},activeTab:function(){for(var e in this.form.tabs)if(!0===this.form.tabs[e].active)return this.form.tabs[e]}},mounted:function(){this.loadSettingsForm()},methods:{__:o.__,loadComponent:function(e){return nsExtraComponents[e]},submitForm:function(){var e=this;if(0===this.validation.validateForm(this.form).length)return this.validation.disableForm(this.form),a.ih.post(this.url,this.validation.extractForm(this.form)).subscribe((function(t){e.validation.enableForm(e.form),e.loadSettingsForm(),t.data&&t.data.results&&t.data.results.forEach((function(e){"failed"===e.status?a.kX.error(e.message).subscribe():a.kX.success(e.message).subscribe()})),a.kq.doAction("ns-settings-saved",{result:t,instance:e}),a.kX.success(t.message).subscribe()}),(function(t){e.validation.enableForm(e.form),e.validation.triggerFieldsErrors(e.form,t),a.kq.doAction("ns-settings-failed",{error:t,instance:e}),a.kX.error(t.message||(0,o.__)("Unable to proceed the form is not valid.")).subscribe()}));a.kX.error(this.$slots["error-form-invalid"][0].text||(0,o.__)("Unable to proceed the form is not valid.")).subscribe()},setActive:function(e){for(var t in this.form.tabs)this.form.tabs[t].active=!1;e.active=!0,a.kq.doAction("ns-settings-change-tab",{tab:e,instance:this})},loadSettingsForm:function(){var e=this;a.ih.get(this.url).subscribe((function(t){var s=0;Object.values(t.tabs).filter((function(e){return e.active})).length;for(var r in t.tabs)e.formDefined?t.tabs[r].active=e.form.tabs[r].active:(t.tabs[r].active=!1,0===s&&(t.tabs[r].active=!0)),s++;e.form=e.validation.createForm(t),a.kq.doAction("ns-settings-loaded",e),a.kq.doAction("ns-settings-change-tab",{tab:e.activeTab,instance:e})}))}}};const g=(0,f.Z)(_,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return e.formDefined?s("div",{attrs:{id:"tabbed-card"}},[s("div",{staticClass:"flex flex-wrap",attrs:{id:"card-header"}},e._l(e.form.tabs,(function(t,r){return s("div",{key:r,staticClass:"text-gray-700 cursor-pointer flex items-center px-4 py-2 rounded-tl-lg rounded-tr-lg",class:t.active?"bg-white":"bg-gray-300",on:{click:function(s){return e.setActive(t)}}},[s("span",[e._v(e._s(t.label))]),e._v(" "),t.errors.length>0?s("span",{staticClass:"ml-2 rounded-full bg-red-400 text-white text-sm h-6 w-6 flex items-center justify-center"},[e._v(e._s(t.errors.length))]):e._e()])})),0),e._v(" "),s("div",{staticClass:"card-body bg-white rounded-br-lg rounded-bl-lg shadow"},[s("div",{staticClass:"-mx-4 flex flex-wrap p-2"},[e.activeTab.fields?e._l(e.activeTab.fields,(function(e,t){return s("div",{key:t,staticClass:"w-full px-4 md:w-1/2 lg:w-1/3"},[s("div",{staticClass:"flex flex-col my-2"},[s("ns-field",{attrs:{field:e}})],1)])})):e._e(),e._v(" "),e.activeTab.component?s("div",{staticClass:"w-full px-4"},[s(e.loadComponent(e.activeTab.component),{tag:"component"})],1):e._e()],2),e._v(" "),e.activeTab.fields?s("div",{staticClass:"border-t border-gray-400 p-2 flex justify-end"},[s("ns-button",{attrs:{type:"info"},on:{click:function(t){return e.submitForm()}}},[e._t("submit-button",(function(){return[e._v(e._s(e.__("Save Settings")))]}))],2)],1):e._e()])]):e._e()}),[],!1,null,null,null).exports;const x={name:"ns-reset",props:["url"],methods:{__:o.__,submit:function(){if(!this.validation.validateFields(this.fields))return this.$forceUpdate(),a.kX.error(this.$slots["error-form-invalid"]?this.$slots["error-form-invalid"][0].text:"Invalid Form").subscribe();var e=this.validation.getValue(this.fields);confirm(this.$slots["confirm-message"]?this.$slots["confirm-message"][0].text:(0,o.__)("Would you like to proceed ?"))&&a.ih.post("/api/nexopos/v4/reset",e).subscribe((function(e){a.kX.success(e.message).subscribe()}),(function(e){a.kX.error(e.message).subscribe()}))}},data:function(){return{validation:new n.Z,fields:[{label:"Choose Option",name:"mode",description:(0,o.__)("Will apply various reset method on the system."),type:"select",options:[{label:(0,o.__)("Wipe Everything"),value:"wipe_all"},{label:(0,o.__)("Wipe + Grocery Demo"),value:"wipe_plus_grocery"}],validation:"required"}]}}};const y=(0,f.Z)(x,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{attrs:{id:"reset-app"}},[e._m(0),e._v(" "),s("div",{staticClass:"card-body bg-white rounded-br-lg rounded-bl-lg shadow"},[s("div",{staticClass:"-mx-4 flex flex-wrap p-2"},e._l(e.fields,(function(e,t){return s("div",{key:t,staticClass:"px-4"},[s("ns-field",{attrs:{field:e}})],1)})),0),e._v(" "),s("div",{staticClass:"card-body border-t border-gray-400 p-2 flex"},[s("div",[s("ns-button",{attrs:{type:"info"},on:{click:function(t){return e.submit()}}},[e._v(e._s(e.__("Proceed")))])],1)])])])}),[function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"flex flex-wrap",attrs:{id:"card-header"}},[s("div",{staticClass:"text-gray-700 bg-white cursor-pointer px-4 py-2 rounded-tl-lg rounded-tr-lg"},[e._v("\n Reset\n ")])])}],!1,null,null,null).exports;var w=s(7757),C=s.n(w),k=s(9127);function j(e,t,s,r,i,n,a){try{var o=e[n](a),l=o.value}catch(e){return void s(e)}o.done?t(l):Promise.resolve(l).then(r,i)}function $(e){return function(){var t=this,s=arguments;return new Promise((function(r,i){var n=e.apply(t,s);function a(e){j(n,r,i,a,o,"next",e)}function o(e){j(n,r,i,a,o,"throw",e)}a(void 0)}))}}var S;const P={name:"ns-modules",props:["url","upload"],data:function(){return{modules:[],total_enabled:0,total_disabled:0}},mounted:function(){this.loadModules().subscribe()},computed:{noModules:function(){return 0===Object.values(this.modules).length},noModuleMessage:function(){return this.$slots["no-modules-message"]?this.$slots["no-modules-message"][0].text:(0,o.__)("No module has been updated yet.")}},methods:{__:o.__,download:function(e){document.location="/dashboard/modules/download/"+e.namespace},performMigration:(S=$(C().mark((function e(t,s){var r,i,n,o;return C().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=function(){var e=$(C().mark((function e(s,r){return C().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e,i){a.ih.post("/api/nexopos/v4/modules/".concat(t.namespace,"/migrate"),{file:s,version:r}).subscribe((function(t){e(!0)}),(function(e){return a.kX.error(e.message,null,{duration:4e3}).subscribe()}))})));case 1:case"end":return e.stop()}}),e)})));return function(t,s){return e.apply(this,arguments)}}(),!(s=s||t.migrations)){e.next=19;break}t.migrating=!0,e.t0=C().keys(s);case 5:if((e.t1=e.t0()).done){e.next=17;break}i=e.t1.value,n=0;case 8:if(!(n0,name:e.namespace,label:null}})),t}))}))}}};const F=(0,f.Z)(T,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{attrs:{id:"permission-wrapper"}},[s("div",{staticClass:"rounded shadow bg-white flex"},[s("div",{staticClass:"w- bg-gray-800 flex-shrink-0",attrs:{id:"permissions"}},[s("div",{staticClass:"py-4 px-2 border-b border-gray-700 text-gray-100 flex justify-between items-center"},[e.toggled?e._e():s("span",[e._v(e._s(e.__("Permissions")))]),e._v(" "),s("div",[e.toggled?e._e():s("button",{staticClass:"rounded-full bg-white text-gray-700 h-6 w-6 flex items-center justify-center",on:{click:function(t){e.toggled=!e.toggled}}},[s("i",{staticClass:"las la-expand"})]),e._v(" "),e.toggled?s("button",{staticClass:"rounded-full bg-white text-gray-700 h-6 w-6 flex items-center justify-center",on:{click:function(t){e.toggled=!e.toggled}}},[s("i",{staticClass:"las la-compress"})]):e._e()])]),e._v(" "),e._l(e.permissions,(function(t){return s("div",{key:t.id,staticClass:"p-2 border-b border-gray-700 text-gray-100",class:e.toggled?"w-24":"w-54"},[s("a",{attrs:{href:"javascript:void(0)",title:t.namespace}},[e.toggled?e._e():s("span",[e._v(e._s(t.name))]),e._v(" "),e.toggled?s("span",[e._v(e._s(e._f("truncate")(t.name,5)))]):e._e()])])}))],2),e._v(" "),s("div",{staticClass:"flex flex-auto overflow-hidden"},[s("div",{staticClass:"overflow-y-auto"},[s("div",{staticClass:"text-gray-700 flex"},e._l(e.roles,(function(t){return s("div",{key:t.id,staticClass:"py-4 px-2 w-56 items-center border-b justify-center flex role flex-shrink-0 border-r border-gray-200"},[s("p",{staticClass:"mx-1"},[s("span",[e._v(e._s(t.name))])]),e._v(" "),s("span",{staticClass:"mx-1"},[s("ns-checkbox",{attrs:{field:t.field},on:{change:function(s){return e.selectAllPermissions(t)}}})],1)])})),0),e._v(" "),e._l(e.permissions,(function(t){return s("div",{key:t.id,staticClass:"permission flex"},e._l(e.roles,(function(r){return s("div",{key:r.id,staticClass:"border-b border-gray-200 w-56 flex-shrink-0 p-2 flex items-center justify-center border-r"},[s("ns-checkbox",{attrs:{field:r.fields[t.namespace]},on:{change:function(s){return e.submitPermissions(r,r.fields[t.namespace])}}})],1)})),0)}))],2)])])])}),[],!1,null,null,null).exports;var A=s(419);function V(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),s.push.apply(s,r)}return s}function q(e){for(var t=1;t0?t[0]:0},removeUnitPriceGroup:function(e,t){var s=this,r=e.filter((function(e){return"id"===e.name&&void 0!==e.value}));Popup.show(A.Z,{title:(0,o.__)("Confirm Your Action"),message:(0,o.__)("Would you like to delete this group ?"),onAction:function(i){if(i)if(r.length>0)s.confirmUnitQuantityDeletion({group_fields:e,group:t});else{var n=t.indexOf(e);t.splice(n,1)}}})},confirmUnitQuantityDeletion:function(e){var t=e.group_fields,s=e.group;Popup.show(A.Z,{title:(0,o.__)("Your Attention Is Required"),size:"w-3/4-screen h-2/5-screen",message:(0,o.__)("The current unit you're about to delete has a reference on the database and it might have already procured stock. Deleting that reference will remove procured stock. Would you proceed ?"),onAction:function(e){if(e){var r=t.filter((function(e){return"id"===e.name})).map((function(e){return e.value}))[0];a.ih.delete("/api/nexopos/v4/products/units/quantity/".concat(r)).subscribe((function(e){var r=s.indexOf(t);s.splice(r,1),a.kX.success(e.message).subscribe()}),(function(e){nsSnackbar.error(e.message).subscribe()}))}}})},addUnitGroup:function(e){if(0===e.options.length)return a.kX.error((0,o.__)("Please select at least one unit group before you proceed.")).subscribe();e.options.length>e.groups.length?e.groups.push(JSON.parse(JSON.stringify(e.fields))):a.kX.error((0,o.__)("There shoulnd't be more option than there are units.")).subscribe()},loadAvailableUnits:function(e){var t=this;a.ih.get(this.unitsUrl.replace("{id}",e.fields.filter((function(e){return"unit_group"===e.name}))[0].value)).subscribe((function(s){e.fields.forEach((function(e){"group"===e.type&&(e.options=s,e.fields.forEach((function(e){"unit_id"===e.name&&(console.log(e),e.options=s.map((function(e){return{label:e.name,value:e.id}})))})))})),t.$forceUpdate()}))},loadOptionsFor:function(e,t,s){var r=this;a.ih.get(this.unitsUrl.replace("{id}",t)).subscribe((function(t){r.form.variations[s].tabs.units.fields.forEach((function(s){s.name===e&&(s.options=t.map((function(e){return{label:e.name,value:e.id,selected:!1}})))})),r.$forceUpdate()}))},submit:function(){var e=this;if(this.formValidation.validateFields([this.form.main]),this.form.variations.map((function(t){return e.formValidation.validateForm(t)})).filter((function(e){return e.length>0})).length>0||Object.values(this.form.main.errors).length>0)return a.kX.error(this.$slots["error-form-invalid"]?this.$slots["error-form-invalid"][0].text:(0,o.__)("Unable to proceed the form is not valid.")).subscribe();var t=this.form.variations.map((function(e,t){return e.tabs.images.groups.filter((function(e){return e.filter((function(e){return"primary"===e.name&&1===e.value})).length>0}))}));if(t[0]&&t[0].length>1)return a.kX.error(this.$slots["error-multiple-primary"]?this.$slots["error-multiple-primary"][0].text:(0,o.__)("Unable to proceed, more than one product is set as primary")).subscribe();var s=[];if(this.form.variations.map((function(t,r){return t.tabs.units.fields.filter((function(e){return"group"===e.type})).forEach((function(t){new Object;t.groups.forEach((function(t){s.push(e.formValidation.validateFields(t))}))}))})),0===s.length)return a.kX.error(this.$slots["error-no-units-groups"]?this.$slots["error-no-units-groups"][0].text:(0,o.__)("Either Selling or Purchase unit isn't defined. Unable to proceed.")).subscribe();if(s.filter((function(e){return!1===e})).length>0)return this.$forceUpdate(),a.kX.error(this.$slots["error-invalid-unit-group"]?this.$slots["error-invalid-unit-group"][0].text:(0,o.__)("Unable to proceed as one of the unit group field is invalid")).subscribe();var r=q(q({},this.formValidation.extractForm(this.form)),{},{variations:this.form.variations.map((function(t,s){var r=e.formValidation.extractForm(t);0===s&&(r.$primary=!0),r.images=t.tabs.images.groups.map((function(t){return e.formValidation.extractFields(t)}));var i=new Object;return t.tabs.units.fields.filter((function(e){return"group"===e.type})).forEach((function(t){i[t.name]=t.groups.map((function(t){return e.formValidation.extractFields(t)}))})),r.units=q(q({},r.units),i),r}))});this.formValidation.disableForm(this.form),a.ih[this.submitMethod?this.submitMethod.toLowerCase():"post"](this.submitUrl,r).subscribe((function(t){if("success"===t.status){if(!1!==e.returnUrl)return document.location=e.returnUrl;e.$emit("save")}e.formValidation.enableForm(e.form)}),(function(t){a.kX.error(t.message,void 0,{duration:5e3}).subscribe(),e.formValidation.enableForm(e.form),t.response&&e.formValidation.triggerError(e.form,t.response.data)}))},deleteVariation:function(e){confirm(this.$slots["delete-variation"]?this.$slots["delete-variation"][0].text:(0,o.__)("Would you like to delete this variation ?"))&&this.form.variations.splice(e,1)},setTabActive:function(e,t){for(var s in t)s!==e&&(t[s].active=!1);t[e].active=!0,"units"===e&&this.loadAvailableUnits(t[e])},duplicate:function(e){this.form.variations.push(Object.assign({},e))},newVariation:function(){this.form.variations.push(this.defaultVariation)},getActiveTab:function(e){for(var t in e)if(e[t].active)return e[t];return!1},getActiveTabKey:function(e){for(var t in e)if(e[t].active)return t;return!1},parseForm:function(e){var t=this;return e.main.value=void 0===e.main.value?"":e.main.value,e.main=this.formValidation.createFields([e.main])[0],e.variations.forEach((function(e,s){var r=0;for(var i in e.tabs)0===r&&void 0===e.tabs[i].active?(e.tabs[i].active=!0,t._sampleVariation=Object.assign({},e),e.tabs[i].fields&&(e.tabs[i].fields=t.formValidation.createFields(e.tabs[i].fields.filter((function(e){return"name"!==e.name}))))):e.tabs[i].fields&&(e.tabs[i].fields=t.formValidation.createFields(e.tabs[i].fields)),e.tabs[i].active=void 0!==e.tabs[i].active&&e.tabs[i].active,r++})),e},loadForm:function(){var e=this;a.ih.get("".concat(this.src)).subscribe((function(t){e.form=e.parseForm(t.form)}))},addImage:function(e){e.tabs.images.groups.push(this.formValidation.createFields(JSON.parse(JSON.stringify(e.tabs.images.fields))))}},mounted:function(){this.loadForm()},name:"ns-manage-products"};const U=(0,f.Z)(M,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"form flex-auto",attrs:{id:"crud-form"}},[0===Object.values(e.form).length?s("div",{staticClass:"flex items-center h-full justify-center flex-auto"},[s("ns-spinner")],1):e._e(),e._v(" "),Object.values(e.form).length>0?[s("div",{staticClass:"flex flex-col"},[s("div",{staticClass:"flex justify-between items-center"},[s("label",{staticClass:"font-bold my-2 text-gray-700",attrs:{for:"title"}},[e._v(e._s(e.form.main.label))]),e._v(" "),s("div",{staticClass:"text-sm my-2 text-gray-700",attrs:{for:"title"}},[e.returnUrl?s("a",{staticClass:"rounded-full border border-gray-400 hover:bg-red-600 hover:text-white bg-white px-2 py-1",attrs:{href:e.returnUrl}},[e._v("Return")]):e._e()])]),e._v(" "),s("div",{staticClass:"flex border-2 rounded overflow-hidden",class:e.form.main.disabled?"border-gray-500":e.form.main.errors.length>0?"border-red-600":"border-blue-500"},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.form.main.value,expression:"form.main.value"}],staticClass:"flex-auto text-gray-700 outline-none h-10 px-2",class:e.form.main.disabled?"bg-gray-400":"",attrs:{disabled:e.form.main.disabled,type:"text"},domProps:{value:e.form.main.value},on:{blur:function(t){return e.formValidation.checkField(e.form.main)},change:function(t){return e.formValidation.checkField(e.form.main)},input:function(t){t.target.composing||e.$set(e.form.main,"value",t.target.value)}}}),e._v(" "),s("button",{staticClass:"outline-none px-4 h-10 text-white border-l border-gray-400",class:e.form.main.disabled?"bg-gray-500":e.form.main.errors.length>0?"bg-red-500":"bg-blue-500",attrs:{disabled:e.form.main.disabled},on:{click:function(t){return e.submit()}}},[e._t("save",(function(){return[e._v(e._s(e.__("Save")))]}))],2)]),e._v(" "),e.form.main.description&&0===e.form.main.errors.length?s("p",{staticClass:"text-xs text-gray-600 py-1"},[e._v(e._s(e.form.main.description))]):e._e(),e._v(" "),e._l(e.form.main.errors,(function(t,r){return s("p",{key:r,staticClass:"text-xs py-1 text-red-500"},[s("span",[e._t("error-required",(function(){return[e._v(e._s(t.identifier))]}))],2)])}))],2),e._v(" "),s("div",{staticClass:"-mx-4 flex flex-wrap mt-4",attrs:{id:"form-container"}},[s("div",{staticClass:"px-4 w-full"},e._l(e.form.variations,(function(t,r){return s("div",{key:r,staticClass:"mb-8",attrs:{id:"tabbed-card"}},[s("div",{staticClass:"flex flex-wrap justify-between",attrs:{id:"card-header"}},[s("div",{staticClass:"flex flex-wrap"},e._l(t.tabs,(function(r,i){return s("div",{key:i,staticClass:"cursor-pointer text-gray-700 px-4 py-2 rounded-tl-lg rounded-tr-lg flex justify-between",class:r.active?"bg-white":"bg-gray-100",on:{click:function(s){return e.setTabActive(i,t.tabs)}}},[s("span",{staticClass:"block mr-2"},[e._v(e._s(r.label))]),e._v(" "),r.errors&&r.errors.length>0?s("span",{staticClass:"rounded-full bg-red-400 text-white h-6 w-6 flex font-semibold items-center justify-center"},[e._v(e._s(r.errors.length))]):e._e()])})),0),e._v(" "),s("div",{staticClass:"flex items-center justify-center -mx-1"})]),e._v(" "),s("div",{staticClass:"card-body bg-white rounded-br-lg rounded-bl-lg shadow p-2"},[["images","units"].includes(e.getActiveTabKey(t.tabs))?e._e():s("div",{staticClass:"-mx-4 flex flex-wrap"},[e._l(e.getActiveTab(t.tabs).fields,(function(e,t){return[s("div",{key:t,staticClass:"flex flex-col px-4 w-full md:w-1/2 lg:w-1/3"},[s("ns-field",{attrs:{field:e}})],1)]}))],2),e._v(" "),"images"===e.getActiveTabKey(t.tabs)?s("div",{staticClass:"-mx-4 flex flex-wrap"},[s("div",{staticClass:"flex flex-col px-4 w-full md:w-1/2 lg:w-1/3"},[s("div",{staticClass:"rounded border flex bg-white justify-between p-2 items-center"},[s("span",[e._v(e._s(e.__("Add Images")))]),e._v(" "),s("button",{staticClass:"rounded-full border flex items-center justify-center w-8 h-8 bg-white hover:bg-blue-400 hover:text-white",on:{click:function(s){return e.addImage(t)}}},[s("i",{staticClass:"las la-plus-circle"})])])]),e._v(" "),e._l(e.getActiveTab(t.tabs).groups,(function(t,r){return s("div",{key:r,staticClass:"flex flex-col px-4 w-full md:w-1/2 lg:w-1/3 mb-4"},[s("div",{staticClass:"rounded border flex flex-col bg-white p-2"},e._l(t,(function(e,t){return s("ns-field",{key:t,attrs:{field:e}})})),1)])}))],2):e._e(),e._v(" "),"units"===e.getActiveTabKey(t.tabs)?s("div",{staticClass:"-mx-4 flex flex-wrap"},[s("div",{staticClass:"px-4 w-full md:w-1/2 lg:w-1/3"},[s("ns-field",{attrs:{field:e.getActiveTab(t.tabs).fields[0]},on:{change:function(s){e.loadAvailableUnits(e.getActiveTab(t.tabs))}}}),e._v(" "),s("ns-field",{attrs:{field:e.getActiveTab(t.tabs).fields[1]},on:{change:function(s){e.loadAvailableUnits(e.getActiveTab(t.tabs))}}})],1),e._v(" "),e._l(e.getActiveTab(t.tabs).fields,(function(t,r){return["group"===t.type?s("div",{key:r,staticClass:"px-4 w-full lg:w-2/3"},[s("div",{staticClass:"mb-2"},[s("label",{staticClass:"font-medium text-gray-700"},[e._v(e._s(t.label))]),e._v(" "),s("p",{staticClass:"py-1 text-sm text-gray-600"},[e._v(e._s(t.description))])]),e._v(" "),s("div",{staticClass:"mb-2"},[s("div",{staticClass:"border-dashed border-2 border-gray-200 p-1 bg-gray-100 flex justify-between items-center text-gray-700 cursor-pointer rounded-lg",on:{click:function(s){return e.addUnitGroup(t)}}},[e._m(0,!0),e._v(" "),s("span",[e._v(e._s(e.__("New Group")))])])]),e._v(" "),s("div",{staticClass:"-mx-4 flex flex-wrap"},e._l(t.groups,(function(r,i){return s("div",{key:i,staticClass:"px-4 w-full md:w-1/2 mb-4"},[s("div",{staticClass:"shadow rounded overflow-hidden"},[s("div",{staticClass:"border-b text-sm bg-blue-400 text-white border-blue-300 p-2 flex justify-between"},[s("span",[e._v(e._s(e.__("Available Quantity")))]),e._v(" "),s("span",[e._v(e._s(e.getUnitQuantity(r)))])]),e._v(" "),s("div",{staticClass:"p-2 mb-2"},e._l(r,(function(e,t){return s("ns-field",{key:t,attrs:{field:e}})})),1),e._v(" "),s("div",{staticClass:"p-1 text-red-800 hover:bg-red-200 border-t border-red-200 flex items-center justify-center cursor-pointer font-medium",on:{click:function(s){return e.removeUnitPriceGroup(r,t.groups)}}},[e._v("\n "+e._s(e.__("Delete"))+"\n ")])])])})),0)]):e._e()]}))],2):e._e()])])})),0)])]:e._e()],2)}),[function(){var e=this.$createElement,t=this._self._c||e;return t("span",{staticClass:"rounded-full border-2 border-gray-300 bg-white h-8 w-8 flex items-center justify-center"},[t("i",{staticClass:"las la-plus-circle"})])}],!1,null,null,null).exports;function R(e,t){for(var s=0;s0&&this.validTabs.filter((function(e){return e.active}))[0]}},data:function(){return{totalTaxValues:0,totalPurchasePrice:0,formValidation:new n.Z,form:{},nsSnackBar:a.kX,fields:[],searchResult:[],searchValue:"",debounceSearch:null,nsHttpClient:a.ih,taxes:[],validTabs:[{label:(0,o.__)("Details"),identifier:"details",active:!0},{label:(0,o.__)("Products"),identifier:"products",active:!1}],reloading:!1}},watch:{searchValue:function(e){var t=this;e&&(clearTimeout(this.debounceSearch),this.debounceSearch=setTimeout((function(){t.doSearch(e)}),500))}},components:{NsManageProducts:U},props:["submit-method","submit-url","return-url","src","rules"],methods:{__:o.__,computeTotal:function(){this.totalTaxValues=0,this.form.products.length>0&&(this.totalTaxValues=this.form.products.map((function(e){return e.procurement.tax_value})).reduce((function(e,t){return e+t}))),this.totalPurchasePrice=0,this.form.products.length>0&&(this.totalPurchasePrice=this.form.products.map((function(e){return parseFloat(e.procurement.total_purchase_price)})).reduce((function(e,t){return e+t})))},updateLine:function(e){var t=this.form.products[e],s=this.taxes.filter((function(e){return e.id===t.procurement.tax_group_id}));if(parseFloat(t.procurement.purchase_price_edit)>0&&parseFloat(t.procurement.quantity)>0){if(s.length>0){var r=s[0].taxes.map((function(e){return X.getTaxValue(t.procurement.tax_type,t.procurement.purchase_price_edit,parseFloat(e.rate))}));t.procurement.tax_value=r.reduce((function(e,t){return e+t})),"inclusive"===t.procurement.tax_type?(t.procurement.net_purchase_price=parseFloat(t.procurement.purchase_price_edit)-t.procurement.tax_value,t.procurement.gross_purchase_price=parseFloat(t.procurement.purchase_price_edit),t.procurement.purchase_price=parseFloat(t.procurement.gross_purchase_price)):(t.procurement.gross_purchase_price=parseFloat(t.procurement.purchase_price_edit)+t.procurement.tax_value,t.procurement.net_purchase_price=parseFloat(t.procurement.purchase_price_edit),t.procurement.purchase_price=parseFloat(t.procurement.gross_purchase_price))}else t.procurement.gross_purchase_price=parseFloat(t.procurement.purchase_price_edit),t.procurement.purchase_price=parseFloat(t.procurement.purchase_price_edit),t.procurement.net_purchase_price=parseFloat(t.procurement.purchase_price_edit),t.procurement.tax_value=0;t.procurement.tax_value=t.procurement.tax_value*parseFloat(t.procurement.quantity),t.procurement.total_purchase_price=t.procurement.purchase_price*parseFloat(t.procurement.quantity)}this.computeTotal(),this.$forceUpdate()},switchTaxType:function(e,t){e.procurement.tax_type="inclusive"===e.procurement.tax_type?"exclusive":"inclusive",this.updateLine(t)},doSearch:function(e){var t=this;a.ih.post("/api/nexopos/v4/procurements/products/search-product",{search:e}).subscribe((function(e){1===e.length?t.addProductList(e[0]):t.searchResult=e}))},reloadEntities:function(){var e=this;this.reloading=!0,(0,E.D)([a.ih.get("/api/nexopos/v4/categories"),a.ih.get("/api/nexopos/v4/products"),a.ih.get(this.src),a.ih.get("/api/nexopos/v4/taxes/groups")]).subscribe((function(t){e.reloading=!1,e.categories=t[0],e.products=t[1],e.taxes=t[3],e.form.general&&t[2].tabs.general.fieds.forEach((function(t,s){t.value=e.form.tabs.general.fields[s].value||""})),e.form=Object.assign(JSON.parse(JSON.stringify(t[2])),e.form),e.form=e.formValidation.createForm(e.form),e.form.tabs&&e.form.tabs.general.fields.forEach((function(e,s){e.options&&(e.options=t[2].tabs.general.fields[s].options)})),0===e.form.products.length&&(e.form.products=e.form.products.map((function(e){return["gross_purchase_price","purchase_price_edit","tax_value","net_purchase_price","purchase_price","total_price","total_purchase_price","quantity","tax_group_id"].forEach((function(t){void 0===e[t]&&(e[t]=void 0===e[t]?0:e[t])})),e.$invalid=e.$invalid||!1,e.purchase_price_edit=e.purchase_price,{name:e.name,purchase_units:e.purchase_units,procurement:e,unit_quantities:e.unit_quantities||[]}}))),e.$forceUpdate()}))},setTabActive:function(e){this.validTabs.forEach((function(e){return e.active=!1})),this.$forceUpdate(),this.$nextTick().then((function(){e.active=!0}))},addProductList:function(e){if(void 0===e.unit_quantities)return a.kX.error((0,o.__)("Unable to add product which doesn't unit quantities defined.")).subscribe();e.procurement=new Object,e.procurement.gross_purchase_price=0,e.procurement.purchase_price_edit=0,e.procurement.tax_value=0,e.procurement.net_purchase_price=0,e.procurement.purchase_price=0,e.procurement.total_price=0,e.procurement.total_purchase_price=0,e.procurement.quantity=1,e.procurement.expiration_date=null,e.procurement.tax_group_id=0,e.procurement.tax_type="inclusive",e.procurement.unit_id=0,e.procurement.product_id=e.id,e.procurement.procurement_id=null,e.procurement.$invalid=!1,this.searchResult=[],this.searchValue="",this.form.products.push(e)},submit:function(){var e=this;if(0===this.form.products.length)return a.kX.error(this.$slots["error-no-products"]?this.$slots["error-no-products"][0].text:(0,o.__)("Unable to proceed, no product were provided."),this.$slots.okay?this.$slots.okay[0].text:(0,o.__)("OK")).subscribe();if(this.form.products.forEach((function(e){!parseFloat(e.procurement.quantity)>=1||0===e.procurement.unit_id?e.procurement.$invalid=!0:e.procurement.$invalid=!1})),this.form.products.filter((function(e){return e.procurement.$invalid})).length>0)return a.kX.error(this.$slots["error-invalid-products"]?this.$slots["error-invalid-products"][0].text:(0,o.__)("Unable to proceed, one or more product has incorrect values."),this.$slots.okay?this.$slots.okay[0].text:(0,o.__)("OK")).subscribe();if(this.formValidation.validateForm(this.form).length>0)return this.setTabActive(this.activeTab),a.kX.error(this.$slots["error-invalid-form"]?this.$slots["error-invalid-form"][0].text:(0,o.__)("Unable to proceed, the procurement form is not valid."),this.$slots.okay?this.$slots.okay[0].text:(0,o.__)("OK")).subscribe();if(void 0===this.submitUrl)return a.kX.error(this.$slots["error-no-submit-url"]?this.$slots["error-no-submit-url"][0].text:(0,o.__)("Unable to submit, no valid submit URL were provided."),this.$slots.okay?this.$slots.okay[0].text:(0,o.__)("OK")).subscribe();this.formValidation.disableForm(this.form);var t=I(I({},this.formValidation.extractForm(this.form)),{products:this.form.products.map((function(e){return e.procurement}))});a.ih[this.submitMethod?this.submitMethod.toLowerCase():"post"](this.submitUrl,t).subscribe((function(t){if("success"===t.status)return document.location=e.returnUrl;e.formValidation.enableForm(e.form)}),(function(t){a.kX.error(t.message,void 0,{duration:5e3}).subscribe(),e.formValidation.enableForm(e.form),t.errors&&e.formValidation.triggerError(e.form,t.errors)}))},deleteProduct:function(e){this.form.products.splice(e,1),this.$forceUpdate()},handleGlobalChange:function(e){this.globallyChecked=e,this.rows.forEach((function(t){return t.$checked=e}))},setProductOptions:function(e){var t=this;new Promise((function(s,r){Popup.show(L,{product:t.form.products[e],resolve:s,reject:r})})).then((function(s){for(var r in s)t.form.products[e].procurement[r]=s[r];t.updateLine(e)}))}}};const B=(0,f.Z)(Y,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"form flex-auto flex flex-col",attrs:{id:"crud-form"}},[e.form.main?[s("div",{staticClass:"flex flex-col"},[s("div",{staticClass:"flex justify-between items-center"},[s("label",{staticClass:"font-bold my-2 text-gray-700",attrs:{for:"title"}},[e._t("title",(function(){return[e._v(e._s(e.__("No title is provided")))]}))],2),e._v(" "),s("div",{staticClass:"text-sm my-2 text-gray-700",attrs:{for:"title"}},[e.returnUrl?s("a",{staticClass:"rounded-full border border-gray-400 hover:bg-red-600 hover:text-white bg-white px-2 py-1",attrs:{href:e.returnUrl}},[e._v(e._s(e.__("Return")))]):e._e()])]),e._v(" "),s("div",{staticClass:"flex border-2 rounded overflow-hidden",class:e.form.main.disabled?"border-gray-500":e.form.main.errors.length>0?"border-red-600":"border-blue-500"},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.form.main.value,expression:"form.main.value"}],staticClass:"flex-auto text-gray-700 outline-none h-10 px-2",class:e.form.main.disabled?"bg-gray-400":"",attrs:{disabled:e.form.main.disabled,type:"text"},domProps:{value:e.form.main.value},on:{blur:function(t){return e.formValidation.checkField(e.form.main)},change:function(t){return e.formValidation.checkField(e.form.main)},input:function(t){t.target.composing||e.$set(e.form.main,"value",t.target.value)}}}),e._v(" "),s("button",{staticClass:"outline-none px-4 h-10 text-white border-l border-gray-400",class:e.form.main.disabled?"bg-gray-500":e.form.main.errors.length>0?"bg-red-500":"bg-blue-500",attrs:{disabled:e.form.main.disabled},on:{click:function(t){return e.submit()}}},[e._t("save",(function(){return[e._v(e._s(e.__("Save")))]}))],2),e._v(" "),s("button",{staticClass:"bg-white text-gray-700 outline-none px-4 h-10 border-gray-400",on:{click:function(t){return e.reloadEntities()}}},[s("i",{staticClass:"las la-sync",class:e.reloading?"animate animate-spin":""})])]),e._v(" "),e.form.main.description&&0===e.form.main.errors.length?s("p",{staticClass:"text-xs text-gray-600 py-1"},[e._v(e._s(e.form.main.description))]):e._e(),e._v(" "),e._l(e.form.main.errors,(function(t,r){return s("p",{key:r,staticClass:"text-xs py-1 text-red-500"},[s("span",[e._t("error-required",(function(){return[e._v(e._s(t.identifier))]}))],2)])}))],2),e._v(" "),s("div",{staticClass:"-mx-4 flex flex-wrap mt-4",attrs:{id:"form-container"}},[s("div",{staticClass:"px-4 w-full"},[s("div",{attrs:{id:"tabbed-card"}},[s("div",{staticClass:"flex flex-wrap",attrs:{id:"card-header"}},e._l(e.validTabs,(function(t,r){return s("div",{key:r,staticClass:"cursor-pointer px-4 py-2 rounded-tl-lg rounded-tr-lg text-gray-700",class:t.active?"bg-white":"bg-gray-100",on:{click:function(s){return e.setTabActive(t)}}},[e._v("\n "+e._s(t.label)+"\n ")])})),0),e._v(" "),"details"===e.activeTab.identifier?s("div",{staticClass:"card-body bg-white rounded-br-lg rounded-bl-lg shadow p-2"},[e.form.tabs?s("div",{staticClass:"-mx-4 flex flex-wrap"},e._l(e.form.tabs.general.fields,(function(e,t){return s("div",{key:t,staticClass:"flex px-4 w-full md:w-1/2 lg:w-1/3"},[s("ns-field",{attrs:{field:e}})],1)})),0):e._e()]):e._e(),e._v(" "),"products"===e.activeTab.identifier?s("div",{staticClass:"card-body bg-white rounded-br-lg rounded-bl-lg shadow p-2 "},[s("div",{staticClass:"mb-2"},[s("div",{staticClass:"border-blue-500 flex border-2 rounded overflow-hidden"},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.searchValue,expression:"searchValue"}],staticClass:"flex-auto text-gray-700 outline-none h-10 px-2",attrs:{type:"text",placeholder:e.$slots["search-placeholder"]?e.$slots["search-placeholder"][0].text:"SKU, Barcode, Name"},domProps:{value:e.searchValue},on:{input:function(t){t.target.composing||(e.searchValue=t.target.value)}}})]),e._v(" "),s("div",{staticClass:"h-0"},[s("div",{staticClass:"shadow bg-white relative z-10"},e._l(e.searchResult,(function(t,r){return s("div",{key:r,staticClass:"cursor-pointer border border-b border-gray-300 p-2 text-gray-700",on:{click:function(s){return e.addProductList(t)}}},[s("span",{staticClass:"block font-bold text-gray-700"},[e._v(e._s(t.name))]),e._v(" "),s("span",{staticClass:"block text-sm text-gray-600"},[e._v(e._s(e.__("SKU"))+" : "+e._s(t.sku))]),e._v(" "),s("span",{staticClass:"block text-sm text-gray-600"},[e._v(e._s(e.__("Barcode"))+" : "+e._s(t.barcode))])])})),0)])]),e._v(" "),s("div",{staticClass:"overflow-x-auto"},[s("table",{staticClass:"w-full"},[s("thead",[s("tr",e._l(e.form.columns,(function(t,r){return s("td",{key:r,staticClass:"text-gray-700 p-2 border border-gray-300 bg-gray-200",attrs:{width:"200"}},[e._v(e._s(t.label))])})),0)]),e._v(" "),s("tbody",[e._l(e.form.products,(function(t,r){return s("tr",{key:r,class:t.procurement.$invalid?"bg-red-200 border-2 border-red-500":"bg-gray-100"},[e._l(e.form.columns,(function(i,n){return["name"===i.type?s("td",{key:n,staticClass:"p-2 text-gray-600 border border-gray-300"},[s("span",{staticClass:"font-semibold"},[e._v(e._s(t.name))]),e._v(" "),s("div",{staticClass:"flex justify-between"},[s("div",{staticClass:"flex -mx-1 flex-col"},[s("div",{staticClass:"px-1"},[s("span",{staticClass:"text-xs text-red-500 cursor-pointer underline px-1",on:{click:function(t){return e.deleteProduct(r)}}},[e._v(e._s(e.__("Delete")))])])]),e._v(" "),s("div",{staticClass:"flex -mx-1 flex-col"},[s("div",{staticClass:"px-1"},[s("span",{staticClass:"text-xs text-red-500 cursor-pointer underline px-1",on:{click:function(t){return e.setProductOptions(r)}}},[e._v(e._s(e.__("Options")))])])])])]):e._e(),e._v(" "),"text"===i.type?s("td",{key:n,staticClass:"p-2 w-3 text-gray-600 border border-gray-300"},[s("div",{staticClass:"flex items-start"},[s("input",{directives:[{name:"model",rawName:"v-model",value:t.procurement[n],expression:"product.procurement[ key ]"}],staticClass:"w-24 border-2 p-2 border-blue-400 rounded",attrs:{type:"text"},domProps:{value:t.procurement[n]},on:{change:function(t){return e.updateLine(r)},input:function(s){s.target.composing||e.$set(t.procurement,n,s.target.value)}}})])]):e._e(),e._v(" "),"tax_group_id"===i.type?s("td",{key:n,staticClass:"p-2 text-gray-600 border border-gray-300"},[s("div",{staticClass:"flex items-start"},[s("select",{directives:[{name:"model",rawName:"v-model",value:t.procurement.tax_group_id,expression:"product.procurement.tax_group_id"}],staticClass:"rounded border-blue-500 border-2 p-2",on:{change:[function(s){var r=Array.prototype.filter.call(s.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(t.procurement,"tax_group_id",s.target.multiple?r:r[0])},function(t){return e.updateLine(r)}]}},e._l(e.taxes,(function(t){return s("option",{key:t.id,domProps:{value:t.id}},[e._v(e._s(t.name))])})),0)])]):e._e(),e._v(" "),"custom_select"===i.type?s("td",{key:n,staticClass:"p-2 text-gray-600 border border-gray-300"},[s("div",{staticClass:"flex items-start"},[s("select",{directives:[{name:"model",rawName:"v-model",value:t.procurement[n],expression:"product.procurement[ key ]"}],staticClass:"rounded border-blue-500 border-2 p-2",on:{change:[function(s){var r=Array.prototype.filter.call(s.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(t.procurement,n,s.target.multiple?r:r[0])},function(t){return e.updateLine(r)}]}},e._l(i.options,(function(t){return s("option",{key:t.value,domProps:{value:t.value}},[e._v(e._s(t.label))])})),0)])]):e._e(),e._v(" "),"currency"===i.type?s("td",{key:n,staticClass:"p-2 text-gray-600 border border-gray-300"},[s("div",{staticClass:"flex items-start flex-col justify-end"},[s("span",{staticClass:"text-sm text-gray-600"},[e._v(e._s(e._f("currency")(t.procurement[n])))])])]):e._e(),e._v(" "),"unit_quantities"===i.type?s("td",{key:n,staticClass:"p-2 text-gray-600 border border-gray-300"},[s("div",{staticClass:"flex items-start"},[s("select",{directives:[{name:"model",rawName:"v-model",value:t.procurement.unit_id,expression:"product.procurement.unit_id"}],staticClass:"rounded border-blue-500 border-2 p-2 w-32",on:{change:function(s){var r=Array.prototype.filter.call(s.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(t.procurement,"unit_id",s.target.multiple?r:r[0])}}},e._l(t.unit_quantities,(function(t){return s("option",{key:t.id,domProps:{value:t.unit.id}},[e._v(e._s(t.unit.name))])})),0)])]):e._e()]}))],2)})),e._v(" "),s("tr",{staticClass:"bg-gray-100"},[s("td",{staticClass:"p-2 text-gray-600 border border-gray-300",attrs:{colspan:Object.keys(e.form.columns).indexOf("tax_value")}}),e._v(" "),s("td",{staticClass:"p-2 text-gray-600 border border-gray-300"},[e._v(e._s(e._f("currency")(e.totalTaxValues)))]),e._v(" "),s("td",{staticClass:"p-2 text-gray-600 border border-gray-300",attrs:{colspan:Object.keys(e.form.columns).indexOf("total_purchase_price")-(Object.keys(e.form.columns).indexOf("tax_value")+1)}}),e._v(" "),s("td",{staticClass:"p-2 text-gray-600 border border-gray-300"},[e._v(e._s(e._f("currency")(e.totalPurchasePrice)))])])],2)])])]):e._e()])])])]:e._e()],2)}),[],!1,null,null,null).exports,H={template:"#ns-procurement-invoice",methods:{printInvoice:function(){this.$htmlToPaper("printable-container")}}};const G=(0,f.Z)(H,undefined,undefined,!1,null,null,null).exports;const Q={name:"ns-notifications",data:function(){return{notifications:[],visible:!1,interval:null}},mounted:function(){var e=this;document.addEventListener("click",this.checkClickedItem),ns.websocket.enabled?Echo.private("ns.private-channel").listen("App\\Events\\NotificationDispatchedEvent",(function(t){e.pushNotificationIfNew(t.notification)})).listen("App\\Events\\NotificationDeletedEvent",(function(t){e.deleteNotificationIfExists(t.notification)})):this.interval=setInterval((function(){e.loadNotifications()}),15e3),this.loadNotifications()},destroyed:function(){clearInterval(this.interval)},methods:{__:o.__,pushNotificationIfNew:function(e){var t=this.notifications.filter((function(t){return t.id===e.id})).length>0;console.log(e),t||this.notifications.push(e)},deleteNotificationIfExists:function(e){var t=this.notifications.filter((function(t){return t.id===e.id}));if(t.length>0){var s=this.notifications.indexOf(t[0]);this.notifications.splice(s,1)}},deleteAll:function(){Popup.show(A.Z,{title:(0,o.__)("Confirm Your Action"),message:(0,o.__)("Would you like to clear all the notifications ?"),onAction:function(e){e&&a.ih.delete("/api/nexopos/v4/notifications/all").subscribe((function(e){a.kX.success(e.message).subscribe()}))}})},checkClickedItem:function(e){var t;t=!!document.getElementById("notification-center")&&document.getElementById("notification-center").contains(e.srcElement);var s=document.getElementById("notification-button").contains(e.srcElement);t||s||!this.visible||(this.visible=!1)},loadNotifications:function(){var e=this;a.ih.get("/api/nexopos/v4/notifications").subscribe((function(t){e.notifications=t}))},triggerLink:function(e){if("url"!==e.url)return window.open(e.url,"_blank")},closeNotice:function(e,t){var s=this;a.ih.delete("/api/nexopos/v4/notifications/".concat(t.id)).subscribe((function(e){s.loadNotifications()})),e.stopPropagation()}}};const K=(0,f.Z)(Q,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[s("div",{staticClass:"hover:bg-white hover:text-gray-700 hover:shadow-lg hover:border-opacity-0 rounded-full h-12 w-12 cursor-pointer font-bold text-2xl justify-center items-center flex text-gray-800",class:e.visible?"bg-white border-0 shadow-lg":"border border-gray-400",attrs:{id:"notification-button"},on:{click:function(t){e.visible=!e.visible}}},[e.notifications.length>0?s("div",{staticClass:"relative float-right"},[s("div",{staticClass:"absolute -ml-6 -mt-8"},[s("div",{staticClass:"bg-blue-400 text-white w-8 h-8 rounded-full text-xs flex items-center justify-center"},[e._v(e._s(e._f("abbreviate")(e.notifications.length)))])])]):e._e(),e._v(" "),s("i",{staticClass:"las la-bell"})]),e._v(" "),e.visible?s("div",{staticClass:"h-0 w-0",attrs:{id:"notification-center"}},[s("div",{staticClass:"absolute left-0 top-0 sm:relative w-screen zoom-out-entrance anim-duration-300 h-5/7-screen sm:w-64 sm:h-108 flex flex-row-reverse"},[s("div",{staticClass:"z-50 sm:rounded-lg shadow-lg h-full w-full bg-white md:mt-2 overflow-y-hidden flex flex-col"},[s("div",{staticClass:"sm:hidden p-2 cursor-pointer flex items-center justify-center border-b border-gray-200",on:{click:function(t){e.visible=!1}}},[s("h3",{staticClass:"font-semibold hover:text-blue-400"},[e._v("Close")])]),e._v(" "),s("div",{staticClass:"overflow-y-auto flex flex-col flex-auto"},[e._l(e.notifications,(function(t){return s("div",{key:t.id,staticClass:"notice border-b border-gray-200"},[s("div",{staticClass:"p-2 cursor-pointer",on:{click:function(s){return e.triggerLink(t)}}},[s("div",{staticClass:"flex items-center justify-between"},[s("h1",{staticClass:"font-semibold text-gray-700"},[e._v(e._s(t.title))]),e._v(" "),s("ns-close-button",{on:{click:function(s){return e.closeNotice(s,t)}}})],1),e._v(" "),s("p",{staticClass:"py-1 text-gray-600 text-sm"},[e._v(e._s(t.description))])])])})),e._v(" "),0===e.notifications.length?s("div",{staticClass:"h-full w-full flex items-center justify-center"},[s("div",{staticClass:"flex flex-col items-center"},[s("i",{staticClass:"las la-laugh-wink text-5xl text-gray-800"}),e._v(" "),s("p",{staticClass:"text-gray-600 text-sm"},[e._v(e._s(e.__("Nothing to care about !")))])])]):e._e()],2),e._v(" "),s("div",{staticClass:"cursor-pointer"},[s("h3",{staticClass:"text-sm p-2 flex items-center justify-center hover:bg-red-100 w-full text-red-400 font-semibold hover:text-red-500",on:{click:function(t){return e.deleteAll()}}},[e._v(e._s(e.__("Clear All")))])])])])]):e._e()])}),[],!1,null,null,null).exports;var J=s(9576),ee=s(381),te=s.n(ee),se=s(6598);const re={name:"ns-sale-report",data:function(){return{startDate:te()(),endDate:te()(),orders:[],field:{type:"datetimepicker",value:"2021-02-07",name:"date"}}},components:{nsDatepicker:se.Z},computed:{totalDiscounts:function(){return this.orders.length>0?this.orders.map((function(e){return e.discount})).reduce((function(e,t){return e+t})):0},totalTaxes:function(){return this.orders.length>0?this.orders.map((function(e){return e.tax_value})).reduce((function(e,t){return e+t})):0},totalOrders:function(){return this.orders.length>0?this.orders.map((function(e){return e.total})).reduce((function(e,t){return e+t})):0}},methods:{printSaleReport:function(){this.$htmlToPaper("sale-report")},setStartDate:function(e){this.startDate=e.format(),console.log(this.startDate)},loadReport:function(){var e=this;if(null===this.startDate||null===this.endDate)return a.kX.error((0,o.__)("Unable to proceed. Select a correct time range.")).subscribe();var t=te()(this.startDate);if(te()(this.endDate).isBefore(t))return a.kX.error((0,o.__)("Unable to proceed. The current time range is not valid.")).subscribe();a.ih.post("/api/nexopos/v4/reports/sale-report",{startDate:this.startDate,endDate:this.endDate}).subscribe((function(t){e.orders=t}),(function(e){a.kX.error(e.message).subscribe()}))},setEndDate:function(e){this.endDate=e.format()}}};const ie=(0,f.Z)(re,(function(){var e=this.$createElement;return(this._self._c||e)("div")}),[],!1,null,null,null).exports;const ne={name:"ns-sold-stock-report",data:function(){return{startDate:te()(),endDate:te()(),products:[]}},components:{nsDatepicker:se.Z},computed:{totalQuantity:function(){return this.products.length>0?this.products.map((function(e){return e.quantity})).reduce((function(e,t){return e+t})):0},totalTaxes:function(){return this.products.length>0?this.products.map((function(e){return e.tax_value})).reduce((function(e,t){return e+t})):0},totalPrice:function(){return console.log(this.products),this.products.length>0?this.products.map((function(e){return e.total_price})).reduce((function(e,t){return e+t})):0}},methods:{printSaleReport:function(){this.$htmlToPaper("report-printable")},setStartDate:function(e){this.startDate=e.format()},loadReport:function(){var e=this;if(null===this.startDate||null===this.endDate)return a.kX.error((0,o.__)("Unable to proceed. Select a correct time range.")).subscribe();var t=te()(this.startDate);if(te()(this.endDate).isBefore(t))return a.kX.error((0,o.__)("Unable to proceed. The current time range is not valid.")).subscribe();a.ih.post("/api/nexopos/v4/reports/sold-stock-report",{startDate:this.startDate,endDate:this.endDate}).subscribe((function(t){e.products=t}),(function(e){a.kX.error(e.message).subscribe()}))},setEndDate:function(e){this.endDate=e.format()}}};const ae=(0,f.Z)(ne,(function(){var e=this.$createElement;return(this._self._c||e)("div")}),[],!1,null,null,null).exports;const oe={name:"ns-profit-report",data:function(){return{startDate:te()(),endDate:te()(),products:[]}},components:{nsDatepicker:se.Z},computed:{totalQuantities:function(){return this.products.length>0?this.products.map((function(e){return e.quantity})).reduce((function(e,t){return e+t})):0},totalPurchasePrice:function(){return this.products.length>0?this.products.map((function(e){return e.total_purchase_price})).reduce((function(e,t){return e+t})):0},totalSalePrice:function(){return this.products.length>0?this.products.map((function(e){return e.total_price})).reduce((function(e,t){return e+t})):0},totalProfit:function(){return this.products.length>0?this.products.map((function(e){return e.total_price-e.total_purchase_price})).reduce((function(e,t){return e+t})):0},totalTax:function(){return this.products.length>0?this.products.map((function(e){return e.tax_value})).reduce((function(e,t){return e+t})):0}},methods:{printSaleReport:function(){this.$htmlToPaper("profit-report")},setStartDate:function(e){this.startDate=e.format(),console.log(this.startDate)},loadReport:function(){var e=this;if(null===this.startDate||null===this.endDate)return a.kX.error((0,o.__)("Unable to proceed. Select a correct time range.")).subscribe();var t=te()(this.startDate);if(te()(this.endDate).isBefore(t))return a.kX.error((0,o.__)("Unable to proceed. The current time range is not valid.")).subscribe();a.ih.post("/api/nexopos/v4/reports/profit-report",{startDate:this.startDate,endDate:this.endDate}).subscribe((function(t){e.products=t}),(function(e){a.kX.error(e.message).subscribe()}))},setEndDate:function(e){this.endDate=e.format()}}};const le=(0,f.Z)(oe,(function(){var e=this.$createElement;return(this._self._c||e)("div")}),[],!1,null,null,null).exports,ce={name:"ns-cash-flow",mounted:function(){},components:{nsDatepicker:se.Z},data:function(){return{startDate:te()(),endDate:te()(),report:[]}},computed:{totalDebit:function(){return 0},totalCredit:function(){return 0}},methods:{setStartDate:function(e){this.startDate=e.format()},setEndDate:function(e){this.endDate=e.format()},loadReport:function(){var e=this,t=te()(this.startDate),s=te()(this.endDate);a.ih.post("/api/nexopos/v4/reports/cash-flow",{startDate:t,endDate:s}).subscribe((function(t){e.report=t,console.log(e.report)}),(function(e){a.kX.error(e.message).subscribe()}))}}};const de=(0,f.Z)(ce,undefined,undefined,!1,null,null,null).exports,ue={name:"ns-yearly-report",mounted:function(){this.loadReport()},components:{nsDatepicker:se.Z},data:function(){return{startDate:te()(),endDate:te()(),report:{},year:ns.date.getMoment().format("Y"),labels:["month_paid_orders","month_taxes","month_expenses","month_income"]}},computed:{totalDebit:function(){return 0},totalCredit:function(){return 0}},methods:{setStartDate:function(e){this.startDate=e.format()},setEndDate:function(e){this.endDate=e.format()},printSaleReport:function(){this.$htmlToPaper("annual-report")},sumOf:function(e){return Object.values(this.report).length>0?Object.values(this.report).map((function(t){return parseFloat(t[e])||0})).reduce((function(e,t){return e+t})):0},recomputeForSpecificYear:function(){var e=this;Popup.show(A.Z,{title:__("Would you like to proceed ?"),message:__("The report will be computed for the current year, a job will be dispatched and you'll be informed once it's completed."),onAction:function(t){t&&a.ih.post("/api/nexopos/v4/reports/compute/yearly",{year:e.year}).subscribe((function(e){a.kX.success(e.message).subscribe()}),(function(e){a.kX.success(e.message||__("An unexpected error has occured.")).subscribe()}))}})},getReportForMonth:function(e){return console.log(this.report,e),this.report[e]},loadReport:function(){var e=this,t=this.year;a.ih.post("/api/nexopos/v4/reports/annual-report",{year:t}).subscribe((function(t){e.report=t}),(function(e){a.kX.error(e.message).subscribe()}))}}};const fe=(0,f.Z)(ue,undefined,undefined,!1,null,null,null).exports,pe={name:"ns-best-products-report",mounted:function(){},components:{nsDatepicker:se.Z},data:function(){return{startDate:te()(),endDate:te()(),report:null,sort:""}},computed:{totalDebit:function(){return 0},totalCredit:function(){return 0}},methods:{setStartDate:function(e){this.startDate=e.format()},setEndDate:function(e){this.endDate=e.format()},printSaleReport:function(){this.$htmlToPaper("best-products-report")},loadReport:function(){var e=this,t=te()(this.startDate),s=te()(this.endDate);a.ih.post("/api/nexopos/v4/reports/products-report",{startDate:t.format("YYYY/MM/DD HH:mm"),endDate:s.format("YYYY/MM/DD HH:mm"),sort:this.sort}).subscribe((function(t){t.current.products=Object.values(t.current.products),e.report=t,console.log(e.report)}),(function(e){a.kX.error(e.message).subscribe()}))}}};const me=(0,f.Z)(pe,undefined,undefined,!1,null,null,null).exports;var he=s(8655);const ve={name:"ns-payment-types-report",data:function(){return{startDate:te()(),endDate:te()(),report:[],field:{type:"datetimepicker",value:"2021-02-07",name:"date"}}},components:{nsDatepicker:se.Z,nsDateTimePicker:he.V},computed:{},mounted:function(){},methods:{printSaleReport:function(){this.$htmlToPaper("sale-report")},setStartDate:function(e){console.log(e),this.startDate=e.format()},loadReport:function(){var e=this;if(null===this.startDate||null===this.endDate)return a.kX.error((0,o.__)("Unable to proceed. Select a correct time range.")).subscribe();var t=te()(this.startDate);if(te()(this.endDate).isBefore(t))return a.kX.error((0,o.__)("Unable to proceed. The current time range is not valid.")).subscribe();a.ih.post("/api/nexopos/v4/reports/payment-types",{startDate:this.startDate,endDate:this.endDate}).subscribe((function(t){e.report=t}),(function(e){a.kX.error(e.message).subscribe()}))},setEndDate:function(e){console.log(e),this.endDate=e.format()}}};const be=(0,f.Z)(ve,(function(){var e=this.$createElement;return(this._self._c||e)("div")}),[],!1,null,null,null).exports;const _e={name:"ns-dashboard-cards",data:function(){return{report:{}}},mounted:function(){this.loadReport(),console.log(nsLanguage.getEntries())},methods:{__:o.__,loadReport:function(){var e=this;a.ih.get("/api/nexopos/v4/dashboard/day").subscribe((function(t){e.report=t}))}}};const ge=(0,f.Z)(_e,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"-m-4 flex flex-wrap"},[s("div",{staticClass:"p-4 w-full md:w-1/2 lg:w-1/4"},[s("div",{staticClass:"flex flex-auto flex-col rounded-lg shadow-lg bg-gradient-to-br from-blue-400 to-blue-600 text-white px-3 py-5"},[s("div",{staticClass:"flex flex-row md:flex-col flex-auto"},[s("div",{staticClass:"w-1/2 md:w-full flex md:flex-col md:items-start items-center justify-center"},[s("h6",{staticClass:"font-bold hidden text-right md:inline-block"},[e._v(e._s(e.__("Total Sales")))]),e._v(" "),s("h3",{staticClass:"text-2xl font-black"},[e._v("\n "+e._s(e._f("currency")(e.report.total_paid_orders||0,"abbreviate"))+"\n ")])]),e._v(" "),s("div",{staticClass:"w-1/2 md:w-full flex flex-col px-2 justify-end items-end"},[s("h6",{staticClass:"font-bold inline-block text-right md:hidden"},[e._v(e._s(e.__("Total Sales")))]),e._v(" "),s("h4",{staticClass:"text-xs text-right"},[e._v("+"+e._s(e._f("currency")(e.report.day_paid_orders||0))+" "+e._s(e.__("Today")))])])])])]),e._v(" "),s("div",{staticClass:"p-4 w-full md:w-1/2 lg:w-1/4"},[s("div",{staticClass:"flex flex-auto flex-col rounded-lg shadow-lg bg-gradient-to-br from-green-400 to-green-600 text-white px-3 py-5"},[s("div",{staticClass:"flex flex-row md:flex-col flex-auto"},[s("div",{staticClass:"w-1/2 md:w-full flex md:flex-col md:items-start items-center justify-center"},[s("h6",{staticClass:"font-bold hidden text-right md:inline-block"},[e._v(e._s(e.__("Incomplete Orders")))]),e._v(" "),s("h3",{staticClass:"text-2xl font-black"},[e._v("\n "+e._s(e._f("currency")(e.report.total_partially_paid_orders+e.report.total_unpaid_orders||0,"abbreviate"))+"\n ")])]),e._v(" "),s("div",{staticClass:"w-1/2 md:w-full flex flex-col px-2 justify-end items-end"},[s("h6",{staticClass:"font-bold inline-block text-right md:hidden"},[e._v(e._s(e.__("Incomplete Orders")))]),e._v(" "),s("h4",{staticClass:"text-xs text-right"},[e._v("+"+e._s(e._f("currency")(e.report.day_unpaid_orders+e.report.day_partially_paid_orders||0))+" "+e._s(e.__("Today")))])])])])]),e._v(" "),s("div",{staticClass:"p-4 w-full md:w-1/2 lg:w-1/4"},[s("div",{staticClass:"flex flex-auto flex-col rounded-lg shadow-lg bg-gradient-to-br from-red-300 via-red-400 to-red-500 text-white px-3 py-5"},[s("div",{staticClass:"flex flex-row md:flex-col flex-auto"},[s("div",{staticClass:"w-1/2 md:w-full flex md:flex-col md:items-start items-center justify-center"},[s("h6",{staticClass:"font-bold hidden text-right md:inline-block"},[e._v(e._s(e.__("Wasted Goods")))]),e._v(" "),s("h3",{staticClass:"text-2xl font-black"},[e._v("\n "+e._s(e._f("currency")(e.report.total_wasted_goods||0,"abbreviate"))+"\n ")])]),e._v(" "),s("div",{staticClass:"w-1/2 md:w-full flex flex-col px-2 justify-end items-end"},[s("h6",{staticClass:"font-bold inline-block text-right md:hidden"},[e._v(e._s(e.__("Wasted Goods")))]),e._v(" "),s("h4",{staticClass:"text-xs text-right"},[e._v("+"+e._s(e._f("currency")(e.report.day_wasted_goods||0))+" "+e._s(e.__("Today")))])])])])]),e._v(" "),s("div",{staticClass:"p-4 w-full md:w-1/2 lg:w-1/4"},[s("div",{staticClass:"flex flex-auto flex-col rounded-lg shadow-lg bg-gradient-to-br from-indigo-400 to-indigo-600 text-white px-3 py-5"},[s("div",{staticClass:"flex flex-row md:flex-col flex-auto"},[s("div",{staticClass:"w-1/2 md:w-full flex md:flex-col md:items-start items-center justify-center"},[s("h6",{staticClass:"font-bold hidden text-right md:inline-block"},[e._v(e._s(e.__("Expenses")))]),e._v(" "),s("h3",{staticClass:"text-2xl font-black"},[e._v("\n "+e._s(e._f("currency")(e.report.total_expenses||0,"abbreviate"))+"\n ")])]),e._v(" "),s("div",{staticClass:"w-1/2 md:w-full flex flex-col px-2 justify-end items-end"},[s("h6",{staticClass:"font-bold inline-block text-right md:hidden"},[e._v(e._s(e.__("Expenses")))]),e._v(" "),s("h4",{staticClass:"text-xs text-right"},[e._v("+"+e._s(e._f("currency")(e.report.day_expenses||0))+" "+e._s(e.__("Today")))])])])])])])}),[],!1,null,null,null).exports;const xe={name:"ns-best-customers",mounted:function(){var e=this;this.hasLoaded=!1,this.subscription=Dashboard.bestCustomers.subscribe((function(t){e.hasLoaded=!0,e.customers=t}))},methods:{__:o.__},data:function(){return{customers:[],subscription:null,hasLoaded:!1}},destroyed:function(){this.subscription.unsubscribe()}};const ye=(0,f.Z)(xe,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"flex flex-auto flex-col shadow rounded-lg overflow-hidden"},[s("div",{staticClass:"head bg-white flex-auto"},[s("div",{staticClass:"head text-center border-b border-gray-200 text-gray-700 w-full py-2"},[s("h5",[e._v(e._s(e.__("Best Customers")))])]),e._v(" "),s("div",{staticClass:"body"},[e.hasLoaded?e._e():s("div",{staticClass:"h-56 w-full flex items-center justify-center"},[s("ns-spinner",{attrs:{size:"12",border:"4"}})],1),e._v(" "),e.hasLoaded&&0===e.customers.length?s("div",{staticClass:"h-56 flex items-center justify-center flex-col"},[s("i",{staticClass:"las la-grin-beam-sweat text-6xl text-gray-700"}),e._v(" "),s("p",{staticClass:"text-gray-600 text-sm"},[e._v(e._s(e.__("Well.. nothing to show for the meantime")))])]):e._e(),e._v(" "),e.customers.length>0?s("table",{staticClass:"table w-full"},[s("thead",e._l(e.customers,(function(t){return s("tr",{key:t.id,staticClass:"border-gray-300 border-b text-sm"},[s("th",{staticClass:"p-2"},[s("div",{staticClass:"-mx-1 flex justify-start items-center"},[e._m(0,!0),e._v(" "),s("div",{staticClass:"px-1 justify-center"},[s("h3",{staticClass:"font-semibold text-gray-600 items-center"},[e._v(e._s(t.name))])])])]),e._v(" "),s("th",{staticClass:"flex justify-end text-green-700 p-2"},[e._v(e._s(e._f("currency")(t.purchases_amount)))])])})),0)]):e._e()])])])}),[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"px-1"},[t("div",{staticClass:"rounded-full bg-gray-200 h-6 w-6 "},[t("img",{attrs:{src:"/images/user.png"}})])])}],!1,null,null,null).exports;const we={name:"ns-best-customers",data:function(){return{subscription:null,cashiers:[],hasLoaded:!1}},mounted:function(){var e=this;this.hasLoaded=!1,this.subscription=Dashboard.bestCashiers.subscribe((function(t){e.hasLoaded=!0,e.cashiers=t}))},methods:{__:o.__},destroyed:function(){this.subscription.unsubscribe()}};const Ce=(0,f.Z)(we,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"flex flex-auto flex-col shadow rounded-lg overflow-hidden"},[s("div",{staticClass:"head bg-white flex-auto"},[s("div",{staticClass:"head text-center border-b border-gray-200 text-gray-700 w-full py-2"},[s("h5",[e._v(e._s(e.__("Best Cashiers")))])]),e._v(" "),s("div",{staticClass:"body"},[e.cashiers.length>0?s("table",{staticClass:"table w-full"},[s("thead",[e._l(e.cashiers,(function(t){return s("tr",{key:t.id,staticClass:"border-gray-300 border-b text-sm"},[s("th",{staticClass:"p-2"},[s("div",{staticClass:"-mx-1 flex justify-start items-center"},[e._m(0,!0),e._v(" "),s("div",{staticClass:"px-1 justify-center"},[s("h3",{staticClass:"font-semibold text-gray-600 items-center"},[e._v(e._s(t.username))])])])]),e._v(" "),s("th",{staticClass:"flex justify-end text-green-700 p-2"},[e._v(e._s(e._f("currency")(t.total_sales,"abbreviate")))])])})),e._v(" "),0===e.cashiers.length?s("tr",[s("th",{attrs:{colspan:"2"}},[e._v(e._s(e.__("No result to display.")))])]):e._e()],2)]):e._e(),e._v(" "),e.hasLoaded?e._e():s("div",{staticClass:"h-56 flex items-center justify-center"},[s("ns-spinner",{attrs:{size:"8",border:"4"}})],1),e._v(" "),e.hasLoaded&&0===e.cashiers.length?s("div",{staticClass:"h-56 flex items-center justify-center flex-col"},[s("i",{staticClass:"las la-grin-beam-sweat text-6xl text-gray-700"}),e._v(" "),s("p",{staticClass:"text-gray-600 text-sm"},[e._v(e._s(e.__("Well.. nothing to show for the meantime.")))])]):e._e()])])])}),[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"px-1"},[t("div",{staticClass:"rounded-full bg-gray-200 h-6 w-6 "},[t("img",{attrs:{src:"/images/user.png"}})])])}],!1,null,null,null).exports;const ke={name:"ns-orders-summary",data:function(){return{orders:[],subscription:null,hasLoaded:!1}},mounted:function(){var e=this;this.hasLoaded=!1,this.subscription=Dashboard.recentOrders.subscribe((function(t){e.hasLoaded=!0,e.orders=t}))},methods:{__:o.__},destroyed:function(){this.subscription.unsubscribe()}};const je=(0,f.Z)(ke,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"flex flex-auto flex-col shadow rounded-lg overflow-hidden"},[s("div",{staticClass:"p-2 flex justify-between bg-white border-b"},[s("h3",{staticClass:"font-semibold text-gray-700"},[e._v(e._s(e.__("Recents Orders")))]),e._v(" "),s("div",{})]),e._v(" "),s("div",{staticClass:"head bg-gray-100 flex-auto flex-col flex h-56 overflow-y-auto"},[e.hasLoaded?e._e():s("div",{staticClass:"h-full flex items-center justify-center"},[s("ns-spinner",{attrs:{size:"8",border:"4"}})],1),e._v(" "),e.hasLoaded&&0===e.orders.length?s("div",{staticClass:"h-full flex items-center justify-center flex-col"},[s("i",{staticClass:"las la-grin-beam-sweat text-6xl text-gray-700"}),e._v(" "),s("p",{staticClass:"text-gray-600 text-sm"},[e._v(e._s(e.__("Well.. nothing to show for the meantime.")))])]):e._e(),e._v(" "),e._l(e.orders,(function(t){return s("div",{key:t.id,staticClass:"border-b border-gray-200 p-2 flex justify-between",class:"paid"===t.payment_status?"bg-green-50":"bg-white"},[s("div",[s("h3",{staticClass:"text-lg font-semibold text-gray-600"},[e._v(e._s(e.__("Order"))+" : "+e._s(t.code))]),e._v(" "),s("div",{staticClass:"flex -mx-2"},[s("div",{staticClass:"px-1"},[s("h4",{staticClass:"text-semibold text-xs text-gray-500"},[s("i",{staticClass:"lar la-user-circle"}),e._v(" "),s("span",[e._v(e._s(t.user.username))])])]),e._v(" "),s("div",{staticClass:"divide-y-4"}),e._v(" "),s("div",{staticClass:"px-1"},[s("h4",{staticClass:"text-semibold text-xs text-gray-600"},[s("i",{staticClass:"las la-clock"}),e._v(" "),s("span",[e._v(e._s(t.created_at))])])])])]),e._v(" "),s("div",[s("h2",{staticClass:"text-xl font-bold",class:"paid"===t.payment_status?"text-green-600":"text-gray-700"},[e._v(e._s(e._f("currency")(t.total)))])])])}))],2)])}),[],!1,null,null,null).exports;const $e={name:"ns-orders-chart",data:function(){return{totalWeeklySales:0,totalWeekTaxes:0,totalWeekExpenses:0,totalWeekIncome:0,chartOptions:{chart:{id:"vuechart-example",width:"100%",height:"100%"},stroke:{curve:"smooth",dashArray:[0,8]},xaxis:{categories:[]},colors:["#5f83f3","#AAA"]},series:[{name:(0,o.__)("Current Week"),data:[]},{name:(0,o.__)("Previous Week"),data:[]}],reportSubscription:null,report:null}},methods:{__:o.__},mounted:function(){var e=this;this.reportSubscription=Dashboard.weeksSummary.subscribe((function(t){void 0!==t.result&&(e.chartOptions.xaxis.categories=t.result.map((function(e){return e.label})),e.report=t,e.totalWeeklySales=0,e.totalWeekIncome=0,e.totalWeekExpenses=0,e.totalWeekTaxes=0,e.report.result.forEach((function(t,s){if(void 0!==t.current){var r=t.current.entries.map((function(e){return e.day_paid_orders})),i=0;r.length>0&&(i=r.reduce((function(e,t){return e+t})),e.totalWeekExpenses+=t.current.entries.map((function(e){return e.day_expenses})),e.totalWeekTaxes+=t.current.entries.map((function(e){return e.day_taxes})),e.totalWeekIncome+=t.current.entries.map((function(e){return e.day_income}))),e.series[0].data.push(i)}else e.series[0].data.push(0);if(void 0!==t.previous){var n=t.previous.entries.map((function(e){return e.day_paid_orders})),a=0;n.length>0&&(a=n.reduce((function(e,t){return e+t}))),e.series[1].data.push(a)}else e.series[1].data.push(0)})),e.totalWeeklySales=e.series[0].data.reduce((function(e,t){return e+t})))}))}};const Se=(0,f.Z)($e,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"flex flex-auto flex-col shadow rounded-lg overflow-hidden"},[s("div",{staticClass:"head bg-white flex-auto flex h-56"},[s("div",{staticClass:"w-full h-full pt-2"},[e.report?s("vue-apex-charts",{attrs:{height:"100%",type:"area",options:e.chartOptions,series:e.series}}):e._e()],1)]),e._v(" "),s("div",{staticClass:"p-2 bg-white -mx-4 flex flex-wrap"},[s("div",{staticClass:"flex w-full md:w-1/2 lg:w-full xl:w-1/2 lg:border-b lg:border-t xl:border-none border-gray-200 lg:py-1 lg:my-1"},[s("div",{staticClass:"px-4 w-1/2 lg:w-1/2 flex flex-col items-center justify-center"},[s("span",{staticClass:"text-xs text-gray-600"},[e._v(e._s(e.__("Weekly Sales")))]),e._v(" "),s("h2",{staticClass:"text-lg xl:text-xl text-gray-700 font-bold"},[e._v(e._s(e._f("currency")(e.totalWeeklySales,"abbreviate")))])]),e._v(" "),s("div",{staticClass:"px-4 w-1/2 lg:w-1/2 flex flex-col items-center justify-center"},[s("span",{staticClass:"text-xs text-gray-600"},[e._v(e._s(e.__("Week Taxes")))]),e._v(" "),s("h2",{staticClass:"text-lg xl:text-xl text-gray-700 font-bold"},[e._v(e._s(e._f("currency")(e.totalWeekTaxes,"abbreviate")))])])]),e._v(" "),s("div",{staticClass:"flex w-full md:w-1/2 lg:w-full xl:w-1/2"},[s("div",{staticClass:"px-4 w-full lg:w-1/2 flex flex-col items-center justify-center"},[s("span",{staticClass:"text-xs text-gray-600"},[e._v(e._s(e.__("Net Income")))]),e._v(" "),s("h2",{staticClass:"text-lg xl:text-xl text-gray-700 font-bold"},[e._v(e._s(e._f("currency")(e.totalWeekIncome,"abbreviate")))])]),e._v(" "),s("div",{staticClass:"px-4 w-full lg:w-1/2 flex flex-col items-center justify-center"},[s("span",{staticClass:"text-xs text-gray-600"},[e._v(e._s(e.__("Week Expenses")))]),e._v(" "),s("h2",{staticClass:"text-lg xl:text-xl text-gray-700 font-bold"},[e._v(e._s(e._f("currency")(e.totalWeekExpenses,"abbreviate")))])])])])])}),[],!1,null,null,null).exports;const Pe={name:"ns-cashier-dashboard",props:["showCommission"],data:function(){return{report:{}}},methods:{__,refreshReport:function(){Cashier.refreshReport()},getOrderStatus:function(e){switch(e){case"paid":return __("Paid");case"partially_paid":return __("Partially Paid");case"unpaid":return __("Unpaid");case"hold":return __("Hold");case"order_void":return __("Void");case"refunded":return __("Refunded");case"partially_refunded":return __("Partially Refunded");default:return $status}}},mounted:function(){var e=this;Cashier.mysales.subscribe((function(t){e.report=t}));var t=document.createRange().createContextualFragment('
    \n
    \n
    \n \n
    \n
    \n
    ');document.querySelector(".top-tools-side").prepend(t),document.querySelector("#refresh-button").addEventListener("click",(function(){return e.refreshReport()}))}};const Oe=(0,f.Z)(Pe,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[s("div",{staticClass:"flex -mx-4 flex-wrap"},[s("div",{staticClass:"px-4 w-full mb-6",class:e.showCommission?"md:w-1/2 lg:w-1/4":"md:w-1/3"},[s("div",{staticClass:"flex flex-auto flex-col rounded-lg shadow-lg bg-gradient-to-br from-purple-400 to-purple-600 text-white px-3 py-5"},[s("div",{staticClass:"flex flex-row md:flex-col flex-auto"},[s("div",{staticClass:"w-1/2 md:w-full flex md:flex-col md:items-start items-center justify-center"},[s("h6",{staticClass:"font-bold hidden text-right md:inline-block"},[e._v(e._s(e.__("Total Sales")))]),e._v(" "),s("h3",{staticClass:"text-2xl font-black"},[e._v("\n "+e._s(e._f("currency")(e.report.total_sales_amount,"abbreviate"))+"\n ")])]),e._v(" "),s("div",{staticClass:"w-1/2 md:w-full flex flex-col px-2 justify-end items-end"},[s("h6",{staticClass:"font-bold inline-block text-right md:hidden"},[e._v(e._s(e.__("Total Sales")))]),e._v(" "),s("h4",{staticClass:"text-xs text-right"},[e._v("+"+e._s(e._f("currency")(e.report.total_sales_amount))+" "+e._s(e.__("Today")))])])])])]),e._v(" "),s("div",{staticClass:"px-4 w-full mb-6",class:e.showCommission?"md:w-1/2 lg:w-1/4":"md:w-1/3"},[s("div",{staticClass:"flex flex-auto flex-col rounded-lg shadow-lg bg-gradient-to-br from-red-400 to-red-600 text-white px-3 py-5"},[s("div",{staticClass:"flex flex-row md:flex-col flex-auto"},[s("div",{staticClass:"w-1/2 md:w-full flex md:flex-col md:items-start items-center justify-center"},[s("h6",{staticClass:"font-bold hidden text-right md:inline-block"},[e._v(e._s(e.__("Total Refunds")))]),e._v(" "),s("h3",{staticClass:"text-2xl font-black"},[e._v("\n "+e._s(e._f("currency")(e.report.total_refunds_amount,"abbreviate"))+"\n ")])]),e._v(" "),s("div",{staticClass:"w-1/2 md:w-full flex flex-col px-2 justify-end items-end"},[s("h6",{staticClass:"font-bold inline-block text-right md:hidden"},[e._v(e._s(e.__("Total Refunds")))]),e._v(" "),s("h4",{staticClass:"text-xs text-right"},[e._v("+"+e._s(e._f("currency")(e.report.today_refunds_amount))+" "+e._s(e.__("Today")))])])])])]),e._v(" "),s("div",{staticClass:"px-4 w-full mb-6",class:e.showCommission?"md:w-1/2 lg:w-1/4":"md:w-1/3"},[s("div",{staticClass:"flex flex-auto flex-col rounded-lg shadow-lg bg-gradient-to-br from-blue-400 to-blue-600 text-white px-3 py-5"},[s("div",{staticClass:"flex flex-row md:flex-col flex-auto"},[s("div",{staticClass:"w-1/2 md:w-full flex md:flex-col md:items-start items-center justify-center"},[s("h6",{staticClass:"font-bold hidden text-right md:inline-block"},[e._v(e._s(e.__("Clients Registered")))]),e._v(" "),s("h3",{staticClass:"text-2xl font-black"},[e._v("\n "+e._s(e.report.total_customers)+"\n ")])]),e._v(" "),s("div",{staticClass:"w-1/2 md:w-full flex flex-col px-2 justify-end items-end"},[s("h6",{staticClass:"font-bold inline-block text-right md:hidden"},[e._v(e._s(e.__("Clients Registered")))]),e._v(" "),s("h4",{staticClass:"text-xs text-right"},[e._v("+"+e._s(e.report.today_customers)+" "+e._s(e.__("Today")))])])])])]),e._v(" "),e.showCommission?s("div",{staticClass:"px-4 w-full mb-6",class:e.showCommission?"md:w-1/2 lg:w-1/4":"md:w-1/3"},[s("div",{staticClass:"flex flex-auto flex-col rounded-lg shadow-lg bg-gradient-to-br from-green-400 to-green-600 text-white px-3 py-5"},[s("div",{staticClass:"flex flex-row md:flex-col flex-auto"},[s("div",{staticClass:"w-1/2 md:w-full flex md:flex-col md:items-start items-center justify-center"},[s("h6",{staticClass:"font-bold hidden text-right md:inline-block"},[e._v(e._s(e.__("Commissions")))]),e._v(" "),s("h3",{staticClass:"text-2xl font-black"},[e._v("\n "+e._s(e._f("currency")(e.report.total_commissions))+"\n ")])]),e._v(" "),s("div",{staticClass:"w-1/2 md:w-full flex flex-col px-2 justify-end items-end"},[s("h6",{staticClass:"font-bold inline-block text-right md:hidden"},[e._v(e._s(e.__("Commissions")))]),e._v(" "),s("h4",{staticClass:"text-xs text-right"},[e._v("+"+e._s(e._f("currency")(e.report.today_commissions))+" "+e._s(e.__("Today")))])])])])]):e._e()]),e._v(" "),s("div",{staticClass:"py-4"},[e.report.today_orders&&e.report.today_orders.length>0?s("ul",{staticClass:"bg-white shadow-lg rounded overflow-hidden"},e._l(e.report.today_orders,(function(t){return s("li",{key:t.id,staticClass:"p-2 border-b-2 border-blue-400"},[s("h3",{staticClass:"font-semibold text-lg flex justify-between"},[s("span",[e._v(e._s(e.__("Total"))+" : "+e._s(e._f("currency")(t.total)))]),e._v(" "),s("span",[e._v(e._s(t.code))])]),e._v(" "),s("ul",{staticClass:"pt-2 flex -mx-1 text-sm text-gray-700"},[s("li",{staticClass:"px-1"},[e._v(e._s(e.__("Discount"))+" : "+e._s(e._f("currency")(t.discount)))]),e._v(" "),s("li",{staticClass:"px-1"},[e._v(e._s(e.__("Status"))+" : "+e._s(e.getOrderStatus(t.payment_status)))])])])})),0):e._e(),e._v(" "),e.report.today_orders&&0===e.report.today_orders.length?s("div",{staticClass:"flex items-center justify-center"},[s("i",{staticClass:"las la-frown"})]):e._e()])])}),[],!1,null,null,null).exports;var De=s(2242),Ee=s(7096),Te=s(1596);const Fe={name:"ns-stock-adjustment",props:["actions"],data:function(){return{search:"",timeout:null,suggestions:[],products:[]}},mounted:function(){console.log(this.actions)},methods:{__:o.__,searchProduct:function(e){var t=this;e.length>0&&a.ih.post("/api/nexopos/v4/procurements/products/search-procurement-product",{argument:e}).subscribe((function(e){if("products"===e.from){if(!(e.products.length>0))return t.closeSearch(),a.kX.error((0,o.__)("Looks like no products matched the searched term.")).subscribe();1===e.products.length?t.addSuggestion(e.products[0]):t.suggestions=e.products}else if("procurements"===e.from){if(null===e.product)return t.closeSearch(),a.kX.error((0,o.__)("Looks like no products matched the searched term.")).subscribe();t.addProductToList(e.product)}}))},addProductToList:function(e){if(this.products.filter((function(t){return t.procurement_product_id===e.id})).length>0)return this.closeSearch(),a.kX.error((0,o.__)("The product already exists on the table.")).subscribe();var t=new Object;e.unit_quantity.unit=e.unit,t.quantities=[e.unit_quantity],t.name=e.name,t.adjust_unit=e.unit_quantity,t.adjust_quantity=1,t.adjust_action="",t.adjust_reason="",t.adjust_value=0,t.id=e.product_id,t.accurate_tracking=1,t.available_quantity=e.available_quantity,t.procurement_product_id=e.id,t.procurement_history=[{label:"".concat(e.procurement.name," (").concat(e.available_quantity,")"),value:e.id}],this.products.push(t),this.closeSearch()},addSuggestion:function(e){var t=this;(0,E.D)([a.ih.get("/api/nexopos/v4/products/".concat(e.id,"/units/quantities"))]).subscribe((function(s){if(!(s[0].length>0))return a.kX.error((0,o.__)("This product does't have any stock to adjust.")).subscribe();e.quantities=s[0],e.adjust_quantity=1,e.adjust_action="",e.adjust_reason="",e.adjust_unit="",e.adjust_value=0,e.procurement_product_id=0,t.products.push(e),t.closeSearch(),e.accurate_tracking}))},closeSearch:function(){this.search="",this.suggestions=[]},recalculateProduct:function(e){""!==e.adjust_unit&&(["deleted","defective","lost"].includes(e.adjust_action)?e.adjust_value=-e.adjust_quantity*e.adjust_unit.sale_price:e.adjust_value=e.adjust_quantity*e.adjust_unit.sale_price),this.$forceUpdate()},openQuantityPopup:function(e){var t=this;e.quantity;new Promise((function(t,s){De.G.show(Ee.Z,{resolve:t,reject:s,quantity:e.adjust_quantity})})).then((function(s){if(!["added"].includes(e.adjust_action)){if(void 0!==e.accurate_tracking&&s.quantity>e.available_quantity)return a.kX.error((0,o.__)("The specified quantity exceed the available quantity.")).subscribe();if(s.quantity>e.adjust_unit.quantity)return a.kX.error((0,o.__)("The specified quantity exceed the available quantity.")).subscribe()}e.adjust_quantity=s.quantity,t.recalculateProduct(e)}))},proceedStockAdjustment:function(){var e=this;if(0===this.products.length)return a.kX.error((0,o.__)("Unable to proceed as the table is empty.")).subscribe();De.G.show(A.Z,{title:(0,o.__)("Confirm Your Action"),message:(0,o.__)("The stock adjustment is about to be made. Would you like to confirm ?"),onAction:function(t){t&&a.ih.post("/api/nexopos/v4/products/adjustments",{products:e.products}).subscribe((function(t){a.kX.success(t.message).subscribe(),e.products=[]}),(function(e){a.kX.error(e.message).subscribe()}))}})},provideReason:function(e){new Promise((function(t,s){De.G.show(Te.Z,{title:(0,o.__)("More Details"),resolve:t,reject:s,message:(0,o.__)("Useful to describe better what are the reasons that leaded to this adjustment."),input:e.adjust_reason,onAction:function(t){!1!==t&&(e.adjust_reason=t)}})})).then((function(e){a.kX.success((0,o.__)("The reason has been updated.")).susbcribe()})).catch((function(e){}))},removeProduct:function(e){var t=this;De.G.show(A.Z,{title:(0,o.__)("Confirm Your Action"),message:(0,o.__)("Would you like to remove this product from the table ?"),onAction:function(s){if(s){var r=t.products.indexOf(e);t.products.splice(r,1)}}})}},watch:{search:function(){var e=this;this.search.length>0?(clearTimeout(this.timeout),this.timeout=setTimeout((function(){e.searchProduct(e.search)}),500)):this.closeSearch()}}};const Ae=(0,f.Z)(Fe,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[s("div",{staticClass:"input-field flex border-2 border-blue-400 rounded"},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.search,expression:"search"}],staticClass:"p-2 bg-white flex-auto outline-none",attrs:{type:"text"},domProps:{value:e.search},on:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"esc",27,t.key,["Esc","Escape"])?null:e.closeSearch()},input:function(t){t.target.composing||(e.search=t.target.value)}}}),e._v(" "),s("button",{staticClass:"px-3 py-2 bg-blue-400 text-white"},[e._v(e._s(e.__("Search")))])]),e._v(" "),e.suggestions.length>0?s("div",{staticClass:"h-0"},[s("div",{staticClass:"shadow h-96 relative z-10 bg-white text-gray-700 zoom-in-entrance anim-duration-300 overflow-y-auto"},[s("ul",e._l(e.suggestions,(function(t){return s("li",{key:t.id,staticClass:"cursor-pointer hover:bg-gray-100 border-b border-gray-200 p-2 flex justify-between",on:{click:function(s){return e.addSuggestion(t)}}},[s("span",[e._v(e._s(t.name))])])})),0)])]):e._e(),e._v(" "),s("div",{staticClass:"table shadow bg-white my-2 w-full "},[s("table",{staticClass:"table w-full"},[s("thead",{staticClass:"border-b border-gray-400"},[s("tr",[s("td",{staticClass:"p-2 text-gray-700"},[e._v(e._s(e.__("Product")))]),e._v(" "),s("td",{staticClass:"p-2 text-center text-gray-700",attrs:{width:"120"}},[e._v(e._s(e.__("Unit")))]),e._v(" "),s("td",{staticClass:"p-2 text-center text-gray-700",attrs:{width:"120"}},[e._v(e._s(e.__("Operation")))]),e._v(" "),s("td",{staticClass:"p-2 text-center text-gray-700",attrs:{width:"120"}},[e._v(e._s(e.__("Procurement")))]),e._v(" "),s("td",{staticClass:"p-2 text-center text-gray-700",attrs:{width:"120"}},[e._v(e._s(e.__("Quantity")))]),e._v(" "),s("td",{staticClass:"p-2 text-center text-gray-700",attrs:{width:"120"}},[e._v(e._s(e.__("Value")))]),e._v(" "),s("td",{staticClass:"p-2 text-center text-gray-700",attrs:{width:"150"}},[e._v(e._s(e.__("Actions")))])])]),e._v(" "),s("tbody",[0===e.products.length?s("tr",[s("td",{staticClass:"p-2 text-center text-gray-700",attrs:{colspan:"6"}},[e._v(e._s(e.__("Search and add some products")))])]):e._e(),e._v(" "),e._l(e.products,(function(t){return s("tr",{key:t.id},[s("td",{staticClass:"p-2 text-gray-600"},[e._v(e._s(t.name)+" ("+e._s((1===t.accurate_tracking?t.available_quantity:t.adjust_unit.quantity)||0)+")")]),e._v(" "),s("td",{staticClass:"p-2 text-gray-600"},[s("select",{directives:[{name:"model",rawName:"v-model",value:t.adjust_unit,expression:"product.adjust_unit"}],staticClass:"outline-none p-2 bg-white w-full border-2 border-blue-400",on:{change:[function(s){var r=Array.prototype.filter.call(s.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(t,"adjust_unit",s.target.multiple?r:r[0])},function(s){return e.recalculateProduct(t)}]}},e._l(t.quantities,(function(t){return s("option",{key:t.id,domProps:{value:t}},[e._v(e._s(t.unit.name))])})),0)]),e._v(" "),s("td",{staticClass:"p-2 text-gray-600"},[s("select",{directives:[{name:"model",rawName:"v-model",value:t.adjust_action,expression:"product.adjust_action"}],staticClass:"outline-none p-2 bg-white w-full border-2 border-blue-400",attrs:{name:"",id:""},on:{change:[function(s){var r=Array.prototype.filter.call(s.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(t,"adjust_action",s.target.multiple?r:r[0])},function(s){return e.recalculateProduct(t)}]}},e._l(e.actions,(function(t){return s("option",{key:t.value,domProps:{value:t.value}},[e._v(e._s(t.label))])})),0)]),e._v(" "),s("td",{staticClass:"p-2 text-gray-600"},[1===t.accurate_tracking?s("select",{directives:[{name:"model",rawName:"v-model",value:t.procurement_product_id,expression:"product.procurement_product_id"}],staticClass:"outline-none p-2 bg-white w-full border-2 border-blue-400",attrs:{name:"",id:""},on:{change:[function(s){var r=Array.prototype.filter.call(s.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(t,"procurement_product_id",s.target.multiple?r:r[0])},function(s){return e.recalculateProduct(t)}]}},e._l(t.procurement_history,(function(t){return s("option",{key:t.value,domProps:{value:t.value}},[e._v(e._s(t.label))])})),0):e._e()]),e._v(" "),s("td",{staticClass:"p-2 text-gray-600 flex items-center justify-center cursor-pointer",on:{click:function(s){return e.openQuantityPopup(t)}}},[s("span",{staticClass:"border-b border-dashed border-blue-400 py-2 px-4"},[e._v(e._s(t.adjust_quantity))])]),e._v(" "),s("td",{staticClass:"p-2 text-gray-600"},[s("span",{staticClass:"border-b border-dashed border-blue-400 py-2 px-4"},[e._v(e._s(e._f("currency")(t.adjust_value)))])]),e._v(" "),s("td",{staticClass:"p-2 text-gray-600"},[s("div",{staticClass:"-mx-1 flex justify-end"},[s("div",{staticClass:"px-1"},[s("button",{staticClass:"bg-blue-400 text-white outline-none rounded-full shadow h-10 w-10",on:{click:function(s){return e.provideReason(t)}}},[s("i",{staticClass:"las la-comment-dots"})])]),e._v(" "),s("div",{staticClass:"px-1"},[s("button",{staticClass:"bg-red-400 text-white outline-none rounded-full shadow h-10 w-10",on:{click:function(s){return e.removeProduct(t)}}},[s("i",{staticClass:"las la-times"})])])])])])}))],2)]),e._v(" "),s("div",{staticClass:"border-t border-gray-200 p-2 flex justify-end"},[s("ns-button",{attrs:{type:"info"},on:{click:function(t){return e.proceedStockAdjustment()}}},[e._v(e._s(e.__("Proceed")))])],1)])])}),[],!1,null,null,null).exports;const Ve={props:["order","billing","shipping"],methods:{__:o.__,printTable:function(){this.$htmlToPaper("invoice-container")}}};const qe=(0,f.Z)(Ve,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"shadow bg-white"},[s("div",{staticClass:"head p-2 bg-gray-100 flex justify-between border-b border-gray-300"},[s("div",{staticClass:"-mx-2 flex flex-wrap"},[s("div",{staticClass:"px-2"},[s("ns-button",{attrs:{type:"info"},on:{click:function(t){return e.printTable()}}},[s("i",{staticClass:"las la-print"}),e._v(" "),s("span",[e._v(e._s(e.__("Print")))])])],1)])]),e._v(" "),s("div",{staticClass:"body flex flex-col px-2",attrs:{id:"invoice-container"}},[s("div",{staticClass:"flex -mx-2 flex-wrap",attrs:{id:"invoice-header"}},[s("div",{staticClass:"w-full print:w-1/3 md:w-1/3 px-2"},[s("div",{staticClass:"p-2"},[s("h3",{staticClass:"font-semibold text-xl text-gray-700 border-b border-blue-400 py-2"},[e._v(e._s(e.__("Store Details")))]),e._v(" "),s("div",{staticClass:"details"},[s("ul",{staticClass:"my-1"},[s("li",{staticClass:"flex justify-between text-gray-600 text-sm mb-1"},[s("span",{staticClass:"font-semibold"},[e._v(e._s(e.__("Order Code")))]),e._v(" "),s("span",[e._v(e._s(e.order.code))])]),e._v(" "),s("li",{staticClass:"flex justify-between text-gray-600 text-sm mb-1"},[s("span",{staticClass:"font-semibold"},[e._v(e._s(e.__("Cashier")))]),e._v(" "),s("span",[e._v(e._s(e.order.user.username))])]),e._v(" "),s("li",{staticClass:"flex justify-between text-gray-600 text-sm mb-1"},[s("span",{staticClass:"font-semibold"},[e._v(e._s(e.__("Date")))]),e._v(" "),s("span",[e._v(e._s(e.order.created_at))])]),e._v(" "),s("li",{staticClass:"flex justify-between text-gray-600 text-sm mb-1"},[s("span",{staticClass:"font-semibold"},[e._v(e._s(e.__("Customer")))]),e._v(" "),s("span",[e._v(e._s(e.order.customer.name))])]),e._v(" "),s("li",{staticClass:"flex justify-between text-gray-600 text-sm mb-1"},[s("span",{staticClass:"font-semibold"},[e._v(e._s(e.__("Type")))]),e._v(" "),s("span",[e._v(e._s(e.order.type))])]),e._v(" "),s("li",{staticClass:"flex justify-between text-gray-600 text-sm mb-1"},[s("span",{staticClass:"font-semibold"},[e._v(e._s(e.__("Payment Status")))]),e._v(" "),s("span",[e._v(e._s(e.order.payment_status))])]),e._v(" "),"delivery"===e.order.type?s("li",{staticClass:"flex justify-between text-gray-600 text-sm mb-1"},[s("span",{staticClass:"font-semibold"},[e._v(e._s(e.__("Delivery Status")))]),e._v(" "),s("span",[e._v(e._s(e.order.delivery_status))])]):e._e()])])])]),e._v(" "),s("div",{staticClass:"w-full print:w-1/3 md:w-1/3 px-2"},[s("div",{staticClass:"p-2"},[s("h3",{staticClass:"font-semibold text-xl text-gray-700 border-b border-blue-400 py-2"},[e._v(e._s(e.__("Billing Details")))]),e._v(" "),s("div",{staticClass:"details"},[s("ul",{staticClass:"my-1"},e._l(e.billing,(function(t){return s("li",{key:t.id,staticClass:"flex justify-between text-gray-600 text-sm mb-1"},[s("span",{staticClass:"font-semibold"},[e._v(e._s(t.label))]),e._v(" "),s("span",[e._v(e._s(e.order.billing_address[t.name]||"N/A"))])])})),0)])])]),e._v(" "),s("div",{staticClass:"w-full print:w-1/3 md:w-1/3 px-2"},[s("div",{staticClass:"p-2"},[s("h3",{staticClass:"font-semibold text-xl text-gray-700 border-b border-blue-400 py-2"},[e._v(e._s(e.__("Shipping Details")))]),e._v(" "),s("div",{staticClass:"details"},[s("ul",{staticClass:"my-1"},e._l(e.shipping,(function(t){return s("li",{key:t.id,staticClass:"flex justify-between text-gray-600 text-sm mb-1"},[s("span",{staticClass:"font-semibold"},[e._v(e._s(t.label))]),e._v(" "),s("span",[e._v(e._s(e.order.shipping_address[t.name]||"N/A"))])])})),0)])])])]),e._v(" "),s("div",{staticClass:"table w-full my-4"},[s("table",{staticClass:"table w-full"},[s("thead",{staticClass:"text-gray-600 bg-gray-100"},[s("tr",[s("th",{staticClass:"p-2 border border-gray-200",attrs:{width:"400"}},[e._v(e._s(e.__("Product")))]),e._v(" "),s("th",{staticClass:"p-2 border border-gray-200",attrs:{width:"200"}},[e._v(e._s(e.__("Unit Price")))]),e._v(" "),s("th",{staticClass:"p-2 border border-gray-200",attrs:{width:"200"}},[e._v(e._s(e.__("Quantity")))]),e._v(" "),s("th",{staticClass:"p-2 border border-gray-200",attrs:{width:"200"}},[e._v(e._s(e.__("Discount")))]),e._v(" "),s("th",{staticClass:"p-2 border border-gray-200",attrs:{width:"200"}},[e._v(e._s(e.__("Tax")))]),e._v(" "),s("th",{staticClass:"p-2 border border-gray-200",attrs:{width:"200"}},[e._v(e._s(e.__("Total Price")))])])]),e._v(" "),s("tbody",e._l(e.order.products,(function(t){return s("tr",{key:t.id},[s("td",{staticClass:"p-2 border border-gray-200"},[s("h3",{staticClass:"text-gray-700"},[e._v(e._s(t.name))]),e._v(" "),s("span",{staticClass:"text-sm text-gray-600"},[e._v(e._s(t.unit))])]),e._v(" "),s("td",{staticClass:"p-2 border border-gray-200 text-center text-gray-700"},[e._v(e._s(e._f("currency")(t.unit_price)))]),e._v(" "),s("td",{staticClass:"p-2 border border-gray-200 text-center text-gray-700"},[e._v(e._s(t.quantity))]),e._v(" "),s("td",{staticClass:"p-2 border border-gray-200 text-center text-gray-700"},[e._v(e._s(e._f("currency")(t.discount)))]),e._v(" "),s("td",{staticClass:"p-2 border border-gray-200 text-center text-gray-700"},[e._v(e._s(e._f("currency")(t.tax_value)))]),e._v(" "),s("td",{staticClass:"p-2 border border-gray-200 text-right text-gray-700"},[e._v(e._s(e._f("currency")(t.total_price)))])])})),0),e._v(" "),s("tfoot",{staticClass:"font-semibold bg-gray-100"},[s("tr",[s("td",{staticClass:"p-2 border border-gray-200 text-center text-gray-700",attrs:{colspan:"2"}},[["unpaid","partially_paid"].includes(e.order.payment_status)?s("div",{staticClass:"flex justify-between"},[s("span",[e._v("\n "+e._s(e.__("Expiration Date"))+"\n ")]),e._v(" "),s("span",[e._v(e._s(e.order.final_payment_date))])]):e._e()]),e._v(" "),s("td",{staticClass:"p-2 border border-gray-200 text-center text-gray-700",attrs:{colspan:"2"}}),e._v(" "),s("td",{staticClass:"p-2 border border-gray-200 text-gray-700 text-left"},[e._v(e._s(e.__("Sub Total")))]),e._v(" "),s("td",{staticClass:"p-2 border border-gray-200 text-right text-gray-700"},[e._v(e._s(e._f("currency")(e.order.subtotal)))])]),e._v(" "),e.order.discount>0?s("tr",[s("td",{staticClass:"p-2 border border-gray-200 text-center text-gray-700",attrs:{colspan:"4"}}),e._v(" "),s("td",{staticClass:"p-2 border border-gray-200 text-gray-700 text-left"},[e._v(e._s(e.__("Discount")))]),e._v(" "),s("td",{staticClass:"p-2 border border-gray-200 text-right text-gray-700"},[e._v(e._s(e._f("currency")(-e.order.discount)))])]):e._e(),e._v(" "),e.order.total_coupons>0?s("tr",[s("td",{staticClass:"p-2 border border-gray-200 text-center text-gray-700",attrs:{colspan:"4"}}),e._v(" "),s("td",{staticClass:"p-2 border border-gray-200 text-left text-gray-700"},[e._v(e._s(e.__("Coupons")))]),e._v(" "),s("td",{staticClass:"p-2 border border-gray-200 text-right text-gray-700"},[e._v(e._s(e._f("currency")(-e.order.total_coupons)))])]):e._e(),e._v(" "),e.order.shipping>0?s("tr",[s("td",{staticClass:"p-2 border border-gray-200 text-center text-gray-700",attrs:{colspan:"4"}}),e._v(" "),s("td",{staticClass:"p-2 border border-gray-200 text-gray-700 text-left"},[e._v(e._s(e.__("Shipping")))]),e._v(" "),s("td",{staticClass:"p-2 border border-gray-200 text-right text-gray-700"},[e._v(e._s(e._f("currency")(e.order.shipping)))])]):e._e(),e._v(" "),s("tr",[s("td",{staticClass:"p-2 border border-gray-200 text-center text-gray-700",attrs:{colspan:"4"}}),e._v(" "),s("td",{staticClass:"p-2 border border-gray-200 text-gray-700 text-left"},[e._v(e._s(e.__("Total")))]),e._v(" "),s("td",{staticClass:"p-2 border border-gray-200 text-right text-gray-700"},[e._v(e._s(e._f("currency")(e.order.total)))])]),e._v(" "),s("tr",[s("td",{staticClass:"p-2 border border-gray-200 text-center text-gray-700",attrs:{colspan:"4"}}),e._v(" "),s("td",{staticClass:"p-2 border border-gray-200 text-gray-700 text-left"},[e._v(e._s(e.__("Paid")))]),e._v(" "),s("td",{staticClass:"p-2 border border-gray-200 text-right text-gray-700"},[e._v(e._s(e._f("currency")(e.order.tendered)))])]),e._v(" "),["partially_paid","unpaid"].includes(e.order.payment_status)?s("tr",{staticClass:"bg-red-200 border-red-300"},[s("td",{staticClass:"p-2 border border-red-200 text-center text-red-700",attrs:{colspan:"4"}}),e._v(" "),s("td",{staticClass:"p-2 border border-red-200 text-red-700 text-left"},[e._v(e._s(e.__("Due")))]),e._v(" "),s("td",{staticClass:"p-2 border border-red-200 text-right text-red-700"},[e._v(e._s(e._f("currency")(e.order.change)))])]):s("tr",[s("td",{staticClass:"p-2 border border-gray-200 text-center text-gray-700",attrs:{colspan:"4"}}),e._v(" "),s("td",{staticClass:"p-2 border border-gray-200 text-gray-700 text-left"},[e._v(e._s(e.__("Change")))]),e._v(" "),s("td",{staticClass:"p-2 border border-gray-200 text-right text-gray-700"},[e._v(e._s(e._f("currency")(e.order.change)))])])])])])])])}),[],!1,null,null,null).exports;var Ne=s(2329),Me=s(1957),Ue=s(7166),Re=s.n(Ue),Xe=s(5675),Ze=s.n(Xe),Le=window.nsState,ze=window.nsScreen,Ie=window.nsExtraComponents;r.default.use(Ze(),{name:"_blank",specs:["fullscreen=yes","titlebar=yes","scrollbars=yes"],styles:["/css/app.css"]});var We=r.default.component("vue-apex-charts",Re()),Ye=Object.assign(Object.assign({NsModules:O,NsRewardsSystem:p,NsCreateCoupons:b,NsManageProducts:U,NsSettings:g,NsReset:y,NsPermissions:F,NsProcurement:B,NsProcurementInvoice:G,NsMedia:J.Z,NsDashboardCards:ge,NsCashierDashboard:Oe,NsBestCustomers:ye,NsBestCashiers:Ce,NsOrdersSummary:je,NsOrdersChart:Se,NsNotifications:K,NsSaleReport:ie,NsSoldStockReport:ae,NsProfitReport:le,NsCashFlowReport:de,NsYearlyReport:fe,NsPaymentTypesReport:be,NsBestProductsReport:me,NsStockAdjustment:Ae,NsPromptPopup:Te.Z,NsAlertPopup:Ne.Z,NsConfirmPopup:A.Z,NsPOSLoadingPopup:Me.Z,NsOrderInvoice:qe,VueApexCharts:We},i),Ie),Be=new r.default({el:"#dashboard-aside",data:{sidebar:"visible"},components:Ye,mounted:function(){var e=this;Le.behaviorState.subscribe((function(t){var s=t.object;e.sidebar=s.sidebar}))}});window.nsDashboardAside=Be,window.nsDashboardOverlay=new r.default({el:"#dashboard-overlay",data:{sidebar:null},components:Ye,mounted:function(){var e=this;Le.behaviorState.subscribe((function(t){var s=t.object;e.sidebar=s.sidebar}))},methods:{closeMenu:function(){Le.setState({sidebar:"hidden"===this.sidebar?"visible":"hidden"})}}}),window.nsDashboardHeader=new r.default({el:"#dashboard-header",data:{menuToggled:!1,sidebar:"visible"},components:Ye,methods:{toggleMenu:function(){this.menuToggled=!this.menuToggled},toggleSideMenu:function(){["lg","xl"].includes(ze.breakpoint),Le.setState({sidebar:"hidden"===this.sidebar?"visible":"hidden"})}},mounted:function(){var e=this;Le.behaviorState.subscribe((function(t){var s=t.object;e.sidebar=s.sidebar}))}}),window.nsComponents=Object.assign(Ye,i),window.nsDashboardContent=new r.default({el:"#dashboard-content",components:Ye})},162:(e,t,s)=>{"use strict";s.d(t,{l:()=>M,kq:()=>L,ih:()=>U,kX:()=>R});var r=s(6486),i=s(9669),n=s(2181),a=s(8345),o=s(9624),l=s(9248),c=s(230);function d(e,t){for(var s=0;s2&&void 0!==arguments[2]?arguments[2]:{};return this._request("post",e,t,s)}},{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._request("get",e,void 0,t)}},{key:"delete",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._request("delete",e,void 0,t)}},{key:"put",value:function(e,t){var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this._request("put",e,t,s)}},{key:"response",get:function(){return this._lastRequestData}},{key:"_request",value:function(e,t){var s=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return t=L.applyFilters("http-client-url",t.replace(/\/$/,"")),this._subject.next({identifier:"async.start",url:t,data:r}),new c.y((function(n){s._client[e](t,r,Object.assign(Object.assign({},s._client.defaults[e]),i)).then((function(e){s._lastRequestData=e,n.next(e.data),n.complete(),s._subject.next({identifier:"async.stop"})})).catch((function(e){var t;n.error((null===(t=e.response)||void 0===t?void 0:t.data)||e.response||e),s._subject.next({identifier:"async.stop"})}))}))}},{key:"subject",value:function(){return this._subject}},{key:"emit",value:function(e){var t=e.identifier,s=e.value;this._subject.next({identifier:t,value:s})}}])&&d(t.prototype,s),r&&d(t,r),e}(),f=s(3);function p(e,t){for(var s=0;s=1e3){for(var s,r=Math.floor((""+e).length/3),i=2;i>=1;i--){if(((s=parseFloat((0!=r?e/Math.pow(1e3,r):e).toPrecision(i)))+"").replace(/[^a-zA-Z 0-9]+/g,"").length<=2)break}s%1!=0&&(s=s.toFixed(1)),t=s+["","k","m","b","t"][r]}return t})),S=s(1356),P=s(9698);function O(e,t){for(var s=0;s0&&window.outerWidth<=480:this.breakpoint="xs";break;case window.outerWidth>480&&window.outerWidth<=640:this.breakpoint="sm";break;case window.outerWidth>640&&window.outerWidth<=1024:this.breakpoint="md";break;case window.outerWidth>1024&&window.outerWidth<=1280:this.breakpoint="lg";break;case window.outerWidth>1280:this.breakpoint="xl"}}}])&&q(t.prototype,s),r&&q(t,r),e}()),I=new b({sidebar:["xs","sm","md"].includes(z.breakpoint)?"hidden":"visible"});U.defineClient(i),window.nsEvent=M,window.nsHttpClient=U,window.nsSnackBar=R,window.nsCurrency=S.W,window.nsTruncate=P.b,window.nsRawCurrency=S.f,window.nsAbbreviate=$,window.nsState=I,window.nsUrl=X,window.nsScreen=z,window.ChartJS=n,window.EventEmitter=m,window.Popup=y.G,window.RxJS=g,window.FormValidation=C.Z,window.nsCrudHandler=Z},4364:(e,t,s)=>{"use strict";s.r(t),s.d(t,{nsAvatar:()=>Z,nsButton:()=>o,nsCheckbox:()=>p,nsCkeditor:()=>A,nsCloseButton:()=>P,nsCrud:()=>v,nsCrudForm:()=>x,nsDate:()=>j,nsDateTimePicker:()=>N.V,nsDatepicker:()=>L,nsField:()=>w,nsIconButton:()=>O,nsInput:()=>c,nsLink:()=>l,nsMediaInput:()=>S,nsMenu:()=>n,nsMultiselect:()=>C,nsNumpad:()=>M.Z,nsSelect:()=>d.R,nsSelectAudio:()=>f,nsSpinner:()=>_,nsSubmenu:()=>a,nsSwitch:()=>k,nsTableRow:()=>b,nsTabs:()=>V,nsTabsItem:()=>q,nsTextarea:()=>y});var r=s(538),i=s(162),n=r.default.component("ns-menu",{data:function(){return{defaultToggledState:!1,_save:0}},props:["href","label","icon","notification","toggled","identifier"],template:'\n \n ',mounted:function(){var e=this;this.defaultToggledState=void 0!==this.toggled?this.toggled:this.defaultToggledState,i.l.subject().subscribe((function(t){t.value!==e.identifier&&(e.defaultToggledState=!1)}))},methods:{toggleEmit:function(){var e=this;this.toggle().then((function(t){t&&i.l.emit({identifier:"side-menu.open",value:e.identifier})}))},toggle:function(){var e=this;return new Promise((function(t,s){0===e.href.length&&(e.defaultToggledState=!e.defaultToggledState,t(e.defaultToggledState))}))}}}),a=r.default.component("ns-submenu",{data:function(){return{}},props:["href","label","active"],mounted:function(){},template:'\n
    \n
  • \n \n \n \n
  • \n
    \n '}),o=r.default.component("ns-button",{data:function(){return{clicked:!1,_save:0}},props:["type","disabled","link","href","routerLink","to"],template:'\n
    \n \n \n \n
    \n ',mounted:function(){},computed:{isDisabled:function(){return this.disabled&&(0===this.disabled.length||"disabled"===this.disabled||this.disabled)},buttonclass:function(){var e;switch(this.type){case"info":e="".concat(this.isDisabled?"bg-gray-400 border border-gray-500 cursor-not-allowed text-gray-600":"shadow bg-blue-400 text-white");break;case"success":e="".concat(this.isDisabled?"bg-gray-400 border border-gray-500 cursor-not-allowed text-gray-600":"shadow bg-green-400 text-white");break;case"danger":e="".concat(this.isDisabled?"bg-gray-400 border border-gray-500 cursor-not-allowed text-gray-600":"shadow bg-red-400 text-white");break;case"warning":e="".concat(this.isDisabled?"bg-gray-400 border border-gray-500 cursor-not-allowed text-gray-600":"shadow bg-orange-400 text-white");break;default:e="".concat(this.isDisabled?"bg-gray-400 border border-gray-500 cursor-not-allowed text-gray-600":"shadow bg-white text-gray-800")}return e}}}),l=r.default.component("ns-link",{data:function(){return{clicked:!1,_save:0}},props:["type","to","href"],template:'\n
    \n \n \n
    \n ',computed:{buttonclass:function(){switch(this.type){case"info":return"shadow bg-blue-400 text-white";case"success":return"shadow bg-green-400 text-white";case"danger":return"shadow bg-red-400 text-white";case"warning":return"shadow bg-orange-400 text-white";default:return"shadow bg-white text-gray-800"}}}}),c=r.default.component("ns-input",{data:function(){return{}},mounted:function(){},computed:{hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},disabledClass:function(){return this.field.disabled?"bg-gray-200 cursor-not-allowed":"bg-transparent"},inputClass:function(){return this.disabledClass+" "+this.leadClass},leadClass:function(){return this.leading?"pl-8":"px-4"}},props:["placeholder","leading","type","field"],template:'\n
    \n \n
    \n
    \n \n {{ leading }}\n \n
    \n \n
    \n

    \n

    \n This field is required.\n This field must contain a valid email address.\n {{ error.message }}\n

    \n
    \n '}),d=s(4451),u=s(7389),f=r.default.component("ns-select-audio",{data:function(){return{}},props:["name","placeholder","field"],computed:{hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},disabledClass:function(){return this.field.disabled?"bg-gray-200 cursor-not-allowed":"bg-transparent"},inputClass:function(){return this.disabledClass+" "+this.leadClass},leadClass:function(){return this.leading?"pl-8":"px-4"}},methods:{__:u.__,playSelectedSound:function(){this.field.value.length>0&&new Audio(this.field.value).play()}},template:'\n
    \n \n
    \n
    \n \n
    \n \n
    \n

    \n

    \n {{ __( \'This field is required.\' ) }}\n {{ __( \'This field must contain a valid email address.\' ) }}\n {{ error.message }}\n

    \n
    \n '}),p=r.default.component("ns-checkbox",{data:function(){return{}},props:["checked","field","label"],template:'\n
    \n
    \n \n
    \n {{ label }}\n {{ field.label }}\n
    \n ',computed:{isChecked:function(){return this.field?this.field.value:this.checked}},methods:{toggleIt:function(){void 0!==this.field&&(this.field.value=!this.field.value),this.$emit("change",!this.checked)}}}),m=s(2242),h=s(419),v=r.default.component("ns-crud",{data:function(){return{isRefreshing:!1,sortColumn:"",searchInput:"",searchQuery:"",page:1,bulkAction:"",bulkActions:[],columns:[],selectedEntries:[],globallyChecked:!1,result:{current_page:null,data:[],first_page_url:null,from:null,last_page:null,last_page_url:null,next_page_url:null,path:null,per_page:null,prev_page_url:null,to:null,total:null}}},mounted:function(){void 0!==this.identifier&&nsCrudHandler.defineInstance(this.identifier,this),this.loadConfig()},props:["src","create-url","mode","identifier","queryParams"],computed:{getParsedSrc:function(){return"".concat(this.src,"?").concat(this.sortColumn).concat(this.searchQuery).concat(this.queryPage).concat(this.getQueryParams()?"&"+this.getQueryParams():"")},getSelectedAction:function(){var e=this,t=this.bulkActions.filter((function(t){return t.identifier===e.bulkAction}));return t.length>0&&t[0]},pagination:function(){return this.result?this.pageNumbers(this.result.last_page,this.result.current_page):[]},queryPage:function(){return this.result?"&page=".concat(this.page):""},resultInfo:function(){return(0,u.__)("displaying {perPage} on {items} items").replace("{perPage}",this.result.total).replace("{items}",this.result.total)}},methods:{__:u.__,getQueryParams:function(){var e=this;return this.queryParams?Object.keys(this.queryParams).map((function(t){return"".concat(t,"=").concat(e.queryParams[t])})).join("&"):""},pageNumbers:function(e,t){var s=[];return t>e-3?s.push(e-2,e-1,e):s.push(t,t+1,t+2,"...",e),s.filter((function(e){return e>0||"string"==typeof e}))},downloadContent:function(){i.ih.post("".concat(this.src,"/export?").concat(this.getQueryParams()),{entries:this.selectedEntries.map((function(e){return e.$id}))}).subscribe((function(e){setTimeout((function(){return document.location=e.url}),300),i.kX.success((0,u.__)("The document has been generated.")).subscribe()}),(function(e){i.kX.error(e.message||(0,u.__)("Unexpected error occured.")).subscribe()}))},clearSelectedEntries:function(){var e=this;m.G.show(h.Z,{title:(0,u.__)("Clear Selected Entries ?"),message:(0,u.__)("Would you like to clear all selected entries ?"),onAction:function(t){t&&(e.selectedEntries=[])}})},refreshRow:function(e){if(!0===e.$checked){0===this.selectedEntries.filter((function(t){return t.$id===e.$id})).length&&this.selectedEntries.push(e)}else{var t=this.selectedEntries.filter((function(t){return t.$id===e.$id}));if(t.length>0){var s=this.selectedEntries.indexOf(t[0]);this.selectedEntries.splice(s,1)}}},handleShowOptions:function(e){this.result.data.forEach((function(t){t.$id!==e.$id&&(t.$toggled=!1)}))},handleGlobalChange:function(e){var t=this;this.globallyChecked=e,this.result.data.forEach((function(s){s.$checked=e,t.refreshRow(s)}))},loadConfig:function(){var e=this;i.ih.get("".concat(this.src,"/config?").concat(this.getQueryParams())).subscribe((function(t){e.columns=t.columns,e.bulkActions=t.bulkActions,e.refresh()}),(function(e){i.kX.error(e.message,"OK",{duration:!1}).subscribe()}))},cancelSearch:function(){this.searchInput="",this.search()},search:function(){this.searchInput?this.searchQuery="&search=".concat(this.searchInput):this.searchQuery="",this.refresh()},sort:function(e){for(var t in this.columns)t!==e&&(this.columns[t].$sorted=!1,this.columns[t].$direction="");switch(this.columns[e].$sorted=!0,this.columns[e].$direction){case"asc":this.columns[e].$direction="desc";break;case"desc":this.columns[e].$direction="";break;case"":this.columns[e].$direction="asc"}["asc","desc"].includes(this.columns[e].$direction)?this.sortColumn="active=".concat(e,"&direction=").concat(this.columns[e].$direction):this.sortColumn="",this.$emit("sort",this.columns[e]),this.refresh()},bulkDo:function(){var e=this;return this.bulkAction?this.selectedEntries.length>0?confirm(this.getSelectedAction.confirm||this.$slots["error-bulk-confirmation"]||(0,u.__)("Would you like to perform the selected bulk action on the selected entries ?"))?i.ih.post("".concat(this.src,"/bulk-actions"),{action:this.bulkAction,entries:this.selectedEntries.map((function(e){return e.$id}))}).subscribe({next:function(t){i.kX.info(t.message).subscribe(),e.selectedEntries=[],e.refresh()},error:function(e){i.kX.error(e.message).subscribe()}}):void 0:i.kX.error(this.$slots["error-no-selection"]?this.$slots["error-no-selection"][0].text:(0,u.__)("No selection has been made.")).subscribe():i.kX.error(this.$slots["error-no-action"]?this.$slots["error-no-action"][0].text:(0,u.__)("No action has been selected.")).subscribe()},refresh:function(){var e=this;this.globallyChecked=!1,this.isRefreshing=!0,i.ih.get("".concat(this.getParsedSrc)).subscribe((function(t){t.data=t.data.map((function(t){return e.selectedEntries.filter((function(e){return e.$id===t.$id})).length>0&&(t.$checked=!0),t})),e.isRefreshing=!1,e.result=t,e.page=t.current_page}),(function(t){e.isRefreshing=!1,i.kX.error(t.message).subscribe()}))}},template:'\n
    \n
    \n \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \n \n
    \n {{ column.label }}\n \n \n \n \n
    \n
    {{ __( \'There is nothing to display...\' ) }}
    \n
    \n
    \n
    \n
    \n \n \n
    \n
    \n
    {{ resultInfo }}
    \n \n
    \n
    \n
    \n '}),b=r.default.component("ns-table-row",{props:["options","row","columns"],data:function(){return{optionsToggled:!1}},mounted:function(){},methods:{sanitizeHTML:function(e){var t=document.createElement("div");t.innerHTML=e;for(var s=t.getElementsByTagName("script"),r=s.length;r--;)s[r].parentNode.removeChild(s[r]);return t.innerHTML},getElementOffset:function(e){var t=e.getBoundingClientRect();return{top:t.top+window.pageYOffset,left:t.left+window.pageXOffset}},toggleMenu:function(e){var t=this;if(this.row.$toggled=!this.row.$toggled,this.$emit("toggled",this.row),this.row.$toggled)setTimeout((function(){var e=t.$el.querySelectorAll(".relative > .absolute")[0],s=t.$el.querySelectorAll(".relative")[0],r=t.getElementOffset(s);e.style.top=r.top+"px",e.style.left=r.left+"px",s.classList.remove("relative"),s.classList.add("dropdown-holder")}),100);else{var s=this.$el.querySelectorAll(".dropdown-holder")[0];s.classList.remove("dropdown-holder"),s.classList.add("relative")}},handleChanged:function(e){this.row.$checked=e,this.$emit("updated",this.row)},triggerAsync:function(e){var t=this;e.confirm?confirm(e.confirm.message)&&i.ih[e.type.toLowerCase()](e.url).subscribe((function(e){i.kX.success(e.message).subscribe(),t.$emit("reload",t.row)}),(function(e){t.toggleMenu(),i.kX.error(e.message).subscribe()})):(i.l.emit({identifier:"ns-table-row-action",value:{action:e,row:this.row,component:this}}),this.toggleMenu())}},template:'\n \n \n \n \n \n \n \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n \n \n '}),_=r.default.component("ns-spinner",{data:function(){return{}},mounted:function(){},computed:{validatedSize:function(){return this.size||24},validatedBorder:function(){return this.border||8},validatedAnimation:function(){return this.animation||"fast"}},props:["color","size","border"],template:"\n
    \n
    \n
    \n "}),g=s(7266),x=r.default.component("ns-crud-form",{data:function(){return{form:{},globallyChecked:!1,formValidation:new g.Z,rows:[]}},mounted:function(){this.loadForm()},props:["src","create-url","field-class","return-url","submit-url","submit-method","disable-tabs"],computed:{activeTabFields:function(){for(var e in this.form.tabs)if(this.form.tabs[e].active)return this.form.tabs[e].fields;return[]}},methods:{toggle:function(e){for(var t in this.form.tabs)this.form.tabs[t].active=!1;this.form.tabs[e].active=!0},handleShowOptions:function(e){this.rows.forEach((function(t){t.$id!==e.$id&&(t.$toggled=!1)}))},submit:function(){var e=this;return this.formValidation.validateForm(this.form).length>0?i.kX.error(this.$slots["error-invalid-form"]?this.$slots["error-invalid-form"][0].text:"No error message provided for having an invalid form.",this.$slots.okay?this.$slots.okay[0].text:"OK").subscribe():(this.formValidation.disableForm(this.form),void 0===this.submitUrl?i.kX.error(this.$slots["error-no-submit-url"]?this.$slots["error-no-submit-url"][0].text:"No error message provided for not having a valid submit url.",this.$slots.okay?this.$slots.okay[0].text:"OK").subscribe():void i.ih[this.submitMethod?this.submitMethod.toLowerCase():"post"](this.submitUrl,this.formValidation.extractForm(this.form)).subscribe((function(t){if("success"===t.status){if(e.returnUrl&&e.returnUrl.length>0)return document.location=e.returnUrl;e.$emit("save",t)}e.formValidation.enableForm(e.form)}),(function(t){i.kX.error(t.message,void 0,{duration:5e3}).subscribe(),e.formValidation.triggerError(e.form,t),e.formValidation.enableForm(e.form)})))},handleGlobalChange:function(e){this.globallyChecked=e,this.rows.forEach((function(t){return t.$checked=e}))},loadForm:function(){var e=this;i.ih.get("".concat(this.src)).subscribe({next:function(t){e.form=e.parseForm(t.form),i.kq.doAction("ns-crud-form-loaded",e),e.$emit("updated",e.form)},error:function(e){i.kX.error(e.message,"OKAY",{duration:0}).subscribe()}})},parseForm:function(e){e.main.value=void 0===e.main.value?"":e.main.value,e.main=this.formValidation.createFields([e.main])[0];var t=0;for(var s in e.tabs)0===t&&(e.tabs[s].active=!0),e.tabs[s].active=void 0!==e.tabs[s].active&&e.tabs[s].active,e.tabs[s].fields=this.formValidation.createFields(e.tabs[s].fields),t++;return e}},template:'\n
    \n
    \n \n
    \n
    \n
    \n
    \n \n
    \n Return\n
    \n
    \n \n
    \n
    \n
    \n
    {{ tab.label }}
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n '}),y=r.default.component("ns-textarea",{data:function(){return{}},mounted:function(){},computed:{hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},disabledClass:function(){return this.field.disabled?"bg-gray-200 cursor-not-allowed":"bg-transparent"},inputClass:function(){return this.disabledClass+" "+this.leadClass},leadClass:function(){return this.leading?"p-8":"p-2"}},props:["placeholder","leading","type","field"],template:'\n
    \n \n
    \n
    \n \n {{ leading }}\n \n
    \n \n
    \n

    \n

    \n This field is required.\n This field must contain a valid email address.\n {{ error.message }}\n

    \n
    \n '}),w=r.default.component("ns-field",{data:function(){return{}},mounted:function(){},computed:{isInputField:function(){return["text","password","email","number","tel"].includes(this.field.type)},isDateField:function(){return["date"].includes(this.field.type)},isSelectField:function(){return["select"].includes(this.field.type)},isTextarea:function(){return["textarea"].includes(this.field.type)},isCheckbox:function(){return["checkbox"].includes(this.field.type)},isMultiselect:function(){return["multiselect"].includes(this.field.type)},isSelectAudio:function(){return["select-audio"].includes(this.field.type)},isSwitch:function(){return["switch"].includes(this.field.type)},isMedia:function(){return["media"].includes(this.field.type)},isCkEditor:function(){return["ckeditor"].includes(this.field.type)},isDateTimePicker:function(){return["datetimepicker"].includes(this.field.type)},isCustom:function(){return["custom"].includes(this.field.type)}},props:["field"],methods:{addOption:function(e){"select"===this.field.type&&this.field.options.forEach((function(e){return e.selected=!1})),e.selected=!0;var t=this.field.options.indexOf(e);this.field.options.splice(t,1),this.field.options.unshift(e),this.refreshMultiselect(),this.$emit("change",{action:"addOption",option:e})},refreshMultiselect:function(){this.field.value=this.field.options.filter((function(e){return e.selected})).map((function(e){return e.value}))},removeOption:function(e){e.selected=!1,this.refreshMultiselect(),this.$emit("change",{action:"removeOption",option:e})}},template:'\n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n '}),C=r.default.component("ns-multiselect",{data:function(){return{showPanel:!1,search:""}},props:["field"],computed:{hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},_options:function(){var e=this;return this.field.options.map((function(t){return t.selected=void 0!==t.selected&&t.selected,e.field.value&&e.field.value.includes(t.value)&&(t.selected=!0),t}))}},methods:{__:u.__,addOption:function(e){this.field.disabled||(this.$emit("addOption",e),this.$forceUpdate(),setTimeout((function(){}),100))},removeOption:function(e,t){var s=this;if(!this.field.disabled)return t.preventDefault(),t.stopPropagation(),this.$emit("removeOption",e),this.$forceUpdate(),setTimeout((function(){s.search=""}),100),!1}},mounted:function(){var e=this;this.field.value&&this.field.value.reverse().forEach((function(t){var s=e.field.options.filter((function(e){return e.value===t}));s.length>=0&&e.addOption(s[0])}))},template:'\n
    \n \n
    \n
    \n
    \n
    \n
    \n {{ option.label }}\n \n
    \n
    \n
    \n
    \n \n \n
    \n
    \n \n
    \n
    \n

    \n

    \n {{ __( \'This field is required.\' ) }}\n {{ __( \'This field must contain a valid email address.\' ) }}\n {{ error.message }}\n

    \n
    \n
    \n '}),k=r.default.component("ns-switch",{data:function(){return{}},mounted:function(){},computed:{_options:function(){var e=this;return this.field.options.map((function(t){return t.selected=t.value===e.field.value,t}))},hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},disabledClass:function(){return this.field.disabled?"bg-gray-200 cursor-not-allowed":""},sizeClass:function(){return" w-1/".concat(this._options.length<=4?this._options.length:4)},inputClass:function(){return this.disabledClass+" "+this.leadClass},leadClass:function(){return this.leading?"pl-8":"px-4"}},methods:{__:u.__,setSelected:function(e){this.field.value=e.value,this._options.forEach((function(e){return e.selected=!1})),e.selected=!0,this.$forceUpdate(),this.$emit("change",e.value)}},props:["placeholder","leading","type","field"],template:'\n
    \n \n
    \n \n
    \n

    \n

    \n {{ __( \'This field is required.\' ) }}\n

    \n
    \n '}),j=r.default.component("ns-date",{data:function(){return{}},mounted:function(){},computed:{hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},disabledClass:function(){return this.field.disabled?"bg-gray-200 cursor-not-allowed":"bg-transparent"},inputClass:function(){return this.disabledClass+" "+this.leadClass},leadClass:function(){return this.leading?"pl-8":"px-4"}},props:["placeholder","leading","type","field"],template:'\n
    \n \n
    \n
    \n \n {{ leading }}\n \n
    \n \n
    \n

    \n

    \n {{ __( \'This field is required.\' ) }}\n {{ __( \'This field must contain a valid email address.\' ) }}\n {{ error.message }}\n

    \n
    \n '}),$=s(9576),S=r.default.component("ns-media-input",{template:'\n
    \n \n
    \n
    \n \n {{ leading }}\n \n
    \n
    \n
    \n \n
    \n \n \n
    \n
    \n

    \n

    \n {{ __( \'This field is required.\' ) }}\n {{ __( \'This field must contain a valid email address.\' ) }}\n {{ error.message }}\n

    \n
    \n ',computed:{hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},disabledClass:function(){return this.field.disabled?"bg-gray-200 cursor-not-allowed":"bg-transparent"},inputClass:function(){return this.disabledClass+" "+this.leadClass},leadClass:function(){return this.leading?"pl-8":"px-4"}},data:function(){return{}},props:["placeholder","leading","type","field"],mounted:function(){},methods:{toggleMedia:function(){var e=this;new Promise((function(t,s){m.G.show($.Z,Object.assign({resolve:t,reject:s},e.field.data||{}))})).then((function(t){"use-selected"===t.event&&(e.field.data&&"url"!==e.field.data.type?e.field.data&&"model"!==e.field.data.type||(e.field.value=t.value[0]):e.field.value=t.value[0].sizes.original,e.$forceUpdate())}))}}}),P=r.default.component("ns-close-button",{template:'\n \n ',methods:{clicked:function(e){this.$emit("click",e)}}}),O=r.default.component("ns-icon-button",{template:'\n \n ',props:["className","buttonClass"],methods:{clicked:function(e){this.$emit("click",e)}}}),D=s(1272),E=s.n(D),T=s(5234),F=s.n(T),A=r.default.component("ns-ckeditor",{data:function(){return{editor:F()}},components:{ckeditor:E().component},mounted:function(){},methods:{__:u.__},computed:{hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},disabledClass:function(){return this.field.disabled?"bg-gray-200 cursor-not-allowed":"bg-transparent"},inputClass:function(){return this.disabledClass+" "+this.leadClass},leadClass:function(){return this.leading?"p-8":"p-2"}},props:["placeholder","leading","type","field"],template:'\n
    \n \n
    \n
    \n \n {{ leading }}\n \n
    \n \n
    \n

    \n

    \n {{ __( \'This field is required.\' ) }}\n {{ __( \'This field must contain a valid email address.\' ) }}\n {{ error.message }}\n

    \n
    \n '}),V=r.default.component("ns-tabs",{data:function(){return{childrens:[]}},props:["active"],computed:{activeComponent:function(){var e=this.$children.filter((function(e){return e.active}));return e.length>0&&e[0]}},methods:{toggle:function(e){this.$emit("active",e.identifier),this.$emit("changeTab",e.identifier)}},mounted:function(){this.childrens=this.$children},template:'\n
    \n
    \n
    {{ tab.label }}
    \n
    \n \n
    \n '}),q=r.default.component("ns-tabs-item",{data:function(){return{}},mounted:function(){},props:["label","identifier","padding"],template:'\n
    \n \n
    \n '}),N=s(8655),M=s(3968),U=s(1726),R=s(7259);const X=r.default.extend({methods:{__:u.__},data:function(){return{svg:""}},mounted:function(){this.svg=(0,U.createAvatar)(R,{seed:this.displayName})},computed:{avatarUrl:function(){return 0===this.url.length?"":this.url}},props:["url","display-name"]});const Z=(0,s(1900).Z)(X,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"flex justify-between items-center flex-shrink-0"},[s("span",{staticClass:"hidden md:inline-block text-gray-600 px-2"},[e._v(e._s(e.__("Howdy, {name}").replace("{name}",this.displayName)))]),e._v(" "),s("span",{staticClass:"md:hidden text-gray-600 px-2"},[e._v(e._s(e.displayName))]),e._v(" "),s("div",{staticClass:"px-2"},[s("div",{staticClass:"w-8 h-8 overflow-hidden rounded-full bg-gray-600"},[""!==e.avatarUrl?s("img",{staticClass:"w-8 h-8 overflow-hidden rounded-full",attrs:{src:e.avatarUrl,alt:e.displayName,srcset:""}}):e._e(),e._v(" "),""===e.avatarUrl?s("div",{domProps:{innerHTML:e._s(e.svg)}}):e._e()])])])}),[],!1,null,null,null).exports;var L=s(6598).Z},8655:(e,t,s)=>{"use strict";s.d(t,{V:()=>o});var r=s(538),i=s(381),n=s.n(i),a=s(7389),o=r.default.component("ns-date-time-picker",{template:'\n
    \n \n
    \n \n \n {{ currentDay.format( \'YYYY/MM/DD HH:mm\' ) }}\n N/A\n \n
    \n

    {{ field.description }}

    \n \n
    \n ',props:["field","date"],data:function(){return{visible:!1,hours:0,minutes:0,currentDay:null,daysOfWeek:new Array(7).fill("").map((function(e,t){return t})),calendar:[[]]}},watch:{visible:function(){var e=this;this.visible&&setTimeout((function(){e.$refs.hours.addEventListener("focus",(function(){this.select()})),e.$refs.minutes.addEventListener("focus",(function(){this.select()}))}),100)}},mounted:function(){var e=this;document.addEventListener("mousedown",(function(t){return e.checkClickedItem(t)})),this.field?this.currentDay=[void 0,null,""].includes(this.field.value)?n()():n()(this.field.value):this.currentDay=[void 0,null,""].includes(this.date)?n()():n()(this.date),this.hours=this.currentDay.format("HH"),this.minutes=this.currentDay.format("mm"),this.build()},methods:{__:a.__,detectHoursChange:function(){parseFloat(this.hours)<0&&(this.hours=0),parseFloat(this.hours)>23&&(this.hours=23),this.updateDateTime()},detectMinuteChange:function(){parseFloat(this.minutes)<0&&(this.minutes=0),parseFloat(this.minutes)>59&&(this.minutes=59),this.updateDateTime()},updateDateTime:function(){this.currentDay.hours(this.hours),this.currentDay.minutes(this.minutes),this.selectDate(this.currentDay)},checkClickedItem:function(e){!this.$el.contains(e.srcElement)&&this.visible&&(this.visible=!1)},selectDate:function(e){this.currentDay=e,this.currentDay.hours(this.hours),this.currentDay.minutes(this.minutes);var t=this.currentDay.format("YYYY/MM/DD HH:mm");this.field?(this.field.value=t,this.$emit("change",this.field)):this.$emit("change",this.currentDay)},subMonth:function(){this.currentDay.subtract(1,"month"),this.build()},addMonth:function(){this.currentDay.add(1,"month"),this.build()},resetCalendar:function(){this.calendar=[[]]},build:function(){this.resetCalendar();this.currentDay.clone().startOf("month");for(var e=this.currentDay.clone().startOf("month"),t=this.currentDay.clone().endOf("month");;){0===e.day()&&this.calendar[0].length>0&&this.calendar.push([]);var s=this.calendar.length-1;if(this.calendar[s].push({date:e.clone(),dayOfWeek:e.day(),isToday:e.isSame(n().now(),"day")}),e.isSame(t,"day"))break;e.add(1,"day")}}}})},4451:(e,t,s)=>{"use strict";s.d(t,{R:()=>i});var r=s(7389),i=s(538).default.component("ns-select",{data:function(){return{}},props:["name","placeholder","field"],computed:{hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},disabledClass:function(){return this.field.disabled?"bg-gray-200 cursor-not-allowed":"bg-transparent"},inputClass:function(){return this.disabledClass+" "+this.leadClass},leadClass:function(){return this.leading?"pl-8":"px-4"}},methods:{__:r.__},template:'\n
    \n \n
    \n \n
    \n

    \n

    \n {{ __( \'This field is required.\' ) }}\n {{ __( \'This field must contain a valid email address.\' ) }}\n {{ error.message }}\n

    \n
    \n '})},1356:(e,t,s)=>{"use strict";s.d(t,{W:()=>c,f:()=>d});var r=s(538),i=s(2077),n=s.n(i),a=s(6740),o=s.n(a),l=new Array(parseInt(ns.currency.ns_currency_precision)).fill("").map((function(e){return 0})).join(""),c=r.default.filter("currency",(function(e){var t,s,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"full";switch(ns.currency.ns_currency_prefered){case"iso":t=ns.currency.ns_currency_iso;break;case"symbol":t=ns.currency.ns_currency_symbol}if("full"===r){var i={decimal:ns.currency.ns_currency_decimal_separator,separator:ns.currency.ns_currency_thousand_separator,precision:parseInt(ns.currency.ns_currency_precision),symbol:""};s=o()(e,i).format()}else s=n()(e).format("0.0a");return"".concat("before"===ns.currency.ns_currency_position?t:"").concat(s).concat("after"===ns.currency.ns_currency_position?t:"")})),d=function(e){var t="0.".concat(l);return parseFloat(n()(e).format(t))}},9698:(e,t,s)=>{"use strict";s.d(t,{b:()=>r});var r=s(538).default.filter("truncate",(function(e,t){return e?(e=e.toString()).length>t?e.substring(0,t)+"...":e:""}))},7266:(e,t,s)=>{"use strict";function r(e,t){for(var s=0;si});var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,s,i;return t=e,(s=[{key:"validateFields",value:function(e){var t=this;return 0===e.map((function(e){return t.checkField(e),e.errors?0===e.errors.length:0})).filter((function(e){return!1===e})).length}},{key:"validateFieldsErrors",value:function(e){var t=this;return e.map((function(e){return t.checkField(e),e.errors})).flat()}},{key:"validateForm",value:function(e){e.main&&this.validateField(e.main);var t=[];for(var s in e.tabs){var r=[],i=this.validateFieldsErrors(e.tabs[s].fields);i.length>0&&r.push(i),e.tabs[s].errors=r.flat(),t.push(r.flat())}return t.flat().filter((function(e){return void 0!==e}))}},{key:"initializeTabs",value:function(e){var t=0;for(var s in e)0===t&&(e[s].active=!0),e[s].active=void 0!==e[s].active&&e[s].active,e[s].fields=this.createFields(e[s].fields),t++;return e}},{key:"validateField",value:function(e){return this.checkField(e)}},{key:"fieldsValid",value:function(e){return!(e.map((function(e){return e.errors&&e.errors.length>0})).filter((function(e){return e})).length>0)}},{key:"createFields",value:function(e){return e.map((function(e){return e.type=e.type||"text",e.errors=e.errors||[],e.disabled=e.disabled||!1,"custom"===e.type&&(e.component=nsExtraComponents[e.name]),e}))}},{key:"createForm",value:function(e){if(e.main&&(e.main=this.createFields([e.main])[0]),e.tabs)for(var t in e.tabs)e.tabs[t].fields=this.createFields(e.tabs[t].fields),e.tabs[t].errors=[];return e}},{key:"enableFields",value:function(e){return e.map((function(e){return e.disabled=!1}))}},{key:"disableFields",value:function(e){return e.map((function(e){return e.disabled=!0}))}},{key:"disableForm",value:function(e){for(var t in e.main&&(e.main.disabled=!0),e.tabs)e.tabs[t].fields.forEach((function(e){return e.disabled=!0}))}},{key:"enableForm",value:function(e){for(var t in e.main&&(e.main.disabled=!1),e.tabs)e.tabs[t].fields.forEach((function(e){return e.disabled=!1}))}},{key:"getValue",value:function(e){var t={};return e.forEach((function(e){t[e.name]=e.value})),t}},{key:"checkField",value:function(e){var t=this;return void 0!==e.validation&&(e.errors=[],this.detectValidationRules(e.validation).forEach((function(s){t.fieldPassCheck(e,s)}))),e}},{key:"extractForm",value:function(e){var t={};if(e.main&&(t[e.main.name]=e.main.value),e.tabs)for(var s in e.tabs)void 0===t[s]&&(t[s]={}),t[s]=this.extractFields(e.tabs[s].fields);return t}},{key:"extractFields",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.forEach((function(e){["multiselect"].includes(e.type)?t[e.name]=e.options.filter((function(e){return e.selected})).map((function(e){return e.value})):t[e.name]=e.value})),t}},{key:"detectValidationRules",value:function(e){var t=function(e){var t;return["email","required"].includes(e)?{identifier:e}:(t=/(min)\:([0-9])+/g.exec(e))||(t=/(max)\:([0-9])+/g.exec(e))?{identifier:t[1],value:t[2]}:e};return Array.isArray(e)?e.filter((function(e){return"string"==typeof e})).map(t):e.split("|").map(t)}},{key:"triggerError",value:function(e,t){if(t.errors){var s=function(s){var r=s.split(".").filter((function(e){return!/^\d+$/.test(e)}));2===r.length&&e.tabs[r[0]].fields.forEach((function(e){e.name===r[1]&&t.errors[s].forEach((function(t){var s={identifier:"invalid",invalid:!0,message:t,name:e.name};e.errors.push(s)}))})),s===e.main.name&&t.errors[s].forEach((function(t){e.main.errors.push({identifier:"invalid",invalid:!0,message:t,name:e.main.name})}))};for(var r in t.errors)s(r)}}},{key:"triggerFieldsErrors",value:function(e,t){if(t&&t.errors){var s=function(s){e.forEach((function(e){e.name===s&&t.errors[s].forEach((function(t){var s={identifier:"invalid",invalid:!0,message:t,name:e.name};e.errors.push(s)}))}))};for(var r in t.errors)s(r)}}},{key:"fieldPassCheck",value:function(e,t){if("required"===t.identifier){if(void 0===e.value||null===e.value||0===e.value.length)return e.errors.push({identifier:t.identifier,invalid:!0,name:e.name});e.errors.forEach((function(s,r){s.identifier===t.identifier&&!0===s.invalid&&e.errors.splice(r,1)}))}if("email"===t.identifier){if(!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(e.value))return e.errors.push({identifier:t.identifier,invalid:!0,name:e.name});e.errors.forEach((function(s,r){!0===s[t.identifier]&&e.errors.splice(r,1)}))}return e}}])&&r(t.prototype,s),i&&r(t,i),e}()},7389:(e,t,s)=>{"use strict";s.d(t,{__:()=>r,c:()=>i});var r=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"NexoPOS";return nsLanguage.getEntries(t)&&nsLanguage.getEntries(t)[e]||e},i=function(e,t){return nsLanguage.getEntries(t)&&nsLanguage.getEntries(t)[e]||e}},8603:(e,t,s)=>{"use strict";function r(){var e=this;Object.keys(this).includes("$popup")&&this.$popup.event.subscribe((function(t){"click-overlay"===t.event&&(e.$popupParams&&void 0!==e.$popupParams.reject&&e.$popupParams.reject(!1),e.$popup.close()),"press-esc"===t.event&&(e.$popupParams&&void 0!==e.$popupParams.reject&&e.$popupParams.reject(!1),e.$popup.close())}))}s.d(t,{Z:()=>r})},6386:(e,t,s)=>{"use strict";function r(e){void 0!==this.$popupParams.resolve&&this.$popupParams.reject&&(!1!==e?this.$popupParams.resolve(e):this.$popupParams.reject(e)),this.$popup.close()}s.d(t,{Z:()=>r})},2242:(e,t,s)=>{"use strict";s.d(t,{G:()=>a});var r=s(9248);function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var s=0;s0&&void 0!==arguments[0]?arguments[0]:{};if(i(this,e),this.config={primarySelector:void 0,popupClass:"shadow-lg h-half w-1/2 bg-white"},this.container=document.createElement("div"),this.popupBody=document.createElement("div"),this.config=Object.assign(this.config,t),void 0===this.config.primarySelector&&document.querySelectorAll(".is-popup").length>0){var s=document.querySelectorAll(".is-popup").length;this.parentWrapper=document.querySelectorAll(".is-popup")[s-1]}else this.parentWrapper=document.querySelector("body").querySelectorAll("div")[0];this.event=new r.x}var t,s,a;return t=e,a=[{key:"show",value:function(t){var s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=new e(r);return i.open(t,s),i}}],(s=[{key:"open",value:function(e){var t,s,r,i=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=document.querySelector("body").querySelectorAll("div")[0];this.parentWrapper.style.filter="blur(4px)",a.style.filter="blur(6px)",this.container.setAttribute("class","absolute top-0 left-0 w-full h-full flex items-center justify-center is-popup"),this.container.addEventListener("click",(function(e){i.event.next({event:"click-overlay",value:!0}),e.stopPropagation()})),this.popupBody.addEventListener("click",(function(e){e.stopImmediatePropagation()})),this.container.style.background="rgb(51 51 51 / 20%)",this.container.id="popup-container-"+document.querySelectorAll(".is-popup").length,this.popupBody.setAttribute("class"," zoom-out-entrance"),this.popupBody.innerHTML='',this.container.appendChild(this.popupBody),document.body.appendChild(this.container);var o=Vue.extend(e);this.instance=new o({propsData:{popup:this}}),this.instance.template=(null===(t=null==e?void 0:e.options)||void 0===t?void 0:t.template)||void 0,this.instance.render=e.render||void 0,this.instance.methods=(null===(s=null==e?void 0:e.options)||void 0===s?void 0:s.methods)||(null==e?void 0:e.methods),this.instance.data=(null===(r=null==e?void 0:e.options)||void 0===r?void 0:r.data)||(null==e?void 0:e.data),this.instance.$popup=this,this.instance.$popupParams=n,this.instance.$mount("#".concat(this.container.id," .popup-body"))}},{key:"close",value:function(){var e=this;this.instance.$destroy(),this.event.unsubscribe(),this.parentWrapper.style.filter="blur(0px)";var t=document.querySelector("body").querySelectorAll("div")[0];document.querySelectorAll(".is-popup").length<=1&&(t.style.filter="blur(0px)"),this.popupBody.classList.remove("zoom-out-entrance"),this.popupBody.classList.add("zoom-in-exit"),this.container.classList.remove("is-popup"),setTimeout((function(){e.container.remove()}),300)}}])&&n(t.prototype,s),a&&n(t,a),e}()},9624:(e,t,s)=>{"use strict";s.d(t,{S:()=>n});var r=s(3260);function i(e,t){for(var s=0;s2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"info"};return r.Observable.create((function(r){var n=s.__createSnack({message:e,label:t,type:i.type}),a=n.buttonNode,o=(n.textNode,n.snackWrapper,n.sampleSnack);a.addEventListener("click",(function(e){r.onNext(a),r.onCompleted(),o.remove()})),s.__startTimer(i.duration,o)}))}},{key:"error",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"error"};return this.show(e,t,Object.assign(Object.assign({},s),{type:"error"}))}},{key:"success",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"success"};return this.show(e,t,Object.assign(Object.assign({},s),{type:"success"}))}},{key:"info",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"info"};return this.show(e,t,Object.assign(Object.assign({},s),{type:"info"}))}},{key:"__startTimer",value:function(e,t){var s,r=function(){e>0&&!1!==e&&(s=setTimeout((function(){t.remove()}),e))};t.addEventListener("mouseenter",(function(){clearTimeout(s)})),t.addEventListener("mouseleave",(function(){r()})),r()}},{key:"__createSnack",value:function(e){var t=e.message,s=e.label,r=e.type,i=void 0===r?"info":r,n=document.getElementById("snack-wrapper")||document.createElement("div"),a=document.createElement("div"),o=document.createElement("p"),l=document.createElement("div"),c=document.createElement("button"),d="",u="";switch(i){case"info":d="text-white hover:bg-blue-400 bg-blue-500",u="bg-gray-900 text-white";break;case"error":d="text-red-700 hover:bg-white bg-white",u="bg-red-500 text-white";break;case"success":d="text-green-700 hover:bg-white bg-white",u="bg-green-500 text-white"}return o.textContent=t,s&&(c.textContent=s,c.setAttribute("class","px-3 py-2 shadow rounded uppercase ".concat(d)),l.appendChild(c)),a.appendChild(o),a.appendChild(l),a.setAttribute("class","md:rounded py-2 px-3 md:w-2/5 w-full z-10 md:my-2 shadow-lg flex justify-between items-center zoom-in-entrance anim-duration-300 ".concat(u)),n.appendChild(a),null===document.getElementById("snack-wrapper")&&(n.setAttribute("id","snack-wrapper"),n.setAttribute("class","absolute bottom-0 w-full flex justify-between items-center flex-col"),document.body.appendChild(n)),{snackWrapper:n,sampleSnack:a,buttonsWrapper:l,buttonNode:c,textNode:o}}}])&&i(t.prototype,s),n&&i(t,n),e}()},824:(e,t,s)=>{"use strict";var r=s(381),i=s.n(r);ns.date.moment=i()(ns.date.current),ns.date.interval=setInterval((function(){ns.date.moment.add(1,"seconds"),ns.date.current=i()(ns.date.current).add(1,"seconds").format("YYYY-MM-DD HH:mm:ss")}),1e3),ns.date.getNowString=function(){var e=Date.parse((new Date).toLocaleString("en-US",{timeZone:ns.date.timeZone}));return i()(e).format("YYYY-MM-DD HH:mm:ss")},ns.date.getMoment=function(){var e=Date.parse((new Date).toLocaleString("en-US",{timeZone:ns.date.timeZone}));return i()(e)}},6700:(e,t,s)=>{var r={"./af":2786,"./af.js":2786,"./ar":867,"./ar-dz":4130,"./ar-dz.js":4130,"./ar-kw":6135,"./ar-kw.js":6135,"./ar-ly":6440,"./ar-ly.js":6440,"./ar-ma":7702,"./ar-ma.js":7702,"./ar-sa":6040,"./ar-sa.js":6040,"./ar-tn":7100,"./ar-tn.js":7100,"./ar.js":867,"./az":1083,"./az.js":1083,"./be":9808,"./be.js":9808,"./bg":8338,"./bg.js":8338,"./bm":7438,"./bm.js":7438,"./bn":8905,"./bn-bd":6225,"./bn-bd.js":6225,"./bn.js":8905,"./bo":1560,"./bo.js":1560,"./br":1278,"./br.js":1278,"./bs":622,"./bs.js":622,"./ca":2468,"./ca.js":2468,"./cs":5822,"./cs.js":5822,"./cv":877,"./cv.js":877,"./cy":7373,"./cy.js":7373,"./da":4780,"./da.js":4780,"./de":9740,"./de-at":217,"./de-at.js":217,"./de-ch":894,"./de-ch.js":894,"./de.js":9740,"./dv":5300,"./dv.js":5300,"./el":837,"./el.js":837,"./en-au":8348,"./en-au.js":8348,"./en-ca":7925,"./en-ca.js":7925,"./en-gb":2243,"./en-gb.js":2243,"./en-ie":6436,"./en-ie.js":6436,"./en-il":7207,"./en-il.js":7207,"./en-in":4175,"./en-in.js":4175,"./en-nz":6319,"./en-nz.js":6319,"./en-sg":1662,"./en-sg.js":1662,"./eo":2915,"./eo.js":2915,"./es":7093,"./es-do":5251,"./es-do.js":5251,"./es-mx":6112,"./es-mx.js":6112,"./es-us":1146,"./es-us.js":1146,"./es.js":7093,"./et":5603,"./et.js":5603,"./eu":7763,"./eu.js":7763,"./fa":6959,"./fa.js":6959,"./fi":1897,"./fi.js":1897,"./fil":2549,"./fil.js":2549,"./fo":4694,"./fo.js":4694,"./fr":4470,"./fr-ca":3049,"./fr-ca.js":3049,"./fr-ch":2330,"./fr-ch.js":2330,"./fr.js":4470,"./fy":5044,"./fy.js":5044,"./ga":9295,"./ga.js":9295,"./gd":2101,"./gd.js":2101,"./gl":8794,"./gl.js":8794,"./gom-deva":7884,"./gom-deva.js":7884,"./gom-latn":3168,"./gom-latn.js":3168,"./gu":5349,"./gu.js":5349,"./he":4206,"./he.js":4206,"./hi":94,"./hi.js":94,"./hr":316,"./hr.js":316,"./hu":2138,"./hu.js":2138,"./hy-am":1423,"./hy-am.js":1423,"./id":9218,"./id.js":9218,"./is":135,"./is.js":135,"./it":626,"./it-ch":150,"./it-ch.js":150,"./it.js":626,"./ja":9183,"./ja.js":9183,"./jv":4286,"./jv.js":4286,"./ka":2105,"./ka.js":2105,"./kk":7772,"./kk.js":7772,"./km":8758,"./km.js":8758,"./kn":9282,"./kn.js":9282,"./ko":3730,"./ko.js":3730,"./ku":1408,"./ku.js":1408,"./ky":3291,"./ky.js":3291,"./lb":6841,"./lb.js":6841,"./lo":5466,"./lo.js":5466,"./lt":7010,"./lt.js":7010,"./lv":7595,"./lv.js":7595,"./me":9861,"./me.js":9861,"./mi":5493,"./mi.js":5493,"./mk":5966,"./mk.js":5966,"./ml":7341,"./ml.js":7341,"./mn":5115,"./mn.js":5115,"./mr":370,"./mr.js":370,"./ms":9847,"./ms-my":1237,"./ms-my.js":1237,"./ms.js":9847,"./mt":2126,"./mt.js":2126,"./my":6165,"./my.js":6165,"./nb":4924,"./nb.js":4924,"./ne":6744,"./ne.js":6744,"./nl":3901,"./nl-be":9814,"./nl-be.js":9814,"./nl.js":3901,"./nn":3877,"./nn.js":3877,"./oc-lnc":2135,"./oc-lnc.js":2135,"./pa-in":5858,"./pa-in.js":5858,"./pl":4495,"./pl.js":4495,"./pt":9520,"./pt-br":7971,"./pt-br.js":7971,"./pt.js":9520,"./ro":6459,"./ro.js":6459,"./ru":238,"./ru.js":238,"./sd":950,"./sd.js":950,"./se":490,"./se.js":490,"./si":124,"./si.js":124,"./sk":4249,"./sk.js":4249,"./sl":4985,"./sl.js":4985,"./sq":1104,"./sq.js":1104,"./sr":9131,"./sr-cyrl":9915,"./sr-cyrl.js":9915,"./sr.js":9131,"./ss":5893,"./ss.js":5893,"./sv":8760,"./sv.js":8760,"./sw":1172,"./sw.js":1172,"./ta":7333,"./ta.js":7333,"./te":3110,"./te.js":3110,"./tet":2095,"./tet.js":2095,"./tg":7321,"./tg.js":7321,"./th":9041,"./th.js":9041,"./tk":9005,"./tk.js":9005,"./tl-ph":5768,"./tl-ph.js":5768,"./tlh":9444,"./tlh.js":9444,"./tr":2397,"./tr.js":2397,"./tzl":8254,"./tzl.js":8254,"./tzm":1106,"./tzm-latn":699,"./tzm-latn.js":699,"./tzm.js":1106,"./ug-cn":9288,"./ug-cn.js":9288,"./uk":7691,"./uk.js":7691,"./ur":3795,"./ur.js":3795,"./uz":6791,"./uz-latn":588,"./uz-latn.js":588,"./uz.js":6791,"./vi":5666,"./vi.js":5666,"./x-pseudo":4378,"./x-pseudo.js":4378,"./yo":5805,"./yo.js":5805,"./zh-cn":3839,"./zh-cn.js":3839,"./zh-hk":5726,"./zh-hk.js":5726,"./zh-mo":9807,"./zh-mo.js":9807,"./zh-tw":4152,"./zh-tw.js":4152};function i(e){var t=n(e);return s(t)}function n(e){if(!s.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}i.keys=function(){return Object.keys(r)},i.resolve=n,e.exports=i,i.id=6700},6598:(e,t,s)=>{"use strict";s.d(t,{Z:()=>a});var r=s(381),i=s.n(r);const n={name:"ns-datepicker",props:["label","date"],data:function(){return{visible:!1,currentDay:null,daysOfWeek:new Array(7).fill("").map((function(e,t){return t})),calendar:[[]]}},mounted:function(){document.addEventListener("click",this.checkClickedItem),this.currentDay=[void 0,null].includes(this.date)?i()():i()(this.date),this.build()},methods:{__:s(7389).__,checkClickedItem:function(e){!this.$el.contains(e.srcElement)&&this.visible&&(this.visible=!1)},selectDate:function(e){this.currentDay=e,this.visible=!1,this.$emit("change",e)},subMonth:function(){this.currentDay.subtract(1,"month"),this.build()},addMonth:function(){this.currentDay.add(1,"month"),this.build()},resetCalendar:function(){this.calendar=[[]]},build:function(){this.resetCalendar();this.currentDay.clone().startOf("month");for(var e=this.currentDay.clone().startOf("month"),t=this.currentDay.clone().endOf("month");;){0===e.day()&&this.calendar[0].length>0&&this.calendar.push([]);var s=this.calendar.length-1;if(this.calendar[s].push({date:e.clone(),dayOfWeek:e.day(),isToday:e.isSame(i().now(),"day")}),e.isSame(t,"day"))break;e.add(1,"day")}}}};const a=(0,s(1900).Z)(n,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"picker"},[s("div",{staticClass:"rounded cursor-pointer bg-white shadow px-1 py-1 flex items-center text-gray-700",on:{click:function(t){e.visible=!e.visible}}},[s("i",{staticClass:"las la-clock text-2xl"}),e._v(" "),s("span",{staticClass:"mx-1 text-sm"},[s("span",[e._v(e._s(e.label||e.__("Date"))+" : ")]),e._v(" "),e.currentDay?s("span",[e._v(e._s(e.currentDay.format("YYYY/MM/DD")))]):e._e(),e._v(" "),null===e.currentDay?s("span",[e._v(e._s(e.__("N/A")))]):e._e()])]),e._v(" "),e.visible?s("div",{staticClass:"relative h-0 w-0 -mb-2"},[s("div",{staticClass:"w-72 mt-2 shadow rounded bg-white anim-duration-300 zoom-in-entrance flex flex-col"},[s("div",{staticClass:"flex-auto"},[s("div",{staticClass:"p-2 flex items-center"},[s("div",[s("button",{staticClass:"w-8 h-8 bg-gray-400 rounded",on:{click:function(t){return e.subMonth()}}},[s("i",{staticClass:"las la-angle-left"})])]),e._v(" "),s("div",{staticClass:"flex flex-auto font-semibold text-gray-700 justify-center"},[e._v(e._s(e.currentDay.format("MMM"))+" "+e._s(e.currentDay.format("YYYY")))]),e._v(" "),s("div",[s("button",{staticClass:"w-8 h-8 bg-gray-400 rounded",on:{click:function(t){return e.addMonth()}}},[s("i",{staticClass:"las la-angle-right"})])])]),e._v(" "),s("div",{staticClass:"grid grid-flow-row grid-cols-7 grid-rows-1 gap-0 text-gray-700"},[s("div",{staticClass:"border border-gray-200 h-8 flex justify-center items-center text-sm"},[e._v(e._s(e.__("Sun")))]),e._v(" "),s("div",{staticClass:"border border-gray-200 h-8 flex justify-center items-center text-sm"},[e._v(e._s(e.__("Mon")))]),e._v(" "),s("div",{staticClass:"border border-gray-200 h-8 flex justify-center items-center text-sm"},[e._v(e._s(e.__("Tue")))]),e._v(" "),s("div",{staticClass:"border border-gray-200 h-8 flex justify-center items-center text-sm"},[e._v(e._s(e.__("Wed")))]),e._v(" "),s("div",{staticClass:"border border-gray-200 h-8 flex justify-center items-center text-sm"},[e._v(e._s(e.__("Thr")))]),e._v(" "),s("div",{staticClass:"border border-gray-200 h-8 flex justify-center items-center text-sm"},[e._v(e._s(e.__("Fri")))]),e._v(" "),s("div",{staticClass:"border border-gray-200 h-8 flex justify-center items-center text-sm"},[e._v(e._s(e.__("Sat")))])]),e._v(" "),e._l(e.calendar,(function(t,r){return s("div",{key:r,staticClass:"grid grid-flow-row grid-cols-7 grid-rows-1 gap-0 text-gray-700"},e._l(e.daysOfWeek,(function(r,i){return s("div",{key:i,staticClass:"h-8 flex justify-center items-center text-sm"},[e._l(t,(function(t,i){return[t.dayOfWeek===r?s("div",{key:i,staticClass:"h-full w-full flex items-center justify-center cursor-pointer",class:t.date.format("DD")===e.currentDay.format("DD")?"bg-blue-400 text-white border border-blue-500":"hover:bg-gray-100 border border-gray-200",on:{click:function(s){return e.selectDate(t.date)}}},[e._v("\n "+e._s(t.date.format("DD"))+"\n ")]):e._e()]}))],2)})),0)}))],2),e._v(" "),s("div")])]):e._e()])}),[],!1,null,null,null).exports},3968:(e,t,s)=>{"use strict";s.d(t,{Z:()=>a});function r(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var s=Object.prototype.toString.call(e).slice(8,-1);"Object"===s&&e.constructor&&(s=e.constructor.name);if("Map"===s||"Set"===s)return Array.from(e);if("Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return i(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var s=0,r=new Array(t);s100?100:this.backValue))),"0"===this.backValue&&(this.backValue=""),this.$emit("changed",this.floating&&this.backValue.length>0?parseFloat(this.backValue/this.number):this.backValue)):this.$emit("next",this.floating&&this.backValue.length>0?parseFloat(this.backValue/this.number):this.backValue)}}};const a=(0,s(1900).Z)(n,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"grid grid-flow-row grid-cols-3 gap-2 grid-rows-3",staticStyle:{padding:"1px"},attrs:{id:"numpad"}},[e._l(e.keys,(function(t,r){return s("div",{key:r,staticClass:"hover:bg-gray-400 hover:text-gray-800 bg-gray-300 text-2xl text-gray-700 border h-16 flex items-center justify-center cursor-pointer",staticStyle:{margin:"-1px"},on:{click:function(s){return e.inputValue(t)}}},[void 0!==t.value?s("span",[e._v(e._s(t.value))]):e._e(),e._v(" "),t.icon?s("i",{staticClass:"las",class:t.icon}):e._e()])})),e._v(" "),e._t("numpad-footer")],2)}),[],!1,null,null,null).exports},9576:(e,t,s)=>{"use strict";s.d(t,{Z:()=>o});var r=s(162),i=s(8603),n=s(7389);const a={name:"ns-media",props:["popup"],components:{VueUpload:s(2948)},data:function(){return{pages:[{label:(0,n.__)("Upload"),name:"upload",selected:!1},{label:(0,n.__)("Gallery"),name:"gallery",selected:!0}],resources:[],response:{data:[],current_page:0,from:0,to:0,next_page_url:"",prev_page_url:"",path:"",per_page:0,total:0,last_page:0,first_page:0},queryPage:1,bulkSelect:!1,files:[]}},mounted:function(){this.popupCloser();var e=this.pages.filter((function(e){return"gallery"===e.name}))[0];this.select(e)},watch:{files:function(){this.files.filter((function(e){return"0.00"===e.progress})).length>0&&(this.$refs.upload.active=!0)}},computed:{postMedia:function(){return r.kq.applyFilters("http-client-url","/api/nexopos/v4/medias")},currentPage:function(){return this.pages.filter((function(e){return e.selected}))[0]},hasOneSelected:function(){return this.response.data.filter((function(e){return e.selected})).length>0},selectedResource:function(){return this.response.data.filter((function(e){return e.selected}))[0]},csrf:function(){return ns.authentication.csrf},isPopup:function(){return void 0!==this.$popup},user_id:function(){return this.isPopup&&this.$popupParams.user_id||0}},methods:{popupCloser:i.Z,__:n.__,cancelBulkSelect:function(){this.bulkSelect=!1,this.response.data.forEach((function(e){return e.selected=!1}))},deleteSelected:function(){var e=this;if(confirm("Delete selected resources ?"))return r.ih.post("/api/nexopos/v4/medias/bulk-delete",{ids:this.response.data.filter((function(e){return e.selected})).map((function(e){return e.id}))}).subscribe((function(t){r.kX.success(t.message).subscribe(),e.loadGallery()}),(function(e){r.kX.error(e.message).subscribe()}))},select:function(e){this.pages.forEach((function(e){return e.selected=!1})),e.selected=!0,"gallery"===e.name&&this.loadGallery()},loadGallery:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;t=null===t?this.queryPage:t,this.queryPage=t,r.ih.get("/api/nexopos/v4/medias?page=".concat(t,"&user_id=").concat(this.user_id)).subscribe((function(t){t.data.forEach((function(e){return e.selected=!1})),e.response=t}))},useSelectedEntries:function(){this.$popupParams.resolve({event:"use-selected",value:this.response.data.filter((function(e){return e.selected}))}),this.$popup.close()},selectResource:function(e){var t=this;this.bulkSelect||this.response.data.forEach((function(s,r){r!==t.response.data.indexOf(e)&&(s.selected=!1)})),e.selected=!e.selected}}};const o=(0,s(1900).Z)(a,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"flex bg-white shadow-xl overflow-hidden",class:e.isPopup?"w-6/7-screen h-6/7-screen":"w-full h-full"},[s("div",{staticClass:"sidebar w-48 bg-gray-200 h-full flex-shrink-0"},[s("h3",{staticClass:"text-xl font-bold text-gray-800 my-4 text-center"},[e._v(e._s(e.__("Medias Manager")))]),e._v(" "),s("ul",e._l(e.pages,(function(t,r){return s("li",{key:r,staticClass:"hover:bg-white py-2 px-3 text-gray-700 border-l-8 cursor-pointer",class:t.selected?"bg-white border-blue-400":"border-transparent",on:{click:function(s){return e.select(t)}}},[e._v(e._s(t.label))])})),0)]),e._v(" "),"upload"===e.currentPage.name?s("div",{staticClass:"content w-full overflow-hidden flex"},[s("vue-upload",{ref:"upload",staticClass:" flex-auto flex bg-white shadow",attrs:{drop:!0,multiple:!0,headers:{"X-Requested-With":"XMLHttpRequest","X-CSRF-TOKEN":e.csrf},accept:"image/*","post-action":e.postMedia},model:{value:e.files,callback:function(t){e.files=t},expression:"files"}},[s("div",{staticClass:"border-dashed border-2 flex flex-auto m-2 p-2 flex-col border-blue-400 items-center justify-center"},[s("h3",{staticClass:"text-3xl font-bold text-gray-600 mb-4"},[e._v(e._s(e.__("Click Here Or Drop Your File To Upload")))]),e._v(" "),s("div",{staticClass:"rounded w-full md:w-2/3 text-gray-700 bg-gray-500 h-56 overflow-y-auto p-2"},[s("ul",e._l(e.files,(function(t,r){return s("li",{key:r,staticClass:"p-2 mb-2 shadow bg-white flex items-center justify-between rounded"},[s("span",[e._v(e._s(t.name))]),e._v(" "),s("span",{staticClass:"rounded bg-blue-400 flex items-center justify-center text-xs p-2"},[e._v(e._s(t.progress)+"%")])])})),0)])])])],1):e._e(),e._v(" "),"gallery"===e.currentPage.name?s("div",{staticClass:"content flex-col w-full overflow-hidden flex"},[e.popup?s("div",{staticClass:"p-2 flex flex-shrink-0 justify-between bg-gray-200"},[s("div"),e._v(" "),s("div",[s("ns-close-button",{on:{click:function(t){return e.popup.close()}}})],1)]):e._e(),e._v(" "),s("div",{staticClass:"flex flex-auto overflow-hidden"},[s("div",{staticClass:"bg-white shadow content flex flex-auto flex-col overflow-y-auto",attrs:{id:"grid"}},[s("div",{staticClass:"flex flex-auto"},[s("div",{staticClass:"p-2 overflow-x-auto"},[s("div",{staticClass:"grid grid-cols-2 md:grid-cols-4 lg:grid-cols-4 xl:grid-cols-6"},e._l(e.response.data,(function(t,r){return s("div",{key:r},[s("div",{staticClass:"p-2"},[s("div",{staticClass:"rounded-lg w-32 h-32 bg-gray-500 m-2 overflow-hidden flex items-center justify-center",class:t.selected?"ring-4 ring-blue-500 ring-opacity-50":"",on:{click:function(s){return e.selectResource(t)}}},[s("img",{staticClass:"object-cover h-full",attrs:{src:t.sizes.thumb,alt:t.name}})])])])})),0)]),e._v(" "),0===e.response.data.length?s("div",{staticClass:"flex flex-auto items-center justify-center"},[s("h3",{staticClass:"text-2xl text-gray-600 font-bold"},[e._v(e._s(e.__("Nothing has already been uploaded")))])]):e._e()])]),e._v(" "),!e.bulkSelect&&e.hasOneSelected?s("div",{staticClass:"w-64 flex-shrink-0 bg-gray-200",attrs:{id:"preview"}},[s("div",{staticClass:"h-64 bg-gray-600 flex items-center justify-center"},[s("img",{attrs:{src:e.selectedResource.sizes.thumb,alt:e.selectedResource.name}})]),e._v(" "),s("div",{staticClass:"p-4 text-gray-700 text-sm",attrs:{id:"details"}},[s("p",{staticClass:"flex flex-col mb-2"},[s("strong",{staticClass:"font-bold block"},[e._v(e._s(e.__("File Name"))+": ")]),s("span",[e._v(e._s(e.selectedResource.name))])]),e._v(" "),s("p",{staticClass:"flex flex-col mb-2"},[s("strong",{staticClass:"font-bold block"},[e._v(e._s(e.__("Uploaded At"))+":")]),s("span",[e._v(e._s(e.selectedResource.created_at))])]),e._v(" "),s("p",{staticClass:"flex flex-col mb-2"},[s("strong",{staticClass:"font-bold block"},[e._v(e._s(e.__("By"))+" :")]),s("span",[e._v(e._s(e.selectedResource.user.username))])])])]):e._e()]),e._v(" "),s("div",{staticClass:"p-2 flex flex-shrink-0 justify-between bg-gray-200"},[s("div",{staticClass:"flex -mx-2 flex-shrink-0"},[s("div",{staticClass:"px-2 flex-shrink-0 flex"},[s("div",{staticClass:"rounded shadow overflow-hidden border-blue-400 flex text-sm text-gray-700"},[e.bulkSelect?s("button",{staticClass:"bg-white hover:bg-blue-400 hover:text-white py-2 px-3",on:{click:function(t){return e.cancelBulkSelect()}}},[s("i",{staticClass:"las la-times"})]):e._e(),e._v(" "),e.hasOneSelected&&!e.bulkSelect?s("button",{staticClass:"bg-white hover:bg-blue-400 hover:text-white py-2 px-3",on:{click:function(t){e.bulkSelect=!0}}},[s("i",{staticClass:"las la-check-circle"})]):e._e(),e._v(" "),e.hasOneSelected?s("button",{staticClass:"bg-red-400 text-white hover:bg-red-500 hover:text-white py-2 px-3",on:{click:function(t){return e.deleteSelected()}}},[s("i",{staticClass:"las la-trash"})]):e._e()])])]),e._v(" "),s("div",{staticClass:"flex-shrink-0 -mx-2 flex"},[s("div",{staticClass:"px-2"},[s("div",{staticClass:"rounded shadow overflow-hidden border-blue-400 flex text-sm text-gray-700"},[s("button",{staticClass:"p-2",class:1===e.response.current_page?"bg-gray-100 text-gray-600 cursor-not-allowed":"bg-white hover:bg-blue-400 hover:text-white",attrs:{disabled:1===e.response.current_page},on:{click:function(t){return e.loadGallery(e.response.current_page-1)}}},[e._v(e._s(e.__("Previous")))]),e._v(" "),s("hr",{staticClass:"border-r border-gray-700"}),e._v(" "),s("button",{staticClass:"p-2",class:e.response.current_page===e.response.last_page?"bg-gray-100 text-gray-600 cursor-not-allowed":"bg-white hover:bg-blue-400 hover:text-white",attrs:{disabled:e.response.current_page===e.response.last_page},on:{click:function(t){return e.loadGallery(e.response.current_page+1)}}},[e._v(e._s(e.__("Next")))])])]),e._v(" "),e.popup&&e.hasOneSelected?s("div",{staticClass:"px-2"},[s("button",{staticClass:"rounded shadow p-2 bg-blue-400 text-white text-sm",on:{click:function(t){return e.useSelectedEntries()}}},[e._v(e._s(e.__("Use Selected")))])]):e._e()])])]):e._e()])}),[],!1,null,null,null).exports},2329:(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});const r={data:function(){return{title:"",message:""}},computed:{size:function(){return this.$popupParams.size||"h-full w-full"}},mounted:function(){var e=this;this.title=this.$popupParams.title,this.message=this.$popupParams.message,this.$popup.event.subscribe((function(t){"click-overlay"===t.event&&(void 0!==e.$popupParams.onAction&&e.$popupParams.onAction(!1),e.$popup.close())}))},methods:{__:s(7389).__,emitAction:function(e){void 0!==this.$popupParams.onAction&&this.$popupParams.onAction(e),this.$popup.close()}}};const i=(0,s(1900).Z)(r,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"w-6/7-screen md:w-4/7-screen lg:w-3/7-screen flex flex-col bg-white shadow-lg",class:e.size,attrs:{id:"popup"}},[s("div",{staticClass:"flex items-center justify-center flex-col flex-auto p-4"},[e.title?s("h2",{staticClass:"text-3xl font-body text-gray-700"},[e._v(e._s(e.title))]):e._e(),e._v(" "),s("p",{staticClass:"py-4 text-gray-600 text-center"},[e._v(e._s(e.message))])]),e._v(" "),s("div",{staticClass:"flex border-t border-gray-200 text-gray-700 justify-end items-center p-2"},[s("ns-button",{attrs:{type:"info"},on:{click:function(t){return e.emitAction(!0)}}},[e._v(e._s(e.__("Ok")))])],1)])}),[],!1,null,null,null).exports},419:(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});const r={data:function(){return{title:"",message:""}},computed:{size:function(){return this.$popupParams.size||"h-full w-full"}},mounted:function(){var e=this;this.title=this.$popupParams.title,this.message=this.$popupParams.message,this.$popup.event.subscribe((function(t){"click-overlay"===t.event&&(e.$popupParams.onAction(!1),e.$popup.close())}))},methods:{__:s(7389).__,emitAction:function(e){this.$popupParams.onAction(e),this.$popup.close()}}};const i=(0,s(1900).Z)(r,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"flex flex-col bg-white shadow-lg w-5/7-screen md:w-4/7-screen lg:w-2/7-screen",class:e.size,attrs:{id:"popup"}},[s("div",{staticClass:"flex items-center justify-center flex-col flex-auto p-4"},[s("h2",{staticClass:"text-xl md:text-3xl font-body text-gray-700 text-center"},[e._v(e._s(e.title))]),e._v(" "),s("p",{staticClass:"py-4 text-sm md:text-base text-gray-600 text-center"},[e._v(e._s(e.message))])]),e._v(" "),s("div",{staticClass:"flex border-t border-gray-200 text-gray-700"},[s("button",{staticClass:"hover:bg-gray-100 flex-auto w-1/2 h-16 flex items-center justify-center uppercase",on:{click:function(t){return e.emitAction(!0)}}},[e._v(e._s(e.__("Yes")))]),e._v(" "),s("hr",{staticClass:"border-r border-gray-200"}),e._v(" "),s("button",{staticClass:"hover:bg-gray-100 flex-auto w-1/2 h-16 flex items-center justify-center uppercase",on:{click:function(t){return e.emitAction(!1)}}},[e._v(e._s(e.__("No")))])])])}),[],!1,null,null,null).exports},1957:(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});const r={name:"ns-pos-loading-popup"};const i=(0,s(1900).Z)(r,(function(){var e=this.$createElement;return(this._self._c||e)("ns-spinner")}),[],!1,null,null,null).exports},7096:(e,t,s)=>{"use strict";s.d(t,{Z:()=>l});var r=s(162),i=s(7389);function n(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return a(e,t);var s=Object.prototype.toString.call(e).slice(8,-1);"Object"===s&&e.constructor&&(s=e.constructor.name);if("Map"===s||"Set"===s)return Array.from(e);if("Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return a(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var s=0,r=new Array(t);s{"use strict";s.d(t,{Z:()=>i});const r={data:function(){return{title:"",message:"",input:""}},computed:{size:function(){return this.$popupParams.size||"h-full w-full"}},mounted:function(){var e=this;this.input=this.$popupParams.input||"",this.title=this.$popupParams.title,this.message=this.$popupParams.message,this.$popup.event.subscribe((function(t){"click-overlay"===t.event&&(e.$popupParams.reject(!1),e.$popup.close())}))},methods:{__:s(7389).__,emitAction:function(e){this.$popupParams.onAction(e?this.input:e),this.$popup.close()},reject:function(e){this.$popupParams.reject(e),this.$popup.close()}}};const i=(0,s(1900).Z)(r,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"w-5/7-screen md:w-3/7-screen flex flex-col bg-white shadow-lg",class:e.size,attrs:{id:"popup"}},[s("div",{staticClass:"flex items-center justify-center flex-col flex-auto p-2"},[s("h2",{staticClass:"text-3xl font-body text-gray-700"},[e._v(e._s(e.title))]),e._v(" "),s("p",{staticClass:"w-full md:mx-auto md:w-2/3 py-4 text-gray-600 text-center"},[e._v(e._s(e.message))])]),e._v(" "),s("div",{staticClass:"p-2"},[s("textarea",{directives:[{name:"model",rawName:"v-model",value:e.input,expression:"input"}],staticClass:"text-gray-700 w-full border-2 p-2 border-blue-400",attrs:{name:"",id:"",cols:"30",rows:"10"},domProps:{value:e.input},on:{input:function(t){t.target.composing||(e.input=t.target.value)}}})]),e._v(" "),s("div",{staticClass:"flex border-t border-gray-200 text-gray-700"},[s("button",{staticClass:"hover:bg-gray-100 flex-auto w-1/2 h-16 flex items-center justify-center uppercase",on:{click:function(t){return e.emitAction(!0)}}},[e._v(e._s(e.__("Ok")))]),e._v(" "),s("hr",{staticClass:"border-r border-gray-200"}),e._v(" "),s("button",{staticClass:"hover:bg-gray-100 flex-auto w-1/2 h-16 flex items-center justify-center uppercase",on:{click:function(t){return e.reject(!1)}}},[e._v(e._s(e.__("Cancel")))])])])}),[],!1,null,null,null).exports}},e=>{e.O(0,[898],(()=>{return t=2328,e(e.s=t);var t}));e.O()}]); //# sourceMappingURL=app.min.js.map \ No newline at end of file diff --git a/public/js/auth.min.js b/public/js/auth.min.js index c8ee5d412..fbbc98476 100644 --- a/public/js/auth.min.js +++ b/public/js/auth.min.js @@ -1,2 +1,2 @@ -(self.webpackChunkNexoPOS_4x=self.webpackChunkNexoPOS_4x||[]).push([[743],{8108:(e,t,n)=>{"use strict";var s=n(538),i=n(4364),r=n(5882).Z,a=n(3923).Z,l=n(5139).Z,o=n(1158).Z,d=(window.nsState,window.nsScreen,window.nsExtraComponents);window.nsComponents=Object.assign(i,d),window.authVueComponent=new s.default({el:"#page-container",components:Object.assign({nsLogin:a,nsRegister:r,nsPasswordLost:l,nsNewPassword:o},d)})},162:(e,t,n)=>{"use strict";n.d(t,{l:()=>M,kq:()=>I,ih:()=>V,kX:()=>R});var s=n(6486),i=n(9669),r=n(2181),a=n(8345),l=n(9624),o=n(9248),d=n(230);function c(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{};return this._request("post",e,t,n)}},{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._request("get",e,void 0,t)}},{key:"delete",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._request("delete",e,void 0,t)}},{key:"put",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this._request("put",e,t,n)}},{key:"response",get:function(){return this._lastRequestData}},{key:"_request",value:function(e,t){var n=this,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return t=I.applyFilters("http-client-url",t.replace(/\/$/,"")),this._subject.next({identifier:"async.start",url:t,data:s}),new d.y((function(r){n._client[e](t,s,Object.assign(Object.assign({},n._client.defaults[e]),i)).then((function(e){n._lastRequestData=e,r.next(e.data),r.complete(),n._subject.next({identifier:"async.stop"})})).catch((function(e){var t;r.error((null===(t=e.response)||void 0===t?void 0:t.data)||e.response||e),n._subject.next({identifier:"async.stop"})}))}))}},{key:"subject",value:function(){return this._subject}},{key:"emit",value:function(e){var t=e.identifier,n=e.value;this._subject.next({identifier:t,value:n})}}])&&c(t.prototype,n),s&&c(t,s),e}(),f=n(3);function h(e,t){for(var n=0;n=1e3){for(var n,s=Math.floor((""+e).length/3),i=2;i>=1;i--){if(((n=parseFloat((0!=s?e/Math.pow(1e3,s):e).toPrecision(i)))+"").replace(/[^a-zA-Z 0-9]+/g,"").length<=2)break}n%1!=0&&(n=n.toFixed(1)),t=n+["","k","m","b","t"][s]}return t})),S=n(1356),E=n(9698);function T(e,t){for(var n=0;n0&&window.outerWidth<=480:this.breakpoint="xs";break;case window.outerWidth>480&&window.outerWidth<=640:this.breakpoint="sm";break;case window.outerWidth>640&&window.outerWidth<=1024:this.breakpoint="md";break;case window.outerWidth>1024&&window.outerWidth<=1280:this.breakpoint="lg";break;case window.outerWidth>1280:this.breakpoint="xl"}}}])&&z(t.prototype,n),s&&z(t,s),e}()),U=new b({sidebar:["xs","sm","md"].includes(Z.breakpoint)?"hidden":"visible"});V.defineClient(i),window.nsEvent=M,window.nsHttpClient=V,window.nsSnackBar=R,window.nsCurrency=S.W,window.nsTruncate=E.b,window.nsRawCurrency=S.f,window.nsAbbreviate=$,window.nsState=U,window.nsUrl=N,window.nsScreen=Z,window.ChartJS=r,window.EventEmitter=p,window.Popup=w.G,window.RxJS=y,window.FormValidation=k.Z,window.nsCrudHandler=L},4364:(e,t,n)=>{"use strict";n.r(t),n.d(t,{nsAvatar:()=>L,nsButton:()=>l,nsCheckbox:()=>h,nsCkeditor:()=>A,nsCloseButton:()=>E,nsCrud:()=>m,nsCrudForm:()=>x,nsDate:()=>C,nsDateTimePicker:()=>X.V,nsDatepicker:()=>I,nsField:()=>_,nsIconButton:()=>T,nsInput:()=>d,nsLink:()=>o,nsMediaInput:()=>S,nsMenu:()=>r,nsMultiselect:()=>k,nsNumpad:()=>M.Z,nsSelect:()=>c.R,nsSelectAudio:()=>f,nsSpinner:()=>g,nsSubmenu:()=>a,nsSwitch:()=>j,nsTableRow:()=>b,nsTabs:()=>q,nsTabsItem:()=>z,nsTextarea:()=>w});var s=n(538),i=n(162),r=s.default.component("ns-menu",{data:function(){return{defaultToggledState:!1,_save:0}},props:["href","label","icon","notification","toggled","identifier"],template:'\n \n ',mounted:function(){var e=this;this.defaultToggledState=void 0!==this.toggled?this.toggled:this.defaultToggledState,i.l.subject().subscribe((function(t){t.value!==e.identifier&&(e.defaultToggledState=!1)}))},methods:{toggleEmit:function(){var e=this;this.toggle().then((function(t){t&&i.l.emit({identifier:"side-menu.open",value:e.identifier})}))},toggle:function(){var e=this;return new Promise((function(t,n){0===e.href.length&&(e.defaultToggledState=!e.defaultToggledState,t(e.defaultToggledState))}))}}}),a=s.default.component("ns-submenu",{data:function(){return{}},props:["href","label","active"],mounted:function(){},template:'\n
    \n
  • \n \n \n \n
  • \n
    \n '}),l=s.default.component("ns-button",{data:function(){return{clicked:!1,_save:0}},props:["type","disabled","link","href","routerLink","to"],template:'\n
    \n \n \n \n
    \n ',mounted:function(){},computed:{isDisabled:function(){return this.disabled&&(0===this.disabled.length||"disabled"===this.disabled||this.disabled)},buttonclass:function(){var e;switch(this.type){case"info":e="".concat(this.isDisabled?"bg-gray-400 border border-gray-500 cursor-not-allowed text-gray-600":"shadow bg-blue-400 text-white");break;case"success":e="".concat(this.isDisabled?"bg-gray-400 border border-gray-500 cursor-not-allowed text-gray-600":"shadow bg-green-400 text-white");break;case"danger":e="".concat(this.isDisabled?"bg-gray-400 border border-gray-500 cursor-not-allowed text-gray-600":"shadow bg-red-400 text-white");break;case"warning":e="".concat(this.isDisabled?"bg-gray-400 border border-gray-500 cursor-not-allowed text-gray-600":"shadow bg-orange-400 text-white");break;default:e="".concat(this.isDisabled?"bg-gray-400 border border-gray-500 cursor-not-allowed text-gray-600":"shadow bg-white text-gray-800")}return e}}}),o=s.default.component("ns-link",{data:function(){return{clicked:!1,_save:0}},props:["type","to","href"],template:'\n
    \n \n \n
    \n ',computed:{buttonclass:function(){switch(this.type){case"info":return"shadow bg-blue-400 text-white";case"success":return"shadow bg-green-400 text-white";case"danger":return"shadow bg-red-400 text-white";case"warning":return"shadow bg-orange-400 text-white";default:return"shadow bg-white text-gray-800"}}}}),d=s.default.component("ns-input",{data:function(){return{}},mounted:function(){},computed:{hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},disabledClass:function(){return this.field.disabled?"bg-gray-200 cursor-not-allowed":"bg-transparent"},inputClass:function(){return this.disabledClass+" "+this.leadClass},leadClass:function(){return this.leading?"pl-8":"px-4"}},props:["placeholder","leading","type","field"],template:'\n
    \n \n
    \n
    \n \n {{ leading }}\n \n
    \n \n
    \n

    \n

    \n This field is required.\n This field must contain a valid email address.\n {{ error.message }}\n

    \n
    \n '}),c=n(4451),u=n(7389),f=s.default.component("ns-select-audio",{data:function(){return{}},props:["name","placeholder","field"],computed:{hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},disabledClass:function(){return this.field.disabled?"bg-gray-200 cursor-not-allowed":"bg-transparent"},inputClass:function(){return this.disabledClass+" "+this.leadClass},leadClass:function(){return this.leading?"pl-8":"px-4"}},methods:{__:u.__,playSelectedSound:function(){this.field.value.length>0&&new Audio(this.field.value).play()}},template:'\n
    \n \n
    \n
    \n \n
    \n \n
    \n

    \n

    \n {{ __( \'This field is required.\' ) }}\n {{ __( \'This field must contain a valid email address.\' ) }}\n {{ error.message }}\n

    \n
    \n '}),h=s.default.component("ns-checkbox",{data:function(){return{}},props:["checked","field","label"],template:'\n
    \n
    \n \n
    \n {{ label }}\n {{ field.label }}\n
    \n ',computed:{isChecked:function(){return this.field?this.field.value:this.checked}},methods:{toggleIt:function(){void 0!==this.field&&(this.field.value=!this.field.value),this.$emit("change",!this.checked)}}}),p=n(2242),v=n(419),m=s.default.component("ns-crud",{data:function(){return{isRefreshing:!1,sortColumn:"",searchInput:"",searchQuery:"",page:1,bulkAction:"",bulkActions:[],columns:[],selectedEntries:[],globallyChecked:!1,result:{current_page:null,data:[],first_page_url:null,from:null,last_page:null,last_page_url:null,next_page_url:null,path:null,per_page:null,prev_page_url:null,to:null,total:null}}},mounted:function(){void 0!==this.identifier&&nsCrudHandler.defineInstance(this.identifier,this),this.loadConfig()},props:["src","create-url","mode","identifier","queryParams"],computed:{getParsedSrc:function(){return"".concat(this.src,"?").concat(this.sortColumn).concat(this.searchQuery).concat(this.queryPage).concat(this.getQueryParams()?"&"+this.getQueryParams():"")},getSelectedAction:function(){var e=this,t=this.bulkActions.filter((function(t){return t.identifier===e.bulkAction}));return t.length>0&&t[0]},pagination:function(){return this.result?this.pageNumbers(this.result.last_page,this.result.current_page):[]},queryPage:function(){return this.result?"&page=".concat(this.page):""},resultInfo:function(){return(0,u.__)("displaying {perPage} on {items} items").replace("{perPage}",this.result.total).replace("{items}",this.result.total)}},methods:{__:u.__,getQueryParams:function(){var e=this;return this.queryParams?Object.keys(this.queryParams).map((function(t){return"".concat(t,"=").concat(e.queryParams[t])})).join("&"):""},pageNumbers:function(e,t){var n=[];return t>e-3?n.push(e-2,e-1,e):n.push(t,t+1,t+2,"...",e),n.filter((function(e){return e>0||"string"==typeof e}))},downloadContent:function(){i.ih.post("".concat(this.src,"/export?").concat(this.getQueryParams()),{entries:this.selectedEntries.map((function(e){return e.$id}))}).subscribe((function(e){setTimeout((function(){return document.location=e.url}),300),i.kX.success((0,u.__)("The document has been generated.")).subscribe()}),(function(e){i.kX.error(e.message||(0,u.__)("Unexpected error occured.")).subscribe()}))},clearSelectedEntries:function(){var e=this;p.G.show(v.Z,{title:(0,u.__)("Clear Selected Entries ?"),message:(0,u.__)("Would you like to clear all selected entries ?"),onAction:function(t){t&&(e.selectedEntries=[])}})},refreshRow:function(e){if(!0===e.$checked){0===this.selectedEntries.filter((function(t){return t.$id===e.$id})).length&&this.selectedEntries.push(e)}else{var t=this.selectedEntries.filter((function(t){return t.$id===e.$id}));if(t.length>0){var n=this.selectedEntries.indexOf(t[0]);this.selectedEntries.splice(n,1)}}},handleShowOptions:function(e){this.result.data.forEach((function(t){t.$id!==e.$id&&(t.$toggled=!1)}))},handleGlobalChange:function(e){var t=this;this.globallyChecked=e,this.result.data.forEach((function(n){n.$checked=e,t.refreshRow(n)}))},loadConfig:function(){var e=this;i.ih.get("".concat(this.src,"/config?").concat(this.getQueryParams())).subscribe((function(t){e.columns=t.columns,e.bulkActions=t.bulkActions,e.refresh()}),(function(e){i.kX.error(e.message,"OK",{duration:!1}).subscribe()}))},cancelSearch:function(){this.searchInput="",this.search()},search:function(){this.searchInput?this.searchQuery="&search=".concat(this.searchInput):this.searchQuery="",this.refresh()},sort:function(e){for(var t in this.columns)t!==e&&(this.columns[t].$sorted=!1,this.columns[t].$direction="");switch(this.columns[e].$sorted=!0,this.columns[e].$direction){case"asc":this.columns[e].$direction="desc";break;case"desc":this.columns[e].$direction="";break;case"":this.columns[e].$direction="asc"}["asc","desc"].includes(this.columns[e].$direction)?this.sortColumn="active=".concat(e,"&direction=").concat(this.columns[e].$direction):this.sortColumn="",this.$emit("sort",this.columns[e]),this.refresh()},bulkDo:function(){var e=this;return this.bulkAction?this.selectedEntries.length>0?(console.log(this.getSelectedAction),confirm(this.getSelectedAction.confirm||this.$slots["error-bulk-confirmation"]||(0,u.__)("No bulk confirmation message provided on the CRUD class."))?i.ih.post("".concat(this.src,"/bulk-actions"),{action:this.bulkAction,entries:this.selectedEntries.map((function(e){return e.$id}))}).subscribe((function(t){i.kX.info(t.message).subscribe(),e.selectedEntries=[],e.refresh()}),(function(e){i.kX.error(e.message).subscribe()})):void 0):i.kX.error(this.$slots["error-no-selection"]?this.$slots["error-no-selection"][0].text:(0,u.__)("No selection has been made.")).subscribe():i.kX.error(this.$slots["error-no-action"]?this.$slots["error-no-action"][0].text:(0,u.__)("No action has been selected.")).subscribe()},refresh:function(){var e=this;this.globallyChecked=!1,this.isRefreshing=!0,i.ih.get("".concat(this.getParsedSrc)).subscribe((function(t){t.data=t.data.map((function(t){return e.selectedEntries.filter((function(e){return e.$id===t.$id})).length>0&&(t.$checked=!0),t})),e.isRefreshing=!1,e.result=t,e.page=t.current_page}),(function(t){e.isRefreshing=!1,i.kX.error(t.message).subscribe()}))}},template:'\n
    \n
    \n \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \n \n
    \n {{ column.label }}\n \n \n \n \n
    \n
    {{ __( \'There is nothing to display...\' ) }}
    \n
    \n
    \n
    \n
    \n \n \n
    \n
    \n
    {{ resultInfo }}
    \n \n
    \n
    \n
    \n '}),b=s.default.component("ns-table-row",{props:["options","row","columns"],data:function(){return{optionsToggled:!1}},mounted:function(){},methods:{sanitizeHTML:function(e){var t=document.createElement("div");t.innerHTML=e;for(var n=t.getElementsByTagName("script"),s=n.length;s--;)n[s].parentNode.removeChild(n[s]);return t.innerHTML},getElementOffset:function(e){var t=e.getBoundingClientRect();return{top:t.top+window.pageYOffset,left:t.left+window.pageXOffset}},toggleMenu:function(e){var t=this;if(this.row.$toggled=!this.row.$toggled,this.$emit("toggled",this.row),this.row.$toggled)setTimeout((function(){var e=t.$el.querySelectorAll(".relative > .absolute")[0],n=t.$el.querySelectorAll(".relative")[0],s=t.getElementOffset(n);e.style.top=s.top+"px",e.style.left=s.left+"px",n.classList.remove("relative"),n.classList.add("dropdown-holder")}),100);else{var n=this.$el.querySelectorAll(".dropdown-holder")[0];n.classList.remove("dropdown-holder"),n.classList.add("relative")}},handleChanged:function(e){this.row.$checked=e,this.$emit("updated",this.row)},triggerAsync:function(e){var t=this;e.confirm?confirm(e.confirm.message)&&i.ih[e.type.toLowerCase()](e.url).subscribe((function(e){i.kX.success(e.message).subscribe(),t.$emit("reload",t.row)}),(function(e){t.toggleMenu(),i.kX.error(e.message).subscribe()})):(i.l.emit({identifier:"ns-table-row-action",value:{action:e,row:this.row,component:this}}),this.toggleMenu())}},template:'\n \n \n \n \n \n \n \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n \n \n '}),g=s.default.component("ns-spinner",{data:function(){return{}},mounted:function(){},computed:{validatedSize:function(){return this.size||24},validatedBorder:function(){return this.border||8},validatedAnimation:function(){return this.animation||"fast"}},props:["color","size","border"],template:"\n
    \n
    \n
    \n "}),y=n(7266),x=s.default.component("ns-crud-form",{data:function(){return{form:{},globallyChecked:!1,formValidation:new y.Z,rows:[]}},mounted:function(){this.loadForm()},props:["src","create-url","field-class","return-url","submit-url","submit-method","disable-tabs"],computed:{activeTabFields:function(){for(var e in this.form.tabs)if(this.form.tabs[e].active)return this.form.tabs[e].fields;return[]}},methods:{toggle:function(e){for(var t in this.form.tabs)this.form.tabs[t].active=!1;this.form.tabs[e].active=!0},handleShowOptions:function(e){this.rows.forEach((function(t){t.$id!==e.$id&&(t.$toggled=!1)}))},submit:function(){var e=this;return this.formValidation.validateForm(this.form).length>0?i.kX.error(this.$slots["error-invalid-form"]?this.$slots["error-invalid-form"][0].text:"No error message provided for having an invalid form.",this.$slots.okay?this.$slots.okay[0].text:"OK").subscribe():(this.formValidation.disableForm(this.form),void 0===this.submitUrl?i.kX.error(this.$slots["error-no-submit-url"]?this.$slots["error-no-submit-url"][0].text:"No error message provided for not having a valid submit url.",this.$slots.okay?this.$slots.okay[0].text:"OK").subscribe():void i.ih[this.submitMethod?this.submitMethod.toLowerCase():"post"](this.submitUrl,this.formValidation.extractForm(this.form)).subscribe((function(t){if("success"===t.status){if(e.returnUrl&&e.returnUrl.length>0)return document.location=e.returnUrl;e.$emit("save",t)}e.formValidation.enableForm(e.form)}),(function(t){i.kX.error(t.message,void 0,{duration:5e3}).subscribe(),e.formValidation.triggerError(e.form,t),e.formValidation.enableForm(e.form)})))},handleGlobalChange:function(e){this.globallyChecked=e,this.rows.forEach((function(t){return t.$checked=e}))},loadForm:function(){var e=this;i.ih.get("".concat(this.src)).subscribe({next:function(t){e.form=e.parseForm(t.form),i.kq.doAction("ns-crud-form-loaded",e),e.$emit("updated",e.form)},error:function(e){i.kX.error(e.message,"OKAY",{duration:0}).subscribe()}})},parseForm:function(e){e.main.value=void 0===e.main.value?"":e.main.value,e.main=this.formValidation.createFields([e.main])[0];var t=0;for(var n in e.tabs)0===t&&(e.tabs[n].active=!0),e.tabs[n].active=void 0!==e.tabs[n].active&&e.tabs[n].active,e.tabs[n].fields=this.formValidation.createFields(e.tabs[n].fields),t++;return e}},template:'\n
    \n
    \n \n
    \n
    \n
    \n
    \n \n
    \n Return\n
    \n
    \n \n
    \n
    \n
    \n
    {{ tab.label }}
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n '}),w=s.default.component("ns-textarea",{data:function(){return{}},mounted:function(){},computed:{hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},disabledClass:function(){return this.field.disabled?"bg-gray-200 cursor-not-allowed":"bg-transparent"},inputClass:function(){return this.disabledClass+" "+this.leadClass},leadClass:function(){return this.leading?"p-8":"p-2"}},props:["placeholder","leading","type","field"],template:'\n
    \n \n
    \n
    \n \n {{ leading }}\n \n
    \n \n
    \n

    \n

    \n This field is required.\n This field must contain a valid email address.\n {{ error.message }}\n

    \n
    \n '}),_=s.default.component("ns-field",{data:function(){return{}},mounted:function(){},computed:{isInputField:function(){return["text","password","email","number","tel"].includes(this.field.type)},isDateField:function(){return["date"].includes(this.field.type)},isSelectField:function(){return["select"].includes(this.field.type)},isTextarea:function(){return["textarea"].includes(this.field.type)},isCheckbox:function(){return["checkbox"].includes(this.field.type)},isMultiselect:function(){return["multiselect"].includes(this.field.type)},isSelectAudio:function(){return["select-audio"].includes(this.field.type)},isSwitch:function(){return["switch"].includes(this.field.type)},isMedia:function(){return["media"].includes(this.field.type)},isCkEditor:function(){return["ckeditor"].includes(this.field.type)},isDateTimePicker:function(){return["datetimepicker"].includes(this.field.type)},isCustom:function(){return["custom"].includes(this.field.type)}},props:["field"],methods:{addOption:function(e){"select"===this.field.type&&this.field.options.forEach((function(e){return e.selected=!1})),e.selected=!0;var t=this.field.options.indexOf(e);this.field.options.splice(t,1),this.field.options.unshift(e),this.refreshMultiselect(),this.$emit("change",{action:"addOption",option:e})},refreshMultiselect:function(){this.field.value=this.field.options.filter((function(e){return e.selected})).map((function(e){return e.value}))},removeOption:function(e){e.selected=!1,this.refreshMultiselect(),this.$emit("change",{action:"removeOption",option:e})}},template:'\n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n '}),k=s.default.component("ns-multiselect",{data:function(){return{showPanel:!1,search:""}},props:["field"],computed:{hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},_options:function(){var e=this;return this.field.options.map((function(t){return t.selected=void 0!==t.selected&&t.selected,e.field.value&&e.field.value.includes(t.value)&&(t.selected=!0),t}))}},methods:{__:u.__,addOption:function(e){this.field.disabled||(this.$emit("addOption",e),this.$forceUpdate(),setTimeout((function(){}),100))},removeOption:function(e,t){var n=this;if(!this.field.disabled)return t.preventDefault(),t.stopPropagation(),this.$emit("removeOption",e),this.$forceUpdate(),setTimeout((function(){n.search=""}),100),!1}},mounted:function(){var e=this;this.field.value&&this.field.value.reverse().forEach((function(t){var n=e.field.options.filter((function(e){return e.value===t}));n.length>=0&&e.addOption(n[0])}))},template:'\n
    \n \n
    \n
    \n
    \n
    \n
    \n {{ option.label }}\n \n
    \n
    \n
    \n
    \n \n \n
    \n
    \n \n
    \n
    \n

    \n

    \n {{ __( \'This field is required.\' ) }}\n {{ __( \'This field must contain a valid email address.\' ) }}\n {{ error.message }}\n

    \n
    \n
    \n '}),j=s.default.component("ns-switch",{data:function(){return{}},mounted:function(){},computed:{_options:function(){var e=this;return this.field.options.map((function(t){return t.selected=t.value===e.field.value,t}))},hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},disabledClass:function(){return this.field.disabled?"bg-gray-200 cursor-not-allowed":""},sizeClass:function(){return" w-1/".concat(this._options.length<=4?this._options.length:4)},inputClass:function(){return this.disabledClass+" "+this.leadClass},leadClass:function(){return this.leading?"pl-8":"px-4"}},methods:{__:u.__,setSelected:function(e){this.field.value=e.value,this._options.forEach((function(e){return e.selected=!1})),e.selected=!0,this.$forceUpdate(),this.$emit("change",e.value)}},props:["placeholder","leading","type","field"],template:'\n
    \n \n
    \n \n
    \n

    \n

    \n {{ __( \'This field is required.\' ) }}\n

    \n
    \n '}),C=s.default.component("ns-date",{data:function(){return{}},mounted:function(){},computed:{hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},disabledClass:function(){return this.field.disabled?"bg-gray-200 cursor-not-allowed":"bg-transparent"},inputClass:function(){return this.disabledClass+" "+this.leadClass},leadClass:function(){return this.leading?"pl-8":"px-4"}},props:["placeholder","leading","type","field"],template:'\n
    \n \n
    \n
    \n \n {{ leading }}\n \n
    \n \n
    \n

    \n

    \n {{ __( \'This field is required.\' ) }}\n {{ __( \'This field must contain a valid email address.\' ) }}\n {{ error.message }}\n

    \n
    \n '}),$=n(9576),S=s.default.component("ns-media-input",{template:'\n
    \n \n
    \n
    \n \n {{ leading }}\n \n
    \n
    \n
    \n \n
    \n \n \n
    \n
    \n

    \n

    \n {{ __( \'This field is required.\' ) }}\n {{ __( \'This field must contain a valid email address.\' ) }}\n {{ error.message }}\n

    \n
    \n ',computed:{hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},disabledClass:function(){return this.field.disabled?"bg-gray-200 cursor-not-allowed":"bg-transparent"},inputClass:function(){return this.disabledClass+" "+this.leadClass},leadClass:function(){return this.leading?"pl-8":"px-4"}},data:function(){return{}},props:["placeholder","leading","type","field"],mounted:function(){},methods:{toggleMedia:function(){var e=this;new Promise((function(t,n){p.G.show($.Z,Object.assign({resolve:t,reject:n},e.field.data||{}))})).then((function(t){"use-selected"===t.event&&(e.field.data&&"url"!==e.field.data.type?e.field.data&&"model"!==e.field.data.type||(e.field.value=t.value[0]):e.field.value=t.value[0].sizes.original,e.$forceUpdate())}))}}}),E=s.default.component("ns-close-button",{template:'\n \n ',methods:{clicked:function(e){this.$emit("click",e)}}}),T=s.default.component("ns-icon-button",{template:'\n \n ',props:["className","buttonClass"],methods:{clicked:function(e){this.$emit("click",e)}}}),O=n(1272),F=n.n(O),D=n(5234),P=n.n(D),A=s.default.component("ns-ckeditor",{data:function(){return{editor:P()}},components:{ckeditor:F().component},mounted:function(){},methods:{__:u.__},computed:{hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},disabledClass:function(){return this.field.disabled?"bg-gray-200 cursor-not-allowed":"bg-transparent"},inputClass:function(){return this.disabledClass+" "+this.leadClass},leadClass:function(){return this.leading?"p-8":"p-2"}},props:["placeholder","leading","type","field"],template:'\n
    \n \n
    \n
    \n \n {{ leading }}\n \n
    \n \n
    \n

    \n

    \n {{ __( \'This field is required.\' ) }}\n {{ __( \'This field must contain a valid email address.\' ) }}\n {{ error.message }}\n

    \n
    \n '}),q=s.default.component("ns-tabs",{data:function(){return{childrens:[]}},props:["active"],computed:{activeComponent:function(){var e=this.$children.filter((function(e){return e.active}));return e.length>0&&e[0]}},methods:{toggle:function(e){this.$emit("active",e.identifier),this.$emit("changeTab",e.identifier)}},mounted:function(){this.childrens=this.$children},template:'\n
    \n
    \n
    {{ tab.label }}
    \n
    \n \n
    \n '}),z=s.default.component("ns-tabs-item",{data:function(){return{}},mounted:function(){},props:["label","identifier","padding"],template:'\n
    \n \n
    \n '}),X=n(8655),M=n(3968),V=n(1726),R=n(7259);const N=s.default.extend({methods:{__:u.__},data:function(){return{svg:""}},mounted:function(){this.svg=(0,V.createAvatar)(R,{seed:this.displayName})},computed:{avatarUrl:function(){return 0===this.url.length?"":this.url}},props:["url","display-name"]});const L=(0,n(1900).Z)(N,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"flex justify-between items-center flex-shrink-0"},[n("span",{staticClass:"hidden md:inline-block text-gray-600 px-2"},[e._v(e._s(e.__("Howdy, {name}").replace("{name}",this.displayName)))]),e._v(" "),n("span",{staticClass:"md:hidden text-gray-600 px-2"},[e._v(e._s(e.displayName))]),e._v(" "),n("div",{staticClass:"px-2"},[n("div",{staticClass:"w-8 h-8 overflow-hidden rounded-full bg-gray-600"},[""!==e.avatarUrl?n("img",{staticClass:"w-8 h-8 overflow-hidden rounded-full",attrs:{src:e.avatarUrl,alt:e.displayName,srcset:""}}):e._e(),e._v(" "),""===e.avatarUrl?n("div",{domProps:{innerHTML:e._s(e.svg)}}):e._e()])])])}),[],!1,null,null,null).exports;var I=n(6598).Z},8655:(e,t,n)=>{"use strict";n.d(t,{V:()=>l});var s=n(538),i=n(381),r=n.n(i),a=n(7389),l=s.default.component("ns-date-time-picker",{template:'\n
    \n \n
    \n \n \n {{ currentDay.format( \'YYYY/MM/DD HH:mm\' ) }}\n N/A\n \n
    \n

    {{ field.description }}

    \n \n
    \n ',props:["field","date"],data:function(){return{visible:!1,hours:0,minutes:0,currentDay:null,daysOfWeek:new Array(7).fill("").map((function(e,t){return t})),calendar:[[]]}},watch:{visible:function(){var e=this;this.visible&&setTimeout((function(){e.$refs.hours.addEventListener("focus",(function(){this.select()})),e.$refs.minutes.addEventListener("focus",(function(){this.select()}))}),100)}},mounted:function(){var e=this;document.addEventListener("mousedown",(function(t){return e.checkClickedItem(t)})),this.field?this.currentDay=[void 0,null,""].includes(this.field.value)?r()():r()(this.field.value):this.currentDay=[void 0,null,""].includes(this.date)?r()():r()(this.date),this.hours=this.currentDay.format("HH"),this.minutes=this.currentDay.format("mm"),this.build()},methods:{__:a.__,detectHoursChange:function(){parseFloat(this.hours)<0&&(this.hours=0),parseFloat(this.hours)>23&&(this.hours=23),this.updateDateTime()},detectMinuteChange:function(){parseFloat(this.minutes)<0&&(this.minutes=0),parseFloat(this.minutes)>59&&(this.minutes=59),this.updateDateTime()},updateDateTime:function(){this.currentDay.hours(this.hours),this.currentDay.minutes(this.minutes),this.selectDate(this.currentDay)},checkClickedItem:function(e){!this.$el.contains(e.srcElement)&&this.visible&&(this.visible=!1)},selectDate:function(e){this.currentDay=e,this.currentDay.hours(this.hours),this.currentDay.minutes(this.minutes);var t=this.currentDay.format("YYYY/MM/DD HH:mm");this.field?(this.field.value=t,this.$emit("change",this.field)):this.$emit("change",this.currentDay)},subMonth:function(){this.currentDay.subtract(1,"month"),this.build()},addMonth:function(){this.currentDay.add(1,"month"),this.build()},resetCalendar:function(){this.calendar=[[]]},build:function(){this.resetCalendar();this.currentDay.clone().startOf("month");for(var e=this.currentDay.clone().startOf("month"),t=this.currentDay.clone().endOf("month");;){0===e.day()&&this.calendar[0].length>0&&this.calendar.push([]);var n=this.calendar.length-1;if(this.calendar[n].push({date:e.clone(),dayOfWeek:e.day(),isToday:e.isSame(r().now(),"day")}),e.isSame(t,"day"))break;e.add(1,"day")}}}})},4451:(e,t,n)=>{"use strict";n.d(t,{R:()=>i});var s=n(7389),i=n(538).default.component("ns-select",{data:function(){return{}},props:["name","placeholder","field"],computed:{hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},disabledClass:function(){return this.field.disabled?"bg-gray-200 cursor-not-allowed":"bg-transparent"},inputClass:function(){return this.disabledClass+" "+this.leadClass},leadClass:function(){return this.leading?"pl-8":"px-4"}},methods:{__:s.__},template:'\n
    \n \n
    \n \n
    \n

    \n

    \n {{ __( \'This field is required.\' ) }}\n {{ __( \'This field must contain a valid email address.\' ) }}\n {{ error.message }}\n

    \n
    \n '})},1356:(e,t,n)=>{"use strict";n.d(t,{W:()=>d,f:()=>c});var s=n(538),i=n(2077),r=n.n(i),a=n(6740),l=n.n(a),o=new Array(parseInt(ns.currency.ns_currency_precision)).fill("").map((function(e){return 0})).join(""),d=s.default.filter("currency",(function(e){var t,n,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"full";switch(ns.currency.ns_currency_prefered){case"iso":t=ns.currency.ns_currency_iso;break;case"symbol":t=ns.currency.ns_currency_symbol}if("full"===s){var i={decimal:ns.currency.ns_currency_decimal_separator,separator:ns.currency.ns_currency_thousand_separator,precision:parseInt(ns.currency.ns_currency_precision),symbol:""};n=l()(e,i).format()}else n=r()(e).format("0.0a");return"".concat("before"===ns.currency.ns_currency_position?t:"").concat(n).concat("after"===ns.currency.ns_currency_position?t:"")})),c=function(e){var t="0.".concat(o);return parseFloat(r()(e).format(t))}},9698:(e,t,n)=>{"use strict";n.d(t,{b:()=>s});var s=n(538).default.filter("truncate",(function(e,t){return e?(e=e.toString()).length>t?e.substring(0,t)+"...":e:""}))},7266:(e,t,n)=>{"use strict";function s(e,t){for(var n=0;ni});var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,i;return t=e,(n=[{key:"validateFields",value:function(e){var t=this;return 0===e.map((function(e){return t.checkField(e),e.errors?0===e.errors.length:0})).filter((function(e){return!1===e})).length}},{key:"validateFieldsErrors",value:function(e){var t=this;return e.map((function(e){return t.checkField(e),e.errors})).flat()}},{key:"validateForm",value:function(e){e.main&&this.validateField(e.main);var t=[];for(var n in e.tabs){var s=[],i=this.validateFieldsErrors(e.tabs[n].fields);i.length>0&&s.push(i),e.tabs[n].errors=s.flat(),t.push(s.flat())}return t.flat().filter((function(e){return void 0!==e}))}},{key:"initializeTabs",value:function(e){var t=0;for(var n in e)0===t&&(e[n].active=!0),e[n].active=void 0!==e[n].active&&e[n].active,e[n].fields=this.createFields(e[n].fields),t++;return e}},{key:"validateField",value:function(e){return this.checkField(e)}},{key:"fieldsValid",value:function(e){return!(e.map((function(e){return e.errors&&e.errors.length>0})).filter((function(e){return e})).length>0)}},{key:"createFields",value:function(e){return e.map((function(e){return e.type=e.type||"text",e.errors=e.errors||[],e.disabled=e.disabled||!1,"custom"===e.type&&(e.component=nsExtraComponents[e.name]),e}))}},{key:"createForm",value:function(e){if(e.main&&(e.main=this.createFields([e.main])[0]),e.tabs)for(var t in e.tabs)e.tabs[t].fields=this.createFields(e.tabs[t].fields),e.tabs[t].errors=[];return e}},{key:"enableFields",value:function(e){return e.map((function(e){return e.disabled=!1}))}},{key:"disableFields",value:function(e){return e.map((function(e){return e.disabled=!0}))}},{key:"disableForm",value:function(e){for(var t in e.main&&(e.main.disabled=!0),e.tabs)e.tabs[t].fields.forEach((function(e){return e.disabled=!0}))}},{key:"enableForm",value:function(e){for(var t in e.main&&(e.main.disabled=!1),e.tabs)e.tabs[t].fields.forEach((function(e){return e.disabled=!1}))}},{key:"getValue",value:function(e){var t={};return e.forEach((function(e){t[e.name]=e.value})),t}},{key:"checkField",value:function(e){var t=this;return void 0!==e.validation&&(e.errors=[],this.detectValidationRules(e.validation).forEach((function(n){t.fieldPassCheck(e,n)}))),e}},{key:"extractForm",value:function(e){var t={};if(e.main&&(t[e.main.name]=e.main.value),e.tabs)for(var n in e.tabs)void 0===t[n]&&(t[n]={}),t[n]=this.extractFields(e.tabs[n].fields);return t}},{key:"extractFields",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.forEach((function(e){["multiselect"].includes(e.type)?t[e.name]=e.options.filter((function(e){return e.selected})).map((function(e){return e.value})):t[e.name]=e.value})),t}},{key:"detectValidationRules",value:function(e){var t=function(e){var t;return["email","required"].includes(e)?{identifier:e}:(t=/(min)\:([0-9])+/g.exec(e))||(t=/(max)\:([0-9])+/g.exec(e))?{identifier:t[1],value:t[2]}:e};return Array.isArray(e)?e.filter((function(e){return"string"==typeof e})).map(t):e.split("|").map(t)}},{key:"triggerError",value:function(e,t){if(t.errors){var n=function(n){var s=n.split(".").filter((function(e){return!/^\d+$/.test(e)}));2===s.length&&e.tabs[s[0]].fields.forEach((function(e){e.name===s[1]&&t.errors[n].forEach((function(t){var n={identifier:"invalid",invalid:!0,message:t,name:e.name};e.errors.push(n)}))})),n===e.main.name&&t.errors[n].forEach((function(t){e.main.errors.push({identifier:"invalid",invalid:!0,message:t,name:e.main.name})}))};for(var s in t.errors)n(s)}}},{key:"triggerFieldsErrors",value:function(e,t){if(t&&t.errors){var n=function(n){e.forEach((function(e){e.name===n&&t.errors[n].forEach((function(t){var n={identifier:"invalid",invalid:!0,message:t,name:e.name};e.errors.push(n)}))}))};for(var s in t.errors)n(s)}}},{key:"fieldPassCheck",value:function(e,t){if("required"===t.identifier){if(void 0===e.value||null===e.value||0===e.value.length)return e.errors.push({identifier:t.identifier,invalid:!0,name:e.name});e.errors.forEach((function(n,s){n.identifier===t.identifier&&!0===n.invalid&&e.errors.splice(s,1)}))}if("email"===t.identifier){if(!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(e.value))return e.errors.push({identifier:t.identifier,invalid:!0,name:e.name});e.errors.forEach((function(n,s){!0===n[t.identifier]&&e.errors.splice(s,1)}))}return e}}])&&s(t.prototype,n),i&&s(t,i),e}()},7389:(e,t,n)=>{"use strict";n.d(t,{__:()=>s,c:()=>i});var s=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"NexoPOS";return nsLanguage.getEntries(t)&&nsLanguage.getEntries(t)[e]||e},i=function(e,t){return nsLanguage.getEntries(t)&&nsLanguage.getEntries(t)[e]||e}},8603:(e,t,n)=>{"use strict";function s(){var e=this;Object.keys(this).includes("$popup")&&this.$popup.event.subscribe((function(t){"click-overlay"===t.event&&(e.$popupParams&&void 0!==e.$popupParams.reject&&e.$popupParams.reject(!1),e.$popup.close()),"press-esc"===t.event&&(e.$popupParams&&void 0!==e.$popupParams.reject&&e.$popupParams.reject(!1),e.$popup.close())}))}n.d(t,{Z:()=>s})},6386:(e,t,n)=>{"use strict";function s(e){void 0!==this.$popupParams.resolve&&this.$popupParams.reject&&(!1!==e?this.$popupParams.resolve(e):this.$popupParams.reject(e)),this.$popup.close()}n.d(t,{Z:()=>s})},2242:(e,t,n)=>{"use strict";n.d(t,{G:()=>a});var s=n(9248);function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};if(i(this,e),this.config={primarySelector:void 0,popupClass:"shadow-lg h-half w-1/2 bg-white"},this.container=document.createElement("div"),this.popupBody=document.createElement("div"),this.config=Object.assign(this.config,t),void 0===this.config.primarySelector&&document.querySelectorAll(".is-popup").length>0){var n=document.querySelectorAll(".is-popup").length;this.parentWrapper=document.querySelectorAll(".is-popup")[n-1]}else this.parentWrapper=document.querySelector("body").querySelectorAll("div")[0];this.event=new s.x}var t,n,a;return t=e,a=[{key:"show",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=new e(s);return i.open(t,n),i}}],(n=[{key:"open",value:function(e){var t,n,s,i=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=document.querySelector("body").querySelectorAll("div")[0];this.parentWrapper.style.filter="blur(4px)",a.style.filter="blur(6px)",this.container.setAttribute("class","absolute top-0 left-0 w-full h-full flex items-center justify-center is-popup"),this.container.addEventListener("click",(function(e){i.event.next({event:"click-overlay",value:!0}),e.stopPropagation()})),this.popupBody.addEventListener("click",(function(e){e.stopImmediatePropagation()})),this.container.style.background="rgb(51 51 51 / 20%)",this.container.id="popup-container-"+document.querySelectorAll(".is-popup").length,this.popupBody.setAttribute("class"," zoom-out-entrance"),this.popupBody.innerHTML='',this.container.appendChild(this.popupBody),document.body.appendChild(this.container);var l=Vue.extend(e);this.instance=new l({propsData:{popup:this}}),this.instance.template=(null===(t=null==e?void 0:e.options)||void 0===t?void 0:t.template)||void 0,this.instance.render=e.render||void 0,this.instance.methods=(null===(n=null==e?void 0:e.options)||void 0===n?void 0:n.methods)||(null==e?void 0:e.methods),this.instance.data=(null===(s=null==e?void 0:e.options)||void 0===s?void 0:s.data)||(null==e?void 0:e.data),this.instance.$popup=this,this.instance.$popupParams=r,this.instance.$mount("#".concat(this.container.id," .popup-body"))}},{key:"close",value:function(){var e=this;this.instance.$destroy(),this.event.unsubscribe(),this.parentWrapper.style.filter="blur(0px)";var t=document.querySelector("body").querySelectorAll("div")[0];document.querySelectorAll(".is-popup").length<=1&&(t.style.filter="blur(0px)"),this.popupBody.classList.remove("zoom-out-entrance"),this.popupBody.classList.add("zoom-in-exit"),this.container.classList.remove("is-popup"),setTimeout((function(){e.container.remove()}),300)}}])&&r(t.prototype,n),a&&r(t,a),e}()},9624:(e,t,n)=>{"use strict";n.d(t,{S:()=>r});var s=n(3260);function i(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"info"};return s.Observable.create((function(s){var r=n.__createSnack({message:e,label:t,type:i.type}),a=r.buttonNode,l=(r.textNode,r.snackWrapper,r.sampleSnack);a.addEventListener("click",(function(e){s.onNext(a),s.onCompleted(),l.remove()})),n.__startTimer(i.duration,l)}))}},{key:"error",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"error"};return this.show(e,t,Object.assign(Object.assign({},n),{type:"error"}))}},{key:"success",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"success"};return this.show(e,t,Object.assign(Object.assign({},n),{type:"success"}))}},{key:"info",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"info"};return this.show(e,t,Object.assign(Object.assign({},n),{type:"info"}))}},{key:"__startTimer",value:function(e,t){var n,s=function(){e>0&&!1!==e&&(n=setTimeout((function(){t.remove()}),e))};t.addEventListener("mouseenter",(function(){clearTimeout(n)})),t.addEventListener("mouseleave",(function(){s()})),s()}},{key:"__createSnack",value:function(e){var t=e.message,n=e.label,s=e.type,i=void 0===s?"info":s,r=document.getElementById("snack-wrapper")||document.createElement("div"),a=document.createElement("div"),l=document.createElement("p"),o=document.createElement("div"),d=document.createElement("button"),c="",u="";switch(i){case"info":c="text-white hover:bg-blue-400 bg-blue-500",u="bg-gray-900 text-white";break;case"error":c="text-red-700 hover:bg-white bg-white",u="bg-red-500 text-white";break;case"success":c="text-green-700 hover:bg-white bg-white",u="bg-green-500 text-white"}return l.textContent=t,n&&(d.textContent=n,d.setAttribute("class","px-3 py-2 shadow rounded-lg font-bold ".concat(c)),o.appendChild(d)),a.appendChild(l),a.appendChild(o),a.setAttribute("class","md:rounded-lg py-2 px-3 md:w-2/5 w-full z-10 md:my-2 shadow-lg flex justify-between items-center zoom-in-entrance anim-duration-300 ".concat(u)),r.appendChild(a),null===document.getElementById("snack-wrapper")&&(r.setAttribute("id","snack-wrapper"),r.setAttribute("class","absolute bottom-0 w-full flex justify-between items-center flex-col"),document.body.appendChild(r)),{snackWrapper:r,sampleSnack:a,buttonsWrapper:o,buttonNode:d,textNode:l}}}])&&i(t.prototype,n),r&&i(t,r),e}()},6700:(e,t,n)=>{var s={"./af":2786,"./af.js":2786,"./ar":867,"./ar-dz":4130,"./ar-dz.js":4130,"./ar-kw":6135,"./ar-kw.js":6135,"./ar-ly":6440,"./ar-ly.js":6440,"./ar-ma":7702,"./ar-ma.js":7702,"./ar-sa":6040,"./ar-sa.js":6040,"./ar-tn":7100,"./ar-tn.js":7100,"./ar.js":867,"./az":1083,"./az.js":1083,"./be":9808,"./be.js":9808,"./bg":8338,"./bg.js":8338,"./bm":7438,"./bm.js":7438,"./bn":8905,"./bn-bd":6225,"./bn-bd.js":6225,"./bn.js":8905,"./bo":1560,"./bo.js":1560,"./br":1278,"./br.js":1278,"./bs":622,"./bs.js":622,"./ca":2468,"./ca.js":2468,"./cs":5822,"./cs.js":5822,"./cv":877,"./cv.js":877,"./cy":7373,"./cy.js":7373,"./da":4780,"./da.js":4780,"./de":9740,"./de-at":217,"./de-at.js":217,"./de-ch":894,"./de-ch.js":894,"./de.js":9740,"./dv":5300,"./dv.js":5300,"./el":837,"./el.js":837,"./en-au":8348,"./en-au.js":8348,"./en-ca":7925,"./en-ca.js":7925,"./en-gb":2243,"./en-gb.js":2243,"./en-ie":6436,"./en-ie.js":6436,"./en-il":7207,"./en-il.js":7207,"./en-in":4175,"./en-in.js":4175,"./en-nz":6319,"./en-nz.js":6319,"./en-sg":1662,"./en-sg.js":1662,"./eo":2915,"./eo.js":2915,"./es":7093,"./es-do":5251,"./es-do.js":5251,"./es-mx":6112,"./es-mx.js":6112,"./es-us":1146,"./es-us.js":1146,"./es.js":7093,"./et":5603,"./et.js":5603,"./eu":7763,"./eu.js":7763,"./fa":6959,"./fa.js":6959,"./fi":1897,"./fi.js":1897,"./fil":2549,"./fil.js":2549,"./fo":4694,"./fo.js":4694,"./fr":4470,"./fr-ca":3049,"./fr-ca.js":3049,"./fr-ch":2330,"./fr-ch.js":2330,"./fr.js":4470,"./fy":5044,"./fy.js":5044,"./ga":9295,"./ga.js":9295,"./gd":2101,"./gd.js":2101,"./gl":8794,"./gl.js":8794,"./gom-deva":7884,"./gom-deva.js":7884,"./gom-latn":3168,"./gom-latn.js":3168,"./gu":5349,"./gu.js":5349,"./he":4206,"./he.js":4206,"./hi":94,"./hi.js":94,"./hr":316,"./hr.js":316,"./hu":2138,"./hu.js":2138,"./hy-am":1423,"./hy-am.js":1423,"./id":9218,"./id.js":9218,"./is":135,"./is.js":135,"./it":626,"./it-ch":150,"./it-ch.js":150,"./it.js":626,"./ja":9183,"./ja.js":9183,"./jv":4286,"./jv.js":4286,"./ka":2105,"./ka.js":2105,"./kk":7772,"./kk.js":7772,"./km":8758,"./km.js":8758,"./kn":9282,"./kn.js":9282,"./ko":3730,"./ko.js":3730,"./ku":1408,"./ku.js":1408,"./ky":3291,"./ky.js":3291,"./lb":6841,"./lb.js":6841,"./lo":5466,"./lo.js":5466,"./lt":7010,"./lt.js":7010,"./lv":7595,"./lv.js":7595,"./me":9861,"./me.js":9861,"./mi":5493,"./mi.js":5493,"./mk":5966,"./mk.js":5966,"./ml":7341,"./ml.js":7341,"./mn":5115,"./mn.js":5115,"./mr":370,"./mr.js":370,"./ms":9847,"./ms-my":1237,"./ms-my.js":1237,"./ms.js":9847,"./mt":2126,"./mt.js":2126,"./my":6165,"./my.js":6165,"./nb":4924,"./nb.js":4924,"./ne":6744,"./ne.js":6744,"./nl":3901,"./nl-be":9814,"./nl-be.js":9814,"./nl.js":3901,"./nn":3877,"./nn.js":3877,"./oc-lnc":2135,"./oc-lnc.js":2135,"./pa-in":5858,"./pa-in.js":5858,"./pl":4495,"./pl.js":4495,"./pt":9520,"./pt-br":7971,"./pt-br.js":7971,"./pt.js":9520,"./ro":6459,"./ro.js":6459,"./ru":238,"./ru.js":238,"./sd":950,"./sd.js":950,"./se":490,"./se.js":490,"./si":124,"./si.js":124,"./sk":4249,"./sk.js":4249,"./sl":4985,"./sl.js":4985,"./sq":1104,"./sq.js":1104,"./sr":9131,"./sr-cyrl":9915,"./sr-cyrl.js":9915,"./sr.js":9131,"./ss":5893,"./ss.js":5893,"./sv":8760,"./sv.js":8760,"./sw":1172,"./sw.js":1172,"./ta":7333,"./ta.js":7333,"./te":3110,"./te.js":3110,"./tet":2095,"./tet.js":2095,"./tg":7321,"./tg.js":7321,"./th":9041,"./th.js":9041,"./tk":9005,"./tk.js":9005,"./tl-ph":5768,"./tl-ph.js":5768,"./tlh":9444,"./tlh.js":9444,"./tr":2397,"./tr.js":2397,"./tzl":8254,"./tzl.js":8254,"./tzm":1106,"./tzm-latn":699,"./tzm-latn.js":699,"./tzm.js":1106,"./ug-cn":9288,"./ug-cn.js":9288,"./uk":7691,"./uk.js":7691,"./ur":3795,"./ur.js":3795,"./uz":6791,"./uz-latn":588,"./uz-latn.js":588,"./uz.js":6791,"./vi":5666,"./vi.js":5666,"./x-pseudo":4378,"./x-pseudo.js":4378,"./yo":5805,"./yo.js":5805,"./zh-cn":3839,"./zh-cn.js":3839,"./zh-hk":5726,"./zh-hk.js":5726,"./zh-mo":9807,"./zh-mo.js":9807,"./zh-tw":4152,"./zh-tw.js":4152};function i(e){var t=r(e);return n(t)}function r(e){if(!n.o(s,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return s[e]}i.keys=function(){return Object.keys(s)},i.resolve=r,e.exports=i,i.id=6700},6598:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var s=n(381),i=n.n(s);const r={name:"ns-datepicker",props:["label","date"],data:function(){return{visible:!1,currentDay:null,daysOfWeek:new Array(7).fill("").map((function(e,t){return t})),calendar:[[]]}},mounted:function(){document.addEventListener("click",this.checkClickedItem),this.currentDay=[void 0,null].includes(this.date)?i()():i()(this.date),this.build()},methods:{__:n(7389).__,checkClickedItem:function(e){!this.$el.contains(e.srcElement)&&this.visible&&(this.visible=!1)},selectDate:function(e){this.currentDay=e,this.visible=!1,this.$emit("change",e)},subMonth:function(){this.currentDay.subtract(1,"month"),this.build()},addMonth:function(){this.currentDay.add(1,"month"),this.build()},resetCalendar:function(){this.calendar=[[]]},build:function(){this.resetCalendar();this.currentDay.clone().startOf("month");for(var e=this.currentDay.clone().startOf("month"),t=this.currentDay.clone().endOf("month");;){0===e.day()&&this.calendar[0].length>0&&this.calendar.push([]);var n=this.calendar.length-1;if(this.calendar[n].push({date:e.clone(),dayOfWeek:e.day(),isToday:e.isSame(i().now(),"day")}),e.isSame(t,"day"))break;e.add(1,"day")}}}};const a=(0,n(1900).Z)(r,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"picker"},[n("div",{staticClass:"rounded cursor-pointer bg-white shadow px-1 py-1 flex items-center text-gray-700",on:{click:function(t){e.visible=!e.visible}}},[n("i",{staticClass:"las la-clock text-2xl"}),e._v(" "),n("span",{staticClass:"mx-1 text-sm"},[n("span",[e._v(e._s(e.label||e.__("Date"))+" : ")]),e._v(" "),e.currentDay?n("span",[e._v(e._s(e.currentDay.format("YYYY/MM/DD")))]):e._e(),e._v(" "),null===e.currentDay?n("span",[e._v(e._s(e.__("N/A")))]):e._e()])]),e._v(" "),e.visible?n("div",{staticClass:"relative h-0 w-0 -mb-2"},[n("div",{staticClass:"w-72 mt-2 shadow rounded bg-white anim-duration-300 zoom-in-entrance flex flex-col"},[n("div",{staticClass:"flex-auto"},[n("div",{staticClass:"p-2 flex items-center"},[n("div",[n("button",{staticClass:"w-8 h-8 bg-gray-400 rounded",on:{click:function(t){return e.subMonth()}}},[n("i",{staticClass:"las la-angle-left"})])]),e._v(" "),n("div",{staticClass:"flex flex-auto font-semibold text-gray-700 justify-center"},[e._v(e._s(e.currentDay.format("MMM"))+" "+e._s(e.currentDay.format("YYYY")))]),e._v(" "),n("div",[n("button",{staticClass:"w-8 h-8 bg-gray-400 rounded",on:{click:function(t){return e.addMonth()}}},[n("i",{staticClass:"las la-angle-right"})])])]),e._v(" "),n("div",{staticClass:"grid grid-flow-row grid-cols-7 grid-rows-1 gap-0 text-gray-700"},[n("div",{staticClass:"border border-gray-200 h-8 flex justify-center items-center text-sm"},[e._v(e._s(e.__("Sun")))]),e._v(" "),n("div",{staticClass:"border border-gray-200 h-8 flex justify-center items-center text-sm"},[e._v(e._s(e.__("Mon")))]),e._v(" "),n("div",{staticClass:"border border-gray-200 h-8 flex justify-center items-center text-sm"},[e._v(e._s(e.__("Tue")))]),e._v(" "),n("div",{staticClass:"border border-gray-200 h-8 flex justify-center items-center text-sm"},[e._v(e._s(e.__("Wed")))]),e._v(" "),n("div",{staticClass:"border border-gray-200 h-8 flex justify-center items-center text-sm"},[e._v(e._s(e.__("Thr")))]),e._v(" "),n("div",{staticClass:"border border-gray-200 h-8 flex justify-center items-center text-sm"},[e._v(e._s(e.__("Fri")))]),e._v(" "),n("div",{staticClass:"border border-gray-200 h-8 flex justify-center items-center text-sm"},[e._v(e._s(e.__("Sat")))])]),e._v(" "),e._l(e.calendar,(function(t,s){return n("div",{key:s,staticClass:"grid grid-flow-row grid-cols-7 grid-rows-1 gap-0 text-gray-700"},e._l(e.daysOfWeek,(function(s,i){return n("div",{key:i,staticClass:"h-8 flex justify-center items-center text-sm"},[e._l(t,(function(t,i){return[t.dayOfWeek===s?n("div",{key:i,staticClass:"h-full w-full flex items-center justify-center cursor-pointer",class:t.date.format("DD")===e.currentDay.format("DD")?"bg-blue-400 text-white border border-blue-500":"hover:bg-gray-100 border border-gray-200",on:{click:function(n){return e.selectDate(t.date)}}},[e._v("\n "+e._s(t.date.format("DD"))+"\n ")]):e._e()]}))],2)})),0)}))],2),e._v(" "),n("div")])]):e._e()])}),[],!1,null,null,null).exports},3968:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});function s(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,s=new Array(t);n100?100:this.backValue))),"0"===this.backValue&&(this.backValue=""),this.$emit("changed",this.floating&&this.backValue.length>0?parseFloat(this.backValue/this.number):this.backValue)):this.$emit("next",this.floating&&this.backValue.length>0?parseFloat(this.backValue/this.number):this.backValue)}}};const a=(0,n(1900).Z)(r,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"grid grid-flow-row grid-cols-3 gap-2 grid-rows-3",staticStyle:{padding:"1px"},attrs:{id:"numpad"}},[e._l(e.keys,(function(t,s){return n("div",{key:s,staticClass:"hover:bg-gray-400 hover:text-gray-800 bg-gray-300 text-2xl text-gray-700 border h-16 flex items-center justify-center cursor-pointer",staticStyle:{margin:"-1px"},on:{click:function(n){return e.inputValue(t)}}},[void 0!==t.value?n("span",[e._v(e._s(t.value))]):e._e(),e._v(" "),t.icon?n("i",{staticClass:"las",class:t.icon}):e._e()])})),e._v(" "),e._t("numpad-footer")],2)}),[],!1,null,null,null).exports},3923:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var s=n(2277),i=n(7266),r=n(162),a=n(7389);const l={name:"ns-login",props:["showRecoveryLink"],data:function(){return{fields:[],xXsrfToken:null,validation:new i.Z,isSubitting:!1}},mounted:function(){var e=this;(0,s.D)([r.ih.get("/api/nexopos/v4/fields/ns.login"),r.ih.get("/sanctum/csrf-cookie")]).subscribe({next:function(t){e.fields=e.validation.createFields(t[0]),e.xXsrfToken=r.ih.response.config.headers["X-XSRF-TOKEN"],setTimeout((function(){return r.kq.doAction("ns-login-mounted",e)}),100)},error:function(e){r.kX.error(e.message||(0,a.__)("An unexpected error occured."),(0,a.__)("OK"),{duration:0}).subscribe()}})},methods:{__:a.__,signIn:function(){var e=this;if(!this.validation.validateFields(this.fields))return r.kX.error((0,a.__)("Unable to proceed the form is not valid.")).subscribe();this.validation.disableFields(this.fields),r.kq.applyFilters("ns-login-submit",!0)&&(this.isSubitting=!0,r.ih.post("/auth/sign-in",this.validation.getValue(this.fields),{headers:{"X-XSRF-TOKEN":this.xXsrfToken}}).subscribe((function(e){document.location=e.data.redirectTo}),(function(t){e.isSubitting=!1,e.validation.enableFields(e.fields),t.data&&e.validation.triggerFieldsErrors(e.fields,t.data),r.kX.error(t.message).subscribe()})))}}};const o=(0,n(1900).Z)(l,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"bg-white rounded shadow overflow-hidden transition-all duration-100"},[n("div",{staticClass:"p-3 -my-2"},[e.fields.length>0?n("div",{staticClass:"py-2 fade-in-entrance anim-duration-300"},e._l(e.fields,(function(e,t){return n("ns-field",{key:t,attrs:{field:e}})})),1):e._e()]),e._v(" "),0===e.fields.length?n("div",{staticClass:"flex items-center justify-center py-10"},[n("ns-spinner",{attrs:{border:"4",size:"16"}})],1):e._e(),e._v(" "),e.showRecoveryLink?n("div",{staticClass:"flex w-full items-center justify-center py-4"},[n("a",{staticClass:"hover:underline text-blue-600 text-sm",attrs:{href:"/password-lost"}},[e._v(e._s(e.__("Password Forgotten ?")))])]):e._e(),e._v(" "),n("div",{staticClass:"flex justify-between items-center bg-gray-200 p-3"},[n("div",[n("ns-button",{staticClass:"justify-between",attrs:{type:"info"},on:{click:function(t){return e.signIn()}}},[e.isSubitting?n("ns-spinner",{staticClass:"mr-2",attrs:{size:"6",border:"2"}}):e._e(),e._v(" "),n("span",[e._v(e._s(e.__("Sign In")))])],1)],1),e._v(" "),n("div",[n("ns-link",{attrs:{href:"/sign-up",type:"success"}},[e._v(e._s(e.__("Register")))])],1)])])}),[],!1,null,null,null).exports},1158:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var s=n(7389),i=n(2277),r=n(7266),a=n(162);const l={name:"ns-login",props:["token","user"],data:function(){return{fields:[],xXsrfToken:null,validation:new r.Z,isSubitting:!1}},mounted:function(){var e=this;(0,i.D)([a.ih.get("/api/nexopos/v4/fields/ns.new-password"),a.ih.get("/sanctum/csrf-cookie")]).subscribe((function(t){e.fields=e.validation.createFields(t[0]),e.xXsrfToken=a.ih.response.config.headers["X-XSRF-TOKEN"],setTimeout((function(){return a.kq.doAction("ns-login-mounted",e)}),100)}),(function(e){a.kX.error(e.message||(0,s.__)("An unexpected error occured."),(0,s.__)("OK"),{duration:0}).subscribe()}))},methods:{__:s.__,submitNewPassword:function(){var e=this;if(!this.validation.validateFields(this.fields))return a.kX.error((0,s.__)("Unable to proceed the form is not valid.")).subscribe();this.validation.disableFields(this.fields),a.kq.applyFilters("ns-new-password-submit",!0)&&(this.isSubitting=!0,a.ih.post("/auth/new-password/".concat(this.user,"/").concat(this.token),this.validation.getValue(this.fields),{headers:{"X-XSRF-TOKEN":this.xXsrfToken}}).subscribe((function(e){a.kX.success(e.message).subscribe(),setTimeout((function(){document.location=e.data.redirectTo}),500)}),(function(t){e.isSubitting=!1,e.validation.enableFields(e.fields),t.data&&e.validation.triggerFieldsErrors(e.fields,t.data),a.kX.error(t.message).subscribe()})))}}};const o=(0,n(1900).Z)(l,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"bg-white rounded shadow overflow-hidden transition-all duration-100"},[n("div",{staticClass:"p-3 -my-2"},[e.fields.length>0?n("div",{staticClass:"py-2 fade-in-entrance anim-duration-300"},e._l(e.fields,(function(e,t){return n("ns-field",{key:t,attrs:{field:e}})})),1):e._e()]),e._v(" "),0===e.fields.length?n("div",{staticClass:"flex items-center justify-center py-10"},[n("ns-spinner",{attrs:{border:"4",size:"16"}})],1):e._e(),e._v(" "),n("div",{staticClass:"flex justify-between items-center bg-gray-200 p-3"},[n("div",[n("ns-button",{staticClass:"justify-between",attrs:{type:"info"},on:{click:function(t){return e.submitNewPassword()}}},[e.isSubitting?n("ns-spinner",{staticClass:"mr-2",attrs:{size:"6",border:"2"}}):e._e(),e._v(" "),n("span",[e._v(e._s(e.__("Save Password")))])],1)],1),e._v(" "),n("div")])])}),[],!1,null,null,null).exports},5139:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var s=n(7389),i=n(2277),r=n(7266),a=n(162);const l={name:"ns-login",data:function(){return{fields:[],xXsrfToken:null,validation:new r.Z,isSubitting:!1}},mounted:function(){var e=this;(0,i.D)([a.ih.get("/api/nexopos/v4/fields/ns.password-lost"),a.ih.get("/sanctum/csrf-cookie")]).subscribe((function(t){e.fields=e.validation.createFields(t[0]),e.xXsrfToken=a.ih.response.config.headers["X-XSRF-TOKEN"],setTimeout((function(){return a.kq.doAction("ns-login-mounted",e)}),100)}),(function(e){a.kX.error(e.message||(0,s.__)("An unexpected error occured."),(0,s.__)("OK"),{duration:0}).subscribe()}))},methods:{__:s.__,requestRecovery:function(){var e=this;if(!this.validation.validateFields(this.fields))return a.kX.error((0,s.__)("Unable to proceed the form is not valid.")).subscribe();this.validation.disableFields(this.fields),a.kq.applyFilters("ns-password-lost-submit",!0)&&(this.isSubitting=!0,a.ih.post("/auth/password-lost",this.validation.getValue(this.fields),{headers:{"X-XSRF-TOKEN":this.xXsrfToken}}).subscribe((function(e){a.kX.success(e.message).subscribe(),setTimeout((function(){document.location=e.data.redirectTo}),500)}),(function(t){e.isSubitting=!1,e.validation.enableFields(e.fields),t.data&&e.validation.triggerFieldsErrors(e.fields,t.data),a.kX.error(t.message).subscribe()})))}}};const o=(0,n(1900).Z)(l,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"bg-white rounded shadow overflow-hidden transition-all duration-100"},[n("div",{staticClass:"p-3 -my-2"},[e.fields.length>0?n("div",{staticClass:"py-2 fade-in-entrance anim-duration-300"},e._l(e.fields,(function(e,t){return n("ns-field",{key:t,attrs:{field:e}})})),1):e._e()]),e._v(" "),0===e.fields.length?n("div",{staticClass:"flex items-center justify-center py-10"},[n("ns-spinner",{attrs:{border:"4",size:"16"}})],1):e._e(),e._v(" "),n("div",{staticClass:"flex w-full items-center justify-center py-4"},[n("a",{staticClass:"hover:underline text-blue-600 text-sm",attrs:{href:"/sign-in"}},[e._v(e._s(e.__("Remember Your Password ?")))])]),e._v(" "),n("div",{staticClass:"flex justify-between items-center bg-gray-200 p-3"},[n("div",[n("ns-button",{staticClass:"justify-between",attrs:{type:"info"},on:{click:function(t){return e.requestRecovery()}}},[e.isSubitting?n("ns-spinner",{staticClass:"mr-2",attrs:{size:"6",border:"2"}}):e._e(),e._v(" "),n("span",[e._v(e._s(e.__("Submit")))])],1)],1),e._v(" "),n("div",[n("ns-link",{attrs:{href:"/sign-up",type:"success"}},[e._v(e._s(e.__("Register")))])],1)])])}),[],!1,null,null,null).exports},5882:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var s=n(7266),i=n(162),r=n(2277),a=n(7389);const l={name:"ns-register",data:function(){return{fields:[],xXsrfToken:null,validation:new s.Z}},mounted:function(){var e=this;(0,r.D)([i.ih.get("/api/nexopos/v4/fields/ns.register"),i.ih.get("/sanctum/csrf-cookie")]).subscribe((function(t){e.fields=e.validation.createFields(t[0]),e.xXsrfToken=i.ih.response.config.headers["X-XSRF-TOKEN"],setTimeout((function(){return i.kq.doAction("ns-register-mounted",e)}))}))},methods:{__:a.__,register:function(){var e=this;if(!this.validation.validateFields(this.fields))return i.kX.error((0,a.__)("Unable to proceed the form is not valid.")).subscribe();this.validation.disableFields(this.fields),i.kq.applyFilters("ns-register-submit",!0)&&i.ih.post("/auth/sign-up",this.validation.getValue(this.fields),{headers:{"X-XSRF-TOKEN":this.xXsrfToken}}).subscribe((function(e){i.kX.success(e.message).subscribe(),setTimeout((function(){document.location=e.data.redirectTo}),1500)}),(function(t){e.validation.triggerFieldsErrors(e.fields,t),e.validation.enableFields(e.fields),i.kX.error(t.message).subscribe()}))}}};const o=(0,n(1900).Z)(l,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"bg-white rounded shadow overflow-hidden transition-all duration-100"},[n("div",{staticClass:"p-3 -my-2"},[e.fields.length>0?n("div",{staticClass:"py-2 fade-in-entrance anim-duration-300"},e._l(e.fields,(function(e,t){return n("ns-field",{key:t,attrs:{field:e}})})),1):e._e()]),e._v(" "),0===e.fields.length?n("div",{staticClass:"flex items-center justify-center"},[n("ns-spinner")],1):e._e(),e._v(" "),n("div",{staticClass:"flex w-full items-center justify-center py-4"},[n("a",{staticClass:"hover:underline text-blue-600 text-sm",attrs:{href:"/sign-in"}},[e._v(e._s(e.__("Already registered ?")))])]),e._v(" "),n("div",{staticClass:"flex justify-between items-center bg-gray-200 p-3"},[n("div",[n("ns-button",{attrs:{type:"info"},on:{click:function(t){return e.register()}}},[e._v(e._s(e.__("Register")))])],1),e._v(" "),n("div",[n("ns-link",{attrs:{href:"/sign-in",type:"success"}},[e._v(e._s(e.__("Sign In")))])],1)])])}),[],!1,null,null,null).exports},9576:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var s=n(162),i=n(8603),r=n(7389);const a={name:"ns-media",props:["popup"],components:{VueUpload:n(2948)},data:function(){return{pages:[{label:(0,r.__)("Upload"),name:"upload",selected:!1},{label:(0,r.__)("Gallery"),name:"gallery",selected:!0}],resources:[],response:{data:[],current_page:0,from:0,to:0,next_page_url:"",prev_page_url:"",path:"",per_page:0,total:0,last_page:0,first_page:0},queryPage:1,bulkSelect:!1,files:[]}},mounted:function(){this.popupCloser();var e=this.pages.filter((function(e){return"gallery"===e.name}))[0];this.select(e)},watch:{files:function(){this.files.filter((function(e){return"0.00"===e.progress})).length>0&&(this.$refs.upload.active=!0)}},computed:{postMedia:function(){return s.kq.applyFilters("http-client-url","/api/nexopos/v4/medias")},currentPage:function(){return this.pages.filter((function(e){return e.selected}))[0]},hasOneSelected:function(){return this.response.data.filter((function(e){return e.selected})).length>0},selectedResource:function(){return this.response.data.filter((function(e){return e.selected}))[0]},csrf:function(){return ns.authentication.csrf},isPopup:function(){return void 0!==this.$popup},user_id:function(){return this.isPopup&&this.$popupParams.user_id||0}},methods:{popupCloser:i.Z,__:r.__,cancelBulkSelect:function(){this.bulkSelect=!1,this.response.data.forEach((function(e){return e.selected=!1}))},deleteSelected:function(){var e=this;if(confirm("Delete selected resources ?"))return s.ih.post("/api/nexopos/v4/medias/bulk-delete",{ids:this.response.data.filter((function(e){return e.selected})).map((function(e){return e.id}))}).subscribe((function(t){s.kX.success(t.message).subscribe(),e.loadGallery()}),(function(e){s.kX.error(e.message).subscribe()}))},select:function(e){this.pages.forEach((function(e){return e.selected=!1})),e.selected=!0,"gallery"===e.name&&this.loadGallery()},loadGallery:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;t=null===t?this.queryPage:t,this.queryPage=t,s.ih.get("/api/nexopos/v4/medias?page=".concat(t,"&user_id=").concat(this.user_id)).subscribe((function(t){t.data.forEach((function(e){return e.selected=!1})),e.response=t}))},useSelectedEntries:function(){this.$popupParams.resolve({event:"use-selected",value:this.response.data.filter((function(e){return e.selected}))}),this.$popup.close()},selectResource:function(e){var t=this;this.bulkSelect||this.response.data.forEach((function(n,s){s!==t.response.data.indexOf(e)&&(n.selected=!1)})),e.selected=!e.selected}}};const l=(0,n(1900).Z)(a,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"flex bg-white shadow-xl overflow-hidden",class:e.isPopup?"w-6/7-screen h-6/7-screen":"w-full h-full"},[n("div",{staticClass:"sidebar w-48 bg-gray-200 h-full flex-shrink-0"},[n("h3",{staticClass:"text-xl font-bold text-gray-800 my-4 text-center"},[e._v(e._s(e.__("Medias Manager")))]),e._v(" "),n("ul",e._l(e.pages,(function(t,s){return n("li",{key:s,staticClass:"hover:bg-white py-2 px-3 text-gray-700 border-l-8 cursor-pointer",class:t.selected?"bg-white border-blue-400":"border-transparent",on:{click:function(n){return e.select(t)}}},[e._v(e._s(t.label))])})),0)]),e._v(" "),"upload"===e.currentPage.name?n("div",{staticClass:"content w-full overflow-hidden flex"},[n("vue-upload",{ref:"upload",staticClass:" flex-auto flex bg-white shadow",attrs:{drop:!0,multiple:!0,headers:{"X-Requested-With":"XMLHttpRequest","X-CSRF-TOKEN":e.csrf},accept:"image/*","post-action":e.postMedia},model:{value:e.files,callback:function(t){e.files=t},expression:"files"}},[n("div",{staticClass:"border-dashed border-2 flex flex-auto m-2 p-2 flex-col border-blue-400 items-center justify-center"},[n("h3",{staticClass:"text-3xl font-bold text-gray-600 mb-4"},[e._v(e._s(e.__("Click Here Or Drop Your File To Upload")))]),e._v(" "),n("div",{staticClass:"rounded w-full md:w-2/3 text-gray-700 bg-gray-500 h-56 overflow-y-auto p-2"},[n("ul",e._l(e.files,(function(t,s){return n("li",{key:s,staticClass:"p-2 mb-2 shadow bg-white flex items-center justify-between rounded"},[n("span",[e._v(e._s(t.name))]),e._v(" "),n("span",{staticClass:"rounded bg-blue-400 flex items-center justify-center text-xs p-2"},[e._v(e._s(t.progress)+"%")])])})),0)])])])],1):e._e(),e._v(" "),"gallery"===e.currentPage.name?n("div",{staticClass:"content flex-col w-full overflow-hidden flex"},[e.popup?n("div",{staticClass:"p-2 flex flex-shrink-0 justify-between bg-gray-200"},[n("div"),e._v(" "),n("div",[n("ns-close-button",{on:{click:function(t){return e.popup.close()}}})],1)]):e._e(),e._v(" "),n("div",{staticClass:"flex flex-auto overflow-hidden"},[n("div",{staticClass:"bg-white shadow content flex flex-auto flex-col overflow-y-auto",attrs:{id:"grid"}},[n("div",{staticClass:"flex flex-auto"},[n("div",{staticClass:"p-2 overflow-x-auto"},[n("div",{staticClass:"grid grid-cols-2 md:grid-cols-4 lg:grid-cols-4 xl:grid-cols-6"},e._l(e.response.data,(function(t,s){return n("div",{key:s},[n("div",{staticClass:"p-2"},[n("div",{staticClass:"rounded-lg w-32 h-32 bg-gray-500 m-2 overflow-hidden flex items-center justify-center",class:t.selected?"ring-4 ring-blue-500 ring-opacity-50":"",on:{click:function(n){return e.selectResource(t)}}},[n("img",{staticClass:"object-cover h-full",attrs:{src:t.sizes.thumb,alt:t.name}})])])])})),0)]),e._v(" "),0===e.response.data.length?n("div",{staticClass:"flex flex-auto items-center justify-center"},[n("h3",{staticClass:"text-2xl text-gray-600 font-bold"},[e._v(e._s(e.__("Nothing has already been uploaded")))])]):e._e()])]),e._v(" "),!e.bulkSelect&&e.hasOneSelected?n("div",{staticClass:"w-64 flex-shrink-0 bg-gray-200",attrs:{id:"preview"}},[n("div",{staticClass:"h-64 bg-gray-600 flex items-center justify-center"},[n("img",{attrs:{src:e.selectedResource.sizes.thumb,alt:e.selectedResource.name}})]),e._v(" "),n("div",{staticClass:"p-4 text-gray-700 text-sm",attrs:{id:"details"}},[n("p",{staticClass:"flex flex-col mb-2"},[n("strong",{staticClass:"font-bold block"},[e._v(e._s(e.__("File Name"))+": ")]),n("span",[e._v(e._s(e.selectedResource.name))])]),e._v(" "),n("p",{staticClass:"flex flex-col mb-2"},[n("strong",{staticClass:"font-bold block"},[e._v(e._s(e.__("Uploaded At"))+":")]),n("span",[e._v(e._s(e.selectedResource.created_at))])]),e._v(" "),n("p",{staticClass:"flex flex-col mb-2"},[n("strong",{staticClass:"font-bold block"},[e._v(e._s(e.__("By"))+" :")]),n("span",[e._v(e._s(e.selectedResource.user.username))])])])]):e._e()]),e._v(" "),n("div",{staticClass:"p-2 flex flex-shrink-0 justify-between bg-gray-200"},[n("div",{staticClass:"flex -mx-2 flex-shrink-0"},[n("div",{staticClass:"px-2 flex-shrink-0 flex"},[n("div",{staticClass:"rounded shadow overflow-hidden border-blue-400 flex text-sm text-gray-700"},[e.bulkSelect?n("button",{staticClass:"bg-white hover:bg-blue-400 hover:text-white py-2 px-3",on:{click:function(t){return e.cancelBulkSelect()}}},[n("i",{staticClass:"las la-times"})]):e._e(),e._v(" "),e.hasOneSelected&&!e.bulkSelect?n("button",{staticClass:"bg-white hover:bg-blue-400 hover:text-white py-2 px-3",on:{click:function(t){e.bulkSelect=!0}}},[n("i",{staticClass:"las la-check-circle"})]):e._e(),e._v(" "),e.hasOneSelected?n("button",{staticClass:"bg-red-400 text-white hover:bg-red-500 hover:text-white py-2 px-3",on:{click:function(t){return e.deleteSelected()}}},[n("i",{staticClass:"las la-trash"})]):e._e()])])]),e._v(" "),n("div",{staticClass:"flex-shrink-0 -mx-2 flex"},[n("div",{staticClass:"px-2"},[n("div",{staticClass:"rounded shadow overflow-hidden border-blue-400 flex text-sm text-gray-700"},[n("button",{staticClass:"p-2",class:1===e.response.current_page?"bg-gray-100 text-gray-600 cursor-not-allowed":"bg-white hover:bg-blue-400 hover:text-white",attrs:{disabled:1===e.response.current_page},on:{click:function(t){return e.loadGallery(e.response.current_page-1)}}},[e._v(e._s(e.__("Previous")))]),e._v(" "),n("hr",{staticClass:"border-r border-gray-700"}),e._v(" "),n("button",{staticClass:"p-2",class:e.response.current_page===e.response.last_page?"bg-gray-100 text-gray-600 cursor-not-allowed":"bg-white hover:bg-blue-400 hover:text-white",attrs:{disabled:e.response.current_page===e.response.last_page},on:{click:function(t){return e.loadGallery(e.response.current_page+1)}}},[e._v(e._s(e.__("Next")))])])]),e._v(" "),e.popup&&e.hasOneSelected?n("div",{staticClass:"px-2"},[n("button",{staticClass:"rounded shadow p-2 bg-blue-400 text-white text-sm",on:{click:function(t){return e.useSelectedEntries()}}},[e._v(e._s(e.__("Use Selected")))])]):e._e()])])]):e._e()])}),[],!1,null,null,null).exports},419:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});const s={data:function(){return{title:"",message:""}},computed:{size:function(){return this.$popupParams.size||"h-full w-full"}},mounted:function(){var e=this;this.title=this.$popupParams.title,this.message=this.$popupParams.message,this.$popup.event.subscribe((function(t){"click-overlay"===t.event&&(e.$popupParams.onAction(!1),e.$popup.close())}))},methods:{__:n(7389).__,emitAction:function(e){this.$popupParams.onAction(e),this.$popup.close()}}};const i=(0,n(1900).Z)(s,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"flex flex-col bg-white shadow-lg w-5/7-screen md:w-4/7-screen lg:w-2/7-screen",class:e.size,attrs:{id:"popup"}},[n("div",{staticClass:"flex items-center justify-center flex-col flex-auto p-4"},[n("h2",{staticClass:"text-xl md:text-3xl font-body text-gray-700 text-center"},[e._v(e._s(e.title))]),e._v(" "),n("p",{staticClass:"py-4 text-sm md:text-base text-gray-600 text-center"},[e._v(e._s(e.message))])]),e._v(" "),n("div",{staticClass:"flex border-t border-gray-200 text-gray-700"},[n("button",{staticClass:"hover:bg-gray-100 flex-auto w-1/2 h-16 flex items-center justify-center uppercase",on:{click:function(t){return e.emitAction(!0)}}},[e._v(e._s(e.__("Yes")))]),e._v(" "),n("hr",{staticClass:"border-r border-gray-200"}),e._v(" "),n("button",{staticClass:"hover:bg-gray-100 flex-auto w-1/2 h-16 flex items-center justify-center uppercase",on:{click:function(t){return e.emitAction(!1)}}},[e._v(e._s(e.__("No")))])])])}),[],!1,null,null,null).exports}},e=>{e.O(0,[898],(()=>{return t=8108,e(e.s=t);var t}));e.O()}]); +(self.webpackChunkNexoPOS_4x=self.webpackChunkNexoPOS_4x||[]).push([[743],{8108:(e,t,n)=>{"use strict";var s=n(538),i=n(4364),r=n(5882).Z,a=n(3923).Z,l=n(5139).Z,o=n(1158).Z,d=(window.nsState,window.nsScreen,window.nsExtraComponents);window.nsComponents=Object.assign(i,d),window.authVueComponent=new s.default({el:"#page-container",components:Object.assign({nsLogin:a,nsRegister:r,nsPasswordLost:l,nsNewPassword:o},d)})},162:(e,t,n)=>{"use strict";n.d(t,{l:()=>M,kq:()=>I,ih:()=>V,kX:()=>R});var s=n(6486),i=n(9669),r=n(2181),a=n(8345),l=n(9624),o=n(9248),d=n(230);function c(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{};return this._request("post",e,t,n)}},{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._request("get",e,void 0,t)}},{key:"delete",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._request("delete",e,void 0,t)}},{key:"put",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this._request("put",e,t,n)}},{key:"response",get:function(){return this._lastRequestData}},{key:"_request",value:function(e,t){var n=this,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return t=I.applyFilters("http-client-url",t.replace(/\/$/,"")),this._subject.next({identifier:"async.start",url:t,data:s}),new d.y((function(r){n._client[e](t,s,Object.assign(Object.assign({},n._client.defaults[e]),i)).then((function(e){n._lastRequestData=e,r.next(e.data),r.complete(),n._subject.next({identifier:"async.stop"})})).catch((function(e){var t;r.error((null===(t=e.response)||void 0===t?void 0:t.data)||e.response||e),n._subject.next({identifier:"async.stop"})}))}))}},{key:"subject",value:function(){return this._subject}},{key:"emit",value:function(e){var t=e.identifier,n=e.value;this._subject.next({identifier:t,value:n})}}])&&c(t.prototype,n),s&&c(t,s),e}(),f=n(3);function h(e,t){for(var n=0;n=1e3){for(var n,s=Math.floor((""+e).length/3),i=2;i>=1;i--){if(((n=parseFloat((0!=s?e/Math.pow(1e3,s):e).toPrecision(i)))+"").replace(/[^a-zA-Z 0-9]+/g,"").length<=2)break}n%1!=0&&(n=n.toFixed(1)),t=n+["","k","m","b","t"][s]}return t})),S=n(1356),E=n(9698);function T(e,t){for(var n=0;n0&&window.outerWidth<=480:this.breakpoint="xs";break;case window.outerWidth>480&&window.outerWidth<=640:this.breakpoint="sm";break;case window.outerWidth>640&&window.outerWidth<=1024:this.breakpoint="md";break;case window.outerWidth>1024&&window.outerWidth<=1280:this.breakpoint="lg";break;case window.outerWidth>1280:this.breakpoint="xl"}}}])&&z(t.prototype,n),s&&z(t,s),e}()),W=new b({sidebar:["xs","sm","md"].includes(Z.breakpoint)?"hidden":"visible"});V.defineClient(i),window.nsEvent=M,window.nsHttpClient=V,window.nsSnackBar=R,window.nsCurrency=S.W,window.nsTruncate=E.b,window.nsRawCurrency=S.f,window.nsAbbreviate=$,window.nsState=W,window.nsUrl=N,window.nsScreen=Z,window.ChartJS=r,window.EventEmitter=p,window.Popup=w.G,window.RxJS=y,window.FormValidation=k.Z,window.nsCrudHandler=L},4364:(e,t,n)=>{"use strict";n.r(t),n.d(t,{nsAvatar:()=>L,nsButton:()=>l,nsCheckbox:()=>h,nsCkeditor:()=>A,nsCloseButton:()=>E,nsCrud:()=>m,nsCrudForm:()=>x,nsDate:()=>C,nsDateTimePicker:()=>X.V,nsDatepicker:()=>I,nsField:()=>_,nsIconButton:()=>T,nsInput:()=>d,nsLink:()=>o,nsMediaInput:()=>S,nsMenu:()=>r,nsMultiselect:()=>k,nsNumpad:()=>M.Z,nsSelect:()=>c.R,nsSelectAudio:()=>f,nsSpinner:()=>g,nsSubmenu:()=>a,nsSwitch:()=>j,nsTableRow:()=>b,nsTabs:()=>q,nsTabsItem:()=>z,nsTextarea:()=>w});var s=n(538),i=n(162),r=s.default.component("ns-menu",{data:function(){return{defaultToggledState:!1,_save:0}},props:["href","label","icon","notification","toggled","identifier"],template:'\n \n ',mounted:function(){var e=this;this.defaultToggledState=void 0!==this.toggled?this.toggled:this.defaultToggledState,i.l.subject().subscribe((function(t){t.value!==e.identifier&&(e.defaultToggledState=!1)}))},methods:{toggleEmit:function(){var e=this;this.toggle().then((function(t){t&&i.l.emit({identifier:"side-menu.open",value:e.identifier})}))},toggle:function(){var e=this;return new Promise((function(t,n){0===e.href.length&&(e.defaultToggledState=!e.defaultToggledState,t(e.defaultToggledState))}))}}}),a=s.default.component("ns-submenu",{data:function(){return{}},props:["href","label","active"],mounted:function(){},template:'\n
    \n
  • \n \n \n \n
  • \n
    \n '}),l=s.default.component("ns-button",{data:function(){return{clicked:!1,_save:0}},props:["type","disabled","link","href","routerLink","to"],template:'\n
    \n \n \n \n
    \n ',mounted:function(){},computed:{isDisabled:function(){return this.disabled&&(0===this.disabled.length||"disabled"===this.disabled||this.disabled)},buttonclass:function(){var e;switch(this.type){case"info":e="".concat(this.isDisabled?"bg-gray-400 border border-gray-500 cursor-not-allowed text-gray-600":"shadow bg-blue-400 text-white");break;case"success":e="".concat(this.isDisabled?"bg-gray-400 border border-gray-500 cursor-not-allowed text-gray-600":"shadow bg-green-400 text-white");break;case"danger":e="".concat(this.isDisabled?"bg-gray-400 border border-gray-500 cursor-not-allowed text-gray-600":"shadow bg-red-400 text-white");break;case"warning":e="".concat(this.isDisabled?"bg-gray-400 border border-gray-500 cursor-not-allowed text-gray-600":"shadow bg-orange-400 text-white");break;default:e="".concat(this.isDisabled?"bg-gray-400 border border-gray-500 cursor-not-allowed text-gray-600":"shadow bg-white text-gray-800")}return e}}}),o=s.default.component("ns-link",{data:function(){return{clicked:!1,_save:0}},props:["type","to","href"],template:'\n
    \n \n \n
    \n ',computed:{buttonclass:function(){switch(this.type){case"info":return"shadow bg-blue-400 text-white";case"success":return"shadow bg-green-400 text-white";case"danger":return"shadow bg-red-400 text-white";case"warning":return"shadow bg-orange-400 text-white";default:return"shadow bg-white text-gray-800"}}}}),d=s.default.component("ns-input",{data:function(){return{}},mounted:function(){},computed:{hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},disabledClass:function(){return this.field.disabled?"bg-gray-200 cursor-not-allowed":"bg-transparent"},inputClass:function(){return this.disabledClass+" "+this.leadClass},leadClass:function(){return this.leading?"pl-8":"px-4"}},props:["placeholder","leading","type","field"],template:'\n
    \n \n
    \n
    \n \n {{ leading }}\n \n
    \n \n
    \n

    \n

    \n This field is required.\n This field must contain a valid email address.\n {{ error.message }}\n

    \n
    \n '}),c=n(4451),u=n(7389),f=s.default.component("ns-select-audio",{data:function(){return{}},props:["name","placeholder","field"],computed:{hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},disabledClass:function(){return this.field.disabled?"bg-gray-200 cursor-not-allowed":"bg-transparent"},inputClass:function(){return this.disabledClass+" "+this.leadClass},leadClass:function(){return this.leading?"pl-8":"px-4"}},methods:{__:u.__,playSelectedSound:function(){this.field.value.length>0&&new Audio(this.field.value).play()}},template:'\n
    \n \n
    \n
    \n \n
    \n \n
    \n

    \n

    \n {{ __( \'This field is required.\' ) }}\n {{ __( \'This field must contain a valid email address.\' ) }}\n {{ error.message }}\n

    \n
    \n '}),h=s.default.component("ns-checkbox",{data:function(){return{}},props:["checked","field","label"],template:'\n
    \n
    \n \n
    \n {{ label }}\n {{ field.label }}\n
    \n ',computed:{isChecked:function(){return this.field?this.field.value:this.checked}},methods:{toggleIt:function(){void 0!==this.field&&(this.field.value=!this.field.value),this.$emit("change",!this.checked)}}}),p=n(2242),v=n(419),m=s.default.component("ns-crud",{data:function(){return{isRefreshing:!1,sortColumn:"",searchInput:"",searchQuery:"",page:1,bulkAction:"",bulkActions:[],columns:[],selectedEntries:[],globallyChecked:!1,result:{current_page:null,data:[],first_page_url:null,from:null,last_page:null,last_page_url:null,next_page_url:null,path:null,per_page:null,prev_page_url:null,to:null,total:null}}},mounted:function(){void 0!==this.identifier&&nsCrudHandler.defineInstance(this.identifier,this),this.loadConfig()},props:["src","create-url","mode","identifier","queryParams"],computed:{getParsedSrc:function(){return"".concat(this.src,"?").concat(this.sortColumn).concat(this.searchQuery).concat(this.queryPage).concat(this.getQueryParams()?"&"+this.getQueryParams():"")},getSelectedAction:function(){var e=this,t=this.bulkActions.filter((function(t){return t.identifier===e.bulkAction}));return t.length>0&&t[0]},pagination:function(){return this.result?this.pageNumbers(this.result.last_page,this.result.current_page):[]},queryPage:function(){return this.result?"&page=".concat(this.page):""},resultInfo:function(){return(0,u.__)("displaying {perPage} on {items} items").replace("{perPage}",this.result.total).replace("{items}",this.result.total)}},methods:{__:u.__,getQueryParams:function(){var e=this;return this.queryParams?Object.keys(this.queryParams).map((function(t){return"".concat(t,"=").concat(e.queryParams[t])})).join("&"):""},pageNumbers:function(e,t){var n=[];return t>e-3?n.push(e-2,e-1,e):n.push(t,t+1,t+2,"...",e),n.filter((function(e){return e>0||"string"==typeof e}))},downloadContent:function(){i.ih.post("".concat(this.src,"/export?").concat(this.getQueryParams()),{entries:this.selectedEntries.map((function(e){return e.$id}))}).subscribe((function(e){setTimeout((function(){return document.location=e.url}),300),i.kX.success((0,u.__)("The document has been generated.")).subscribe()}),(function(e){i.kX.error(e.message||(0,u.__)("Unexpected error occured.")).subscribe()}))},clearSelectedEntries:function(){var e=this;p.G.show(v.Z,{title:(0,u.__)("Clear Selected Entries ?"),message:(0,u.__)("Would you like to clear all selected entries ?"),onAction:function(t){t&&(e.selectedEntries=[])}})},refreshRow:function(e){if(!0===e.$checked){0===this.selectedEntries.filter((function(t){return t.$id===e.$id})).length&&this.selectedEntries.push(e)}else{var t=this.selectedEntries.filter((function(t){return t.$id===e.$id}));if(t.length>0){var n=this.selectedEntries.indexOf(t[0]);this.selectedEntries.splice(n,1)}}},handleShowOptions:function(e){this.result.data.forEach((function(t){t.$id!==e.$id&&(t.$toggled=!1)}))},handleGlobalChange:function(e){var t=this;this.globallyChecked=e,this.result.data.forEach((function(n){n.$checked=e,t.refreshRow(n)}))},loadConfig:function(){var e=this;i.ih.get("".concat(this.src,"/config?").concat(this.getQueryParams())).subscribe((function(t){e.columns=t.columns,e.bulkActions=t.bulkActions,e.refresh()}),(function(e){i.kX.error(e.message,"OK",{duration:!1}).subscribe()}))},cancelSearch:function(){this.searchInput="",this.search()},search:function(){this.searchInput?this.searchQuery="&search=".concat(this.searchInput):this.searchQuery="",this.refresh()},sort:function(e){for(var t in this.columns)t!==e&&(this.columns[t].$sorted=!1,this.columns[t].$direction="");switch(this.columns[e].$sorted=!0,this.columns[e].$direction){case"asc":this.columns[e].$direction="desc";break;case"desc":this.columns[e].$direction="";break;case"":this.columns[e].$direction="asc"}["asc","desc"].includes(this.columns[e].$direction)?this.sortColumn="active=".concat(e,"&direction=").concat(this.columns[e].$direction):this.sortColumn="",this.$emit("sort",this.columns[e]),this.refresh()},bulkDo:function(){var e=this;return this.bulkAction?this.selectedEntries.length>0?confirm(this.getSelectedAction.confirm||this.$slots["error-bulk-confirmation"]||(0,u.__)("Would you like to perform the selected bulk action on the selected entries ?"))?i.ih.post("".concat(this.src,"/bulk-actions"),{action:this.bulkAction,entries:this.selectedEntries.map((function(e){return e.$id}))}).subscribe({next:function(t){i.kX.info(t.message).subscribe(),e.selectedEntries=[],e.refresh()},error:function(e){i.kX.error(e.message).subscribe()}}):void 0:i.kX.error(this.$slots["error-no-selection"]?this.$slots["error-no-selection"][0].text:(0,u.__)("No selection has been made.")).subscribe():i.kX.error(this.$slots["error-no-action"]?this.$slots["error-no-action"][0].text:(0,u.__)("No action has been selected.")).subscribe()},refresh:function(){var e=this;this.globallyChecked=!1,this.isRefreshing=!0,i.ih.get("".concat(this.getParsedSrc)).subscribe((function(t){t.data=t.data.map((function(t){return e.selectedEntries.filter((function(e){return e.$id===t.$id})).length>0&&(t.$checked=!0),t})),e.isRefreshing=!1,e.result=t,e.page=t.current_page}),(function(t){e.isRefreshing=!1,i.kX.error(t.message).subscribe()}))}},template:'\n
    \n
    \n \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \n \n
    \n {{ column.label }}\n \n \n \n \n
    \n
    {{ __( \'There is nothing to display...\' ) }}
    \n
    \n
    \n
    \n
    \n \n \n
    \n
    \n
    {{ resultInfo }}
    \n \n
    \n
    \n
    \n '}),b=s.default.component("ns-table-row",{props:["options","row","columns"],data:function(){return{optionsToggled:!1}},mounted:function(){},methods:{sanitizeHTML:function(e){var t=document.createElement("div");t.innerHTML=e;for(var n=t.getElementsByTagName("script"),s=n.length;s--;)n[s].parentNode.removeChild(n[s]);return t.innerHTML},getElementOffset:function(e){var t=e.getBoundingClientRect();return{top:t.top+window.pageYOffset,left:t.left+window.pageXOffset}},toggleMenu:function(e){var t=this;if(this.row.$toggled=!this.row.$toggled,this.$emit("toggled",this.row),this.row.$toggled)setTimeout((function(){var e=t.$el.querySelectorAll(".relative > .absolute")[0],n=t.$el.querySelectorAll(".relative")[0],s=t.getElementOffset(n);e.style.top=s.top+"px",e.style.left=s.left+"px",n.classList.remove("relative"),n.classList.add("dropdown-holder")}),100);else{var n=this.$el.querySelectorAll(".dropdown-holder")[0];n.classList.remove("dropdown-holder"),n.classList.add("relative")}},handleChanged:function(e){this.row.$checked=e,this.$emit("updated",this.row)},triggerAsync:function(e){var t=this;e.confirm?confirm(e.confirm.message)&&i.ih[e.type.toLowerCase()](e.url).subscribe((function(e){i.kX.success(e.message).subscribe(),t.$emit("reload",t.row)}),(function(e){t.toggleMenu(),i.kX.error(e.message).subscribe()})):(i.l.emit({identifier:"ns-table-row-action",value:{action:e,row:this.row,component:this}}),this.toggleMenu())}},template:'\n \n \n \n \n \n \n \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n \n \n '}),g=s.default.component("ns-spinner",{data:function(){return{}},mounted:function(){},computed:{validatedSize:function(){return this.size||24},validatedBorder:function(){return this.border||8},validatedAnimation:function(){return this.animation||"fast"}},props:["color","size","border"],template:"\n
    \n
    \n
    \n "}),y=n(7266),x=s.default.component("ns-crud-form",{data:function(){return{form:{},globallyChecked:!1,formValidation:new y.Z,rows:[]}},mounted:function(){this.loadForm()},props:["src","create-url","field-class","return-url","submit-url","submit-method","disable-tabs"],computed:{activeTabFields:function(){for(var e in this.form.tabs)if(this.form.tabs[e].active)return this.form.tabs[e].fields;return[]}},methods:{toggle:function(e){for(var t in this.form.tabs)this.form.tabs[t].active=!1;this.form.tabs[e].active=!0},handleShowOptions:function(e){this.rows.forEach((function(t){t.$id!==e.$id&&(t.$toggled=!1)}))},submit:function(){var e=this;return this.formValidation.validateForm(this.form).length>0?i.kX.error(this.$slots["error-invalid-form"]?this.$slots["error-invalid-form"][0].text:"No error message provided for having an invalid form.",this.$slots.okay?this.$slots.okay[0].text:"OK").subscribe():(this.formValidation.disableForm(this.form),void 0===this.submitUrl?i.kX.error(this.$slots["error-no-submit-url"]?this.$slots["error-no-submit-url"][0].text:"No error message provided for not having a valid submit url.",this.$slots.okay?this.$slots.okay[0].text:"OK").subscribe():void i.ih[this.submitMethod?this.submitMethod.toLowerCase():"post"](this.submitUrl,this.formValidation.extractForm(this.form)).subscribe((function(t){if("success"===t.status){if(e.returnUrl&&e.returnUrl.length>0)return document.location=e.returnUrl;e.$emit("save",t)}e.formValidation.enableForm(e.form)}),(function(t){i.kX.error(t.message,void 0,{duration:5e3}).subscribe(),e.formValidation.triggerError(e.form,t),e.formValidation.enableForm(e.form)})))},handleGlobalChange:function(e){this.globallyChecked=e,this.rows.forEach((function(t){return t.$checked=e}))},loadForm:function(){var e=this;i.ih.get("".concat(this.src)).subscribe({next:function(t){e.form=e.parseForm(t.form),i.kq.doAction("ns-crud-form-loaded",e),e.$emit("updated",e.form)},error:function(e){i.kX.error(e.message,"OKAY",{duration:0}).subscribe()}})},parseForm:function(e){e.main.value=void 0===e.main.value?"":e.main.value,e.main=this.formValidation.createFields([e.main])[0];var t=0;for(var n in e.tabs)0===t&&(e.tabs[n].active=!0),e.tabs[n].active=void 0!==e.tabs[n].active&&e.tabs[n].active,e.tabs[n].fields=this.formValidation.createFields(e.tabs[n].fields),t++;return e}},template:'\n
    \n
    \n \n
    \n
    \n
    \n
    \n \n
    \n Return\n
    \n
    \n \n
    \n
    \n
    \n
    {{ tab.label }}
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n '}),w=s.default.component("ns-textarea",{data:function(){return{}},mounted:function(){},computed:{hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},disabledClass:function(){return this.field.disabled?"bg-gray-200 cursor-not-allowed":"bg-transparent"},inputClass:function(){return this.disabledClass+" "+this.leadClass},leadClass:function(){return this.leading?"p-8":"p-2"}},props:["placeholder","leading","type","field"],template:'\n
    \n \n
    \n
    \n \n {{ leading }}\n \n
    \n \n
    \n

    \n

    \n This field is required.\n This field must contain a valid email address.\n {{ error.message }}\n

    \n
    \n '}),_=s.default.component("ns-field",{data:function(){return{}},mounted:function(){},computed:{isInputField:function(){return["text","password","email","number","tel"].includes(this.field.type)},isDateField:function(){return["date"].includes(this.field.type)},isSelectField:function(){return["select"].includes(this.field.type)},isTextarea:function(){return["textarea"].includes(this.field.type)},isCheckbox:function(){return["checkbox"].includes(this.field.type)},isMultiselect:function(){return["multiselect"].includes(this.field.type)},isSelectAudio:function(){return["select-audio"].includes(this.field.type)},isSwitch:function(){return["switch"].includes(this.field.type)},isMedia:function(){return["media"].includes(this.field.type)},isCkEditor:function(){return["ckeditor"].includes(this.field.type)},isDateTimePicker:function(){return["datetimepicker"].includes(this.field.type)},isCustom:function(){return["custom"].includes(this.field.type)}},props:["field"],methods:{addOption:function(e){"select"===this.field.type&&this.field.options.forEach((function(e){return e.selected=!1})),e.selected=!0;var t=this.field.options.indexOf(e);this.field.options.splice(t,1),this.field.options.unshift(e),this.refreshMultiselect(),this.$emit("change",{action:"addOption",option:e})},refreshMultiselect:function(){this.field.value=this.field.options.filter((function(e){return e.selected})).map((function(e){return e.value}))},removeOption:function(e){e.selected=!1,this.refreshMultiselect(),this.$emit("change",{action:"removeOption",option:e})}},template:'\n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n '}),k=s.default.component("ns-multiselect",{data:function(){return{showPanel:!1,search:""}},props:["field"],computed:{hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},_options:function(){var e=this;return this.field.options.map((function(t){return t.selected=void 0!==t.selected&&t.selected,e.field.value&&e.field.value.includes(t.value)&&(t.selected=!0),t}))}},methods:{__:u.__,addOption:function(e){this.field.disabled||(this.$emit("addOption",e),this.$forceUpdate(),setTimeout((function(){}),100))},removeOption:function(e,t){var n=this;if(!this.field.disabled)return t.preventDefault(),t.stopPropagation(),this.$emit("removeOption",e),this.$forceUpdate(),setTimeout((function(){n.search=""}),100),!1}},mounted:function(){var e=this;this.field.value&&this.field.value.reverse().forEach((function(t){var n=e.field.options.filter((function(e){return e.value===t}));n.length>=0&&e.addOption(n[0])}))},template:'\n
    \n \n
    \n
    \n
    \n
    \n
    \n {{ option.label }}\n \n
    \n
    \n
    \n
    \n \n \n
    \n
    \n \n
    \n
    \n

    \n

    \n {{ __( \'This field is required.\' ) }}\n {{ __( \'This field must contain a valid email address.\' ) }}\n {{ error.message }}\n

    \n
    \n
    \n '}),j=s.default.component("ns-switch",{data:function(){return{}},mounted:function(){},computed:{_options:function(){var e=this;return this.field.options.map((function(t){return t.selected=t.value===e.field.value,t}))},hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},disabledClass:function(){return this.field.disabled?"bg-gray-200 cursor-not-allowed":""},sizeClass:function(){return" w-1/".concat(this._options.length<=4?this._options.length:4)},inputClass:function(){return this.disabledClass+" "+this.leadClass},leadClass:function(){return this.leading?"pl-8":"px-4"}},methods:{__:u.__,setSelected:function(e){this.field.value=e.value,this._options.forEach((function(e){return e.selected=!1})),e.selected=!0,this.$forceUpdate(),this.$emit("change",e.value)}},props:["placeholder","leading","type","field"],template:'\n
    \n \n
    \n \n
    \n

    \n

    \n {{ __( \'This field is required.\' ) }}\n

    \n
    \n '}),C=s.default.component("ns-date",{data:function(){return{}},mounted:function(){},computed:{hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},disabledClass:function(){return this.field.disabled?"bg-gray-200 cursor-not-allowed":"bg-transparent"},inputClass:function(){return this.disabledClass+" "+this.leadClass},leadClass:function(){return this.leading?"pl-8":"px-4"}},props:["placeholder","leading","type","field"],template:'\n
    \n \n
    \n
    \n \n {{ leading }}\n \n
    \n \n
    \n

    \n

    \n {{ __( \'This field is required.\' ) }}\n {{ __( \'This field must contain a valid email address.\' ) }}\n {{ error.message }}\n

    \n
    \n '}),$=n(9576),S=s.default.component("ns-media-input",{template:'\n
    \n \n
    \n
    \n \n {{ leading }}\n \n
    \n
    \n
    \n \n
    \n \n \n
    \n
    \n

    \n

    \n {{ __( \'This field is required.\' ) }}\n {{ __( \'This field must contain a valid email address.\' ) }}\n {{ error.message }}\n

    \n
    \n ',computed:{hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},disabledClass:function(){return this.field.disabled?"bg-gray-200 cursor-not-allowed":"bg-transparent"},inputClass:function(){return this.disabledClass+" "+this.leadClass},leadClass:function(){return this.leading?"pl-8":"px-4"}},data:function(){return{}},props:["placeholder","leading","type","field"],mounted:function(){},methods:{toggleMedia:function(){var e=this;new Promise((function(t,n){p.G.show($.Z,Object.assign({resolve:t,reject:n},e.field.data||{}))})).then((function(t){"use-selected"===t.event&&(e.field.data&&"url"!==e.field.data.type?e.field.data&&"model"!==e.field.data.type||(e.field.value=t.value[0]):e.field.value=t.value[0].sizes.original,e.$forceUpdate())}))}}}),E=s.default.component("ns-close-button",{template:'\n \n ',methods:{clicked:function(e){this.$emit("click",e)}}}),T=s.default.component("ns-icon-button",{template:'\n \n ',props:["className","buttonClass"],methods:{clicked:function(e){this.$emit("click",e)}}}),O=n(1272),F=n.n(O),D=n(5234),P=n.n(D),A=s.default.component("ns-ckeditor",{data:function(){return{editor:P()}},components:{ckeditor:F().component},mounted:function(){},methods:{__:u.__},computed:{hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},disabledClass:function(){return this.field.disabled?"bg-gray-200 cursor-not-allowed":"bg-transparent"},inputClass:function(){return this.disabledClass+" "+this.leadClass},leadClass:function(){return this.leading?"p-8":"p-2"}},props:["placeholder","leading","type","field"],template:'\n
    \n \n
    \n
    \n \n {{ leading }}\n \n
    \n \n
    \n

    \n

    \n {{ __( \'This field is required.\' ) }}\n {{ __( \'This field must contain a valid email address.\' ) }}\n {{ error.message }}\n

    \n
    \n '}),q=s.default.component("ns-tabs",{data:function(){return{childrens:[]}},props:["active"],computed:{activeComponent:function(){var e=this.$children.filter((function(e){return e.active}));return e.length>0&&e[0]}},methods:{toggle:function(e){this.$emit("active",e.identifier),this.$emit("changeTab",e.identifier)}},mounted:function(){this.childrens=this.$children},template:'\n
    \n
    \n
    {{ tab.label }}
    \n
    \n \n
    \n '}),z=s.default.component("ns-tabs-item",{data:function(){return{}},mounted:function(){},props:["label","identifier","padding"],template:'\n
    \n \n
    \n '}),X=n(8655),M=n(3968),V=n(1726),R=n(7259);const N=s.default.extend({methods:{__:u.__},data:function(){return{svg:""}},mounted:function(){this.svg=(0,V.createAvatar)(R,{seed:this.displayName})},computed:{avatarUrl:function(){return 0===this.url.length?"":this.url}},props:["url","display-name"]});const L=(0,n(1900).Z)(N,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"flex justify-between items-center flex-shrink-0"},[n("span",{staticClass:"hidden md:inline-block text-gray-600 px-2"},[e._v(e._s(e.__("Howdy, {name}").replace("{name}",this.displayName)))]),e._v(" "),n("span",{staticClass:"md:hidden text-gray-600 px-2"},[e._v(e._s(e.displayName))]),e._v(" "),n("div",{staticClass:"px-2"},[n("div",{staticClass:"w-8 h-8 overflow-hidden rounded-full bg-gray-600"},[""!==e.avatarUrl?n("img",{staticClass:"w-8 h-8 overflow-hidden rounded-full",attrs:{src:e.avatarUrl,alt:e.displayName,srcset:""}}):e._e(),e._v(" "),""===e.avatarUrl?n("div",{domProps:{innerHTML:e._s(e.svg)}}):e._e()])])])}),[],!1,null,null,null).exports;var I=n(6598).Z},8655:(e,t,n)=>{"use strict";n.d(t,{V:()=>l});var s=n(538),i=n(381),r=n.n(i),a=n(7389),l=s.default.component("ns-date-time-picker",{template:'\n
    \n \n
    \n \n \n {{ currentDay.format( \'YYYY/MM/DD HH:mm\' ) }}\n N/A\n \n
    \n

    {{ field.description }}

    \n \n
    \n ',props:["field","date"],data:function(){return{visible:!1,hours:0,minutes:0,currentDay:null,daysOfWeek:new Array(7).fill("").map((function(e,t){return t})),calendar:[[]]}},watch:{visible:function(){var e=this;this.visible&&setTimeout((function(){e.$refs.hours.addEventListener("focus",(function(){this.select()})),e.$refs.minutes.addEventListener("focus",(function(){this.select()}))}),100)}},mounted:function(){var e=this;document.addEventListener("mousedown",(function(t){return e.checkClickedItem(t)})),this.field?this.currentDay=[void 0,null,""].includes(this.field.value)?r()():r()(this.field.value):this.currentDay=[void 0,null,""].includes(this.date)?r()():r()(this.date),this.hours=this.currentDay.format("HH"),this.minutes=this.currentDay.format("mm"),this.build()},methods:{__:a.__,detectHoursChange:function(){parseFloat(this.hours)<0&&(this.hours=0),parseFloat(this.hours)>23&&(this.hours=23),this.updateDateTime()},detectMinuteChange:function(){parseFloat(this.minutes)<0&&(this.minutes=0),parseFloat(this.minutes)>59&&(this.minutes=59),this.updateDateTime()},updateDateTime:function(){this.currentDay.hours(this.hours),this.currentDay.minutes(this.minutes),this.selectDate(this.currentDay)},checkClickedItem:function(e){!this.$el.contains(e.srcElement)&&this.visible&&(this.visible=!1)},selectDate:function(e){this.currentDay=e,this.currentDay.hours(this.hours),this.currentDay.minutes(this.minutes);var t=this.currentDay.format("YYYY/MM/DD HH:mm");this.field?(this.field.value=t,this.$emit("change",this.field)):this.$emit("change",this.currentDay)},subMonth:function(){this.currentDay.subtract(1,"month"),this.build()},addMonth:function(){this.currentDay.add(1,"month"),this.build()},resetCalendar:function(){this.calendar=[[]]},build:function(){this.resetCalendar();this.currentDay.clone().startOf("month");for(var e=this.currentDay.clone().startOf("month"),t=this.currentDay.clone().endOf("month");;){0===e.day()&&this.calendar[0].length>0&&this.calendar.push([]);var n=this.calendar.length-1;if(this.calendar[n].push({date:e.clone(),dayOfWeek:e.day(),isToday:e.isSame(r().now(),"day")}),e.isSame(t,"day"))break;e.add(1,"day")}}}})},4451:(e,t,n)=>{"use strict";n.d(t,{R:()=>i});var s=n(7389),i=n(538).default.component("ns-select",{data:function(){return{}},props:["name","placeholder","field"],computed:{hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},disabledClass:function(){return this.field.disabled?"bg-gray-200 cursor-not-allowed":"bg-transparent"},inputClass:function(){return this.disabledClass+" "+this.leadClass},leadClass:function(){return this.leading?"pl-8":"px-4"}},methods:{__:s.__},template:'\n
    \n \n
    \n \n
    \n

    \n

    \n {{ __( \'This field is required.\' ) }}\n {{ __( \'This field must contain a valid email address.\' ) }}\n {{ error.message }}\n

    \n
    \n '})},1356:(e,t,n)=>{"use strict";n.d(t,{W:()=>d,f:()=>c});var s=n(538),i=n(2077),r=n.n(i),a=n(6740),l=n.n(a),o=new Array(parseInt(ns.currency.ns_currency_precision)).fill("").map((function(e){return 0})).join(""),d=s.default.filter("currency",(function(e){var t,n,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"full";switch(ns.currency.ns_currency_prefered){case"iso":t=ns.currency.ns_currency_iso;break;case"symbol":t=ns.currency.ns_currency_symbol}if("full"===s){var i={decimal:ns.currency.ns_currency_decimal_separator,separator:ns.currency.ns_currency_thousand_separator,precision:parseInt(ns.currency.ns_currency_precision),symbol:""};n=l()(e,i).format()}else n=r()(e).format("0.0a");return"".concat("before"===ns.currency.ns_currency_position?t:"").concat(n).concat("after"===ns.currency.ns_currency_position?t:"")})),c=function(e){var t="0.".concat(o);return parseFloat(r()(e).format(t))}},9698:(e,t,n)=>{"use strict";n.d(t,{b:()=>s});var s=n(538).default.filter("truncate",(function(e,t){return e?(e=e.toString()).length>t?e.substring(0,t)+"...":e:""}))},7266:(e,t,n)=>{"use strict";function s(e,t){for(var n=0;ni});var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,i;return t=e,(n=[{key:"validateFields",value:function(e){var t=this;return 0===e.map((function(e){return t.checkField(e),e.errors?0===e.errors.length:0})).filter((function(e){return!1===e})).length}},{key:"validateFieldsErrors",value:function(e){var t=this;return e.map((function(e){return t.checkField(e),e.errors})).flat()}},{key:"validateForm",value:function(e){e.main&&this.validateField(e.main);var t=[];for(var n in e.tabs){var s=[],i=this.validateFieldsErrors(e.tabs[n].fields);i.length>0&&s.push(i),e.tabs[n].errors=s.flat(),t.push(s.flat())}return t.flat().filter((function(e){return void 0!==e}))}},{key:"initializeTabs",value:function(e){var t=0;for(var n in e)0===t&&(e[n].active=!0),e[n].active=void 0!==e[n].active&&e[n].active,e[n].fields=this.createFields(e[n].fields),t++;return e}},{key:"validateField",value:function(e){return this.checkField(e)}},{key:"fieldsValid",value:function(e){return!(e.map((function(e){return e.errors&&e.errors.length>0})).filter((function(e){return e})).length>0)}},{key:"createFields",value:function(e){return e.map((function(e){return e.type=e.type||"text",e.errors=e.errors||[],e.disabled=e.disabled||!1,"custom"===e.type&&(e.component=nsExtraComponents[e.name]),e}))}},{key:"createForm",value:function(e){if(e.main&&(e.main=this.createFields([e.main])[0]),e.tabs)for(var t in e.tabs)e.tabs[t].fields=this.createFields(e.tabs[t].fields),e.tabs[t].errors=[];return e}},{key:"enableFields",value:function(e){return e.map((function(e){return e.disabled=!1}))}},{key:"disableFields",value:function(e){return e.map((function(e){return e.disabled=!0}))}},{key:"disableForm",value:function(e){for(var t in e.main&&(e.main.disabled=!0),e.tabs)e.tabs[t].fields.forEach((function(e){return e.disabled=!0}))}},{key:"enableForm",value:function(e){for(var t in e.main&&(e.main.disabled=!1),e.tabs)e.tabs[t].fields.forEach((function(e){return e.disabled=!1}))}},{key:"getValue",value:function(e){var t={};return e.forEach((function(e){t[e.name]=e.value})),t}},{key:"checkField",value:function(e){var t=this;return void 0!==e.validation&&(e.errors=[],this.detectValidationRules(e.validation).forEach((function(n){t.fieldPassCheck(e,n)}))),e}},{key:"extractForm",value:function(e){var t={};if(e.main&&(t[e.main.name]=e.main.value),e.tabs)for(var n in e.tabs)void 0===t[n]&&(t[n]={}),t[n]=this.extractFields(e.tabs[n].fields);return t}},{key:"extractFields",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.forEach((function(e){["multiselect"].includes(e.type)?t[e.name]=e.options.filter((function(e){return e.selected})).map((function(e){return e.value})):t[e.name]=e.value})),t}},{key:"detectValidationRules",value:function(e){var t=function(e){var t;return["email","required"].includes(e)?{identifier:e}:(t=/(min)\:([0-9])+/g.exec(e))||(t=/(max)\:([0-9])+/g.exec(e))?{identifier:t[1],value:t[2]}:e};return Array.isArray(e)?e.filter((function(e){return"string"==typeof e})).map(t):e.split("|").map(t)}},{key:"triggerError",value:function(e,t){if(t.errors){var n=function(n){var s=n.split(".").filter((function(e){return!/^\d+$/.test(e)}));2===s.length&&e.tabs[s[0]].fields.forEach((function(e){e.name===s[1]&&t.errors[n].forEach((function(t){var n={identifier:"invalid",invalid:!0,message:t,name:e.name};e.errors.push(n)}))})),n===e.main.name&&t.errors[n].forEach((function(t){e.main.errors.push({identifier:"invalid",invalid:!0,message:t,name:e.main.name})}))};for(var s in t.errors)n(s)}}},{key:"triggerFieldsErrors",value:function(e,t){if(t&&t.errors){var n=function(n){e.forEach((function(e){e.name===n&&t.errors[n].forEach((function(t){var n={identifier:"invalid",invalid:!0,message:t,name:e.name};e.errors.push(n)}))}))};for(var s in t.errors)n(s)}}},{key:"fieldPassCheck",value:function(e,t){if("required"===t.identifier){if(void 0===e.value||null===e.value||0===e.value.length)return e.errors.push({identifier:t.identifier,invalid:!0,name:e.name});e.errors.forEach((function(n,s){n.identifier===t.identifier&&!0===n.invalid&&e.errors.splice(s,1)}))}if("email"===t.identifier){if(!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(e.value))return e.errors.push({identifier:t.identifier,invalid:!0,name:e.name});e.errors.forEach((function(n,s){!0===n[t.identifier]&&e.errors.splice(s,1)}))}return e}}])&&s(t.prototype,n),i&&s(t,i),e}()},7389:(e,t,n)=>{"use strict";n.d(t,{__:()=>s,c:()=>i});var s=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"NexoPOS";return nsLanguage.getEntries(t)&&nsLanguage.getEntries(t)[e]||e},i=function(e,t){return nsLanguage.getEntries(t)&&nsLanguage.getEntries(t)[e]||e}},8603:(e,t,n)=>{"use strict";function s(){var e=this;Object.keys(this).includes("$popup")&&this.$popup.event.subscribe((function(t){"click-overlay"===t.event&&(e.$popupParams&&void 0!==e.$popupParams.reject&&e.$popupParams.reject(!1),e.$popup.close()),"press-esc"===t.event&&(e.$popupParams&&void 0!==e.$popupParams.reject&&e.$popupParams.reject(!1),e.$popup.close())}))}n.d(t,{Z:()=>s})},6386:(e,t,n)=>{"use strict";function s(e){void 0!==this.$popupParams.resolve&&this.$popupParams.reject&&(!1!==e?this.$popupParams.resolve(e):this.$popupParams.reject(e)),this.$popup.close()}n.d(t,{Z:()=>s})},2242:(e,t,n)=>{"use strict";n.d(t,{G:()=>a});var s=n(9248);function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};if(i(this,e),this.config={primarySelector:void 0,popupClass:"shadow-lg h-half w-1/2 bg-white"},this.container=document.createElement("div"),this.popupBody=document.createElement("div"),this.config=Object.assign(this.config,t),void 0===this.config.primarySelector&&document.querySelectorAll(".is-popup").length>0){var n=document.querySelectorAll(".is-popup").length;this.parentWrapper=document.querySelectorAll(".is-popup")[n-1]}else this.parentWrapper=document.querySelector("body").querySelectorAll("div")[0];this.event=new s.x}var t,n,a;return t=e,a=[{key:"show",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=new e(s);return i.open(t,n),i}}],(n=[{key:"open",value:function(e){var t,n,s,i=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=document.querySelector("body").querySelectorAll("div")[0];this.parentWrapper.style.filter="blur(4px)",a.style.filter="blur(6px)",this.container.setAttribute("class","absolute top-0 left-0 w-full h-full flex items-center justify-center is-popup"),this.container.addEventListener("click",(function(e){i.event.next({event:"click-overlay",value:!0}),e.stopPropagation()})),this.popupBody.addEventListener("click",(function(e){e.stopImmediatePropagation()})),this.container.style.background="rgb(51 51 51 / 20%)",this.container.id="popup-container-"+document.querySelectorAll(".is-popup").length,this.popupBody.setAttribute("class"," zoom-out-entrance"),this.popupBody.innerHTML='',this.container.appendChild(this.popupBody),document.body.appendChild(this.container);var l=Vue.extend(e);this.instance=new l({propsData:{popup:this}}),this.instance.template=(null===(t=null==e?void 0:e.options)||void 0===t?void 0:t.template)||void 0,this.instance.render=e.render||void 0,this.instance.methods=(null===(n=null==e?void 0:e.options)||void 0===n?void 0:n.methods)||(null==e?void 0:e.methods),this.instance.data=(null===(s=null==e?void 0:e.options)||void 0===s?void 0:s.data)||(null==e?void 0:e.data),this.instance.$popup=this,this.instance.$popupParams=r,this.instance.$mount("#".concat(this.container.id," .popup-body"))}},{key:"close",value:function(){var e=this;this.instance.$destroy(),this.event.unsubscribe(),this.parentWrapper.style.filter="blur(0px)";var t=document.querySelector("body").querySelectorAll("div")[0];document.querySelectorAll(".is-popup").length<=1&&(t.style.filter="blur(0px)"),this.popupBody.classList.remove("zoom-out-entrance"),this.popupBody.classList.add("zoom-in-exit"),this.container.classList.remove("is-popup"),setTimeout((function(){e.container.remove()}),300)}}])&&r(t.prototype,n),a&&r(t,a),e}()},9624:(e,t,n)=>{"use strict";n.d(t,{S:()=>r});var s=n(3260);function i(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"info"};return s.Observable.create((function(s){var r=n.__createSnack({message:e,label:t,type:i.type}),a=r.buttonNode,l=(r.textNode,r.snackWrapper,r.sampleSnack);a.addEventListener("click",(function(e){s.onNext(a),s.onCompleted(),l.remove()})),n.__startTimer(i.duration,l)}))}},{key:"error",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"error"};return this.show(e,t,Object.assign(Object.assign({},n),{type:"error"}))}},{key:"success",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"success"};return this.show(e,t,Object.assign(Object.assign({},n),{type:"success"}))}},{key:"info",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"info"};return this.show(e,t,Object.assign(Object.assign({},n),{type:"info"}))}},{key:"__startTimer",value:function(e,t){var n,s=function(){e>0&&!1!==e&&(n=setTimeout((function(){t.remove()}),e))};t.addEventListener("mouseenter",(function(){clearTimeout(n)})),t.addEventListener("mouseleave",(function(){s()})),s()}},{key:"__createSnack",value:function(e){var t=e.message,n=e.label,s=e.type,i=void 0===s?"info":s,r=document.getElementById("snack-wrapper")||document.createElement("div"),a=document.createElement("div"),l=document.createElement("p"),o=document.createElement("div"),d=document.createElement("button"),c="",u="";switch(i){case"info":c="text-white hover:bg-blue-400 bg-blue-500",u="bg-gray-900 text-white";break;case"error":c="text-red-700 hover:bg-white bg-white",u="bg-red-500 text-white";break;case"success":c="text-green-700 hover:bg-white bg-white",u="bg-green-500 text-white"}return l.textContent=t,n&&(d.textContent=n,d.setAttribute("class","px-3 py-2 shadow rounded uppercase ".concat(c)),o.appendChild(d)),a.appendChild(l),a.appendChild(o),a.setAttribute("class","md:rounded py-2 px-3 md:w-2/5 w-full z-10 md:my-2 shadow-lg flex justify-between items-center zoom-in-entrance anim-duration-300 ".concat(u)),r.appendChild(a),null===document.getElementById("snack-wrapper")&&(r.setAttribute("id","snack-wrapper"),r.setAttribute("class","absolute bottom-0 w-full flex justify-between items-center flex-col"),document.body.appendChild(r)),{snackWrapper:r,sampleSnack:a,buttonsWrapper:o,buttonNode:d,textNode:l}}}])&&i(t.prototype,n),r&&i(t,r),e}()},6700:(e,t,n)=>{var s={"./af":2786,"./af.js":2786,"./ar":867,"./ar-dz":4130,"./ar-dz.js":4130,"./ar-kw":6135,"./ar-kw.js":6135,"./ar-ly":6440,"./ar-ly.js":6440,"./ar-ma":7702,"./ar-ma.js":7702,"./ar-sa":6040,"./ar-sa.js":6040,"./ar-tn":7100,"./ar-tn.js":7100,"./ar.js":867,"./az":1083,"./az.js":1083,"./be":9808,"./be.js":9808,"./bg":8338,"./bg.js":8338,"./bm":7438,"./bm.js":7438,"./bn":8905,"./bn-bd":6225,"./bn-bd.js":6225,"./bn.js":8905,"./bo":1560,"./bo.js":1560,"./br":1278,"./br.js":1278,"./bs":622,"./bs.js":622,"./ca":2468,"./ca.js":2468,"./cs":5822,"./cs.js":5822,"./cv":877,"./cv.js":877,"./cy":7373,"./cy.js":7373,"./da":4780,"./da.js":4780,"./de":9740,"./de-at":217,"./de-at.js":217,"./de-ch":894,"./de-ch.js":894,"./de.js":9740,"./dv":5300,"./dv.js":5300,"./el":837,"./el.js":837,"./en-au":8348,"./en-au.js":8348,"./en-ca":7925,"./en-ca.js":7925,"./en-gb":2243,"./en-gb.js":2243,"./en-ie":6436,"./en-ie.js":6436,"./en-il":7207,"./en-il.js":7207,"./en-in":4175,"./en-in.js":4175,"./en-nz":6319,"./en-nz.js":6319,"./en-sg":1662,"./en-sg.js":1662,"./eo":2915,"./eo.js":2915,"./es":7093,"./es-do":5251,"./es-do.js":5251,"./es-mx":6112,"./es-mx.js":6112,"./es-us":1146,"./es-us.js":1146,"./es.js":7093,"./et":5603,"./et.js":5603,"./eu":7763,"./eu.js":7763,"./fa":6959,"./fa.js":6959,"./fi":1897,"./fi.js":1897,"./fil":2549,"./fil.js":2549,"./fo":4694,"./fo.js":4694,"./fr":4470,"./fr-ca":3049,"./fr-ca.js":3049,"./fr-ch":2330,"./fr-ch.js":2330,"./fr.js":4470,"./fy":5044,"./fy.js":5044,"./ga":9295,"./ga.js":9295,"./gd":2101,"./gd.js":2101,"./gl":8794,"./gl.js":8794,"./gom-deva":7884,"./gom-deva.js":7884,"./gom-latn":3168,"./gom-latn.js":3168,"./gu":5349,"./gu.js":5349,"./he":4206,"./he.js":4206,"./hi":94,"./hi.js":94,"./hr":316,"./hr.js":316,"./hu":2138,"./hu.js":2138,"./hy-am":1423,"./hy-am.js":1423,"./id":9218,"./id.js":9218,"./is":135,"./is.js":135,"./it":626,"./it-ch":150,"./it-ch.js":150,"./it.js":626,"./ja":9183,"./ja.js":9183,"./jv":4286,"./jv.js":4286,"./ka":2105,"./ka.js":2105,"./kk":7772,"./kk.js":7772,"./km":8758,"./km.js":8758,"./kn":9282,"./kn.js":9282,"./ko":3730,"./ko.js":3730,"./ku":1408,"./ku.js":1408,"./ky":3291,"./ky.js":3291,"./lb":6841,"./lb.js":6841,"./lo":5466,"./lo.js":5466,"./lt":7010,"./lt.js":7010,"./lv":7595,"./lv.js":7595,"./me":9861,"./me.js":9861,"./mi":5493,"./mi.js":5493,"./mk":5966,"./mk.js":5966,"./ml":7341,"./ml.js":7341,"./mn":5115,"./mn.js":5115,"./mr":370,"./mr.js":370,"./ms":9847,"./ms-my":1237,"./ms-my.js":1237,"./ms.js":9847,"./mt":2126,"./mt.js":2126,"./my":6165,"./my.js":6165,"./nb":4924,"./nb.js":4924,"./ne":6744,"./ne.js":6744,"./nl":3901,"./nl-be":9814,"./nl-be.js":9814,"./nl.js":3901,"./nn":3877,"./nn.js":3877,"./oc-lnc":2135,"./oc-lnc.js":2135,"./pa-in":5858,"./pa-in.js":5858,"./pl":4495,"./pl.js":4495,"./pt":9520,"./pt-br":7971,"./pt-br.js":7971,"./pt.js":9520,"./ro":6459,"./ro.js":6459,"./ru":238,"./ru.js":238,"./sd":950,"./sd.js":950,"./se":490,"./se.js":490,"./si":124,"./si.js":124,"./sk":4249,"./sk.js":4249,"./sl":4985,"./sl.js":4985,"./sq":1104,"./sq.js":1104,"./sr":9131,"./sr-cyrl":9915,"./sr-cyrl.js":9915,"./sr.js":9131,"./ss":5893,"./ss.js":5893,"./sv":8760,"./sv.js":8760,"./sw":1172,"./sw.js":1172,"./ta":7333,"./ta.js":7333,"./te":3110,"./te.js":3110,"./tet":2095,"./tet.js":2095,"./tg":7321,"./tg.js":7321,"./th":9041,"./th.js":9041,"./tk":9005,"./tk.js":9005,"./tl-ph":5768,"./tl-ph.js":5768,"./tlh":9444,"./tlh.js":9444,"./tr":2397,"./tr.js":2397,"./tzl":8254,"./tzl.js":8254,"./tzm":1106,"./tzm-latn":699,"./tzm-latn.js":699,"./tzm.js":1106,"./ug-cn":9288,"./ug-cn.js":9288,"./uk":7691,"./uk.js":7691,"./ur":3795,"./ur.js":3795,"./uz":6791,"./uz-latn":588,"./uz-latn.js":588,"./uz.js":6791,"./vi":5666,"./vi.js":5666,"./x-pseudo":4378,"./x-pseudo.js":4378,"./yo":5805,"./yo.js":5805,"./zh-cn":3839,"./zh-cn.js":3839,"./zh-hk":5726,"./zh-hk.js":5726,"./zh-mo":9807,"./zh-mo.js":9807,"./zh-tw":4152,"./zh-tw.js":4152};function i(e){var t=r(e);return n(t)}function r(e){if(!n.o(s,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return s[e]}i.keys=function(){return Object.keys(s)},i.resolve=r,e.exports=i,i.id=6700},6598:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var s=n(381),i=n.n(s);const r={name:"ns-datepicker",props:["label","date"],data:function(){return{visible:!1,currentDay:null,daysOfWeek:new Array(7).fill("").map((function(e,t){return t})),calendar:[[]]}},mounted:function(){document.addEventListener("click",this.checkClickedItem),this.currentDay=[void 0,null].includes(this.date)?i()():i()(this.date),this.build()},methods:{__:n(7389).__,checkClickedItem:function(e){!this.$el.contains(e.srcElement)&&this.visible&&(this.visible=!1)},selectDate:function(e){this.currentDay=e,this.visible=!1,this.$emit("change",e)},subMonth:function(){this.currentDay.subtract(1,"month"),this.build()},addMonth:function(){this.currentDay.add(1,"month"),this.build()},resetCalendar:function(){this.calendar=[[]]},build:function(){this.resetCalendar();this.currentDay.clone().startOf("month");for(var e=this.currentDay.clone().startOf("month"),t=this.currentDay.clone().endOf("month");;){0===e.day()&&this.calendar[0].length>0&&this.calendar.push([]);var n=this.calendar.length-1;if(this.calendar[n].push({date:e.clone(),dayOfWeek:e.day(),isToday:e.isSame(i().now(),"day")}),e.isSame(t,"day"))break;e.add(1,"day")}}}};const a=(0,n(1900).Z)(r,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"picker"},[n("div",{staticClass:"rounded cursor-pointer bg-white shadow px-1 py-1 flex items-center text-gray-700",on:{click:function(t){e.visible=!e.visible}}},[n("i",{staticClass:"las la-clock text-2xl"}),e._v(" "),n("span",{staticClass:"mx-1 text-sm"},[n("span",[e._v(e._s(e.label||e.__("Date"))+" : ")]),e._v(" "),e.currentDay?n("span",[e._v(e._s(e.currentDay.format("YYYY/MM/DD")))]):e._e(),e._v(" "),null===e.currentDay?n("span",[e._v(e._s(e.__("N/A")))]):e._e()])]),e._v(" "),e.visible?n("div",{staticClass:"relative h-0 w-0 -mb-2"},[n("div",{staticClass:"w-72 mt-2 shadow rounded bg-white anim-duration-300 zoom-in-entrance flex flex-col"},[n("div",{staticClass:"flex-auto"},[n("div",{staticClass:"p-2 flex items-center"},[n("div",[n("button",{staticClass:"w-8 h-8 bg-gray-400 rounded",on:{click:function(t){return e.subMonth()}}},[n("i",{staticClass:"las la-angle-left"})])]),e._v(" "),n("div",{staticClass:"flex flex-auto font-semibold text-gray-700 justify-center"},[e._v(e._s(e.currentDay.format("MMM"))+" "+e._s(e.currentDay.format("YYYY")))]),e._v(" "),n("div",[n("button",{staticClass:"w-8 h-8 bg-gray-400 rounded",on:{click:function(t){return e.addMonth()}}},[n("i",{staticClass:"las la-angle-right"})])])]),e._v(" "),n("div",{staticClass:"grid grid-flow-row grid-cols-7 grid-rows-1 gap-0 text-gray-700"},[n("div",{staticClass:"border border-gray-200 h-8 flex justify-center items-center text-sm"},[e._v(e._s(e.__("Sun")))]),e._v(" "),n("div",{staticClass:"border border-gray-200 h-8 flex justify-center items-center text-sm"},[e._v(e._s(e.__("Mon")))]),e._v(" "),n("div",{staticClass:"border border-gray-200 h-8 flex justify-center items-center text-sm"},[e._v(e._s(e.__("Tue")))]),e._v(" "),n("div",{staticClass:"border border-gray-200 h-8 flex justify-center items-center text-sm"},[e._v(e._s(e.__("Wed")))]),e._v(" "),n("div",{staticClass:"border border-gray-200 h-8 flex justify-center items-center text-sm"},[e._v(e._s(e.__("Thr")))]),e._v(" "),n("div",{staticClass:"border border-gray-200 h-8 flex justify-center items-center text-sm"},[e._v(e._s(e.__("Fri")))]),e._v(" "),n("div",{staticClass:"border border-gray-200 h-8 flex justify-center items-center text-sm"},[e._v(e._s(e.__("Sat")))])]),e._v(" "),e._l(e.calendar,(function(t,s){return n("div",{key:s,staticClass:"grid grid-flow-row grid-cols-7 grid-rows-1 gap-0 text-gray-700"},e._l(e.daysOfWeek,(function(s,i){return n("div",{key:i,staticClass:"h-8 flex justify-center items-center text-sm"},[e._l(t,(function(t,i){return[t.dayOfWeek===s?n("div",{key:i,staticClass:"h-full w-full flex items-center justify-center cursor-pointer",class:t.date.format("DD")===e.currentDay.format("DD")?"bg-blue-400 text-white border border-blue-500":"hover:bg-gray-100 border border-gray-200",on:{click:function(n){return e.selectDate(t.date)}}},[e._v("\n "+e._s(t.date.format("DD"))+"\n ")]):e._e()]}))],2)})),0)}))],2),e._v(" "),n("div")])]):e._e()])}),[],!1,null,null,null).exports},3968:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});function s(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,s=new Array(t);n100?100:this.backValue))),"0"===this.backValue&&(this.backValue=""),this.$emit("changed",this.floating&&this.backValue.length>0?parseFloat(this.backValue/this.number):this.backValue)):this.$emit("next",this.floating&&this.backValue.length>0?parseFloat(this.backValue/this.number):this.backValue)}}};const a=(0,n(1900).Z)(r,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"grid grid-flow-row grid-cols-3 gap-2 grid-rows-3",staticStyle:{padding:"1px"},attrs:{id:"numpad"}},[e._l(e.keys,(function(t,s){return n("div",{key:s,staticClass:"hover:bg-gray-400 hover:text-gray-800 bg-gray-300 text-2xl text-gray-700 border h-16 flex items-center justify-center cursor-pointer",staticStyle:{margin:"-1px"},on:{click:function(n){return e.inputValue(t)}}},[void 0!==t.value?n("span",[e._v(e._s(t.value))]):e._e(),e._v(" "),t.icon?n("i",{staticClass:"las",class:t.icon}):e._e()])})),e._v(" "),e._t("numpad-footer")],2)}),[],!1,null,null,null).exports},3923:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var s=n(2277),i=n(7266),r=n(162),a=n(7389);const l={name:"ns-login",props:["showRecoveryLink"],data:function(){return{fields:[],xXsrfToken:null,validation:new i.Z,isSubitting:!1}},mounted:function(){var e=this;(0,s.D)([r.ih.get("/api/nexopos/v4/fields/ns.login"),r.ih.get("/sanctum/csrf-cookie")]).subscribe({next:function(t){e.fields=e.validation.createFields(t[0]),e.xXsrfToken=r.ih.response.config.headers["X-XSRF-TOKEN"],setTimeout((function(){return r.kq.doAction("ns-login-mounted",e)}),100)},error:function(e){r.kX.error(e.message||(0,a.__)("An unexpected error occured."),(0,a.__)("OK"),{duration:0}).subscribe()}})},methods:{__:a.__,signIn:function(){var e=this;if(!this.validation.validateFields(this.fields))return r.kX.error((0,a.__)("Unable to proceed the form is not valid.")).subscribe();this.validation.disableFields(this.fields),r.kq.applyFilters("ns-login-submit",!0)&&(this.isSubitting=!0,r.ih.post("/auth/sign-in",this.validation.getValue(this.fields),{headers:{"X-XSRF-TOKEN":this.xXsrfToken}}).subscribe((function(e){document.location=e.data.redirectTo}),(function(t){e.isSubitting=!1,e.validation.enableFields(e.fields),t.data&&e.validation.triggerFieldsErrors(e.fields,t.data),r.kX.error(t.message).subscribe()})))}}};const o=(0,n(1900).Z)(l,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"bg-white rounded shadow overflow-hidden transition-all duration-100"},[n("div",{staticClass:"p-3 -my-2"},[e.fields.length>0?n("div",{staticClass:"py-2 fade-in-entrance anim-duration-300"},e._l(e.fields,(function(e,t){return n("ns-field",{key:t,attrs:{field:e}})})),1):e._e()]),e._v(" "),0===e.fields.length?n("div",{staticClass:"flex items-center justify-center py-10"},[n("ns-spinner",{attrs:{border:"4",size:"16"}})],1):e._e(),e._v(" "),e.showRecoveryLink?n("div",{staticClass:"flex w-full items-center justify-center py-4"},[n("a",{staticClass:"hover:underline text-blue-600 text-sm",attrs:{href:"/password-lost"}},[e._v(e._s(e.__("Password Forgotten ?")))])]):e._e(),e._v(" "),n("div",{staticClass:"flex justify-between items-center bg-gray-200 p-3"},[n("div",[n("ns-button",{staticClass:"justify-between",attrs:{type:"info"},on:{click:function(t){return e.signIn()}}},[e.isSubitting?n("ns-spinner",{staticClass:"mr-2",attrs:{size:"6",border:"2"}}):e._e(),e._v(" "),n("span",[e._v(e._s(e.__("Sign In")))])],1)],1),e._v(" "),n("div",[n("ns-link",{attrs:{href:"/sign-up",type:"success"}},[e._v(e._s(e.__("Register")))])],1)])])}),[],!1,null,null,null).exports},1158:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var s=n(7389),i=n(2277),r=n(7266),a=n(162);const l={name:"ns-login",props:["token","user"],data:function(){return{fields:[],xXsrfToken:null,validation:new r.Z,isSubitting:!1}},mounted:function(){var e=this;(0,i.D)([a.ih.get("/api/nexopos/v4/fields/ns.new-password"),a.ih.get("/sanctum/csrf-cookie")]).subscribe((function(t){e.fields=e.validation.createFields(t[0]),e.xXsrfToken=a.ih.response.config.headers["X-XSRF-TOKEN"],setTimeout((function(){return a.kq.doAction("ns-login-mounted",e)}),100)}),(function(e){a.kX.error(e.message||(0,s.__)("An unexpected error occured."),(0,s.__)("OK"),{duration:0}).subscribe()}))},methods:{__:s.__,submitNewPassword:function(){var e=this;if(!this.validation.validateFields(this.fields))return a.kX.error((0,s.__)("Unable to proceed the form is not valid.")).subscribe();this.validation.disableFields(this.fields),a.kq.applyFilters("ns-new-password-submit",!0)&&(this.isSubitting=!0,a.ih.post("/auth/new-password/".concat(this.user,"/").concat(this.token),this.validation.getValue(this.fields),{headers:{"X-XSRF-TOKEN":this.xXsrfToken}}).subscribe((function(e){a.kX.success(e.message).subscribe(),setTimeout((function(){document.location=e.data.redirectTo}),500)}),(function(t){e.isSubitting=!1,e.validation.enableFields(e.fields),t.data&&e.validation.triggerFieldsErrors(e.fields,t.data),a.kX.error(t.message).subscribe()})))}}};const o=(0,n(1900).Z)(l,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"bg-white rounded shadow overflow-hidden transition-all duration-100"},[n("div",{staticClass:"p-3 -my-2"},[e.fields.length>0?n("div",{staticClass:"py-2 fade-in-entrance anim-duration-300"},e._l(e.fields,(function(e,t){return n("ns-field",{key:t,attrs:{field:e}})})),1):e._e()]),e._v(" "),0===e.fields.length?n("div",{staticClass:"flex items-center justify-center py-10"},[n("ns-spinner",{attrs:{border:"4",size:"16"}})],1):e._e(),e._v(" "),n("div",{staticClass:"flex justify-between items-center bg-gray-200 p-3"},[n("div",[n("ns-button",{staticClass:"justify-between",attrs:{type:"info"},on:{click:function(t){return e.submitNewPassword()}}},[e.isSubitting?n("ns-spinner",{staticClass:"mr-2",attrs:{size:"6",border:"2"}}):e._e(),e._v(" "),n("span",[e._v(e._s(e.__("Save Password")))])],1)],1),e._v(" "),n("div")])])}),[],!1,null,null,null).exports},5139:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var s=n(7389),i=n(2277),r=n(7266),a=n(162);const l={name:"ns-login",data:function(){return{fields:[],xXsrfToken:null,validation:new r.Z,isSubitting:!1}},mounted:function(){var e=this;(0,i.D)([a.ih.get("/api/nexopos/v4/fields/ns.password-lost"),a.ih.get("/sanctum/csrf-cookie")]).subscribe((function(t){e.fields=e.validation.createFields(t[0]),e.xXsrfToken=a.ih.response.config.headers["X-XSRF-TOKEN"],setTimeout((function(){return a.kq.doAction("ns-login-mounted",e)}),100)}),(function(e){a.kX.error(e.message||(0,s.__)("An unexpected error occured."),(0,s.__)("OK"),{duration:0}).subscribe()}))},methods:{__:s.__,requestRecovery:function(){var e=this;if(!this.validation.validateFields(this.fields))return a.kX.error((0,s.__)("Unable to proceed the form is not valid.")).subscribe();this.validation.disableFields(this.fields),a.kq.applyFilters("ns-password-lost-submit",!0)&&(this.isSubitting=!0,a.ih.post("/auth/password-lost",this.validation.getValue(this.fields),{headers:{"X-XSRF-TOKEN":this.xXsrfToken}}).subscribe((function(e){a.kX.success(e.message).subscribe(),setTimeout((function(){document.location=e.data.redirectTo}),500)}),(function(t){e.isSubitting=!1,e.validation.enableFields(e.fields),t.data&&e.validation.triggerFieldsErrors(e.fields,t.data),a.kX.error(t.message).subscribe()})))}}};const o=(0,n(1900).Z)(l,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"bg-white rounded shadow overflow-hidden transition-all duration-100"},[n("div",{staticClass:"p-3 -my-2"},[e.fields.length>0?n("div",{staticClass:"py-2 fade-in-entrance anim-duration-300"},e._l(e.fields,(function(e,t){return n("ns-field",{key:t,attrs:{field:e}})})),1):e._e()]),e._v(" "),0===e.fields.length?n("div",{staticClass:"flex items-center justify-center py-10"},[n("ns-spinner",{attrs:{border:"4",size:"16"}})],1):e._e(),e._v(" "),n("div",{staticClass:"flex w-full items-center justify-center py-4"},[n("a",{staticClass:"hover:underline text-blue-600 text-sm",attrs:{href:"/sign-in"}},[e._v(e._s(e.__("Remember Your Password ?")))])]),e._v(" "),n("div",{staticClass:"flex justify-between items-center bg-gray-200 p-3"},[n("div",[n("ns-button",{staticClass:"justify-between",attrs:{type:"info"},on:{click:function(t){return e.requestRecovery()}}},[e.isSubitting?n("ns-spinner",{staticClass:"mr-2",attrs:{size:"6",border:"2"}}):e._e(),e._v(" "),n("span",[e._v(e._s(e.__("Submit")))])],1)],1),e._v(" "),n("div",[n("ns-link",{attrs:{href:"/sign-up",type:"success"}},[e._v(e._s(e.__("Register")))])],1)])])}),[],!1,null,null,null).exports},5882:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var s=n(7266),i=n(162),r=n(2277),a=n(7389);const l={name:"ns-register",data:function(){return{fields:[],xXsrfToken:null,validation:new s.Z}},mounted:function(){var e=this;(0,r.D)([i.ih.get("/api/nexopos/v4/fields/ns.register"),i.ih.get("/sanctum/csrf-cookie")]).subscribe((function(t){e.fields=e.validation.createFields(t[0]),e.xXsrfToken=i.ih.response.config.headers["X-XSRF-TOKEN"],setTimeout((function(){return i.kq.doAction("ns-register-mounted",e)}))}))},methods:{__:a.__,register:function(){var e=this;if(!this.validation.validateFields(this.fields))return i.kX.error((0,a.__)("Unable to proceed the form is not valid.")).subscribe();this.validation.disableFields(this.fields),i.kq.applyFilters("ns-register-submit",!0)&&i.ih.post("/auth/sign-up",this.validation.getValue(this.fields),{headers:{"X-XSRF-TOKEN":this.xXsrfToken}}).subscribe((function(e){i.kX.success(e.message).subscribe(),setTimeout((function(){document.location=e.data.redirectTo}),1500)}),(function(t){e.validation.triggerFieldsErrors(e.fields,t),e.validation.enableFields(e.fields),i.kX.error(t.message).subscribe()}))}}};const o=(0,n(1900).Z)(l,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"bg-white rounded shadow overflow-hidden transition-all duration-100"},[n("div",{staticClass:"p-3 -my-2"},[e.fields.length>0?n("div",{staticClass:"py-2 fade-in-entrance anim-duration-300"},e._l(e.fields,(function(e,t){return n("ns-field",{key:t,attrs:{field:e}})})),1):e._e()]),e._v(" "),0===e.fields.length?n("div",{staticClass:"flex items-center justify-center"},[n("ns-spinner")],1):e._e(),e._v(" "),n("div",{staticClass:"flex w-full items-center justify-center py-4"},[n("a",{staticClass:"hover:underline text-blue-600 text-sm",attrs:{href:"/sign-in"}},[e._v(e._s(e.__("Already registered ?")))])]),e._v(" "),n("div",{staticClass:"flex justify-between items-center bg-gray-200 p-3"},[n("div",[n("ns-button",{attrs:{type:"info"},on:{click:function(t){return e.register()}}},[e._v(e._s(e.__("Register")))])],1),e._v(" "),n("div",[n("ns-link",{attrs:{href:"/sign-in",type:"success"}},[e._v(e._s(e.__("Sign In")))])],1)])])}),[],!1,null,null,null).exports},9576:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var s=n(162),i=n(8603),r=n(7389);const a={name:"ns-media",props:["popup"],components:{VueUpload:n(2948)},data:function(){return{pages:[{label:(0,r.__)("Upload"),name:"upload",selected:!1},{label:(0,r.__)("Gallery"),name:"gallery",selected:!0}],resources:[],response:{data:[],current_page:0,from:0,to:0,next_page_url:"",prev_page_url:"",path:"",per_page:0,total:0,last_page:0,first_page:0},queryPage:1,bulkSelect:!1,files:[]}},mounted:function(){this.popupCloser();var e=this.pages.filter((function(e){return"gallery"===e.name}))[0];this.select(e)},watch:{files:function(){this.files.filter((function(e){return"0.00"===e.progress})).length>0&&(this.$refs.upload.active=!0)}},computed:{postMedia:function(){return s.kq.applyFilters("http-client-url","/api/nexopos/v4/medias")},currentPage:function(){return this.pages.filter((function(e){return e.selected}))[0]},hasOneSelected:function(){return this.response.data.filter((function(e){return e.selected})).length>0},selectedResource:function(){return this.response.data.filter((function(e){return e.selected}))[0]},csrf:function(){return ns.authentication.csrf},isPopup:function(){return void 0!==this.$popup},user_id:function(){return this.isPopup&&this.$popupParams.user_id||0}},methods:{popupCloser:i.Z,__:r.__,cancelBulkSelect:function(){this.bulkSelect=!1,this.response.data.forEach((function(e){return e.selected=!1}))},deleteSelected:function(){var e=this;if(confirm("Delete selected resources ?"))return s.ih.post("/api/nexopos/v4/medias/bulk-delete",{ids:this.response.data.filter((function(e){return e.selected})).map((function(e){return e.id}))}).subscribe((function(t){s.kX.success(t.message).subscribe(),e.loadGallery()}),(function(e){s.kX.error(e.message).subscribe()}))},select:function(e){this.pages.forEach((function(e){return e.selected=!1})),e.selected=!0,"gallery"===e.name&&this.loadGallery()},loadGallery:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;t=null===t?this.queryPage:t,this.queryPage=t,s.ih.get("/api/nexopos/v4/medias?page=".concat(t,"&user_id=").concat(this.user_id)).subscribe((function(t){t.data.forEach((function(e){return e.selected=!1})),e.response=t}))},useSelectedEntries:function(){this.$popupParams.resolve({event:"use-selected",value:this.response.data.filter((function(e){return e.selected}))}),this.$popup.close()},selectResource:function(e){var t=this;this.bulkSelect||this.response.data.forEach((function(n,s){s!==t.response.data.indexOf(e)&&(n.selected=!1)})),e.selected=!e.selected}}};const l=(0,n(1900).Z)(a,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"flex bg-white shadow-xl overflow-hidden",class:e.isPopup?"w-6/7-screen h-6/7-screen":"w-full h-full"},[n("div",{staticClass:"sidebar w-48 bg-gray-200 h-full flex-shrink-0"},[n("h3",{staticClass:"text-xl font-bold text-gray-800 my-4 text-center"},[e._v(e._s(e.__("Medias Manager")))]),e._v(" "),n("ul",e._l(e.pages,(function(t,s){return n("li",{key:s,staticClass:"hover:bg-white py-2 px-3 text-gray-700 border-l-8 cursor-pointer",class:t.selected?"bg-white border-blue-400":"border-transparent",on:{click:function(n){return e.select(t)}}},[e._v(e._s(t.label))])})),0)]),e._v(" "),"upload"===e.currentPage.name?n("div",{staticClass:"content w-full overflow-hidden flex"},[n("vue-upload",{ref:"upload",staticClass:" flex-auto flex bg-white shadow",attrs:{drop:!0,multiple:!0,headers:{"X-Requested-With":"XMLHttpRequest","X-CSRF-TOKEN":e.csrf},accept:"image/*","post-action":e.postMedia},model:{value:e.files,callback:function(t){e.files=t},expression:"files"}},[n("div",{staticClass:"border-dashed border-2 flex flex-auto m-2 p-2 flex-col border-blue-400 items-center justify-center"},[n("h3",{staticClass:"text-3xl font-bold text-gray-600 mb-4"},[e._v(e._s(e.__("Click Here Or Drop Your File To Upload")))]),e._v(" "),n("div",{staticClass:"rounded w-full md:w-2/3 text-gray-700 bg-gray-500 h-56 overflow-y-auto p-2"},[n("ul",e._l(e.files,(function(t,s){return n("li",{key:s,staticClass:"p-2 mb-2 shadow bg-white flex items-center justify-between rounded"},[n("span",[e._v(e._s(t.name))]),e._v(" "),n("span",{staticClass:"rounded bg-blue-400 flex items-center justify-center text-xs p-2"},[e._v(e._s(t.progress)+"%")])])})),0)])])])],1):e._e(),e._v(" "),"gallery"===e.currentPage.name?n("div",{staticClass:"content flex-col w-full overflow-hidden flex"},[e.popup?n("div",{staticClass:"p-2 flex flex-shrink-0 justify-between bg-gray-200"},[n("div"),e._v(" "),n("div",[n("ns-close-button",{on:{click:function(t){return e.popup.close()}}})],1)]):e._e(),e._v(" "),n("div",{staticClass:"flex flex-auto overflow-hidden"},[n("div",{staticClass:"bg-white shadow content flex flex-auto flex-col overflow-y-auto",attrs:{id:"grid"}},[n("div",{staticClass:"flex flex-auto"},[n("div",{staticClass:"p-2 overflow-x-auto"},[n("div",{staticClass:"grid grid-cols-2 md:grid-cols-4 lg:grid-cols-4 xl:grid-cols-6"},e._l(e.response.data,(function(t,s){return n("div",{key:s},[n("div",{staticClass:"p-2"},[n("div",{staticClass:"rounded-lg w-32 h-32 bg-gray-500 m-2 overflow-hidden flex items-center justify-center",class:t.selected?"ring-4 ring-blue-500 ring-opacity-50":"",on:{click:function(n){return e.selectResource(t)}}},[n("img",{staticClass:"object-cover h-full",attrs:{src:t.sizes.thumb,alt:t.name}})])])])})),0)]),e._v(" "),0===e.response.data.length?n("div",{staticClass:"flex flex-auto items-center justify-center"},[n("h3",{staticClass:"text-2xl text-gray-600 font-bold"},[e._v(e._s(e.__("Nothing has already been uploaded")))])]):e._e()])]),e._v(" "),!e.bulkSelect&&e.hasOneSelected?n("div",{staticClass:"w-64 flex-shrink-0 bg-gray-200",attrs:{id:"preview"}},[n("div",{staticClass:"h-64 bg-gray-600 flex items-center justify-center"},[n("img",{attrs:{src:e.selectedResource.sizes.thumb,alt:e.selectedResource.name}})]),e._v(" "),n("div",{staticClass:"p-4 text-gray-700 text-sm",attrs:{id:"details"}},[n("p",{staticClass:"flex flex-col mb-2"},[n("strong",{staticClass:"font-bold block"},[e._v(e._s(e.__("File Name"))+": ")]),n("span",[e._v(e._s(e.selectedResource.name))])]),e._v(" "),n("p",{staticClass:"flex flex-col mb-2"},[n("strong",{staticClass:"font-bold block"},[e._v(e._s(e.__("Uploaded At"))+":")]),n("span",[e._v(e._s(e.selectedResource.created_at))])]),e._v(" "),n("p",{staticClass:"flex flex-col mb-2"},[n("strong",{staticClass:"font-bold block"},[e._v(e._s(e.__("By"))+" :")]),n("span",[e._v(e._s(e.selectedResource.user.username))])])])]):e._e()]),e._v(" "),n("div",{staticClass:"p-2 flex flex-shrink-0 justify-between bg-gray-200"},[n("div",{staticClass:"flex -mx-2 flex-shrink-0"},[n("div",{staticClass:"px-2 flex-shrink-0 flex"},[n("div",{staticClass:"rounded shadow overflow-hidden border-blue-400 flex text-sm text-gray-700"},[e.bulkSelect?n("button",{staticClass:"bg-white hover:bg-blue-400 hover:text-white py-2 px-3",on:{click:function(t){return e.cancelBulkSelect()}}},[n("i",{staticClass:"las la-times"})]):e._e(),e._v(" "),e.hasOneSelected&&!e.bulkSelect?n("button",{staticClass:"bg-white hover:bg-blue-400 hover:text-white py-2 px-3",on:{click:function(t){e.bulkSelect=!0}}},[n("i",{staticClass:"las la-check-circle"})]):e._e(),e._v(" "),e.hasOneSelected?n("button",{staticClass:"bg-red-400 text-white hover:bg-red-500 hover:text-white py-2 px-3",on:{click:function(t){return e.deleteSelected()}}},[n("i",{staticClass:"las la-trash"})]):e._e()])])]),e._v(" "),n("div",{staticClass:"flex-shrink-0 -mx-2 flex"},[n("div",{staticClass:"px-2"},[n("div",{staticClass:"rounded shadow overflow-hidden border-blue-400 flex text-sm text-gray-700"},[n("button",{staticClass:"p-2",class:1===e.response.current_page?"bg-gray-100 text-gray-600 cursor-not-allowed":"bg-white hover:bg-blue-400 hover:text-white",attrs:{disabled:1===e.response.current_page},on:{click:function(t){return e.loadGallery(e.response.current_page-1)}}},[e._v(e._s(e.__("Previous")))]),e._v(" "),n("hr",{staticClass:"border-r border-gray-700"}),e._v(" "),n("button",{staticClass:"p-2",class:e.response.current_page===e.response.last_page?"bg-gray-100 text-gray-600 cursor-not-allowed":"bg-white hover:bg-blue-400 hover:text-white",attrs:{disabled:e.response.current_page===e.response.last_page},on:{click:function(t){return e.loadGallery(e.response.current_page+1)}}},[e._v(e._s(e.__("Next")))])])]),e._v(" "),e.popup&&e.hasOneSelected?n("div",{staticClass:"px-2"},[n("button",{staticClass:"rounded shadow p-2 bg-blue-400 text-white text-sm",on:{click:function(t){return e.useSelectedEntries()}}},[e._v(e._s(e.__("Use Selected")))])]):e._e()])])]):e._e()])}),[],!1,null,null,null).exports},419:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});const s={data:function(){return{title:"",message:""}},computed:{size:function(){return this.$popupParams.size||"h-full w-full"}},mounted:function(){var e=this;this.title=this.$popupParams.title,this.message=this.$popupParams.message,this.$popup.event.subscribe((function(t){"click-overlay"===t.event&&(e.$popupParams.onAction(!1),e.$popup.close())}))},methods:{__:n(7389).__,emitAction:function(e){this.$popupParams.onAction(e),this.$popup.close()}}};const i=(0,n(1900).Z)(s,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"flex flex-col bg-white shadow-lg w-5/7-screen md:w-4/7-screen lg:w-2/7-screen",class:e.size,attrs:{id:"popup"}},[n("div",{staticClass:"flex items-center justify-center flex-col flex-auto p-4"},[n("h2",{staticClass:"text-xl md:text-3xl font-body text-gray-700 text-center"},[e._v(e._s(e.title))]),e._v(" "),n("p",{staticClass:"py-4 text-sm md:text-base text-gray-600 text-center"},[e._v(e._s(e.message))])]),e._v(" "),n("div",{staticClass:"flex border-t border-gray-200 text-gray-700"},[n("button",{staticClass:"hover:bg-gray-100 flex-auto w-1/2 h-16 flex items-center justify-center uppercase",on:{click:function(t){return e.emitAction(!0)}}},[e._v(e._s(e.__("Yes")))]),e._v(" "),n("hr",{staticClass:"border-r border-gray-200"}),e._v(" "),n("button",{staticClass:"hover:bg-gray-100 flex-auto w-1/2 h-16 flex items-center justify-center uppercase",on:{click:function(t){return e.emitAction(!1)}}},[e._v(e._s(e.__("No")))])])])}),[],!1,null,null,null).exports}},e=>{e.O(0,[898],(()=>{return t=8108,e(e.s=t);var t}));e.O()}]); //# sourceMappingURL=auth.min.js.map \ No newline at end of file diff --git a/public/js/bootstrap.min.js b/public/js/bootstrap.min.js index 180bc5fda..a430c08e8 100644 --- a/public/js/bootstrap.min.js +++ b/public/js/bootstrap.min.js @@ -1,2 +1,2 @@ -(self.webpackChunkNexoPOS_4x=self.webpackChunkNexoPOS_4x||[]).push([[429],{162:(e,t,n)=>{"use strict";n.d(t,{l:()=>B,kq:()=>V,ih:()=>N,kX:()=>R});var r=n(6486),i=n(9669),s=n(2181),a=n(8345),o=n(9624),u=n(9248),c=n(230);function l(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{};return this._request("post",e,t,n)}},{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._request("get",e,void 0,t)}},{key:"delete",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._request("delete",e,void 0,t)}},{key:"put",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this._request("put",e,t,n)}},{key:"response",get:function(){return this._lastRequestData}},{key:"_request",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return t=V.applyFilters("http-client-url",t.replace(/\/$/,"")),this._subject.next({identifier:"async.start",url:t,data:r}),new c.y((function(s){n._client[e](t,r,Object.assign(Object.assign({},n._client.defaults[e]),i)).then((function(e){n._lastRequestData=e,s.next(e.data),s.complete(),n._subject.next({identifier:"async.stop"})})).catch((function(e){var t;s.error((null===(t=e.response)||void 0===t?void 0:t.data)||e.response||e),n._subject.next({identifier:"async.stop"})}))}))}},{key:"subject",value:function(){return this._subject}},{key:"emit",value:function(e){var t=e.identifier,n=e.value;this._subject.next({identifier:t,value:n})}}])&&l(t.prototype,n),r&&l(t,r),e}(),f=n(3);function p(e,t){for(var n=0;n=1e3){for(var n,r=Math.floor((""+e).length/3),i=2;i>=1;i--){if(((n=parseFloat((0!=r?e/Math.pow(1e3,r):e).toPrecision(i)))+"").replace(/[^a-zA-Z 0-9]+/g,"").length<=2)break}n%1!=0&&(n=n.toFixed(1)),t=n+["","k","m","b","t"][r]}return t})),C=n(1356),z=n(9698);function O(e,t){for(var n=0;n0&&window.outerWidth<=480:this.breakpoint="xs";break;case window.outerWidth>480&&window.outerWidth<=640:this.breakpoint="sm";break;case window.outerWidth>640&&window.outerWidth<=1024:this.breakpoint="md";break;case window.outerWidth>1024&&window.outerWidth<=1280:this.breakpoint="lg";break;case window.outerWidth>1280:this.breakpoint="xl"}}}])&&W(t.prototype,n),r&&W(t,r),e}()),D=new m({sidebar:["xs","sm","md"].includes(I.breakpoint)?"hidden":"visible"});N.defineClient(i),window.nsEvent=B,window.nsHttpClient=N,window.nsSnackBar=R,window.nsCurrency=C.W,window.nsTruncate=z.b,window.nsRawCurrency=C.f,window.nsAbbreviate=S,window.nsState=D,window.nsUrl=Z,window.nsScreen=I,window.ChartJS=s,window.EventEmitter=v,window.Popup=g.G,window.RxJS=y,window.FormValidation=_.Z,window.nsCrudHandler=H},1356:(e,t,n)=>{"use strict";n.d(t,{W:()=>c,f:()=>l});var r=n(538),i=n(2077),s=n.n(i),a=n(6740),o=n.n(a),u=new Array(parseInt(ns.currency.ns_currency_precision)).fill("").map((function(e){return 0})).join(""),c=r.default.filter("currency",(function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"full";switch(ns.currency.ns_currency_prefered){case"iso":t=ns.currency.ns_currency_iso;break;case"symbol":t=ns.currency.ns_currency_symbol}if("full"===r){var i={decimal:ns.currency.ns_currency_decimal_separator,separator:ns.currency.ns_currency_thousand_separator,precision:parseInt(ns.currency.ns_currency_precision),symbol:""};n=o()(e,i).format()}else n=s()(e).format("0.0a");return"".concat("before"===ns.currency.ns_currency_position?t:"").concat(n).concat("after"===ns.currency.ns_currency_position?t:"")})),l=function(e){var t="0.".concat(u);return parseFloat(s()(e).format(t))}},9698:(e,t,n)=>{"use strict";n.d(t,{b:()=>r});var r=n(538).default.filter("truncate",(function(e,t){return e?(e=e.toString()).length>t?e.substring(0,t)+"...":e:""}))},7266:(e,t,n)=>{"use strict";function r(e,t){for(var n=0;ni});var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,i;return t=e,(n=[{key:"validateFields",value:function(e){var t=this;return 0===e.map((function(e){return t.checkField(e),e.errors?0===e.errors.length:0})).filter((function(e){return!1===e})).length}},{key:"validateFieldsErrors",value:function(e){var t=this;return e.map((function(e){return t.checkField(e),e.errors})).flat()}},{key:"validateForm",value:function(e){e.main&&this.validateField(e.main);var t=[];for(var n in e.tabs){var r=[],i=this.validateFieldsErrors(e.tabs[n].fields);i.length>0&&r.push(i),e.tabs[n].errors=r.flat(),t.push(r.flat())}return t.flat().filter((function(e){return void 0!==e}))}},{key:"initializeTabs",value:function(e){var t=0;for(var n in e)0===t&&(e[n].active=!0),e[n].active=void 0!==e[n].active&&e[n].active,e[n].fields=this.createFields(e[n].fields),t++;return e}},{key:"validateField",value:function(e){return this.checkField(e)}},{key:"fieldsValid",value:function(e){return!(e.map((function(e){return e.errors&&e.errors.length>0})).filter((function(e){return e})).length>0)}},{key:"createFields",value:function(e){return e.map((function(e){return e.type=e.type||"text",e.errors=e.errors||[],e.disabled=e.disabled||!1,"custom"===e.type&&(e.component=nsExtraComponents[e.name]),e}))}},{key:"createForm",value:function(e){if(e.main&&(e.main=this.createFields([e.main])[0]),e.tabs)for(var t in e.tabs)e.tabs[t].fields=this.createFields(e.tabs[t].fields),e.tabs[t].errors=[];return e}},{key:"enableFields",value:function(e){return e.map((function(e){return e.disabled=!1}))}},{key:"disableFields",value:function(e){return e.map((function(e){return e.disabled=!0}))}},{key:"disableForm",value:function(e){for(var t in e.main&&(e.main.disabled=!0),e.tabs)e.tabs[t].fields.forEach((function(e){return e.disabled=!0}))}},{key:"enableForm",value:function(e){for(var t in e.main&&(e.main.disabled=!1),e.tabs)e.tabs[t].fields.forEach((function(e){return e.disabled=!1}))}},{key:"getValue",value:function(e){var t={};return e.forEach((function(e){t[e.name]=e.value})),t}},{key:"checkField",value:function(e){var t=this;return void 0!==e.validation&&(e.errors=[],this.detectValidationRules(e.validation).forEach((function(n){t.fieldPassCheck(e,n)}))),e}},{key:"extractForm",value:function(e){var t={};if(e.main&&(t[e.main.name]=e.main.value),e.tabs)for(var n in e.tabs)void 0===t[n]&&(t[n]={}),t[n]=this.extractFields(e.tabs[n].fields);return t}},{key:"extractFields",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.forEach((function(e){["multiselect"].includes(e.type)?t[e.name]=e.options.filter((function(e){return e.selected})).map((function(e){return e.value})):t[e.name]=e.value})),t}},{key:"detectValidationRules",value:function(e){var t=function(e){var t;return["email","required"].includes(e)?{identifier:e}:(t=/(min)\:([0-9])+/g.exec(e))||(t=/(max)\:([0-9])+/g.exec(e))?{identifier:t[1],value:t[2]}:e};return Array.isArray(e)?e.filter((function(e){return"string"==typeof e})).map(t):e.split("|").map(t)}},{key:"triggerError",value:function(e,t){if(t.errors){var n=function(n){var r=n.split(".").filter((function(e){return!/^\d+$/.test(e)}));2===r.length&&e.tabs[r[0]].fields.forEach((function(e){e.name===r[1]&&t.errors[n].forEach((function(t){var n={identifier:"invalid",invalid:!0,message:t,name:e.name};e.errors.push(n)}))})),n===e.main.name&&t.errors[n].forEach((function(t){e.main.errors.push({identifier:"invalid",invalid:!0,message:t,name:e.main.name})}))};for(var r in t.errors)n(r)}}},{key:"triggerFieldsErrors",value:function(e,t){if(t&&t.errors){var n=function(n){e.forEach((function(e){e.name===n&&t.errors[n].forEach((function(t){var n={identifier:"invalid",invalid:!0,message:t,name:e.name};e.errors.push(n)}))}))};for(var r in t.errors)n(r)}}},{key:"fieldPassCheck",value:function(e,t){if("required"===t.identifier){if(void 0===e.value||null===e.value||0===e.value.length)return e.errors.push({identifier:t.identifier,invalid:!0,name:e.name});e.errors.forEach((function(n,r){n.identifier===t.identifier&&!0===n.invalid&&e.errors.splice(r,1)}))}if("email"===t.identifier){if(!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(e.value))return e.errors.push({identifier:t.identifier,invalid:!0,name:e.name});e.errors.forEach((function(n,r){!0===n[t.identifier]&&e.errors.splice(r,1)}))}return e}}])&&r(t.prototype,n),i&&r(t,i),e}()},7389:(e,t,n)=>{"use strict";n.d(t,{__:()=>r,c:()=>i});var r=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"NexoPOS";return nsLanguage.getEntries(t)&&nsLanguage.getEntries(t)[e]||e},i=function(e,t){return nsLanguage.getEntries(t)&&nsLanguage.getEntries(t)[e]||e}},8603:(e,t,n)=>{"use strict";function r(){var e=this;Object.keys(this).includes("$popup")&&this.$popup.event.subscribe((function(t){"click-overlay"===t.event&&(e.$popupParams&&void 0!==e.$popupParams.reject&&e.$popupParams.reject(!1),e.$popup.close()),"press-esc"===t.event&&(e.$popupParams&&void 0!==e.$popupParams.reject&&e.$popupParams.reject(!1),e.$popup.close())}))}n.d(t,{Z:()=>r})},6386:(e,t,n)=>{"use strict";function r(e){void 0!==this.$popupParams.resolve&&this.$popupParams.reject&&(!1!==e?this.$popupParams.resolve(e):this.$popupParams.reject(e)),this.$popup.close()}n.d(t,{Z:()=>r})},2242:(e,t,n)=>{"use strict";n.d(t,{G:()=>a});var r=n(9248);function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};if(i(this,e),this.config={primarySelector:void 0,popupClass:"shadow-lg h-half w-1/2 bg-white"},this.container=document.createElement("div"),this.popupBody=document.createElement("div"),this.config=Object.assign(this.config,t),void 0===this.config.primarySelector&&document.querySelectorAll(".is-popup").length>0){var n=document.querySelectorAll(".is-popup").length;this.parentWrapper=document.querySelectorAll(".is-popup")[n-1]}else this.parentWrapper=document.querySelector("body").querySelectorAll("div")[0];this.event=new r.x}var t,n,a;return t=e,a=[{key:"show",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=new e(r);return i.open(t,n),i}}],(n=[{key:"open",value:function(e){var t,n,r,i=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=document.querySelector("body").querySelectorAll("div")[0];this.parentWrapper.style.filter="blur(4px)",a.style.filter="blur(6px)",this.container.setAttribute("class","absolute top-0 left-0 w-full h-full flex items-center justify-center is-popup"),this.container.addEventListener("click",(function(e){i.event.next({event:"click-overlay",value:!0}),e.stopPropagation()})),this.popupBody.addEventListener("click",(function(e){e.stopImmediatePropagation()})),this.container.style.background="rgb(51 51 51 / 20%)",this.container.id="popup-container-"+document.querySelectorAll(".is-popup").length,this.popupBody.setAttribute("class"," zoom-out-entrance"),this.popupBody.innerHTML='',this.container.appendChild(this.popupBody),document.body.appendChild(this.container);var o=Vue.extend(e);this.instance=new o({propsData:{popup:this}}),this.instance.template=(null===(t=null==e?void 0:e.options)||void 0===t?void 0:t.template)||void 0,this.instance.render=e.render||void 0,this.instance.methods=(null===(n=null==e?void 0:e.options)||void 0===n?void 0:n.methods)||(null==e?void 0:e.methods),this.instance.data=(null===(r=null==e?void 0:e.options)||void 0===r?void 0:r.data)||(null==e?void 0:e.data),this.instance.$popup=this,this.instance.$popupParams=s,this.instance.$mount("#".concat(this.container.id," .popup-body"))}},{key:"close",value:function(){var e=this;this.instance.$destroy(),this.event.unsubscribe(),this.parentWrapper.style.filter="blur(0px)";var t=document.querySelector("body").querySelectorAll("div")[0];document.querySelectorAll(".is-popup").length<=1&&(t.style.filter="blur(0px)"),this.popupBody.classList.remove("zoom-out-entrance"),this.popupBody.classList.add("zoom-in-exit"),this.container.classList.remove("is-popup"),setTimeout((function(){e.container.remove()}),300)}}])&&s(t.prototype,n),a&&s(t,a),e}()},9624:(e,t,n)=>{"use strict";n.d(t,{S:()=>s});var r=n(3260);function i(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"info"};return r.Observable.create((function(r){var s=n.__createSnack({message:e,label:t,type:i.type}),a=s.buttonNode,o=(s.textNode,s.snackWrapper,s.sampleSnack);a.addEventListener("click",(function(e){r.onNext(a),r.onCompleted(),o.remove()})),n.__startTimer(i.duration,o)}))}},{key:"error",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"error"};return this.show(e,t,Object.assign(Object.assign({},n),{type:"error"}))}},{key:"success",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"success"};return this.show(e,t,Object.assign(Object.assign({},n),{type:"success"}))}},{key:"info",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"info"};return this.show(e,t,Object.assign(Object.assign({},n),{type:"info"}))}},{key:"__startTimer",value:function(e,t){var n,r=function(){e>0&&!1!==e&&(n=setTimeout((function(){t.remove()}),e))};t.addEventListener("mouseenter",(function(){clearTimeout(n)})),t.addEventListener("mouseleave",(function(){r()})),r()}},{key:"__createSnack",value:function(e){var t=e.message,n=e.label,r=e.type,i=void 0===r?"info":r,s=document.getElementById("snack-wrapper")||document.createElement("div"),a=document.createElement("div"),o=document.createElement("p"),u=document.createElement("div"),c=document.createElement("button"),l="",d="";switch(i){case"info":l="text-white hover:bg-blue-400 bg-blue-500",d="bg-gray-900 text-white";break;case"error":l="text-red-700 hover:bg-white bg-white",d="bg-red-500 text-white";break;case"success":l="text-green-700 hover:bg-white bg-white",d="bg-green-500 text-white"}return o.textContent=t,n&&(c.textContent=n,c.setAttribute("class","px-3 py-2 shadow rounded-lg font-bold ".concat(l)),u.appendChild(c)),a.appendChild(o),a.appendChild(u),a.setAttribute("class","md:rounded-lg py-2 px-3 md:w-2/5 w-full z-10 md:my-2 shadow-lg flex justify-between items-center zoom-in-entrance anim-duration-300 ".concat(d)),s.appendChild(a),null===document.getElementById("snack-wrapper")&&(s.setAttribute("id","snack-wrapper"),s.setAttribute("class","absolute bottom-0 w-full flex justify-between items-center flex-col"),document.body.appendChild(s)),{snackWrapper:s,sampleSnack:a,buttonsWrapper:u,buttonNode:c,textNode:o}}}])&&i(t.prototype,n),s&&i(t,s),e}()},4773:()=>{},6700:(e,t,n)=>{var r={"./af":2786,"./af.js":2786,"./ar":867,"./ar-dz":4130,"./ar-dz.js":4130,"./ar-kw":6135,"./ar-kw.js":6135,"./ar-ly":6440,"./ar-ly.js":6440,"./ar-ma":7702,"./ar-ma.js":7702,"./ar-sa":6040,"./ar-sa.js":6040,"./ar-tn":7100,"./ar-tn.js":7100,"./ar.js":867,"./az":1083,"./az.js":1083,"./be":9808,"./be.js":9808,"./bg":8338,"./bg.js":8338,"./bm":7438,"./bm.js":7438,"./bn":8905,"./bn-bd":6225,"./bn-bd.js":6225,"./bn.js":8905,"./bo":1560,"./bo.js":1560,"./br":1278,"./br.js":1278,"./bs":622,"./bs.js":622,"./ca":2468,"./ca.js":2468,"./cs":5822,"./cs.js":5822,"./cv":877,"./cv.js":877,"./cy":7373,"./cy.js":7373,"./da":4780,"./da.js":4780,"./de":9740,"./de-at":217,"./de-at.js":217,"./de-ch":894,"./de-ch.js":894,"./de.js":9740,"./dv":5300,"./dv.js":5300,"./el":837,"./el.js":837,"./en-au":8348,"./en-au.js":8348,"./en-ca":7925,"./en-ca.js":7925,"./en-gb":2243,"./en-gb.js":2243,"./en-ie":6436,"./en-ie.js":6436,"./en-il":7207,"./en-il.js":7207,"./en-in":4175,"./en-in.js":4175,"./en-nz":6319,"./en-nz.js":6319,"./en-sg":1662,"./en-sg.js":1662,"./eo":2915,"./eo.js":2915,"./es":7093,"./es-do":5251,"./es-do.js":5251,"./es-mx":6112,"./es-mx.js":6112,"./es-us":1146,"./es-us.js":1146,"./es.js":7093,"./et":5603,"./et.js":5603,"./eu":7763,"./eu.js":7763,"./fa":6959,"./fa.js":6959,"./fi":1897,"./fi.js":1897,"./fil":2549,"./fil.js":2549,"./fo":4694,"./fo.js":4694,"./fr":4470,"./fr-ca":3049,"./fr-ca.js":3049,"./fr-ch":2330,"./fr-ch.js":2330,"./fr.js":4470,"./fy":5044,"./fy.js":5044,"./ga":9295,"./ga.js":9295,"./gd":2101,"./gd.js":2101,"./gl":8794,"./gl.js":8794,"./gom-deva":7884,"./gom-deva.js":7884,"./gom-latn":3168,"./gom-latn.js":3168,"./gu":5349,"./gu.js":5349,"./he":4206,"./he.js":4206,"./hi":94,"./hi.js":94,"./hr":316,"./hr.js":316,"./hu":2138,"./hu.js":2138,"./hy-am":1423,"./hy-am.js":1423,"./id":9218,"./id.js":9218,"./is":135,"./is.js":135,"./it":626,"./it-ch":150,"./it-ch.js":150,"./it.js":626,"./ja":9183,"./ja.js":9183,"./jv":4286,"./jv.js":4286,"./ka":2105,"./ka.js":2105,"./kk":7772,"./kk.js":7772,"./km":8758,"./km.js":8758,"./kn":9282,"./kn.js":9282,"./ko":3730,"./ko.js":3730,"./ku":1408,"./ku.js":1408,"./ky":3291,"./ky.js":3291,"./lb":6841,"./lb.js":6841,"./lo":5466,"./lo.js":5466,"./lt":7010,"./lt.js":7010,"./lv":7595,"./lv.js":7595,"./me":9861,"./me.js":9861,"./mi":5493,"./mi.js":5493,"./mk":5966,"./mk.js":5966,"./ml":7341,"./ml.js":7341,"./mn":5115,"./mn.js":5115,"./mr":370,"./mr.js":370,"./ms":9847,"./ms-my":1237,"./ms-my.js":1237,"./ms.js":9847,"./mt":2126,"./mt.js":2126,"./my":6165,"./my.js":6165,"./nb":4924,"./nb.js":4924,"./ne":6744,"./ne.js":6744,"./nl":3901,"./nl-be":9814,"./nl-be.js":9814,"./nl.js":3901,"./nn":3877,"./nn.js":3877,"./oc-lnc":2135,"./oc-lnc.js":2135,"./pa-in":5858,"./pa-in.js":5858,"./pl":4495,"./pl.js":4495,"./pt":9520,"./pt-br":7971,"./pt-br.js":7971,"./pt.js":9520,"./ro":6459,"./ro.js":6459,"./ru":238,"./ru.js":238,"./sd":950,"./sd.js":950,"./se":490,"./se.js":490,"./si":124,"./si.js":124,"./sk":4249,"./sk.js":4249,"./sl":4985,"./sl.js":4985,"./sq":1104,"./sq.js":1104,"./sr":9131,"./sr-cyrl":9915,"./sr-cyrl.js":9915,"./sr.js":9131,"./ss":5893,"./ss.js":5893,"./sv":8760,"./sv.js":8760,"./sw":1172,"./sw.js":1172,"./ta":7333,"./ta.js":7333,"./te":3110,"./te.js":3110,"./tet":2095,"./tet.js":2095,"./tg":7321,"./tg.js":7321,"./th":9041,"./th.js":9041,"./tk":9005,"./tk.js":9005,"./tl-ph":5768,"./tl-ph.js":5768,"./tlh":9444,"./tlh.js":9444,"./tr":2397,"./tr.js":2397,"./tzl":8254,"./tzl.js":8254,"./tzm":1106,"./tzm-latn":699,"./tzm-latn.js":699,"./tzm.js":1106,"./ug-cn":9288,"./ug-cn.js":9288,"./uk":7691,"./uk.js":7691,"./ur":3795,"./ur.js":3795,"./uz":6791,"./uz-latn":588,"./uz-latn.js":588,"./uz.js":6791,"./vi":5666,"./vi.js":5666,"./x-pseudo":4378,"./x-pseudo.js":4378,"./yo":5805,"./yo.js":5805,"./zh-cn":3839,"./zh-cn.js":3839,"./zh-hk":5726,"./zh-hk.js":5726,"./zh-mo":9807,"./zh-mo.js":9807,"./zh-tw":4152,"./zh-tw.js":4152};function i(e){var t=s(e);return n(t)}function s(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}i.keys=function(){return Object.keys(r)},i.resolve=s,e.exports=i,i.id=6700}},e=>{var t=t=>e(e.s=t);e.O(0,[170,898],(()=>(t(162),t(4773))));e.O()}]); +(self.webpackChunkNexoPOS_4x=self.webpackChunkNexoPOS_4x||[]).push([[429],{162:(e,t,n)=>{"use strict";n.d(t,{l:()=>B,kq:()=>V,ih:()=>N,kX:()=>R});var r=n(6486),i=n(9669),s=n(2181),a=n(8345),o=n(9624),u=n(9248),c=n(230);function l(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{};return this._request("post",e,t,n)}},{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._request("get",e,void 0,t)}},{key:"delete",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._request("delete",e,void 0,t)}},{key:"put",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this._request("put",e,t,n)}},{key:"response",get:function(){return this._lastRequestData}},{key:"_request",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return t=V.applyFilters("http-client-url",t.replace(/\/$/,"")),this._subject.next({identifier:"async.start",url:t,data:r}),new c.y((function(s){n._client[e](t,r,Object.assign(Object.assign({},n._client.defaults[e]),i)).then((function(e){n._lastRequestData=e,s.next(e.data),s.complete(),n._subject.next({identifier:"async.stop"})})).catch((function(e){var t;s.error((null===(t=e.response)||void 0===t?void 0:t.data)||e.response||e),n._subject.next({identifier:"async.stop"})}))}))}},{key:"subject",value:function(){return this._subject}},{key:"emit",value:function(e){var t=e.identifier,n=e.value;this._subject.next({identifier:t,value:n})}}])&&l(t.prototype,n),r&&l(t,r),e}(),f=n(3);function p(e,t){for(var n=0;n=1e3){for(var n,r=Math.floor((""+e).length/3),i=2;i>=1;i--){if(((n=parseFloat((0!=r?e/Math.pow(1e3,r):e).toPrecision(i)))+"").replace(/[^a-zA-Z 0-9]+/g,"").length<=2)break}n%1!=0&&(n=n.toFixed(1)),t=n+["","k","m","b","t"][r]}return t})),C=n(1356),z=n(9698);function O(e,t){for(var n=0;n0&&window.outerWidth<=480:this.breakpoint="xs";break;case window.outerWidth>480&&window.outerWidth<=640:this.breakpoint="sm";break;case window.outerWidth>640&&window.outerWidth<=1024:this.breakpoint="md";break;case window.outerWidth>1024&&window.outerWidth<=1280:this.breakpoint="lg";break;case window.outerWidth>1280:this.breakpoint="xl"}}}])&&W(t.prototype,n),r&&W(t,r),e}()),D=new m({sidebar:["xs","sm","md"].includes(I.breakpoint)?"hidden":"visible"});N.defineClient(i),window.nsEvent=B,window.nsHttpClient=N,window.nsSnackBar=R,window.nsCurrency=C.W,window.nsTruncate=z.b,window.nsRawCurrency=C.f,window.nsAbbreviate=S,window.nsState=D,window.nsUrl=Z,window.nsScreen=I,window.ChartJS=s,window.EventEmitter=v,window.Popup=k.G,window.RxJS=y,window.FormValidation=_.Z,window.nsCrudHandler=H},1356:(e,t,n)=>{"use strict";n.d(t,{W:()=>c,f:()=>l});var r=n(538),i=n(2077),s=n.n(i),a=n(6740),o=n.n(a),u=new Array(parseInt(ns.currency.ns_currency_precision)).fill("").map((function(e){return 0})).join(""),c=r.default.filter("currency",(function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"full";switch(ns.currency.ns_currency_prefered){case"iso":t=ns.currency.ns_currency_iso;break;case"symbol":t=ns.currency.ns_currency_symbol}if("full"===r){var i={decimal:ns.currency.ns_currency_decimal_separator,separator:ns.currency.ns_currency_thousand_separator,precision:parseInt(ns.currency.ns_currency_precision),symbol:""};n=o()(e,i).format()}else n=s()(e).format("0.0a");return"".concat("before"===ns.currency.ns_currency_position?t:"").concat(n).concat("after"===ns.currency.ns_currency_position?t:"")})),l=function(e){var t="0.".concat(u);return parseFloat(s()(e).format(t))}},9698:(e,t,n)=>{"use strict";n.d(t,{b:()=>r});var r=n(538).default.filter("truncate",(function(e,t){return e?(e=e.toString()).length>t?e.substring(0,t)+"...":e:""}))},7266:(e,t,n)=>{"use strict";function r(e,t){for(var n=0;ni});var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,i;return t=e,(n=[{key:"validateFields",value:function(e){var t=this;return 0===e.map((function(e){return t.checkField(e),e.errors?0===e.errors.length:0})).filter((function(e){return!1===e})).length}},{key:"validateFieldsErrors",value:function(e){var t=this;return e.map((function(e){return t.checkField(e),e.errors})).flat()}},{key:"validateForm",value:function(e){e.main&&this.validateField(e.main);var t=[];for(var n in e.tabs){var r=[],i=this.validateFieldsErrors(e.tabs[n].fields);i.length>0&&r.push(i),e.tabs[n].errors=r.flat(),t.push(r.flat())}return t.flat().filter((function(e){return void 0!==e}))}},{key:"initializeTabs",value:function(e){var t=0;for(var n in e)0===t&&(e[n].active=!0),e[n].active=void 0!==e[n].active&&e[n].active,e[n].fields=this.createFields(e[n].fields),t++;return e}},{key:"validateField",value:function(e){return this.checkField(e)}},{key:"fieldsValid",value:function(e){return!(e.map((function(e){return e.errors&&e.errors.length>0})).filter((function(e){return e})).length>0)}},{key:"createFields",value:function(e){return e.map((function(e){return e.type=e.type||"text",e.errors=e.errors||[],e.disabled=e.disabled||!1,"custom"===e.type&&(e.component=nsExtraComponents[e.name]),e}))}},{key:"createForm",value:function(e){if(e.main&&(e.main=this.createFields([e.main])[0]),e.tabs)for(var t in e.tabs)e.tabs[t].fields=this.createFields(e.tabs[t].fields),e.tabs[t].errors=[];return e}},{key:"enableFields",value:function(e){return e.map((function(e){return e.disabled=!1}))}},{key:"disableFields",value:function(e){return e.map((function(e){return e.disabled=!0}))}},{key:"disableForm",value:function(e){for(var t in e.main&&(e.main.disabled=!0),e.tabs)e.tabs[t].fields.forEach((function(e){return e.disabled=!0}))}},{key:"enableForm",value:function(e){for(var t in e.main&&(e.main.disabled=!1),e.tabs)e.tabs[t].fields.forEach((function(e){return e.disabled=!1}))}},{key:"getValue",value:function(e){var t={};return e.forEach((function(e){t[e.name]=e.value})),t}},{key:"checkField",value:function(e){var t=this;return void 0!==e.validation&&(e.errors=[],this.detectValidationRules(e.validation).forEach((function(n){t.fieldPassCheck(e,n)}))),e}},{key:"extractForm",value:function(e){var t={};if(e.main&&(t[e.main.name]=e.main.value),e.tabs)for(var n in e.tabs)void 0===t[n]&&(t[n]={}),t[n]=this.extractFields(e.tabs[n].fields);return t}},{key:"extractFields",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.forEach((function(e){["multiselect"].includes(e.type)?t[e.name]=e.options.filter((function(e){return e.selected})).map((function(e){return e.value})):t[e.name]=e.value})),t}},{key:"detectValidationRules",value:function(e){var t=function(e){var t;return["email","required"].includes(e)?{identifier:e}:(t=/(min)\:([0-9])+/g.exec(e))||(t=/(max)\:([0-9])+/g.exec(e))?{identifier:t[1],value:t[2]}:e};return Array.isArray(e)?e.filter((function(e){return"string"==typeof e})).map(t):e.split("|").map(t)}},{key:"triggerError",value:function(e,t){if(t.errors){var n=function(n){var r=n.split(".").filter((function(e){return!/^\d+$/.test(e)}));2===r.length&&e.tabs[r[0]].fields.forEach((function(e){e.name===r[1]&&t.errors[n].forEach((function(t){var n={identifier:"invalid",invalid:!0,message:t,name:e.name};e.errors.push(n)}))})),n===e.main.name&&t.errors[n].forEach((function(t){e.main.errors.push({identifier:"invalid",invalid:!0,message:t,name:e.main.name})}))};for(var r in t.errors)n(r)}}},{key:"triggerFieldsErrors",value:function(e,t){if(t&&t.errors){var n=function(n){e.forEach((function(e){e.name===n&&t.errors[n].forEach((function(t){var n={identifier:"invalid",invalid:!0,message:t,name:e.name};e.errors.push(n)}))}))};for(var r in t.errors)n(r)}}},{key:"fieldPassCheck",value:function(e,t){if("required"===t.identifier){if(void 0===e.value||null===e.value||0===e.value.length)return e.errors.push({identifier:t.identifier,invalid:!0,name:e.name});e.errors.forEach((function(n,r){n.identifier===t.identifier&&!0===n.invalid&&e.errors.splice(r,1)}))}if("email"===t.identifier){if(!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(e.value))return e.errors.push({identifier:t.identifier,invalid:!0,name:e.name});e.errors.forEach((function(n,r){!0===n[t.identifier]&&e.errors.splice(r,1)}))}return e}}])&&r(t.prototype,n),i&&r(t,i),e}()},7389:(e,t,n)=>{"use strict";n.d(t,{__:()=>r,c:()=>i});var r=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"NexoPOS";return nsLanguage.getEntries(t)&&nsLanguage.getEntries(t)[e]||e},i=function(e,t){return nsLanguage.getEntries(t)&&nsLanguage.getEntries(t)[e]||e}},8603:(e,t,n)=>{"use strict";function r(){var e=this;Object.keys(this).includes("$popup")&&this.$popup.event.subscribe((function(t){"click-overlay"===t.event&&(e.$popupParams&&void 0!==e.$popupParams.reject&&e.$popupParams.reject(!1),e.$popup.close()),"press-esc"===t.event&&(e.$popupParams&&void 0!==e.$popupParams.reject&&e.$popupParams.reject(!1),e.$popup.close())}))}n.d(t,{Z:()=>r})},6386:(e,t,n)=>{"use strict";function r(e){void 0!==this.$popupParams.resolve&&this.$popupParams.reject&&(!1!==e?this.$popupParams.resolve(e):this.$popupParams.reject(e)),this.$popup.close()}n.d(t,{Z:()=>r})},2242:(e,t,n)=>{"use strict";n.d(t,{G:()=>a});var r=n(9248);function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};if(i(this,e),this.config={primarySelector:void 0,popupClass:"shadow-lg h-half w-1/2 bg-white"},this.container=document.createElement("div"),this.popupBody=document.createElement("div"),this.config=Object.assign(this.config,t),void 0===this.config.primarySelector&&document.querySelectorAll(".is-popup").length>0){var n=document.querySelectorAll(".is-popup").length;this.parentWrapper=document.querySelectorAll(".is-popup")[n-1]}else this.parentWrapper=document.querySelector("body").querySelectorAll("div")[0];this.event=new r.x}var t,n,a;return t=e,a=[{key:"show",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=new e(r);return i.open(t,n),i}}],(n=[{key:"open",value:function(e){var t,n,r,i=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=document.querySelector("body").querySelectorAll("div")[0];this.parentWrapper.style.filter="blur(4px)",a.style.filter="blur(6px)",this.container.setAttribute("class","absolute top-0 left-0 w-full h-full flex items-center justify-center is-popup"),this.container.addEventListener("click",(function(e){i.event.next({event:"click-overlay",value:!0}),e.stopPropagation()})),this.popupBody.addEventListener("click",(function(e){e.stopImmediatePropagation()})),this.container.style.background="rgb(51 51 51 / 20%)",this.container.id="popup-container-"+document.querySelectorAll(".is-popup").length,this.popupBody.setAttribute("class"," zoom-out-entrance"),this.popupBody.innerHTML='',this.container.appendChild(this.popupBody),document.body.appendChild(this.container);var o=Vue.extend(e);this.instance=new o({propsData:{popup:this}}),this.instance.template=(null===(t=null==e?void 0:e.options)||void 0===t?void 0:t.template)||void 0,this.instance.render=e.render||void 0,this.instance.methods=(null===(n=null==e?void 0:e.options)||void 0===n?void 0:n.methods)||(null==e?void 0:e.methods),this.instance.data=(null===(r=null==e?void 0:e.options)||void 0===r?void 0:r.data)||(null==e?void 0:e.data),this.instance.$popup=this,this.instance.$popupParams=s,this.instance.$mount("#".concat(this.container.id," .popup-body"))}},{key:"close",value:function(){var e=this;this.instance.$destroy(),this.event.unsubscribe(),this.parentWrapper.style.filter="blur(0px)";var t=document.querySelector("body").querySelectorAll("div")[0];document.querySelectorAll(".is-popup").length<=1&&(t.style.filter="blur(0px)"),this.popupBody.classList.remove("zoom-out-entrance"),this.popupBody.classList.add("zoom-in-exit"),this.container.classList.remove("is-popup"),setTimeout((function(){e.container.remove()}),300)}}])&&s(t.prototype,n),a&&s(t,a),e}()},9624:(e,t,n)=>{"use strict";n.d(t,{S:()=>s});var r=n(3260);function i(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"info"};return r.Observable.create((function(r){var s=n.__createSnack({message:e,label:t,type:i.type}),a=s.buttonNode,o=(s.textNode,s.snackWrapper,s.sampleSnack);a.addEventListener("click",(function(e){r.onNext(a),r.onCompleted(),o.remove()})),n.__startTimer(i.duration,o)}))}},{key:"error",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"error"};return this.show(e,t,Object.assign(Object.assign({},n),{type:"error"}))}},{key:"success",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"success"};return this.show(e,t,Object.assign(Object.assign({},n),{type:"success"}))}},{key:"info",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"info"};return this.show(e,t,Object.assign(Object.assign({},n),{type:"info"}))}},{key:"__startTimer",value:function(e,t){var n,r=function(){e>0&&!1!==e&&(n=setTimeout((function(){t.remove()}),e))};t.addEventListener("mouseenter",(function(){clearTimeout(n)})),t.addEventListener("mouseleave",(function(){r()})),r()}},{key:"__createSnack",value:function(e){var t=e.message,n=e.label,r=e.type,i=void 0===r?"info":r,s=document.getElementById("snack-wrapper")||document.createElement("div"),a=document.createElement("div"),o=document.createElement("p"),u=document.createElement("div"),c=document.createElement("button"),l="",d="";switch(i){case"info":l="text-white hover:bg-blue-400 bg-blue-500",d="bg-gray-900 text-white";break;case"error":l="text-red-700 hover:bg-white bg-white",d="bg-red-500 text-white";break;case"success":l="text-green-700 hover:bg-white bg-white",d="bg-green-500 text-white"}return o.textContent=t,n&&(c.textContent=n,c.setAttribute("class","px-3 py-2 shadow rounded uppercase ".concat(l)),u.appendChild(c)),a.appendChild(o),a.appendChild(u),a.setAttribute("class","md:rounded py-2 px-3 md:w-2/5 w-full z-10 md:my-2 shadow-lg flex justify-between items-center zoom-in-entrance anim-duration-300 ".concat(d)),s.appendChild(a),null===document.getElementById("snack-wrapper")&&(s.setAttribute("id","snack-wrapper"),s.setAttribute("class","absolute bottom-0 w-full flex justify-between items-center flex-col"),document.body.appendChild(s)),{snackWrapper:s,sampleSnack:a,buttonsWrapper:u,buttonNode:c,textNode:o}}}])&&i(t.prototype,n),s&&i(t,s),e}()},4773:()=>{},6700:(e,t,n)=>{var r={"./af":2786,"./af.js":2786,"./ar":867,"./ar-dz":4130,"./ar-dz.js":4130,"./ar-kw":6135,"./ar-kw.js":6135,"./ar-ly":6440,"./ar-ly.js":6440,"./ar-ma":7702,"./ar-ma.js":7702,"./ar-sa":6040,"./ar-sa.js":6040,"./ar-tn":7100,"./ar-tn.js":7100,"./ar.js":867,"./az":1083,"./az.js":1083,"./be":9808,"./be.js":9808,"./bg":8338,"./bg.js":8338,"./bm":7438,"./bm.js":7438,"./bn":8905,"./bn-bd":6225,"./bn-bd.js":6225,"./bn.js":8905,"./bo":1560,"./bo.js":1560,"./br":1278,"./br.js":1278,"./bs":622,"./bs.js":622,"./ca":2468,"./ca.js":2468,"./cs":5822,"./cs.js":5822,"./cv":877,"./cv.js":877,"./cy":7373,"./cy.js":7373,"./da":4780,"./da.js":4780,"./de":9740,"./de-at":217,"./de-at.js":217,"./de-ch":894,"./de-ch.js":894,"./de.js":9740,"./dv":5300,"./dv.js":5300,"./el":837,"./el.js":837,"./en-au":8348,"./en-au.js":8348,"./en-ca":7925,"./en-ca.js":7925,"./en-gb":2243,"./en-gb.js":2243,"./en-ie":6436,"./en-ie.js":6436,"./en-il":7207,"./en-il.js":7207,"./en-in":4175,"./en-in.js":4175,"./en-nz":6319,"./en-nz.js":6319,"./en-sg":1662,"./en-sg.js":1662,"./eo":2915,"./eo.js":2915,"./es":7093,"./es-do":5251,"./es-do.js":5251,"./es-mx":6112,"./es-mx.js":6112,"./es-us":1146,"./es-us.js":1146,"./es.js":7093,"./et":5603,"./et.js":5603,"./eu":7763,"./eu.js":7763,"./fa":6959,"./fa.js":6959,"./fi":1897,"./fi.js":1897,"./fil":2549,"./fil.js":2549,"./fo":4694,"./fo.js":4694,"./fr":4470,"./fr-ca":3049,"./fr-ca.js":3049,"./fr-ch":2330,"./fr-ch.js":2330,"./fr.js":4470,"./fy":5044,"./fy.js":5044,"./ga":9295,"./ga.js":9295,"./gd":2101,"./gd.js":2101,"./gl":8794,"./gl.js":8794,"./gom-deva":7884,"./gom-deva.js":7884,"./gom-latn":3168,"./gom-latn.js":3168,"./gu":5349,"./gu.js":5349,"./he":4206,"./he.js":4206,"./hi":94,"./hi.js":94,"./hr":316,"./hr.js":316,"./hu":2138,"./hu.js":2138,"./hy-am":1423,"./hy-am.js":1423,"./id":9218,"./id.js":9218,"./is":135,"./is.js":135,"./it":626,"./it-ch":150,"./it-ch.js":150,"./it.js":626,"./ja":9183,"./ja.js":9183,"./jv":4286,"./jv.js":4286,"./ka":2105,"./ka.js":2105,"./kk":7772,"./kk.js":7772,"./km":8758,"./km.js":8758,"./kn":9282,"./kn.js":9282,"./ko":3730,"./ko.js":3730,"./ku":1408,"./ku.js":1408,"./ky":3291,"./ky.js":3291,"./lb":6841,"./lb.js":6841,"./lo":5466,"./lo.js":5466,"./lt":7010,"./lt.js":7010,"./lv":7595,"./lv.js":7595,"./me":9861,"./me.js":9861,"./mi":5493,"./mi.js":5493,"./mk":5966,"./mk.js":5966,"./ml":7341,"./ml.js":7341,"./mn":5115,"./mn.js":5115,"./mr":370,"./mr.js":370,"./ms":9847,"./ms-my":1237,"./ms-my.js":1237,"./ms.js":9847,"./mt":2126,"./mt.js":2126,"./my":6165,"./my.js":6165,"./nb":4924,"./nb.js":4924,"./ne":6744,"./ne.js":6744,"./nl":3901,"./nl-be":9814,"./nl-be.js":9814,"./nl.js":3901,"./nn":3877,"./nn.js":3877,"./oc-lnc":2135,"./oc-lnc.js":2135,"./pa-in":5858,"./pa-in.js":5858,"./pl":4495,"./pl.js":4495,"./pt":9520,"./pt-br":7971,"./pt-br.js":7971,"./pt.js":9520,"./ro":6459,"./ro.js":6459,"./ru":238,"./ru.js":238,"./sd":950,"./sd.js":950,"./se":490,"./se.js":490,"./si":124,"./si.js":124,"./sk":4249,"./sk.js":4249,"./sl":4985,"./sl.js":4985,"./sq":1104,"./sq.js":1104,"./sr":9131,"./sr-cyrl":9915,"./sr-cyrl.js":9915,"./sr.js":9131,"./ss":5893,"./ss.js":5893,"./sv":8760,"./sv.js":8760,"./sw":1172,"./sw.js":1172,"./ta":7333,"./ta.js":7333,"./te":3110,"./te.js":3110,"./tet":2095,"./tet.js":2095,"./tg":7321,"./tg.js":7321,"./th":9041,"./th.js":9041,"./tk":9005,"./tk.js":9005,"./tl-ph":5768,"./tl-ph.js":5768,"./tlh":9444,"./tlh.js":9444,"./tr":2397,"./tr.js":2397,"./tzl":8254,"./tzl.js":8254,"./tzm":1106,"./tzm-latn":699,"./tzm-latn.js":699,"./tzm.js":1106,"./ug-cn":9288,"./ug-cn.js":9288,"./uk":7691,"./uk.js":7691,"./ur":3795,"./ur.js":3795,"./uz":6791,"./uz-latn":588,"./uz-latn.js":588,"./uz.js":6791,"./vi":5666,"./vi.js":5666,"./x-pseudo":4378,"./x-pseudo.js":4378,"./yo":5805,"./yo.js":5805,"./zh-cn":3839,"./zh-cn.js":3839,"./zh-hk":5726,"./zh-hk.js":5726,"./zh-mo":9807,"./zh-mo.js":9807,"./zh-tw":4152,"./zh-tw.js":4152};function i(e){var t=s(e);return n(t)}function s(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}i.keys=function(){return Object.keys(r)},i.resolve=s,e.exports=i,i.id=6700}},e=>{var t=t=>e(e.s=t);e.O(0,[170,898],(()=>(t(162),t(4773))));e.O()}]); //# sourceMappingURL=bootstrap.min.js.map \ No newline at end of file diff --git a/public/js/cashier.min.js b/public/js/cashier.min.js index 51395b405..39963731c 100644 --- a/public/js/cashier.min.js +++ b/public/js/cashier.min.js @@ -1,2 +1,2 @@ -(self.webpackChunkNexoPOS_4x=self.webpackChunkNexoPOS_4x||[]).push([[540],{162:(e,t,n)=>{"use strict";n.d(t,{l:()=>R,kq:()=>V,ih:()=>B,kX:()=>N});var r=n(6486),i=n(9669),s=n(2181),a=n(8345),o=n(9624),u=n(9248),c=n(230);function l(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{};return this._request("post",e,t,n)}},{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._request("get",e,void 0,t)}},{key:"delete",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._request("delete",e,void 0,t)}},{key:"put",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this._request("put",e,t,n)}},{key:"response",get:function(){return this._lastRequestData}},{key:"_request",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return t=V.applyFilters("http-client-url",t.replace(/\/$/,"")),this._subject.next({identifier:"async.start",url:t,data:r}),new c.y((function(s){n._client[e](t,r,Object.assign(Object.assign({},n._client.defaults[e]),i)).then((function(e){n._lastRequestData=e,s.next(e.data),s.complete(),n._subject.next({identifier:"async.stop"})})).catch((function(e){var t;s.error((null===(t=e.response)||void 0===t?void 0:t.data)||e.response||e),n._subject.next({identifier:"async.stop"})}))}))}},{key:"subject",value:function(){return this._subject}},{key:"emit",value:function(e){var t=e.identifier,n=e.value;this._subject.next({identifier:t,value:n})}}])&&l(t.prototype,n),r&&l(t,r),e}(),f=n(3);function p(e,t){for(var n=0;n=1e3){for(var n,r=Math.floor((""+e).length/3),i=2;i>=1;i--){if(((n=parseFloat((0!=r?e/Math.pow(1e3,r):e).toPrecision(i)))+"").replace(/[^a-zA-Z 0-9]+/g,"").length<=2)break}n%1!=0&&(n=n.toFixed(1)),t=n+["","k","m","b","t"][r]}return t})),C=n(1356),z=n(9698);function O(e,t){for(var n=0;n0&&window.outerWidth<=480:this.breakpoint="xs";break;case window.outerWidth>480&&window.outerWidth<=640:this.breakpoint="sm";break;case window.outerWidth>640&&window.outerWidth<=1024:this.breakpoint="md";break;case window.outerWidth>1024&&window.outerWidth<=1280:this.breakpoint="lg";break;case window.outerWidth>1280:this.breakpoint="xl"}}}])&&W(t.prototype,n),r&&W(t,r),e}()),D=new m({sidebar:["xs","sm","md"].includes(I.breakpoint)?"hidden":"visible"});B.defineClient(i),window.nsEvent=R,window.nsHttpClient=B,window.nsSnackBar=N,window.nsCurrency=C.W,window.nsTruncate=z.b,window.nsRawCurrency=C.f,window.nsAbbreviate=S,window.nsState=D,window.nsUrl=Z,window.nsScreen=I,window.ChartJS=s,window.EventEmitter=v,window.Popup=g.G,window.RxJS=w,window.FormValidation=_.Z,window.nsCrudHandler=H},5005:(e,t,n)=>{"use strict";var r=n(6515),i=n(162),s=n(7389);function a(e,t){for(var n=0;n{"use strict";n.d(t,{W:()=>c,f:()=>l});var r=n(538),i=n(2077),s=n.n(i),a=n(6740),o=n.n(a),u=new Array(parseInt(ns.currency.ns_currency_precision)).fill("").map((function(e){return 0})).join(""),c=r.default.filter("currency",(function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"full";switch(ns.currency.ns_currency_prefered){case"iso":t=ns.currency.ns_currency_iso;break;case"symbol":t=ns.currency.ns_currency_symbol}if("full"===r){var i={decimal:ns.currency.ns_currency_decimal_separator,separator:ns.currency.ns_currency_thousand_separator,precision:parseInt(ns.currency.ns_currency_precision),symbol:""};n=o()(e,i).format()}else n=s()(e).format("0.0a");return"".concat("before"===ns.currency.ns_currency_position?t:"").concat(n).concat("after"===ns.currency.ns_currency_position?t:"")})),l=function(e){var t="0.".concat(u);return parseFloat(s()(e).format(t))}},9698:(e,t,n)=>{"use strict";n.d(t,{b:()=>r});var r=n(538).default.filter("truncate",(function(e,t){return e?(e=e.toString()).length>t?e.substring(0,t)+"...":e:""}))},7266:(e,t,n)=>{"use strict";function r(e,t){for(var n=0;ni});var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,i;return t=e,(n=[{key:"validateFields",value:function(e){var t=this;return 0===e.map((function(e){return t.checkField(e),e.errors?0===e.errors.length:0})).filter((function(e){return!1===e})).length}},{key:"validateFieldsErrors",value:function(e){var t=this;return e.map((function(e){return t.checkField(e),e.errors})).flat()}},{key:"validateForm",value:function(e){e.main&&this.validateField(e.main);var t=[];for(var n in e.tabs){var r=[],i=this.validateFieldsErrors(e.tabs[n].fields);i.length>0&&r.push(i),e.tabs[n].errors=r.flat(),t.push(r.flat())}return t.flat().filter((function(e){return void 0!==e}))}},{key:"initializeTabs",value:function(e){var t=0;for(var n in e)0===t&&(e[n].active=!0),e[n].active=void 0!==e[n].active&&e[n].active,e[n].fields=this.createFields(e[n].fields),t++;return e}},{key:"validateField",value:function(e){return this.checkField(e)}},{key:"fieldsValid",value:function(e){return!(e.map((function(e){return e.errors&&e.errors.length>0})).filter((function(e){return e})).length>0)}},{key:"createFields",value:function(e){return e.map((function(e){return e.type=e.type||"text",e.errors=e.errors||[],e.disabled=e.disabled||!1,"custom"===e.type&&(e.component=nsExtraComponents[e.name]),e}))}},{key:"createForm",value:function(e){if(e.main&&(e.main=this.createFields([e.main])[0]),e.tabs)for(var t in e.tabs)e.tabs[t].fields=this.createFields(e.tabs[t].fields),e.tabs[t].errors=[];return e}},{key:"enableFields",value:function(e){return e.map((function(e){return e.disabled=!1}))}},{key:"disableFields",value:function(e){return e.map((function(e){return e.disabled=!0}))}},{key:"disableForm",value:function(e){for(var t in e.main&&(e.main.disabled=!0),e.tabs)e.tabs[t].fields.forEach((function(e){return e.disabled=!0}))}},{key:"enableForm",value:function(e){for(var t in e.main&&(e.main.disabled=!1),e.tabs)e.tabs[t].fields.forEach((function(e){return e.disabled=!1}))}},{key:"getValue",value:function(e){var t={};return e.forEach((function(e){t[e.name]=e.value})),t}},{key:"checkField",value:function(e){var t=this;return void 0!==e.validation&&(e.errors=[],this.detectValidationRules(e.validation).forEach((function(n){t.fieldPassCheck(e,n)}))),e}},{key:"extractForm",value:function(e){var t={};if(e.main&&(t[e.main.name]=e.main.value),e.tabs)for(var n in e.tabs)void 0===t[n]&&(t[n]={}),t[n]=this.extractFields(e.tabs[n].fields);return t}},{key:"extractFields",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.forEach((function(e){["multiselect"].includes(e.type)?t[e.name]=e.options.filter((function(e){return e.selected})).map((function(e){return e.value})):t[e.name]=e.value})),t}},{key:"detectValidationRules",value:function(e){var t=function(e){var t;return["email","required"].includes(e)?{identifier:e}:(t=/(min)\:([0-9])+/g.exec(e))||(t=/(max)\:([0-9])+/g.exec(e))?{identifier:t[1],value:t[2]}:e};return Array.isArray(e)?e.filter((function(e){return"string"==typeof e})).map(t):e.split("|").map(t)}},{key:"triggerError",value:function(e,t){if(t.errors){var n=function(n){var r=n.split(".").filter((function(e){return!/^\d+$/.test(e)}));2===r.length&&e.tabs[r[0]].fields.forEach((function(e){e.name===r[1]&&t.errors[n].forEach((function(t){var n={identifier:"invalid",invalid:!0,message:t,name:e.name};e.errors.push(n)}))})),n===e.main.name&&t.errors[n].forEach((function(t){e.main.errors.push({identifier:"invalid",invalid:!0,message:t,name:e.main.name})}))};for(var r in t.errors)n(r)}}},{key:"triggerFieldsErrors",value:function(e,t){if(t&&t.errors){var n=function(n){e.forEach((function(e){e.name===n&&t.errors[n].forEach((function(t){var n={identifier:"invalid",invalid:!0,message:t,name:e.name};e.errors.push(n)}))}))};for(var r in t.errors)n(r)}}},{key:"fieldPassCheck",value:function(e,t){if("required"===t.identifier){if(void 0===e.value||null===e.value||0===e.value.length)return e.errors.push({identifier:t.identifier,invalid:!0,name:e.name});e.errors.forEach((function(n,r){n.identifier===t.identifier&&!0===n.invalid&&e.errors.splice(r,1)}))}if("email"===t.identifier){if(!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(e.value))return e.errors.push({identifier:t.identifier,invalid:!0,name:e.name});e.errors.forEach((function(n,r){!0===n[t.identifier]&&e.errors.splice(r,1)}))}return e}}])&&r(t.prototype,n),i&&r(t,i),e}()},7389:(e,t,n)=>{"use strict";n.d(t,{__:()=>r,c:()=>i});var r=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"NexoPOS";return nsLanguage.getEntries(t)&&nsLanguage.getEntries(t)[e]||e},i=function(e,t){return nsLanguage.getEntries(t)&&nsLanguage.getEntries(t)[e]||e}},8603:(e,t,n)=>{"use strict";function r(){var e=this;Object.keys(this).includes("$popup")&&this.$popup.event.subscribe((function(t){"click-overlay"===t.event&&(e.$popupParams&&void 0!==e.$popupParams.reject&&e.$popupParams.reject(!1),e.$popup.close()),"press-esc"===t.event&&(e.$popupParams&&void 0!==e.$popupParams.reject&&e.$popupParams.reject(!1),e.$popup.close())}))}n.d(t,{Z:()=>r})},6386:(e,t,n)=>{"use strict";function r(e){void 0!==this.$popupParams.resolve&&this.$popupParams.reject&&(!1!==e?this.$popupParams.resolve(e):this.$popupParams.reject(e)),this.$popup.close()}n.d(t,{Z:()=>r})},2242:(e,t,n)=>{"use strict";n.d(t,{G:()=>a});var r=n(9248);function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};if(i(this,e),this.config={primarySelector:void 0,popupClass:"shadow-lg h-half w-1/2 bg-white"},this.container=document.createElement("div"),this.popupBody=document.createElement("div"),this.config=Object.assign(this.config,t),void 0===this.config.primarySelector&&document.querySelectorAll(".is-popup").length>0){var n=document.querySelectorAll(".is-popup").length;this.parentWrapper=document.querySelectorAll(".is-popup")[n-1]}else this.parentWrapper=document.querySelector("body").querySelectorAll("div")[0];this.event=new r.x}var t,n,a;return t=e,a=[{key:"show",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=new e(r);return i.open(t,n),i}}],(n=[{key:"open",value:function(e){var t,n,r,i=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=document.querySelector("body").querySelectorAll("div")[0];this.parentWrapper.style.filter="blur(4px)",a.style.filter="blur(6px)",this.container.setAttribute("class","absolute top-0 left-0 w-full h-full flex items-center justify-center is-popup"),this.container.addEventListener("click",(function(e){i.event.next({event:"click-overlay",value:!0}),e.stopPropagation()})),this.popupBody.addEventListener("click",(function(e){e.stopImmediatePropagation()})),this.container.style.background="rgb(51 51 51 / 20%)",this.container.id="popup-container-"+document.querySelectorAll(".is-popup").length,this.popupBody.setAttribute("class"," zoom-out-entrance"),this.popupBody.innerHTML='',this.container.appendChild(this.popupBody),document.body.appendChild(this.container);var o=Vue.extend(e);this.instance=new o({propsData:{popup:this}}),this.instance.template=(null===(t=null==e?void 0:e.options)||void 0===t?void 0:t.template)||void 0,this.instance.render=e.render||void 0,this.instance.methods=(null===(n=null==e?void 0:e.options)||void 0===n?void 0:n.methods)||(null==e?void 0:e.methods),this.instance.data=(null===(r=null==e?void 0:e.options)||void 0===r?void 0:r.data)||(null==e?void 0:e.data),this.instance.$popup=this,this.instance.$popupParams=s,this.instance.$mount("#".concat(this.container.id," .popup-body"))}},{key:"close",value:function(){var e=this;this.instance.$destroy(),this.event.unsubscribe(),this.parentWrapper.style.filter="blur(0px)";var t=document.querySelector("body").querySelectorAll("div")[0];document.querySelectorAll(".is-popup").length<=1&&(t.style.filter="blur(0px)"),this.popupBody.classList.remove("zoom-out-entrance"),this.popupBody.classList.add("zoom-in-exit"),this.container.classList.remove("is-popup"),setTimeout((function(){e.container.remove()}),300)}}])&&s(t.prototype,n),a&&s(t,a),e}()},9624:(e,t,n)=>{"use strict";n.d(t,{S:()=>s});var r=n(3260);function i(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"info"};return r.Observable.create((function(r){var s=n.__createSnack({message:e,label:t,type:i.type}),a=s.buttonNode,o=(s.textNode,s.snackWrapper,s.sampleSnack);a.addEventListener("click",(function(e){r.onNext(a),r.onCompleted(),o.remove()})),n.__startTimer(i.duration,o)}))}},{key:"error",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"error"};return this.show(e,t,Object.assign(Object.assign({},n),{type:"error"}))}},{key:"success",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"success"};return this.show(e,t,Object.assign(Object.assign({},n),{type:"success"}))}},{key:"info",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"info"};return this.show(e,t,Object.assign(Object.assign({},n),{type:"info"}))}},{key:"__startTimer",value:function(e,t){var n,r=function(){e>0&&!1!==e&&(n=setTimeout((function(){t.remove()}),e))};t.addEventListener("mouseenter",(function(){clearTimeout(n)})),t.addEventListener("mouseleave",(function(){r()})),r()}},{key:"__createSnack",value:function(e){var t=e.message,n=e.label,r=e.type,i=void 0===r?"info":r,s=document.getElementById("snack-wrapper")||document.createElement("div"),a=document.createElement("div"),o=document.createElement("p"),u=document.createElement("div"),c=document.createElement("button"),l="",d="";switch(i){case"info":l="text-white hover:bg-blue-400 bg-blue-500",d="bg-gray-900 text-white";break;case"error":l="text-red-700 hover:bg-white bg-white",d="bg-red-500 text-white";break;case"success":l="text-green-700 hover:bg-white bg-white",d="bg-green-500 text-white"}return o.textContent=t,n&&(c.textContent=n,c.setAttribute("class","px-3 py-2 shadow rounded-lg font-bold ".concat(l)),u.appendChild(c)),a.appendChild(o),a.appendChild(u),a.setAttribute("class","md:rounded-lg py-2 px-3 md:w-2/5 w-full z-10 md:my-2 shadow-lg flex justify-between items-center zoom-in-entrance anim-duration-300 ".concat(d)),s.appendChild(a),null===document.getElementById("snack-wrapper")&&(s.setAttribute("id","snack-wrapper"),s.setAttribute("class","absolute bottom-0 w-full flex justify-between items-center flex-col"),document.body.appendChild(s)),{snackWrapper:s,sampleSnack:a,buttonsWrapper:u,buttonNode:c,textNode:o}}}])&&i(t.prototype,n),s&&i(t,s),e}()},6700:(e,t,n)=>{var r={"./af":2786,"./af.js":2786,"./ar":867,"./ar-dz":4130,"./ar-dz.js":4130,"./ar-kw":6135,"./ar-kw.js":6135,"./ar-ly":6440,"./ar-ly.js":6440,"./ar-ma":7702,"./ar-ma.js":7702,"./ar-sa":6040,"./ar-sa.js":6040,"./ar-tn":7100,"./ar-tn.js":7100,"./ar.js":867,"./az":1083,"./az.js":1083,"./be":9808,"./be.js":9808,"./bg":8338,"./bg.js":8338,"./bm":7438,"./bm.js":7438,"./bn":8905,"./bn-bd":6225,"./bn-bd.js":6225,"./bn.js":8905,"./bo":1560,"./bo.js":1560,"./br":1278,"./br.js":1278,"./bs":622,"./bs.js":622,"./ca":2468,"./ca.js":2468,"./cs":5822,"./cs.js":5822,"./cv":877,"./cv.js":877,"./cy":7373,"./cy.js":7373,"./da":4780,"./da.js":4780,"./de":9740,"./de-at":217,"./de-at.js":217,"./de-ch":894,"./de-ch.js":894,"./de.js":9740,"./dv":5300,"./dv.js":5300,"./el":837,"./el.js":837,"./en-au":8348,"./en-au.js":8348,"./en-ca":7925,"./en-ca.js":7925,"./en-gb":2243,"./en-gb.js":2243,"./en-ie":6436,"./en-ie.js":6436,"./en-il":7207,"./en-il.js":7207,"./en-in":4175,"./en-in.js":4175,"./en-nz":6319,"./en-nz.js":6319,"./en-sg":1662,"./en-sg.js":1662,"./eo":2915,"./eo.js":2915,"./es":7093,"./es-do":5251,"./es-do.js":5251,"./es-mx":6112,"./es-mx.js":6112,"./es-us":1146,"./es-us.js":1146,"./es.js":7093,"./et":5603,"./et.js":5603,"./eu":7763,"./eu.js":7763,"./fa":6959,"./fa.js":6959,"./fi":1897,"./fi.js":1897,"./fil":2549,"./fil.js":2549,"./fo":4694,"./fo.js":4694,"./fr":4470,"./fr-ca":3049,"./fr-ca.js":3049,"./fr-ch":2330,"./fr-ch.js":2330,"./fr.js":4470,"./fy":5044,"./fy.js":5044,"./ga":9295,"./ga.js":9295,"./gd":2101,"./gd.js":2101,"./gl":8794,"./gl.js":8794,"./gom-deva":7884,"./gom-deva.js":7884,"./gom-latn":3168,"./gom-latn.js":3168,"./gu":5349,"./gu.js":5349,"./he":4206,"./he.js":4206,"./hi":94,"./hi.js":94,"./hr":316,"./hr.js":316,"./hu":2138,"./hu.js":2138,"./hy-am":1423,"./hy-am.js":1423,"./id":9218,"./id.js":9218,"./is":135,"./is.js":135,"./it":626,"./it-ch":150,"./it-ch.js":150,"./it.js":626,"./ja":9183,"./ja.js":9183,"./jv":4286,"./jv.js":4286,"./ka":2105,"./ka.js":2105,"./kk":7772,"./kk.js":7772,"./km":8758,"./km.js":8758,"./kn":9282,"./kn.js":9282,"./ko":3730,"./ko.js":3730,"./ku":1408,"./ku.js":1408,"./ky":3291,"./ky.js":3291,"./lb":6841,"./lb.js":6841,"./lo":5466,"./lo.js":5466,"./lt":7010,"./lt.js":7010,"./lv":7595,"./lv.js":7595,"./me":9861,"./me.js":9861,"./mi":5493,"./mi.js":5493,"./mk":5966,"./mk.js":5966,"./ml":7341,"./ml.js":7341,"./mn":5115,"./mn.js":5115,"./mr":370,"./mr.js":370,"./ms":9847,"./ms-my":1237,"./ms-my.js":1237,"./ms.js":9847,"./mt":2126,"./mt.js":2126,"./my":6165,"./my.js":6165,"./nb":4924,"./nb.js":4924,"./ne":6744,"./ne.js":6744,"./nl":3901,"./nl-be":9814,"./nl-be.js":9814,"./nl.js":3901,"./nn":3877,"./nn.js":3877,"./oc-lnc":2135,"./oc-lnc.js":2135,"./pa-in":5858,"./pa-in.js":5858,"./pl":4495,"./pl.js":4495,"./pt":9520,"./pt-br":7971,"./pt-br.js":7971,"./pt.js":9520,"./ro":6459,"./ro.js":6459,"./ru":238,"./ru.js":238,"./sd":950,"./sd.js":950,"./se":490,"./se.js":490,"./si":124,"./si.js":124,"./sk":4249,"./sk.js":4249,"./sl":4985,"./sl.js":4985,"./sq":1104,"./sq.js":1104,"./sr":9131,"./sr-cyrl":9915,"./sr-cyrl.js":9915,"./sr.js":9131,"./ss":5893,"./ss.js":5893,"./sv":8760,"./sv.js":8760,"./sw":1172,"./sw.js":1172,"./ta":7333,"./ta.js":7333,"./te":3110,"./te.js":3110,"./tet":2095,"./tet.js":2095,"./tg":7321,"./tg.js":7321,"./th":9041,"./th.js":9041,"./tk":9005,"./tk.js":9005,"./tl-ph":5768,"./tl-ph.js":5768,"./tlh":9444,"./tlh.js":9444,"./tr":2397,"./tr.js":2397,"./tzl":8254,"./tzl.js":8254,"./tzm":1106,"./tzm-latn":699,"./tzm-latn.js":699,"./tzm.js":1106,"./ug-cn":9288,"./ug-cn.js":9288,"./uk":7691,"./uk.js":7691,"./ur":3795,"./ur.js":3795,"./uz":6791,"./uz-latn":588,"./uz-latn.js":588,"./uz.js":6791,"./vi":5666,"./vi.js":5666,"./x-pseudo":4378,"./x-pseudo.js":4378,"./yo":5805,"./yo.js":5805,"./zh-cn":3839,"./zh-cn.js":3839,"./zh-hk":5726,"./zh-hk.js":5726,"./zh-mo":9807,"./zh-mo.js":9807,"./zh-tw":4152,"./zh-tw.js":4152};function i(e){var t=s(e);return n(t)}function s(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}i.keys=function(){return Object.keys(r)},i.resolve=s,e.exports=i,i.id=6700}},e=>{e.O(0,[898],(()=>{return t=5005,e(e.s=t);var t}));e.O()}]); +(self.webpackChunkNexoPOS_4x=self.webpackChunkNexoPOS_4x||[]).push([[540],{162:(e,t,n)=>{"use strict";n.d(t,{l:()=>R,kq:()=>V,ih:()=>B,kX:()=>N});var r=n(6486),i=n(9669),s=n(2181),a=n(8345),o=n(9624),u=n(9248),c=n(230);function l(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{};return this._request("post",e,t,n)}},{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._request("get",e,void 0,t)}},{key:"delete",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._request("delete",e,void 0,t)}},{key:"put",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this._request("put",e,t,n)}},{key:"response",get:function(){return this._lastRequestData}},{key:"_request",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return t=V.applyFilters("http-client-url",t.replace(/\/$/,"")),this._subject.next({identifier:"async.start",url:t,data:r}),new c.y((function(s){n._client[e](t,r,Object.assign(Object.assign({},n._client.defaults[e]),i)).then((function(e){n._lastRequestData=e,s.next(e.data),s.complete(),n._subject.next({identifier:"async.stop"})})).catch((function(e){var t;s.error((null===(t=e.response)||void 0===t?void 0:t.data)||e.response||e),n._subject.next({identifier:"async.stop"})}))}))}},{key:"subject",value:function(){return this._subject}},{key:"emit",value:function(e){var t=e.identifier,n=e.value;this._subject.next({identifier:t,value:n})}}])&&l(t.prototype,n),r&&l(t,r),e}(),f=n(3);function p(e,t){for(var n=0;n=1e3){for(var n,r=Math.floor((""+e).length/3),i=2;i>=1;i--){if(((n=parseFloat((0!=r?e/Math.pow(1e3,r):e).toPrecision(i)))+"").replace(/[^a-zA-Z 0-9]+/g,"").length<=2)break}n%1!=0&&(n=n.toFixed(1)),t=n+["","k","m","b","t"][r]}return t})),C=n(1356),z=n(9698);function O(e,t){for(var n=0;n0&&window.outerWidth<=480:this.breakpoint="xs";break;case window.outerWidth>480&&window.outerWidth<=640:this.breakpoint="sm";break;case window.outerWidth>640&&window.outerWidth<=1024:this.breakpoint="md";break;case window.outerWidth>1024&&window.outerWidth<=1280:this.breakpoint="lg";break;case window.outerWidth>1280:this.breakpoint="xl"}}}])&&W(t.prototype,n),r&&W(t,r),e}()),D=new m({sidebar:["xs","sm","md"].includes(I.breakpoint)?"hidden":"visible"});B.defineClient(i),window.nsEvent=R,window.nsHttpClient=B,window.nsSnackBar=N,window.nsCurrency=C.W,window.nsTruncate=z.b,window.nsRawCurrency=C.f,window.nsAbbreviate=S,window.nsState=D,window.nsUrl=Z,window.nsScreen=I,window.ChartJS=s,window.EventEmitter=v,window.Popup=k.G,window.RxJS=w,window.FormValidation=_.Z,window.nsCrudHandler=H},5005:(e,t,n)=>{"use strict";var r=n(6515),i=n(162),s=n(7389);function a(e,t){for(var n=0;n{"use strict";n.d(t,{W:()=>c,f:()=>l});var r=n(538),i=n(2077),s=n.n(i),a=n(6740),o=n.n(a),u=new Array(parseInt(ns.currency.ns_currency_precision)).fill("").map((function(e){return 0})).join(""),c=r.default.filter("currency",(function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"full";switch(ns.currency.ns_currency_prefered){case"iso":t=ns.currency.ns_currency_iso;break;case"symbol":t=ns.currency.ns_currency_symbol}if("full"===r){var i={decimal:ns.currency.ns_currency_decimal_separator,separator:ns.currency.ns_currency_thousand_separator,precision:parseInt(ns.currency.ns_currency_precision),symbol:""};n=o()(e,i).format()}else n=s()(e).format("0.0a");return"".concat("before"===ns.currency.ns_currency_position?t:"").concat(n).concat("after"===ns.currency.ns_currency_position?t:"")})),l=function(e){var t="0.".concat(u);return parseFloat(s()(e).format(t))}},9698:(e,t,n)=>{"use strict";n.d(t,{b:()=>r});var r=n(538).default.filter("truncate",(function(e,t){return e?(e=e.toString()).length>t?e.substring(0,t)+"...":e:""}))},7266:(e,t,n)=>{"use strict";function r(e,t){for(var n=0;ni});var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,i;return t=e,(n=[{key:"validateFields",value:function(e){var t=this;return 0===e.map((function(e){return t.checkField(e),e.errors?0===e.errors.length:0})).filter((function(e){return!1===e})).length}},{key:"validateFieldsErrors",value:function(e){var t=this;return e.map((function(e){return t.checkField(e),e.errors})).flat()}},{key:"validateForm",value:function(e){e.main&&this.validateField(e.main);var t=[];for(var n in e.tabs){var r=[],i=this.validateFieldsErrors(e.tabs[n].fields);i.length>0&&r.push(i),e.tabs[n].errors=r.flat(),t.push(r.flat())}return t.flat().filter((function(e){return void 0!==e}))}},{key:"initializeTabs",value:function(e){var t=0;for(var n in e)0===t&&(e[n].active=!0),e[n].active=void 0!==e[n].active&&e[n].active,e[n].fields=this.createFields(e[n].fields),t++;return e}},{key:"validateField",value:function(e){return this.checkField(e)}},{key:"fieldsValid",value:function(e){return!(e.map((function(e){return e.errors&&e.errors.length>0})).filter((function(e){return e})).length>0)}},{key:"createFields",value:function(e){return e.map((function(e){return e.type=e.type||"text",e.errors=e.errors||[],e.disabled=e.disabled||!1,"custom"===e.type&&(e.component=nsExtraComponents[e.name]),e}))}},{key:"createForm",value:function(e){if(e.main&&(e.main=this.createFields([e.main])[0]),e.tabs)for(var t in e.tabs)e.tabs[t].fields=this.createFields(e.tabs[t].fields),e.tabs[t].errors=[];return e}},{key:"enableFields",value:function(e){return e.map((function(e){return e.disabled=!1}))}},{key:"disableFields",value:function(e){return e.map((function(e){return e.disabled=!0}))}},{key:"disableForm",value:function(e){for(var t in e.main&&(e.main.disabled=!0),e.tabs)e.tabs[t].fields.forEach((function(e){return e.disabled=!0}))}},{key:"enableForm",value:function(e){for(var t in e.main&&(e.main.disabled=!1),e.tabs)e.tabs[t].fields.forEach((function(e){return e.disabled=!1}))}},{key:"getValue",value:function(e){var t={};return e.forEach((function(e){t[e.name]=e.value})),t}},{key:"checkField",value:function(e){var t=this;return void 0!==e.validation&&(e.errors=[],this.detectValidationRules(e.validation).forEach((function(n){t.fieldPassCheck(e,n)}))),e}},{key:"extractForm",value:function(e){var t={};if(e.main&&(t[e.main.name]=e.main.value),e.tabs)for(var n in e.tabs)void 0===t[n]&&(t[n]={}),t[n]=this.extractFields(e.tabs[n].fields);return t}},{key:"extractFields",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.forEach((function(e){["multiselect"].includes(e.type)?t[e.name]=e.options.filter((function(e){return e.selected})).map((function(e){return e.value})):t[e.name]=e.value})),t}},{key:"detectValidationRules",value:function(e){var t=function(e){var t;return["email","required"].includes(e)?{identifier:e}:(t=/(min)\:([0-9])+/g.exec(e))||(t=/(max)\:([0-9])+/g.exec(e))?{identifier:t[1],value:t[2]}:e};return Array.isArray(e)?e.filter((function(e){return"string"==typeof e})).map(t):e.split("|").map(t)}},{key:"triggerError",value:function(e,t){if(t.errors){var n=function(n){var r=n.split(".").filter((function(e){return!/^\d+$/.test(e)}));2===r.length&&e.tabs[r[0]].fields.forEach((function(e){e.name===r[1]&&t.errors[n].forEach((function(t){var n={identifier:"invalid",invalid:!0,message:t,name:e.name};e.errors.push(n)}))})),n===e.main.name&&t.errors[n].forEach((function(t){e.main.errors.push({identifier:"invalid",invalid:!0,message:t,name:e.main.name})}))};for(var r in t.errors)n(r)}}},{key:"triggerFieldsErrors",value:function(e,t){if(t&&t.errors){var n=function(n){e.forEach((function(e){e.name===n&&t.errors[n].forEach((function(t){var n={identifier:"invalid",invalid:!0,message:t,name:e.name};e.errors.push(n)}))}))};for(var r in t.errors)n(r)}}},{key:"fieldPassCheck",value:function(e,t){if("required"===t.identifier){if(void 0===e.value||null===e.value||0===e.value.length)return e.errors.push({identifier:t.identifier,invalid:!0,name:e.name});e.errors.forEach((function(n,r){n.identifier===t.identifier&&!0===n.invalid&&e.errors.splice(r,1)}))}if("email"===t.identifier){if(!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(e.value))return e.errors.push({identifier:t.identifier,invalid:!0,name:e.name});e.errors.forEach((function(n,r){!0===n[t.identifier]&&e.errors.splice(r,1)}))}return e}}])&&r(t.prototype,n),i&&r(t,i),e}()},7389:(e,t,n)=>{"use strict";n.d(t,{__:()=>r,c:()=>i});var r=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"NexoPOS";return nsLanguage.getEntries(t)&&nsLanguage.getEntries(t)[e]||e},i=function(e,t){return nsLanguage.getEntries(t)&&nsLanguage.getEntries(t)[e]||e}},8603:(e,t,n)=>{"use strict";function r(){var e=this;Object.keys(this).includes("$popup")&&this.$popup.event.subscribe((function(t){"click-overlay"===t.event&&(e.$popupParams&&void 0!==e.$popupParams.reject&&e.$popupParams.reject(!1),e.$popup.close()),"press-esc"===t.event&&(e.$popupParams&&void 0!==e.$popupParams.reject&&e.$popupParams.reject(!1),e.$popup.close())}))}n.d(t,{Z:()=>r})},6386:(e,t,n)=>{"use strict";function r(e){void 0!==this.$popupParams.resolve&&this.$popupParams.reject&&(!1!==e?this.$popupParams.resolve(e):this.$popupParams.reject(e)),this.$popup.close()}n.d(t,{Z:()=>r})},2242:(e,t,n)=>{"use strict";n.d(t,{G:()=>a});var r=n(9248);function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};if(i(this,e),this.config={primarySelector:void 0,popupClass:"shadow-lg h-half w-1/2 bg-white"},this.container=document.createElement("div"),this.popupBody=document.createElement("div"),this.config=Object.assign(this.config,t),void 0===this.config.primarySelector&&document.querySelectorAll(".is-popup").length>0){var n=document.querySelectorAll(".is-popup").length;this.parentWrapper=document.querySelectorAll(".is-popup")[n-1]}else this.parentWrapper=document.querySelector("body").querySelectorAll("div")[0];this.event=new r.x}var t,n,a;return t=e,a=[{key:"show",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=new e(r);return i.open(t,n),i}}],(n=[{key:"open",value:function(e){var t,n,r,i=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=document.querySelector("body").querySelectorAll("div")[0];this.parentWrapper.style.filter="blur(4px)",a.style.filter="blur(6px)",this.container.setAttribute("class","absolute top-0 left-0 w-full h-full flex items-center justify-center is-popup"),this.container.addEventListener("click",(function(e){i.event.next({event:"click-overlay",value:!0}),e.stopPropagation()})),this.popupBody.addEventListener("click",(function(e){e.stopImmediatePropagation()})),this.container.style.background="rgb(51 51 51 / 20%)",this.container.id="popup-container-"+document.querySelectorAll(".is-popup").length,this.popupBody.setAttribute("class"," zoom-out-entrance"),this.popupBody.innerHTML='',this.container.appendChild(this.popupBody),document.body.appendChild(this.container);var o=Vue.extend(e);this.instance=new o({propsData:{popup:this}}),this.instance.template=(null===(t=null==e?void 0:e.options)||void 0===t?void 0:t.template)||void 0,this.instance.render=e.render||void 0,this.instance.methods=(null===(n=null==e?void 0:e.options)||void 0===n?void 0:n.methods)||(null==e?void 0:e.methods),this.instance.data=(null===(r=null==e?void 0:e.options)||void 0===r?void 0:r.data)||(null==e?void 0:e.data),this.instance.$popup=this,this.instance.$popupParams=s,this.instance.$mount("#".concat(this.container.id," .popup-body"))}},{key:"close",value:function(){var e=this;this.instance.$destroy(),this.event.unsubscribe(),this.parentWrapper.style.filter="blur(0px)";var t=document.querySelector("body").querySelectorAll("div")[0];document.querySelectorAll(".is-popup").length<=1&&(t.style.filter="blur(0px)"),this.popupBody.classList.remove("zoom-out-entrance"),this.popupBody.classList.add("zoom-in-exit"),this.container.classList.remove("is-popup"),setTimeout((function(){e.container.remove()}),300)}}])&&s(t.prototype,n),a&&s(t,a),e}()},9624:(e,t,n)=>{"use strict";n.d(t,{S:()=>s});var r=n(3260);function i(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"info"};return r.Observable.create((function(r){var s=n.__createSnack({message:e,label:t,type:i.type}),a=s.buttonNode,o=(s.textNode,s.snackWrapper,s.sampleSnack);a.addEventListener("click",(function(e){r.onNext(a),r.onCompleted(),o.remove()})),n.__startTimer(i.duration,o)}))}},{key:"error",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"error"};return this.show(e,t,Object.assign(Object.assign({},n),{type:"error"}))}},{key:"success",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"success"};return this.show(e,t,Object.assign(Object.assign({},n),{type:"success"}))}},{key:"info",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"info"};return this.show(e,t,Object.assign(Object.assign({},n),{type:"info"}))}},{key:"__startTimer",value:function(e,t){var n,r=function(){e>0&&!1!==e&&(n=setTimeout((function(){t.remove()}),e))};t.addEventListener("mouseenter",(function(){clearTimeout(n)})),t.addEventListener("mouseleave",(function(){r()})),r()}},{key:"__createSnack",value:function(e){var t=e.message,n=e.label,r=e.type,i=void 0===r?"info":r,s=document.getElementById("snack-wrapper")||document.createElement("div"),a=document.createElement("div"),o=document.createElement("p"),u=document.createElement("div"),c=document.createElement("button"),l="",d="";switch(i){case"info":l="text-white hover:bg-blue-400 bg-blue-500",d="bg-gray-900 text-white";break;case"error":l="text-red-700 hover:bg-white bg-white",d="bg-red-500 text-white";break;case"success":l="text-green-700 hover:bg-white bg-white",d="bg-green-500 text-white"}return o.textContent=t,n&&(c.textContent=n,c.setAttribute("class","px-3 py-2 shadow rounded uppercase ".concat(l)),u.appendChild(c)),a.appendChild(o),a.appendChild(u),a.setAttribute("class","md:rounded py-2 px-3 md:w-2/5 w-full z-10 md:my-2 shadow-lg flex justify-between items-center zoom-in-entrance anim-duration-300 ".concat(d)),s.appendChild(a),null===document.getElementById("snack-wrapper")&&(s.setAttribute("id","snack-wrapper"),s.setAttribute("class","absolute bottom-0 w-full flex justify-between items-center flex-col"),document.body.appendChild(s)),{snackWrapper:s,sampleSnack:a,buttonsWrapper:u,buttonNode:c,textNode:o}}}])&&i(t.prototype,n),s&&i(t,s),e}()},6700:(e,t,n)=>{var r={"./af":2786,"./af.js":2786,"./ar":867,"./ar-dz":4130,"./ar-dz.js":4130,"./ar-kw":6135,"./ar-kw.js":6135,"./ar-ly":6440,"./ar-ly.js":6440,"./ar-ma":7702,"./ar-ma.js":7702,"./ar-sa":6040,"./ar-sa.js":6040,"./ar-tn":7100,"./ar-tn.js":7100,"./ar.js":867,"./az":1083,"./az.js":1083,"./be":9808,"./be.js":9808,"./bg":8338,"./bg.js":8338,"./bm":7438,"./bm.js":7438,"./bn":8905,"./bn-bd":6225,"./bn-bd.js":6225,"./bn.js":8905,"./bo":1560,"./bo.js":1560,"./br":1278,"./br.js":1278,"./bs":622,"./bs.js":622,"./ca":2468,"./ca.js":2468,"./cs":5822,"./cs.js":5822,"./cv":877,"./cv.js":877,"./cy":7373,"./cy.js":7373,"./da":4780,"./da.js":4780,"./de":9740,"./de-at":217,"./de-at.js":217,"./de-ch":894,"./de-ch.js":894,"./de.js":9740,"./dv":5300,"./dv.js":5300,"./el":837,"./el.js":837,"./en-au":8348,"./en-au.js":8348,"./en-ca":7925,"./en-ca.js":7925,"./en-gb":2243,"./en-gb.js":2243,"./en-ie":6436,"./en-ie.js":6436,"./en-il":7207,"./en-il.js":7207,"./en-in":4175,"./en-in.js":4175,"./en-nz":6319,"./en-nz.js":6319,"./en-sg":1662,"./en-sg.js":1662,"./eo":2915,"./eo.js":2915,"./es":7093,"./es-do":5251,"./es-do.js":5251,"./es-mx":6112,"./es-mx.js":6112,"./es-us":1146,"./es-us.js":1146,"./es.js":7093,"./et":5603,"./et.js":5603,"./eu":7763,"./eu.js":7763,"./fa":6959,"./fa.js":6959,"./fi":1897,"./fi.js":1897,"./fil":2549,"./fil.js":2549,"./fo":4694,"./fo.js":4694,"./fr":4470,"./fr-ca":3049,"./fr-ca.js":3049,"./fr-ch":2330,"./fr-ch.js":2330,"./fr.js":4470,"./fy":5044,"./fy.js":5044,"./ga":9295,"./ga.js":9295,"./gd":2101,"./gd.js":2101,"./gl":8794,"./gl.js":8794,"./gom-deva":7884,"./gom-deva.js":7884,"./gom-latn":3168,"./gom-latn.js":3168,"./gu":5349,"./gu.js":5349,"./he":4206,"./he.js":4206,"./hi":94,"./hi.js":94,"./hr":316,"./hr.js":316,"./hu":2138,"./hu.js":2138,"./hy-am":1423,"./hy-am.js":1423,"./id":9218,"./id.js":9218,"./is":135,"./is.js":135,"./it":626,"./it-ch":150,"./it-ch.js":150,"./it.js":626,"./ja":9183,"./ja.js":9183,"./jv":4286,"./jv.js":4286,"./ka":2105,"./ka.js":2105,"./kk":7772,"./kk.js":7772,"./km":8758,"./km.js":8758,"./kn":9282,"./kn.js":9282,"./ko":3730,"./ko.js":3730,"./ku":1408,"./ku.js":1408,"./ky":3291,"./ky.js":3291,"./lb":6841,"./lb.js":6841,"./lo":5466,"./lo.js":5466,"./lt":7010,"./lt.js":7010,"./lv":7595,"./lv.js":7595,"./me":9861,"./me.js":9861,"./mi":5493,"./mi.js":5493,"./mk":5966,"./mk.js":5966,"./ml":7341,"./ml.js":7341,"./mn":5115,"./mn.js":5115,"./mr":370,"./mr.js":370,"./ms":9847,"./ms-my":1237,"./ms-my.js":1237,"./ms.js":9847,"./mt":2126,"./mt.js":2126,"./my":6165,"./my.js":6165,"./nb":4924,"./nb.js":4924,"./ne":6744,"./ne.js":6744,"./nl":3901,"./nl-be":9814,"./nl-be.js":9814,"./nl.js":3901,"./nn":3877,"./nn.js":3877,"./oc-lnc":2135,"./oc-lnc.js":2135,"./pa-in":5858,"./pa-in.js":5858,"./pl":4495,"./pl.js":4495,"./pt":9520,"./pt-br":7971,"./pt-br.js":7971,"./pt.js":9520,"./ro":6459,"./ro.js":6459,"./ru":238,"./ru.js":238,"./sd":950,"./sd.js":950,"./se":490,"./se.js":490,"./si":124,"./si.js":124,"./sk":4249,"./sk.js":4249,"./sl":4985,"./sl.js":4985,"./sq":1104,"./sq.js":1104,"./sr":9131,"./sr-cyrl":9915,"./sr-cyrl.js":9915,"./sr.js":9131,"./ss":5893,"./ss.js":5893,"./sv":8760,"./sv.js":8760,"./sw":1172,"./sw.js":1172,"./ta":7333,"./ta.js":7333,"./te":3110,"./te.js":3110,"./tet":2095,"./tet.js":2095,"./tg":7321,"./tg.js":7321,"./th":9041,"./th.js":9041,"./tk":9005,"./tk.js":9005,"./tl-ph":5768,"./tl-ph.js":5768,"./tlh":9444,"./tlh.js":9444,"./tr":2397,"./tr.js":2397,"./tzl":8254,"./tzl.js":8254,"./tzm":1106,"./tzm-latn":699,"./tzm-latn.js":699,"./tzm.js":1106,"./ug-cn":9288,"./ug-cn.js":9288,"./uk":7691,"./uk.js":7691,"./ur":3795,"./ur.js":3795,"./uz":6791,"./uz-latn":588,"./uz-latn.js":588,"./uz.js":6791,"./vi":5666,"./vi.js":5666,"./x-pseudo":4378,"./x-pseudo.js":4378,"./yo":5805,"./yo.js":5805,"./zh-cn":3839,"./zh-cn.js":3839,"./zh-hk":5726,"./zh-hk.js":5726,"./zh-mo":9807,"./zh-mo.js":9807,"./zh-tw":4152,"./zh-tw.js":4152};function i(e){var t=s(e);return n(t)}function s(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}i.keys=function(){return Object.keys(r)},i.resolve=s,e.exports=i,i.id=6700}},e=>{e.O(0,[898],(()=>{return t=5005,e(e.s=t);var t}));e.O()}]); //# sourceMappingURL=cashier.min.js.map \ No newline at end of file diff --git a/public/js/dashboard.min.js b/public/js/dashboard.min.js index df4b14b42..690169e79 100644 --- a/public/js/dashboard.min.js +++ b/public/js/dashboard.min.js @@ -1,2 +1,2 @@ -(self.webpackChunkNexoPOS_4x=self.webpackChunkNexoPOS_4x||[]).push([[997],{162:(e,t,n)=>{"use strict";n.d(t,{l:()=>R,kq:()=>V,ih:()=>B,kX:()=>N});var r=n(6486),i=n(9669),s=n(2181),a=n(8345),o=n(9624),u=n(9248),c=n(230);function l(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{};return this._request("post",e,t,n)}},{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._request("get",e,void 0,t)}},{key:"delete",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._request("delete",e,void 0,t)}},{key:"put",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this._request("put",e,t,n)}},{key:"response",get:function(){return this._lastRequestData}},{key:"_request",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return t=V.applyFilters("http-client-url",t.replace(/\/$/,"")),this._subject.next({identifier:"async.start",url:t,data:r}),new c.y((function(s){n._client[e](t,r,Object.assign(Object.assign({},n._client.defaults[e]),i)).then((function(e){n._lastRequestData=e,s.next(e.data),s.complete(),n._subject.next({identifier:"async.stop"})})).catch((function(e){var t;s.error((null===(t=e.response)||void 0===t?void 0:t.data)||e.response||e),n._subject.next({identifier:"async.stop"})}))}))}},{key:"subject",value:function(){return this._subject}},{key:"emit",value:function(e){var t=e.identifier,n=e.value;this._subject.next({identifier:t,value:n})}}])&&l(t.prototype,n),r&&l(t,r),e}(),f=n(3);function p(e,t){for(var n=0;n=1e3){for(var n,r=Math.floor((""+e).length/3),i=2;i>=1;i--){if(((n=parseFloat((0!=r?e/Math.pow(1e3,r):e).toPrecision(i)))+"").replace(/[^a-zA-Z 0-9]+/g,"").length<=2)break}n%1!=0&&(n=n.toFixed(1)),t=n+["","k","m","b","t"][r]}return t})),C=n(1356),O=n(9698);function z(e,t){for(var n=0;n0&&window.outerWidth<=480:this.breakpoint="xs";break;case window.outerWidth>480&&window.outerWidth<=640:this.breakpoint="sm";break;case window.outerWidth>640&&window.outerWidth<=1024:this.breakpoint="md";break;case window.outerWidth>1024&&window.outerWidth<=1280:this.breakpoint="lg";break;case window.outerWidth>1280:this.breakpoint="xl"}}}])&&W(t.prototype,n),r&&W(t,r),e}()),I=new m({sidebar:["xs","sm","md"].includes(X.breakpoint)?"hidden":"visible"});B.defineClient(i),window.nsEvent=R,window.nsHttpClient=B,window.nsSnackBar=N,window.nsCurrency=C.W,window.nsTruncate=O.b,window.nsRawCurrency=C.f,window.nsAbbreviate=S,window.nsState=I,window.nsUrl=Z,window.nsScreen=X,window.ChartJS=s,window.EventEmitter=h,window.Popup=g.G,window.RxJS=y,window.FormValidation=_.Z,window.nsCrudHandler=H},7775:(e,t,n)=>{"use strict";var r=n(6515),i=n(162);function s(e,t){for(var n=0;n{"use strict";n.d(t,{W:()=>c,f:()=>l});var r=n(538),i=n(2077),s=n.n(i),a=n(6740),o=n.n(a),u=new Array(parseInt(ns.currency.ns_currency_precision)).fill("").map((function(e){return 0})).join(""),c=r.default.filter("currency",(function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"full";switch(ns.currency.ns_currency_prefered){case"iso":t=ns.currency.ns_currency_iso;break;case"symbol":t=ns.currency.ns_currency_symbol}if("full"===r){var i={decimal:ns.currency.ns_currency_decimal_separator,separator:ns.currency.ns_currency_thousand_separator,precision:parseInt(ns.currency.ns_currency_precision),symbol:""};n=o()(e,i).format()}else n=s()(e).format("0.0a");return"".concat("before"===ns.currency.ns_currency_position?t:"").concat(n).concat("after"===ns.currency.ns_currency_position?t:"")})),l=function(e){var t="0.".concat(u);return parseFloat(s()(e).format(t))}},9698:(e,t,n)=>{"use strict";n.d(t,{b:()=>r});var r=n(538).default.filter("truncate",(function(e,t){return e?(e=e.toString()).length>t?e.substring(0,t)+"...":e:""}))},7266:(e,t,n)=>{"use strict";function r(e,t){for(var n=0;ni});var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,i;return t=e,(n=[{key:"validateFields",value:function(e){var t=this;return 0===e.map((function(e){return t.checkField(e),e.errors?0===e.errors.length:0})).filter((function(e){return!1===e})).length}},{key:"validateFieldsErrors",value:function(e){var t=this;return e.map((function(e){return t.checkField(e),e.errors})).flat()}},{key:"validateForm",value:function(e){e.main&&this.validateField(e.main);var t=[];for(var n in e.tabs){var r=[],i=this.validateFieldsErrors(e.tabs[n].fields);i.length>0&&r.push(i),e.tabs[n].errors=r.flat(),t.push(r.flat())}return t.flat().filter((function(e){return void 0!==e}))}},{key:"initializeTabs",value:function(e){var t=0;for(var n in e)0===t&&(e[n].active=!0),e[n].active=void 0!==e[n].active&&e[n].active,e[n].fields=this.createFields(e[n].fields),t++;return e}},{key:"validateField",value:function(e){return this.checkField(e)}},{key:"fieldsValid",value:function(e){return!(e.map((function(e){return e.errors&&e.errors.length>0})).filter((function(e){return e})).length>0)}},{key:"createFields",value:function(e){return e.map((function(e){return e.type=e.type||"text",e.errors=e.errors||[],e.disabled=e.disabled||!1,"custom"===e.type&&(e.component=nsExtraComponents[e.name]),e}))}},{key:"createForm",value:function(e){if(e.main&&(e.main=this.createFields([e.main])[0]),e.tabs)for(var t in e.tabs)e.tabs[t].fields=this.createFields(e.tabs[t].fields),e.tabs[t].errors=[];return e}},{key:"enableFields",value:function(e){return e.map((function(e){return e.disabled=!1}))}},{key:"disableFields",value:function(e){return e.map((function(e){return e.disabled=!0}))}},{key:"disableForm",value:function(e){for(var t in e.main&&(e.main.disabled=!0),e.tabs)e.tabs[t].fields.forEach((function(e){return e.disabled=!0}))}},{key:"enableForm",value:function(e){for(var t in e.main&&(e.main.disabled=!1),e.tabs)e.tabs[t].fields.forEach((function(e){return e.disabled=!1}))}},{key:"getValue",value:function(e){var t={};return e.forEach((function(e){t[e.name]=e.value})),t}},{key:"checkField",value:function(e){var t=this;return void 0!==e.validation&&(e.errors=[],this.detectValidationRules(e.validation).forEach((function(n){t.fieldPassCheck(e,n)}))),e}},{key:"extractForm",value:function(e){var t={};if(e.main&&(t[e.main.name]=e.main.value),e.tabs)for(var n in e.tabs)void 0===t[n]&&(t[n]={}),t[n]=this.extractFields(e.tabs[n].fields);return t}},{key:"extractFields",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.forEach((function(e){["multiselect"].includes(e.type)?t[e.name]=e.options.filter((function(e){return e.selected})).map((function(e){return e.value})):t[e.name]=e.value})),t}},{key:"detectValidationRules",value:function(e){var t=function(e){var t;return["email","required"].includes(e)?{identifier:e}:(t=/(min)\:([0-9])+/g.exec(e))||(t=/(max)\:([0-9])+/g.exec(e))?{identifier:t[1],value:t[2]}:e};return Array.isArray(e)?e.filter((function(e){return"string"==typeof e})).map(t):e.split("|").map(t)}},{key:"triggerError",value:function(e,t){if(t.errors){var n=function(n){var r=n.split(".").filter((function(e){return!/^\d+$/.test(e)}));2===r.length&&e.tabs[r[0]].fields.forEach((function(e){e.name===r[1]&&t.errors[n].forEach((function(t){var n={identifier:"invalid",invalid:!0,message:t,name:e.name};e.errors.push(n)}))})),n===e.main.name&&t.errors[n].forEach((function(t){e.main.errors.push({identifier:"invalid",invalid:!0,message:t,name:e.main.name})}))};for(var r in t.errors)n(r)}}},{key:"triggerFieldsErrors",value:function(e,t){if(t&&t.errors){var n=function(n){e.forEach((function(e){e.name===n&&t.errors[n].forEach((function(t){var n={identifier:"invalid",invalid:!0,message:t,name:e.name};e.errors.push(n)}))}))};for(var r in t.errors)n(r)}}},{key:"fieldPassCheck",value:function(e,t){if("required"===t.identifier){if(void 0===e.value||null===e.value||0===e.value.length)return e.errors.push({identifier:t.identifier,invalid:!0,name:e.name});e.errors.forEach((function(n,r){n.identifier===t.identifier&&!0===n.invalid&&e.errors.splice(r,1)}))}if("email"===t.identifier){if(!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(e.value))return e.errors.push({identifier:t.identifier,invalid:!0,name:e.name});e.errors.forEach((function(n,r){!0===n[t.identifier]&&e.errors.splice(r,1)}))}return e}}])&&r(t.prototype,n),i&&r(t,i),e}()},7389:(e,t,n)=>{"use strict";n.d(t,{__:()=>r,c:()=>i});var r=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"NexoPOS";return nsLanguage.getEntries(t)&&nsLanguage.getEntries(t)[e]||e},i=function(e,t){return nsLanguage.getEntries(t)&&nsLanguage.getEntries(t)[e]||e}},8603:(e,t,n)=>{"use strict";function r(){var e=this;Object.keys(this).includes("$popup")&&this.$popup.event.subscribe((function(t){"click-overlay"===t.event&&(e.$popupParams&&void 0!==e.$popupParams.reject&&e.$popupParams.reject(!1),e.$popup.close()),"press-esc"===t.event&&(e.$popupParams&&void 0!==e.$popupParams.reject&&e.$popupParams.reject(!1),e.$popup.close())}))}n.d(t,{Z:()=>r})},6386:(e,t,n)=>{"use strict";function r(e){void 0!==this.$popupParams.resolve&&this.$popupParams.reject&&(!1!==e?this.$popupParams.resolve(e):this.$popupParams.reject(e)),this.$popup.close()}n.d(t,{Z:()=>r})},2242:(e,t,n)=>{"use strict";n.d(t,{G:()=>a});var r=n(9248);function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};if(i(this,e),this.config={primarySelector:void 0,popupClass:"shadow-lg h-half w-1/2 bg-white"},this.container=document.createElement("div"),this.popupBody=document.createElement("div"),this.config=Object.assign(this.config,t),void 0===this.config.primarySelector&&document.querySelectorAll(".is-popup").length>0){var n=document.querySelectorAll(".is-popup").length;this.parentWrapper=document.querySelectorAll(".is-popup")[n-1]}else this.parentWrapper=document.querySelector("body").querySelectorAll("div")[0];this.event=new r.x}var t,n,a;return t=e,a=[{key:"show",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=new e(r);return i.open(t,n),i}}],(n=[{key:"open",value:function(e){var t,n,r,i=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=document.querySelector("body").querySelectorAll("div")[0];this.parentWrapper.style.filter="blur(4px)",a.style.filter="blur(6px)",this.container.setAttribute("class","absolute top-0 left-0 w-full h-full flex items-center justify-center is-popup"),this.container.addEventListener("click",(function(e){i.event.next({event:"click-overlay",value:!0}),e.stopPropagation()})),this.popupBody.addEventListener("click",(function(e){e.stopImmediatePropagation()})),this.container.style.background="rgb(51 51 51 / 20%)",this.container.id="popup-container-"+document.querySelectorAll(".is-popup").length,this.popupBody.setAttribute("class"," zoom-out-entrance"),this.popupBody.innerHTML='',this.container.appendChild(this.popupBody),document.body.appendChild(this.container);var o=Vue.extend(e);this.instance=new o({propsData:{popup:this}}),this.instance.template=(null===(t=null==e?void 0:e.options)||void 0===t?void 0:t.template)||void 0,this.instance.render=e.render||void 0,this.instance.methods=(null===(n=null==e?void 0:e.options)||void 0===n?void 0:n.methods)||(null==e?void 0:e.methods),this.instance.data=(null===(r=null==e?void 0:e.options)||void 0===r?void 0:r.data)||(null==e?void 0:e.data),this.instance.$popup=this,this.instance.$popupParams=s,this.instance.$mount("#".concat(this.container.id," .popup-body"))}},{key:"close",value:function(){var e=this;this.instance.$destroy(),this.event.unsubscribe(),this.parentWrapper.style.filter="blur(0px)";var t=document.querySelector("body").querySelectorAll("div")[0];document.querySelectorAll(".is-popup").length<=1&&(t.style.filter="blur(0px)"),this.popupBody.classList.remove("zoom-out-entrance"),this.popupBody.classList.add("zoom-in-exit"),this.container.classList.remove("is-popup"),setTimeout((function(){e.container.remove()}),300)}}])&&s(t.prototype,n),a&&s(t,a),e}()},9624:(e,t,n)=>{"use strict";n.d(t,{S:()=>s});var r=n(3260);function i(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"info"};return r.Observable.create((function(r){var s=n.__createSnack({message:e,label:t,type:i.type}),a=s.buttonNode,o=(s.textNode,s.snackWrapper,s.sampleSnack);a.addEventListener("click",(function(e){r.onNext(a),r.onCompleted(),o.remove()})),n.__startTimer(i.duration,o)}))}},{key:"error",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"error"};return this.show(e,t,Object.assign(Object.assign({},n),{type:"error"}))}},{key:"success",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"success"};return this.show(e,t,Object.assign(Object.assign({},n),{type:"success"}))}},{key:"info",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"info"};return this.show(e,t,Object.assign(Object.assign({},n),{type:"info"}))}},{key:"__startTimer",value:function(e,t){var n,r=function(){e>0&&!1!==e&&(n=setTimeout((function(){t.remove()}),e))};t.addEventListener("mouseenter",(function(){clearTimeout(n)})),t.addEventListener("mouseleave",(function(){r()})),r()}},{key:"__createSnack",value:function(e){var t=e.message,n=e.label,r=e.type,i=void 0===r?"info":r,s=document.getElementById("snack-wrapper")||document.createElement("div"),a=document.createElement("div"),o=document.createElement("p"),u=document.createElement("div"),c=document.createElement("button"),l="",d="";switch(i){case"info":l="text-white hover:bg-blue-400 bg-blue-500",d="bg-gray-900 text-white";break;case"error":l="text-red-700 hover:bg-white bg-white",d="bg-red-500 text-white";break;case"success":l="text-green-700 hover:bg-white bg-white",d="bg-green-500 text-white"}return o.textContent=t,n&&(c.textContent=n,c.setAttribute("class","px-3 py-2 shadow rounded-lg font-bold ".concat(l)),u.appendChild(c)),a.appendChild(o),a.appendChild(u),a.setAttribute("class","md:rounded-lg py-2 px-3 md:w-2/5 w-full z-10 md:my-2 shadow-lg flex justify-between items-center zoom-in-entrance anim-duration-300 ".concat(d)),s.appendChild(a),null===document.getElementById("snack-wrapper")&&(s.setAttribute("id","snack-wrapper"),s.setAttribute("class","absolute bottom-0 w-full flex justify-between items-center flex-col"),document.body.appendChild(s)),{snackWrapper:s,sampleSnack:a,buttonsWrapper:u,buttonNode:c,textNode:o}}}])&&i(t.prototype,n),s&&i(t,s),e}()},6700:(e,t,n)=>{var r={"./af":2786,"./af.js":2786,"./ar":867,"./ar-dz":4130,"./ar-dz.js":4130,"./ar-kw":6135,"./ar-kw.js":6135,"./ar-ly":6440,"./ar-ly.js":6440,"./ar-ma":7702,"./ar-ma.js":7702,"./ar-sa":6040,"./ar-sa.js":6040,"./ar-tn":7100,"./ar-tn.js":7100,"./ar.js":867,"./az":1083,"./az.js":1083,"./be":9808,"./be.js":9808,"./bg":8338,"./bg.js":8338,"./bm":7438,"./bm.js":7438,"./bn":8905,"./bn-bd":6225,"./bn-bd.js":6225,"./bn.js":8905,"./bo":1560,"./bo.js":1560,"./br":1278,"./br.js":1278,"./bs":622,"./bs.js":622,"./ca":2468,"./ca.js":2468,"./cs":5822,"./cs.js":5822,"./cv":877,"./cv.js":877,"./cy":7373,"./cy.js":7373,"./da":4780,"./da.js":4780,"./de":9740,"./de-at":217,"./de-at.js":217,"./de-ch":894,"./de-ch.js":894,"./de.js":9740,"./dv":5300,"./dv.js":5300,"./el":837,"./el.js":837,"./en-au":8348,"./en-au.js":8348,"./en-ca":7925,"./en-ca.js":7925,"./en-gb":2243,"./en-gb.js":2243,"./en-ie":6436,"./en-ie.js":6436,"./en-il":7207,"./en-il.js":7207,"./en-in":4175,"./en-in.js":4175,"./en-nz":6319,"./en-nz.js":6319,"./en-sg":1662,"./en-sg.js":1662,"./eo":2915,"./eo.js":2915,"./es":7093,"./es-do":5251,"./es-do.js":5251,"./es-mx":6112,"./es-mx.js":6112,"./es-us":1146,"./es-us.js":1146,"./es.js":7093,"./et":5603,"./et.js":5603,"./eu":7763,"./eu.js":7763,"./fa":6959,"./fa.js":6959,"./fi":1897,"./fi.js":1897,"./fil":2549,"./fil.js":2549,"./fo":4694,"./fo.js":4694,"./fr":4470,"./fr-ca":3049,"./fr-ca.js":3049,"./fr-ch":2330,"./fr-ch.js":2330,"./fr.js":4470,"./fy":5044,"./fy.js":5044,"./ga":9295,"./ga.js":9295,"./gd":2101,"./gd.js":2101,"./gl":8794,"./gl.js":8794,"./gom-deva":7884,"./gom-deva.js":7884,"./gom-latn":3168,"./gom-latn.js":3168,"./gu":5349,"./gu.js":5349,"./he":4206,"./he.js":4206,"./hi":94,"./hi.js":94,"./hr":316,"./hr.js":316,"./hu":2138,"./hu.js":2138,"./hy-am":1423,"./hy-am.js":1423,"./id":9218,"./id.js":9218,"./is":135,"./is.js":135,"./it":626,"./it-ch":150,"./it-ch.js":150,"./it.js":626,"./ja":9183,"./ja.js":9183,"./jv":4286,"./jv.js":4286,"./ka":2105,"./ka.js":2105,"./kk":7772,"./kk.js":7772,"./km":8758,"./km.js":8758,"./kn":9282,"./kn.js":9282,"./ko":3730,"./ko.js":3730,"./ku":1408,"./ku.js":1408,"./ky":3291,"./ky.js":3291,"./lb":6841,"./lb.js":6841,"./lo":5466,"./lo.js":5466,"./lt":7010,"./lt.js":7010,"./lv":7595,"./lv.js":7595,"./me":9861,"./me.js":9861,"./mi":5493,"./mi.js":5493,"./mk":5966,"./mk.js":5966,"./ml":7341,"./ml.js":7341,"./mn":5115,"./mn.js":5115,"./mr":370,"./mr.js":370,"./ms":9847,"./ms-my":1237,"./ms-my.js":1237,"./ms.js":9847,"./mt":2126,"./mt.js":2126,"./my":6165,"./my.js":6165,"./nb":4924,"./nb.js":4924,"./ne":6744,"./ne.js":6744,"./nl":3901,"./nl-be":9814,"./nl-be.js":9814,"./nl.js":3901,"./nn":3877,"./nn.js":3877,"./oc-lnc":2135,"./oc-lnc.js":2135,"./pa-in":5858,"./pa-in.js":5858,"./pl":4495,"./pl.js":4495,"./pt":9520,"./pt-br":7971,"./pt-br.js":7971,"./pt.js":9520,"./ro":6459,"./ro.js":6459,"./ru":238,"./ru.js":238,"./sd":950,"./sd.js":950,"./se":490,"./se.js":490,"./si":124,"./si.js":124,"./sk":4249,"./sk.js":4249,"./sl":4985,"./sl.js":4985,"./sq":1104,"./sq.js":1104,"./sr":9131,"./sr-cyrl":9915,"./sr-cyrl.js":9915,"./sr.js":9131,"./ss":5893,"./ss.js":5893,"./sv":8760,"./sv.js":8760,"./sw":1172,"./sw.js":1172,"./ta":7333,"./ta.js":7333,"./te":3110,"./te.js":3110,"./tet":2095,"./tet.js":2095,"./tg":7321,"./tg.js":7321,"./th":9041,"./th.js":9041,"./tk":9005,"./tk.js":9005,"./tl-ph":5768,"./tl-ph.js":5768,"./tlh":9444,"./tlh.js":9444,"./tr":2397,"./tr.js":2397,"./tzl":8254,"./tzl.js":8254,"./tzm":1106,"./tzm-latn":699,"./tzm-latn.js":699,"./tzm.js":1106,"./ug-cn":9288,"./ug-cn.js":9288,"./uk":7691,"./uk.js":7691,"./ur":3795,"./ur.js":3795,"./uz":6791,"./uz-latn":588,"./uz-latn.js":588,"./uz.js":6791,"./vi":5666,"./vi.js":5666,"./x-pseudo":4378,"./x-pseudo.js":4378,"./yo":5805,"./yo.js":5805,"./zh-cn":3839,"./zh-cn.js":3839,"./zh-hk":5726,"./zh-hk.js":5726,"./zh-mo":9807,"./zh-mo.js":9807,"./zh-tw":4152,"./zh-tw.js":4152};function i(e){var t=s(e);return n(t)}function s(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}i.keys=function(){return Object.keys(r)},i.resolve=s,e.exports=i,i.id=6700}},e=>{e.O(0,[898],(()=>{return t=7775,e(e.s=t);var t}));e.O()}]); +(self.webpackChunkNexoPOS_4x=self.webpackChunkNexoPOS_4x||[]).push([[997],{162:(e,t,n)=>{"use strict";n.d(t,{l:()=>R,kq:()=>V,ih:()=>B,kX:()=>N});var r=n(6486),i=n(9669),s=n(2181),a=n(8345),o=n(9624),u=n(9248),c=n(230);function l(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{};return this._request("post",e,t,n)}},{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._request("get",e,void 0,t)}},{key:"delete",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._request("delete",e,void 0,t)}},{key:"put",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this._request("put",e,t,n)}},{key:"response",get:function(){return this._lastRequestData}},{key:"_request",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return t=V.applyFilters("http-client-url",t.replace(/\/$/,"")),this._subject.next({identifier:"async.start",url:t,data:r}),new c.y((function(s){n._client[e](t,r,Object.assign(Object.assign({},n._client.defaults[e]),i)).then((function(e){n._lastRequestData=e,s.next(e.data),s.complete(),n._subject.next({identifier:"async.stop"})})).catch((function(e){var t;s.error((null===(t=e.response)||void 0===t?void 0:t.data)||e.response||e),n._subject.next({identifier:"async.stop"})}))}))}},{key:"subject",value:function(){return this._subject}},{key:"emit",value:function(e){var t=e.identifier,n=e.value;this._subject.next({identifier:t,value:n})}}])&&l(t.prototype,n),r&&l(t,r),e}(),f=n(3);function p(e,t){for(var n=0;n=1e3){for(var n,r=Math.floor((""+e).length/3),i=2;i>=1;i--){if(((n=parseFloat((0!=r?e/Math.pow(1e3,r):e).toPrecision(i)))+"").replace(/[^a-zA-Z 0-9]+/g,"").length<=2)break}n%1!=0&&(n=n.toFixed(1)),t=n+["","k","m","b","t"][r]}return t})),C=n(1356),O=n(9698);function z(e,t){for(var n=0;n0&&window.outerWidth<=480:this.breakpoint="xs";break;case window.outerWidth>480&&window.outerWidth<=640:this.breakpoint="sm";break;case window.outerWidth>640&&window.outerWidth<=1024:this.breakpoint="md";break;case window.outerWidth>1024&&window.outerWidth<=1280:this.breakpoint="lg";break;case window.outerWidth>1280:this.breakpoint="xl"}}}])&&W(t.prototype,n),r&&W(t,r),e}()),I=new m({sidebar:["xs","sm","md"].includes(X.breakpoint)?"hidden":"visible"});B.defineClient(i),window.nsEvent=R,window.nsHttpClient=B,window.nsSnackBar=N,window.nsCurrency=C.W,window.nsTruncate=O.b,window.nsRawCurrency=C.f,window.nsAbbreviate=S,window.nsState=I,window.nsUrl=Z,window.nsScreen=X,window.ChartJS=s,window.EventEmitter=h,window.Popup=k.G,window.RxJS=y,window.FormValidation=_.Z,window.nsCrudHandler=H},7775:(e,t,n)=>{"use strict";var r=n(6515),i=n(162);function s(e,t){for(var n=0;n{"use strict";n.d(t,{W:()=>c,f:()=>l});var r=n(538),i=n(2077),s=n.n(i),a=n(6740),o=n.n(a),u=new Array(parseInt(ns.currency.ns_currency_precision)).fill("").map((function(e){return 0})).join(""),c=r.default.filter("currency",(function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"full";switch(ns.currency.ns_currency_prefered){case"iso":t=ns.currency.ns_currency_iso;break;case"symbol":t=ns.currency.ns_currency_symbol}if("full"===r){var i={decimal:ns.currency.ns_currency_decimal_separator,separator:ns.currency.ns_currency_thousand_separator,precision:parseInt(ns.currency.ns_currency_precision),symbol:""};n=o()(e,i).format()}else n=s()(e).format("0.0a");return"".concat("before"===ns.currency.ns_currency_position?t:"").concat(n).concat("after"===ns.currency.ns_currency_position?t:"")})),l=function(e){var t="0.".concat(u);return parseFloat(s()(e).format(t))}},9698:(e,t,n)=>{"use strict";n.d(t,{b:()=>r});var r=n(538).default.filter("truncate",(function(e,t){return e?(e=e.toString()).length>t?e.substring(0,t)+"...":e:""}))},7266:(e,t,n)=>{"use strict";function r(e,t){for(var n=0;ni});var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,i;return t=e,(n=[{key:"validateFields",value:function(e){var t=this;return 0===e.map((function(e){return t.checkField(e),e.errors?0===e.errors.length:0})).filter((function(e){return!1===e})).length}},{key:"validateFieldsErrors",value:function(e){var t=this;return e.map((function(e){return t.checkField(e),e.errors})).flat()}},{key:"validateForm",value:function(e){e.main&&this.validateField(e.main);var t=[];for(var n in e.tabs){var r=[],i=this.validateFieldsErrors(e.tabs[n].fields);i.length>0&&r.push(i),e.tabs[n].errors=r.flat(),t.push(r.flat())}return t.flat().filter((function(e){return void 0!==e}))}},{key:"initializeTabs",value:function(e){var t=0;for(var n in e)0===t&&(e[n].active=!0),e[n].active=void 0!==e[n].active&&e[n].active,e[n].fields=this.createFields(e[n].fields),t++;return e}},{key:"validateField",value:function(e){return this.checkField(e)}},{key:"fieldsValid",value:function(e){return!(e.map((function(e){return e.errors&&e.errors.length>0})).filter((function(e){return e})).length>0)}},{key:"createFields",value:function(e){return e.map((function(e){return e.type=e.type||"text",e.errors=e.errors||[],e.disabled=e.disabled||!1,"custom"===e.type&&(e.component=nsExtraComponents[e.name]),e}))}},{key:"createForm",value:function(e){if(e.main&&(e.main=this.createFields([e.main])[0]),e.tabs)for(var t in e.tabs)e.tabs[t].fields=this.createFields(e.tabs[t].fields),e.tabs[t].errors=[];return e}},{key:"enableFields",value:function(e){return e.map((function(e){return e.disabled=!1}))}},{key:"disableFields",value:function(e){return e.map((function(e){return e.disabled=!0}))}},{key:"disableForm",value:function(e){for(var t in e.main&&(e.main.disabled=!0),e.tabs)e.tabs[t].fields.forEach((function(e){return e.disabled=!0}))}},{key:"enableForm",value:function(e){for(var t in e.main&&(e.main.disabled=!1),e.tabs)e.tabs[t].fields.forEach((function(e){return e.disabled=!1}))}},{key:"getValue",value:function(e){var t={};return e.forEach((function(e){t[e.name]=e.value})),t}},{key:"checkField",value:function(e){var t=this;return void 0!==e.validation&&(e.errors=[],this.detectValidationRules(e.validation).forEach((function(n){t.fieldPassCheck(e,n)}))),e}},{key:"extractForm",value:function(e){var t={};if(e.main&&(t[e.main.name]=e.main.value),e.tabs)for(var n in e.tabs)void 0===t[n]&&(t[n]={}),t[n]=this.extractFields(e.tabs[n].fields);return t}},{key:"extractFields",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.forEach((function(e){["multiselect"].includes(e.type)?t[e.name]=e.options.filter((function(e){return e.selected})).map((function(e){return e.value})):t[e.name]=e.value})),t}},{key:"detectValidationRules",value:function(e){var t=function(e){var t;return["email","required"].includes(e)?{identifier:e}:(t=/(min)\:([0-9])+/g.exec(e))||(t=/(max)\:([0-9])+/g.exec(e))?{identifier:t[1],value:t[2]}:e};return Array.isArray(e)?e.filter((function(e){return"string"==typeof e})).map(t):e.split("|").map(t)}},{key:"triggerError",value:function(e,t){if(t.errors){var n=function(n){var r=n.split(".").filter((function(e){return!/^\d+$/.test(e)}));2===r.length&&e.tabs[r[0]].fields.forEach((function(e){e.name===r[1]&&t.errors[n].forEach((function(t){var n={identifier:"invalid",invalid:!0,message:t,name:e.name};e.errors.push(n)}))})),n===e.main.name&&t.errors[n].forEach((function(t){e.main.errors.push({identifier:"invalid",invalid:!0,message:t,name:e.main.name})}))};for(var r in t.errors)n(r)}}},{key:"triggerFieldsErrors",value:function(e,t){if(t&&t.errors){var n=function(n){e.forEach((function(e){e.name===n&&t.errors[n].forEach((function(t){var n={identifier:"invalid",invalid:!0,message:t,name:e.name};e.errors.push(n)}))}))};for(var r in t.errors)n(r)}}},{key:"fieldPassCheck",value:function(e,t){if("required"===t.identifier){if(void 0===e.value||null===e.value||0===e.value.length)return e.errors.push({identifier:t.identifier,invalid:!0,name:e.name});e.errors.forEach((function(n,r){n.identifier===t.identifier&&!0===n.invalid&&e.errors.splice(r,1)}))}if("email"===t.identifier){if(!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(e.value))return e.errors.push({identifier:t.identifier,invalid:!0,name:e.name});e.errors.forEach((function(n,r){!0===n[t.identifier]&&e.errors.splice(r,1)}))}return e}}])&&r(t.prototype,n),i&&r(t,i),e}()},7389:(e,t,n)=>{"use strict";n.d(t,{__:()=>r,c:()=>i});var r=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"NexoPOS";return nsLanguage.getEntries(t)&&nsLanguage.getEntries(t)[e]||e},i=function(e,t){return nsLanguage.getEntries(t)&&nsLanguage.getEntries(t)[e]||e}},8603:(e,t,n)=>{"use strict";function r(){var e=this;Object.keys(this).includes("$popup")&&this.$popup.event.subscribe((function(t){"click-overlay"===t.event&&(e.$popupParams&&void 0!==e.$popupParams.reject&&e.$popupParams.reject(!1),e.$popup.close()),"press-esc"===t.event&&(e.$popupParams&&void 0!==e.$popupParams.reject&&e.$popupParams.reject(!1),e.$popup.close())}))}n.d(t,{Z:()=>r})},6386:(e,t,n)=>{"use strict";function r(e){void 0!==this.$popupParams.resolve&&this.$popupParams.reject&&(!1!==e?this.$popupParams.resolve(e):this.$popupParams.reject(e)),this.$popup.close()}n.d(t,{Z:()=>r})},2242:(e,t,n)=>{"use strict";n.d(t,{G:()=>a});var r=n(9248);function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};if(i(this,e),this.config={primarySelector:void 0,popupClass:"shadow-lg h-half w-1/2 bg-white"},this.container=document.createElement("div"),this.popupBody=document.createElement("div"),this.config=Object.assign(this.config,t),void 0===this.config.primarySelector&&document.querySelectorAll(".is-popup").length>0){var n=document.querySelectorAll(".is-popup").length;this.parentWrapper=document.querySelectorAll(".is-popup")[n-1]}else this.parentWrapper=document.querySelector("body").querySelectorAll("div")[0];this.event=new r.x}var t,n,a;return t=e,a=[{key:"show",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=new e(r);return i.open(t,n),i}}],(n=[{key:"open",value:function(e){var t,n,r,i=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=document.querySelector("body").querySelectorAll("div")[0];this.parentWrapper.style.filter="blur(4px)",a.style.filter="blur(6px)",this.container.setAttribute("class","absolute top-0 left-0 w-full h-full flex items-center justify-center is-popup"),this.container.addEventListener("click",(function(e){i.event.next({event:"click-overlay",value:!0}),e.stopPropagation()})),this.popupBody.addEventListener("click",(function(e){e.stopImmediatePropagation()})),this.container.style.background="rgb(51 51 51 / 20%)",this.container.id="popup-container-"+document.querySelectorAll(".is-popup").length,this.popupBody.setAttribute("class"," zoom-out-entrance"),this.popupBody.innerHTML='',this.container.appendChild(this.popupBody),document.body.appendChild(this.container);var o=Vue.extend(e);this.instance=new o({propsData:{popup:this}}),this.instance.template=(null===(t=null==e?void 0:e.options)||void 0===t?void 0:t.template)||void 0,this.instance.render=e.render||void 0,this.instance.methods=(null===(n=null==e?void 0:e.options)||void 0===n?void 0:n.methods)||(null==e?void 0:e.methods),this.instance.data=(null===(r=null==e?void 0:e.options)||void 0===r?void 0:r.data)||(null==e?void 0:e.data),this.instance.$popup=this,this.instance.$popupParams=s,this.instance.$mount("#".concat(this.container.id," .popup-body"))}},{key:"close",value:function(){var e=this;this.instance.$destroy(),this.event.unsubscribe(),this.parentWrapper.style.filter="blur(0px)";var t=document.querySelector("body").querySelectorAll("div")[0];document.querySelectorAll(".is-popup").length<=1&&(t.style.filter="blur(0px)"),this.popupBody.classList.remove("zoom-out-entrance"),this.popupBody.classList.add("zoom-in-exit"),this.container.classList.remove("is-popup"),setTimeout((function(){e.container.remove()}),300)}}])&&s(t.prototype,n),a&&s(t,a),e}()},9624:(e,t,n)=>{"use strict";n.d(t,{S:()=>s});var r=n(3260);function i(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"info"};return r.Observable.create((function(r){var s=n.__createSnack({message:e,label:t,type:i.type}),a=s.buttonNode,o=(s.textNode,s.snackWrapper,s.sampleSnack);a.addEventListener("click",(function(e){r.onNext(a),r.onCompleted(),o.remove()})),n.__startTimer(i.duration,o)}))}},{key:"error",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"error"};return this.show(e,t,Object.assign(Object.assign({},n),{type:"error"}))}},{key:"success",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"success"};return this.show(e,t,Object.assign(Object.assign({},n),{type:"success"}))}},{key:"info",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"info"};return this.show(e,t,Object.assign(Object.assign({},n),{type:"info"}))}},{key:"__startTimer",value:function(e,t){var n,r=function(){e>0&&!1!==e&&(n=setTimeout((function(){t.remove()}),e))};t.addEventListener("mouseenter",(function(){clearTimeout(n)})),t.addEventListener("mouseleave",(function(){r()})),r()}},{key:"__createSnack",value:function(e){var t=e.message,n=e.label,r=e.type,i=void 0===r?"info":r,s=document.getElementById("snack-wrapper")||document.createElement("div"),a=document.createElement("div"),o=document.createElement("p"),u=document.createElement("div"),c=document.createElement("button"),l="",d="";switch(i){case"info":l="text-white hover:bg-blue-400 bg-blue-500",d="bg-gray-900 text-white";break;case"error":l="text-red-700 hover:bg-white bg-white",d="bg-red-500 text-white";break;case"success":l="text-green-700 hover:bg-white bg-white",d="bg-green-500 text-white"}return o.textContent=t,n&&(c.textContent=n,c.setAttribute("class","px-3 py-2 shadow rounded uppercase ".concat(l)),u.appendChild(c)),a.appendChild(o),a.appendChild(u),a.setAttribute("class","md:rounded py-2 px-3 md:w-2/5 w-full z-10 md:my-2 shadow-lg flex justify-between items-center zoom-in-entrance anim-duration-300 ".concat(d)),s.appendChild(a),null===document.getElementById("snack-wrapper")&&(s.setAttribute("id","snack-wrapper"),s.setAttribute("class","absolute bottom-0 w-full flex justify-between items-center flex-col"),document.body.appendChild(s)),{snackWrapper:s,sampleSnack:a,buttonsWrapper:u,buttonNode:c,textNode:o}}}])&&i(t.prototype,n),s&&i(t,s),e}()},6700:(e,t,n)=>{var r={"./af":2786,"./af.js":2786,"./ar":867,"./ar-dz":4130,"./ar-dz.js":4130,"./ar-kw":6135,"./ar-kw.js":6135,"./ar-ly":6440,"./ar-ly.js":6440,"./ar-ma":7702,"./ar-ma.js":7702,"./ar-sa":6040,"./ar-sa.js":6040,"./ar-tn":7100,"./ar-tn.js":7100,"./ar.js":867,"./az":1083,"./az.js":1083,"./be":9808,"./be.js":9808,"./bg":8338,"./bg.js":8338,"./bm":7438,"./bm.js":7438,"./bn":8905,"./bn-bd":6225,"./bn-bd.js":6225,"./bn.js":8905,"./bo":1560,"./bo.js":1560,"./br":1278,"./br.js":1278,"./bs":622,"./bs.js":622,"./ca":2468,"./ca.js":2468,"./cs":5822,"./cs.js":5822,"./cv":877,"./cv.js":877,"./cy":7373,"./cy.js":7373,"./da":4780,"./da.js":4780,"./de":9740,"./de-at":217,"./de-at.js":217,"./de-ch":894,"./de-ch.js":894,"./de.js":9740,"./dv":5300,"./dv.js":5300,"./el":837,"./el.js":837,"./en-au":8348,"./en-au.js":8348,"./en-ca":7925,"./en-ca.js":7925,"./en-gb":2243,"./en-gb.js":2243,"./en-ie":6436,"./en-ie.js":6436,"./en-il":7207,"./en-il.js":7207,"./en-in":4175,"./en-in.js":4175,"./en-nz":6319,"./en-nz.js":6319,"./en-sg":1662,"./en-sg.js":1662,"./eo":2915,"./eo.js":2915,"./es":7093,"./es-do":5251,"./es-do.js":5251,"./es-mx":6112,"./es-mx.js":6112,"./es-us":1146,"./es-us.js":1146,"./es.js":7093,"./et":5603,"./et.js":5603,"./eu":7763,"./eu.js":7763,"./fa":6959,"./fa.js":6959,"./fi":1897,"./fi.js":1897,"./fil":2549,"./fil.js":2549,"./fo":4694,"./fo.js":4694,"./fr":4470,"./fr-ca":3049,"./fr-ca.js":3049,"./fr-ch":2330,"./fr-ch.js":2330,"./fr.js":4470,"./fy":5044,"./fy.js":5044,"./ga":9295,"./ga.js":9295,"./gd":2101,"./gd.js":2101,"./gl":8794,"./gl.js":8794,"./gom-deva":7884,"./gom-deva.js":7884,"./gom-latn":3168,"./gom-latn.js":3168,"./gu":5349,"./gu.js":5349,"./he":4206,"./he.js":4206,"./hi":94,"./hi.js":94,"./hr":316,"./hr.js":316,"./hu":2138,"./hu.js":2138,"./hy-am":1423,"./hy-am.js":1423,"./id":9218,"./id.js":9218,"./is":135,"./is.js":135,"./it":626,"./it-ch":150,"./it-ch.js":150,"./it.js":626,"./ja":9183,"./ja.js":9183,"./jv":4286,"./jv.js":4286,"./ka":2105,"./ka.js":2105,"./kk":7772,"./kk.js":7772,"./km":8758,"./km.js":8758,"./kn":9282,"./kn.js":9282,"./ko":3730,"./ko.js":3730,"./ku":1408,"./ku.js":1408,"./ky":3291,"./ky.js":3291,"./lb":6841,"./lb.js":6841,"./lo":5466,"./lo.js":5466,"./lt":7010,"./lt.js":7010,"./lv":7595,"./lv.js":7595,"./me":9861,"./me.js":9861,"./mi":5493,"./mi.js":5493,"./mk":5966,"./mk.js":5966,"./ml":7341,"./ml.js":7341,"./mn":5115,"./mn.js":5115,"./mr":370,"./mr.js":370,"./ms":9847,"./ms-my":1237,"./ms-my.js":1237,"./ms.js":9847,"./mt":2126,"./mt.js":2126,"./my":6165,"./my.js":6165,"./nb":4924,"./nb.js":4924,"./ne":6744,"./ne.js":6744,"./nl":3901,"./nl-be":9814,"./nl-be.js":9814,"./nl.js":3901,"./nn":3877,"./nn.js":3877,"./oc-lnc":2135,"./oc-lnc.js":2135,"./pa-in":5858,"./pa-in.js":5858,"./pl":4495,"./pl.js":4495,"./pt":9520,"./pt-br":7971,"./pt-br.js":7971,"./pt.js":9520,"./ro":6459,"./ro.js":6459,"./ru":238,"./ru.js":238,"./sd":950,"./sd.js":950,"./se":490,"./se.js":490,"./si":124,"./si.js":124,"./sk":4249,"./sk.js":4249,"./sl":4985,"./sl.js":4985,"./sq":1104,"./sq.js":1104,"./sr":9131,"./sr-cyrl":9915,"./sr-cyrl.js":9915,"./sr.js":9131,"./ss":5893,"./ss.js":5893,"./sv":8760,"./sv.js":8760,"./sw":1172,"./sw.js":1172,"./ta":7333,"./ta.js":7333,"./te":3110,"./te.js":3110,"./tet":2095,"./tet.js":2095,"./tg":7321,"./tg.js":7321,"./th":9041,"./th.js":9041,"./tk":9005,"./tk.js":9005,"./tl-ph":5768,"./tl-ph.js":5768,"./tlh":9444,"./tlh.js":9444,"./tr":2397,"./tr.js":2397,"./tzl":8254,"./tzl.js":8254,"./tzm":1106,"./tzm-latn":699,"./tzm-latn.js":699,"./tzm.js":1106,"./ug-cn":9288,"./ug-cn.js":9288,"./uk":7691,"./uk.js":7691,"./ur":3795,"./ur.js":3795,"./uz":6791,"./uz-latn":588,"./uz-latn.js":588,"./uz.js":6791,"./vi":5666,"./vi.js":5666,"./x-pseudo":4378,"./x-pseudo.js":4378,"./yo":5805,"./yo.js":5805,"./zh-cn":3839,"./zh-cn.js":3839,"./zh-hk":5726,"./zh-hk.js":5726,"./zh-mo":9807,"./zh-mo.js":9807,"./zh-tw":4152,"./zh-tw.js":4152};function i(e){var t=s(e);return n(t)}function s(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}i.keys=function(){return Object.keys(r)},i.resolve=s,e.exports=i,i.id=6700}},e=>{e.O(0,[898],(()=>{return t=7775,e(e.s=t);var t}));e.O()}]); //# sourceMappingURL=dashboard.min.js.map \ No newline at end of file diff --git a/public/js/popups.min.js b/public/js/popups.min.js index 3a2e4e80c..264dc1e98 100644 --- a/public/js/popups.min.js +++ b/public/js/popups.min.js @@ -1,2 +1,2 @@ -(self.webpackChunkNexoPOS_4x=self.webpackChunkNexoPOS_4x||[]).push([[820],{162:(e,t,s)=>{"use strict";s.d(t,{l:()=>z,kq:()=>U,ih:()=>I,kX:()=>R});var r=s(6486),n=s(9669),i=s(2181),a=s(8345),o=s(9624),l=s(9248),c=s(230);function u(e,t){for(var s=0;s2&&void 0!==arguments[2]?arguments[2]:{};return this._request("post",e,t,s)}},{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._request("get",e,void 0,t)}},{key:"delete",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._request("delete",e,void 0,t)}},{key:"put",value:function(e,t){var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this._request("put",e,t,s)}},{key:"response",get:function(){return this._lastRequestData}},{key:"_request",value:function(e,t){var s=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return t=U.applyFilters("http-client-url",t.replace(/\/$/,"")),this._subject.next({identifier:"async.start",url:t,data:r}),new c.y((function(i){s._client[e](t,r,Object.assign(Object.assign({},s._client.defaults[e]),n)).then((function(e){s._lastRequestData=e,i.next(e.data),i.complete(),s._subject.next({identifier:"async.stop"})})).catch((function(e){var t;i.error((null===(t=e.response)||void 0===t?void 0:t.data)||e.response||e),s._subject.next({identifier:"async.stop"})}))}))}},{key:"subject",value:function(){return this._subject}},{key:"emit",value:function(e){var t=e.identifier,s=e.value;this._subject.next({identifier:t,value:s})}}])&&u(t.prototype,s),r&&u(t,r),e}(),p=s(3);function f(e,t){for(var s=0;s=1e3){for(var s,r=Math.floor((""+e).length/3),n=2;n>=1;n--){if(((s=parseFloat((0!=r?e/Math.pow(1e3,r):e).toPrecision(n)))+"").replace(/[^a-zA-Z 0-9]+/g,"").length<=2)break}s%1!=0&&(s=s.toFixed(1)),t=s+["","k","m","b","t"][r]}return t})),S=s(1356),O=s(9698);function $(e,t){for(var s=0;s0&&window.outerWidth<=480:this.breakpoint="xs";break;case window.outerWidth>480&&window.outerWidth<=640:this.breakpoint="sm";break;case window.outerWidth>640&&window.outerWidth<=1024:this.breakpoint="md";break;case window.outerWidth>1024&&window.outerWidth<=1280:this.breakpoint="lg";break;case window.outerWidth>1280:this.breakpoint="xl"}}}])&&T(t.prototype,s),r&&T(t,r),e}()),W=new h({sidebar:["xs","sm","md"].includes(N.breakpoint)?"hidden":"visible"});I.defineClient(n),window.nsEvent=z,window.nsHttpClient=I,window.nsSnackBar=R,window.nsCurrency=S.W,window.nsTruncate=O.b,window.nsRawCurrency=S.f,window.nsAbbreviate=P,window.nsState=W,window.nsUrl=X,window.nsScreen=N,window.ChartJS=i,window.EventEmitter=v,window.Popup=x.G,window.RxJS=y,window.FormValidation=C.Z,window.nsCrudHandler=Q},4451:(e,t,s)=>{"use strict";s.d(t,{R:()=>n});var r=s(7389),n=s(538).default.component("ns-select",{data:function(){return{}},props:["name","placeholder","field"],computed:{hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},disabledClass:function(){return this.field.disabled?"bg-gray-200 cursor-not-allowed":"bg-transparent"},inputClass:function(){return this.disabledClass+" "+this.leadClass},leadClass:function(){return this.leading?"pl-8":"px-4"}},methods:{__:r.__},template:'\n
    \n \n
    \n \n
    \n

    \n

    \n {{ __( \'This field is required.\' ) }}\n {{ __( \'This field must contain a valid email address.\' ) }}\n {{ error.message }}\n

    \n
    \n '})},1356:(e,t,s)=>{"use strict";s.d(t,{W:()=>c,f:()=>u});var r=s(538),n=s(2077),i=s.n(n),a=s(6740),o=s.n(a),l=new Array(parseInt(ns.currency.ns_currency_precision)).fill("").map((function(e){return 0})).join(""),c=r.default.filter("currency",(function(e){var t,s,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"full";switch(ns.currency.ns_currency_prefered){case"iso":t=ns.currency.ns_currency_iso;break;case"symbol":t=ns.currency.ns_currency_symbol}if("full"===r){var n={decimal:ns.currency.ns_currency_decimal_separator,separator:ns.currency.ns_currency_thousand_separator,precision:parseInt(ns.currency.ns_currency_precision),symbol:""};s=o()(e,n).format()}else s=i()(e).format("0.0a");return"".concat("before"===ns.currency.ns_currency_position?t:"").concat(s).concat("after"===ns.currency.ns_currency_position?t:"")})),u=function(e){var t="0.".concat(l);return parseFloat(i()(e).format(t))}},9698:(e,t,s)=>{"use strict";s.d(t,{b:()=>r});var r=s(538).default.filter("truncate",(function(e,t){return e?(e=e.toString()).length>t?e.substring(0,t)+"...":e:""}))},7266:(e,t,s)=>{"use strict";function r(e,t){for(var s=0;sn});var n=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,s,n;return t=e,(s=[{key:"validateFields",value:function(e){var t=this;return 0===e.map((function(e){return t.checkField(e),e.errors?0===e.errors.length:0})).filter((function(e){return!1===e})).length}},{key:"validateFieldsErrors",value:function(e){var t=this;return e.map((function(e){return t.checkField(e),e.errors})).flat()}},{key:"validateForm",value:function(e){e.main&&this.validateField(e.main);var t=[];for(var s in e.tabs){var r=[],n=this.validateFieldsErrors(e.tabs[s].fields);n.length>0&&r.push(n),e.tabs[s].errors=r.flat(),t.push(r.flat())}return t.flat().filter((function(e){return void 0!==e}))}},{key:"initializeTabs",value:function(e){var t=0;for(var s in e)0===t&&(e[s].active=!0),e[s].active=void 0!==e[s].active&&e[s].active,e[s].fields=this.createFields(e[s].fields),t++;return e}},{key:"validateField",value:function(e){return this.checkField(e)}},{key:"fieldsValid",value:function(e){return!(e.map((function(e){return e.errors&&e.errors.length>0})).filter((function(e){return e})).length>0)}},{key:"createFields",value:function(e){return e.map((function(e){return e.type=e.type||"text",e.errors=e.errors||[],e.disabled=e.disabled||!1,"custom"===e.type&&(e.component=nsExtraComponents[e.name]),e}))}},{key:"createForm",value:function(e){if(e.main&&(e.main=this.createFields([e.main])[0]),e.tabs)for(var t in e.tabs)e.tabs[t].fields=this.createFields(e.tabs[t].fields),e.tabs[t].errors=[];return e}},{key:"enableFields",value:function(e){return e.map((function(e){return e.disabled=!1}))}},{key:"disableFields",value:function(e){return e.map((function(e){return e.disabled=!0}))}},{key:"disableForm",value:function(e){for(var t in e.main&&(e.main.disabled=!0),e.tabs)e.tabs[t].fields.forEach((function(e){return e.disabled=!0}))}},{key:"enableForm",value:function(e){for(var t in e.main&&(e.main.disabled=!1),e.tabs)e.tabs[t].fields.forEach((function(e){return e.disabled=!1}))}},{key:"getValue",value:function(e){var t={};return e.forEach((function(e){t[e.name]=e.value})),t}},{key:"checkField",value:function(e){var t=this;return void 0!==e.validation&&(e.errors=[],this.detectValidationRules(e.validation).forEach((function(s){t.fieldPassCheck(e,s)}))),e}},{key:"extractForm",value:function(e){var t={};if(e.main&&(t[e.main.name]=e.main.value),e.tabs)for(var s in e.tabs)void 0===t[s]&&(t[s]={}),t[s]=this.extractFields(e.tabs[s].fields);return t}},{key:"extractFields",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.forEach((function(e){["multiselect"].includes(e.type)?t[e.name]=e.options.filter((function(e){return e.selected})).map((function(e){return e.value})):t[e.name]=e.value})),t}},{key:"detectValidationRules",value:function(e){var t=function(e){var t;return["email","required"].includes(e)?{identifier:e}:(t=/(min)\:([0-9])+/g.exec(e))||(t=/(max)\:([0-9])+/g.exec(e))?{identifier:t[1],value:t[2]}:e};return Array.isArray(e)?e.filter((function(e){return"string"==typeof e})).map(t):e.split("|").map(t)}},{key:"triggerError",value:function(e,t){if(t.errors){var s=function(s){var r=s.split(".").filter((function(e){return!/^\d+$/.test(e)}));2===r.length&&e.tabs[r[0]].fields.forEach((function(e){e.name===r[1]&&t.errors[s].forEach((function(t){var s={identifier:"invalid",invalid:!0,message:t,name:e.name};e.errors.push(s)}))})),s===e.main.name&&t.errors[s].forEach((function(t){e.main.errors.push({identifier:"invalid",invalid:!0,message:t,name:e.main.name})}))};for(var r in t.errors)s(r)}}},{key:"triggerFieldsErrors",value:function(e,t){if(t&&t.errors){var s=function(s){e.forEach((function(e){e.name===s&&t.errors[s].forEach((function(t){var s={identifier:"invalid",invalid:!0,message:t,name:e.name};e.errors.push(s)}))}))};for(var r in t.errors)s(r)}}},{key:"fieldPassCheck",value:function(e,t){if("required"===t.identifier){if(void 0===e.value||null===e.value||0===e.value.length)return e.errors.push({identifier:t.identifier,invalid:!0,name:e.name});e.errors.forEach((function(s,r){s.identifier===t.identifier&&!0===s.invalid&&e.errors.splice(r,1)}))}if("email"===t.identifier){if(!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(e.value))return e.errors.push({identifier:t.identifier,invalid:!0,name:e.name});e.errors.forEach((function(s,r){!0===s[t.identifier]&&e.errors.splice(r,1)}))}return e}}])&&r(t.prototype,s),n&&r(t,n),e}()},7389:(e,t,s)=>{"use strict";s.d(t,{__:()=>r,c:()=>n});var r=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"NexoPOS";return nsLanguage.getEntries(t)&&nsLanguage.getEntries(t)[e]||e},n=function(e,t){return nsLanguage.getEntries(t)&&nsLanguage.getEntries(t)[e]||e}},8603:(e,t,s)=>{"use strict";function r(){var e=this;Object.keys(this).includes("$popup")&&this.$popup.event.subscribe((function(t){"click-overlay"===t.event&&(e.$popupParams&&void 0!==e.$popupParams.reject&&e.$popupParams.reject(!1),e.$popup.close()),"press-esc"===t.event&&(e.$popupParams&&void 0!==e.$popupParams.reject&&e.$popupParams.reject(!1),e.$popup.close())}))}s.d(t,{Z:()=>r})},6386:(e,t,s)=>{"use strict";function r(e){void 0!==this.$popupParams.resolve&&this.$popupParams.reject&&(!1!==e?this.$popupParams.resolve(e):this.$popupParams.reject(e)),this.$popup.close()}s.d(t,{Z:()=>r})},2242:(e,t,s)=>{"use strict";s.d(t,{G:()=>a});var r=s(9248);function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var s=0;s0&&void 0!==arguments[0]?arguments[0]:{};if(n(this,e),this.config={primarySelector:void 0,popupClass:"shadow-lg h-half w-1/2 bg-white"},this.container=document.createElement("div"),this.popupBody=document.createElement("div"),this.config=Object.assign(this.config,t),void 0===this.config.primarySelector&&document.querySelectorAll(".is-popup").length>0){var s=document.querySelectorAll(".is-popup").length;this.parentWrapper=document.querySelectorAll(".is-popup")[s-1]}else this.parentWrapper=document.querySelector("body").querySelectorAll("div")[0];this.event=new r.x}var t,s,a;return t=e,a=[{key:"show",value:function(t){var s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=new e(r);return n.open(t,s),n}}],(s=[{key:"open",value:function(e){var t,s,r,n=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=document.querySelector("body").querySelectorAll("div")[0];this.parentWrapper.style.filter="blur(4px)",a.style.filter="blur(6px)",this.container.setAttribute("class","absolute top-0 left-0 w-full h-full flex items-center justify-center is-popup"),this.container.addEventListener("click",(function(e){n.event.next({event:"click-overlay",value:!0}),e.stopPropagation()})),this.popupBody.addEventListener("click",(function(e){e.stopImmediatePropagation()})),this.container.style.background="rgb(51 51 51 / 20%)",this.container.id="popup-container-"+document.querySelectorAll(".is-popup").length,this.popupBody.setAttribute("class"," zoom-out-entrance"),this.popupBody.innerHTML='',this.container.appendChild(this.popupBody),document.body.appendChild(this.container);var o=Vue.extend(e);this.instance=new o({propsData:{popup:this}}),this.instance.template=(null===(t=null==e?void 0:e.options)||void 0===t?void 0:t.template)||void 0,this.instance.render=e.render||void 0,this.instance.methods=(null===(s=null==e?void 0:e.options)||void 0===s?void 0:s.methods)||(null==e?void 0:e.methods),this.instance.data=(null===(r=null==e?void 0:e.options)||void 0===r?void 0:r.data)||(null==e?void 0:e.data),this.instance.$popup=this,this.instance.$popupParams=i,this.instance.$mount("#".concat(this.container.id," .popup-body"))}},{key:"close",value:function(){var e=this;this.instance.$destroy(),this.event.unsubscribe(),this.parentWrapper.style.filter="blur(0px)";var t=document.querySelector("body").querySelectorAll("div")[0];document.querySelectorAll(".is-popup").length<=1&&(t.style.filter="blur(0px)"),this.popupBody.classList.remove("zoom-out-entrance"),this.popupBody.classList.add("zoom-in-exit"),this.container.classList.remove("is-popup"),setTimeout((function(){e.container.remove()}),300)}}])&&i(t.prototype,s),a&&i(t,a),e}()},9624:(e,t,s)=>{"use strict";s.d(t,{S:()=>i});var r=s(3260);function n(e,t){for(var s=0;s2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"info"};return r.Observable.create((function(r){var i=s.__createSnack({message:e,label:t,type:n.type}),a=i.buttonNode,o=(i.textNode,i.snackWrapper,i.sampleSnack);a.addEventListener("click",(function(e){r.onNext(a),r.onCompleted(),o.remove()})),s.__startTimer(n.duration,o)}))}},{key:"error",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"error"};return this.show(e,t,Object.assign(Object.assign({},s),{type:"error"}))}},{key:"success",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"success"};return this.show(e,t,Object.assign(Object.assign({},s),{type:"success"}))}},{key:"info",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"info"};return this.show(e,t,Object.assign(Object.assign({},s),{type:"info"}))}},{key:"__startTimer",value:function(e,t){var s,r=function(){e>0&&!1!==e&&(s=setTimeout((function(){t.remove()}),e))};t.addEventListener("mouseenter",(function(){clearTimeout(s)})),t.addEventListener("mouseleave",(function(){r()})),r()}},{key:"__createSnack",value:function(e){var t=e.message,s=e.label,r=e.type,n=void 0===r?"info":r,i=document.getElementById("snack-wrapper")||document.createElement("div"),a=document.createElement("div"),o=document.createElement("p"),l=document.createElement("div"),c=document.createElement("button"),u="",d="";switch(n){case"info":u="text-white hover:bg-blue-400 bg-blue-500",d="bg-gray-900 text-white";break;case"error":u="text-red-700 hover:bg-white bg-white",d="bg-red-500 text-white";break;case"success":u="text-green-700 hover:bg-white bg-white",d="bg-green-500 text-white"}return o.textContent=t,s&&(c.textContent=s,c.setAttribute("class","px-3 py-2 shadow rounded-lg font-bold ".concat(u)),l.appendChild(c)),a.appendChild(o),a.appendChild(l),a.setAttribute("class","md:rounded-lg py-2 px-3 md:w-2/5 w-full z-10 md:my-2 shadow-lg flex justify-between items-center zoom-in-entrance anim-duration-300 ".concat(d)),i.appendChild(a),null===document.getElementById("snack-wrapper")&&(i.setAttribute("id","snack-wrapper"),i.setAttribute("class","absolute bottom-0 w-full flex justify-between items-center flex-col"),document.body.appendChild(i)),{snackWrapper:i,sampleSnack:a,buttonsWrapper:l,buttonNode:c,textNode:o}}}])&&n(t.prototype,s),i&&n(t,i),e}()},9351:(e,t,s)=>{"use strict";var r=s(162),n=s(1356),i=s(2277),a=s(7266),o=s(8603),l=s(7389);function c(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),s.push.apply(s,r)}return s}function u(e){for(var t=1;tthis.availableQuantity)return r.kX.error("Unable to proceed as the quantity provided is exceed the available quantity.").subscribe();this.product.quantity=parseFloat(e),this.$popupParams.resolve(this.product),this.$popup.close()}}};const m=(0,f.Z)(h,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"shadow-xl bg-white overflow-hidden w-95vw md:w-4/6-screen lg:w-3/7-screen"},[s("div",{staticClass:"p-2 flex justify-between"},[s("h3",{staticClass:"font-semibold"},[e._v(e._s(e.__("Quantity")))]),e._v(" "),s("div",[s("ns-close-button",{on:{click:function(t){return e.close()}}})],1)]),e._v(" "),e.product?s("div",{staticClass:"border-t border-b border-gray-200 py-2 flex items-center justify-center text-2xl font-semibold"},[s("span",[e._v(e._s(e.seeValue))]),e._v(" "),s("span",{staticClass:"text-gray-600 text-sm"},[e._v("("+e._s(e.availableQuantity)+" available)")])]):e._e(),e._v(" "),e.product?s("div",{staticClass:"flex-auto overflow-y-auto p-2"},[s("ns-numpad",{attrs:{value:e.product.quantity},on:{next:function(t){return e.updateQuantity(t)},changed:function(t){return e.setChangedValue(t)}}})],1):e._e()])}),[],!1,null,null,null).exports;s(4451);const y={data:function(){return{value:[],options:[],label:null,type:"select"}},computed:{},mounted:function(){this.popupCloser(),this.value=this.$popupParams.value||[],this.options=this.$popupParams.options,this.label=this.$popupParams.label,this.type=this.$popupParams.type||this.type,console.log(this.$popupParams)},methods:{popupCloser:o.Z,__:l.__,toggle:function(e){var t=this.value.indexOf(e);-1===t?this.value.unshift(e):this.value.splice(t,1)},isSelected:function(e){return this.value.indexOf(e)>=0},close:function(){this.$popupParams.reject(!1),this.$popup.close()},select:function(e){void 0!==e&&(this.value=[e]),this.$popupParams.resolve(this.value),this.close()}}};const g=(0,f.Z)(y,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"shadow-xl bg-white w-6/7-screen md:w-4/7-screen lg:w-3/7-screen overflow-hidden"},[s("div",{staticClass:"p-2 flex justify-between border-b border-gray-200"},[s("span",{staticClass:"text-semibold text-gray-700"},[e._v("\n "+e._s(e.label)+"\n ")]),e._v(" "),s("div",[s("ns-close-button",{on:{click:function(t){return e.close()}}})],1)]),e._v(" "),s("div",{staticClass:"flex-auto overflow-y-auto"},[s("ul",["select"===e.type?e._l(e.options,(function(t){return s("li",{key:t.value,staticClass:"p-2 border-b border-gray-200 text-gray-700 cursor-pointer hover:bg-gray-100",on:{click:function(s){return e.select(t)}}},[e._v(e._s(t.label))])})):e._e(),e._v(" "),"multiselect"===e.type?e._l(e.options,(function(t){return s("li",{key:t.value,staticClass:"p-2 border-b text-gray-700 cursor-pointer hover:bg-gray-100",class:e.isSelected(t)?"bg-blue-100 border-blue-200":"border-gray-200",on:{click:function(s){return e.toggle(t)}}},[e._v(e._s(t.label))])})):e._e()],2)]),e._v(" "),"multiselect"===e.type?s("div",{staticClass:"flex justify-between"},[s("div"),e._v(" "),s("div",[s("ns-button",{attrs:{type:"info"},on:{click:function(t){return e.select()}}},[e._v(e._s(e.__("Select")))])],1)]):e._e()])}),[],!1,null,null,null).exports;var x=s(419),w=s(2242);function C(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),s.push.apply(s,r)}return s}function k(e){for(var t=1;t0?this.refundables.map((function(e){return parseFloat(e.unit_price)*parseFloat(e.quantity)})).reduce((function(e,t){return e+t}))+this.shippingFees:0+this.shippingFees},shippingFees:function(){return this.refundShipping?this.order.shipping:0}},data:function(){return{isSubmitting:!1,formValidation:new a.Z,refundables:[],paymentOptions:[],paymentField:[],refundShipping:!1,selectedPaymentGateway:!1,screen:0,selectFields:[{type:"select",options:this.order.products.map((function(e){return{label:"".concat(e.name," - ").concat(e.unit.name," (x").concat(e.quantity,")"),value:e.id}})),validation:"required",name:"product_id",label:(0,l.__)("Product"),description:(0,l.__)("Select the product to perform a refund.")}]}},methods:{__:l.__,updateScreen:function(e){this.screen=e},toggleRefundShipping:function(e){this.refundShipping=e,this.refundShipping},proceedPayment:function(){var e=this;return!1===this.selectedPaymentGateway?r.kX.error((0,l.__)("Please select a payment gateway before proceeding.")).subscribe():0===this.total?r.kX.error((0,l.__)("There is nothing to refund.")).subscribe():0===this.screenValue?r.kX.error((0,l.__)("Please provide a valid payment amount.")).subscribe():void w.G.show(x.Z,{title:(0,l.__)("Confirm Your Action"),message:(0,l.__)("The refund will be made on the current order."),onAction:function(t){t&&e.doProceed()}})},doProceed:function(){var e=this,t={products:this.refundables,total:this.screenValue,payment:this.selectedPaymentGateway,refund_shipping:this.refundShipping};this.isSubmitting=!0,r.ih.post("/api/nexopos/v4/orders/".concat(this.order.id,"/refund"),t).subscribe({next:function(t){e.isSubmitting=!1,e.$emit("changed",!0),r.kX.success(t.message).subscribe()},error:function(t){e.isSubmitting=!1,r.kX.error(t.message).subscribe()}})},addProduct:function(){var e=this;if(this.formValidation.validateFields(this.selectFields),!this.formValidation.fieldsValid(this.selectFields))return r.kX.error((0,l.__)("Please select a product before proceeding.")).subscribe();var t=this.formValidation.extractFields(this.selectFields),s=this.order.products.filter((function(e){return e.id===t.product_id})),n=this.refundables.filter((function(e){return e.id===t.product_id}));if(n.length>0&&n.map((function(e){return parseInt(e.quantity)})).reduce((function(e,t){return e+t}))===s[0].quantity)return r.kX.error((0,l.__)("Not enough quantity to proceed.")).subscribe();if(0===s[0].quantity)return r.kX.error((0,l.__)("Not enough quantity to proceed.")).subscribe();var i=k(k({},s[0]),{condition:"",description:""});new Promise((function(e,t){w.G.show(v,{resolve:e,reject:t,product:i})})).then((function(t){t.quantity=e.getProductOriginalQuantity(t.id)-e.getProductUsedQuantity(t.id),e.refundables.push(t)}),(function(e){return e}))},getProductOriginalQuantity:function(e){var t=this.order.products.filter((function(t){return t.id===e}));return t.length>0?t.map((function(e){return parseFloat(e.quantity)})).reduce((function(e,t){return e+t})):0},getProductUsedQuantity:function(e){var t=this.refundables.filter((function(t){return t.id===e}));return t.length>0?t.map((function(e){return parseFloat(e.quantity)})).reduce((function(e,t){return e+t})):0},openSettings:function(e){var t=this;new Promise((function(t,s){w.G.show(v,{resolve:t,reject:s,product:e})})).then((function(s){var r=t.refundables.indexOf(e);t.$set(t.refundables,r,s)}),(function(e){return e}))},selectPaymentGateway:function(){var e=this;new Promise((function(t,s){w.G.show(g,k({resolve:t,reject:s,value:[e.selectedPaymentOption]},e.paymentField[0]))})).then((function(t){e.selectedPaymentGateway=t[0]}),(function(e){return e}))},changeQuantity:function(e){var t=this;new Promise((function(s,r){var n=t.getProductOriginalQuantity(e.id)-t.getProductUsedQuantity(e.id)+parseFloat(e.quantity);w.G.show(m,{resolve:s,reject:r,product:e,availableQuantity:n})})).then((function(s){if(s.quantity>t.getProductUsedQuantity(e.id)-e.quantity){var r=t.refundables.indexOf(e);t.$set(t.refundables,r,s)}}))},deleteProduct:function(e){var t=this;new Promise((function(s,r){w.G.show(x.Z,{title:(0,l.__)("Confirm Your Action"),message:(0,l.__)("Would you like to delete this product ?"),onAction:function(s){if(s){var r=t.refundables.indexOf(e);t.refundables.splice(r,1)}}})}))}},mounted:function(){var e=this;this.selectFields=this.formValidation.createFields(this.selectFields),r.ih.get("/api/nexopos/v4/orders/payments").subscribe((function(t){e.paymentField=t}))}};const S=(0,f.Z)(P,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"-m-4 flex-auto flex flex-wrap relative"},[e.isSubmitting?s("div",{staticClass:"bg-overlay h-full w-full flex items-center justify-center absolute z-30"},[s("ns-spinner")],1):e._e(),e._v(" "),s("div",{staticClass:"px-4 w-full lg:w-1/2"},[s("h3",{staticClass:"py-2 border-b-2 text-gray-700 border-blue-400"},[e._v(e._s(e.__("Refund With Products")))]),e._v(" "),s("div",{staticClass:"my-2"},[s("ul",[s("li",{staticClass:"border-b border-blue-400 flex justify-between items-center mb-2"},[s("div",{staticClass:"flex-auto flex-col flex"},[s("div",{staticClass:"p-2 flex"},e._l(e.selectFields,(function(e,t){return s("ns-field",{key:t,attrs:{field:e}})})),1),e._v(" "),s("div",{staticClass:"flex justify-between p-2"},[s("div",{staticClass:"flex items-center text-gray-700"},[e.order.shipping>0?s("span",{staticClass:"mr-2"},[e._v(e._s(e.__("Refund Shipping")))]):e._e(),e._v(" "),e.order.shipping>0?s("ns-checkbox",{attrs:{checked:e.refundShipping},on:{change:function(t){return e.toggleRefundShipping(t)}}}):e._e()],1),e._v(" "),s("div",[s("button",{staticClass:"border-2 rounded-full border-gray-200 px-2 py-1 hover:bg-blue-400 hover:text-white text-gray-700",on:{click:function(t){return e.addProduct()}}},[e._v(e._s(e.__("Add Product")))])])])])]),e._v(" "),s("li",[s("h4",{staticClass:"py-1 border-b-2 text-gray-700 border-blue-400"},[e._v(e._s(e.__("Products")))])]),e._v(" "),e._l(e.refundables,(function(t){return s("li",{key:t.id,staticClass:"bg-gray-100 border-b border-blue-400 flex justify-between items-center mb-2"},[s("div",{staticClass:"px-2 text-gray-700 flex justify-between flex-auto"},[s("div",{staticClass:"flex flex-col"},[s("p",{staticClass:"py-2"},[s("span",[e._v(e._s(t.name))]),e._v(" "),"damaged"===t.condition?s("span",{staticClass:"rounded-full px-2 py-1 text-xs bg-red-400 mx-2 text-white"},[e._v(e._s(e.__("Damaged")))]):e._e(),e._v(" "),"unspoiled"===t.condition?s("span",{staticClass:"rounded-full px-2 py-1 text-xs bg-green-400 mx-2 text-white"},[e._v(e._s(e.__("Unspoiled")))]):e._e()]),e._v(" "),s("small",[e._v(e._s(t.unit.name))])]),e._v(" "),s("div",{staticClass:"flex items-center justify-center"},[s("span",{staticClass:"py-1 flex items-center cursor-pointer border-b border-dashed border-blue-400"},[e._v(e._s(e._f("currency")(t.unit_price*t.quantity)))])])]),e._v(" "),s("div",{staticClass:"flex"},[s("p",{staticClass:"p-2 border-l border-blue-400 cursor-pointer text-gray-600 hover:bg-blue-100 w-16 h-16 flex items-center justify-center",on:{click:function(s){return e.openSettings(t)}}},[s("i",{staticClass:"las la-cog text-xl"})]),e._v(" "),s("p",{staticClass:"p-2 border-l border-blue-400 cursor-pointer text-gray-600 hover:bg-blue-100 w-16 h-16 flex items-center justify-center",on:{click:function(s){return e.deleteProduct(t)}}},[s("i",{staticClass:"las la-trash"})]),e._v(" "),s("p",{staticClass:"p-2 border-l border-blue-400 cursor-pointer text-gray-600 hover:bg-blue-100 w-16 h-16 flex items-center justify-center",on:{click:function(s){return e.changeQuantity(t)}}},[e._v(e._s(t.quantity))])])])}))],2)])]),e._v(" "),s("div",{staticClass:"px-4 w-full lg:w-1/2"},[s("h3",{staticClass:"py-2 border-b-2 text-gray-700 border-blue-400"},[e._v(e._s(e.__("Summary")))]),e._v(" "),s("div",{staticClass:"py-2"},[s("div",{staticClass:"bg-blue-400 text-white font-semibold flex mb-2 p-2 justify-between"},[s("span",[e._v(e._s(e.__("Total")))]),e._v(" "),s("span",[e._v(e._s(e._f("currency")(e.total)))])]),e._v(" "),s("div",{staticClass:"bg-teal-400 text-white font-semibold flex mb-2 p-2 justify-between"},[s("span",[e._v(e._s(e.__("Paid")))]),e._v(" "),s("span",[e._v(e._s(e._f("currency")(e.order.tendered)))])]),e._v(" "),s("div",{staticClass:"bg-indigo-400 text-white font-semibold flex mb-2 p-2 justify-between cursor-pointer",on:{click:function(t){return e.selectPaymentGateway()}}},[s("span",[e._v(e._s(e.__("Payment Gateway")))]),e._v(" "),s("span",[e._v(e._s(e.selectedPaymentGateway?e.selectedPaymentGateway.label:"N/A"))])]),e._v(" "),s("div",{staticClass:"bg-gray-300 text-gray-900 font-semibold flex mb-2 p-2 justify-between"},[s("span",[e._v(e._s(e.__("Screen")))]),e._v(" "),s("span",[e._v(e._s(e._f("currency")(e.screenValue)))])]),e._v(" "),s("div",[s("ns-numpad",{attrs:{currency:!0,value:e.screen},on:{changed:function(t){return e.updateScreen(t)},next:function(t){return e.proceedPayment(t)}}})],1)])])])}),[],!1,null,null,null).exports;var O=s(1596);function $(e,t){for(var s=0;s0?t[0].label:(0,l.__)("Unknown Status")}},{key:"getDeliveryStatus",value:function(e){var t=deliveryStatuses.filter((function(t){return t.value===e}));return t.length>0?t[0].label:(0,l.__)("Unknown Status")}},{key:"getProcessingStatus",value:function(e){var t=processingStatuses.filter((function(t){return t.value===e}));return t.length>0?t[0].label:(0,l.__)("Unknown Status")}},{key:"getPaymentStatus",value:function(e){var t=paymentLabels.filter((function(t){return t.value===e}));return t.length>0?t[0].label:(0,l.__)("Unknown Status")}}])&&$(t.prototype,s),r&&$(t,r),e}();function E(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),s.push.apply(s,r)}return s}function V(e){for(var t=1;t0?s("span",[e._v(e._s(e._f("currency")(e.order.total-e.order.tendered)))]):e._e(),e._v(" "),e.order.total-e.order.tendered<=0?s("span",[e._v(e._s(e._f("currency")(0)))]):e._e()])]),e._v(" "),s("div",{staticClass:"px-2 w-full md:w-1/2"},[s("div",{staticClass:"my-1 h-12 py-1 px-2 flex justify-between items-center bg-teal-400 text-white text-xl font-bold"},[s("span",[e._v(e._s(e.__("Customer Account")))]),e._v(" "),s("span",[e._v(e._s(e._f("currency")(e.order.customer.account_amount)))])])])]),e._v(" "),s("div",{staticClass:"flex -mx-4 flex-wrap"},[s("div",{staticClass:"px-2 w-full mb-4 md:w-1/2"},["paid"!==e.order.payment_status?s("div",[s("h3",{staticClass:"font-semibold border-b-2 border-blue-400 py-2"},[e._v("\n "+e._s(e.__("Payment"))+"\n ")]),e._v(" "),s("div",{staticClass:"py-2"},[e._l(e.fields,(function(e,t){return s("ns-field",{key:t,attrs:{field:e}})})),e._v(" "),s("div",{staticClass:"my-2 px-2 h-12 flex justify-end items-center bg-gray-200"},[e._v("\n "+e._s(e._f("currency")(e.inputValue))+"\n ")]),e._v(" "),s("ns-numpad",{attrs:{floating:!0,value:e.inputValue},on:{next:function(t){return e.submitPayment(t)},changed:function(t){return e.updateValue(t)}}})],2)]):e._e(),e._v(" "),"paid"===e.order.payment_status?s("div",{staticClass:"flex items-center justify-center h-full"},[s("h3",{staticClass:"text-gray-700 font-semibold"},[e._v(e._s(e.__("No payment possible for paid order.")))])]):e._e()]),e._v(" "),s("div",{staticClass:"px-2 w-full mb-4 md:w-1/2"},[s("h3",{staticClass:"font-semibold border-b-2 border-blue-400 py-2 mb-2"},[e._v("\n "+e._s(e.__("Payment History"))+"\n ")]),e._v(" "),s("ul",e._l(e.order.payments,(function(t){return s("li",{key:t.id,staticClass:"p-2 flex items-center justify-between text-shite bg-gray-300 mb-2"},[s("span",[e._v(e._s(t.identifier))]),e._v(" "),s("span",[e._v(e._s(e._f("currency")(t.value)))])])})),0)])])])}),[],!1,null,null,null).exports;const T={props:["order"],data:function(){return{processingStatuses,deliveryStatuses,labels:new A,showProcessingSelect:!1,showDeliverySelect:!1}},mounted:function(){},methods:{__:l.__,submitProcessingChange:function(){var e=this;w.G.show(x.Z,{title:(0,l.__)("Would you proceed ?"),message:(0,l.__)("The processing status of the order will be changed. Please confirm your action."),onAction:function(t){t&&r.ih.post("/api/nexopos/v4/orders/".concat(e.order.id,"/processing"),{process_status:e.order.process_status}).subscribe((function(t){e.showProcessingSelect=!1,r.kX.success(t.message).subscribe()}),(function(e){r.kX.error(e.message||(0,l.__)("Unexpected error occured.")).subscribe()}))}})},submitDeliveryStatus:function(){var e=this;w.G.show(x.Z,{title:(0,l.__)("Would you proceed ?"),message:(0,l.__)("The delivery status of the order will be changed. Please confirm your action."),onAction:function(t){t&&r.ih.post("/api/nexopos/v4/orders/".concat(e.order.id,"/delivery"),{delivery_status:e.order.delivery_status}).subscribe((function(t){e.showDeliverySelect=!1,r.kX.success(t.message).subscribe()}),(function(e){r.kX.error(e.message||(0,l.__)("Unexpected error occured.")).subscribe()}))}})}}};const D=(0,f.Z)(T,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"-mx-4 flex flex-wrap"},[s("div",{staticClass:"flex-auto"},[s("div",{staticClass:"w-full mb-2 flex-wrap flex"},[s("div",{staticClass:"w-full mb-2 px-4"},[s("h3",{staticClass:"font-semibold text-gray-800 pb-2 border-b border-blue-400"},[e._v(e._s(e.__("Payment Summary")))])]),e._v(" "),s("div",{staticClass:"mb-2 w-full md:w-1/2 px-4"},[s("div",{staticClass:"bg-gray-200 p-2 flex justify-between items-start"},[s("div",[s("h4",{staticClass:"text-semibold text-gray-700"},[e._v(e._s(e.__("Sub Total")))])]),e._v(" "),s("div",{staticClass:"font-semibold text-gray-800"},[e._v(e._s(e._f("currency")(e.order.subtotal)))])])]),e._v(" "),s("div",{staticClass:"mb-2 w-full md:w-1/2 px-4"},[s("div",{staticClass:"p-2 flex justify-between items-start bg-red-400 text-white"},[s("div",[s("h4",{staticClass:"text-semibold"},[s("span",[e._v(e._s(e.__("Discount")))]),e._v(" "),"percentage"===e.order.discount_type?s("span",{staticClass:"ml-1"},[e._v("("+e._s(e.order.discount_percentage)+"%)")]):e._e(),e._v(" "),"flat"===e.order.discount_type?s("span",{staticClass:"ml-1"},[e._v("(Flat)")]):e._e()])]),e._v(" "),s("div",{staticClass:"font-semibold"},[e._v(e._s(e._f("currency")(e.order.discount)))])])]),e._v(" "),s("div",{staticClass:"mb-2 w-full md:w-1/2 px-4"},[s("div",{staticClass:"p-2 flex justify-between items-start bg-gray-100"},[s("div",[s("h4",{staticClass:"text-semibold text-gray-700"},[e._v(e._s(e.__("Shipping")))])]),e._v(" "),s("div",{staticClass:"font-semibold text-gray-800"},[e._v(e._s(e._f("currency")(e.order.shipping)))])])]),e._v(" "),s("div",{staticClass:"mb-2 w-full md:w-1/2 px-4"},[s("div",{staticClass:"p-2 flex justify-between items-start bg-red-400 text-white"},[s("div",[s("h4",{staticClass:"text-semibold"},[s("span",[e._v(e._s(e.__("Coupons")))])])]),e._v(" "),s("div",{staticClass:"font-semibold"},[e._v(e._s(e._f("currency")(e.order.total_coupons)))])])]),e._v(" "),s("div",{staticClass:"mb-2 w-full md:w-1/2 px-4"},[s("div",{staticClass:"p-2 flex justify-between items-start bg-blue-400 text-white"},[s("div",[s("h4",{staticClass:"text-semibold"},[e._v(e._s(e.__("Total")))])]),e._v(" "),s("div",{staticClass:"font-semibold"},[e._v(e._s(e._f("currency")(e.order.total)))])])]),e._v(" "),s("div",{staticClass:"mb-2 w-full md:w-1/2 px-4"},[s("div",{staticClass:"p-2 flex justify-between items-start bg-yellow-400 text-gray-700"},[s("div",[s("h4",{staticClass:"text-semibold "},[e._v(e._s(e.__("Taxes")))])]),e._v(" "),s("div",{staticClass:"font-semibold"},[e._v(e._s(e._f("currency")(e.order.tax_value)))])])]),e._v(" "),s("div",{staticClass:"mb-2 w-full md:w-1/2 px-4"},[s("div",{staticClass:"p-2 flex justify-between items-start text-gray-700 bg-gray-100"},[s("div",[s("h4",{staticClass:"text-semibold"},[e._v(e._s(e.__("Change")))])]),e._v(" "),s("div",{staticClass:"font-semibold"},[e._v(e._s(e._f("currency")(e.order.change)))])])]),e._v(" "),s("div",{staticClass:"mb-2 w-full md:w-1/2 px-4"},[s("div",{staticClass:"p-2 flex justify-between items-start bg-teal-500 text-white"},[s("div",[s("h4",{staticClass:"text-semibold"},[e._v(e._s(e.__("Paid")))])]),e._v(" "),s("div",{staticClass:"font-semibold"},[e._v(e._s(e._f("currency")(e.order.tendered)))])])])])]),e._v(" "),s("div",{staticClass:"px-4 w-full md:w-1/2 lg:w-2/4 mb-2"},[s("div",{staticClass:"mb-2"},[s("h3",{staticClass:"font-semibold text-gray-800 pb-2 border-b border-blue-400"},[e._v(e._s(e.__("Order Status")))])]),e._v(" "),s("div",{staticClass:"mb-2 p-2 flex justify-between items-start bg-gray-200"},[s("div",[s("h4",{staticClass:"text-semibold text-gray-700"},[s("span",[e._v(e._s(e.__("Customer")))])])]),e._v(" "),s("div",{staticClass:"font-semibold text-gray-800"},[e._v(e._s(e.order.nexopos_customers_name))])]),e._v(" "),s("div",{staticClass:"mb-2 p-2 flex justify-between items-start bg-gray-200"},[s("div",[s("h4",{staticClass:"text-semibold text-gray-700"},[s("span",[e._v(e._s(e.__("Type")))])])]),e._v(" "),s("div",{staticClass:"font-semibold text-gray-800"},[e._v(e._s(e.labels.getTypeLabel(e.order.type)))])]),e._v(" "),s("div",{staticClass:"mb-2 p-2 flex justify-between items-start bg-gray-200"},[s("div",[s("h4",{staticClass:"text-semibold text-gray-700"},[s("span",[e._v(e._s(e.__("Delivery Status")))])])]),e._v(" "),s("div",{staticClass:"font-semibold text-gray-800 mt-2 md:mt-0 w-full md:w-auto"},[s("div",{staticClass:"w-full text-center"},[e.showDeliverySelect?e._e():s("span",{staticClass:"font-semibold text-gray-800 border-b border-blue-400 cursor-pointer border-dashed",on:{click:function(t){e.showDeliverySelect=!0}}},[e._v(e._s(e.labels.getDeliveryStatus(e.order.delivery_status)))])]),e._v(" "),e.showDeliverySelect?s("div",{staticClass:"flex-auto flex"},[s("select",{directives:[{name:"model",rawName:"v-model",value:e.order.delivery_status,expression:"order.delivery_status"}],ref:"process_status",staticClass:"flex-auto border-blue-400 rounded-lg",on:{change:function(t){var s=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(e.order,"delivery_status",t.target.multiple?s:s[0])}}},e._l(e.deliveryStatuses,(function(t,r){return s("option",{key:r,domProps:{value:t.value}},[e._v(e._s(t.label))])})),0),e._v(" "),s("div",{staticClass:"pl-2 flex"},[s("ns-close-button",{on:{click:function(t){e.showDeliverySelect=!1}}}),e._v(" "),s("button",{staticClass:"bg-green-400 text-white rounded-full px-2 py-1",on:{click:function(t){return e.submitDeliveryStatus(e.order)}}},[e._v(e._s(e.__("Save")))])],1)]):e._e()])]),e._v(" "),s("div",{staticClass:"mb-2 p-2 flex flex-col md:flex-row justify-between items-center bg-gray-200"},[s("div",[s("h4",{staticClass:"text-semibold text-gray-700"},[s("span",[e._v(e._s(e.__("Processing Status")))])])]),e._v(" "),s("div",{staticClass:"font-semibold text-gray-800 mt-2 md:mt-0 w-full md:w-auto"},[s("div",{staticClass:"w-full text-center"},[e.showProcessingSelect?e._e():s("span",{staticClass:"border-b border-blue-400 cursor-pointer border-dashed",on:{click:function(t){e.showProcessingSelect=!0}}},[e._v(e._s(e.labels.getProcessingStatus(e.order.process_status)))])]),e._v(" "),e.showProcessingSelect?s("div",{staticClass:"flex-auto flex"},[s("select",{directives:[{name:"model",rawName:"v-model",value:e.order.process_status,expression:"order.process_status"}],ref:"process_status",staticClass:"flex-auto border-blue-400 rounded-lg",on:{change:function(t){var s=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(e.order,"process_status",t.target.multiple?s:s[0])}}},e._l(e.processingStatuses,(function(t,r){return s("option",{key:r,domProps:{value:t.value}},[e._v(e._s(t.label))])})),0),e._v(" "),s("div",{staticClass:"pl-2 flex"},[s("ns-close-button",{on:{click:function(t){e.showProcessingSelect=!1}}}),e._v(" "),s("button",{staticClass:"bg-green-400 text-white rounded-full px-2 py-1",on:{click:function(t){return e.submitProcessingChange(e.order)}}},[e._v(e._s(e.__("Save")))])],1)]):e._e()])]),e._v(" "),s("div",{staticClass:"mb-2 p-2 flex justify-between items-start bg-gray-200"},[s("div",[s("h4",{staticClass:"text-semibold text-gray-700"},[s("span",[e._v(e._s(e.__("Payment Status")))])])]),e._v(" "),s("div",{staticClass:"font-semibold text-gray-800"},[e._v(e._s(e.labels.getPaymentStatus(e.order.payment_status)))])])]),e._v(" "),s("div",{staticClass:"px-4 w-full md:w-1/2 lg:w-2/4 mb-2"},[s("div",{staticClass:"mb-2"},[s("h3",{staticClass:"font-semibold text-gray-800 pb-2 border-b border-blue-400"},[e._v(e._s(e.__("Products")))])]),e._v(" "),e._l(e.order.products,(function(t){return s("div",{key:t.id,staticClass:"p-2 flex justify-between items-start bg-gray-200 mb-2"},[s("div",[s("h4",{staticClass:"text-semibold text-gray-700"},[e._v(e._s(t.name)+" (x"+e._s(t.quantity)+")")]),e._v(" "),s("p",{staticClass:"text-gray-600 text-sm"},[e._v(e._s(t.unit.name||"N/A"))])]),e._v(" "),s("div",{staticClass:"font-semibold text-gray-800"},[e._v(e._s(e._f("currency")(t.total_price)))])])})),e._v(" "),s("div",{staticClass:"mb-2"},[s("h3",{staticClass:"font-semibold text-gray-800 pb-2 border-b border-blue-400"},[e._v(e._s(e.__("Refunded Products")))])]),e._v(" "),e._l(e.order.refunded_products,(function(t){return s("div",{key:t.id,staticClass:"p-2 flex justify-between items-start bg-gray-200 mb-2"},[s("div",[s("h4",{staticClass:"text-semibold text-gray-700"},[e._v(e._s(t.product.name)+" (x"+e._s(t.quantity)+")")]),e._v(" "),s("p",{staticClass:"text-gray-600 text-sm"},[e._v(e._s(t.unit.name||"N/A")+" | "),s("span",{staticClass:"rounded-full px-2",class:"damaged"===t.condition?"bg-red-400 text-white":"bg-blue-400 text-white"},[e._v(e._s(t.condition))])])]),e._v(" "),s("div",{staticClass:"font-semibold text-gray-800"},[e._v(e._s(e._f("currency")(t.total_price)))])])}))],2)])}),[],!1,null,null,null).exports;const z={props:["order"],name:"ns-order-instalments",data:function(){return{labels:new A,original:[],instalments:[]}},mounted:function(){this.loadInstalments()},computed:{totalInstalments:function(){return this.instalments.length>0?this.instalments.map((function(e){return e.amount})).reduce((function(e,t){return parseFloat(e)+parseFloat(t)})):0}},methods:{__:l.__,loadInstalments:function(){var e=this;r.ih.get("/api/nexopos/v4/orders/".concat(this.order.id,"/instalments")).subscribe((function(t){e.original=t,e.instalments=t.map((function(e){return e.price_clicked=!1,e.date_clicked=!1,e.date=moment(e.date).format("YYYY-MM-DD"),e}))}))},addInstalment:function(){this.instalments.push({date:ns.date.moment.format("YYYY-MM-DD"),amount:this.order.total-this.totalInstalments,paid:!1})},createInstalment:function(e){var t=this;Popup.show(x.Z,{title:(0,l.__)("Confirm Your Action"),message:(0,l.__)("Would you like to create this instalment ?"),onAction:function(s){s&&r.ih.post("/api/nexopos/v4/orders/".concat(t.order.id,"/instalments"),{instalment:e}).subscribe((function(e){t.loadInstalments(),r.kX.success(e.message).subscribe()}),(function(e){r.kX.error(e.message||(0,l.__)("An unexpected error has occured")).subscribe()}))}})},deleteInstalment:function(e){var t=this;Popup.show(x.Z,{title:(0,l.__)("Confirm Your Action"),message:(0,l.__)("Would you like to delete this instalment ?"),onAction:function(s){s&&r.ih.delete("/api/nexopos/v4/orders/".concat(t.order.id,"/instalments/").concat(e.id)).subscribe((function(s){var n=t.instalments.indexOf(e);t.instalments.splice(n,1),r.kX.success(s.message).subscribe()}),(function(e){r.kX.error(e.message||(0,l.__)("An unexpected error has occured")).subscribe()}))}})},markAsPaid:function(e){var t=this;Popup.show(x.Z,{title:(0,l.__)("Confirm Your Action"),message:(0,l.__)("Would you like to make this as paid ?"),onAction:function(s){s&&r.ih.get("/api/nexopos/v4/orders/".concat(t.order.id,"/instalments/").concat(e.id,"/paid")).subscribe((function(e){t.loadInstalments(),r.kX.success(e.message).subscribe()}),(function(e){r.kX.error(e.message||(0,l.__)("An unexpected error has occured")).subscribe()}))}})},togglePriceEdition:function(e){var t=this;e.paid||(e.price_clicked=!e.price_clicked,this.$forceUpdate(),e.price_clicked&&setTimeout((function(){t.$refs.amount[0].select()}),100))},updateInstalment:function(e){var t=this;Popup.show(x.Z,{title:(0,l.__)("Confirm Your Action"),message:(0,l.__)("Would you like to update that instalment ?"),onAction:function(s){s&&r.ih.put("/api/nexopos/v4/orders/".concat(t.order.id,"/instalments/").concat(e.id),{instalment:e}).subscribe((function(e){r.kX.success(e.message).subscribe()}),(function(e){r.kX.error(e.message||(0,l.__)("An unexpected error has occured")).subscribe()}))}})},toggleDateEdition:function(e){var t=this;e.paid||(e.date_clicked=!e.date_clicked,this.$forceUpdate(),e.date_clicked&&setTimeout((function(){t.$refs.date[0].select()}),200))}}};const I=(0,f.Z)(z,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"-mx-4 flex-auto flex flex-wrap"},[s("div",{staticClass:"flex flex-auto"},[s("div",{staticClass:"w-full mb-2 flex-wrap"},[s("div",{staticClass:"w-full mb-2 px-4"},[s("h3",{staticClass:"font-semibold text-gray-800 pb-2 border-b border-blue-400"},[e._v(e._s(e.__("Instalments")))])]),e._v(" "),s("div",{staticClass:"px-4"},[s("ul",{staticClass:"border-gray-400 border-t text-gray-700"},[e._l(e.instalments,(function(t){return s("li",{key:t.id,staticClass:"border-b border-l flex justify-between",class:t.paid?"bg-green-200 border-green-400":"bg-gray-200 border-blue-400"},[s("span",{staticClass:"p-2"},[t.date_clicked?e._e():s("span",{on:{click:function(s){return e.toggleDateEdition(t)}}},[e._v(e._s(t.date))]),e._v(" "),t.date_clicked?s("span",[s("input",{directives:[{name:"model",rawName:"v-model",value:t.date,expression:"instalment.date"}],ref:"date",refInFor:!0,staticClass:"border border-blue-400 rounded",attrs:{type:"date"},domProps:{value:t.date},on:{blur:function(s){return e.toggleDateEdition(t)},input:function(s){s.target.composing||e.$set(t,"date",s.target.value)}}})]):e._e()]),e._v(" "),s("div",{staticClass:"flex items-center"},[s("span",{staticClass:"flex items-center px-2 h-full border-r",class:t.paid?"border-green-400":"border-blue-400"},[t.price_clicked?e._e():s("span",{on:{click:function(s){return e.togglePriceEdition(t)}}},[e._v(e._s(e._f("currency")(t.amount)))]),e._v(" "),t.price_clicked?s("span",[s("input",{directives:[{name:"model",rawName:"v-model",value:t.amount,expression:"instalment.amount"}],ref:"amount",refInFor:!0,staticClass:"border border-blue-400 p-1",attrs:{type:"text"},domProps:{value:t.amount},on:{blur:function(s){return e.togglePriceEdition(t)},input:function(s){s.target.composing||e.$set(t,"amount",s.target.value)}}})]):e._e()]),e._v(" "),!t.paid&&t.id?s("div",{staticClass:"w-36 justify-center flex items-center px-2 h-full border-r",class:t.paid?"border-green-400":"border-blue-400"},[s("div",{staticClass:"px-2"},[s("ns-icon-button",{attrs:{buttonClass:"bg-green-400 hover:bg-green-500 text-white hover:text-white hover:border-green-600",className:"la-money-bill-wave-alt"},on:{click:function(s){return e.markAsPaid(t)}}})],1),e._v(" "),s("div",{staticClass:"px-2"},[s("ns-icon-button",{attrs:{buttonClass:"bg-blue-400 hover:bg-blue-500 text-white hover:text-white hover:border-blue-600",className:"la-save"},on:{click:function(s){return e.updateInstalment(t)}}})],1),e._v(" "),s("div",{staticClass:"px-2"},[s("ns-icon-button",{attrs:{buttonClass:"bg-red-400 text-white hover:border hover:border-blue-400 hover:bg-red-500",className:"la-trash-alt"},on:{click:function(s){return e.deleteInstalment(t)}}})],1)]):e._e(),e._v(" "),t.paid||t.id?e._e():s("div",{staticClass:"w-36 justify-center flex items-center px-2 h-full border-r",class:t.paid?"border-green-400":"border-blue-400"},[s("div",{staticClass:"px-2"},[s("button",{staticClass:"px-3 py-1 rounded-full bg-blue-400 text-white",on:{click:function(s){return e.createInstalment(t)}}},[s("i",{staticClass:"las la-plus"}),e._v("\n "+e._s(e.__("Create"))+"\n ")])])]),e._v(" "),t.paid?s("span",{staticClass:"w-36 border-green-400 justify-center flex items-center px-2 h-full border-r"},[e._v("\n "+e._s(e.__("Paid"))+"\n ")]):e._e()])])})),e._v(" "),s("li",{staticClass:"flex justify-between p-2 bg-gray-200 border-r border-b border-l border-gray-400"},[s("div",{staticClass:"flex items-center justify-center"},[s("span",[e._v("\n "+e._s(e.__("Total :"))+" "+e._s(e._f("currency")(e.order.total))+"\n ")]),e._v(" "),s("span",{staticClass:"ml-1 text-sm"},[e._v("\n ("+e._s(e.__("Remaining :"))+" "+e._s(e._f("currency")(e.order.total-e.totalInstalments))+")\n ")])]),e._v(" "),s("div",{staticClass:"-mx-2 flex flex-wrap items-center"},[s("span",{staticClass:"px-2"},[e._v("\n "+e._s(e.__("Instalments:"))+" "+e._s(e._f("currency")(e.totalInstalments))+"\n ")]),e._v(" "),s("span",{staticClass:"px-2"},[s("button",{staticClass:"rounded-full px-3 py-1 bg-blue-400 text-white",on:{click:function(t){return e.addInstalment()}}},[e._v(e._s(e.__("Add Instalment")))])])])])],2)])])])])}),[],!1,null,null,null).exports;var R={filters:{nsCurrency:n.W},name:"ns-preview-popup",data:function(){return{active:"details",order:new Object,products:[],payments:[]}},components:{nsOrderRefund:S,nsOrderPayment:Z,nsOrderDetails:D,nsOrderInstalments:I},computed:{isVoidable:function(){return["paid","partially_paid","unpaid"].includes(this.order.payment_status)},isDeleteAble:function(){return["hold"].includes(this.order.payment_status)}},methods:{__:l.__,closePopup:function(){this.$popup.close()},setActive:function(e){this.active=e},refresh:function(){this.$popupParams.component.$emit("updated"),this.loadOrderDetails(this.$popupParams.order.id)},printOrder:function(){var e=this.$popupParams.order;r.ih.get("/api/nexopos/v4/orders/".concat(e.id,"/print/receipt")).subscribe((function(e){r.kX.success(e.message).subscribe()}))},loadOrderDetails:function(e){var t=this;(0,i.D)([r.ih.get("/api/nexopos/v4/orders/".concat(e)),r.ih.get("/api/nexopos/v4/orders/".concat(e,"/products")),r.ih.get("/api/nexopos/v4/orders/".concat(e,"/payments"))]).subscribe((function(e){t.order=e[0],t.products=e[1],t.payments=e[2]}))},deleteOrder:function(){var e=this;Popup.show(x.Z,{title:(0,l.__)("Confirm Your Action"),message:(0,l.__)("Would you like to delete this order"),onAction:function(t){t&&r.ih.delete("/api/nexopos/v4/orders/".concat(e.$popupParams.order.id)).subscribe((function(t){r.kX.success(t.message).subscribe(),e.refreshCrudTable(),e.closePopup()}),(function(e){r.kX.error(e.message).subscribe()}))}})},voidOrder:function(){var e=this;Popup.show(O.Z,{title:(0,l.__)("Confirm Your Action"),message:(0,l.__)("The current order will be void. This action will be recorded. Consider providing a reason for this operation"),onAction:function(t){!1!==t&&r.ih.post("/api/nexopos/v4/orders/".concat(e.$popupParams.order.id,"/void"),{reason:t}).subscribe((function(t){r.kX.success(t.message).subscribe(),e.refreshCrudTable(),e.closePopup()}),(function(e){r.kX.error(e.message).subscribe()}))}})},refreshCrudTable:function(){this.$popupParams.component.$emit("updated",!0)}},watch:{active:function(){"details"===this.active&&this.loadOrderDetails(this.$popupParams.order.id)}},mounted:function(){var e=this;this.loadOrderDetails(this.$popupParams.order.id),this.$popup.event.subscribe((function(t){"click-overlay"===t.event&&e.$popup.close()}))}};window.nsOrderPreviewPopup=R;const X=R;const Q=(0,f.Z)(X,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"h-95vh w-95vw md:h-6/7-screen md:w-6/7-screen overflow-hidden shadow-xl bg-white flex flex-col"},[s("div",{staticClass:"border-b border-gray-300 p-3 flex items-center justify-between"},[s("div",[s("h3",[e._v(e._s(e.__("Order Options")))])]),e._v(" "),s("div",[s("ns-close-button",{on:{click:function(t){return e.closePopup()}}})],1)]),e._v(" "),s("div",{staticClass:"p-2 overflow-scroll bg-gray-100 flex flex-auto"},[e.order.id?s("ns-tabs",{attrs:{active:e.active},on:{active:function(t){return e.setActive(t)}}},[s("ns-tabs-item",{staticClass:"overflow-y-auto",attrs:{label:e.__("Details"),identifier:"details"}},[s("ns-order-details",{attrs:{order:e.order}})],1),e._v(" "),["order_void","hold","refunded","partially_refunded"].includes(e.order.payment_status)?e._e():s("ns-tabs-item",{staticClass:"overflow-y-auto",attrs:{label:e.__("Payments"),identifier:"payments"}},[s("ns-order-payment",{attrs:{order:e.order},on:{changed:function(t){return e.refresh()}}})],1),e._v(" "),["order_void","hold","refunded"].includes(e.order.payment_status)?e._e():s("ns-tabs-item",{staticClass:"flex overflow-y-auto",attrs:{label:e.__("Refund & Return"),identifier:"refund"}},[s("ns-order-refund",{attrs:{order:e.order},on:{changed:function(t){return e.refresh()}}})],1),e._v(" "),["partially_paid"].includes(e.order.payment_status)?s("ns-tabs-item",{staticClass:"flex overflow-y-auto",attrs:{label:e.__("Installments"),identifier:"instalments"}},[s("ns-order-instalments",{attrs:{order:e.order},on:{changed:function(t){return e.refresh()}}})],1):e._e()],1):e._e(),e._v(" "),e.order.id?e._e():s("div",{staticClass:"h-full w-full flex items-center justify-center"},[s("ns-spinner")],1)],1),e._v(" "),s("div",{staticClass:"p-2 flex justify-between border-t border-gray-200"},[s("div",[e.isVoidable?s("ns-button",{attrs:{type:"danger"},on:{click:function(t){return e.voidOrder()}}},[s("i",{staticClass:"las la-ban"}),e._v("\n "+e._s(e.__("Void"))+"\n ")]):e._e(),e._v(" "),e.isDeleteAble?s("ns-button",{attrs:{type:"danger"},on:{click:function(t){return e.deleteOrder()}}},[s("i",{staticClass:"las la-trash"}),e._v("\n "+e._s(e.__("Delete"))+"\n ")]):e._e()],1),e._v(" "),s("div")])])}),[],!1,null,null,null).exports;const U={name:"ns-products-preview",computed:{product:function(){return this.$popupParams.product}},methods:{__:l.__,changeActiveTab:function(e){this.active=e,"units-quantities"===this.active&&this.loadProductQuantities()},loadProductQuantities:function(){var e=this;this.hasLoadedUnitQuantities=!1,r.ih.get("/api/nexopos/v4/products/".concat(this.product.id,"/units/quantities")).subscribe((function(t){e.unitQuantities=t,e.hasLoadedUnitQuantities=!0}))}},data:function(){return{active:"units-quantities",unitQuantities:[],hasLoadedUnitQuantities:!1}},mounted:function(){var e=this;this.loadProductQuantities(),this.$popup.event.subscribe((function(t){"click-overlay"===t.event&&e.$popup.close()}))}};const N=(0,f.Z)(U,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"shadow-lg w-6/7-screen lg:w-3/5-screen h-6/7-screen lg:h-4/5-screen bg-white overflow-hidden flex flex-col"},[s("div",{staticClass:"p-2 border-b border-gray-200 text-gray-700 text-center font-medium flex justify-between items-center"},[s("div",[e._v("\n "+e._s(e.__("Previewing :"))+" "+e._s(e.product.name)+"\n ")]),e._v(" "),s("div",[s("ns-close-button",{on:{click:function(t){return e.$popup.close()}}})],1)]),e._v(" "),s("div",{staticClass:"flex-auto overflow-y-auto bg-gray-100"},[s("div",{staticClass:"p-2"},[s("ns-tabs",{attrs:{active:e.active},on:{active:function(t){return e.changeActiveTab(t)}}},[s("ns-tabs-item",{attrs:{label:e.__("Units & Quantities"),identifier:"units-quantities"}},[e.hasLoadedUnitQuantities?s("table",{staticClass:"table w-full"},[s("thead",[s("tr",[s("th",{staticClass:"p-1 bg-blue-100 border-blue-400 text-blue-700 border"},[e._v(e._s(e.__("Unit")))]),e._v(" "),s("th",{staticClass:"text-right p-1 bg-blue-100 border-blue-400 text-blue-700 border",attrs:{width:"150"}},[e._v(e._s(e.__("Sale Price")))]),e._v(" "),s("th",{staticClass:"text-right p-1 bg-blue-100 border-blue-400 text-blue-700 border",attrs:{width:"150"}},[e._v(e._s(e.__("Wholesale Price")))]),e._v(" "),s("th",{staticClass:"text-right p-1 bg-blue-100 border-blue-400 text-blue-700 border",attrs:{width:"150"}},[e._v(e._s(e.__("Quantity")))])])]),e._v(" "),s("tbody",e._l(e.unitQuantities,(function(t){return s("tr",{key:t.id},[s("td",{staticClass:"p-1 border border-gray-400 text-gray-600 text-left"},[e._v(e._s(t.unit.name))]),e._v(" "),s("td",{staticClass:"p-1 border border-gray-400 text-gray-600 text-right"},[e._v(e._s(e._f("currency")(t.sale_price)))]),e._v(" "),s("td",{staticClass:"p-1 border border-gray-400 text-gray-600 text-right"},[e._v(e._s(e._f("currency")(t.wholesale_price)))]),e._v(" "),s("td",{staticClass:"p-1 border border-gray-400 text-gray-600 text-right"},[e._v(e._s(t.quantity))])])})),0)]):e._e(),e._v(" "),e.hasLoadedUnitQuantities?e._e():s("ns-spinner",{attrs:{size:"16",border:"4"}})],1)],1)],1)])])}),[],!1,null,null,null).exports;var W=s(2329),L=s(9576),G=s(7096);const Y={name:"ns-orders-refund-popup",data:function(){return{order:null,refunds:[],view:"summary",previewed:null,loaded:!1,options:systemOptions,settings:systemSettings}},methods:{__:l.__,popupCloser:o.Z,popupResolver:b.Z,toggleProductView:function(e){this.view="details",this.previewed=e},loadOrderRefunds:function(){var e=this;nsHttpClient.get("/api/nexopos/v4/orders/".concat(this.order.id,"/refunds")).subscribe((function(t){e.loaded=!0,e.refunds=t.refunds}),(function(e){r.kX.error(e.message).subscribe()}))},close:function(){this.$popup.close()},processRegularPrinting:function(e){var t=document.querySelector("printing-section");t&&t.remove();var s=this.settings.printing_url.replace("{order_id}",e),r=document.createElement("iframe");r.id="printing-section",r.className="hidden",r.src=s,document.body.appendChild(r),setTimeout((function(){document.querySelector("#printing-section").remove()}),100)},printRefundReceipt:function(e){this.printOrder(e.id)},printOrder:function(e){switch(this.options.ns_pos_printing_gateway){case"default":this.processRegularPrinting(e);break;default:this.processCustomPrinting(e,this.options.ns_pos_printing_gateway)}},processCustomPrinting:function(e,t){nsHooks.applyFilters("ns-order-custom-refund-print",{printed:!1,order_id:e,gateway:t}).printed||r.kX.error((0,l.__)("Unsupported print gateway.")).subscribe()}},mounted:function(){this.order=this.$popupParams.order,this.popupCloser(),this.loadOrderRefunds()}};const M=(0,f.Z)(Y,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"shadow-lg w-95vw h-95vh md:w-3/5-screen md:h-3/5-screen bg-white flex flex-col overflow-hidden"},[s("div",{staticClass:"border-b p-2 flex items-center justify-between"},[s("h3",[e._v(e._s(e.__("Order Refunds")))]),e._v(" "),s("div",{staticClass:"flex"},["details"===e.view?s("div",{staticClass:"flex items-center justify-center cursor-pointer rounded-full px-3 border hover:bg-blue-400 hover:text-white mr-1",on:{click:function(t){e.view="summary"}}},[e._v(e._s(e.__("Return")))]):e._e(),e._v(" "),s("ns-close-button",{on:{click:function(t){return e.close()}}})],1)]),e._v(" "),s("div",{staticClass:"overflow-auto flex-auto"},["summary"===e.view?[e.loaded?e._e():s("div",{staticClass:"flex h-full w-full items-center justify-center"},[s("ns-spinner",{attrs:{size:"24"}})],1),e._v(" "),e.loaded&&0===e.refunds.length?s("div",{staticClass:"flex h-full w-full items-center justify-center"},[s("i",{staticClass:"lar la-frown-open"})]):e._e(),e._v(" "),e.loaded&&e.refunds.length>0?e._l(e.refunds,(function(t){return s("div",{key:t.id,staticClass:"border-b flex flex-col md:flex-row"},[s("div",{staticClass:"w-full md:flex-auto p-2"},[s("h3",{staticClass:"font-semibold mb-1"},[e._v(e._s(e.order.code))]),e._v(" "),s("div",[s("ul",{staticClass:"flex -mx-1 text-sm text-gray-700"},[s("li",{staticClass:"px-1"},[e._v(e._s(e.__("Total"))+" : "+e._s(e._f("currency")(t.total)))]),e._v(" "),s("li",{staticClass:"px-1"},[e._v(e._s(e.__("By"))+" : "+e._s(t.author.username))])])])]),e._v(" "),s("div",{staticClass:"w-full md:w-16 cursor-pointer hover:bg-blue-400 hover:border-blue-400 hover:text-white text-lg flex items-center justify-center md:border-l",on:{click:function(s){return e.toggleProductView(t)}}},[s("i",{staticClass:"las la-eye"})]),e._v(" "),s("div",{staticClass:"w-full md:w-16 cursor-pointer hover:bg-blue-400 hover:border-blue-400 hover:text-white text-lg flex items-center justify-center md:border-l",on:{click:function(s){return e.printRefundReceipt(t)}}},[s("i",{staticClass:"las la-print"})])])})):e._e()]:e._e(),e._v(" "),"details"===e.view?e._l(e.previewed.refunded_products,(function(t){return s("div",{key:t.id,staticClass:"border-b flex flex-col md:flex-row"},[s("div",{staticClass:"w-full md:flex-auto p-2"},[s("h3",{staticClass:"font-semibold mb-1"},[e._v(e._s(t.product.name))]),e._v(" "),s("div",[s("ul",{staticClass:"flex -mx-1 text-sm text-gray-700"},[s("li",{staticClass:"px-1"},[e._v(e._s(e.__("Condition"))+" : "+e._s(t.condition))]),e._v(" "),s("li",{staticClass:"px-1"},[e._v(e._s(e.__("Quantity"))+" : "+e._s(t.quantity))]),e._v(" "),s("li",{staticClass:"px-1"},[e._v(e._s(e.__("Total"))+" : "+e._s(e._f("currency")(t.total_price)))])])])])])})):e._e()],2)])}),[],!1,null,null,null).exports;var B={nsOrderPreview:Q,nsProductPreview:N,nsAlertPopup:W.Z,nsConfirmPopup:x.Z,nsPromptPopup:O.Z,nsMediaPopup:L.Z,nsProcurementQuantity:G.Z,nsOrdersRefund:M};for(var H in B)window[H]=B[H]},6700:(e,t,s)=>{var r={"./af":2786,"./af.js":2786,"./ar":867,"./ar-dz":4130,"./ar-dz.js":4130,"./ar-kw":6135,"./ar-kw.js":6135,"./ar-ly":6440,"./ar-ly.js":6440,"./ar-ma":7702,"./ar-ma.js":7702,"./ar-sa":6040,"./ar-sa.js":6040,"./ar-tn":7100,"./ar-tn.js":7100,"./ar.js":867,"./az":1083,"./az.js":1083,"./be":9808,"./be.js":9808,"./bg":8338,"./bg.js":8338,"./bm":7438,"./bm.js":7438,"./bn":8905,"./bn-bd":6225,"./bn-bd.js":6225,"./bn.js":8905,"./bo":1560,"./bo.js":1560,"./br":1278,"./br.js":1278,"./bs":622,"./bs.js":622,"./ca":2468,"./ca.js":2468,"./cs":5822,"./cs.js":5822,"./cv":877,"./cv.js":877,"./cy":7373,"./cy.js":7373,"./da":4780,"./da.js":4780,"./de":9740,"./de-at":217,"./de-at.js":217,"./de-ch":894,"./de-ch.js":894,"./de.js":9740,"./dv":5300,"./dv.js":5300,"./el":837,"./el.js":837,"./en-au":8348,"./en-au.js":8348,"./en-ca":7925,"./en-ca.js":7925,"./en-gb":2243,"./en-gb.js":2243,"./en-ie":6436,"./en-ie.js":6436,"./en-il":7207,"./en-il.js":7207,"./en-in":4175,"./en-in.js":4175,"./en-nz":6319,"./en-nz.js":6319,"./en-sg":1662,"./en-sg.js":1662,"./eo":2915,"./eo.js":2915,"./es":7093,"./es-do":5251,"./es-do.js":5251,"./es-mx":6112,"./es-mx.js":6112,"./es-us":1146,"./es-us.js":1146,"./es.js":7093,"./et":5603,"./et.js":5603,"./eu":7763,"./eu.js":7763,"./fa":6959,"./fa.js":6959,"./fi":1897,"./fi.js":1897,"./fil":2549,"./fil.js":2549,"./fo":4694,"./fo.js":4694,"./fr":4470,"./fr-ca":3049,"./fr-ca.js":3049,"./fr-ch":2330,"./fr-ch.js":2330,"./fr.js":4470,"./fy":5044,"./fy.js":5044,"./ga":9295,"./ga.js":9295,"./gd":2101,"./gd.js":2101,"./gl":8794,"./gl.js":8794,"./gom-deva":7884,"./gom-deva.js":7884,"./gom-latn":3168,"./gom-latn.js":3168,"./gu":5349,"./gu.js":5349,"./he":4206,"./he.js":4206,"./hi":94,"./hi.js":94,"./hr":316,"./hr.js":316,"./hu":2138,"./hu.js":2138,"./hy-am":1423,"./hy-am.js":1423,"./id":9218,"./id.js":9218,"./is":135,"./is.js":135,"./it":626,"./it-ch":150,"./it-ch.js":150,"./it.js":626,"./ja":9183,"./ja.js":9183,"./jv":4286,"./jv.js":4286,"./ka":2105,"./ka.js":2105,"./kk":7772,"./kk.js":7772,"./km":8758,"./km.js":8758,"./kn":9282,"./kn.js":9282,"./ko":3730,"./ko.js":3730,"./ku":1408,"./ku.js":1408,"./ky":3291,"./ky.js":3291,"./lb":6841,"./lb.js":6841,"./lo":5466,"./lo.js":5466,"./lt":7010,"./lt.js":7010,"./lv":7595,"./lv.js":7595,"./me":9861,"./me.js":9861,"./mi":5493,"./mi.js":5493,"./mk":5966,"./mk.js":5966,"./ml":7341,"./ml.js":7341,"./mn":5115,"./mn.js":5115,"./mr":370,"./mr.js":370,"./ms":9847,"./ms-my":1237,"./ms-my.js":1237,"./ms.js":9847,"./mt":2126,"./mt.js":2126,"./my":6165,"./my.js":6165,"./nb":4924,"./nb.js":4924,"./ne":6744,"./ne.js":6744,"./nl":3901,"./nl-be":9814,"./nl-be.js":9814,"./nl.js":3901,"./nn":3877,"./nn.js":3877,"./oc-lnc":2135,"./oc-lnc.js":2135,"./pa-in":5858,"./pa-in.js":5858,"./pl":4495,"./pl.js":4495,"./pt":9520,"./pt-br":7971,"./pt-br.js":7971,"./pt.js":9520,"./ro":6459,"./ro.js":6459,"./ru":238,"./ru.js":238,"./sd":950,"./sd.js":950,"./se":490,"./se.js":490,"./si":124,"./si.js":124,"./sk":4249,"./sk.js":4249,"./sl":4985,"./sl.js":4985,"./sq":1104,"./sq.js":1104,"./sr":9131,"./sr-cyrl":9915,"./sr-cyrl.js":9915,"./sr.js":9131,"./ss":5893,"./ss.js":5893,"./sv":8760,"./sv.js":8760,"./sw":1172,"./sw.js":1172,"./ta":7333,"./ta.js":7333,"./te":3110,"./te.js":3110,"./tet":2095,"./tet.js":2095,"./tg":7321,"./tg.js":7321,"./th":9041,"./th.js":9041,"./tk":9005,"./tk.js":9005,"./tl-ph":5768,"./tl-ph.js":5768,"./tlh":9444,"./tlh.js":9444,"./tr":2397,"./tr.js":2397,"./tzl":8254,"./tzl.js":8254,"./tzm":1106,"./tzm-latn":699,"./tzm-latn.js":699,"./tzm.js":1106,"./ug-cn":9288,"./ug-cn.js":9288,"./uk":7691,"./uk.js":7691,"./ur":3795,"./ur.js":3795,"./uz":6791,"./uz-latn":588,"./uz-latn.js":588,"./uz.js":6791,"./vi":5666,"./vi.js":5666,"./x-pseudo":4378,"./x-pseudo.js":4378,"./yo":5805,"./yo.js":5805,"./zh-cn":3839,"./zh-cn.js":3839,"./zh-hk":5726,"./zh-hk.js":5726,"./zh-mo":9807,"./zh-mo.js":9807,"./zh-tw":4152,"./zh-tw.js":4152};function n(e){var t=i(e);return s(t)}function i(e){if(!s.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}n.keys=function(){return Object.keys(r)},n.resolve=i,e.exports=n,n.id=6700},3968:(e,t,s)=>{"use strict";s.d(t,{Z:()=>a});function r(e){return function(e){if(Array.isArray(e))return n(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return n(e,t);var s=Object.prototype.toString.call(e).slice(8,-1);"Object"===s&&e.constructor&&(s=e.constructor.name);if("Map"===s||"Set"===s)return Array.from(e);if("Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return n(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var s=0,r=new Array(t);s100?100:this.backValue))),"0"===this.backValue&&(this.backValue=""),this.$emit("changed",this.floating&&this.backValue.length>0?parseFloat(this.backValue/this.number):this.backValue)):this.$emit("next",this.floating&&this.backValue.length>0?parseFloat(this.backValue/this.number):this.backValue)}}};const a=(0,s(1900).Z)(i,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"grid grid-flow-row grid-cols-3 gap-2 grid-rows-3",staticStyle:{padding:"1px"},attrs:{id:"numpad"}},[e._l(e.keys,(function(t,r){return s("div",{key:r,staticClass:"hover:bg-gray-400 hover:text-gray-800 bg-gray-300 text-2xl text-gray-700 border h-16 flex items-center justify-center cursor-pointer",staticStyle:{margin:"-1px"},on:{click:function(s){return e.inputValue(t)}}},[void 0!==t.value?s("span",[e._v(e._s(t.value))]):e._e(),e._v(" "),t.icon?s("i",{staticClass:"las",class:t.icon}):e._e()])})),e._v(" "),e._t("numpad-footer")],2)}),[],!1,null,null,null).exports},9576:(e,t,s)=>{"use strict";s.d(t,{Z:()=>o});var r=s(162),n=s(8603),i=s(7389);const a={name:"ns-media",props:["popup"],components:{VueUpload:s(2948)},data:function(){return{pages:[{label:(0,i.__)("Upload"),name:"upload",selected:!1},{label:(0,i.__)("Gallery"),name:"gallery",selected:!0}],resources:[],response:{data:[],current_page:0,from:0,to:0,next_page_url:"",prev_page_url:"",path:"",per_page:0,total:0,last_page:0,first_page:0},queryPage:1,bulkSelect:!1,files:[]}},mounted:function(){this.popupCloser();var e=this.pages.filter((function(e){return"gallery"===e.name}))[0];this.select(e)},watch:{files:function(){this.files.filter((function(e){return"0.00"===e.progress})).length>0&&(this.$refs.upload.active=!0)}},computed:{postMedia:function(){return r.kq.applyFilters("http-client-url","/api/nexopos/v4/medias")},currentPage:function(){return this.pages.filter((function(e){return e.selected}))[0]},hasOneSelected:function(){return this.response.data.filter((function(e){return e.selected})).length>0},selectedResource:function(){return this.response.data.filter((function(e){return e.selected}))[0]},csrf:function(){return ns.authentication.csrf},isPopup:function(){return void 0!==this.$popup},user_id:function(){return this.isPopup&&this.$popupParams.user_id||0}},methods:{popupCloser:n.Z,__:i.__,cancelBulkSelect:function(){this.bulkSelect=!1,this.response.data.forEach((function(e){return e.selected=!1}))},deleteSelected:function(){var e=this;if(confirm("Delete selected resources ?"))return r.ih.post("/api/nexopos/v4/medias/bulk-delete",{ids:this.response.data.filter((function(e){return e.selected})).map((function(e){return e.id}))}).subscribe((function(t){r.kX.success(t.message).subscribe(),e.loadGallery()}),(function(e){r.kX.error(e.message).subscribe()}))},select:function(e){this.pages.forEach((function(e){return e.selected=!1})),e.selected=!0,"gallery"===e.name&&this.loadGallery()},loadGallery:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;t=null===t?this.queryPage:t,this.queryPage=t,r.ih.get("/api/nexopos/v4/medias?page=".concat(t,"&user_id=").concat(this.user_id)).subscribe((function(t){t.data.forEach((function(e){return e.selected=!1})),e.response=t}))},useSelectedEntries:function(){this.$popupParams.resolve({event:"use-selected",value:this.response.data.filter((function(e){return e.selected}))}),this.$popup.close()},selectResource:function(e){var t=this;this.bulkSelect||this.response.data.forEach((function(s,r){r!==t.response.data.indexOf(e)&&(s.selected=!1)})),e.selected=!e.selected}}};const o=(0,s(1900).Z)(a,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"flex bg-white shadow-xl overflow-hidden",class:e.isPopup?"w-6/7-screen h-6/7-screen":"w-full h-full"},[s("div",{staticClass:"sidebar w-48 bg-gray-200 h-full flex-shrink-0"},[s("h3",{staticClass:"text-xl font-bold text-gray-800 my-4 text-center"},[e._v(e._s(e.__("Medias Manager")))]),e._v(" "),s("ul",e._l(e.pages,(function(t,r){return s("li",{key:r,staticClass:"hover:bg-white py-2 px-3 text-gray-700 border-l-8 cursor-pointer",class:t.selected?"bg-white border-blue-400":"border-transparent",on:{click:function(s){return e.select(t)}}},[e._v(e._s(t.label))])})),0)]),e._v(" "),"upload"===e.currentPage.name?s("div",{staticClass:"content w-full overflow-hidden flex"},[s("vue-upload",{ref:"upload",staticClass:" flex-auto flex bg-white shadow",attrs:{drop:!0,multiple:!0,headers:{"X-Requested-With":"XMLHttpRequest","X-CSRF-TOKEN":e.csrf},accept:"image/*","post-action":e.postMedia},model:{value:e.files,callback:function(t){e.files=t},expression:"files"}},[s("div",{staticClass:"border-dashed border-2 flex flex-auto m-2 p-2 flex-col border-blue-400 items-center justify-center"},[s("h3",{staticClass:"text-3xl font-bold text-gray-600 mb-4"},[e._v(e._s(e.__("Click Here Or Drop Your File To Upload")))]),e._v(" "),s("div",{staticClass:"rounded w-full md:w-2/3 text-gray-700 bg-gray-500 h-56 overflow-y-auto p-2"},[s("ul",e._l(e.files,(function(t,r){return s("li",{key:r,staticClass:"p-2 mb-2 shadow bg-white flex items-center justify-between rounded"},[s("span",[e._v(e._s(t.name))]),e._v(" "),s("span",{staticClass:"rounded bg-blue-400 flex items-center justify-center text-xs p-2"},[e._v(e._s(t.progress)+"%")])])})),0)])])])],1):e._e(),e._v(" "),"gallery"===e.currentPage.name?s("div",{staticClass:"content flex-col w-full overflow-hidden flex"},[e.popup?s("div",{staticClass:"p-2 flex flex-shrink-0 justify-between bg-gray-200"},[s("div"),e._v(" "),s("div",[s("ns-close-button",{on:{click:function(t){return e.popup.close()}}})],1)]):e._e(),e._v(" "),s("div",{staticClass:"flex flex-auto overflow-hidden"},[s("div",{staticClass:"bg-white shadow content flex flex-auto flex-col overflow-y-auto",attrs:{id:"grid"}},[s("div",{staticClass:"flex flex-auto"},[s("div",{staticClass:"p-2 overflow-x-auto"},[s("div",{staticClass:"grid grid-cols-2 md:grid-cols-4 lg:grid-cols-4 xl:grid-cols-6"},e._l(e.response.data,(function(t,r){return s("div",{key:r},[s("div",{staticClass:"p-2"},[s("div",{staticClass:"rounded-lg w-32 h-32 bg-gray-500 m-2 overflow-hidden flex items-center justify-center",class:t.selected?"ring-4 ring-blue-500 ring-opacity-50":"",on:{click:function(s){return e.selectResource(t)}}},[s("img",{staticClass:"object-cover h-full",attrs:{src:t.sizes.thumb,alt:t.name}})])])])})),0)]),e._v(" "),0===e.response.data.length?s("div",{staticClass:"flex flex-auto items-center justify-center"},[s("h3",{staticClass:"text-2xl text-gray-600 font-bold"},[e._v(e._s(e.__("Nothing has already been uploaded")))])]):e._e()])]),e._v(" "),!e.bulkSelect&&e.hasOneSelected?s("div",{staticClass:"w-64 flex-shrink-0 bg-gray-200",attrs:{id:"preview"}},[s("div",{staticClass:"h-64 bg-gray-600 flex items-center justify-center"},[s("img",{attrs:{src:e.selectedResource.sizes.thumb,alt:e.selectedResource.name}})]),e._v(" "),s("div",{staticClass:"p-4 text-gray-700 text-sm",attrs:{id:"details"}},[s("p",{staticClass:"flex flex-col mb-2"},[s("strong",{staticClass:"font-bold block"},[e._v(e._s(e.__("File Name"))+": ")]),s("span",[e._v(e._s(e.selectedResource.name))])]),e._v(" "),s("p",{staticClass:"flex flex-col mb-2"},[s("strong",{staticClass:"font-bold block"},[e._v(e._s(e.__("Uploaded At"))+":")]),s("span",[e._v(e._s(e.selectedResource.created_at))])]),e._v(" "),s("p",{staticClass:"flex flex-col mb-2"},[s("strong",{staticClass:"font-bold block"},[e._v(e._s(e.__("By"))+" :")]),s("span",[e._v(e._s(e.selectedResource.user.username))])])])]):e._e()]),e._v(" "),s("div",{staticClass:"p-2 flex flex-shrink-0 justify-between bg-gray-200"},[s("div",{staticClass:"flex -mx-2 flex-shrink-0"},[s("div",{staticClass:"px-2 flex-shrink-0 flex"},[s("div",{staticClass:"rounded shadow overflow-hidden border-blue-400 flex text-sm text-gray-700"},[e.bulkSelect?s("button",{staticClass:"bg-white hover:bg-blue-400 hover:text-white py-2 px-3",on:{click:function(t){return e.cancelBulkSelect()}}},[s("i",{staticClass:"las la-times"})]):e._e(),e._v(" "),e.hasOneSelected&&!e.bulkSelect?s("button",{staticClass:"bg-white hover:bg-blue-400 hover:text-white py-2 px-3",on:{click:function(t){e.bulkSelect=!0}}},[s("i",{staticClass:"las la-check-circle"})]):e._e(),e._v(" "),e.hasOneSelected?s("button",{staticClass:"bg-red-400 text-white hover:bg-red-500 hover:text-white py-2 px-3",on:{click:function(t){return e.deleteSelected()}}},[s("i",{staticClass:"las la-trash"})]):e._e()])])]),e._v(" "),s("div",{staticClass:"flex-shrink-0 -mx-2 flex"},[s("div",{staticClass:"px-2"},[s("div",{staticClass:"rounded shadow overflow-hidden border-blue-400 flex text-sm text-gray-700"},[s("button",{staticClass:"p-2",class:1===e.response.current_page?"bg-gray-100 text-gray-600 cursor-not-allowed":"bg-white hover:bg-blue-400 hover:text-white",attrs:{disabled:1===e.response.current_page},on:{click:function(t){return e.loadGallery(e.response.current_page-1)}}},[e._v(e._s(e.__("Previous")))]),e._v(" "),s("hr",{staticClass:"border-r border-gray-700"}),e._v(" "),s("button",{staticClass:"p-2",class:e.response.current_page===e.response.last_page?"bg-gray-100 text-gray-600 cursor-not-allowed":"bg-white hover:bg-blue-400 hover:text-white",attrs:{disabled:e.response.current_page===e.response.last_page},on:{click:function(t){return e.loadGallery(e.response.current_page+1)}}},[e._v(e._s(e.__("Next")))])])]),e._v(" "),e.popup&&e.hasOneSelected?s("div",{staticClass:"px-2"},[s("button",{staticClass:"rounded shadow p-2 bg-blue-400 text-white text-sm",on:{click:function(t){return e.useSelectedEntries()}}},[e._v(e._s(e.__("Use Selected")))])]):e._e()])])]):e._e()])}),[],!1,null,null,null).exports},2329:(e,t,s)=>{"use strict";s.d(t,{Z:()=>n});const r={data:function(){return{title:"",message:""}},computed:{size:function(){return this.$popupParams.size||"h-full w-full"}},mounted:function(){var e=this;this.title=this.$popupParams.title,this.message=this.$popupParams.message,this.$popup.event.subscribe((function(t){"click-overlay"===t.event&&(void 0!==e.$popupParams.onAction&&e.$popupParams.onAction(!1),e.$popup.close())}))},methods:{__:s(7389).__,emitAction:function(e){void 0!==this.$popupParams.onAction&&this.$popupParams.onAction(e),this.$popup.close()}}};const n=(0,s(1900).Z)(r,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"w-6/7-screen md:w-4/7-screen lg:w-3/7-screen flex flex-col bg-white shadow-lg",class:e.size,attrs:{id:"popup"}},[s("div",{staticClass:"flex items-center justify-center flex-col flex-auto p-4"},[e.title?s("h2",{staticClass:"text-3xl font-body text-gray-700"},[e._v(e._s(e.title))]):e._e(),e._v(" "),s("p",{staticClass:"py-4 text-gray-600 text-center"},[e._v(e._s(e.message))])]),e._v(" "),s("div",{staticClass:"flex border-t border-gray-200 text-gray-700 justify-end items-center p-2"},[s("ns-button",{attrs:{type:"info"},on:{click:function(t){return e.emitAction(!0)}}},[e._v(e._s(e.__("Ok")))])],1)])}),[],!1,null,null,null).exports},419:(e,t,s)=>{"use strict";s.d(t,{Z:()=>n});const r={data:function(){return{title:"",message:""}},computed:{size:function(){return this.$popupParams.size||"h-full w-full"}},mounted:function(){var e=this;this.title=this.$popupParams.title,this.message=this.$popupParams.message,this.$popup.event.subscribe((function(t){"click-overlay"===t.event&&(e.$popupParams.onAction(!1),e.$popup.close())}))},methods:{__:s(7389).__,emitAction:function(e){this.$popupParams.onAction(e),this.$popup.close()}}};const n=(0,s(1900).Z)(r,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"flex flex-col bg-white shadow-lg w-5/7-screen md:w-4/7-screen lg:w-2/7-screen",class:e.size,attrs:{id:"popup"}},[s("div",{staticClass:"flex items-center justify-center flex-col flex-auto p-4"},[s("h2",{staticClass:"text-xl md:text-3xl font-body text-gray-700 text-center"},[e._v(e._s(e.title))]),e._v(" "),s("p",{staticClass:"py-4 text-sm md:text-base text-gray-600 text-center"},[e._v(e._s(e.message))])]),e._v(" "),s("div",{staticClass:"flex border-t border-gray-200 text-gray-700"},[s("button",{staticClass:"hover:bg-gray-100 flex-auto w-1/2 h-16 flex items-center justify-center uppercase",on:{click:function(t){return e.emitAction(!0)}}},[e._v(e._s(e.__("Yes")))]),e._v(" "),s("hr",{staticClass:"border-r border-gray-200"}),e._v(" "),s("button",{staticClass:"hover:bg-gray-100 flex-auto w-1/2 h-16 flex items-center justify-center uppercase",on:{click:function(t){return e.emitAction(!1)}}},[e._v(e._s(e.__("No")))])])])}),[],!1,null,null,null).exports},7096:(e,t,s)=>{"use strict";s.d(t,{Z:()=>l});var r=s(162),n=s(7389);function i(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return a(e,t);var s=Object.prototype.toString.call(e).slice(8,-1);"Object"===s&&e.constructor&&(s=e.constructor.name);if("Map"===s||"Set"===s)return Array.from(e);if("Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return a(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var s=0,r=new Array(t);s{"use strict";s.d(t,{Z:()=>n});const r={data:function(){return{title:"",message:"",input:""}},computed:{size:function(){return this.$popupParams.size||"h-full w-full"}},mounted:function(){var e=this;this.input=this.$popupParams.input||"",this.title=this.$popupParams.title,this.message=this.$popupParams.message,this.$popup.event.subscribe((function(t){"click-overlay"===t.event&&(e.$popupParams.reject(!1),e.$popup.close())}))},methods:{__:s(7389).__,emitAction:function(e){this.$popupParams.onAction(e?this.input:e),this.$popup.close()},reject:function(e){this.$popupParams.reject(e),this.$popup.close()}}};const n=(0,s(1900).Z)(r,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"w-5/7-screen md:w-3/7-screen flex flex-col bg-white shadow-lg",class:e.size,attrs:{id:"popup"}},[s("div",{staticClass:"flex items-center justify-center flex-col flex-auto p-2"},[s("h2",{staticClass:"text-3xl font-body text-gray-700"},[e._v(e._s(e.title))]),e._v(" "),s("p",{staticClass:"w-full md:mx-auto md:w-2/3 py-4 text-gray-600 text-center"},[e._v(e._s(e.message))])]),e._v(" "),s("div",{staticClass:"p-2"},[s("textarea",{directives:[{name:"model",rawName:"v-model",value:e.input,expression:"input"}],staticClass:"text-gray-700 w-full border-2 p-2 border-blue-400",attrs:{name:"",id:"",cols:"30",rows:"10"},domProps:{value:e.input},on:{input:function(t){t.target.composing||(e.input=t.target.value)}}})]),e._v(" "),s("div",{staticClass:"flex border-t border-gray-200 text-gray-700"},[s("button",{staticClass:"hover:bg-gray-100 flex-auto w-1/2 h-16 flex items-center justify-center uppercase",on:{click:function(t){return e.emitAction(!0)}}},[e._v(e._s(e.__("Ok")))]),e._v(" "),s("hr",{staticClass:"border-r border-gray-200"}),e._v(" "),s("button",{staticClass:"hover:bg-gray-100 flex-auto w-1/2 h-16 flex items-center justify-center uppercase",on:{click:function(t){return e.reject(!1)}}},[e._v(e._s(e.__("Cancel")))])])])}),[],!1,null,null,null).exports}},e=>{e.O(0,[898],(()=>{return t=9351,e(e.s=t);var t}));e.O()}]); +(self.webpackChunkNexoPOS_4x=self.webpackChunkNexoPOS_4x||[]).push([[820],{162:(e,t,s)=>{"use strict";s.d(t,{l:()=>z,kq:()=>U,ih:()=>I,kX:()=>R});var r=s(6486),n=s(9669),i=s(2181),a=s(8345),o=s(9624),l=s(9248),c=s(230);function u(e,t){for(var s=0;s2&&void 0!==arguments[2]?arguments[2]:{};return this._request("post",e,t,s)}},{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._request("get",e,void 0,t)}},{key:"delete",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._request("delete",e,void 0,t)}},{key:"put",value:function(e,t){var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this._request("put",e,t,s)}},{key:"response",get:function(){return this._lastRequestData}},{key:"_request",value:function(e,t){var s=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return t=U.applyFilters("http-client-url",t.replace(/\/$/,"")),this._subject.next({identifier:"async.start",url:t,data:r}),new c.y((function(i){s._client[e](t,r,Object.assign(Object.assign({},s._client.defaults[e]),n)).then((function(e){s._lastRequestData=e,i.next(e.data),i.complete(),s._subject.next({identifier:"async.stop"})})).catch((function(e){var t;i.error((null===(t=e.response)||void 0===t?void 0:t.data)||e.response||e),s._subject.next({identifier:"async.stop"})}))}))}},{key:"subject",value:function(){return this._subject}},{key:"emit",value:function(e){var t=e.identifier,s=e.value;this._subject.next({identifier:t,value:s})}}])&&u(t.prototype,s),r&&u(t,r),e}(),p=s(3);function f(e,t){for(var s=0;s=1e3){for(var s,r=Math.floor((""+e).length/3),n=2;n>=1;n--){if(((s=parseFloat((0!=r?e/Math.pow(1e3,r):e).toPrecision(n)))+"").replace(/[^a-zA-Z 0-9]+/g,"").length<=2)break}s%1!=0&&(s=s.toFixed(1)),t=s+["","k","m","b","t"][r]}return t})),S=s(1356),O=s(9698);function $(e,t){for(var s=0;s0&&window.outerWidth<=480:this.breakpoint="xs";break;case window.outerWidth>480&&window.outerWidth<=640:this.breakpoint="sm";break;case window.outerWidth>640&&window.outerWidth<=1024:this.breakpoint="md";break;case window.outerWidth>1024&&window.outerWidth<=1280:this.breakpoint="lg";break;case window.outerWidth>1280:this.breakpoint="xl"}}}])&&T(t.prototype,s),r&&T(t,r),e}()),W=new h({sidebar:["xs","sm","md"].includes(N.breakpoint)?"hidden":"visible"});I.defineClient(n),window.nsEvent=z,window.nsHttpClient=I,window.nsSnackBar=R,window.nsCurrency=S.W,window.nsTruncate=O.b,window.nsRawCurrency=S.f,window.nsAbbreviate=P,window.nsState=W,window.nsUrl=X,window.nsScreen=N,window.ChartJS=i,window.EventEmitter=v,window.Popup=x.G,window.RxJS=y,window.FormValidation=C.Z,window.nsCrudHandler=Q},4451:(e,t,s)=>{"use strict";s.d(t,{R:()=>n});var r=s(7389),n=s(538).default.component("ns-select",{data:function(){return{}},props:["name","placeholder","field"],computed:{hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},disabledClass:function(){return this.field.disabled?"bg-gray-200 cursor-not-allowed":"bg-transparent"},inputClass:function(){return this.disabledClass+" "+this.leadClass},leadClass:function(){return this.leading?"pl-8":"px-4"}},methods:{__:r.__},template:'\n
    \n \n
    \n \n
    \n

    \n

    \n {{ __( \'This field is required.\' ) }}\n {{ __( \'This field must contain a valid email address.\' ) }}\n {{ error.message }}\n

    \n
    \n '})},1356:(e,t,s)=>{"use strict";s.d(t,{W:()=>c,f:()=>u});var r=s(538),n=s(2077),i=s.n(n),a=s(6740),o=s.n(a),l=new Array(parseInt(ns.currency.ns_currency_precision)).fill("").map((function(e){return 0})).join(""),c=r.default.filter("currency",(function(e){var t,s,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"full";switch(ns.currency.ns_currency_prefered){case"iso":t=ns.currency.ns_currency_iso;break;case"symbol":t=ns.currency.ns_currency_symbol}if("full"===r){var n={decimal:ns.currency.ns_currency_decimal_separator,separator:ns.currency.ns_currency_thousand_separator,precision:parseInt(ns.currency.ns_currency_precision),symbol:""};s=o()(e,n).format()}else s=i()(e).format("0.0a");return"".concat("before"===ns.currency.ns_currency_position?t:"").concat(s).concat("after"===ns.currency.ns_currency_position?t:"")})),u=function(e){var t="0.".concat(l);return parseFloat(i()(e).format(t))}},9698:(e,t,s)=>{"use strict";s.d(t,{b:()=>r});var r=s(538).default.filter("truncate",(function(e,t){return e?(e=e.toString()).length>t?e.substring(0,t)+"...":e:""}))},7266:(e,t,s)=>{"use strict";function r(e,t){for(var s=0;sn});var n=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,s,n;return t=e,(s=[{key:"validateFields",value:function(e){var t=this;return 0===e.map((function(e){return t.checkField(e),e.errors?0===e.errors.length:0})).filter((function(e){return!1===e})).length}},{key:"validateFieldsErrors",value:function(e){var t=this;return e.map((function(e){return t.checkField(e),e.errors})).flat()}},{key:"validateForm",value:function(e){e.main&&this.validateField(e.main);var t=[];for(var s in e.tabs){var r=[],n=this.validateFieldsErrors(e.tabs[s].fields);n.length>0&&r.push(n),e.tabs[s].errors=r.flat(),t.push(r.flat())}return t.flat().filter((function(e){return void 0!==e}))}},{key:"initializeTabs",value:function(e){var t=0;for(var s in e)0===t&&(e[s].active=!0),e[s].active=void 0!==e[s].active&&e[s].active,e[s].fields=this.createFields(e[s].fields),t++;return e}},{key:"validateField",value:function(e){return this.checkField(e)}},{key:"fieldsValid",value:function(e){return!(e.map((function(e){return e.errors&&e.errors.length>0})).filter((function(e){return e})).length>0)}},{key:"createFields",value:function(e){return e.map((function(e){return e.type=e.type||"text",e.errors=e.errors||[],e.disabled=e.disabled||!1,"custom"===e.type&&(e.component=nsExtraComponents[e.name]),e}))}},{key:"createForm",value:function(e){if(e.main&&(e.main=this.createFields([e.main])[0]),e.tabs)for(var t in e.tabs)e.tabs[t].fields=this.createFields(e.tabs[t].fields),e.tabs[t].errors=[];return e}},{key:"enableFields",value:function(e){return e.map((function(e){return e.disabled=!1}))}},{key:"disableFields",value:function(e){return e.map((function(e){return e.disabled=!0}))}},{key:"disableForm",value:function(e){for(var t in e.main&&(e.main.disabled=!0),e.tabs)e.tabs[t].fields.forEach((function(e){return e.disabled=!0}))}},{key:"enableForm",value:function(e){for(var t in e.main&&(e.main.disabled=!1),e.tabs)e.tabs[t].fields.forEach((function(e){return e.disabled=!1}))}},{key:"getValue",value:function(e){var t={};return e.forEach((function(e){t[e.name]=e.value})),t}},{key:"checkField",value:function(e){var t=this;return void 0!==e.validation&&(e.errors=[],this.detectValidationRules(e.validation).forEach((function(s){t.fieldPassCheck(e,s)}))),e}},{key:"extractForm",value:function(e){var t={};if(e.main&&(t[e.main.name]=e.main.value),e.tabs)for(var s in e.tabs)void 0===t[s]&&(t[s]={}),t[s]=this.extractFields(e.tabs[s].fields);return t}},{key:"extractFields",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.forEach((function(e){["multiselect"].includes(e.type)?t[e.name]=e.options.filter((function(e){return e.selected})).map((function(e){return e.value})):t[e.name]=e.value})),t}},{key:"detectValidationRules",value:function(e){var t=function(e){var t;return["email","required"].includes(e)?{identifier:e}:(t=/(min)\:([0-9])+/g.exec(e))||(t=/(max)\:([0-9])+/g.exec(e))?{identifier:t[1],value:t[2]}:e};return Array.isArray(e)?e.filter((function(e){return"string"==typeof e})).map(t):e.split("|").map(t)}},{key:"triggerError",value:function(e,t){if(t.errors){var s=function(s){var r=s.split(".").filter((function(e){return!/^\d+$/.test(e)}));2===r.length&&e.tabs[r[0]].fields.forEach((function(e){e.name===r[1]&&t.errors[s].forEach((function(t){var s={identifier:"invalid",invalid:!0,message:t,name:e.name};e.errors.push(s)}))})),s===e.main.name&&t.errors[s].forEach((function(t){e.main.errors.push({identifier:"invalid",invalid:!0,message:t,name:e.main.name})}))};for(var r in t.errors)s(r)}}},{key:"triggerFieldsErrors",value:function(e,t){if(t&&t.errors){var s=function(s){e.forEach((function(e){e.name===s&&t.errors[s].forEach((function(t){var s={identifier:"invalid",invalid:!0,message:t,name:e.name};e.errors.push(s)}))}))};for(var r in t.errors)s(r)}}},{key:"fieldPassCheck",value:function(e,t){if("required"===t.identifier){if(void 0===e.value||null===e.value||0===e.value.length)return e.errors.push({identifier:t.identifier,invalid:!0,name:e.name});e.errors.forEach((function(s,r){s.identifier===t.identifier&&!0===s.invalid&&e.errors.splice(r,1)}))}if("email"===t.identifier){if(!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(e.value))return e.errors.push({identifier:t.identifier,invalid:!0,name:e.name});e.errors.forEach((function(s,r){!0===s[t.identifier]&&e.errors.splice(r,1)}))}return e}}])&&r(t.prototype,s),n&&r(t,n),e}()},7389:(e,t,s)=>{"use strict";s.d(t,{__:()=>r,c:()=>n});var r=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"NexoPOS";return nsLanguage.getEntries(t)&&nsLanguage.getEntries(t)[e]||e},n=function(e,t){return nsLanguage.getEntries(t)&&nsLanguage.getEntries(t)[e]||e}},8603:(e,t,s)=>{"use strict";function r(){var e=this;Object.keys(this).includes("$popup")&&this.$popup.event.subscribe((function(t){"click-overlay"===t.event&&(e.$popupParams&&void 0!==e.$popupParams.reject&&e.$popupParams.reject(!1),e.$popup.close()),"press-esc"===t.event&&(e.$popupParams&&void 0!==e.$popupParams.reject&&e.$popupParams.reject(!1),e.$popup.close())}))}s.d(t,{Z:()=>r})},6386:(e,t,s)=>{"use strict";function r(e){void 0!==this.$popupParams.resolve&&this.$popupParams.reject&&(!1!==e?this.$popupParams.resolve(e):this.$popupParams.reject(e)),this.$popup.close()}s.d(t,{Z:()=>r})},2242:(e,t,s)=>{"use strict";s.d(t,{G:()=>a});var r=s(9248);function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var s=0;s0&&void 0!==arguments[0]?arguments[0]:{};if(n(this,e),this.config={primarySelector:void 0,popupClass:"shadow-lg h-half w-1/2 bg-white"},this.container=document.createElement("div"),this.popupBody=document.createElement("div"),this.config=Object.assign(this.config,t),void 0===this.config.primarySelector&&document.querySelectorAll(".is-popup").length>0){var s=document.querySelectorAll(".is-popup").length;this.parentWrapper=document.querySelectorAll(".is-popup")[s-1]}else this.parentWrapper=document.querySelector("body").querySelectorAll("div")[0];this.event=new r.x}var t,s,a;return t=e,a=[{key:"show",value:function(t){var s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=new e(r);return n.open(t,s),n}}],(s=[{key:"open",value:function(e){var t,s,r,n=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=document.querySelector("body").querySelectorAll("div")[0];this.parentWrapper.style.filter="blur(4px)",a.style.filter="blur(6px)",this.container.setAttribute("class","absolute top-0 left-0 w-full h-full flex items-center justify-center is-popup"),this.container.addEventListener("click",(function(e){n.event.next({event:"click-overlay",value:!0}),e.stopPropagation()})),this.popupBody.addEventListener("click",(function(e){e.stopImmediatePropagation()})),this.container.style.background="rgb(51 51 51 / 20%)",this.container.id="popup-container-"+document.querySelectorAll(".is-popup").length,this.popupBody.setAttribute("class"," zoom-out-entrance"),this.popupBody.innerHTML='',this.container.appendChild(this.popupBody),document.body.appendChild(this.container);var o=Vue.extend(e);this.instance=new o({propsData:{popup:this}}),this.instance.template=(null===(t=null==e?void 0:e.options)||void 0===t?void 0:t.template)||void 0,this.instance.render=e.render||void 0,this.instance.methods=(null===(s=null==e?void 0:e.options)||void 0===s?void 0:s.methods)||(null==e?void 0:e.methods),this.instance.data=(null===(r=null==e?void 0:e.options)||void 0===r?void 0:r.data)||(null==e?void 0:e.data),this.instance.$popup=this,this.instance.$popupParams=i,this.instance.$mount("#".concat(this.container.id," .popup-body"))}},{key:"close",value:function(){var e=this;this.instance.$destroy(),this.event.unsubscribe(),this.parentWrapper.style.filter="blur(0px)";var t=document.querySelector("body").querySelectorAll("div")[0];document.querySelectorAll(".is-popup").length<=1&&(t.style.filter="blur(0px)"),this.popupBody.classList.remove("zoom-out-entrance"),this.popupBody.classList.add("zoom-in-exit"),this.container.classList.remove("is-popup"),setTimeout((function(){e.container.remove()}),300)}}])&&i(t.prototype,s),a&&i(t,a),e}()},9624:(e,t,s)=>{"use strict";s.d(t,{S:()=>i});var r=s(3260);function n(e,t){for(var s=0;s2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"info"};return r.Observable.create((function(r){var i=s.__createSnack({message:e,label:t,type:n.type}),a=i.buttonNode,o=(i.textNode,i.snackWrapper,i.sampleSnack);a.addEventListener("click",(function(e){r.onNext(a),r.onCompleted(),o.remove()})),s.__startTimer(n.duration,o)}))}},{key:"error",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"error"};return this.show(e,t,Object.assign(Object.assign({},s),{type:"error"}))}},{key:"success",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"success"};return this.show(e,t,Object.assign(Object.assign({},s),{type:"success"}))}},{key:"info",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"info"};return this.show(e,t,Object.assign(Object.assign({},s),{type:"info"}))}},{key:"__startTimer",value:function(e,t){var s,r=function(){e>0&&!1!==e&&(s=setTimeout((function(){t.remove()}),e))};t.addEventListener("mouseenter",(function(){clearTimeout(s)})),t.addEventListener("mouseleave",(function(){r()})),r()}},{key:"__createSnack",value:function(e){var t=e.message,s=e.label,r=e.type,n=void 0===r?"info":r,i=document.getElementById("snack-wrapper")||document.createElement("div"),a=document.createElement("div"),o=document.createElement("p"),l=document.createElement("div"),c=document.createElement("button"),u="",d="";switch(n){case"info":u="text-white hover:bg-blue-400 bg-blue-500",d="bg-gray-900 text-white";break;case"error":u="text-red-700 hover:bg-white bg-white",d="bg-red-500 text-white";break;case"success":u="text-green-700 hover:bg-white bg-white",d="bg-green-500 text-white"}return o.textContent=t,s&&(c.textContent=s,c.setAttribute("class","px-3 py-2 shadow rounded uppercase ".concat(u)),l.appendChild(c)),a.appendChild(o),a.appendChild(l),a.setAttribute("class","md:rounded py-2 px-3 md:w-2/5 w-full z-10 md:my-2 shadow-lg flex justify-between items-center zoom-in-entrance anim-duration-300 ".concat(d)),i.appendChild(a),null===document.getElementById("snack-wrapper")&&(i.setAttribute("id","snack-wrapper"),i.setAttribute("class","absolute bottom-0 w-full flex justify-between items-center flex-col"),document.body.appendChild(i)),{snackWrapper:i,sampleSnack:a,buttonsWrapper:l,buttonNode:c,textNode:o}}}])&&n(t.prototype,s),i&&n(t,i),e}()},9351:(e,t,s)=>{"use strict";var r=s(162),n=s(1356),i=s(2277),a=s(7266),o=s(8603),l=s(7389);function c(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),s.push.apply(s,r)}return s}function u(e){for(var t=1;tthis.availableQuantity)return r.kX.error("Unable to proceed as the quantity provided is exceed the available quantity.").subscribe();this.product.quantity=parseFloat(e),this.$popupParams.resolve(this.product),this.$popup.close()}}};const m=(0,f.Z)(h,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"shadow-xl bg-white overflow-hidden w-95vw md:w-4/6-screen lg:w-3/7-screen"},[s("div",{staticClass:"p-2 flex justify-between"},[s("h3",{staticClass:"font-semibold"},[e._v(e._s(e.__("Quantity")))]),e._v(" "),s("div",[s("ns-close-button",{on:{click:function(t){return e.close()}}})],1)]),e._v(" "),e.product?s("div",{staticClass:"border-t border-b border-gray-200 py-2 flex items-center justify-center text-2xl font-semibold"},[s("span",[e._v(e._s(e.seeValue))]),e._v(" "),s("span",{staticClass:"text-gray-600 text-sm"},[e._v("("+e._s(e.availableQuantity)+" available)")])]):e._e(),e._v(" "),e.product?s("div",{staticClass:"flex-auto overflow-y-auto p-2"},[s("ns-numpad",{attrs:{value:e.product.quantity},on:{next:function(t){return e.updateQuantity(t)},changed:function(t){return e.setChangedValue(t)}}})],1):e._e()])}),[],!1,null,null,null).exports;s(4451);const y={data:function(){return{value:[],options:[],label:null,type:"select"}},computed:{},mounted:function(){this.popupCloser(),this.value=this.$popupParams.value||[],this.options=this.$popupParams.options,this.label=this.$popupParams.label,this.type=this.$popupParams.type||this.type,console.log(this.$popupParams)},methods:{popupCloser:o.Z,__:l.__,toggle:function(e){var t=this.value.indexOf(e);-1===t?this.value.unshift(e):this.value.splice(t,1)},isSelected:function(e){return this.value.indexOf(e)>=0},close:function(){this.$popupParams.reject(!1),this.$popup.close()},select:function(e){void 0!==e&&(this.value=[e]),this.$popupParams.resolve(this.value),this.close()}}};const g=(0,f.Z)(y,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"shadow-xl bg-white w-6/7-screen md:w-4/7-screen lg:w-3/7-screen overflow-hidden"},[s("div",{staticClass:"p-2 flex justify-between border-b border-gray-200"},[s("span",{staticClass:"text-semibold text-gray-700"},[e._v("\n "+e._s(e.label)+"\n ")]),e._v(" "),s("div",[s("ns-close-button",{on:{click:function(t){return e.close()}}})],1)]),e._v(" "),s("div",{staticClass:"flex-auto overflow-y-auto"},[s("ul",["select"===e.type?e._l(e.options,(function(t){return s("li",{key:t.value,staticClass:"p-2 border-b border-gray-200 text-gray-700 cursor-pointer hover:bg-gray-100",on:{click:function(s){return e.select(t)}}},[e._v(e._s(t.label))])})):e._e(),e._v(" "),"multiselect"===e.type?e._l(e.options,(function(t){return s("li",{key:t.value,staticClass:"p-2 border-b text-gray-700 cursor-pointer hover:bg-gray-100",class:e.isSelected(t)?"bg-blue-100 border-blue-200":"border-gray-200",on:{click:function(s){return e.toggle(t)}}},[e._v(e._s(t.label))])})):e._e()],2)]),e._v(" "),"multiselect"===e.type?s("div",{staticClass:"flex justify-between"},[s("div"),e._v(" "),s("div",[s("ns-button",{attrs:{type:"info"},on:{click:function(t){return e.select()}}},[e._v(e._s(e.__("Select")))])],1)]):e._e()])}),[],!1,null,null,null).exports;var x=s(419),w=s(2242);function C(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),s.push.apply(s,r)}return s}function k(e){for(var t=1;t0?this.refundables.map((function(e){return parseFloat(e.unit_price)*parseFloat(e.quantity)})).reduce((function(e,t){return e+t}))+this.shippingFees:0+this.shippingFees},shippingFees:function(){return this.refundShipping?this.order.shipping:0}},data:function(){return{isSubmitting:!1,formValidation:new a.Z,refundables:[],paymentOptions:[],paymentField:[],refundShipping:!1,selectedPaymentGateway:!1,screen:0,selectFields:[{type:"select",options:this.order.products.map((function(e){return{label:"".concat(e.name," - ").concat(e.unit.name," (x").concat(e.quantity,")"),value:e.id}})),validation:"required",name:"product_id",label:(0,l.__)("Product"),description:(0,l.__)("Select the product to perform a refund.")}]}},methods:{__:l.__,updateScreen:function(e){this.screen=e},toggleRefundShipping:function(e){this.refundShipping=e,this.refundShipping},proceedPayment:function(){var e=this;return!1===this.selectedPaymentGateway?r.kX.error((0,l.__)("Please select a payment gateway before proceeding.")).subscribe():0===this.total?r.kX.error((0,l.__)("There is nothing to refund.")).subscribe():0===this.screenValue?r.kX.error((0,l.__)("Please provide a valid payment amount.")).subscribe():void w.G.show(x.Z,{title:(0,l.__)("Confirm Your Action"),message:(0,l.__)("The refund will be made on the current order."),onAction:function(t){t&&e.doProceed()}})},doProceed:function(){var e=this,t={products:this.refundables,total:this.screenValue,payment:this.selectedPaymentGateway,refund_shipping:this.refundShipping};this.isSubmitting=!0,r.ih.post("/api/nexopos/v4/orders/".concat(this.order.id,"/refund"),t).subscribe({next:function(t){e.isSubmitting=!1,e.$emit("changed",!0),r.kX.success(t.message).subscribe()},error:function(t){e.isSubmitting=!1,r.kX.error(t.message).subscribe()}})},addProduct:function(){var e=this;if(this.formValidation.validateFields(this.selectFields),!this.formValidation.fieldsValid(this.selectFields))return r.kX.error((0,l.__)("Please select a product before proceeding.")).subscribe();var t=this.formValidation.extractFields(this.selectFields),s=this.order.products.filter((function(e){return e.id===t.product_id})),n=this.refundables.filter((function(e){return e.id===t.product_id}));if(n.length>0&&n.map((function(e){return parseInt(e.quantity)})).reduce((function(e,t){return e+t}))===s[0].quantity)return r.kX.error((0,l.__)("Not enough quantity to proceed.")).subscribe();if(0===s[0].quantity)return r.kX.error((0,l.__)("Not enough quantity to proceed.")).subscribe();var i=k(k({},s[0]),{condition:"",description:""});new Promise((function(e,t){w.G.show(v,{resolve:e,reject:t,product:i})})).then((function(t){t.quantity=e.getProductOriginalQuantity(t.id)-e.getProductUsedQuantity(t.id),e.refundables.push(t)}),(function(e){return e}))},getProductOriginalQuantity:function(e){var t=this.order.products.filter((function(t){return t.id===e}));return t.length>0?t.map((function(e){return parseFloat(e.quantity)})).reduce((function(e,t){return e+t})):0},getProductUsedQuantity:function(e){var t=this.refundables.filter((function(t){return t.id===e}));return t.length>0?t.map((function(e){return parseFloat(e.quantity)})).reduce((function(e,t){return e+t})):0},openSettings:function(e){var t=this;new Promise((function(t,s){w.G.show(v,{resolve:t,reject:s,product:e})})).then((function(s){var r=t.refundables.indexOf(e);t.$set(t.refundables,r,s)}),(function(e){return e}))},selectPaymentGateway:function(){var e=this;new Promise((function(t,s){w.G.show(g,k({resolve:t,reject:s,value:[e.selectedPaymentOption]},e.paymentField[0]))})).then((function(t){e.selectedPaymentGateway=t[0]}),(function(e){return e}))},changeQuantity:function(e){var t=this;new Promise((function(s,r){var n=t.getProductOriginalQuantity(e.id)-t.getProductUsedQuantity(e.id)+parseFloat(e.quantity);w.G.show(m,{resolve:s,reject:r,product:e,availableQuantity:n})})).then((function(s){if(s.quantity>t.getProductUsedQuantity(e.id)-e.quantity){var r=t.refundables.indexOf(e);t.$set(t.refundables,r,s)}}))},deleteProduct:function(e){var t=this;new Promise((function(s,r){w.G.show(x.Z,{title:(0,l.__)("Confirm Your Action"),message:(0,l.__)("Would you like to delete this product ?"),onAction:function(s){if(s){var r=t.refundables.indexOf(e);t.refundables.splice(r,1)}}})}))}},mounted:function(){var e=this;this.selectFields=this.formValidation.createFields(this.selectFields),r.ih.get("/api/nexopos/v4/orders/payments").subscribe((function(t){e.paymentField=t}))}};const S=(0,f.Z)(P,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"-m-4 flex-auto flex flex-wrap relative"},[e.isSubmitting?s("div",{staticClass:"bg-overlay h-full w-full flex items-center justify-center absolute z-30"},[s("ns-spinner")],1):e._e(),e._v(" "),s("div",{staticClass:"px-4 w-full lg:w-1/2"},[s("h3",{staticClass:"py-2 border-b-2 text-gray-700 border-blue-400"},[e._v(e._s(e.__("Refund With Products")))]),e._v(" "),s("div",{staticClass:"my-2"},[s("ul",[s("li",{staticClass:"border-b border-blue-400 flex justify-between items-center mb-2"},[s("div",{staticClass:"flex-auto flex-col flex"},[s("div",{staticClass:"p-2 flex"},e._l(e.selectFields,(function(e,t){return s("ns-field",{key:t,attrs:{field:e}})})),1),e._v(" "),s("div",{staticClass:"flex justify-between p-2"},[s("div",{staticClass:"flex items-center text-gray-700"},[e.order.shipping>0?s("span",{staticClass:"mr-2"},[e._v(e._s(e.__("Refund Shipping")))]):e._e(),e._v(" "),e.order.shipping>0?s("ns-checkbox",{attrs:{checked:e.refundShipping},on:{change:function(t){return e.toggleRefundShipping(t)}}}):e._e()],1),e._v(" "),s("div",[s("button",{staticClass:"border-2 rounded-full border-gray-200 px-2 py-1 hover:bg-blue-400 hover:text-white text-gray-700",on:{click:function(t){return e.addProduct()}}},[e._v(e._s(e.__("Add Product")))])])])])]),e._v(" "),s("li",[s("h4",{staticClass:"py-1 border-b-2 text-gray-700 border-blue-400"},[e._v(e._s(e.__("Products")))])]),e._v(" "),e._l(e.refundables,(function(t){return s("li",{key:t.id,staticClass:"bg-gray-100 border-b border-blue-400 flex justify-between items-center mb-2"},[s("div",{staticClass:"px-2 text-gray-700 flex justify-between flex-auto"},[s("div",{staticClass:"flex flex-col"},[s("p",{staticClass:"py-2"},[s("span",[e._v(e._s(t.name))]),e._v(" "),"damaged"===t.condition?s("span",{staticClass:"rounded-full px-2 py-1 text-xs bg-red-400 mx-2 text-white"},[e._v(e._s(e.__("Damaged")))]):e._e(),e._v(" "),"unspoiled"===t.condition?s("span",{staticClass:"rounded-full px-2 py-1 text-xs bg-green-400 mx-2 text-white"},[e._v(e._s(e.__("Unspoiled")))]):e._e()]),e._v(" "),s("small",[e._v(e._s(t.unit.name))])]),e._v(" "),s("div",{staticClass:"flex items-center justify-center"},[s("span",{staticClass:"py-1 flex items-center cursor-pointer border-b border-dashed border-blue-400"},[e._v(e._s(e._f("currency")(t.unit_price*t.quantity)))])])]),e._v(" "),s("div",{staticClass:"flex"},[s("p",{staticClass:"p-2 border-l border-blue-400 cursor-pointer text-gray-600 hover:bg-blue-100 w-16 h-16 flex items-center justify-center",on:{click:function(s){return e.openSettings(t)}}},[s("i",{staticClass:"las la-cog text-xl"})]),e._v(" "),s("p",{staticClass:"p-2 border-l border-blue-400 cursor-pointer text-gray-600 hover:bg-blue-100 w-16 h-16 flex items-center justify-center",on:{click:function(s){return e.deleteProduct(t)}}},[s("i",{staticClass:"las la-trash"})]),e._v(" "),s("p",{staticClass:"p-2 border-l border-blue-400 cursor-pointer text-gray-600 hover:bg-blue-100 w-16 h-16 flex items-center justify-center",on:{click:function(s){return e.changeQuantity(t)}}},[e._v(e._s(t.quantity))])])])}))],2)])]),e._v(" "),s("div",{staticClass:"px-4 w-full lg:w-1/2"},[s("h3",{staticClass:"py-2 border-b-2 text-gray-700 border-blue-400"},[e._v(e._s(e.__("Summary")))]),e._v(" "),s("div",{staticClass:"py-2"},[s("div",{staticClass:"bg-blue-400 text-white font-semibold flex mb-2 p-2 justify-between"},[s("span",[e._v(e._s(e.__("Total")))]),e._v(" "),s("span",[e._v(e._s(e._f("currency")(e.total)))])]),e._v(" "),s("div",{staticClass:"bg-teal-400 text-white font-semibold flex mb-2 p-2 justify-between"},[s("span",[e._v(e._s(e.__("Paid")))]),e._v(" "),s("span",[e._v(e._s(e._f("currency")(e.order.tendered)))])]),e._v(" "),s("div",{staticClass:"bg-indigo-400 text-white font-semibold flex mb-2 p-2 justify-between cursor-pointer",on:{click:function(t){return e.selectPaymentGateway()}}},[s("span",[e._v(e._s(e.__("Payment Gateway")))]),e._v(" "),s("span",[e._v(e._s(e.selectedPaymentGateway?e.selectedPaymentGateway.label:"N/A"))])]),e._v(" "),s("div",{staticClass:"bg-gray-300 text-gray-900 font-semibold flex mb-2 p-2 justify-between"},[s("span",[e._v(e._s(e.__("Screen")))]),e._v(" "),s("span",[e._v(e._s(e._f("currency")(e.screenValue)))])]),e._v(" "),s("div",[s("ns-numpad",{attrs:{currency:!0,value:e.screen},on:{changed:function(t){return e.updateScreen(t)},next:function(t){return e.proceedPayment(t)}}})],1)])])])}),[],!1,null,null,null).exports;var O=s(1596);function $(e,t){for(var s=0;s0?t[0].label:(0,l.__)("Unknown Status")}},{key:"getDeliveryStatus",value:function(e){var t=deliveryStatuses.filter((function(t){return t.value===e}));return t.length>0?t[0].label:(0,l.__)("Unknown Status")}},{key:"getProcessingStatus",value:function(e){var t=processingStatuses.filter((function(t){return t.value===e}));return t.length>0?t[0].label:(0,l.__)("Unknown Status")}},{key:"getPaymentStatus",value:function(e){var t=paymentLabels.filter((function(t){return t.value===e}));return t.length>0?t[0].label:(0,l.__)("Unknown Status")}}])&&$(t.prototype,s),r&&$(t,r),e}();function E(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),s.push.apply(s,r)}return s}function V(e){for(var t=1;t0?s("span",[e._v(e._s(e._f("currency")(e.order.total-e.order.tendered)))]):e._e(),e._v(" "),e.order.total-e.order.tendered<=0?s("span",[e._v(e._s(e._f("currency")(0)))]):e._e()])]),e._v(" "),s("div",{staticClass:"px-2 w-full md:w-1/2"},[s("div",{staticClass:"my-1 h-12 py-1 px-2 flex justify-between items-center bg-teal-400 text-white text-xl font-bold"},[s("span",[e._v(e._s(e.__("Customer Account")))]),e._v(" "),s("span",[e._v(e._s(e._f("currency")(e.order.customer.account_amount)))])])])]),e._v(" "),s("div",{staticClass:"flex -mx-4 flex-wrap"},[s("div",{staticClass:"px-2 w-full mb-4 md:w-1/2"},["paid"!==e.order.payment_status?s("div",[s("h3",{staticClass:"font-semibold border-b-2 border-blue-400 py-2"},[e._v("\n "+e._s(e.__("Payment"))+"\n ")]),e._v(" "),s("div",{staticClass:"py-2"},[e._l(e.fields,(function(e,t){return s("ns-field",{key:t,attrs:{field:e}})})),e._v(" "),s("div",{staticClass:"my-2 px-2 h-12 flex justify-end items-center bg-gray-200"},[e._v("\n "+e._s(e._f("currency")(e.inputValue))+"\n ")]),e._v(" "),s("ns-numpad",{attrs:{floating:!0,value:e.inputValue},on:{next:function(t){return e.submitPayment(t)},changed:function(t){return e.updateValue(t)}}})],2)]):e._e(),e._v(" "),"paid"===e.order.payment_status?s("div",{staticClass:"flex items-center justify-center h-full"},[s("h3",{staticClass:"text-gray-700 font-semibold"},[e._v(e._s(e.__("No payment possible for paid order.")))])]):e._e()]),e._v(" "),s("div",{staticClass:"px-2 w-full mb-4 md:w-1/2"},[s("h3",{staticClass:"font-semibold border-b-2 border-blue-400 py-2 mb-2"},[e._v("\n "+e._s(e.__("Payment History"))+"\n ")]),e._v(" "),s("ul",e._l(e.order.payments,(function(t){return s("li",{key:t.id,staticClass:"p-2 flex items-center justify-between text-shite bg-gray-300 mb-2"},[s("span",[e._v(e._s(t.identifier))]),e._v(" "),s("span",[e._v(e._s(e._f("currency")(t.value)))])])})),0)])])])}),[],!1,null,null,null).exports;const T={props:["order"],data:function(){return{processingStatuses,deliveryStatuses,labels:new A,showProcessingSelect:!1,showDeliverySelect:!1}},mounted:function(){},methods:{__:l.__,submitProcessingChange:function(){var e=this;w.G.show(x.Z,{title:(0,l.__)("Would you proceed ?"),message:(0,l.__)("The processing status of the order will be changed. Please confirm your action."),onAction:function(t){t&&r.ih.post("/api/nexopos/v4/orders/".concat(e.order.id,"/processing"),{process_status:e.order.process_status}).subscribe((function(t){e.showProcessingSelect=!1,r.kX.success(t.message).subscribe()}),(function(e){r.kX.error(e.message||(0,l.__)("Unexpected error occured.")).subscribe()}))}})},submitDeliveryStatus:function(){var e=this;w.G.show(x.Z,{title:(0,l.__)("Would you proceed ?"),message:(0,l.__)("The delivery status of the order will be changed. Please confirm your action."),onAction:function(t){t&&r.ih.post("/api/nexopos/v4/orders/".concat(e.order.id,"/delivery"),{delivery_status:e.order.delivery_status}).subscribe((function(t){e.showDeliverySelect=!1,r.kX.success(t.message).subscribe()}),(function(e){r.kX.error(e.message||(0,l.__)("Unexpected error occured.")).subscribe()}))}})}}};const D=(0,f.Z)(T,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"-mx-4 flex flex-wrap"},[s("div",{staticClass:"flex-auto"},[s("div",{staticClass:"w-full mb-2 flex-wrap flex"},[s("div",{staticClass:"w-full mb-2 px-4"},[s("h3",{staticClass:"font-semibold text-gray-800 pb-2 border-b border-blue-400"},[e._v(e._s(e.__("Payment Summary")))])]),e._v(" "),s("div",{staticClass:"mb-2 w-full md:w-1/2 px-4"},[s("div",{staticClass:"bg-gray-200 p-2 flex justify-between items-start"},[s("div",[s("h4",{staticClass:"text-semibold text-gray-700"},[e._v(e._s(e.__("Sub Total")))])]),e._v(" "),s("div",{staticClass:"font-semibold text-gray-800"},[e._v(e._s(e._f("currency")(e.order.subtotal)))])])]),e._v(" "),s("div",{staticClass:"mb-2 w-full md:w-1/2 px-4"},[s("div",{staticClass:"p-2 flex justify-between items-start bg-red-400 text-white"},[s("div",[s("h4",{staticClass:"text-semibold"},[s("span",[e._v(e._s(e.__("Discount")))]),e._v(" "),"percentage"===e.order.discount_type?s("span",{staticClass:"ml-1"},[e._v("("+e._s(e.order.discount_percentage)+"%)")]):e._e(),e._v(" "),"flat"===e.order.discount_type?s("span",{staticClass:"ml-1"},[e._v("(Flat)")]):e._e()])]),e._v(" "),s("div",{staticClass:"font-semibold"},[e._v(e._s(e._f("currency")(e.order.discount)))])])]),e._v(" "),s("div",{staticClass:"mb-2 w-full md:w-1/2 px-4"},[s("div",{staticClass:"p-2 flex justify-between items-start bg-gray-100"},[s("div",[s("h4",{staticClass:"text-semibold text-gray-700"},[e._v(e._s(e.__("Shipping")))])]),e._v(" "),s("div",{staticClass:"font-semibold text-gray-800"},[e._v(e._s(e._f("currency")(e.order.shipping)))])])]),e._v(" "),s("div",{staticClass:"mb-2 w-full md:w-1/2 px-4"},[s("div",{staticClass:"p-2 flex justify-between items-start bg-red-400 text-white"},[s("div",[s("h4",{staticClass:"text-semibold"},[s("span",[e._v(e._s(e.__("Coupons")))])])]),e._v(" "),s("div",{staticClass:"font-semibold"},[e._v(e._s(e._f("currency")(e.order.total_coupons)))])])]),e._v(" "),s("div",{staticClass:"mb-2 w-full md:w-1/2 px-4"},[s("div",{staticClass:"p-2 flex justify-between items-start bg-blue-400 text-white"},[s("div",[s("h4",{staticClass:"text-semibold"},[e._v(e._s(e.__("Total")))])]),e._v(" "),s("div",{staticClass:"font-semibold"},[e._v(e._s(e._f("currency")(e.order.total)))])])]),e._v(" "),s("div",{staticClass:"mb-2 w-full md:w-1/2 px-4"},[s("div",{staticClass:"p-2 flex justify-between items-start bg-yellow-400 text-gray-700"},[s("div",[s("h4",{staticClass:"text-semibold "},[e._v(e._s(e.__("Taxes")))])]),e._v(" "),s("div",{staticClass:"font-semibold"},[e._v(e._s(e._f("currency")(e.order.tax_value)))])])]),e._v(" "),s("div",{staticClass:"mb-2 w-full md:w-1/2 px-4"},[s("div",{staticClass:"p-2 flex justify-between items-start text-gray-700 bg-gray-100"},[s("div",[s("h4",{staticClass:"text-semibold"},[e._v(e._s(e.__("Change")))])]),e._v(" "),s("div",{staticClass:"font-semibold"},[e._v(e._s(e._f("currency")(e.order.change)))])])]),e._v(" "),s("div",{staticClass:"mb-2 w-full md:w-1/2 px-4"},[s("div",{staticClass:"p-2 flex justify-between items-start bg-teal-500 text-white"},[s("div",[s("h4",{staticClass:"text-semibold"},[e._v(e._s(e.__("Paid")))])]),e._v(" "),s("div",{staticClass:"font-semibold"},[e._v(e._s(e._f("currency")(e.order.tendered)))])])])])]),e._v(" "),s("div",{staticClass:"px-4 w-full md:w-1/2 lg:w-2/4 mb-2"},[s("div",{staticClass:"mb-2"},[s("h3",{staticClass:"font-semibold text-gray-800 pb-2 border-b border-blue-400"},[e._v(e._s(e.__("Order Status")))])]),e._v(" "),s("div",{staticClass:"mb-2 p-2 flex justify-between items-start bg-gray-200"},[s("div",[s("h4",{staticClass:"text-semibold text-gray-700"},[s("span",[e._v(e._s(e.__("Customer")))])])]),e._v(" "),s("div",{staticClass:"font-semibold text-gray-800"},[e._v(e._s(e.order.nexopos_customers_name))])]),e._v(" "),s("div",{staticClass:"mb-2 p-2 flex justify-between items-start bg-gray-200"},[s("div",[s("h4",{staticClass:"text-semibold text-gray-700"},[s("span",[e._v(e._s(e.__("Type")))])])]),e._v(" "),s("div",{staticClass:"font-semibold text-gray-800"},[e._v(e._s(e.labels.getTypeLabel(e.order.type)))])]),e._v(" "),s("div",{staticClass:"mb-2 p-2 flex justify-between items-start bg-gray-200"},[s("div",[s("h4",{staticClass:"text-semibold text-gray-700"},[s("span",[e._v(e._s(e.__("Delivery Status")))])])]),e._v(" "),s("div",{staticClass:"font-semibold text-gray-800 mt-2 md:mt-0 w-full md:w-auto"},[s("div",{staticClass:"w-full text-center"},[e.showDeliverySelect?e._e():s("span",{staticClass:"font-semibold text-gray-800 border-b border-blue-400 cursor-pointer border-dashed",on:{click:function(t){e.showDeliverySelect=!0}}},[e._v(e._s(e.labels.getDeliveryStatus(e.order.delivery_status)))])]),e._v(" "),e.showDeliverySelect?s("div",{staticClass:"flex-auto flex"},[s("select",{directives:[{name:"model",rawName:"v-model",value:e.order.delivery_status,expression:"order.delivery_status"}],ref:"process_status",staticClass:"flex-auto border-blue-400 rounded-lg",on:{change:function(t){var s=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(e.order,"delivery_status",t.target.multiple?s:s[0])}}},e._l(e.deliveryStatuses,(function(t,r){return s("option",{key:r,domProps:{value:t.value}},[e._v(e._s(t.label))])})),0),e._v(" "),s("div",{staticClass:"pl-2 flex"},[s("ns-close-button",{on:{click:function(t){e.showDeliverySelect=!1}}}),e._v(" "),s("button",{staticClass:"bg-green-400 text-white rounded-full px-2 py-1",on:{click:function(t){return e.submitDeliveryStatus(e.order)}}},[e._v(e._s(e.__("Save")))])],1)]):e._e()])]),e._v(" "),s("div",{staticClass:"mb-2 p-2 flex flex-col md:flex-row justify-between items-center bg-gray-200"},[s("div",[s("h4",{staticClass:"text-semibold text-gray-700"},[s("span",[e._v(e._s(e.__("Processing Status")))])])]),e._v(" "),s("div",{staticClass:"font-semibold text-gray-800 mt-2 md:mt-0 w-full md:w-auto"},[s("div",{staticClass:"w-full text-center"},[e.showProcessingSelect?e._e():s("span",{staticClass:"border-b border-blue-400 cursor-pointer border-dashed",on:{click:function(t){e.showProcessingSelect=!0}}},[e._v(e._s(e.labels.getProcessingStatus(e.order.process_status)))])]),e._v(" "),e.showProcessingSelect?s("div",{staticClass:"flex-auto flex"},[s("select",{directives:[{name:"model",rawName:"v-model",value:e.order.process_status,expression:"order.process_status"}],ref:"process_status",staticClass:"flex-auto border-blue-400 rounded-lg",on:{change:function(t){var s=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(e.order,"process_status",t.target.multiple?s:s[0])}}},e._l(e.processingStatuses,(function(t,r){return s("option",{key:r,domProps:{value:t.value}},[e._v(e._s(t.label))])})),0),e._v(" "),s("div",{staticClass:"pl-2 flex"},[s("ns-close-button",{on:{click:function(t){e.showProcessingSelect=!1}}}),e._v(" "),s("button",{staticClass:"bg-green-400 text-white rounded-full px-2 py-1",on:{click:function(t){return e.submitProcessingChange(e.order)}}},[e._v(e._s(e.__("Save")))])],1)]):e._e()])]),e._v(" "),s("div",{staticClass:"mb-2 p-2 flex justify-between items-start bg-gray-200"},[s("div",[s("h4",{staticClass:"text-semibold text-gray-700"},[s("span",[e._v(e._s(e.__("Payment Status")))])])]),e._v(" "),s("div",{staticClass:"font-semibold text-gray-800"},[e._v(e._s(e.labels.getPaymentStatus(e.order.payment_status)))])])]),e._v(" "),s("div",{staticClass:"px-4 w-full md:w-1/2 lg:w-2/4 mb-2"},[s("div",{staticClass:"mb-2"},[s("h3",{staticClass:"font-semibold text-gray-800 pb-2 border-b border-blue-400"},[e._v(e._s(e.__("Products")))])]),e._v(" "),e._l(e.order.products,(function(t){return s("div",{key:t.id,staticClass:"p-2 flex justify-between items-start bg-gray-200 mb-2"},[s("div",[s("h4",{staticClass:"text-semibold text-gray-700"},[e._v(e._s(t.name)+" (x"+e._s(t.quantity)+")")]),e._v(" "),s("p",{staticClass:"text-gray-600 text-sm"},[e._v(e._s(t.unit.name||"N/A"))])]),e._v(" "),s("div",{staticClass:"font-semibold text-gray-800"},[e._v(e._s(e._f("currency")(t.total_price)))])])})),e._v(" "),s("div",{staticClass:"mb-2"},[s("h3",{staticClass:"font-semibold text-gray-800 pb-2 border-b border-blue-400"},[e._v(e._s(e.__("Refunded Products")))])]),e._v(" "),e._l(e.order.refunded_products,(function(t){return s("div",{key:t.id,staticClass:"p-2 flex justify-between items-start bg-gray-200 mb-2"},[s("div",[s("h4",{staticClass:"text-semibold text-gray-700"},[e._v(e._s(t.product.name)+" (x"+e._s(t.quantity)+")")]),e._v(" "),s("p",{staticClass:"text-gray-600 text-sm"},[e._v(e._s(t.unit.name||"N/A")+" | "),s("span",{staticClass:"rounded-full px-2",class:"damaged"===t.condition?"bg-red-400 text-white":"bg-blue-400 text-white"},[e._v(e._s(t.condition))])])]),e._v(" "),s("div",{staticClass:"font-semibold text-gray-800"},[e._v(e._s(e._f("currency")(t.total_price)))])])}))],2)])}),[],!1,null,null,null).exports;const z={props:["order"],name:"ns-order-instalments",data:function(){return{labels:new A,original:[],instalments:[]}},mounted:function(){this.loadInstalments()},computed:{totalInstalments:function(){return this.instalments.length>0?this.instalments.map((function(e){return e.amount})).reduce((function(e,t){return parseFloat(e)+parseFloat(t)})):0}},methods:{__:l.__,loadInstalments:function(){var e=this;r.ih.get("/api/nexopos/v4/orders/".concat(this.order.id,"/instalments")).subscribe((function(t){e.original=t,e.instalments=t.map((function(e){return e.price_clicked=!1,e.date_clicked=!1,e.date=moment(e.date).format("YYYY-MM-DD"),e}))}))},addInstalment:function(){this.instalments.push({date:ns.date.moment.format("YYYY-MM-DD"),amount:this.order.total-this.totalInstalments,paid:!1})},createInstalment:function(e){var t=this;Popup.show(x.Z,{title:(0,l.__)("Confirm Your Action"),message:(0,l.__)("Would you like to create this instalment ?"),onAction:function(s){s&&r.ih.post("/api/nexopos/v4/orders/".concat(t.order.id,"/instalments"),{instalment:e}).subscribe((function(e){t.loadInstalments(),r.kX.success(e.message).subscribe()}),(function(e){r.kX.error(e.message||(0,l.__)("An unexpected error has occured")).subscribe()}))}})},deleteInstalment:function(e){var t=this;Popup.show(x.Z,{title:(0,l.__)("Confirm Your Action"),message:(0,l.__)("Would you like to delete this instalment ?"),onAction:function(s){s&&r.ih.delete("/api/nexopos/v4/orders/".concat(t.order.id,"/instalments/").concat(e.id)).subscribe((function(s){var n=t.instalments.indexOf(e);t.instalments.splice(n,1),r.kX.success(s.message).subscribe()}),(function(e){r.kX.error(e.message||(0,l.__)("An unexpected error has occured")).subscribe()}))}})},markAsPaid:function(e){var t=this;Popup.show(x.Z,{title:(0,l.__)("Confirm Your Action"),message:(0,l.__)("Would you like to make this as paid ?"),onAction:function(s){s&&r.ih.get("/api/nexopos/v4/orders/".concat(t.order.id,"/instalments/").concat(e.id,"/paid")).subscribe((function(e){t.loadInstalments(),r.kX.success(e.message).subscribe()}),(function(e){r.kX.error(e.message||(0,l.__)("An unexpected error has occured")).subscribe()}))}})},togglePriceEdition:function(e){var t=this;e.paid||(e.price_clicked=!e.price_clicked,this.$forceUpdate(),e.price_clicked&&setTimeout((function(){t.$refs.amount[0].select()}),100))},updateInstalment:function(e){var t=this;Popup.show(x.Z,{title:(0,l.__)("Confirm Your Action"),message:(0,l.__)("Would you like to update that instalment ?"),onAction:function(s){s&&r.ih.put("/api/nexopos/v4/orders/".concat(t.order.id,"/instalments/").concat(e.id),{instalment:e}).subscribe((function(e){r.kX.success(e.message).subscribe()}),(function(e){r.kX.error(e.message||(0,l.__)("An unexpected error has occured")).subscribe()}))}})},toggleDateEdition:function(e){var t=this;e.paid||(e.date_clicked=!e.date_clicked,this.$forceUpdate(),e.date_clicked&&setTimeout((function(){t.$refs.date[0].select()}),200))}}};const I=(0,f.Z)(z,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"-mx-4 flex-auto flex flex-wrap"},[s("div",{staticClass:"flex flex-auto"},[s("div",{staticClass:"w-full mb-2 flex-wrap"},[s("div",{staticClass:"w-full mb-2 px-4"},[s("h3",{staticClass:"font-semibold text-gray-800 pb-2 border-b border-blue-400"},[e._v(e._s(e.__("Instalments")))])]),e._v(" "),s("div",{staticClass:"px-4"},[s("ul",{staticClass:"border-gray-400 border-t text-gray-700"},[e._l(e.instalments,(function(t){return s("li",{key:t.id,staticClass:"border-b border-l flex justify-between",class:t.paid?"bg-green-200 border-green-400":"bg-gray-200 border-blue-400"},[s("span",{staticClass:"p-2"},[t.date_clicked?e._e():s("span",{on:{click:function(s){return e.toggleDateEdition(t)}}},[e._v(e._s(t.date))]),e._v(" "),t.date_clicked?s("span",[s("input",{directives:[{name:"model",rawName:"v-model",value:t.date,expression:"instalment.date"}],ref:"date",refInFor:!0,staticClass:"border border-blue-400 rounded",attrs:{type:"date"},domProps:{value:t.date},on:{blur:function(s){return e.toggleDateEdition(t)},input:function(s){s.target.composing||e.$set(t,"date",s.target.value)}}})]):e._e()]),e._v(" "),s("div",{staticClass:"flex items-center"},[s("span",{staticClass:"flex items-center px-2 h-full border-r",class:t.paid?"border-green-400":"border-blue-400"},[t.price_clicked?e._e():s("span",{on:{click:function(s){return e.togglePriceEdition(t)}}},[e._v(e._s(e._f("currency")(t.amount)))]),e._v(" "),t.price_clicked?s("span",[s("input",{directives:[{name:"model",rawName:"v-model",value:t.amount,expression:"instalment.amount"}],ref:"amount",refInFor:!0,staticClass:"border border-blue-400 p-1",attrs:{type:"text"},domProps:{value:t.amount},on:{blur:function(s){return e.togglePriceEdition(t)},input:function(s){s.target.composing||e.$set(t,"amount",s.target.value)}}})]):e._e()]),e._v(" "),!t.paid&&t.id?s("div",{staticClass:"w-36 justify-center flex items-center px-2 h-full border-r",class:t.paid?"border-green-400":"border-blue-400"},[s("div",{staticClass:"px-2"},[s("ns-icon-button",{attrs:{buttonClass:"bg-green-400 hover:bg-green-500 text-white hover:text-white hover:border-green-600",className:"la-money-bill-wave-alt"},on:{click:function(s){return e.markAsPaid(t)}}})],1),e._v(" "),s("div",{staticClass:"px-2"},[s("ns-icon-button",{attrs:{buttonClass:"bg-blue-400 hover:bg-blue-500 text-white hover:text-white hover:border-blue-600",className:"la-save"},on:{click:function(s){return e.updateInstalment(t)}}})],1),e._v(" "),s("div",{staticClass:"px-2"},[s("ns-icon-button",{attrs:{buttonClass:"bg-red-400 text-white hover:border hover:border-blue-400 hover:bg-red-500",className:"la-trash-alt"},on:{click:function(s){return e.deleteInstalment(t)}}})],1)]):e._e(),e._v(" "),t.paid||t.id?e._e():s("div",{staticClass:"w-36 justify-center flex items-center px-2 h-full border-r",class:t.paid?"border-green-400":"border-blue-400"},[s("div",{staticClass:"px-2"},[s("button",{staticClass:"px-3 py-1 rounded-full bg-blue-400 text-white",on:{click:function(s){return e.createInstalment(t)}}},[s("i",{staticClass:"las la-plus"}),e._v("\n "+e._s(e.__("Create"))+"\n ")])])]),e._v(" "),t.paid?s("span",{staticClass:"w-36 border-green-400 justify-center flex items-center px-2 h-full border-r"},[e._v("\n "+e._s(e.__("Paid"))+"\n ")]):e._e()])])})),e._v(" "),s("li",{staticClass:"flex justify-between p-2 bg-gray-200 border-r border-b border-l border-gray-400"},[s("div",{staticClass:"flex items-center justify-center"},[s("span",[e._v("\n "+e._s(e.__("Total :"))+" "+e._s(e._f("currency")(e.order.total))+"\n ")]),e._v(" "),s("span",{staticClass:"ml-1 text-sm"},[e._v("\n ("+e._s(e.__("Remaining :"))+" "+e._s(e._f("currency")(e.order.total-e.totalInstalments))+")\n ")])]),e._v(" "),s("div",{staticClass:"-mx-2 flex flex-wrap items-center"},[s("span",{staticClass:"px-2"},[e._v("\n "+e._s(e.__("Instalments:"))+" "+e._s(e._f("currency")(e.totalInstalments))+"\n ")]),e._v(" "),s("span",{staticClass:"px-2"},[s("button",{staticClass:"rounded-full px-3 py-1 bg-blue-400 text-white",on:{click:function(t){return e.addInstalment()}}},[e._v(e._s(e.__("Add Instalment")))])])])])],2)])])])])}),[],!1,null,null,null).exports;var R={filters:{nsCurrency:n.W},name:"ns-preview-popup",data:function(){return{active:"details",order:new Object,products:[],payments:[]}},components:{nsOrderRefund:S,nsOrderPayment:Z,nsOrderDetails:D,nsOrderInstalments:I},computed:{isVoidable:function(){return["paid","partially_paid","unpaid"].includes(this.order.payment_status)},isDeleteAble:function(){return["hold"].includes(this.order.payment_status)}},methods:{__:l.__,closePopup:function(){this.$popup.close()},setActive:function(e){this.active=e},refresh:function(){this.$popupParams.component.$emit("updated"),this.loadOrderDetails(this.$popupParams.order.id)},printOrder:function(){var e=this.$popupParams.order;r.ih.get("/api/nexopos/v4/orders/".concat(e.id,"/print/receipt")).subscribe((function(e){r.kX.success(e.message).subscribe()}))},loadOrderDetails:function(e){var t=this;(0,i.D)([r.ih.get("/api/nexopos/v4/orders/".concat(e)),r.ih.get("/api/nexopos/v4/orders/".concat(e,"/products")),r.ih.get("/api/nexopos/v4/orders/".concat(e,"/payments"))]).subscribe((function(e){t.order=e[0],t.products=e[1],t.payments=e[2]}))},deleteOrder:function(){var e=this;Popup.show(x.Z,{title:(0,l.__)("Confirm Your Action"),message:(0,l.__)("Would you like to delete this order"),onAction:function(t){t&&r.ih.delete("/api/nexopos/v4/orders/".concat(e.$popupParams.order.id)).subscribe((function(t){r.kX.success(t.message).subscribe(),e.refreshCrudTable(),e.closePopup()}),(function(e){r.kX.error(e.message).subscribe()}))}})},voidOrder:function(){var e=this;Popup.show(O.Z,{title:(0,l.__)("Confirm Your Action"),message:(0,l.__)("The current order will be void. This action will be recorded. Consider providing a reason for this operation"),onAction:function(t){!1!==t&&r.ih.post("/api/nexopos/v4/orders/".concat(e.$popupParams.order.id,"/void"),{reason:t}).subscribe((function(t){r.kX.success(t.message).subscribe(),e.refreshCrudTable(),e.closePopup()}),(function(e){r.kX.error(e.message).subscribe()}))}})},refreshCrudTable:function(){this.$popupParams.component.$emit("updated",!0)}},watch:{active:function(){"details"===this.active&&this.loadOrderDetails(this.$popupParams.order.id)}},mounted:function(){var e=this;this.loadOrderDetails(this.$popupParams.order.id),this.$popup.event.subscribe((function(t){"click-overlay"===t.event&&e.$popup.close()}))}};window.nsOrderPreviewPopup=R;const X=R;const Q=(0,f.Z)(X,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"h-95vh w-95vw md:h-6/7-screen md:w-6/7-screen overflow-hidden shadow-xl bg-white flex flex-col"},[s("div",{staticClass:"border-b border-gray-300 p-3 flex items-center justify-between"},[s("div",[s("h3",[e._v(e._s(e.__("Order Options")))])]),e._v(" "),s("div",[s("ns-close-button",{on:{click:function(t){return e.closePopup()}}})],1)]),e._v(" "),s("div",{staticClass:"p-2 overflow-scroll bg-gray-100 flex flex-auto"},[e.order.id?s("ns-tabs",{attrs:{active:e.active},on:{active:function(t){return e.setActive(t)}}},[s("ns-tabs-item",{staticClass:"overflow-y-auto",attrs:{label:e.__("Details"),identifier:"details"}},[s("ns-order-details",{attrs:{order:e.order}})],1),e._v(" "),["order_void","hold","refunded","partially_refunded"].includes(e.order.payment_status)?e._e():s("ns-tabs-item",{staticClass:"overflow-y-auto",attrs:{label:e.__("Payments"),identifier:"payments"}},[s("ns-order-payment",{attrs:{order:e.order},on:{changed:function(t){return e.refresh()}}})],1),e._v(" "),["order_void","hold","refunded"].includes(e.order.payment_status)?e._e():s("ns-tabs-item",{staticClass:"flex overflow-y-auto",attrs:{label:e.__("Refund & Return"),identifier:"refund"}},[s("ns-order-refund",{attrs:{order:e.order},on:{changed:function(t){return e.refresh()}}})],1),e._v(" "),["partially_paid"].includes(e.order.payment_status)?s("ns-tabs-item",{staticClass:"flex overflow-y-auto",attrs:{label:e.__("Installments"),identifier:"instalments"}},[s("ns-order-instalments",{attrs:{order:e.order},on:{changed:function(t){return e.refresh()}}})],1):e._e()],1):e._e(),e._v(" "),e.order.id?e._e():s("div",{staticClass:"h-full w-full flex items-center justify-center"},[s("ns-spinner")],1)],1),e._v(" "),s("div",{staticClass:"p-2 flex justify-between border-t border-gray-200"},[s("div",[e.isVoidable?s("ns-button",{attrs:{type:"danger"},on:{click:function(t){return e.voidOrder()}}},[s("i",{staticClass:"las la-ban"}),e._v("\n "+e._s(e.__("Void"))+"\n ")]):e._e(),e._v(" "),e.isDeleteAble?s("ns-button",{attrs:{type:"danger"},on:{click:function(t){return e.deleteOrder()}}},[s("i",{staticClass:"las la-trash"}),e._v("\n "+e._s(e.__("Delete"))+"\n ")]):e._e()],1),e._v(" "),s("div")])])}),[],!1,null,null,null).exports;const U={name:"ns-products-preview",computed:{product:function(){return this.$popupParams.product}},methods:{__:l.__,changeActiveTab:function(e){this.active=e,"units-quantities"===this.active&&this.loadProductQuantities()},loadProductQuantities:function(){var e=this;this.hasLoadedUnitQuantities=!1,r.ih.get("/api/nexopos/v4/products/".concat(this.product.id,"/units/quantities")).subscribe((function(t){e.unitQuantities=t,e.hasLoadedUnitQuantities=!0}))}},data:function(){return{active:"units-quantities",unitQuantities:[],hasLoadedUnitQuantities:!1}},mounted:function(){var e=this;this.loadProductQuantities(),this.$popup.event.subscribe((function(t){"click-overlay"===t.event&&e.$popup.close()}))}};const N=(0,f.Z)(U,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"shadow-lg w-6/7-screen lg:w-3/5-screen h-6/7-screen lg:h-4/5-screen bg-white overflow-hidden flex flex-col"},[s("div",{staticClass:"p-2 border-b border-gray-200 text-gray-700 text-center font-medium flex justify-between items-center"},[s("div",[e._v("\n "+e._s(e.__("Previewing :"))+" "+e._s(e.product.name)+"\n ")]),e._v(" "),s("div",[s("ns-close-button",{on:{click:function(t){return e.$popup.close()}}})],1)]),e._v(" "),s("div",{staticClass:"flex-auto overflow-y-auto bg-gray-100"},[s("div",{staticClass:"p-2"},[s("ns-tabs",{attrs:{active:e.active},on:{active:function(t){return e.changeActiveTab(t)}}},[s("ns-tabs-item",{attrs:{label:e.__("Units & Quantities"),identifier:"units-quantities"}},[e.hasLoadedUnitQuantities?s("table",{staticClass:"table w-full"},[s("thead",[s("tr",[s("th",{staticClass:"p-1 bg-blue-100 border-blue-400 text-blue-700 border"},[e._v(e._s(e.__("Unit")))]),e._v(" "),s("th",{staticClass:"text-right p-1 bg-blue-100 border-blue-400 text-blue-700 border",attrs:{width:"150"}},[e._v(e._s(e.__("Sale Price")))]),e._v(" "),s("th",{staticClass:"text-right p-1 bg-blue-100 border-blue-400 text-blue-700 border",attrs:{width:"150"}},[e._v(e._s(e.__("Wholesale Price")))]),e._v(" "),s("th",{staticClass:"text-right p-1 bg-blue-100 border-blue-400 text-blue-700 border",attrs:{width:"150"}},[e._v(e._s(e.__("Quantity")))])])]),e._v(" "),s("tbody",e._l(e.unitQuantities,(function(t){return s("tr",{key:t.id},[s("td",{staticClass:"p-1 border border-gray-400 text-gray-600 text-left"},[e._v(e._s(t.unit.name))]),e._v(" "),s("td",{staticClass:"p-1 border border-gray-400 text-gray-600 text-right"},[e._v(e._s(e._f("currency")(t.sale_price)))]),e._v(" "),s("td",{staticClass:"p-1 border border-gray-400 text-gray-600 text-right"},[e._v(e._s(e._f("currency")(t.wholesale_price)))]),e._v(" "),s("td",{staticClass:"p-1 border border-gray-400 text-gray-600 text-right"},[e._v(e._s(t.quantity))])])})),0)]):e._e(),e._v(" "),e.hasLoadedUnitQuantities?e._e():s("ns-spinner",{attrs:{size:"16",border:"4"}})],1)],1)],1)])])}),[],!1,null,null,null).exports;var W=s(2329),L=s(9576),G=s(7096);const Y={name:"ns-orders-refund-popup",data:function(){return{order:null,refunds:[],view:"summary",previewed:null,loaded:!1,options:systemOptions,settings:systemSettings}},methods:{__:l.__,popupCloser:o.Z,popupResolver:b.Z,toggleProductView:function(e){this.view="details",this.previewed=e},loadOrderRefunds:function(){var e=this;nsHttpClient.get("/api/nexopos/v4/orders/".concat(this.order.id,"/refunds")).subscribe((function(t){e.loaded=!0,e.refunds=t.refunds}),(function(e){r.kX.error(e.message).subscribe()}))},close:function(){this.$popup.close()},processRegularPrinting:function(e){var t=document.querySelector("printing-section");t&&t.remove();var s=this.settings.printing_url.replace("{order_id}",e),r=document.createElement("iframe");r.id="printing-section",r.className="hidden",r.src=s,document.body.appendChild(r),setTimeout((function(){document.querySelector("#printing-section").remove()}),100)},printRefundReceipt:function(e){this.printOrder(e.id)},printOrder:function(e){switch(this.options.ns_pos_printing_gateway){case"default":this.processRegularPrinting(e);break;default:this.processCustomPrinting(e,this.options.ns_pos_printing_gateway)}},processCustomPrinting:function(e,t){nsHooks.applyFilters("ns-order-custom-refund-print",{printed:!1,order_id:e,gateway:t}).printed||r.kX.error((0,l.__)("Unsupported print gateway.")).subscribe()}},mounted:function(){this.order=this.$popupParams.order,this.popupCloser(),this.loadOrderRefunds()}};const M=(0,f.Z)(Y,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"shadow-lg w-95vw h-95vh md:w-3/5-screen md:h-3/5-screen bg-white flex flex-col overflow-hidden"},[s("div",{staticClass:"border-b p-2 flex items-center justify-between"},[s("h3",[e._v(e._s(e.__("Order Refunds")))]),e._v(" "),s("div",{staticClass:"flex"},["details"===e.view?s("div",{staticClass:"flex items-center justify-center cursor-pointer rounded-full px-3 border hover:bg-blue-400 hover:text-white mr-1",on:{click:function(t){e.view="summary"}}},[e._v(e._s(e.__("Return")))]):e._e(),e._v(" "),s("ns-close-button",{on:{click:function(t){return e.close()}}})],1)]),e._v(" "),s("div",{staticClass:"overflow-auto flex-auto"},["summary"===e.view?[e.loaded?e._e():s("div",{staticClass:"flex h-full w-full items-center justify-center"},[s("ns-spinner",{attrs:{size:"24"}})],1),e._v(" "),e.loaded&&0===e.refunds.length?s("div",{staticClass:"flex h-full w-full items-center justify-center"},[s("i",{staticClass:"lar la-frown-open"})]):e._e(),e._v(" "),e.loaded&&e.refunds.length>0?e._l(e.refunds,(function(t){return s("div",{key:t.id,staticClass:"border-b flex flex-col md:flex-row"},[s("div",{staticClass:"w-full md:flex-auto p-2"},[s("h3",{staticClass:"font-semibold mb-1"},[e._v(e._s(e.order.code))]),e._v(" "),s("div",[s("ul",{staticClass:"flex -mx-1 text-sm text-gray-700"},[s("li",{staticClass:"px-1"},[e._v(e._s(e.__("Total"))+" : "+e._s(e._f("currency")(t.total)))]),e._v(" "),s("li",{staticClass:"px-1"},[e._v(e._s(e.__("By"))+" : "+e._s(t.author.username))])])])]),e._v(" "),s("div",{staticClass:"w-full md:w-16 cursor-pointer hover:bg-blue-400 hover:border-blue-400 hover:text-white text-lg flex items-center justify-center md:border-l",on:{click:function(s){return e.toggleProductView(t)}}},[s("i",{staticClass:"las la-eye"})]),e._v(" "),s("div",{staticClass:"w-full md:w-16 cursor-pointer hover:bg-blue-400 hover:border-blue-400 hover:text-white text-lg flex items-center justify-center md:border-l",on:{click:function(s){return e.printRefundReceipt(t)}}},[s("i",{staticClass:"las la-print"})])])})):e._e()]:e._e(),e._v(" "),"details"===e.view?e._l(e.previewed.refunded_products,(function(t){return s("div",{key:t.id,staticClass:"border-b flex flex-col md:flex-row"},[s("div",{staticClass:"w-full md:flex-auto p-2"},[s("h3",{staticClass:"font-semibold mb-1"},[e._v(e._s(t.product.name))]),e._v(" "),s("div",[s("ul",{staticClass:"flex -mx-1 text-sm text-gray-700"},[s("li",{staticClass:"px-1"},[e._v(e._s(e.__("Condition"))+" : "+e._s(t.condition))]),e._v(" "),s("li",{staticClass:"px-1"},[e._v(e._s(e.__("Quantity"))+" : "+e._s(t.quantity))]),e._v(" "),s("li",{staticClass:"px-1"},[e._v(e._s(e.__("Total"))+" : "+e._s(e._f("currency")(t.total_price)))])])])])])})):e._e()],2)])}),[],!1,null,null,null).exports;var B={nsOrderPreview:Q,nsProductPreview:N,nsAlertPopup:W.Z,nsConfirmPopup:x.Z,nsPromptPopup:O.Z,nsMediaPopup:L.Z,nsProcurementQuantity:G.Z,nsOrdersRefund:M};for(var H in B)window[H]=B[H]},6700:(e,t,s)=>{var r={"./af":2786,"./af.js":2786,"./ar":867,"./ar-dz":4130,"./ar-dz.js":4130,"./ar-kw":6135,"./ar-kw.js":6135,"./ar-ly":6440,"./ar-ly.js":6440,"./ar-ma":7702,"./ar-ma.js":7702,"./ar-sa":6040,"./ar-sa.js":6040,"./ar-tn":7100,"./ar-tn.js":7100,"./ar.js":867,"./az":1083,"./az.js":1083,"./be":9808,"./be.js":9808,"./bg":8338,"./bg.js":8338,"./bm":7438,"./bm.js":7438,"./bn":8905,"./bn-bd":6225,"./bn-bd.js":6225,"./bn.js":8905,"./bo":1560,"./bo.js":1560,"./br":1278,"./br.js":1278,"./bs":622,"./bs.js":622,"./ca":2468,"./ca.js":2468,"./cs":5822,"./cs.js":5822,"./cv":877,"./cv.js":877,"./cy":7373,"./cy.js":7373,"./da":4780,"./da.js":4780,"./de":9740,"./de-at":217,"./de-at.js":217,"./de-ch":894,"./de-ch.js":894,"./de.js":9740,"./dv":5300,"./dv.js":5300,"./el":837,"./el.js":837,"./en-au":8348,"./en-au.js":8348,"./en-ca":7925,"./en-ca.js":7925,"./en-gb":2243,"./en-gb.js":2243,"./en-ie":6436,"./en-ie.js":6436,"./en-il":7207,"./en-il.js":7207,"./en-in":4175,"./en-in.js":4175,"./en-nz":6319,"./en-nz.js":6319,"./en-sg":1662,"./en-sg.js":1662,"./eo":2915,"./eo.js":2915,"./es":7093,"./es-do":5251,"./es-do.js":5251,"./es-mx":6112,"./es-mx.js":6112,"./es-us":1146,"./es-us.js":1146,"./es.js":7093,"./et":5603,"./et.js":5603,"./eu":7763,"./eu.js":7763,"./fa":6959,"./fa.js":6959,"./fi":1897,"./fi.js":1897,"./fil":2549,"./fil.js":2549,"./fo":4694,"./fo.js":4694,"./fr":4470,"./fr-ca":3049,"./fr-ca.js":3049,"./fr-ch":2330,"./fr-ch.js":2330,"./fr.js":4470,"./fy":5044,"./fy.js":5044,"./ga":9295,"./ga.js":9295,"./gd":2101,"./gd.js":2101,"./gl":8794,"./gl.js":8794,"./gom-deva":7884,"./gom-deva.js":7884,"./gom-latn":3168,"./gom-latn.js":3168,"./gu":5349,"./gu.js":5349,"./he":4206,"./he.js":4206,"./hi":94,"./hi.js":94,"./hr":316,"./hr.js":316,"./hu":2138,"./hu.js":2138,"./hy-am":1423,"./hy-am.js":1423,"./id":9218,"./id.js":9218,"./is":135,"./is.js":135,"./it":626,"./it-ch":150,"./it-ch.js":150,"./it.js":626,"./ja":9183,"./ja.js":9183,"./jv":4286,"./jv.js":4286,"./ka":2105,"./ka.js":2105,"./kk":7772,"./kk.js":7772,"./km":8758,"./km.js":8758,"./kn":9282,"./kn.js":9282,"./ko":3730,"./ko.js":3730,"./ku":1408,"./ku.js":1408,"./ky":3291,"./ky.js":3291,"./lb":6841,"./lb.js":6841,"./lo":5466,"./lo.js":5466,"./lt":7010,"./lt.js":7010,"./lv":7595,"./lv.js":7595,"./me":9861,"./me.js":9861,"./mi":5493,"./mi.js":5493,"./mk":5966,"./mk.js":5966,"./ml":7341,"./ml.js":7341,"./mn":5115,"./mn.js":5115,"./mr":370,"./mr.js":370,"./ms":9847,"./ms-my":1237,"./ms-my.js":1237,"./ms.js":9847,"./mt":2126,"./mt.js":2126,"./my":6165,"./my.js":6165,"./nb":4924,"./nb.js":4924,"./ne":6744,"./ne.js":6744,"./nl":3901,"./nl-be":9814,"./nl-be.js":9814,"./nl.js":3901,"./nn":3877,"./nn.js":3877,"./oc-lnc":2135,"./oc-lnc.js":2135,"./pa-in":5858,"./pa-in.js":5858,"./pl":4495,"./pl.js":4495,"./pt":9520,"./pt-br":7971,"./pt-br.js":7971,"./pt.js":9520,"./ro":6459,"./ro.js":6459,"./ru":238,"./ru.js":238,"./sd":950,"./sd.js":950,"./se":490,"./se.js":490,"./si":124,"./si.js":124,"./sk":4249,"./sk.js":4249,"./sl":4985,"./sl.js":4985,"./sq":1104,"./sq.js":1104,"./sr":9131,"./sr-cyrl":9915,"./sr-cyrl.js":9915,"./sr.js":9131,"./ss":5893,"./ss.js":5893,"./sv":8760,"./sv.js":8760,"./sw":1172,"./sw.js":1172,"./ta":7333,"./ta.js":7333,"./te":3110,"./te.js":3110,"./tet":2095,"./tet.js":2095,"./tg":7321,"./tg.js":7321,"./th":9041,"./th.js":9041,"./tk":9005,"./tk.js":9005,"./tl-ph":5768,"./tl-ph.js":5768,"./tlh":9444,"./tlh.js":9444,"./tr":2397,"./tr.js":2397,"./tzl":8254,"./tzl.js":8254,"./tzm":1106,"./tzm-latn":699,"./tzm-latn.js":699,"./tzm.js":1106,"./ug-cn":9288,"./ug-cn.js":9288,"./uk":7691,"./uk.js":7691,"./ur":3795,"./ur.js":3795,"./uz":6791,"./uz-latn":588,"./uz-latn.js":588,"./uz.js":6791,"./vi":5666,"./vi.js":5666,"./x-pseudo":4378,"./x-pseudo.js":4378,"./yo":5805,"./yo.js":5805,"./zh-cn":3839,"./zh-cn.js":3839,"./zh-hk":5726,"./zh-hk.js":5726,"./zh-mo":9807,"./zh-mo.js":9807,"./zh-tw":4152,"./zh-tw.js":4152};function n(e){var t=i(e);return s(t)}function i(e){if(!s.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}n.keys=function(){return Object.keys(r)},n.resolve=i,e.exports=n,n.id=6700},3968:(e,t,s)=>{"use strict";s.d(t,{Z:()=>a});function r(e){return function(e){if(Array.isArray(e))return n(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return n(e,t);var s=Object.prototype.toString.call(e).slice(8,-1);"Object"===s&&e.constructor&&(s=e.constructor.name);if("Map"===s||"Set"===s)return Array.from(e);if("Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return n(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var s=0,r=new Array(t);s100?100:this.backValue))),"0"===this.backValue&&(this.backValue=""),this.$emit("changed",this.floating&&this.backValue.length>0?parseFloat(this.backValue/this.number):this.backValue)):this.$emit("next",this.floating&&this.backValue.length>0?parseFloat(this.backValue/this.number):this.backValue)}}};const a=(0,s(1900).Z)(i,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"grid grid-flow-row grid-cols-3 gap-2 grid-rows-3",staticStyle:{padding:"1px"},attrs:{id:"numpad"}},[e._l(e.keys,(function(t,r){return s("div",{key:r,staticClass:"hover:bg-gray-400 hover:text-gray-800 bg-gray-300 text-2xl text-gray-700 border h-16 flex items-center justify-center cursor-pointer",staticStyle:{margin:"-1px"},on:{click:function(s){return e.inputValue(t)}}},[void 0!==t.value?s("span",[e._v(e._s(t.value))]):e._e(),e._v(" "),t.icon?s("i",{staticClass:"las",class:t.icon}):e._e()])})),e._v(" "),e._t("numpad-footer")],2)}),[],!1,null,null,null).exports},9576:(e,t,s)=>{"use strict";s.d(t,{Z:()=>o});var r=s(162),n=s(8603),i=s(7389);const a={name:"ns-media",props:["popup"],components:{VueUpload:s(2948)},data:function(){return{pages:[{label:(0,i.__)("Upload"),name:"upload",selected:!1},{label:(0,i.__)("Gallery"),name:"gallery",selected:!0}],resources:[],response:{data:[],current_page:0,from:0,to:0,next_page_url:"",prev_page_url:"",path:"",per_page:0,total:0,last_page:0,first_page:0},queryPage:1,bulkSelect:!1,files:[]}},mounted:function(){this.popupCloser();var e=this.pages.filter((function(e){return"gallery"===e.name}))[0];this.select(e)},watch:{files:function(){this.files.filter((function(e){return"0.00"===e.progress})).length>0&&(this.$refs.upload.active=!0)}},computed:{postMedia:function(){return r.kq.applyFilters("http-client-url","/api/nexopos/v4/medias")},currentPage:function(){return this.pages.filter((function(e){return e.selected}))[0]},hasOneSelected:function(){return this.response.data.filter((function(e){return e.selected})).length>0},selectedResource:function(){return this.response.data.filter((function(e){return e.selected}))[0]},csrf:function(){return ns.authentication.csrf},isPopup:function(){return void 0!==this.$popup},user_id:function(){return this.isPopup&&this.$popupParams.user_id||0}},methods:{popupCloser:n.Z,__:i.__,cancelBulkSelect:function(){this.bulkSelect=!1,this.response.data.forEach((function(e){return e.selected=!1}))},deleteSelected:function(){var e=this;if(confirm("Delete selected resources ?"))return r.ih.post("/api/nexopos/v4/medias/bulk-delete",{ids:this.response.data.filter((function(e){return e.selected})).map((function(e){return e.id}))}).subscribe((function(t){r.kX.success(t.message).subscribe(),e.loadGallery()}),(function(e){r.kX.error(e.message).subscribe()}))},select:function(e){this.pages.forEach((function(e){return e.selected=!1})),e.selected=!0,"gallery"===e.name&&this.loadGallery()},loadGallery:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;t=null===t?this.queryPage:t,this.queryPage=t,r.ih.get("/api/nexopos/v4/medias?page=".concat(t,"&user_id=").concat(this.user_id)).subscribe((function(t){t.data.forEach((function(e){return e.selected=!1})),e.response=t}))},useSelectedEntries:function(){this.$popupParams.resolve({event:"use-selected",value:this.response.data.filter((function(e){return e.selected}))}),this.$popup.close()},selectResource:function(e){var t=this;this.bulkSelect||this.response.data.forEach((function(s,r){r!==t.response.data.indexOf(e)&&(s.selected=!1)})),e.selected=!e.selected}}};const o=(0,s(1900).Z)(a,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"flex bg-white shadow-xl overflow-hidden",class:e.isPopup?"w-6/7-screen h-6/7-screen":"w-full h-full"},[s("div",{staticClass:"sidebar w-48 bg-gray-200 h-full flex-shrink-0"},[s("h3",{staticClass:"text-xl font-bold text-gray-800 my-4 text-center"},[e._v(e._s(e.__("Medias Manager")))]),e._v(" "),s("ul",e._l(e.pages,(function(t,r){return s("li",{key:r,staticClass:"hover:bg-white py-2 px-3 text-gray-700 border-l-8 cursor-pointer",class:t.selected?"bg-white border-blue-400":"border-transparent",on:{click:function(s){return e.select(t)}}},[e._v(e._s(t.label))])})),0)]),e._v(" "),"upload"===e.currentPage.name?s("div",{staticClass:"content w-full overflow-hidden flex"},[s("vue-upload",{ref:"upload",staticClass:" flex-auto flex bg-white shadow",attrs:{drop:!0,multiple:!0,headers:{"X-Requested-With":"XMLHttpRequest","X-CSRF-TOKEN":e.csrf},accept:"image/*","post-action":e.postMedia},model:{value:e.files,callback:function(t){e.files=t},expression:"files"}},[s("div",{staticClass:"border-dashed border-2 flex flex-auto m-2 p-2 flex-col border-blue-400 items-center justify-center"},[s("h3",{staticClass:"text-3xl font-bold text-gray-600 mb-4"},[e._v(e._s(e.__("Click Here Or Drop Your File To Upload")))]),e._v(" "),s("div",{staticClass:"rounded w-full md:w-2/3 text-gray-700 bg-gray-500 h-56 overflow-y-auto p-2"},[s("ul",e._l(e.files,(function(t,r){return s("li",{key:r,staticClass:"p-2 mb-2 shadow bg-white flex items-center justify-between rounded"},[s("span",[e._v(e._s(t.name))]),e._v(" "),s("span",{staticClass:"rounded bg-blue-400 flex items-center justify-center text-xs p-2"},[e._v(e._s(t.progress)+"%")])])})),0)])])])],1):e._e(),e._v(" "),"gallery"===e.currentPage.name?s("div",{staticClass:"content flex-col w-full overflow-hidden flex"},[e.popup?s("div",{staticClass:"p-2 flex flex-shrink-0 justify-between bg-gray-200"},[s("div"),e._v(" "),s("div",[s("ns-close-button",{on:{click:function(t){return e.popup.close()}}})],1)]):e._e(),e._v(" "),s("div",{staticClass:"flex flex-auto overflow-hidden"},[s("div",{staticClass:"bg-white shadow content flex flex-auto flex-col overflow-y-auto",attrs:{id:"grid"}},[s("div",{staticClass:"flex flex-auto"},[s("div",{staticClass:"p-2 overflow-x-auto"},[s("div",{staticClass:"grid grid-cols-2 md:grid-cols-4 lg:grid-cols-4 xl:grid-cols-6"},e._l(e.response.data,(function(t,r){return s("div",{key:r},[s("div",{staticClass:"p-2"},[s("div",{staticClass:"rounded-lg w-32 h-32 bg-gray-500 m-2 overflow-hidden flex items-center justify-center",class:t.selected?"ring-4 ring-blue-500 ring-opacity-50":"",on:{click:function(s){return e.selectResource(t)}}},[s("img",{staticClass:"object-cover h-full",attrs:{src:t.sizes.thumb,alt:t.name}})])])])})),0)]),e._v(" "),0===e.response.data.length?s("div",{staticClass:"flex flex-auto items-center justify-center"},[s("h3",{staticClass:"text-2xl text-gray-600 font-bold"},[e._v(e._s(e.__("Nothing has already been uploaded")))])]):e._e()])]),e._v(" "),!e.bulkSelect&&e.hasOneSelected?s("div",{staticClass:"w-64 flex-shrink-0 bg-gray-200",attrs:{id:"preview"}},[s("div",{staticClass:"h-64 bg-gray-600 flex items-center justify-center"},[s("img",{attrs:{src:e.selectedResource.sizes.thumb,alt:e.selectedResource.name}})]),e._v(" "),s("div",{staticClass:"p-4 text-gray-700 text-sm",attrs:{id:"details"}},[s("p",{staticClass:"flex flex-col mb-2"},[s("strong",{staticClass:"font-bold block"},[e._v(e._s(e.__("File Name"))+": ")]),s("span",[e._v(e._s(e.selectedResource.name))])]),e._v(" "),s("p",{staticClass:"flex flex-col mb-2"},[s("strong",{staticClass:"font-bold block"},[e._v(e._s(e.__("Uploaded At"))+":")]),s("span",[e._v(e._s(e.selectedResource.created_at))])]),e._v(" "),s("p",{staticClass:"flex flex-col mb-2"},[s("strong",{staticClass:"font-bold block"},[e._v(e._s(e.__("By"))+" :")]),s("span",[e._v(e._s(e.selectedResource.user.username))])])])]):e._e()]),e._v(" "),s("div",{staticClass:"p-2 flex flex-shrink-0 justify-between bg-gray-200"},[s("div",{staticClass:"flex -mx-2 flex-shrink-0"},[s("div",{staticClass:"px-2 flex-shrink-0 flex"},[s("div",{staticClass:"rounded shadow overflow-hidden border-blue-400 flex text-sm text-gray-700"},[e.bulkSelect?s("button",{staticClass:"bg-white hover:bg-blue-400 hover:text-white py-2 px-3",on:{click:function(t){return e.cancelBulkSelect()}}},[s("i",{staticClass:"las la-times"})]):e._e(),e._v(" "),e.hasOneSelected&&!e.bulkSelect?s("button",{staticClass:"bg-white hover:bg-blue-400 hover:text-white py-2 px-3",on:{click:function(t){e.bulkSelect=!0}}},[s("i",{staticClass:"las la-check-circle"})]):e._e(),e._v(" "),e.hasOneSelected?s("button",{staticClass:"bg-red-400 text-white hover:bg-red-500 hover:text-white py-2 px-3",on:{click:function(t){return e.deleteSelected()}}},[s("i",{staticClass:"las la-trash"})]):e._e()])])]),e._v(" "),s("div",{staticClass:"flex-shrink-0 -mx-2 flex"},[s("div",{staticClass:"px-2"},[s("div",{staticClass:"rounded shadow overflow-hidden border-blue-400 flex text-sm text-gray-700"},[s("button",{staticClass:"p-2",class:1===e.response.current_page?"bg-gray-100 text-gray-600 cursor-not-allowed":"bg-white hover:bg-blue-400 hover:text-white",attrs:{disabled:1===e.response.current_page},on:{click:function(t){return e.loadGallery(e.response.current_page-1)}}},[e._v(e._s(e.__("Previous")))]),e._v(" "),s("hr",{staticClass:"border-r border-gray-700"}),e._v(" "),s("button",{staticClass:"p-2",class:e.response.current_page===e.response.last_page?"bg-gray-100 text-gray-600 cursor-not-allowed":"bg-white hover:bg-blue-400 hover:text-white",attrs:{disabled:e.response.current_page===e.response.last_page},on:{click:function(t){return e.loadGallery(e.response.current_page+1)}}},[e._v(e._s(e.__("Next")))])])]),e._v(" "),e.popup&&e.hasOneSelected?s("div",{staticClass:"px-2"},[s("button",{staticClass:"rounded shadow p-2 bg-blue-400 text-white text-sm",on:{click:function(t){return e.useSelectedEntries()}}},[e._v(e._s(e.__("Use Selected")))])]):e._e()])])]):e._e()])}),[],!1,null,null,null).exports},2329:(e,t,s)=>{"use strict";s.d(t,{Z:()=>n});const r={data:function(){return{title:"",message:""}},computed:{size:function(){return this.$popupParams.size||"h-full w-full"}},mounted:function(){var e=this;this.title=this.$popupParams.title,this.message=this.$popupParams.message,this.$popup.event.subscribe((function(t){"click-overlay"===t.event&&(void 0!==e.$popupParams.onAction&&e.$popupParams.onAction(!1),e.$popup.close())}))},methods:{__:s(7389).__,emitAction:function(e){void 0!==this.$popupParams.onAction&&this.$popupParams.onAction(e),this.$popup.close()}}};const n=(0,s(1900).Z)(r,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"w-6/7-screen md:w-4/7-screen lg:w-3/7-screen flex flex-col bg-white shadow-lg",class:e.size,attrs:{id:"popup"}},[s("div",{staticClass:"flex items-center justify-center flex-col flex-auto p-4"},[e.title?s("h2",{staticClass:"text-3xl font-body text-gray-700"},[e._v(e._s(e.title))]):e._e(),e._v(" "),s("p",{staticClass:"py-4 text-gray-600 text-center"},[e._v(e._s(e.message))])]),e._v(" "),s("div",{staticClass:"flex border-t border-gray-200 text-gray-700 justify-end items-center p-2"},[s("ns-button",{attrs:{type:"info"},on:{click:function(t){return e.emitAction(!0)}}},[e._v(e._s(e.__("Ok")))])],1)])}),[],!1,null,null,null).exports},419:(e,t,s)=>{"use strict";s.d(t,{Z:()=>n});const r={data:function(){return{title:"",message:""}},computed:{size:function(){return this.$popupParams.size||"h-full w-full"}},mounted:function(){var e=this;this.title=this.$popupParams.title,this.message=this.$popupParams.message,this.$popup.event.subscribe((function(t){"click-overlay"===t.event&&(e.$popupParams.onAction(!1),e.$popup.close())}))},methods:{__:s(7389).__,emitAction:function(e){this.$popupParams.onAction(e),this.$popup.close()}}};const n=(0,s(1900).Z)(r,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"flex flex-col bg-white shadow-lg w-5/7-screen md:w-4/7-screen lg:w-2/7-screen",class:e.size,attrs:{id:"popup"}},[s("div",{staticClass:"flex items-center justify-center flex-col flex-auto p-4"},[s("h2",{staticClass:"text-xl md:text-3xl font-body text-gray-700 text-center"},[e._v(e._s(e.title))]),e._v(" "),s("p",{staticClass:"py-4 text-sm md:text-base text-gray-600 text-center"},[e._v(e._s(e.message))])]),e._v(" "),s("div",{staticClass:"flex border-t border-gray-200 text-gray-700"},[s("button",{staticClass:"hover:bg-gray-100 flex-auto w-1/2 h-16 flex items-center justify-center uppercase",on:{click:function(t){return e.emitAction(!0)}}},[e._v(e._s(e.__("Yes")))]),e._v(" "),s("hr",{staticClass:"border-r border-gray-200"}),e._v(" "),s("button",{staticClass:"hover:bg-gray-100 flex-auto w-1/2 h-16 flex items-center justify-center uppercase",on:{click:function(t){return e.emitAction(!1)}}},[e._v(e._s(e.__("No")))])])])}),[],!1,null,null,null).exports},7096:(e,t,s)=>{"use strict";s.d(t,{Z:()=>l});var r=s(162),n=s(7389);function i(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return a(e,t);var s=Object.prototype.toString.call(e).slice(8,-1);"Object"===s&&e.constructor&&(s=e.constructor.name);if("Map"===s||"Set"===s)return Array.from(e);if("Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return a(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var s=0,r=new Array(t);s{"use strict";s.d(t,{Z:()=>n});const r={data:function(){return{title:"",message:"",input:""}},computed:{size:function(){return this.$popupParams.size||"h-full w-full"}},mounted:function(){var e=this;this.input=this.$popupParams.input||"",this.title=this.$popupParams.title,this.message=this.$popupParams.message,this.$popup.event.subscribe((function(t){"click-overlay"===t.event&&(e.$popupParams.reject(!1),e.$popup.close())}))},methods:{__:s(7389).__,emitAction:function(e){this.$popupParams.onAction(e?this.input:e),this.$popup.close()},reject:function(e){this.$popupParams.reject(e),this.$popup.close()}}};const n=(0,s(1900).Z)(r,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"w-5/7-screen md:w-3/7-screen flex flex-col bg-white shadow-lg",class:e.size,attrs:{id:"popup"}},[s("div",{staticClass:"flex items-center justify-center flex-col flex-auto p-2"},[s("h2",{staticClass:"text-3xl font-body text-gray-700"},[e._v(e._s(e.title))]),e._v(" "),s("p",{staticClass:"w-full md:mx-auto md:w-2/3 py-4 text-gray-600 text-center"},[e._v(e._s(e.message))])]),e._v(" "),s("div",{staticClass:"p-2"},[s("textarea",{directives:[{name:"model",rawName:"v-model",value:e.input,expression:"input"}],staticClass:"text-gray-700 w-full border-2 p-2 border-blue-400",attrs:{name:"",id:"",cols:"30",rows:"10"},domProps:{value:e.input},on:{input:function(t){t.target.composing||(e.input=t.target.value)}}})]),e._v(" "),s("div",{staticClass:"flex border-t border-gray-200 text-gray-700"},[s("button",{staticClass:"hover:bg-gray-100 flex-auto w-1/2 h-16 flex items-center justify-center uppercase",on:{click:function(t){return e.emitAction(!0)}}},[e._v(e._s(e.__("Ok")))]),e._v(" "),s("hr",{staticClass:"border-r border-gray-200"}),e._v(" "),s("button",{staticClass:"hover:bg-gray-100 flex-auto w-1/2 h-16 flex items-center justify-center uppercase",on:{click:function(t){return e.reject(!1)}}},[e._v(e._s(e.__("Cancel")))])])])}),[],!1,null,null,null).exports}},e=>{e.O(0,[898],(()=>{return t=9351,e(e.s=t);var t}));e.O()}]); //# sourceMappingURL=popups.min.js.map \ No newline at end of file diff --git a/public/js/pos-init.min.js b/public/js/pos-init.min.js index 9d49dd27a..12f1bf357 100644 --- a/public/js/pos-init.min.js +++ b/public/js/pos-init.min.js @@ -1,2 +1,2 @@ -(self.webpackChunkNexoPOS_4x=self.webpackChunkNexoPOS_4x||[]).push([[443],{162:(e,t,s)=>{"use strict";s.d(t,{l:()=>I,kq:()=>X,ih:()=>L,kX:()=>N});var r=s(6486),n=s(9669),i=s(2181),o=s(8345),a=s(9624),u=s(9248),c=s(230);function l(e,t){for(var s=0;s2&&void 0!==arguments[2]?arguments[2]:{};return this._request("post",e,t,s)}},{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._request("get",e,void 0,t)}},{key:"delete",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._request("delete",e,void 0,t)}},{key:"put",value:function(e,t){var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this._request("put",e,t,s)}},{key:"response",get:function(){return this._lastRequestData}},{key:"_request",value:function(e,t){var s=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return t=X.applyFilters("http-client-url",t.replace(/\/$/,"")),this._subject.next({identifier:"async.start",url:t,data:r}),new c.y((function(i){s._client[e](t,r,Object.assign(Object.assign({},s._client.defaults[e]),n)).then((function(e){s._lastRequestData=e,i.next(e.data),i.complete(),s._subject.next({identifier:"async.stop"})})).catch((function(e){var t;i.error((null===(t=e.response)||void 0===t?void 0:t.data)||e.response||e),s._subject.next({identifier:"async.stop"})}))}))}},{key:"subject",value:function(){return this._subject}},{key:"emit",value:function(e){var t=e.identifier,s=e.value;this._subject.next({identifier:t,value:s})}}])&&l(t.prototype,s),r&&l(t,r),e}(),p=s(3);function f(e,t){for(var s=0;s=1e3){for(var s,r=Math.floor((""+e).length/3),n=2;n>=1;n--){if(((s=parseFloat((0!=r?e/Math.pow(1e3,r):e).toPrecision(n)))+"").replace(/[^a-zA-Z 0-9]+/g,"").length<=2)break}s%1!=0&&(s=s.toFixed(1)),t=s+["","k","m","b","t"][r]}return t})),O=s(1356),S=s(9698);function $(e,t){for(var s=0;s0&&window.outerWidth<=480:this.breakpoint="xs";break;case window.outerWidth>480&&window.outerWidth<=640:this.breakpoint="sm";break;case window.outerWidth>640&&window.outerWidth<=1024:this.breakpoint="md";break;case window.outerWidth>1024&&window.outerWidth<=1280:this.breakpoint="lg";break;case window.outerWidth>1280:this.breakpoint="xl"}}}])&&q(t.prototype,s),r&&q(t,r),e}()),U=new m({sidebar:["xs","sm","md"].includes(W.breakpoint)?"hidden":"visible"});L.defineClient(n),window.nsEvent=I,window.nsHttpClient=L,window.nsSnackBar=N,window.nsCurrency=O.W,window.nsTruncate=S.b,window.nsRawCurrency=O.f,window.nsAbbreviate=j,window.nsState=U,window.nsUrl=z,window.nsScreen=W,window.ChartJS=i,window.EventEmitter=h,window.Popup=x.G,window.RxJS=g,window.FormValidation=C.Z,window.nsCrudHandler=Q},1356:(e,t,s)=>{"use strict";s.d(t,{W:()=>c,f:()=>l});var r=s(538),n=s(2077),i=s.n(n),o=s(6740),a=s.n(o),u=new Array(parseInt(ns.currency.ns_currency_precision)).fill("").map((function(e){return 0})).join(""),c=r.default.filter("currency",(function(e){var t,s,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"full";switch(ns.currency.ns_currency_prefered){case"iso":t=ns.currency.ns_currency_iso;break;case"symbol":t=ns.currency.ns_currency_symbol}if("full"===r){var n={decimal:ns.currency.ns_currency_decimal_separator,separator:ns.currency.ns_currency_thousand_separator,precision:parseInt(ns.currency.ns_currency_precision),symbol:""};s=a()(e,n).format()}else s=i()(e).format("0.0a");return"".concat("before"===ns.currency.ns_currency_position?t:"").concat(s).concat("after"===ns.currency.ns_currency_position?t:"")})),l=function(e){var t="0.".concat(u);return parseFloat(i()(e).format(t))}},9698:(e,t,s)=>{"use strict";s.d(t,{b:()=>r});var r=s(538).default.filter("truncate",(function(e,t){return e?(e=e.toString()).length>t?e.substring(0,t)+"...":e:""}))},7266:(e,t,s)=>{"use strict";function r(e,t){for(var s=0;sn});var n=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,s,n;return t=e,(s=[{key:"validateFields",value:function(e){var t=this;return 0===e.map((function(e){return t.checkField(e),e.errors?0===e.errors.length:0})).filter((function(e){return!1===e})).length}},{key:"validateFieldsErrors",value:function(e){var t=this;return e.map((function(e){return t.checkField(e),e.errors})).flat()}},{key:"validateForm",value:function(e){e.main&&this.validateField(e.main);var t=[];for(var s in e.tabs){var r=[],n=this.validateFieldsErrors(e.tabs[s].fields);n.length>0&&r.push(n),e.tabs[s].errors=r.flat(),t.push(r.flat())}return t.flat().filter((function(e){return void 0!==e}))}},{key:"initializeTabs",value:function(e){var t=0;for(var s in e)0===t&&(e[s].active=!0),e[s].active=void 0!==e[s].active&&e[s].active,e[s].fields=this.createFields(e[s].fields),t++;return e}},{key:"validateField",value:function(e){return this.checkField(e)}},{key:"fieldsValid",value:function(e){return!(e.map((function(e){return e.errors&&e.errors.length>0})).filter((function(e){return e})).length>0)}},{key:"createFields",value:function(e){return e.map((function(e){return e.type=e.type||"text",e.errors=e.errors||[],e.disabled=e.disabled||!1,"custom"===e.type&&(e.component=nsExtraComponents[e.name]),e}))}},{key:"createForm",value:function(e){if(e.main&&(e.main=this.createFields([e.main])[0]),e.tabs)for(var t in e.tabs)e.tabs[t].fields=this.createFields(e.tabs[t].fields),e.tabs[t].errors=[];return e}},{key:"enableFields",value:function(e){return e.map((function(e){return e.disabled=!1}))}},{key:"disableFields",value:function(e){return e.map((function(e){return e.disabled=!0}))}},{key:"disableForm",value:function(e){for(var t in e.main&&(e.main.disabled=!0),e.tabs)e.tabs[t].fields.forEach((function(e){return e.disabled=!0}))}},{key:"enableForm",value:function(e){for(var t in e.main&&(e.main.disabled=!1),e.tabs)e.tabs[t].fields.forEach((function(e){return e.disabled=!1}))}},{key:"getValue",value:function(e){var t={};return e.forEach((function(e){t[e.name]=e.value})),t}},{key:"checkField",value:function(e){var t=this;return void 0!==e.validation&&(e.errors=[],this.detectValidationRules(e.validation).forEach((function(s){t.fieldPassCheck(e,s)}))),e}},{key:"extractForm",value:function(e){var t={};if(e.main&&(t[e.main.name]=e.main.value),e.tabs)for(var s in e.tabs)void 0===t[s]&&(t[s]={}),t[s]=this.extractFields(e.tabs[s].fields);return t}},{key:"extractFields",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.forEach((function(e){["multiselect"].includes(e.type)?t[e.name]=e.options.filter((function(e){return e.selected})).map((function(e){return e.value})):t[e.name]=e.value})),t}},{key:"detectValidationRules",value:function(e){var t=function(e){var t;return["email","required"].includes(e)?{identifier:e}:(t=/(min)\:([0-9])+/g.exec(e))||(t=/(max)\:([0-9])+/g.exec(e))?{identifier:t[1],value:t[2]}:e};return Array.isArray(e)?e.filter((function(e){return"string"==typeof e})).map(t):e.split("|").map(t)}},{key:"triggerError",value:function(e,t){if(t.errors){var s=function(s){var r=s.split(".").filter((function(e){return!/^\d+$/.test(e)}));2===r.length&&e.tabs[r[0]].fields.forEach((function(e){e.name===r[1]&&t.errors[s].forEach((function(t){var s={identifier:"invalid",invalid:!0,message:t,name:e.name};e.errors.push(s)}))})),s===e.main.name&&t.errors[s].forEach((function(t){e.main.errors.push({identifier:"invalid",invalid:!0,message:t,name:e.main.name})}))};for(var r in t.errors)s(r)}}},{key:"triggerFieldsErrors",value:function(e,t){if(t&&t.errors){var s=function(s){e.forEach((function(e){e.name===s&&t.errors[s].forEach((function(t){var s={identifier:"invalid",invalid:!0,message:t,name:e.name};e.errors.push(s)}))}))};for(var r in t.errors)s(r)}}},{key:"fieldPassCheck",value:function(e,t){if("required"===t.identifier){if(void 0===e.value||null===e.value||0===e.value.length)return e.errors.push({identifier:t.identifier,invalid:!0,name:e.name});e.errors.forEach((function(s,r){s.identifier===t.identifier&&!0===s.invalid&&e.errors.splice(r,1)}))}if("email"===t.identifier){if(!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(e.value))return e.errors.push({identifier:t.identifier,invalid:!0,name:e.name});e.errors.forEach((function(s,r){!0===s[t.identifier]&&e.errors.splice(r,1)}))}return e}}])&&r(t.prototype,s),n&&r(t,n),e}()},7389:(e,t,s)=>{"use strict";s.d(t,{__:()=>r,c:()=>n});var r=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"NexoPOS";return nsLanguage.getEntries(t)&&nsLanguage.getEntries(t)[e]||e},n=function(e,t){return nsLanguage.getEntries(t)&&nsLanguage.getEntries(t)[e]||e}},8603:(e,t,s)=>{"use strict";function r(){var e=this;Object.keys(this).includes("$popup")&&this.$popup.event.subscribe((function(t){"click-overlay"===t.event&&(e.$popupParams&&void 0!==e.$popupParams.reject&&e.$popupParams.reject(!1),e.$popup.close()),"press-esc"===t.event&&(e.$popupParams&&void 0!==e.$popupParams.reject&&e.$popupParams.reject(!1),e.$popup.close())}))}s.d(t,{Z:()=>r})},6386:(e,t,s)=>{"use strict";function r(e){void 0!==this.$popupParams.resolve&&this.$popupParams.reject&&(!1!==e?this.$popupParams.resolve(e):this.$popupParams.reject(e)),this.$popup.close()}s.d(t,{Z:()=>r})},2242:(e,t,s)=>{"use strict";s.d(t,{G:()=>o});var r=s(9248);function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var s=0;s0&&void 0!==arguments[0]?arguments[0]:{};if(n(this,e),this.config={primarySelector:void 0,popupClass:"shadow-lg h-half w-1/2 bg-white"},this.container=document.createElement("div"),this.popupBody=document.createElement("div"),this.config=Object.assign(this.config,t),void 0===this.config.primarySelector&&document.querySelectorAll(".is-popup").length>0){var s=document.querySelectorAll(".is-popup").length;this.parentWrapper=document.querySelectorAll(".is-popup")[s-1]}else this.parentWrapper=document.querySelector("body").querySelectorAll("div")[0];this.event=new r.x}var t,s,o;return t=e,o=[{key:"show",value:function(t){var s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=new e(r);return n.open(t,s),n}}],(s=[{key:"open",value:function(e){var t,s,r,n=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=document.querySelector("body").querySelectorAll("div")[0];this.parentWrapper.style.filter="blur(4px)",o.style.filter="blur(6px)",this.container.setAttribute("class","absolute top-0 left-0 w-full h-full flex items-center justify-center is-popup"),this.container.addEventListener("click",(function(e){n.event.next({event:"click-overlay",value:!0}),e.stopPropagation()})),this.popupBody.addEventListener("click",(function(e){e.stopImmediatePropagation()})),this.container.style.background="rgb(51 51 51 / 20%)",this.container.id="popup-container-"+document.querySelectorAll(".is-popup").length,this.popupBody.setAttribute("class"," zoom-out-entrance"),this.popupBody.innerHTML='',this.container.appendChild(this.popupBody),document.body.appendChild(this.container);var a=Vue.extend(e);this.instance=new a({propsData:{popup:this}}),this.instance.template=(null===(t=null==e?void 0:e.options)||void 0===t?void 0:t.template)||void 0,this.instance.render=e.render||void 0,this.instance.methods=(null===(s=null==e?void 0:e.options)||void 0===s?void 0:s.methods)||(null==e?void 0:e.methods),this.instance.data=(null===(r=null==e?void 0:e.options)||void 0===r?void 0:r.data)||(null==e?void 0:e.data),this.instance.$popup=this,this.instance.$popupParams=i,this.instance.$mount("#".concat(this.container.id," .popup-body"))}},{key:"close",value:function(){var e=this;this.instance.$destroy(),this.event.unsubscribe(),this.parentWrapper.style.filter="blur(0px)";var t=document.querySelector("body").querySelectorAll("div")[0];document.querySelectorAll(".is-popup").length<=1&&(t.style.filter="blur(0px)"),this.popupBody.classList.remove("zoom-out-entrance"),this.popupBody.classList.add("zoom-in-exit"),this.container.classList.remove("is-popup"),setTimeout((function(){e.container.remove()}),300)}}])&&i(t.prototype,s),o&&i(t,o),e}()},9624:(e,t,s)=>{"use strict";s.d(t,{S:()=>i});var r=s(3260);function n(e,t){for(var s=0;s2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"info"};return r.Observable.create((function(r){var i=s.__createSnack({message:e,label:t,type:n.type}),o=i.buttonNode,a=(i.textNode,i.snackWrapper,i.sampleSnack);o.addEventListener("click",(function(e){r.onNext(o),r.onCompleted(),a.remove()})),s.__startTimer(n.duration,a)}))}},{key:"error",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"error"};return this.show(e,t,Object.assign(Object.assign({},s),{type:"error"}))}},{key:"success",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"success"};return this.show(e,t,Object.assign(Object.assign({},s),{type:"success"}))}},{key:"info",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"info"};return this.show(e,t,Object.assign(Object.assign({},s),{type:"info"}))}},{key:"__startTimer",value:function(e,t){var s,r=function(){e>0&&!1!==e&&(s=setTimeout((function(){t.remove()}),e))};t.addEventListener("mouseenter",(function(){clearTimeout(s)})),t.addEventListener("mouseleave",(function(){r()})),r()}},{key:"__createSnack",value:function(e){var t=e.message,s=e.label,r=e.type,n=void 0===r?"info":r,i=document.getElementById("snack-wrapper")||document.createElement("div"),o=document.createElement("div"),a=document.createElement("p"),u=document.createElement("div"),c=document.createElement("button"),l="",d="";switch(n){case"info":l="text-white hover:bg-blue-400 bg-blue-500",d="bg-gray-900 text-white";break;case"error":l="text-red-700 hover:bg-white bg-white",d="bg-red-500 text-white";break;case"success":l="text-green-700 hover:bg-white bg-white",d="bg-green-500 text-white"}return a.textContent=t,s&&(c.textContent=s,c.setAttribute("class","px-3 py-2 shadow rounded-lg font-bold ".concat(l)),u.appendChild(c)),o.appendChild(a),o.appendChild(u),o.setAttribute("class","md:rounded-lg py-2 px-3 md:w-2/5 w-full z-10 md:my-2 shadow-lg flex justify-between items-center zoom-in-entrance anim-duration-300 ".concat(d)),i.appendChild(o),null===document.getElementById("snack-wrapper")&&(i.setAttribute("id","snack-wrapper"),i.setAttribute("class","absolute bottom-0 w-full flex justify-between items-center flex-col"),document.body.appendChild(i)),{snackWrapper:i,sampleSnack:o,buttonsWrapper:u,buttonNode:c,textNode:a}}}])&&n(t.prototype,s),i&&n(t,i),e}()},279:(e,t,s)=>{"use strict";s.d(t,{$:()=>u});var r=s(162),n=s(7389),i=s(2242),o=s(9531);function a(e,t){for(var s=0;sparseFloat(e.$quantities().quantity)-l)return r.kX.error((0,n.__)("Unable to add the product, there is not enough stock. Remaining %s").replace("%s",(e.$quantities().quantity-l).toString())).subscribe()}s({quantity:1})}else u.open(o.Z,{resolve:s,reject:a,product:c,data:e})}))}}])&&a(t.prototype,s),u&&a(t,u),e}()},467:(e,t,s)=>{"use strict";var r=s(7757),n=s.n(r),i=s(279),o=s(2242),a=s(162),u=s(7389);const c={data:function(){return{unitsQuantities:[],loadsUnits:!1,options:null,optionsSubscriber:null}},beforeDestroy:function(){this.optionsSubscriber.unsubscribe()},mounted:function(){var e=this;this.$popup.event.subscribe((function(t){"click-overlay"===t.event&&(e.$popupParams.reject(!1),e.$popup.close())})),this.optionsSubscriber=POS.options.subscribe((function(t){e.options=t})),void 0!==this.$popupParams.product.$original().selectedUnitQuantity?this.selectUnit(this.$popupParams.product.$original().selectedUnitQuantity):void 0!==this.$popupParams.product.$original().unit_quantities&&1===this.$popupParams.product.$original().unit_quantities.length?this.selectUnit(this.$popupParams.product.$original().unit_quantities[0]):(this.loadsUnits=!0,this.loadUnits())},methods:{__:u.__,displayRightPrice:function(e){return POS.getSalePrice(e)},loadUnits:function(){var e=this;a.ih.get("/api/nexopos/v4/products/".concat(this.$popupParams.product.$original().id,"/units/quantities")).subscribe((function(t){if(0===t.length)return e.$popup.close(),a.kX.error((0,u.__)("This product doesn't have any unit defined for selling.")).subscribe();e.unitsQuantities=t,1===e.unitsQuantities.length&&e.selectUnit(e.unitsQuantities[0])}))},selectUnit:function(e){this.$popupParams.resolve({unit_quantity_id:e.id,unit_name:e.unit.name,$quantities:function(){return e}}),this.$popup.close()}}};const l=(0,s(1900).Z)(c,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"h-full w-full flex items-center justify-center"},[e.unitsQuantities.length>0?s("div",{staticClass:"bg-white w-2/3-screen lg:w-1/3-screen overflow-hidden flex flex-col"},[s("div",{staticClass:"h-16 flex justify-center items-center flex-shrink-0",attrs:{id:"header"}},[s("h3",{staticClass:"font-bold text-gray-700"},[e._v(e._s(e.__("Choose Selling Unit")))])]),e._v(" "),e.unitsQuantities.length>0?s("div",{staticClass:"grid grid-flow-row grid-cols-2 overflow-y-auto"},e._l(e.unitsQuantities,(function(t){return s("div",{key:t.id,staticClass:"hover:bg-gray-200 cursor-pointer border flex-shrink-0 border-gray-200 flex flex-col items-center justify-center",on:{click:function(s){return e.selectUnit(t)}}},[s("div",{staticClass:"h-40 w-full flex items-center justify-center overflow-hidden"},[t.preview_url?s("img",{staticClass:"object-cover h-full",attrs:{src:t.preview_url,alt:t.unit.name}}):e._e(),e._v(" "),t.preview_url?e._e():s("div",{staticClass:"h-40 flex items-center justify-center"},[s("i",{staticClass:"las la-image text-gray-600 text-6xl"})])]),e._v(" "),s("div",{staticClass:"h-0 w-full"},[s("div",{staticClass:"relative w-full flex items-center justify-center -top-10 h-20 py-2 flex-col",staticStyle:{background:"rgb(255 255 255 / 73%)"}},[s("h3",{staticClass:"font-bold text-gray-700 py-2 text-center"},[e._v(e._s(t.unit.name)+" ("+e._s(t.quantity)+")")]),e._v(" "),s("p",{staticClass:"text-sm font-medium text-gray-600"},[e._v(e._s(e._f("currency")(e.displayRightPrice(t))))])])])])})),0):e._e()]):e._e(),e._v(" "),0===e.unitsQuantities.length?s("div",{staticClass:"h-56 flex items-center justify-center"},[s("ns-spinner")],1):e._e()])}),[],!1,null,null,null).exports;function d(e,t){for(var s=0;s=544&&window.innerWidth<768?this.screenIs="sm":window.innerWidth>=768&&window.innerWidth<992?this.screenIs="md":window.innerWidth>=992&&window.innerWidth<1200?this.screenIs="lg":window.innerWidth>=1200&&(this.screenIs="xl")}},{key:"is",value:function(e){return void 0===e?this.screenIs:this.screenIs===e}}])&&v(t.prototype,s),r&&v(t,r),e}(),m=s(381),b=s.n(m);function g(e,t){for(var s=0;s0){var r=e.order.getValue();r.type=s[0],e.order.next(r)}})),window.addEventListener("resize",(function(){e._responsive.detect(),e.defineCurrentScreen()})),window.onbeforeunload=function(){if(e.products.getValue().length>0)return(0,u.__)("Some products has been added to the cart. Would youl ike to discard this order ?")},this.defineCurrentScreen()}},{key:"getSalePrice",value:function(e,t){switch(t.tax_type){case"inclusive":return e.incl_tax_sale_price;default:return e.excl_tax_sale_price}}},{key:"getCustomPrice",value:function(e,t){switch(t.tax_type){case"inclusive":return e.incl_tax_custom_price;default:return e.excl_tax_custom_price}}},{key:"getWholesalePrice",value:function(e,t){switch(t.tax_type){case"inclusive":return e.incl_tax_wholesale_price;default:return e.excl_tax_wholesale_price}}},{key:"setHoldPopupEnabled",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this._holdPopupEnabled=e}},{key:"getHoldPopupEnabled",value:function(){return this._holdPopupEnabled}},{key:"processInitialQueue",value:function(){return y(this,void 0,void 0,n().mark((function e(){var t;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=n().keys(this._initialQueue);case 1:if((e.t1=e.t0()).done){e.next=14;break}return t=e.t1.value,e.prev=3,e.next=6,this._initialQueue[t]();case 6:e.sent,e.next=12;break;case 9:e.prev=9,e.t2=e.catch(3),a.kX.error(e.t2.message).subscribe();case 12:e.next=1;break;case 14:case"end":return e.stop()}}),e,this,[[3,9]])})))}},{key:"removeCoupon",value:function(e){var t=this.order.getValue(),s=t.coupons,r=s.indexOf(e);s.splice(r,1),t.coupons=s,this.order.next(t)}},{key:"pushCoupon",value:function(e){var t=this.order.getValue();t.coupons.forEach((function(t){if(t.code===e.code){var s=(0,u.__)("This coupon is already added to the cart");throw a.kX.error(s).subscribe(),s}})),t.coupons.push(e),this.order.next(t),this.refreshCart()}},{key:"header",get:function(){var e={buttons:{NsPosDashboardButton:x,NsPosPendingOrderButton:w,NsPosOrderTypeButton:C,NsPosCustomersButton:k,NsPosResetButton:P}};return"yes"===this.options.getValue().ns_pos_registers_enabled&&(e.buttons.NsPosCashRegister=j),a.kq.doAction("ns-pos-header",e),e}},{key:"defineOptions",value:function(e){this._options.next(e)}},{key:"defineCurrentScreen",value:function(){this._visibleSection.next(["xs","sm"].includes(this._responsive.is())?"grid":"both"),this._screen.next(this._responsive.is())}},{key:"changeVisibleSection",value:function(e){["both","cart","grid"].includes(e)&&(["cart","both"].includes(e)&&this.refreshCart(),this._visibleSection.next(e))}},{key:"addPayment",value:function(e){if(e.value>0){var t=this._order.getValue();return t.payments.push(e),this._order.next(t),this.computePaid()}return a.kX.error("Invalid amount.").subscribe()}},{key:"removePayment",value:function(e){if(void 0!==e.id)return a.kX.error("Unable to delete a payment attached to the order").subscribe();var t=this._order.getValue(),s=t.payments.indexOf(e);t.payments.splice(s,1),this._order.next(t),a.l.emit({identifier:"ns.pos.remove-payment",value:e}),this.updateCustomerAccount(e),this.computePaid()}},{key:"updateCustomerAccount",value:function(e){if("account-payment"===e.identifier){var t=this.order.getValue().customer;t.account_amount+=e.value,this.selectCustomer(t)}}},{key:"getNetPrice",value:function(e,t,s){return"inclusive"===s?e/(t+100)*100:"exclusive"===s?e/100*(t+100):void 0}},{key:"getVatValue",value:function(e,t,s){return"inclusive"===s?e-this.getNetPrice(e,t,s):"exclusive"===s?this.getNetPrice(e,t,s)-e:void 0}},{key:"computeTaxes",value:function(){var e=this;return new Promise((function(t,s){var r=e.order.getValue();if(void 0===(r=e.computeProductsTaxes(r)).tax_group_id||null===r.tax_group_id)return s(!1);var n=r.tax_groups;return n&&void 0!==n[r.tax_group_id]?(r.taxes=r.taxes.map((function(t){return t.tax_value=e.getVatValue(r.subtotal,t.rate,r.tax_type),t})),r=e.computeOrderTaxes(r),t({status:"success",data:{tax:n[r.tax_group_id],order:r}})):null!==r.tax_group_id&&r.tax_group_id.toString().length>0?void a.ih.get("/api/nexopos/v4/taxes/groups/".concat(r.tax_group_id)).subscribe({next:function(s){return r.tax_groups=r.tax_groups||[],r.taxes=s.taxes.map((function(t){return{tax_id:t.id,tax_name:t.name,rate:parseFloat(t.rate),tax_value:e.getVatValue(r.subtotal,t.rate,r.tax_type)}})),r.tax_groups[s.id]=s,r=e.computeOrderTaxes(r),t({status:"success",data:{tax:s,order:r}})},error:function(e){return s(e)}}):s({status:"failed",message:(0,u.__)("No tax group assigned to the order")})}))}},{key:"computeOrderTaxes",value:function(e){var t=this.options.getValue().ns_pos_vat;return["flat_vat","variable_vat","products_variable_vat"].includes(t)&&e.taxes&&e.taxes.length>0&&(e.tax_value+=e.taxes.map((function(e){return e.tax_value})).reduce((function(e,t){return e+t}))),e.tax_value+=e.product_taxes,e}},{key:"computeProductsTaxes",value:function(e){var t=this.products.getValue(),s=t.map((function(e){return e.tax_value}));e.product_taxes=0;var r=this.options.getValue().ns_pos_vat;return["products_vat","products_flat_vat","products_variable_vat"].includes(r)&&s.length>0&&(e.product_taxes+=s.reduce((function(e,t){return e+t}))),e.products=t,e.total_products=t.length,e}},{key:"canProceedAsLaidAway",value:function(e){var t=this;return new Promise((function(s,r){return y(t,void 0,void 0,n().mark((function t(){var i,a,c,l,d,p,f,v=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=e.customer.group.minimal_credit_payment,a=(e.total*i/100).toFixed(ns.currency.ns_currency_precision),a=parseFloat(a),t.prev=3,t.next=6,new Promise((function(t,s){o.G.show(T,{order:e,reject:s,resolve:t})}));case 6:if(!(0===(c=t.sent).instalments.length&&c.tendered=a&&b()(e.date).isSame(ns.date.moment.startOf("day"),"day")}))).length){t.next=17;break}return t.abrupt("return",s({status:"success",message:(0,u.__)("Layaway defined"),data:{order:c}}));case 17:f=p[0].amount,o.G.show(S,{title:(0,u.__)("Confirm Payment"),message:(0,u.__)('An instalment has been detected. Would you like to add as first payment {amount} for the selected payment type "{paymentType}"?').replace("{amount}",h.default.filter("currency")(f)).replace("{paymentType}",d.label),onAction:function(e){var t={identifier:d.identifier,label:d.label,value:f,readonly:!1,selected:!0};v.addPayment(t),p[0].paid=!0,s({status:"success",message:(0,u.__)("Layaway defined"),data:{order:c}})}});case 19:t.next=24;break;case 21:return t.prev=21,t.t0=t.catch(3),t.abrupt("return",r(t.t0));case 24:case"end":return t.stop()}}),t,this,[[3,21]])})))}))}},{key:"submitOrder",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Promise((function(s,r){return y(e,void 0,void 0,n().mark((function e(){var i,o,c,l,d,p=this;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=Object.assign(Object.assign({},this.order.getValue()),t),o=i.customer.group.minimal_credit_payment,"hold"===i.payment_status){e.next=20;break}if(!(0===i.payments.length||i.total>i.tendered)){e.next=20;break}if("no"!==this.options.getValue().ns_orders_allow_partial){e.next=9;break}return c=(0,u.__)("Partially paid orders are disabled."),e.abrupt("return",r({status:"failed",message:c}));case 9:if(!(o>=0)){e.next=20;break}return e.prev=10,e.next=13,this.canProceedAsLaidAway(i);case 13:l=e.sent,i=l.data.order,e.next=20;break;case 17:return e.prev=17,e.t0=e.catch(10),e.abrupt("return",r(e.t0));case 20:if(this._isSubmitting){e.next=24;break}return d=void 0!==i.id?"put":"post",this._isSubmitting=!0,e.abrupt("return",a.ih[d]("/api/nexopos/v4/orders".concat(void 0!==i.id?"/"+i.id:""),i).subscribe({next:function(e){s(e),p.reset(),a.kq.doAction("ns-order-submit-successful",e),p._isSubmitting=!1;var t=p.options.getValue().ns_pos_complete_sale_audio;t.length>0&&new Audio(t).play()},error:function(e){p._isSubmitting=!1,r(e),a.kq.doAction("ns-order-submit-failed",e)}}));case 24:return e.abrupt("return",r({status:"failed",message:(0,u.__)("An order is currently being processed.")}));case 25:case"end":return e.stop()}}),e,this,[[10,17]])})))}))}},{key:"loadOrder",value:function(e){var t=this;return new Promise((function(s,r){a.ih.get("/api/nexopos/v4/orders/".concat(e,"/pos")).subscribe((function(e){return y(t,void 0,void 0,n().mark((function t(){var r;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=Object.assign(Object.assign({},this.defaultOrder()),e),r=e.products.map((function(e){return e.$original=function(){return e.product},e.$quantities=function(){return e.product.unit_quantities.filter((function(t){return t.id===e.unit_quantity_id}))[0]},e})),e.type=Object.values(this.types.getValue()).filter((function(t){return t.identifier===e.type}))[0],e.addresses={shipping:e.shipping_address,billing:e.billing_address},delete e.shipping_address,delete e.billing_address,this.buildOrder(e),this.buildProducts(r),t.next=10,this.selectCustomer(e.customer);case 10:s(e);case 11:case"end":return t.stop()}}),t,this)})))}),(function(e){return r(e)}))}))}},{key:"buildOrder",value:function(e){this.order.next(e)}},{key:"buildProducts",value:function(e){this.refreshProducts(e),this.products.next(e)}},{key:"printOrder",value:function(e){var t=this.options.getValue();if("disabled"===t.ns_pos_printing_enabled_for)return!1;switch(t.ns_pos_printing_gateway){case"default":this.processRegularPrinting(e);break;default:this.processCustomPrinting(e,t.ns_pos_printing_gateway)}}},{key:"processCustomPrinting",value:function(e,t){a.kq.applyFilters("ns-order-custom-print",{printed:!1,order_id:e,gateway:t}).printed||a.kX.error((0,u.__)("Unsupported print gateway.")).subscribe()}},{key:"processRegularPrinting",value:function(e){var t=document.querySelector("printing-section");t&&t.remove();var s=document.createElement("iframe");s.id="printing-section",s.className="hidden",s.src=this.settings.getValue().urls.printing_url.replace("{id}",e),document.body.appendChild(s)}},{key:"computePaid",value:function(){var e=this._order.getValue();e.tendered=0,e.payments.length>0&&(e.tendered=e.payments.map((function(e){return e.value})).reduce((function(e,t){return t+e}))),e.tendered>=e.total?e.payment_status="paid":e.tendered>0&&e.tendered0&&(t.products.filter((function(t){return e.products.map((function(e){return e.product_id})).includes(t.product_id)})).length>0||-1!==s.indexOf(e)||s.push(e)),e.categories.length>0&&(t.products.filter((function(t){return e.categories.map((function(e){return e.category_id})).includes(t.$original().category_id)})).length>0||-1!==s.indexOf(e)||s.push(e))})),s.forEach((function(t){a.kX.error((0,u.__)('The coupons "%s" has been removed from the cart, as it\'s required conditions are no more meet.').replace("%s",t.name),(0,u.__)("Okay"),{duration:6e3}).subscribe(),e.removeCoupon(t)}))}},{key:"refreshCart",value:function(){return y(this,void 0,void 0,n().mark((function e(){var t,s,r,i,o,c,l,d,p;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.checkCart(),t=this.products.getValue(),s=this.order.getValue(),(r=t.map((function(e){return e.total_price}))).length>0?s.subtotal=r.reduce((function(e,t){return e+t})):s.subtotal=0,i=s.coupons.map((function(e){return"percentage_discount"===e.type?(e.value=s.subtotal*e.discount_value/100,e.value):(e.value=e.discount_value,e.value)})),s.total_coupons=0,i.length>0&&(s.total_coupons=i.reduce((function(e,t){return e+t}))),"percentage"===s.discount_type&&(s.discount=s.discount_percentage*s.subtotal/100),s.discount>s.subtotal&&0===s.total_coupons&&(s.discount=s.subtotal,a.kX.info("The discount has been set to the cart subtotal").subscribe()),s.tax_value=0,this.order.next(s),e.prev=12,e.next=15,this.computeTaxes();case 15:o=e.sent,s=o.data.order,e.next=22;break;case 19:e.prev=19,e.t0=e.catch(12),!1!==e.t0&&void 0!==e.t0.message&&a.kX.error(e.t0.message||(0,u.__)("An unexpected error has occured while fecthing taxes."),(0,u.__)("OKAY"),{duration:0}).subscribe();case 22:(c=t.map((function(e){return"inclusive"===e.tax_type?e.tax_value:0}))).length>0&&c.reduce((function(e,t){return e+t})),l=s.tax_type,d=this.options.getValue().ns_pos_vat,p=0,(["flat_vat","variable_vat"].includes(d)||["products_vat","products_flat_vat","products_variable_vat"].includes(d))&&(p=s.tax_value),s.total="exclusive"===l?+(s.subtotal+(s.shipping||0)+p-s.discount-s.total_coupons).toFixed(ns.currency.ns_currency_precision):+(s.subtotal+(s.shipping||0)-s.discount-s.total_coupons).toFixed(ns.currency.ns_currency_precision),this.order.next(s),a.kq.doAction("ns-cart-after-refreshed",s);case 32:case"end":return e.stop()}}),e,this,[[12,19]])})))}},{key:"getStockUsage",value:function(e,t){var s=this._products.getValue().filter((function(s){return s.product_id===e&&s.unit_quantity_id===t})).map((function(e){return e.quantity}));return s.length>0?s.reduce((function(e,t){return e+t})):0}},{key:"addToCart",value:function(e){return y(this,void 0,void 0,n().mark((function t(){var s,r,i,o,a,u,c;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(s=new Object,r={product_id:e.id||0,name:e.name,discount_type:"percentage",discount:0,discount_percentage:0,quantity:e.quantity||0,tax_group_id:e.tax_group_id,tax_type:e.tax_type||void 0,tax_value:0,unit_id:e.unit_id||0,unit_price:e.unit_price||0,unit_name:e.unit_name||"",total_price:0,mode:"normal",$original:e.$original||function(){return e},$quantities:e.$quantities||void 0},this._processingAddQueue=!0,0===r.product_id){t.next=22;break}t.t0=n().keys(this.addToCartQueue);case 5:if((t.t1=t.t0()).done){t.next=22;break}return i=t.t1.value,t.prev=7,o=new this.addToCartQueue[i](r),t.next=11,o.run(s);case 11:a=t.sent,s=Object.assign(Object.assign({},s),a),t.next=20;break;case 15:if(t.prev=15,t.t2=t.catch(7),!1!==t.t2){t.next=20;break}return this._processingAddQueue=!1,t.abrupt("return",!1);case 20:t.next=5;break;case 22:this._processingAddQueue=!1,r=Object.assign(Object.assign({},r),s),(u=this._products.getValue()).unshift(r),this.refreshProducts(u),this._products.next(u),(c=this.options.getValue().ns_pos_new_item_audio).length>0&&new Audio(c).play();case 30:case"end":return t.stop()}}),t,this,[[7,15]])})))}},{key:"defineTypes",value:function(e){this._types.next(e)}},{key:"removeProduct",value:function(e){var t=this._products.getValue(),s=t.indexOf(e);t.splice(s,1),this._products.next(t)}},{key:"updateProduct",value:function(e,t){var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=this._products.getValue();s=null===s?r.indexOf(e):s,h.default.set(r,s,Object.assign(Object.assign({},e),t)),this.refreshProducts(r),this._products.next(r)}},{key:"refreshProducts",value:function(e){var t=this;e.forEach((function(e){t.computeProduct(e)}))}},{key:"computeProductTax",value:function(e){switch(console.log(e.mode),e.mode){case"custom":return this.computeCustomProductTax(e);case"normal":return this.computeNormalProductTax(e);case"wholesale":return this.computeWholesaleProductTax(e);default:return e}}},{key:"proceedProductTaxComputation",value:function(e,t){var s=this,r=e.$original(),n=r.tax_group,i=0,o=0,a=0;if(void 0!==n.taxes){var u=0;n.taxes.length>0&&(u=n.taxes.map((function(e){return e.rate})).reduce((function(e,t){return e+t})));var c=this.getNetPrice(t,u,r.tax_type);switch(r.tax_type){case"inclusive":i=c,a=t;break;case"exclusive":i=t,a=c}var l=n.taxes.map((function(e){return s.getVatValue(t,e.rate,r.tax_type)}));l.length>0&&(o=l.reduce((function(e,t){return e+t})))}return{price_without_tax:i,tax_value:o,price_with_tax:a}}},{key:"computeCustomProductTax",value:function(e){e.$original();var t=e.$quantities(),s=this.proceedProductTaxComputation(e,t.custom_price_edit);return t.excl_tax_custom_price=s.price_without_tax,t.incl_tax_custom_price=s.price_with_tax,t.custom_price_tax=s.tax_value,e.$quantities=function(){return t},e}},{key:"computeNormalProductTax",value:function(e){e.$original();var t=e.$quantities(),s=this.proceedProductTaxComputation(e,t.sale_price_edit);return t.excl_tax_sale_price=s.price_without_tax,t.incl_tax_sale_price=s.price_with_tax,t.sale_price_tax=s.tax_value,e.$quantities=function(){return t},e}},{key:"computeWholesaleProductTax",value:function(e){e.$original();var t=e.$quantities(),s=this.proceedProductTaxComputation(e,t.wholesale_price_edit);return t.excl_tax_wholesale_price=s.price_without_tax,t.incl_tax_wholesale_price=s.price_with_tax,t.wholesale_price_tax=s.tax_value,e.$quantities=function(){return t},e}},{key:"computeProduct",value:function(e){"normal"===e.mode?(e.unit_price=this.getSalePrice(e.$quantities(),e.$original()),e.tax_value=e.$quantities().sale_price_tax*e.quantity):"wholesale"===e.mode&&(e.unit_price=this.getWholesalePrice(e.$quantities(),e.$original()),e.tax_value=e.$quantities().wholesale_price_tax*e.quantity),"custom"===e.mode&&(e.unit_price=this.getCustomPrice(e.$quantities(),e.$original()),e.tax_value=e.$quantities().custom_price_tax*e.quantity),["flat","percentage"].includes(e.discount_type)&&"percentage"===e.discount_type&&(e.discount=e.unit_price*e.discount_percentage/100*e.quantity),e.total_price=e.unit_price*e.quantity-e.discount,a.kq.doAction("ns-after-product-computed",e)}},{key:"loadCustomer",value:function(e){return a.ih.get("/api/nexopos/v4/customers/".concat(e))}},{key:"defineSettings",value:function(e){this._settings.next(e)}},{key:"voidOrder",value:function(e){var t=this;void 0!==e.id?["hold"].includes(e.payment_status)?o.G.show(S,{title:"Order Deletion",message:"The current order will be deleted as no payment has been made so far.",onAction:function(s){s&&a.ih.delete("/api/nexopos/v4/orders/".concat(e.id)).subscribe((function(e){a.kX.success(e.message).subscribe(),t.reset()}),(function(e){return a.kX.error(e.message).subscribe()}))}}):o.G.show($,{title:"Void The Order",message:"The current order will be void. This will cancel the transaction, but the order won't be deleted. Further details about the operation will be tracked on the report. Consider providing the reason of this operation.",onAction:function(s){!1!==s&&a.ih.post("/api/nexopos/v4/orders/".concat(e.id,"/void"),{reason:s}).subscribe((function(e){a.kX.success(e.message).subscribe(),t.reset()}),(function(e){return a.kX.error(e.message).subscribe()}))}}):a.kX.error("Unable to void an unpaid order.").subscribe()}},{key:"triggerOrderTypeSelection",value:function(e){return y(this,void 0,void 0,n().mark((function t(){var s;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:s=0;case 1:if(!(s{var r={"./af":2786,"./af.js":2786,"./ar":867,"./ar-dz":4130,"./ar-dz.js":4130,"./ar-kw":6135,"./ar-kw.js":6135,"./ar-ly":6440,"./ar-ly.js":6440,"./ar-ma":7702,"./ar-ma.js":7702,"./ar-sa":6040,"./ar-sa.js":6040,"./ar-tn":7100,"./ar-tn.js":7100,"./ar.js":867,"./az":1083,"./az.js":1083,"./be":9808,"./be.js":9808,"./bg":8338,"./bg.js":8338,"./bm":7438,"./bm.js":7438,"./bn":8905,"./bn-bd":6225,"./bn-bd.js":6225,"./bn.js":8905,"./bo":1560,"./bo.js":1560,"./br":1278,"./br.js":1278,"./bs":622,"./bs.js":622,"./ca":2468,"./ca.js":2468,"./cs":5822,"./cs.js":5822,"./cv":877,"./cv.js":877,"./cy":7373,"./cy.js":7373,"./da":4780,"./da.js":4780,"./de":9740,"./de-at":217,"./de-at.js":217,"./de-ch":894,"./de-ch.js":894,"./de.js":9740,"./dv":5300,"./dv.js":5300,"./el":837,"./el.js":837,"./en-au":8348,"./en-au.js":8348,"./en-ca":7925,"./en-ca.js":7925,"./en-gb":2243,"./en-gb.js":2243,"./en-ie":6436,"./en-ie.js":6436,"./en-il":7207,"./en-il.js":7207,"./en-in":4175,"./en-in.js":4175,"./en-nz":6319,"./en-nz.js":6319,"./en-sg":1662,"./en-sg.js":1662,"./eo":2915,"./eo.js":2915,"./es":7093,"./es-do":5251,"./es-do.js":5251,"./es-mx":6112,"./es-mx.js":6112,"./es-us":1146,"./es-us.js":1146,"./es.js":7093,"./et":5603,"./et.js":5603,"./eu":7763,"./eu.js":7763,"./fa":6959,"./fa.js":6959,"./fi":1897,"./fi.js":1897,"./fil":2549,"./fil.js":2549,"./fo":4694,"./fo.js":4694,"./fr":4470,"./fr-ca":3049,"./fr-ca.js":3049,"./fr-ch":2330,"./fr-ch.js":2330,"./fr.js":4470,"./fy":5044,"./fy.js":5044,"./ga":9295,"./ga.js":9295,"./gd":2101,"./gd.js":2101,"./gl":8794,"./gl.js":8794,"./gom-deva":7884,"./gom-deva.js":7884,"./gom-latn":3168,"./gom-latn.js":3168,"./gu":5349,"./gu.js":5349,"./he":4206,"./he.js":4206,"./hi":94,"./hi.js":94,"./hr":316,"./hr.js":316,"./hu":2138,"./hu.js":2138,"./hy-am":1423,"./hy-am.js":1423,"./id":9218,"./id.js":9218,"./is":135,"./is.js":135,"./it":626,"./it-ch":150,"./it-ch.js":150,"./it.js":626,"./ja":9183,"./ja.js":9183,"./jv":4286,"./jv.js":4286,"./ka":2105,"./ka.js":2105,"./kk":7772,"./kk.js":7772,"./km":8758,"./km.js":8758,"./kn":9282,"./kn.js":9282,"./ko":3730,"./ko.js":3730,"./ku":1408,"./ku.js":1408,"./ky":3291,"./ky.js":3291,"./lb":6841,"./lb.js":6841,"./lo":5466,"./lo.js":5466,"./lt":7010,"./lt.js":7010,"./lv":7595,"./lv.js":7595,"./me":9861,"./me.js":9861,"./mi":5493,"./mi.js":5493,"./mk":5966,"./mk.js":5966,"./ml":7341,"./ml.js":7341,"./mn":5115,"./mn.js":5115,"./mr":370,"./mr.js":370,"./ms":9847,"./ms-my":1237,"./ms-my.js":1237,"./ms.js":9847,"./mt":2126,"./mt.js":2126,"./my":6165,"./my.js":6165,"./nb":4924,"./nb.js":4924,"./ne":6744,"./ne.js":6744,"./nl":3901,"./nl-be":9814,"./nl-be.js":9814,"./nl.js":3901,"./nn":3877,"./nn.js":3877,"./oc-lnc":2135,"./oc-lnc.js":2135,"./pa-in":5858,"./pa-in.js":5858,"./pl":4495,"./pl.js":4495,"./pt":9520,"./pt-br":7971,"./pt-br.js":7971,"./pt.js":9520,"./ro":6459,"./ro.js":6459,"./ru":238,"./ru.js":238,"./sd":950,"./sd.js":950,"./se":490,"./se.js":490,"./si":124,"./si.js":124,"./sk":4249,"./sk.js":4249,"./sl":4985,"./sl.js":4985,"./sq":1104,"./sq.js":1104,"./sr":9131,"./sr-cyrl":9915,"./sr-cyrl.js":9915,"./sr.js":9131,"./ss":5893,"./ss.js":5893,"./sv":8760,"./sv.js":8760,"./sw":1172,"./sw.js":1172,"./ta":7333,"./ta.js":7333,"./te":3110,"./te.js":3110,"./tet":2095,"./tet.js":2095,"./tg":7321,"./tg.js":7321,"./th":9041,"./th.js":9041,"./tk":9005,"./tk.js":9005,"./tl-ph":5768,"./tl-ph.js":5768,"./tlh":9444,"./tlh.js":9444,"./tr":2397,"./tr.js":2397,"./tzl":8254,"./tzl.js":8254,"./tzm":1106,"./tzm-latn":699,"./tzm-latn.js":699,"./tzm.js":1106,"./ug-cn":9288,"./ug-cn.js":9288,"./uk":7691,"./uk.js":7691,"./ur":3795,"./ur.js":3795,"./uz":6791,"./uz-latn":588,"./uz-latn.js":588,"./uz.js":6791,"./vi":5666,"./vi.js":5666,"./x-pseudo":4378,"./x-pseudo.js":4378,"./yo":5805,"./yo.js":5805,"./zh-cn":3839,"./zh-cn.js":3839,"./zh-hk":5726,"./zh-hk.js":5726,"./zh-mo":9807,"./zh-mo.js":9807,"./zh-tw":4152,"./zh-tw.js":4152};function n(e){var t=i(e);return s(t)}function i(e){if(!s.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}n.keys=function(){return Object.keys(r)},n.resolve=i,e.exports=n,n.id=6700},3968:(e,t,s)=>{"use strict";s.d(t,{Z:()=>o});function r(e){return function(e){if(Array.isArray(e))return n(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return n(e,t);var s=Object.prototype.toString.call(e).slice(8,-1);"Object"===s&&e.constructor&&(s=e.constructor.name);if("Map"===s||"Set"===s)return Array.from(e);if("Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return n(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var s=0,r=new Array(t);s100?100:this.backValue))),"0"===this.backValue&&(this.backValue=""),this.$emit("changed",this.floating&&this.backValue.length>0?parseFloat(this.backValue/this.number):this.backValue)):this.$emit("next",this.floating&&this.backValue.length>0?parseFloat(this.backValue/this.number):this.backValue)}}};const o=(0,s(1900).Z)(i,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"grid grid-flow-row grid-cols-3 gap-2 grid-rows-3",staticStyle:{padding:"1px"},attrs:{id:"numpad"}},[e._l(e.keys,(function(t,r){return s("div",{key:r,staticClass:"hover:bg-gray-400 hover:text-gray-800 bg-gray-300 text-2xl text-gray-700 border h-16 flex items-center justify-center cursor-pointer",staticStyle:{margin:"-1px"},on:{click:function(s){return e.inputValue(t)}}},[void 0!==t.value?s("span",[e._v(e._s(t.value))]):e._e(),e._v(" "),t.icon?s("i",{staticClass:"las",class:t.icon}):e._e()])})),e._v(" "),e._t("numpad-footer")],2)}),[],!1,null,null,null).exports},1384:(e,t,s)=>{"use strict";s.d(t,{Z:()=>o});var r=s(2242),n=s(5872);const i={name:"ns-pos-customers-button",methods:{__:s(7389).__,openPendingOrdersPopup:function(){(new r.G).open(n.Z)}}};const o=(0,s(1900).Z)(i,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("button",{staticClass:"flex-shrink-0 h-12 flex items-center shadow rounded px-2 py-1 text-sm bg-white text-gray-700",on:{click:function(t){return e.openPendingOrdersPopup()}}},[s("i",{staticClass:"mr-1 text-xl lar la-user-circle"}),e._v(" "),s("span",[e._v(e._s(e.__("Customers")))])])}),[],!1,null,null,null).exports},8927:(e,t,s)=>{"use strict";s.d(t,{Z:()=>n});const r={name:"ns-pos-dashboard-button",methods:{__:s(7389).__,goToDashboard:function(){return document.location=POS.settings.getValue().urls.dashboard_url}}};const n=(0,s(1900).Z)(r,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("button",{staticClass:"flex-shrink-0 h-12 flex items-center shadow rounded px-2 py-1 text-sm bg-white text-gray-700",on:{click:function(t){return e.goToDashboard()}}},[s("i",{staticClass:"mr-1 text-xl las la-tachometer-alt"}),e._v(" "),s("span",[e._v(e._s(e.__("Dashboard")))])])}),[],!1,null,null,null).exports},6568:(e,t,s)=>{"use strict";s.d(t,{Z:()=>o});var r=s(2242),n=s(3625);const i={name:"ns-pos-delivery-button",methods:{__:s(7389).__,openPendingOrdersPopup:function(){new r.G({primarySelector:"#pos-app",popupClass:"shadow-lg bg-white w-3/5 md:w-2/3 lg:w-2/5 xl:w-2/4"}).open(n.Z)}}};const o=(0,s(1900).Z)(i,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("button",{staticClass:"flex-shrink-0 h-12 flex items-center shadow rounded px-2 py-1 text-sm bg-white text-gray-700",on:{click:function(t){return e.openPendingOrdersPopup()}}},[s("i",{staticClass:"mr-1 text-xl las la-truck"}),e._v(" "),s("span",[e._v(e._s(e.__("Order Type")))])])}),[],!1,null,null,null).exports},661:(e,t,s)=>{"use strict";s.d(t,{Z:()=>h});var r=s(2242),n=s(162),i=s(419),o=s(7389);const a={data:function(){return{products:[],isLoading:!1}},computed:{order:function(){return this.$popupParams.order}},mounted:function(){this.loadProducts()},methods:{__:o.__,close:function(){this.$popupParams.reject(!1),this.$popup.close()},loadProducts:function(){var e=this;this.isLoading=!0;var t=this.$popupParams.order.id;n.ih.get("/api/nexopos/v4/orders/".concat(t,"/products")).subscribe((function(t){e.isLoading=!1,e.products=t}))},openOrder:function(){this.$popup.close(),this.$popupParams.resolve(this.order)}}};var u=s(1900);const c=(0,u.Z)(a,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"shadow-lg bg-white w-6/7-screen md:w-3/5-screen lg:w-2/5-screen h-6/7-screen flex flex-col overflow-hidden"},[s("div",{staticClass:"p-2 flex justify-between text-gray-700 items-center border-b"},[s("h3",{staticClass:"font-semibold"},[e._v(e._s(e.__("Products"))+" — "+e._s(e.order.code)+" "),e.order.title?s("span",[e._v("("+e._s(e.order.title)+")")]):e._e()]),e._v(" "),s("div",[s("ns-close-button",{on:{click:function(t){return e.close()}}})],1)]),e._v(" "),s("div",{staticClass:"flex-auto p-2 overflow-y-auto"},[e.isLoading?s("div",{staticClass:"flex-auto relative"},[s("div",{staticClass:"h-full w-full flex items-center justify-center"},[s("ns-spinner")],1)]):e._e(),e._v(" "),e.isLoading?e._e():e._l(e.products,(function(t){return s("div",{key:t.id,staticClass:"item"},[s("div",{staticClass:"flex-col border-b border-blue-400 py-2"},[s("div",{staticClass:"title font-semibold text-gray-700 flex justify-between"},[s("span",[e._v(e._s(t.name)+" (x"+e._s(t.quantity)+")")]),e._v(" "),s("span",[e._v(e._s(e._f("currency")(t.total_price)))])]),e._v(" "),s("div",{staticClass:"text-sm text-gray-600"},[s("ul",[s("li",[e._v(e._s(e.__("Unit"))+" : "+e._s(t.unit.name))])])])])])}))],2),e._v(" "),s("div",{staticClass:"flex justify-end p-2 border-t border-gray-400"},[s("div",{staticClass:"px-1"},[s("div",{staticClass:"-mx-2 flex"},[s("div",{staticClass:"px-1"},[s("ns-button",{attrs:{type:"info"},on:{click:function(t){return e.openOrder()}}},[e._v(e._s(e.__("Open")))])],1),e._v(" "),s("div",{staticClass:"px-1"},[s("ns-button",{attrs:{type:"danger"},on:{click:function(t){return e.close()}}},[e._v(e._s(e.__("Close")))])],1)])])])])}),[],!1,null,null,null).exports;const l={props:["orders"],data:function(){return{searchField:""}},watch:{orders:function(){n.kq.doAction("ns-pos-pending-orders-refreshed",this.orders)}},mounted:function(){},name:"ns-pos-pending-order",methods:{__:o.__,previewOrder:function(e){this.$emit("previewOrder",e)},proceedOpenOrder:function(e){this.$emit("proceedOpenOrder",e)},searchOrder:function(){this.$emit("searchOrder",this.searchField)},printOrder:function(e){this.$emit("printOrder",e)}}};const d={components:{nsPosPendingOrders:(0,u.Z)(l,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"flex flex-auto flex-col overflow-hidden"},[s("div",{staticClass:"p-1"},[s("div",{staticClass:"flex rounded border-2 border-blue-400"},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.searchField,expression:"searchField"}],staticClass:"p-2 outline-none flex-auto",attrs:{type:"text"},domProps:{value:e.searchField},on:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.searchOrder()},input:function(t){t.target.composing||(e.searchField=t.target.value)}}}),e._v(" "),s("button",{staticClass:"w-16 md:w-24 bg-blue-400 text-white",on:{click:function(t){return e.searchOrder()}}},[s("i",{staticClass:"las la-search"}),e._v(" "),s("span",{staticClass:"mr-1 hidden md:visible"},[e._v(e._s(e.__("Search")))])])])]),e._v(" "),s("div",{staticClass:"overflow-y-auto flex flex-auto"},[s("div",{staticClass:"flex p-2 flex-auto flex-col overflow-y-auto"},[e._l(e.orders,(function(t){return s("div",{key:t.id,staticClass:"border-b border-blue-400 w-full py-2",attrs:{"data-order-id":t.id}},[s("h3",{staticClass:"text-gray-700"},[e._v(e._s(t.title||"Untitled Order"))]),e._v(" "),s("div",{staticClass:"px-2"},[s("div",{staticClass:"flex flex-wrap -mx-4"},[s("div",{staticClass:"w-full md:w-1/2 px-2"},[s("p",{staticClass:"text-sm text-gray-600"},[s("strong",[e._v(e._s(e.__("Cashier")))]),e._v(" : "+e._s(t.nexopos_users_username))]),e._v(" "),s("p",{staticClass:"text-sm text-gray-600"},[s("strong",[e._v(e._s(e.__("Register")))]),e._v(" : "+e._s(e._f("currency")(t.total)))]),e._v(" "),s("p",{staticClass:"text-sm text-gray-600"},[s("strong",[e._v(e._s(e.__("Tendered")))]),e._v(" : "+e._s(e._f("currency")(t.tendered)))])]),e._v(" "),s("div",{staticClass:"w-full md:w-1/2 px-2"},[s("p",{staticClass:"text-sm text-gray-600"},[s("strong",[e._v(e._s(e.__("Customer")))]),e._v(" : "+e._s(t.nexopos_customers_name))]),e._v(" "),s("p",{staticClass:"text-sm text-gray-600"},[s("strong",[e._v(e._s(e.__("Date")))]),e._v(" : "+e._s(t.created_at))]),e._v(" "),s("p",{staticClass:"text-sm text-gray-600"},[s("strong",[e._v(e._s(e.__("Type")))]),e._v(" : "+e._s(t.type))])])])]),e._v(" "),s("div",{staticClass:"flex justify-end w-full mt-2"},[s("div",{staticClass:"flex rounded-lg overflow-hidden buttons-container"},[s("button",{staticClass:"text-white bg-green-400 outline-none px-2 py-1",on:{click:function(s){return e.proceedOpenOrder(t)}}},[s("i",{staticClass:"las la-lock-open"}),e._v(" "+e._s(e.__("Open")))]),e._v(" "),s("button",{staticClass:"text-white bg-blue-400 outline-none px-2 py-1",on:{click:function(s){return e.previewOrder(t)}}},[s("i",{staticClass:"las la-eye"}),e._v(" "+e._s(e.__("Products")))]),e._v(" "),s("button",{staticClass:"text-white bg-teal-400 outline-none px-2 py-1",on:{click:function(s){return e.printOrder(t)}}},[s("i",{staticClass:"las la-print"}),e._v(" "+e._s(e.__("Print")))])])])])})),e._v(" "),0===e.orders.length?s("div",{staticClass:"h-full v-full items-center justify-center flex"},[s("h3",{staticClass:"text-semibold text-gray-700"},[e._v(e._s(e.__("Nothing to display...")))])]):e._e()],2)])])}),[],!1,null,null,null).exports},methods:{__:o.__,searchOrder:function(e){var t=this;n.ih.get("/api/nexopos/v4/crud/".concat(this.active,"?search=").concat(e)).subscribe((function(e){t.orders=e.data}))},setActiveTab:function(e){this.active=e,this.loadOrderFromType(e)},openOrder:function(e){POS.loadOrder(e.id),this.$popup.close()},loadOrderFromType:function(e){var t=this;n.ih.get("/api/nexopos/v4/crud/".concat(e)).subscribe((function(e){t.orders=e.data}))},previewOrder:function(e){var t=this;new Promise((function(t,s){Popup.show(c,{order:e,resolve:t,reject:s})})).then((function(s){t.proceedOpenOrder(e)}),(function(e){return e}))},printOrder:function(e){POS.printOrder(e.id)},proceedOpenOrder:function(e){var t=this;if(POS.products.getValue().length>0)return Popup.show(i.Z,{title:"Confirm Your Action",message:"The cart is not empty. Opening an order will clear your cart would you proceed ?",onAction:function(s){s&&t.openOrder(e)}});this.openOrder(e)}},data:function(){return{active:"ns.hold-orders",searchField:"",orders:[]}},mounted:function(){var e=this;this.$popup.event.subscribe((function(t){"click-overlay"===t.event&&e.$popup.close()})),this.loadOrderFromType(this.active)}};const p=(0,u.Z)(d,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"shadow-lg bg-white w-6/7-screen md:w-3/5-screen lg:w-2/5-screen h-6/7-screen flex flex-col overflow-hidden"},[s("div",{staticClass:"p-2 flex justify-between text-gray-700 items-center border-b"},[s("h3",{staticClass:"font-semibold"},[e._v(e._s(e.__("Orders")))]),e._v(" "),s("div",[s("ns-close-button",{on:{click:function(t){return e.$popup.close()}}})],1)]),e._v(" "),s("div",{staticClass:"p-2 flex overflow-hidden flex-auto"},[s("ns-tabs",{attrs:{active:e.active},on:{changeTab:function(t){return e.setActiveTab(t)}}},[s("ns-tabs-item",{staticClass:"flex flex-col overflow-hidden",attrs:{identifier:"ns.hold-orders",label:e.__("On Hold"),padding:"p-0"}},[s("ns-pos-pending-orders",{attrs:{orders:e.orders},on:{searchOrder:function(t){return e.searchOrder(t)},previewOrder:function(t){return e.previewOrder(t)},printOrder:function(t){return e.printOrder(t)},proceedOpenOrder:function(t){return e.proceedOpenOrder(t)}}})],1),e._v(" "),s("ns-tabs-item",{staticClass:"flex flex-col overflow-hidden",attrs:{identifier:"ns.unpaid-orders",label:e.__("Unpaid"),padding:"p-0"}},[s("ns-pos-pending-orders",{attrs:{orders:e.orders},on:{searchOrder:function(t){return e.searchOrder(t)},previewOrder:function(t){return e.previewOrder(t)},printOrder:function(t){return e.printOrder(t)},proceedOpenOrder:function(t){return e.proceedOpenOrder(t)}}})],1),e._v(" "),s("ns-tabs-item",{staticClass:"flex flex-col overflow-hidden",attrs:{identifier:"ns.partially-paid-orders",label:e.__("Partially Paid"),padding:"p-0"}},[s("ns-pos-pending-orders",{attrs:{orders:e.orders},on:{searchOrder:function(t){return e.searchOrder(t)},previewOrder:function(t){return e.previewOrder(t)},printOrder:function(t){return e.printOrder(t)},proceedOpenOrder:function(t){return e.proceedOpenOrder(t)}}})],1)],1)],1),e._v(" "),s("div",{staticClass:"p-2 flex justify-between border-t bg-gray-200"},[s("div"),e._v(" "),s("div",[s("ns-button",[e._v(e._s(e.__("Close")))])],1)])])}),[],!1,null,null,null).exports,f={name:"ns-pos-pending-orders-button",methods:{__:o.__,openPendingOrdersPopup:function(){(new r.G).open(p)}}};const h=(0,u.Z)(f,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("button",{staticClass:"flex-shrink-0 h-12 flex items-center shadow rounded px-2 py-1 text-sm bg-white text-gray-700",on:{click:function(t){return e.openPendingOrdersPopup()}}},[s("i",{staticClass:"mr-1 text-xl lar la-hand-pointer"}),e._v(" "),s("span",[e._v(e._s(e.__("Orders")))])])}),[],!1,null,null,null).exports},818:(e,t,s)=>{"use strict";s.d(t,{Z:()=>T});var r=s(7757),n=s.n(r),i=s(162),o=s(3968),a=s(7266),u=s(8603),c=s(419),l=s(7389);const d={components:{nsNumpad:o.Z},data:function(){return{amount:0,title:null,identifier:null,settingsSubscription:null,settings:null,action:null,loaded:!1,register_id:null,validation:new a.Z,fields:[]}},mounted:function(){var e=this;this.title=this.$popupParams.title,this.identifier=this.$popupParams.identifier,this.action=this.$popupParams.action,this.register_id=this.$popupParams.register_id,this.settingsSubscription=POS.settings.subscribe((function(t){e.settings=t})),this.loadFields()},destroyed:function(){this.settingsSubscription.unsubscribe()},methods:{popupCloser:u.Z,__:l.__,definedValue:function(e){this.amount=e},close:function(){this.$popup.close()},loadFields:function(){var e=this;this.loaded=!1,nsHttpClient.get("/api/nexopos/v4/fields/".concat(this.identifier)).subscribe((function(t){e.loaded=!0,e.fields=t}),(function(t){return e.loaded=!0,nsSnackBar.error(t.message,"OKAY",{duration:!1}).subscribe()}))},submit:function(e){var t=this;Popup.show(c.Z,{title:"Confirm Your Action",message:this.$popupParams.confirmMessage||"Would you like to confirm your action.",onAction:function(e){e&&t.triggerSubmit()}})},triggerSubmit:function(){var e=this,t=this.validation.extractFields(this.fields);t.amount=""===this.amount?0:this.amount,nsHttpClient.post("/api/nexopos/v4/cash-registers/".concat(this.action,"/").concat(this.register_id||this.settings.register.id),t).subscribe((function(t){e.$popupParams.resolve(t),e.$popup.close(),nsSnackBar.success(t.message).subscribe()}),(function(e){nsSnackBar.error(e.message).subscribe()}))}}};var p=s(1900);const f=(0,p.Z)(d,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[e.loaded?s("div",{staticClass:"shadow-lg w-95vw md:w-2/5-screen bg-white"},[s("div",{staticClass:"border-b border-gray-200 p-2 text-gray-700 flex justify-between items-center"},[s("h3",{staticClass:"font-semibold"},[e._v(e._s(e.title))]),e._v(" "),s("div",[s("ns-close-button",{on:{click:function(t){return e.close()}}})],1)]),e._v(" "),s("div",{staticClass:"p-2"},[null!==e.settings&&e.settings.register?s("div",{staticClass:"mb-2 p-3 bg-gray-400 font-bold text-white text-right flex justify-between"},[s("span",[e._v(e._s(e.__("Balance"))+" ")]),e._v(" "),s("span",[e._v(e._s(e._f("currency")(e.settings.register.balance)))])]):e._e(),e._v(" "),s("div",{staticClass:"mb-2 p-3 bg-green-400 font-bold text-white text-right flex justify-between"},[s("span",[e._v(e._s(e.__("Input")))]),e._v(" "),s("span",[e._v(e._s(e._f("currency")(e.amount)))])]),e._v(" "),s("div",{staticClass:"mb-2"},[s("ns-numpad",{attrs:{floating:!0,value:e.amount},on:{next:function(t){return e.submit(t)},changed:function(t){return e.definedValue(t)}}})],1),e._v(" "),e._l(e.fields,(function(e,t){return s("ns-field",{key:t,attrs:{field:e}})}))],2)]):e._e(),e._v(" "),e.loaded?e._e():s("div",{staticClass:"h-full w-full flex items-center justify-center"},[s("ns-spinner")],1)])}),[],!1,null,null,null).exports;var h=s(6386);function v(e,t,s,r,n,i,o){try{var a=e[i](o),u=a.value}catch(e){return void s(e)}a.done?t(u):Promise.resolve(u).then(r,n)}const _={components:{nsNumpad:o.Z},data:function(){return{registers:[],priorVerification:!1,hasLoadedRegisters:!1,validation:new a.Z,amount:0,settings:null,settingsSubscription:null}},mounted:function(){var e=this;this.checkUsedRegister(),this.settingsSubscription=POS.settings.subscribe((function(t){e.settings=t}))},beforeDestroy:function(){this.settingsSubscription.unsubscribe()},computed:{},methods:{__:l.__,popupResolver:h.Z,selectRegister:function(e){var t,s=this;return(t=n().mark((function t(){var r;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("closed"===e.status){t.next=2;break}return t.abrupt("return",i.kX.error((0,l.__)("Unable to open this register. Only closed register can be opened.")).subscribe());case 2:return t.prev=2,t.next=5,new Promise((function(t,s){var r=(0,l.__)("Open Register : %s").replace("%s",e.name),n=e.id;Popup.show(f,{resolve:t,reject:s,title:r,identifier:"ns.cash-registers-opening",action:"open",register_id:n})}));case 5:r=t.sent,s.popupResolver(r),t.next=12;break;case 9:t.prev=9,t.t0=t.catch(2),console.log(t.t0);case 12:case"end":return t.stop()}}),t,null,[[2,9]])})),function(){var e=this,s=arguments;return new Promise((function(r,n){var i=t.apply(e,s);function o(e){v(i,r,n,o,a,"next",e)}function a(e){v(i,r,n,o,a,"throw",e)}o(void 0)}))})()},checkUsedRegister:function(){var e=this;this.priorVerification=!1,i.ih.get("/api/nexopos/v4/cash-registers/used").subscribe((function(t){e.$popupParams.resolve(t),e.$popup.close()}),(function(t){e.priorVerification=!0,i.kX.error(t.message).subscribe(),e.loadRegisters()}))},loadRegisters:function(){var e=this;this.hasLoadedRegisters=!1,i.ih.get("/api/nexopos/v4/cash-registers").subscribe((function(t){e.registers=t,e.hasLoadedRegisters=!0}))},getClass:function(e){switch(e.status){case"in-use":return"bg-teal-200 text-gray-800 cursor-not-allowed";case"disabled":return"bg-gray-200 text-gray-700 cursor-not-allowed";case"available":return"bg-green-100 text-gray-800"}return"border-gray-200 cursor-pointer hover:bg-blue-400 hover:text-white"}}};const m=(0,p.Z)(_,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[!1===e.priorVerification?s("div",{staticClass:"h-full w-full py-10 flex justify-center items-center"},[s("ns-spinner",{attrs:{size:"24",border:"8"}})],1):e._e(),e._v(" "),s("div",{staticClass:"w-95vw md:w-3/5-screen lg:w-3/5-screen xl:w-2/5-screen flex flex-col overflow-hidden",class:e.priorVerification?"shadow-lg bg-white":""},[e.priorVerification?[s("div",{staticClass:"title p-2 border-b border-gray-200 flex justify-between items-center"},[s("h3",{staticClass:"font-semibold"},[e._v(e._s(e.__("Open The Register")))]),e._v(" "),e.settings?s("div",[s("a",{staticClass:"hover:bg-red-400 hover:border-red-500 hover:text-white rounded-full border border-gray-200 px-3 text-sm py-1",attrs:{href:e.settings.urls.orders_url}},[e._v(e._s(e.__("Exit To Orders")))])]):e._e()]),e._v(" "),e.hasLoadedRegisters?e._e():s("div",{staticClass:"py-10 flex-auto overflow-y-auto flex items-center justify-center"},[s("ns-spinner",{attrs:{size:"16",border:"4"}})],1),e._v(" "),e.hasLoadedRegisters?s("div",{staticClass:"flex-auto overflow-y-auto"},[s("div",{staticClass:"grid grid-cols-3"},e._l(e.registers,(function(t,r){return s("div",{key:r,staticClass:"border-b border-r flex items-center justify-center flex-col p-3",class:e.getClass(t),on:{click:function(s){return e.selectRegister(t)}}},[s("i",{staticClass:"las la-cash-register text-6xl"}),e._v(" "),s("h3",{staticClass:"text-semibold text-center"},[e._v(e._s(t.name))]),e._v(" "),s("span",{staticClass:"text-sm"},[e._v("("+e._s(t.status_label)+")")])])})),0),e._v(" "),0===e.registers.length?s("div",{staticClass:"p-2 bg-red-400 text-white"},[e._v("\n "+e._s(e.__("Looks like there is no registers. At least one register is required to proceed."))+" — "),s("a",{staticClass:"font-bold hover:underline",attrs:{href:e.settings.urls.registers_url}},[e._v(e._s(e.__("Create Cash Register")))])]):e._e()]):e._e()]:e._e()],2)])}),[],!1,null,null,null).exports;const b={data:function(){return{totalIn:0,totalOut:0,settings:null,settingsSubscription:null,histories:[]}},mounted:function(){var e=this;this.settingsSubscription=POS.settings.subscribe((function(t){e.settings=t})),this.getHistory()},destroyed:function(){this.settingsSubscription.unsubscribe()},methods:{__:l.__,popupResolver:h.Z,closePopup:function(){this.popupResolver({status:"success"})},getHistory:function(){var e=this;i.ih.get("/api/nexopos/v4/cash-registers/session-history/".concat(this.settings.register.id)).subscribe((function(t){e.histories=t,e.totalIn=e.histories.filter((function(e){return["register-opening","register-sale","register-cash-in"].includes(e.action)})).map((function(e){return parseFloat(e.value)})).reduce((function(e,t){return e+t}),0),e.totalOut=e.histories.filter((function(e){return["register-closing","register-refund","register-cash-out"].includes(e.action)})).map((function(e){return parseFloat(e.value)})).reduce((function(e,t){return e+t}),0),console.log(e.totalOut)}))}}};const g=(0,p.Z)(b,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"bg-white shadow-lg w-95vw md:w-4/6-screen lg:w-half overflow-hidden"},[s("div",{staticClass:"p-2 flex justify-between items-center",attrs:{id:"header"}},[s("h3",{staticClass:"font-bold"},[e._v(e._s(e.__("Register History")))]),e._v(" "),s("div",[s("ns-close-button",{on:{click:e.closePopup}})],1)]),e._v(" "),s("div",{staticClass:"flex w-full"},[s("div",{staticClass:"flex flex-auto"},[s("div",{staticClass:"w-full md:w-1/2 text-right bg-green-400 text-white font-bold text-3xl p-3"},[e._v(e._s(e._f("currency")(e.totalIn)))]),e._v(" "),s("div",{staticClass:"w-full md:w-1/2 text-right bg-red-400 text-white font-bold text-3xl p-3"},[e._v(e._s(e._f("currency")(e.totalOut)))])])]),e._v(" "),s("div",{staticClass:"flex flex-col overflow-y-auto h-120"},[e._l(e.histories,(function(t){return[["register-sale","register-cash-in"].includes(t.action)?s("div",{key:t.id,staticClass:"flex border-b border-green-200 bg-green-100"},[s("div",{staticClass:"p-2 flex-auto"},[e._v(e._s(t.label))]),e._v(" "),s("div",{staticClass:"flex-auto text-right p-2"},[e._v(e._s(e._f("currency")(t.value)))])]):e._e(),e._v(" "),["register-opening"].includes(t.action)?s("div",{key:t.id,staticClass:"flex border-b border-blue-200 bg-blue-100"},[s("div",{staticClass:"p-2 flex-auto"},[e._v(e._s(t.label))]),e._v(" "),s("div",{staticClass:"flex-auto text-right p-2"},[e._v(e._s(e._f("currency")(t.value)))])]):e._e(),e._v(" "),["register-close"].includes(t.action)?s("div",{key:t.id,staticClass:"flex border-b border-teal-200 bg-teal-100"},[s("div",{staticClass:"p-2 flex-auto"},[e._v(e._s(t.label))]),e._v(" "),s("div",{staticClass:"flex-auto text-right p-2"},[e._v(e._s(e._f("currency")(t.value)))])]):e._e(),e._v(" "),["register-refund","register-cash-out"].includes(t.action)?s("div",{key:t.id,staticClass:"flex border-b border-red-200 bg-red-100"},[s("div",{staticClass:"p-2 flex-auto"},[e._v(e._s(t.label))]),e._v(" "),s("div",{staticClass:"flex-auto text-right p-2"},[e._v(e._s(e._f("currency")(t.value)))])]):e._e()]}))],2)])}),[],!1,null,null,null).exports;function y(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),s.push.apply(s,r)}return s}function x(e){for(var t=1;t0&&i.kX.error(t.t0.message).subscribe();case 10:case"end":return t.stop()}}),t,null,[[0,7]])})))()},registerInitialQueue:function(){var e=this;POS.initialQueue.push(S(n().mark((function t(){var s;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,new Promise((function(t,s){void 0===e.settings.register&&Popup.show(m,{resolve:t,reject:s})}));case 3:return s=t.sent,POS.set("register",s.data.register),e.setRegister(s.data.register),t.abrupt("return",s);case 9:throw t.prev=9,t.t0=t.catch(0),t.t0;case 12:case"end":return t.stop()}}),t,null,[[0,9]])}))))},setButtonName:function(){if(void 0===this.settings.register)return this.name=(0,l.__)("Cash Register");this.name=(0,l.__)("Cash Register : {register}").replace("{register}",this.settings.register.name)},setRegister:function(e){if(void 0!==e){var t=POS.order.getValue();t.register_id=e.id,POS.order.next(t)}}},destroyed:function(){this.orderSubscriber.unsubscribe(),this.settingsSubscriber.unsubscribe()},mounted:function(){var e=this;this.registerInitialQueue(),this.orderSubscriber=POS.order.subscribe((function(t){e.order=t})),this.settingsSubscriber=POS.settings.subscribe((function(t){e.settings=t,e.setRegister(e.settings.register),e.setButtonName()}))}};const T=(0,p.Z)($,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("button",{staticClass:"flex-shrink-0 h-12 flex items-center shadow rounded px-2 py-1 text-sm bg-white text-gray-700",on:{click:function(t){return e.openRegisterOptions()}}},[s("i",{staticClass:"mr-1 text-xl las la-cash-register"}),e._v(" "),s("span",[e._v(e._s(e.name))])])}),[],!1,null,null,null).exports},5588:(e,t,s)=>{"use strict";s.d(t,{Z:()=>a});var r=s(2242),n=(s(5872),s(419)),i=s(8603);const o={name:"ns-pos-customers-button",mounted:function(){this.popupCloser()},methods:{__,popupCloser:i.Z,reset:function(){r.G.show(n.Z,{title:__("Confirm Your Action"),message:__("The current order will be cleared. But not deleted if it's persistent. Would you like to proceed ?"),onAction:function(e){e&&POS.reset()}})}}};const a=(0,s(1900).Z)(o,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("button",{staticClass:"flex-shrink-0 h-12 flex items-center shadow rounded px-2 py-1 text-sm bg-white text-gray-700",on:{click:function(t){return e.reset()}}},[s("i",{staticClass:"mr-1 text-xl las la-eraser"}),e._v(" "),s("span",[e._v(e._s(e.__("Reset")))])])}),[],!1,null,null,null).exports},2329:(e,t,s)=>{"use strict";s.d(t,{Z:()=>n});const r={data:function(){return{title:"",message:""}},computed:{size:function(){return this.$popupParams.size||"h-full w-full"}},mounted:function(){var e=this;this.title=this.$popupParams.title,this.message=this.$popupParams.message,this.$popup.event.subscribe((function(t){"click-overlay"===t.event&&(void 0!==e.$popupParams.onAction&&e.$popupParams.onAction(!1),e.$popup.close())}))},methods:{__:s(7389).__,emitAction:function(e){void 0!==this.$popupParams.onAction&&this.$popupParams.onAction(e),this.$popup.close()}}};const n=(0,s(1900).Z)(r,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"w-6/7-screen md:w-4/7-screen lg:w-3/7-screen flex flex-col bg-white shadow-lg",class:e.size,attrs:{id:"popup"}},[s("div",{staticClass:"flex items-center justify-center flex-col flex-auto p-4"},[e.title?s("h2",{staticClass:"text-3xl font-body text-gray-700"},[e._v(e._s(e.title))]):e._e(),e._v(" "),s("p",{staticClass:"py-4 text-gray-600 text-center"},[e._v(e._s(e.message))])]),e._v(" "),s("div",{staticClass:"flex border-t border-gray-200 text-gray-700 justify-end items-center p-2"},[s("ns-button",{attrs:{type:"info"},on:{click:function(t){return e.emitAction(!0)}}},[e._v(e._s(e.__("Ok")))])],1)])}),[],!1,null,null,null).exports},419:(e,t,s)=>{"use strict";s.d(t,{Z:()=>n});const r={data:function(){return{title:"",message:""}},computed:{size:function(){return this.$popupParams.size||"h-full w-full"}},mounted:function(){var e=this;this.title=this.$popupParams.title,this.message=this.$popupParams.message,this.$popup.event.subscribe((function(t){"click-overlay"===t.event&&(e.$popupParams.onAction(!1),e.$popup.close())}))},methods:{__:s(7389).__,emitAction:function(e){this.$popupParams.onAction(e),this.$popup.close()}}};const n=(0,s(1900).Z)(r,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"flex flex-col bg-white shadow-lg w-5/7-screen md:w-4/7-screen lg:w-2/7-screen",class:e.size,attrs:{id:"popup"}},[s("div",{staticClass:"flex items-center justify-center flex-col flex-auto p-4"},[s("h2",{staticClass:"text-xl md:text-3xl font-body text-gray-700 text-center"},[e._v(e._s(e.title))]),e._v(" "),s("p",{staticClass:"py-4 text-sm md:text-base text-gray-600 text-center"},[e._v(e._s(e.message))])]),e._v(" "),s("div",{staticClass:"flex border-t border-gray-200 text-gray-700"},[s("button",{staticClass:"hover:bg-gray-100 flex-auto w-1/2 h-16 flex items-center justify-center uppercase",on:{click:function(t){return e.emitAction(!0)}}},[e._v(e._s(e.__("Yes")))]),e._v(" "),s("hr",{staticClass:"border-r border-gray-200"}),e._v(" "),s("button",{staticClass:"hover:bg-gray-100 flex-auto w-1/2 h-16 flex items-center justify-center uppercase",on:{click:function(t){return e.emitAction(!1)}}},[e._v(e._s(e.__("No")))])])])}),[],!1,null,null,null).exports},5450:(e,t,s)=>{"use strict";s.d(t,{Z:()=>c});var r=s(8603),n=s(6386),i=s(162),o=s(7389),a=s(4326);s(9624);const u={name:"ns-pos-coupons-load-popup",data:function(){return{placeHolder:(0,o.__)("Coupon Code"),couponCode:null,order:null,activeTab:"apply-coupon",orderSubscriber:null,customerCoupon:null}},mounted:function(){var e=this;this.popupCloser(),this.$refs.coupon.select(),this.orderSubscriber=POS.order.subscribe((function(t){e.order=t,e.order.coupons.length>0&&(e.activeTab="active-coupons")})),this.$popupParams&&this.$popupParams.apply_coupon&&(this.couponCode=this.$popupParams.apply_coupon,this.getCoupon(this.couponCode).subscribe({next:function(t){e.customerCoupon=t,e.apply()}}))},destroyed:function(){this.orderSubscriber.unsubscribe()},methods:{__:o.__,popupCloser:r.Z,popupResolver:n.Z,selectCustomer:function(){Popup.show(a.Z)},cancel:function(){this.customerCoupon=null,this.couponCode=null},removeCoupon:function(e){this.order.coupons.splice(e,1),POS.refreshCart()},apply:function(){var e=this;try{var t=this.customerCoupon;if(null!==this.customerCoupon.coupon.valid_hours_start&&!ns.date.moment.isAfter(this.customerCoupon.coupon.valid_hours_start)&&this.customerCoupon.coupon.valid_hours_start.length>0)return i.kX.error((0,o.__)("The coupon is out from validity date range.")).subscribe();if(null!==this.customerCoupon.coupon.valid_hours_end&&!ns.date.moment.isBefore(this.customerCoupon.coupon.valid_hours_end)&&this.customerCoupon.coupon.valid_hours_end.length>0)return i.kX.error((0,o.__)("The coupon is out from validity date range.")).subscribe();var s=this.customerCoupon.coupon.products;if(s.length>0){var r=s.map((function(e){return e.product_id}));if(0===this.order.products.filter((function(e){return r.includes(e.product_id)})).length)return i.kX.error((0,o.__)("This coupon requires products that aren't available on the cart at the moment.")).subscribe()}var n=this.customerCoupon.coupon.categories;if(n.length>0){var a=n.map((function(e){return e.category_id}));if(0===this.order.products.filter((function(e){return a.includes(e.$original().category_id)})).length)return i.kX.error((0,o.__)("This coupon requires products that belongs to specific categories that aren't included at the moment.").replace("%s")).subscribe()}this.cancel();var u={active:t.coupon.active,customer_coupon_id:t.id,minimum_cart_value:t.coupon.minimum_cart_value,maximum_cart_value:t.coupon.maximum_cart_value,name:t.coupon.name,type:t.coupon.type,value:0,limit_usage:t.coupon.limit_usage,code:t.coupon.code,discount_value:t.coupon.discount_value,categories:t.coupon.categories,products:t.coupon.products};POS.pushCoupon(u),this.activeTab="active-coupons",setTimeout((function(){e.popupResolver(u)}),500),i.kX.success((0,o.__)("The coupon has applied to the cart.")).subscribe()}catch(e){console.log(e)}},getCouponType:function(e){switch(e){case"percentage_discount":return(0,o.__)("Percentage");case"flat_discount":return(0,o.__)("Flat");default:return(0,o.__)("Unknown Type")}},getDiscountValue:function(e){switch(e.type){case"percentage_discount":return e.discount_value+"%";case"flat_discount":return this.$options.filters.currency(e.discount_value)}},closePopup:function(){this.popupResolver(!1)},setActiveTab:function(e){this.activeTab=e},getCoupon:function(e){return!this.order.customer_id>0?i.kX.error((0,o.__)("You must select a customer before applying a coupon.")).subscribe():i.ih.post("/api/nexopos/v4/customers/coupons/".concat(e),{customer_id:this.order.customer_id})},loadCoupon:function(){var e=this,t=this.couponCode;this.getCoupon(t).subscribe({next:function(t){e.customerCoupon=t,i.kX.success((0,o.__)("The coupon has been loaded.")).subscribe()},error:function(e){i.kX.error(e.message||(0,o.__)("An unexpected error occured.")).subscribe()}})}}};const c=(0,s(1900).Z)(u,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"shadow-lg bg-white w-95vw md:w-3/6-screen lg:w-2/6-screen"},[s("div",{staticClass:"border-b border-gray-200 p-2 flex justify-between items-center"},[s("h3",{staticClass:"font-bold text-gray-700"},[e._v(e._s(e.__("Load Coupon")))]),e._v(" "),s("div",[s("ns-close-button",{on:{click:function(t){return e.closePopup()}}})],1)]),e._v(" "),s("div",{staticClass:"p-1"},[s("ns-tabs",{attrs:{active:e.activeTab},on:{changeTab:function(t){return e.setActiveTab(t)}}},[s("ns-tabs-item",{attrs:{label:e.__("Apply A Coupon"),padding:"p-2",identifier:"apply-coupon"}},[s("div",{staticClass:"border-2 border-blue-400 rounded flex"},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.couponCode,expression:"couponCode"}],ref:"coupon",staticClass:"w-full p-2",attrs:{type:"text",placeholder:e.placeHolder},domProps:{value:e.couponCode},on:{input:function(t){t.target.composing||(e.couponCode=t.target.value)}}}),e._v(" "),s("button",{staticClass:"bg-blue-400 text-white px-3 py-2",on:{click:function(t){return e.loadCoupon()}}},[e._v(e._s(e.__("Load")))])]),e._v(" "),s("div",{staticClass:"pt-2"},[s("p",{staticClass:"p-2 text-center bg-green-100 text-green-600"},[e._v(e._s(e.__("Input the coupon code that should apply to the POS. If a coupon is issued for a customer, that customer must be selected priorly.")))])]),e._v(" "),e.order&&void 0===e.order.customer_id?s("div",{staticClass:"pt-2",on:{click:function(t){return e.selectCustomer()}}},[s("p",{staticClass:"p-2 cursor-pointer text-center bg-red-100 text-red-600"},[e._v(e._s(e.__("Click here to choose a customer.")))])]):e._e(),e._v(" "),e.order&&void 0!==e.order.customer_id?s("div",{staticClass:"pt-2"},[s("p",{staticClass:"p-2 text-center bg-green-100 text-green-600"},[e._v(e._s(e.__("Loading Coupon For : ")+e.order.customer.name+" "+e.order.customer.surname))])]):e._e(),e._v(" "),s("div",{staticClass:"overflow-hidden"},[e.customerCoupon?s("div",{staticClass:"pt-2 fade-in-entrance anim-duration-500 overflow-y-auto h-64"},[s("table",{staticClass:"w-full"},[s("thead",[s("tr",[s("td",{staticClass:"p-2 w-1/2 text-gray-700 border border-gray-200"},[e._v(e._s(e.__("Coupon Name")))]),e._v(" "),s("td",{staticClass:"p-2 w-1/2 text-gray-700 border border-gray-200"},[e._v(e._s(e.customerCoupon.name))])]),e._v(" "),s("tr",[s("td",{staticClass:"p-2 w-1/2 text-gray-700 border border-gray-200"},[e._v(e._s(e.__("Discount"))+" ("+e._s(e.getCouponType(e.customerCoupon.coupon.type))+")")]),e._v(" "),s("td",{staticClass:"p-2 w-1/2 text-gray-700 border border-gray-200"},[e._v(e._s(e.getDiscountValue(e.customerCoupon.coupon)))])]),e._v(" "),s("tr",[s("td",{staticClass:"p-2 w-1/2 text-gray-700 border border-gray-200"},[e._v(e._s(e.__("Usage")))]),e._v(" "),s("td",{staticClass:"p-2 w-1/2 text-gray-700 border border-gray-200"},[e._v(e._s(e.customerCoupon.usage+"/"+(e.customerCoupon.limit_usage||e.__("Unlimited"))))])]),e._v(" "),s("tr",[s("td",{staticClass:"p-2 w-1/2 text-gray-700 border border-gray-200"},[e._v(e._s(e.__("Valid From")))]),e._v(" "),s("td",{staticClass:"p-2 w-1/2 text-gray-700 border border-gray-200"},[e._v(e._s(e.customerCoupon.coupon.valid_hours_start))])]),e._v(" "),s("tr",[s("td",{staticClass:"p-2 w-1/2 text-gray-700 border border-gray-200"},[e._v(e._s(e.__("Valid Till")))]),e._v(" "),s("td",{staticClass:"p-2 w-1/2 text-gray-700 border border-gray-200"},[e._v(e._s(e.customerCoupon.coupon.valid_hours_end))])]),e._v(" "),s("tr",[s("td",{staticClass:"p-2 w-1/2 text-gray-700 border border-gray-200"},[e._v(e._s(e.__("Categories")))]),e._v(" "),s("td",{staticClass:"p-2 w-1/2 text-gray-700 border border-gray-200"},[s("ul",e._l(e.customerCoupon.coupon.categories,(function(t){return s("li",{key:t.id,staticClass:"rounded-full px-3 py-1 border border-gray-200"},[e._v(e._s(t.category.name))])})),0)])]),e._v(" "),s("tr",[s("td",{staticClass:"p-2 w-1/2 text-gray-700 border border-gray-200"},[e._v(e._s(e.__("Products")))]),e._v(" "),s("td",{staticClass:"p-2 w-1/2 text-gray-700 border border-gray-200"},[s("ul",e._l(e.customerCoupon.coupon.products,(function(t){return s("li",{key:t.id,staticClass:"rounded-full px-3 py-1 border border-gray-200"},[e._v(e._s(t.product.name))])})),0)])])])])]):e._e()])]),e._v(" "),s("ns-tabs-item",{attrs:{label:e.__("Active Coupons"),padding:"p-1",identifier:"active-coupons"}},[e.order?s("ul",[e._l(e.order.coupons,(function(t,r){return s("li",{key:r,staticClass:"flex justify-between bg-gray-100 items-center px-2 py-1"},[s("div",{staticClass:"flex-auto"},[s("h3",{staticClass:"font-semibold text-gray-700 p-2 flex justify-between"},[s("span",[e._v(e._s(t.name))]),e._v(" "),s("span",[e._v(e._s(e.getDiscountValue(t)))])])]),e._v(" "),s("div",[s("ns-close-button",{on:{click:function(t){return e.removeCoupon(r)}}})],1)])})),e._v(" "),0===e.order.coupons.length?s("li",{staticClass:"flex justify-between bg-gray-100 items-center p-2"},[e._v("\n No coupons applies to the cart.\n ")]):e._e()],2):e._e()])],1)],1),e._v(" "),e.customerCoupon?s("div",{staticClass:"flex"},[s("button",{staticClass:"w-1/2 px-3 py-2 bg-green-400 text-white font-bold",on:{click:function(t){return e.apply()}}},[e._v("\n "+e._s(e.__("Apply"))+"\n ")]),e._v(" "),s("button",{staticClass:"w-1/2 px-3 py-2 bg-red-400 text-white font-bold",on:{click:function(t){return e.cancel()}}},[e._v("\n "+e._s(e.__("Cancel"))+"\n ")])]):e._e()])}),[],!1,null,null,null).exports},4326:(e,t,s)=>{"use strict";s.d(t,{Z:()=>u});var r=s(162),n=s(6386),i=s(2242),o=s(5872);const a={data:function(){return{searchCustomerValue:"",orderSubscription:null,order:{},debounceSearch:null,customers:[],isLoading:!1}},computed:{customerSelected:function(){return!1}},watch:{searchCustomerValue:function(e){var t=this;clearTimeout(this.debounceSearch),this.debounceSearch=setTimeout((function(){t.searchCustomer(e)}),500)}},mounted:function(){var e=this;this.$popup.event.subscribe((function(t){"click-overlay"===t.event&&e.resolveIfQueued(!1)})),this.orderSubscription=POS.order.subscribe((function(t){e.order=t})),this.getRecentCustomers(),this.$refs.searchField.focus()},destroyed:function(){this.orderSubscription.unsubscribe()},methods:{__:s(7389).__,resolveIfQueued:n.Z,attemptToChoose:function(){if(1===this.customers.length)return this.selectCustomer(this.customers[0]);r.kX.info("Too many result.").subscribe()},openCustomerHistory:function(e,t){t.stopImmediatePropagation(),this.$popup.close(),i.G.show(o.Z,{customer:e,activeTab:"account-payment"})},selectCustomer:function(e){var t=this;this.customers.forEach((function(e){return e.selected=!1})),e.selected=!0,this.isLoading=!0,POS.selectCustomer(e).then((function(s){t.isLoading=!1,t.resolveIfQueued(e)})).catch((function(e){t.isLoading=!1}))},searchCustomer:function(e){var t=this;r.ih.post("/api/nexopos/v4/customers/search",{search:e}).subscribe((function(e){e.forEach((function(e){return e.selected=!1})),t.customers=e}))},createCustomerWithMatch:function(e){this.resolveIfQueued(!1),i.G.show(o.Z,{name:e})},getRecentCustomers:function(){var e=this;this.isLoading=!0,r.ih.get("/api/nexopos/v4/customers").subscribe((function(t){e.isLoading=!1,t.forEach((function(e){return e.selected=!1})),e.customers=t}),(function(t){e.isLoading=!1}))}}};const u=(0,s(1900).Z)(a,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"bg-white shadow-xl w-4/5-screen md:w-2/5-screen xl:w-108"},[s("div",{staticClass:"border-b border-gray-200 text-center font-semibold text-2xl text-gray-700 py-2",attrs:{id:"header"}},[s("h2",[e._v(e._s(e.__("Select Customer")))])]),e._v(" "),s("div",{staticClass:"relative"},[s("div",{staticClass:"p-2 border-b border-gray-200 flex justify-between text-gray-600"},[s("span",[e._v("Selected : ")]),e._v(" "),s("div",{staticClass:"flex items-center justify-between"},[s("span",[e._v(e._s(e.order.customer?e.order.customer.name:"N/A"))]),e._v(" "),e.order.customer?s("button",{staticClass:"mx-2 rounded-full h-8 w-8 flex items-center justify-center border border-gray-200 hover:bg-blue-400 hover:text-white hover:border-transparent",on:{click:function(t){return e.openCustomerHistory(e.order.customer,t)}}},[s("i",{staticClass:"las la-eye"})]):e._e()])]),e._v(" "),s("div",{staticClass:"p-2 border-b border-gray-200 flex justify-between text-gray-600"},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.searchCustomerValue,expression:"searchCustomerValue"}],ref:"searchField",staticClass:"rounded border-2 border-blue-400 bg-gray-100 w-full p-2",attrs:{placeholder:"Search Customer",type:"text"},domProps:{value:e.searchCustomerValue},on:{keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.attemptToChoose()},input:function(t){t.target.composing||(e.searchCustomerValue=t.target.value)}}})]),e._v(" "),s("div",{staticClass:"h-3/5-screen xl:h-2/5-screen overflow-y-auto"},[s("ul",[e.customers&&0===e.customers.length?s("li",{staticClass:"p-2 text-center text-gray-600"},[e._v("\n "+e._s(e.__("No customer match your query..."))+"\n ")]):e._e(),e._v(" "),e.customers&&0===e.customers.length?s("li",{staticClass:"p-2 cursor-pointer text-center text-gray-600",on:{click:function(t){return e.createCustomerWithMatch(e.searchCustomerValue)}}},[s("span",{staticClass:"border-b border-dashed border-blue-400"},[e._v(e._s(e.__("Create a customer")))])]):e._e(),e._v(" "),e._l(e.customers,(function(t){return s("li",{key:t.id,staticClass:"cursor-pointer hover:bg-gray-100 p-2 border-b border-gray-200 text-gray-600 flex justify-between items-center",on:{click:function(s){return e.selectCustomer(t)}}},[s("span",[e._v(e._s(t.name))]),e._v(" "),s("p",{staticClass:"flex items-center"},[t.owe_amount>0?s("span",{staticClass:"text-red-600"},[e._v("-"+e._s(e._f("currency")(t.owe_amount)))]):e._e(),e._v(" "),t.owe_amount>0?s("span",[e._v("/")]):e._e(),e._v(" "),s("span",{staticClass:"text-green-600"},[e._v(e._s(e._f("currency")(t.purchases_amount)))]),e._v(" "),s("button",{staticClass:"mx-2 rounded-full h-8 w-8 flex items-center justify-center border border-gray-200 hover:bg-blue-400 hover:text-white hover:border-transparent",on:{click:function(s){return e.openCustomerHistory(t,s)}}},[s("i",{staticClass:"las la-eye"})])])])}))],2)]),e._v(" "),e.isLoading?s("div",{staticClass:"z-10 top-0 absolute w-full h-full flex items-center justify-center"},[s("ns-spinner",{attrs:{size:"24",border:"8"}})],1):e._e()])])}),[],!1,null,null,null).exports},5872:(e,t,s)=>{"use strict";s.d(t,{Z:()=>_});var r=s(8603),n=s(162),i=s(2242),o=s(4326),a=s(7266),u=s(7389);const c={mounted:function(){this.closeWithOverlayClicked(),this.loadTransactionFields()},data:function(){return{fields:[],isSubmiting:!1,formValidation:new a.Z}},methods:{__:u.__,closeWithOverlayClicked:r.Z,proceed:function(){var e=this,t=this.$popupParams.customer,s=this.formValidation.extractFields(this.fields);this.isSubmiting=!0,n.ih.post("/api/nexopos/v4/customers/".concat(t.id,"/account-history"),s).subscribe((function(t){e.isSubmiting=!1,n.kX.success(t.message).subscribe(),e.$popupParams.resolve(t),e.$popup.close()}),(function(t){e.isSubmiting=!1,n.kX.error(t.message).subscribe(),e.$popupParams.reject(t)}))},close:function(){this.$popup.close(),this.$popupParams.reject(!1)},loadTransactionFields:function(){var e=this;n.ih.get("/api/nexopos/v4/fields/ns.customers-account").subscribe((function(t){e.fields=e.formValidation.createFields(t)}))}}};var l=s(1900);const d=(0,l.Z)(c,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"w-6/7-screen md:w-5/7-screen lg:w-4/7-screen h-6/7-screen md:h-5/7-screen lg:h-5/7-screen overflow-hidden shadow-lg bg-white flex flex-col relative"},[s("div",{staticClass:"p-2 border-b border-gray-200 flex justify-between items-center"},[s("h2",{staticClass:"font-semibold"},[e._v(e._s(e.__("New Transaction")))]),e._v(" "),s("div",[s("ns-close-button",{on:{click:function(t){return e.close()}}})],1)]),e._v(" "),s("div",{staticClass:"flex-auto overflow-y-auto"},[0===e.fields.length?s("div",{staticClass:"h-full w-full flex items-center justify-center"},[s("ns-spinner")],1):e._e(),e._v(" "),e.fields.length>0?s("div",{staticClass:"p-2"},e._l(e.fields,(function(e,t){return s("ns-field",{key:t,attrs:{field:e}})})),1):e._e()]),e._v(" "),s("div",{staticClass:"p-2 bg-white justify-between border-t border-gray-200 flex"},[s("div"),e._v(" "),s("div",{staticClass:"px-1"},[s("div",{staticClass:"-mx-2 flex flex-wrap"},[s("div",{staticClass:"px-1"},[s("ns-button",{attrs:{type:"danger"},on:{click:function(t){return e.close()}}},[e._v(e._s(e.__("Close")))])],1),e._v(" "),s("div",{staticClass:"px-1"},[s("ns-button",{attrs:{type:"info"},on:{click:function(t){return e.proceed()}}},[e._v(e._s(e.__("Proceed")))])],1)])])]),e._v(" "),0===e.isSubmiting?s("div",{staticClass:"h-full w-full absolute flex items-center justify-center",staticStyle:{background:"rgb(0 98 171 / 45%)"}},[s("ns-spinner")],1):e._e()])}),[],!1,null,null,null).exports;var p=s(5450),f=s(419),h=s(6386);const v={name:"ns-pos-customers",data:function(){return{activeTab:"create-customers",customer:null,subscription:null,orders:[],selectedTab:"orders",isLoadingCoupons:!1,coupons:[],order:null}},mounted:function(){var e=this;this.closeWithOverlayClicked(),this.subscription=POS.order.subscribe((function(t){e.order=t,void 0!==e.$popupParams.customer?(e.activeTab="account-payment",e.customer=e.$popupParams.customer,e.loadCustomerOrders(e.customer.id)):void 0!==t.customer&&(e.activeTab="account-payment",e.customer=t.customer,e.loadCustomerOrders(e.customer.id))})),this.popupCloser()},methods:{__:u.__,popupResolver:h.Z,popupCloser:r.Z,getType:function(e){switch(e){case"percentage_discount":return(0,u.__)("Percentage Discount");case"flat_discount":return(0,u.__)("Flat Discount")}},closeWithOverlayClicked:r.Z,doChangeTab:function(e){this.selectedTab=e,"coupons"===e&&this.loadCoupons()},loadCoupons:function(){var e=this;this.isLoadingCoupons=!0,n.ih.get("/api/nexopos/v4/customers/".concat(this.customer.id,"/coupons")).subscribe({next:function(t){e.coupons=t,e.isLoadingCoupons=!1},error:function(t){e.isLoadingCoupons=!1}})},allowedForPayment:function(e){return["unpaid","partially_paid","hold"].includes(e.payment_status)},prefillForm:function(e){void 0!==this.$popupParams.name&&(e.main.value=this.$popupParams.name)},openCustomerSelection:function(){this.$popup.close(),i.G.show(o.Z)},loadCustomerOrders:function(e){var t=this;n.ih.get("/api/nexopos/v4/customers/".concat(e,"/orders")).subscribe((function(e){t.orders=e}))},newTransaction:function(e){new Promise((function(t,s){i.G.show(d,{customer:e,resolve:t,reject:s})})).then((function(t){POS.loadCustomer(e.id).subscribe((function(e){POS.selectCustomer(e)}))}))},applyCoupon:function(e){var t=this;void 0===this.order.customer?i.G.show(f.Z,{title:(0,u.__)("Use Customer ?"),message:(0,u.__)("No customer is selected. Would you like to proceed with this customer ?"),onAction:function(s){s&&POS.selectCustomer(t.customer).then((function(s){t.proceedApplyingCoupon(e)}))}}):this.order.customer.id===this.customer.id?this.proceedApplyingCoupon(e):this.order.customer.id!==this.customer.id&&i.G.show(f.Z,{title:(0,u.__)("Change Customer ?"),message:(0,u.__)("Would you like to assign this customer to the ongoing order ?"),onAction:function(s){s&&POS.selectCustomer(t.customer).then((function(s){t.proceedApplyingCoupon(e)}))}})},proceedApplyingCoupon:function(e){var t=this;new Promise((function(t,s){i.G.show(p.Z,{apply_coupon:e.code,resolve:t,reject:s})})).then((function(e){t.popupResolver(!1)})).catch((function(e){}))},handleSavedCustomer:function(e){n.kX.success(e.message).subscribe(),POS.selectCustomer(e.entry),this.$popup.close()}}};const _=(0,l.Z)(v,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"bg-white shadow-lg rounded w-95vw h-95vh lg:w-3/5-screen flex flex-col overflow-hidden"},[s("div",{staticClass:"p-2 flex justify-between items-center border-b border-gray-400"},[s("h3",{staticClass:"font-semibold text-gray-700"},[e._v(e._s(e.__("Customers")))]),e._v(" "),s("div",[s("ns-close-button",{on:{click:function(t){return e.$popup.close()}}})],1)]),e._v(" "),s("div",{staticClass:"flex-auto flex p-2 bg-gray-200 overflow-y-auto"},[s("ns-tabs",{attrs:{active:e.activeTab},on:{active:function(t){e.activeTab=t}}},[s("ns-tabs-item",{attrs:{identifier:"create-customers",label:"New Customer"}},[s("ns-crud-form",{attrs:{"submit-url":"/api/nexopos/v4/crud/ns.customers",src:"/api/nexopos/v4/crud/ns.customers/form-config"},on:{updated:function(t){return e.prefillForm(t)},save:function(t){return e.handleSavedCustomer(t)}},scopedSlots:e._u([{key:"title",fn:function(){return[e._v(e._s(e.__("Customer Name")))]},proxy:!0},{key:"save",fn:function(){return[e._v(e._s(e.__("Save Customer")))]},proxy:!0}])})],1),e._v(" "),s("ns-tabs-item",{staticClass:"flex",staticStyle:{padding:"0!important"},attrs:{identifier:"account-payment",label:e.__("Customer Account")}},[null===e.customer?s("div",{staticClass:"flex-auto w-full flex items-center justify-center flex-col p-4"},[s("i",{staticClass:"lar la-frown text-6xl text-gray-700"}),e._v(" "),s("h3",{staticClass:"font-medium text-2xl text-gray-700"},[e._v(e._s(e.__("No Customer Selected")))]),e._v(" "),s("p",{staticClass:"text-gray-600"},[e._v(e._s(e.__("In order to see a customer account, you need to select one customer.")))]),e._v(" "),s("div",{staticClass:"my-2"},[s("ns-button",{attrs:{type:"info"},on:{click:function(t){return e.openCustomerSelection()}}},[e._v(e._s(e.__("Select Customer")))])],1)]):e._e(),e._v(" "),e.customer?s("div",{staticClass:"flex flex-col flex-auto"},[s("div",{staticClass:"flex-auto p-2 flex flex-col"},[s("div",{staticClass:"-mx-4 flex flex-wrap"},[s("div",{staticClass:"px-4 mb-4 w-full"},[s("h2",{staticClass:"font-semibold text-gray-700"},[e._v(e._s(e.__("Summary For"))+" : "+e._s(e.customer.name))])]),e._v(" "),s("div",{staticClass:"px-4 mb-4 w-full md:w-1/3"},[s("div",{staticClass:"rounded-lg shadow bg-transparent bg-gradient-to-br from-green-400 to-green-700 p-2 flex flex-col text-white"},[s("h3",{staticClass:"font-medium text-lg"},[e._v(e._s(e.__("Total Purchases")))]),e._v(" "),s("div",{staticClass:"w-full flex justify-end"},[s("h2",{staticClass:"text-2xl font-bold"},[e._v(e._s(e._f("currency")(e.customer.purchases_amount)))])])])]),e._v(" "),s("div",{staticClass:"px-4 mb-4 w-full md:w-1/3"},[s("div",{staticClass:"rounded-lg shadow bg-transparent bg-gradient-to-br from-red-500 to-red-700 p-2 text-white"},[s("h3",{staticClass:"font-medium text-lg"},[e._v(e._s(e.__("Total Owed")))]),e._v(" "),s("div",{staticClass:"w-full flex justify-end"},[s("h2",{staticClass:"text-2xl font-bold"},[e._v(e._s(e._f("currency")(e.customer.owed_amount)))])])])]),e._v(" "),s("div",{staticClass:"px-4 mb-4 w-full md:w-1/3"},[s("div",{staticClass:"rounded-lg shadow bg-transparent bg-gradient-to-br from-blue-500 to-blue-700 p-2 text-white"},[s("h3",{staticClass:"font-medium text-lg"},[e._v(e._s(e.__("Account Amount")))]),e._v(" "),s("div",{staticClass:"w-full flex justify-end"},[s("h2",{staticClass:"text-2xl font-bold"},[e._v(e._s(e._f("currency")(e.customer.account_amount)))])])])])]),e._v(" "),s("div",{staticClass:"flex flex-auto flex-col overflow-hidden"},[s("ns-tabs",{attrs:{active:e.selectedTab},on:{changeTab:function(t){return e.doChangeTab(t)}}},[s("ns-tabs-item",{attrs:{identifier:"orders",label:e.__("Orders")}},[s("div",{staticClass:"py-2 w-full"},[s("h2",{staticClass:"font-semibold text-gray-700"},[e._v(e._s(e.__("Last Purchases")))])]),e._v(" "),s("div",{staticClass:"flex-auto flex-col flex overflow-hidden"},[s("div",{staticClass:"flex-auto overflow-y-auto"},[s("table",{staticClass:"table w-full"},[s("thead",[s("tr",{staticClass:"text-gray-700"},[s("th",{staticClass:"p-2 border border-gray-200 bg-gray-100 font-semibold",attrs:{width:"150"}},[e._v(e._s(e.__("Order")))]),e._v(" "),s("th",{staticClass:"p-2 border border-gray-200 bg-gray-100 font-semibold"},[e._v(e._s(e.__("Total")))]),e._v(" "),s("th",{staticClass:"p-2 border border-gray-200 bg-gray-100 font-semibold"},[e._v(e._s(e.__("Status")))]),e._v(" "),s("th",{staticClass:"p-2 border border-gray-200 bg-gray-100 font-semibold",attrs:{width:"50"}},[e._v(e._s(e.__("Options")))])])]),e._v(" "),s("tbody",{staticClass:"text-gray-700"},[0===e.orders.length?s("tr",[s("td",{staticClass:"border border-gray-200 p-2 text-center",attrs:{colspan:"4"}},[e._v(e._s(e.__("No orders...")))])]):e._e(),e._v(" "),e._l(e.orders,(function(t){return s("tr",{key:t.id},[s("td",{staticClass:"border border-gray-200 p-2 text-center"},[e._v(e._s(t.code))]),e._v(" "),s("td",{staticClass:"border border-gray-200 p-2 text-center"},[e._v(e._s(e._f("currency")(t.total)))]),e._v(" "),s("td",{staticClass:"border border-gray-200 p-2 text-right"},[e._v(e._s(t.human_status))]),e._v(" "),s("td",{staticClass:"border border-gray-200 p-2 text-center"},[e.allowedForPayment(t)?s("button",{staticClass:"hover:bg-blue-400 hover:border-transparent hover:text-white rounded-full h-8 px-2 flex items-center justify-center border border-gray bg-white"},[s("i",{staticClass:"las la-wallet"}),e._v(" "),s("span",{staticClass:"ml-1"},[e._v(e._s(e.__("Payment")))])]):e._e()])])}))],2)])])])]),e._v(" "),s("ns-tabs-item",{attrs:{identifier:"coupons",label:e.__("Coupons")}},[e.isLoadingCoupons?s("div",{staticClass:"flex-auto h-full justify-center flex items-center"},[s("ns-spinner",{attrs:{size:"36"}})],1):e._e(),e._v(" "),e.isLoadingCoupons?e._e():[s("div",{staticClass:"py-2 w-full"},[s("h2",{staticClass:"font-semibold text-gray-700"},[e._v(e._s(e.__("Coupons")))])]),e._v(" "),s("div",{staticClass:"flex-auto flex-col flex overflow-hidden"},[s("div",{staticClass:"flex-auto overflow-y-auto"},[s("table",{staticClass:"table w-full"},[s("thead",[s("tr",{staticClass:"text-gray-700"},[s("th",{staticClass:"p-2 border border-gray-200 bg-gray-100 font-semibold",attrs:{width:"150"}},[e._v(e._s(e.__("Name")))]),e._v(" "),s("th",{staticClass:"p-2 border border-gray-200 bg-gray-100 font-semibold"},[e._v(e._s(e.__("Type")))]),e._v(" "),s("th",{staticClass:"p-2 border border-gray-200 bg-gray-100 font-semibold"})])]),e._v(" "),s("tbody",{staticClass:"text-gray-700 text-sm"},[0===e.coupons.length?s("tr",[s("td",{staticClass:"border border-gray-200 p-2 text-center",attrs:{colspan:"4"}},[e._v(e._s(e.__("No coupons for the selected customer...")))])]):e._e(),e._v(" "),e._l(e.coupons,(function(t){return s("tr",{key:t.id},[s("td",{staticClass:"border border-gray-200 p-2",attrs:{width:"300"}},[s("h3",[e._v(e._s(t.name))]),e._v(" "),s("div",{},[s("ul",{staticClass:"-mx-2 flex"},[s("li",{staticClass:"text-xs text-gray-600 px-2"},[e._v(e._s(e.__("Usage :"))+" "+e._s(t.usage)+"/"+e._s(t.limit_usage))]),e._v(" "),s("li",{staticClass:"text-xs text-gray-600 px-2"},[e._v(e._s(e.__("Code :"))+" "+e._s(t.code))])])])]),e._v(" "),s("td",{staticClass:"border border-gray-200 p-2 text-center"},[e._v(e._s(e.getType(t.coupon.type))+" \n "),"percentage_discount"===t.coupon.type?s("span",[e._v("\n ("+e._s(t.coupon.discount_value)+"%)\n ")]):e._e(),e._v(" "),"flat_discount"===t.coupon.type?s("span",[e._v("\n ("+e._s(e._f("currency")(t.coupon.discount_value))+")\n ")]):e._e()]),e._v(" "),s("td",{staticClass:"border border-gray-200 p-2 text-right"},[s("ns-button",{attrs:{type:"info"},on:{click:function(s){return e.applyCoupon(t)}}},[e._v(e._s(e.__("Use Coupon")))])],1)])}))],2)])])])]],2)],1)],1)]),e._v(" "),s("div",{staticClass:"p-2 border-t border-gray-400 flex justify-between"},[s("div"),e._v(" "),s("div",[s("ns-button",{attrs:{type:"info"},on:{click:function(t){return e.newTransaction(e.customer)}}},[e._v(e._s(e.__("Account Transaction")))])],1)])]):e._e()])],1)],1)])}),[],!1,null,null,null).exports},8355:(e,t,s)=>{"use strict";s.d(t,{Z:()=>d});var r=s(7266),n=s(162),i=s(7389);function o(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),s.push.apply(s,r)}return s}function a(e){for(var t=1;t0){var e=nsRawCurrency(this.order.instalments.map((function(e){return parseFloat(e.amount.value)||0})).reduce((function(e,t){return parseFloat(e)+parseFloat(t)})));this.totalPayments=this.order.total-e}else this.totalPayments=0},generatePaymentFields:function(e){var t=this;this.order.instalments=new Array(parseInt(e)).fill("").map((function(e,s){return{date:{type:"date",name:"date",label:"Date",value:0===s?ns.date.moment.format("YYYY-MM-DD"):""},amount:{type:"number",name:"amount",label:"Amount",value:0===s?t.expectedPayment:0},readonly:{type:"hidden",name:"readonly",value:t.expectedPayment>0&&0===s}}})),this.$forceUpdate(),this.refreshTotalPayments()},close:function(){this.$popupParams.reject({status:"failed",message:(0,i.__)("You must define layaway settings before proceeding.")}),this.$popup.close()},updateOrder:function(){var e=this;if(0===this.order.instalments.length)return n.kX.error((0,i.__)("Please provide instalments before proceeding.")).subscribe();if(this.fields.forEach((function(t){return e.formValidation.validateField(t)})),!this.formValidation.fieldsValid(this.fields))return n.kX.error((0,i.__)("Unable to procee the form is not valid")).subscribe();this.$forceUpdate();var t=this.order.instalments.map((function(e){return{amount:parseFloat(e.amount.value),date:e.date.value}})),s=nsRawCurrency(t.map((function(e){return e.amount})).reduce((function(e,t){return parseFloat(e)+parseFloat(t)})));if(t.filter((function(e){return void 0===e.date||""===e.date})).length>0)return n.kX.error((0,i.__)("One or more instalments has an invalid date.")).subscribe();if(t.filter((function(e){return!(e.amount>0)})).length>0)return n.kX.error((0,i.__)("One or more instalments has an invalid amount.")).subscribe();if(t.filter((function(e){return moment(e.date).isBefore(ns.date.moment.startOf("day"))})).length>0)return n.kX.error((0,i.__)("One or more instalments has a date prior to the current date.")).subscribe();var r=t.filter((function(e){return moment(e.date).isSame(ns.date.moment.startOf("day"),"day")})),o=0;if(r.forEach((function(e){o+=parseFloat(e.amount)})),o{"use strict";s.d(t,{Z:()=>n});const r={name:"ns-pos-loading-popup"};const n=(0,s(1900).Z)(r,(function(){var e=this.$createElement;return(this._self._c||e)("ns-spinner")}),[],!1,null,null,null).exports},3625:(e,t,s)=>{"use strict";s.d(t,{Z:()=>u});var r=s(7757),n=s.n(r),i=s(6386);s(3661);function o(e,t,s,r,n,i,o){try{var a=e[i](o),u=a.value}catch(e){return void s(e)}a.done?t(u):Promise.resolve(u).then(r,n)}const a={data:function(){return{types:[],typeSubscription:null}},mounted:function(){var e=this;this.$popup.event.subscribe((function(t){"click-overlay"===t.event&&e.resolveIfQueued(!1)})),this.typeSubscription=POS.types.subscribe((function(t){e.types=t}))},destroyed:function(){this.typeSubscription.unsubscribe()},methods:{__:s(7389).__,resolveIfQueued:i.Z,select:function(e){var t,s=this;return(t=n().mark((function t(){var r;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return Object.values(s.types).forEach((function(e){return e.selected=!1})),s.types[e].selected=!0,r=s.types[e],POS.types.next(s.types),t.next=6,POS.triggerOrderTypeSelection(r);case 6:s.resolveIfQueued(r);case 7:case"end":return t.stop()}}),t)})),function(){var e=this,s=arguments;return new Promise((function(r,n){var i=t.apply(e,s);function a(e){o(i,r,n,a,u,"next",e)}function u(e){o(i,r,n,a,u,"throw",e)}a(void 0)}))})()}}};const u=(0,s(1900).Z)(a,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"h-full w-4/5-screen md:w-2/5-screen lg:w-2/5-screen xl:w-2/6-screen bg-white shadow-lg"},[s("div",{staticClass:"h-16 flex justify-center items-center",attrs:{id:"header"}},[s("h3",{staticClass:"font-bold text-gray-700"},[e._v(e._s(e.__("Define The Order Type")))])]),e._v(" "),s("div",{staticClass:"grid grid-flow-row grid-cols-2 grid-rows-2"},e._l(e.types,(function(t){return s("div",{key:t.identifier,staticClass:"hover:bg-blue-100 h-56 flex items-center justify-center flex-col cursor-pointer border border-gray-200",class:t.selected?"bg-blue-100":"",on:{click:function(s){return e.select(t.identifier)}}},[s("img",{staticClass:"w-32 h-32",attrs:{src:t.icon,alt:""}}),e._v(" "),s("h4",{staticClass:"font-semibold text-xl my-2 text-gray-700"},[e._v(e._s(t.label))])])})),0)])}),[],!1,null,null,null).exports},9531:(e,t,s)=>{"use strict";s.d(t,{Z:()=>u});var r=s(162),n=s(7389);function i(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var s=Object.prototype.toString.call(e).slice(8,-1);"Object"===s&&e.constructor&&(s=e.constructor.name);if("Map"===s||"Set"===s)return Array.from(e);if("Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return o(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var s=0,r=new Array(t);sparseFloat(i.$quantities().quantity)-a)return r.kX.error((0,n.__)("Unable to add the product, there is not enough stock. Remaining %s").replace("%s",i.$quantities().quantity-a)).subscribe()}this.resolve({quantity:o})}else"backspace"===e.identifier?this.allSelected?(this.finalValue=0,this.allSelected=!1):(this.finalValue=this.finalValue.toString(),this.finalValue=this.finalValue.substr(0,this.finalValue.length-1)||0):this.allSelected?(this.finalValue=e.value,this.finalValue=parseFloat(this.finalValue),this.allSelected=!1):(this.finalValue+=""+e.value,this.finalValue=parseFloat(this.finalValue))},resolve:function(e){this.$popupParams.resolve(e),this.$popup.close()}}};const u=(0,s(1900).Z)(a,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"bg-white shadow min-h-2/5-screen w-3/4-screen md:w-3/5-screen lg:w-2/5-screen xl:w-2/5-screen relative"},[e.isLoading?s("div",{staticClass:"flex w-full h-full absolute top-O left-0 items-center justify-center",staticStyle:{background:"rgb(202 202 202 / 49%)"},attrs:{id:"loading-overlay"}},[s("ns-spinner")],1):e._e(),e._v(" "),s("div",{staticClass:"flex-shrink-0 py-2 border-b border-gray-200"},[s("h1",{staticClass:"text-xl font-bold text-gray-700 text-center"},[e._v(e._s(e.__("Define Quantity")))])]),e._v(" "),s("div",{staticClass:"h-16 border-b bg-gray-800 text-white border-gray-200 flex items-center justify-center",attrs:{id:"screen"}},[s("h1",{staticClass:"font-bold text-3xl"},[e._v(e._s(e.finalValue))])]),e._v(" "),s("div",{staticClass:"grid grid-flow-row grid-cols-3 grid-rows-3",attrs:{id:"numpad"}},e._l(e.keys,(function(t,r){return s("div",{key:r,staticClass:"hover:bg-blue-400 hover:text-white hover:border-blue-600 text-xl font-bold border border-gray-200 h-24 flex items-center justify-center cursor-pointer",on:{click:function(s){return e.inputValue(t)}}},[void 0!==t.value?s("span",[e._v(e._s(t.value))]):e._e(),e._v(" "),t.icon?s("i",{staticClass:"las",class:t.icon}):e._e()])})),0)])}),[],!1,null,null,null).exports},3661:(e,t,s)=>{"use strict";s.d(t,{Z:()=>l});var r=s(162),n=s(6386),i=s(7266);function o(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),s.push.apply(s,r)}return s}function a(e){for(var t=1;t{"use strict";s.d(t,{Z:()=>n});const r={data:function(){return{title:"",message:"",input:""}},computed:{size:function(){return this.$popupParams.size||"h-full w-full"}},mounted:function(){var e=this;this.input=this.$popupParams.input||"",this.title=this.$popupParams.title,this.message=this.$popupParams.message,this.$popup.event.subscribe((function(t){"click-overlay"===t.event&&(e.$popupParams.reject(!1),e.$popup.close())}))},methods:{__:s(7389).__,emitAction:function(e){this.$popupParams.onAction(e?this.input:e),this.$popup.close()},reject:function(e){this.$popupParams.reject(e),this.$popup.close()}}};const n=(0,s(1900).Z)(r,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"w-5/7-screen md:w-3/7-screen flex flex-col bg-white shadow-lg",class:e.size,attrs:{id:"popup"}},[s("div",{staticClass:"flex items-center justify-center flex-col flex-auto p-2"},[s("h2",{staticClass:"text-3xl font-body text-gray-700"},[e._v(e._s(e.title))]),e._v(" "),s("p",{staticClass:"w-full md:mx-auto md:w-2/3 py-4 text-gray-600 text-center"},[e._v(e._s(e.message))])]),e._v(" "),s("div",{staticClass:"p-2"},[s("textarea",{directives:[{name:"model",rawName:"v-model",value:e.input,expression:"input"}],staticClass:"text-gray-700 w-full border-2 p-2 border-blue-400",attrs:{name:"",id:"",cols:"30",rows:"10"},domProps:{value:e.input},on:{input:function(t){t.target.composing||(e.input=t.target.value)}}})]),e._v(" "),s("div",{staticClass:"flex border-t border-gray-200 text-gray-700"},[s("button",{staticClass:"hover:bg-gray-100 flex-auto w-1/2 h-16 flex items-center justify-center uppercase",on:{click:function(t){return e.emitAction(!0)}}},[e._v(e._s(e.__("Ok")))]),e._v(" "),s("hr",{staticClass:"border-r border-gray-200"}),e._v(" "),s("button",{staticClass:"hover:bg-gray-100 flex-auto w-1/2 h-16 flex items-center justify-center uppercase",on:{click:function(t){return e.reject(!1)}}},[e._v(e._s(e.__("Cancel")))])])])}),[],!1,null,null,null).exports}},e=>{e.O(0,[898],(()=>{return t=467,e(e.s=t);var t}));e.O()}]); +(self.webpackChunkNexoPOS_4x=self.webpackChunkNexoPOS_4x||[]).push([[443],{162:(e,t,s)=>{"use strict";s.d(t,{l:()=>I,kq:()=>Q,ih:()=>L,kX:()=>N});var r=s(6486),n=s(9669),i=s(2181),o=s(8345),a=s(9624),u=s(9248),c=s(230);function l(e,t){for(var s=0;s2&&void 0!==arguments[2]?arguments[2]:{};return this._request("post",e,t,s)}},{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._request("get",e,void 0,t)}},{key:"delete",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._request("delete",e,void 0,t)}},{key:"put",value:function(e,t){var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this._request("put",e,t,s)}},{key:"response",get:function(){return this._lastRequestData}},{key:"_request",value:function(e,t){var s=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return t=Q.applyFilters("http-client-url",t.replace(/\/$/,"")),this._subject.next({identifier:"async.start",url:t,data:r}),new c.y((function(i){s._client[e](t,r,Object.assign(Object.assign({},s._client.defaults[e]),n)).then((function(e){s._lastRequestData=e,i.next(e.data),i.complete(),s._subject.next({identifier:"async.stop"})})).catch((function(e){var t;i.error((null===(t=e.response)||void 0===t?void 0:t.data)||e.response||e),s._subject.next({identifier:"async.stop"})}))}))}},{key:"subject",value:function(){return this._subject}},{key:"emit",value:function(e){var t=e.identifier,s=e.value;this._subject.next({identifier:t,value:s})}}])&&l(t.prototype,s),r&&l(t,r),e}(),p=s(3);function f(e,t){for(var s=0;s=1e3){for(var s,r=Math.floor((""+e).length/3),n=2;n>=1;n--){if(((s=parseFloat((0!=r?e/Math.pow(1e3,r):e).toPrecision(n)))+"").replace(/[^a-zA-Z 0-9]+/g,"").length<=2)break}s%1!=0&&(s=s.toFixed(1)),t=s+["","k","m","b","t"][r]}return t})),O=s(1356),S=s(9698);function $(e,t){for(var s=0;s0&&window.outerWidth<=480:this.breakpoint="xs";break;case window.outerWidth>480&&window.outerWidth<=640:this.breakpoint="sm";break;case window.outerWidth>640&&window.outerWidth<=1024:this.breakpoint="md";break;case window.outerWidth>1024&&window.outerWidth<=1280:this.breakpoint="lg";break;case window.outerWidth>1280:this.breakpoint="xl"}}}])&&q(t.prototype,s),r&&q(t,r),e}()),W=new m({sidebar:["xs","sm","md"].includes(U.breakpoint)?"hidden":"visible"});L.defineClient(n),window.nsEvent=I,window.nsHttpClient=L,window.nsSnackBar=N,window.nsCurrency=O.W,window.nsTruncate=S.b,window.nsRawCurrency=O.f,window.nsAbbreviate=j,window.nsState=W,window.nsUrl=X,window.nsScreen=U,window.ChartJS=i,window.EventEmitter=h,window.Popup=x.G,window.RxJS=g,window.FormValidation=C.Z,window.nsCrudHandler=z},1356:(e,t,s)=>{"use strict";s.d(t,{W:()=>c,f:()=>l});var r=s(538),n=s(2077),i=s.n(n),o=s(6740),a=s.n(o),u=new Array(parseInt(ns.currency.ns_currency_precision)).fill("").map((function(e){return 0})).join(""),c=r.default.filter("currency",(function(e){var t,s,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"full";switch(ns.currency.ns_currency_prefered){case"iso":t=ns.currency.ns_currency_iso;break;case"symbol":t=ns.currency.ns_currency_symbol}if("full"===r){var n={decimal:ns.currency.ns_currency_decimal_separator,separator:ns.currency.ns_currency_thousand_separator,precision:parseInt(ns.currency.ns_currency_precision),symbol:""};s=a()(e,n).format()}else s=i()(e).format("0.0a");return"".concat("before"===ns.currency.ns_currency_position?t:"").concat(s).concat("after"===ns.currency.ns_currency_position?t:"")})),l=function(e){var t="0.".concat(u);return parseFloat(i()(e).format(t))}},9698:(e,t,s)=>{"use strict";s.d(t,{b:()=>r});var r=s(538).default.filter("truncate",(function(e,t){return e?(e=e.toString()).length>t?e.substring(0,t)+"...":e:""}))},7266:(e,t,s)=>{"use strict";function r(e,t){for(var s=0;sn});var n=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,s,n;return t=e,(s=[{key:"validateFields",value:function(e){var t=this;return 0===e.map((function(e){return t.checkField(e),e.errors?0===e.errors.length:0})).filter((function(e){return!1===e})).length}},{key:"validateFieldsErrors",value:function(e){var t=this;return e.map((function(e){return t.checkField(e),e.errors})).flat()}},{key:"validateForm",value:function(e){e.main&&this.validateField(e.main);var t=[];for(var s in e.tabs){var r=[],n=this.validateFieldsErrors(e.tabs[s].fields);n.length>0&&r.push(n),e.tabs[s].errors=r.flat(),t.push(r.flat())}return t.flat().filter((function(e){return void 0!==e}))}},{key:"initializeTabs",value:function(e){var t=0;for(var s in e)0===t&&(e[s].active=!0),e[s].active=void 0!==e[s].active&&e[s].active,e[s].fields=this.createFields(e[s].fields),t++;return e}},{key:"validateField",value:function(e){return this.checkField(e)}},{key:"fieldsValid",value:function(e){return!(e.map((function(e){return e.errors&&e.errors.length>0})).filter((function(e){return e})).length>0)}},{key:"createFields",value:function(e){return e.map((function(e){return e.type=e.type||"text",e.errors=e.errors||[],e.disabled=e.disabled||!1,"custom"===e.type&&(e.component=nsExtraComponents[e.name]),e}))}},{key:"createForm",value:function(e){if(e.main&&(e.main=this.createFields([e.main])[0]),e.tabs)for(var t in e.tabs)e.tabs[t].fields=this.createFields(e.tabs[t].fields),e.tabs[t].errors=[];return e}},{key:"enableFields",value:function(e){return e.map((function(e){return e.disabled=!1}))}},{key:"disableFields",value:function(e){return e.map((function(e){return e.disabled=!0}))}},{key:"disableForm",value:function(e){for(var t in e.main&&(e.main.disabled=!0),e.tabs)e.tabs[t].fields.forEach((function(e){return e.disabled=!0}))}},{key:"enableForm",value:function(e){for(var t in e.main&&(e.main.disabled=!1),e.tabs)e.tabs[t].fields.forEach((function(e){return e.disabled=!1}))}},{key:"getValue",value:function(e){var t={};return e.forEach((function(e){t[e.name]=e.value})),t}},{key:"checkField",value:function(e){var t=this;return void 0!==e.validation&&(e.errors=[],this.detectValidationRules(e.validation).forEach((function(s){t.fieldPassCheck(e,s)}))),e}},{key:"extractForm",value:function(e){var t={};if(e.main&&(t[e.main.name]=e.main.value),e.tabs)for(var s in e.tabs)void 0===t[s]&&(t[s]={}),t[s]=this.extractFields(e.tabs[s].fields);return t}},{key:"extractFields",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.forEach((function(e){["multiselect"].includes(e.type)?t[e.name]=e.options.filter((function(e){return e.selected})).map((function(e){return e.value})):t[e.name]=e.value})),t}},{key:"detectValidationRules",value:function(e){var t=function(e){var t;return["email","required"].includes(e)?{identifier:e}:(t=/(min)\:([0-9])+/g.exec(e))||(t=/(max)\:([0-9])+/g.exec(e))?{identifier:t[1],value:t[2]}:e};return Array.isArray(e)?e.filter((function(e){return"string"==typeof e})).map(t):e.split("|").map(t)}},{key:"triggerError",value:function(e,t){if(t.errors){var s=function(s){var r=s.split(".").filter((function(e){return!/^\d+$/.test(e)}));2===r.length&&e.tabs[r[0]].fields.forEach((function(e){e.name===r[1]&&t.errors[s].forEach((function(t){var s={identifier:"invalid",invalid:!0,message:t,name:e.name};e.errors.push(s)}))})),s===e.main.name&&t.errors[s].forEach((function(t){e.main.errors.push({identifier:"invalid",invalid:!0,message:t,name:e.main.name})}))};for(var r in t.errors)s(r)}}},{key:"triggerFieldsErrors",value:function(e,t){if(t&&t.errors){var s=function(s){e.forEach((function(e){e.name===s&&t.errors[s].forEach((function(t){var s={identifier:"invalid",invalid:!0,message:t,name:e.name};e.errors.push(s)}))}))};for(var r in t.errors)s(r)}}},{key:"fieldPassCheck",value:function(e,t){if("required"===t.identifier){if(void 0===e.value||null===e.value||0===e.value.length)return e.errors.push({identifier:t.identifier,invalid:!0,name:e.name});e.errors.forEach((function(s,r){s.identifier===t.identifier&&!0===s.invalid&&e.errors.splice(r,1)}))}if("email"===t.identifier){if(!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(e.value))return e.errors.push({identifier:t.identifier,invalid:!0,name:e.name});e.errors.forEach((function(s,r){!0===s[t.identifier]&&e.errors.splice(r,1)}))}return e}}])&&r(t.prototype,s),n&&r(t,n),e}()},7389:(e,t,s)=>{"use strict";s.d(t,{__:()=>r,c:()=>n});var r=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"NexoPOS";return nsLanguage.getEntries(t)&&nsLanguage.getEntries(t)[e]||e},n=function(e,t){return nsLanguage.getEntries(t)&&nsLanguage.getEntries(t)[e]||e}},8603:(e,t,s)=>{"use strict";function r(){var e=this;Object.keys(this).includes("$popup")&&this.$popup.event.subscribe((function(t){"click-overlay"===t.event&&(e.$popupParams&&void 0!==e.$popupParams.reject&&e.$popupParams.reject(!1),e.$popup.close()),"press-esc"===t.event&&(e.$popupParams&&void 0!==e.$popupParams.reject&&e.$popupParams.reject(!1),e.$popup.close())}))}s.d(t,{Z:()=>r})},6386:(e,t,s)=>{"use strict";function r(e){void 0!==this.$popupParams.resolve&&this.$popupParams.reject&&(!1!==e?this.$popupParams.resolve(e):this.$popupParams.reject(e)),this.$popup.close()}s.d(t,{Z:()=>r})},2242:(e,t,s)=>{"use strict";s.d(t,{G:()=>o});var r=s(9248);function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var s=0;s0&&void 0!==arguments[0]?arguments[0]:{};if(n(this,e),this.config={primarySelector:void 0,popupClass:"shadow-lg h-half w-1/2 bg-white"},this.container=document.createElement("div"),this.popupBody=document.createElement("div"),this.config=Object.assign(this.config,t),void 0===this.config.primarySelector&&document.querySelectorAll(".is-popup").length>0){var s=document.querySelectorAll(".is-popup").length;this.parentWrapper=document.querySelectorAll(".is-popup")[s-1]}else this.parentWrapper=document.querySelector("body").querySelectorAll("div")[0];this.event=new r.x}var t,s,o;return t=e,o=[{key:"show",value:function(t){var s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=new e(r);return n.open(t,s),n}}],(s=[{key:"open",value:function(e){var t,s,r,n=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=document.querySelector("body").querySelectorAll("div")[0];this.parentWrapper.style.filter="blur(4px)",o.style.filter="blur(6px)",this.container.setAttribute("class","absolute top-0 left-0 w-full h-full flex items-center justify-center is-popup"),this.container.addEventListener("click",(function(e){n.event.next({event:"click-overlay",value:!0}),e.stopPropagation()})),this.popupBody.addEventListener("click",(function(e){e.stopImmediatePropagation()})),this.container.style.background="rgb(51 51 51 / 20%)",this.container.id="popup-container-"+document.querySelectorAll(".is-popup").length,this.popupBody.setAttribute("class"," zoom-out-entrance"),this.popupBody.innerHTML='',this.container.appendChild(this.popupBody),document.body.appendChild(this.container);var a=Vue.extend(e);this.instance=new a({propsData:{popup:this}}),this.instance.template=(null===(t=null==e?void 0:e.options)||void 0===t?void 0:t.template)||void 0,this.instance.render=e.render||void 0,this.instance.methods=(null===(s=null==e?void 0:e.options)||void 0===s?void 0:s.methods)||(null==e?void 0:e.methods),this.instance.data=(null===(r=null==e?void 0:e.options)||void 0===r?void 0:r.data)||(null==e?void 0:e.data),this.instance.$popup=this,this.instance.$popupParams=i,this.instance.$mount("#".concat(this.container.id," .popup-body"))}},{key:"close",value:function(){var e=this;this.instance.$destroy(),this.event.unsubscribe(),this.parentWrapper.style.filter="blur(0px)";var t=document.querySelector("body").querySelectorAll("div")[0];document.querySelectorAll(".is-popup").length<=1&&(t.style.filter="blur(0px)"),this.popupBody.classList.remove("zoom-out-entrance"),this.popupBody.classList.add("zoom-in-exit"),this.container.classList.remove("is-popup"),setTimeout((function(){e.container.remove()}),300)}}])&&i(t.prototype,s),o&&i(t,o),e}()},9624:(e,t,s)=>{"use strict";s.d(t,{S:()=>i});var r=s(3260);function n(e,t){for(var s=0;s2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"info"};return r.Observable.create((function(r){var i=s.__createSnack({message:e,label:t,type:n.type}),o=i.buttonNode,a=(i.textNode,i.snackWrapper,i.sampleSnack);o.addEventListener("click",(function(e){r.onNext(o),r.onCompleted(),a.remove()})),s.__startTimer(n.duration,a)}))}},{key:"error",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"error"};return this.show(e,t,Object.assign(Object.assign({},s),{type:"error"}))}},{key:"success",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"success"};return this.show(e,t,Object.assign(Object.assign({},s),{type:"success"}))}},{key:"info",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"info"};return this.show(e,t,Object.assign(Object.assign({},s),{type:"info"}))}},{key:"__startTimer",value:function(e,t){var s,r=function(){e>0&&!1!==e&&(s=setTimeout((function(){t.remove()}),e))};t.addEventListener("mouseenter",(function(){clearTimeout(s)})),t.addEventListener("mouseleave",(function(){r()})),r()}},{key:"__createSnack",value:function(e){var t=e.message,s=e.label,r=e.type,n=void 0===r?"info":r,i=document.getElementById("snack-wrapper")||document.createElement("div"),o=document.createElement("div"),a=document.createElement("p"),u=document.createElement("div"),c=document.createElement("button"),l="",d="";switch(n){case"info":l="text-white hover:bg-blue-400 bg-blue-500",d="bg-gray-900 text-white";break;case"error":l="text-red-700 hover:bg-white bg-white",d="bg-red-500 text-white";break;case"success":l="text-green-700 hover:bg-white bg-white",d="bg-green-500 text-white"}return a.textContent=t,s&&(c.textContent=s,c.setAttribute("class","px-3 py-2 shadow rounded uppercase ".concat(l)),u.appendChild(c)),o.appendChild(a),o.appendChild(u),o.setAttribute("class","md:rounded py-2 px-3 md:w-2/5 w-full z-10 md:my-2 shadow-lg flex justify-between items-center zoom-in-entrance anim-duration-300 ".concat(d)),i.appendChild(o),null===document.getElementById("snack-wrapper")&&(i.setAttribute("id","snack-wrapper"),i.setAttribute("class","absolute bottom-0 w-full flex justify-between items-center flex-col"),document.body.appendChild(i)),{snackWrapper:i,sampleSnack:o,buttonsWrapper:u,buttonNode:c,textNode:a}}}])&&n(t.prototype,s),i&&n(t,i),e}()},279:(e,t,s)=>{"use strict";s.d(t,{$:()=>u});var r=s(162),n=s(7389),i=s(2242),o=s(9531);function a(e,t){for(var s=0;sparseFloat(e.$quantities().quantity)-l)return r.kX.error((0,n.__)("Unable to add the product, there is not enough stock. Remaining %s").replace("%s",(e.$quantities().quantity-l).toString())).subscribe()}s({quantity:1})}else u.open(o.Z,{resolve:s,reject:a,product:c,data:e})}))}}])&&a(t.prototype,s),u&&a(t,u),e}()},467:(e,t,s)=>{"use strict";var r=s(7757),n=s.n(r),i=s(279),o=s(2242),a=s(162),u=s(7389);const c={data:function(){return{unitsQuantities:[],loadsUnits:!1,options:null,optionsSubscriber:null}},beforeDestroy:function(){this.optionsSubscriber.unsubscribe()},mounted:function(){var e=this;this.$popup.event.subscribe((function(t){"click-overlay"===t.event&&(e.$popupParams.reject(!1),e.$popup.close())})),this.optionsSubscriber=POS.options.subscribe((function(t){e.options=t})),void 0!==this.$popupParams.product.$original().selectedUnitQuantity?this.selectUnit(this.$popupParams.product.$original().selectedUnitQuantity):void 0!==this.$popupParams.product.$original().unit_quantities&&1===this.$popupParams.product.$original().unit_quantities.length?this.selectUnit(this.$popupParams.product.$original().unit_quantities[0]):(this.loadsUnits=!0,this.loadUnits())},methods:{__:u.__,displayRightPrice:function(e){return POS.getSalePrice(e)},loadUnits:function(){var e=this;a.ih.get("/api/nexopos/v4/products/".concat(this.$popupParams.product.$original().id,"/units/quantities")).subscribe((function(t){if(0===t.length)return e.$popup.close(),a.kX.error((0,u.__)("This product doesn't have any unit defined for selling.")).subscribe();e.unitsQuantities=t,1===e.unitsQuantities.length&&e.selectUnit(e.unitsQuantities[0])}))},selectUnit:function(e){this.$popupParams.resolve({unit_quantity_id:e.id,unit_name:e.unit.name,$quantities:function(){return e}}),this.$popup.close()}}};const l=(0,s(1900).Z)(c,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"h-full w-full flex items-center justify-center"},[e.unitsQuantities.length>0?s("div",{staticClass:"bg-white w-2/3-screen lg:w-1/3-screen overflow-hidden flex flex-col"},[s("div",{staticClass:"h-16 flex justify-center items-center flex-shrink-0",attrs:{id:"header"}},[s("h3",{staticClass:"font-bold text-gray-700"},[e._v(e._s(e.__("Choose Selling Unit")))])]),e._v(" "),e.unitsQuantities.length>0?s("div",{staticClass:"grid grid-flow-row grid-cols-2 overflow-y-auto"},e._l(e.unitsQuantities,(function(t){return s("div",{key:t.id,staticClass:"hover:bg-gray-200 cursor-pointer border flex-shrink-0 border-gray-200 flex flex-col items-center justify-center",on:{click:function(s){return e.selectUnit(t)}}},[s("div",{staticClass:"h-40 w-full flex items-center justify-center overflow-hidden"},[t.preview_url?s("img",{staticClass:"object-cover h-full",attrs:{src:t.preview_url,alt:t.unit.name}}):e._e(),e._v(" "),t.preview_url?e._e():s("div",{staticClass:"h-40 flex items-center justify-center"},[s("i",{staticClass:"las la-image text-gray-600 text-6xl"})])]),e._v(" "),s("div",{staticClass:"h-0 w-full"},[s("div",{staticClass:"relative w-full flex items-center justify-center -top-10 h-20 py-2 flex-col",staticStyle:{background:"rgb(255 255 255 / 73%)"}},[s("h3",{staticClass:"font-bold text-gray-700 py-2 text-center"},[e._v(e._s(t.unit.name)+" ("+e._s(t.quantity)+")")]),e._v(" "),s("p",{staticClass:"text-sm font-medium text-gray-600"},[e._v(e._s(e._f("currency")(e.displayRightPrice(t))))])])])])})),0):e._e()]):e._e(),e._v(" "),0===e.unitsQuantities.length?s("div",{staticClass:"h-56 flex items-center justify-center"},[s("ns-spinner")],1):e._e()])}),[],!1,null,null,null).exports;function d(e,t){for(var s=0;s=544&&window.innerWidth<768?this.screenIs="sm":window.innerWidth>=768&&window.innerWidth<992?this.screenIs="md":window.innerWidth>=992&&window.innerWidth<1200?this.screenIs="lg":window.innerWidth>=1200&&(this.screenIs="xl")}},{key:"is",value:function(e){return void 0===e?this.screenIs:this.screenIs===e}}])&&v(t.prototype,s),r&&v(t,r),e}(),m=s(381),b=s.n(m);function g(e,t){for(var s=0;s0){var r=e.order.getValue();r.type=s[0],e.order.next(r)}})),window.addEventListener("resize",(function(){e._responsive.detect(),e.defineCurrentScreen()})),window.onbeforeunload=function(){if(e.products.getValue().length>0)return(0,u.__)("Some products has been added to the cart. Would youl ike to discard this order ?")},this.defineCurrentScreen()}},{key:"getSalePrice",value:function(e,t){switch(t.tax_type){case"inclusive":return e.incl_tax_sale_price;default:return e.excl_tax_sale_price}}},{key:"getCustomPrice",value:function(e,t){switch(t.tax_type){case"inclusive":return e.incl_tax_custom_price;default:return e.excl_tax_custom_price}}},{key:"getWholesalePrice",value:function(e,t){switch(t.tax_type){case"inclusive":return e.incl_tax_wholesale_price;default:return e.excl_tax_wholesale_price}}},{key:"setHoldPopupEnabled",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this._holdPopupEnabled=e}},{key:"getHoldPopupEnabled",value:function(){return this._holdPopupEnabled}},{key:"processInitialQueue",value:function(){return y(this,void 0,void 0,n().mark((function e(){var t;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=n().keys(this._initialQueue);case 1:if((e.t1=e.t0()).done){e.next=14;break}return t=e.t1.value,e.prev=3,e.next=6,this._initialQueue[t]();case 6:e.sent,e.next=12;break;case 9:e.prev=9,e.t2=e.catch(3),a.kX.error(e.t2.message).subscribe();case 12:e.next=1;break;case 14:case"end":return e.stop()}}),e,this,[[3,9]])})))}},{key:"removeCoupon",value:function(e){var t=this.order.getValue(),s=t.coupons,r=s.indexOf(e);s.splice(r,1),t.coupons=s,this.order.next(t)}},{key:"pushCoupon",value:function(e){var t=this.order.getValue();t.coupons.forEach((function(t){if(t.code===e.code){var s=(0,u.__)("This coupon is already added to the cart");throw a.kX.error(s).subscribe(),s}})),t.coupons.push(e),this.order.next(t),this.refreshCart()}},{key:"header",get:function(){var e={buttons:{NsPosDashboardButton:x,NsPosPendingOrderButton:w,NsPosOrderTypeButton:C,NsPosCustomersButton:k,NsPosResetButton:P}};return"yes"===this.options.getValue().ns_pos_registers_enabled&&(e.buttons.NsPosCashRegister=j),a.kq.doAction("ns-pos-header",e),e}},{key:"defineOptions",value:function(e){this._options.next(e)}},{key:"defineCurrentScreen",value:function(){this._visibleSection.next(["xs","sm"].includes(this._responsive.is())?"grid":"both"),this._screen.next(this._responsive.is())}},{key:"changeVisibleSection",value:function(e){["both","cart","grid"].includes(e)&&(["cart","both"].includes(e)&&this.refreshCart(),this._visibleSection.next(e))}},{key:"addPayment",value:function(e){if(e.value>0){var t=this._order.getValue();return t.payments.push(e),this._order.next(t),this.computePaid()}return a.kX.error("Invalid amount.").subscribe()}},{key:"removePayment",value:function(e){if(void 0!==e.id)return a.kX.error("Unable to delete a payment attached to the order").subscribe();var t=this._order.getValue(),s=t.payments.indexOf(e);t.payments.splice(s,1),this._order.next(t),a.l.emit({identifier:"ns.pos.remove-payment",value:e}),this.updateCustomerAccount(e),this.computePaid()}},{key:"updateCustomerAccount",value:function(e){if("account-payment"===e.identifier){var t=this.order.getValue().customer;t.account_amount+=e.value,this.selectCustomer(t)}}},{key:"getNetPrice",value:function(e,t,s){return"inclusive"===s?e/(t+100)*100:"exclusive"===s?e/100*(t+100):void 0}},{key:"getVatValue",value:function(e,t,s){return"inclusive"===s?e-this.getNetPrice(e,t,s):"exclusive"===s?this.getNetPrice(e,t,s)-e:void 0}},{key:"computeTaxes",value:function(){var e=this;return new Promise((function(t,s){var r=e.order.getValue();if(void 0===(r=e.computeProductsTaxes(r)).tax_group_id||null===r.tax_group_id)return s(!1);var n=r.tax_groups;return n&&void 0!==n[r.tax_group_id]?(r.taxes=r.taxes.map((function(t){return t.tax_value=e.getVatValue(r.subtotal,t.rate,r.tax_type),t})),r=e.computeOrderTaxes(r),t({status:"success",data:{tax:n[r.tax_group_id],order:r}})):null!==r.tax_group_id&&r.tax_group_id.toString().length>0?void a.ih.get("/api/nexopos/v4/taxes/groups/".concat(r.tax_group_id)).subscribe({next:function(s){return r.tax_groups=r.tax_groups||[],r.taxes=s.taxes.map((function(t){return{tax_id:t.id,tax_name:t.name,rate:parseFloat(t.rate),tax_value:e.getVatValue(r.subtotal,t.rate,r.tax_type)}})),r.tax_groups[s.id]=s,r=e.computeOrderTaxes(r),t({status:"success",data:{tax:s,order:r}})},error:function(e){return s(e)}}):s({status:"failed",message:(0,u.__)("No tax group assigned to the order")})}))}},{key:"computeOrderTaxes",value:function(e){var t=this.options.getValue().ns_pos_vat;return["flat_vat","variable_vat","products_variable_vat"].includes(t)&&e.taxes&&e.taxes.length>0&&(e.tax_value+=e.taxes.map((function(e){return e.tax_value})).reduce((function(e,t){return e+t}))),e.tax_value+=e.product_taxes,e}},{key:"computeProductsTaxes",value:function(e){var t=this.products.getValue(),s=t.map((function(e){return e.tax_value}));e.product_taxes=0;var r=this.options.getValue().ns_pos_vat;return["products_vat","products_flat_vat","products_variable_vat"].includes(r)&&s.length>0&&(e.product_taxes+=s.reduce((function(e,t){return e+t}))),e.products=t,e.total_products=t.length,e}},{key:"canProceedAsLaidAway",value:function(e){var t=this;return new Promise((function(s,r){return y(t,void 0,void 0,n().mark((function t(){var i,a,c,l,d,p,f,v=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=e.customer.group.minimal_credit_payment,a=(e.total*i/100).toFixed(ns.currency.ns_currency_precision),a=parseFloat(a),t.prev=3,t.next=6,new Promise((function(t,s){o.G.show(T,{order:e,reject:s,resolve:t})}));case 6:if(!(0===(c=t.sent).instalments.length&&c.tendered=a&&b()(e.date).isSame(ns.date.moment.startOf("day"),"day")}))).length){t.next=17;break}return t.abrupt("return",s({status:"success",message:(0,u.__)("Layaway defined"),data:{order:c}}));case 17:f=p[0].amount,o.G.show(S,{title:(0,u.__)("Confirm Payment"),message:(0,u.__)('An instalment has been detected. Would you like to add as first payment {amount} for the selected payment type "{paymentType}"?').replace("{amount}",h.default.filter("currency")(f)).replace("{paymentType}",d.label),onAction:function(e){var t={identifier:d.identifier,label:d.label,value:f,readonly:!1,selected:!0};v.addPayment(t),p[0].paid=!0,s({status:"success",message:(0,u.__)("Layaway defined"),data:{order:c}})}});case 19:t.next=24;break;case 21:return t.prev=21,t.t0=t.catch(3),t.abrupt("return",r(t.t0));case 24:case"end":return t.stop()}}),t,this,[[3,21]])})))}))}},{key:"submitOrder",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Promise((function(s,r){return y(e,void 0,void 0,n().mark((function e(){var i,o,c,l,d,p=this;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=Object.assign(Object.assign({},this.order.getValue()),t),o=i.customer.group.minimal_credit_payment,"hold"===i.payment_status){e.next=20;break}if(!(0===i.payments.length||i.total>i.tendered)){e.next=20;break}if("no"!==this.options.getValue().ns_orders_allow_partial){e.next=9;break}return c=(0,u.__)("Partially paid orders are disabled."),e.abrupt("return",r({status:"failed",message:c}));case 9:if(!(o>=0)){e.next=20;break}return e.prev=10,e.next=13,this.canProceedAsLaidAway(i);case 13:l=e.sent,i=l.data.order,e.next=20;break;case 17:return e.prev=17,e.t0=e.catch(10),e.abrupt("return",r(e.t0));case 20:if(this._isSubmitting){e.next=24;break}return d=void 0!==i.id?"put":"post",this._isSubmitting=!0,e.abrupt("return",a.ih[d]("/api/nexopos/v4/orders".concat(void 0!==i.id?"/"+i.id:""),i).subscribe({next:function(e){s(e),p.reset(),a.kq.doAction("ns-order-submit-successful",e),p._isSubmitting=!1;var t=p.options.getValue().ns_pos_complete_sale_audio;t.length>0&&new Audio(t).play()},error:function(e){p._isSubmitting=!1,r(e),a.kq.doAction("ns-order-submit-failed",e)}}));case 24:return e.abrupt("return",r({status:"failed",message:(0,u.__)("An order is currently being processed.")}));case 25:case"end":return e.stop()}}),e,this,[[10,17]])})))}))}},{key:"loadOrder",value:function(e){var t=this;return new Promise((function(s,r){a.ih.get("/api/nexopos/v4/orders/".concat(e,"/pos")).subscribe((function(e){return y(t,void 0,void 0,n().mark((function t(){var r;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=Object.assign(Object.assign({},this.defaultOrder()),e),r=e.products.map((function(e){return e.$original=function(){return e.product},e.$quantities=function(){return e.product.unit_quantities.filter((function(t){return t.id===e.unit_quantity_id}))[0]},e})),e.type=Object.values(this.types.getValue()).filter((function(t){return t.identifier===e.type}))[0],e.addresses={shipping:e.shipping_address,billing:e.billing_address},delete e.shipping_address,delete e.billing_address,this.buildOrder(e),this.buildProducts(r),t.next=10,this.selectCustomer(e.customer);case 10:s(e);case 11:case"end":return t.stop()}}),t,this)})))}),(function(e){return r(e)}))}))}},{key:"buildOrder",value:function(e){this.order.next(e)}},{key:"buildProducts",value:function(e){this.refreshProducts(e),this.products.next(e)}},{key:"printOrder",value:function(e){var t=this.options.getValue();if("disabled"===t.ns_pos_printing_enabled_for)return!1;switch(t.ns_pos_printing_gateway){case"default":this.processRegularPrinting(e);break;default:this.processCustomPrinting(e,t.ns_pos_printing_gateway)}}},{key:"processCustomPrinting",value:function(e,t){a.kq.applyFilters("ns-order-custom-print",{printed:!1,order_id:e,gateway:t}).printed||a.kX.error((0,u.__)("Unsupported print gateway.")).subscribe()}},{key:"processRegularPrinting",value:function(e){var t=document.querySelector("printing-section");t&&t.remove();var s=document.createElement("iframe");s.id="printing-section",s.className="hidden",s.src=this.settings.getValue().urls.printing_url.replace("{id}",e),document.body.appendChild(s)}},{key:"computePaid",value:function(){var e=this._order.getValue();e.tendered=0,e.payments.length>0&&(e.tendered=e.payments.map((function(e){return e.value})).reduce((function(e,t){return t+e}))),e.tendered>=e.total?e.payment_status="paid":e.tendered>0&&e.tendered0&&(t.products.filter((function(t){return e.products.map((function(e){return e.product_id})).includes(t.product_id)})).length>0||-1!==s.indexOf(e)||s.push(e)),e.categories.length>0&&(t.products.filter((function(t){return e.categories.map((function(e){return e.category_id})).includes(t.$original().category_id)})).length>0||-1!==s.indexOf(e)||s.push(e))})),s.forEach((function(t){a.kX.error((0,u.__)('The coupons "%s" has been removed from the cart, as it\'s required conditions are no more meet.').replace("%s",t.name),(0,u.__)("Okay"),{duration:6e3}).subscribe(),e.removeCoupon(t)}))}},{key:"refreshCart",value:function(){return y(this,void 0,void 0,n().mark((function e(){var t,s,r,i,o,c,l,d,p;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.checkCart(),t=this.products.getValue(),s=this.order.getValue(),(r=t.map((function(e){return e.total_price}))).length>0?s.subtotal=r.reduce((function(e,t){return e+t})):s.subtotal=0,i=s.coupons.map((function(e){return"percentage_discount"===e.type?(e.value=s.subtotal*e.discount_value/100,e.value):(e.value=e.discount_value,e.value)})),s.total_coupons=0,i.length>0&&(s.total_coupons=i.reduce((function(e,t){return e+t}))),"percentage"===s.discount_type&&(s.discount=s.discount_percentage*s.subtotal/100),s.discount>s.subtotal&&0===s.total_coupons&&(s.discount=s.subtotal,a.kX.info("The discount has been set to the cart subtotal").subscribe()),s.tax_value=0,this.order.next(s),e.prev=12,e.next=15,this.computeTaxes();case 15:o=e.sent,s=o.data.order,e.next=22;break;case 19:e.prev=19,e.t0=e.catch(12),!1!==e.t0&&void 0!==e.t0.message&&a.kX.error(e.t0.message||(0,u.__)("An unexpected error has occured while fecthing taxes."),(0,u.__)("OKAY"),{duration:0}).subscribe();case 22:(c=t.map((function(e){return"inclusive"===e.tax_type?e.tax_value:0}))).length>0&&c.reduce((function(e,t){return e+t})),l=s.tax_type,d=this.options.getValue().ns_pos_vat,p=0,(["flat_vat","variable_vat"].includes(d)||["products_vat","products_flat_vat","products_variable_vat"].includes(d))&&(p=s.tax_value),s.total="exclusive"===l?+(s.subtotal+(s.shipping||0)+p-s.discount-s.total_coupons).toFixed(ns.currency.ns_currency_precision):+(s.subtotal+(s.shipping||0)-s.discount-s.total_coupons).toFixed(ns.currency.ns_currency_precision),this.order.next(s),a.kq.doAction("ns-cart-after-refreshed",s);case 32:case"end":return e.stop()}}),e,this,[[12,19]])})))}},{key:"getStockUsage",value:function(e,t){var s=this._products.getValue().filter((function(s){return s.product_id===e&&s.unit_quantity_id===t})).map((function(e){return e.quantity}));return s.length>0?s.reduce((function(e,t){return e+t})):0}},{key:"addToCart",value:function(e){return y(this,void 0,void 0,n().mark((function t(){var s,r,i,o,a,u,c;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(s=new Object,r={product_id:e.id||0,name:e.name,discount_type:"percentage",discount:0,discount_percentage:0,quantity:e.quantity||0,tax_group_id:e.tax_group_id,tax_type:e.tax_type||void 0,tax_value:0,unit_id:e.unit_id||0,unit_price:e.unit_price||0,unit_name:e.unit_name||"",total_price:0,mode:"normal",$original:e.$original||function(){return e},$quantities:e.$quantities||void 0},this._processingAddQueue=!0,0===r.product_id){t.next=22;break}t.t0=n().keys(this.addToCartQueue);case 5:if((t.t1=t.t0()).done){t.next=22;break}return i=t.t1.value,t.prev=7,o=new this.addToCartQueue[i](r),t.next=11,o.run(s);case 11:a=t.sent,s=Object.assign(Object.assign({},s),a),t.next=20;break;case 15:if(t.prev=15,t.t2=t.catch(7),!1!==t.t2){t.next=20;break}return this._processingAddQueue=!1,t.abrupt("return",!1);case 20:t.next=5;break;case 22:this._processingAddQueue=!1,r=Object.assign(Object.assign({},r),s),(u=this._products.getValue()).unshift(r),this.refreshProducts(u),this._products.next(u),(c=this.options.getValue().ns_pos_new_item_audio).length>0&&new Audio(c).play();case 30:case"end":return t.stop()}}),t,this,[[7,15]])})))}},{key:"defineTypes",value:function(e){this._types.next(e)}},{key:"removeProduct",value:function(e){var t=this._products.getValue(),s=t.indexOf(e);t.splice(s,1),this._products.next(t)}},{key:"updateProduct",value:function(e,t){var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=this._products.getValue();s=null===s?r.indexOf(e):s,h.default.set(r,s,Object.assign(Object.assign({},e),t)),this.refreshProducts(r),this._products.next(r)}},{key:"refreshProducts",value:function(e){var t=this;e.forEach((function(e){t.computeProduct(e)}))}},{key:"computeProductTax",value:function(e){switch(console.log(e.mode),e.mode){case"custom":return this.computeCustomProductTax(e);case"normal":return this.computeNormalProductTax(e);case"wholesale":return this.computeWholesaleProductTax(e);default:return e}}},{key:"proceedProductTaxComputation",value:function(e,t){var s=this,r=e.$original(),n=r.tax_group,i=0,o=0,a=0;if(void 0!==n.taxes){var u=0;n.taxes.length>0&&(u=n.taxes.map((function(e){return e.rate})).reduce((function(e,t){return e+t})));var c=this.getNetPrice(t,u,r.tax_type);switch(r.tax_type){case"inclusive":i=c,a=t;break;case"exclusive":i=t,a=c}var l=n.taxes.map((function(e){return s.getVatValue(t,e.rate,r.tax_type)}));l.length>0&&(o=l.reduce((function(e,t){return e+t})))}return{price_without_tax:i,tax_value:o,price_with_tax:a}}},{key:"computeCustomProductTax",value:function(e){e.$original();var t=e.$quantities(),s=this.proceedProductTaxComputation(e,t.custom_price_edit);return t.excl_tax_custom_price=s.price_without_tax,t.incl_tax_custom_price=s.price_with_tax,t.custom_price_tax=s.tax_value,e.$quantities=function(){return t},e}},{key:"computeNormalProductTax",value:function(e){e.$original();var t=e.$quantities(),s=this.proceedProductTaxComputation(e,t.sale_price_edit);return t.excl_tax_sale_price=s.price_without_tax,t.incl_tax_sale_price=s.price_with_tax,t.sale_price_tax=s.tax_value,e.$quantities=function(){return t},e}},{key:"computeWholesaleProductTax",value:function(e){e.$original();var t=e.$quantities(),s=this.proceedProductTaxComputation(e,t.wholesale_price_edit);return t.excl_tax_wholesale_price=s.price_without_tax,t.incl_tax_wholesale_price=s.price_with_tax,t.wholesale_price_tax=s.tax_value,e.$quantities=function(){return t},e}},{key:"computeProduct",value:function(e){"normal"===e.mode?(e.unit_price=this.getSalePrice(e.$quantities(),e.$original()),e.tax_value=e.$quantities().sale_price_tax*e.quantity):"wholesale"===e.mode&&(e.unit_price=this.getWholesalePrice(e.$quantities(),e.$original()),e.tax_value=e.$quantities().wholesale_price_tax*e.quantity),"custom"===e.mode&&(e.unit_price=this.getCustomPrice(e.$quantities(),e.$original()),e.tax_value=e.$quantities().custom_price_tax*e.quantity),["flat","percentage"].includes(e.discount_type)&&"percentage"===e.discount_type&&(e.discount=e.unit_price*e.discount_percentage/100*e.quantity),e.total_price=e.unit_price*e.quantity-e.discount,a.kq.doAction("ns-after-product-computed",e)}},{key:"loadCustomer",value:function(e){return a.ih.get("/api/nexopos/v4/customers/".concat(e))}},{key:"defineSettings",value:function(e){this._settings.next(e)}},{key:"voidOrder",value:function(e){var t=this;void 0!==e.id?["hold"].includes(e.payment_status)?o.G.show(S,{title:"Order Deletion",message:"The current order will be deleted as no payment has been made so far.",onAction:function(s){s&&a.ih.delete("/api/nexopos/v4/orders/".concat(e.id)).subscribe((function(e){a.kX.success(e.message).subscribe(),t.reset()}),(function(e){return a.kX.error(e.message).subscribe()}))}}):o.G.show($,{title:"Void The Order",message:"The current order will be void. This will cancel the transaction, but the order won't be deleted. Further details about the operation will be tracked on the report. Consider providing the reason of this operation.",onAction:function(s){!1!==s&&a.ih.post("/api/nexopos/v4/orders/".concat(e.id,"/void"),{reason:s}).subscribe((function(e){a.kX.success(e.message).subscribe(),t.reset()}),(function(e){return a.kX.error(e.message).subscribe()}))}}):a.kX.error("Unable to void an unpaid order.").subscribe()}},{key:"triggerOrderTypeSelection",value:function(e){return y(this,void 0,void 0,n().mark((function t(){var s;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:s=0;case 1:if(!(s{var r={"./af":2786,"./af.js":2786,"./ar":867,"./ar-dz":4130,"./ar-dz.js":4130,"./ar-kw":6135,"./ar-kw.js":6135,"./ar-ly":6440,"./ar-ly.js":6440,"./ar-ma":7702,"./ar-ma.js":7702,"./ar-sa":6040,"./ar-sa.js":6040,"./ar-tn":7100,"./ar-tn.js":7100,"./ar.js":867,"./az":1083,"./az.js":1083,"./be":9808,"./be.js":9808,"./bg":8338,"./bg.js":8338,"./bm":7438,"./bm.js":7438,"./bn":8905,"./bn-bd":6225,"./bn-bd.js":6225,"./bn.js":8905,"./bo":1560,"./bo.js":1560,"./br":1278,"./br.js":1278,"./bs":622,"./bs.js":622,"./ca":2468,"./ca.js":2468,"./cs":5822,"./cs.js":5822,"./cv":877,"./cv.js":877,"./cy":7373,"./cy.js":7373,"./da":4780,"./da.js":4780,"./de":9740,"./de-at":217,"./de-at.js":217,"./de-ch":894,"./de-ch.js":894,"./de.js":9740,"./dv":5300,"./dv.js":5300,"./el":837,"./el.js":837,"./en-au":8348,"./en-au.js":8348,"./en-ca":7925,"./en-ca.js":7925,"./en-gb":2243,"./en-gb.js":2243,"./en-ie":6436,"./en-ie.js":6436,"./en-il":7207,"./en-il.js":7207,"./en-in":4175,"./en-in.js":4175,"./en-nz":6319,"./en-nz.js":6319,"./en-sg":1662,"./en-sg.js":1662,"./eo":2915,"./eo.js":2915,"./es":7093,"./es-do":5251,"./es-do.js":5251,"./es-mx":6112,"./es-mx.js":6112,"./es-us":1146,"./es-us.js":1146,"./es.js":7093,"./et":5603,"./et.js":5603,"./eu":7763,"./eu.js":7763,"./fa":6959,"./fa.js":6959,"./fi":1897,"./fi.js":1897,"./fil":2549,"./fil.js":2549,"./fo":4694,"./fo.js":4694,"./fr":4470,"./fr-ca":3049,"./fr-ca.js":3049,"./fr-ch":2330,"./fr-ch.js":2330,"./fr.js":4470,"./fy":5044,"./fy.js":5044,"./ga":9295,"./ga.js":9295,"./gd":2101,"./gd.js":2101,"./gl":8794,"./gl.js":8794,"./gom-deva":7884,"./gom-deva.js":7884,"./gom-latn":3168,"./gom-latn.js":3168,"./gu":5349,"./gu.js":5349,"./he":4206,"./he.js":4206,"./hi":94,"./hi.js":94,"./hr":316,"./hr.js":316,"./hu":2138,"./hu.js":2138,"./hy-am":1423,"./hy-am.js":1423,"./id":9218,"./id.js":9218,"./is":135,"./is.js":135,"./it":626,"./it-ch":150,"./it-ch.js":150,"./it.js":626,"./ja":9183,"./ja.js":9183,"./jv":4286,"./jv.js":4286,"./ka":2105,"./ka.js":2105,"./kk":7772,"./kk.js":7772,"./km":8758,"./km.js":8758,"./kn":9282,"./kn.js":9282,"./ko":3730,"./ko.js":3730,"./ku":1408,"./ku.js":1408,"./ky":3291,"./ky.js":3291,"./lb":6841,"./lb.js":6841,"./lo":5466,"./lo.js":5466,"./lt":7010,"./lt.js":7010,"./lv":7595,"./lv.js":7595,"./me":9861,"./me.js":9861,"./mi":5493,"./mi.js":5493,"./mk":5966,"./mk.js":5966,"./ml":7341,"./ml.js":7341,"./mn":5115,"./mn.js":5115,"./mr":370,"./mr.js":370,"./ms":9847,"./ms-my":1237,"./ms-my.js":1237,"./ms.js":9847,"./mt":2126,"./mt.js":2126,"./my":6165,"./my.js":6165,"./nb":4924,"./nb.js":4924,"./ne":6744,"./ne.js":6744,"./nl":3901,"./nl-be":9814,"./nl-be.js":9814,"./nl.js":3901,"./nn":3877,"./nn.js":3877,"./oc-lnc":2135,"./oc-lnc.js":2135,"./pa-in":5858,"./pa-in.js":5858,"./pl":4495,"./pl.js":4495,"./pt":9520,"./pt-br":7971,"./pt-br.js":7971,"./pt.js":9520,"./ro":6459,"./ro.js":6459,"./ru":238,"./ru.js":238,"./sd":950,"./sd.js":950,"./se":490,"./se.js":490,"./si":124,"./si.js":124,"./sk":4249,"./sk.js":4249,"./sl":4985,"./sl.js":4985,"./sq":1104,"./sq.js":1104,"./sr":9131,"./sr-cyrl":9915,"./sr-cyrl.js":9915,"./sr.js":9131,"./ss":5893,"./ss.js":5893,"./sv":8760,"./sv.js":8760,"./sw":1172,"./sw.js":1172,"./ta":7333,"./ta.js":7333,"./te":3110,"./te.js":3110,"./tet":2095,"./tet.js":2095,"./tg":7321,"./tg.js":7321,"./th":9041,"./th.js":9041,"./tk":9005,"./tk.js":9005,"./tl-ph":5768,"./tl-ph.js":5768,"./tlh":9444,"./tlh.js":9444,"./tr":2397,"./tr.js":2397,"./tzl":8254,"./tzl.js":8254,"./tzm":1106,"./tzm-latn":699,"./tzm-latn.js":699,"./tzm.js":1106,"./ug-cn":9288,"./ug-cn.js":9288,"./uk":7691,"./uk.js":7691,"./ur":3795,"./ur.js":3795,"./uz":6791,"./uz-latn":588,"./uz-latn.js":588,"./uz.js":6791,"./vi":5666,"./vi.js":5666,"./x-pseudo":4378,"./x-pseudo.js":4378,"./yo":5805,"./yo.js":5805,"./zh-cn":3839,"./zh-cn.js":3839,"./zh-hk":5726,"./zh-hk.js":5726,"./zh-mo":9807,"./zh-mo.js":9807,"./zh-tw":4152,"./zh-tw.js":4152};function n(e){var t=i(e);return s(t)}function i(e){if(!s.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}n.keys=function(){return Object.keys(r)},n.resolve=i,e.exports=n,n.id=6700},3968:(e,t,s)=>{"use strict";s.d(t,{Z:()=>o});function r(e){return function(e){if(Array.isArray(e))return n(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return n(e,t);var s=Object.prototype.toString.call(e).slice(8,-1);"Object"===s&&e.constructor&&(s=e.constructor.name);if("Map"===s||"Set"===s)return Array.from(e);if("Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return n(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var s=0,r=new Array(t);s100?100:this.backValue))),"0"===this.backValue&&(this.backValue=""),this.$emit("changed",this.floating&&this.backValue.length>0?parseFloat(this.backValue/this.number):this.backValue)):this.$emit("next",this.floating&&this.backValue.length>0?parseFloat(this.backValue/this.number):this.backValue)}}};const o=(0,s(1900).Z)(i,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"grid grid-flow-row grid-cols-3 gap-2 grid-rows-3",staticStyle:{padding:"1px"},attrs:{id:"numpad"}},[e._l(e.keys,(function(t,r){return s("div",{key:r,staticClass:"hover:bg-gray-400 hover:text-gray-800 bg-gray-300 text-2xl text-gray-700 border h-16 flex items-center justify-center cursor-pointer",staticStyle:{margin:"-1px"},on:{click:function(s){return e.inputValue(t)}}},[void 0!==t.value?s("span",[e._v(e._s(t.value))]):e._e(),e._v(" "),t.icon?s("i",{staticClass:"las",class:t.icon}):e._e()])})),e._v(" "),e._t("numpad-footer")],2)}),[],!1,null,null,null).exports},1384:(e,t,s)=>{"use strict";s.d(t,{Z:()=>o});var r=s(2242),n=s(5872);const i={name:"ns-pos-customers-button",methods:{__:s(7389).__,openPendingOrdersPopup:function(){(new r.G).open(n.Z)}}};const o=(0,s(1900).Z)(i,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("button",{staticClass:"flex-shrink-0 h-12 flex items-center shadow rounded px-2 py-1 text-sm bg-white text-gray-700",on:{click:function(t){return e.openPendingOrdersPopup()}}},[s("i",{staticClass:"mr-1 text-xl lar la-user-circle"}),e._v(" "),s("span",[e._v(e._s(e.__("Customers")))])])}),[],!1,null,null,null).exports},8927:(e,t,s)=>{"use strict";s.d(t,{Z:()=>n});const r={name:"ns-pos-dashboard-button",methods:{__:s(7389).__,goToDashboard:function(){return document.location=POS.settings.getValue().urls.dashboard_url}}};const n=(0,s(1900).Z)(r,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("button",{staticClass:"flex-shrink-0 h-12 flex items-center shadow rounded px-2 py-1 text-sm bg-white text-gray-700",on:{click:function(t){return e.goToDashboard()}}},[s("i",{staticClass:"mr-1 text-xl las la-tachometer-alt"}),e._v(" "),s("span",[e._v(e._s(e.__("Dashboard")))])])}),[],!1,null,null,null).exports},6568:(e,t,s)=>{"use strict";s.d(t,{Z:()=>o});var r=s(2242),n=s(3625);const i={name:"ns-pos-delivery-button",methods:{__:s(7389).__,openPendingOrdersPopup:function(){new r.G({primarySelector:"#pos-app",popupClass:"shadow-lg bg-white w-3/5 md:w-2/3 lg:w-2/5 xl:w-2/4"}).open(n.Z)}}};const o=(0,s(1900).Z)(i,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("button",{staticClass:"flex-shrink-0 h-12 flex items-center shadow rounded px-2 py-1 text-sm bg-white text-gray-700",on:{click:function(t){return e.openPendingOrdersPopup()}}},[s("i",{staticClass:"mr-1 text-xl las la-truck"}),e._v(" "),s("span",[e._v(e._s(e.__("Order Type")))])])}),[],!1,null,null,null).exports},661:(e,t,s)=>{"use strict";s.d(t,{Z:()=>h});var r=s(2242),n=s(162),i=s(419),o=s(7389);const a={data:function(){return{products:[],isLoading:!1}},computed:{order:function(){return this.$popupParams.order}},mounted:function(){this.loadProducts()},methods:{__:o.__,close:function(){this.$popupParams.reject(!1),this.$popup.close()},loadProducts:function(){var e=this;this.isLoading=!0;var t=this.$popupParams.order.id;n.ih.get("/api/nexopos/v4/orders/".concat(t,"/products")).subscribe((function(t){e.isLoading=!1,e.products=t}))},openOrder:function(){this.$popup.close(),this.$popupParams.resolve(this.order)}}};var u=s(1900);const c=(0,u.Z)(a,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"shadow-lg bg-white w-6/7-screen md:w-3/5-screen lg:w-2/5-screen h-6/7-screen flex flex-col overflow-hidden"},[s("div",{staticClass:"p-2 flex justify-between text-gray-700 items-center border-b"},[s("h3",{staticClass:"font-semibold"},[e._v(e._s(e.__("Products"))+" — "+e._s(e.order.code)+" "),e.order.title?s("span",[e._v("("+e._s(e.order.title)+")")]):e._e()]),e._v(" "),s("div",[s("ns-close-button",{on:{click:function(t){return e.close()}}})],1)]),e._v(" "),s("div",{staticClass:"flex-auto p-2 overflow-y-auto"},[e.isLoading?s("div",{staticClass:"flex-auto relative"},[s("div",{staticClass:"h-full w-full flex items-center justify-center"},[s("ns-spinner")],1)]):e._e(),e._v(" "),e.isLoading?e._e():e._l(e.products,(function(t){return s("div",{key:t.id,staticClass:"item"},[s("div",{staticClass:"flex-col border-b border-blue-400 py-2"},[s("div",{staticClass:"title font-semibold text-gray-700 flex justify-between"},[s("span",[e._v(e._s(t.name)+" (x"+e._s(t.quantity)+")")]),e._v(" "),s("span",[e._v(e._s(e._f("currency")(t.total_price)))])]),e._v(" "),s("div",{staticClass:"text-sm text-gray-600"},[s("ul",[s("li",[e._v(e._s(e.__("Unit"))+" : "+e._s(t.unit.name))])])])])])}))],2),e._v(" "),s("div",{staticClass:"flex justify-end p-2 border-t border-gray-400"},[s("div",{staticClass:"px-1"},[s("div",{staticClass:"-mx-2 flex"},[s("div",{staticClass:"px-1"},[s("ns-button",{attrs:{type:"info"},on:{click:function(t){return e.openOrder()}}},[e._v(e._s(e.__("Open")))])],1),e._v(" "),s("div",{staticClass:"px-1"},[s("ns-button",{attrs:{type:"danger"},on:{click:function(t){return e.close()}}},[e._v(e._s(e.__("Close")))])],1)])])])])}),[],!1,null,null,null).exports;const l={props:["orders"],data:function(){return{searchField:""}},watch:{orders:function(){n.kq.doAction("ns-pos-pending-orders-refreshed",this.orders)}},mounted:function(){},name:"ns-pos-pending-order",methods:{__:o.__,previewOrder:function(e){this.$emit("previewOrder",e)},proceedOpenOrder:function(e){this.$emit("proceedOpenOrder",e)},searchOrder:function(){this.$emit("searchOrder",this.searchField)},printOrder:function(e){this.$emit("printOrder",e)}}};const d={components:{nsPosPendingOrders:(0,u.Z)(l,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"flex flex-auto flex-col overflow-hidden"},[s("div",{staticClass:"p-1"},[s("div",{staticClass:"flex rounded border-2 border-blue-400"},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.searchField,expression:"searchField"}],staticClass:"p-2 outline-none flex-auto",attrs:{type:"text"},domProps:{value:e.searchField},on:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.searchOrder()},input:function(t){t.target.composing||(e.searchField=t.target.value)}}}),e._v(" "),s("button",{staticClass:"w-16 md:w-24 bg-blue-400 text-white",on:{click:function(t){return e.searchOrder()}}},[s("i",{staticClass:"las la-search"}),e._v(" "),s("span",{staticClass:"mr-1 hidden md:visible"},[e._v(e._s(e.__("Search")))])])])]),e._v(" "),s("div",{staticClass:"overflow-y-auto flex flex-auto"},[s("div",{staticClass:"flex p-2 flex-auto flex-col overflow-y-auto"},[e._l(e.orders,(function(t){return s("div",{key:t.id,staticClass:"border-b border-blue-400 w-full py-2",attrs:{"data-order-id":t.id}},[s("h3",{staticClass:"text-gray-700"},[e._v(e._s(t.title||"Untitled Order"))]),e._v(" "),s("div",{staticClass:"px-2"},[s("div",{staticClass:"flex flex-wrap -mx-4"},[s("div",{staticClass:"w-full md:w-1/2 px-2"},[s("p",{staticClass:"text-sm text-gray-600"},[s("strong",[e._v(e._s(e.__("Cashier")))]),e._v(" : "+e._s(t.nexopos_users_username))]),e._v(" "),s("p",{staticClass:"text-sm text-gray-600"},[s("strong",[e._v(e._s(e.__("Register")))]),e._v(" : "+e._s(e._f("currency")(t.total)))]),e._v(" "),s("p",{staticClass:"text-sm text-gray-600"},[s("strong",[e._v(e._s(e.__("Tendered")))]),e._v(" : "+e._s(e._f("currency")(t.tendered)))])]),e._v(" "),s("div",{staticClass:"w-full md:w-1/2 px-2"},[s("p",{staticClass:"text-sm text-gray-600"},[s("strong",[e._v(e._s(e.__("Customer")))]),e._v(" : "+e._s(t.nexopos_customers_name))]),e._v(" "),s("p",{staticClass:"text-sm text-gray-600"},[s("strong",[e._v(e._s(e.__("Date")))]),e._v(" : "+e._s(t.created_at))]),e._v(" "),s("p",{staticClass:"text-sm text-gray-600"},[s("strong",[e._v(e._s(e.__("Type")))]),e._v(" : "+e._s(t.type))])])])]),e._v(" "),s("div",{staticClass:"flex justify-end w-full mt-2"},[s("div",{staticClass:"flex rounded-lg overflow-hidden buttons-container"},[s("button",{staticClass:"text-white bg-green-400 outline-none px-2 py-1",on:{click:function(s){return e.proceedOpenOrder(t)}}},[s("i",{staticClass:"las la-lock-open"}),e._v(" "+e._s(e.__("Open")))]),e._v(" "),s("button",{staticClass:"text-white bg-blue-400 outline-none px-2 py-1",on:{click:function(s){return e.previewOrder(t)}}},[s("i",{staticClass:"las la-eye"}),e._v(" "+e._s(e.__("Products")))]),e._v(" "),s("button",{staticClass:"text-white bg-teal-400 outline-none px-2 py-1",on:{click:function(s){return e.printOrder(t)}}},[s("i",{staticClass:"las la-print"}),e._v(" "+e._s(e.__("Print")))])])])])})),e._v(" "),0===e.orders.length?s("div",{staticClass:"h-full v-full items-center justify-center flex"},[s("h3",{staticClass:"text-semibold text-gray-700"},[e._v(e._s(e.__("Nothing to display...")))])]):e._e()],2)])])}),[],!1,null,null,null).exports},methods:{__:o.__,searchOrder:function(e){var t=this;n.ih.get("/api/nexopos/v4/crud/".concat(this.active,"?search=").concat(e)).subscribe((function(e){t.orders=e.data}))},setActiveTab:function(e){this.active=e,this.loadOrderFromType(e)},openOrder:function(e){POS.loadOrder(e.id),this.$popup.close()},loadOrderFromType:function(e){var t=this;n.ih.get("/api/nexopos/v4/crud/".concat(e)).subscribe((function(e){t.orders=e.data}))},previewOrder:function(e){var t=this;new Promise((function(t,s){Popup.show(c,{order:e,resolve:t,reject:s})})).then((function(s){t.proceedOpenOrder(e)}),(function(e){return e}))},printOrder:function(e){POS.printOrder(e.id)},proceedOpenOrder:function(e){var t=this;if(POS.products.getValue().length>0)return Popup.show(i.Z,{title:"Confirm Your Action",message:"The cart is not empty. Opening an order will clear your cart would you proceed ?",onAction:function(s){s&&t.openOrder(e)}});this.openOrder(e)}},data:function(){return{active:"ns.hold-orders",searchField:"",orders:[]}},mounted:function(){var e=this;this.$popup.event.subscribe((function(t){"click-overlay"===t.event&&e.$popup.close()})),this.loadOrderFromType(this.active)}};const p=(0,u.Z)(d,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"shadow-lg bg-white w-6/7-screen md:w-3/5-screen lg:w-2/5-screen h-6/7-screen flex flex-col overflow-hidden"},[s("div",{staticClass:"p-2 flex justify-between text-gray-700 items-center border-b"},[s("h3",{staticClass:"font-semibold"},[e._v(e._s(e.__("Orders")))]),e._v(" "),s("div",[s("ns-close-button",{on:{click:function(t){return e.$popup.close()}}})],1)]),e._v(" "),s("div",{staticClass:"p-2 flex overflow-hidden flex-auto"},[s("ns-tabs",{attrs:{active:e.active},on:{changeTab:function(t){return e.setActiveTab(t)}}},[s("ns-tabs-item",{staticClass:"flex flex-col overflow-hidden",attrs:{identifier:"ns.hold-orders",label:e.__("On Hold"),padding:"p-0"}},[s("ns-pos-pending-orders",{attrs:{orders:e.orders},on:{searchOrder:function(t){return e.searchOrder(t)},previewOrder:function(t){return e.previewOrder(t)},printOrder:function(t){return e.printOrder(t)},proceedOpenOrder:function(t){return e.proceedOpenOrder(t)}}})],1),e._v(" "),s("ns-tabs-item",{staticClass:"flex flex-col overflow-hidden",attrs:{identifier:"ns.unpaid-orders",label:e.__("Unpaid"),padding:"p-0"}},[s("ns-pos-pending-orders",{attrs:{orders:e.orders},on:{searchOrder:function(t){return e.searchOrder(t)},previewOrder:function(t){return e.previewOrder(t)},printOrder:function(t){return e.printOrder(t)},proceedOpenOrder:function(t){return e.proceedOpenOrder(t)}}})],1),e._v(" "),s("ns-tabs-item",{staticClass:"flex flex-col overflow-hidden",attrs:{identifier:"ns.partially-paid-orders",label:e.__("Partially Paid"),padding:"p-0"}},[s("ns-pos-pending-orders",{attrs:{orders:e.orders},on:{searchOrder:function(t){return e.searchOrder(t)},previewOrder:function(t){return e.previewOrder(t)},printOrder:function(t){return e.printOrder(t)},proceedOpenOrder:function(t){return e.proceedOpenOrder(t)}}})],1)],1)],1),e._v(" "),s("div",{staticClass:"p-2 flex justify-between border-t bg-gray-200"},[s("div"),e._v(" "),s("div",[s("ns-button",[e._v(e._s(e.__("Close")))])],1)])])}),[],!1,null,null,null).exports,f={name:"ns-pos-pending-orders-button",methods:{__:o.__,openPendingOrdersPopup:function(){(new r.G).open(p)}}};const h=(0,u.Z)(f,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("button",{staticClass:"flex-shrink-0 h-12 flex items-center shadow rounded px-2 py-1 text-sm bg-white text-gray-700",on:{click:function(t){return e.openPendingOrdersPopup()}}},[s("i",{staticClass:"mr-1 text-xl lar la-hand-pointer"}),e._v(" "),s("span",[e._v(e._s(e.__("Orders")))])])}),[],!1,null,null,null).exports},818:(e,t,s)=>{"use strict";s.d(t,{Z:()=>T});var r=s(7757),n=s.n(r),i=s(162),o=s(3968),a=s(7266),u=s(8603),c=s(419),l=s(7389);const d={components:{nsNumpad:o.Z},data:function(){return{amount:0,title:null,identifier:null,settingsSubscription:null,settings:null,action:null,loaded:!1,register_id:null,validation:new a.Z,fields:[]}},mounted:function(){var e=this;this.title=this.$popupParams.title,this.identifier=this.$popupParams.identifier,this.action=this.$popupParams.action,this.register_id=this.$popupParams.register_id,this.settingsSubscription=POS.settings.subscribe((function(t){e.settings=t})),this.loadFields()},destroyed:function(){this.settingsSubscription.unsubscribe()},methods:{popupCloser:u.Z,__:l.__,definedValue:function(e){this.amount=e},close:function(){this.$popup.close()},loadFields:function(){var e=this;this.loaded=!1,nsHttpClient.get("/api/nexopos/v4/fields/".concat(this.identifier)).subscribe((function(t){e.loaded=!0,e.fields=t}),(function(t){return e.loaded=!0,nsSnackBar.error(t.message,"OKAY",{duration:!1}).subscribe()}))},submit:function(e){var t=this;Popup.show(c.Z,{title:"Confirm Your Action",message:this.$popupParams.confirmMessage||"Would you like to confirm your action.",onAction:function(e){e&&t.triggerSubmit()}})},triggerSubmit:function(){var e=this,t=this.validation.extractFields(this.fields);t.amount=""===this.amount?0:this.amount,nsHttpClient.post("/api/nexopos/v4/cash-registers/".concat(this.action,"/").concat(this.register_id||this.settings.register.id),t).subscribe((function(t){e.$popupParams.resolve(t),e.$popup.close(),nsSnackBar.success(t.message).subscribe()}),(function(e){nsSnackBar.error(e.message).subscribe()}))}}};var p=s(1900);const f=(0,p.Z)(d,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[e.loaded?s("div",{staticClass:"shadow-lg w-95vw md:w-2/5-screen bg-white"},[s("div",{staticClass:"border-b border-gray-200 p-2 text-gray-700 flex justify-between items-center"},[s("h3",{staticClass:"font-semibold"},[e._v(e._s(e.title))]),e._v(" "),s("div",[s("ns-close-button",{on:{click:function(t){return e.close()}}})],1)]),e._v(" "),s("div",{staticClass:"p-2"},[null!==e.settings&&e.settings.register?s("div",{staticClass:"mb-2 p-3 bg-gray-400 font-bold text-white text-right flex justify-between"},[s("span",[e._v(e._s(e.__("Balance"))+" ")]),e._v(" "),s("span",[e._v(e._s(e._f("currency")(e.settings.register.balance)))])]):e._e(),e._v(" "),s("div",{staticClass:"mb-2 p-3 bg-green-400 font-bold text-white text-right flex justify-between"},[s("span",[e._v(e._s(e.__("Input")))]),e._v(" "),s("span",[e._v(e._s(e._f("currency")(e.amount)))])]),e._v(" "),s("div",{staticClass:"mb-2"},[s("ns-numpad",{attrs:{floating:!0,value:e.amount},on:{next:function(t){return e.submit(t)},changed:function(t){return e.definedValue(t)}}})],1),e._v(" "),e._l(e.fields,(function(e,t){return s("ns-field",{key:t,attrs:{field:e}})}))],2)]):e._e(),e._v(" "),e.loaded?e._e():s("div",{staticClass:"h-full w-full flex items-center justify-center"},[s("ns-spinner")],1)])}),[],!1,null,null,null).exports;var h=s(6386);function v(e,t,s,r,n,i,o){try{var a=e[i](o),u=a.value}catch(e){return void s(e)}a.done?t(u):Promise.resolve(u).then(r,n)}const _={components:{nsNumpad:o.Z},data:function(){return{registers:[],priorVerification:!1,hasLoadedRegisters:!1,validation:new a.Z,amount:0,settings:null,settingsSubscription:null}},mounted:function(){var e=this;this.checkUsedRegister(),this.settingsSubscription=POS.settings.subscribe((function(t){e.settings=t}))},beforeDestroy:function(){this.settingsSubscription.unsubscribe()},computed:{},methods:{__:l.__,popupResolver:h.Z,selectRegister:function(e){var t,s=this;return(t=n().mark((function t(){var r;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("closed"===e.status){t.next=2;break}return t.abrupt("return",i.kX.error((0,l.__)("Unable to open this register. Only closed register can be opened.")).subscribe());case 2:return t.prev=2,t.next=5,new Promise((function(t,s){var r=(0,l.__)("Open Register : %s").replace("%s",e.name),n=e.id;Popup.show(f,{resolve:t,reject:s,title:r,identifier:"ns.cash-registers-opening",action:"open",register_id:n})}));case 5:r=t.sent,s.popupResolver(r),t.next=12;break;case 9:t.prev=9,t.t0=t.catch(2),console.log(t.t0);case 12:case"end":return t.stop()}}),t,null,[[2,9]])})),function(){var e=this,s=arguments;return new Promise((function(r,n){var i=t.apply(e,s);function o(e){v(i,r,n,o,a,"next",e)}function a(e){v(i,r,n,o,a,"throw",e)}o(void 0)}))})()},checkUsedRegister:function(){var e=this;this.priorVerification=!1,i.ih.get("/api/nexopos/v4/cash-registers/used").subscribe((function(t){e.$popupParams.resolve(t),e.$popup.close()}),(function(t){e.priorVerification=!0,i.kX.error(t.message).subscribe(),e.loadRegisters()}))},loadRegisters:function(){var e=this;this.hasLoadedRegisters=!1,i.ih.get("/api/nexopos/v4/cash-registers").subscribe((function(t){e.registers=t,e.hasLoadedRegisters=!0}))},getClass:function(e){switch(e.status){case"in-use":return"bg-teal-200 text-gray-800 cursor-not-allowed";case"disabled":return"bg-gray-200 text-gray-700 cursor-not-allowed";case"available":return"bg-green-100 text-gray-800"}return"border-gray-200 cursor-pointer hover:bg-blue-400 hover:text-white"}}};const m=(0,p.Z)(_,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[!1===e.priorVerification?s("div",{staticClass:"h-full w-full py-10 flex justify-center items-center"},[s("ns-spinner",{attrs:{size:"24",border:"8"}})],1):e._e(),e._v(" "),s("div",{staticClass:"w-95vw md:w-3/5-screen lg:w-3/5-screen xl:w-2/5-screen flex flex-col overflow-hidden",class:e.priorVerification?"shadow-lg bg-white":""},[e.priorVerification?[s("div",{staticClass:"title p-2 border-b border-gray-200 flex justify-between items-center"},[s("h3",{staticClass:"font-semibold"},[e._v(e._s(e.__("Open The Register")))]),e._v(" "),e.settings?s("div",[s("a",{staticClass:"hover:bg-red-400 hover:border-red-500 hover:text-white rounded-full border border-gray-200 px-3 text-sm py-1",attrs:{href:e.settings.urls.orders_url}},[e._v(e._s(e.__("Exit To Orders")))])]):e._e()]),e._v(" "),e.hasLoadedRegisters?e._e():s("div",{staticClass:"py-10 flex-auto overflow-y-auto flex items-center justify-center"},[s("ns-spinner",{attrs:{size:"16",border:"4"}})],1),e._v(" "),e.hasLoadedRegisters?s("div",{staticClass:"flex-auto overflow-y-auto"},[s("div",{staticClass:"grid grid-cols-3"},e._l(e.registers,(function(t,r){return s("div",{key:r,staticClass:"border-b border-r flex items-center justify-center flex-col p-3",class:e.getClass(t),on:{click:function(s){return e.selectRegister(t)}}},[s("i",{staticClass:"las la-cash-register text-6xl"}),e._v(" "),s("h3",{staticClass:"text-semibold text-center"},[e._v(e._s(t.name))]),e._v(" "),s("span",{staticClass:"text-sm"},[e._v("("+e._s(t.status_label)+")")])])})),0),e._v(" "),0===e.registers.length?s("div",{staticClass:"p-2 bg-red-400 text-white"},[e._v("\n "+e._s(e.__("Looks like there is no registers. At least one register is required to proceed."))+" — "),s("a",{staticClass:"font-bold hover:underline",attrs:{href:e.settings.urls.registers_url}},[e._v(e._s(e.__("Create Cash Register")))])]):e._e()]):e._e()]:e._e()],2)])}),[],!1,null,null,null).exports;const b={data:function(){return{totalIn:0,totalOut:0,settings:null,settingsSubscription:null,histories:[]}},mounted:function(){var e=this;this.settingsSubscription=POS.settings.subscribe((function(t){e.settings=t})),this.getHistory()},destroyed:function(){this.settingsSubscription.unsubscribe()},methods:{__:l.__,popupResolver:h.Z,closePopup:function(){this.popupResolver({status:"success"})},getHistory:function(){var e=this;i.ih.get("/api/nexopos/v4/cash-registers/session-history/".concat(this.settings.register.id)).subscribe((function(t){e.histories=t,e.totalIn=e.histories.filter((function(e){return["register-opening","register-sale","register-cash-in"].includes(e.action)})).map((function(e){return parseFloat(e.value)})).reduce((function(e,t){return e+t}),0),e.totalOut=e.histories.filter((function(e){return["register-closing","register-refund","register-cash-out"].includes(e.action)})).map((function(e){return parseFloat(e.value)})).reduce((function(e,t){return e+t}),0),console.log(e.totalOut)}))}}};const g=(0,p.Z)(b,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"bg-white shadow-lg w-95vw md:w-4/6-screen lg:w-half overflow-hidden"},[s("div",{staticClass:"p-2 flex justify-between items-center",attrs:{id:"header"}},[s("h3",{staticClass:"font-bold"},[e._v(e._s(e.__("Register History")))]),e._v(" "),s("div",[s("ns-close-button",{on:{click:e.closePopup}})],1)]),e._v(" "),s("div",{staticClass:"flex w-full"},[s("div",{staticClass:"flex flex-auto"},[s("div",{staticClass:"w-full md:w-1/2 text-right bg-green-400 text-white font-bold text-3xl p-3"},[e._v(e._s(e._f("currency")(e.totalIn)))]),e._v(" "),s("div",{staticClass:"w-full md:w-1/2 text-right bg-red-400 text-white font-bold text-3xl p-3"},[e._v(e._s(e._f("currency")(e.totalOut)))])])]),e._v(" "),s("div",{staticClass:"flex flex-col overflow-y-auto h-120"},[e._l(e.histories,(function(t){return[["register-sale","register-cash-in"].includes(t.action)?s("div",{key:t.id,staticClass:"flex border-b border-green-200 bg-green-100"},[s("div",{staticClass:"p-2 flex-auto"},[e._v(e._s(t.label))]),e._v(" "),s("div",{staticClass:"flex-auto text-right p-2"},[e._v(e._s(e._f("currency")(t.value)))])]):e._e(),e._v(" "),["register-opening"].includes(t.action)?s("div",{key:t.id,staticClass:"flex border-b border-blue-200 bg-blue-100"},[s("div",{staticClass:"p-2 flex-auto"},[e._v(e._s(t.label))]),e._v(" "),s("div",{staticClass:"flex-auto text-right p-2"},[e._v(e._s(e._f("currency")(t.value)))])]):e._e(),e._v(" "),["register-close"].includes(t.action)?s("div",{key:t.id,staticClass:"flex border-b border-teal-200 bg-teal-100"},[s("div",{staticClass:"p-2 flex-auto"},[e._v(e._s(t.label))]),e._v(" "),s("div",{staticClass:"flex-auto text-right p-2"},[e._v(e._s(e._f("currency")(t.value)))])]):e._e(),e._v(" "),["register-refund","register-cash-out"].includes(t.action)?s("div",{key:t.id,staticClass:"flex border-b border-red-200 bg-red-100"},[s("div",{staticClass:"p-2 flex-auto"},[e._v(e._s(t.label))]),e._v(" "),s("div",{staticClass:"flex-auto text-right p-2"},[e._v(e._s(e._f("currency")(t.value)))])]):e._e()]}))],2)])}),[],!1,null,null,null).exports;function y(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),s.push.apply(s,r)}return s}function x(e){for(var t=1;t0&&i.kX.error(t.t0.message).subscribe();case 10:case"end":return t.stop()}}),t,null,[[0,7]])})))()},registerInitialQueue:function(){var e=this;POS.initialQueue.push(S(n().mark((function t(){var s;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,new Promise((function(t,s){void 0===e.settings.register&&Popup.show(m,{resolve:t,reject:s})}));case 3:return s=t.sent,POS.set("register",s.data.register),e.setRegister(s.data.register),t.abrupt("return",s);case 9:throw t.prev=9,t.t0=t.catch(0),t.t0;case 12:case"end":return t.stop()}}),t,null,[[0,9]])}))))},setButtonName:function(){if(void 0===this.settings.register)return this.name=(0,l.__)("Cash Register");this.name=(0,l.__)("Cash Register : {register}").replace("{register}",this.settings.register.name)},setRegister:function(e){if(void 0!==e){var t=POS.order.getValue();t.register_id=e.id,POS.order.next(t)}}},destroyed:function(){this.orderSubscriber.unsubscribe(),this.settingsSubscriber.unsubscribe()},mounted:function(){var e=this;this.registerInitialQueue(),this.orderSubscriber=POS.order.subscribe((function(t){e.order=t})),this.settingsSubscriber=POS.settings.subscribe((function(t){e.settings=t,e.setRegister(e.settings.register),e.setButtonName()}))}};const T=(0,p.Z)($,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("button",{staticClass:"flex-shrink-0 h-12 flex items-center shadow rounded px-2 py-1 text-sm bg-white text-gray-700",on:{click:function(t){return e.openRegisterOptions()}}},[s("i",{staticClass:"mr-1 text-xl las la-cash-register"}),e._v(" "),s("span",[e._v(e._s(e.name))])])}),[],!1,null,null,null).exports},5588:(e,t,s)=>{"use strict";s.d(t,{Z:()=>a});var r=s(2242),n=(s(5872),s(419)),i=s(8603);const o={name:"ns-pos-customers-button",mounted:function(){this.popupCloser()},methods:{__,popupCloser:i.Z,reset:function(){r.G.show(n.Z,{title:__("Confirm Your Action"),message:__("The current order will be cleared. But not deleted if it's persistent. Would you like to proceed ?"),onAction:function(e){e&&POS.reset()}})}}};const a=(0,s(1900).Z)(o,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("button",{staticClass:"flex-shrink-0 h-12 flex items-center shadow rounded px-2 py-1 text-sm bg-white text-gray-700",on:{click:function(t){return e.reset()}}},[s("i",{staticClass:"mr-1 text-xl las la-eraser"}),e._v(" "),s("span",[e._v(e._s(e.__("Reset")))])])}),[],!1,null,null,null).exports},2329:(e,t,s)=>{"use strict";s.d(t,{Z:()=>n});const r={data:function(){return{title:"",message:""}},computed:{size:function(){return this.$popupParams.size||"h-full w-full"}},mounted:function(){var e=this;this.title=this.$popupParams.title,this.message=this.$popupParams.message,this.$popup.event.subscribe((function(t){"click-overlay"===t.event&&(void 0!==e.$popupParams.onAction&&e.$popupParams.onAction(!1),e.$popup.close())}))},methods:{__:s(7389).__,emitAction:function(e){void 0!==this.$popupParams.onAction&&this.$popupParams.onAction(e),this.$popup.close()}}};const n=(0,s(1900).Z)(r,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"w-6/7-screen md:w-4/7-screen lg:w-3/7-screen flex flex-col bg-white shadow-lg",class:e.size,attrs:{id:"popup"}},[s("div",{staticClass:"flex items-center justify-center flex-col flex-auto p-4"},[e.title?s("h2",{staticClass:"text-3xl font-body text-gray-700"},[e._v(e._s(e.title))]):e._e(),e._v(" "),s("p",{staticClass:"py-4 text-gray-600 text-center"},[e._v(e._s(e.message))])]),e._v(" "),s("div",{staticClass:"flex border-t border-gray-200 text-gray-700 justify-end items-center p-2"},[s("ns-button",{attrs:{type:"info"},on:{click:function(t){return e.emitAction(!0)}}},[e._v(e._s(e.__("Ok")))])],1)])}),[],!1,null,null,null).exports},419:(e,t,s)=>{"use strict";s.d(t,{Z:()=>n});const r={data:function(){return{title:"",message:""}},computed:{size:function(){return this.$popupParams.size||"h-full w-full"}},mounted:function(){var e=this;this.title=this.$popupParams.title,this.message=this.$popupParams.message,this.$popup.event.subscribe((function(t){"click-overlay"===t.event&&(e.$popupParams.onAction(!1),e.$popup.close())}))},methods:{__:s(7389).__,emitAction:function(e){this.$popupParams.onAction(e),this.$popup.close()}}};const n=(0,s(1900).Z)(r,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"flex flex-col bg-white shadow-lg w-5/7-screen md:w-4/7-screen lg:w-2/7-screen",class:e.size,attrs:{id:"popup"}},[s("div",{staticClass:"flex items-center justify-center flex-col flex-auto p-4"},[s("h2",{staticClass:"text-xl md:text-3xl font-body text-gray-700 text-center"},[e._v(e._s(e.title))]),e._v(" "),s("p",{staticClass:"py-4 text-sm md:text-base text-gray-600 text-center"},[e._v(e._s(e.message))])]),e._v(" "),s("div",{staticClass:"flex border-t border-gray-200 text-gray-700"},[s("button",{staticClass:"hover:bg-gray-100 flex-auto w-1/2 h-16 flex items-center justify-center uppercase",on:{click:function(t){return e.emitAction(!0)}}},[e._v(e._s(e.__("Yes")))]),e._v(" "),s("hr",{staticClass:"border-r border-gray-200"}),e._v(" "),s("button",{staticClass:"hover:bg-gray-100 flex-auto w-1/2 h-16 flex items-center justify-center uppercase",on:{click:function(t){return e.emitAction(!1)}}},[e._v(e._s(e.__("No")))])])])}),[],!1,null,null,null).exports},5450:(e,t,s)=>{"use strict";s.d(t,{Z:()=>c});var r=s(8603),n=s(6386),i=s(162),o=s(7389),a=s(4326);s(9624);const u={name:"ns-pos-coupons-load-popup",data:function(){return{placeHolder:(0,o.__)("Coupon Code"),couponCode:null,order:null,activeTab:"apply-coupon",orderSubscriber:null,customerCoupon:null}},mounted:function(){var e=this;this.popupCloser(),this.$refs.coupon.select(),this.orderSubscriber=POS.order.subscribe((function(t){e.order=t,e.order.coupons.length>0&&(e.activeTab="active-coupons")})),this.$popupParams&&this.$popupParams.apply_coupon&&(this.couponCode=this.$popupParams.apply_coupon,this.getCoupon(this.couponCode).subscribe({next:function(t){e.customerCoupon=t,e.apply()}}))},destroyed:function(){this.orderSubscriber.unsubscribe()},methods:{__:o.__,popupCloser:r.Z,popupResolver:n.Z,selectCustomer:function(){Popup.show(a.Z)},cancel:function(){this.customerCoupon=null,this.couponCode=null},removeCoupon:function(e){this.order.coupons.splice(e,1),POS.refreshCart()},apply:function(){var e=this;try{var t=this.customerCoupon;if(null!==this.customerCoupon.coupon.valid_hours_start&&!ns.date.moment.isAfter(this.customerCoupon.coupon.valid_hours_start)&&this.customerCoupon.coupon.valid_hours_start.length>0)return i.kX.error((0,o.__)("The coupon is out from validity date range.")).subscribe();if(null!==this.customerCoupon.coupon.valid_hours_end&&!ns.date.moment.isBefore(this.customerCoupon.coupon.valid_hours_end)&&this.customerCoupon.coupon.valid_hours_end.length>0)return i.kX.error((0,o.__)("The coupon is out from validity date range.")).subscribe();var s=this.customerCoupon.coupon.products;if(s.length>0){var r=s.map((function(e){return e.product_id}));if(0===this.order.products.filter((function(e){return r.includes(e.product_id)})).length)return i.kX.error((0,o.__)("This coupon requires products that aren't available on the cart at the moment.")).subscribe()}var n=this.customerCoupon.coupon.categories;if(n.length>0){var a=n.map((function(e){return e.category_id}));if(0===this.order.products.filter((function(e){return a.includes(e.$original().category_id)})).length)return i.kX.error((0,o.__)("This coupon requires products that belongs to specific categories that aren't included at the moment.").replace("%s")).subscribe()}this.cancel();var u={active:t.coupon.active,customer_coupon_id:t.id,minimum_cart_value:t.coupon.minimum_cart_value,maximum_cart_value:t.coupon.maximum_cart_value,name:t.coupon.name,type:t.coupon.type,value:0,limit_usage:t.coupon.limit_usage,code:t.coupon.code,discount_value:t.coupon.discount_value,categories:t.coupon.categories,products:t.coupon.products};POS.pushCoupon(u),this.activeTab="active-coupons",setTimeout((function(){e.popupResolver(u)}),500),i.kX.success((0,o.__)("The coupon has applied to the cart.")).subscribe()}catch(e){console.log(e)}},getCouponType:function(e){switch(e){case"percentage_discount":return(0,o.__)("Percentage");case"flat_discount":return(0,o.__)("Flat");default:return(0,o.__)("Unknown Type")}},getDiscountValue:function(e){switch(e.type){case"percentage_discount":return e.discount_value+"%";case"flat_discount":return this.$options.filters.currency(e.discount_value)}},closePopup:function(){this.popupResolver(!1)},setActiveTab:function(e){this.activeTab=e},getCoupon:function(e){return!this.order.customer_id>0?i.kX.error((0,o.__)("You must select a customer before applying a coupon.")).subscribe():i.ih.post("/api/nexopos/v4/customers/coupons/".concat(e),{customer_id:this.order.customer_id})},loadCoupon:function(){var e=this,t=this.couponCode;this.getCoupon(t).subscribe({next:function(t){e.customerCoupon=t,i.kX.success((0,o.__)("The coupon has been loaded.")).subscribe()},error:function(e){i.kX.error(e.message||(0,o.__)("An unexpected error occured.")).subscribe()}})}}};const c=(0,s(1900).Z)(u,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"shadow-lg bg-white w-95vw md:w-3/6-screen lg:w-2/6-screen"},[s("div",{staticClass:"border-b border-gray-200 p-2 flex justify-between items-center"},[s("h3",{staticClass:"font-bold text-gray-700"},[e._v(e._s(e.__("Load Coupon")))]),e._v(" "),s("div",[s("ns-close-button",{on:{click:function(t){return e.closePopup()}}})],1)]),e._v(" "),s("div",{staticClass:"p-1"},[s("ns-tabs",{attrs:{active:e.activeTab},on:{changeTab:function(t){return e.setActiveTab(t)}}},[s("ns-tabs-item",{attrs:{label:e.__("Apply A Coupon"),padding:"p-2",identifier:"apply-coupon"}},[s("div",{staticClass:"border-2 border-blue-400 rounded flex"},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.couponCode,expression:"couponCode"}],ref:"coupon",staticClass:"w-full p-2",attrs:{type:"text",placeholder:e.placeHolder},domProps:{value:e.couponCode},on:{input:function(t){t.target.composing||(e.couponCode=t.target.value)}}}),e._v(" "),s("button",{staticClass:"bg-blue-400 text-white px-3 py-2",on:{click:function(t){return e.loadCoupon()}}},[e._v(e._s(e.__("Load")))])]),e._v(" "),s("div",{staticClass:"pt-2"},[s("p",{staticClass:"p-2 text-center bg-green-100 text-green-600"},[e._v(e._s(e.__("Input the coupon code that should apply to the POS. If a coupon is issued for a customer, that customer must be selected priorly.")))])]),e._v(" "),e.order&&void 0===e.order.customer_id?s("div",{staticClass:"pt-2",on:{click:function(t){return e.selectCustomer()}}},[s("p",{staticClass:"p-2 cursor-pointer text-center bg-red-100 text-red-600"},[e._v(e._s(e.__("Click here to choose a customer.")))])]):e._e(),e._v(" "),e.order&&void 0!==e.order.customer_id?s("div",{staticClass:"pt-2"},[s("p",{staticClass:"p-2 text-center bg-green-100 text-green-600"},[e._v(e._s(e.__("Loading Coupon For : ")+e.order.customer.name+" "+e.order.customer.surname))])]):e._e(),e._v(" "),s("div",{staticClass:"overflow-hidden"},[e.customerCoupon?s("div",{staticClass:"pt-2 fade-in-entrance anim-duration-500 overflow-y-auto h-64"},[s("table",{staticClass:"w-full"},[s("thead",[s("tr",[s("td",{staticClass:"p-2 w-1/2 text-gray-700 border border-gray-200"},[e._v(e._s(e.__("Coupon Name")))]),e._v(" "),s("td",{staticClass:"p-2 w-1/2 text-gray-700 border border-gray-200"},[e._v(e._s(e.customerCoupon.name))])]),e._v(" "),s("tr",[s("td",{staticClass:"p-2 w-1/2 text-gray-700 border border-gray-200"},[e._v(e._s(e.__("Discount"))+" ("+e._s(e.getCouponType(e.customerCoupon.coupon.type))+")")]),e._v(" "),s("td",{staticClass:"p-2 w-1/2 text-gray-700 border border-gray-200"},[e._v(e._s(e.getDiscountValue(e.customerCoupon.coupon)))])]),e._v(" "),s("tr",[s("td",{staticClass:"p-2 w-1/2 text-gray-700 border border-gray-200"},[e._v(e._s(e.__("Usage")))]),e._v(" "),s("td",{staticClass:"p-2 w-1/2 text-gray-700 border border-gray-200"},[e._v(e._s(e.customerCoupon.usage+"/"+(e.customerCoupon.limit_usage||e.__("Unlimited"))))])]),e._v(" "),s("tr",[s("td",{staticClass:"p-2 w-1/2 text-gray-700 border border-gray-200"},[e._v(e._s(e.__("Valid From")))]),e._v(" "),s("td",{staticClass:"p-2 w-1/2 text-gray-700 border border-gray-200"},[e._v(e._s(e.customerCoupon.coupon.valid_hours_start))])]),e._v(" "),s("tr",[s("td",{staticClass:"p-2 w-1/2 text-gray-700 border border-gray-200"},[e._v(e._s(e.__("Valid Till")))]),e._v(" "),s("td",{staticClass:"p-2 w-1/2 text-gray-700 border border-gray-200"},[e._v(e._s(e.customerCoupon.coupon.valid_hours_end))])]),e._v(" "),s("tr",[s("td",{staticClass:"p-2 w-1/2 text-gray-700 border border-gray-200"},[e._v(e._s(e.__("Categories")))]),e._v(" "),s("td",{staticClass:"p-2 w-1/2 text-gray-700 border border-gray-200"},[s("ul",e._l(e.customerCoupon.coupon.categories,(function(t){return s("li",{key:t.id,staticClass:"rounded-full px-3 py-1 border border-gray-200"},[e._v(e._s(t.category.name))])})),0)])]),e._v(" "),s("tr",[s("td",{staticClass:"p-2 w-1/2 text-gray-700 border border-gray-200"},[e._v(e._s(e.__("Products")))]),e._v(" "),s("td",{staticClass:"p-2 w-1/2 text-gray-700 border border-gray-200"},[s("ul",e._l(e.customerCoupon.coupon.products,(function(t){return s("li",{key:t.id,staticClass:"rounded-full px-3 py-1 border border-gray-200"},[e._v(e._s(t.product.name))])})),0)])])])])]):e._e()])]),e._v(" "),s("ns-tabs-item",{attrs:{label:e.__("Active Coupons"),padding:"p-1",identifier:"active-coupons"}},[e.order?s("ul",[e._l(e.order.coupons,(function(t,r){return s("li",{key:r,staticClass:"flex justify-between bg-gray-100 items-center px-2 py-1"},[s("div",{staticClass:"flex-auto"},[s("h3",{staticClass:"font-semibold text-gray-700 p-2 flex justify-between"},[s("span",[e._v(e._s(t.name))]),e._v(" "),s("span",[e._v(e._s(e.getDiscountValue(t)))])])]),e._v(" "),s("div",[s("ns-close-button",{on:{click:function(t){return e.removeCoupon(r)}}})],1)])})),e._v(" "),0===e.order.coupons.length?s("li",{staticClass:"flex justify-between bg-gray-100 items-center p-2"},[e._v("\n No coupons applies to the cart.\n ")]):e._e()],2):e._e()])],1)],1),e._v(" "),e.customerCoupon?s("div",{staticClass:"flex"},[s("button",{staticClass:"w-1/2 px-3 py-2 bg-green-400 text-white font-bold",on:{click:function(t){return e.apply()}}},[e._v("\n "+e._s(e.__("Apply"))+"\n ")]),e._v(" "),s("button",{staticClass:"w-1/2 px-3 py-2 bg-red-400 text-white font-bold",on:{click:function(t){return e.cancel()}}},[e._v("\n "+e._s(e.__("Cancel"))+"\n ")])]):e._e()])}),[],!1,null,null,null).exports},4326:(e,t,s)=>{"use strict";s.d(t,{Z:()=>u});var r=s(162),n=s(6386),i=s(2242),o=s(5872);const a={data:function(){return{searchCustomerValue:"",orderSubscription:null,order:{},debounceSearch:null,customers:[],isLoading:!1}},computed:{customerSelected:function(){return!1}},watch:{searchCustomerValue:function(e){var t=this;clearTimeout(this.debounceSearch),this.debounceSearch=setTimeout((function(){t.searchCustomer(e)}),500)}},mounted:function(){var e=this;this.$popup.event.subscribe((function(t){"click-overlay"===t.event&&e.resolveIfQueued(!1)})),this.orderSubscription=POS.order.subscribe((function(t){e.order=t})),this.getRecentCustomers(),this.$refs.searchField.focus()},destroyed:function(){this.orderSubscription.unsubscribe()},methods:{__:s(7389).__,resolveIfQueued:n.Z,attemptToChoose:function(){if(1===this.customers.length)return this.selectCustomer(this.customers[0]);r.kX.info("Too many result.").subscribe()},openCustomerHistory:function(e,t){t.stopImmediatePropagation(),this.$popup.close(),i.G.show(o.Z,{customer:e,activeTab:"account-payment"})},selectCustomer:function(e){var t=this;this.customers.forEach((function(e){return e.selected=!1})),e.selected=!0,this.isLoading=!0,POS.selectCustomer(e).then((function(s){t.isLoading=!1,t.resolveIfQueued(e)})).catch((function(e){t.isLoading=!1}))},searchCustomer:function(e){var t=this;r.ih.post("/api/nexopos/v4/customers/search",{search:e}).subscribe((function(e){e.forEach((function(e){return e.selected=!1})),t.customers=e}))},createCustomerWithMatch:function(e){this.resolveIfQueued(!1),i.G.show(o.Z,{name:e})},getRecentCustomers:function(){var e=this;this.isLoading=!0,r.ih.get("/api/nexopos/v4/customers").subscribe((function(t){e.isLoading=!1,t.forEach((function(e){return e.selected=!1})),e.customers=t}),(function(t){e.isLoading=!1}))}}};const u=(0,s(1900).Z)(a,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"bg-white shadow-xl w-4/5-screen md:w-2/5-screen xl:w-108"},[s("div",{staticClass:"border-b border-gray-200 text-center font-semibold text-2xl text-gray-700 py-2",attrs:{id:"header"}},[s("h2",[e._v(e._s(e.__("Select Customer")))])]),e._v(" "),s("div",{staticClass:"relative"},[s("div",{staticClass:"p-2 border-b border-gray-200 flex justify-between text-gray-600"},[s("span",[e._v("Selected : ")]),e._v(" "),s("div",{staticClass:"flex items-center justify-between"},[s("span",[e._v(e._s(e.order.customer?e.order.customer.name:"N/A"))]),e._v(" "),e.order.customer?s("button",{staticClass:"mx-2 rounded-full h-8 w-8 flex items-center justify-center border border-gray-200 hover:bg-blue-400 hover:text-white hover:border-transparent",on:{click:function(t){return e.openCustomerHistory(e.order.customer,t)}}},[s("i",{staticClass:"las la-eye"})]):e._e()])]),e._v(" "),s("div",{staticClass:"p-2 border-b border-gray-200 flex justify-between text-gray-600"},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.searchCustomerValue,expression:"searchCustomerValue"}],ref:"searchField",staticClass:"rounded border-2 border-blue-400 bg-gray-100 w-full p-2",attrs:{placeholder:"Search Customer",type:"text"},domProps:{value:e.searchCustomerValue},on:{keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.attemptToChoose()},input:function(t){t.target.composing||(e.searchCustomerValue=t.target.value)}}})]),e._v(" "),s("div",{staticClass:"h-3/5-screen xl:h-2/5-screen overflow-y-auto"},[s("ul",[e.customers&&0===e.customers.length?s("li",{staticClass:"p-2 text-center text-gray-600"},[e._v("\n "+e._s(e.__("No customer match your query..."))+"\n ")]):e._e(),e._v(" "),e.customers&&0===e.customers.length?s("li",{staticClass:"p-2 cursor-pointer text-center text-gray-600",on:{click:function(t){return e.createCustomerWithMatch(e.searchCustomerValue)}}},[s("span",{staticClass:"border-b border-dashed border-blue-400"},[e._v(e._s(e.__("Create a customer")))])]):e._e(),e._v(" "),e._l(e.customers,(function(t){return s("li",{key:t.id,staticClass:"cursor-pointer hover:bg-gray-100 p-2 border-b border-gray-200 text-gray-600 flex justify-between items-center",on:{click:function(s){return e.selectCustomer(t)}}},[s("span",[e._v(e._s(t.name))]),e._v(" "),s("p",{staticClass:"flex items-center"},[t.owe_amount>0?s("span",{staticClass:"text-red-600"},[e._v("-"+e._s(e._f("currency")(t.owe_amount)))]):e._e(),e._v(" "),t.owe_amount>0?s("span",[e._v("/")]):e._e(),e._v(" "),s("span",{staticClass:"text-green-600"},[e._v(e._s(e._f("currency")(t.purchases_amount)))]),e._v(" "),s("button",{staticClass:"mx-2 rounded-full h-8 w-8 flex items-center justify-center border border-gray-200 hover:bg-blue-400 hover:text-white hover:border-transparent",on:{click:function(s){return e.openCustomerHistory(t,s)}}},[s("i",{staticClass:"las la-eye"})])])])}))],2)]),e._v(" "),e.isLoading?s("div",{staticClass:"z-10 top-0 absolute w-full h-full flex items-center justify-center"},[s("ns-spinner",{attrs:{size:"24",border:"8"}})],1):e._e()])])}),[],!1,null,null,null).exports},5872:(e,t,s)=>{"use strict";s.d(t,{Z:()=>_});var r=s(8603),n=s(162),i=s(2242),o=s(4326),a=s(7266),u=s(7389);const c={mounted:function(){this.closeWithOverlayClicked(),this.loadTransactionFields()},data:function(){return{fields:[],isSubmiting:!1,formValidation:new a.Z}},methods:{__:u.__,closeWithOverlayClicked:r.Z,proceed:function(){var e=this,t=this.$popupParams.customer,s=this.formValidation.extractFields(this.fields);this.isSubmiting=!0,n.ih.post("/api/nexopos/v4/customers/".concat(t.id,"/account-history"),s).subscribe((function(t){e.isSubmiting=!1,n.kX.success(t.message).subscribe(),e.$popupParams.resolve(t),e.$popup.close()}),(function(t){e.isSubmiting=!1,n.kX.error(t.message).subscribe(),e.$popupParams.reject(t)}))},close:function(){this.$popup.close(),this.$popupParams.reject(!1)},loadTransactionFields:function(){var e=this;n.ih.get("/api/nexopos/v4/fields/ns.customers-account").subscribe((function(t){e.fields=e.formValidation.createFields(t)}))}}};var l=s(1900);const d=(0,l.Z)(c,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"w-6/7-screen md:w-5/7-screen lg:w-4/7-screen h-6/7-screen md:h-5/7-screen lg:h-5/7-screen overflow-hidden shadow-lg bg-white flex flex-col relative"},[s("div",{staticClass:"p-2 border-b border-gray-200 flex justify-between items-center"},[s("h2",{staticClass:"font-semibold"},[e._v(e._s(e.__("New Transaction")))]),e._v(" "),s("div",[s("ns-close-button",{on:{click:function(t){return e.close()}}})],1)]),e._v(" "),s("div",{staticClass:"flex-auto overflow-y-auto"},[0===e.fields.length?s("div",{staticClass:"h-full w-full flex items-center justify-center"},[s("ns-spinner")],1):e._e(),e._v(" "),e.fields.length>0?s("div",{staticClass:"p-2"},e._l(e.fields,(function(e,t){return s("ns-field",{key:t,attrs:{field:e}})})),1):e._e()]),e._v(" "),s("div",{staticClass:"p-2 bg-white justify-between border-t border-gray-200 flex"},[s("div"),e._v(" "),s("div",{staticClass:"px-1"},[s("div",{staticClass:"-mx-2 flex flex-wrap"},[s("div",{staticClass:"px-1"},[s("ns-button",{attrs:{type:"danger"},on:{click:function(t){return e.close()}}},[e._v(e._s(e.__("Close")))])],1),e._v(" "),s("div",{staticClass:"px-1"},[s("ns-button",{attrs:{type:"info"},on:{click:function(t){return e.proceed()}}},[e._v(e._s(e.__("Proceed")))])],1)])])]),e._v(" "),0===e.isSubmiting?s("div",{staticClass:"h-full w-full absolute flex items-center justify-center",staticStyle:{background:"rgb(0 98 171 / 45%)"}},[s("ns-spinner")],1):e._e()])}),[],!1,null,null,null).exports;var p=s(5450),f=s(419),h=s(6386);const v={name:"ns-pos-customers",data:function(){return{activeTab:"create-customers",customer:null,subscription:null,orders:[],selectedTab:"orders",isLoadingCoupons:!1,coupons:[],order:null}},mounted:function(){var e=this;this.closeWithOverlayClicked(),this.subscription=POS.order.subscribe((function(t){e.order=t,void 0!==e.$popupParams.customer?(e.activeTab="account-payment",e.customer=e.$popupParams.customer,e.loadCustomerOrders(e.customer.id)):void 0!==t.customer&&(e.activeTab="account-payment",e.customer=t.customer,e.loadCustomerOrders(e.customer.id))})),this.popupCloser()},methods:{__:u.__,popupResolver:h.Z,popupCloser:r.Z,getType:function(e){switch(e){case"percentage_discount":return(0,u.__)("Percentage Discount");case"flat_discount":return(0,u.__)("Flat Discount")}},closeWithOverlayClicked:r.Z,doChangeTab:function(e){this.selectedTab=e,"coupons"===e&&this.loadCoupons()},loadCoupons:function(){var e=this;this.isLoadingCoupons=!0,n.ih.get("/api/nexopos/v4/customers/".concat(this.customer.id,"/coupons")).subscribe({next:function(t){e.coupons=t,e.isLoadingCoupons=!1},error:function(t){e.isLoadingCoupons=!1}})},allowedForPayment:function(e){return["unpaid","partially_paid","hold"].includes(e.payment_status)},prefillForm:function(e){void 0!==this.$popupParams.name&&(e.main.value=this.$popupParams.name)},openCustomerSelection:function(){this.$popup.close(),i.G.show(o.Z)},loadCustomerOrders:function(e){var t=this;n.ih.get("/api/nexopos/v4/customers/".concat(e,"/orders")).subscribe((function(e){t.orders=e}))},newTransaction:function(e){new Promise((function(t,s){i.G.show(d,{customer:e,resolve:t,reject:s})})).then((function(t){POS.loadCustomer(e.id).subscribe((function(e){POS.selectCustomer(e)}))}))},applyCoupon:function(e){var t=this;void 0===this.order.customer?i.G.show(f.Z,{title:(0,u.__)("Use Customer ?"),message:(0,u.__)("No customer is selected. Would you like to proceed with this customer ?"),onAction:function(s){s&&POS.selectCustomer(t.customer).then((function(s){t.proceedApplyingCoupon(e)}))}}):this.order.customer.id===this.customer.id?this.proceedApplyingCoupon(e):this.order.customer.id!==this.customer.id&&i.G.show(f.Z,{title:(0,u.__)("Change Customer ?"),message:(0,u.__)("Would you like to assign this customer to the ongoing order ?"),onAction:function(s){s&&POS.selectCustomer(t.customer).then((function(s){t.proceedApplyingCoupon(e)}))}})},proceedApplyingCoupon:function(e){var t=this;new Promise((function(t,s){i.G.show(p.Z,{apply_coupon:e.code,resolve:t,reject:s})})).then((function(e){t.popupResolver(!1)})).catch((function(e){}))},handleSavedCustomer:function(e){n.kX.success(e.message).subscribe(),POS.selectCustomer(e.entry),this.$popup.close()}}};const _=(0,l.Z)(v,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"bg-white shadow-lg rounded w-95vw h-95vh lg:w-3/5-screen flex flex-col overflow-hidden"},[s("div",{staticClass:"p-2 flex justify-between items-center border-b border-gray-400"},[s("h3",{staticClass:"font-semibold text-gray-700"},[e._v(e._s(e.__("Customers")))]),e._v(" "),s("div",[s("ns-close-button",{on:{click:function(t){return e.$popup.close()}}})],1)]),e._v(" "),s("div",{staticClass:"flex-auto flex p-2 bg-gray-200 overflow-y-auto"},[s("ns-tabs",{attrs:{active:e.activeTab},on:{active:function(t){e.activeTab=t}}},[s("ns-tabs-item",{attrs:{identifier:"create-customers",label:"New Customer"}},[s("ns-crud-form",{attrs:{"submit-url":"/api/nexopos/v4/crud/ns.customers",src:"/api/nexopos/v4/crud/ns.customers/form-config"},on:{updated:function(t){return e.prefillForm(t)},save:function(t){return e.handleSavedCustomer(t)}},scopedSlots:e._u([{key:"title",fn:function(){return[e._v(e._s(e.__("Customer Name")))]},proxy:!0},{key:"save",fn:function(){return[e._v(e._s(e.__("Save Customer")))]},proxy:!0}])})],1),e._v(" "),s("ns-tabs-item",{staticClass:"flex",staticStyle:{padding:"0!important"},attrs:{identifier:"account-payment",label:e.__("Customer Account")}},[null===e.customer?s("div",{staticClass:"flex-auto w-full flex items-center justify-center flex-col p-4"},[s("i",{staticClass:"lar la-frown text-6xl text-gray-700"}),e._v(" "),s("h3",{staticClass:"font-medium text-2xl text-gray-700"},[e._v(e._s(e.__("No Customer Selected")))]),e._v(" "),s("p",{staticClass:"text-gray-600"},[e._v(e._s(e.__("In order to see a customer account, you need to select one customer.")))]),e._v(" "),s("div",{staticClass:"my-2"},[s("ns-button",{attrs:{type:"info"},on:{click:function(t){return e.openCustomerSelection()}}},[e._v(e._s(e.__("Select Customer")))])],1)]):e._e(),e._v(" "),e.customer?s("div",{staticClass:"flex flex-col flex-auto"},[s("div",{staticClass:"flex-auto p-2 flex flex-col"},[s("div",{staticClass:"-mx-4 flex flex-wrap"},[s("div",{staticClass:"px-4 mb-4 w-full"},[s("h2",{staticClass:"font-semibold text-gray-700"},[e._v(e._s(e.__("Summary For"))+" : "+e._s(e.customer.name))])]),e._v(" "),s("div",{staticClass:"px-4 mb-4 w-full md:w-1/3"},[s("div",{staticClass:"rounded-lg shadow bg-transparent bg-gradient-to-br from-green-400 to-green-700 p-2 flex flex-col text-white"},[s("h3",{staticClass:"font-medium text-lg"},[e._v(e._s(e.__("Total Purchases")))]),e._v(" "),s("div",{staticClass:"w-full flex justify-end"},[s("h2",{staticClass:"text-2xl font-bold"},[e._v(e._s(e._f("currency")(e.customer.purchases_amount)))])])])]),e._v(" "),s("div",{staticClass:"px-4 mb-4 w-full md:w-1/3"},[s("div",{staticClass:"rounded-lg shadow bg-transparent bg-gradient-to-br from-red-500 to-red-700 p-2 text-white"},[s("h3",{staticClass:"font-medium text-lg"},[e._v(e._s(e.__("Total Owed")))]),e._v(" "),s("div",{staticClass:"w-full flex justify-end"},[s("h2",{staticClass:"text-2xl font-bold"},[e._v(e._s(e._f("currency")(e.customer.owed_amount)))])])])]),e._v(" "),s("div",{staticClass:"px-4 mb-4 w-full md:w-1/3"},[s("div",{staticClass:"rounded-lg shadow bg-transparent bg-gradient-to-br from-blue-500 to-blue-700 p-2 text-white"},[s("h3",{staticClass:"font-medium text-lg"},[e._v(e._s(e.__("Account Amount")))]),e._v(" "),s("div",{staticClass:"w-full flex justify-end"},[s("h2",{staticClass:"text-2xl font-bold"},[e._v(e._s(e._f("currency")(e.customer.account_amount)))])])])])]),e._v(" "),s("div",{staticClass:"flex flex-auto flex-col overflow-hidden"},[s("ns-tabs",{attrs:{active:e.selectedTab},on:{changeTab:function(t){return e.doChangeTab(t)}}},[s("ns-tabs-item",{attrs:{identifier:"orders",label:e.__("Orders")}},[s("div",{staticClass:"py-2 w-full"},[s("h2",{staticClass:"font-semibold text-gray-700"},[e._v(e._s(e.__("Last Purchases")))])]),e._v(" "),s("div",{staticClass:"flex-auto flex-col flex overflow-hidden"},[s("div",{staticClass:"flex-auto overflow-y-auto"},[s("table",{staticClass:"table w-full"},[s("thead",[s("tr",{staticClass:"text-gray-700"},[s("th",{staticClass:"p-2 border border-gray-200 bg-gray-100 font-semibold",attrs:{width:"150"}},[e._v(e._s(e.__("Order")))]),e._v(" "),s("th",{staticClass:"p-2 border border-gray-200 bg-gray-100 font-semibold"},[e._v(e._s(e.__("Total")))]),e._v(" "),s("th",{staticClass:"p-2 border border-gray-200 bg-gray-100 font-semibold"},[e._v(e._s(e.__("Status")))]),e._v(" "),s("th",{staticClass:"p-2 border border-gray-200 bg-gray-100 font-semibold",attrs:{width:"50"}},[e._v(e._s(e.__("Options")))])])]),e._v(" "),s("tbody",{staticClass:"text-gray-700"},[0===e.orders.length?s("tr",[s("td",{staticClass:"border border-gray-200 p-2 text-center",attrs:{colspan:"4"}},[e._v(e._s(e.__("No orders...")))])]):e._e(),e._v(" "),e._l(e.orders,(function(t){return s("tr",{key:t.id},[s("td",{staticClass:"border border-gray-200 p-2 text-center"},[e._v(e._s(t.code))]),e._v(" "),s("td",{staticClass:"border border-gray-200 p-2 text-center"},[e._v(e._s(e._f("currency")(t.total)))]),e._v(" "),s("td",{staticClass:"border border-gray-200 p-2 text-right"},[e._v(e._s(t.human_status))]),e._v(" "),s("td",{staticClass:"border border-gray-200 p-2 text-center"},[e.allowedForPayment(t)?s("button",{staticClass:"hover:bg-blue-400 hover:border-transparent hover:text-white rounded-full h-8 px-2 flex items-center justify-center border border-gray bg-white"},[s("i",{staticClass:"las la-wallet"}),e._v(" "),s("span",{staticClass:"ml-1"},[e._v(e._s(e.__("Payment")))])]):e._e()])])}))],2)])])])]),e._v(" "),s("ns-tabs-item",{attrs:{identifier:"coupons",label:e.__("Coupons")}},[e.isLoadingCoupons?s("div",{staticClass:"flex-auto h-full justify-center flex items-center"},[s("ns-spinner",{attrs:{size:"36"}})],1):e._e(),e._v(" "),e.isLoadingCoupons?e._e():[s("div",{staticClass:"py-2 w-full"},[s("h2",{staticClass:"font-semibold text-gray-700"},[e._v(e._s(e.__("Coupons")))])]),e._v(" "),s("div",{staticClass:"flex-auto flex-col flex overflow-hidden"},[s("div",{staticClass:"flex-auto overflow-y-auto"},[s("table",{staticClass:"table w-full"},[s("thead",[s("tr",{staticClass:"text-gray-700"},[s("th",{staticClass:"p-2 border border-gray-200 bg-gray-100 font-semibold",attrs:{width:"150"}},[e._v(e._s(e.__("Name")))]),e._v(" "),s("th",{staticClass:"p-2 border border-gray-200 bg-gray-100 font-semibold"},[e._v(e._s(e.__("Type")))]),e._v(" "),s("th",{staticClass:"p-2 border border-gray-200 bg-gray-100 font-semibold"})])]),e._v(" "),s("tbody",{staticClass:"text-gray-700 text-sm"},[0===e.coupons.length?s("tr",[s("td",{staticClass:"border border-gray-200 p-2 text-center",attrs:{colspan:"4"}},[e._v(e._s(e.__("No coupons for the selected customer...")))])]):e._e(),e._v(" "),e._l(e.coupons,(function(t){return s("tr",{key:t.id},[s("td",{staticClass:"border border-gray-200 p-2",attrs:{width:"300"}},[s("h3",[e._v(e._s(t.name))]),e._v(" "),s("div",{},[s("ul",{staticClass:"-mx-2 flex"},[s("li",{staticClass:"text-xs text-gray-600 px-2"},[e._v(e._s(e.__("Usage :"))+" "+e._s(t.usage)+"/"+e._s(t.limit_usage))]),e._v(" "),s("li",{staticClass:"text-xs text-gray-600 px-2"},[e._v(e._s(e.__("Code :"))+" "+e._s(t.code))])])])]),e._v(" "),s("td",{staticClass:"border border-gray-200 p-2 text-center"},[e._v(e._s(e.getType(t.coupon.type))+" \n "),"percentage_discount"===t.coupon.type?s("span",[e._v("\n ("+e._s(t.coupon.discount_value)+"%)\n ")]):e._e(),e._v(" "),"flat_discount"===t.coupon.type?s("span",[e._v("\n ("+e._s(e._f("currency")(t.coupon.discount_value))+")\n ")]):e._e()]),e._v(" "),s("td",{staticClass:"border border-gray-200 p-2 text-right"},[s("ns-button",{attrs:{type:"info"},on:{click:function(s){return e.applyCoupon(t)}}},[e._v(e._s(e.__("Use Coupon")))])],1)])}))],2)])])])]],2)],1)],1)]),e._v(" "),s("div",{staticClass:"p-2 border-t border-gray-400 flex justify-between"},[s("div"),e._v(" "),s("div",[s("ns-button",{attrs:{type:"info"},on:{click:function(t){return e.newTransaction(e.customer)}}},[e._v(e._s(e.__("Account Transaction")))])],1)])]):e._e()])],1)],1)])}),[],!1,null,null,null).exports},8355:(e,t,s)=>{"use strict";s.d(t,{Z:()=>d});var r=s(7266),n=s(162),i=s(7389);function o(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),s.push.apply(s,r)}return s}function a(e){for(var t=1;t0){var e=nsRawCurrency(this.order.instalments.map((function(e){return parseFloat(e.amount.value)||0})).reduce((function(e,t){return parseFloat(e)+parseFloat(t)})));this.totalPayments=this.order.total-e}else this.totalPayments=0},generatePaymentFields:function(e){var t=this;this.order.instalments=new Array(parseInt(e)).fill("").map((function(e,s){return{date:{type:"date",name:"date",label:"Date",value:0===s?ns.date.moment.format("YYYY-MM-DD"):""},amount:{type:"number",name:"amount",label:"Amount",value:0===s?t.expectedPayment:0},readonly:{type:"hidden",name:"readonly",value:t.expectedPayment>0&&0===s}}})),this.$forceUpdate(),this.refreshTotalPayments()},close:function(){this.$popupParams.reject({status:"failed",message:(0,i.__)("You must define layaway settings before proceeding.")}),this.$popup.close()},updateOrder:function(){var e=this;if(0===this.order.instalments.length)return n.kX.error((0,i.__)("Please provide instalments before proceeding.")).subscribe();if(this.fields.forEach((function(t){return e.formValidation.validateField(t)})),!this.formValidation.fieldsValid(this.fields))return n.kX.error((0,i.__)("Unable to procee the form is not valid")).subscribe();this.$forceUpdate();var t=this.order.instalments.map((function(e){return{amount:parseFloat(e.amount.value),date:e.date.value}})),s=nsRawCurrency(t.map((function(e){return e.amount})).reduce((function(e,t){return parseFloat(e)+parseFloat(t)})));if(t.filter((function(e){return void 0===e.date||""===e.date})).length>0)return n.kX.error((0,i.__)("One or more instalments has an invalid date.")).subscribe();if(t.filter((function(e){return!(e.amount>0)})).length>0)return n.kX.error((0,i.__)("One or more instalments has an invalid amount.")).subscribe();if(t.filter((function(e){return moment(e.date).isBefore(ns.date.moment.startOf("day"))})).length>0)return n.kX.error((0,i.__)("One or more instalments has a date prior to the current date.")).subscribe();var r=t.filter((function(e){return moment(e.date).isSame(ns.date.moment.startOf("day"),"day")})),o=0;if(r.forEach((function(e){o+=parseFloat(e.amount)})),o{"use strict";s.d(t,{Z:()=>n});const r={name:"ns-pos-loading-popup"};const n=(0,s(1900).Z)(r,(function(){var e=this.$createElement;return(this._self._c||e)("ns-spinner")}),[],!1,null,null,null).exports},3625:(e,t,s)=>{"use strict";s.d(t,{Z:()=>u});var r=s(7757),n=s.n(r),i=s(6386);s(3661);function o(e,t,s,r,n,i,o){try{var a=e[i](o),u=a.value}catch(e){return void s(e)}a.done?t(u):Promise.resolve(u).then(r,n)}const a={data:function(){return{types:[],typeSubscription:null}},mounted:function(){var e=this;this.$popup.event.subscribe((function(t){"click-overlay"===t.event&&e.resolveIfQueued(!1)})),this.typeSubscription=POS.types.subscribe((function(t){e.types=t}))},destroyed:function(){this.typeSubscription.unsubscribe()},methods:{__:s(7389).__,resolveIfQueued:i.Z,select:function(e){var t,s=this;return(t=n().mark((function t(){var r;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return Object.values(s.types).forEach((function(e){return e.selected=!1})),s.types[e].selected=!0,r=s.types[e],POS.types.next(s.types),t.next=6,POS.triggerOrderTypeSelection(r);case 6:s.resolveIfQueued(r);case 7:case"end":return t.stop()}}),t)})),function(){var e=this,s=arguments;return new Promise((function(r,n){var i=t.apply(e,s);function a(e){o(i,r,n,a,u,"next",e)}function u(e){o(i,r,n,a,u,"throw",e)}a(void 0)}))})()}}};const u=(0,s(1900).Z)(a,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"h-full w-4/5-screen md:w-2/5-screen lg:w-2/5-screen xl:w-2/6-screen bg-white shadow-lg"},[s("div",{staticClass:"h-16 flex justify-center items-center",attrs:{id:"header"}},[s("h3",{staticClass:"font-bold text-gray-700"},[e._v(e._s(e.__("Define The Order Type")))])]),e._v(" "),s("div",{staticClass:"grid grid-flow-row grid-cols-2 grid-rows-2"},e._l(e.types,(function(t){return s("div",{key:t.identifier,staticClass:"hover:bg-blue-100 h-56 flex items-center justify-center flex-col cursor-pointer border border-gray-200",class:t.selected?"bg-blue-100":"",on:{click:function(s){return e.select(t.identifier)}}},[s("img",{staticClass:"w-32 h-32",attrs:{src:t.icon,alt:""}}),e._v(" "),s("h4",{staticClass:"font-semibold text-xl my-2 text-gray-700"},[e._v(e._s(t.label))])])})),0)])}),[],!1,null,null,null).exports},9531:(e,t,s)=>{"use strict";s.d(t,{Z:()=>u});var r=s(162),n=s(7389);function i(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var s=Object.prototype.toString.call(e).slice(8,-1);"Object"===s&&e.constructor&&(s=e.constructor.name);if("Map"===s||"Set"===s)return Array.from(e);if("Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return o(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var s=0,r=new Array(t);sparseFloat(i.$quantities().quantity)-a)return r.kX.error((0,n.__)("Unable to add the product, there is not enough stock. Remaining %s").replace("%s",i.$quantities().quantity-a)).subscribe()}this.resolve({quantity:o})}else"backspace"===e.identifier?this.allSelected?(this.finalValue=0,this.allSelected=!1):(this.finalValue=this.finalValue.toString(),this.finalValue=this.finalValue.substr(0,this.finalValue.length-1)||0):this.allSelected?(this.finalValue=e.value,this.finalValue=parseFloat(this.finalValue),this.allSelected=!1):(this.finalValue+=""+e.value,this.finalValue=parseFloat(this.finalValue))},resolve:function(e){this.$popupParams.resolve(e),this.$popup.close()}}};const u=(0,s(1900).Z)(a,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"bg-white shadow min-h-2/5-screen w-3/4-screen md:w-3/5-screen lg:w-2/5-screen xl:w-2/5-screen relative"},[e.isLoading?s("div",{staticClass:"flex w-full h-full absolute top-O left-0 items-center justify-center",staticStyle:{background:"rgb(202 202 202 / 49%)"},attrs:{id:"loading-overlay"}},[s("ns-spinner")],1):e._e(),e._v(" "),s("div",{staticClass:"flex-shrink-0 py-2 border-b border-gray-200"},[s("h1",{staticClass:"text-xl font-bold text-gray-700 text-center"},[e._v(e._s(e.__("Define Quantity")))])]),e._v(" "),s("div",{staticClass:"h-16 border-b bg-gray-800 text-white border-gray-200 flex items-center justify-center",attrs:{id:"screen"}},[s("h1",{staticClass:"font-bold text-3xl"},[e._v(e._s(e.finalValue))])]),e._v(" "),s("div",{staticClass:"grid grid-flow-row grid-cols-3 grid-rows-3",attrs:{id:"numpad"}},e._l(e.keys,(function(t,r){return s("div",{key:r,staticClass:"hover:bg-blue-400 hover:text-white hover:border-blue-600 text-xl font-bold border border-gray-200 h-24 flex items-center justify-center cursor-pointer",on:{click:function(s){return e.inputValue(t)}}},[void 0!==t.value?s("span",[e._v(e._s(t.value))]):e._e(),e._v(" "),t.icon?s("i",{staticClass:"las",class:t.icon}):e._e()])})),0)])}),[],!1,null,null,null).exports},3661:(e,t,s)=>{"use strict";s.d(t,{Z:()=>l});var r=s(162),n=s(6386),i=s(7266);function o(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),s.push.apply(s,r)}return s}function a(e){for(var t=1;t{"use strict";s.d(t,{Z:()=>n});const r={data:function(){return{title:"",message:"",input:""}},computed:{size:function(){return this.$popupParams.size||"h-full w-full"}},mounted:function(){var e=this;this.input=this.$popupParams.input||"",this.title=this.$popupParams.title,this.message=this.$popupParams.message,this.$popup.event.subscribe((function(t){"click-overlay"===t.event&&(e.$popupParams.reject(!1),e.$popup.close())}))},methods:{__:s(7389).__,emitAction:function(e){this.$popupParams.onAction(e?this.input:e),this.$popup.close()},reject:function(e){this.$popupParams.reject(e),this.$popup.close()}}};const n=(0,s(1900).Z)(r,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"w-5/7-screen md:w-3/7-screen flex flex-col bg-white shadow-lg",class:e.size,attrs:{id:"popup"}},[s("div",{staticClass:"flex items-center justify-center flex-col flex-auto p-2"},[s("h2",{staticClass:"text-3xl font-body text-gray-700"},[e._v(e._s(e.title))]),e._v(" "),s("p",{staticClass:"w-full md:mx-auto md:w-2/3 py-4 text-gray-600 text-center"},[e._v(e._s(e.message))])]),e._v(" "),s("div",{staticClass:"p-2"},[s("textarea",{directives:[{name:"model",rawName:"v-model",value:e.input,expression:"input"}],staticClass:"text-gray-700 w-full border-2 p-2 border-blue-400",attrs:{name:"",id:"",cols:"30",rows:"10"},domProps:{value:e.input},on:{input:function(t){t.target.composing||(e.input=t.target.value)}}})]),e._v(" "),s("div",{staticClass:"flex border-t border-gray-200 text-gray-700"},[s("button",{staticClass:"hover:bg-gray-100 flex-auto w-1/2 h-16 flex items-center justify-center uppercase",on:{click:function(t){return e.emitAction(!0)}}},[e._v(e._s(e.__("Ok")))]),e._v(" "),s("hr",{staticClass:"border-r border-gray-200"}),e._v(" "),s("button",{staticClass:"hover:bg-gray-100 flex-auto w-1/2 h-16 flex items-center justify-center uppercase",on:{click:function(t){return e.reject(!1)}}},[e._v(e._s(e.__("Cancel")))])])])}),[],!1,null,null,null).exports}},e=>{e.O(0,[898],(()=>{return t=467,e(e.s=t);var t}));e.O()}]); //# sourceMappingURL=pos-init.min.js.map \ No newline at end of file diff --git a/public/js/pos.min.js b/public/js/pos.min.js index 7b879349b..41c171df2 100644 --- a/public/js/pos.min.js +++ b/public/js/pos.min.js @@ -1,2 +1,2 @@ -(self.webpackChunkNexoPOS_4x=self.webpackChunkNexoPOS_4x||[]).push([[159],{162:(e,t,r)=>{"use strict";r.d(t,{l:()=>I,kq:()=>G,ih:()=>N,kX:()=>L});var s=r(6486),n=r(9669),i=r(2181),o=r(8345),a=r(9624),l=r(9248),c=r(230);function u(e,t){for(var r=0;r2&&void 0!==arguments[2]?arguments[2]:{};return this._request("post",e,t,r)}},{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._request("get",e,void 0,t)}},{key:"delete",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._request("delete",e,void 0,t)}},{key:"put",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this._request("put",e,t,r)}},{key:"response",get:function(){return this._lastRequestData}},{key:"_request",value:function(e,t){var r=this,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return t=G.applyFilters("http-client-url",t.replace(/\/$/,"")),this._subject.next({identifier:"async.start",url:t,data:s}),new c.y((function(i){r._client[e](t,s,Object.assign(Object.assign({},r._client.defaults[e]),n)).then((function(e){r._lastRequestData=e,i.next(e.data),i.complete(),r._subject.next({identifier:"async.stop"})})).catch((function(e){var t;i.error((null===(t=e.response)||void 0===t?void 0:t.data)||e.response||e),r._subject.next({identifier:"async.stop"})}))}))}},{key:"subject",value:function(){return this._subject}},{key:"emit",value:function(e){var t=e.identifier,r=e.value;this._subject.next({identifier:t,value:r})}}])&&u(t.prototype,r),s&&u(t,s),e}(),f=r(3);function p(e,t){for(var r=0;r=1e3){for(var r,s=Math.floor((""+e).length/3),n=2;n>=1;n--){if(((r=parseFloat((0!=s?e/Math.pow(1e3,s):e).toPrecision(n)))+"").replace(/[^a-zA-Z 0-9]+/g,"").length<=2)break}r%1!=0&&(r=r.toFixed(1)),t=r+["","k","m","b","t"][s]}return t})),P=r(1356),O=r(9698);function $(e,t){for(var r=0;r0&&window.outerWidth<=480:this.breakpoint="xs";break;case window.outerWidth>480&&window.outerWidth<=640:this.breakpoint="sm";break;case window.outerWidth>640&&window.outerWidth<=1024:this.breakpoint="md";break;case window.outerWidth>1024&&window.outerWidth<=1280:this.breakpoint="lg";break;case window.outerWidth>1280:this.breakpoint="xl"}}}])&&Z(t.prototype,r),s&&Z(t,s),e}()),X=new m({sidebar:["xs","sm","md"].includes(R.breakpoint)?"hidden":"visible"});N.defineClient(n),window.nsEvent=I,window.nsHttpClient=N,window.nsSnackBar=L,window.nsCurrency=P.W,window.nsTruncate=O.b,window.nsRawCurrency=P.f,window.nsAbbreviate=S,window.nsState=X,window.nsUrl=M,window.nsScreen=R,window.ChartJS=i,window.EventEmitter=h,window.Popup=x.G,window.RxJS=_,window.FormValidation=C.Z,window.nsCrudHandler=z},4364:(e,t,r)=>{"use strict";r.r(t),r.d(t,{nsAvatar:()=>z,nsButton:()=>a,nsCheckbox:()=>p,nsCkeditor:()=>D,nsCloseButton:()=>O,nsCrud:()=>b,nsCrudForm:()=>y,nsDate:()=>j,nsDateTimePicker:()=>q.V,nsDatepicker:()=>G,nsField:()=>w,nsIconButton:()=>$,nsInput:()=>c,nsLink:()=>l,nsMediaInput:()=>P,nsMenu:()=>i,nsMultiselect:()=>C,nsNumpad:()=>I.Z,nsSelect:()=>u.R,nsSelectAudio:()=>f,nsSpinner:()=>g,nsSubmenu:()=>o,nsSwitch:()=>k,nsTableRow:()=>m,nsTabs:()=>F,nsTabsItem:()=>Z,nsTextarea:()=>x});var s=r(538),n=r(162),i=s.default.component("ns-menu",{data:function(){return{defaultToggledState:!1,_save:0}},props:["href","label","icon","notification","toggled","identifier"],template:'\n \n ',mounted:function(){var e=this;this.defaultToggledState=void 0!==this.toggled?this.toggled:this.defaultToggledState,n.l.subject().subscribe((function(t){t.value!==e.identifier&&(e.defaultToggledState=!1)}))},methods:{toggleEmit:function(){var e=this;this.toggle().then((function(t){t&&n.l.emit({identifier:"side-menu.open",value:e.identifier})}))},toggle:function(){var e=this;return new Promise((function(t,r){0===e.href.length&&(e.defaultToggledState=!e.defaultToggledState,t(e.defaultToggledState))}))}}}),o=s.default.component("ns-submenu",{data:function(){return{}},props:["href","label","active"],mounted:function(){},template:'\n
    \n
  • \n \n \n \n
  • \n
    \n '}),a=s.default.component("ns-button",{data:function(){return{clicked:!1,_save:0}},props:["type","disabled","link","href","routerLink","to"],template:'\n
    \n \n \n \n
    \n ',mounted:function(){},computed:{isDisabled:function(){return this.disabled&&(0===this.disabled.length||"disabled"===this.disabled||this.disabled)},buttonclass:function(){var e;switch(this.type){case"info":e="".concat(this.isDisabled?"bg-gray-400 border border-gray-500 cursor-not-allowed text-gray-600":"shadow bg-blue-400 text-white");break;case"success":e="".concat(this.isDisabled?"bg-gray-400 border border-gray-500 cursor-not-allowed text-gray-600":"shadow bg-green-400 text-white");break;case"danger":e="".concat(this.isDisabled?"bg-gray-400 border border-gray-500 cursor-not-allowed text-gray-600":"shadow bg-red-400 text-white");break;case"warning":e="".concat(this.isDisabled?"bg-gray-400 border border-gray-500 cursor-not-allowed text-gray-600":"shadow bg-orange-400 text-white");break;default:e="".concat(this.isDisabled?"bg-gray-400 border border-gray-500 cursor-not-allowed text-gray-600":"shadow bg-white text-gray-800")}return e}}}),l=s.default.component("ns-link",{data:function(){return{clicked:!1,_save:0}},props:["type","to","href"],template:'\n
    \n \n \n
    \n ',computed:{buttonclass:function(){switch(this.type){case"info":return"shadow bg-blue-400 text-white";case"success":return"shadow bg-green-400 text-white";case"danger":return"shadow bg-red-400 text-white";case"warning":return"shadow bg-orange-400 text-white";default:return"shadow bg-white text-gray-800"}}}}),c=s.default.component("ns-input",{data:function(){return{}},mounted:function(){},computed:{hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},disabledClass:function(){return this.field.disabled?"bg-gray-200 cursor-not-allowed":"bg-transparent"},inputClass:function(){return this.disabledClass+" "+this.leadClass},leadClass:function(){return this.leading?"pl-8":"px-4"}},props:["placeholder","leading","type","field"],template:'\n
    \n \n
    \n
    \n \n {{ leading }}\n \n
    \n \n
    \n

    \n

    \n This field is required.\n This field must contain a valid email address.\n {{ error.message }}\n

    \n
    \n '}),u=r(4451),d=r(7389),f=s.default.component("ns-select-audio",{data:function(){return{}},props:["name","placeholder","field"],computed:{hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},disabledClass:function(){return this.field.disabled?"bg-gray-200 cursor-not-allowed":"bg-transparent"},inputClass:function(){return this.disabledClass+" "+this.leadClass},leadClass:function(){return this.leading?"pl-8":"px-4"}},methods:{__:d.__,playSelectedSound:function(){this.field.value.length>0&&new Audio(this.field.value).play()}},template:'\n
    \n \n
    \n
    \n \n
    \n \n
    \n

    \n

    \n {{ __( \'This field is required.\' ) }}\n {{ __( \'This field must contain a valid email address.\' ) }}\n {{ error.message }}\n

    \n
    \n '}),p=s.default.component("ns-checkbox",{data:function(){return{}},props:["checked","field","label"],template:'\n
    \n
    \n \n
    \n {{ label }}\n {{ field.label }}\n
    \n ',computed:{isChecked:function(){return this.field?this.field.value:this.checked}},methods:{toggleIt:function(){void 0!==this.field&&(this.field.value=!this.field.value),this.$emit("change",!this.checked)}}}),h=r(2242),v=r(419),b=s.default.component("ns-crud",{data:function(){return{isRefreshing:!1,sortColumn:"",searchInput:"",searchQuery:"",page:1,bulkAction:"",bulkActions:[],columns:[],selectedEntries:[],globallyChecked:!1,result:{current_page:null,data:[],first_page_url:null,from:null,last_page:null,last_page_url:null,next_page_url:null,path:null,per_page:null,prev_page_url:null,to:null,total:null}}},mounted:function(){void 0!==this.identifier&&nsCrudHandler.defineInstance(this.identifier,this),this.loadConfig()},props:["src","create-url","mode","identifier","queryParams"],computed:{getParsedSrc:function(){return"".concat(this.src,"?").concat(this.sortColumn).concat(this.searchQuery).concat(this.queryPage).concat(this.getQueryParams()?"&"+this.getQueryParams():"")},getSelectedAction:function(){var e=this,t=this.bulkActions.filter((function(t){return t.identifier===e.bulkAction}));return t.length>0&&t[0]},pagination:function(){return this.result?this.pageNumbers(this.result.last_page,this.result.current_page):[]},queryPage:function(){return this.result?"&page=".concat(this.page):""},resultInfo:function(){return(0,d.__)("displaying {perPage} on {items} items").replace("{perPage}",this.result.total).replace("{items}",this.result.total)}},methods:{__:d.__,getQueryParams:function(){var e=this;return this.queryParams?Object.keys(this.queryParams).map((function(t){return"".concat(t,"=").concat(e.queryParams[t])})).join("&"):""},pageNumbers:function(e,t){var r=[];return t>e-3?r.push(e-2,e-1,e):r.push(t,t+1,t+2,"...",e),r.filter((function(e){return e>0||"string"==typeof e}))},downloadContent:function(){n.ih.post("".concat(this.src,"/export?").concat(this.getQueryParams()),{entries:this.selectedEntries.map((function(e){return e.$id}))}).subscribe((function(e){setTimeout((function(){return document.location=e.url}),300),n.kX.success((0,d.__)("The document has been generated.")).subscribe()}),(function(e){n.kX.error(e.message||(0,d.__)("Unexpected error occured.")).subscribe()}))},clearSelectedEntries:function(){var e=this;h.G.show(v.Z,{title:(0,d.__)("Clear Selected Entries ?"),message:(0,d.__)("Would you like to clear all selected entries ?"),onAction:function(t){t&&(e.selectedEntries=[])}})},refreshRow:function(e){if(!0===e.$checked){0===this.selectedEntries.filter((function(t){return t.$id===e.$id})).length&&this.selectedEntries.push(e)}else{var t=this.selectedEntries.filter((function(t){return t.$id===e.$id}));if(t.length>0){var r=this.selectedEntries.indexOf(t[0]);this.selectedEntries.splice(r,1)}}},handleShowOptions:function(e){this.result.data.forEach((function(t){t.$id!==e.$id&&(t.$toggled=!1)}))},handleGlobalChange:function(e){var t=this;this.globallyChecked=e,this.result.data.forEach((function(r){r.$checked=e,t.refreshRow(r)}))},loadConfig:function(){var e=this;n.ih.get("".concat(this.src,"/config?").concat(this.getQueryParams())).subscribe((function(t){e.columns=t.columns,e.bulkActions=t.bulkActions,e.refresh()}),(function(e){n.kX.error(e.message,"OK",{duration:!1}).subscribe()}))},cancelSearch:function(){this.searchInput="",this.search()},search:function(){this.searchInput?this.searchQuery="&search=".concat(this.searchInput):this.searchQuery="",this.refresh()},sort:function(e){for(var t in this.columns)t!==e&&(this.columns[t].$sorted=!1,this.columns[t].$direction="");switch(this.columns[e].$sorted=!0,this.columns[e].$direction){case"asc":this.columns[e].$direction="desc";break;case"desc":this.columns[e].$direction="";break;case"":this.columns[e].$direction="asc"}["asc","desc"].includes(this.columns[e].$direction)?this.sortColumn="active=".concat(e,"&direction=").concat(this.columns[e].$direction):this.sortColumn="",this.$emit("sort",this.columns[e]),this.refresh()},bulkDo:function(){var e=this;return this.bulkAction?this.selectedEntries.length>0?(console.log(this.getSelectedAction),confirm(this.getSelectedAction.confirm||this.$slots["error-bulk-confirmation"]||(0,d.__)("No bulk confirmation message provided on the CRUD class."))?n.ih.post("".concat(this.src,"/bulk-actions"),{action:this.bulkAction,entries:this.selectedEntries.map((function(e){return e.$id}))}).subscribe((function(t){n.kX.info(t.message).subscribe(),e.selectedEntries=[],e.refresh()}),(function(e){n.kX.error(e.message).subscribe()})):void 0):n.kX.error(this.$slots["error-no-selection"]?this.$slots["error-no-selection"][0].text:(0,d.__)("No selection has been made.")).subscribe():n.kX.error(this.$slots["error-no-action"]?this.$slots["error-no-action"][0].text:(0,d.__)("No action has been selected.")).subscribe()},refresh:function(){var e=this;this.globallyChecked=!1,this.isRefreshing=!0,n.ih.get("".concat(this.getParsedSrc)).subscribe((function(t){t.data=t.data.map((function(t){return e.selectedEntries.filter((function(e){return e.$id===t.$id})).length>0&&(t.$checked=!0),t})),e.isRefreshing=!1,e.result=t,e.page=t.current_page}),(function(t){e.isRefreshing=!1,n.kX.error(t.message).subscribe()}))}},template:'\n
    \n
    \n \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \n \n
    \n {{ column.label }}\n \n \n \n \n
    \n
    {{ __( \'There is nothing to display...\' ) }}
    \n
    \n
    \n
    \n
    \n \n \n
    \n
    \n
    {{ resultInfo }}
    \n \n
    \n
    \n
    \n '}),m=s.default.component("ns-table-row",{props:["options","row","columns"],data:function(){return{optionsToggled:!1}},mounted:function(){},methods:{sanitizeHTML:function(e){var t=document.createElement("div");t.innerHTML=e;for(var r=t.getElementsByTagName("script"),s=r.length;s--;)r[s].parentNode.removeChild(r[s]);return t.innerHTML},getElementOffset:function(e){var t=e.getBoundingClientRect();return{top:t.top+window.pageYOffset,left:t.left+window.pageXOffset}},toggleMenu:function(e){var t=this;if(this.row.$toggled=!this.row.$toggled,this.$emit("toggled",this.row),this.row.$toggled)setTimeout((function(){var e=t.$el.querySelectorAll(".relative > .absolute")[0],r=t.$el.querySelectorAll(".relative")[0],s=t.getElementOffset(r);e.style.top=s.top+"px",e.style.left=s.left+"px",r.classList.remove("relative"),r.classList.add("dropdown-holder")}),100);else{var r=this.$el.querySelectorAll(".dropdown-holder")[0];r.classList.remove("dropdown-holder"),r.classList.add("relative")}},handleChanged:function(e){this.row.$checked=e,this.$emit("updated",this.row)},triggerAsync:function(e){var t=this;e.confirm?confirm(e.confirm.message)&&n.ih[e.type.toLowerCase()](e.url).subscribe((function(e){n.kX.success(e.message).subscribe(),t.$emit("reload",t.row)}),(function(e){t.toggleMenu(),n.kX.error(e.message).subscribe()})):(n.l.emit({identifier:"ns-table-row-action",value:{action:e,row:this.row,component:this}}),this.toggleMenu())}},template:'\n \n \n \n \n \n \n \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n \n \n '}),g=s.default.component("ns-spinner",{data:function(){return{}},mounted:function(){},computed:{validatedSize:function(){return this.size||24},validatedBorder:function(){return this.border||8},validatedAnimation:function(){return this.animation||"fast"}},props:["color","size","border"],template:"\n
    \n
    \n
    \n "}),_=r(7266),y=s.default.component("ns-crud-form",{data:function(){return{form:{},globallyChecked:!1,formValidation:new _.Z,rows:[]}},mounted:function(){this.loadForm()},props:["src","create-url","field-class","return-url","submit-url","submit-method","disable-tabs"],computed:{activeTabFields:function(){for(var e in this.form.tabs)if(this.form.tabs[e].active)return this.form.tabs[e].fields;return[]}},methods:{toggle:function(e){for(var t in this.form.tabs)this.form.tabs[t].active=!1;this.form.tabs[e].active=!0},handleShowOptions:function(e){this.rows.forEach((function(t){t.$id!==e.$id&&(t.$toggled=!1)}))},submit:function(){var e=this;return this.formValidation.validateForm(this.form).length>0?n.kX.error(this.$slots["error-invalid-form"]?this.$slots["error-invalid-form"][0].text:"No error message provided for having an invalid form.",this.$slots.okay?this.$slots.okay[0].text:"OK").subscribe():(this.formValidation.disableForm(this.form),void 0===this.submitUrl?n.kX.error(this.$slots["error-no-submit-url"]?this.$slots["error-no-submit-url"][0].text:"No error message provided for not having a valid submit url.",this.$slots.okay?this.$slots.okay[0].text:"OK").subscribe():void n.ih[this.submitMethod?this.submitMethod.toLowerCase():"post"](this.submitUrl,this.formValidation.extractForm(this.form)).subscribe((function(t){if("success"===t.status){if(e.returnUrl&&e.returnUrl.length>0)return document.location=e.returnUrl;e.$emit("save",t)}e.formValidation.enableForm(e.form)}),(function(t){n.kX.error(t.message,void 0,{duration:5e3}).subscribe(),e.formValidation.triggerError(e.form,t),e.formValidation.enableForm(e.form)})))},handleGlobalChange:function(e){this.globallyChecked=e,this.rows.forEach((function(t){return t.$checked=e}))},loadForm:function(){var e=this;n.ih.get("".concat(this.src)).subscribe({next:function(t){e.form=e.parseForm(t.form),n.kq.doAction("ns-crud-form-loaded",e),e.$emit("updated",e.form)},error:function(e){n.kX.error(e.message,"OKAY",{duration:0}).subscribe()}})},parseForm:function(e){e.main.value=void 0===e.main.value?"":e.main.value,e.main=this.formValidation.createFields([e.main])[0];var t=0;for(var r in e.tabs)0===t&&(e.tabs[r].active=!0),e.tabs[r].active=void 0!==e.tabs[r].active&&e.tabs[r].active,e.tabs[r].fields=this.formValidation.createFields(e.tabs[r].fields),t++;return e}},template:'\n
    \n
    \n \n
    \n
    \n
    \n
    \n \n
    \n Return\n
    \n
    \n \n
    \n
    \n
    \n
    {{ tab.label }}
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n '}),x=s.default.component("ns-textarea",{data:function(){return{}},mounted:function(){},computed:{hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},disabledClass:function(){return this.field.disabled?"bg-gray-200 cursor-not-allowed":"bg-transparent"},inputClass:function(){return this.disabledClass+" "+this.leadClass},leadClass:function(){return this.leading?"p-8":"p-2"}},props:["placeholder","leading","type","field"],template:'\n
    \n \n
    \n
    \n \n {{ leading }}\n \n
    \n \n
    \n

    \n

    \n This field is required.\n This field must contain a valid email address.\n {{ error.message }}\n

    \n
    \n '}),w=s.default.component("ns-field",{data:function(){return{}},mounted:function(){},computed:{isInputField:function(){return["text","password","email","number","tel"].includes(this.field.type)},isDateField:function(){return["date"].includes(this.field.type)},isSelectField:function(){return["select"].includes(this.field.type)},isTextarea:function(){return["textarea"].includes(this.field.type)},isCheckbox:function(){return["checkbox"].includes(this.field.type)},isMultiselect:function(){return["multiselect"].includes(this.field.type)},isSelectAudio:function(){return["select-audio"].includes(this.field.type)},isSwitch:function(){return["switch"].includes(this.field.type)},isMedia:function(){return["media"].includes(this.field.type)},isCkEditor:function(){return["ckeditor"].includes(this.field.type)},isDateTimePicker:function(){return["datetimepicker"].includes(this.field.type)},isCustom:function(){return["custom"].includes(this.field.type)}},props:["field"],methods:{addOption:function(e){"select"===this.field.type&&this.field.options.forEach((function(e){return e.selected=!1})),e.selected=!0;var t=this.field.options.indexOf(e);this.field.options.splice(t,1),this.field.options.unshift(e),this.refreshMultiselect(),this.$emit("change",{action:"addOption",option:e})},refreshMultiselect:function(){this.field.value=this.field.options.filter((function(e){return e.selected})).map((function(e){return e.value}))},removeOption:function(e){e.selected=!1,this.refreshMultiselect(),this.$emit("change",{action:"removeOption",option:e})}},template:'\n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n '}),C=s.default.component("ns-multiselect",{data:function(){return{showPanel:!1,search:""}},props:["field"],computed:{hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},_options:function(){var e=this;return this.field.options.map((function(t){return t.selected=void 0!==t.selected&&t.selected,e.field.value&&e.field.value.includes(t.value)&&(t.selected=!0),t}))}},methods:{__:d.__,addOption:function(e){this.field.disabled||(this.$emit("addOption",e),this.$forceUpdate(),setTimeout((function(){}),100))},removeOption:function(e,t){var r=this;if(!this.field.disabled)return t.preventDefault(),t.stopPropagation(),this.$emit("removeOption",e),this.$forceUpdate(),setTimeout((function(){r.search=""}),100),!1}},mounted:function(){var e=this;this.field.value&&this.field.value.reverse().forEach((function(t){var r=e.field.options.filter((function(e){return e.value===t}));r.length>=0&&e.addOption(r[0])}))},template:'\n
    \n \n
    \n
    \n
    \n
    \n
    \n {{ option.label }}\n \n
    \n
    \n
    \n
    \n \n \n
    \n
    \n \n
    \n
    \n

    \n

    \n {{ __( \'This field is required.\' ) }}\n {{ __( \'This field must contain a valid email address.\' ) }}\n {{ error.message }}\n

    \n
    \n
    \n '}),k=s.default.component("ns-switch",{data:function(){return{}},mounted:function(){},computed:{_options:function(){var e=this;return this.field.options.map((function(t){return t.selected=t.value===e.field.value,t}))},hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},disabledClass:function(){return this.field.disabled?"bg-gray-200 cursor-not-allowed":""},sizeClass:function(){return" w-1/".concat(this._options.length<=4?this._options.length:4)},inputClass:function(){return this.disabledClass+" "+this.leadClass},leadClass:function(){return this.leading?"pl-8":"px-4"}},methods:{__:d.__,setSelected:function(e){this.field.value=e.value,this._options.forEach((function(e){return e.selected=!1})),e.selected=!0,this.$forceUpdate(),this.$emit("change",e.value)}},props:["placeholder","leading","type","field"],template:'\n
    \n \n
    \n \n
    \n

    \n

    \n {{ __( \'This field is required.\' ) }}\n

    \n
    \n '}),j=s.default.component("ns-date",{data:function(){return{}},mounted:function(){},computed:{hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},disabledClass:function(){return this.field.disabled?"bg-gray-200 cursor-not-allowed":"bg-transparent"},inputClass:function(){return this.disabledClass+" "+this.leadClass},leadClass:function(){return this.leading?"pl-8":"px-4"}},props:["placeholder","leading","type","field"],template:'\n
    \n \n
    \n
    \n \n {{ leading }}\n \n
    \n \n
    \n

    \n

    \n {{ __( \'This field is required.\' ) }}\n {{ __( \'This field must contain a valid email address.\' ) }}\n {{ error.message }}\n

    \n
    \n '}),S=r(9576),P=s.default.component("ns-media-input",{template:'\n
    \n \n
    \n
    \n \n {{ leading }}\n \n
    \n
    \n
    \n \n
    \n \n \n
    \n
    \n

    \n

    \n {{ __( \'This field is required.\' ) }}\n {{ __( \'This field must contain a valid email address.\' ) }}\n {{ error.message }}\n

    \n
    \n ',computed:{hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},disabledClass:function(){return this.field.disabled?"bg-gray-200 cursor-not-allowed":"bg-transparent"},inputClass:function(){return this.disabledClass+" "+this.leadClass},leadClass:function(){return this.leading?"pl-8":"px-4"}},data:function(){return{}},props:["placeholder","leading","type","field"],mounted:function(){},methods:{toggleMedia:function(){var e=this;new Promise((function(t,r){h.G.show(S.Z,Object.assign({resolve:t,reject:r},e.field.data||{}))})).then((function(t){"use-selected"===t.event&&(e.field.data&&"url"!==e.field.data.type?e.field.data&&"model"!==e.field.data.type||(e.field.value=t.value[0]):e.field.value=t.value[0].sizes.original,e.$forceUpdate())}))}}}),O=s.default.component("ns-close-button",{template:'\n \n ',methods:{clicked:function(e){this.$emit("click",e)}}}),$=s.default.component("ns-icon-button",{template:'\n \n ',props:["className","buttonClass"],methods:{clicked:function(e){this.$emit("click",e)}}}),T=r(1272),E=r.n(T),V=r(5234),A=r.n(V),D=s.default.component("ns-ckeditor",{data:function(){return{editor:A()}},components:{ckeditor:E().component},mounted:function(){},methods:{__:d.__},computed:{hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},disabledClass:function(){return this.field.disabled?"bg-gray-200 cursor-not-allowed":"bg-transparent"},inputClass:function(){return this.disabledClass+" "+this.leadClass},leadClass:function(){return this.leading?"p-8":"p-2"}},props:["placeholder","leading","type","field"],template:'\n
    \n \n
    \n
    \n \n {{ leading }}\n \n
    \n \n
    \n

    \n

    \n {{ __( \'This field is required.\' ) }}\n {{ __( \'This field must contain a valid email address.\' ) }}\n {{ error.message }}\n

    \n
    \n '}),F=s.default.component("ns-tabs",{data:function(){return{childrens:[]}},props:["active"],computed:{activeComponent:function(){var e=this.$children.filter((function(e){return e.active}));return e.length>0&&e[0]}},methods:{toggle:function(e){this.$emit("active",e.identifier),this.$emit("changeTab",e.identifier)}},mounted:function(){this.childrens=this.$children},template:'\n
    \n
    \n
    {{ tab.label }}
    \n
    \n \n
    \n '}),Z=s.default.component("ns-tabs-item",{data:function(){return{}},mounted:function(){},props:["label","identifier","padding"],template:'\n
    \n \n
    \n '}),q=r(8655),I=r(3968),N=r(1726),L=r(7259);const M=s.default.extend({methods:{__:d.__},data:function(){return{svg:""}},mounted:function(){this.svg=(0,N.createAvatar)(L,{seed:this.displayName})},computed:{avatarUrl:function(){return 0===this.url.length?"":this.url}},props:["url","display-name"]});const z=(0,r(1900).Z)(M,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"flex justify-between items-center flex-shrink-0"},[r("span",{staticClass:"hidden md:inline-block text-gray-600 px-2"},[e._v(e._s(e.__("Howdy, {name}").replace("{name}",this.displayName)))]),e._v(" "),r("span",{staticClass:"md:hidden text-gray-600 px-2"},[e._v(e._s(e.displayName))]),e._v(" "),r("div",{staticClass:"px-2"},[r("div",{staticClass:"w-8 h-8 overflow-hidden rounded-full bg-gray-600"},[""!==e.avatarUrl?r("img",{staticClass:"w-8 h-8 overflow-hidden rounded-full",attrs:{src:e.avatarUrl,alt:e.displayName,srcset:""}}):e._e(),e._v(" "),""===e.avatarUrl?r("div",{domProps:{innerHTML:e._s(e.svg)}}):e._e()])])])}),[],!1,null,null,null).exports;var G=r(6598).Z},8655:(e,t,r)=>{"use strict";r.d(t,{V:()=>a});var s=r(538),n=r(381),i=r.n(n),o=r(7389),a=s.default.component("ns-date-time-picker",{template:'\n
    \n \n
    \n \n \n {{ currentDay.format( \'YYYY/MM/DD HH:mm\' ) }}\n N/A\n \n
    \n

    {{ field.description }}

    \n \n
    \n ',props:["field","date"],data:function(){return{visible:!1,hours:0,minutes:0,currentDay:null,daysOfWeek:new Array(7).fill("").map((function(e,t){return t})),calendar:[[]]}},watch:{visible:function(){var e=this;this.visible&&setTimeout((function(){e.$refs.hours.addEventListener("focus",(function(){this.select()})),e.$refs.minutes.addEventListener("focus",(function(){this.select()}))}),100)}},mounted:function(){var e=this;document.addEventListener("mousedown",(function(t){return e.checkClickedItem(t)})),this.field?this.currentDay=[void 0,null,""].includes(this.field.value)?i()():i()(this.field.value):this.currentDay=[void 0,null,""].includes(this.date)?i()():i()(this.date),this.hours=this.currentDay.format("HH"),this.minutes=this.currentDay.format("mm"),this.build()},methods:{__:o.__,detectHoursChange:function(){parseFloat(this.hours)<0&&(this.hours=0),parseFloat(this.hours)>23&&(this.hours=23),this.updateDateTime()},detectMinuteChange:function(){parseFloat(this.minutes)<0&&(this.minutes=0),parseFloat(this.minutes)>59&&(this.minutes=59),this.updateDateTime()},updateDateTime:function(){this.currentDay.hours(this.hours),this.currentDay.minutes(this.minutes),this.selectDate(this.currentDay)},checkClickedItem:function(e){!this.$el.contains(e.srcElement)&&this.visible&&(this.visible=!1)},selectDate:function(e){this.currentDay=e,this.currentDay.hours(this.hours),this.currentDay.minutes(this.minutes);var t=this.currentDay.format("YYYY/MM/DD HH:mm");this.field?(this.field.value=t,this.$emit("change",this.field)):this.$emit("change",this.currentDay)},subMonth:function(){this.currentDay.subtract(1,"month"),this.build()},addMonth:function(){this.currentDay.add(1,"month"),this.build()},resetCalendar:function(){this.calendar=[[]]},build:function(){this.resetCalendar();this.currentDay.clone().startOf("month");for(var e=this.currentDay.clone().startOf("month"),t=this.currentDay.clone().endOf("month");;){0===e.day()&&this.calendar[0].length>0&&this.calendar.push([]);var r=this.calendar.length-1;if(this.calendar[r].push({date:e.clone(),dayOfWeek:e.day(),isToday:e.isSame(i().now(),"day")}),e.isSame(t,"day"))break;e.add(1,"day")}}}})},4451:(e,t,r)=>{"use strict";r.d(t,{R:()=>n});var s=r(7389),n=r(538).default.component("ns-select",{data:function(){return{}},props:["name","placeholder","field"],computed:{hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},disabledClass:function(){return this.field.disabled?"bg-gray-200 cursor-not-allowed":"bg-transparent"},inputClass:function(){return this.disabledClass+" "+this.leadClass},leadClass:function(){return this.leading?"pl-8":"px-4"}},methods:{__:s.__},template:'\n
    \n \n
    \n \n
    \n

    \n

    \n {{ __( \'This field is required.\' ) }}\n {{ __( \'This field must contain a valid email address.\' ) }}\n {{ error.message }}\n

    \n
    \n '})},1356:(e,t,r)=>{"use strict";r.d(t,{W:()=>c,f:()=>u});var s=r(538),n=r(2077),i=r.n(n),o=r(6740),a=r.n(o),l=new Array(parseInt(ns.currency.ns_currency_precision)).fill("").map((function(e){return 0})).join(""),c=s.default.filter("currency",(function(e){var t,r,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"full";switch(ns.currency.ns_currency_prefered){case"iso":t=ns.currency.ns_currency_iso;break;case"symbol":t=ns.currency.ns_currency_symbol}if("full"===s){var n={decimal:ns.currency.ns_currency_decimal_separator,separator:ns.currency.ns_currency_thousand_separator,precision:parseInt(ns.currency.ns_currency_precision),symbol:""};r=a()(e,n).format()}else r=i()(e).format("0.0a");return"".concat("before"===ns.currency.ns_currency_position?t:"").concat(r).concat("after"===ns.currency.ns_currency_position?t:"")})),u=function(e){var t="0.".concat(l);return parseFloat(i()(e).format(t))}},9698:(e,t,r)=>{"use strict";r.d(t,{b:()=>s});var s=r(538).default.filter("truncate",(function(e,t){return e?(e=e.toString()).length>t?e.substring(0,t)+"...":e:""}))},7266:(e,t,r)=>{"use strict";function s(e,t){for(var r=0;rn});var n=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r,n;return t=e,(r=[{key:"validateFields",value:function(e){var t=this;return 0===e.map((function(e){return t.checkField(e),e.errors?0===e.errors.length:0})).filter((function(e){return!1===e})).length}},{key:"validateFieldsErrors",value:function(e){var t=this;return e.map((function(e){return t.checkField(e),e.errors})).flat()}},{key:"validateForm",value:function(e){e.main&&this.validateField(e.main);var t=[];for(var r in e.tabs){var s=[],n=this.validateFieldsErrors(e.tabs[r].fields);n.length>0&&s.push(n),e.tabs[r].errors=s.flat(),t.push(s.flat())}return t.flat().filter((function(e){return void 0!==e}))}},{key:"initializeTabs",value:function(e){var t=0;for(var r in e)0===t&&(e[r].active=!0),e[r].active=void 0!==e[r].active&&e[r].active,e[r].fields=this.createFields(e[r].fields),t++;return e}},{key:"validateField",value:function(e){return this.checkField(e)}},{key:"fieldsValid",value:function(e){return!(e.map((function(e){return e.errors&&e.errors.length>0})).filter((function(e){return e})).length>0)}},{key:"createFields",value:function(e){return e.map((function(e){return e.type=e.type||"text",e.errors=e.errors||[],e.disabled=e.disabled||!1,"custom"===e.type&&(e.component=nsExtraComponents[e.name]),e}))}},{key:"createForm",value:function(e){if(e.main&&(e.main=this.createFields([e.main])[0]),e.tabs)for(var t in e.tabs)e.tabs[t].fields=this.createFields(e.tabs[t].fields),e.tabs[t].errors=[];return e}},{key:"enableFields",value:function(e){return e.map((function(e){return e.disabled=!1}))}},{key:"disableFields",value:function(e){return e.map((function(e){return e.disabled=!0}))}},{key:"disableForm",value:function(e){for(var t in e.main&&(e.main.disabled=!0),e.tabs)e.tabs[t].fields.forEach((function(e){return e.disabled=!0}))}},{key:"enableForm",value:function(e){for(var t in e.main&&(e.main.disabled=!1),e.tabs)e.tabs[t].fields.forEach((function(e){return e.disabled=!1}))}},{key:"getValue",value:function(e){var t={};return e.forEach((function(e){t[e.name]=e.value})),t}},{key:"checkField",value:function(e){var t=this;return void 0!==e.validation&&(e.errors=[],this.detectValidationRules(e.validation).forEach((function(r){t.fieldPassCheck(e,r)}))),e}},{key:"extractForm",value:function(e){var t={};if(e.main&&(t[e.main.name]=e.main.value),e.tabs)for(var r in e.tabs)void 0===t[r]&&(t[r]={}),t[r]=this.extractFields(e.tabs[r].fields);return t}},{key:"extractFields",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.forEach((function(e){["multiselect"].includes(e.type)?t[e.name]=e.options.filter((function(e){return e.selected})).map((function(e){return e.value})):t[e.name]=e.value})),t}},{key:"detectValidationRules",value:function(e){var t=function(e){var t;return["email","required"].includes(e)?{identifier:e}:(t=/(min)\:([0-9])+/g.exec(e))||(t=/(max)\:([0-9])+/g.exec(e))?{identifier:t[1],value:t[2]}:e};return Array.isArray(e)?e.filter((function(e){return"string"==typeof e})).map(t):e.split("|").map(t)}},{key:"triggerError",value:function(e,t){if(t.errors){var r=function(r){var s=r.split(".").filter((function(e){return!/^\d+$/.test(e)}));2===s.length&&e.tabs[s[0]].fields.forEach((function(e){e.name===s[1]&&t.errors[r].forEach((function(t){var r={identifier:"invalid",invalid:!0,message:t,name:e.name};e.errors.push(r)}))})),r===e.main.name&&t.errors[r].forEach((function(t){e.main.errors.push({identifier:"invalid",invalid:!0,message:t,name:e.main.name})}))};for(var s in t.errors)r(s)}}},{key:"triggerFieldsErrors",value:function(e,t){if(t&&t.errors){var r=function(r){e.forEach((function(e){e.name===r&&t.errors[r].forEach((function(t){var r={identifier:"invalid",invalid:!0,message:t,name:e.name};e.errors.push(r)}))}))};for(var s in t.errors)r(s)}}},{key:"fieldPassCheck",value:function(e,t){if("required"===t.identifier){if(void 0===e.value||null===e.value||0===e.value.length)return e.errors.push({identifier:t.identifier,invalid:!0,name:e.name});e.errors.forEach((function(r,s){r.identifier===t.identifier&&!0===r.invalid&&e.errors.splice(s,1)}))}if("email"===t.identifier){if(!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(e.value))return e.errors.push({identifier:t.identifier,invalid:!0,name:e.name});e.errors.forEach((function(r,s){!0===r[t.identifier]&&e.errors.splice(s,1)}))}return e}}])&&s(t.prototype,r),n&&s(t,n),e}()},7389:(e,t,r)=>{"use strict";r.d(t,{__:()=>s,c:()=>n});var s=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"NexoPOS";return nsLanguage.getEntries(t)&&nsLanguage.getEntries(t)[e]||e},n=function(e,t){return nsLanguage.getEntries(t)&&nsLanguage.getEntries(t)[e]||e}},8603:(e,t,r)=>{"use strict";function s(){var e=this;Object.keys(this).includes("$popup")&&this.$popup.event.subscribe((function(t){"click-overlay"===t.event&&(e.$popupParams&&void 0!==e.$popupParams.reject&&e.$popupParams.reject(!1),e.$popup.close()),"press-esc"===t.event&&(e.$popupParams&&void 0!==e.$popupParams.reject&&e.$popupParams.reject(!1),e.$popup.close())}))}r.d(t,{Z:()=>s})},6386:(e,t,r)=>{"use strict";function s(e){void 0!==this.$popupParams.resolve&&this.$popupParams.reject&&(!1!==e?this.$popupParams.resolve(e):this.$popupParams.reject(e)),this.$popup.close()}r.d(t,{Z:()=>s})},2242:(e,t,r)=>{"use strict";r.d(t,{G:()=>o});var s=r(9248);function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{};if(n(this,e),this.config={primarySelector:void 0,popupClass:"shadow-lg h-half w-1/2 bg-white"},this.container=document.createElement("div"),this.popupBody=document.createElement("div"),this.config=Object.assign(this.config,t),void 0===this.config.primarySelector&&document.querySelectorAll(".is-popup").length>0){var r=document.querySelectorAll(".is-popup").length;this.parentWrapper=document.querySelectorAll(".is-popup")[r-1]}else this.parentWrapper=document.querySelector("body").querySelectorAll("div")[0];this.event=new s.x}var t,r,o;return t=e,o=[{key:"show",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=new e(s);return n.open(t,r),n}}],(r=[{key:"open",value:function(e){var t,r,s,n=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=document.querySelector("body").querySelectorAll("div")[0];this.parentWrapper.style.filter="blur(4px)",o.style.filter="blur(6px)",this.container.setAttribute("class","absolute top-0 left-0 w-full h-full flex items-center justify-center is-popup"),this.container.addEventListener("click",(function(e){n.event.next({event:"click-overlay",value:!0}),e.stopPropagation()})),this.popupBody.addEventListener("click",(function(e){e.stopImmediatePropagation()})),this.container.style.background="rgb(51 51 51 / 20%)",this.container.id="popup-container-"+document.querySelectorAll(".is-popup").length,this.popupBody.setAttribute("class"," zoom-out-entrance"),this.popupBody.innerHTML='',this.container.appendChild(this.popupBody),document.body.appendChild(this.container);var a=Vue.extend(e);this.instance=new a({propsData:{popup:this}}),this.instance.template=(null===(t=null==e?void 0:e.options)||void 0===t?void 0:t.template)||void 0,this.instance.render=e.render||void 0,this.instance.methods=(null===(r=null==e?void 0:e.options)||void 0===r?void 0:r.methods)||(null==e?void 0:e.methods),this.instance.data=(null===(s=null==e?void 0:e.options)||void 0===s?void 0:s.data)||(null==e?void 0:e.data),this.instance.$popup=this,this.instance.$popupParams=i,this.instance.$mount("#".concat(this.container.id," .popup-body"))}},{key:"close",value:function(){var e=this;this.instance.$destroy(),this.event.unsubscribe(),this.parentWrapper.style.filter="blur(0px)";var t=document.querySelector("body").querySelectorAll("div")[0];document.querySelectorAll(".is-popup").length<=1&&(t.style.filter="blur(0px)"),this.popupBody.classList.remove("zoom-out-entrance"),this.popupBody.classList.add("zoom-in-exit"),this.container.classList.remove("is-popup"),setTimeout((function(){e.container.remove()}),300)}}])&&i(t.prototype,r),o&&i(t,o),e}()},9763:(e,t,r)=>{"use strict";function s(e){POS.changeVisibleSection(e)}r.d(t,{Z:()=>s})},9624:(e,t,r)=>{"use strict";r.d(t,{S:()=>i});var s=r(3260);function n(e,t){for(var r=0;r2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"info"};return s.Observable.create((function(s){var i=r.__createSnack({message:e,label:t,type:n.type}),o=i.buttonNode,a=(i.textNode,i.snackWrapper,i.sampleSnack);o.addEventListener("click",(function(e){s.onNext(o),s.onCompleted(),a.remove()})),r.__startTimer(n.duration,a)}))}},{key:"error",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"error"};return this.show(e,t,Object.assign(Object.assign({},r),{type:"error"}))}},{key:"success",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"success"};return this.show(e,t,Object.assign(Object.assign({},r),{type:"success"}))}},{key:"info",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"info"};return this.show(e,t,Object.assign(Object.assign({},r),{type:"info"}))}},{key:"__startTimer",value:function(e,t){var r,s=function(){e>0&&!1!==e&&(r=setTimeout((function(){t.remove()}),e))};t.addEventListener("mouseenter",(function(){clearTimeout(r)})),t.addEventListener("mouseleave",(function(){s()})),s()}},{key:"__createSnack",value:function(e){var t=e.message,r=e.label,s=e.type,n=void 0===s?"info":s,i=document.getElementById("snack-wrapper")||document.createElement("div"),o=document.createElement("div"),a=document.createElement("p"),l=document.createElement("div"),c=document.createElement("button"),u="",d="";switch(n){case"info":u="text-white hover:bg-blue-400 bg-blue-500",d="bg-gray-900 text-white";break;case"error":u="text-red-700 hover:bg-white bg-white",d="bg-red-500 text-white";break;case"success":u="text-green-700 hover:bg-white bg-white",d="bg-green-500 text-white"}return a.textContent=t,r&&(c.textContent=r,c.setAttribute("class","px-3 py-2 shadow rounded-lg font-bold ".concat(u)),l.appendChild(c)),o.appendChild(a),o.appendChild(l),o.setAttribute("class","md:rounded-lg py-2 px-3 md:w-2/5 w-full z-10 md:my-2 shadow-lg flex justify-between items-center zoom-in-entrance anim-duration-300 ".concat(d)),i.appendChild(o),null===document.getElementById("snack-wrapper")&&(i.setAttribute("id","snack-wrapper"),i.setAttribute("class","absolute bottom-0 w-full flex justify-between items-center flex-col"),document.body.appendChild(i)),{snackWrapper:i,sampleSnack:o,buttonsWrapper:l,buttonNode:c,textNode:a}}}])&&n(t.prototype,r),i&&n(t,i),e}()},279:(e,t,r)=>{"use strict";r.d(t,{$:()=>l});var s=r(162),n=r(7389),i=r(2242),o=r(9531);function a(e,t){for(var r=0;rparseFloat(e.$quantities().quantity)-u)return s.kX.error((0,n.__)("Unable to add the product, there is not enough stock. Remaining %s").replace("%s",(e.$quantities().quantity-u).toString())).subscribe()}r({quantity:1})}else l.open(o.Z,{resolve:r,reject:a,product:c,data:e})}))}}])&&a(t.prototype,r),l&&a(t,l),e}()},9572:(e,t,r)=>{"use strict";var s=r(538),n=(r(824),r(4364)),i=r(1630),o=r.n(i),a=r(8159).Z,l=r(2014).Z,c=r(874).Z;window.nsComponents=Object.assign({},n),s.default.use(o()),new s.default({el:"#pos-app",components:Object.assign({NsPos:a,NsPosCart:l,NsPosGrid:c},window.nsComponents)})},824:(e,t,r)=>{"use strict";var s=r(381),n=r.n(s);ns.date.moment=n()(ns.date.current),ns.date.interval=setInterval((function(){ns.date.moment.add(1,"seconds"),ns.date.current=n()(ns.date.current).add(1,"seconds").format("YYYY-MM-DD HH:mm:ss")}),1e3),ns.date.getNowString=function(){var e=Date.parse((new Date).toLocaleString("en-US",{timeZone:ns.date.timeZone}));return n()(e).format("YYYY-MM-DD HH:mm:ss")},ns.date.getMoment=function(){var e=Date.parse((new Date).toLocaleString("en-US",{timeZone:ns.date.timeZone}));return n()(e)}},6700:(e,t,r)=>{var s={"./af":2786,"./af.js":2786,"./ar":867,"./ar-dz":4130,"./ar-dz.js":4130,"./ar-kw":6135,"./ar-kw.js":6135,"./ar-ly":6440,"./ar-ly.js":6440,"./ar-ma":7702,"./ar-ma.js":7702,"./ar-sa":6040,"./ar-sa.js":6040,"./ar-tn":7100,"./ar-tn.js":7100,"./ar.js":867,"./az":1083,"./az.js":1083,"./be":9808,"./be.js":9808,"./bg":8338,"./bg.js":8338,"./bm":7438,"./bm.js":7438,"./bn":8905,"./bn-bd":6225,"./bn-bd.js":6225,"./bn.js":8905,"./bo":1560,"./bo.js":1560,"./br":1278,"./br.js":1278,"./bs":622,"./bs.js":622,"./ca":2468,"./ca.js":2468,"./cs":5822,"./cs.js":5822,"./cv":877,"./cv.js":877,"./cy":7373,"./cy.js":7373,"./da":4780,"./da.js":4780,"./de":9740,"./de-at":217,"./de-at.js":217,"./de-ch":894,"./de-ch.js":894,"./de.js":9740,"./dv":5300,"./dv.js":5300,"./el":837,"./el.js":837,"./en-au":8348,"./en-au.js":8348,"./en-ca":7925,"./en-ca.js":7925,"./en-gb":2243,"./en-gb.js":2243,"./en-ie":6436,"./en-ie.js":6436,"./en-il":7207,"./en-il.js":7207,"./en-in":4175,"./en-in.js":4175,"./en-nz":6319,"./en-nz.js":6319,"./en-sg":1662,"./en-sg.js":1662,"./eo":2915,"./eo.js":2915,"./es":7093,"./es-do":5251,"./es-do.js":5251,"./es-mx":6112,"./es-mx.js":6112,"./es-us":1146,"./es-us.js":1146,"./es.js":7093,"./et":5603,"./et.js":5603,"./eu":7763,"./eu.js":7763,"./fa":6959,"./fa.js":6959,"./fi":1897,"./fi.js":1897,"./fil":2549,"./fil.js":2549,"./fo":4694,"./fo.js":4694,"./fr":4470,"./fr-ca":3049,"./fr-ca.js":3049,"./fr-ch":2330,"./fr-ch.js":2330,"./fr.js":4470,"./fy":5044,"./fy.js":5044,"./ga":9295,"./ga.js":9295,"./gd":2101,"./gd.js":2101,"./gl":8794,"./gl.js":8794,"./gom-deva":7884,"./gom-deva.js":7884,"./gom-latn":3168,"./gom-latn.js":3168,"./gu":5349,"./gu.js":5349,"./he":4206,"./he.js":4206,"./hi":94,"./hi.js":94,"./hr":316,"./hr.js":316,"./hu":2138,"./hu.js":2138,"./hy-am":1423,"./hy-am.js":1423,"./id":9218,"./id.js":9218,"./is":135,"./is.js":135,"./it":626,"./it-ch":150,"./it-ch.js":150,"./it.js":626,"./ja":9183,"./ja.js":9183,"./jv":4286,"./jv.js":4286,"./ka":2105,"./ka.js":2105,"./kk":7772,"./kk.js":7772,"./km":8758,"./km.js":8758,"./kn":9282,"./kn.js":9282,"./ko":3730,"./ko.js":3730,"./ku":1408,"./ku.js":1408,"./ky":3291,"./ky.js":3291,"./lb":6841,"./lb.js":6841,"./lo":5466,"./lo.js":5466,"./lt":7010,"./lt.js":7010,"./lv":7595,"./lv.js":7595,"./me":9861,"./me.js":9861,"./mi":5493,"./mi.js":5493,"./mk":5966,"./mk.js":5966,"./ml":7341,"./ml.js":7341,"./mn":5115,"./mn.js":5115,"./mr":370,"./mr.js":370,"./ms":9847,"./ms-my":1237,"./ms-my.js":1237,"./ms.js":9847,"./mt":2126,"./mt.js":2126,"./my":6165,"./my.js":6165,"./nb":4924,"./nb.js":4924,"./ne":6744,"./ne.js":6744,"./nl":3901,"./nl-be":9814,"./nl-be.js":9814,"./nl.js":3901,"./nn":3877,"./nn.js":3877,"./oc-lnc":2135,"./oc-lnc.js":2135,"./pa-in":5858,"./pa-in.js":5858,"./pl":4495,"./pl.js":4495,"./pt":9520,"./pt-br":7971,"./pt-br.js":7971,"./pt.js":9520,"./ro":6459,"./ro.js":6459,"./ru":238,"./ru.js":238,"./sd":950,"./sd.js":950,"./se":490,"./se.js":490,"./si":124,"./si.js":124,"./sk":4249,"./sk.js":4249,"./sl":4985,"./sl.js":4985,"./sq":1104,"./sq.js":1104,"./sr":9131,"./sr-cyrl":9915,"./sr-cyrl.js":9915,"./sr.js":9131,"./ss":5893,"./ss.js":5893,"./sv":8760,"./sv.js":8760,"./sw":1172,"./sw.js":1172,"./ta":7333,"./ta.js":7333,"./te":3110,"./te.js":3110,"./tet":2095,"./tet.js":2095,"./tg":7321,"./tg.js":7321,"./th":9041,"./th.js":9041,"./tk":9005,"./tk.js":9005,"./tl-ph":5768,"./tl-ph.js":5768,"./tlh":9444,"./tlh.js":9444,"./tr":2397,"./tr.js":2397,"./tzl":8254,"./tzl.js":8254,"./tzm":1106,"./tzm-latn":699,"./tzm-latn.js":699,"./tzm.js":1106,"./ug-cn":9288,"./ug-cn.js":9288,"./uk":7691,"./uk.js":7691,"./ur":3795,"./ur.js":3795,"./uz":6791,"./uz-latn":588,"./uz-latn.js":588,"./uz.js":6791,"./vi":5666,"./vi.js":5666,"./x-pseudo":4378,"./x-pseudo.js":4378,"./yo":5805,"./yo.js":5805,"./zh-cn":3839,"./zh-cn.js":3839,"./zh-hk":5726,"./zh-hk.js":5726,"./zh-mo":9807,"./zh-mo.js":9807,"./zh-tw":4152,"./zh-tw.js":4152};function n(e){var t=i(e);return r(t)}function i(e){if(!r.o(s,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return s[e]}n.keys=function(){return Object.keys(s)},n.resolve=i,e.exports=n,n.id=6700},6598:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var s=r(381),n=r.n(s);const i={name:"ns-datepicker",props:["label","date"],data:function(){return{visible:!1,currentDay:null,daysOfWeek:new Array(7).fill("").map((function(e,t){return t})),calendar:[[]]}},mounted:function(){document.addEventListener("click",this.checkClickedItem),this.currentDay=[void 0,null].includes(this.date)?n()():n()(this.date),this.build()},methods:{__:r(7389).__,checkClickedItem:function(e){!this.$el.contains(e.srcElement)&&this.visible&&(this.visible=!1)},selectDate:function(e){this.currentDay=e,this.visible=!1,this.$emit("change",e)},subMonth:function(){this.currentDay.subtract(1,"month"),this.build()},addMonth:function(){this.currentDay.add(1,"month"),this.build()},resetCalendar:function(){this.calendar=[[]]},build:function(){this.resetCalendar();this.currentDay.clone().startOf("month");for(var e=this.currentDay.clone().startOf("month"),t=this.currentDay.clone().endOf("month");;){0===e.day()&&this.calendar[0].length>0&&this.calendar.push([]);var r=this.calendar.length-1;if(this.calendar[r].push({date:e.clone(),dayOfWeek:e.day(),isToday:e.isSame(n().now(),"day")}),e.isSame(t,"day"))break;e.add(1,"day")}}}};const o=(0,r(1900).Z)(i,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"picker"},[r("div",{staticClass:"rounded cursor-pointer bg-white shadow px-1 py-1 flex items-center text-gray-700",on:{click:function(t){e.visible=!e.visible}}},[r("i",{staticClass:"las la-clock text-2xl"}),e._v(" "),r("span",{staticClass:"mx-1 text-sm"},[r("span",[e._v(e._s(e.label||e.__("Date"))+" : ")]),e._v(" "),e.currentDay?r("span",[e._v(e._s(e.currentDay.format("YYYY/MM/DD")))]):e._e(),e._v(" "),null===e.currentDay?r("span",[e._v(e._s(e.__("N/A")))]):e._e()])]),e._v(" "),e.visible?r("div",{staticClass:"relative h-0 w-0 -mb-2"},[r("div",{staticClass:"w-72 mt-2 shadow rounded bg-white anim-duration-300 zoom-in-entrance flex flex-col"},[r("div",{staticClass:"flex-auto"},[r("div",{staticClass:"p-2 flex items-center"},[r("div",[r("button",{staticClass:"w-8 h-8 bg-gray-400 rounded",on:{click:function(t){return e.subMonth()}}},[r("i",{staticClass:"las la-angle-left"})])]),e._v(" "),r("div",{staticClass:"flex flex-auto font-semibold text-gray-700 justify-center"},[e._v(e._s(e.currentDay.format("MMM"))+" "+e._s(e.currentDay.format("YYYY")))]),e._v(" "),r("div",[r("button",{staticClass:"w-8 h-8 bg-gray-400 rounded",on:{click:function(t){return e.addMonth()}}},[r("i",{staticClass:"las la-angle-right"})])])]),e._v(" "),r("div",{staticClass:"grid grid-flow-row grid-cols-7 grid-rows-1 gap-0 text-gray-700"},[r("div",{staticClass:"border border-gray-200 h-8 flex justify-center items-center text-sm"},[e._v(e._s(e.__("Sun")))]),e._v(" "),r("div",{staticClass:"border border-gray-200 h-8 flex justify-center items-center text-sm"},[e._v(e._s(e.__("Mon")))]),e._v(" "),r("div",{staticClass:"border border-gray-200 h-8 flex justify-center items-center text-sm"},[e._v(e._s(e.__("Tue")))]),e._v(" "),r("div",{staticClass:"border border-gray-200 h-8 flex justify-center items-center text-sm"},[e._v(e._s(e.__("Wed")))]),e._v(" "),r("div",{staticClass:"border border-gray-200 h-8 flex justify-center items-center text-sm"},[e._v(e._s(e.__("Thr")))]),e._v(" "),r("div",{staticClass:"border border-gray-200 h-8 flex justify-center items-center text-sm"},[e._v(e._s(e.__("Fri")))]),e._v(" "),r("div",{staticClass:"border border-gray-200 h-8 flex justify-center items-center text-sm"},[e._v(e._s(e.__("Sat")))])]),e._v(" "),e._l(e.calendar,(function(t,s){return r("div",{key:s,staticClass:"grid grid-flow-row grid-cols-7 grid-rows-1 gap-0 text-gray-700"},e._l(e.daysOfWeek,(function(s,n){return r("div",{key:n,staticClass:"h-8 flex justify-center items-center text-sm"},[e._l(t,(function(t,n){return[t.dayOfWeek===s?r("div",{key:n,staticClass:"h-full w-full flex items-center justify-center cursor-pointer",class:t.date.format("DD")===e.currentDay.format("DD")?"bg-blue-400 text-white border border-blue-500":"hover:bg-gray-100 border border-gray-200",on:{click:function(r){return e.selectDate(t.date)}}},[e._v("\n "+e._s(t.date.format("DD"))+"\n ")]):e._e()]}))],2)})),0)}))],2),e._v(" "),r("div")])]):e._e()])}),[],!1,null,null,null).exports},3968:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});function s(e){return function(e){if(Array.isArray(e))return n(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return n(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,s=new Array(t);r100?100:this.backValue))),"0"===this.backValue&&(this.backValue=""),this.$emit("changed",this.floating&&this.backValue.length>0?parseFloat(this.backValue/this.number):this.backValue)):this.$emit("next",this.floating&&this.backValue.length>0?parseFloat(this.backValue/this.number):this.backValue)}}};const o=(0,r(1900).Z)(i,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"grid grid-flow-row grid-cols-3 gap-2 grid-rows-3",staticStyle:{padding:"1px"},attrs:{id:"numpad"}},[e._l(e.keys,(function(t,s){return r("div",{key:s,staticClass:"hover:bg-gray-400 hover:text-gray-800 bg-gray-300 text-2xl text-gray-700 border h-16 flex items-center justify-center cursor-pointer",staticStyle:{margin:"-1px"},on:{click:function(r){return e.inputValue(t)}}},[void 0!==t.value?r("span",[e._v(e._s(t.value))]):e._e(),e._v(" "),t.icon?r("i",{staticClass:"las",class:t.icon}):e._e()])})),e._v(" "),e._t("numpad-footer")],2)}),[],!1,null,null,null).exports},9576:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var s=r(162),n=r(8603),i=r(7389);const o={name:"ns-media",props:["popup"],components:{VueUpload:r(2948)},data:function(){return{pages:[{label:(0,i.__)("Upload"),name:"upload",selected:!1},{label:(0,i.__)("Gallery"),name:"gallery",selected:!0}],resources:[],response:{data:[],current_page:0,from:0,to:0,next_page_url:"",prev_page_url:"",path:"",per_page:0,total:0,last_page:0,first_page:0},queryPage:1,bulkSelect:!1,files:[]}},mounted:function(){this.popupCloser();var e=this.pages.filter((function(e){return"gallery"===e.name}))[0];this.select(e)},watch:{files:function(){this.files.filter((function(e){return"0.00"===e.progress})).length>0&&(this.$refs.upload.active=!0)}},computed:{postMedia:function(){return s.kq.applyFilters("http-client-url","/api/nexopos/v4/medias")},currentPage:function(){return this.pages.filter((function(e){return e.selected}))[0]},hasOneSelected:function(){return this.response.data.filter((function(e){return e.selected})).length>0},selectedResource:function(){return this.response.data.filter((function(e){return e.selected}))[0]},csrf:function(){return ns.authentication.csrf},isPopup:function(){return void 0!==this.$popup},user_id:function(){return this.isPopup&&this.$popupParams.user_id||0}},methods:{popupCloser:n.Z,__:i.__,cancelBulkSelect:function(){this.bulkSelect=!1,this.response.data.forEach((function(e){return e.selected=!1}))},deleteSelected:function(){var e=this;if(confirm("Delete selected resources ?"))return s.ih.post("/api/nexopos/v4/medias/bulk-delete",{ids:this.response.data.filter((function(e){return e.selected})).map((function(e){return e.id}))}).subscribe((function(t){s.kX.success(t.message).subscribe(),e.loadGallery()}),(function(e){s.kX.error(e.message).subscribe()}))},select:function(e){this.pages.forEach((function(e){return e.selected=!1})),e.selected=!0,"gallery"===e.name&&this.loadGallery()},loadGallery:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;t=null===t?this.queryPage:t,this.queryPage=t,s.ih.get("/api/nexopos/v4/medias?page=".concat(t,"&user_id=").concat(this.user_id)).subscribe((function(t){t.data.forEach((function(e){return e.selected=!1})),e.response=t}))},useSelectedEntries:function(){this.$popupParams.resolve({event:"use-selected",value:this.response.data.filter((function(e){return e.selected}))}),this.$popup.close()},selectResource:function(e){var t=this;this.bulkSelect||this.response.data.forEach((function(r,s){s!==t.response.data.indexOf(e)&&(r.selected=!1)})),e.selected=!e.selected}}};const a=(0,r(1900).Z)(o,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"flex bg-white shadow-xl overflow-hidden",class:e.isPopup?"w-6/7-screen h-6/7-screen":"w-full h-full"},[r("div",{staticClass:"sidebar w-48 bg-gray-200 h-full flex-shrink-0"},[r("h3",{staticClass:"text-xl font-bold text-gray-800 my-4 text-center"},[e._v(e._s(e.__("Medias Manager")))]),e._v(" "),r("ul",e._l(e.pages,(function(t,s){return r("li",{key:s,staticClass:"hover:bg-white py-2 px-3 text-gray-700 border-l-8 cursor-pointer",class:t.selected?"bg-white border-blue-400":"border-transparent",on:{click:function(r){return e.select(t)}}},[e._v(e._s(t.label))])})),0)]),e._v(" "),"upload"===e.currentPage.name?r("div",{staticClass:"content w-full overflow-hidden flex"},[r("vue-upload",{ref:"upload",staticClass:" flex-auto flex bg-white shadow",attrs:{drop:!0,multiple:!0,headers:{"X-Requested-With":"XMLHttpRequest","X-CSRF-TOKEN":e.csrf},accept:"image/*","post-action":e.postMedia},model:{value:e.files,callback:function(t){e.files=t},expression:"files"}},[r("div",{staticClass:"border-dashed border-2 flex flex-auto m-2 p-2 flex-col border-blue-400 items-center justify-center"},[r("h3",{staticClass:"text-3xl font-bold text-gray-600 mb-4"},[e._v(e._s(e.__("Click Here Or Drop Your File To Upload")))]),e._v(" "),r("div",{staticClass:"rounded w-full md:w-2/3 text-gray-700 bg-gray-500 h-56 overflow-y-auto p-2"},[r("ul",e._l(e.files,(function(t,s){return r("li",{key:s,staticClass:"p-2 mb-2 shadow bg-white flex items-center justify-between rounded"},[r("span",[e._v(e._s(t.name))]),e._v(" "),r("span",{staticClass:"rounded bg-blue-400 flex items-center justify-center text-xs p-2"},[e._v(e._s(t.progress)+"%")])])})),0)])])])],1):e._e(),e._v(" "),"gallery"===e.currentPage.name?r("div",{staticClass:"content flex-col w-full overflow-hidden flex"},[e.popup?r("div",{staticClass:"p-2 flex flex-shrink-0 justify-between bg-gray-200"},[r("div"),e._v(" "),r("div",[r("ns-close-button",{on:{click:function(t){return e.popup.close()}}})],1)]):e._e(),e._v(" "),r("div",{staticClass:"flex flex-auto overflow-hidden"},[r("div",{staticClass:"bg-white shadow content flex flex-auto flex-col overflow-y-auto",attrs:{id:"grid"}},[r("div",{staticClass:"flex flex-auto"},[r("div",{staticClass:"p-2 overflow-x-auto"},[r("div",{staticClass:"grid grid-cols-2 md:grid-cols-4 lg:grid-cols-4 xl:grid-cols-6"},e._l(e.response.data,(function(t,s){return r("div",{key:s},[r("div",{staticClass:"p-2"},[r("div",{staticClass:"rounded-lg w-32 h-32 bg-gray-500 m-2 overflow-hidden flex items-center justify-center",class:t.selected?"ring-4 ring-blue-500 ring-opacity-50":"",on:{click:function(r){return e.selectResource(t)}}},[r("img",{staticClass:"object-cover h-full",attrs:{src:t.sizes.thumb,alt:t.name}})])])])})),0)]),e._v(" "),0===e.response.data.length?r("div",{staticClass:"flex flex-auto items-center justify-center"},[r("h3",{staticClass:"text-2xl text-gray-600 font-bold"},[e._v(e._s(e.__("Nothing has already been uploaded")))])]):e._e()])]),e._v(" "),!e.bulkSelect&&e.hasOneSelected?r("div",{staticClass:"w-64 flex-shrink-0 bg-gray-200",attrs:{id:"preview"}},[r("div",{staticClass:"h-64 bg-gray-600 flex items-center justify-center"},[r("img",{attrs:{src:e.selectedResource.sizes.thumb,alt:e.selectedResource.name}})]),e._v(" "),r("div",{staticClass:"p-4 text-gray-700 text-sm",attrs:{id:"details"}},[r("p",{staticClass:"flex flex-col mb-2"},[r("strong",{staticClass:"font-bold block"},[e._v(e._s(e.__("File Name"))+": ")]),r("span",[e._v(e._s(e.selectedResource.name))])]),e._v(" "),r("p",{staticClass:"flex flex-col mb-2"},[r("strong",{staticClass:"font-bold block"},[e._v(e._s(e.__("Uploaded At"))+":")]),r("span",[e._v(e._s(e.selectedResource.created_at))])]),e._v(" "),r("p",{staticClass:"flex flex-col mb-2"},[r("strong",{staticClass:"font-bold block"},[e._v(e._s(e.__("By"))+" :")]),r("span",[e._v(e._s(e.selectedResource.user.username))])])])]):e._e()]),e._v(" "),r("div",{staticClass:"p-2 flex flex-shrink-0 justify-between bg-gray-200"},[r("div",{staticClass:"flex -mx-2 flex-shrink-0"},[r("div",{staticClass:"px-2 flex-shrink-0 flex"},[r("div",{staticClass:"rounded shadow overflow-hidden border-blue-400 flex text-sm text-gray-700"},[e.bulkSelect?r("button",{staticClass:"bg-white hover:bg-blue-400 hover:text-white py-2 px-3",on:{click:function(t){return e.cancelBulkSelect()}}},[r("i",{staticClass:"las la-times"})]):e._e(),e._v(" "),e.hasOneSelected&&!e.bulkSelect?r("button",{staticClass:"bg-white hover:bg-blue-400 hover:text-white py-2 px-3",on:{click:function(t){e.bulkSelect=!0}}},[r("i",{staticClass:"las la-check-circle"})]):e._e(),e._v(" "),e.hasOneSelected?r("button",{staticClass:"bg-red-400 text-white hover:bg-red-500 hover:text-white py-2 px-3",on:{click:function(t){return e.deleteSelected()}}},[r("i",{staticClass:"las la-trash"})]):e._e()])])]),e._v(" "),r("div",{staticClass:"flex-shrink-0 -mx-2 flex"},[r("div",{staticClass:"px-2"},[r("div",{staticClass:"rounded shadow overflow-hidden border-blue-400 flex text-sm text-gray-700"},[r("button",{staticClass:"p-2",class:1===e.response.current_page?"bg-gray-100 text-gray-600 cursor-not-allowed":"bg-white hover:bg-blue-400 hover:text-white",attrs:{disabled:1===e.response.current_page},on:{click:function(t){return e.loadGallery(e.response.current_page-1)}}},[e._v(e._s(e.__("Previous")))]),e._v(" "),r("hr",{staticClass:"border-r border-gray-700"}),e._v(" "),r("button",{staticClass:"p-2",class:e.response.current_page===e.response.last_page?"bg-gray-100 text-gray-600 cursor-not-allowed":"bg-white hover:bg-blue-400 hover:text-white",attrs:{disabled:e.response.current_page===e.response.last_page},on:{click:function(t){return e.loadGallery(e.response.current_page+1)}}},[e._v(e._s(e.__("Next")))])])]),e._v(" "),e.popup&&e.hasOneSelected?r("div",{staticClass:"px-2"},[r("button",{staticClass:"rounded shadow p-2 bg-blue-400 text-white text-sm",on:{click:function(t){return e.useSelectedEntries()}}},[e._v(e._s(e.__("Use Selected")))])]):e._e()])])]):e._e()])}),[],!1,null,null,null).exports},2014:(e,t,r)=>{"use strict";r.d(t,{Z:()=>ge});var s=r(7757),n=r.n(s),i=r(2242),o=r(6386),a=r(7389);function l(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return c(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,s=new Array(t);r100?100:this.finalValue))}}};var d=r(1900);const f=(0,d.Z)(u,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"bg-white shadow min-h-2/5-screen w-6/7-screen md:w-3/5-screen lg:w-3/5-screen xl:w-2/5-screen relative",attrs:{id:"discount-popup"}},[r("div",{staticClass:"flex-shrink-0 py-2 border-b border-gray-200"},["product"===e.type?r("h1",{staticClass:"text-xl font-bold text-gray-700 text-center"},[e._v(e._s(e.__("Product Discount")))]):e._e(),e._v(" "),"cart"===e.type?r("h1",{staticClass:"text-xl font-bold text-gray-700 text-center"},[e._v(e._s(e.__("Cart Discount")))]):e._e()]),e._v(" "),r("div",{staticClass:"h-16 bg-gray-800 text-white border-gray-200 flex items-center justify-center",attrs:{id:"screen"}},[r("h1",{staticClass:"font-bold text-3xl"},["flat"===e.mode?r("span",[e._v(e._s(e._f("currency")(e.finalValue)))]):e._e(),e._v(" "),"percentage"===e.mode?r("span",[e._v(e._s(e.finalValue)+"%")]):e._e()])]),e._v(" "),r("div",{staticClass:"flex",attrs:{id:"switch-mode"}},[r("button",{staticClass:"outline-none w-1/2 py-2 flex items-center justify-center",class:"flat"===e.mode?"bg-gray-800 text-white":"",on:{click:function(t){return e.setPercentageType("flat")}}},[e._v(e._s(e.__("Flat")))]),e._v(" "),r("hr",{staticClass:"border-r border-gray-200"}),e._v(" "),r("button",{staticClass:"outline-none w-1/2 py-2 flex items-center justify-center",class:"percentage"===e.mode?"bg-gray-800 text-white":"",on:{click:function(t){return e.setPercentageType("percentage")}}},[e._v(e._s(e.__("Percentage")))])]),e._v(" "),r("div",{staticClass:"grid grid-flow-row grid-cols-3 grid-rows-3",attrs:{id:"numpad"}},e._l(e.keys,(function(t,s){return r("div",{key:s,staticClass:"hover:bg-blue-400 hover:text-white hover:border-blue-600 text-xl font-bold border border-gray-200 h-24 flex items-center justify-center cursor-pointer",on:{click:function(r){return e.inputValue(t)}}},[void 0!==t.value?r("span",[e._v(e._s(t.value))]):e._e(),e._v(" "),t.icon?r("i",{staticClass:"las",class:t.icon}):e._e()])})),0)])}),[],!1,null,null,null).exports;var p=r(419);function h(e){return function(e){if(Array.isArray(e))return v(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return v(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return v(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,s=new Array(t);r100?100:this.backValue))),"0"===this.backValue&&(this.backValue="")}}};const m=(0,d.Z)(b,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"h-full w-full py-2"},[e.order?r("div",{staticClass:"px-2 pb-2"},[r("div",{staticClass:"grid grid-cols-2 gap-2"},[r("div",{staticClass:"h-16 flex justify-between items-center bg-blue-400 text-white text-xl md:text-3xl p-2",attrs:{id:"details"}},[r("span",[e._v(e._s(e.__("Total"))+" : ")]),e._v(" "),r("span",[e._v(e._s(e._f("currency")(e.order.total)))])]),e._v(" "),r("div",{staticClass:"cursor-pointer h-16 flex justify-between items-center bg-red-400 text-white text-xl md:text-3xl p-2",attrs:{id:"discount"},on:{click:function(t){return e.toggleDiscount()}}},[r("span",[e._v(e._s(e.__("Discount"))+" : ")]),e._v(" "),r("span",[e._v(e._s(e._f("currency")(e.order.discount)))])]),e._v(" "),r("div",{staticClass:"h-16 flex justify-between items-center bg-green-400 text-white text-xl md:text-3xl p-2",attrs:{id:"paid"}},[r("span",[e._v(e._s(e.__("Paid"))+" : ")]),e._v(" "),r("span",[e._v(e._s(e._f("currency")(e.order.tendered)))])]),e._v(" "),r("div",{staticClass:"h-16 flex justify-between items-center bg-teal-400 text-white text-xl md:text-3xl p-2",attrs:{id:"change"}},[r("span",[e._v(e._s(e.__("Change"))+" : ")]),e._v(" "),r("span",[e._v(e._s(e._f("currency")(e.order.change)))])]),e._v(" "),r("div",{staticClass:"col-span-2 h-16 flex justify-between items-center bg-gray-300 text-gray-800 text-xl md:text-3xl p-2",attrs:{id:"change"}},[r("span",[e._v(e._s(e.__("Screen"))+" : ")]),e._v(" "),r("span",[e._v(e._s(e._f("currency")(e.backValue/e.number)))])])])]):e._e(),e._v(" "),r("div",{staticClass:"px-2 pb-2"},[r("div",{staticClass:"-mx-2 flex flex-wrap"},[r("div",{staticClass:"pl-2 pr-1 flex-auto"},[r("div",{staticClass:"grid grid-flow-row grid-cols-3 gap-2 grid-rows-3",staticStyle:{padding:"1px"},attrs:{id:"numpad"}},[e._l(e.keys,(function(t,s){return r("div",{key:s,staticClass:"hover:bg-gray-400 hover:text-gray-800 bg-gray-300 text-2xl text-gray-700 border h-16 flex items-center justify-center cursor-pointer",staticStyle:{margin:"-1px"},on:{click:function(r){return e.inputValue(t)}}},[void 0!==t.value?r("span",[e._v(e._s(t.value))]):e._e(),e._v(" "),t.icon?r("i",{staticClass:"las",class:t.icon}):e._e()])})),e._v(" "),r("div",{staticClass:"hover:bg-green-500 col-span-3 bg-green-400 text-2xl text-white border h-16 flex items-center justify-center cursor-pointer",on:{click:function(t){return e.makeFullPayment()}}},[e._v("\n "+e._s(e.__("Full Payment")))])],2)]),e._v(" "),r("div",{staticClass:"w-1/2 md:w-72 pr-2 pl-1"},[r("div",{staticClass:"grid grid-flow-row grid-rows-1 gap-2"},[r("div",{staticClass:"hover:bg-gray-400 hover:text-gray-800 bg-gray-300 text-2xl text-gray-700 border h-16 flex items-center justify-center cursor-pointer",on:{click:function(t){return e.increaseBy({value:100})}}},[r("span",[e._v(e._s(e._f("currency")(100)))])]),e._v(" "),r("div",{staticClass:"hover:bg-gray-400 hover:text-gray-800 bg-gray-300 text-2xl text-gray-700 border h-16 flex items-center justify-center cursor-pointer",on:{click:function(t){return e.increaseBy({value:500})}}},[r("span",[e._v(e._s(e._f("currency")(500)))])]),e._v(" "),r("div",{staticClass:"hover:bg-gray-400 hover:text-gray-800 bg-gray-300 text-2xl text-gray-700 border h-16 flex items-center justify-center cursor-pointer",on:{click:function(t){return e.increaseBy({value:1e3})}}},[r("span",[e._v(e._s(e._f("currency")(1e3)))])])])])])])])}),[],!1,null,null,null).exports,g={name:"cash-payment",props:["identifier","label"],components:{samplePayment:m}};const _=(0,d.Z)(g,(function(){var e=this,t=e.$createElement;return(e._self._c||t)("sample-payment",{attrs:{identifier:e.identifier,label:e.label},on:{submit:function(t){return e.$emit("submit")}}})}),[],!1,null,null,null).exports;const y={name:"creditcart-payment",props:["identifier"]};const x=(0,d.Z)(y,(function(){var e=this,t=e.$createElement;return(e._self._c||t)("h1",[e._v("Credit Card")])}),[],!1,null,null,null).exports;const w={name:"bank-payment",props:["identifier","label"],components:{samplePayment:m}};const C=(0,d.Z)(w,(function(){var e=this,t=e.$createElement;return(e._self._c||t)("sample-payment",{attrs:{identifier:e.identifier,label:e.label},on:{submit:function(t){return e.$emit("submit")}}})}),[],!1,null,null,null).exports;var k=r(3968),j=r(162);const S={name:"ns-account-payment",components:{nsNumpad:k.Z},props:["identifier","label"],data:function(){return{subscription:null,screenValue:0,order:null}},methods:{__:a.__,handleChange:function(e){this.screenValue=e},proceedAddingPayment:function(e){var t=parseFloat(e),r=this.order.payments;return t<=0?j.kX.error((0,a.__)("Please provide a valid payment amount.")).subscribe():r.filter((function(e){return"account-payment"===e.identifier})).length>0?j.kX.error((0,a.__)("The customer account can only be used once per order. Consider deleting the previously used payment.")).subscribe():t>this.order.customer.account_amount?j.kX.error((0,a.__)("Not enough funds to add {amount} as a payment. Available balance {balance}.").replace("{amount}",this.$options.filters.currency(t)).replace("{balance}",this.$options.filters.currency(this.order.customer.account_amount))).subscribe():(POS.addPayment({value:t,identifier:"account-payment",selected:!1,label:this.label,readonly:!1}),this.order.customer.account_amount-=t,POS.selectCustomer(this.order.customer),void this.$emit("submit"))},proceedFullPayment:function(){this.proceedAddingPayment(this.order.total)},makeFullPayment:function(){var e=this;Popup.show(p.Z,{title:(0,a.__)("Confirm Full Payment"),message:(0,a.__)("You're about to use {amount} from the customer account to make a payment. Would you like to proceed ?").replace("{amount}",this.$options.filters.currency(this.order.total)),onAction:function(t){t&&e.proceedFullPayment()}})}},mounted:function(){var e=this;this.subscription=POS.order.subscribe((function(t){return e.order=t}))},destroyed:function(){this.subscription.unsubscribe()}};const P=(0,d.Z)(S,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"h-full w-full py-2"},[e.order?r("div",{staticClass:"px-2 pb-2"},[r("div",{staticClass:"grid grid-cols-2 gap-2"},[r("div",{staticClass:"h-16 flex justify-between items-center bg-blue-400 text-white text-xl md:text-3xl p-2",attrs:{id:"details"}},[r("span",[e._v(e._s(e.__("Total"))+" : ")]),e._v(" "),r("span",[e._v(e._s(e._f("currency")(e.order.total)))])]),e._v(" "),r("div",{staticClass:"cursor-pointer h-16 flex justify-between items-center bg-red-400 text-white text-xl md:text-3xl p-2",attrs:{id:"discount"},on:{click:function(t){return e.toggleDiscount()}}},[r("span",[e._v(e._s(e.__("Discount"))+" : ")]),e._v(" "),r("span",[e._v(e._s(e._f("currency")(e.order.discount)))])]),e._v(" "),r("div",{staticClass:"h-16 flex justify-between items-center bg-green-400 text-white text-xl md:text-3xl p-2",attrs:{id:"paid"}},[r("span",[e._v(e._s(e.__("Paid"))+" : ")]),e._v(" "),r("span",[e._v(e._s(e._f("currency")(e.order.tendered)))])]),e._v(" "),r("div",{staticClass:"h-16 flex justify-between items-center bg-teal-400 text-white text-xl md:text-3xl p-2",attrs:{id:"change"}},[r("span",[e._v(e._s(e.__("Change"))+" : ")]),e._v(" "),r("span",[e._v(e._s(e._f("currency")(e.order.change)))])]),e._v(" "),r("div",{staticClass:"col-span-2 h-16 flex justify-between items-center bg-blue-400 text-white text-xl md:text-3xl p-2",attrs:{id:"change"}},[r("span",[e._v(e._s(e.__("Current Balance"))+" : ")]),e._v(" "),r("span",[e._v(e._s(e._f("currency")(e.order.customer.account_amount)))])]),e._v(" "),r("div",{staticClass:"col-span-2 h-16 flex justify-between items-center bg-gray-300 text-gray-800 text-xl md:text-3xl p-2",attrs:{id:"change"}},[r("span",[e._v(e._s(e.__("Screen"))+" : ")]),e._v(" "),r("span",[e._v(e._s(e._f("currency")(e.screenValue)))])])])]):e._e(),e._v(" "),r("div",{staticClass:"px-2 pb-2"},[r("div",{staticClass:"-mx-2 flex flex-wrap"},[r("div",{staticClass:"pl-2 pr-1 flex-auto"},[r("ns-numpad",{attrs:{floating:!0},on:{changed:function(t){return e.handleChange(t)},next:function(t){return e.proceedAddingPayment(t)}},scopedSlots:e._u([{key:"numpad-footer",fn:function(){return[r("div",{staticClass:"hover:bg-green-500 col-span-3 bg-green-400 text-2xl text-white border h-16 flex items-center justify-center cursor-pointer",on:{click:function(t){return e.makeFullPayment()}}},[e._v("\n "+e._s(e.__("Full Payment")))])]},proxy:!0}])})],1),e._v(" "),r("div",{staticClass:"w-1/2 md:w-72 pr-2 pl-1"},[r("div",{staticClass:"grid grid-flow-row grid-rows-1 gap-2"},[r("div",{staticClass:"hover:bg-gray-400 hover:text-gray-800 bg-gray-300 text-2xl text-gray-700 border h-16 flex items-center justify-center cursor-pointer",on:{click:function(t){return e.increaseBy({value:100})}}},[r("span",[e._v(e._s(e._f("currency")(100)))])]),e._v(" "),r("div",{staticClass:"hover:bg-gray-400 hover:text-gray-800 bg-gray-300 text-2xl text-gray-700 border h-16 flex items-center justify-center cursor-pointer",on:{click:function(t){return e.increaseBy({value:500})}}},[r("span",[e._v(e._s(e._f("currency")(500)))])]),e._v(" "),r("div",{staticClass:"hover:bg-gray-400 hover:text-gray-800 bg-gray-300 text-2xl text-gray-700 border h-16 flex items-center justify-center cursor-pointer",on:{click:function(t){return e.increaseBy({value:1e3})}}},[r("span",[e._v(e._s(e._f("currency")(1e3)))])])])])])])])}),[],!1,null,null,null).exports;var O=r(1957);function $(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,s)}return r}function T(e){for(var t=1;t0&&e[0]},expectedPayment:function(){var e=this.order.customer.group.minimal_credit_payment;return this.order.total*e/100}},mounted:function(){var e=this;this.$popup.event.subscribe((function(t){switch(t.event){case"click-overlay":e.closePopup()}})),this.order=this.$popupParams.order,this.paymentTypesSubscription=POS.paymentsType.subscribe((function(t){e.paymentsType=t,t.filter((function(e){e.selected&&POS.selectedPaymentType.next(e)}))}))},watch:{activePayment:function(e){this.loadPaymentComponent(e)}},destroyed:function(){this.paymentTypesSubscription.unsubscribe()},methods:{__:a.__,resolveIfQueued:o.Z,loadPaymentComponent:function(e){switch(e.identifier){case"cash-payment":this.currentPaymentComponent=_;break;case"creditcard-payment":this.currentPaymentComponent=x;break;case"bank-payment":this.currentPaymentComponent=C;break;case"account-payment":this.currentPaymentComponent=P;break;default:this.currentPaymentComponent=m}},select:function(e){this.showPayment=!1,POS.setPaymentActive(e)},closePopup:function(){this.$popup.close(),POS.selectedPaymentType.next(null)},deletePayment:function(e){POS.removePayment(e)},selectPaymentAsActive:function(e){this.select(this.paymentsType.filter((function(t){return t.identifier===e.target.value}))[0])},submitOrder:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=i.G.show(O.Z);try{var s=T(T({},POS.order.getValue()),t);POS.submitOrder(s).then((function(t){r.close(),j.kX.success(t.message).subscribe(),POS.printOrder(t.data.order.id),e.$popup.close()}),(function(e){r.close(),j.kX.error(e.message).subscribe()}))}catch(e){r.close(),j.kX.error(error.message).subscribe()}}}};const A=(0,d.Z)(V,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return e.order?r("div",{staticClass:"w-screen h-screen p-4 flex overflow-hidden"},[r("div",{staticClass:"flex flex-col flex-auto lg:flex-row bg-white shadow-xl"},[r("div",{staticClass:"w-full lg:w-56 bg-gray-300 lg:h-full flex justify-between px-2 lg:px-0 lg:block items-center lg:items-start"},[r("h3",{staticClass:"text-xl text-center my-4 font-bold lg:my-8 text-gray-700"},[e._v(e._s(e.__("Payments Gateway")))]),e._v(" "),r("ul",{staticClass:"hidden lg:block"},[e._l(e.paymentsType,(function(t){return r("li",{key:t.identifier,staticClass:"cursor-pointer hover:bg-gray-400 py-2 px-3",class:t.selected&&!e.showPayment?"bg-white text-gray-800":"text-gray-700",on:{click:function(r){return e.select(t)}}},[e._v(e._s(t.label))])})),e._v(" "),r("li",{staticClass:"cursor-pointer text-gray-700 hover:bg-gray-400 py-2 px-3 border-t border-gray-400 mt-4 flex items-center justify-between",class:e.showPayment?"bg-white text-gray-800":"text-gray-700",on:{click:function(t){e.showPayment=!0}}},[r("span",[e._v(e._s(e.__("Payment List")))]),e._v(" "),r("span",{staticClass:"px-2 rounded-full h-8 w-8 flex items-center justify-center bg-green-500 text-white"},[e._v(e._s(e.order.payments.length))])])],2),e._v(" "),r("ns-close-button",{staticClass:"lg:hidden",on:{click:function(t){return e.closePopup()}}})],1),e._v(" "),r("div",{staticClass:"overflow-hidden flex flex-col flex-auto"},[r("div",{staticClass:"flex flex-col flex-auto overflow-hidden"},[r("div",{staticClass:"h-12 bg-gray-300 hidden items-center justify-between lg:flex"},[r("div"),e._v(" "),r("div",{staticClass:"px-2"},[r("ns-close-button",{on:{click:function(t){return e.closePopup()}}})],1)]),e._v(" "),e.showPayment?e._e():r("div",{staticClass:"flex flex-auto overflow-y-auto"},[r(e.currentPaymentComponent,{tag:"component",attrs:{label:e.activePayment.label,identifier:e.activePayment.identifier},on:{submit:function(t){return e.submitOrder()}}})],1),e._v(" "),e.showPayment?r("div",{staticClass:"flex flex-auto overflow-y-auto p-2 flex-col"},[r("h3",{staticClass:"text-center font-bold py-2 text-gray-700"},[e._v(e._s(e.__("List Of Payments")))]),e._v(" "),r("ul",{staticClass:"flex-auto"},[0===e.order.payments.length?r("li",{staticClass:"p-2 bg-gray-200 flex justify-center mb-2 items-center"},[r("h3",{staticClass:"font-semibold"},[e._v(e._s(e.__("No Payment added.")))])]):e._e(),e._v(" "),e._l(e.order.payments,(function(t,s){return r("li",{key:s,staticClass:"p-2 bg-gray-200 flex justify-between mb-2 items-center"},[r("span",[e._v(e._s(t.label))]),e._v(" "),r("div",{staticClass:"flex items-center"},[r("span",[e._v(e._s(e._f("currency")(t.value)))]),e._v(" "),r("button",{staticClass:"rounded-full bg-red-400 h-8 w-8 flex items-center justify-center text-white ml-2",on:{click:function(r){return e.deletePayment(t)}}},[r("i",{staticClass:"las la-trash-alt"})])])])}))],2)]):e._e()]),e._v(" "),r("div",{staticClass:"flex flex-col lg:flex-row w-full bg-gray-300 justify-between p-2"},[r("div",{staticClass:"flex mb-1"},[r("div",{staticClass:"flex items-center lg:hidden"},[r("h3",{staticClass:"font-semibold mr-2"},[e._v(e._s(e.__("Select Payment")))]),e._v(" "),r("select",{staticClass:"p-2 rounded border-2 border-blue-400 bg-white shadow",on:{change:function(t){return e.selectPaymentAsActive(t)}}},[r("option",{attrs:{value:""}},[e._v(e._s(e.__("Choose Payment")))]),e._v(" "),e._l(e.paymentsType,(function(t){return r("option",{key:t.identifier,domProps:{selected:e.activePayment.identifier===t.identifier,value:t.identifier},on:{click:function(r){return e.select(t)}}},[e._v(e._s(t.label))])}))],2)])]),e._v(" "),r("div",{staticClass:"flex justify-end"},[e.order.tendered>=e.order.total?r("ns-button",{attrs:{type:e.order.tendered>=e.order.total?"success":"info"},on:{click:function(t){return e.submitOrder()}}},[r("span",[r("i",{staticClass:"las la-cash-register"}),e._v(" "+e._s(e.__("Submit Payment")))])]):e._e(),e._v(" "),e.order.tendered=e.order.total?"success":"info"},on:{click:function(t){return e.submitOrder({payment_status:"unpaid"})}}},[r("span",[r("i",{staticClass:"las la-bookmark"}),e._v(" "+e._s(e.__("Layaway"))+" — "+e._s(e._f("currency")(e.expectedPayment)))])]):e._e()],1)])])])]):e._e()}),[],!1,null,null,null).exports;r(9531);var D=r(279),F=r(3625),Z=r(4326);function q(e,t){for(var r=0;r0&&void 0!==e[0]?e[0]:"settings",r.prev=1,r.next=4,new Promise((function(e,r){var n=t.order.taxes,o=t.order.tax_group_id,a=t.order.tax_type;i.G.show(te,{resolve:e,reject:r,taxes:n,tax_group_id:o,tax_type:a,activeTab:s})}));case 4:o=r.sent,a=pe(pe({},t.order),o),POS.order.next(a),POS.refreshCart(),r.next=13;break;case 10:r.prev=10,r.t0=r.catch(1),console.log(r.t0);case 13:case"end":return r.stop()}}),r,null,[[1,10]])})))()},openTaxSummary:function(){this.selectTaxGroup("summary")},voidOngoingOrder:function(){POS.voidOrder(this.order)},holdOrder:function(){var e=this;return be(n().mark((function t(){var r,s,o;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!("hold"!==e.order.payment_status&&e.order.payments.length>0)){t.next=2;break}return t.abrupt("return",j.kX.error("Unable to hold an order which payment status has been updated already.").subscribe());case 2:r=j.kq.applyFilters("ns-hold-queue",[I,L,X]),t.t0=n().keys(r);case 4:if((t.t1=t.t0()).done){t.next=18;break}return s=t.t1.value,t.prev=6,o=new r[s](e.order),t.next=10,o.run();case 10:t.sent,t.next=16;break;case 13:return t.prev=13,t.t2=t.catch(6),t.abrupt("return",!1);case 16:t.next=4;break;case 18:j.kq.applyFilters("ns-override-hold-popup",(function(){new Promise((function(t,r){i.G.show(B,{resolve:t,reject:r,order:e.order})})).then((function(t){e.order.title=t.title,e.order.payment_status="hold",POS.order.next(e.order);var r=i.G.show(O.Z);POS.submitOrder().then((function(e){r.close(),j.kX.success(e.message).subscribe()}),(function(e){r.close(),j.kX.error(e.message).subscribe()}))}))}))();case 20:case"end":return t.stop()}}),t,null,[[6,13]])})))()},openDiscountPopup:function(e,t){return this.settings.products_discount||"product"!==t?this.settings.cart_discount||"cart"!==t?void i.G.show(f,{reference:e,type:t,onSubmit:function(r){"product"===t?POS.updateProduct(e,r):"cart"===t&&POS.updateCart(e,r)}},{popupClass:"bg-white h:2/3 shadow-lg xl:w-1/4 lg:w-2/5 md:w-2/3 w-full"}):j.kX.error("You're not allowed to add a discount on the cart.").subscribe():j.kX.error("You're not allowed to add a discount on the product.").subscribe()},selectCustomer:function(){i.G.show(Z.Z)},toggleMode:function(e){"normal"===e.mode?i.G.show(p.Z,{title:"Enable WholeSale Price",message:"Would you like to switch to wholesale price ?",onAction:function(t){t&&POS.updateProduct(e,{mode:"wholesale"})}}):i.G.show(p.Z,{title:"Enable Normal Price",message:"Would you like to switch to normal price ?",onAction:function(t){t&&POS.updateProduct(e,{mode:"normal"})}})},remove:function(e){i.G.show(p.Z,{title:"Confirm Your Action",message:"Would you like to delete this product ?",onAction:function(t){t&&POS.removeProduct(e)}})},changeQuantity:function(e){new D.$(e).run({unit_quantity_id:e.unit_quantity_id,unit_name:e.unit_name,$quantities:e.$quantities}).then((function(t){POS.updateProduct(e,t)}))},payOrder:function(){var e=this;return be(n().mark((function t(){var r,s,i;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=[I,L,X,z],t.t0=n().keys(r);case 2:if((t.t1=t.t0()).done){t.next=16;break}return s=t.t1.value,t.prev=4,i=new r[s](e.order),t.next=8,i.run();case 8:t.sent,t.next=14;break;case 11:return t.prev=11,t.t2=t.catch(4),t.abrupt("return",!1);case 14:t.next=2;break;case 16:case"end":return t.stop()}}),t,null,[[4,11]])})))()},openOrderType:function(){i.G.show(F.Z)},openShippingPopup:function(){i.G.show(H.Z)}}};const ge=(0,d.Z)(me,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"flex-auto flex flex-col",attrs:{id:"pos-cart"}},["cart"===e.visibleSection?r("div",{staticClass:"flex pl-2",attrs:{id:"tools"}},[r("div",{staticClass:"flex cursor-pointer rounded-tl-lg rounded-tr-lg px-3 py-2 bg-white font-semibold text-gray-700",on:{click:function(t){return e.switchTo("cart")}}},[r("span",[e._v(e._s(e.__("Cart")))]),e._v(" "),e.order?r("span",{staticClass:"flex items-center justify-center text-sm rounded-full h-6 w-6 bg-green-500 text-white ml-1"},[e._v(e._s(e.order.products.length))]):e._e()]),e._v(" "),r("div",{staticClass:"cursor-pointer rounded-tl-lg rounded-tr-lg px-3 py-2 bg-gray-300 border-t border-r border-l border-gray-300 text-gray-600",on:{click:function(t){return e.switchTo("grid")}}},[e._v("\n "+e._s(e.__("Products"))+"\n ")])]):e._e(),e._v(" "),r("div",{staticClass:"rounded shadow bg-white flex-auto flex overflow-hidden"},[r("div",{staticClass:"cart-table flex flex-auto flex-col overflow-hidden"},[r("div",{staticClass:"w-full p-2 border-b border-gray-300",attrs:{id:"cart-toolbox"}},[r("div",{staticClass:"border border-gray-300 rounded overflow-hidden"},[r("div",{staticClass:"flex flex-wrap"},[r("div",[r("button",{staticClass:"w-full h-10 px-3 bg-gray-200 border-r border-gray-300 outline-none",on:{click:function(t){return e.openNotePopup()}}},[r("i",{staticClass:"las la-comment"}),e._v(" "),r("span",{staticClass:"ml-1 hidden md:inline-block"},[e._v(e._s(e.__("Comments")))])])]),e._v(" "),r("div",[r("button",{staticClass:"w-full h-10 px-3 bg-gray-200 border-r border-gray-300 outline-none flex items-center",on:{click:function(t){return e.selectTaxGroup()}}},[r("i",{staticClass:"las la-balance-scale-left"}),e._v(" "),r("span",{staticClass:"ml-1 hidden md:inline-block"},[e._v(e._s(e.__("Taxes")))]),e._v(" "),e.order.taxes&&e.order.taxes.length>0?r("span",{staticClass:"ml-1 rounded-full flex items-center justify-center h-6 w-6 bg-blue-400 text-white"},[e._v(e._s(e.order.taxes.length))]):e._e()])]),e._v(" "),r("div",[r("button",{staticClass:"w-full h-10 px-3 bg-gray-200 border-r border-gray-300 outline-none flex items-center",on:{click:function(t){return e.selectCoupon()}}},[r("i",{staticClass:"las la-tags"}),e._v(" "),r("span",{staticClass:"ml-1 hidden md:inline-block"},[e._v(e._s(e.__("Coupons")))]),e._v(" "),e.order.coupons&&e.order.coupons.length>0?r("span",{staticClass:"ml-1 rounded-full flex items-center justify-center h-6 w-6 bg-blue-400 text-white"},[e._v(e._s(e.order.coupons.length))]):e._e()])]),e._v(" "),r("div",[r("button",{staticClass:"w-full h-10 px-3 bg-gray-200 border-r border-gray-300 outline-none flex items-center",on:{click:function(t){return e.defineOrderSettings()}}},[r("i",{staticClass:"las la-tools"}),e._v(" "),r("span",{staticClass:"ml-1 hidden md:inline-block"},[e._v(e._s(e.__("Settings")))])])]),e._v(" "),r("div",[r("button",{staticClass:"w-full h-10 px-3 bg-gray-200 border-r border-gray-300 outline-none flex items-center",on:{click:function(t){return e.openAddQuickProduct()}}},[r("i",{staticClass:"las la-plus"}),e._v(" "),r("span",{staticClass:"ml-1 hidden md:inline-block"},[e._v(e._s(e.__("Product")))])])])])])]),e._v(" "),r("div",{staticClass:"w-full text-gray-700 font-semibold flex",attrs:{id:"cart-table-header"}},[r("div",{staticClass:"w-full lg:w-4/6 p-2 border border-l-0 border-t-0 border-gray-200 bg-gray-100"},[e._v(e._s(e.__("Product")))]),e._v(" "),r("div",{staticClass:"hidden lg:flex lg:w-1/6 p-2 border-b border-t-0 border-gray-200 bg-gray-100"},[e._v(e._s(e.__("Quantity")))]),e._v(" "),r("div",{staticClass:"hidden lg:flex lg:w-1/6 p-2 border border-r-0 border-t-0 border-gray-200 bg-gray-100"},[e._v(e._s(e.__("Total")))])]),e._v(" "),r("div",{staticClass:"flex flex-auto flex-col overflow-auto",attrs:{id:"cart-products-table"}},[0===e.products.length?r("div",{staticClass:"text-gray-700 flex"},[r("div",{staticClass:"w-full text-center py-4 border-b border-gray-200"},[r("h3",{staticClass:"text-gray-600"},[e._v(e._s(e.__("No products added...")))])])]):e._e(),e._v(" "),e._l(e.products,(function(t,s){return r("div",{key:t.barcode,staticClass:"text-gray-700 flex",attrs:{"product-index":s}},[r("div",{staticClass:"w-full lg:w-4/6 p-2 border border-l-0 border-t-0 border-gray-200"},[r("div",{staticClass:"flex justify-between product-details mb-1"},[r("h3",{staticClass:"font-semibold"},[e._v("\n "+e._s(t.name)+" — "+e._s(t.unit_name)+"\n ")]),e._v(" "),r("div",{staticClass:"-mx-1 flex product-options"},[r("div",{staticClass:"px-1"},[r("a",{staticClass:"hover:text-red-400 cursor-pointer outline-none border-dashed py-1 border-b border-red-400 text-sm",on:{click:function(r){return e.remove(t)}}},[r("i",{staticClass:"las la-trash text-xl"})])]),e._v(" "),r("div",{staticClass:"px-1"},[r("a",{staticClass:"hover:text-blue-600 cursor-pointer outline-none border-dashed py-1 border-b text-sm",class:"wholesale"===t.mode?"text-green-600 border-green-600":"border-blue-400",on:{click:function(r){return e.toggleMode(t)}}},[r("i",{staticClass:"las la-award text-xl"})])])])]),e._v(" "),r("div",{staticClass:"flex justify-between product-controls"},[r("div",{staticClass:"-mx-1 flex flex-wrap"},[r("div",{staticClass:"px-1 w-1/2 md:w-auto mb-1"},[r("a",{staticClass:"cursor-pointer outline-none border-dashed py-1 border-b text-sm",class:"wholesale"===t.mode?"text-green-600 hover:text-green-700 border-green-600":"hover:text-blue-400 border-blue-400",on:{click:function(r){return e.changeProductPrice(t)}}},[e._v(e._s(e.__("Price"))+" : "+e._s(e._f("currency")(t.unit_price)))])]),e._v(" "),r("div",{staticClass:"px-1 w-1/2 md:w-auto mb-1"},[r("a",{staticClass:"hover:text-blue-400 cursor-pointer outline-none border-dashed py-1 border-b border-blue-400 text-sm",on:{click:function(r){return e.openDiscountPopup(t,"product")}}},[e._v(e._s(e.__("Discount"))+" "),"percentage"===t.discount_type?r("span",[e._v(e._s(t.discount_percentage)+"%")]):e._e(),e._v(" : "+e._s(e._f("currency")(t.discount)))])]),e._v(" "),r("div",{staticClass:"px-1 w-1/2 md:w-auto mb-1 lg:hidden"},[r("a",{staticClass:"hover:text-blue-400 cursor-pointer outline-none border-dashed py-1 border-b border-blue-400 text-sm",on:{click:function(r){return e.changeQuantity(t)}}},[e._v(e._s(e.__("Quantity :"))+" "+e._s(t.quantity))])]),e._v(" "),r("div",{staticClass:"px-1 w-1/2 md:w-auto mb-1 lg:hidden"},[r("span",{staticClass:"hover:text-blue-400 cursor-pointer outline-none border-dashed py-1 border-b border-blue-400 text-sm"},[e._v(e._s(e.__("Total :"))+" "+e._s(e._f("currency")(t.total_price)))])])])])]),e._v(" "),r("div",{staticClass:"hidden lg:flex w-1/6 p-2 border-b border-gray-200 items-center justify-center cursor-pointer hover:bg-blue-100",on:{click:function(r){return e.changeQuantity(t)}}},[r("span",{staticClass:"border-b border-dashed border-blue-400 p-2"},[e._v(e._s(t.quantity))])]),e._v(" "),r("div",{staticClass:"hidden lg:flex w-1/6 p-2 border border-r-0 border-t-0 border-gray-200 items-center justify-center"},[e._v(e._s(e._f("currency")(t.total_price)))])])}))],2),e._v(" "),r("div",{staticClass:"flex",attrs:{id:"cart-products-summary"}},["both"===e.visibleSection?r("table",{staticClass:"table w-full text-sm text-gray-700"},[r("tr",[r("td",{staticClass:"border border-gray-300 p-2",attrs:{width:"200"}},[r("a",{staticClass:"hover:text-blue-400 cursor-pointer outline-none border-dashed py-1 border-b border-blue-400 text-sm",on:{click:function(t){return e.selectCustomer()}}},[e._v("Customer : "+e._s(e.customerName))])]),e._v(" "),r("td",{staticClass:"border border-gray-300 p-2",attrs:{width:"200"}},[e._v(e._s(e.__("Sub Total")))]),e._v(" "),r("td",{staticClass:"border border-gray-300 p-2 text-right",attrs:{width:"200"}},[e._v(e._s(e._f("currency")(e.order.subtotal)))])]),e._v(" "),r("tr",[r("td",{staticClass:"border border-gray-300 p-2",attrs:{width:"200"}},[r("a",{staticClass:"hover:text-blue-400 cursor-pointer outline-none border-dashed py-1 border-b border-blue-400 text-sm",on:{click:function(t){return e.openOrderType()}}},[e._v(e._s(e.__("Type :"))+" "+e._s(e.selectedType))])]),e._v(" "),r("td",{staticClass:"border border-gray-300 p-2",attrs:{width:"200"}},[r("span",[e._v(e._s(e.__("Discount")))]),e._v(" "),"percentage"===e.order.discount_type?r("span",[e._v("("+e._s(e.order.discount_percentage)+"%)")]):e._e(),e._v(" "),"flat"===e.order.discount_type?r("span",[e._v("("+e._s(e.__("Flat"))+")")]):e._e()]),e._v(" "),r("td",{staticClass:"border border-gray-300 p-2 text-right",attrs:{width:"200"}},[r("a",{staticClass:"hover:text-blue-400 cursor-pointer outline-none border-dashed py-1 border-b border-blue-400 text-sm",on:{click:function(t){return e.openDiscountPopup(e.order,"cart")}}},[e._v(e._s(e._f("currency")(e.order.discount)))])])]),e._v(" "),e.order.type&&"delivery"===e.order.type.identifier?r("tr",[r("td",{staticClass:"border border-gray-300 p-2",attrs:{width:"200"}}),e._v(" "),r("td",{staticClass:"border border-gray-300 p-2",attrs:{width:"200"}},[r("a",{staticClass:"hover:text-blue-400 cursor-pointer outline-none border-dashed py-1 border-b border-blue-400 text-sm",on:{click:function(t){return e.openShippingPopup()}}},[e._v(e._s(e.__("Shipping")))])]),e._v(" "),r("td",{staticClass:"border border-gray-300 p-2 text-right",attrs:{width:"200"}},[e._v(e._s(e._f("currency")(e.order.shipping)))])]):e._e(),e._v(" "),r("tr",{staticClass:"bg-green-200"},[r("td",{staticClass:"border border-gray-300 p-2",attrs:{width:"200"}},[e.order?r("a",{staticClass:"hover:text-blue-400 cursor-pointer outline-none border-dashed py-1 border-b border-blue-400 text-sm",on:{click:function(t){return e.openTaxSummary()}}},[e._v("Tax : "+e._s(e._f("currency")(e.order.tax_value)))]):e._e()]),e._v(" "),r("td",{staticClass:"border border-gray-300 p-2",attrs:{width:"200"}},[e._v(e._s(e.__("Total")))]),e._v(" "),r("td",{staticClass:"border border-gray-300 p-2 text-right",attrs:{width:"200"}},[e._v(e._s(e._f("currency")(e.order.total)))])])]):e._e(),e._v(" "),"cart"===e.visibleSection?r("table",{staticClass:"table w-full text-sm text-gray-700"},[r("tr",[r("td",{staticClass:"border border-gray-300 p-2",attrs:{width:"200"}},[r("a",{staticClass:"hover:text-blue-400 cursor-pointer outline-none border-dashed py-1 border-b border-blue-400 text-sm",on:{click:function(t){return e.selectCustomer()}}},[e._v(e._s(e.__("Customer :"))+" "+e._s(e.customerName))])]),e._v(" "),r("td",{staticClass:"border border-gray-300 p-2",attrs:{width:"200"}},[r("div",{staticClass:"flex justify-between"},[r("span",[e._v(e._s(e.__("Sub Total")))]),e._v(" "),r("span",[e._v(e._s(e._f("currency")(e.order.subtotal)))])])])]),e._v(" "),r("tr",[r("td",{staticClass:"border border-gray-300 p-2",attrs:{width:"200"}},[r("a",{staticClass:"hover:text-blue-400 cursor-pointer outline-none border-dashed py-1 border-b border-blue-400 text-sm",on:{click:function(t){return e.openOrderType()}}},[e._v(e._s(e.__("Type :"))+" "+e._s(e.selectedType))])]),e._v(" "),r("td",{staticClass:"border border-gray-300 p-2",attrs:{width:"200"}},[r("div",{staticClass:"flex justify-between items-center"},[r("p",[r("span",[e._v(e._s(e.__("Discount")))]),e._v(" "),"percentage"===e.order.discount_type?r("span",[e._v("("+e._s(e.order.discount_percentage)+"%)")]):e._e(),e._v(" "),"flat"===e.order.discount_type?r("span",[e._v("("+e._s(e.__("Flat"))+")")]):e._e()]),e._v(" "),r("a",{staticClass:"hover:text-blue-400 cursor-pointer outline-none border-dashed py-1 border-b border-blue-400 text-sm",on:{click:function(t){return e.openDiscountPopup(e.order,"cart")}}},[e._v(e._s(e._f("currency")(e.order.discount)))])])])]),e._v(" "),e.order.type&&"delivery"===e.order.type.identifier?r("tr",[r("td",{staticClass:"border border-gray-300 p-2",attrs:{width:"200"}}),e._v(" "),r("td",{staticClass:"border border-gray-300 p-2",attrs:{width:"200"}},[r("a",{staticClass:"hover:text-blue-400 cursor-pointer outline-none border-dashed py-1 border-b border-blue-400 text-sm",on:{click:function(t){return e.openShippingPopup()}}},[e._v(e._s(e.__("Shipping")))]),e._v(" "),r("span")])]):e._e(),e._v(" "),r("tr",{staticClass:"bg-green-200"},[r("td",{staticClass:"border border-gray-300 p-2",attrs:{width:"200"}},[e.order?r("a",{staticClass:"hover:text-blue-400 cursor-pointer outline-none border-dashed py-1 border-b border-blue-400 text-sm",on:{click:function(t){return e.openTaxSummary()}}},[e._v(e._s(e.__("Tax :"))+" "+e._s(e._f("currency")(e.order.tax_value)))]):e._e()]),e._v(" "),r("td",{staticClass:"border border-gray-300 p-2",attrs:{width:"200"}},[r("div",{staticClass:"flex justify-between w-full"},[r("span",[e._v(e._s(e.__("Total")))]),e._v(" "),r("span",[e._v(e._s(e._f("currency")(e.order.total)))])])])])]):e._e()]),e._v(" "),r("div",{staticClass:"h-16 flex flex-shrink-0 border-t border-gray-200",attrs:{id:"cart-bottom-buttons"}},[r("div",{staticClass:"flex-shrink-0 w-1/4 flex items-center font-bold cursor-pointer justify-center bg-green-500 text-white hover:bg-green-600 border-r border-green-600 flex-auto",attrs:{id:"pay-button"},on:{click:function(t){return e.payOrder()}}},[r("i",{staticClass:"mr-2 text-2xl lg:text-xl las la-cash-register"}),e._v(" "),r("span",{staticClass:"text-lg hidden md:inline lg:text-2xl"},[e._v(e._s(e.__("Pay")))])]),e._v(" "),r("div",{staticClass:"flex-shrink-0 w-1/4 flex items-center font-bold cursor-pointer justify-center bg-blue-500 text-white border-r hover:bg-blue-600 border-blue-600 flex-auto",attrs:{id:"hold-button"},on:{click:function(t){return e.holdOrder()}}},[r("i",{staticClass:"mr-2 text-2xl lg:text-xl las la-pause"}),e._v(" "),r("span",{staticClass:"text-lg hidden md:inline lg:text-2xl"},[e._v(e._s(e.__("Hold")))])]),e._v(" "),r("div",{staticClass:"flex-shrink-0 w-1/4 flex items-center font-bold cursor-pointer justify-center bg-white border-r border-gray-200 hover:bg-indigo-100 flex-auto text-gray-700",attrs:{id:"discount-button"},on:{click:function(t){return e.openDiscountPopup(e.order,"cart")}}},[r("i",{staticClass:"mr-2 text-2xl lg:text-xl las la-percent"}),e._v(" "),r("span",{staticClass:"text-lg hidden md:inline lg:text-2xl"},[e._v(e._s(e.__("Discount")))])]),e._v(" "),r("div",{staticClass:"flex-shrink-0 w-1/4 flex items-center font-bold cursor-pointer justify-center bg-red-500 text-white border-gray-200 hover:bg-red-600 flex-auto",attrs:{id:"void-button"},on:{click:function(t){return e.voidOngoingOrder(e.order)}}},[r("i",{staticClass:"mr-2 text-2xl lg:text-xl las la-trash"}),e._v(" "),r("span",{staticClass:"text-lg hidden md:inline lg:text-2xl"},[e._v(e._s(e.__("Void")))])])])])])])}),[],!1,null,null,null).exports},874:(e,t,r)=>{"use strict";r.d(t,{Z:()=>u});var s=r(162),n=r(9763),i=r(8603);const o={name:"ns-pos-search-product",data:function(){return{searchValue:"",products:[],isLoading:!1}},mounted:function(){this.$refs.searchField.focus(),this.popupCloser()},methods:{__:r(7389).__,popupCloser:i.Z,addToCart:function(e){POS.addToCart(e),this.$popup.close()},search:function(){var e=this;this.isLoading=!0,s.ih.post("/api/nexopos/v4/products/search",{search:this.searchValue}).subscribe((function(t){e.isLoading=!1,e.products=t,1===e.products.length&&e.addToCart(e.products[0])}),(function(t){e.isLoading=!1,s.kX.error(t.message).subscribe()}))}}};var a=r(1900);const l=(0,a.Z)(o,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"bg-white shadow-lg w-95vw h-95vh md:h-3/5-screen md:w-2/4-screen flex flex-col overflow-hidden"},[r("div",{staticClass:"p-2 border-b border-gray-300 flex justify-between items-center"},[r("h3",{staticClass:"text-gray-700"},[e._v(e._s(e.__("Search Product")))]),e._v(" "),r("div",[r("ns-close-button",{on:{click:function(t){return e.$popup.close()}}})],1)]),e._v(" "),r("div",{staticClass:"flex-auto overflow-hidden flex flex-col"},[r("div",{staticClass:"p-2 border-b border-gray-300"},[r("div",{staticClass:"flex border-blue-400 border-2 rounded overflow-hidden"},[r("input",{directives:[{name:"model",rawName:"v-model",value:e.searchValue,expression:"searchValue"}],ref:"searchField",staticClass:"p-2 outline-none flex-auto text-gray-700 bg-blue-100",attrs:{type:"text"},domProps:{value:e.searchValue},on:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.search()},input:function(t){t.target.composing||(e.searchValue=t.target.value)}}}),e._v(" "),r("button",{staticClass:"px-2 bg-blue-400 text-white",on:{click:function(t){return e.search()}}},[e._v(e._s(e.__("Search")))])])]),e._v(" "),r("div",{staticClass:"overflow-y-auto flex-auto relative"},[r("ul",[e._l(e.products,(function(t){return r("li",{key:t.id,staticClass:"hover:bg-blue-100 cursor-pointer p-2 flex justify-between border-b",on:{click:function(r){return e.addToCart(t)}}},[r("div",{staticClass:"text-gray-700"},[e._v("\n "+e._s(t.name)+"\n ")]),e._v(" "),r("div")])})),e._v(" "),0===e.products.length?r("li",{staticClass:"text-gray-700 text-center p-2"},[e._v(e._s(e.__("There is nothing to display. Have you started the search ?")))]):e._e()],2),e._v(" "),e.isLoading?r("div",{staticClass:"absolute h-full w-full flex items-center justify-center z-10 top-0",staticStyle:{background:"rgb(187 203 214 / 29%)"}},[r("ns-spinner")],1):e._e()])])])}),[],!1,null,null,null).exports,c={name:"ns-pos-grid",data:function(){return{items:Array.from({length:1e3},(function(e,t){return{data:"#"+t}})),products:[],categories:[],breadcrumbs:[],autoFocus:!1,barcode:"",previousCategory:null,order:null,visibleSection:null,breadcrumbsSubsribe:null,orderSubscription:null,visibleSectionSubscriber:null,currentCategory:null,interval:null,searchTimeout:null,gridItemsWidth:0,gridItemsHeight:0,screenSubscriber:null,rebuildGridTimeout:null,rebuildGridComplete:!1}},computed:{hasCategories:function(){return this.categories.length>0}},watch:{barcode:function(){var e=this;clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout((function(){e.submitSearch(e.barcode)}),200)}},mounted:function(){var e=this;this.loadCategories(),this.breadcrumbsSubsribe=POS.breadcrumbs.subscribe((function(t){e.breadcrumbs=t})),this.visibleSectionSubscriber=POS.visibleSection.subscribe((function(t){e.visibleSection=t})),this.screenSubscriber=POS.screen.subscribe((function(t){clearTimeout(e.rebuildGridTimeout),e.rebuildGridComplete=!1,e.rebuildGridTimeout=setTimeout((function(){e.rebuildGridComplete=!0,e.computeGridWidth()}),500)})),this.orderSubscription=POS.order.subscribe((function(t){return e.order=t})),this.interval=setInterval((function(){return e.checkFocus()}),500)},destroyed:function(){this.orderSubscription.unsubscribe(),this.breadcrumbsSubsribe.unsubscribe(),this.visibleSectionSubscriber.unsubscribe(),this.screenSubscriber.unsubscribe(),clearInterval(this.interval)},methods:{switchTo:n.Z,computeGridWidth:function(){null!==document.getElementById("grid-items")&&(this.gridItemsWidth=document.getElementById("grid-items").offsetWidth,this.gridItemsHeight=document.getElementById("grid-items").offsetHeight)},cellSizeAndPositionGetter:function(e,t){var r={xs:{width:this.gridItemsWidth/2,items:2,height:200},sm:{width:this.gridItemsWidth/2,items:2,height:200},md:{width:this.gridItemsWidth/3,items:3,height:150},lg:{width:this.gridItemsWidth/4,items:4,height:150},xl:{width:this.gridItemsWidth/6,items:6,height:150}},s=r[POS.responsive.screenIs].width,n=r[POS.responsive.screenIs].height;return{width:s-0,height:n,x:t%r[POS.responsive.screenIs].items*s-0,y:parseInt(t/r[POS.responsive.screenIs].items)*n}},openSearchPopup:function(){Popup.show(l)},submitSearch:function(e){var t=this;e.length>0&&s.ih.get("/api/nexopos/v4/products/search/using-barcode/".concat(e)).subscribe((function(e){t.barcode="",POS.addToCart(e.product)}),(function(e){t.barcode="",s.kX.error(e.message).subscribe()}))},checkFocus:function(){this.autoFocus&&(0===document.querySelectorAll(".is-popup").length&&this.$refs.search.focus())},loadCategories:function(e){var t=this;s.ih.get("/api/nexopos/v4/categories/pos/".concat(e?e.id:"")).subscribe((function(e){t.categories=e.categories.map((function(e){return{data:e}})),t.products=e.products.map((function(e){return{data:e}})),t.previousCategory=e.previousCategory,t.currentCategory=e.currentCategory,t.updateBreadCrumb(t.currentCategory)}))},updateBreadCrumb:function(e){if(e){var t=this.breadcrumb.filter((function(t){return t.id===e.id}));if(t.length>0){var r=!0,s=this.breadcrumb.filter((function(e){return e.id===t[0].id&&r?(r=!1,!0):r}));this.breadcrumb=s}else this.breadcrumb.push(e)}else this.breadcrumb=[];POS.breadcrumbs.next(this.breadcrumb)},addToTheCart:function(e){POS.addToCart(e)}}};const u=(0,a.Z)(c,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"flex-auto flex flex-col",attrs:{id:"pos-grid"}},["grid"===e.visibleSection?r("div",{staticClass:"flex pl-2",attrs:{id:"tools"}},[r("div",{staticClass:"flex cursor-pointer rounded-tl-lg rounded-tr-lg px-3 py-2 bg-gray-300 border-t border-r border-l border-gray-300 text-gray-600",on:{click:function(t){return e.switchTo("cart")}}},[r("span",[e._v("Cart")]),e._v(" "),e.order?r("span",{staticClass:"flex items-center justify-center text-sm rounded-full h-6 w-6 bg-green-500 text-white ml-1"},[e._v(e._s(e.order.products.length))]):e._e()]),e._v(" "),r("div",{staticClass:"cursor-pointer rounded-tl-lg rounded-tr-lg px-3 py-2 bg-white font-semibold text-gray-700",on:{click:function(t){return e.switchTo("grid")}}},[e._v("\n Products\n ")])]):e._e(),e._v(" "),r("div",{staticClass:"rounded shadow bg-white overflow-hidden flex-auto flex flex-col"},[r("div",{staticClass:"p-2 border-b border-gray-200",attrs:{id:"grid-header"}},[r("div",{staticClass:"border rounded flex border-gray-300 overflow-hidden"},[r("button",{staticClass:"w-10 h-10 bg-gray-200 border-r border-gray-300 outline-none",on:{click:function(t){return e.openSearchPopup()}}},[r("i",{staticClass:"las la-search"})]),e._v(" "),r("button",{staticClass:"outline-none w-10 h-10 border-r border-gray-300",class:e.autoFocus?"pos-button-clicked bg-gray-300":"bg-gray-200",on:{click:function(t){e.autoFocus=!e.autoFocus}}},[r("i",{staticClass:"las la-barcode"})]),e._v(" "),r("input",{directives:[{name:"model",rawName:"v-model",value:e.barcode,expression:"barcode"}],ref:"search",staticClass:"flex-auto outline-none px-2 bg-gray-100",attrs:{type:"text"},domProps:{value:e.barcode},on:{input:function(t){t.target.composing||(e.barcode=t.target.value)}}})])]),e._v(" "),r("div",{staticClass:"p-2 border-gray-200",attrs:{id:"grid-breadscrumb"}},[r("ul",{staticClass:"flex"},[r("li",[r("a",{staticClass:"px-3 text-gray-700",attrs:{href:"javascript:void(0)"},on:{click:function(t){return e.loadCategories()}}},[e._v("Home ")]),e._v(" "),r("i",{staticClass:"las la-angle-right"})]),e._v(" "),r("li",e._l(e.breadcrumbs,(function(t){return r("a",{key:t.id,staticClass:"px-3 text-gray-700",attrs:{href:"javascript:void(0)"},on:{click:function(r){return e.loadCategories(t)}}},[e._v(e._s(t.name)+" "),r("i",{staticClass:"las la-angle-right"})])})),0)])]),e._v(" "),r("div",{staticClass:"overflow-hidden h-full flex-col flex",attrs:{id:"grid-items"}},[e.rebuildGridComplete?e._e():r("div",{staticClass:"h-full w-full flex-col flex items-center justify-center"},[r("ns-spinner"),e._v(" "),r("span",{staticClass:"text-gray-600 my-2"},[e._v("Rebuilding...")])],1),e._v(" "),e.rebuildGridComplete?[e.hasCategories?r("VirtualCollection",{attrs:{cellSizeAndPositionGetter:e.cellSizeAndPositionGetter,collection:e.categories,height:e.gridItemsHeight,width:e.gridItemsWidth},scopedSlots:e._u([{key:"cell",fn:function(t){var s=t.data;return r("div",{staticClass:"w-full h-full"},[r("div",{key:s.id,staticClass:"hover:bg-gray-200 w-full h-full cursor-pointer border border-gray-200 flex flex-col items-center justify-center overflow-hidden",on:{click:function(t){return e.loadCategories(s)}}},[r("div",{staticClass:"h-full w-full flex items-center justify-center"},[s.preview_url?r("img",{staticClass:"object-cover h-full",attrs:{src:s.preview_url,alt:s.name}}):e._e(),e._v(" "),s.preview_url?e._e():r("i",{staticClass:"las la-image text-gray-600 text-6xl"})]),e._v(" "),r("div",{staticClass:"h-0 w-full"},[r("div",{staticClass:"relative w-full flex items-center justify-center -top-10 h-20 py-2",staticStyle:{background:"rgb(255 255 255 / 73%)"}},[r("h3",{staticClass:"text-sm font-bold text-gray-700 py-2 text-center"},[e._v(e._s(s.name))])])])])])}}],null,!1,1415940505)}):e._e(),e._v(" "),e.hasCategories?e._e():r("VirtualCollection",{attrs:{cellSizeAndPositionGetter:e.cellSizeAndPositionGetter,collection:e.products,height:e.gridItemsHeight,width:e.gridItemsWidth},scopedSlots:e._u([{key:"cell",fn:function(t){var s=t.data;return r("div",{staticClass:"w-full h-full"},[r("div",{key:s.id,staticClass:"hover:bg-gray-200 w-full h-full cursor-pointer border border-gray-200 flex flex-col items-center justify-center overflow-hidden",on:{click:function(t){return e.addToTheCart(s)}}},[r("div",{staticClass:"h-full w-full flex items-center justify-center overflow-hidden"},[s.galleries&&s.galleries.filter((function(e){return 1===e.featured})).length>0?r("img",{staticClass:"object-cover h-full",attrs:{src:s.galleries.filter((function(e){return 1===e.featured}))[0].url,alt:s.name}}):e._e(),e._v(" "),s.galleries&&0!==s.galleries.filter((function(e){return 1===e.featured})).length?e._e():r("i",{staticClass:"las la-image text-gray-600 text-6xl"})]),e._v(" "),r("div",{staticClass:"h-0 w-full"},[r("div",{staticClass:"relative w-full flex flex-col items-center justify-center -top-10 h-20 p-2",staticStyle:{background:"rgb(255 255 255 / 73%)"}},[r("h3",{staticClass:"text-sm text-gray-700 text-center w-full"},[e._v(e._s(s.name))]),e._v(" "),s.unit_quantities&&1===s.unit_quantities.length?r("span",{staticClass:"text-sm text-gray-600"},[e._v(e._s(e._f("currency")(s.unit_quantities[0].sale_price)))]):e._e()])])])])}}],null,!1,3326882304)})]:e._e()],2)])])}),[],!1,null,null,null).exports},8159:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var s=r(2014),n=r(874);const i={name:"ns-pos",computed:{buttons:function(){return POS.header.buttons}},mounted:function(){var e=this;this.visibleSectionSubscriber=POS.visibleSection.subscribe((function(t){e.visibleSection=t}))},destroyed:function(){this.visibleSectionSubscriber.unsubscribe()},data:function(){return{visibleSection:null,visibleSectionSubscriber:null}},components:{NsPosCart:s.Z,NsPosGrid:n.Z}};const o=(0,r(1900).Z)(i,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"h-full flex-auto bg-gray-300 flex flex-col",attrs:{id:"pos-container"}},[r("div",{staticClass:"flex overflow-hidden flex-shrink-0 px-2 pt-2"},[r("div",{staticClass:"-mx-2 flex overflow-x-auto pb-1"},e._l(e.buttons,(function(e,t){return r("div",{key:t,staticClass:"flex px-2 flex-shrink-0"},[r(e,{tag:"component"})],1)})),0)]),e._v(" "),r("div",{staticClass:"flex-auto overflow-hidden flex p-2"},[r("div",{staticClass:"flex flex-auto overflow-hidden -m-2"},[["both","cart"].includes(e.visibleSection)?r("div",{staticClass:"flex overflow-hidden p-2",class:"both"===e.visibleSection?"w-1/2":"w-full"},[r("ns-pos-cart")],1):e._e(),e._v(" "),["both","grid"].includes(e.visibleSection)?r("div",{staticClass:"p-2 flex overflow-hidden",class:"both"===e.visibleSection?"w-1/2":"w-full"},[r("ns-pos-grid")],1):e._e()])])])}),[],!1,null,null,null).exports},419:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const s={data:function(){return{title:"",message:""}},computed:{size:function(){return this.$popupParams.size||"h-full w-full"}},mounted:function(){var e=this;this.title=this.$popupParams.title,this.message=this.$popupParams.message,this.$popup.event.subscribe((function(t){"click-overlay"===t.event&&(e.$popupParams.onAction(!1),e.$popup.close())}))},methods:{__:r(7389).__,emitAction:function(e){this.$popupParams.onAction(e),this.$popup.close()}}};const n=(0,r(1900).Z)(s,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"flex flex-col bg-white shadow-lg w-5/7-screen md:w-4/7-screen lg:w-2/7-screen",class:e.size,attrs:{id:"popup"}},[r("div",{staticClass:"flex items-center justify-center flex-col flex-auto p-4"},[r("h2",{staticClass:"text-xl md:text-3xl font-body text-gray-700 text-center"},[e._v(e._s(e.title))]),e._v(" "),r("p",{staticClass:"py-4 text-sm md:text-base text-gray-600 text-center"},[e._v(e._s(e.message))])]),e._v(" "),r("div",{staticClass:"flex border-t border-gray-200 text-gray-700"},[r("button",{staticClass:"hover:bg-gray-100 flex-auto w-1/2 h-16 flex items-center justify-center uppercase",on:{click:function(t){return e.emitAction(!0)}}},[e._v(e._s(e.__("Yes")))]),e._v(" "),r("hr",{staticClass:"border-r border-gray-200"}),e._v(" "),r("button",{staticClass:"hover:bg-gray-100 flex-auto w-1/2 h-16 flex items-center justify-center uppercase",on:{click:function(t){return e.emitAction(!1)}}},[e._v(e._s(e.__("No")))])])])}),[],!1,null,null,null).exports},5450:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var s=r(8603),n=r(6386),i=r(162),o=r(7389),a=r(4326);r(9624);const l={name:"ns-pos-coupons-load-popup",data:function(){return{placeHolder:(0,o.__)("Coupon Code"),couponCode:null,order:null,activeTab:"apply-coupon",orderSubscriber:null,customerCoupon:null}},mounted:function(){var e=this;this.popupCloser(),this.$refs.coupon.select(),this.orderSubscriber=POS.order.subscribe((function(t){e.order=t,e.order.coupons.length>0&&(e.activeTab="active-coupons")})),this.$popupParams&&this.$popupParams.apply_coupon&&(this.couponCode=this.$popupParams.apply_coupon,this.getCoupon(this.couponCode).subscribe({next:function(t){e.customerCoupon=t,e.apply()}}))},destroyed:function(){this.orderSubscriber.unsubscribe()},methods:{__:o.__,popupCloser:s.Z,popupResolver:n.Z,selectCustomer:function(){Popup.show(a.Z)},cancel:function(){this.customerCoupon=null,this.couponCode=null},removeCoupon:function(e){this.order.coupons.splice(e,1),POS.refreshCart()},apply:function(){var e=this;try{var t=this.customerCoupon;if(null!==this.customerCoupon.coupon.valid_hours_start&&!ns.date.moment.isAfter(this.customerCoupon.coupon.valid_hours_start)&&this.customerCoupon.coupon.valid_hours_start.length>0)return i.kX.error((0,o.__)("The coupon is out from validity date range.")).subscribe();if(null!==this.customerCoupon.coupon.valid_hours_end&&!ns.date.moment.isBefore(this.customerCoupon.coupon.valid_hours_end)&&this.customerCoupon.coupon.valid_hours_end.length>0)return i.kX.error((0,o.__)("The coupon is out from validity date range.")).subscribe();var r=this.customerCoupon.coupon.products;if(r.length>0){var s=r.map((function(e){return e.product_id}));if(0===this.order.products.filter((function(e){return s.includes(e.product_id)})).length)return i.kX.error((0,o.__)("This coupon requires products that aren't available on the cart at the moment.")).subscribe()}var n=this.customerCoupon.coupon.categories;if(n.length>0){var a=n.map((function(e){return e.category_id}));if(0===this.order.products.filter((function(e){return a.includes(e.$original().category_id)})).length)return i.kX.error((0,o.__)("This coupon requires products that belongs to specific categories that aren't included at the moment.").replace("%s")).subscribe()}this.cancel();var l={active:t.coupon.active,customer_coupon_id:t.id,minimum_cart_value:t.coupon.minimum_cart_value,maximum_cart_value:t.coupon.maximum_cart_value,name:t.coupon.name,type:t.coupon.type,value:0,limit_usage:t.coupon.limit_usage,code:t.coupon.code,discount_value:t.coupon.discount_value,categories:t.coupon.categories,products:t.coupon.products};POS.pushCoupon(l),this.activeTab="active-coupons",setTimeout((function(){e.popupResolver(l)}),500),i.kX.success((0,o.__)("The coupon has applied to the cart.")).subscribe()}catch(e){console.log(e)}},getCouponType:function(e){switch(e){case"percentage_discount":return(0,o.__)("Percentage");case"flat_discount":return(0,o.__)("Flat");default:return(0,o.__)("Unknown Type")}},getDiscountValue:function(e){switch(e.type){case"percentage_discount":return e.discount_value+"%";case"flat_discount":return this.$options.filters.currency(e.discount_value)}},closePopup:function(){this.popupResolver(!1)},setActiveTab:function(e){this.activeTab=e},getCoupon:function(e){return!this.order.customer_id>0?i.kX.error((0,o.__)("You must select a customer before applying a coupon.")).subscribe():i.ih.post("/api/nexopos/v4/customers/coupons/".concat(e),{customer_id:this.order.customer_id})},loadCoupon:function(){var e=this,t=this.couponCode;this.getCoupon(t).subscribe({next:function(t){e.customerCoupon=t,i.kX.success((0,o.__)("The coupon has been loaded.")).subscribe()},error:function(e){i.kX.error(e.message||(0,o.__)("An unexpected error occured.")).subscribe()}})}}};const c=(0,r(1900).Z)(l,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"shadow-lg bg-white w-95vw md:w-3/6-screen lg:w-2/6-screen"},[r("div",{staticClass:"border-b border-gray-200 p-2 flex justify-between items-center"},[r("h3",{staticClass:"font-bold text-gray-700"},[e._v(e._s(e.__("Load Coupon")))]),e._v(" "),r("div",[r("ns-close-button",{on:{click:function(t){return e.closePopup()}}})],1)]),e._v(" "),r("div",{staticClass:"p-1"},[r("ns-tabs",{attrs:{active:e.activeTab},on:{changeTab:function(t){return e.setActiveTab(t)}}},[r("ns-tabs-item",{attrs:{label:e.__("Apply A Coupon"),padding:"p-2",identifier:"apply-coupon"}},[r("div",{staticClass:"border-2 border-blue-400 rounded flex"},[r("input",{directives:[{name:"model",rawName:"v-model",value:e.couponCode,expression:"couponCode"}],ref:"coupon",staticClass:"w-full p-2",attrs:{type:"text",placeholder:e.placeHolder},domProps:{value:e.couponCode},on:{input:function(t){t.target.composing||(e.couponCode=t.target.value)}}}),e._v(" "),r("button",{staticClass:"bg-blue-400 text-white px-3 py-2",on:{click:function(t){return e.loadCoupon()}}},[e._v(e._s(e.__("Load")))])]),e._v(" "),r("div",{staticClass:"pt-2"},[r("p",{staticClass:"p-2 text-center bg-green-100 text-green-600"},[e._v(e._s(e.__("Input the coupon code that should apply to the POS. If a coupon is issued for a customer, that customer must be selected priorly.")))])]),e._v(" "),e.order&&void 0===e.order.customer_id?r("div",{staticClass:"pt-2",on:{click:function(t){return e.selectCustomer()}}},[r("p",{staticClass:"p-2 cursor-pointer text-center bg-red-100 text-red-600"},[e._v(e._s(e.__("Click here to choose a customer.")))])]):e._e(),e._v(" "),e.order&&void 0!==e.order.customer_id?r("div",{staticClass:"pt-2"},[r("p",{staticClass:"p-2 text-center bg-green-100 text-green-600"},[e._v(e._s(e.__("Loading Coupon For : ")+e.order.customer.name+" "+e.order.customer.surname))])]):e._e(),e._v(" "),r("div",{staticClass:"overflow-hidden"},[e.customerCoupon?r("div",{staticClass:"pt-2 fade-in-entrance anim-duration-500 overflow-y-auto h-64"},[r("table",{staticClass:"w-full"},[r("thead",[r("tr",[r("td",{staticClass:"p-2 w-1/2 text-gray-700 border border-gray-200"},[e._v(e._s(e.__("Coupon Name")))]),e._v(" "),r("td",{staticClass:"p-2 w-1/2 text-gray-700 border border-gray-200"},[e._v(e._s(e.customerCoupon.name))])]),e._v(" "),r("tr",[r("td",{staticClass:"p-2 w-1/2 text-gray-700 border border-gray-200"},[e._v(e._s(e.__("Discount"))+" ("+e._s(e.getCouponType(e.customerCoupon.coupon.type))+")")]),e._v(" "),r("td",{staticClass:"p-2 w-1/2 text-gray-700 border border-gray-200"},[e._v(e._s(e.getDiscountValue(e.customerCoupon.coupon)))])]),e._v(" "),r("tr",[r("td",{staticClass:"p-2 w-1/2 text-gray-700 border border-gray-200"},[e._v(e._s(e.__("Usage")))]),e._v(" "),r("td",{staticClass:"p-2 w-1/2 text-gray-700 border border-gray-200"},[e._v(e._s(e.customerCoupon.usage+"/"+(e.customerCoupon.limit_usage||e.__("Unlimited"))))])]),e._v(" "),r("tr",[r("td",{staticClass:"p-2 w-1/2 text-gray-700 border border-gray-200"},[e._v(e._s(e.__("Valid From")))]),e._v(" "),r("td",{staticClass:"p-2 w-1/2 text-gray-700 border border-gray-200"},[e._v(e._s(e.customerCoupon.coupon.valid_hours_start))])]),e._v(" "),r("tr",[r("td",{staticClass:"p-2 w-1/2 text-gray-700 border border-gray-200"},[e._v(e._s(e.__("Valid Till")))]),e._v(" "),r("td",{staticClass:"p-2 w-1/2 text-gray-700 border border-gray-200"},[e._v(e._s(e.customerCoupon.coupon.valid_hours_end))])]),e._v(" "),r("tr",[r("td",{staticClass:"p-2 w-1/2 text-gray-700 border border-gray-200"},[e._v(e._s(e.__("Categories")))]),e._v(" "),r("td",{staticClass:"p-2 w-1/2 text-gray-700 border border-gray-200"},[r("ul",e._l(e.customerCoupon.coupon.categories,(function(t){return r("li",{key:t.id,staticClass:"rounded-full px-3 py-1 border border-gray-200"},[e._v(e._s(t.category.name))])})),0)])]),e._v(" "),r("tr",[r("td",{staticClass:"p-2 w-1/2 text-gray-700 border border-gray-200"},[e._v(e._s(e.__("Products")))]),e._v(" "),r("td",{staticClass:"p-2 w-1/2 text-gray-700 border border-gray-200"},[r("ul",e._l(e.customerCoupon.coupon.products,(function(t){return r("li",{key:t.id,staticClass:"rounded-full px-3 py-1 border border-gray-200"},[e._v(e._s(t.product.name))])})),0)])])])])]):e._e()])]),e._v(" "),r("ns-tabs-item",{attrs:{label:e.__("Active Coupons"),padding:"p-1",identifier:"active-coupons"}},[e.order?r("ul",[e._l(e.order.coupons,(function(t,s){return r("li",{key:s,staticClass:"flex justify-between bg-gray-100 items-center px-2 py-1"},[r("div",{staticClass:"flex-auto"},[r("h3",{staticClass:"font-semibold text-gray-700 p-2 flex justify-between"},[r("span",[e._v(e._s(t.name))]),e._v(" "),r("span",[e._v(e._s(e.getDiscountValue(t)))])])]),e._v(" "),r("div",[r("ns-close-button",{on:{click:function(t){return e.removeCoupon(s)}}})],1)])})),e._v(" "),0===e.order.coupons.length?r("li",{staticClass:"flex justify-between bg-gray-100 items-center p-2"},[e._v("\n No coupons applies to the cart.\n ")]):e._e()],2):e._e()])],1)],1),e._v(" "),e.customerCoupon?r("div",{staticClass:"flex"},[r("button",{staticClass:"w-1/2 px-3 py-2 bg-green-400 text-white font-bold",on:{click:function(t){return e.apply()}}},[e._v("\n "+e._s(e.__("Apply"))+"\n ")]),e._v(" "),r("button",{staticClass:"w-1/2 px-3 py-2 bg-red-400 text-white font-bold",on:{click:function(t){return e.cancel()}}},[e._v("\n "+e._s(e.__("Cancel"))+"\n ")])]):e._e()])}),[],!1,null,null,null).exports},4326:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var s=r(162),n=r(6386),i=r(2242),o=r(5872);const a={data:function(){return{searchCustomerValue:"",orderSubscription:null,order:{},debounceSearch:null,customers:[],isLoading:!1}},computed:{customerSelected:function(){return!1}},watch:{searchCustomerValue:function(e){var t=this;clearTimeout(this.debounceSearch),this.debounceSearch=setTimeout((function(){t.searchCustomer(e)}),500)}},mounted:function(){var e=this;this.$popup.event.subscribe((function(t){"click-overlay"===t.event&&e.resolveIfQueued(!1)})),this.orderSubscription=POS.order.subscribe((function(t){e.order=t})),this.getRecentCustomers(),this.$refs.searchField.focus()},destroyed:function(){this.orderSubscription.unsubscribe()},methods:{__:r(7389).__,resolveIfQueued:n.Z,attemptToChoose:function(){if(1===this.customers.length)return this.selectCustomer(this.customers[0]);s.kX.info("Too many result.").subscribe()},openCustomerHistory:function(e,t){t.stopImmediatePropagation(),this.$popup.close(),i.G.show(o.Z,{customer:e,activeTab:"account-payment"})},selectCustomer:function(e){var t=this;this.customers.forEach((function(e){return e.selected=!1})),e.selected=!0,this.isLoading=!0,POS.selectCustomer(e).then((function(r){t.isLoading=!1,t.resolveIfQueued(e)})).catch((function(e){t.isLoading=!1}))},searchCustomer:function(e){var t=this;s.ih.post("/api/nexopos/v4/customers/search",{search:e}).subscribe((function(e){e.forEach((function(e){return e.selected=!1})),t.customers=e}))},createCustomerWithMatch:function(e){this.resolveIfQueued(!1),i.G.show(o.Z,{name:e})},getRecentCustomers:function(){var e=this;this.isLoading=!0,s.ih.get("/api/nexopos/v4/customers").subscribe((function(t){e.isLoading=!1,t.forEach((function(e){return e.selected=!1})),e.customers=t}),(function(t){e.isLoading=!1}))}}};const l=(0,r(1900).Z)(a,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"bg-white shadow-xl w-4/5-screen md:w-2/5-screen xl:w-108"},[r("div",{staticClass:"border-b border-gray-200 text-center font-semibold text-2xl text-gray-700 py-2",attrs:{id:"header"}},[r("h2",[e._v(e._s(e.__("Select Customer")))])]),e._v(" "),r("div",{staticClass:"relative"},[r("div",{staticClass:"p-2 border-b border-gray-200 flex justify-between text-gray-600"},[r("span",[e._v("Selected : ")]),e._v(" "),r("div",{staticClass:"flex items-center justify-between"},[r("span",[e._v(e._s(e.order.customer?e.order.customer.name:"N/A"))]),e._v(" "),e.order.customer?r("button",{staticClass:"mx-2 rounded-full h-8 w-8 flex items-center justify-center border border-gray-200 hover:bg-blue-400 hover:text-white hover:border-transparent",on:{click:function(t){return e.openCustomerHistory(e.order.customer,t)}}},[r("i",{staticClass:"las la-eye"})]):e._e()])]),e._v(" "),r("div",{staticClass:"p-2 border-b border-gray-200 flex justify-between text-gray-600"},[r("input",{directives:[{name:"model",rawName:"v-model",value:e.searchCustomerValue,expression:"searchCustomerValue"}],ref:"searchField",staticClass:"rounded border-2 border-blue-400 bg-gray-100 w-full p-2",attrs:{placeholder:"Search Customer",type:"text"},domProps:{value:e.searchCustomerValue},on:{keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.attemptToChoose()},input:function(t){t.target.composing||(e.searchCustomerValue=t.target.value)}}})]),e._v(" "),r("div",{staticClass:"h-3/5-screen xl:h-2/5-screen overflow-y-auto"},[r("ul",[e.customers&&0===e.customers.length?r("li",{staticClass:"p-2 text-center text-gray-600"},[e._v("\n "+e._s(e.__("No customer match your query..."))+"\n ")]):e._e(),e._v(" "),e.customers&&0===e.customers.length?r("li",{staticClass:"p-2 cursor-pointer text-center text-gray-600",on:{click:function(t){return e.createCustomerWithMatch(e.searchCustomerValue)}}},[r("span",{staticClass:"border-b border-dashed border-blue-400"},[e._v(e._s(e.__("Create a customer")))])]):e._e(),e._v(" "),e._l(e.customers,(function(t){return r("li",{key:t.id,staticClass:"cursor-pointer hover:bg-gray-100 p-2 border-b border-gray-200 text-gray-600 flex justify-between items-center",on:{click:function(r){return e.selectCustomer(t)}}},[r("span",[e._v(e._s(t.name))]),e._v(" "),r("p",{staticClass:"flex items-center"},[t.owe_amount>0?r("span",{staticClass:"text-red-600"},[e._v("-"+e._s(e._f("currency")(t.owe_amount)))]):e._e(),e._v(" "),t.owe_amount>0?r("span",[e._v("/")]):e._e(),e._v(" "),r("span",{staticClass:"text-green-600"},[e._v(e._s(e._f("currency")(t.purchases_amount)))]),e._v(" "),r("button",{staticClass:"mx-2 rounded-full h-8 w-8 flex items-center justify-center border border-gray-200 hover:bg-blue-400 hover:text-white hover:border-transparent",on:{click:function(r){return e.openCustomerHistory(t,r)}}},[r("i",{staticClass:"las la-eye"})])])])}))],2)]),e._v(" "),e.isLoading?r("div",{staticClass:"z-10 top-0 absolute w-full h-full flex items-center justify-center"},[r("ns-spinner",{attrs:{size:"24",border:"8"}})],1):e._e()])])}),[],!1,null,null,null).exports},5872:(e,t,r)=>{"use strict";r.d(t,{Z:()=>b});var s=r(8603),n=r(162),i=r(2242),o=r(4326),a=r(7266),l=r(7389);const c={mounted:function(){this.closeWithOverlayClicked(),this.loadTransactionFields()},data:function(){return{fields:[],isSubmiting:!1,formValidation:new a.Z}},methods:{__:l.__,closeWithOverlayClicked:s.Z,proceed:function(){var e=this,t=this.$popupParams.customer,r=this.formValidation.extractFields(this.fields);this.isSubmiting=!0,n.ih.post("/api/nexopos/v4/customers/".concat(t.id,"/account-history"),r).subscribe((function(t){e.isSubmiting=!1,n.kX.success(t.message).subscribe(),e.$popupParams.resolve(t),e.$popup.close()}),(function(t){e.isSubmiting=!1,n.kX.error(t.message).subscribe(),e.$popupParams.reject(t)}))},close:function(){this.$popup.close(),this.$popupParams.reject(!1)},loadTransactionFields:function(){var e=this;n.ih.get("/api/nexopos/v4/fields/ns.customers-account").subscribe((function(t){e.fields=e.formValidation.createFields(t)}))}}};var u=r(1900);const d=(0,u.Z)(c,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"w-6/7-screen md:w-5/7-screen lg:w-4/7-screen h-6/7-screen md:h-5/7-screen lg:h-5/7-screen overflow-hidden shadow-lg bg-white flex flex-col relative"},[r("div",{staticClass:"p-2 border-b border-gray-200 flex justify-between items-center"},[r("h2",{staticClass:"font-semibold"},[e._v(e._s(e.__("New Transaction")))]),e._v(" "),r("div",[r("ns-close-button",{on:{click:function(t){return e.close()}}})],1)]),e._v(" "),r("div",{staticClass:"flex-auto overflow-y-auto"},[0===e.fields.length?r("div",{staticClass:"h-full w-full flex items-center justify-center"},[r("ns-spinner")],1):e._e(),e._v(" "),e.fields.length>0?r("div",{staticClass:"p-2"},e._l(e.fields,(function(e,t){return r("ns-field",{key:t,attrs:{field:e}})})),1):e._e()]),e._v(" "),r("div",{staticClass:"p-2 bg-white justify-between border-t border-gray-200 flex"},[r("div"),e._v(" "),r("div",{staticClass:"px-1"},[r("div",{staticClass:"-mx-2 flex flex-wrap"},[r("div",{staticClass:"px-1"},[r("ns-button",{attrs:{type:"danger"},on:{click:function(t){return e.close()}}},[e._v(e._s(e.__("Close")))])],1),e._v(" "),r("div",{staticClass:"px-1"},[r("ns-button",{attrs:{type:"info"},on:{click:function(t){return e.proceed()}}},[e._v(e._s(e.__("Proceed")))])],1)])])]),e._v(" "),0===e.isSubmiting?r("div",{staticClass:"h-full w-full absolute flex items-center justify-center",staticStyle:{background:"rgb(0 98 171 / 45%)"}},[r("ns-spinner")],1):e._e()])}),[],!1,null,null,null).exports;var f=r(5450),p=r(419),h=r(6386);const v={name:"ns-pos-customers",data:function(){return{activeTab:"create-customers",customer:null,subscription:null,orders:[],selectedTab:"orders",isLoadingCoupons:!1,coupons:[],order:null}},mounted:function(){var e=this;this.closeWithOverlayClicked(),this.subscription=POS.order.subscribe((function(t){e.order=t,void 0!==e.$popupParams.customer?(e.activeTab="account-payment",e.customer=e.$popupParams.customer,e.loadCustomerOrders(e.customer.id)):void 0!==t.customer&&(e.activeTab="account-payment",e.customer=t.customer,e.loadCustomerOrders(e.customer.id))})),this.popupCloser()},methods:{__:l.__,popupResolver:h.Z,popupCloser:s.Z,getType:function(e){switch(e){case"percentage_discount":return(0,l.__)("Percentage Discount");case"flat_discount":return(0,l.__)("Flat Discount")}},closeWithOverlayClicked:s.Z,doChangeTab:function(e){this.selectedTab=e,"coupons"===e&&this.loadCoupons()},loadCoupons:function(){var e=this;this.isLoadingCoupons=!0,n.ih.get("/api/nexopos/v4/customers/".concat(this.customer.id,"/coupons")).subscribe({next:function(t){e.coupons=t,e.isLoadingCoupons=!1},error:function(t){e.isLoadingCoupons=!1}})},allowedForPayment:function(e){return["unpaid","partially_paid","hold"].includes(e.payment_status)},prefillForm:function(e){void 0!==this.$popupParams.name&&(e.main.value=this.$popupParams.name)},openCustomerSelection:function(){this.$popup.close(),i.G.show(o.Z)},loadCustomerOrders:function(e){var t=this;n.ih.get("/api/nexopos/v4/customers/".concat(e,"/orders")).subscribe((function(e){t.orders=e}))},newTransaction:function(e){new Promise((function(t,r){i.G.show(d,{customer:e,resolve:t,reject:r})})).then((function(t){POS.loadCustomer(e.id).subscribe((function(e){POS.selectCustomer(e)}))}))},applyCoupon:function(e){var t=this;void 0===this.order.customer?i.G.show(p.Z,{title:(0,l.__)("Use Customer ?"),message:(0,l.__)("No customer is selected. Would you like to proceed with this customer ?"),onAction:function(r){r&&POS.selectCustomer(t.customer).then((function(r){t.proceedApplyingCoupon(e)}))}}):this.order.customer.id===this.customer.id?this.proceedApplyingCoupon(e):this.order.customer.id!==this.customer.id&&i.G.show(p.Z,{title:(0,l.__)("Change Customer ?"),message:(0,l.__)("Would you like to assign this customer to the ongoing order ?"),onAction:function(r){r&&POS.selectCustomer(t.customer).then((function(r){t.proceedApplyingCoupon(e)}))}})},proceedApplyingCoupon:function(e){var t=this;new Promise((function(t,r){i.G.show(f.Z,{apply_coupon:e.code,resolve:t,reject:r})})).then((function(e){t.popupResolver(!1)})).catch((function(e){}))},handleSavedCustomer:function(e){n.kX.success(e.message).subscribe(),POS.selectCustomer(e.entry),this.$popup.close()}}};const b=(0,u.Z)(v,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"bg-white shadow-lg rounded w-95vw h-95vh lg:w-3/5-screen flex flex-col overflow-hidden"},[r("div",{staticClass:"p-2 flex justify-between items-center border-b border-gray-400"},[r("h3",{staticClass:"font-semibold text-gray-700"},[e._v(e._s(e.__("Customers")))]),e._v(" "),r("div",[r("ns-close-button",{on:{click:function(t){return e.$popup.close()}}})],1)]),e._v(" "),r("div",{staticClass:"flex-auto flex p-2 bg-gray-200 overflow-y-auto"},[r("ns-tabs",{attrs:{active:e.activeTab},on:{active:function(t){e.activeTab=t}}},[r("ns-tabs-item",{attrs:{identifier:"create-customers",label:"New Customer"}},[r("ns-crud-form",{attrs:{"submit-url":"/api/nexopos/v4/crud/ns.customers",src:"/api/nexopos/v4/crud/ns.customers/form-config"},on:{updated:function(t){return e.prefillForm(t)},save:function(t){return e.handleSavedCustomer(t)}},scopedSlots:e._u([{key:"title",fn:function(){return[e._v(e._s(e.__("Customer Name")))]},proxy:!0},{key:"save",fn:function(){return[e._v(e._s(e.__("Save Customer")))]},proxy:!0}])})],1),e._v(" "),r("ns-tabs-item",{staticClass:"flex",staticStyle:{padding:"0!important"},attrs:{identifier:"account-payment",label:e.__("Customer Account")}},[null===e.customer?r("div",{staticClass:"flex-auto w-full flex items-center justify-center flex-col p-4"},[r("i",{staticClass:"lar la-frown text-6xl text-gray-700"}),e._v(" "),r("h3",{staticClass:"font-medium text-2xl text-gray-700"},[e._v(e._s(e.__("No Customer Selected")))]),e._v(" "),r("p",{staticClass:"text-gray-600"},[e._v(e._s(e.__("In order to see a customer account, you need to select one customer.")))]),e._v(" "),r("div",{staticClass:"my-2"},[r("ns-button",{attrs:{type:"info"},on:{click:function(t){return e.openCustomerSelection()}}},[e._v(e._s(e.__("Select Customer")))])],1)]):e._e(),e._v(" "),e.customer?r("div",{staticClass:"flex flex-col flex-auto"},[r("div",{staticClass:"flex-auto p-2 flex flex-col"},[r("div",{staticClass:"-mx-4 flex flex-wrap"},[r("div",{staticClass:"px-4 mb-4 w-full"},[r("h2",{staticClass:"font-semibold text-gray-700"},[e._v(e._s(e.__("Summary For"))+" : "+e._s(e.customer.name))])]),e._v(" "),r("div",{staticClass:"px-4 mb-4 w-full md:w-1/3"},[r("div",{staticClass:"rounded-lg shadow bg-transparent bg-gradient-to-br from-green-400 to-green-700 p-2 flex flex-col text-white"},[r("h3",{staticClass:"font-medium text-lg"},[e._v(e._s(e.__("Total Purchases")))]),e._v(" "),r("div",{staticClass:"w-full flex justify-end"},[r("h2",{staticClass:"text-2xl font-bold"},[e._v(e._s(e._f("currency")(e.customer.purchases_amount)))])])])]),e._v(" "),r("div",{staticClass:"px-4 mb-4 w-full md:w-1/3"},[r("div",{staticClass:"rounded-lg shadow bg-transparent bg-gradient-to-br from-red-500 to-red-700 p-2 text-white"},[r("h3",{staticClass:"font-medium text-lg"},[e._v(e._s(e.__("Total Owed")))]),e._v(" "),r("div",{staticClass:"w-full flex justify-end"},[r("h2",{staticClass:"text-2xl font-bold"},[e._v(e._s(e._f("currency")(e.customer.owed_amount)))])])])]),e._v(" "),r("div",{staticClass:"px-4 mb-4 w-full md:w-1/3"},[r("div",{staticClass:"rounded-lg shadow bg-transparent bg-gradient-to-br from-blue-500 to-blue-700 p-2 text-white"},[r("h3",{staticClass:"font-medium text-lg"},[e._v(e._s(e.__("Account Amount")))]),e._v(" "),r("div",{staticClass:"w-full flex justify-end"},[r("h2",{staticClass:"text-2xl font-bold"},[e._v(e._s(e._f("currency")(e.customer.account_amount)))])])])])]),e._v(" "),r("div",{staticClass:"flex flex-auto flex-col overflow-hidden"},[r("ns-tabs",{attrs:{active:e.selectedTab},on:{changeTab:function(t){return e.doChangeTab(t)}}},[r("ns-tabs-item",{attrs:{identifier:"orders",label:e.__("Orders")}},[r("div",{staticClass:"py-2 w-full"},[r("h2",{staticClass:"font-semibold text-gray-700"},[e._v(e._s(e.__("Last Purchases")))])]),e._v(" "),r("div",{staticClass:"flex-auto flex-col flex overflow-hidden"},[r("div",{staticClass:"flex-auto overflow-y-auto"},[r("table",{staticClass:"table w-full"},[r("thead",[r("tr",{staticClass:"text-gray-700"},[r("th",{staticClass:"p-2 border border-gray-200 bg-gray-100 font-semibold",attrs:{width:"150"}},[e._v(e._s(e.__("Order")))]),e._v(" "),r("th",{staticClass:"p-2 border border-gray-200 bg-gray-100 font-semibold"},[e._v(e._s(e.__("Total")))]),e._v(" "),r("th",{staticClass:"p-2 border border-gray-200 bg-gray-100 font-semibold"},[e._v(e._s(e.__("Status")))]),e._v(" "),r("th",{staticClass:"p-2 border border-gray-200 bg-gray-100 font-semibold",attrs:{width:"50"}},[e._v(e._s(e.__("Options")))])])]),e._v(" "),r("tbody",{staticClass:"text-gray-700"},[0===e.orders.length?r("tr",[r("td",{staticClass:"border border-gray-200 p-2 text-center",attrs:{colspan:"4"}},[e._v(e._s(e.__("No orders...")))])]):e._e(),e._v(" "),e._l(e.orders,(function(t){return r("tr",{key:t.id},[r("td",{staticClass:"border border-gray-200 p-2 text-center"},[e._v(e._s(t.code))]),e._v(" "),r("td",{staticClass:"border border-gray-200 p-2 text-center"},[e._v(e._s(e._f("currency")(t.total)))]),e._v(" "),r("td",{staticClass:"border border-gray-200 p-2 text-right"},[e._v(e._s(t.human_status))]),e._v(" "),r("td",{staticClass:"border border-gray-200 p-2 text-center"},[e.allowedForPayment(t)?r("button",{staticClass:"hover:bg-blue-400 hover:border-transparent hover:text-white rounded-full h-8 px-2 flex items-center justify-center border border-gray bg-white"},[r("i",{staticClass:"las la-wallet"}),e._v(" "),r("span",{staticClass:"ml-1"},[e._v(e._s(e.__("Payment")))])]):e._e()])])}))],2)])])])]),e._v(" "),r("ns-tabs-item",{attrs:{identifier:"coupons",label:e.__("Coupons")}},[e.isLoadingCoupons?r("div",{staticClass:"flex-auto h-full justify-center flex items-center"},[r("ns-spinner",{attrs:{size:"36"}})],1):e._e(),e._v(" "),e.isLoadingCoupons?e._e():[r("div",{staticClass:"py-2 w-full"},[r("h2",{staticClass:"font-semibold text-gray-700"},[e._v(e._s(e.__("Coupons")))])]),e._v(" "),r("div",{staticClass:"flex-auto flex-col flex overflow-hidden"},[r("div",{staticClass:"flex-auto overflow-y-auto"},[r("table",{staticClass:"table w-full"},[r("thead",[r("tr",{staticClass:"text-gray-700"},[r("th",{staticClass:"p-2 border border-gray-200 bg-gray-100 font-semibold",attrs:{width:"150"}},[e._v(e._s(e.__("Name")))]),e._v(" "),r("th",{staticClass:"p-2 border border-gray-200 bg-gray-100 font-semibold"},[e._v(e._s(e.__("Type")))]),e._v(" "),r("th",{staticClass:"p-2 border border-gray-200 bg-gray-100 font-semibold"})])]),e._v(" "),r("tbody",{staticClass:"text-gray-700 text-sm"},[0===e.coupons.length?r("tr",[r("td",{staticClass:"border border-gray-200 p-2 text-center",attrs:{colspan:"4"}},[e._v(e._s(e.__("No coupons for the selected customer...")))])]):e._e(),e._v(" "),e._l(e.coupons,(function(t){return r("tr",{key:t.id},[r("td",{staticClass:"border border-gray-200 p-2",attrs:{width:"300"}},[r("h3",[e._v(e._s(t.name))]),e._v(" "),r("div",{},[r("ul",{staticClass:"-mx-2 flex"},[r("li",{staticClass:"text-xs text-gray-600 px-2"},[e._v(e._s(e.__("Usage :"))+" "+e._s(t.usage)+"/"+e._s(t.limit_usage))]),e._v(" "),r("li",{staticClass:"text-xs text-gray-600 px-2"},[e._v(e._s(e.__("Code :"))+" "+e._s(t.code))])])])]),e._v(" "),r("td",{staticClass:"border border-gray-200 p-2 text-center"},[e._v(e._s(e.getType(t.coupon.type))+" \n "),"percentage_discount"===t.coupon.type?r("span",[e._v("\n ("+e._s(t.coupon.discount_value)+"%)\n ")]):e._e(),e._v(" "),"flat_discount"===t.coupon.type?r("span",[e._v("\n ("+e._s(e._f("currency")(t.coupon.discount_value))+")\n ")]):e._e()]),e._v(" "),r("td",{staticClass:"border border-gray-200 p-2 text-right"},[r("ns-button",{attrs:{type:"info"},on:{click:function(r){return e.applyCoupon(t)}}},[e._v(e._s(e.__("Use Coupon")))])],1)])}))],2)])])])]],2)],1)],1)]),e._v(" "),r("div",{staticClass:"p-2 border-t border-gray-400 flex justify-between"},[r("div"),e._v(" "),r("div",[r("ns-button",{attrs:{type:"info"},on:{click:function(t){return e.newTransaction(e.customer)}}},[e._v(e._s(e.__("Account Transaction")))])],1)])]):e._e()])],1)],1)])}),[],!1,null,null,null).exports},1957:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const s={name:"ns-pos-loading-popup"};const n=(0,r(1900).Z)(s,(function(){var e=this.$createElement;return(this._self._c||e)("ns-spinner")}),[],!1,null,null,null).exports},3625:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var s=r(7757),n=r.n(s),i=r(6386);r(3661);function o(e,t,r,s,n,i,o){try{var a=e[i](o),l=a.value}catch(e){return void r(e)}a.done?t(l):Promise.resolve(l).then(s,n)}const a={data:function(){return{types:[],typeSubscription:null}},mounted:function(){var e=this;this.$popup.event.subscribe((function(t){"click-overlay"===t.event&&e.resolveIfQueued(!1)})),this.typeSubscription=POS.types.subscribe((function(t){e.types=t}))},destroyed:function(){this.typeSubscription.unsubscribe()},methods:{__:r(7389).__,resolveIfQueued:i.Z,select:function(e){var t,r=this;return(t=n().mark((function t(){var s;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return Object.values(r.types).forEach((function(e){return e.selected=!1})),r.types[e].selected=!0,s=r.types[e],POS.types.next(r.types),t.next=6,POS.triggerOrderTypeSelection(s);case 6:r.resolveIfQueued(s);case 7:case"end":return t.stop()}}),t)})),function(){var e=this,r=arguments;return new Promise((function(s,n){var i=t.apply(e,r);function a(e){o(i,s,n,a,l,"next",e)}function l(e){o(i,s,n,a,l,"throw",e)}a(void 0)}))})()}}};const l=(0,r(1900).Z)(a,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"h-full w-4/5-screen md:w-2/5-screen lg:w-2/5-screen xl:w-2/6-screen bg-white shadow-lg"},[r("div",{staticClass:"h-16 flex justify-center items-center",attrs:{id:"header"}},[r("h3",{staticClass:"font-bold text-gray-700"},[e._v(e._s(e.__("Define The Order Type")))])]),e._v(" "),r("div",{staticClass:"grid grid-flow-row grid-cols-2 grid-rows-2"},e._l(e.types,(function(t){return r("div",{key:t.identifier,staticClass:"hover:bg-blue-100 h-56 flex items-center justify-center flex-col cursor-pointer border border-gray-200",class:t.selected?"bg-blue-100":"",on:{click:function(r){return e.select(t.identifier)}}},[r("img",{staticClass:"w-32 h-32",attrs:{src:t.icon,alt:""}}),e._v(" "),r("h4",{staticClass:"font-semibold text-xl my-2 text-gray-700"},[e._v(e._s(t.label))])])})),0)])}),[],!1,null,null,null).exports},9531:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var s=r(162),n=r(7389);function i(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,s=new Array(t);rparseFloat(i.$quantities().quantity)-a)return s.kX.error((0,n.__)("Unable to add the product, there is not enough stock. Remaining %s").replace("%s",i.$quantities().quantity-a)).subscribe()}this.resolve({quantity:o})}else"backspace"===e.identifier?this.allSelected?(this.finalValue=0,this.allSelected=!1):(this.finalValue=this.finalValue.toString(),this.finalValue=this.finalValue.substr(0,this.finalValue.length-1)||0):this.allSelected?(this.finalValue=e.value,this.finalValue=parseFloat(this.finalValue),this.allSelected=!1):(this.finalValue+=""+e.value,this.finalValue=parseFloat(this.finalValue))},resolve:function(e){this.$popupParams.resolve(e),this.$popup.close()}}};const l=(0,r(1900).Z)(a,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"bg-white shadow min-h-2/5-screen w-3/4-screen md:w-3/5-screen lg:w-2/5-screen xl:w-2/5-screen relative"},[e.isLoading?r("div",{staticClass:"flex w-full h-full absolute top-O left-0 items-center justify-center",staticStyle:{background:"rgb(202 202 202 / 49%)"},attrs:{id:"loading-overlay"}},[r("ns-spinner")],1):e._e(),e._v(" "),r("div",{staticClass:"flex-shrink-0 py-2 border-b border-gray-200"},[r("h1",{staticClass:"text-xl font-bold text-gray-700 text-center"},[e._v(e._s(e.__("Define Quantity")))])]),e._v(" "),r("div",{staticClass:"h-16 border-b bg-gray-800 text-white border-gray-200 flex items-center justify-center",attrs:{id:"screen"}},[r("h1",{staticClass:"font-bold text-3xl"},[e._v(e._s(e.finalValue))])]),e._v(" "),r("div",{staticClass:"grid grid-flow-row grid-cols-3 grid-rows-3",attrs:{id:"numpad"}},e._l(e.keys,(function(t,s){return r("div",{key:s,staticClass:"hover:bg-blue-400 hover:text-white hover:border-blue-600 text-xl font-bold border border-gray-200 h-24 flex items-center justify-center cursor-pointer",on:{click:function(r){return e.inputValue(t)}}},[void 0!==t.value?r("span",[e._v(e._s(t.value))]):e._e(),e._v(" "),t.icon?r("i",{staticClass:"las",class:t.icon}):e._e()])})),0)])}),[],!1,null,null,null).exports},3661:(e,t,r)=>{"use strict";r.d(t,{Z:()=>u});var s=r(162),n=r(6386),i=r(7266);function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,s)}return r}function a(e){for(var t=1;t{e.O(0,[898],(()=>{return t=9572,e(e.s=t);var t}));e.O()}]); +(self.webpackChunkNexoPOS_4x=self.webpackChunkNexoPOS_4x||[]).push([[159],{162:(e,t,r)=>{"use strict";r.d(t,{l:()=>I,kq:()=>G,ih:()=>N,kX:()=>L});var s=r(6486),n=r(9669),i=r(2181),o=r(8345),a=r(9624),l=r(9248),c=r(230);function u(e,t){for(var r=0;r2&&void 0!==arguments[2]?arguments[2]:{};return this._request("post",e,t,r)}},{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._request("get",e,void 0,t)}},{key:"delete",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._request("delete",e,void 0,t)}},{key:"put",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this._request("put",e,t,r)}},{key:"response",get:function(){return this._lastRequestData}},{key:"_request",value:function(e,t){var r=this,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return t=G.applyFilters("http-client-url",t.replace(/\/$/,"")),this._subject.next({identifier:"async.start",url:t,data:s}),new c.y((function(i){r._client[e](t,s,Object.assign(Object.assign({},r._client.defaults[e]),n)).then((function(e){r._lastRequestData=e,i.next(e.data),i.complete(),r._subject.next({identifier:"async.stop"})})).catch((function(e){var t;i.error((null===(t=e.response)||void 0===t?void 0:t.data)||e.response||e),r._subject.next({identifier:"async.stop"})}))}))}},{key:"subject",value:function(){return this._subject}},{key:"emit",value:function(e){var t=e.identifier,r=e.value;this._subject.next({identifier:t,value:r})}}])&&u(t.prototype,r),s&&u(t,s),e}(),f=r(3);function p(e,t){for(var r=0;r=1e3){for(var r,s=Math.floor((""+e).length/3),n=2;n>=1;n--){if(((r=parseFloat((0!=s?e/Math.pow(1e3,s):e).toPrecision(n)))+"").replace(/[^a-zA-Z 0-9]+/g,"").length<=2)break}r%1!=0&&(r=r.toFixed(1)),t=r+["","k","m","b","t"][s]}return t})),P=r(1356),O=r(9698);function $(e,t){for(var r=0;r0&&window.outerWidth<=480:this.breakpoint="xs";break;case window.outerWidth>480&&window.outerWidth<=640:this.breakpoint="sm";break;case window.outerWidth>640&&window.outerWidth<=1024:this.breakpoint="md";break;case window.outerWidth>1024&&window.outerWidth<=1280:this.breakpoint="lg";break;case window.outerWidth>1280:this.breakpoint="xl"}}}])&&Z(t.prototype,r),s&&Z(t,s),e}()),X=new m({sidebar:["xs","sm","md"].includes(R.breakpoint)?"hidden":"visible"});N.defineClient(n),window.nsEvent=I,window.nsHttpClient=N,window.nsSnackBar=L,window.nsCurrency=P.W,window.nsTruncate=O.b,window.nsRawCurrency=P.f,window.nsAbbreviate=S,window.nsState=X,window.nsUrl=M,window.nsScreen=R,window.ChartJS=i,window.EventEmitter=h,window.Popup=x.G,window.RxJS=_,window.FormValidation=C.Z,window.nsCrudHandler=z},4364:(e,t,r)=>{"use strict";r.r(t),r.d(t,{nsAvatar:()=>z,nsButton:()=>a,nsCheckbox:()=>p,nsCkeditor:()=>D,nsCloseButton:()=>O,nsCrud:()=>b,nsCrudForm:()=>y,nsDate:()=>j,nsDateTimePicker:()=>q.V,nsDatepicker:()=>G,nsField:()=>w,nsIconButton:()=>$,nsInput:()=>c,nsLink:()=>l,nsMediaInput:()=>P,nsMenu:()=>i,nsMultiselect:()=>C,nsNumpad:()=>I.Z,nsSelect:()=>u.R,nsSelectAudio:()=>f,nsSpinner:()=>g,nsSubmenu:()=>o,nsSwitch:()=>k,nsTableRow:()=>m,nsTabs:()=>F,nsTabsItem:()=>Z,nsTextarea:()=>x});var s=r(538),n=r(162),i=s.default.component("ns-menu",{data:function(){return{defaultToggledState:!1,_save:0}},props:["href","label","icon","notification","toggled","identifier"],template:'\n \n ',mounted:function(){var e=this;this.defaultToggledState=void 0!==this.toggled?this.toggled:this.defaultToggledState,n.l.subject().subscribe((function(t){t.value!==e.identifier&&(e.defaultToggledState=!1)}))},methods:{toggleEmit:function(){var e=this;this.toggle().then((function(t){t&&n.l.emit({identifier:"side-menu.open",value:e.identifier})}))},toggle:function(){var e=this;return new Promise((function(t,r){0===e.href.length&&(e.defaultToggledState=!e.defaultToggledState,t(e.defaultToggledState))}))}}}),o=s.default.component("ns-submenu",{data:function(){return{}},props:["href","label","active"],mounted:function(){},template:'\n
    \n
  • \n \n \n \n
  • \n
    \n '}),a=s.default.component("ns-button",{data:function(){return{clicked:!1,_save:0}},props:["type","disabled","link","href","routerLink","to"],template:'\n
    \n \n \n \n
    \n ',mounted:function(){},computed:{isDisabled:function(){return this.disabled&&(0===this.disabled.length||"disabled"===this.disabled||this.disabled)},buttonclass:function(){var e;switch(this.type){case"info":e="".concat(this.isDisabled?"bg-gray-400 border border-gray-500 cursor-not-allowed text-gray-600":"shadow bg-blue-400 text-white");break;case"success":e="".concat(this.isDisabled?"bg-gray-400 border border-gray-500 cursor-not-allowed text-gray-600":"shadow bg-green-400 text-white");break;case"danger":e="".concat(this.isDisabled?"bg-gray-400 border border-gray-500 cursor-not-allowed text-gray-600":"shadow bg-red-400 text-white");break;case"warning":e="".concat(this.isDisabled?"bg-gray-400 border border-gray-500 cursor-not-allowed text-gray-600":"shadow bg-orange-400 text-white");break;default:e="".concat(this.isDisabled?"bg-gray-400 border border-gray-500 cursor-not-allowed text-gray-600":"shadow bg-white text-gray-800")}return e}}}),l=s.default.component("ns-link",{data:function(){return{clicked:!1,_save:0}},props:["type","to","href"],template:'\n
    \n \n \n
    \n ',computed:{buttonclass:function(){switch(this.type){case"info":return"shadow bg-blue-400 text-white";case"success":return"shadow bg-green-400 text-white";case"danger":return"shadow bg-red-400 text-white";case"warning":return"shadow bg-orange-400 text-white";default:return"shadow bg-white text-gray-800"}}}}),c=s.default.component("ns-input",{data:function(){return{}},mounted:function(){},computed:{hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},disabledClass:function(){return this.field.disabled?"bg-gray-200 cursor-not-allowed":"bg-transparent"},inputClass:function(){return this.disabledClass+" "+this.leadClass},leadClass:function(){return this.leading?"pl-8":"px-4"}},props:["placeholder","leading","type","field"],template:'\n
    \n \n
    \n
    \n \n {{ leading }}\n \n
    \n \n
    \n

    \n

    \n This field is required.\n This field must contain a valid email address.\n {{ error.message }}\n

    \n
    \n '}),u=r(4451),d=r(7389),f=s.default.component("ns-select-audio",{data:function(){return{}},props:["name","placeholder","field"],computed:{hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},disabledClass:function(){return this.field.disabled?"bg-gray-200 cursor-not-allowed":"bg-transparent"},inputClass:function(){return this.disabledClass+" "+this.leadClass},leadClass:function(){return this.leading?"pl-8":"px-4"}},methods:{__:d.__,playSelectedSound:function(){this.field.value.length>0&&new Audio(this.field.value).play()}},template:'\n
    \n \n
    \n
    \n \n
    \n \n
    \n

    \n

    \n {{ __( \'This field is required.\' ) }}\n {{ __( \'This field must contain a valid email address.\' ) }}\n {{ error.message }}\n

    \n
    \n '}),p=s.default.component("ns-checkbox",{data:function(){return{}},props:["checked","field","label"],template:'\n
    \n
    \n \n
    \n {{ label }}\n {{ field.label }}\n
    \n ',computed:{isChecked:function(){return this.field?this.field.value:this.checked}},methods:{toggleIt:function(){void 0!==this.field&&(this.field.value=!this.field.value),this.$emit("change",!this.checked)}}}),h=r(2242),v=r(419),b=s.default.component("ns-crud",{data:function(){return{isRefreshing:!1,sortColumn:"",searchInput:"",searchQuery:"",page:1,bulkAction:"",bulkActions:[],columns:[],selectedEntries:[],globallyChecked:!1,result:{current_page:null,data:[],first_page_url:null,from:null,last_page:null,last_page_url:null,next_page_url:null,path:null,per_page:null,prev_page_url:null,to:null,total:null}}},mounted:function(){void 0!==this.identifier&&nsCrudHandler.defineInstance(this.identifier,this),this.loadConfig()},props:["src","create-url","mode","identifier","queryParams"],computed:{getParsedSrc:function(){return"".concat(this.src,"?").concat(this.sortColumn).concat(this.searchQuery).concat(this.queryPage).concat(this.getQueryParams()?"&"+this.getQueryParams():"")},getSelectedAction:function(){var e=this,t=this.bulkActions.filter((function(t){return t.identifier===e.bulkAction}));return t.length>0&&t[0]},pagination:function(){return this.result?this.pageNumbers(this.result.last_page,this.result.current_page):[]},queryPage:function(){return this.result?"&page=".concat(this.page):""},resultInfo:function(){return(0,d.__)("displaying {perPage} on {items} items").replace("{perPage}",this.result.total).replace("{items}",this.result.total)}},methods:{__:d.__,getQueryParams:function(){var e=this;return this.queryParams?Object.keys(this.queryParams).map((function(t){return"".concat(t,"=").concat(e.queryParams[t])})).join("&"):""},pageNumbers:function(e,t){var r=[];return t>e-3?r.push(e-2,e-1,e):r.push(t,t+1,t+2,"...",e),r.filter((function(e){return e>0||"string"==typeof e}))},downloadContent:function(){n.ih.post("".concat(this.src,"/export?").concat(this.getQueryParams()),{entries:this.selectedEntries.map((function(e){return e.$id}))}).subscribe((function(e){setTimeout((function(){return document.location=e.url}),300),n.kX.success((0,d.__)("The document has been generated.")).subscribe()}),(function(e){n.kX.error(e.message||(0,d.__)("Unexpected error occured.")).subscribe()}))},clearSelectedEntries:function(){var e=this;h.G.show(v.Z,{title:(0,d.__)("Clear Selected Entries ?"),message:(0,d.__)("Would you like to clear all selected entries ?"),onAction:function(t){t&&(e.selectedEntries=[])}})},refreshRow:function(e){if(!0===e.$checked){0===this.selectedEntries.filter((function(t){return t.$id===e.$id})).length&&this.selectedEntries.push(e)}else{var t=this.selectedEntries.filter((function(t){return t.$id===e.$id}));if(t.length>0){var r=this.selectedEntries.indexOf(t[0]);this.selectedEntries.splice(r,1)}}},handleShowOptions:function(e){this.result.data.forEach((function(t){t.$id!==e.$id&&(t.$toggled=!1)}))},handleGlobalChange:function(e){var t=this;this.globallyChecked=e,this.result.data.forEach((function(r){r.$checked=e,t.refreshRow(r)}))},loadConfig:function(){var e=this;n.ih.get("".concat(this.src,"/config?").concat(this.getQueryParams())).subscribe((function(t){e.columns=t.columns,e.bulkActions=t.bulkActions,e.refresh()}),(function(e){n.kX.error(e.message,"OK",{duration:!1}).subscribe()}))},cancelSearch:function(){this.searchInput="",this.search()},search:function(){this.searchInput?this.searchQuery="&search=".concat(this.searchInput):this.searchQuery="",this.refresh()},sort:function(e){for(var t in this.columns)t!==e&&(this.columns[t].$sorted=!1,this.columns[t].$direction="");switch(this.columns[e].$sorted=!0,this.columns[e].$direction){case"asc":this.columns[e].$direction="desc";break;case"desc":this.columns[e].$direction="";break;case"":this.columns[e].$direction="asc"}["asc","desc"].includes(this.columns[e].$direction)?this.sortColumn="active=".concat(e,"&direction=").concat(this.columns[e].$direction):this.sortColumn="",this.$emit("sort",this.columns[e]),this.refresh()},bulkDo:function(){var e=this;return this.bulkAction?this.selectedEntries.length>0?confirm(this.getSelectedAction.confirm||this.$slots["error-bulk-confirmation"]||(0,d.__)("Would you like to perform the selected bulk action on the selected entries ?"))?n.ih.post("".concat(this.src,"/bulk-actions"),{action:this.bulkAction,entries:this.selectedEntries.map((function(e){return e.$id}))}).subscribe({next:function(t){n.kX.info(t.message).subscribe(),e.selectedEntries=[],e.refresh()},error:function(e){n.kX.error(e.message).subscribe()}}):void 0:n.kX.error(this.$slots["error-no-selection"]?this.$slots["error-no-selection"][0].text:(0,d.__)("No selection has been made.")).subscribe():n.kX.error(this.$slots["error-no-action"]?this.$slots["error-no-action"][0].text:(0,d.__)("No action has been selected.")).subscribe()},refresh:function(){var e=this;this.globallyChecked=!1,this.isRefreshing=!0,n.ih.get("".concat(this.getParsedSrc)).subscribe((function(t){t.data=t.data.map((function(t){return e.selectedEntries.filter((function(e){return e.$id===t.$id})).length>0&&(t.$checked=!0),t})),e.isRefreshing=!1,e.result=t,e.page=t.current_page}),(function(t){e.isRefreshing=!1,n.kX.error(t.message).subscribe()}))}},template:'\n
    \n
    \n \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \n \n
    \n {{ column.label }}\n \n \n \n \n
    \n
    {{ __( \'There is nothing to display...\' ) }}
    \n
    \n
    \n
    \n
    \n \n \n
    \n
    \n
    {{ resultInfo }}
    \n \n
    \n
    \n
    \n '}),m=s.default.component("ns-table-row",{props:["options","row","columns"],data:function(){return{optionsToggled:!1}},mounted:function(){},methods:{sanitizeHTML:function(e){var t=document.createElement("div");t.innerHTML=e;for(var r=t.getElementsByTagName("script"),s=r.length;s--;)r[s].parentNode.removeChild(r[s]);return t.innerHTML},getElementOffset:function(e){var t=e.getBoundingClientRect();return{top:t.top+window.pageYOffset,left:t.left+window.pageXOffset}},toggleMenu:function(e){var t=this;if(this.row.$toggled=!this.row.$toggled,this.$emit("toggled",this.row),this.row.$toggled)setTimeout((function(){var e=t.$el.querySelectorAll(".relative > .absolute")[0],r=t.$el.querySelectorAll(".relative")[0],s=t.getElementOffset(r);e.style.top=s.top+"px",e.style.left=s.left+"px",r.classList.remove("relative"),r.classList.add("dropdown-holder")}),100);else{var r=this.$el.querySelectorAll(".dropdown-holder")[0];r.classList.remove("dropdown-holder"),r.classList.add("relative")}},handleChanged:function(e){this.row.$checked=e,this.$emit("updated",this.row)},triggerAsync:function(e){var t=this;e.confirm?confirm(e.confirm.message)&&n.ih[e.type.toLowerCase()](e.url).subscribe((function(e){n.kX.success(e.message).subscribe(),t.$emit("reload",t.row)}),(function(e){t.toggleMenu(),n.kX.error(e.message).subscribe()})):(n.l.emit({identifier:"ns-table-row-action",value:{action:e,row:this.row,component:this}}),this.toggleMenu())}},template:'\n \n \n \n \n \n \n \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n \n \n '}),g=s.default.component("ns-spinner",{data:function(){return{}},mounted:function(){},computed:{validatedSize:function(){return this.size||24},validatedBorder:function(){return this.border||8},validatedAnimation:function(){return this.animation||"fast"}},props:["color","size","border"],template:"\n
    \n
    \n
    \n "}),_=r(7266),y=s.default.component("ns-crud-form",{data:function(){return{form:{},globallyChecked:!1,formValidation:new _.Z,rows:[]}},mounted:function(){this.loadForm()},props:["src","create-url","field-class","return-url","submit-url","submit-method","disable-tabs"],computed:{activeTabFields:function(){for(var e in this.form.tabs)if(this.form.tabs[e].active)return this.form.tabs[e].fields;return[]}},methods:{toggle:function(e){for(var t in this.form.tabs)this.form.tabs[t].active=!1;this.form.tabs[e].active=!0},handleShowOptions:function(e){this.rows.forEach((function(t){t.$id!==e.$id&&(t.$toggled=!1)}))},submit:function(){var e=this;return this.formValidation.validateForm(this.form).length>0?n.kX.error(this.$slots["error-invalid-form"]?this.$slots["error-invalid-form"][0].text:"No error message provided for having an invalid form.",this.$slots.okay?this.$slots.okay[0].text:"OK").subscribe():(this.formValidation.disableForm(this.form),void 0===this.submitUrl?n.kX.error(this.$slots["error-no-submit-url"]?this.$slots["error-no-submit-url"][0].text:"No error message provided for not having a valid submit url.",this.$slots.okay?this.$slots.okay[0].text:"OK").subscribe():void n.ih[this.submitMethod?this.submitMethod.toLowerCase():"post"](this.submitUrl,this.formValidation.extractForm(this.form)).subscribe((function(t){if("success"===t.status){if(e.returnUrl&&e.returnUrl.length>0)return document.location=e.returnUrl;e.$emit("save",t)}e.formValidation.enableForm(e.form)}),(function(t){n.kX.error(t.message,void 0,{duration:5e3}).subscribe(),e.formValidation.triggerError(e.form,t),e.formValidation.enableForm(e.form)})))},handleGlobalChange:function(e){this.globallyChecked=e,this.rows.forEach((function(t){return t.$checked=e}))},loadForm:function(){var e=this;n.ih.get("".concat(this.src)).subscribe({next:function(t){e.form=e.parseForm(t.form),n.kq.doAction("ns-crud-form-loaded",e),e.$emit("updated",e.form)},error:function(e){n.kX.error(e.message,"OKAY",{duration:0}).subscribe()}})},parseForm:function(e){e.main.value=void 0===e.main.value?"":e.main.value,e.main=this.formValidation.createFields([e.main])[0];var t=0;for(var r in e.tabs)0===t&&(e.tabs[r].active=!0),e.tabs[r].active=void 0!==e.tabs[r].active&&e.tabs[r].active,e.tabs[r].fields=this.formValidation.createFields(e.tabs[r].fields),t++;return e}},template:'\n
    \n
    \n \n
    \n
    \n
    \n
    \n \n
    \n Return\n
    \n
    \n \n
    \n
    \n
    \n
    {{ tab.label }}
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n '}),x=s.default.component("ns-textarea",{data:function(){return{}},mounted:function(){},computed:{hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},disabledClass:function(){return this.field.disabled?"bg-gray-200 cursor-not-allowed":"bg-transparent"},inputClass:function(){return this.disabledClass+" "+this.leadClass},leadClass:function(){return this.leading?"p-8":"p-2"}},props:["placeholder","leading","type","field"],template:'\n
    \n \n
    \n
    \n \n {{ leading }}\n \n
    \n \n
    \n

    \n

    \n This field is required.\n This field must contain a valid email address.\n {{ error.message }}\n

    \n
    \n '}),w=s.default.component("ns-field",{data:function(){return{}},mounted:function(){},computed:{isInputField:function(){return["text","password","email","number","tel"].includes(this.field.type)},isDateField:function(){return["date"].includes(this.field.type)},isSelectField:function(){return["select"].includes(this.field.type)},isTextarea:function(){return["textarea"].includes(this.field.type)},isCheckbox:function(){return["checkbox"].includes(this.field.type)},isMultiselect:function(){return["multiselect"].includes(this.field.type)},isSelectAudio:function(){return["select-audio"].includes(this.field.type)},isSwitch:function(){return["switch"].includes(this.field.type)},isMedia:function(){return["media"].includes(this.field.type)},isCkEditor:function(){return["ckeditor"].includes(this.field.type)},isDateTimePicker:function(){return["datetimepicker"].includes(this.field.type)},isCustom:function(){return["custom"].includes(this.field.type)}},props:["field"],methods:{addOption:function(e){"select"===this.field.type&&this.field.options.forEach((function(e){return e.selected=!1})),e.selected=!0;var t=this.field.options.indexOf(e);this.field.options.splice(t,1),this.field.options.unshift(e),this.refreshMultiselect(),this.$emit("change",{action:"addOption",option:e})},refreshMultiselect:function(){this.field.value=this.field.options.filter((function(e){return e.selected})).map((function(e){return e.value}))},removeOption:function(e){e.selected=!1,this.refreshMultiselect(),this.$emit("change",{action:"removeOption",option:e})}},template:'\n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n '}),C=s.default.component("ns-multiselect",{data:function(){return{showPanel:!1,search:""}},props:["field"],computed:{hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},_options:function(){var e=this;return this.field.options.map((function(t){return t.selected=void 0!==t.selected&&t.selected,e.field.value&&e.field.value.includes(t.value)&&(t.selected=!0),t}))}},methods:{__:d.__,addOption:function(e){this.field.disabled||(this.$emit("addOption",e),this.$forceUpdate(),setTimeout((function(){}),100))},removeOption:function(e,t){var r=this;if(!this.field.disabled)return t.preventDefault(),t.stopPropagation(),this.$emit("removeOption",e),this.$forceUpdate(),setTimeout((function(){r.search=""}),100),!1}},mounted:function(){var e=this;this.field.value&&this.field.value.reverse().forEach((function(t){var r=e.field.options.filter((function(e){return e.value===t}));r.length>=0&&e.addOption(r[0])}))},template:'\n
    \n \n
    \n
    \n
    \n
    \n
    \n {{ option.label }}\n \n
    \n
    \n
    \n
    \n \n \n
    \n
    \n \n
    \n
    \n

    \n

    \n {{ __( \'This field is required.\' ) }}\n {{ __( \'This field must contain a valid email address.\' ) }}\n {{ error.message }}\n

    \n
    \n
    \n '}),k=s.default.component("ns-switch",{data:function(){return{}},mounted:function(){},computed:{_options:function(){var e=this;return this.field.options.map((function(t){return t.selected=t.value===e.field.value,t}))},hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},disabledClass:function(){return this.field.disabled?"bg-gray-200 cursor-not-allowed":""},sizeClass:function(){return" w-1/".concat(this._options.length<=4?this._options.length:4)},inputClass:function(){return this.disabledClass+" "+this.leadClass},leadClass:function(){return this.leading?"pl-8":"px-4"}},methods:{__:d.__,setSelected:function(e){this.field.value=e.value,this._options.forEach((function(e){return e.selected=!1})),e.selected=!0,this.$forceUpdate(),this.$emit("change",e.value)}},props:["placeholder","leading","type","field"],template:'\n
    \n \n
    \n \n
    \n

    \n

    \n {{ __( \'This field is required.\' ) }}\n

    \n
    \n '}),j=s.default.component("ns-date",{data:function(){return{}},mounted:function(){},computed:{hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},disabledClass:function(){return this.field.disabled?"bg-gray-200 cursor-not-allowed":"bg-transparent"},inputClass:function(){return this.disabledClass+" "+this.leadClass},leadClass:function(){return this.leading?"pl-8":"px-4"}},props:["placeholder","leading","type","field"],template:'\n
    \n \n
    \n
    \n \n {{ leading }}\n \n
    \n \n
    \n

    \n

    \n {{ __( \'This field is required.\' ) }}\n {{ __( \'This field must contain a valid email address.\' ) }}\n {{ error.message }}\n

    \n
    \n '}),S=r(9576),P=s.default.component("ns-media-input",{template:'\n
    \n \n
    \n
    \n \n {{ leading }}\n \n
    \n
    \n
    \n \n
    \n \n \n
    \n
    \n

    \n

    \n {{ __( \'This field is required.\' ) }}\n {{ __( \'This field must contain a valid email address.\' ) }}\n {{ error.message }}\n

    \n
    \n ',computed:{hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},disabledClass:function(){return this.field.disabled?"bg-gray-200 cursor-not-allowed":"bg-transparent"},inputClass:function(){return this.disabledClass+" "+this.leadClass},leadClass:function(){return this.leading?"pl-8":"px-4"}},data:function(){return{}},props:["placeholder","leading","type","field"],mounted:function(){},methods:{toggleMedia:function(){var e=this;new Promise((function(t,r){h.G.show(S.Z,Object.assign({resolve:t,reject:r},e.field.data||{}))})).then((function(t){"use-selected"===t.event&&(e.field.data&&"url"!==e.field.data.type?e.field.data&&"model"!==e.field.data.type||(e.field.value=t.value[0]):e.field.value=t.value[0].sizes.original,e.$forceUpdate())}))}}}),O=s.default.component("ns-close-button",{template:'\n \n ',methods:{clicked:function(e){this.$emit("click",e)}}}),$=s.default.component("ns-icon-button",{template:'\n \n ',props:["className","buttonClass"],methods:{clicked:function(e){this.$emit("click",e)}}}),T=r(1272),E=r.n(T),V=r(5234),A=r.n(V),D=s.default.component("ns-ckeditor",{data:function(){return{editor:A()}},components:{ckeditor:E().component},mounted:function(){},methods:{__:d.__},computed:{hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},disabledClass:function(){return this.field.disabled?"bg-gray-200 cursor-not-allowed":"bg-transparent"},inputClass:function(){return this.disabledClass+" "+this.leadClass},leadClass:function(){return this.leading?"p-8":"p-2"}},props:["placeholder","leading","type","field"],template:'\n
    \n \n
    \n
    \n \n {{ leading }}\n \n
    \n \n
    \n

    \n

    \n {{ __( \'This field is required.\' ) }}\n {{ __( \'This field must contain a valid email address.\' ) }}\n {{ error.message }}\n

    \n
    \n '}),F=s.default.component("ns-tabs",{data:function(){return{childrens:[]}},props:["active"],computed:{activeComponent:function(){var e=this.$children.filter((function(e){return e.active}));return e.length>0&&e[0]}},methods:{toggle:function(e){this.$emit("active",e.identifier),this.$emit("changeTab",e.identifier)}},mounted:function(){this.childrens=this.$children},template:'\n
    \n
    \n
    {{ tab.label }}
    \n
    \n \n
    \n '}),Z=s.default.component("ns-tabs-item",{data:function(){return{}},mounted:function(){},props:["label","identifier","padding"],template:'\n
    \n \n
    \n '}),q=r(8655),I=r(3968),N=r(1726),L=r(7259);const M=s.default.extend({methods:{__:d.__},data:function(){return{svg:""}},mounted:function(){this.svg=(0,N.createAvatar)(L,{seed:this.displayName})},computed:{avatarUrl:function(){return 0===this.url.length?"":this.url}},props:["url","display-name"]});const z=(0,r(1900).Z)(M,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"flex justify-between items-center flex-shrink-0"},[r("span",{staticClass:"hidden md:inline-block text-gray-600 px-2"},[e._v(e._s(e.__("Howdy, {name}").replace("{name}",this.displayName)))]),e._v(" "),r("span",{staticClass:"md:hidden text-gray-600 px-2"},[e._v(e._s(e.displayName))]),e._v(" "),r("div",{staticClass:"px-2"},[r("div",{staticClass:"w-8 h-8 overflow-hidden rounded-full bg-gray-600"},[""!==e.avatarUrl?r("img",{staticClass:"w-8 h-8 overflow-hidden rounded-full",attrs:{src:e.avatarUrl,alt:e.displayName,srcset:""}}):e._e(),e._v(" "),""===e.avatarUrl?r("div",{domProps:{innerHTML:e._s(e.svg)}}):e._e()])])])}),[],!1,null,null,null).exports;var G=r(6598).Z},8655:(e,t,r)=>{"use strict";r.d(t,{V:()=>a});var s=r(538),n=r(381),i=r.n(n),o=r(7389),a=s.default.component("ns-date-time-picker",{template:'\n
    \n \n
    \n \n \n {{ currentDay.format( \'YYYY/MM/DD HH:mm\' ) }}\n N/A\n \n
    \n

    {{ field.description }}

    \n \n
    \n ',props:["field","date"],data:function(){return{visible:!1,hours:0,minutes:0,currentDay:null,daysOfWeek:new Array(7).fill("").map((function(e,t){return t})),calendar:[[]]}},watch:{visible:function(){var e=this;this.visible&&setTimeout((function(){e.$refs.hours.addEventListener("focus",(function(){this.select()})),e.$refs.minutes.addEventListener("focus",(function(){this.select()}))}),100)}},mounted:function(){var e=this;document.addEventListener("mousedown",(function(t){return e.checkClickedItem(t)})),this.field?this.currentDay=[void 0,null,""].includes(this.field.value)?i()():i()(this.field.value):this.currentDay=[void 0,null,""].includes(this.date)?i()():i()(this.date),this.hours=this.currentDay.format("HH"),this.minutes=this.currentDay.format("mm"),this.build()},methods:{__:o.__,detectHoursChange:function(){parseFloat(this.hours)<0&&(this.hours=0),parseFloat(this.hours)>23&&(this.hours=23),this.updateDateTime()},detectMinuteChange:function(){parseFloat(this.minutes)<0&&(this.minutes=0),parseFloat(this.minutes)>59&&(this.minutes=59),this.updateDateTime()},updateDateTime:function(){this.currentDay.hours(this.hours),this.currentDay.minutes(this.minutes),this.selectDate(this.currentDay)},checkClickedItem:function(e){!this.$el.contains(e.srcElement)&&this.visible&&(this.visible=!1)},selectDate:function(e){this.currentDay=e,this.currentDay.hours(this.hours),this.currentDay.minutes(this.minutes);var t=this.currentDay.format("YYYY/MM/DD HH:mm");this.field?(this.field.value=t,this.$emit("change",this.field)):this.$emit("change",this.currentDay)},subMonth:function(){this.currentDay.subtract(1,"month"),this.build()},addMonth:function(){this.currentDay.add(1,"month"),this.build()},resetCalendar:function(){this.calendar=[[]]},build:function(){this.resetCalendar();this.currentDay.clone().startOf("month");for(var e=this.currentDay.clone().startOf("month"),t=this.currentDay.clone().endOf("month");;){0===e.day()&&this.calendar[0].length>0&&this.calendar.push([]);var r=this.calendar.length-1;if(this.calendar[r].push({date:e.clone(),dayOfWeek:e.day(),isToday:e.isSame(i().now(),"day")}),e.isSame(t,"day"))break;e.add(1,"day")}}}})},4451:(e,t,r)=>{"use strict";r.d(t,{R:()=>n});var s=r(7389),n=r(538).default.component("ns-select",{data:function(){return{}},props:["name","placeholder","field"],computed:{hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},disabledClass:function(){return this.field.disabled?"bg-gray-200 cursor-not-allowed":"bg-transparent"},inputClass:function(){return this.disabledClass+" "+this.leadClass},leadClass:function(){return this.leading?"pl-8":"px-4"}},methods:{__:s.__},template:'\n
    \n \n
    \n \n
    \n

    \n

    \n {{ __( \'This field is required.\' ) }}\n {{ __( \'This field must contain a valid email address.\' ) }}\n {{ error.message }}\n

    \n
    \n '})},1356:(e,t,r)=>{"use strict";r.d(t,{W:()=>c,f:()=>u});var s=r(538),n=r(2077),i=r.n(n),o=r(6740),a=r.n(o),l=new Array(parseInt(ns.currency.ns_currency_precision)).fill("").map((function(e){return 0})).join(""),c=s.default.filter("currency",(function(e){var t,r,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"full";switch(ns.currency.ns_currency_prefered){case"iso":t=ns.currency.ns_currency_iso;break;case"symbol":t=ns.currency.ns_currency_symbol}if("full"===s){var n={decimal:ns.currency.ns_currency_decimal_separator,separator:ns.currency.ns_currency_thousand_separator,precision:parseInt(ns.currency.ns_currency_precision),symbol:""};r=a()(e,n).format()}else r=i()(e).format("0.0a");return"".concat("before"===ns.currency.ns_currency_position?t:"").concat(r).concat("after"===ns.currency.ns_currency_position?t:"")})),u=function(e){var t="0.".concat(l);return parseFloat(i()(e).format(t))}},9698:(e,t,r)=>{"use strict";r.d(t,{b:()=>s});var s=r(538).default.filter("truncate",(function(e,t){return e?(e=e.toString()).length>t?e.substring(0,t)+"...":e:""}))},7266:(e,t,r)=>{"use strict";function s(e,t){for(var r=0;rn});var n=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r,n;return t=e,(r=[{key:"validateFields",value:function(e){var t=this;return 0===e.map((function(e){return t.checkField(e),e.errors?0===e.errors.length:0})).filter((function(e){return!1===e})).length}},{key:"validateFieldsErrors",value:function(e){var t=this;return e.map((function(e){return t.checkField(e),e.errors})).flat()}},{key:"validateForm",value:function(e){e.main&&this.validateField(e.main);var t=[];for(var r in e.tabs){var s=[],n=this.validateFieldsErrors(e.tabs[r].fields);n.length>0&&s.push(n),e.tabs[r].errors=s.flat(),t.push(s.flat())}return t.flat().filter((function(e){return void 0!==e}))}},{key:"initializeTabs",value:function(e){var t=0;for(var r in e)0===t&&(e[r].active=!0),e[r].active=void 0!==e[r].active&&e[r].active,e[r].fields=this.createFields(e[r].fields),t++;return e}},{key:"validateField",value:function(e){return this.checkField(e)}},{key:"fieldsValid",value:function(e){return!(e.map((function(e){return e.errors&&e.errors.length>0})).filter((function(e){return e})).length>0)}},{key:"createFields",value:function(e){return e.map((function(e){return e.type=e.type||"text",e.errors=e.errors||[],e.disabled=e.disabled||!1,"custom"===e.type&&(e.component=nsExtraComponents[e.name]),e}))}},{key:"createForm",value:function(e){if(e.main&&(e.main=this.createFields([e.main])[0]),e.tabs)for(var t in e.tabs)e.tabs[t].fields=this.createFields(e.tabs[t].fields),e.tabs[t].errors=[];return e}},{key:"enableFields",value:function(e){return e.map((function(e){return e.disabled=!1}))}},{key:"disableFields",value:function(e){return e.map((function(e){return e.disabled=!0}))}},{key:"disableForm",value:function(e){for(var t in e.main&&(e.main.disabled=!0),e.tabs)e.tabs[t].fields.forEach((function(e){return e.disabled=!0}))}},{key:"enableForm",value:function(e){for(var t in e.main&&(e.main.disabled=!1),e.tabs)e.tabs[t].fields.forEach((function(e){return e.disabled=!1}))}},{key:"getValue",value:function(e){var t={};return e.forEach((function(e){t[e.name]=e.value})),t}},{key:"checkField",value:function(e){var t=this;return void 0!==e.validation&&(e.errors=[],this.detectValidationRules(e.validation).forEach((function(r){t.fieldPassCheck(e,r)}))),e}},{key:"extractForm",value:function(e){var t={};if(e.main&&(t[e.main.name]=e.main.value),e.tabs)for(var r in e.tabs)void 0===t[r]&&(t[r]={}),t[r]=this.extractFields(e.tabs[r].fields);return t}},{key:"extractFields",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.forEach((function(e){["multiselect"].includes(e.type)?t[e.name]=e.options.filter((function(e){return e.selected})).map((function(e){return e.value})):t[e.name]=e.value})),t}},{key:"detectValidationRules",value:function(e){var t=function(e){var t;return["email","required"].includes(e)?{identifier:e}:(t=/(min)\:([0-9])+/g.exec(e))||(t=/(max)\:([0-9])+/g.exec(e))?{identifier:t[1],value:t[2]}:e};return Array.isArray(e)?e.filter((function(e){return"string"==typeof e})).map(t):e.split("|").map(t)}},{key:"triggerError",value:function(e,t){if(t.errors){var r=function(r){var s=r.split(".").filter((function(e){return!/^\d+$/.test(e)}));2===s.length&&e.tabs[s[0]].fields.forEach((function(e){e.name===s[1]&&t.errors[r].forEach((function(t){var r={identifier:"invalid",invalid:!0,message:t,name:e.name};e.errors.push(r)}))})),r===e.main.name&&t.errors[r].forEach((function(t){e.main.errors.push({identifier:"invalid",invalid:!0,message:t,name:e.main.name})}))};for(var s in t.errors)r(s)}}},{key:"triggerFieldsErrors",value:function(e,t){if(t&&t.errors){var r=function(r){e.forEach((function(e){e.name===r&&t.errors[r].forEach((function(t){var r={identifier:"invalid",invalid:!0,message:t,name:e.name};e.errors.push(r)}))}))};for(var s in t.errors)r(s)}}},{key:"fieldPassCheck",value:function(e,t){if("required"===t.identifier){if(void 0===e.value||null===e.value||0===e.value.length)return e.errors.push({identifier:t.identifier,invalid:!0,name:e.name});e.errors.forEach((function(r,s){r.identifier===t.identifier&&!0===r.invalid&&e.errors.splice(s,1)}))}if("email"===t.identifier){if(!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(e.value))return e.errors.push({identifier:t.identifier,invalid:!0,name:e.name});e.errors.forEach((function(r,s){!0===r[t.identifier]&&e.errors.splice(s,1)}))}return e}}])&&s(t.prototype,r),n&&s(t,n),e}()},7389:(e,t,r)=>{"use strict";r.d(t,{__:()=>s,c:()=>n});var s=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"NexoPOS";return nsLanguage.getEntries(t)&&nsLanguage.getEntries(t)[e]||e},n=function(e,t){return nsLanguage.getEntries(t)&&nsLanguage.getEntries(t)[e]||e}},8603:(e,t,r)=>{"use strict";function s(){var e=this;Object.keys(this).includes("$popup")&&this.$popup.event.subscribe((function(t){"click-overlay"===t.event&&(e.$popupParams&&void 0!==e.$popupParams.reject&&e.$popupParams.reject(!1),e.$popup.close()),"press-esc"===t.event&&(e.$popupParams&&void 0!==e.$popupParams.reject&&e.$popupParams.reject(!1),e.$popup.close())}))}r.d(t,{Z:()=>s})},6386:(e,t,r)=>{"use strict";function s(e){void 0!==this.$popupParams.resolve&&this.$popupParams.reject&&(!1!==e?this.$popupParams.resolve(e):this.$popupParams.reject(e)),this.$popup.close()}r.d(t,{Z:()=>s})},2242:(e,t,r)=>{"use strict";r.d(t,{G:()=>o});var s=r(9248);function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{};if(n(this,e),this.config={primarySelector:void 0,popupClass:"shadow-lg h-half w-1/2 bg-white"},this.container=document.createElement("div"),this.popupBody=document.createElement("div"),this.config=Object.assign(this.config,t),void 0===this.config.primarySelector&&document.querySelectorAll(".is-popup").length>0){var r=document.querySelectorAll(".is-popup").length;this.parentWrapper=document.querySelectorAll(".is-popup")[r-1]}else this.parentWrapper=document.querySelector("body").querySelectorAll("div")[0];this.event=new s.x}var t,r,o;return t=e,o=[{key:"show",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=new e(s);return n.open(t,r),n}}],(r=[{key:"open",value:function(e){var t,r,s,n=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=document.querySelector("body").querySelectorAll("div")[0];this.parentWrapper.style.filter="blur(4px)",o.style.filter="blur(6px)",this.container.setAttribute("class","absolute top-0 left-0 w-full h-full flex items-center justify-center is-popup"),this.container.addEventListener("click",(function(e){n.event.next({event:"click-overlay",value:!0}),e.stopPropagation()})),this.popupBody.addEventListener("click",(function(e){e.stopImmediatePropagation()})),this.container.style.background="rgb(51 51 51 / 20%)",this.container.id="popup-container-"+document.querySelectorAll(".is-popup").length,this.popupBody.setAttribute("class"," zoom-out-entrance"),this.popupBody.innerHTML='',this.container.appendChild(this.popupBody),document.body.appendChild(this.container);var a=Vue.extend(e);this.instance=new a({propsData:{popup:this}}),this.instance.template=(null===(t=null==e?void 0:e.options)||void 0===t?void 0:t.template)||void 0,this.instance.render=e.render||void 0,this.instance.methods=(null===(r=null==e?void 0:e.options)||void 0===r?void 0:r.methods)||(null==e?void 0:e.methods),this.instance.data=(null===(s=null==e?void 0:e.options)||void 0===s?void 0:s.data)||(null==e?void 0:e.data),this.instance.$popup=this,this.instance.$popupParams=i,this.instance.$mount("#".concat(this.container.id," .popup-body"))}},{key:"close",value:function(){var e=this;this.instance.$destroy(),this.event.unsubscribe(),this.parentWrapper.style.filter="blur(0px)";var t=document.querySelector("body").querySelectorAll("div")[0];document.querySelectorAll(".is-popup").length<=1&&(t.style.filter="blur(0px)"),this.popupBody.classList.remove("zoom-out-entrance"),this.popupBody.classList.add("zoom-in-exit"),this.container.classList.remove("is-popup"),setTimeout((function(){e.container.remove()}),300)}}])&&i(t.prototype,r),o&&i(t,o),e}()},9763:(e,t,r)=>{"use strict";function s(e){POS.changeVisibleSection(e)}r.d(t,{Z:()=>s})},9624:(e,t,r)=>{"use strict";r.d(t,{S:()=>i});var s=r(3260);function n(e,t){for(var r=0;r2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"info"};return s.Observable.create((function(s){var i=r.__createSnack({message:e,label:t,type:n.type}),o=i.buttonNode,a=(i.textNode,i.snackWrapper,i.sampleSnack);o.addEventListener("click",(function(e){s.onNext(o),s.onCompleted(),a.remove()})),r.__startTimer(n.duration,a)}))}},{key:"error",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"error"};return this.show(e,t,Object.assign(Object.assign({},r),{type:"error"}))}},{key:"success",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"success"};return this.show(e,t,Object.assign(Object.assign({},r),{type:"success"}))}},{key:"info",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"info"};return this.show(e,t,Object.assign(Object.assign({},r),{type:"info"}))}},{key:"__startTimer",value:function(e,t){var r,s=function(){e>0&&!1!==e&&(r=setTimeout((function(){t.remove()}),e))};t.addEventListener("mouseenter",(function(){clearTimeout(r)})),t.addEventListener("mouseleave",(function(){s()})),s()}},{key:"__createSnack",value:function(e){var t=e.message,r=e.label,s=e.type,n=void 0===s?"info":s,i=document.getElementById("snack-wrapper")||document.createElement("div"),o=document.createElement("div"),a=document.createElement("p"),l=document.createElement("div"),c=document.createElement("button"),u="",d="";switch(n){case"info":u="text-white hover:bg-blue-400 bg-blue-500",d="bg-gray-900 text-white";break;case"error":u="text-red-700 hover:bg-white bg-white",d="bg-red-500 text-white";break;case"success":u="text-green-700 hover:bg-white bg-white",d="bg-green-500 text-white"}return a.textContent=t,r&&(c.textContent=r,c.setAttribute("class","px-3 py-2 shadow rounded uppercase ".concat(u)),l.appendChild(c)),o.appendChild(a),o.appendChild(l),o.setAttribute("class","md:rounded py-2 px-3 md:w-2/5 w-full z-10 md:my-2 shadow-lg flex justify-between items-center zoom-in-entrance anim-duration-300 ".concat(d)),i.appendChild(o),null===document.getElementById("snack-wrapper")&&(i.setAttribute("id","snack-wrapper"),i.setAttribute("class","absolute bottom-0 w-full flex justify-between items-center flex-col"),document.body.appendChild(i)),{snackWrapper:i,sampleSnack:o,buttonsWrapper:l,buttonNode:c,textNode:a}}}])&&n(t.prototype,r),i&&n(t,i),e}()},279:(e,t,r)=>{"use strict";r.d(t,{$:()=>l});var s=r(162),n=r(7389),i=r(2242),o=r(9531);function a(e,t){for(var r=0;rparseFloat(e.$quantities().quantity)-u)return s.kX.error((0,n.__)("Unable to add the product, there is not enough stock. Remaining %s").replace("%s",(e.$quantities().quantity-u).toString())).subscribe()}r({quantity:1})}else l.open(o.Z,{resolve:r,reject:a,product:c,data:e})}))}}])&&a(t.prototype,r),l&&a(t,l),e}()},9572:(e,t,r)=>{"use strict";var s=r(538),n=(r(824),r(4364)),i=r(1630),o=r.n(i),a=r(8159).Z,l=r(2014).Z,c=r(874).Z;window.nsComponents=Object.assign({},n),s.default.use(o()),new s.default({el:"#pos-app",components:Object.assign({NsPos:a,NsPosCart:l,NsPosGrid:c},window.nsComponents)})},824:(e,t,r)=>{"use strict";var s=r(381),n=r.n(s);ns.date.moment=n()(ns.date.current),ns.date.interval=setInterval((function(){ns.date.moment.add(1,"seconds"),ns.date.current=n()(ns.date.current).add(1,"seconds").format("YYYY-MM-DD HH:mm:ss")}),1e3),ns.date.getNowString=function(){var e=Date.parse((new Date).toLocaleString("en-US",{timeZone:ns.date.timeZone}));return n()(e).format("YYYY-MM-DD HH:mm:ss")},ns.date.getMoment=function(){var e=Date.parse((new Date).toLocaleString("en-US",{timeZone:ns.date.timeZone}));return n()(e)}},6700:(e,t,r)=>{var s={"./af":2786,"./af.js":2786,"./ar":867,"./ar-dz":4130,"./ar-dz.js":4130,"./ar-kw":6135,"./ar-kw.js":6135,"./ar-ly":6440,"./ar-ly.js":6440,"./ar-ma":7702,"./ar-ma.js":7702,"./ar-sa":6040,"./ar-sa.js":6040,"./ar-tn":7100,"./ar-tn.js":7100,"./ar.js":867,"./az":1083,"./az.js":1083,"./be":9808,"./be.js":9808,"./bg":8338,"./bg.js":8338,"./bm":7438,"./bm.js":7438,"./bn":8905,"./bn-bd":6225,"./bn-bd.js":6225,"./bn.js":8905,"./bo":1560,"./bo.js":1560,"./br":1278,"./br.js":1278,"./bs":622,"./bs.js":622,"./ca":2468,"./ca.js":2468,"./cs":5822,"./cs.js":5822,"./cv":877,"./cv.js":877,"./cy":7373,"./cy.js":7373,"./da":4780,"./da.js":4780,"./de":9740,"./de-at":217,"./de-at.js":217,"./de-ch":894,"./de-ch.js":894,"./de.js":9740,"./dv":5300,"./dv.js":5300,"./el":837,"./el.js":837,"./en-au":8348,"./en-au.js":8348,"./en-ca":7925,"./en-ca.js":7925,"./en-gb":2243,"./en-gb.js":2243,"./en-ie":6436,"./en-ie.js":6436,"./en-il":7207,"./en-il.js":7207,"./en-in":4175,"./en-in.js":4175,"./en-nz":6319,"./en-nz.js":6319,"./en-sg":1662,"./en-sg.js":1662,"./eo":2915,"./eo.js":2915,"./es":7093,"./es-do":5251,"./es-do.js":5251,"./es-mx":6112,"./es-mx.js":6112,"./es-us":1146,"./es-us.js":1146,"./es.js":7093,"./et":5603,"./et.js":5603,"./eu":7763,"./eu.js":7763,"./fa":6959,"./fa.js":6959,"./fi":1897,"./fi.js":1897,"./fil":2549,"./fil.js":2549,"./fo":4694,"./fo.js":4694,"./fr":4470,"./fr-ca":3049,"./fr-ca.js":3049,"./fr-ch":2330,"./fr-ch.js":2330,"./fr.js":4470,"./fy":5044,"./fy.js":5044,"./ga":9295,"./ga.js":9295,"./gd":2101,"./gd.js":2101,"./gl":8794,"./gl.js":8794,"./gom-deva":7884,"./gom-deva.js":7884,"./gom-latn":3168,"./gom-latn.js":3168,"./gu":5349,"./gu.js":5349,"./he":4206,"./he.js":4206,"./hi":94,"./hi.js":94,"./hr":316,"./hr.js":316,"./hu":2138,"./hu.js":2138,"./hy-am":1423,"./hy-am.js":1423,"./id":9218,"./id.js":9218,"./is":135,"./is.js":135,"./it":626,"./it-ch":150,"./it-ch.js":150,"./it.js":626,"./ja":9183,"./ja.js":9183,"./jv":4286,"./jv.js":4286,"./ka":2105,"./ka.js":2105,"./kk":7772,"./kk.js":7772,"./km":8758,"./km.js":8758,"./kn":9282,"./kn.js":9282,"./ko":3730,"./ko.js":3730,"./ku":1408,"./ku.js":1408,"./ky":3291,"./ky.js":3291,"./lb":6841,"./lb.js":6841,"./lo":5466,"./lo.js":5466,"./lt":7010,"./lt.js":7010,"./lv":7595,"./lv.js":7595,"./me":9861,"./me.js":9861,"./mi":5493,"./mi.js":5493,"./mk":5966,"./mk.js":5966,"./ml":7341,"./ml.js":7341,"./mn":5115,"./mn.js":5115,"./mr":370,"./mr.js":370,"./ms":9847,"./ms-my":1237,"./ms-my.js":1237,"./ms.js":9847,"./mt":2126,"./mt.js":2126,"./my":6165,"./my.js":6165,"./nb":4924,"./nb.js":4924,"./ne":6744,"./ne.js":6744,"./nl":3901,"./nl-be":9814,"./nl-be.js":9814,"./nl.js":3901,"./nn":3877,"./nn.js":3877,"./oc-lnc":2135,"./oc-lnc.js":2135,"./pa-in":5858,"./pa-in.js":5858,"./pl":4495,"./pl.js":4495,"./pt":9520,"./pt-br":7971,"./pt-br.js":7971,"./pt.js":9520,"./ro":6459,"./ro.js":6459,"./ru":238,"./ru.js":238,"./sd":950,"./sd.js":950,"./se":490,"./se.js":490,"./si":124,"./si.js":124,"./sk":4249,"./sk.js":4249,"./sl":4985,"./sl.js":4985,"./sq":1104,"./sq.js":1104,"./sr":9131,"./sr-cyrl":9915,"./sr-cyrl.js":9915,"./sr.js":9131,"./ss":5893,"./ss.js":5893,"./sv":8760,"./sv.js":8760,"./sw":1172,"./sw.js":1172,"./ta":7333,"./ta.js":7333,"./te":3110,"./te.js":3110,"./tet":2095,"./tet.js":2095,"./tg":7321,"./tg.js":7321,"./th":9041,"./th.js":9041,"./tk":9005,"./tk.js":9005,"./tl-ph":5768,"./tl-ph.js":5768,"./tlh":9444,"./tlh.js":9444,"./tr":2397,"./tr.js":2397,"./tzl":8254,"./tzl.js":8254,"./tzm":1106,"./tzm-latn":699,"./tzm-latn.js":699,"./tzm.js":1106,"./ug-cn":9288,"./ug-cn.js":9288,"./uk":7691,"./uk.js":7691,"./ur":3795,"./ur.js":3795,"./uz":6791,"./uz-latn":588,"./uz-latn.js":588,"./uz.js":6791,"./vi":5666,"./vi.js":5666,"./x-pseudo":4378,"./x-pseudo.js":4378,"./yo":5805,"./yo.js":5805,"./zh-cn":3839,"./zh-cn.js":3839,"./zh-hk":5726,"./zh-hk.js":5726,"./zh-mo":9807,"./zh-mo.js":9807,"./zh-tw":4152,"./zh-tw.js":4152};function n(e){var t=i(e);return r(t)}function i(e){if(!r.o(s,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return s[e]}n.keys=function(){return Object.keys(s)},n.resolve=i,e.exports=n,n.id=6700},6598:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var s=r(381),n=r.n(s);const i={name:"ns-datepicker",props:["label","date"],data:function(){return{visible:!1,currentDay:null,daysOfWeek:new Array(7).fill("").map((function(e,t){return t})),calendar:[[]]}},mounted:function(){document.addEventListener("click",this.checkClickedItem),this.currentDay=[void 0,null].includes(this.date)?n()():n()(this.date),this.build()},methods:{__:r(7389).__,checkClickedItem:function(e){!this.$el.contains(e.srcElement)&&this.visible&&(this.visible=!1)},selectDate:function(e){this.currentDay=e,this.visible=!1,this.$emit("change",e)},subMonth:function(){this.currentDay.subtract(1,"month"),this.build()},addMonth:function(){this.currentDay.add(1,"month"),this.build()},resetCalendar:function(){this.calendar=[[]]},build:function(){this.resetCalendar();this.currentDay.clone().startOf("month");for(var e=this.currentDay.clone().startOf("month"),t=this.currentDay.clone().endOf("month");;){0===e.day()&&this.calendar[0].length>0&&this.calendar.push([]);var r=this.calendar.length-1;if(this.calendar[r].push({date:e.clone(),dayOfWeek:e.day(),isToday:e.isSame(n().now(),"day")}),e.isSame(t,"day"))break;e.add(1,"day")}}}};const o=(0,r(1900).Z)(i,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"picker"},[r("div",{staticClass:"rounded cursor-pointer bg-white shadow px-1 py-1 flex items-center text-gray-700",on:{click:function(t){e.visible=!e.visible}}},[r("i",{staticClass:"las la-clock text-2xl"}),e._v(" "),r("span",{staticClass:"mx-1 text-sm"},[r("span",[e._v(e._s(e.label||e.__("Date"))+" : ")]),e._v(" "),e.currentDay?r("span",[e._v(e._s(e.currentDay.format("YYYY/MM/DD")))]):e._e(),e._v(" "),null===e.currentDay?r("span",[e._v(e._s(e.__("N/A")))]):e._e()])]),e._v(" "),e.visible?r("div",{staticClass:"relative h-0 w-0 -mb-2"},[r("div",{staticClass:"w-72 mt-2 shadow rounded bg-white anim-duration-300 zoom-in-entrance flex flex-col"},[r("div",{staticClass:"flex-auto"},[r("div",{staticClass:"p-2 flex items-center"},[r("div",[r("button",{staticClass:"w-8 h-8 bg-gray-400 rounded",on:{click:function(t){return e.subMonth()}}},[r("i",{staticClass:"las la-angle-left"})])]),e._v(" "),r("div",{staticClass:"flex flex-auto font-semibold text-gray-700 justify-center"},[e._v(e._s(e.currentDay.format("MMM"))+" "+e._s(e.currentDay.format("YYYY")))]),e._v(" "),r("div",[r("button",{staticClass:"w-8 h-8 bg-gray-400 rounded",on:{click:function(t){return e.addMonth()}}},[r("i",{staticClass:"las la-angle-right"})])])]),e._v(" "),r("div",{staticClass:"grid grid-flow-row grid-cols-7 grid-rows-1 gap-0 text-gray-700"},[r("div",{staticClass:"border border-gray-200 h-8 flex justify-center items-center text-sm"},[e._v(e._s(e.__("Sun")))]),e._v(" "),r("div",{staticClass:"border border-gray-200 h-8 flex justify-center items-center text-sm"},[e._v(e._s(e.__("Mon")))]),e._v(" "),r("div",{staticClass:"border border-gray-200 h-8 flex justify-center items-center text-sm"},[e._v(e._s(e.__("Tue")))]),e._v(" "),r("div",{staticClass:"border border-gray-200 h-8 flex justify-center items-center text-sm"},[e._v(e._s(e.__("Wed")))]),e._v(" "),r("div",{staticClass:"border border-gray-200 h-8 flex justify-center items-center text-sm"},[e._v(e._s(e.__("Thr")))]),e._v(" "),r("div",{staticClass:"border border-gray-200 h-8 flex justify-center items-center text-sm"},[e._v(e._s(e.__("Fri")))]),e._v(" "),r("div",{staticClass:"border border-gray-200 h-8 flex justify-center items-center text-sm"},[e._v(e._s(e.__("Sat")))])]),e._v(" "),e._l(e.calendar,(function(t,s){return r("div",{key:s,staticClass:"grid grid-flow-row grid-cols-7 grid-rows-1 gap-0 text-gray-700"},e._l(e.daysOfWeek,(function(s,n){return r("div",{key:n,staticClass:"h-8 flex justify-center items-center text-sm"},[e._l(t,(function(t,n){return[t.dayOfWeek===s?r("div",{key:n,staticClass:"h-full w-full flex items-center justify-center cursor-pointer",class:t.date.format("DD")===e.currentDay.format("DD")?"bg-blue-400 text-white border border-blue-500":"hover:bg-gray-100 border border-gray-200",on:{click:function(r){return e.selectDate(t.date)}}},[e._v("\n "+e._s(t.date.format("DD"))+"\n ")]):e._e()]}))],2)})),0)}))],2),e._v(" "),r("div")])]):e._e()])}),[],!1,null,null,null).exports},3968:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});function s(e){return function(e){if(Array.isArray(e))return n(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return n(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,s=new Array(t);r100?100:this.backValue))),"0"===this.backValue&&(this.backValue=""),this.$emit("changed",this.floating&&this.backValue.length>0?parseFloat(this.backValue/this.number):this.backValue)):this.$emit("next",this.floating&&this.backValue.length>0?parseFloat(this.backValue/this.number):this.backValue)}}};const o=(0,r(1900).Z)(i,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"grid grid-flow-row grid-cols-3 gap-2 grid-rows-3",staticStyle:{padding:"1px"},attrs:{id:"numpad"}},[e._l(e.keys,(function(t,s){return r("div",{key:s,staticClass:"hover:bg-gray-400 hover:text-gray-800 bg-gray-300 text-2xl text-gray-700 border h-16 flex items-center justify-center cursor-pointer",staticStyle:{margin:"-1px"},on:{click:function(r){return e.inputValue(t)}}},[void 0!==t.value?r("span",[e._v(e._s(t.value))]):e._e(),e._v(" "),t.icon?r("i",{staticClass:"las",class:t.icon}):e._e()])})),e._v(" "),e._t("numpad-footer")],2)}),[],!1,null,null,null).exports},9576:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var s=r(162),n=r(8603),i=r(7389);const o={name:"ns-media",props:["popup"],components:{VueUpload:r(2948)},data:function(){return{pages:[{label:(0,i.__)("Upload"),name:"upload",selected:!1},{label:(0,i.__)("Gallery"),name:"gallery",selected:!0}],resources:[],response:{data:[],current_page:0,from:0,to:0,next_page_url:"",prev_page_url:"",path:"",per_page:0,total:0,last_page:0,first_page:0},queryPage:1,bulkSelect:!1,files:[]}},mounted:function(){this.popupCloser();var e=this.pages.filter((function(e){return"gallery"===e.name}))[0];this.select(e)},watch:{files:function(){this.files.filter((function(e){return"0.00"===e.progress})).length>0&&(this.$refs.upload.active=!0)}},computed:{postMedia:function(){return s.kq.applyFilters("http-client-url","/api/nexopos/v4/medias")},currentPage:function(){return this.pages.filter((function(e){return e.selected}))[0]},hasOneSelected:function(){return this.response.data.filter((function(e){return e.selected})).length>0},selectedResource:function(){return this.response.data.filter((function(e){return e.selected}))[0]},csrf:function(){return ns.authentication.csrf},isPopup:function(){return void 0!==this.$popup},user_id:function(){return this.isPopup&&this.$popupParams.user_id||0}},methods:{popupCloser:n.Z,__:i.__,cancelBulkSelect:function(){this.bulkSelect=!1,this.response.data.forEach((function(e){return e.selected=!1}))},deleteSelected:function(){var e=this;if(confirm("Delete selected resources ?"))return s.ih.post("/api/nexopos/v4/medias/bulk-delete",{ids:this.response.data.filter((function(e){return e.selected})).map((function(e){return e.id}))}).subscribe((function(t){s.kX.success(t.message).subscribe(),e.loadGallery()}),(function(e){s.kX.error(e.message).subscribe()}))},select:function(e){this.pages.forEach((function(e){return e.selected=!1})),e.selected=!0,"gallery"===e.name&&this.loadGallery()},loadGallery:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;t=null===t?this.queryPage:t,this.queryPage=t,s.ih.get("/api/nexopos/v4/medias?page=".concat(t,"&user_id=").concat(this.user_id)).subscribe((function(t){t.data.forEach((function(e){return e.selected=!1})),e.response=t}))},useSelectedEntries:function(){this.$popupParams.resolve({event:"use-selected",value:this.response.data.filter((function(e){return e.selected}))}),this.$popup.close()},selectResource:function(e){var t=this;this.bulkSelect||this.response.data.forEach((function(r,s){s!==t.response.data.indexOf(e)&&(r.selected=!1)})),e.selected=!e.selected}}};const a=(0,r(1900).Z)(o,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"flex bg-white shadow-xl overflow-hidden",class:e.isPopup?"w-6/7-screen h-6/7-screen":"w-full h-full"},[r("div",{staticClass:"sidebar w-48 bg-gray-200 h-full flex-shrink-0"},[r("h3",{staticClass:"text-xl font-bold text-gray-800 my-4 text-center"},[e._v(e._s(e.__("Medias Manager")))]),e._v(" "),r("ul",e._l(e.pages,(function(t,s){return r("li",{key:s,staticClass:"hover:bg-white py-2 px-3 text-gray-700 border-l-8 cursor-pointer",class:t.selected?"bg-white border-blue-400":"border-transparent",on:{click:function(r){return e.select(t)}}},[e._v(e._s(t.label))])})),0)]),e._v(" "),"upload"===e.currentPage.name?r("div",{staticClass:"content w-full overflow-hidden flex"},[r("vue-upload",{ref:"upload",staticClass:" flex-auto flex bg-white shadow",attrs:{drop:!0,multiple:!0,headers:{"X-Requested-With":"XMLHttpRequest","X-CSRF-TOKEN":e.csrf},accept:"image/*","post-action":e.postMedia},model:{value:e.files,callback:function(t){e.files=t},expression:"files"}},[r("div",{staticClass:"border-dashed border-2 flex flex-auto m-2 p-2 flex-col border-blue-400 items-center justify-center"},[r("h3",{staticClass:"text-3xl font-bold text-gray-600 mb-4"},[e._v(e._s(e.__("Click Here Or Drop Your File To Upload")))]),e._v(" "),r("div",{staticClass:"rounded w-full md:w-2/3 text-gray-700 bg-gray-500 h-56 overflow-y-auto p-2"},[r("ul",e._l(e.files,(function(t,s){return r("li",{key:s,staticClass:"p-2 mb-2 shadow bg-white flex items-center justify-between rounded"},[r("span",[e._v(e._s(t.name))]),e._v(" "),r("span",{staticClass:"rounded bg-blue-400 flex items-center justify-center text-xs p-2"},[e._v(e._s(t.progress)+"%")])])})),0)])])])],1):e._e(),e._v(" "),"gallery"===e.currentPage.name?r("div",{staticClass:"content flex-col w-full overflow-hidden flex"},[e.popup?r("div",{staticClass:"p-2 flex flex-shrink-0 justify-between bg-gray-200"},[r("div"),e._v(" "),r("div",[r("ns-close-button",{on:{click:function(t){return e.popup.close()}}})],1)]):e._e(),e._v(" "),r("div",{staticClass:"flex flex-auto overflow-hidden"},[r("div",{staticClass:"bg-white shadow content flex flex-auto flex-col overflow-y-auto",attrs:{id:"grid"}},[r("div",{staticClass:"flex flex-auto"},[r("div",{staticClass:"p-2 overflow-x-auto"},[r("div",{staticClass:"grid grid-cols-2 md:grid-cols-4 lg:grid-cols-4 xl:grid-cols-6"},e._l(e.response.data,(function(t,s){return r("div",{key:s},[r("div",{staticClass:"p-2"},[r("div",{staticClass:"rounded-lg w-32 h-32 bg-gray-500 m-2 overflow-hidden flex items-center justify-center",class:t.selected?"ring-4 ring-blue-500 ring-opacity-50":"",on:{click:function(r){return e.selectResource(t)}}},[r("img",{staticClass:"object-cover h-full",attrs:{src:t.sizes.thumb,alt:t.name}})])])])})),0)]),e._v(" "),0===e.response.data.length?r("div",{staticClass:"flex flex-auto items-center justify-center"},[r("h3",{staticClass:"text-2xl text-gray-600 font-bold"},[e._v(e._s(e.__("Nothing has already been uploaded")))])]):e._e()])]),e._v(" "),!e.bulkSelect&&e.hasOneSelected?r("div",{staticClass:"w-64 flex-shrink-0 bg-gray-200",attrs:{id:"preview"}},[r("div",{staticClass:"h-64 bg-gray-600 flex items-center justify-center"},[r("img",{attrs:{src:e.selectedResource.sizes.thumb,alt:e.selectedResource.name}})]),e._v(" "),r("div",{staticClass:"p-4 text-gray-700 text-sm",attrs:{id:"details"}},[r("p",{staticClass:"flex flex-col mb-2"},[r("strong",{staticClass:"font-bold block"},[e._v(e._s(e.__("File Name"))+": ")]),r("span",[e._v(e._s(e.selectedResource.name))])]),e._v(" "),r("p",{staticClass:"flex flex-col mb-2"},[r("strong",{staticClass:"font-bold block"},[e._v(e._s(e.__("Uploaded At"))+":")]),r("span",[e._v(e._s(e.selectedResource.created_at))])]),e._v(" "),r("p",{staticClass:"flex flex-col mb-2"},[r("strong",{staticClass:"font-bold block"},[e._v(e._s(e.__("By"))+" :")]),r("span",[e._v(e._s(e.selectedResource.user.username))])])])]):e._e()]),e._v(" "),r("div",{staticClass:"p-2 flex flex-shrink-0 justify-between bg-gray-200"},[r("div",{staticClass:"flex -mx-2 flex-shrink-0"},[r("div",{staticClass:"px-2 flex-shrink-0 flex"},[r("div",{staticClass:"rounded shadow overflow-hidden border-blue-400 flex text-sm text-gray-700"},[e.bulkSelect?r("button",{staticClass:"bg-white hover:bg-blue-400 hover:text-white py-2 px-3",on:{click:function(t){return e.cancelBulkSelect()}}},[r("i",{staticClass:"las la-times"})]):e._e(),e._v(" "),e.hasOneSelected&&!e.bulkSelect?r("button",{staticClass:"bg-white hover:bg-blue-400 hover:text-white py-2 px-3",on:{click:function(t){e.bulkSelect=!0}}},[r("i",{staticClass:"las la-check-circle"})]):e._e(),e._v(" "),e.hasOneSelected?r("button",{staticClass:"bg-red-400 text-white hover:bg-red-500 hover:text-white py-2 px-3",on:{click:function(t){return e.deleteSelected()}}},[r("i",{staticClass:"las la-trash"})]):e._e()])])]),e._v(" "),r("div",{staticClass:"flex-shrink-0 -mx-2 flex"},[r("div",{staticClass:"px-2"},[r("div",{staticClass:"rounded shadow overflow-hidden border-blue-400 flex text-sm text-gray-700"},[r("button",{staticClass:"p-2",class:1===e.response.current_page?"bg-gray-100 text-gray-600 cursor-not-allowed":"bg-white hover:bg-blue-400 hover:text-white",attrs:{disabled:1===e.response.current_page},on:{click:function(t){return e.loadGallery(e.response.current_page-1)}}},[e._v(e._s(e.__("Previous")))]),e._v(" "),r("hr",{staticClass:"border-r border-gray-700"}),e._v(" "),r("button",{staticClass:"p-2",class:e.response.current_page===e.response.last_page?"bg-gray-100 text-gray-600 cursor-not-allowed":"bg-white hover:bg-blue-400 hover:text-white",attrs:{disabled:e.response.current_page===e.response.last_page},on:{click:function(t){return e.loadGallery(e.response.current_page+1)}}},[e._v(e._s(e.__("Next")))])])]),e._v(" "),e.popup&&e.hasOneSelected?r("div",{staticClass:"px-2"},[r("button",{staticClass:"rounded shadow p-2 bg-blue-400 text-white text-sm",on:{click:function(t){return e.useSelectedEntries()}}},[e._v(e._s(e.__("Use Selected")))])]):e._e()])])]):e._e()])}),[],!1,null,null,null).exports},2014:(e,t,r)=>{"use strict";r.d(t,{Z:()=>ge});var s=r(7757),n=r.n(s),i=r(2242),o=r(6386),a=r(7389);function l(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return c(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,s=new Array(t);r100?100:this.finalValue))}}};var d=r(1900);const f=(0,d.Z)(u,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"bg-white shadow min-h-2/5-screen w-6/7-screen md:w-3/5-screen lg:w-3/5-screen xl:w-2/5-screen relative",attrs:{id:"discount-popup"}},[r("div",{staticClass:"flex-shrink-0 py-2 border-b border-gray-200"},["product"===e.type?r("h1",{staticClass:"text-xl font-bold text-gray-700 text-center"},[e._v(e._s(e.__("Product Discount")))]):e._e(),e._v(" "),"cart"===e.type?r("h1",{staticClass:"text-xl font-bold text-gray-700 text-center"},[e._v(e._s(e.__("Cart Discount")))]):e._e()]),e._v(" "),r("div",{staticClass:"h-16 bg-gray-800 text-white border-gray-200 flex items-center justify-center",attrs:{id:"screen"}},[r("h1",{staticClass:"font-bold text-3xl"},["flat"===e.mode?r("span",[e._v(e._s(e._f("currency")(e.finalValue)))]):e._e(),e._v(" "),"percentage"===e.mode?r("span",[e._v(e._s(e.finalValue)+"%")]):e._e()])]),e._v(" "),r("div",{staticClass:"flex",attrs:{id:"switch-mode"}},[r("button",{staticClass:"outline-none w-1/2 py-2 flex items-center justify-center",class:"flat"===e.mode?"bg-gray-800 text-white":"",on:{click:function(t){return e.setPercentageType("flat")}}},[e._v(e._s(e.__("Flat")))]),e._v(" "),r("hr",{staticClass:"border-r border-gray-200"}),e._v(" "),r("button",{staticClass:"outline-none w-1/2 py-2 flex items-center justify-center",class:"percentage"===e.mode?"bg-gray-800 text-white":"",on:{click:function(t){return e.setPercentageType("percentage")}}},[e._v(e._s(e.__("Percentage")))])]),e._v(" "),r("div",{staticClass:"grid grid-flow-row grid-cols-3 grid-rows-3",attrs:{id:"numpad"}},e._l(e.keys,(function(t,s){return r("div",{key:s,staticClass:"hover:bg-blue-400 hover:text-white hover:border-blue-600 text-xl font-bold border border-gray-200 h-24 flex items-center justify-center cursor-pointer",on:{click:function(r){return e.inputValue(t)}}},[void 0!==t.value?r("span",[e._v(e._s(t.value))]):e._e(),e._v(" "),t.icon?r("i",{staticClass:"las",class:t.icon}):e._e()])})),0)])}),[],!1,null,null,null).exports;var p=r(419);function h(e){return function(e){if(Array.isArray(e))return v(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return v(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return v(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,s=new Array(t);r100?100:this.backValue))),"0"===this.backValue&&(this.backValue="")}}};const m=(0,d.Z)(b,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"h-full w-full py-2"},[e.order?r("div",{staticClass:"px-2 pb-2"},[r("div",{staticClass:"grid grid-cols-2 gap-2"},[r("div",{staticClass:"h-16 flex justify-between items-center bg-blue-400 text-white text-xl md:text-3xl p-2",attrs:{id:"details"}},[r("span",[e._v(e._s(e.__("Total"))+" : ")]),e._v(" "),r("span",[e._v(e._s(e._f("currency")(e.order.total)))])]),e._v(" "),r("div",{staticClass:"cursor-pointer h-16 flex justify-between items-center bg-red-400 text-white text-xl md:text-3xl p-2",attrs:{id:"discount"},on:{click:function(t){return e.toggleDiscount()}}},[r("span",[e._v(e._s(e.__("Discount"))+" : ")]),e._v(" "),r("span",[e._v(e._s(e._f("currency")(e.order.discount)))])]),e._v(" "),r("div",{staticClass:"h-16 flex justify-between items-center bg-green-400 text-white text-xl md:text-3xl p-2",attrs:{id:"paid"}},[r("span",[e._v(e._s(e.__("Paid"))+" : ")]),e._v(" "),r("span",[e._v(e._s(e._f("currency")(e.order.tendered)))])]),e._v(" "),r("div",{staticClass:"h-16 flex justify-between items-center bg-teal-400 text-white text-xl md:text-3xl p-2",attrs:{id:"change"}},[r("span",[e._v(e._s(e.__("Change"))+" : ")]),e._v(" "),r("span",[e._v(e._s(e._f("currency")(e.order.change)))])]),e._v(" "),r("div",{staticClass:"col-span-2 h-16 flex justify-between items-center bg-gray-300 text-gray-800 text-xl md:text-3xl p-2",attrs:{id:"change"}},[r("span",[e._v(e._s(e.__("Screen"))+" : ")]),e._v(" "),r("span",[e._v(e._s(e._f("currency")(e.backValue/e.number)))])])])]):e._e(),e._v(" "),r("div",{staticClass:"px-2 pb-2"},[r("div",{staticClass:"-mx-2 flex flex-wrap"},[r("div",{staticClass:"pl-2 pr-1 flex-auto"},[r("div",{staticClass:"grid grid-flow-row grid-cols-3 gap-2 grid-rows-3",staticStyle:{padding:"1px"},attrs:{id:"numpad"}},[e._l(e.keys,(function(t,s){return r("div",{key:s,staticClass:"hover:bg-gray-400 hover:text-gray-800 bg-gray-300 text-2xl text-gray-700 border h-16 flex items-center justify-center cursor-pointer",staticStyle:{margin:"-1px"},on:{click:function(r){return e.inputValue(t)}}},[void 0!==t.value?r("span",[e._v(e._s(t.value))]):e._e(),e._v(" "),t.icon?r("i",{staticClass:"las",class:t.icon}):e._e()])})),e._v(" "),r("div",{staticClass:"hover:bg-green-500 col-span-3 bg-green-400 text-2xl text-white border h-16 flex items-center justify-center cursor-pointer",on:{click:function(t){return e.makeFullPayment()}}},[e._v("\n "+e._s(e.__("Full Payment")))])],2)]),e._v(" "),r("div",{staticClass:"w-1/2 md:w-72 pr-2 pl-1"},[r("div",{staticClass:"grid grid-flow-row grid-rows-1 gap-2"},[r("div",{staticClass:"hover:bg-gray-400 hover:text-gray-800 bg-gray-300 text-2xl text-gray-700 border h-16 flex items-center justify-center cursor-pointer",on:{click:function(t){return e.increaseBy({value:100})}}},[r("span",[e._v(e._s(e._f("currency")(100)))])]),e._v(" "),r("div",{staticClass:"hover:bg-gray-400 hover:text-gray-800 bg-gray-300 text-2xl text-gray-700 border h-16 flex items-center justify-center cursor-pointer",on:{click:function(t){return e.increaseBy({value:500})}}},[r("span",[e._v(e._s(e._f("currency")(500)))])]),e._v(" "),r("div",{staticClass:"hover:bg-gray-400 hover:text-gray-800 bg-gray-300 text-2xl text-gray-700 border h-16 flex items-center justify-center cursor-pointer",on:{click:function(t){return e.increaseBy({value:1e3})}}},[r("span",[e._v(e._s(e._f("currency")(1e3)))])])])])])])])}),[],!1,null,null,null).exports,g={name:"cash-payment",props:["identifier","label"],components:{samplePayment:m}};const _=(0,d.Z)(g,(function(){var e=this,t=e.$createElement;return(e._self._c||t)("sample-payment",{attrs:{identifier:e.identifier,label:e.label},on:{submit:function(t){return e.$emit("submit")}}})}),[],!1,null,null,null).exports;const y={name:"creditcart-payment",props:["identifier"]};const x=(0,d.Z)(y,(function(){var e=this,t=e.$createElement;return(e._self._c||t)("h1",[e._v("Credit Card")])}),[],!1,null,null,null).exports;const w={name:"bank-payment",props:["identifier","label"],components:{samplePayment:m}};const C=(0,d.Z)(w,(function(){var e=this,t=e.$createElement;return(e._self._c||t)("sample-payment",{attrs:{identifier:e.identifier,label:e.label},on:{submit:function(t){return e.$emit("submit")}}})}),[],!1,null,null,null).exports;var k=r(3968),j=r(162);const S={name:"ns-account-payment",components:{nsNumpad:k.Z},props:["identifier","label"],data:function(){return{subscription:null,screenValue:0,order:null}},methods:{__:a.__,handleChange:function(e){this.screenValue=e},proceedAddingPayment:function(e){var t=parseFloat(e),r=this.order.payments;return t<=0?j.kX.error((0,a.__)("Please provide a valid payment amount.")).subscribe():r.filter((function(e){return"account-payment"===e.identifier})).length>0?j.kX.error((0,a.__)("The customer account can only be used once per order. Consider deleting the previously used payment.")).subscribe():t>this.order.customer.account_amount?j.kX.error((0,a.__)("Not enough funds to add {amount} as a payment. Available balance {balance}.").replace("{amount}",this.$options.filters.currency(t)).replace("{balance}",this.$options.filters.currency(this.order.customer.account_amount))).subscribe():(POS.addPayment({value:t,identifier:"account-payment",selected:!1,label:this.label,readonly:!1}),this.order.customer.account_amount-=t,POS.selectCustomer(this.order.customer),void this.$emit("submit"))},proceedFullPayment:function(){this.proceedAddingPayment(this.order.total)},makeFullPayment:function(){var e=this;Popup.show(p.Z,{title:(0,a.__)("Confirm Full Payment"),message:(0,a.__)("You're about to use {amount} from the customer account to make a payment. Would you like to proceed ?").replace("{amount}",this.$options.filters.currency(this.order.total)),onAction:function(t){t&&e.proceedFullPayment()}})}},mounted:function(){var e=this;this.subscription=POS.order.subscribe((function(t){return e.order=t}))},destroyed:function(){this.subscription.unsubscribe()}};const P=(0,d.Z)(S,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"h-full w-full py-2"},[e.order?r("div",{staticClass:"px-2 pb-2"},[r("div",{staticClass:"grid grid-cols-2 gap-2"},[r("div",{staticClass:"h-16 flex justify-between items-center bg-blue-400 text-white text-xl md:text-3xl p-2",attrs:{id:"details"}},[r("span",[e._v(e._s(e.__("Total"))+" : ")]),e._v(" "),r("span",[e._v(e._s(e._f("currency")(e.order.total)))])]),e._v(" "),r("div",{staticClass:"cursor-pointer h-16 flex justify-between items-center bg-red-400 text-white text-xl md:text-3xl p-2",attrs:{id:"discount"},on:{click:function(t){return e.toggleDiscount()}}},[r("span",[e._v(e._s(e.__("Discount"))+" : ")]),e._v(" "),r("span",[e._v(e._s(e._f("currency")(e.order.discount)))])]),e._v(" "),r("div",{staticClass:"h-16 flex justify-between items-center bg-green-400 text-white text-xl md:text-3xl p-2",attrs:{id:"paid"}},[r("span",[e._v(e._s(e.__("Paid"))+" : ")]),e._v(" "),r("span",[e._v(e._s(e._f("currency")(e.order.tendered)))])]),e._v(" "),r("div",{staticClass:"h-16 flex justify-between items-center bg-teal-400 text-white text-xl md:text-3xl p-2",attrs:{id:"change"}},[r("span",[e._v(e._s(e.__("Change"))+" : ")]),e._v(" "),r("span",[e._v(e._s(e._f("currency")(e.order.change)))])]),e._v(" "),r("div",{staticClass:"col-span-2 h-16 flex justify-between items-center bg-blue-400 text-white text-xl md:text-3xl p-2",attrs:{id:"change"}},[r("span",[e._v(e._s(e.__("Current Balance"))+" : ")]),e._v(" "),r("span",[e._v(e._s(e._f("currency")(e.order.customer.account_amount)))])]),e._v(" "),r("div",{staticClass:"col-span-2 h-16 flex justify-between items-center bg-gray-300 text-gray-800 text-xl md:text-3xl p-2",attrs:{id:"change"}},[r("span",[e._v(e._s(e.__("Screen"))+" : ")]),e._v(" "),r("span",[e._v(e._s(e._f("currency")(e.screenValue)))])])])]):e._e(),e._v(" "),r("div",{staticClass:"px-2 pb-2"},[r("div",{staticClass:"-mx-2 flex flex-wrap"},[r("div",{staticClass:"pl-2 pr-1 flex-auto"},[r("ns-numpad",{attrs:{floating:!0},on:{changed:function(t){return e.handleChange(t)},next:function(t){return e.proceedAddingPayment(t)}},scopedSlots:e._u([{key:"numpad-footer",fn:function(){return[r("div",{staticClass:"hover:bg-green-500 col-span-3 bg-green-400 text-2xl text-white border h-16 flex items-center justify-center cursor-pointer",on:{click:function(t){return e.makeFullPayment()}}},[e._v("\n "+e._s(e.__("Full Payment")))])]},proxy:!0}])})],1),e._v(" "),r("div",{staticClass:"w-1/2 md:w-72 pr-2 pl-1"},[r("div",{staticClass:"grid grid-flow-row grid-rows-1 gap-2"},[r("div",{staticClass:"hover:bg-gray-400 hover:text-gray-800 bg-gray-300 text-2xl text-gray-700 border h-16 flex items-center justify-center cursor-pointer",on:{click:function(t){return e.increaseBy({value:100})}}},[r("span",[e._v(e._s(e._f("currency")(100)))])]),e._v(" "),r("div",{staticClass:"hover:bg-gray-400 hover:text-gray-800 bg-gray-300 text-2xl text-gray-700 border h-16 flex items-center justify-center cursor-pointer",on:{click:function(t){return e.increaseBy({value:500})}}},[r("span",[e._v(e._s(e._f("currency")(500)))])]),e._v(" "),r("div",{staticClass:"hover:bg-gray-400 hover:text-gray-800 bg-gray-300 text-2xl text-gray-700 border h-16 flex items-center justify-center cursor-pointer",on:{click:function(t){return e.increaseBy({value:1e3})}}},[r("span",[e._v(e._s(e._f("currency")(1e3)))])])])])])])])}),[],!1,null,null,null).exports;var O=r(1957);function $(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,s)}return r}function T(e){for(var t=1;t0&&e[0]},expectedPayment:function(){var e=this.order.customer.group.minimal_credit_payment;return this.order.total*e/100}},mounted:function(){var e=this;this.$popup.event.subscribe((function(t){switch(t.event){case"click-overlay":e.closePopup()}})),this.order=this.$popupParams.order,this.paymentTypesSubscription=POS.paymentsType.subscribe((function(t){e.paymentsType=t,t.filter((function(e){e.selected&&POS.selectedPaymentType.next(e)}))}))},watch:{activePayment:function(e){this.loadPaymentComponent(e)}},destroyed:function(){this.paymentTypesSubscription.unsubscribe()},methods:{__:a.__,resolveIfQueued:o.Z,loadPaymentComponent:function(e){switch(e.identifier){case"cash-payment":this.currentPaymentComponent=_;break;case"creditcard-payment":this.currentPaymentComponent=x;break;case"bank-payment":this.currentPaymentComponent=C;break;case"account-payment":this.currentPaymentComponent=P;break;default:this.currentPaymentComponent=m}},select:function(e){this.showPayment=!1,POS.setPaymentActive(e)},closePopup:function(){this.$popup.close(),POS.selectedPaymentType.next(null)},deletePayment:function(e){POS.removePayment(e)},selectPaymentAsActive:function(e){this.select(this.paymentsType.filter((function(t){return t.identifier===e.target.value}))[0])},submitOrder:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=i.G.show(O.Z);try{var s=T(T({},POS.order.getValue()),t);POS.submitOrder(s).then((function(t){r.close(),j.kX.success(t.message).subscribe(),POS.printOrder(t.data.order.id),e.$popup.close()}),(function(e){r.close(),j.kX.error(e.message).subscribe()}))}catch(e){r.close(),j.kX.error(error.message).subscribe()}}}};const A=(0,d.Z)(V,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return e.order?r("div",{staticClass:"w-screen h-screen p-4 flex overflow-hidden"},[r("div",{staticClass:"flex flex-col flex-auto lg:flex-row bg-white shadow-xl"},[r("div",{staticClass:"w-full lg:w-56 bg-gray-300 lg:h-full flex justify-between px-2 lg:px-0 lg:block items-center lg:items-start"},[r("h3",{staticClass:"text-xl text-center my-4 font-bold lg:my-8 text-gray-700"},[e._v(e._s(e.__("Payments Gateway")))]),e._v(" "),r("ul",{staticClass:"hidden lg:block"},[e._l(e.paymentsType,(function(t){return r("li",{key:t.identifier,staticClass:"cursor-pointer hover:bg-gray-400 py-2 px-3",class:t.selected&&!e.showPayment?"bg-white text-gray-800":"text-gray-700",on:{click:function(r){return e.select(t)}}},[e._v(e._s(t.label))])})),e._v(" "),r("li",{staticClass:"cursor-pointer text-gray-700 hover:bg-gray-400 py-2 px-3 border-t border-gray-400 mt-4 flex items-center justify-between",class:e.showPayment?"bg-white text-gray-800":"text-gray-700",on:{click:function(t){e.showPayment=!0}}},[r("span",[e._v(e._s(e.__("Payment List")))]),e._v(" "),r("span",{staticClass:"px-2 rounded-full h-8 w-8 flex items-center justify-center bg-green-500 text-white"},[e._v(e._s(e.order.payments.length))])])],2),e._v(" "),r("ns-close-button",{staticClass:"lg:hidden",on:{click:function(t){return e.closePopup()}}})],1),e._v(" "),r("div",{staticClass:"overflow-hidden flex flex-col flex-auto"},[r("div",{staticClass:"flex flex-col flex-auto overflow-hidden"},[r("div",{staticClass:"h-12 bg-gray-300 hidden items-center justify-between lg:flex"},[r("div"),e._v(" "),r("div",{staticClass:"px-2"},[r("ns-close-button",{on:{click:function(t){return e.closePopup()}}})],1)]),e._v(" "),e.showPayment?e._e():r("div",{staticClass:"flex flex-auto overflow-y-auto"},[r(e.currentPaymentComponent,{tag:"component",attrs:{label:e.activePayment.label,identifier:e.activePayment.identifier},on:{submit:function(t){return e.submitOrder()}}})],1),e._v(" "),e.showPayment?r("div",{staticClass:"flex flex-auto overflow-y-auto p-2 flex-col"},[r("h3",{staticClass:"text-center font-bold py-2 text-gray-700"},[e._v(e._s(e.__("List Of Payments")))]),e._v(" "),r("ul",{staticClass:"flex-auto"},[0===e.order.payments.length?r("li",{staticClass:"p-2 bg-gray-200 flex justify-center mb-2 items-center"},[r("h3",{staticClass:"font-semibold"},[e._v(e._s(e.__("No Payment added.")))])]):e._e(),e._v(" "),e._l(e.order.payments,(function(t,s){return r("li",{key:s,staticClass:"p-2 bg-gray-200 flex justify-between mb-2 items-center"},[r("span",[e._v(e._s(t.label))]),e._v(" "),r("div",{staticClass:"flex items-center"},[r("span",[e._v(e._s(e._f("currency")(t.value)))]),e._v(" "),r("button",{staticClass:"rounded-full bg-red-400 h-8 w-8 flex items-center justify-center text-white ml-2",on:{click:function(r){return e.deletePayment(t)}}},[r("i",{staticClass:"las la-trash-alt"})])])])}))],2)]):e._e()]),e._v(" "),r("div",{staticClass:"flex flex-col lg:flex-row w-full bg-gray-300 justify-between p-2"},[r("div",{staticClass:"flex mb-1"},[r("div",{staticClass:"flex items-center lg:hidden"},[r("h3",{staticClass:"font-semibold mr-2"},[e._v(e._s(e.__("Select Payment")))]),e._v(" "),r("select",{staticClass:"p-2 rounded border-2 border-blue-400 bg-white shadow",on:{change:function(t){return e.selectPaymentAsActive(t)}}},[r("option",{attrs:{value:""}},[e._v(e._s(e.__("Choose Payment")))]),e._v(" "),e._l(e.paymentsType,(function(t){return r("option",{key:t.identifier,domProps:{selected:e.activePayment.identifier===t.identifier,value:t.identifier},on:{click:function(r){return e.select(t)}}},[e._v(e._s(t.label))])}))],2)])]),e._v(" "),r("div",{staticClass:"flex justify-end"},[e.order.tendered>=e.order.total?r("ns-button",{attrs:{type:e.order.tendered>=e.order.total?"success":"info"},on:{click:function(t){return e.submitOrder()}}},[r("span",[r("i",{staticClass:"las la-cash-register"}),e._v(" "+e._s(e.__("Submit Payment")))])]):e._e(),e._v(" "),e.order.tendered=e.order.total?"success":"info"},on:{click:function(t){return e.submitOrder({payment_status:"unpaid"})}}},[r("span",[r("i",{staticClass:"las la-bookmark"}),e._v(" "+e._s(e.__("Layaway"))+" — "+e._s(e._f("currency")(e.expectedPayment)))])]):e._e()],1)])])])]):e._e()}),[],!1,null,null,null).exports;r(9531);var D=r(279),F=r(3625),Z=r(4326);function q(e,t){for(var r=0;r0&&void 0!==e[0]?e[0]:"settings",r.prev=1,r.next=4,new Promise((function(e,r){var n=t.order.taxes,o=t.order.tax_group_id,a=t.order.tax_type;i.G.show(te,{resolve:e,reject:r,taxes:n,tax_group_id:o,tax_type:a,activeTab:s})}));case 4:o=r.sent,a=pe(pe({},t.order),o),POS.order.next(a),POS.refreshCart(),r.next=13;break;case 10:r.prev=10,r.t0=r.catch(1),console.log(r.t0);case 13:case"end":return r.stop()}}),r,null,[[1,10]])})))()},openTaxSummary:function(){this.selectTaxGroup("summary")},voidOngoingOrder:function(){POS.voidOrder(this.order)},holdOrder:function(){var e=this;return be(n().mark((function t(){var r,s,o;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!("hold"!==e.order.payment_status&&e.order.payments.length>0)){t.next=2;break}return t.abrupt("return",j.kX.error("Unable to hold an order which payment status has been updated already.").subscribe());case 2:r=j.kq.applyFilters("ns-hold-queue",[I,L,X]),t.t0=n().keys(r);case 4:if((t.t1=t.t0()).done){t.next=18;break}return s=t.t1.value,t.prev=6,o=new r[s](e.order),t.next=10,o.run();case 10:t.sent,t.next=16;break;case 13:return t.prev=13,t.t2=t.catch(6),t.abrupt("return",!1);case 16:t.next=4;break;case 18:j.kq.applyFilters("ns-override-hold-popup",(function(){new Promise((function(t,r){i.G.show(B,{resolve:t,reject:r,order:e.order})})).then((function(t){e.order.title=t.title,e.order.payment_status="hold",POS.order.next(e.order);var r=i.G.show(O.Z);POS.submitOrder().then((function(e){r.close(),j.kX.success(e.message).subscribe()}),(function(e){r.close(),j.kX.error(e.message).subscribe()}))}))}))();case 20:case"end":return t.stop()}}),t,null,[[6,13]])})))()},openDiscountPopup:function(e,t){return this.settings.products_discount||"product"!==t?this.settings.cart_discount||"cart"!==t?void i.G.show(f,{reference:e,type:t,onSubmit:function(r){"product"===t?POS.updateProduct(e,r):"cart"===t&&POS.updateCart(e,r)}},{popupClass:"bg-white h:2/3 shadow-lg xl:w-1/4 lg:w-2/5 md:w-2/3 w-full"}):j.kX.error("You're not allowed to add a discount on the cart.").subscribe():j.kX.error("You're not allowed to add a discount on the product.").subscribe()},selectCustomer:function(){i.G.show(Z.Z)},toggleMode:function(e){"normal"===e.mode?i.G.show(p.Z,{title:"Enable WholeSale Price",message:"Would you like to switch to wholesale price ?",onAction:function(t){t&&POS.updateProduct(e,{mode:"wholesale"})}}):i.G.show(p.Z,{title:"Enable Normal Price",message:"Would you like to switch to normal price ?",onAction:function(t){t&&POS.updateProduct(e,{mode:"normal"})}})},remove:function(e){i.G.show(p.Z,{title:"Confirm Your Action",message:"Would you like to delete this product ?",onAction:function(t){t&&POS.removeProduct(e)}})},changeQuantity:function(e){new D.$(e).run({unit_quantity_id:e.unit_quantity_id,unit_name:e.unit_name,$quantities:e.$quantities}).then((function(t){POS.updateProduct(e,t)}))},payOrder:function(){var e=this;return be(n().mark((function t(){var r,s,i;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=[I,L,X,z],t.t0=n().keys(r);case 2:if((t.t1=t.t0()).done){t.next=16;break}return s=t.t1.value,t.prev=4,i=new r[s](e.order),t.next=8,i.run();case 8:t.sent,t.next=14;break;case 11:return t.prev=11,t.t2=t.catch(4),t.abrupt("return",!1);case 14:t.next=2;break;case 16:case"end":return t.stop()}}),t,null,[[4,11]])})))()},openOrderType:function(){i.G.show(F.Z)},openShippingPopup:function(){i.G.show(H.Z)}}};const ge=(0,d.Z)(me,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"flex-auto flex flex-col",attrs:{id:"pos-cart"}},["cart"===e.visibleSection?r("div",{staticClass:"flex pl-2",attrs:{id:"tools"}},[r("div",{staticClass:"flex cursor-pointer rounded-tl-lg rounded-tr-lg px-3 py-2 bg-white font-semibold text-gray-700",on:{click:function(t){return e.switchTo("cart")}}},[r("span",[e._v(e._s(e.__("Cart")))]),e._v(" "),e.order?r("span",{staticClass:"flex items-center justify-center text-sm rounded-full h-6 w-6 bg-green-500 text-white ml-1"},[e._v(e._s(e.order.products.length))]):e._e()]),e._v(" "),r("div",{staticClass:"cursor-pointer rounded-tl-lg rounded-tr-lg px-3 py-2 bg-gray-300 border-t border-r border-l border-gray-300 text-gray-600",on:{click:function(t){return e.switchTo("grid")}}},[e._v("\n "+e._s(e.__("Products"))+"\n ")])]):e._e(),e._v(" "),r("div",{staticClass:"rounded shadow bg-white flex-auto flex overflow-hidden"},[r("div",{staticClass:"cart-table flex flex-auto flex-col overflow-hidden"},[r("div",{staticClass:"w-full p-2 border-b border-gray-300",attrs:{id:"cart-toolbox"}},[r("div",{staticClass:"border border-gray-300 rounded overflow-hidden"},[r("div",{staticClass:"flex flex-wrap"},[r("div",[r("button",{staticClass:"w-full h-10 px-3 bg-gray-200 border-r border-gray-300 outline-none",on:{click:function(t){return e.openNotePopup()}}},[r("i",{staticClass:"las la-comment"}),e._v(" "),r("span",{staticClass:"ml-1 hidden md:inline-block"},[e._v(e._s(e.__("Comments")))])])]),e._v(" "),r("div",[r("button",{staticClass:"w-full h-10 px-3 bg-gray-200 border-r border-gray-300 outline-none flex items-center",on:{click:function(t){return e.selectTaxGroup()}}},[r("i",{staticClass:"las la-balance-scale-left"}),e._v(" "),r("span",{staticClass:"ml-1 hidden md:inline-block"},[e._v(e._s(e.__("Taxes")))]),e._v(" "),e.order.taxes&&e.order.taxes.length>0?r("span",{staticClass:"ml-1 rounded-full flex items-center justify-center h-6 w-6 bg-blue-400 text-white"},[e._v(e._s(e.order.taxes.length))]):e._e()])]),e._v(" "),r("div",[r("button",{staticClass:"w-full h-10 px-3 bg-gray-200 border-r border-gray-300 outline-none flex items-center",on:{click:function(t){return e.selectCoupon()}}},[r("i",{staticClass:"las la-tags"}),e._v(" "),r("span",{staticClass:"ml-1 hidden md:inline-block"},[e._v(e._s(e.__("Coupons")))]),e._v(" "),e.order.coupons&&e.order.coupons.length>0?r("span",{staticClass:"ml-1 rounded-full flex items-center justify-center h-6 w-6 bg-blue-400 text-white"},[e._v(e._s(e.order.coupons.length))]):e._e()])]),e._v(" "),r("div",[r("button",{staticClass:"w-full h-10 px-3 bg-gray-200 border-r border-gray-300 outline-none flex items-center",on:{click:function(t){return e.defineOrderSettings()}}},[r("i",{staticClass:"las la-tools"}),e._v(" "),r("span",{staticClass:"ml-1 hidden md:inline-block"},[e._v(e._s(e.__("Settings")))])])]),e._v(" "),r("div",[r("button",{staticClass:"w-full h-10 px-3 bg-gray-200 border-r border-gray-300 outline-none flex items-center",on:{click:function(t){return e.openAddQuickProduct()}}},[r("i",{staticClass:"las la-plus"}),e._v(" "),r("span",{staticClass:"ml-1 hidden md:inline-block"},[e._v(e._s(e.__("Product")))])])])])])]),e._v(" "),r("div",{staticClass:"w-full text-gray-700 font-semibold flex",attrs:{id:"cart-table-header"}},[r("div",{staticClass:"w-full lg:w-4/6 p-2 border border-l-0 border-t-0 border-gray-200 bg-gray-100"},[e._v(e._s(e.__("Product")))]),e._v(" "),r("div",{staticClass:"hidden lg:flex lg:w-1/6 p-2 border-b border-t-0 border-gray-200 bg-gray-100"},[e._v(e._s(e.__("Quantity")))]),e._v(" "),r("div",{staticClass:"hidden lg:flex lg:w-1/6 p-2 border border-r-0 border-t-0 border-gray-200 bg-gray-100"},[e._v(e._s(e.__("Total")))])]),e._v(" "),r("div",{staticClass:"flex flex-auto flex-col overflow-auto",attrs:{id:"cart-products-table"}},[0===e.products.length?r("div",{staticClass:"text-gray-700 flex"},[r("div",{staticClass:"w-full text-center py-4 border-b border-gray-200"},[r("h3",{staticClass:"text-gray-600"},[e._v(e._s(e.__("No products added...")))])])]):e._e(),e._v(" "),e._l(e.products,(function(t,s){return r("div",{key:t.barcode,staticClass:"text-gray-700 flex",attrs:{"product-index":s}},[r("div",{staticClass:"w-full lg:w-4/6 p-2 border border-l-0 border-t-0 border-gray-200"},[r("div",{staticClass:"flex justify-between product-details mb-1"},[r("h3",{staticClass:"font-semibold"},[e._v("\n "+e._s(t.name)+" — "+e._s(t.unit_name)+"\n ")]),e._v(" "),r("div",{staticClass:"-mx-1 flex product-options"},[r("div",{staticClass:"px-1"},[r("a",{staticClass:"hover:text-red-400 cursor-pointer outline-none border-dashed py-1 border-b border-red-400 text-sm",on:{click:function(r){return e.remove(t)}}},[r("i",{staticClass:"las la-trash text-xl"})])]),e._v(" "),r("div",{staticClass:"px-1"},[r("a",{staticClass:"hover:text-blue-600 cursor-pointer outline-none border-dashed py-1 border-b text-sm",class:"wholesale"===t.mode?"text-green-600 border-green-600":"border-blue-400",on:{click:function(r){return e.toggleMode(t)}}},[r("i",{staticClass:"las la-award text-xl"})])])])]),e._v(" "),r("div",{staticClass:"flex justify-between product-controls"},[r("div",{staticClass:"-mx-1 flex flex-wrap"},[r("div",{staticClass:"px-1 w-1/2 md:w-auto mb-1"},[r("a",{staticClass:"cursor-pointer outline-none border-dashed py-1 border-b text-sm",class:"wholesale"===t.mode?"text-green-600 hover:text-green-700 border-green-600":"hover:text-blue-400 border-blue-400",on:{click:function(r){return e.changeProductPrice(t)}}},[e._v(e._s(e.__("Price"))+" : "+e._s(e._f("currency")(t.unit_price)))])]),e._v(" "),r("div",{staticClass:"px-1 w-1/2 md:w-auto mb-1"},[r("a",{staticClass:"hover:text-blue-400 cursor-pointer outline-none border-dashed py-1 border-b border-blue-400 text-sm",on:{click:function(r){return e.openDiscountPopup(t,"product")}}},[e._v(e._s(e.__("Discount"))+" "),"percentage"===t.discount_type?r("span",[e._v(e._s(t.discount_percentage)+"%")]):e._e(),e._v(" : "+e._s(e._f("currency")(t.discount)))])]),e._v(" "),r("div",{staticClass:"px-1 w-1/2 md:w-auto mb-1 lg:hidden"},[r("a",{staticClass:"hover:text-blue-400 cursor-pointer outline-none border-dashed py-1 border-b border-blue-400 text-sm",on:{click:function(r){return e.changeQuantity(t)}}},[e._v(e._s(e.__("Quantity :"))+" "+e._s(t.quantity))])]),e._v(" "),r("div",{staticClass:"px-1 w-1/2 md:w-auto mb-1 lg:hidden"},[r("span",{staticClass:"hover:text-blue-400 cursor-pointer outline-none border-dashed py-1 border-b border-blue-400 text-sm"},[e._v(e._s(e.__("Total :"))+" "+e._s(e._f("currency")(t.total_price)))])])])])]),e._v(" "),r("div",{staticClass:"hidden lg:flex w-1/6 p-2 border-b border-gray-200 items-center justify-center cursor-pointer hover:bg-blue-100",on:{click:function(r){return e.changeQuantity(t)}}},[r("span",{staticClass:"border-b border-dashed border-blue-400 p-2"},[e._v(e._s(t.quantity))])]),e._v(" "),r("div",{staticClass:"hidden lg:flex w-1/6 p-2 border border-r-0 border-t-0 border-gray-200 items-center justify-center"},[e._v(e._s(e._f("currency")(t.total_price)))])])}))],2),e._v(" "),r("div",{staticClass:"flex",attrs:{id:"cart-products-summary"}},["both"===e.visibleSection?r("table",{staticClass:"table w-full text-sm text-gray-700"},[r("tr",[r("td",{staticClass:"border border-gray-300 p-2",attrs:{width:"200"}},[r("a",{staticClass:"hover:text-blue-400 cursor-pointer outline-none border-dashed py-1 border-b border-blue-400 text-sm",on:{click:function(t){return e.selectCustomer()}}},[e._v("Customer : "+e._s(e.customerName))])]),e._v(" "),r("td",{staticClass:"border border-gray-300 p-2",attrs:{width:"200"}},[e._v(e._s(e.__("Sub Total")))]),e._v(" "),r("td",{staticClass:"border border-gray-300 p-2 text-right",attrs:{width:"200"}},[e._v(e._s(e._f("currency")(e.order.subtotal)))])]),e._v(" "),r("tr",[r("td",{staticClass:"border border-gray-300 p-2",attrs:{width:"200"}},[r("a",{staticClass:"hover:text-blue-400 cursor-pointer outline-none border-dashed py-1 border-b border-blue-400 text-sm",on:{click:function(t){return e.openOrderType()}}},[e._v(e._s(e.__("Type :"))+" "+e._s(e.selectedType))])]),e._v(" "),r("td",{staticClass:"border border-gray-300 p-2",attrs:{width:"200"}},[r("span",[e._v(e._s(e.__("Discount")))]),e._v(" "),"percentage"===e.order.discount_type?r("span",[e._v("("+e._s(e.order.discount_percentage)+"%)")]):e._e(),e._v(" "),"flat"===e.order.discount_type?r("span",[e._v("("+e._s(e.__("Flat"))+")")]):e._e()]),e._v(" "),r("td",{staticClass:"border border-gray-300 p-2 text-right",attrs:{width:"200"}},[r("a",{staticClass:"hover:text-blue-400 cursor-pointer outline-none border-dashed py-1 border-b border-blue-400 text-sm",on:{click:function(t){return e.openDiscountPopup(e.order,"cart")}}},[e._v(e._s(e._f("currency")(e.order.discount)))])])]),e._v(" "),e.order.type&&"delivery"===e.order.type.identifier?r("tr",[r("td",{staticClass:"border border-gray-300 p-2",attrs:{width:"200"}}),e._v(" "),r("td",{staticClass:"border border-gray-300 p-2",attrs:{width:"200"}},[r("a",{staticClass:"hover:text-blue-400 cursor-pointer outline-none border-dashed py-1 border-b border-blue-400 text-sm",on:{click:function(t){return e.openShippingPopup()}}},[e._v(e._s(e.__("Shipping")))])]),e._v(" "),r("td",{staticClass:"border border-gray-300 p-2 text-right",attrs:{width:"200"}},[e._v(e._s(e._f("currency")(e.order.shipping)))])]):e._e(),e._v(" "),r("tr",{staticClass:"bg-green-200"},[r("td",{staticClass:"border border-gray-300 p-2",attrs:{width:"200"}},[e.order?r("a",{staticClass:"hover:text-blue-400 cursor-pointer outline-none border-dashed py-1 border-b border-blue-400 text-sm",on:{click:function(t){return e.openTaxSummary()}}},[e._v("Tax : "+e._s(e._f("currency")(e.order.tax_value)))]):e._e()]),e._v(" "),r("td",{staticClass:"border border-gray-300 p-2",attrs:{width:"200"}},[e._v(e._s(e.__("Total")))]),e._v(" "),r("td",{staticClass:"border border-gray-300 p-2 text-right",attrs:{width:"200"}},[e._v(e._s(e._f("currency")(e.order.total)))])])]):e._e(),e._v(" "),"cart"===e.visibleSection?r("table",{staticClass:"table w-full text-sm text-gray-700"},[r("tr",[r("td",{staticClass:"border border-gray-300 p-2",attrs:{width:"200"}},[r("a",{staticClass:"hover:text-blue-400 cursor-pointer outline-none border-dashed py-1 border-b border-blue-400 text-sm",on:{click:function(t){return e.selectCustomer()}}},[e._v(e._s(e.__("Customer :"))+" "+e._s(e.customerName))])]),e._v(" "),r("td",{staticClass:"border border-gray-300 p-2",attrs:{width:"200"}},[r("div",{staticClass:"flex justify-between"},[r("span",[e._v(e._s(e.__("Sub Total")))]),e._v(" "),r("span",[e._v(e._s(e._f("currency")(e.order.subtotal)))])])])]),e._v(" "),r("tr",[r("td",{staticClass:"border border-gray-300 p-2",attrs:{width:"200"}},[r("a",{staticClass:"hover:text-blue-400 cursor-pointer outline-none border-dashed py-1 border-b border-blue-400 text-sm",on:{click:function(t){return e.openOrderType()}}},[e._v(e._s(e.__("Type :"))+" "+e._s(e.selectedType))])]),e._v(" "),r("td",{staticClass:"border border-gray-300 p-2",attrs:{width:"200"}},[r("div",{staticClass:"flex justify-between items-center"},[r("p",[r("span",[e._v(e._s(e.__("Discount")))]),e._v(" "),"percentage"===e.order.discount_type?r("span",[e._v("("+e._s(e.order.discount_percentage)+"%)")]):e._e(),e._v(" "),"flat"===e.order.discount_type?r("span",[e._v("("+e._s(e.__("Flat"))+")")]):e._e()]),e._v(" "),r("a",{staticClass:"hover:text-blue-400 cursor-pointer outline-none border-dashed py-1 border-b border-blue-400 text-sm",on:{click:function(t){return e.openDiscountPopup(e.order,"cart")}}},[e._v(e._s(e._f("currency")(e.order.discount)))])])])]),e._v(" "),e.order.type&&"delivery"===e.order.type.identifier?r("tr",[r("td",{staticClass:"border border-gray-300 p-2",attrs:{width:"200"}}),e._v(" "),r("td",{staticClass:"border border-gray-300 p-2",attrs:{width:"200"}},[r("a",{staticClass:"hover:text-blue-400 cursor-pointer outline-none border-dashed py-1 border-b border-blue-400 text-sm",on:{click:function(t){return e.openShippingPopup()}}},[e._v(e._s(e.__("Shipping")))]),e._v(" "),r("span")])]):e._e(),e._v(" "),r("tr",{staticClass:"bg-green-200"},[r("td",{staticClass:"border border-gray-300 p-2",attrs:{width:"200"}},[e.order?r("a",{staticClass:"hover:text-blue-400 cursor-pointer outline-none border-dashed py-1 border-b border-blue-400 text-sm",on:{click:function(t){return e.openTaxSummary()}}},[e._v(e._s(e.__("Tax :"))+" "+e._s(e._f("currency")(e.order.tax_value)))]):e._e()]),e._v(" "),r("td",{staticClass:"border border-gray-300 p-2",attrs:{width:"200"}},[r("div",{staticClass:"flex justify-between w-full"},[r("span",[e._v(e._s(e.__("Total")))]),e._v(" "),r("span",[e._v(e._s(e._f("currency")(e.order.total)))])])])])]):e._e()]),e._v(" "),r("div",{staticClass:"h-16 flex flex-shrink-0 border-t border-gray-200",attrs:{id:"cart-bottom-buttons"}},[r("div",{staticClass:"flex-shrink-0 w-1/4 flex items-center font-bold cursor-pointer justify-center bg-green-500 text-white hover:bg-green-600 border-r border-green-600 flex-auto",attrs:{id:"pay-button"},on:{click:function(t){return e.payOrder()}}},[r("i",{staticClass:"mr-2 text-2xl lg:text-xl las la-cash-register"}),e._v(" "),r("span",{staticClass:"text-lg hidden md:inline lg:text-2xl"},[e._v(e._s(e.__("Pay")))])]),e._v(" "),r("div",{staticClass:"flex-shrink-0 w-1/4 flex items-center font-bold cursor-pointer justify-center bg-blue-500 text-white border-r hover:bg-blue-600 border-blue-600 flex-auto",attrs:{id:"hold-button"},on:{click:function(t){return e.holdOrder()}}},[r("i",{staticClass:"mr-2 text-2xl lg:text-xl las la-pause"}),e._v(" "),r("span",{staticClass:"text-lg hidden md:inline lg:text-2xl"},[e._v(e._s(e.__("Hold")))])]),e._v(" "),r("div",{staticClass:"flex-shrink-0 w-1/4 flex items-center font-bold cursor-pointer justify-center bg-white border-r border-gray-200 hover:bg-indigo-100 flex-auto text-gray-700",attrs:{id:"discount-button"},on:{click:function(t){return e.openDiscountPopup(e.order,"cart")}}},[r("i",{staticClass:"mr-2 text-2xl lg:text-xl las la-percent"}),e._v(" "),r("span",{staticClass:"text-lg hidden md:inline lg:text-2xl"},[e._v(e._s(e.__("Discount")))])]),e._v(" "),r("div",{staticClass:"flex-shrink-0 w-1/4 flex items-center font-bold cursor-pointer justify-center bg-red-500 text-white border-gray-200 hover:bg-red-600 flex-auto",attrs:{id:"void-button"},on:{click:function(t){return e.voidOngoingOrder(e.order)}}},[r("i",{staticClass:"mr-2 text-2xl lg:text-xl las la-trash"}),e._v(" "),r("span",{staticClass:"text-lg hidden md:inline lg:text-2xl"},[e._v(e._s(e.__("Void")))])])])])])])}),[],!1,null,null,null).exports},874:(e,t,r)=>{"use strict";r.d(t,{Z:()=>u});var s=r(162),n=r(9763),i=r(8603);const o={name:"ns-pos-search-product",data:function(){return{searchValue:"",products:[],isLoading:!1}},mounted:function(){this.$refs.searchField.focus(),this.popupCloser()},methods:{__:r(7389).__,popupCloser:i.Z,addToCart:function(e){POS.addToCart(e),this.$popup.close()},search:function(){var e=this;this.isLoading=!0,s.ih.post("/api/nexopos/v4/products/search",{search:this.searchValue}).subscribe((function(t){e.isLoading=!1,e.products=t,1===e.products.length&&e.addToCart(e.products[0])}),(function(t){e.isLoading=!1,s.kX.error(t.message).subscribe()}))}}};var a=r(1900);const l=(0,a.Z)(o,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"bg-white shadow-lg w-95vw h-95vh md:h-3/5-screen md:w-2/4-screen flex flex-col overflow-hidden"},[r("div",{staticClass:"p-2 border-b border-gray-300 flex justify-between items-center"},[r("h3",{staticClass:"text-gray-700"},[e._v(e._s(e.__("Search Product")))]),e._v(" "),r("div",[r("ns-close-button",{on:{click:function(t){return e.$popup.close()}}})],1)]),e._v(" "),r("div",{staticClass:"flex-auto overflow-hidden flex flex-col"},[r("div",{staticClass:"p-2 border-b border-gray-300"},[r("div",{staticClass:"flex border-blue-400 border-2 rounded overflow-hidden"},[r("input",{directives:[{name:"model",rawName:"v-model",value:e.searchValue,expression:"searchValue"}],ref:"searchField",staticClass:"p-2 outline-none flex-auto text-gray-700 bg-blue-100",attrs:{type:"text"},domProps:{value:e.searchValue},on:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.search()},input:function(t){t.target.composing||(e.searchValue=t.target.value)}}}),e._v(" "),r("button",{staticClass:"px-2 bg-blue-400 text-white",on:{click:function(t){return e.search()}}},[e._v(e._s(e.__("Search")))])])]),e._v(" "),r("div",{staticClass:"overflow-y-auto flex-auto relative"},[r("ul",[e._l(e.products,(function(t){return r("li",{key:t.id,staticClass:"hover:bg-blue-100 cursor-pointer p-2 flex justify-between border-b",on:{click:function(r){return e.addToCart(t)}}},[r("div",{staticClass:"text-gray-700"},[e._v("\n "+e._s(t.name)+"\n ")]),e._v(" "),r("div")])})),e._v(" "),0===e.products.length?r("li",{staticClass:"text-gray-700 text-center p-2"},[e._v(e._s(e.__("There is nothing to display. Have you started the search ?")))]):e._e()],2),e._v(" "),e.isLoading?r("div",{staticClass:"absolute h-full w-full flex items-center justify-center z-10 top-0",staticStyle:{background:"rgb(187 203 214 / 29%)"}},[r("ns-spinner")],1):e._e()])])])}),[],!1,null,null,null).exports,c={name:"ns-pos-grid",data:function(){return{items:Array.from({length:1e3},(function(e,t){return{data:"#"+t}})),products:[],categories:[],breadcrumbs:[],autoFocus:!1,barcode:"",previousCategory:null,order:null,visibleSection:null,breadcrumbsSubsribe:null,orderSubscription:null,visibleSectionSubscriber:null,currentCategory:null,interval:null,searchTimeout:null,gridItemsWidth:0,gridItemsHeight:0,screenSubscriber:null,rebuildGridTimeout:null,rebuildGridComplete:!1}},computed:{hasCategories:function(){return this.categories.length>0}},watch:{barcode:function(){var e=this;clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout((function(){e.submitSearch(e.barcode)}),200)}},mounted:function(){var e=this;this.loadCategories(),this.breadcrumbsSubsribe=POS.breadcrumbs.subscribe((function(t){e.breadcrumbs=t})),this.visibleSectionSubscriber=POS.visibleSection.subscribe((function(t){e.visibleSection=t})),this.screenSubscriber=POS.screen.subscribe((function(t){clearTimeout(e.rebuildGridTimeout),e.rebuildGridComplete=!1,e.rebuildGridTimeout=setTimeout((function(){e.rebuildGridComplete=!0,e.computeGridWidth()}),500)})),this.orderSubscription=POS.order.subscribe((function(t){return e.order=t})),this.interval=setInterval((function(){return e.checkFocus()}),500)},destroyed:function(){this.orderSubscription.unsubscribe(),this.breadcrumbsSubsribe.unsubscribe(),this.visibleSectionSubscriber.unsubscribe(),this.screenSubscriber.unsubscribe(),clearInterval(this.interval)},methods:{switchTo:n.Z,computeGridWidth:function(){null!==document.getElementById("grid-items")&&(this.gridItemsWidth=document.getElementById("grid-items").offsetWidth,this.gridItemsHeight=document.getElementById("grid-items").offsetHeight)},cellSizeAndPositionGetter:function(e,t){var r={xs:{width:this.gridItemsWidth/2,items:2,height:200},sm:{width:this.gridItemsWidth/2,items:2,height:200},md:{width:this.gridItemsWidth/3,items:3,height:150},lg:{width:this.gridItemsWidth/4,items:4,height:150},xl:{width:this.gridItemsWidth/6,items:6,height:150}},s=r[POS.responsive.screenIs].width,n=r[POS.responsive.screenIs].height;return{width:s-0,height:n,x:t%r[POS.responsive.screenIs].items*s-0,y:parseInt(t/r[POS.responsive.screenIs].items)*n}},openSearchPopup:function(){Popup.show(l)},submitSearch:function(e){var t=this;e.length>0&&s.ih.get("/api/nexopos/v4/products/search/using-barcode/".concat(e)).subscribe((function(e){t.barcode="",POS.addToCart(e.product)}),(function(e){t.barcode="",s.kX.error(e.message).subscribe()}))},checkFocus:function(){this.autoFocus&&(0===document.querySelectorAll(".is-popup").length&&this.$refs.search.focus())},loadCategories:function(e){var t=this;s.ih.get("/api/nexopos/v4/categories/pos/".concat(e?e.id:"")).subscribe((function(e){t.categories=e.categories.map((function(e){return{data:e}})),t.products=e.products.map((function(e){return{data:e}})),t.previousCategory=e.previousCategory,t.currentCategory=e.currentCategory,t.updateBreadCrumb(t.currentCategory)}))},updateBreadCrumb:function(e){if(e){var t=this.breadcrumb.filter((function(t){return t.id===e.id}));if(t.length>0){var r=!0,s=this.breadcrumb.filter((function(e){return e.id===t[0].id&&r?(r=!1,!0):r}));this.breadcrumb=s}else this.breadcrumb.push(e)}else this.breadcrumb=[];POS.breadcrumbs.next(this.breadcrumb)},addToTheCart:function(e){POS.addToCart(e)}}};const u=(0,a.Z)(c,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"flex-auto flex flex-col",attrs:{id:"pos-grid"}},["grid"===e.visibleSection?r("div",{staticClass:"flex pl-2",attrs:{id:"tools"}},[r("div",{staticClass:"flex cursor-pointer rounded-tl-lg rounded-tr-lg px-3 py-2 bg-gray-300 border-t border-r border-l border-gray-300 text-gray-600",on:{click:function(t){return e.switchTo("cart")}}},[r("span",[e._v("Cart")]),e._v(" "),e.order?r("span",{staticClass:"flex items-center justify-center text-sm rounded-full h-6 w-6 bg-green-500 text-white ml-1"},[e._v(e._s(e.order.products.length))]):e._e()]),e._v(" "),r("div",{staticClass:"cursor-pointer rounded-tl-lg rounded-tr-lg px-3 py-2 bg-white font-semibold text-gray-700",on:{click:function(t){return e.switchTo("grid")}}},[e._v("\n Products\n ")])]):e._e(),e._v(" "),r("div",{staticClass:"rounded shadow bg-white overflow-hidden flex-auto flex flex-col"},[r("div",{staticClass:"p-2 border-b border-gray-200",attrs:{id:"grid-header"}},[r("div",{staticClass:"border rounded flex border-gray-300 overflow-hidden"},[r("button",{staticClass:"w-10 h-10 bg-gray-200 border-r border-gray-300 outline-none",on:{click:function(t){return e.openSearchPopup()}}},[r("i",{staticClass:"las la-search"})]),e._v(" "),r("button",{staticClass:"outline-none w-10 h-10 border-r border-gray-300",class:e.autoFocus?"pos-button-clicked bg-gray-300":"bg-gray-200",on:{click:function(t){e.autoFocus=!e.autoFocus}}},[r("i",{staticClass:"las la-barcode"})]),e._v(" "),r("input",{directives:[{name:"model",rawName:"v-model",value:e.barcode,expression:"barcode"}],ref:"search",staticClass:"flex-auto outline-none px-2 bg-gray-100",attrs:{type:"text"},domProps:{value:e.barcode},on:{input:function(t){t.target.composing||(e.barcode=t.target.value)}}})])]),e._v(" "),r("div",{staticClass:"p-2 border-gray-200",attrs:{id:"grid-breadscrumb"}},[r("ul",{staticClass:"flex"},[r("li",[r("a",{staticClass:"px-3 text-gray-700",attrs:{href:"javascript:void(0)"},on:{click:function(t){return e.loadCategories()}}},[e._v("Home ")]),e._v(" "),r("i",{staticClass:"las la-angle-right"})]),e._v(" "),r("li",e._l(e.breadcrumbs,(function(t){return r("a",{key:t.id,staticClass:"px-3 text-gray-700",attrs:{href:"javascript:void(0)"},on:{click:function(r){return e.loadCategories(t)}}},[e._v(e._s(t.name)+" "),r("i",{staticClass:"las la-angle-right"})])})),0)])]),e._v(" "),r("div",{staticClass:"overflow-hidden h-full flex-col flex",attrs:{id:"grid-items"}},[e.rebuildGridComplete?e._e():r("div",{staticClass:"h-full w-full flex-col flex items-center justify-center"},[r("ns-spinner"),e._v(" "),r("span",{staticClass:"text-gray-600 my-2"},[e._v("Rebuilding...")])],1),e._v(" "),e.rebuildGridComplete?[e.hasCategories?r("VirtualCollection",{attrs:{cellSizeAndPositionGetter:e.cellSizeAndPositionGetter,collection:e.categories,height:e.gridItemsHeight,width:e.gridItemsWidth},scopedSlots:e._u([{key:"cell",fn:function(t){var s=t.data;return r("div",{staticClass:"w-full h-full"},[r("div",{key:s.id,staticClass:"hover:bg-gray-200 w-full h-full cursor-pointer border border-gray-200 flex flex-col items-center justify-center overflow-hidden",on:{click:function(t){return e.loadCategories(s)}}},[r("div",{staticClass:"h-full w-full flex items-center justify-center"},[s.preview_url?r("img",{staticClass:"object-cover h-full",attrs:{src:s.preview_url,alt:s.name}}):e._e(),e._v(" "),s.preview_url?e._e():r("i",{staticClass:"las la-image text-gray-600 text-6xl"})]),e._v(" "),r("div",{staticClass:"h-0 w-full"},[r("div",{staticClass:"relative w-full flex items-center justify-center -top-10 h-20 py-2",staticStyle:{background:"rgb(255 255 255 / 73%)"}},[r("h3",{staticClass:"text-sm font-bold text-gray-700 py-2 text-center"},[e._v(e._s(s.name))])])])])])}}],null,!1,1415940505)}):e._e(),e._v(" "),e.hasCategories?e._e():r("VirtualCollection",{attrs:{cellSizeAndPositionGetter:e.cellSizeAndPositionGetter,collection:e.products,height:e.gridItemsHeight,width:e.gridItemsWidth},scopedSlots:e._u([{key:"cell",fn:function(t){var s=t.data;return r("div",{staticClass:"w-full h-full"},[r("div",{key:s.id,staticClass:"hover:bg-gray-200 w-full h-full cursor-pointer border border-gray-200 flex flex-col items-center justify-center overflow-hidden",on:{click:function(t){return e.addToTheCart(s)}}},[r("div",{staticClass:"h-full w-full flex items-center justify-center overflow-hidden"},[s.galleries&&s.galleries.filter((function(e){return 1===e.featured})).length>0?r("img",{staticClass:"object-cover h-full",attrs:{src:s.galleries.filter((function(e){return 1===e.featured}))[0].url,alt:s.name}}):e._e(),e._v(" "),s.galleries&&0!==s.galleries.filter((function(e){return 1===e.featured})).length?e._e():r("i",{staticClass:"las la-image text-gray-600 text-6xl"})]),e._v(" "),r("div",{staticClass:"h-0 w-full"},[r("div",{staticClass:"relative w-full flex flex-col items-center justify-center -top-10 h-20 p-2",staticStyle:{background:"rgb(255 255 255 / 73%)"}},[r("h3",{staticClass:"text-sm text-gray-700 text-center w-full"},[e._v(e._s(s.name))]),e._v(" "),s.unit_quantities&&1===s.unit_quantities.length?r("span",{staticClass:"text-sm text-gray-600"},[e._v(e._s(e._f("currency")(s.unit_quantities[0].sale_price)))]):e._e()])])])])}}],null,!1,3326882304)})]:e._e()],2)])])}),[],!1,null,null,null).exports},8159:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var s=r(2014),n=r(874);const i={name:"ns-pos",computed:{buttons:function(){return POS.header.buttons}},mounted:function(){var e=this;this.visibleSectionSubscriber=POS.visibleSection.subscribe((function(t){e.visibleSection=t}))},destroyed:function(){this.visibleSectionSubscriber.unsubscribe()},data:function(){return{visibleSection:null,visibleSectionSubscriber:null}},components:{NsPosCart:s.Z,NsPosGrid:n.Z}};const o=(0,r(1900).Z)(i,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"h-full flex-auto bg-gray-300 flex flex-col",attrs:{id:"pos-container"}},[r("div",{staticClass:"flex overflow-hidden flex-shrink-0 px-2 pt-2"},[r("div",{staticClass:"-mx-2 flex overflow-x-auto pb-1"},e._l(e.buttons,(function(e,t){return r("div",{key:t,staticClass:"flex px-2 flex-shrink-0"},[r(e,{tag:"component"})],1)})),0)]),e._v(" "),r("div",{staticClass:"flex-auto overflow-hidden flex p-2"},[r("div",{staticClass:"flex flex-auto overflow-hidden -m-2"},[["both","cart"].includes(e.visibleSection)?r("div",{staticClass:"flex overflow-hidden p-2",class:"both"===e.visibleSection?"w-1/2":"w-full"},[r("ns-pos-cart")],1):e._e(),e._v(" "),["both","grid"].includes(e.visibleSection)?r("div",{staticClass:"p-2 flex overflow-hidden",class:"both"===e.visibleSection?"w-1/2":"w-full"},[r("ns-pos-grid")],1):e._e()])])])}),[],!1,null,null,null).exports},419:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const s={data:function(){return{title:"",message:""}},computed:{size:function(){return this.$popupParams.size||"h-full w-full"}},mounted:function(){var e=this;this.title=this.$popupParams.title,this.message=this.$popupParams.message,this.$popup.event.subscribe((function(t){"click-overlay"===t.event&&(e.$popupParams.onAction(!1),e.$popup.close())}))},methods:{__:r(7389).__,emitAction:function(e){this.$popupParams.onAction(e),this.$popup.close()}}};const n=(0,r(1900).Z)(s,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"flex flex-col bg-white shadow-lg w-5/7-screen md:w-4/7-screen lg:w-2/7-screen",class:e.size,attrs:{id:"popup"}},[r("div",{staticClass:"flex items-center justify-center flex-col flex-auto p-4"},[r("h2",{staticClass:"text-xl md:text-3xl font-body text-gray-700 text-center"},[e._v(e._s(e.title))]),e._v(" "),r("p",{staticClass:"py-4 text-sm md:text-base text-gray-600 text-center"},[e._v(e._s(e.message))])]),e._v(" "),r("div",{staticClass:"flex border-t border-gray-200 text-gray-700"},[r("button",{staticClass:"hover:bg-gray-100 flex-auto w-1/2 h-16 flex items-center justify-center uppercase",on:{click:function(t){return e.emitAction(!0)}}},[e._v(e._s(e.__("Yes")))]),e._v(" "),r("hr",{staticClass:"border-r border-gray-200"}),e._v(" "),r("button",{staticClass:"hover:bg-gray-100 flex-auto w-1/2 h-16 flex items-center justify-center uppercase",on:{click:function(t){return e.emitAction(!1)}}},[e._v(e._s(e.__("No")))])])])}),[],!1,null,null,null).exports},5450:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var s=r(8603),n=r(6386),i=r(162),o=r(7389),a=r(4326);r(9624);const l={name:"ns-pos-coupons-load-popup",data:function(){return{placeHolder:(0,o.__)("Coupon Code"),couponCode:null,order:null,activeTab:"apply-coupon",orderSubscriber:null,customerCoupon:null}},mounted:function(){var e=this;this.popupCloser(),this.$refs.coupon.select(),this.orderSubscriber=POS.order.subscribe((function(t){e.order=t,e.order.coupons.length>0&&(e.activeTab="active-coupons")})),this.$popupParams&&this.$popupParams.apply_coupon&&(this.couponCode=this.$popupParams.apply_coupon,this.getCoupon(this.couponCode).subscribe({next:function(t){e.customerCoupon=t,e.apply()}}))},destroyed:function(){this.orderSubscriber.unsubscribe()},methods:{__:o.__,popupCloser:s.Z,popupResolver:n.Z,selectCustomer:function(){Popup.show(a.Z)},cancel:function(){this.customerCoupon=null,this.couponCode=null},removeCoupon:function(e){this.order.coupons.splice(e,1),POS.refreshCart()},apply:function(){var e=this;try{var t=this.customerCoupon;if(null!==this.customerCoupon.coupon.valid_hours_start&&!ns.date.moment.isAfter(this.customerCoupon.coupon.valid_hours_start)&&this.customerCoupon.coupon.valid_hours_start.length>0)return i.kX.error((0,o.__)("The coupon is out from validity date range.")).subscribe();if(null!==this.customerCoupon.coupon.valid_hours_end&&!ns.date.moment.isBefore(this.customerCoupon.coupon.valid_hours_end)&&this.customerCoupon.coupon.valid_hours_end.length>0)return i.kX.error((0,o.__)("The coupon is out from validity date range.")).subscribe();var r=this.customerCoupon.coupon.products;if(r.length>0){var s=r.map((function(e){return e.product_id}));if(0===this.order.products.filter((function(e){return s.includes(e.product_id)})).length)return i.kX.error((0,o.__)("This coupon requires products that aren't available on the cart at the moment.")).subscribe()}var n=this.customerCoupon.coupon.categories;if(n.length>0){var a=n.map((function(e){return e.category_id}));if(0===this.order.products.filter((function(e){return a.includes(e.$original().category_id)})).length)return i.kX.error((0,o.__)("This coupon requires products that belongs to specific categories that aren't included at the moment.").replace("%s")).subscribe()}this.cancel();var l={active:t.coupon.active,customer_coupon_id:t.id,minimum_cart_value:t.coupon.minimum_cart_value,maximum_cart_value:t.coupon.maximum_cart_value,name:t.coupon.name,type:t.coupon.type,value:0,limit_usage:t.coupon.limit_usage,code:t.coupon.code,discount_value:t.coupon.discount_value,categories:t.coupon.categories,products:t.coupon.products};POS.pushCoupon(l),this.activeTab="active-coupons",setTimeout((function(){e.popupResolver(l)}),500),i.kX.success((0,o.__)("The coupon has applied to the cart.")).subscribe()}catch(e){console.log(e)}},getCouponType:function(e){switch(e){case"percentage_discount":return(0,o.__)("Percentage");case"flat_discount":return(0,o.__)("Flat");default:return(0,o.__)("Unknown Type")}},getDiscountValue:function(e){switch(e.type){case"percentage_discount":return e.discount_value+"%";case"flat_discount":return this.$options.filters.currency(e.discount_value)}},closePopup:function(){this.popupResolver(!1)},setActiveTab:function(e){this.activeTab=e},getCoupon:function(e){return!this.order.customer_id>0?i.kX.error((0,o.__)("You must select a customer before applying a coupon.")).subscribe():i.ih.post("/api/nexopos/v4/customers/coupons/".concat(e),{customer_id:this.order.customer_id})},loadCoupon:function(){var e=this,t=this.couponCode;this.getCoupon(t).subscribe({next:function(t){e.customerCoupon=t,i.kX.success((0,o.__)("The coupon has been loaded.")).subscribe()},error:function(e){i.kX.error(e.message||(0,o.__)("An unexpected error occured.")).subscribe()}})}}};const c=(0,r(1900).Z)(l,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"shadow-lg bg-white w-95vw md:w-3/6-screen lg:w-2/6-screen"},[r("div",{staticClass:"border-b border-gray-200 p-2 flex justify-between items-center"},[r("h3",{staticClass:"font-bold text-gray-700"},[e._v(e._s(e.__("Load Coupon")))]),e._v(" "),r("div",[r("ns-close-button",{on:{click:function(t){return e.closePopup()}}})],1)]),e._v(" "),r("div",{staticClass:"p-1"},[r("ns-tabs",{attrs:{active:e.activeTab},on:{changeTab:function(t){return e.setActiveTab(t)}}},[r("ns-tabs-item",{attrs:{label:e.__("Apply A Coupon"),padding:"p-2",identifier:"apply-coupon"}},[r("div",{staticClass:"border-2 border-blue-400 rounded flex"},[r("input",{directives:[{name:"model",rawName:"v-model",value:e.couponCode,expression:"couponCode"}],ref:"coupon",staticClass:"w-full p-2",attrs:{type:"text",placeholder:e.placeHolder},domProps:{value:e.couponCode},on:{input:function(t){t.target.composing||(e.couponCode=t.target.value)}}}),e._v(" "),r("button",{staticClass:"bg-blue-400 text-white px-3 py-2",on:{click:function(t){return e.loadCoupon()}}},[e._v(e._s(e.__("Load")))])]),e._v(" "),r("div",{staticClass:"pt-2"},[r("p",{staticClass:"p-2 text-center bg-green-100 text-green-600"},[e._v(e._s(e.__("Input the coupon code that should apply to the POS. If a coupon is issued for a customer, that customer must be selected priorly.")))])]),e._v(" "),e.order&&void 0===e.order.customer_id?r("div",{staticClass:"pt-2",on:{click:function(t){return e.selectCustomer()}}},[r("p",{staticClass:"p-2 cursor-pointer text-center bg-red-100 text-red-600"},[e._v(e._s(e.__("Click here to choose a customer.")))])]):e._e(),e._v(" "),e.order&&void 0!==e.order.customer_id?r("div",{staticClass:"pt-2"},[r("p",{staticClass:"p-2 text-center bg-green-100 text-green-600"},[e._v(e._s(e.__("Loading Coupon For : ")+e.order.customer.name+" "+e.order.customer.surname))])]):e._e(),e._v(" "),r("div",{staticClass:"overflow-hidden"},[e.customerCoupon?r("div",{staticClass:"pt-2 fade-in-entrance anim-duration-500 overflow-y-auto h-64"},[r("table",{staticClass:"w-full"},[r("thead",[r("tr",[r("td",{staticClass:"p-2 w-1/2 text-gray-700 border border-gray-200"},[e._v(e._s(e.__("Coupon Name")))]),e._v(" "),r("td",{staticClass:"p-2 w-1/2 text-gray-700 border border-gray-200"},[e._v(e._s(e.customerCoupon.name))])]),e._v(" "),r("tr",[r("td",{staticClass:"p-2 w-1/2 text-gray-700 border border-gray-200"},[e._v(e._s(e.__("Discount"))+" ("+e._s(e.getCouponType(e.customerCoupon.coupon.type))+")")]),e._v(" "),r("td",{staticClass:"p-2 w-1/2 text-gray-700 border border-gray-200"},[e._v(e._s(e.getDiscountValue(e.customerCoupon.coupon)))])]),e._v(" "),r("tr",[r("td",{staticClass:"p-2 w-1/2 text-gray-700 border border-gray-200"},[e._v(e._s(e.__("Usage")))]),e._v(" "),r("td",{staticClass:"p-2 w-1/2 text-gray-700 border border-gray-200"},[e._v(e._s(e.customerCoupon.usage+"/"+(e.customerCoupon.limit_usage||e.__("Unlimited"))))])]),e._v(" "),r("tr",[r("td",{staticClass:"p-2 w-1/2 text-gray-700 border border-gray-200"},[e._v(e._s(e.__("Valid From")))]),e._v(" "),r("td",{staticClass:"p-2 w-1/2 text-gray-700 border border-gray-200"},[e._v(e._s(e.customerCoupon.coupon.valid_hours_start))])]),e._v(" "),r("tr",[r("td",{staticClass:"p-2 w-1/2 text-gray-700 border border-gray-200"},[e._v(e._s(e.__("Valid Till")))]),e._v(" "),r("td",{staticClass:"p-2 w-1/2 text-gray-700 border border-gray-200"},[e._v(e._s(e.customerCoupon.coupon.valid_hours_end))])]),e._v(" "),r("tr",[r("td",{staticClass:"p-2 w-1/2 text-gray-700 border border-gray-200"},[e._v(e._s(e.__("Categories")))]),e._v(" "),r("td",{staticClass:"p-2 w-1/2 text-gray-700 border border-gray-200"},[r("ul",e._l(e.customerCoupon.coupon.categories,(function(t){return r("li",{key:t.id,staticClass:"rounded-full px-3 py-1 border border-gray-200"},[e._v(e._s(t.category.name))])})),0)])]),e._v(" "),r("tr",[r("td",{staticClass:"p-2 w-1/2 text-gray-700 border border-gray-200"},[e._v(e._s(e.__("Products")))]),e._v(" "),r("td",{staticClass:"p-2 w-1/2 text-gray-700 border border-gray-200"},[r("ul",e._l(e.customerCoupon.coupon.products,(function(t){return r("li",{key:t.id,staticClass:"rounded-full px-3 py-1 border border-gray-200"},[e._v(e._s(t.product.name))])})),0)])])])])]):e._e()])]),e._v(" "),r("ns-tabs-item",{attrs:{label:e.__("Active Coupons"),padding:"p-1",identifier:"active-coupons"}},[e.order?r("ul",[e._l(e.order.coupons,(function(t,s){return r("li",{key:s,staticClass:"flex justify-between bg-gray-100 items-center px-2 py-1"},[r("div",{staticClass:"flex-auto"},[r("h3",{staticClass:"font-semibold text-gray-700 p-2 flex justify-between"},[r("span",[e._v(e._s(t.name))]),e._v(" "),r("span",[e._v(e._s(e.getDiscountValue(t)))])])]),e._v(" "),r("div",[r("ns-close-button",{on:{click:function(t){return e.removeCoupon(s)}}})],1)])})),e._v(" "),0===e.order.coupons.length?r("li",{staticClass:"flex justify-between bg-gray-100 items-center p-2"},[e._v("\n No coupons applies to the cart.\n ")]):e._e()],2):e._e()])],1)],1),e._v(" "),e.customerCoupon?r("div",{staticClass:"flex"},[r("button",{staticClass:"w-1/2 px-3 py-2 bg-green-400 text-white font-bold",on:{click:function(t){return e.apply()}}},[e._v("\n "+e._s(e.__("Apply"))+"\n ")]),e._v(" "),r("button",{staticClass:"w-1/2 px-3 py-2 bg-red-400 text-white font-bold",on:{click:function(t){return e.cancel()}}},[e._v("\n "+e._s(e.__("Cancel"))+"\n ")])]):e._e()])}),[],!1,null,null,null).exports},4326:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var s=r(162),n=r(6386),i=r(2242),o=r(5872);const a={data:function(){return{searchCustomerValue:"",orderSubscription:null,order:{},debounceSearch:null,customers:[],isLoading:!1}},computed:{customerSelected:function(){return!1}},watch:{searchCustomerValue:function(e){var t=this;clearTimeout(this.debounceSearch),this.debounceSearch=setTimeout((function(){t.searchCustomer(e)}),500)}},mounted:function(){var e=this;this.$popup.event.subscribe((function(t){"click-overlay"===t.event&&e.resolveIfQueued(!1)})),this.orderSubscription=POS.order.subscribe((function(t){e.order=t})),this.getRecentCustomers(),this.$refs.searchField.focus()},destroyed:function(){this.orderSubscription.unsubscribe()},methods:{__:r(7389).__,resolveIfQueued:n.Z,attemptToChoose:function(){if(1===this.customers.length)return this.selectCustomer(this.customers[0]);s.kX.info("Too many result.").subscribe()},openCustomerHistory:function(e,t){t.stopImmediatePropagation(),this.$popup.close(),i.G.show(o.Z,{customer:e,activeTab:"account-payment"})},selectCustomer:function(e){var t=this;this.customers.forEach((function(e){return e.selected=!1})),e.selected=!0,this.isLoading=!0,POS.selectCustomer(e).then((function(r){t.isLoading=!1,t.resolveIfQueued(e)})).catch((function(e){t.isLoading=!1}))},searchCustomer:function(e){var t=this;s.ih.post("/api/nexopos/v4/customers/search",{search:e}).subscribe((function(e){e.forEach((function(e){return e.selected=!1})),t.customers=e}))},createCustomerWithMatch:function(e){this.resolveIfQueued(!1),i.G.show(o.Z,{name:e})},getRecentCustomers:function(){var e=this;this.isLoading=!0,s.ih.get("/api/nexopos/v4/customers").subscribe((function(t){e.isLoading=!1,t.forEach((function(e){return e.selected=!1})),e.customers=t}),(function(t){e.isLoading=!1}))}}};const l=(0,r(1900).Z)(a,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"bg-white shadow-xl w-4/5-screen md:w-2/5-screen xl:w-108"},[r("div",{staticClass:"border-b border-gray-200 text-center font-semibold text-2xl text-gray-700 py-2",attrs:{id:"header"}},[r("h2",[e._v(e._s(e.__("Select Customer")))])]),e._v(" "),r("div",{staticClass:"relative"},[r("div",{staticClass:"p-2 border-b border-gray-200 flex justify-between text-gray-600"},[r("span",[e._v("Selected : ")]),e._v(" "),r("div",{staticClass:"flex items-center justify-between"},[r("span",[e._v(e._s(e.order.customer?e.order.customer.name:"N/A"))]),e._v(" "),e.order.customer?r("button",{staticClass:"mx-2 rounded-full h-8 w-8 flex items-center justify-center border border-gray-200 hover:bg-blue-400 hover:text-white hover:border-transparent",on:{click:function(t){return e.openCustomerHistory(e.order.customer,t)}}},[r("i",{staticClass:"las la-eye"})]):e._e()])]),e._v(" "),r("div",{staticClass:"p-2 border-b border-gray-200 flex justify-between text-gray-600"},[r("input",{directives:[{name:"model",rawName:"v-model",value:e.searchCustomerValue,expression:"searchCustomerValue"}],ref:"searchField",staticClass:"rounded border-2 border-blue-400 bg-gray-100 w-full p-2",attrs:{placeholder:"Search Customer",type:"text"},domProps:{value:e.searchCustomerValue},on:{keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.attemptToChoose()},input:function(t){t.target.composing||(e.searchCustomerValue=t.target.value)}}})]),e._v(" "),r("div",{staticClass:"h-3/5-screen xl:h-2/5-screen overflow-y-auto"},[r("ul",[e.customers&&0===e.customers.length?r("li",{staticClass:"p-2 text-center text-gray-600"},[e._v("\n "+e._s(e.__("No customer match your query..."))+"\n ")]):e._e(),e._v(" "),e.customers&&0===e.customers.length?r("li",{staticClass:"p-2 cursor-pointer text-center text-gray-600",on:{click:function(t){return e.createCustomerWithMatch(e.searchCustomerValue)}}},[r("span",{staticClass:"border-b border-dashed border-blue-400"},[e._v(e._s(e.__("Create a customer")))])]):e._e(),e._v(" "),e._l(e.customers,(function(t){return r("li",{key:t.id,staticClass:"cursor-pointer hover:bg-gray-100 p-2 border-b border-gray-200 text-gray-600 flex justify-between items-center",on:{click:function(r){return e.selectCustomer(t)}}},[r("span",[e._v(e._s(t.name))]),e._v(" "),r("p",{staticClass:"flex items-center"},[t.owe_amount>0?r("span",{staticClass:"text-red-600"},[e._v("-"+e._s(e._f("currency")(t.owe_amount)))]):e._e(),e._v(" "),t.owe_amount>0?r("span",[e._v("/")]):e._e(),e._v(" "),r("span",{staticClass:"text-green-600"},[e._v(e._s(e._f("currency")(t.purchases_amount)))]),e._v(" "),r("button",{staticClass:"mx-2 rounded-full h-8 w-8 flex items-center justify-center border border-gray-200 hover:bg-blue-400 hover:text-white hover:border-transparent",on:{click:function(r){return e.openCustomerHistory(t,r)}}},[r("i",{staticClass:"las la-eye"})])])])}))],2)]),e._v(" "),e.isLoading?r("div",{staticClass:"z-10 top-0 absolute w-full h-full flex items-center justify-center"},[r("ns-spinner",{attrs:{size:"24",border:"8"}})],1):e._e()])])}),[],!1,null,null,null).exports},5872:(e,t,r)=>{"use strict";r.d(t,{Z:()=>b});var s=r(8603),n=r(162),i=r(2242),o=r(4326),a=r(7266),l=r(7389);const c={mounted:function(){this.closeWithOverlayClicked(),this.loadTransactionFields()},data:function(){return{fields:[],isSubmiting:!1,formValidation:new a.Z}},methods:{__:l.__,closeWithOverlayClicked:s.Z,proceed:function(){var e=this,t=this.$popupParams.customer,r=this.formValidation.extractFields(this.fields);this.isSubmiting=!0,n.ih.post("/api/nexopos/v4/customers/".concat(t.id,"/account-history"),r).subscribe((function(t){e.isSubmiting=!1,n.kX.success(t.message).subscribe(),e.$popupParams.resolve(t),e.$popup.close()}),(function(t){e.isSubmiting=!1,n.kX.error(t.message).subscribe(),e.$popupParams.reject(t)}))},close:function(){this.$popup.close(),this.$popupParams.reject(!1)},loadTransactionFields:function(){var e=this;n.ih.get("/api/nexopos/v4/fields/ns.customers-account").subscribe((function(t){e.fields=e.formValidation.createFields(t)}))}}};var u=r(1900);const d=(0,u.Z)(c,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"w-6/7-screen md:w-5/7-screen lg:w-4/7-screen h-6/7-screen md:h-5/7-screen lg:h-5/7-screen overflow-hidden shadow-lg bg-white flex flex-col relative"},[r("div",{staticClass:"p-2 border-b border-gray-200 flex justify-between items-center"},[r("h2",{staticClass:"font-semibold"},[e._v(e._s(e.__("New Transaction")))]),e._v(" "),r("div",[r("ns-close-button",{on:{click:function(t){return e.close()}}})],1)]),e._v(" "),r("div",{staticClass:"flex-auto overflow-y-auto"},[0===e.fields.length?r("div",{staticClass:"h-full w-full flex items-center justify-center"},[r("ns-spinner")],1):e._e(),e._v(" "),e.fields.length>0?r("div",{staticClass:"p-2"},e._l(e.fields,(function(e,t){return r("ns-field",{key:t,attrs:{field:e}})})),1):e._e()]),e._v(" "),r("div",{staticClass:"p-2 bg-white justify-between border-t border-gray-200 flex"},[r("div"),e._v(" "),r("div",{staticClass:"px-1"},[r("div",{staticClass:"-mx-2 flex flex-wrap"},[r("div",{staticClass:"px-1"},[r("ns-button",{attrs:{type:"danger"},on:{click:function(t){return e.close()}}},[e._v(e._s(e.__("Close")))])],1),e._v(" "),r("div",{staticClass:"px-1"},[r("ns-button",{attrs:{type:"info"},on:{click:function(t){return e.proceed()}}},[e._v(e._s(e.__("Proceed")))])],1)])])]),e._v(" "),0===e.isSubmiting?r("div",{staticClass:"h-full w-full absolute flex items-center justify-center",staticStyle:{background:"rgb(0 98 171 / 45%)"}},[r("ns-spinner")],1):e._e()])}),[],!1,null,null,null).exports;var f=r(5450),p=r(419),h=r(6386);const v={name:"ns-pos-customers",data:function(){return{activeTab:"create-customers",customer:null,subscription:null,orders:[],selectedTab:"orders",isLoadingCoupons:!1,coupons:[],order:null}},mounted:function(){var e=this;this.closeWithOverlayClicked(),this.subscription=POS.order.subscribe((function(t){e.order=t,void 0!==e.$popupParams.customer?(e.activeTab="account-payment",e.customer=e.$popupParams.customer,e.loadCustomerOrders(e.customer.id)):void 0!==t.customer&&(e.activeTab="account-payment",e.customer=t.customer,e.loadCustomerOrders(e.customer.id))})),this.popupCloser()},methods:{__:l.__,popupResolver:h.Z,popupCloser:s.Z,getType:function(e){switch(e){case"percentage_discount":return(0,l.__)("Percentage Discount");case"flat_discount":return(0,l.__)("Flat Discount")}},closeWithOverlayClicked:s.Z,doChangeTab:function(e){this.selectedTab=e,"coupons"===e&&this.loadCoupons()},loadCoupons:function(){var e=this;this.isLoadingCoupons=!0,n.ih.get("/api/nexopos/v4/customers/".concat(this.customer.id,"/coupons")).subscribe({next:function(t){e.coupons=t,e.isLoadingCoupons=!1},error:function(t){e.isLoadingCoupons=!1}})},allowedForPayment:function(e){return["unpaid","partially_paid","hold"].includes(e.payment_status)},prefillForm:function(e){void 0!==this.$popupParams.name&&(e.main.value=this.$popupParams.name)},openCustomerSelection:function(){this.$popup.close(),i.G.show(o.Z)},loadCustomerOrders:function(e){var t=this;n.ih.get("/api/nexopos/v4/customers/".concat(e,"/orders")).subscribe((function(e){t.orders=e}))},newTransaction:function(e){new Promise((function(t,r){i.G.show(d,{customer:e,resolve:t,reject:r})})).then((function(t){POS.loadCustomer(e.id).subscribe((function(e){POS.selectCustomer(e)}))}))},applyCoupon:function(e){var t=this;void 0===this.order.customer?i.G.show(p.Z,{title:(0,l.__)("Use Customer ?"),message:(0,l.__)("No customer is selected. Would you like to proceed with this customer ?"),onAction:function(r){r&&POS.selectCustomer(t.customer).then((function(r){t.proceedApplyingCoupon(e)}))}}):this.order.customer.id===this.customer.id?this.proceedApplyingCoupon(e):this.order.customer.id!==this.customer.id&&i.G.show(p.Z,{title:(0,l.__)("Change Customer ?"),message:(0,l.__)("Would you like to assign this customer to the ongoing order ?"),onAction:function(r){r&&POS.selectCustomer(t.customer).then((function(r){t.proceedApplyingCoupon(e)}))}})},proceedApplyingCoupon:function(e){var t=this;new Promise((function(t,r){i.G.show(f.Z,{apply_coupon:e.code,resolve:t,reject:r})})).then((function(e){t.popupResolver(!1)})).catch((function(e){}))},handleSavedCustomer:function(e){n.kX.success(e.message).subscribe(),POS.selectCustomer(e.entry),this.$popup.close()}}};const b=(0,u.Z)(v,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"bg-white shadow-lg rounded w-95vw h-95vh lg:w-3/5-screen flex flex-col overflow-hidden"},[r("div",{staticClass:"p-2 flex justify-between items-center border-b border-gray-400"},[r("h3",{staticClass:"font-semibold text-gray-700"},[e._v(e._s(e.__("Customers")))]),e._v(" "),r("div",[r("ns-close-button",{on:{click:function(t){return e.$popup.close()}}})],1)]),e._v(" "),r("div",{staticClass:"flex-auto flex p-2 bg-gray-200 overflow-y-auto"},[r("ns-tabs",{attrs:{active:e.activeTab},on:{active:function(t){e.activeTab=t}}},[r("ns-tabs-item",{attrs:{identifier:"create-customers",label:"New Customer"}},[r("ns-crud-form",{attrs:{"submit-url":"/api/nexopos/v4/crud/ns.customers",src:"/api/nexopos/v4/crud/ns.customers/form-config"},on:{updated:function(t){return e.prefillForm(t)},save:function(t){return e.handleSavedCustomer(t)}},scopedSlots:e._u([{key:"title",fn:function(){return[e._v(e._s(e.__("Customer Name")))]},proxy:!0},{key:"save",fn:function(){return[e._v(e._s(e.__("Save Customer")))]},proxy:!0}])})],1),e._v(" "),r("ns-tabs-item",{staticClass:"flex",staticStyle:{padding:"0!important"},attrs:{identifier:"account-payment",label:e.__("Customer Account")}},[null===e.customer?r("div",{staticClass:"flex-auto w-full flex items-center justify-center flex-col p-4"},[r("i",{staticClass:"lar la-frown text-6xl text-gray-700"}),e._v(" "),r("h3",{staticClass:"font-medium text-2xl text-gray-700"},[e._v(e._s(e.__("No Customer Selected")))]),e._v(" "),r("p",{staticClass:"text-gray-600"},[e._v(e._s(e.__("In order to see a customer account, you need to select one customer.")))]),e._v(" "),r("div",{staticClass:"my-2"},[r("ns-button",{attrs:{type:"info"},on:{click:function(t){return e.openCustomerSelection()}}},[e._v(e._s(e.__("Select Customer")))])],1)]):e._e(),e._v(" "),e.customer?r("div",{staticClass:"flex flex-col flex-auto"},[r("div",{staticClass:"flex-auto p-2 flex flex-col"},[r("div",{staticClass:"-mx-4 flex flex-wrap"},[r("div",{staticClass:"px-4 mb-4 w-full"},[r("h2",{staticClass:"font-semibold text-gray-700"},[e._v(e._s(e.__("Summary For"))+" : "+e._s(e.customer.name))])]),e._v(" "),r("div",{staticClass:"px-4 mb-4 w-full md:w-1/3"},[r("div",{staticClass:"rounded-lg shadow bg-transparent bg-gradient-to-br from-green-400 to-green-700 p-2 flex flex-col text-white"},[r("h3",{staticClass:"font-medium text-lg"},[e._v(e._s(e.__("Total Purchases")))]),e._v(" "),r("div",{staticClass:"w-full flex justify-end"},[r("h2",{staticClass:"text-2xl font-bold"},[e._v(e._s(e._f("currency")(e.customer.purchases_amount)))])])])]),e._v(" "),r("div",{staticClass:"px-4 mb-4 w-full md:w-1/3"},[r("div",{staticClass:"rounded-lg shadow bg-transparent bg-gradient-to-br from-red-500 to-red-700 p-2 text-white"},[r("h3",{staticClass:"font-medium text-lg"},[e._v(e._s(e.__("Total Owed")))]),e._v(" "),r("div",{staticClass:"w-full flex justify-end"},[r("h2",{staticClass:"text-2xl font-bold"},[e._v(e._s(e._f("currency")(e.customer.owed_amount)))])])])]),e._v(" "),r("div",{staticClass:"px-4 mb-4 w-full md:w-1/3"},[r("div",{staticClass:"rounded-lg shadow bg-transparent bg-gradient-to-br from-blue-500 to-blue-700 p-2 text-white"},[r("h3",{staticClass:"font-medium text-lg"},[e._v(e._s(e.__("Account Amount")))]),e._v(" "),r("div",{staticClass:"w-full flex justify-end"},[r("h2",{staticClass:"text-2xl font-bold"},[e._v(e._s(e._f("currency")(e.customer.account_amount)))])])])])]),e._v(" "),r("div",{staticClass:"flex flex-auto flex-col overflow-hidden"},[r("ns-tabs",{attrs:{active:e.selectedTab},on:{changeTab:function(t){return e.doChangeTab(t)}}},[r("ns-tabs-item",{attrs:{identifier:"orders",label:e.__("Orders")}},[r("div",{staticClass:"py-2 w-full"},[r("h2",{staticClass:"font-semibold text-gray-700"},[e._v(e._s(e.__("Last Purchases")))])]),e._v(" "),r("div",{staticClass:"flex-auto flex-col flex overflow-hidden"},[r("div",{staticClass:"flex-auto overflow-y-auto"},[r("table",{staticClass:"table w-full"},[r("thead",[r("tr",{staticClass:"text-gray-700"},[r("th",{staticClass:"p-2 border border-gray-200 bg-gray-100 font-semibold",attrs:{width:"150"}},[e._v(e._s(e.__("Order")))]),e._v(" "),r("th",{staticClass:"p-2 border border-gray-200 bg-gray-100 font-semibold"},[e._v(e._s(e.__("Total")))]),e._v(" "),r("th",{staticClass:"p-2 border border-gray-200 bg-gray-100 font-semibold"},[e._v(e._s(e.__("Status")))]),e._v(" "),r("th",{staticClass:"p-2 border border-gray-200 bg-gray-100 font-semibold",attrs:{width:"50"}},[e._v(e._s(e.__("Options")))])])]),e._v(" "),r("tbody",{staticClass:"text-gray-700"},[0===e.orders.length?r("tr",[r("td",{staticClass:"border border-gray-200 p-2 text-center",attrs:{colspan:"4"}},[e._v(e._s(e.__("No orders...")))])]):e._e(),e._v(" "),e._l(e.orders,(function(t){return r("tr",{key:t.id},[r("td",{staticClass:"border border-gray-200 p-2 text-center"},[e._v(e._s(t.code))]),e._v(" "),r("td",{staticClass:"border border-gray-200 p-2 text-center"},[e._v(e._s(e._f("currency")(t.total)))]),e._v(" "),r("td",{staticClass:"border border-gray-200 p-2 text-right"},[e._v(e._s(t.human_status))]),e._v(" "),r("td",{staticClass:"border border-gray-200 p-2 text-center"},[e.allowedForPayment(t)?r("button",{staticClass:"hover:bg-blue-400 hover:border-transparent hover:text-white rounded-full h-8 px-2 flex items-center justify-center border border-gray bg-white"},[r("i",{staticClass:"las la-wallet"}),e._v(" "),r("span",{staticClass:"ml-1"},[e._v(e._s(e.__("Payment")))])]):e._e()])])}))],2)])])])]),e._v(" "),r("ns-tabs-item",{attrs:{identifier:"coupons",label:e.__("Coupons")}},[e.isLoadingCoupons?r("div",{staticClass:"flex-auto h-full justify-center flex items-center"},[r("ns-spinner",{attrs:{size:"36"}})],1):e._e(),e._v(" "),e.isLoadingCoupons?e._e():[r("div",{staticClass:"py-2 w-full"},[r("h2",{staticClass:"font-semibold text-gray-700"},[e._v(e._s(e.__("Coupons")))])]),e._v(" "),r("div",{staticClass:"flex-auto flex-col flex overflow-hidden"},[r("div",{staticClass:"flex-auto overflow-y-auto"},[r("table",{staticClass:"table w-full"},[r("thead",[r("tr",{staticClass:"text-gray-700"},[r("th",{staticClass:"p-2 border border-gray-200 bg-gray-100 font-semibold",attrs:{width:"150"}},[e._v(e._s(e.__("Name")))]),e._v(" "),r("th",{staticClass:"p-2 border border-gray-200 bg-gray-100 font-semibold"},[e._v(e._s(e.__("Type")))]),e._v(" "),r("th",{staticClass:"p-2 border border-gray-200 bg-gray-100 font-semibold"})])]),e._v(" "),r("tbody",{staticClass:"text-gray-700 text-sm"},[0===e.coupons.length?r("tr",[r("td",{staticClass:"border border-gray-200 p-2 text-center",attrs:{colspan:"4"}},[e._v(e._s(e.__("No coupons for the selected customer...")))])]):e._e(),e._v(" "),e._l(e.coupons,(function(t){return r("tr",{key:t.id},[r("td",{staticClass:"border border-gray-200 p-2",attrs:{width:"300"}},[r("h3",[e._v(e._s(t.name))]),e._v(" "),r("div",{},[r("ul",{staticClass:"-mx-2 flex"},[r("li",{staticClass:"text-xs text-gray-600 px-2"},[e._v(e._s(e.__("Usage :"))+" "+e._s(t.usage)+"/"+e._s(t.limit_usage))]),e._v(" "),r("li",{staticClass:"text-xs text-gray-600 px-2"},[e._v(e._s(e.__("Code :"))+" "+e._s(t.code))])])])]),e._v(" "),r("td",{staticClass:"border border-gray-200 p-2 text-center"},[e._v(e._s(e.getType(t.coupon.type))+" \n "),"percentage_discount"===t.coupon.type?r("span",[e._v("\n ("+e._s(t.coupon.discount_value)+"%)\n ")]):e._e(),e._v(" "),"flat_discount"===t.coupon.type?r("span",[e._v("\n ("+e._s(e._f("currency")(t.coupon.discount_value))+")\n ")]):e._e()]),e._v(" "),r("td",{staticClass:"border border-gray-200 p-2 text-right"},[r("ns-button",{attrs:{type:"info"},on:{click:function(r){return e.applyCoupon(t)}}},[e._v(e._s(e.__("Use Coupon")))])],1)])}))],2)])])])]],2)],1)],1)]),e._v(" "),r("div",{staticClass:"p-2 border-t border-gray-400 flex justify-between"},[r("div"),e._v(" "),r("div",[r("ns-button",{attrs:{type:"info"},on:{click:function(t){return e.newTransaction(e.customer)}}},[e._v(e._s(e.__("Account Transaction")))])],1)])]):e._e()])],1)],1)])}),[],!1,null,null,null).exports},1957:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const s={name:"ns-pos-loading-popup"};const n=(0,r(1900).Z)(s,(function(){var e=this.$createElement;return(this._self._c||e)("ns-spinner")}),[],!1,null,null,null).exports},3625:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var s=r(7757),n=r.n(s),i=r(6386);r(3661);function o(e,t,r,s,n,i,o){try{var a=e[i](o),l=a.value}catch(e){return void r(e)}a.done?t(l):Promise.resolve(l).then(s,n)}const a={data:function(){return{types:[],typeSubscription:null}},mounted:function(){var e=this;this.$popup.event.subscribe((function(t){"click-overlay"===t.event&&e.resolveIfQueued(!1)})),this.typeSubscription=POS.types.subscribe((function(t){e.types=t}))},destroyed:function(){this.typeSubscription.unsubscribe()},methods:{__:r(7389).__,resolveIfQueued:i.Z,select:function(e){var t,r=this;return(t=n().mark((function t(){var s;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return Object.values(r.types).forEach((function(e){return e.selected=!1})),r.types[e].selected=!0,s=r.types[e],POS.types.next(r.types),t.next=6,POS.triggerOrderTypeSelection(s);case 6:r.resolveIfQueued(s);case 7:case"end":return t.stop()}}),t)})),function(){var e=this,r=arguments;return new Promise((function(s,n){var i=t.apply(e,r);function a(e){o(i,s,n,a,l,"next",e)}function l(e){o(i,s,n,a,l,"throw",e)}a(void 0)}))})()}}};const l=(0,r(1900).Z)(a,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"h-full w-4/5-screen md:w-2/5-screen lg:w-2/5-screen xl:w-2/6-screen bg-white shadow-lg"},[r("div",{staticClass:"h-16 flex justify-center items-center",attrs:{id:"header"}},[r("h3",{staticClass:"font-bold text-gray-700"},[e._v(e._s(e.__("Define The Order Type")))])]),e._v(" "),r("div",{staticClass:"grid grid-flow-row grid-cols-2 grid-rows-2"},e._l(e.types,(function(t){return r("div",{key:t.identifier,staticClass:"hover:bg-blue-100 h-56 flex items-center justify-center flex-col cursor-pointer border border-gray-200",class:t.selected?"bg-blue-100":"",on:{click:function(r){return e.select(t.identifier)}}},[r("img",{staticClass:"w-32 h-32",attrs:{src:t.icon,alt:""}}),e._v(" "),r("h4",{staticClass:"font-semibold text-xl my-2 text-gray-700"},[e._v(e._s(t.label))])])})),0)])}),[],!1,null,null,null).exports},9531:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var s=r(162),n=r(7389);function i(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,s=new Array(t);rparseFloat(i.$quantities().quantity)-a)return s.kX.error((0,n.__)("Unable to add the product, there is not enough stock. Remaining %s").replace("%s",i.$quantities().quantity-a)).subscribe()}this.resolve({quantity:o})}else"backspace"===e.identifier?this.allSelected?(this.finalValue=0,this.allSelected=!1):(this.finalValue=this.finalValue.toString(),this.finalValue=this.finalValue.substr(0,this.finalValue.length-1)||0):this.allSelected?(this.finalValue=e.value,this.finalValue=parseFloat(this.finalValue),this.allSelected=!1):(this.finalValue+=""+e.value,this.finalValue=parseFloat(this.finalValue))},resolve:function(e){this.$popupParams.resolve(e),this.$popup.close()}}};const l=(0,r(1900).Z)(a,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"bg-white shadow min-h-2/5-screen w-3/4-screen md:w-3/5-screen lg:w-2/5-screen xl:w-2/5-screen relative"},[e.isLoading?r("div",{staticClass:"flex w-full h-full absolute top-O left-0 items-center justify-center",staticStyle:{background:"rgb(202 202 202 / 49%)"},attrs:{id:"loading-overlay"}},[r("ns-spinner")],1):e._e(),e._v(" "),r("div",{staticClass:"flex-shrink-0 py-2 border-b border-gray-200"},[r("h1",{staticClass:"text-xl font-bold text-gray-700 text-center"},[e._v(e._s(e.__("Define Quantity")))])]),e._v(" "),r("div",{staticClass:"h-16 border-b bg-gray-800 text-white border-gray-200 flex items-center justify-center",attrs:{id:"screen"}},[r("h1",{staticClass:"font-bold text-3xl"},[e._v(e._s(e.finalValue))])]),e._v(" "),r("div",{staticClass:"grid grid-flow-row grid-cols-3 grid-rows-3",attrs:{id:"numpad"}},e._l(e.keys,(function(t,s){return r("div",{key:s,staticClass:"hover:bg-blue-400 hover:text-white hover:border-blue-600 text-xl font-bold border border-gray-200 h-24 flex items-center justify-center cursor-pointer",on:{click:function(r){return e.inputValue(t)}}},[void 0!==t.value?r("span",[e._v(e._s(t.value))]):e._e(),e._v(" "),t.icon?r("i",{staticClass:"las",class:t.icon}):e._e()])})),0)])}),[],!1,null,null,null).exports},3661:(e,t,r)=>{"use strict";r.d(t,{Z:()=>u});var s=r(162),n=r(6386),i=r(7266);function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,s)}return r}function a(e){for(var t=1;t{e.O(0,[898],(()=>{return t=9572,e(e.s=t);var t}));e.O()}]); //# sourceMappingURL=pos.min.js.map \ No newline at end of file diff --git a/public/js/setup.min.js b/public/js/setup.min.js index 536240f35..fc55afc64 100644 --- a/public/js/setup.min.js +++ b/public/js/setup.min.js @@ -1,2 +1,2 @@ -(self.webpackChunkNexoPOS_4x=self.webpackChunkNexoPOS_4x||[]).push([[312],{162:(e,t,n)=>{"use strict";n.d(t,{l:()=>V,kq:()=>R,ih:()=>L,kX:()=>I});var i=n(6486),s=n(9669),r=n(2181),a=n(8345),l=n(9624),o=n(9248),d=n(230);function c(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{};return this._request("post",e,t,n)}},{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._request("get",e,void 0,t)}},{key:"delete",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._request("delete",e,void 0,t)}},{key:"put",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this._request("put",e,t,n)}},{key:"response",get:function(){return this._lastRequestData}},{key:"_request",value:function(e,t){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return t=R.applyFilters("http-client-url",t.replace(/\/$/,"")),this._subject.next({identifier:"async.start",url:t,data:i}),new d.y((function(r){n._client[e](t,i,Object.assign(Object.assign({},n._client.defaults[e]),s)).then((function(e){n._lastRequestData=e,r.next(e.data),r.complete(),n._subject.next({identifier:"async.stop"})})).catch((function(e){var t;r.error((null===(t=e.response)||void 0===t?void 0:t.data)||e.response||e),n._subject.next({identifier:"async.stop"})}))}))}},{key:"subject",value:function(){return this._subject}},{key:"emit",value:function(e){var t=e.identifier,n=e.value;this._subject.next({identifier:t,value:n})}}])&&c(t.prototype,n),i&&c(t,i),e}(),f=n(3);function h(e,t){for(var n=0;n=1e3){for(var n,i=Math.floor((""+e).length/3),s=2;s>=1;s--){if(((n=parseFloat((0!=i?e/Math.pow(1e3,i):e).toPrecision(s)))+"").replace(/[^a-zA-Z 0-9]+/g,"").length<=2)break}n%1!=0&&(n=n.toFixed(1)),t=n+["","k","m","b","t"][i]}return t})),S=n(1356),E=n(9698);function D(e,t){for(var n=0;n0&&window.outerWidth<=480:this.breakpoint="xs";break;case window.outerWidth>480&&window.outerWidth<=640:this.breakpoint="sm";break;case window.outerWidth>640&&window.outerWidth<=1024:this.breakpoint="md";break;case window.outerWidth>1024&&window.outerWidth<=1280:this.breakpoint="lg";break;case window.outerWidth>1280:this.breakpoint="xl"}}}])&&z(t.prototype,n),i&&z(t,i),e}()),H=new b({sidebar:["xs","sm","md"].includes(W.breakpoint)?"hidden":"visible"});L.defineClient(s),window.nsEvent=V,window.nsHttpClient=L,window.nsSnackBar=I,window.nsCurrency=S.W,window.nsTruncate=E.b,window.nsRawCurrency=S.f,window.nsAbbreviate=$,window.nsState=H,window.nsUrl=Z,window.nsScreen=W,window.ChartJS=r,window.EventEmitter=p,window.Popup=w.G,window.RxJS=y,window.FormValidation=k.Z,window.nsCrudHandler=N},4364:(e,t,n)=>{"use strict";n.r(t),n.d(t,{nsAvatar:()=>N,nsButton:()=>l,nsCheckbox:()=>h,nsCkeditor:()=>A,nsCloseButton:()=>E,nsCrud:()=>v,nsCrudForm:()=>x,nsDate:()=>C,nsDateTimePicker:()=>M.V,nsDatepicker:()=>R,nsField:()=>_,nsIconButton:()=>D,nsInput:()=>d,nsLink:()=>o,nsMediaInput:()=>S,nsMenu:()=>r,nsMultiselect:()=>k,nsNumpad:()=>V.Z,nsSelect:()=>c.R,nsSelectAudio:()=>f,nsSpinner:()=>g,nsSubmenu:()=>a,nsSwitch:()=>j,nsTableRow:()=>b,nsTabs:()=>q,nsTabsItem:()=>z,nsTextarea:()=>w});var i=n(538),s=n(162),r=i.default.component("ns-menu",{data:function(){return{defaultToggledState:!1,_save:0}},props:["href","label","icon","notification","toggled","identifier"],template:'\n \n ',mounted:function(){var e=this;this.defaultToggledState=void 0!==this.toggled?this.toggled:this.defaultToggledState,s.l.subject().subscribe((function(t){t.value!==e.identifier&&(e.defaultToggledState=!1)}))},methods:{toggleEmit:function(){var e=this;this.toggle().then((function(t){t&&s.l.emit({identifier:"side-menu.open",value:e.identifier})}))},toggle:function(){var e=this;return new Promise((function(t,n){0===e.href.length&&(e.defaultToggledState=!e.defaultToggledState,t(e.defaultToggledState))}))}}}),a=i.default.component("ns-submenu",{data:function(){return{}},props:["href","label","active"],mounted:function(){},template:'\n
    \n
  • \n \n \n \n
  • \n
    \n '}),l=i.default.component("ns-button",{data:function(){return{clicked:!1,_save:0}},props:["type","disabled","link","href","routerLink","to"],template:'\n
    \n \n \n \n
    \n ',mounted:function(){},computed:{isDisabled:function(){return this.disabled&&(0===this.disabled.length||"disabled"===this.disabled||this.disabled)},buttonclass:function(){var e;switch(this.type){case"info":e="".concat(this.isDisabled?"bg-gray-400 border border-gray-500 cursor-not-allowed text-gray-600":"shadow bg-blue-400 text-white");break;case"success":e="".concat(this.isDisabled?"bg-gray-400 border border-gray-500 cursor-not-allowed text-gray-600":"shadow bg-green-400 text-white");break;case"danger":e="".concat(this.isDisabled?"bg-gray-400 border border-gray-500 cursor-not-allowed text-gray-600":"shadow bg-red-400 text-white");break;case"warning":e="".concat(this.isDisabled?"bg-gray-400 border border-gray-500 cursor-not-allowed text-gray-600":"shadow bg-orange-400 text-white");break;default:e="".concat(this.isDisabled?"bg-gray-400 border border-gray-500 cursor-not-allowed text-gray-600":"shadow bg-white text-gray-800")}return e}}}),o=i.default.component("ns-link",{data:function(){return{clicked:!1,_save:0}},props:["type","to","href"],template:'\n
    \n \n \n
    \n ',computed:{buttonclass:function(){switch(this.type){case"info":return"shadow bg-blue-400 text-white";case"success":return"shadow bg-green-400 text-white";case"danger":return"shadow bg-red-400 text-white";case"warning":return"shadow bg-orange-400 text-white";default:return"shadow bg-white text-gray-800"}}}}),d=i.default.component("ns-input",{data:function(){return{}},mounted:function(){},computed:{hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},disabledClass:function(){return this.field.disabled?"bg-gray-200 cursor-not-allowed":"bg-transparent"},inputClass:function(){return this.disabledClass+" "+this.leadClass},leadClass:function(){return this.leading?"pl-8":"px-4"}},props:["placeholder","leading","type","field"],template:'\n
    \n \n
    \n
    \n \n {{ leading }}\n \n
    \n \n
    \n

    \n

    \n This field is required.\n This field must contain a valid email address.\n {{ error.message }}\n

    \n
    \n '}),c=n(4451),u=n(7389),f=i.default.component("ns-select-audio",{data:function(){return{}},props:["name","placeholder","field"],computed:{hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},disabledClass:function(){return this.field.disabled?"bg-gray-200 cursor-not-allowed":"bg-transparent"},inputClass:function(){return this.disabledClass+" "+this.leadClass},leadClass:function(){return this.leading?"pl-8":"px-4"}},methods:{__:u.__,playSelectedSound:function(){this.field.value.length>0&&new Audio(this.field.value).play()}},template:'\n
    \n \n
    \n
    \n \n
    \n \n
    \n

    \n

    \n {{ __( \'This field is required.\' ) }}\n {{ __( \'This field must contain a valid email address.\' ) }}\n {{ error.message }}\n

    \n
    \n '}),h=i.default.component("ns-checkbox",{data:function(){return{}},props:["checked","field","label"],template:'\n
    \n
    \n \n
    \n {{ label }}\n {{ field.label }}\n
    \n ',computed:{isChecked:function(){return this.field?this.field.value:this.checked}},methods:{toggleIt:function(){void 0!==this.field&&(this.field.value=!this.field.value),this.$emit("change",!this.checked)}}}),p=n(2242),m=n(419),v=i.default.component("ns-crud",{data:function(){return{isRefreshing:!1,sortColumn:"",searchInput:"",searchQuery:"",page:1,bulkAction:"",bulkActions:[],columns:[],selectedEntries:[],globallyChecked:!1,result:{current_page:null,data:[],first_page_url:null,from:null,last_page:null,last_page_url:null,next_page_url:null,path:null,per_page:null,prev_page_url:null,to:null,total:null}}},mounted:function(){void 0!==this.identifier&&nsCrudHandler.defineInstance(this.identifier,this),this.loadConfig()},props:["src","create-url","mode","identifier","queryParams"],computed:{getParsedSrc:function(){return"".concat(this.src,"?").concat(this.sortColumn).concat(this.searchQuery).concat(this.queryPage).concat(this.getQueryParams()?"&"+this.getQueryParams():"")},getSelectedAction:function(){var e=this,t=this.bulkActions.filter((function(t){return t.identifier===e.bulkAction}));return t.length>0&&t[0]},pagination:function(){return this.result?this.pageNumbers(this.result.last_page,this.result.current_page):[]},queryPage:function(){return this.result?"&page=".concat(this.page):""},resultInfo:function(){return(0,u.__)("displaying {perPage} on {items} items").replace("{perPage}",this.result.total).replace("{items}",this.result.total)}},methods:{__:u.__,getQueryParams:function(){var e=this;return this.queryParams?Object.keys(this.queryParams).map((function(t){return"".concat(t,"=").concat(e.queryParams[t])})).join("&"):""},pageNumbers:function(e,t){var n=[];return t>e-3?n.push(e-2,e-1,e):n.push(t,t+1,t+2,"...",e),n.filter((function(e){return e>0||"string"==typeof e}))},downloadContent:function(){s.ih.post("".concat(this.src,"/export?").concat(this.getQueryParams()),{entries:this.selectedEntries.map((function(e){return e.$id}))}).subscribe((function(e){setTimeout((function(){return document.location=e.url}),300),s.kX.success((0,u.__)("The document has been generated.")).subscribe()}),(function(e){s.kX.error(e.message||(0,u.__)("Unexpected error occured.")).subscribe()}))},clearSelectedEntries:function(){var e=this;p.G.show(m.Z,{title:(0,u.__)("Clear Selected Entries ?"),message:(0,u.__)("Would you like to clear all selected entries ?"),onAction:function(t){t&&(e.selectedEntries=[])}})},refreshRow:function(e){if(!0===e.$checked){0===this.selectedEntries.filter((function(t){return t.$id===e.$id})).length&&this.selectedEntries.push(e)}else{var t=this.selectedEntries.filter((function(t){return t.$id===e.$id}));if(t.length>0){var n=this.selectedEntries.indexOf(t[0]);this.selectedEntries.splice(n,1)}}},handleShowOptions:function(e){this.result.data.forEach((function(t){t.$id!==e.$id&&(t.$toggled=!1)}))},handleGlobalChange:function(e){var t=this;this.globallyChecked=e,this.result.data.forEach((function(n){n.$checked=e,t.refreshRow(n)}))},loadConfig:function(){var e=this;s.ih.get("".concat(this.src,"/config?").concat(this.getQueryParams())).subscribe((function(t){e.columns=t.columns,e.bulkActions=t.bulkActions,e.refresh()}),(function(e){s.kX.error(e.message,"OK",{duration:!1}).subscribe()}))},cancelSearch:function(){this.searchInput="",this.search()},search:function(){this.searchInput?this.searchQuery="&search=".concat(this.searchInput):this.searchQuery="",this.refresh()},sort:function(e){for(var t in this.columns)t!==e&&(this.columns[t].$sorted=!1,this.columns[t].$direction="");switch(this.columns[e].$sorted=!0,this.columns[e].$direction){case"asc":this.columns[e].$direction="desc";break;case"desc":this.columns[e].$direction="";break;case"":this.columns[e].$direction="asc"}["asc","desc"].includes(this.columns[e].$direction)?this.sortColumn="active=".concat(e,"&direction=").concat(this.columns[e].$direction):this.sortColumn="",this.$emit("sort",this.columns[e]),this.refresh()},bulkDo:function(){var e=this;return this.bulkAction?this.selectedEntries.length>0?(console.log(this.getSelectedAction),confirm(this.getSelectedAction.confirm||this.$slots["error-bulk-confirmation"]||(0,u.__)("No bulk confirmation message provided on the CRUD class."))?s.ih.post("".concat(this.src,"/bulk-actions"),{action:this.bulkAction,entries:this.selectedEntries.map((function(e){return e.$id}))}).subscribe((function(t){s.kX.info(t.message).subscribe(),e.selectedEntries=[],e.refresh()}),(function(e){s.kX.error(e.message).subscribe()})):void 0):s.kX.error(this.$slots["error-no-selection"]?this.$slots["error-no-selection"][0].text:(0,u.__)("No selection has been made.")).subscribe():s.kX.error(this.$slots["error-no-action"]?this.$slots["error-no-action"][0].text:(0,u.__)("No action has been selected.")).subscribe()},refresh:function(){var e=this;this.globallyChecked=!1,this.isRefreshing=!0,s.ih.get("".concat(this.getParsedSrc)).subscribe((function(t){t.data=t.data.map((function(t){return e.selectedEntries.filter((function(e){return e.$id===t.$id})).length>0&&(t.$checked=!0),t})),e.isRefreshing=!1,e.result=t,e.page=t.current_page}),(function(t){e.isRefreshing=!1,s.kX.error(t.message).subscribe()}))}},template:'\n
    \n
    \n \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \n \n
    \n {{ column.label }}\n \n \n \n \n
    \n
    {{ __( \'There is nothing to display...\' ) }}
    \n
    \n
    \n
    \n
    \n \n \n
    \n
    \n
    {{ resultInfo }}
    \n \n
    \n
    \n
    \n '}),b=i.default.component("ns-table-row",{props:["options","row","columns"],data:function(){return{optionsToggled:!1}},mounted:function(){},methods:{sanitizeHTML:function(e){var t=document.createElement("div");t.innerHTML=e;for(var n=t.getElementsByTagName("script"),i=n.length;i--;)n[i].parentNode.removeChild(n[i]);return t.innerHTML},getElementOffset:function(e){var t=e.getBoundingClientRect();return{top:t.top+window.pageYOffset,left:t.left+window.pageXOffset}},toggleMenu:function(e){var t=this;if(this.row.$toggled=!this.row.$toggled,this.$emit("toggled",this.row),this.row.$toggled)setTimeout((function(){var e=t.$el.querySelectorAll(".relative > .absolute")[0],n=t.$el.querySelectorAll(".relative")[0],i=t.getElementOffset(n);e.style.top=i.top+"px",e.style.left=i.left+"px",n.classList.remove("relative"),n.classList.add("dropdown-holder")}),100);else{var n=this.$el.querySelectorAll(".dropdown-holder")[0];n.classList.remove("dropdown-holder"),n.classList.add("relative")}},handleChanged:function(e){this.row.$checked=e,this.$emit("updated",this.row)},triggerAsync:function(e){var t=this;e.confirm?confirm(e.confirm.message)&&s.ih[e.type.toLowerCase()](e.url).subscribe((function(e){s.kX.success(e.message).subscribe(),t.$emit("reload",t.row)}),(function(e){t.toggleMenu(),s.kX.error(e.message).subscribe()})):(s.l.emit({identifier:"ns-table-row-action",value:{action:e,row:this.row,component:this}}),this.toggleMenu())}},template:'\n \n \n \n \n \n \n \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n \n \n '}),g=i.default.component("ns-spinner",{data:function(){return{}},mounted:function(){},computed:{validatedSize:function(){return this.size||24},validatedBorder:function(){return this.border||8},validatedAnimation:function(){return this.animation||"fast"}},props:["color","size","border"],template:"\n
    \n
    \n
    \n "}),y=n(7266),x=i.default.component("ns-crud-form",{data:function(){return{form:{},globallyChecked:!1,formValidation:new y.Z,rows:[]}},mounted:function(){this.loadForm()},props:["src","create-url","field-class","return-url","submit-url","submit-method","disable-tabs"],computed:{activeTabFields:function(){for(var e in this.form.tabs)if(this.form.tabs[e].active)return this.form.tabs[e].fields;return[]}},methods:{toggle:function(e){for(var t in this.form.tabs)this.form.tabs[t].active=!1;this.form.tabs[e].active=!0},handleShowOptions:function(e){this.rows.forEach((function(t){t.$id!==e.$id&&(t.$toggled=!1)}))},submit:function(){var e=this;return this.formValidation.validateForm(this.form).length>0?s.kX.error(this.$slots["error-invalid-form"]?this.$slots["error-invalid-form"][0].text:"No error message provided for having an invalid form.",this.$slots.okay?this.$slots.okay[0].text:"OK").subscribe():(this.formValidation.disableForm(this.form),void 0===this.submitUrl?s.kX.error(this.$slots["error-no-submit-url"]?this.$slots["error-no-submit-url"][0].text:"No error message provided for not having a valid submit url.",this.$slots.okay?this.$slots.okay[0].text:"OK").subscribe():void s.ih[this.submitMethod?this.submitMethod.toLowerCase():"post"](this.submitUrl,this.formValidation.extractForm(this.form)).subscribe((function(t){if("success"===t.status){if(e.returnUrl&&e.returnUrl.length>0)return document.location=e.returnUrl;e.$emit("save",t)}e.formValidation.enableForm(e.form)}),(function(t){s.kX.error(t.message,void 0,{duration:5e3}).subscribe(),e.formValidation.triggerError(e.form,t),e.formValidation.enableForm(e.form)})))},handleGlobalChange:function(e){this.globallyChecked=e,this.rows.forEach((function(t){return t.$checked=e}))},loadForm:function(){var e=this;s.ih.get("".concat(this.src)).subscribe({next:function(t){e.form=e.parseForm(t.form),s.kq.doAction("ns-crud-form-loaded",e),e.$emit("updated",e.form)},error:function(e){s.kX.error(e.message,"OKAY",{duration:0}).subscribe()}})},parseForm:function(e){e.main.value=void 0===e.main.value?"":e.main.value,e.main=this.formValidation.createFields([e.main])[0];var t=0;for(var n in e.tabs)0===t&&(e.tabs[n].active=!0),e.tabs[n].active=void 0!==e.tabs[n].active&&e.tabs[n].active,e.tabs[n].fields=this.formValidation.createFields(e.tabs[n].fields),t++;return e}},template:'\n
    \n
    \n \n
    \n
    \n
    \n
    \n \n
    \n Return\n
    \n
    \n \n
    \n
    \n
    \n
    {{ tab.label }}
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n '}),w=i.default.component("ns-textarea",{data:function(){return{}},mounted:function(){},computed:{hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},disabledClass:function(){return this.field.disabled?"bg-gray-200 cursor-not-allowed":"bg-transparent"},inputClass:function(){return this.disabledClass+" "+this.leadClass},leadClass:function(){return this.leading?"p-8":"p-2"}},props:["placeholder","leading","type","field"],template:'\n
    \n \n
    \n
    \n \n {{ leading }}\n \n
    \n \n
    \n

    \n

    \n This field is required.\n This field must contain a valid email address.\n {{ error.message }}\n

    \n
    \n '}),_=i.default.component("ns-field",{data:function(){return{}},mounted:function(){},computed:{isInputField:function(){return["text","password","email","number","tel"].includes(this.field.type)},isDateField:function(){return["date"].includes(this.field.type)},isSelectField:function(){return["select"].includes(this.field.type)},isTextarea:function(){return["textarea"].includes(this.field.type)},isCheckbox:function(){return["checkbox"].includes(this.field.type)},isMultiselect:function(){return["multiselect"].includes(this.field.type)},isSelectAudio:function(){return["select-audio"].includes(this.field.type)},isSwitch:function(){return["switch"].includes(this.field.type)},isMedia:function(){return["media"].includes(this.field.type)},isCkEditor:function(){return["ckeditor"].includes(this.field.type)},isDateTimePicker:function(){return["datetimepicker"].includes(this.field.type)},isCustom:function(){return["custom"].includes(this.field.type)}},props:["field"],methods:{addOption:function(e){"select"===this.field.type&&this.field.options.forEach((function(e){return e.selected=!1})),e.selected=!0;var t=this.field.options.indexOf(e);this.field.options.splice(t,1),this.field.options.unshift(e),this.refreshMultiselect(),this.$emit("change",{action:"addOption",option:e})},refreshMultiselect:function(){this.field.value=this.field.options.filter((function(e){return e.selected})).map((function(e){return e.value}))},removeOption:function(e){e.selected=!1,this.refreshMultiselect(),this.$emit("change",{action:"removeOption",option:e})}},template:'\n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n '}),k=i.default.component("ns-multiselect",{data:function(){return{showPanel:!1,search:""}},props:["field"],computed:{hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},_options:function(){var e=this;return this.field.options.map((function(t){return t.selected=void 0!==t.selected&&t.selected,e.field.value&&e.field.value.includes(t.value)&&(t.selected=!0),t}))}},methods:{__:u.__,addOption:function(e){this.field.disabled||(this.$emit("addOption",e),this.$forceUpdate(),setTimeout((function(){}),100))},removeOption:function(e,t){var n=this;if(!this.field.disabled)return t.preventDefault(),t.stopPropagation(),this.$emit("removeOption",e),this.$forceUpdate(),setTimeout((function(){n.search=""}),100),!1}},mounted:function(){var e=this;this.field.value&&this.field.value.reverse().forEach((function(t){var n=e.field.options.filter((function(e){return e.value===t}));n.length>=0&&e.addOption(n[0])}))},template:'\n
    \n \n
    \n
    \n
    \n
    \n
    \n {{ option.label }}\n \n
    \n
    \n
    \n
    \n \n \n
    \n
    \n \n
    \n
    \n

    \n

    \n {{ __( \'This field is required.\' ) }}\n {{ __( \'This field must contain a valid email address.\' ) }}\n {{ error.message }}\n

    \n
    \n
    \n '}),j=i.default.component("ns-switch",{data:function(){return{}},mounted:function(){},computed:{_options:function(){var e=this;return this.field.options.map((function(t){return t.selected=t.value===e.field.value,t}))},hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},disabledClass:function(){return this.field.disabled?"bg-gray-200 cursor-not-allowed":""},sizeClass:function(){return" w-1/".concat(this._options.length<=4?this._options.length:4)},inputClass:function(){return this.disabledClass+" "+this.leadClass},leadClass:function(){return this.leading?"pl-8":"px-4"}},methods:{__:u.__,setSelected:function(e){this.field.value=e.value,this._options.forEach((function(e){return e.selected=!1})),e.selected=!0,this.$forceUpdate(),this.$emit("change",e.value)}},props:["placeholder","leading","type","field"],template:'\n
    \n \n
    \n \n
    \n

    \n

    \n {{ __( \'This field is required.\' ) }}\n

    \n
    \n '}),C=i.default.component("ns-date",{data:function(){return{}},mounted:function(){},computed:{hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},disabledClass:function(){return this.field.disabled?"bg-gray-200 cursor-not-allowed":"bg-transparent"},inputClass:function(){return this.disabledClass+" "+this.leadClass},leadClass:function(){return this.leading?"pl-8":"px-4"}},props:["placeholder","leading","type","field"],template:'\n
    \n \n
    \n
    \n \n {{ leading }}\n \n
    \n \n
    \n

    \n

    \n {{ __( \'This field is required.\' ) }}\n {{ __( \'This field must contain a valid email address.\' ) }}\n {{ error.message }}\n

    \n
    \n '}),$=n(9576),S=i.default.component("ns-media-input",{template:'\n
    \n \n
    \n
    \n \n {{ leading }}\n \n
    \n
    \n
    \n \n
    \n \n \n
    \n
    \n

    \n

    \n {{ __( \'This field is required.\' ) }}\n {{ __( \'This field must contain a valid email address.\' ) }}\n {{ error.message }}\n

    \n
    \n ',computed:{hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},disabledClass:function(){return this.field.disabled?"bg-gray-200 cursor-not-allowed":"bg-transparent"},inputClass:function(){return this.disabledClass+" "+this.leadClass},leadClass:function(){return this.leading?"pl-8":"px-4"}},data:function(){return{}},props:["placeholder","leading","type","field"],mounted:function(){},methods:{toggleMedia:function(){var e=this;new Promise((function(t,n){p.G.show($.Z,Object.assign({resolve:t,reject:n},e.field.data||{}))})).then((function(t){"use-selected"===t.event&&(e.field.data&&"url"!==e.field.data.type?e.field.data&&"model"!==e.field.data.type||(e.field.value=t.value[0]):e.field.value=t.value[0].sizes.original,e.$forceUpdate())}))}}}),E=i.default.component("ns-close-button",{template:'\n \n ',methods:{clicked:function(e){this.$emit("click",e)}}}),D=i.default.component("ns-icon-button",{template:'\n \n ',props:["className","buttonClass"],methods:{clicked:function(e){this.$emit("click",e)}}}),O=n(1272),P=n.n(O),T=n(5234),F=n.n(T),A=i.default.component("ns-ckeditor",{data:function(){return{editor:F()}},components:{ckeditor:P().component},mounted:function(){},methods:{__:u.__},computed:{hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},disabledClass:function(){return this.field.disabled?"bg-gray-200 cursor-not-allowed":"bg-transparent"},inputClass:function(){return this.disabledClass+" "+this.leadClass},leadClass:function(){return this.leading?"p-8":"p-2"}},props:["placeholder","leading","type","field"],template:'\n
    \n \n
    \n
    \n \n {{ leading }}\n \n
    \n \n
    \n

    \n

    \n {{ __( \'This field is required.\' ) }}\n {{ __( \'This field must contain a valid email address.\' ) }}\n {{ error.message }}\n

    \n
    \n '}),q=i.default.component("ns-tabs",{data:function(){return{childrens:[]}},props:["active"],computed:{activeComponent:function(){var e=this.$children.filter((function(e){return e.active}));return e.length>0&&e[0]}},methods:{toggle:function(e){this.$emit("active",e.identifier),this.$emit("changeTab",e.identifier)}},mounted:function(){this.childrens=this.$children},template:'\n
    \n
    \n
    {{ tab.label }}
    \n
    \n \n
    \n '}),z=i.default.component("ns-tabs-item",{data:function(){return{}},mounted:function(){},props:["label","identifier","padding"],template:'\n
    \n \n
    \n '}),M=n(8655),V=n(3968),L=n(1726),I=n(7259);const Z=i.default.extend({methods:{__:u.__},data:function(){return{svg:""}},mounted:function(){this.svg=(0,L.createAvatar)(I,{seed:this.displayName})},computed:{avatarUrl:function(){return 0===this.url.length?"":this.url}},props:["url","display-name"]});const N=(0,n(1900).Z)(Z,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"flex justify-between items-center flex-shrink-0"},[n("span",{staticClass:"hidden md:inline-block text-gray-600 px-2"},[e._v(e._s(e.__("Howdy, {name}").replace("{name}",this.displayName)))]),e._v(" "),n("span",{staticClass:"md:hidden text-gray-600 px-2"},[e._v(e._s(e.displayName))]),e._v(" "),n("div",{staticClass:"px-2"},[n("div",{staticClass:"w-8 h-8 overflow-hidden rounded-full bg-gray-600"},[""!==e.avatarUrl?n("img",{staticClass:"w-8 h-8 overflow-hidden rounded-full",attrs:{src:e.avatarUrl,alt:e.displayName,srcset:""}}):e._e(),e._v(" "),""===e.avatarUrl?n("div",{domProps:{innerHTML:e._s(e.svg)}}):e._e()])])])}),[],!1,null,null,null).exports;var R=n(6598).Z},8655:(e,t,n)=>{"use strict";n.d(t,{V:()=>l});var i=n(538),s=n(381),r=n.n(s),a=n(7389),l=i.default.component("ns-date-time-picker",{template:'\n
    \n \n
    \n \n \n {{ currentDay.format( \'YYYY/MM/DD HH:mm\' ) }}\n N/A\n \n
    \n

    {{ field.description }}

    \n \n
    \n ',props:["field","date"],data:function(){return{visible:!1,hours:0,minutes:0,currentDay:null,daysOfWeek:new Array(7).fill("").map((function(e,t){return t})),calendar:[[]]}},watch:{visible:function(){var e=this;this.visible&&setTimeout((function(){e.$refs.hours.addEventListener("focus",(function(){this.select()})),e.$refs.minutes.addEventListener("focus",(function(){this.select()}))}),100)}},mounted:function(){var e=this;document.addEventListener("mousedown",(function(t){return e.checkClickedItem(t)})),this.field?this.currentDay=[void 0,null,""].includes(this.field.value)?r()():r()(this.field.value):this.currentDay=[void 0,null,""].includes(this.date)?r()():r()(this.date),this.hours=this.currentDay.format("HH"),this.minutes=this.currentDay.format("mm"),this.build()},methods:{__:a.__,detectHoursChange:function(){parseFloat(this.hours)<0&&(this.hours=0),parseFloat(this.hours)>23&&(this.hours=23),this.updateDateTime()},detectMinuteChange:function(){parseFloat(this.minutes)<0&&(this.minutes=0),parseFloat(this.minutes)>59&&(this.minutes=59),this.updateDateTime()},updateDateTime:function(){this.currentDay.hours(this.hours),this.currentDay.minutes(this.minutes),this.selectDate(this.currentDay)},checkClickedItem:function(e){!this.$el.contains(e.srcElement)&&this.visible&&(this.visible=!1)},selectDate:function(e){this.currentDay=e,this.currentDay.hours(this.hours),this.currentDay.minutes(this.minutes);var t=this.currentDay.format("YYYY/MM/DD HH:mm");this.field?(this.field.value=t,this.$emit("change",this.field)):this.$emit("change",this.currentDay)},subMonth:function(){this.currentDay.subtract(1,"month"),this.build()},addMonth:function(){this.currentDay.add(1,"month"),this.build()},resetCalendar:function(){this.calendar=[[]]},build:function(){this.resetCalendar();this.currentDay.clone().startOf("month");for(var e=this.currentDay.clone().startOf("month"),t=this.currentDay.clone().endOf("month");;){0===e.day()&&this.calendar[0].length>0&&this.calendar.push([]);var n=this.calendar.length-1;if(this.calendar[n].push({date:e.clone(),dayOfWeek:e.day(),isToday:e.isSame(r().now(),"day")}),e.isSame(t,"day"))break;e.add(1,"day")}}}})},4451:(e,t,n)=>{"use strict";n.d(t,{R:()=>s});var i=n(7389),s=n(538).default.component("ns-select",{data:function(){return{}},props:["name","placeholder","field"],computed:{hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},disabledClass:function(){return this.field.disabled?"bg-gray-200 cursor-not-allowed":"bg-transparent"},inputClass:function(){return this.disabledClass+" "+this.leadClass},leadClass:function(){return this.leading?"pl-8":"px-4"}},methods:{__:i.__},template:'\n
    \n \n
    \n \n
    \n

    \n

    \n {{ __( \'This field is required.\' ) }}\n {{ __( \'This field must contain a valid email address.\' ) }}\n {{ error.message }}\n

    \n
    \n '})},1356:(e,t,n)=>{"use strict";n.d(t,{W:()=>d,f:()=>c});var i=n(538),s=n(2077),r=n.n(s),a=n(6740),l=n.n(a),o=new Array(parseInt(ns.currency.ns_currency_precision)).fill("").map((function(e){return 0})).join(""),d=i.default.filter("currency",(function(e){var t,n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"full";switch(ns.currency.ns_currency_prefered){case"iso":t=ns.currency.ns_currency_iso;break;case"symbol":t=ns.currency.ns_currency_symbol}if("full"===i){var s={decimal:ns.currency.ns_currency_decimal_separator,separator:ns.currency.ns_currency_thousand_separator,precision:parseInt(ns.currency.ns_currency_precision),symbol:""};n=l()(e,s).format()}else n=r()(e).format("0.0a");return"".concat("before"===ns.currency.ns_currency_position?t:"").concat(n).concat("after"===ns.currency.ns_currency_position?t:"")})),c=function(e){var t="0.".concat(o);return parseFloat(r()(e).format(t))}},9698:(e,t,n)=>{"use strict";n.d(t,{b:()=>i});var i=n(538).default.filter("truncate",(function(e,t){return e?(e=e.toString()).length>t?e.substring(0,t)+"...":e:""}))},7266:(e,t,n)=>{"use strict";function i(e,t){for(var n=0;ns});var s=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,s;return t=e,(n=[{key:"validateFields",value:function(e){var t=this;return 0===e.map((function(e){return t.checkField(e),e.errors?0===e.errors.length:0})).filter((function(e){return!1===e})).length}},{key:"validateFieldsErrors",value:function(e){var t=this;return e.map((function(e){return t.checkField(e),e.errors})).flat()}},{key:"validateForm",value:function(e){e.main&&this.validateField(e.main);var t=[];for(var n in e.tabs){var i=[],s=this.validateFieldsErrors(e.tabs[n].fields);s.length>0&&i.push(s),e.tabs[n].errors=i.flat(),t.push(i.flat())}return t.flat().filter((function(e){return void 0!==e}))}},{key:"initializeTabs",value:function(e){var t=0;for(var n in e)0===t&&(e[n].active=!0),e[n].active=void 0!==e[n].active&&e[n].active,e[n].fields=this.createFields(e[n].fields),t++;return e}},{key:"validateField",value:function(e){return this.checkField(e)}},{key:"fieldsValid",value:function(e){return!(e.map((function(e){return e.errors&&e.errors.length>0})).filter((function(e){return e})).length>0)}},{key:"createFields",value:function(e){return e.map((function(e){return e.type=e.type||"text",e.errors=e.errors||[],e.disabled=e.disabled||!1,"custom"===e.type&&(e.component=nsExtraComponents[e.name]),e}))}},{key:"createForm",value:function(e){if(e.main&&(e.main=this.createFields([e.main])[0]),e.tabs)for(var t in e.tabs)e.tabs[t].fields=this.createFields(e.tabs[t].fields),e.tabs[t].errors=[];return e}},{key:"enableFields",value:function(e){return e.map((function(e){return e.disabled=!1}))}},{key:"disableFields",value:function(e){return e.map((function(e){return e.disabled=!0}))}},{key:"disableForm",value:function(e){for(var t in e.main&&(e.main.disabled=!0),e.tabs)e.tabs[t].fields.forEach((function(e){return e.disabled=!0}))}},{key:"enableForm",value:function(e){for(var t in e.main&&(e.main.disabled=!1),e.tabs)e.tabs[t].fields.forEach((function(e){return e.disabled=!1}))}},{key:"getValue",value:function(e){var t={};return e.forEach((function(e){t[e.name]=e.value})),t}},{key:"checkField",value:function(e){var t=this;return void 0!==e.validation&&(e.errors=[],this.detectValidationRules(e.validation).forEach((function(n){t.fieldPassCheck(e,n)}))),e}},{key:"extractForm",value:function(e){var t={};if(e.main&&(t[e.main.name]=e.main.value),e.tabs)for(var n in e.tabs)void 0===t[n]&&(t[n]={}),t[n]=this.extractFields(e.tabs[n].fields);return t}},{key:"extractFields",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.forEach((function(e){["multiselect"].includes(e.type)?t[e.name]=e.options.filter((function(e){return e.selected})).map((function(e){return e.value})):t[e.name]=e.value})),t}},{key:"detectValidationRules",value:function(e){var t=function(e){var t;return["email","required"].includes(e)?{identifier:e}:(t=/(min)\:([0-9])+/g.exec(e))||(t=/(max)\:([0-9])+/g.exec(e))?{identifier:t[1],value:t[2]}:e};return Array.isArray(e)?e.filter((function(e){return"string"==typeof e})).map(t):e.split("|").map(t)}},{key:"triggerError",value:function(e,t){if(t.errors){var n=function(n){var i=n.split(".").filter((function(e){return!/^\d+$/.test(e)}));2===i.length&&e.tabs[i[0]].fields.forEach((function(e){e.name===i[1]&&t.errors[n].forEach((function(t){var n={identifier:"invalid",invalid:!0,message:t,name:e.name};e.errors.push(n)}))})),n===e.main.name&&t.errors[n].forEach((function(t){e.main.errors.push({identifier:"invalid",invalid:!0,message:t,name:e.main.name})}))};for(var i in t.errors)n(i)}}},{key:"triggerFieldsErrors",value:function(e,t){if(t&&t.errors){var n=function(n){e.forEach((function(e){e.name===n&&t.errors[n].forEach((function(t){var n={identifier:"invalid",invalid:!0,message:t,name:e.name};e.errors.push(n)}))}))};for(var i in t.errors)n(i)}}},{key:"fieldPassCheck",value:function(e,t){if("required"===t.identifier){if(void 0===e.value||null===e.value||0===e.value.length)return e.errors.push({identifier:t.identifier,invalid:!0,name:e.name});e.errors.forEach((function(n,i){n.identifier===t.identifier&&!0===n.invalid&&e.errors.splice(i,1)}))}if("email"===t.identifier){if(!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(e.value))return e.errors.push({identifier:t.identifier,invalid:!0,name:e.name});e.errors.forEach((function(n,i){!0===n[t.identifier]&&e.errors.splice(i,1)}))}return e}}])&&i(t.prototype,n),s&&i(t,s),e}()},7389:(e,t,n)=>{"use strict";n.d(t,{__:()=>i,c:()=>s});var i=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"NexoPOS";return nsLanguage.getEntries(t)&&nsLanguage.getEntries(t)[e]||e},s=function(e,t){return nsLanguage.getEntries(t)&&nsLanguage.getEntries(t)[e]||e}},8603:(e,t,n)=>{"use strict";function i(){var e=this;Object.keys(this).includes("$popup")&&this.$popup.event.subscribe((function(t){"click-overlay"===t.event&&(e.$popupParams&&void 0!==e.$popupParams.reject&&e.$popupParams.reject(!1),e.$popup.close()),"press-esc"===t.event&&(e.$popupParams&&void 0!==e.$popupParams.reject&&e.$popupParams.reject(!1),e.$popup.close())}))}n.d(t,{Z:()=>i})},6386:(e,t,n)=>{"use strict";function i(e){void 0!==this.$popupParams.resolve&&this.$popupParams.reject&&(!1!==e?this.$popupParams.resolve(e):this.$popupParams.reject(e)),this.$popup.close()}n.d(t,{Z:()=>i})},2242:(e,t,n)=>{"use strict";n.d(t,{G:()=>a});var i=n(9248);function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};if(s(this,e),this.config={primarySelector:void 0,popupClass:"shadow-lg h-half w-1/2 bg-white"},this.container=document.createElement("div"),this.popupBody=document.createElement("div"),this.config=Object.assign(this.config,t),void 0===this.config.primarySelector&&document.querySelectorAll(".is-popup").length>0){var n=document.querySelectorAll(".is-popup").length;this.parentWrapper=document.querySelectorAll(".is-popup")[n-1]}else this.parentWrapper=document.querySelector("body").querySelectorAll("div")[0];this.event=new i.x}var t,n,a;return t=e,a=[{key:"show",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=new e(i);return s.open(t,n),s}}],(n=[{key:"open",value:function(e){var t,n,i,s=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=document.querySelector("body").querySelectorAll("div")[0];this.parentWrapper.style.filter="blur(4px)",a.style.filter="blur(6px)",this.container.setAttribute("class","absolute top-0 left-0 w-full h-full flex items-center justify-center is-popup"),this.container.addEventListener("click",(function(e){s.event.next({event:"click-overlay",value:!0}),e.stopPropagation()})),this.popupBody.addEventListener("click",(function(e){e.stopImmediatePropagation()})),this.container.style.background="rgb(51 51 51 / 20%)",this.container.id="popup-container-"+document.querySelectorAll(".is-popup").length,this.popupBody.setAttribute("class"," zoom-out-entrance"),this.popupBody.innerHTML='',this.container.appendChild(this.popupBody),document.body.appendChild(this.container);var l=Vue.extend(e);this.instance=new l({propsData:{popup:this}}),this.instance.template=(null===(t=null==e?void 0:e.options)||void 0===t?void 0:t.template)||void 0,this.instance.render=e.render||void 0,this.instance.methods=(null===(n=null==e?void 0:e.options)||void 0===n?void 0:n.methods)||(null==e?void 0:e.methods),this.instance.data=(null===(i=null==e?void 0:e.options)||void 0===i?void 0:i.data)||(null==e?void 0:e.data),this.instance.$popup=this,this.instance.$popupParams=r,this.instance.$mount("#".concat(this.container.id," .popup-body"))}},{key:"close",value:function(){var e=this;this.instance.$destroy(),this.event.unsubscribe(),this.parentWrapper.style.filter="blur(0px)";var t=document.querySelector("body").querySelectorAll("div")[0];document.querySelectorAll(".is-popup").length<=1&&(t.style.filter="blur(0px)"),this.popupBody.classList.remove("zoom-out-entrance"),this.popupBody.classList.add("zoom-in-exit"),this.container.classList.remove("is-popup"),setTimeout((function(){e.container.remove()}),300)}}])&&r(t.prototype,n),a&&r(t,a),e}()},9624:(e,t,n)=>{"use strict";n.d(t,{S:()=>r});var i=n(3260);function s(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"info"};return i.Observable.create((function(i){var r=n.__createSnack({message:e,label:t,type:s.type}),a=r.buttonNode,l=(r.textNode,r.snackWrapper,r.sampleSnack);a.addEventListener("click",(function(e){i.onNext(a),i.onCompleted(),l.remove()})),n.__startTimer(s.duration,l)}))}},{key:"error",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"error"};return this.show(e,t,Object.assign(Object.assign({},n),{type:"error"}))}},{key:"success",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"success"};return this.show(e,t,Object.assign(Object.assign({},n),{type:"success"}))}},{key:"info",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"info"};return this.show(e,t,Object.assign(Object.assign({},n),{type:"info"}))}},{key:"__startTimer",value:function(e,t){var n,i=function(){e>0&&!1!==e&&(n=setTimeout((function(){t.remove()}),e))};t.addEventListener("mouseenter",(function(){clearTimeout(n)})),t.addEventListener("mouseleave",(function(){i()})),i()}},{key:"__createSnack",value:function(e){var t=e.message,n=e.label,i=e.type,s=void 0===i?"info":i,r=document.getElementById("snack-wrapper")||document.createElement("div"),a=document.createElement("div"),l=document.createElement("p"),o=document.createElement("div"),d=document.createElement("button"),c="",u="";switch(s){case"info":c="text-white hover:bg-blue-400 bg-blue-500",u="bg-gray-900 text-white";break;case"error":c="text-red-700 hover:bg-white bg-white",u="bg-red-500 text-white";break;case"success":c="text-green-700 hover:bg-white bg-white",u="bg-green-500 text-white"}return l.textContent=t,n&&(d.textContent=n,d.setAttribute("class","px-3 py-2 shadow rounded-lg font-bold ".concat(c)),o.appendChild(d)),a.appendChild(l),a.appendChild(o),a.setAttribute("class","md:rounded-lg py-2 px-3 md:w-2/5 w-full z-10 md:my-2 shadow-lg flex justify-between items-center zoom-in-entrance anim-duration-300 ".concat(u)),r.appendChild(a),null===document.getElementById("snack-wrapper")&&(r.setAttribute("id","snack-wrapper"),r.setAttribute("class","absolute bottom-0 w-full flex justify-between items-center flex-col"),document.body.appendChild(r)),{snackWrapper:r,sampleSnack:a,buttonsWrapper:o,buttonNode:d,textNode:l}}}])&&s(t.prototype,n),r&&s(t,r),e}()},5767:(e,t,n)=>{"use strict";n.d(t,{c:()=>a});var i=n(538),s=n(8345),r=[{path:"/",component:n(4741).Z},{path:"/database",component:n(5718).Z},{path:"/configuration",component:n(5825).Z}];i.default.use(s.Z);var a=new s.Z({routes:r});new i.default({router:a}).$mount("#nexopos-setup")},6700:(e,t,n)=>{var i={"./af":2786,"./af.js":2786,"./ar":867,"./ar-dz":4130,"./ar-dz.js":4130,"./ar-kw":6135,"./ar-kw.js":6135,"./ar-ly":6440,"./ar-ly.js":6440,"./ar-ma":7702,"./ar-ma.js":7702,"./ar-sa":6040,"./ar-sa.js":6040,"./ar-tn":7100,"./ar-tn.js":7100,"./ar.js":867,"./az":1083,"./az.js":1083,"./be":9808,"./be.js":9808,"./bg":8338,"./bg.js":8338,"./bm":7438,"./bm.js":7438,"./bn":8905,"./bn-bd":6225,"./bn-bd.js":6225,"./bn.js":8905,"./bo":1560,"./bo.js":1560,"./br":1278,"./br.js":1278,"./bs":622,"./bs.js":622,"./ca":2468,"./ca.js":2468,"./cs":5822,"./cs.js":5822,"./cv":877,"./cv.js":877,"./cy":7373,"./cy.js":7373,"./da":4780,"./da.js":4780,"./de":9740,"./de-at":217,"./de-at.js":217,"./de-ch":894,"./de-ch.js":894,"./de.js":9740,"./dv":5300,"./dv.js":5300,"./el":837,"./el.js":837,"./en-au":8348,"./en-au.js":8348,"./en-ca":7925,"./en-ca.js":7925,"./en-gb":2243,"./en-gb.js":2243,"./en-ie":6436,"./en-ie.js":6436,"./en-il":7207,"./en-il.js":7207,"./en-in":4175,"./en-in.js":4175,"./en-nz":6319,"./en-nz.js":6319,"./en-sg":1662,"./en-sg.js":1662,"./eo":2915,"./eo.js":2915,"./es":7093,"./es-do":5251,"./es-do.js":5251,"./es-mx":6112,"./es-mx.js":6112,"./es-us":1146,"./es-us.js":1146,"./es.js":7093,"./et":5603,"./et.js":5603,"./eu":7763,"./eu.js":7763,"./fa":6959,"./fa.js":6959,"./fi":1897,"./fi.js":1897,"./fil":2549,"./fil.js":2549,"./fo":4694,"./fo.js":4694,"./fr":4470,"./fr-ca":3049,"./fr-ca.js":3049,"./fr-ch":2330,"./fr-ch.js":2330,"./fr.js":4470,"./fy":5044,"./fy.js":5044,"./ga":9295,"./ga.js":9295,"./gd":2101,"./gd.js":2101,"./gl":8794,"./gl.js":8794,"./gom-deva":7884,"./gom-deva.js":7884,"./gom-latn":3168,"./gom-latn.js":3168,"./gu":5349,"./gu.js":5349,"./he":4206,"./he.js":4206,"./hi":94,"./hi.js":94,"./hr":316,"./hr.js":316,"./hu":2138,"./hu.js":2138,"./hy-am":1423,"./hy-am.js":1423,"./id":9218,"./id.js":9218,"./is":135,"./is.js":135,"./it":626,"./it-ch":150,"./it-ch.js":150,"./it.js":626,"./ja":9183,"./ja.js":9183,"./jv":4286,"./jv.js":4286,"./ka":2105,"./ka.js":2105,"./kk":7772,"./kk.js":7772,"./km":8758,"./km.js":8758,"./kn":9282,"./kn.js":9282,"./ko":3730,"./ko.js":3730,"./ku":1408,"./ku.js":1408,"./ky":3291,"./ky.js":3291,"./lb":6841,"./lb.js":6841,"./lo":5466,"./lo.js":5466,"./lt":7010,"./lt.js":7010,"./lv":7595,"./lv.js":7595,"./me":9861,"./me.js":9861,"./mi":5493,"./mi.js":5493,"./mk":5966,"./mk.js":5966,"./ml":7341,"./ml.js":7341,"./mn":5115,"./mn.js":5115,"./mr":370,"./mr.js":370,"./ms":9847,"./ms-my":1237,"./ms-my.js":1237,"./ms.js":9847,"./mt":2126,"./mt.js":2126,"./my":6165,"./my.js":6165,"./nb":4924,"./nb.js":4924,"./ne":6744,"./ne.js":6744,"./nl":3901,"./nl-be":9814,"./nl-be.js":9814,"./nl.js":3901,"./nn":3877,"./nn.js":3877,"./oc-lnc":2135,"./oc-lnc.js":2135,"./pa-in":5858,"./pa-in.js":5858,"./pl":4495,"./pl.js":4495,"./pt":9520,"./pt-br":7971,"./pt-br.js":7971,"./pt.js":9520,"./ro":6459,"./ro.js":6459,"./ru":238,"./ru.js":238,"./sd":950,"./sd.js":950,"./se":490,"./se.js":490,"./si":124,"./si.js":124,"./sk":4249,"./sk.js":4249,"./sl":4985,"./sl.js":4985,"./sq":1104,"./sq.js":1104,"./sr":9131,"./sr-cyrl":9915,"./sr-cyrl.js":9915,"./sr.js":9131,"./ss":5893,"./ss.js":5893,"./sv":8760,"./sv.js":8760,"./sw":1172,"./sw.js":1172,"./ta":7333,"./ta.js":7333,"./te":3110,"./te.js":3110,"./tet":2095,"./tet.js":2095,"./tg":7321,"./tg.js":7321,"./th":9041,"./th.js":9041,"./tk":9005,"./tk.js":9005,"./tl-ph":5768,"./tl-ph.js":5768,"./tlh":9444,"./tlh.js":9444,"./tr":2397,"./tr.js":2397,"./tzl":8254,"./tzl.js":8254,"./tzm":1106,"./tzm-latn":699,"./tzm-latn.js":699,"./tzm.js":1106,"./ug-cn":9288,"./ug-cn.js":9288,"./uk":7691,"./uk.js":7691,"./ur":3795,"./ur.js":3795,"./uz":6791,"./uz-latn":588,"./uz-latn.js":588,"./uz.js":6791,"./vi":5666,"./vi.js":5666,"./x-pseudo":4378,"./x-pseudo.js":4378,"./yo":5805,"./yo.js":5805,"./zh-cn":3839,"./zh-cn.js":3839,"./zh-hk":5726,"./zh-hk.js":5726,"./zh-mo":9807,"./zh-mo.js":9807,"./zh-tw":4152,"./zh-tw.js":4152};function s(e){var t=r(e);return n(t)}function r(e){if(!n.o(i,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return i[e]}s.keys=function(){return Object.keys(i)},s.resolve=r,e.exports=s,s.id=6700},6598:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(381),s=n.n(i);const r={name:"ns-datepicker",props:["label","date"],data:function(){return{visible:!1,currentDay:null,daysOfWeek:new Array(7).fill("").map((function(e,t){return t})),calendar:[[]]}},mounted:function(){document.addEventListener("click",this.checkClickedItem),this.currentDay=[void 0,null].includes(this.date)?s()():s()(this.date),this.build()},methods:{__:n(7389).__,checkClickedItem:function(e){!this.$el.contains(e.srcElement)&&this.visible&&(this.visible=!1)},selectDate:function(e){this.currentDay=e,this.visible=!1,this.$emit("change",e)},subMonth:function(){this.currentDay.subtract(1,"month"),this.build()},addMonth:function(){this.currentDay.add(1,"month"),this.build()},resetCalendar:function(){this.calendar=[[]]},build:function(){this.resetCalendar();this.currentDay.clone().startOf("month");for(var e=this.currentDay.clone().startOf("month"),t=this.currentDay.clone().endOf("month");;){0===e.day()&&this.calendar[0].length>0&&this.calendar.push([]);var n=this.calendar.length-1;if(this.calendar[n].push({date:e.clone(),dayOfWeek:e.day(),isToday:e.isSame(s().now(),"day")}),e.isSame(t,"day"))break;e.add(1,"day")}}}};const a=(0,n(1900).Z)(r,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"picker"},[n("div",{staticClass:"rounded cursor-pointer bg-white shadow px-1 py-1 flex items-center text-gray-700",on:{click:function(t){e.visible=!e.visible}}},[n("i",{staticClass:"las la-clock text-2xl"}),e._v(" "),n("span",{staticClass:"mx-1 text-sm"},[n("span",[e._v(e._s(e.label||e.__("Date"))+" : ")]),e._v(" "),e.currentDay?n("span",[e._v(e._s(e.currentDay.format("YYYY/MM/DD")))]):e._e(),e._v(" "),null===e.currentDay?n("span",[e._v(e._s(e.__("N/A")))]):e._e()])]),e._v(" "),e.visible?n("div",{staticClass:"relative h-0 w-0 -mb-2"},[n("div",{staticClass:"w-72 mt-2 shadow rounded bg-white anim-duration-300 zoom-in-entrance flex flex-col"},[n("div",{staticClass:"flex-auto"},[n("div",{staticClass:"p-2 flex items-center"},[n("div",[n("button",{staticClass:"w-8 h-8 bg-gray-400 rounded",on:{click:function(t){return e.subMonth()}}},[n("i",{staticClass:"las la-angle-left"})])]),e._v(" "),n("div",{staticClass:"flex flex-auto font-semibold text-gray-700 justify-center"},[e._v(e._s(e.currentDay.format("MMM"))+" "+e._s(e.currentDay.format("YYYY")))]),e._v(" "),n("div",[n("button",{staticClass:"w-8 h-8 bg-gray-400 rounded",on:{click:function(t){return e.addMonth()}}},[n("i",{staticClass:"las la-angle-right"})])])]),e._v(" "),n("div",{staticClass:"grid grid-flow-row grid-cols-7 grid-rows-1 gap-0 text-gray-700"},[n("div",{staticClass:"border border-gray-200 h-8 flex justify-center items-center text-sm"},[e._v(e._s(e.__("Sun")))]),e._v(" "),n("div",{staticClass:"border border-gray-200 h-8 flex justify-center items-center text-sm"},[e._v(e._s(e.__("Mon")))]),e._v(" "),n("div",{staticClass:"border border-gray-200 h-8 flex justify-center items-center text-sm"},[e._v(e._s(e.__("Tue")))]),e._v(" "),n("div",{staticClass:"border border-gray-200 h-8 flex justify-center items-center text-sm"},[e._v(e._s(e.__("Wed")))]),e._v(" "),n("div",{staticClass:"border border-gray-200 h-8 flex justify-center items-center text-sm"},[e._v(e._s(e.__("Thr")))]),e._v(" "),n("div",{staticClass:"border border-gray-200 h-8 flex justify-center items-center text-sm"},[e._v(e._s(e.__("Fri")))]),e._v(" "),n("div",{staticClass:"border border-gray-200 h-8 flex justify-center items-center text-sm"},[e._v(e._s(e.__("Sat")))])]),e._v(" "),e._l(e.calendar,(function(t,i){return n("div",{key:i,staticClass:"grid grid-flow-row grid-cols-7 grid-rows-1 gap-0 text-gray-700"},e._l(e.daysOfWeek,(function(i,s){return n("div",{key:s,staticClass:"h-8 flex justify-center items-center text-sm"},[e._l(t,(function(t,s){return[t.dayOfWeek===i?n("div",{key:s,staticClass:"h-full w-full flex items-center justify-center cursor-pointer",class:t.date.format("DD")===e.currentDay.format("DD")?"bg-blue-400 text-white border border-blue-500":"hover:bg-gray-100 border border-gray-200",on:{click:function(n){return e.selectDate(t.date)}}},[e._v("\n "+e._s(t.date.format("DD"))+"\n ")]):e._e()]}))],2)})),0)}))],2),e._v(" "),n("div")])]):e._e()])}),[],!1,null,null,null).exports},3968:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});function i(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n100?100:this.backValue))),"0"===this.backValue&&(this.backValue=""),this.$emit("changed",this.floating&&this.backValue.length>0?parseFloat(this.backValue/this.number):this.backValue)):this.$emit("next",this.floating&&this.backValue.length>0?parseFloat(this.backValue/this.number):this.backValue)}}};const a=(0,n(1900).Z)(r,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"grid grid-flow-row grid-cols-3 gap-2 grid-rows-3",staticStyle:{padding:"1px"},attrs:{id:"numpad"}},[e._l(e.keys,(function(t,i){return n("div",{key:i,staticClass:"hover:bg-gray-400 hover:text-gray-800 bg-gray-300 text-2xl text-gray-700 border h-16 flex items-center justify-center cursor-pointer",staticStyle:{margin:"-1px"},on:{click:function(n){return e.inputValue(t)}}},[void 0!==t.value?n("span",[e._v(e._s(t.value))]):e._e(),e._v(" "),t.icon?n("i",{staticClass:"las",class:t.icon}):e._e()])})),e._v(" "),e._t("numpad-footer")],2)}),[],!1,null,null,null).exports},9576:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var i=n(162),s=n(8603),r=n(7389);const a={name:"ns-media",props:["popup"],components:{VueUpload:n(2948)},data:function(){return{pages:[{label:(0,r.__)("Upload"),name:"upload",selected:!1},{label:(0,r.__)("Gallery"),name:"gallery",selected:!0}],resources:[],response:{data:[],current_page:0,from:0,to:0,next_page_url:"",prev_page_url:"",path:"",per_page:0,total:0,last_page:0,first_page:0},queryPage:1,bulkSelect:!1,files:[]}},mounted:function(){this.popupCloser();var e=this.pages.filter((function(e){return"gallery"===e.name}))[0];this.select(e)},watch:{files:function(){this.files.filter((function(e){return"0.00"===e.progress})).length>0&&(this.$refs.upload.active=!0)}},computed:{postMedia:function(){return i.kq.applyFilters("http-client-url","/api/nexopos/v4/medias")},currentPage:function(){return this.pages.filter((function(e){return e.selected}))[0]},hasOneSelected:function(){return this.response.data.filter((function(e){return e.selected})).length>0},selectedResource:function(){return this.response.data.filter((function(e){return e.selected}))[0]},csrf:function(){return ns.authentication.csrf},isPopup:function(){return void 0!==this.$popup},user_id:function(){return this.isPopup&&this.$popupParams.user_id||0}},methods:{popupCloser:s.Z,__:r.__,cancelBulkSelect:function(){this.bulkSelect=!1,this.response.data.forEach((function(e){return e.selected=!1}))},deleteSelected:function(){var e=this;if(confirm("Delete selected resources ?"))return i.ih.post("/api/nexopos/v4/medias/bulk-delete",{ids:this.response.data.filter((function(e){return e.selected})).map((function(e){return e.id}))}).subscribe((function(t){i.kX.success(t.message).subscribe(),e.loadGallery()}),(function(e){i.kX.error(e.message).subscribe()}))},select:function(e){this.pages.forEach((function(e){return e.selected=!1})),e.selected=!0,"gallery"===e.name&&this.loadGallery()},loadGallery:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;t=null===t?this.queryPage:t,this.queryPage=t,i.ih.get("/api/nexopos/v4/medias?page=".concat(t,"&user_id=").concat(this.user_id)).subscribe((function(t){t.data.forEach((function(e){return e.selected=!1})),e.response=t}))},useSelectedEntries:function(){this.$popupParams.resolve({event:"use-selected",value:this.response.data.filter((function(e){return e.selected}))}),this.$popup.close()},selectResource:function(e){var t=this;this.bulkSelect||this.response.data.forEach((function(n,i){i!==t.response.data.indexOf(e)&&(n.selected=!1)})),e.selected=!e.selected}}};const l=(0,n(1900).Z)(a,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"flex bg-white shadow-xl overflow-hidden",class:e.isPopup?"w-6/7-screen h-6/7-screen":"w-full h-full"},[n("div",{staticClass:"sidebar w-48 bg-gray-200 h-full flex-shrink-0"},[n("h3",{staticClass:"text-xl font-bold text-gray-800 my-4 text-center"},[e._v(e._s(e.__("Medias Manager")))]),e._v(" "),n("ul",e._l(e.pages,(function(t,i){return n("li",{key:i,staticClass:"hover:bg-white py-2 px-3 text-gray-700 border-l-8 cursor-pointer",class:t.selected?"bg-white border-blue-400":"border-transparent",on:{click:function(n){return e.select(t)}}},[e._v(e._s(t.label))])})),0)]),e._v(" "),"upload"===e.currentPage.name?n("div",{staticClass:"content w-full overflow-hidden flex"},[n("vue-upload",{ref:"upload",staticClass:" flex-auto flex bg-white shadow",attrs:{drop:!0,multiple:!0,headers:{"X-Requested-With":"XMLHttpRequest","X-CSRF-TOKEN":e.csrf},accept:"image/*","post-action":e.postMedia},model:{value:e.files,callback:function(t){e.files=t},expression:"files"}},[n("div",{staticClass:"border-dashed border-2 flex flex-auto m-2 p-2 flex-col border-blue-400 items-center justify-center"},[n("h3",{staticClass:"text-3xl font-bold text-gray-600 mb-4"},[e._v(e._s(e.__("Click Here Or Drop Your File To Upload")))]),e._v(" "),n("div",{staticClass:"rounded w-full md:w-2/3 text-gray-700 bg-gray-500 h-56 overflow-y-auto p-2"},[n("ul",e._l(e.files,(function(t,i){return n("li",{key:i,staticClass:"p-2 mb-2 shadow bg-white flex items-center justify-between rounded"},[n("span",[e._v(e._s(t.name))]),e._v(" "),n("span",{staticClass:"rounded bg-blue-400 flex items-center justify-center text-xs p-2"},[e._v(e._s(t.progress)+"%")])])})),0)])])])],1):e._e(),e._v(" "),"gallery"===e.currentPage.name?n("div",{staticClass:"content flex-col w-full overflow-hidden flex"},[e.popup?n("div",{staticClass:"p-2 flex flex-shrink-0 justify-between bg-gray-200"},[n("div"),e._v(" "),n("div",[n("ns-close-button",{on:{click:function(t){return e.popup.close()}}})],1)]):e._e(),e._v(" "),n("div",{staticClass:"flex flex-auto overflow-hidden"},[n("div",{staticClass:"bg-white shadow content flex flex-auto flex-col overflow-y-auto",attrs:{id:"grid"}},[n("div",{staticClass:"flex flex-auto"},[n("div",{staticClass:"p-2 overflow-x-auto"},[n("div",{staticClass:"grid grid-cols-2 md:grid-cols-4 lg:grid-cols-4 xl:grid-cols-6"},e._l(e.response.data,(function(t,i){return n("div",{key:i},[n("div",{staticClass:"p-2"},[n("div",{staticClass:"rounded-lg w-32 h-32 bg-gray-500 m-2 overflow-hidden flex items-center justify-center",class:t.selected?"ring-4 ring-blue-500 ring-opacity-50":"",on:{click:function(n){return e.selectResource(t)}}},[n("img",{staticClass:"object-cover h-full",attrs:{src:t.sizes.thumb,alt:t.name}})])])])})),0)]),e._v(" "),0===e.response.data.length?n("div",{staticClass:"flex flex-auto items-center justify-center"},[n("h3",{staticClass:"text-2xl text-gray-600 font-bold"},[e._v(e._s(e.__("Nothing has already been uploaded")))])]):e._e()])]),e._v(" "),!e.bulkSelect&&e.hasOneSelected?n("div",{staticClass:"w-64 flex-shrink-0 bg-gray-200",attrs:{id:"preview"}},[n("div",{staticClass:"h-64 bg-gray-600 flex items-center justify-center"},[n("img",{attrs:{src:e.selectedResource.sizes.thumb,alt:e.selectedResource.name}})]),e._v(" "),n("div",{staticClass:"p-4 text-gray-700 text-sm",attrs:{id:"details"}},[n("p",{staticClass:"flex flex-col mb-2"},[n("strong",{staticClass:"font-bold block"},[e._v(e._s(e.__("File Name"))+": ")]),n("span",[e._v(e._s(e.selectedResource.name))])]),e._v(" "),n("p",{staticClass:"flex flex-col mb-2"},[n("strong",{staticClass:"font-bold block"},[e._v(e._s(e.__("Uploaded At"))+":")]),n("span",[e._v(e._s(e.selectedResource.created_at))])]),e._v(" "),n("p",{staticClass:"flex flex-col mb-2"},[n("strong",{staticClass:"font-bold block"},[e._v(e._s(e.__("By"))+" :")]),n("span",[e._v(e._s(e.selectedResource.user.username))])])])]):e._e()]),e._v(" "),n("div",{staticClass:"p-2 flex flex-shrink-0 justify-between bg-gray-200"},[n("div",{staticClass:"flex -mx-2 flex-shrink-0"},[n("div",{staticClass:"px-2 flex-shrink-0 flex"},[n("div",{staticClass:"rounded shadow overflow-hidden border-blue-400 flex text-sm text-gray-700"},[e.bulkSelect?n("button",{staticClass:"bg-white hover:bg-blue-400 hover:text-white py-2 px-3",on:{click:function(t){return e.cancelBulkSelect()}}},[n("i",{staticClass:"las la-times"})]):e._e(),e._v(" "),e.hasOneSelected&&!e.bulkSelect?n("button",{staticClass:"bg-white hover:bg-blue-400 hover:text-white py-2 px-3",on:{click:function(t){e.bulkSelect=!0}}},[n("i",{staticClass:"las la-check-circle"})]):e._e(),e._v(" "),e.hasOneSelected?n("button",{staticClass:"bg-red-400 text-white hover:bg-red-500 hover:text-white py-2 px-3",on:{click:function(t){return e.deleteSelected()}}},[n("i",{staticClass:"las la-trash"})]):e._e()])])]),e._v(" "),n("div",{staticClass:"flex-shrink-0 -mx-2 flex"},[n("div",{staticClass:"px-2"},[n("div",{staticClass:"rounded shadow overflow-hidden border-blue-400 flex text-sm text-gray-700"},[n("button",{staticClass:"p-2",class:1===e.response.current_page?"bg-gray-100 text-gray-600 cursor-not-allowed":"bg-white hover:bg-blue-400 hover:text-white",attrs:{disabled:1===e.response.current_page},on:{click:function(t){return e.loadGallery(e.response.current_page-1)}}},[e._v(e._s(e.__("Previous")))]),e._v(" "),n("hr",{staticClass:"border-r border-gray-700"}),e._v(" "),n("button",{staticClass:"p-2",class:e.response.current_page===e.response.last_page?"bg-gray-100 text-gray-600 cursor-not-allowed":"bg-white hover:bg-blue-400 hover:text-white",attrs:{disabled:e.response.current_page===e.response.last_page},on:{click:function(t){return e.loadGallery(e.response.current_page+1)}}},[e._v(e._s(e.__("Next")))])])]),e._v(" "),e.popup&&e.hasOneSelected?n("div",{staticClass:"px-2"},[n("button",{staticClass:"rounded shadow p-2 bg-blue-400 text-white text-sm",on:{click:function(t){return e.useSelectedEntries()}}},[e._v(e._s(e.__("Use Selected")))])]):e._e()])])]):e._e()])}),[],!1,null,null,null).exports},5718:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(7266),s=n(5767);const r={data:function(){return{form:new i.Z,fields:[]}},methods:{validate:function(){var e=this;this.form.validateFields(this.fields)&&(this.form.disableFields(this.fields),this.checkDatabase(this.form.getValue(this.fields)).subscribe((function(t){e.form.enableFields(e.fields),s.c.push("/configuration"),nsSnackBar.success(t.message,"OKAY",{duration:5e3}).subscribe()}),(function(t){e.form.enableFields(e.fields),nsSnackBar.error(t.message,"OKAY").subscribe()})))},checkDatabase:function(e){return nsHttpClient.post("/api/nexopos/v4/setup/database",e)}},mounted:function(){this.fields=this.form.createFields([{label:"Hostname",description:"Provide the database hostname",name:"hostname",value:"localhost",validation:"required"},{label:"Username",description:"Username required to connect to the database.",name:"username",value:"root",validation:"required"},{label:"Password",description:"The username password required to connect.",name:"password",value:""},{label:"Database Name",description:"Provide the database name.",name:"database_name",value:"nexopos_v4",validation:"required"},{label:"Database Prefix",description:"Provide the database prefix.",name:"database_prefix",value:"ns_",validation:"required"}])}};const a=(0,n(1900).Z)(r,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"bg-white rounded shadow my-4"},[n("div",{staticClass:"welcome-box border-b border-gray-300 p-3 text-gray-700"},e._l(e.fields,(function(t,i){return n("ns-input",{key:i,attrs:{field:t},on:{change:function(n){return e.form.validateField(t)}}},[n("span",[e._v(e._s(t.label))]),e._v(" "),n("template",{slot:"description"},[e._v(e._s(t.description))])],2)})),1),e._v(" "),n("div",{staticClass:"bg-gray-200 p-3 flex justify-end"},[n("ns-button",{attrs:{type:"info"},on:{click:function(t){return e.validate()}}},[e._v("Save Database")])],1)])}),[],!1,null,null,null).exports},5825:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var i=n(7266),s=n(162),r=n(5767);const a={data:function(){return{form:new i.Z,fields:[],processing:!1,steps:[],failure:0,maxFailure:2}},methods:{validate:function(){},verifyDBConnectivity:function(){},saveConfiguration:function(e){var t=this;return this.form.disableFields(this.fields),this.processing=!0,s.ih.post("/api/nexopos/v4/setup/configuration",this.form.getValue(this.fields)).subscribe((function(e){document.location="/sign-in"}),(function(e){t.processing=!1,t.form.enableFields(t.fields),t.form.triggerFieldsErrors(t.fields,e.data),s.kX.error(e.message,"OK").subscribe()}))},checkDatabase:function(){var e=this;s.ih.get("/api/nexopos/v4/setup/database").subscribe((function(t){e.fields=e.form.createFields([{label:"Application",description:"That is the application name.",name:"ns_store_name",validation:"required"},{label:"Username",description:"Provide the administrator username.",name:"admin_username",validation:"required"},{label:"Email",description:"Provide the administrator email.",name:"admin_email",validation:"required"},{label:"Password",type:"password",description:"What should be the password required for authentication.",name:"password",validation:"required"},{label:"Confirm Password",type:"password",description:"Should be the same as the password above.",name:"confirm_password",validation:"required"}])}),(function(e){console.log(e),r.c.push("/database"),s.kX.error("You need to define database settings","OKAY",{duration:3e3}).subscribe()}))}},mounted:function(){this.checkDatabase()}};const l=(0,n(1900).Z)(a,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[0===e.fields.length?n("ns-spinner",{attrs:{size:"12",border:"4",animation:"fast"}}):e._e(),e._v(" "),e.fields.length>0?n("div",{staticClass:"bg-white rounded shadow my-2"},[n("div",{staticClass:"welcome-box border-b border-gray-300 p-3 text-gray-700"},e._l(e.fields,(function(e,t){return n("ns-field",{key:t,attrs:{field:e}})})),1),e._v(" "),n("div",{staticClass:"bg-gray-200 p-3 flex justify-between items-center"},[n("div",[e.processing?n("ns-spinner",{attrs:{size:"8",border:"4"}}):e._e()],1),e._v(" "),n("ns-button",{attrs:{disabled:e.processing,type:"info"},on:{click:function(t){return e.saveConfiguration()}}},[e._v("Create Installation")])],1)]):e._e()],1)}),[],!1,null,null,null).exports},4741:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});const i={components:{nsLink:n(4364).nsLink}};const s=(0,n(1900).Z)(i,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"bg-white rounded shadow my-2 overflow-hidden"},[e._m(0),e._v(" "),n("div",{staticClass:"bg-gray-200 p-3 flex justify-end"},[n("ns-link",{attrs:{to:"/database",type:"info"}},[n("i",{staticClass:"las la-database"}),e._v(" Database Configuration")])],1)])}),[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"welcome-box border-b border-gray-300 p-3 text-gray-700"},[n("p",{staticClass:"text-gray-600 text-sm"},[e._v("Thank you for having choosed NexoPOS 4 for managing your store. This is the installation wizard that will guide you through the installation.")]),e._v(" "),n("div",{staticClass:"py-2"},[n("h2",{staticClass:"text-xl font-body text-gray-700"},[e._v("Remaining Steps")]),e._v(" "),n("ul",{staticClass:"text-gray-600 text-sm"},[n("li",[n("i",{staticClass:"las la-arrow-right"}),e._v(" Database Configuration")]),e._v(" "),n("li",[n("i",{staticClass:"las la-arrow-right"}),e._v(" Application Configuration")])])])])}],!1,null,null,null).exports},419:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});const i={data:function(){return{title:"",message:""}},computed:{size:function(){return this.$popupParams.size||"h-full w-full"}},mounted:function(){var e=this;this.title=this.$popupParams.title,this.message=this.$popupParams.message,this.$popup.event.subscribe((function(t){"click-overlay"===t.event&&(e.$popupParams.onAction(!1),e.$popup.close())}))},methods:{__:n(7389).__,emitAction:function(e){this.$popupParams.onAction(e),this.$popup.close()}}};const s=(0,n(1900).Z)(i,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"flex flex-col bg-white shadow-lg w-5/7-screen md:w-4/7-screen lg:w-2/7-screen",class:e.size,attrs:{id:"popup"}},[n("div",{staticClass:"flex items-center justify-center flex-col flex-auto p-4"},[n("h2",{staticClass:"text-xl md:text-3xl font-body text-gray-700 text-center"},[e._v(e._s(e.title))]),e._v(" "),n("p",{staticClass:"py-4 text-sm md:text-base text-gray-600 text-center"},[e._v(e._s(e.message))])]),e._v(" "),n("div",{staticClass:"flex border-t border-gray-200 text-gray-700"},[n("button",{staticClass:"hover:bg-gray-100 flex-auto w-1/2 h-16 flex items-center justify-center uppercase",on:{click:function(t){return e.emitAction(!0)}}},[e._v(e._s(e.__("Yes")))]),e._v(" "),n("hr",{staticClass:"border-r border-gray-200"}),e._v(" "),n("button",{staticClass:"hover:bg-gray-100 flex-auto w-1/2 h-16 flex items-center justify-center uppercase",on:{click:function(t){return e.emitAction(!1)}}},[e._v(e._s(e.__("No")))])])])}),[],!1,null,null,null).exports}},e=>{e.O(0,[898],(()=>{return t=5767,e(e.s=t);var t}));e.O()}]); +(self.webpackChunkNexoPOS_4x=self.webpackChunkNexoPOS_4x||[]).push([[312],{162:(e,t,n)=>{"use strict";n.d(t,{l:()=>V,kq:()=>R,ih:()=>L,kX:()=>I});var i=n(6486),s=n(9669),r=n(2181),a=n(8345),l=n(9624),o=n(9248),d=n(230);function c(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{};return this._request("post",e,t,n)}},{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._request("get",e,void 0,t)}},{key:"delete",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._request("delete",e,void 0,t)}},{key:"put",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this._request("put",e,t,n)}},{key:"response",get:function(){return this._lastRequestData}},{key:"_request",value:function(e,t){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return t=R.applyFilters("http-client-url",t.replace(/\/$/,"")),this._subject.next({identifier:"async.start",url:t,data:i}),new d.y((function(r){n._client[e](t,i,Object.assign(Object.assign({},n._client.defaults[e]),s)).then((function(e){n._lastRequestData=e,r.next(e.data),r.complete(),n._subject.next({identifier:"async.stop"})})).catch((function(e){var t;r.error((null===(t=e.response)||void 0===t?void 0:t.data)||e.response||e),n._subject.next({identifier:"async.stop"})}))}))}},{key:"subject",value:function(){return this._subject}},{key:"emit",value:function(e){var t=e.identifier,n=e.value;this._subject.next({identifier:t,value:n})}}])&&c(t.prototype,n),i&&c(t,i),e}(),f=n(3);function h(e,t){for(var n=0;n=1e3){for(var n,i=Math.floor((""+e).length/3),s=2;s>=1;s--){if(((n=parseFloat((0!=i?e/Math.pow(1e3,i):e).toPrecision(s)))+"").replace(/[^a-zA-Z 0-9]+/g,"").length<=2)break}n%1!=0&&(n=n.toFixed(1)),t=n+["","k","m","b","t"][i]}return t})),S=n(1356),E=n(9698);function D(e,t){for(var n=0;n0&&window.outerWidth<=480:this.breakpoint="xs";break;case window.outerWidth>480&&window.outerWidth<=640:this.breakpoint="sm";break;case window.outerWidth>640&&window.outerWidth<=1024:this.breakpoint="md";break;case window.outerWidth>1024&&window.outerWidth<=1280:this.breakpoint="lg";break;case window.outerWidth>1280:this.breakpoint="xl"}}}])&&z(t.prototype,n),i&&z(t,i),e}()),H=new b({sidebar:["xs","sm","md"].includes(W.breakpoint)?"hidden":"visible"});L.defineClient(s),window.nsEvent=V,window.nsHttpClient=L,window.nsSnackBar=I,window.nsCurrency=S.W,window.nsTruncate=E.b,window.nsRawCurrency=S.f,window.nsAbbreviate=$,window.nsState=H,window.nsUrl=Z,window.nsScreen=W,window.ChartJS=r,window.EventEmitter=p,window.Popup=w.G,window.RxJS=y,window.FormValidation=k.Z,window.nsCrudHandler=N},4364:(e,t,n)=>{"use strict";n.r(t),n.d(t,{nsAvatar:()=>N,nsButton:()=>l,nsCheckbox:()=>h,nsCkeditor:()=>A,nsCloseButton:()=>E,nsCrud:()=>v,nsCrudForm:()=>x,nsDate:()=>C,nsDateTimePicker:()=>M.V,nsDatepicker:()=>R,nsField:()=>_,nsIconButton:()=>D,nsInput:()=>d,nsLink:()=>o,nsMediaInput:()=>S,nsMenu:()=>r,nsMultiselect:()=>k,nsNumpad:()=>V.Z,nsSelect:()=>c.R,nsSelectAudio:()=>f,nsSpinner:()=>g,nsSubmenu:()=>a,nsSwitch:()=>j,nsTableRow:()=>b,nsTabs:()=>q,nsTabsItem:()=>z,nsTextarea:()=>w});var i=n(538),s=n(162),r=i.default.component("ns-menu",{data:function(){return{defaultToggledState:!1,_save:0}},props:["href","label","icon","notification","toggled","identifier"],template:'\n \n ',mounted:function(){var e=this;this.defaultToggledState=void 0!==this.toggled?this.toggled:this.defaultToggledState,s.l.subject().subscribe((function(t){t.value!==e.identifier&&(e.defaultToggledState=!1)}))},methods:{toggleEmit:function(){var e=this;this.toggle().then((function(t){t&&s.l.emit({identifier:"side-menu.open",value:e.identifier})}))},toggle:function(){var e=this;return new Promise((function(t,n){0===e.href.length&&(e.defaultToggledState=!e.defaultToggledState,t(e.defaultToggledState))}))}}}),a=i.default.component("ns-submenu",{data:function(){return{}},props:["href","label","active"],mounted:function(){},template:'\n
    \n
  • \n \n \n \n
  • \n
    \n '}),l=i.default.component("ns-button",{data:function(){return{clicked:!1,_save:0}},props:["type","disabled","link","href","routerLink","to"],template:'\n
    \n \n \n \n
    \n ',mounted:function(){},computed:{isDisabled:function(){return this.disabled&&(0===this.disabled.length||"disabled"===this.disabled||this.disabled)},buttonclass:function(){var e;switch(this.type){case"info":e="".concat(this.isDisabled?"bg-gray-400 border border-gray-500 cursor-not-allowed text-gray-600":"shadow bg-blue-400 text-white");break;case"success":e="".concat(this.isDisabled?"bg-gray-400 border border-gray-500 cursor-not-allowed text-gray-600":"shadow bg-green-400 text-white");break;case"danger":e="".concat(this.isDisabled?"bg-gray-400 border border-gray-500 cursor-not-allowed text-gray-600":"shadow bg-red-400 text-white");break;case"warning":e="".concat(this.isDisabled?"bg-gray-400 border border-gray-500 cursor-not-allowed text-gray-600":"shadow bg-orange-400 text-white");break;default:e="".concat(this.isDisabled?"bg-gray-400 border border-gray-500 cursor-not-allowed text-gray-600":"shadow bg-white text-gray-800")}return e}}}),o=i.default.component("ns-link",{data:function(){return{clicked:!1,_save:0}},props:["type","to","href"],template:'\n
    \n \n \n
    \n ',computed:{buttonclass:function(){switch(this.type){case"info":return"shadow bg-blue-400 text-white";case"success":return"shadow bg-green-400 text-white";case"danger":return"shadow bg-red-400 text-white";case"warning":return"shadow bg-orange-400 text-white";default:return"shadow bg-white text-gray-800"}}}}),d=i.default.component("ns-input",{data:function(){return{}},mounted:function(){},computed:{hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},disabledClass:function(){return this.field.disabled?"bg-gray-200 cursor-not-allowed":"bg-transparent"},inputClass:function(){return this.disabledClass+" "+this.leadClass},leadClass:function(){return this.leading?"pl-8":"px-4"}},props:["placeholder","leading","type","field"],template:'\n
    \n \n
    \n
    \n \n {{ leading }}\n \n
    \n \n
    \n

    \n

    \n This field is required.\n This field must contain a valid email address.\n {{ error.message }}\n

    \n
    \n '}),c=n(4451),u=n(7389),f=i.default.component("ns-select-audio",{data:function(){return{}},props:["name","placeholder","field"],computed:{hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},disabledClass:function(){return this.field.disabled?"bg-gray-200 cursor-not-allowed":"bg-transparent"},inputClass:function(){return this.disabledClass+" "+this.leadClass},leadClass:function(){return this.leading?"pl-8":"px-4"}},methods:{__:u.__,playSelectedSound:function(){this.field.value.length>0&&new Audio(this.field.value).play()}},template:'\n
    \n \n
    \n
    \n \n
    \n \n
    \n

    \n

    \n {{ __( \'This field is required.\' ) }}\n {{ __( \'This field must contain a valid email address.\' ) }}\n {{ error.message }}\n

    \n
    \n '}),h=i.default.component("ns-checkbox",{data:function(){return{}},props:["checked","field","label"],template:'\n
    \n
    \n \n
    \n {{ label }}\n {{ field.label }}\n
    \n ',computed:{isChecked:function(){return this.field?this.field.value:this.checked}},methods:{toggleIt:function(){void 0!==this.field&&(this.field.value=!this.field.value),this.$emit("change",!this.checked)}}}),p=n(2242),m=n(419),v=i.default.component("ns-crud",{data:function(){return{isRefreshing:!1,sortColumn:"",searchInput:"",searchQuery:"",page:1,bulkAction:"",bulkActions:[],columns:[],selectedEntries:[],globallyChecked:!1,result:{current_page:null,data:[],first_page_url:null,from:null,last_page:null,last_page_url:null,next_page_url:null,path:null,per_page:null,prev_page_url:null,to:null,total:null}}},mounted:function(){void 0!==this.identifier&&nsCrudHandler.defineInstance(this.identifier,this),this.loadConfig()},props:["src","create-url","mode","identifier","queryParams"],computed:{getParsedSrc:function(){return"".concat(this.src,"?").concat(this.sortColumn).concat(this.searchQuery).concat(this.queryPage).concat(this.getQueryParams()?"&"+this.getQueryParams():"")},getSelectedAction:function(){var e=this,t=this.bulkActions.filter((function(t){return t.identifier===e.bulkAction}));return t.length>0&&t[0]},pagination:function(){return this.result?this.pageNumbers(this.result.last_page,this.result.current_page):[]},queryPage:function(){return this.result?"&page=".concat(this.page):""},resultInfo:function(){return(0,u.__)("displaying {perPage} on {items} items").replace("{perPage}",this.result.total).replace("{items}",this.result.total)}},methods:{__:u.__,getQueryParams:function(){var e=this;return this.queryParams?Object.keys(this.queryParams).map((function(t){return"".concat(t,"=").concat(e.queryParams[t])})).join("&"):""},pageNumbers:function(e,t){var n=[];return t>e-3?n.push(e-2,e-1,e):n.push(t,t+1,t+2,"...",e),n.filter((function(e){return e>0||"string"==typeof e}))},downloadContent:function(){s.ih.post("".concat(this.src,"/export?").concat(this.getQueryParams()),{entries:this.selectedEntries.map((function(e){return e.$id}))}).subscribe((function(e){setTimeout((function(){return document.location=e.url}),300),s.kX.success((0,u.__)("The document has been generated.")).subscribe()}),(function(e){s.kX.error(e.message||(0,u.__)("Unexpected error occured.")).subscribe()}))},clearSelectedEntries:function(){var e=this;p.G.show(m.Z,{title:(0,u.__)("Clear Selected Entries ?"),message:(0,u.__)("Would you like to clear all selected entries ?"),onAction:function(t){t&&(e.selectedEntries=[])}})},refreshRow:function(e){if(!0===e.$checked){0===this.selectedEntries.filter((function(t){return t.$id===e.$id})).length&&this.selectedEntries.push(e)}else{var t=this.selectedEntries.filter((function(t){return t.$id===e.$id}));if(t.length>0){var n=this.selectedEntries.indexOf(t[0]);this.selectedEntries.splice(n,1)}}},handleShowOptions:function(e){this.result.data.forEach((function(t){t.$id!==e.$id&&(t.$toggled=!1)}))},handleGlobalChange:function(e){var t=this;this.globallyChecked=e,this.result.data.forEach((function(n){n.$checked=e,t.refreshRow(n)}))},loadConfig:function(){var e=this;s.ih.get("".concat(this.src,"/config?").concat(this.getQueryParams())).subscribe((function(t){e.columns=t.columns,e.bulkActions=t.bulkActions,e.refresh()}),(function(e){s.kX.error(e.message,"OK",{duration:!1}).subscribe()}))},cancelSearch:function(){this.searchInput="",this.search()},search:function(){this.searchInput?this.searchQuery="&search=".concat(this.searchInput):this.searchQuery="",this.refresh()},sort:function(e){for(var t in this.columns)t!==e&&(this.columns[t].$sorted=!1,this.columns[t].$direction="");switch(this.columns[e].$sorted=!0,this.columns[e].$direction){case"asc":this.columns[e].$direction="desc";break;case"desc":this.columns[e].$direction="";break;case"":this.columns[e].$direction="asc"}["asc","desc"].includes(this.columns[e].$direction)?this.sortColumn="active=".concat(e,"&direction=").concat(this.columns[e].$direction):this.sortColumn="",this.$emit("sort",this.columns[e]),this.refresh()},bulkDo:function(){var e=this;return this.bulkAction?this.selectedEntries.length>0?confirm(this.getSelectedAction.confirm||this.$slots["error-bulk-confirmation"]||(0,u.__)("Would you like to perform the selected bulk action on the selected entries ?"))?s.ih.post("".concat(this.src,"/bulk-actions"),{action:this.bulkAction,entries:this.selectedEntries.map((function(e){return e.$id}))}).subscribe({next:function(t){s.kX.info(t.message).subscribe(),e.selectedEntries=[],e.refresh()},error:function(e){s.kX.error(e.message).subscribe()}}):void 0:s.kX.error(this.$slots["error-no-selection"]?this.$slots["error-no-selection"][0].text:(0,u.__)("No selection has been made.")).subscribe():s.kX.error(this.$slots["error-no-action"]?this.$slots["error-no-action"][0].text:(0,u.__)("No action has been selected.")).subscribe()},refresh:function(){var e=this;this.globallyChecked=!1,this.isRefreshing=!0,s.ih.get("".concat(this.getParsedSrc)).subscribe((function(t){t.data=t.data.map((function(t){return e.selectedEntries.filter((function(e){return e.$id===t.$id})).length>0&&(t.$checked=!0),t})),e.isRefreshing=!1,e.result=t,e.page=t.current_page}),(function(t){e.isRefreshing=!1,s.kX.error(t.message).subscribe()}))}},template:'\n
    \n
    \n \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \n \n
    \n {{ column.label }}\n \n \n \n \n
    \n
    {{ __( \'There is nothing to display...\' ) }}
    \n
    \n
    \n
    \n
    \n \n \n
    \n
    \n
    {{ resultInfo }}
    \n \n
    \n
    \n
    \n '}),b=i.default.component("ns-table-row",{props:["options","row","columns"],data:function(){return{optionsToggled:!1}},mounted:function(){},methods:{sanitizeHTML:function(e){var t=document.createElement("div");t.innerHTML=e;for(var n=t.getElementsByTagName("script"),i=n.length;i--;)n[i].parentNode.removeChild(n[i]);return t.innerHTML},getElementOffset:function(e){var t=e.getBoundingClientRect();return{top:t.top+window.pageYOffset,left:t.left+window.pageXOffset}},toggleMenu:function(e){var t=this;if(this.row.$toggled=!this.row.$toggled,this.$emit("toggled",this.row),this.row.$toggled)setTimeout((function(){var e=t.$el.querySelectorAll(".relative > .absolute")[0],n=t.$el.querySelectorAll(".relative")[0],i=t.getElementOffset(n);e.style.top=i.top+"px",e.style.left=i.left+"px",n.classList.remove("relative"),n.classList.add("dropdown-holder")}),100);else{var n=this.$el.querySelectorAll(".dropdown-holder")[0];n.classList.remove("dropdown-holder"),n.classList.add("relative")}},handleChanged:function(e){this.row.$checked=e,this.$emit("updated",this.row)},triggerAsync:function(e){var t=this;e.confirm?confirm(e.confirm.message)&&s.ih[e.type.toLowerCase()](e.url).subscribe((function(e){s.kX.success(e.message).subscribe(),t.$emit("reload",t.row)}),(function(e){t.toggleMenu(),s.kX.error(e.message).subscribe()})):(s.l.emit({identifier:"ns-table-row-action",value:{action:e,row:this.row,component:this}}),this.toggleMenu())}},template:'\n \n \n \n \n \n \n \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n \n \n '}),g=i.default.component("ns-spinner",{data:function(){return{}},mounted:function(){},computed:{validatedSize:function(){return this.size||24},validatedBorder:function(){return this.border||8},validatedAnimation:function(){return this.animation||"fast"}},props:["color","size","border"],template:"\n
    \n
    \n
    \n "}),y=n(7266),x=i.default.component("ns-crud-form",{data:function(){return{form:{},globallyChecked:!1,formValidation:new y.Z,rows:[]}},mounted:function(){this.loadForm()},props:["src","create-url","field-class","return-url","submit-url","submit-method","disable-tabs"],computed:{activeTabFields:function(){for(var e in this.form.tabs)if(this.form.tabs[e].active)return this.form.tabs[e].fields;return[]}},methods:{toggle:function(e){for(var t in this.form.tabs)this.form.tabs[t].active=!1;this.form.tabs[e].active=!0},handleShowOptions:function(e){this.rows.forEach((function(t){t.$id!==e.$id&&(t.$toggled=!1)}))},submit:function(){var e=this;return this.formValidation.validateForm(this.form).length>0?s.kX.error(this.$slots["error-invalid-form"]?this.$slots["error-invalid-form"][0].text:"No error message provided for having an invalid form.",this.$slots.okay?this.$slots.okay[0].text:"OK").subscribe():(this.formValidation.disableForm(this.form),void 0===this.submitUrl?s.kX.error(this.$slots["error-no-submit-url"]?this.$slots["error-no-submit-url"][0].text:"No error message provided for not having a valid submit url.",this.$slots.okay?this.$slots.okay[0].text:"OK").subscribe():void s.ih[this.submitMethod?this.submitMethod.toLowerCase():"post"](this.submitUrl,this.formValidation.extractForm(this.form)).subscribe((function(t){if("success"===t.status){if(e.returnUrl&&e.returnUrl.length>0)return document.location=e.returnUrl;e.$emit("save",t)}e.formValidation.enableForm(e.form)}),(function(t){s.kX.error(t.message,void 0,{duration:5e3}).subscribe(),e.formValidation.triggerError(e.form,t),e.formValidation.enableForm(e.form)})))},handleGlobalChange:function(e){this.globallyChecked=e,this.rows.forEach((function(t){return t.$checked=e}))},loadForm:function(){var e=this;s.ih.get("".concat(this.src)).subscribe({next:function(t){e.form=e.parseForm(t.form),s.kq.doAction("ns-crud-form-loaded",e),e.$emit("updated",e.form)},error:function(e){s.kX.error(e.message,"OKAY",{duration:0}).subscribe()}})},parseForm:function(e){e.main.value=void 0===e.main.value?"":e.main.value,e.main=this.formValidation.createFields([e.main])[0];var t=0;for(var n in e.tabs)0===t&&(e.tabs[n].active=!0),e.tabs[n].active=void 0!==e.tabs[n].active&&e.tabs[n].active,e.tabs[n].fields=this.formValidation.createFields(e.tabs[n].fields),t++;return e}},template:'\n
    \n
    \n \n
    \n
    \n
    \n
    \n \n
    \n Return\n
    \n
    \n \n
    \n
    \n
    \n
    {{ tab.label }}
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n '}),w=i.default.component("ns-textarea",{data:function(){return{}},mounted:function(){},computed:{hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},disabledClass:function(){return this.field.disabled?"bg-gray-200 cursor-not-allowed":"bg-transparent"},inputClass:function(){return this.disabledClass+" "+this.leadClass},leadClass:function(){return this.leading?"p-8":"p-2"}},props:["placeholder","leading","type","field"],template:'\n
    \n \n
    \n
    \n \n {{ leading }}\n \n
    \n \n
    \n

    \n

    \n This field is required.\n This field must contain a valid email address.\n {{ error.message }}\n

    \n
    \n '}),_=i.default.component("ns-field",{data:function(){return{}},mounted:function(){},computed:{isInputField:function(){return["text","password","email","number","tel"].includes(this.field.type)},isDateField:function(){return["date"].includes(this.field.type)},isSelectField:function(){return["select"].includes(this.field.type)},isTextarea:function(){return["textarea"].includes(this.field.type)},isCheckbox:function(){return["checkbox"].includes(this.field.type)},isMultiselect:function(){return["multiselect"].includes(this.field.type)},isSelectAudio:function(){return["select-audio"].includes(this.field.type)},isSwitch:function(){return["switch"].includes(this.field.type)},isMedia:function(){return["media"].includes(this.field.type)},isCkEditor:function(){return["ckeditor"].includes(this.field.type)},isDateTimePicker:function(){return["datetimepicker"].includes(this.field.type)},isCustom:function(){return["custom"].includes(this.field.type)}},props:["field"],methods:{addOption:function(e){"select"===this.field.type&&this.field.options.forEach((function(e){return e.selected=!1})),e.selected=!0;var t=this.field.options.indexOf(e);this.field.options.splice(t,1),this.field.options.unshift(e),this.refreshMultiselect(),this.$emit("change",{action:"addOption",option:e})},refreshMultiselect:function(){this.field.value=this.field.options.filter((function(e){return e.selected})).map((function(e){return e.value}))},removeOption:function(e){e.selected=!1,this.refreshMultiselect(),this.$emit("change",{action:"removeOption",option:e})}},template:'\n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n '}),k=i.default.component("ns-multiselect",{data:function(){return{showPanel:!1,search:""}},props:["field"],computed:{hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},_options:function(){var e=this;return this.field.options.map((function(t){return t.selected=void 0!==t.selected&&t.selected,e.field.value&&e.field.value.includes(t.value)&&(t.selected=!0),t}))}},methods:{__:u.__,addOption:function(e){this.field.disabled||(this.$emit("addOption",e),this.$forceUpdate(),setTimeout((function(){}),100))},removeOption:function(e,t){var n=this;if(!this.field.disabled)return t.preventDefault(),t.stopPropagation(),this.$emit("removeOption",e),this.$forceUpdate(),setTimeout((function(){n.search=""}),100),!1}},mounted:function(){var e=this;this.field.value&&this.field.value.reverse().forEach((function(t){var n=e.field.options.filter((function(e){return e.value===t}));n.length>=0&&e.addOption(n[0])}))},template:'\n
    \n \n
    \n
    \n
    \n
    \n
    \n {{ option.label }}\n \n
    \n
    \n
    \n
    \n \n \n
    \n
    \n \n
    \n
    \n

    \n

    \n {{ __( \'This field is required.\' ) }}\n {{ __( \'This field must contain a valid email address.\' ) }}\n {{ error.message }}\n

    \n
    \n
    \n '}),j=i.default.component("ns-switch",{data:function(){return{}},mounted:function(){},computed:{_options:function(){var e=this;return this.field.options.map((function(t){return t.selected=t.value===e.field.value,t}))},hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},disabledClass:function(){return this.field.disabled?"bg-gray-200 cursor-not-allowed":""},sizeClass:function(){return" w-1/".concat(this._options.length<=4?this._options.length:4)},inputClass:function(){return this.disabledClass+" "+this.leadClass},leadClass:function(){return this.leading?"pl-8":"px-4"}},methods:{__:u.__,setSelected:function(e){this.field.value=e.value,this._options.forEach((function(e){return e.selected=!1})),e.selected=!0,this.$forceUpdate(),this.$emit("change",e.value)}},props:["placeholder","leading","type","field"],template:'\n
    \n \n
    \n \n
    \n

    \n

    \n {{ __( \'This field is required.\' ) }}\n

    \n
    \n '}),C=i.default.component("ns-date",{data:function(){return{}},mounted:function(){},computed:{hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},disabledClass:function(){return this.field.disabled?"bg-gray-200 cursor-not-allowed":"bg-transparent"},inputClass:function(){return this.disabledClass+" "+this.leadClass},leadClass:function(){return this.leading?"pl-8":"px-4"}},props:["placeholder","leading","type","field"],template:'\n
    \n \n
    \n
    \n \n {{ leading }}\n \n
    \n \n
    \n

    \n

    \n {{ __( \'This field is required.\' ) }}\n {{ __( \'This field must contain a valid email address.\' ) }}\n {{ error.message }}\n

    \n
    \n '}),$=n(9576),S=i.default.component("ns-media-input",{template:'\n
    \n \n
    \n
    \n \n {{ leading }}\n \n
    \n
    \n
    \n \n
    \n \n \n
    \n
    \n

    \n

    \n {{ __( \'This field is required.\' ) }}\n {{ __( \'This field must contain a valid email address.\' ) }}\n {{ error.message }}\n

    \n
    \n ',computed:{hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},disabledClass:function(){return this.field.disabled?"bg-gray-200 cursor-not-allowed":"bg-transparent"},inputClass:function(){return this.disabledClass+" "+this.leadClass},leadClass:function(){return this.leading?"pl-8":"px-4"}},data:function(){return{}},props:["placeholder","leading","type","field"],mounted:function(){},methods:{toggleMedia:function(){var e=this;new Promise((function(t,n){p.G.show($.Z,Object.assign({resolve:t,reject:n},e.field.data||{}))})).then((function(t){"use-selected"===t.event&&(e.field.data&&"url"!==e.field.data.type?e.field.data&&"model"!==e.field.data.type||(e.field.value=t.value[0]):e.field.value=t.value[0].sizes.original,e.$forceUpdate())}))}}}),E=i.default.component("ns-close-button",{template:'\n \n ',methods:{clicked:function(e){this.$emit("click",e)}}}),D=i.default.component("ns-icon-button",{template:'\n \n ',props:["className","buttonClass"],methods:{clicked:function(e){this.$emit("click",e)}}}),O=n(1272),P=n.n(O),T=n(5234),F=n.n(T),A=i.default.component("ns-ckeditor",{data:function(){return{editor:F()}},components:{ckeditor:P().component},mounted:function(){},methods:{__:u.__},computed:{hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},disabledClass:function(){return this.field.disabled?"bg-gray-200 cursor-not-allowed":"bg-transparent"},inputClass:function(){return this.disabledClass+" "+this.leadClass},leadClass:function(){return this.leading?"p-8":"p-2"}},props:["placeholder","leading","type","field"],template:'\n
    \n \n
    \n
    \n \n {{ leading }}\n \n
    \n \n
    \n

    \n

    \n {{ __( \'This field is required.\' ) }}\n {{ __( \'This field must contain a valid email address.\' ) }}\n {{ error.message }}\n

    \n
    \n '}),q=i.default.component("ns-tabs",{data:function(){return{childrens:[]}},props:["active"],computed:{activeComponent:function(){var e=this.$children.filter((function(e){return e.active}));return e.length>0&&e[0]}},methods:{toggle:function(e){this.$emit("active",e.identifier),this.$emit("changeTab",e.identifier)}},mounted:function(){this.childrens=this.$children},template:'\n
    \n
    \n
    {{ tab.label }}
    \n
    \n \n
    \n '}),z=i.default.component("ns-tabs-item",{data:function(){return{}},mounted:function(){},props:["label","identifier","padding"],template:'\n
    \n \n
    \n '}),M=n(8655),V=n(3968),L=n(1726),I=n(7259);const Z=i.default.extend({methods:{__:u.__},data:function(){return{svg:""}},mounted:function(){this.svg=(0,L.createAvatar)(I,{seed:this.displayName})},computed:{avatarUrl:function(){return 0===this.url.length?"":this.url}},props:["url","display-name"]});const N=(0,n(1900).Z)(Z,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"flex justify-between items-center flex-shrink-0"},[n("span",{staticClass:"hidden md:inline-block text-gray-600 px-2"},[e._v(e._s(e.__("Howdy, {name}").replace("{name}",this.displayName)))]),e._v(" "),n("span",{staticClass:"md:hidden text-gray-600 px-2"},[e._v(e._s(e.displayName))]),e._v(" "),n("div",{staticClass:"px-2"},[n("div",{staticClass:"w-8 h-8 overflow-hidden rounded-full bg-gray-600"},[""!==e.avatarUrl?n("img",{staticClass:"w-8 h-8 overflow-hidden rounded-full",attrs:{src:e.avatarUrl,alt:e.displayName,srcset:""}}):e._e(),e._v(" "),""===e.avatarUrl?n("div",{domProps:{innerHTML:e._s(e.svg)}}):e._e()])])])}),[],!1,null,null,null).exports;var R=n(6598).Z},8655:(e,t,n)=>{"use strict";n.d(t,{V:()=>l});var i=n(538),s=n(381),r=n.n(s),a=n(7389),l=i.default.component("ns-date-time-picker",{template:'\n
    \n \n
    \n \n \n {{ currentDay.format( \'YYYY/MM/DD HH:mm\' ) }}\n N/A\n \n
    \n

    {{ field.description }}

    \n \n
    \n ',props:["field","date"],data:function(){return{visible:!1,hours:0,minutes:0,currentDay:null,daysOfWeek:new Array(7).fill("").map((function(e,t){return t})),calendar:[[]]}},watch:{visible:function(){var e=this;this.visible&&setTimeout((function(){e.$refs.hours.addEventListener("focus",(function(){this.select()})),e.$refs.minutes.addEventListener("focus",(function(){this.select()}))}),100)}},mounted:function(){var e=this;document.addEventListener("mousedown",(function(t){return e.checkClickedItem(t)})),this.field?this.currentDay=[void 0,null,""].includes(this.field.value)?r()():r()(this.field.value):this.currentDay=[void 0,null,""].includes(this.date)?r()():r()(this.date),this.hours=this.currentDay.format("HH"),this.minutes=this.currentDay.format("mm"),this.build()},methods:{__:a.__,detectHoursChange:function(){parseFloat(this.hours)<0&&(this.hours=0),parseFloat(this.hours)>23&&(this.hours=23),this.updateDateTime()},detectMinuteChange:function(){parseFloat(this.minutes)<0&&(this.minutes=0),parseFloat(this.minutes)>59&&(this.minutes=59),this.updateDateTime()},updateDateTime:function(){this.currentDay.hours(this.hours),this.currentDay.minutes(this.minutes),this.selectDate(this.currentDay)},checkClickedItem:function(e){!this.$el.contains(e.srcElement)&&this.visible&&(this.visible=!1)},selectDate:function(e){this.currentDay=e,this.currentDay.hours(this.hours),this.currentDay.minutes(this.minutes);var t=this.currentDay.format("YYYY/MM/DD HH:mm");this.field?(this.field.value=t,this.$emit("change",this.field)):this.$emit("change",this.currentDay)},subMonth:function(){this.currentDay.subtract(1,"month"),this.build()},addMonth:function(){this.currentDay.add(1,"month"),this.build()},resetCalendar:function(){this.calendar=[[]]},build:function(){this.resetCalendar();this.currentDay.clone().startOf("month");for(var e=this.currentDay.clone().startOf("month"),t=this.currentDay.clone().endOf("month");;){0===e.day()&&this.calendar[0].length>0&&this.calendar.push([]);var n=this.calendar.length-1;if(this.calendar[n].push({date:e.clone(),dayOfWeek:e.day(),isToday:e.isSame(r().now(),"day")}),e.isSame(t,"day"))break;e.add(1,"day")}}}})},4451:(e,t,n)=>{"use strict";n.d(t,{R:()=>s});var i=n(7389),s=n(538).default.component("ns-select",{data:function(){return{}},props:["name","placeholder","field"],computed:{hasError:function(){return void 0!==this.field.errors&&this.field.errors.length>0},disabledClass:function(){return this.field.disabled?"bg-gray-200 cursor-not-allowed":"bg-transparent"},inputClass:function(){return this.disabledClass+" "+this.leadClass},leadClass:function(){return this.leading?"pl-8":"px-4"}},methods:{__:i.__},template:'\n
    \n \n
    \n \n
    \n

    \n

    \n {{ __( \'This field is required.\' ) }}\n {{ __( \'This field must contain a valid email address.\' ) }}\n {{ error.message }}\n

    \n
    \n '})},1356:(e,t,n)=>{"use strict";n.d(t,{W:()=>d,f:()=>c});var i=n(538),s=n(2077),r=n.n(s),a=n(6740),l=n.n(a),o=new Array(parseInt(ns.currency.ns_currency_precision)).fill("").map((function(e){return 0})).join(""),d=i.default.filter("currency",(function(e){var t,n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"full";switch(ns.currency.ns_currency_prefered){case"iso":t=ns.currency.ns_currency_iso;break;case"symbol":t=ns.currency.ns_currency_symbol}if("full"===i){var s={decimal:ns.currency.ns_currency_decimal_separator,separator:ns.currency.ns_currency_thousand_separator,precision:parseInt(ns.currency.ns_currency_precision),symbol:""};n=l()(e,s).format()}else n=r()(e).format("0.0a");return"".concat("before"===ns.currency.ns_currency_position?t:"").concat(n).concat("after"===ns.currency.ns_currency_position?t:"")})),c=function(e){var t="0.".concat(o);return parseFloat(r()(e).format(t))}},9698:(e,t,n)=>{"use strict";n.d(t,{b:()=>i});var i=n(538).default.filter("truncate",(function(e,t){return e?(e=e.toString()).length>t?e.substring(0,t)+"...":e:""}))},7266:(e,t,n)=>{"use strict";function i(e,t){for(var n=0;ns});var s=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,s;return t=e,(n=[{key:"validateFields",value:function(e){var t=this;return 0===e.map((function(e){return t.checkField(e),e.errors?0===e.errors.length:0})).filter((function(e){return!1===e})).length}},{key:"validateFieldsErrors",value:function(e){var t=this;return e.map((function(e){return t.checkField(e),e.errors})).flat()}},{key:"validateForm",value:function(e){e.main&&this.validateField(e.main);var t=[];for(var n in e.tabs){var i=[],s=this.validateFieldsErrors(e.tabs[n].fields);s.length>0&&i.push(s),e.tabs[n].errors=i.flat(),t.push(i.flat())}return t.flat().filter((function(e){return void 0!==e}))}},{key:"initializeTabs",value:function(e){var t=0;for(var n in e)0===t&&(e[n].active=!0),e[n].active=void 0!==e[n].active&&e[n].active,e[n].fields=this.createFields(e[n].fields),t++;return e}},{key:"validateField",value:function(e){return this.checkField(e)}},{key:"fieldsValid",value:function(e){return!(e.map((function(e){return e.errors&&e.errors.length>0})).filter((function(e){return e})).length>0)}},{key:"createFields",value:function(e){return e.map((function(e){return e.type=e.type||"text",e.errors=e.errors||[],e.disabled=e.disabled||!1,"custom"===e.type&&(e.component=nsExtraComponents[e.name]),e}))}},{key:"createForm",value:function(e){if(e.main&&(e.main=this.createFields([e.main])[0]),e.tabs)for(var t in e.tabs)e.tabs[t].fields=this.createFields(e.tabs[t].fields),e.tabs[t].errors=[];return e}},{key:"enableFields",value:function(e){return e.map((function(e){return e.disabled=!1}))}},{key:"disableFields",value:function(e){return e.map((function(e){return e.disabled=!0}))}},{key:"disableForm",value:function(e){for(var t in e.main&&(e.main.disabled=!0),e.tabs)e.tabs[t].fields.forEach((function(e){return e.disabled=!0}))}},{key:"enableForm",value:function(e){for(var t in e.main&&(e.main.disabled=!1),e.tabs)e.tabs[t].fields.forEach((function(e){return e.disabled=!1}))}},{key:"getValue",value:function(e){var t={};return e.forEach((function(e){t[e.name]=e.value})),t}},{key:"checkField",value:function(e){var t=this;return void 0!==e.validation&&(e.errors=[],this.detectValidationRules(e.validation).forEach((function(n){t.fieldPassCheck(e,n)}))),e}},{key:"extractForm",value:function(e){var t={};if(e.main&&(t[e.main.name]=e.main.value),e.tabs)for(var n in e.tabs)void 0===t[n]&&(t[n]={}),t[n]=this.extractFields(e.tabs[n].fields);return t}},{key:"extractFields",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.forEach((function(e){["multiselect"].includes(e.type)?t[e.name]=e.options.filter((function(e){return e.selected})).map((function(e){return e.value})):t[e.name]=e.value})),t}},{key:"detectValidationRules",value:function(e){var t=function(e){var t;return["email","required"].includes(e)?{identifier:e}:(t=/(min)\:([0-9])+/g.exec(e))||(t=/(max)\:([0-9])+/g.exec(e))?{identifier:t[1],value:t[2]}:e};return Array.isArray(e)?e.filter((function(e){return"string"==typeof e})).map(t):e.split("|").map(t)}},{key:"triggerError",value:function(e,t){if(t.errors){var n=function(n){var i=n.split(".").filter((function(e){return!/^\d+$/.test(e)}));2===i.length&&e.tabs[i[0]].fields.forEach((function(e){e.name===i[1]&&t.errors[n].forEach((function(t){var n={identifier:"invalid",invalid:!0,message:t,name:e.name};e.errors.push(n)}))})),n===e.main.name&&t.errors[n].forEach((function(t){e.main.errors.push({identifier:"invalid",invalid:!0,message:t,name:e.main.name})}))};for(var i in t.errors)n(i)}}},{key:"triggerFieldsErrors",value:function(e,t){if(t&&t.errors){var n=function(n){e.forEach((function(e){e.name===n&&t.errors[n].forEach((function(t){var n={identifier:"invalid",invalid:!0,message:t,name:e.name};e.errors.push(n)}))}))};for(var i in t.errors)n(i)}}},{key:"fieldPassCheck",value:function(e,t){if("required"===t.identifier){if(void 0===e.value||null===e.value||0===e.value.length)return e.errors.push({identifier:t.identifier,invalid:!0,name:e.name});e.errors.forEach((function(n,i){n.identifier===t.identifier&&!0===n.invalid&&e.errors.splice(i,1)}))}if("email"===t.identifier){if(!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(e.value))return e.errors.push({identifier:t.identifier,invalid:!0,name:e.name});e.errors.forEach((function(n,i){!0===n[t.identifier]&&e.errors.splice(i,1)}))}return e}}])&&i(t.prototype,n),s&&i(t,s),e}()},7389:(e,t,n)=>{"use strict";n.d(t,{__:()=>i,c:()=>s});var i=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"NexoPOS";return nsLanguage.getEntries(t)&&nsLanguage.getEntries(t)[e]||e},s=function(e,t){return nsLanguage.getEntries(t)&&nsLanguage.getEntries(t)[e]||e}},8603:(e,t,n)=>{"use strict";function i(){var e=this;Object.keys(this).includes("$popup")&&this.$popup.event.subscribe((function(t){"click-overlay"===t.event&&(e.$popupParams&&void 0!==e.$popupParams.reject&&e.$popupParams.reject(!1),e.$popup.close()),"press-esc"===t.event&&(e.$popupParams&&void 0!==e.$popupParams.reject&&e.$popupParams.reject(!1),e.$popup.close())}))}n.d(t,{Z:()=>i})},6386:(e,t,n)=>{"use strict";function i(e){void 0!==this.$popupParams.resolve&&this.$popupParams.reject&&(!1!==e?this.$popupParams.resolve(e):this.$popupParams.reject(e)),this.$popup.close()}n.d(t,{Z:()=>i})},2242:(e,t,n)=>{"use strict";n.d(t,{G:()=>a});var i=n(9248);function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};if(s(this,e),this.config={primarySelector:void 0,popupClass:"shadow-lg h-half w-1/2 bg-white"},this.container=document.createElement("div"),this.popupBody=document.createElement("div"),this.config=Object.assign(this.config,t),void 0===this.config.primarySelector&&document.querySelectorAll(".is-popup").length>0){var n=document.querySelectorAll(".is-popup").length;this.parentWrapper=document.querySelectorAll(".is-popup")[n-1]}else this.parentWrapper=document.querySelector("body").querySelectorAll("div")[0];this.event=new i.x}var t,n,a;return t=e,a=[{key:"show",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=new e(i);return s.open(t,n),s}}],(n=[{key:"open",value:function(e){var t,n,i,s=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=document.querySelector("body").querySelectorAll("div")[0];this.parentWrapper.style.filter="blur(4px)",a.style.filter="blur(6px)",this.container.setAttribute("class","absolute top-0 left-0 w-full h-full flex items-center justify-center is-popup"),this.container.addEventListener("click",(function(e){s.event.next({event:"click-overlay",value:!0}),e.stopPropagation()})),this.popupBody.addEventListener("click",(function(e){e.stopImmediatePropagation()})),this.container.style.background="rgb(51 51 51 / 20%)",this.container.id="popup-container-"+document.querySelectorAll(".is-popup").length,this.popupBody.setAttribute("class"," zoom-out-entrance"),this.popupBody.innerHTML='',this.container.appendChild(this.popupBody),document.body.appendChild(this.container);var l=Vue.extend(e);this.instance=new l({propsData:{popup:this}}),this.instance.template=(null===(t=null==e?void 0:e.options)||void 0===t?void 0:t.template)||void 0,this.instance.render=e.render||void 0,this.instance.methods=(null===(n=null==e?void 0:e.options)||void 0===n?void 0:n.methods)||(null==e?void 0:e.methods),this.instance.data=(null===(i=null==e?void 0:e.options)||void 0===i?void 0:i.data)||(null==e?void 0:e.data),this.instance.$popup=this,this.instance.$popupParams=r,this.instance.$mount("#".concat(this.container.id," .popup-body"))}},{key:"close",value:function(){var e=this;this.instance.$destroy(),this.event.unsubscribe(),this.parentWrapper.style.filter="blur(0px)";var t=document.querySelector("body").querySelectorAll("div")[0];document.querySelectorAll(".is-popup").length<=1&&(t.style.filter="blur(0px)"),this.popupBody.classList.remove("zoom-out-entrance"),this.popupBody.classList.add("zoom-in-exit"),this.container.classList.remove("is-popup"),setTimeout((function(){e.container.remove()}),300)}}])&&r(t.prototype,n),a&&r(t,a),e}()},9624:(e,t,n)=>{"use strict";n.d(t,{S:()=>r});var i=n(3260);function s(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"info"};return i.Observable.create((function(i){var r=n.__createSnack({message:e,label:t,type:s.type}),a=r.buttonNode,l=(r.textNode,r.snackWrapper,r.sampleSnack);a.addEventListener("click",(function(e){i.onNext(a),i.onCompleted(),l.remove()})),n.__startTimer(s.duration,l)}))}},{key:"error",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"error"};return this.show(e,t,Object.assign(Object.assign({},n),{type:"error"}))}},{key:"success",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"success"};return this.show(e,t,Object.assign(Object.assign({},n),{type:"success"}))}},{key:"info",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"info"};return this.show(e,t,Object.assign(Object.assign({},n),{type:"info"}))}},{key:"__startTimer",value:function(e,t){var n,i=function(){e>0&&!1!==e&&(n=setTimeout((function(){t.remove()}),e))};t.addEventListener("mouseenter",(function(){clearTimeout(n)})),t.addEventListener("mouseleave",(function(){i()})),i()}},{key:"__createSnack",value:function(e){var t=e.message,n=e.label,i=e.type,s=void 0===i?"info":i,r=document.getElementById("snack-wrapper")||document.createElement("div"),a=document.createElement("div"),l=document.createElement("p"),o=document.createElement("div"),d=document.createElement("button"),c="",u="";switch(s){case"info":c="text-white hover:bg-blue-400 bg-blue-500",u="bg-gray-900 text-white";break;case"error":c="text-red-700 hover:bg-white bg-white",u="bg-red-500 text-white";break;case"success":c="text-green-700 hover:bg-white bg-white",u="bg-green-500 text-white"}return l.textContent=t,n&&(d.textContent=n,d.setAttribute("class","px-3 py-2 shadow rounded uppercase ".concat(c)),o.appendChild(d)),a.appendChild(l),a.appendChild(o),a.setAttribute("class","md:rounded py-2 px-3 md:w-2/5 w-full z-10 md:my-2 shadow-lg flex justify-between items-center zoom-in-entrance anim-duration-300 ".concat(u)),r.appendChild(a),null===document.getElementById("snack-wrapper")&&(r.setAttribute("id","snack-wrapper"),r.setAttribute("class","absolute bottom-0 w-full flex justify-between items-center flex-col"),document.body.appendChild(r)),{snackWrapper:r,sampleSnack:a,buttonsWrapper:o,buttonNode:d,textNode:l}}}])&&s(t.prototype,n),r&&s(t,r),e}()},5767:(e,t,n)=>{"use strict";n.d(t,{c:()=>a});var i=n(538),s=n(8345),r=[{path:"/",component:n(4741).Z},{path:"/database",component:n(5718).Z},{path:"/configuration",component:n(5825).Z}];i.default.use(s.Z);var a=new s.Z({routes:r});new i.default({router:a}).$mount("#nexopos-setup")},6700:(e,t,n)=>{var i={"./af":2786,"./af.js":2786,"./ar":867,"./ar-dz":4130,"./ar-dz.js":4130,"./ar-kw":6135,"./ar-kw.js":6135,"./ar-ly":6440,"./ar-ly.js":6440,"./ar-ma":7702,"./ar-ma.js":7702,"./ar-sa":6040,"./ar-sa.js":6040,"./ar-tn":7100,"./ar-tn.js":7100,"./ar.js":867,"./az":1083,"./az.js":1083,"./be":9808,"./be.js":9808,"./bg":8338,"./bg.js":8338,"./bm":7438,"./bm.js":7438,"./bn":8905,"./bn-bd":6225,"./bn-bd.js":6225,"./bn.js":8905,"./bo":1560,"./bo.js":1560,"./br":1278,"./br.js":1278,"./bs":622,"./bs.js":622,"./ca":2468,"./ca.js":2468,"./cs":5822,"./cs.js":5822,"./cv":877,"./cv.js":877,"./cy":7373,"./cy.js":7373,"./da":4780,"./da.js":4780,"./de":9740,"./de-at":217,"./de-at.js":217,"./de-ch":894,"./de-ch.js":894,"./de.js":9740,"./dv":5300,"./dv.js":5300,"./el":837,"./el.js":837,"./en-au":8348,"./en-au.js":8348,"./en-ca":7925,"./en-ca.js":7925,"./en-gb":2243,"./en-gb.js":2243,"./en-ie":6436,"./en-ie.js":6436,"./en-il":7207,"./en-il.js":7207,"./en-in":4175,"./en-in.js":4175,"./en-nz":6319,"./en-nz.js":6319,"./en-sg":1662,"./en-sg.js":1662,"./eo":2915,"./eo.js":2915,"./es":7093,"./es-do":5251,"./es-do.js":5251,"./es-mx":6112,"./es-mx.js":6112,"./es-us":1146,"./es-us.js":1146,"./es.js":7093,"./et":5603,"./et.js":5603,"./eu":7763,"./eu.js":7763,"./fa":6959,"./fa.js":6959,"./fi":1897,"./fi.js":1897,"./fil":2549,"./fil.js":2549,"./fo":4694,"./fo.js":4694,"./fr":4470,"./fr-ca":3049,"./fr-ca.js":3049,"./fr-ch":2330,"./fr-ch.js":2330,"./fr.js":4470,"./fy":5044,"./fy.js":5044,"./ga":9295,"./ga.js":9295,"./gd":2101,"./gd.js":2101,"./gl":8794,"./gl.js":8794,"./gom-deva":7884,"./gom-deva.js":7884,"./gom-latn":3168,"./gom-latn.js":3168,"./gu":5349,"./gu.js":5349,"./he":4206,"./he.js":4206,"./hi":94,"./hi.js":94,"./hr":316,"./hr.js":316,"./hu":2138,"./hu.js":2138,"./hy-am":1423,"./hy-am.js":1423,"./id":9218,"./id.js":9218,"./is":135,"./is.js":135,"./it":626,"./it-ch":150,"./it-ch.js":150,"./it.js":626,"./ja":9183,"./ja.js":9183,"./jv":4286,"./jv.js":4286,"./ka":2105,"./ka.js":2105,"./kk":7772,"./kk.js":7772,"./km":8758,"./km.js":8758,"./kn":9282,"./kn.js":9282,"./ko":3730,"./ko.js":3730,"./ku":1408,"./ku.js":1408,"./ky":3291,"./ky.js":3291,"./lb":6841,"./lb.js":6841,"./lo":5466,"./lo.js":5466,"./lt":7010,"./lt.js":7010,"./lv":7595,"./lv.js":7595,"./me":9861,"./me.js":9861,"./mi":5493,"./mi.js":5493,"./mk":5966,"./mk.js":5966,"./ml":7341,"./ml.js":7341,"./mn":5115,"./mn.js":5115,"./mr":370,"./mr.js":370,"./ms":9847,"./ms-my":1237,"./ms-my.js":1237,"./ms.js":9847,"./mt":2126,"./mt.js":2126,"./my":6165,"./my.js":6165,"./nb":4924,"./nb.js":4924,"./ne":6744,"./ne.js":6744,"./nl":3901,"./nl-be":9814,"./nl-be.js":9814,"./nl.js":3901,"./nn":3877,"./nn.js":3877,"./oc-lnc":2135,"./oc-lnc.js":2135,"./pa-in":5858,"./pa-in.js":5858,"./pl":4495,"./pl.js":4495,"./pt":9520,"./pt-br":7971,"./pt-br.js":7971,"./pt.js":9520,"./ro":6459,"./ro.js":6459,"./ru":238,"./ru.js":238,"./sd":950,"./sd.js":950,"./se":490,"./se.js":490,"./si":124,"./si.js":124,"./sk":4249,"./sk.js":4249,"./sl":4985,"./sl.js":4985,"./sq":1104,"./sq.js":1104,"./sr":9131,"./sr-cyrl":9915,"./sr-cyrl.js":9915,"./sr.js":9131,"./ss":5893,"./ss.js":5893,"./sv":8760,"./sv.js":8760,"./sw":1172,"./sw.js":1172,"./ta":7333,"./ta.js":7333,"./te":3110,"./te.js":3110,"./tet":2095,"./tet.js":2095,"./tg":7321,"./tg.js":7321,"./th":9041,"./th.js":9041,"./tk":9005,"./tk.js":9005,"./tl-ph":5768,"./tl-ph.js":5768,"./tlh":9444,"./tlh.js":9444,"./tr":2397,"./tr.js":2397,"./tzl":8254,"./tzl.js":8254,"./tzm":1106,"./tzm-latn":699,"./tzm-latn.js":699,"./tzm.js":1106,"./ug-cn":9288,"./ug-cn.js":9288,"./uk":7691,"./uk.js":7691,"./ur":3795,"./ur.js":3795,"./uz":6791,"./uz-latn":588,"./uz-latn.js":588,"./uz.js":6791,"./vi":5666,"./vi.js":5666,"./x-pseudo":4378,"./x-pseudo.js":4378,"./yo":5805,"./yo.js":5805,"./zh-cn":3839,"./zh-cn.js":3839,"./zh-hk":5726,"./zh-hk.js":5726,"./zh-mo":9807,"./zh-mo.js":9807,"./zh-tw":4152,"./zh-tw.js":4152};function s(e){var t=r(e);return n(t)}function r(e){if(!n.o(i,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return i[e]}s.keys=function(){return Object.keys(i)},s.resolve=r,e.exports=s,s.id=6700},6598:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(381),s=n.n(i);const r={name:"ns-datepicker",props:["label","date"],data:function(){return{visible:!1,currentDay:null,daysOfWeek:new Array(7).fill("").map((function(e,t){return t})),calendar:[[]]}},mounted:function(){document.addEventListener("click",this.checkClickedItem),this.currentDay=[void 0,null].includes(this.date)?s()():s()(this.date),this.build()},methods:{__:n(7389).__,checkClickedItem:function(e){!this.$el.contains(e.srcElement)&&this.visible&&(this.visible=!1)},selectDate:function(e){this.currentDay=e,this.visible=!1,this.$emit("change",e)},subMonth:function(){this.currentDay.subtract(1,"month"),this.build()},addMonth:function(){this.currentDay.add(1,"month"),this.build()},resetCalendar:function(){this.calendar=[[]]},build:function(){this.resetCalendar();this.currentDay.clone().startOf("month");for(var e=this.currentDay.clone().startOf("month"),t=this.currentDay.clone().endOf("month");;){0===e.day()&&this.calendar[0].length>0&&this.calendar.push([]);var n=this.calendar.length-1;if(this.calendar[n].push({date:e.clone(),dayOfWeek:e.day(),isToday:e.isSame(s().now(),"day")}),e.isSame(t,"day"))break;e.add(1,"day")}}}};const a=(0,n(1900).Z)(r,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"picker"},[n("div",{staticClass:"rounded cursor-pointer bg-white shadow px-1 py-1 flex items-center text-gray-700",on:{click:function(t){e.visible=!e.visible}}},[n("i",{staticClass:"las la-clock text-2xl"}),e._v(" "),n("span",{staticClass:"mx-1 text-sm"},[n("span",[e._v(e._s(e.label||e.__("Date"))+" : ")]),e._v(" "),e.currentDay?n("span",[e._v(e._s(e.currentDay.format("YYYY/MM/DD")))]):e._e(),e._v(" "),null===e.currentDay?n("span",[e._v(e._s(e.__("N/A")))]):e._e()])]),e._v(" "),e.visible?n("div",{staticClass:"relative h-0 w-0 -mb-2"},[n("div",{staticClass:"w-72 mt-2 shadow rounded bg-white anim-duration-300 zoom-in-entrance flex flex-col"},[n("div",{staticClass:"flex-auto"},[n("div",{staticClass:"p-2 flex items-center"},[n("div",[n("button",{staticClass:"w-8 h-8 bg-gray-400 rounded",on:{click:function(t){return e.subMonth()}}},[n("i",{staticClass:"las la-angle-left"})])]),e._v(" "),n("div",{staticClass:"flex flex-auto font-semibold text-gray-700 justify-center"},[e._v(e._s(e.currentDay.format("MMM"))+" "+e._s(e.currentDay.format("YYYY")))]),e._v(" "),n("div",[n("button",{staticClass:"w-8 h-8 bg-gray-400 rounded",on:{click:function(t){return e.addMonth()}}},[n("i",{staticClass:"las la-angle-right"})])])]),e._v(" "),n("div",{staticClass:"grid grid-flow-row grid-cols-7 grid-rows-1 gap-0 text-gray-700"},[n("div",{staticClass:"border border-gray-200 h-8 flex justify-center items-center text-sm"},[e._v(e._s(e.__("Sun")))]),e._v(" "),n("div",{staticClass:"border border-gray-200 h-8 flex justify-center items-center text-sm"},[e._v(e._s(e.__("Mon")))]),e._v(" "),n("div",{staticClass:"border border-gray-200 h-8 flex justify-center items-center text-sm"},[e._v(e._s(e.__("Tue")))]),e._v(" "),n("div",{staticClass:"border border-gray-200 h-8 flex justify-center items-center text-sm"},[e._v(e._s(e.__("Wed")))]),e._v(" "),n("div",{staticClass:"border border-gray-200 h-8 flex justify-center items-center text-sm"},[e._v(e._s(e.__("Thr")))]),e._v(" "),n("div",{staticClass:"border border-gray-200 h-8 flex justify-center items-center text-sm"},[e._v(e._s(e.__("Fri")))]),e._v(" "),n("div",{staticClass:"border border-gray-200 h-8 flex justify-center items-center text-sm"},[e._v(e._s(e.__("Sat")))])]),e._v(" "),e._l(e.calendar,(function(t,i){return n("div",{key:i,staticClass:"grid grid-flow-row grid-cols-7 grid-rows-1 gap-0 text-gray-700"},e._l(e.daysOfWeek,(function(i,s){return n("div",{key:s,staticClass:"h-8 flex justify-center items-center text-sm"},[e._l(t,(function(t,s){return[t.dayOfWeek===i?n("div",{key:s,staticClass:"h-full w-full flex items-center justify-center cursor-pointer",class:t.date.format("DD")===e.currentDay.format("DD")?"bg-blue-400 text-white border border-blue-500":"hover:bg-gray-100 border border-gray-200",on:{click:function(n){return e.selectDate(t.date)}}},[e._v("\n "+e._s(t.date.format("DD"))+"\n ")]):e._e()]}))],2)})),0)}))],2),e._v(" "),n("div")])]):e._e()])}),[],!1,null,null,null).exports},3968:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});function i(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n100?100:this.backValue))),"0"===this.backValue&&(this.backValue=""),this.$emit("changed",this.floating&&this.backValue.length>0?parseFloat(this.backValue/this.number):this.backValue)):this.$emit("next",this.floating&&this.backValue.length>0?parseFloat(this.backValue/this.number):this.backValue)}}};const a=(0,n(1900).Z)(r,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"grid grid-flow-row grid-cols-3 gap-2 grid-rows-3",staticStyle:{padding:"1px"},attrs:{id:"numpad"}},[e._l(e.keys,(function(t,i){return n("div",{key:i,staticClass:"hover:bg-gray-400 hover:text-gray-800 bg-gray-300 text-2xl text-gray-700 border h-16 flex items-center justify-center cursor-pointer",staticStyle:{margin:"-1px"},on:{click:function(n){return e.inputValue(t)}}},[void 0!==t.value?n("span",[e._v(e._s(t.value))]):e._e(),e._v(" "),t.icon?n("i",{staticClass:"las",class:t.icon}):e._e()])})),e._v(" "),e._t("numpad-footer")],2)}),[],!1,null,null,null).exports},9576:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var i=n(162),s=n(8603),r=n(7389);const a={name:"ns-media",props:["popup"],components:{VueUpload:n(2948)},data:function(){return{pages:[{label:(0,r.__)("Upload"),name:"upload",selected:!1},{label:(0,r.__)("Gallery"),name:"gallery",selected:!0}],resources:[],response:{data:[],current_page:0,from:0,to:0,next_page_url:"",prev_page_url:"",path:"",per_page:0,total:0,last_page:0,first_page:0},queryPage:1,bulkSelect:!1,files:[]}},mounted:function(){this.popupCloser();var e=this.pages.filter((function(e){return"gallery"===e.name}))[0];this.select(e)},watch:{files:function(){this.files.filter((function(e){return"0.00"===e.progress})).length>0&&(this.$refs.upload.active=!0)}},computed:{postMedia:function(){return i.kq.applyFilters("http-client-url","/api/nexopos/v4/medias")},currentPage:function(){return this.pages.filter((function(e){return e.selected}))[0]},hasOneSelected:function(){return this.response.data.filter((function(e){return e.selected})).length>0},selectedResource:function(){return this.response.data.filter((function(e){return e.selected}))[0]},csrf:function(){return ns.authentication.csrf},isPopup:function(){return void 0!==this.$popup},user_id:function(){return this.isPopup&&this.$popupParams.user_id||0}},methods:{popupCloser:s.Z,__:r.__,cancelBulkSelect:function(){this.bulkSelect=!1,this.response.data.forEach((function(e){return e.selected=!1}))},deleteSelected:function(){var e=this;if(confirm("Delete selected resources ?"))return i.ih.post("/api/nexopos/v4/medias/bulk-delete",{ids:this.response.data.filter((function(e){return e.selected})).map((function(e){return e.id}))}).subscribe((function(t){i.kX.success(t.message).subscribe(),e.loadGallery()}),(function(e){i.kX.error(e.message).subscribe()}))},select:function(e){this.pages.forEach((function(e){return e.selected=!1})),e.selected=!0,"gallery"===e.name&&this.loadGallery()},loadGallery:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;t=null===t?this.queryPage:t,this.queryPage=t,i.ih.get("/api/nexopos/v4/medias?page=".concat(t,"&user_id=").concat(this.user_id)).subscribe((function(t){t.data.forEach((function(e){return e.selected=!1})),e.response=t}))},useSelectedEntries:function(){this.$popupParams.resolve({event:"use-selected",value:this.response.data.filter((function(e){return e.selected}))}),this.$popup.close()},selectResource:function(e){var t=this;this.bulkSelect||this.response.data.forEach((function(n,i){i!==t.response.data.indexOf(e)&&(n.selected=!1)})),e.selected=!e.selected}}};const l=(0,n(1900).Z)(a,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"flex bg-white shadow-xl overflow-hidden",class:e.isPopup?"w-6/7-screen h-6/7-screen":"w-full h-full"},[n("div",{staticClass:"sidebar w-48 bg-gray-200 h-full flex-shrink-0"},[n("h3",{staticClass:"text-xl font-bold text-gray-800 my-4 text-center"},[e._v(e._s(e.__("Medias Manager")))]),e._v(" "),n("ul",e._l(e.pages,(function(t,i){return n("li",{key:i,staticClass:"hover:bg-white py-2 px-3 text-gray-700 border-l-8 cursor-pointer",class:t.selected?"bg-white border-blue-400":"border-transparent",on:{click:function(n){return e.select(t)}}},[e._v(e._s(t.label))])})),0)]),e._v(" "),"upload"===e.currentPage.name?n("div",{staticClass:"content w-full overflow-hidden flex"},[n("vue-upload",{ref:"upload",staticClass:" flex-auto flex bg-white shadow",attrs:{drop:!0,multiple:!0,headers:{"X-Requested-With":"XMLHttpRequest","X-CSRF-TOKEN":e.csrf},accept:"image/*","post-action":e.postMedia},model:{value:e.files,callback:function(t){e.files=t},expression:"files"}},[n("div",{staticClass:"border-dashed border-2 flex flex-auto m-2 p-2 flex-col border-blue-400 items-center justify-center"},[n("h3",{staticClass:"text-3xl font-bold text-gray-600 mb-4"},[e._v(e._s(e.__("Click Here Or Drop Your File To Upload")))]),e._v(" "),n("div",{staticClass:"rounded w-full md:w-2/3 text-gray-700 bg-gray-500 h-56 overflow-y-auto p-2"},[n("ul",e._l(e.files,(function(t,i){return n("li",{key:i,staticClass:"p-2 mb-2 shadow bg-white flex items-center justify-between rounded"},[n("span",[e._v(e._s(t.name))]),e._v(" "),n("span",{staticClass:"rounded bg-blue-400 flex items-center justify-center text-xs p-2"},[e._v(e._s(t.progress)+"%")])])})),0)])])])],1):e._e(),e._v(" "),"gallery"===e.currentPage.name?n("div",{staticClass:"content flex-col w-full overflow-hidden flex"},[e.popup?n("div",{staticClass:"p-2 flex flex-shrink-0 justify-between bg-gray-200"},[n("div"),e._v(" "),n("div",[n("ns-close-button",{on:{click:function(t){return e.popup.close()}}})],1)]):e._e(),e._v(" "),n("div",{staticClass:"flex flex-auto overflow-hidden"},[n("div",{staticClass:"bg-white shadow content flex flex-auto flex-col overflow-y-auto",attrs:{id:"grid"}},[n("div",{staticClass:"flex flex-auto"},[n("div",{staticClass:"p-2 overflow-x-auto"},[n("div",{staticClass:"grid grid-cols-2 md:grid-cols-4 lg:grid-cols-4 xl:grid-cols-6"},e._l(e.response.data,(function(t,i){return n("div",{key:i},[n("div",{staticClass:"p-2"},[n("div",{staticClass:"rounded-lg w-32 h-32 bg-gray-500 m-2 overflow-hidden flex items-center justify-center",class:t.selected?"ring-4 ring-blue-500 ring-opacity-50":"",on:{click:function(n){return e.selectResource(t)}}},[n("img",{staticClass:"object-cover h-full",attrs:{src:t.sizes.thumb,alt:t.name}})])])])})),0)]),e._v(" "),0===e.response.data.length?n("div",{staticClass:"flex flex-auto items-center justify-center"},[n("h3",{staticClass:"text-2xl text-gray-600 font-bold"},[e._v(e._s(e.__("Nothing has already been uploaded")))])]):e._e()])]),e._v(" "),!e.bulkSelect&&e.hasOneSelected?n("div",{staticClass:"w-64 flex-shrink-0 bg-gray-200",attrs:{id:"preview"}},[n("div",{staticClass:"h-64 bg-gray-600 flex items-center justify-center"},[n("img",{attrs:{src:e.selectedResource.sizes.thumb,alt:e.selectedResource.name}})]),e._v(" "),n("div",{staticClass:"p-4 text-gray-700 text-sm",attrs:{id:"details"}},[n("p",{staticClass:"flex flex-col mb-2"},[n("strong",{staticClass:"font-bold block"},[e._v(e._s(e.__("File Name"))+": ")]),n("span",[e._v(e._s(e.selectedResource.name))])]),e._v(" "),n("p",{staticClass:"flex flex-col mb-2"},[n("strong",{staticClass:"font-bold block"},[e._v(e._s(e.__("Uploaded At"))+":")]),n("span",[e._v(e._s(e.selectedResource.created_at))])]),e._v(" "),n("p",{staticClass:"flex flex-col mb-2"},[n("strong",{staticClass:"font-bold block"},[e._v(e._s(e.__("By"))+" :")]),n("span",[e._v(e._s(e.selectedResource.user.username))])])])]):e._e()]),e._v(" "),n("div",{staticClass:"p-2 flex flex-shrink-0 justify-between bg-gray-200"},[n("div",{staticClass:"flex -mx-2 flex-shrink-0"},[n("div",{staticClass:"px-2 flex-shrink-0 flex"},[n("div",{staticClass:"rounded shadow overflow-hidden border-blue-400 flex text-sm text-gray-700"},[e.bulkSelect?n("button",{staticClass:"bg-white hover:bg-blue-400 hover:text-white py-2 px-3",on:{click:function(t){return e.cancelBulkSelect()}}},[n("i",{staticClass:"las la-times"})]):e._e(),e._v(" "),e.hasOneSelected&&!e.bulkSelect?n("button",{staticClass:"bg-white hover:bg-blue-400 hover:text-white py-2 px-3",on:{click:function(t){e.bulkSelect=!0}}},[n("i",{staticClass:"las la-check-circle"})]):e._e(),e._v(" "),e.hasOneSelected?n("button",{staticClass:"bg-red-400 text-white hover:bg-red-500 hover:text-white py-2 px-3",on:{click:function(t){return e.deleteSelected()}}},[n("i",{staticClass:"las la-trash"})]):e._e()])])]),e._v(" "),n("div",{staticClass:"flex-shrink-0 -mx-2 flex"},[n("div",{staticClass:"px-2"},[n("div",{staticClass:"rounded shadow overflow-hidden border-blue-400 flex text-sm text-gray-700"},[n("button",{staticClass:"p-2",class:1===e.response.current_page?"bg-gray-100 text-gray-600 cursor-not-allowed":"bg-white hover:bg-blue-400 hover:text-white",attrs:{disabled:1===e.response.current_page},on:{click:function(t){return e.loadGallery(e.response.current_page-1)}}},[e._v(e._s(e.__("Previous")))]),e._v(" "),n("hr",{staticClass:"border-r border-gray-700"}),e._v(" "),n("button",{staticClass:"p-2",class:e.response.current_page===e.response.last_page?"bg-gray-100 text-gray-600 cursor-not-allowed":"bg-white hover:bg-blue-400 hover:text-white",attrs:{disabled:e.response.current_page===e.response.last_page},on:{click:function(t){return e.loadGallery(e.response.current_page+1)}}},[e._v(e._s(e.__("Next")))])])]),e._v(" "),e.popup&&e.hasOneSelected?n("div",{staticClass:"px-2"},[n("button",{staticClass:"rounded shadow p-2 bg-blue-400 text-white text-sm",on:{click:function(t){return e.useSelectedEntries()}}},[e._v(e._s(e.__("Use Selected")))])]):e._e()])])]):e._e()])}),[],!1,null,null,null).exports},5718:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(7266),s=n(5767);const r={data:function(){return{form:new i.Z,fields:[]}},methods:{validate:function(){var e=this;this.form.validateFields(this.fields)&&(this.form.disableFields(this.fields),this.checkDatabase(this.form.getValue(this.fields)).subscribe((function(t){e.form.enableFields(e.fields),s.c.push("/configuration"),nsSnackBar.success(t.message,"OKAY",{duration:5e3}).subscribe()}),(function(t){e.form.enableFields(e.fields),nsSnackBar.error(t.message,"OKAY").subscribe()})))},checkDatabase:function(e){return nsHttpClient.post("/api/nexopos/v4/setup/database",e)}},mounted:function(){this.fields=this.form.createFields([{label:"Hostname",description:"Provide the database hostname",name:"hostname",value:"localhost",validation:"required"},{label:"Username",description:"Username required to connect to the database.",name:"username",value:"root",validation:"required"},{label:"Password",description:"The username password required to connect.",name:"password",value:""},{label:"Database Name",description:"Provide the database name.",name:"database_name",value:"nexopos_v4",validation:"required"},{label:"Database Prefix",description:"Provide the database prefix.",name:"database_prefix",value:"ns_",validation:"required"}])}};const a=(0,n(1900).Z)(r,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"bg-white rounded shadow my-4"},[n("div",{staticClass:"welcome-box border-b border-gray-300 p-3 text-gray-700"},e._l(e.fields,(function(t,i){return n("ns-input",{key:i,attrs:{field:t},on:{change:function(n){return e.form.validateField(t)}}},[n("span",[e._v(e._s(t.label))]),e._v(" "),n("template",{slot:"description"},[e._v(e._s(t.description))])],2)})),1),e._v(" "),n("div",{staticClass:"bg-gray-200 p-3 flex justify-end"},[n("ns-button",{attrs:{type:"info"},on:{click:function(t){return e.validate()}}},[e._v("Save Database")])],1)])}),[],!1,null,null,null).exports},5825:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var i=n(7266),s=n(162),r=n(5767);const a={data:function(){return{form:new i.Z,fields:[],processing:!1,steps:[],failure:0,maxFailure:2}},methods:{validate:function(){},verifyDBConnectivity:function(){},saveConfiguration:function(e){var t=this;return this.form.disableFields(this.fields),this.processing=!0,s.ih.post("/api/nexopos/v4/setup/configuration",this.form.getValue(this.fields)).subscribe((function(e){document.location="/sign-in"}),(function(e){t.processing=!1,t.form.enableFields(t.fields),t.form.triggerFieldsErrors(t.fields,e.data),s.kX.error(e.message,"OK").subscribe()}))},checkDatabase:function(){var e=this;s.ih.get("/api/nexopos/v4/setup/database").subscribe((function(t){e.fields=e.form.createFields([{label:"Application",description:"That is the application name.",name:"ns_store_name",validation:"required"},{label:"Username",description:"Provide the administrator username.",name:"admin_username",validation:"required"},{label:"Email",description:"Provide the administrator email.",name:"admin_email",validation:"required"},{label:"Password",type:"password",description:"What should be the password required for authentication.",name:"password",validation:"required"},{label:"Confirm Password",type:"password",description:"Should be the same as the password above.",name:"confirm_password",validation:"required"}])}),(function(e){console.log(e),r.c.push("/database"),s.kX.error("You need to define database settings","OKAY",{duration:3e3}).subscribe()}))}},mounted:function(){this.checkDatabase()}};const l=(0,n(1900).Z)(a,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[0===e.fields.length?n("ns-spinner",{attrs:{size:"12",border:"4",animation:"fast"}}):e._e(),e._v(" "),e.fields.length>0?n("div",{staticClass:"bg-white rounded shadow my-2"},[n("div",{staticClass:"welcome-box border-b border-gray-300 p-3 text-gray-700"},e._l(e.fields,(function(e,t){return n("ns-field",{key:t,attrs:{field:e}})})),1),e._v(" "),n("div",{staticClass:"bg-gray-200 p-3 flex justify-between items-center"},[n("div",[e.processing?n("ns-spinner",{attrs:{size:"8",border:"4"}}):e._e()],1),e._v(" "),n("ns-button",{attrs:{disabled:e.processing,type:"info"},on:{click:function(t){return e.saveConfiguration()}}},[e._v("Create Installation")])],1)]):e._e()],1)}),[],!1,null,null,null).exports},4741:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});const i={components:{nsLink:n(4364).nsLink}};const s=(0,n(1900).Z)(i,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"bg-white rounded shadow my-2 overflow-hidden"},[e._m(0),e._v(" "),n("div",{staticClass:"bg-gray-200 p-3 flex justify-end"},[n("ns-link",{attrs:{to:"/database",type:"info"}},[n("i",{staticClass:"las la-database"}),e._v(" Database Configuration")])],1)])}),[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"welcome-box border-b border-gray-300 p-3 text-gray-700"},[n("p",{staticClass:"text-gray-600 text-sm"},[e._v("Thank you for having choosed NexoPOS 4 for managing your store. This is the installation wizard that will guide you through the installation.")]),e._v(" "),n("div",{staticClass:"py-2"},[n("h2",{staticClass:"text-xl font-body text-gray-700"},[e._v("Remaining Steps")]),e._v(" "),n("ul",{staticClass:"text-gray-600 text-sm"},[n("li",[n("i",{staticClass:"las la-arrow-right"}),e._v(" Database Configuration")]),e._v(" "),n("li",[n("i",{staticClass:"las la-arrow-right"}),e._v(" Application Configuration")])])])])}],!1,null,null,null).exports},419:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});const i={data:function(){return{title:"",message:""}},computed:{size:function(){return this.$popupParams.size||"h-full w-full"}},mounted:function(){var e=this;this.title=this.$popupParams.title,this.message=this.$popupParams.message,this.$popup.event.subscribe((function(t){"click-overlay"===t.event&&(e.$popupParams.onAction(!1),e.$popup.close())}))},methods:{__:n(7389).__,emitAction:function(e){this.$popupParams.onAction(e),this.$popup.close()}}};const s=(0,n(1900).Z)(i,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"flex flex-col bg-white shadow-lg w-5/7-screen md:w-4/7-screen lg:w-2/7-screen",class:e.size,attrs:{id:"popup"}},[n("div",{staticClass:"flex items-center justify-center flex-col flex-auto p-4"},[n("h2",{staticClass:"text-xl md:text-3xl font-body text-gray-700 text-center"},[e._v(e._s(e.title))]),e._v(" "),n("p",{staticClass:"py-4 text-sm md:text-base text-gray-600 text-center"},[e._v(e._s(e.message))])]),e._v(" "),n("div",{staticClass:"flex border-t border-gray-200 text-gray-700"},[n("button",{staticClass:"hover:bg-gray-100 flex-auto w-1/2 h-16 flex items-center justify-center uppercase",on:{click:function(t){return e.emitAction(!0)}}},[e._v(e._s(e.__("Yes")))]),e._v(" "),n("hr",{staticClass:"border-r border-gray-200"}),e._v(" "),n("button",{staticClass:"hover:bg-gray-100 flex-auto w-1/2 h-16 flex items-center justify-center uppercase",on:{click:function(t){return e.emitAction(!1)}}},[e._v(e._s(e.__("No")))])])])}),[],!1,null,null,null).exports}},e=>{e.O(0,[898],(()=>{return t=5767,e(e.s=t);var t}));e.O()}]); //# sourceMappingURL=setup.min.js.map \ No newline at end of file diff --git a/public/js/update.min.js b/public/js/update.min.js index 2810c8d90..9689b33e5 100644 --- a/public/js/update.min.js +++ b/public/js/update.min.js @@ -1,2 +1,2 @@ -(self.webpackChunkNexoPOS_4x=self.webpackChunkNexoPOS_4x||[]).push([[775],{162:(e,t,n)=>{"use strict";n.d(t,{l:()=>W,kq:()=>Z,ih:()=>X,kX:()=>N});var r=n(6486),s=n(9669),i=n(2181),a=n(8345),o=n(9624),u=n(9248),c=n(230);function l(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{};return this._request("post",e,t,n)}},{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._request("get",e,void 0,t)}},{key:"delete",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._request("delete",e,void 0,t)}},{key:"put",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this._request("put",e,t,n)}},{key:"response",get:function(){return this._lastRequestData}},{key:"_request",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return t=Z.applyFilters("http-client-url",t.replace(/\/$/,"")),this._subject.next({identifier:"async.start",url:t,data:r}),new c.y((function(i){n._client[e](t,r,Object.assign(Object.assign({},n._client.defaults[e]),s)).then((function(e){n._lastRequestData=e,i.next(e.data),i.complete(),n._subject.next({identifier:"async.stop"})})).catch((function(e){var t;i.error((null===(t=e.response)||void 0===t?void 0:t.data)||e.response||e),n._subject.next({identifier:"async.stop"})}))}))}},{key:"subject",value:function(){return this._subject}},{key:"emit",value:function(e){var t=e.identifier,n=e.value;this._subject.next({identifier:t,value:n})}}])&&l(t.prototype,n),r&&l(t,r),e}(),p=n(3);function f(e,t){for(var n=0;n=1e3){for(var n,r=Math.floor((""+e).length/3),s=2;s>=1;s--){if(((n=parseFloat((0!=r?e/Math.pow(1e3,r):e).toPrecision(s)))+"").replace(/[^a-zA-Z 0-9]+/g,"").length<=2)break}n%1!=0&&(n=n.toFixed(1)),t=n+["","k","m","b","t"][r]}return t})),S=n(1356),O=n(9698);function P(e,t){for(var n=0;n0&&window.outerWidth<=480:this.breakpoint="xs";break;case window.outerWidth>480&&window.outerWidth<=640:this.breakpoint="sm";break;case window.outerWidth>640&&window.outerWidth<=1024:this.breakpoint="md";break;case window.outerWidth>1024&&window.outerWidth<=1280:this.breakpoint="lg";break;case window.outerWidth>1280:this.breakpoint="xl"}}}])&&L(t.prototype,n),r&&L(t,r),e}()),I=new m({sidebar:["xs","sm","md"].includes(B.breakpoint)?"hidden":"visible"});X.defineClient(s),window.nsEvent=W,window.nsHttpClient=X,window.nsSnackBar=N,window.nsCurrency=S.W,window.nsTruncate=O.b,window.nsRawCurrency=S.f,window.nsAbbreviate=C,window.nsState=I,window.nsUrl=U,window.nsScreen=B,window.ChartJS=i,window.EventEmitter=v,window.Popup=j.G,window.RxJS=w,window.FormValidation=x.Z,window.nsCrudHandler=R},1356:(e,t,n)=>{"use strict";n.d(t,{W:()=>c,f:()=>l});var r=n(538),s=n(2077),i=n.n(s),a=n(6740),o=n.n(a),u=new Array(parseInt(ns.currency.ns_currency_precision)).fill("").map((function(e){return 0})).join(""),c=r.default.filter("currency",(function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"full";switch(ns.currency.ns_currency_prefered){case"iso":t=ns.currency.ns_currency_iso;break;case"symbol":t=ns.currency.ns_currency_symbol}if("full"===r){var s={decimal:ns.currency.ns_currency_decimal_separator,separator:ns.currency.ns_currency_thousand_separator,precision:parseInt(ns.currency.ns_currency_precision),symbol:""};n=o()(e,s).format()}else n=i()(e).format("0.0a");return"".concat("before"===ns.currency.ns_currency_position?t:"").concat(n).concat("after"===ns.currency.ns_currency_position?t:"")})),l=function(e){var t="0.".concat(u);return parseFloat(i()(e).format(t))}},9698:(e,t,n)=>{"use strict";n.d(t,{b:()=>r});var r=n(538).default.filter("truncate",(function(e,t){return e?(e=e.toString()).length>t?e.substring(0,t)+"...":e:""}))},7266:(e,t,n)=>{"use strict";function r(e,t){for(var n=0;ns});var s=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,s;return t=e,(n=[{key:"validateFields",value:function(e){var t=this;return 0===e.map((function(e){return t.checkField(e),e.errors?0===e.errors.length:0})).filter((function(e){return!1===e})).length}},{key:"validateFieldsErrors",value:function(e){var t=this;return e.map((function(e){return t.checkField(e),e.errors})).flat()}},{key:"validateForm",value:function(e){e.main&&this.validateField(e.main);var t=[];for(var n in e.tabs){var r=[],s=this.validateFieldsErrors(e.tabs[n].fields);s.length>0&&r.push(s),e.tabs[n].errors=r.flat(),t.push(r.flat())}return t.flat().filter((function(e){return void 0!==e}))}},{key:"initializeTabs",value:function(e){var t=0;for(var n in e)0===t&&(e[n].active=!0),e[n].active=void 0!==e[n].active&&e[n].active,e[n].fields=this.createFields(e[n].fields),t++;return e}},{key:"validateField",value:function(e){return this.checkField(e)}},{key:"fieldsValid",value:function(e){return!(e.map((function(e){return e.errors&&e.errors.length>0})).filter((function(e){return e})).length>0)}},{key:"createFields",value:function(e){return e.map((function(e){return e.type=e.type||"text",e.errors=e.errors||[],e.disabled=e.disabled||!1,"custom"===e.type&&(e.component=nsExtraComponents[e.name]),e}))}},{key:"createForm",value:function(e){if(e.main&&(e.main=this.createFields([e.main])[0]),e.tabs)for(var t in e.tabs)e.tabs[t].fields=this.createFields(e.tabs[t].fields),e.tabs[t].errors=[];return e}},{key:"enableFields",value:function(e){return e.map((function(e){return e.disabled=!1}))}},{key:"disableFields",value:function(e){return e.map((function(e){return e.disabled=!0}))}},{key:"disableForm",value:function(e){for(var t in e.main&&(e.main.disabled=!0),e.tabs)e.tabs[t].fields.forEach((function(e){return e.disabled=!0}))}},{key:"enableForm",value:function(e){for(var t in e.main&&(e.main.disabled=!1),e.tabs)e.tabs[t].fields.forEach((function(e){return e.disabled=!1}))}},{key:"getValue",value:function(e){var t={};return e.forEach((function(e){t[e.name]=e.value})),t}},{key:"checkField",value:function(e){var t=this;return void 0!==e.validation&&(e.errors=[],this.detectValidationRules(e.validation).forEach((function(n){t.fieldPassCheck(e,n)}))),e}},{key:"extractForm",value:function(e){var t={};if(e.main&&(t[e.main.name]=e.main.value),e.tabs)for(var n in e.tabs)void 0===t[n]&&(t[n]={}),t[n]=this.extractFields(e.tabs[n].fields);return t}},{key:"extractFields",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.forEach((function(e){["multiselect"].includes(e.type)?t[e.name]=e.options.filter((function(e){return e.selected})).map((function(e){return e.value})):t[e.name]=e.value})),t}},{key:"detectValidationRules",value:function(e){var t=function(e){var t;return["email","required"].includes(e)?{identifier:e}:(t=/(min)\:([0-9])+/g.exec(e))||(t=/(max)\:([0-9])+/g.exec(e))?{identifier:t[1],value:t[2]}:e};return Array.isArray(e)?e.filter((function(e){return"string"==typeof e})).map(t):e.split("|").map(t)}},{key:"triggerError",value:function(e,t){if(t.errors){var n=function(n){var r=n.split(".").filter((function(e){return!/^\d+$/.test(e)}));2===r.length&&e.tabs[r[0]].fields.forEach((function(e){e.name===r[1]&&t.errors[n].forEach((function(t){var n={identifier:"invalid",invalid:!0,message:t,name:e.name};e.errors.push(n)}))})),n===e.main.name&&t.errors[n].forEach((function(t){e.main.errors.push({identifier:"invalid",invalid:!0,message:t,name:e.main.name})}))};for(var r in t.errors)n(r)}}},{key:"triggerFieldsErrors",value:function(e,t){if(t&&t.errors){var n=function(n){e.forEach((function(e){e.name===n&&t.errors[n].forEach((function(t){var n={identifier:"invalid",invalid:!0,message:t,name:e.name};e.errors.push(n)}))}))};for(var r in t.errors)n(r)}}},{key:"fieldPassCheck",value:function(e,t){if("required"===t.identifier){if(void 0===e.value||null===e.value||0===e.value.length)return e.errors.push({identifier:t.identifier,invalid:!0,name:e.name});e.errors.forEach((function(n,r){n.identifier===t.identifier&&!0===n.invalid&&e.errors.splice(r,1)}))}if("email"===t.identifier){if(!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(e.value))return e.errors.push({identifier:t.identifier,invalid:!0,name:e.name});e.errors.forEach((function(n,r){!0===n[t.identifier]&&e.errors.splice(r,1)}))}return e}}])&&r(t.prototype,n),s&&r(t,s),e}()},7389:(e,t,n)=>{"use strict";n.d(t,{__:()=>r,c:()=>s});var r=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"NexoPOS";return nsLanguage.getEntries(t)&&nsLanguage.getEntries(t)[e]||e},s=function(e,t){return nsLanguage.getEntries(t)&&nsLanguage.getEntries(t)[e]||e}},8603:(e,t,n)=>{"use strict";function r(){var e=this;Object.keys(this).includes("$popup")&&this.$popup.event.subscribe((function(t){"click-overlay"===t.event&&(e.$popupParams&&void 0!==e.$popupParams.reject&&e.$popupParams.reject(!1),e.$popup.close()),"press-esc"===t.event&&(e.$popupParams&&void 0!==e.$popupParams.reject&&e.$popupParams.reject(!1),e.$popup.close())}))}n.d(t,{Z:()=>r})},6386:(e,t,n)=>{"use strict";function r(e){void 0!==this.$popupParams.resolve&&this.$popupParams.reject&&(!1!==e?this.$popupParams.resolve(e):this.$popupParams.reject(e)),this.$popup.close()}n.d(t,{Z:()=>r})},2242:(e,t,n)=>{"use strict";n.d(t,{G:()=>a});var r=n(9248);function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};if(s(this,e),this.config={primarySelector:void 0,popupClass:"shadow-lg h-half w-1/2 bg-white"},this.container=document.createElement("div"),this.popupBody=document.createElement("div"),this.config=Object.assign(this.config,t),void 0===this.config.primarySelector&&document.querySelectorAll(".is-popup").length>0){var n=document.querySelectorAll(".is-popup").length;this.parentWrapper=document.querySelectorAll(".is-popup")[n-1]}else this.parentWrapper=document.querySelector("body").querySelectorAll("div")[0];this.event=new r.x}var t,n,a;return t=e,a=[{key:"show",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=new e(r);return s.open(t,n),s}}],(n=[{key:"open",value:function(e){var t,n,r,s=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=document.querySelector("body").querySelectorAll("div")[0];this.parentWrapper.style.filter="blur(4px)",a.style.filter="blur(6px)",this.container.setAttribute("class","absolute top-0 left-0 w-full h-full flex items-center justify-center is-popup"),this.container.addEventListener("click",(function(e){s.event.next({event:"click-overlay",value:!0}),e.stopPropagation()})),this.popupBody.addEventListener("click",(function(e){e.stopImmediatePropagation()})),this.container.style.background="rgb(51 51 51 / 20%)",this.container.id="popup-container-"+document.querySelectorAll(".is-popup").length,this.popupBody.setAttribute("class"," zoom-out-entrance"),this.popupBody.innerHTML='',this.container.appendChild(this.popupBody),document.body.appendChild(this.container);var o=Vue.extend(e);this.instance=new o({propsData:{popup:this}}),this.instance.template=(null===(t=null==e?void 0:e.options)||void 0===t?void 0:t.template)||void 0,this.instance.render=e.render||void 0,this.instance.methods=(null===(n=null==e?void 0:e.options)||void 0===n?void 0:n.methods)||(null==e?void 0:e.methods),this.instance.data=(null===(r=null==e?void 0:e.options)||void 0===r?void 0:r.data)||(null==e?void 0:e.data),this.instance.$popup=this,this.instance.$popupParams=i,this.instance.$mount("#".concat(this.container.id," .popup-body"))}},{key:"close",value:function(){var e=this;this.instance.$destroy(),this.event.unsubscribe(),this.parentWrapper.style.filter="blur(0px)";var t=document.querySelector("body").querySelectorAll("div")[0];document.querySelectorAll(".is-popup").length<=1&&(t.style.filter="blur(0px)"),this.popupBody.classList.remove("zoom-out-entrance"),this.popupBody.classList.add("zoom-in-exit"),this.container.classList.remove("is-popup"),setTimeout((function(){e.container.remove()}),300)}}])&&i(t.prototype,n),a&&i(t,a),e}()},9624:(e,t,n)=>{"use strict";n.d(t,{S:()=>i});var r=n(3260);function s(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"info"};return r.Observable.create((function(r){var i=n.__createSnack({message:e,label:t,type:s.type}),a=i.buttonNode,o=(i.textNode,i.snackWrapper,i.sampleSnack);a.addEventListener("click",(function(e){r.onNext(a),r.onCompleted(),o.remove()})),n.__startTimer(s.duration,o)}))}},{key:"error",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"error"};return this.show(e,t,Object.assign(Object.assign({},n),{type:"error"}))}},{key:"success",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"success"};return this.show(e,t,Object.assign(Object.assign({},n),{type:"success"}))}},{key:"info",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"info"};return this.show(e,t,Object.assign(Object.assign({},n),{type:"info"}))}},{key:"__startTimer",value:function(e,t){var n,r=function(){e>0&&!1!==e&&(n=setTimeout((function(){t.remove()}),e))};t.addEventListener("mouseenter",(function(){clearTimeout(n)})),t.addEventListener("mouseleave",(function(){r()})),r()}},{key:"__createSnack",value:function(e){var t=e.message,n=e.label,r=e.type,s=void 0===r?"info":r,i=document.getElementById("snack-wrapper")||document.createElement("div"),a=document.createElement("div"),o=document.createElement("p"),u=document.createElement("div"),c=document.createElement("button"),l="",d="";switch(s){case"info":l="text-white hover:bg-blue-400 bg-blue-500",d="bg-gray-900 text-white";break;case"error":l="text-red-700 hover:bg-white bg-white",d="bg-red-500 text-white";break;case"success":l="text-green-700 hover:bg-white bg-white",d="bg-green-500 text-white"}return o.textContent=t,n&&(c.textContent=n,c.setAttribute("class","px-3 py-2 shadow rounded-lg font-bold ".concat(l)),u.appendChild(c)),a.appendChild(o),a.appendChild(u),a.setAttribute("class","md:rounded-lg py-2 px-3 md:w-2/5 w-full z-10 md:my-2 shadow-lg flex justify-between items-center zoom-in-entrance anim-duration-300 ".concat(d)),i.appendChild(a),null===document.getElementById("snack-wrapper")&&(i.setAttribute("id","snack-wrapper"),i.setAttribute("class","absolute bottom-0 w-full flex justify-between items-center flex-col"),document.body.appendChild(i)),{snackWrapper:i,sampleSnack:a,buttonsWrapper:u,buttonNode:c,textNode:o}}}])&&s(t.prototype,n),i&&s(t,i),e}()},6542:(e,t,n)=>{"use strict";var r=n(538),s=n(7567).Z;console.log(s),window.nsUpdate=new r.default({el:"#update-app",components:{nsDatabaseUpdate:s}})},6700:(e,t,n)=>{var r={"./af":2786,"./af.js":2786,"./ar":867,"./ar-dz":4130,"./ar-dz.js":4130,"./ar-kw":6135,"./ar-kw.js":6135,"./ar-ly":6440,"./ar-ly.js":6440,"./ar-ma":7702,"./ar-ma.js":7702,"./ar-sa":6040,"./ar-sa.js":6040,"./ar-tn":7100,"./ar-tn.js":7100,"./ar.js":867,"./az":1083,"./az.js":1083,"./be":9808,"./be.js":9808,"./bg":8338,"./bg.js":8338,"./bm":7438,"./bm.js":7438,"./bn":8905,"./bn-bd":6225,"./bn-bd.js":6225,"./bn.js":8905,"./bo":1560,"./bo.js":1560,"./br":1278,"./br.js":1278,"./bs":622,"./bs.js":622,"./ca":2468,"./ca.js":2468,"./cs":5822,"./cs.js":5822,"./cv":877,"./cv.js":877,"./cy":7373,"./cy.js":7373,"./da":4780,"./da.js":4780,"./de":9740,"./de-at":217,"./de-at.js":217,"./de-ch":894,"./de-ch.js":894,"./de.js":9740,"./dv":5300,"./dv.js":5300,"./el":837,"./el.js":837,"./en-au":8348,"./en-au.js":8348,"./en-ca":7925,"./en-ca.js":7925,"./en-gb":2243,"./en-gb.js":2243,"./en-ie":6436,"./en-ie.js":6436,"./en-il":7207,"./en-il.js":7207,"./en-in":4175,"./en-in.js":4175,"./en-nz":6319,"./en-nz.js":6319,"./en-sg":1662,"./en-sg.js":1662,"./eo":2915,"./eo.js":2915,"./es":7093,"./es-do":5251,"./es-do.js":5251,"./es-mx":6112,"./es-mx.js":6112,"./es-us":1146,"./es-us.js":1146,"./es.js":7093,"./et":5603,"./et.js":5603,"./eu":7763,"./eu.js":7763,"./fa":6959,"./fa.js":6959,"./fi":1897,"./fi.js":1897,"./fil":2549,"./fil.js":2549,"./fo":4694,"./fo.js":4694,"./fr":4470,"./fr-ca":3049,"./fr-ca.js":3049,"./fr-ch":2330,"./fr-ch.js":2330,"./fr.js":4470,"./fy":5044,"./fy.js":5044,"./ga":9295,"./ga.js":9295,"./gd":2101,"./gd.js":2101,"./gl":8794,"./gl.js":8794,"./gom-deva":7884,"./gom-deva.js":7884,"./gom-latn":3168,"./gom-latn.js":3168,"./gu":5349,"./gu.js":5349,"./he":4206,"./he.js":4206,"./hi":94,"./hi.js":94,"./hr":316,"./hr.js":316,"./hu":2138,"./hu.js":2138,"./hy-am":1423,"./hy-am.js":1423,"./id":9218,"./id.js":9218,"./is":135,"./is.js":135,"./it":626,"./it-ch":150,"./it-ch.js":150,"./it.js":626,"./ja":9183,"./ja.js":9183,"./jv":4286,"./jv.js":4286,"./ka":2105,"./ka.js":2105,"./kk":7772,"./kk.js":7772,"./km":8758,"./km.js":8758,"./kn":9282,"./kn.js":9282,"./ko":3730,"./ko.js":3730,"./ku":1408,"./ku.js":1408,"./ky":3291,"./ky.js":3291,"./lb":6841,"./lb.js":6841,"./lo":5466,"./lo.js":5466,"./lt":7010,"./lt.js":7010,"./lv":7595,"./lv.js":7595,"./me":9861,"./me.js":9861,"./mi":5493,"./mi.js":5493,"./mk":5966,"./mk.js":5966,"./ml":7341,"./ml.js":7341,"./mn":5115,"./mn.js":5115,"./mr":370,"./mr.js":370,"./ms":9847,"./ms-my":1237,"./ms-my.js":1237,"./ms.js":9847,"./mt":2126,"./mt.js":2126,"./my":6165,"./my.js":6165,"./nb":4924,"./nb.js":4924,"./ne":6744,"./ne.js":6744,"./nl":3901,"./nl-be":9814,"./nl-be.js":9814,"./nl.js":3901,"./nn":3877,"./nn.js":3877,"./oc-lnc":2135,"./oc-lnc.js":2135,"./pa-in":5858,"./pa-in.js":5858,"./pl":4495,"./pl.js":4495,"./pt":9520,"./pt-br":7971,"./pt-br.js":7971,"./pt.js":9520,"./ro":6459,"./ro.js":6459,"./ru":238,"./ru.js":238,"./sd":950,"./sd.js":950,"./se":490,"./se.js":490,"./si":124,"./si.js":124,"./sk":4249,"./sk.js":4249,"./sl":4985,"./sl.js":4985,"./sq":1104,"./sq.js":1104,"./sr":9131,"./sr-cyrl":9915,"./sr-cyrl.js":9915,"./sr.js":9131,"./ss":5893,"./ss.js":5893,"./sv":8760,"./sv.js":8760,"./sw":1172,"./sw.js":1172,"./ta":7333,"./ta.js":7333,"./te":3110,"./te.js":3110,"./tet":2095,"./tet.js":2095,"./tg":7321,"./tg.js":7321,"./th":9041,"./th.js":9041,"./tk":9005,"./tk.js":9005,"./tl-ph":5768,"./tl-ph.js":5768,"./tlh":9444,"./tlh.js":9444,"./tr":2397,"./tr.js":2397,"./tzl":8254,"./tzl.js":8254,"./tzm":1106,"./tzm-latn":699,"./tzm-latn.js":699,"./tzm.js":1106,"./ug-cn":9288,"./ug-cn.js":9288,"./uk":7691,"./uk.js":7691,"./ur":3795,"./ur.js":3795,"./uz":6791,"./uz-latn":588,"./uz-latn.js":588,"./uz.js":6791,"./vi":5666,"./vi.js":5666,"./x-pseudo":4378,"./x-pseudo.js":4378,"./yo":5805,"./yo.js":5805,"./zh-cn":3839,"./zh-cn.js":3839,"./zh-hk":5726,"./zh-hk.js":5726,"./zh-mo":9807,"./zh-mo.js":9807,"./zh-tw":4152,"./zh-tw.js":4152};function s(e){var t=i(e);return n(t)}function i(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}s.keys=function(){return Object.keys(r)},s.resolve=i,e.exports=s,s.id=6700},7567:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(7757),s=n.n(r),i=n(7389),a=n(162);function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t,n,r,s,i,a){try{var o=e[i](a),u=o.value}catch(e){return void n(e)}o.done?t(u):Promise.resolve(u).then(r,s)}const c={name:"ns-database-update",data:function(){return{files:Update.files,returnLink:Update.returnLink,modules:Update.modules,updating:!1,xXsrfToken:null,updatingModule:!1,error:!1,lastErrorMessage:"",index:0}},computed:{totalModules:function(){return Object.values(this.modules).length}},mounted:function(){var e=this;a.ih.get("/sanctum/csrf-cookie").subscribe((function(t){try{e.xXsrfToken=a.ih.response.config.headers["X-XSRF-TOKEN"],e.proceedUpdate()}catch(e){a.kX.error(e.message).subscribe()}}))},methods:{proceedUpdate:function(){var e,t=this;return(e=s().mark((function e(){var n,r,u,c,l,d,p;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.updating=!0,n=s().mark((function e(n){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t.index=parseInt(n)+1,e.next=4,new Promise((function(e,r){a.ih.post("/api/nexopos/v4/update",{file:t.files[n]},{headers:{"X-XSRF-TOKEN":t.xXsrfToken}}).subscribe(e,r)}));case 4:e.sent,e.next=13;break;case 7:return e.prev=7,e.t0=e.catch(0),t.updating=!1,t.error=!0,t.lastErrorMessage=e.t0.message||(0,i.__)("An unexpected error occured"),e.abrupt("return",{v:a.kX.error(e.t0.message).subscribe()});case 13:case"end":return e.stop()}}),e,null,[[0,7]])})),e.t0=s().keys(t.files);case 3:if((e.t1=e.t0()).done){e.next=11;break}return r=e.t1.value,e.delegateYield(n(r),"t2",6);case 6:if("object"!==o(u=e.t2)){e.next=9;break}return e.abrupt("return",u.v);case 9:e.next=3;break;case 11:if(t.index=0,!(Object.values(t.modules).length>0)){e.next=25;break}t.updatingModule=!0,c=0,l=s().mark((function e(n){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,c+=1,t.index=c,e.next=5,new Promise((function(e,r){a.ih.post("/api/nexopos/v4/update",{module:t.modules[n]},{headers:{"X-XSRF-TOKEN":t.xXsrfToken}}).subscribe(e,r)}));case 5:e.sent,e.next=14;break;case 8:return e.prev=8,e.t0=e.catch(0),t.updating=!1,t.error=!0,t.lastErrorMessage=e.t0.message||(0,i.__)("An unexpected error occured"),e.abrupt("return",{v:a.kX.error(e.t0.message).subscribe()});case 14:case"end":return e.stop()}}),e,null,[[0,8]])})),e.t3=s().keys(t.modules);case 17:if((e.t4=e.t3()).done){e.next=25;break}return d=e.t4.value,e.delegateYield(l(d),"t5",20);case 20:if("object"!==o(p=e.t5)){e.next=23;break}return e.abrupt("return",p.v);case 23:e.next=17;break;case 25:t.error=!1,t.updating=!1,document.location=t.returnLink;case 28:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,s){var i=e.apply(t,n);function a(e){u(i,r,s,a,o,"next",e)}function o(e){u(i,r,s,a,o,"throw",e)}a(void 0)}))})()}}};const l=(0,n(1900).Z)(c,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"container mx-auto flex-auto items-center justify-center flex"},[n("div",{staticClass:"w-full md:w-2/3 lg:w-1/3",attrs:{id:"sign-in-box"}},[e._m(0),e._v(" "),n("div",{staticClass:"my-3 rounded shadow bg-white"},[e._m(1),e._v(" "),n("div",{staticClass:"p-2"},[n("p",{staticClass:"text-center text-sm text-gray-600 py-4"},[e._v("In order to keep NexoPOS running smoothly with updates, we need to proceed to the database migration. In fact you don't need to do any action, just wait until the process is done and you'll be redirected.")]),e._v(" "),e.error?n("div",{staticClass:"border-l-4 text-sm border-red-600 bg-red-200 p-4 text-gray-700"},[n("p",[e._v("\n Looks like an error has occured during the update. Usually, giving another shot should fix that. However, if you still don't get any chance.\n Please report this message to the support : \n ")]),e._v(" "),n("pre",{staticClass:"rounded whitespace-pre-wrap bg-gray-700 text-white my-2 p-2"},[e._v(e._s(e.lastErrorMessage))])]):e._e()]),e._v(" "),n("div",{staticClass:"border-t border-gray-200 p-2 flex justify-between"},[n("div",[e.error?n("button",{staticClass:"rounded bg-red-400 shadow-inner text-white p-2",on:{click:function(t){return e.proceedUpdate()}}},[n("i",{staticClass:"las la-sync"}),e._v(" "),n("span",[e._v("Try Again")])]):e._e()]),e._v(" "),n("div",{staticClass:"flex"},[e.updating?n("button",{staticClass:"rounded bg-blue-400 shadow-inner text-white p-2"},[n("i",{staticClass:"las la-sync animate-spin"}),e._v(" "),e.updatingModule?e._e():n("span",[e._v("Updating...")]),e._v(" "),e.updatingModule?e._e():n("span",{staticClass:"mr-1"},[e._v(e._s(e.index)+"/"+e._s(e.files.length))]),e._v(" "),e.updatingModule?n("span",[e._v("Updating Modules...")]):e._e(),e._v(" "),e.updatingModule?n("span",{staticClass:"mr-1"},[e._v(e._s(e.index)+"/"+e._s(e.totalModules))]):e._e()]):e._e(),e._v(" "),e.updating?e._e():n("a",{staticClass:"rounded bg-blue-400 shadow-inner text-white p-2",attrs:{href:e.returnLink}},[n("i",{staticClass:"las la-undo"}),e._v(" "),n("span",[e._v("Return")])])])])])])])}),[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"flex justify-center items-center py-6"},[t("img",{staticClass:"w-32",attrs:{src:"/svg/nexopos-variant-1.svg",alt:"NexoPOS"}})])},function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"border-b border-gray-200 py-4 flex items-center justify-center"},[n("h3",{staticClass:"text-xl font-bold text-gray-700"},[e._v("Datebase Update")])])}],!1,null,null,null).exports}},e=>{e.O(0,[898],(()=>{return t=6542,e(e.s=t);var t}));e.O()}]); +(self.webpackChunkNexoPOS_4x=self.webpackChunkNexoPOS_4x||[]).push([[775],{162:(e,t,n)=>{"use strict";n.d(t,{l:()=>W,kq:()=>Z,ih:()=>X,kX:()=>N});var r=n(6486),s=n(9669),i=n(2181),a=n(8345),o=n(9624),u=n(9248),c=n(230);function l(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{};return this._request("post",e,t,n)}},{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._request("get",e,void 0,t)}},{key:"delete",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._request("delete",e,void 0,t)}},{key:"put",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this._request("put",e,t,n)}},{key:"response",get:function(){return this._lastRequestData}},{key:"_request",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return t=Z.applyFilters("http-client-url",t.replace(/\/$/,"")),this._subject.next({identifier:"async.start",url:t,data:r}),new c.y((function(i){n._client[e](t,r,Object.assign(Object.assign({},n._client.defaults[e]),s)).then((function(e){n._lastRequestData=e,i.next(e.data),i.complete(),n._subject.next({identifier:"async.stop"})})).catch((function(e){var t;i.error((null===(t=e.response)||void 0===t?void 0:t.data)||e.response||e),n._subject.next({identifier:"async.stop"})}))}))}},{key:"subject",value:function(){return this._subject}},{key:"emit",value:function(e){var t=e.identifier,n=e.value;this._subject.next({identifier:t,value:n})}}])&&l(t.prototype,n),r&&l(t,r),e}(),p=n(3);function f(e,t){for(var n=0;n=1e3){for(var n,r=Math.floor((""+e).length/3),s=2;s>=1;s--){if(((n=parseFloat((0!=r?e/Math.pow(1e3,r):e).toPrecision(s)))+"").replace(/[^a-zA-Z 0-9]+/g,"").length<=2)break}n%1!=0&&(n=n.toFixed(1)),t=n+["","k","m","b","t"][r]}return t})),S=n(1356),O=n(9698);function P(e,t){for(var n=0;n0&&window.outerWidth<=480:this.breakpoint="xs";break;case window.outerWidth>480&&window.outerWidth<=640:this.breakpoint="sm";break;case window.outerWidth>640&&window.outerWidth<=1024:this.breakpoint="md";break;case window.outerWidth>1024&&window.outerWidth<=1280:this.breakpoint="lg";break;case window.outerWidth>1280:this.breakpoint="xl"}}}])&&L(t.prototype,n),r&&L(t,r),e}()),I=new m({sidebar:["xs","sm","md"].includes(B.breakpoint)?"hidden":"visible"});X.defineClient(s),window.nsEvent=W,window.nsHttpClient=X,window.nsSnackBar=N,window.nsCurrency=S.W,window.nsTruncate=O.b,window.nsRawCurrency=S.f,window.nsAbbreviate=C,window.nsState=I,window.nsUrl=U,window.nsScreen=B,window.ChartJS=i,window.EventEmitter=v,window.Popup=j.G,window.RxJS=w,window.FormValidation=x.Z,window.nsCrudHandler=R},1356:(e,t,n)=>{"use strict";n.d(t,{W:()=>c,f:()=>l});var r=n(538),s=n(2077),i=n.n(s),a=n(6740),o=n.n(a),u=new Array(parseInt(ns.currency.ns_currency_precision)).fill("").map((function(e){return 0})).join(""),c=r.default.filter("currency",(function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"full";switch(ns.currency.ns_currency_prefered){case"iso":t=ns.currency.ns_currency_iso;break;case"symbol":t=ns.currency.ns_currency_symbol}if("full"===r){var s={decimal:ns.currency.ns_currency_decimal_separator,separator:ns.currency.ns_currency_thousand_separator,precision:parseInt(ns.currency.ns_currency_precision),symbol:""};n=o()(e,s).format()}else n=i()(e).format("0.0a");return"".concat("before"===ns.currency.ns_currency_position?t:"").concat(n).concat("after"===ns.currency.ns_currency_position?t:"")})),l=function(e){var t="0.".concat(u);return parseFloat(i()(e).format(t))}},9698:(e,t,n)=>{"use strict";n.d(t,{b:()=>r});var r=n(538).default.filter("truncate",(function(e,t){return e?(e=e.toString()).length>t?e.substring(0,t)+"...":e:""}))},7266:(e,t,n)=>{"use strict";function r(e,t){for(var n=0;ns});var s=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,s;return t=e,(n=[{key:"validateFields",value:function(e){var t=this;return 0===e.map((function(e){return t.checkField(e),e.errors?0===e.errors.length:0})).filter((function(e){return!1===e})).length}},{key:"validateFieldsErrors",value:function(e){var t=this;return e.map((function(e){return t.checkField(e),e.errors})).flat()}},{key:"validateForm",value:function(e){e.main&&this.validateField(e.main);var t=[];for(var n in e.tabs){var r=[],s=this.validateFieldsErrors(e.tabs[n].fields);s.length>0&&r.push(s),e.tabs[n].errors=r.flat(),t.push(r.flat())}return t.flat().filter((function(e){return void 0!==e}))}},{key:"initializeTabs",value:function(e){var t=0;for(var n in e)0===t&&(e[n].active=!0),e[n].active=void 0!==e[n].active&&e[n].active,e[n].fields=this.createFields(e[n].fields),t++;return e}},{key:"validateField",value:function(e){return this.checkField(e)}},{key:"fieldsValid",value:function(e){return!(e.map((function(e){return e.errors&&e.errors.length>0})).filter((function(e){return e})).length>0)}},{key:"createFields",value:function(e){return e.map((function(e){return e.type=e.type||"text",e.errors=e.errors||[],e.disabled=e.disabled||!1,"custom"===e.type&&(e.component=nsExtraComponents[e.name]),e}))}},{key:"createForm",value:function(e){if(e.main&&(e.main=this.createFields([e.main])[0]),e.tabs)for(var t in e.tabs)e.tabs[t].fields=this.createFields(e.tabs[t].fields),e.tabs[t].errors=[];return e}},{key:"enableFields",value:function(e){return e.map((function(e){return e.disabled=!1}))}},{key:"disableFields",value:function(e){return e.map((function(e){return e.disabled=!0}))}},{key:"disableForm",value:function(e){for(var t in e.main&&(e.main.disabled=!0),e.tabs)e.tabs[t].fields.forEach((function(e){return e.disabled=!0}))}},{key:"enableForm",value:function(e){for(var t in e.main&&(e.main.disabled=!1),e.tabs)e.tabs[t].fields.forEach((function(e){return e.disabled=!1}))}},{key:"getValue",value:function(e){var t={};return e.forEach((function(e){t[e.name]=e.value})),t}},{key:"checkField",value:function(e){var t=this;return void 0!==e.validation&&(e.errors=[],this.detectValidationRules(e.validation).forEach((function(n){t.fieldPassCheck(e,n)}))),e}},{key:"extractForm",value:function(e){var t={};if(e.main&&(t[e.main.name]=e.main.value),e.tabs)for(var n in e.tabs)void 0===t[n]&&(t[n]={}),t[n]=this.extractFields(e.tabs[n].fields);return t}},{key:"extractFields",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.forEach((function(e){["multiselect"].includes(e.type)?t[e.name]=e.options.filter((function(e){return e.selected})).map((function(e){return e.value})):t[e.name]=e.value})),t}},{key:"detectValidationRules",value:function(e){var t=function(e){var t;return["email","required"].includes(e)?{identifier:e}:(t=/(min)\:([0-9])+/g.exec(e))||(t=/(max)\:([0-9])+/g.exec(e))?{identifier:t[1],value:t[2]}:e};return Array.isArray(e)?e.filter((function(e){return"string"==typeof e})).map(t):e.split("|").map(t)}},{key:"triggerError",value:function(e,t){if(t.errors){var n=function(n){var r=n.split(".").filter((function(e){return!/^\d+$/.test(e)}));2===r.length&&e.tabs[r[0]].fields.forEach((function(e){e.name===r[1]&&t.errors[n].forEach((function(t){var n={identifier:"invalid",invalid:!0,message:t,name:e.name};e.errors.push(n)}))})),n===e.main.name&&t.errors[n].forEach((function(t){e.main.errors.push({identifier:"invalid",invalid:!0,message:t,name:e.main.name})}))};for(var r in t.errors)n(r)}}},{key:"triggerFieldsErrors",value:function(e,t){if(t&&t.errors){var n=function(n){e.forEach((function(e){e.name===n&&t.errors[n].forEach((function(t){var n={identifier:"invalid",invalid:!0,message:t,name:e.name};e.errors.push(n)}))}))};for(var r in t.errors)n(r)}}},{key:"fieldPassCheck",value:function(e,t){if("required"===t.identifier){if(void 0===e.value||null===e.value||0===e.value.length)return e.errors.push({identifier:t.identifier,invalid:!0,name:e.name});e.errors.forEach((function(n,r){n.identifier===t.identifier&&!0===n.invalid&&e.errors.splice(r,1)}))}if("email"===t.identifier){if(!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(e.value))return e.errors.push({identifier:t.identifier,invalid:!0,name:e.name});e.errors.forEach((function(n,r){!0===n[t.identifier]&&e.errors.splice(r,1)}))}return e}}])&&r(t.prototype,n),s&&r(t,s),e}()},7389:(e,t,n)=>{"use strict";n.d(t,{__:()=>r,c:()=>s});var r=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"NexoPOS";return nsLanguage.getEntries(t)&&nsLanguage.getEntries(t)[e]||e},s=function(e,t){return nsLanguage.getEntries(t)&&nsLanguage.getEntries(t)[e]||e}},8603:(e,t,n)=>{"use strict";function r(){var e=this;Object.keys(this).includes("$popup")&&this.$popup.event.subscribe((function(t){"click-overlay"===t.event&&(e.$popupParams&&void 0!==e.$popupParams.reject&&e.$popupParams.reject(!1),e.$popup.close()),"press-esc"===t.event&&(e.$popupParams&&void 0!==e.$popupParams.reject&&e.$popupParams.reject(!1),e.$popup.close())}))}n.d(t,{Z:()=>r})},6386:(e,t,n)=>{"use strict";function r(e){void 0!==this.$popupParams.resolve&&this.$popupParams.reject&&(!1!==e?this.$popupParams.resolve(e):this.$popupParams.reject(e)),this.$popup.close()}n.d(t,{Z:()=>r})},2242:(e,t,n)=>{"use strict";n.d(t,{G:()=>a});var r=n(9248);function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};if(s(this,e),this.config={primarySelector:void 0,popupClass:"shadow-lg h-half w-1/2 bg-white"},this.container=document.createElement("div"),this.popupBody=document.createElement("div"),this.config=Object.assign(this.config,t),void 0===this.config.primarySelector&&document.querySelectorAll(".is-popup").length>0){var n=document.querySelectorAll(".is-popup").length;this.parentWrapper=document.querySelectorAll(".is-popup")[n-1]}else this.parentWrapper=document.querySelector("body").querySelectorAll("div")[0];this.event=new r.x}var t,n,a;return t=e,a=[{key:"show",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=new e(r);return s.open(t,n),s}}],(n=[{key:"open",value:function(e){var t,n,r,s=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=document.querySelector("body").querySelectorAll("div")[0];this.parentWrapper.style.filter="blur(4px)",a.style.filter="blur(6px)",this.container.setAttribute("class","absolute top-0 left-0 w-full h-full flex items-center justify-center is-popup"),this.container.addEventListener("click",(function(e){s.event.next({event:"click-overlay",value:!0}),e.stopPropagation()})),this.popupBody.addEventListener("click",(function(e){e.stopImmediatePropagation()})),this.container.style.background="rgb(51 51 51 / 20%)",this.container.id="popup-container-"+document.querySelectorAll(".is-popup").length,this.popupBody.setAttribute("class"," zoom-out-entrance"),this.popupBody.innerHTML='',this.container.appendChild(this.popupBody),document.body.appendChild(this.container);var o=Vue.extend(e);this.instance=new o({propsData:{popup:this}}),this.instance.template=(null===(t=null==e?void 0:e.options)||void 0===t?void 0:t.template)||void 0,this.instance.render=e.render||void 0,this.instance.methods=(null===(n=null==e?void 0:e.options)||void 0===n?void 0:n.methods)||(null==e?void 0:e.methods),this.instance.data=(null===(r=null==e?void 0:e.options)||void 0===r?void 0:r.data)||(null==e?void 0:e.data),this.instance.$popup=this,this.instance.$popupParams=i,this.instance.$mount("#".concat(this.container.id," .popup-body"))}},{key:"close",value:function(){var e=this;this.instance.$destroy(),this.event.unsubscribe(),this.parentWrapper.style.filter="blur(0px)";var t=document.querySelector("body").querySelectorAll("div")[0];document.querySelectorAll(".is-popup").length<=1&&(t.style.filter="blur(0px)"),this.popupBody.classList.remove("zoom-out-entrance"),this.popupBody.classList.add("zoom-in-exit"),this.container.classList.remove("is-popup"),setTimeout((function(){e.container.remove()}),300)}}])&&i(t.prototype,n),a&&i(t,a),e}()},9624:(e,t,n)=>{"use strict";n.d(t,{S:()=>i});var r=n(3260);function s(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"info"};return r.Observable.create((function(r){var i=n.__createSnack({message:e,label:t,type:s.type}),a=i.buttonNode,o=(i.textNode,i.snackWrapper,i.sampleSnack);a.addEventListener("click",(function(e){r.onNext(a),r.onCompleted(),o.remove()})),n.__startTimer(s.duration,o)}))}},{key:"error",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"error"};return this.show(e,t,Object.assign(Object.assign({},n),{type:"error"}))}},{key:"success",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"success"};return this.show(e,t,Object.assign(Object.assign({},n),{type:"success"}))}},{key:"info",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{duration:3e3,type:"info"};return this.show(e,t,Object.assign(Object.assign({},n),{type:"info"}))}},{key:"__startTimer",value:function(e,t){var n,r=function(){e>0&&!1!==e&&(n=setTimeout((function(){t.remove()}),e))};t.addEventListener("mouseenter",(function(){clearTimeout(n)})),t.addEventListener("mouseleave",(function(){r()})),r()}},{key:"__createSnack",value:function(e){var t=e.message,n=e.label,r=e.type,s=void 0===r?"info":r,i=document.getElementById("snack-wrapper")||document.createElement("div"),a=document.createElement("div"),o=document.createElement("p"),u=document.createElement("div"),c=document.createElement("button"),l="",d="";switch(s){case"info":l="text-white hover:bg-blue-400 bg-blue-500",d="bg-gray-900 text-white";break;case"error":l="text-red-700 hover:bg-white bg-white",d="bg-red-500 text-white";break;case"success":l="text-green-700 hover:bg-white bg-white",d="bg-green-500 text-white"}return o.textContent=t,n&&(c.textContent=n,c.setAttribute("class","px-3 py-2 shadow rounded uppercase ".concat(l)),u.appendChild(c)),a.appendChild(o),a.appendChild(u),a.setAttribute("class","md:rounded py-2 px-3 md:w-2/5 w-full z-10 md:my-2 shadow-lg flex justify-between items-center zoom-in-entrance anim-duration-300 ".concat(d)),i.appendChild(a),null===document.getElementById("snack-wrapper")&&(i.setAttribute("id","snack-wrapper"),i.setAttribute("class","absolute bottom-0 w-full flex justify-between items-center flex-col"),document.body.appendChild(i)),{snackWrapper:i,sampleSnack:a,buttonsWrapper:u,buttonNode:c,textNode:o}}}])&&s(t.prototype,n),i&&s(t,i),e}()},6542:(e,t,n)=>{"use strict";var r=n(538),s=n(7567).Z;console.log(s),window.nsUpdate=new r.default({el:"#update-app",components:{nsDatabaseUpdate:s}})},6700:(e,t,n)=>{var r={"./af":2786,"./af.js":2786,"./ar":867,"./ar-dz":4130,"./ar-dz.js":4130,"./ar-kw":6135,"./ar-kw.js":6135,"./ar-ly":6440,"./ar-ly.js":6440,"./ar-ma":7702,"./ar-ma.js":7702,"./ar-sa":6040,"./ar-sa.js":6040,"./ar-tn":7100,"./ar-tn.js":7100,"./ar.js":867,"./az":1083,"./az.js":1083,"./be":9808,"./be.js":9808,"./bg":8338,"./bg.js":8338,"./bm":7438,"./bm.js":7438,"./bn":8905,"./bn-bd":6225,"./bn-bd.js":6225,"./bn.js":8905,"./bo":1560,"./bo.js":1560,"./br":1278,"./br.js":1278,"./bs":622,"./bs.js":622,"./ca":2468,"./ca.js":2468,"./cs":5822,"./cs.js":5822,"./cv":877,"./cv.js":877,"./cy":7373,"./cy.js":7373,"./da":4780,"./da.js":4780,"./de":9740,"./de-at":217,"./de-at.js":217,"./de-ch":894,"./de-ch.js":894,"./de.js":9740,"./dv":5300,"./dv.js":5300,"./el":837,"./el.js":837,"./en-au":8348,"./en-au.js":8348,"./en-ca":7925,"./en-ca.js":7925,"./en-gb":2243,"./en-gb.js":2243,"./en-ie":6436,"./en-ie.js":6436,"./en-il":7207,"./en-il.js":7207,"./en-in":4175,"./en-in.js":4175,"./en-nz":6319,"./en-nz.js":6319,"./en-sg":1662,"./en-sg.js":1662,"./eo":2915,"./eo.js":2915,"./es":7093,"./es-do":5251,"./es-do.js":5251,"./es-mx":6112,"./es-mx.js":6112,"./es-us":1146,"./es-us.js":1146,"./es.js":7093,"./et":5603,"./et.js":5603,"./eu":7763,"./eu.js":7763,"./fa":6959,"./fa.js":6959,"./fi":1897,"./fi.js":1897,"./fil":2549,"./fil.js":2549,"./fo":4694,"./fo.js":4694,"./fr":4470,"./fr-ca":3049,"./fr-ca.js":3049,"./fr-ch":2330,"./fr-ch.js":2330,"./fr.js":4470,"./fy":5044,"./fy.js":5044,"./ga":9295,"./ga.js":9295,"./gd":2101,"./gd.js":2101,"./gl":8794,"./gl.js":8794,"./gom-deva":7884,"./gom-deva.js":7884,"./gom-latn":3168,"./gom-latn.js":3168,"./gu":5349,"./gu.js":5349,"./he":4206,"./he.js":4206,"./hi":94,"./hi.js":94,"./hr":316,"./hr.js":316,"./hu":2138,"./hu.js":2138,"./hy-am":1423,"./hy-am.js":1423,"./id":9218,"./id.js":9218,"./is":135,"./is.js":135,"./it":626,"./it-ch":150,"./it-ch.js":150,"./it.js":626,"./ja":9183,"./ja.js":9183,"./jv":4286,"./jv.js":4286,"./ka":2105,"./ka.js":2105,"./kk":7772,"./kk.js":7772,"./km":8758,"./km.js":8758,"./kn":9282,"./kn.js":9282,"./ko":3730,"./ko.js":3730,"./ku":1408,"./ku.js":1408,"./ky":3291,"./ky.js":3291,"./lb":6841,"./lb.js":6841,"./lo":5466,"./lo.js":5466,"./lt":7010,"./lt.js":7010,"./lv":7595,"./lv.js":7595,"./me":9861,"./me.js":9861,"./mi":5493,"./mi.js":5493,"./mk":5966,"./mk.js":5966,"./ml":7341,"./ml.js":7341,"./mn":5115,"./mn.js":5115,"./mr":370,"./mr.js":370,"./ms":9847,"./ms-my":1237,"./ms-my.js":1237,"./ms.js":9847,"./mt":2126,"./mt.js":2126,"./my":6165,"./my.js":6165,"./nb":4924,"./nb.js":4924,"./ne":6744,"./ne.js":6744,"./nl":3901,"./nl-be":9814,"./nl-be.js":9814,"./nl.js":3901,"./nn":3877,"./nn.js":3877,"./oc-lnc":2135,"./oc-lnc.js":2135,"./pa-in":5858,"./pa-in.js":5858,"./pl":4495,"./pl.js":4495,"./pt":9520,"./pt-br":7971,"./pt-br.js":7971,"./pt.js":9520,"./ro":6459,"./ro.js":6459,"./ru":238,"./ru.js":238,"./sd":950,"./sd.js":950,"./se":490,"./se.js":490,"./si":124,"./si.js":124,"./sk":4249,"./sk.js":4249,"./sl":4985,"./sl.js":4985,"./sq":1104,"./sq.js":1104,"./sr":9131,"./sr-cyrl":9915,"./sr-cyrl.js":9915,"./sr.js":9131,"./ss":5893,"./ss.js":5893,"./sv":8760,"./sv.js":8760,"./sw":1172,"./sw.js":1172,"./ta":7333,"./ta.js":7333,"./te":3110,"./te.js":3110,"./tet":2095,"./tet.js":2095,"./tg":7321,"./tg.js":7321,"./th":9041,"./th.js":9041,"./tk":9005,"./tk.js":9005,"./tl-ph":5768,"./tl-ph.js":5768,"./tlh":9444,"./tlh.js":9444,"./tr":2397,"./tr.js":2397,"./tzl":8254,"./tzl.js":8254,"./tzm":1106,"./tzm-latn":699,"./tzm-latn.js":699,"./tzm.js":1106,"./ug-cn":9288,"./ug-cn.js":9288,"./uk":7691,"./uk.js":7691,"./ur":3795,"./ur.js":3795,"./uz":6791,"./uz-latn":588,"./uz-latn.js":588,"./uz.js":6791,"./vi":5666,"./vi.js":5666,"./x-pseudo":4378,"./x-pseudo.js":4378,"./yo":5805,"./yo.js":5805,"./zh-cn":3839,"./zh-cn.js":3839,"./zh-hk":5726,"./zh-hk.js":5726,"./zh-mo":9807,"./zh-mo.js":9807,"./zh-tw":4152,"./zh-tw.js":4152};function s(e){var t=i(e);return n(t)}function i(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}s.keys=function(){return Object.keys(r)},s.resolve=i,e.exports=s,s.id=6700},7567:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(7757),s=n.n(r),i=n(7389),a=n(162);function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t,n,r,s,i,a){try{var o=e[i](a),u=o.value}catch(e){return void n(e)}o.done?t(u):Promise.resolve(u).then(r,s)}const c={name:"ns-database-update",data:function(){return{files:Update.files,returnLink:Update.returnLink,modules:Update.modules,updating:!1,xXsrfToken:null,updatingModule:!1,error:!1,lastErrorMessage:"",index:0}},computed:{totalModules:function(){return Object.values(this.modules).length}},mounted:function(){var e=this;a.ih.get("/sanctum/csrf-cookie").subscribe((function(t){try{e.xXsrfToken=a.ih.response.config.headers["X-XSRF-TOKEN"],e.proceedUpdate()}catch(e){a.kX.error(e.message).subscribe()}}))},methods:{proceedUpdate:function(){var e,t=this;return(e=s().mark((function e(){var n,r,u,c,l,d,p;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.updating=!0,n=s().mark((function e(n){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t.index=parseInt(n)+1,e.next=4,new Promise((function(e,r){a.ih.post("/api/nexopos/v4/update",{file:t.files[n]},{headers:{"X-XSRF-TOKEN":t.xXsrfToken}}).subscribe(e,r)}));case 4:e.sent,e.next=13;break;case 7:return e.prev=7,e.t0=e.catch(0),t.updating=!1,t.error=!0,t.lastErrorMessage=e.t0.message||(0,i.__)("An unexpected error occured"),e.abrupt("return",{v:a.kX.error(e.t0.message).subscribe()});case 13:case"end":return e.stop()}}),e,null,[[0,7]])})),e.t0=s().keys(t.files);case 3:if((e.t1=e.t0()).done){e.next=11;break}return r=e.t1.value,e.delegateYield(n(r),"t2",6);case 6:if("object"!==o(u=e.t2)){e.next=9;break}return e.abrupt("return",u.v);case 9:e.next=3;break;case 11:if(t.index=0,!(Object.values(t.modules).length>0)){e.next=25;break}t.updatingModule=!0,c=0,l=s().mark((function e(n){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,c+=1,t.index=c,e.next=5,new Promise((function(e,r){a.ih.post("/api/nexopos/v4/update",{module:t.modules[n]},{headers:{"X-XSRF-TOKEN":t.xXsrfToken}}).subscribe(e,r)}));case 5:e.sent,e.next=14;break;case 8:return e.prev=8,e.t0=e.catch(0),t.updating=!1,t.error=!0,t.lastErrorMessage=e.t0.message||(0,i.__)("An unexpected error occured"),e.abrupt("return",{v:a.kX.error(e.t0.message).subscribe()});case 14:case"end":return e.stop()}}),e,null,[[0,8]])})),e.t3=s().keys(t.modules);case 17:if((e.t4=e.t3()).done){e.next=25;break}return d=e.t4.value,e.delegateYield(l(d),"t5",20);case 20:if("object"!==o(p=e.t5)){e.next=23;break}return e.abrupt("return",p.v);case 23:e.next=17;break;case 25:t.error=!1,t.updating=!1,document.location=t.returnLink;case 28:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,s){var i=e.apply(t,n);function a(e){u(i,r,s,a,o,"next",e)}function o(e){u(i,r,s,a,o,"throw",e)}a(void 0)}))})()}}};const l=(0,n(1900).Z)(c,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"container mx-auto flex-auto items-center justify-center flex"},[n("div",{staticClass:"w-full md:w-2/3 lg:w-1/3",attrs:{id:"sign-in-box"}},[e._m(0),e._v(" "),n("div",{staticClass:"my-3 rounded shadow bg-white"},[e._m(1),e._v(" "),n("div",{staticClass:"p-2"},[n("p",{staticClass:"text-center text-sm text-gray-600 py-4"},[e._v("In order to keep NexoPOS running smoothly with updates, we need to proceed to the database migration. In fact you don't need to do any action, just wait until the process is done and you'll be redirected.")]),e._v(" "),e.error?n("div",{staticClass:"border-l-4 text-sm border-red-600 bg-red-200 p-4 text-gray-700"},[n("p",[e._v("\n Looks like an error has occured during the update. Usually, giving another shot should fix that. However, if you still don't get any chance.\n Please report this message to the support : \n ")]),e._v(" "),n("pre",{staticClass:"rounded whitespace-pre-wrap bg-gray-700 text-white my-2 p-2"},[e._v(e._s(e.lastErrorMessage))])]):e._e()]),e._v(" "),n("div",{staticClass:"border-t border-gray-200 p-2 flex justify-between"},[n("div",[e.error?n("button",{staticClass:"rounded bg-red-400 shadow-inner text-white p-2",on:{click:function(t){return e.proceedUpdate()}}},[n("i",{staticClass:"las la-sync"}),e._v(" "),n("span",[e._v("Try Again")])]):e._e()]),e._v(" "),n("div",{staticClass:"flex"},[e.updating?n("button",{staticClass:"rounded bg-blue-400 shadow-inner text-white p-2"},[n("i",{staticClass:"las la-sync animate-spin"}),e._v(" "),e.updatingModule?e._e():n("span",[e._v("Updating...")]),e._v(" "),e.updatingModule?e._e():n("span",{staticClass:"mr-1"},[e._v(e._s(e.index)+"/"+e._s(e.files.length))]),e._v(" "),e.updatingModule?n("span",[e._v("Updating Modules...")]):e._e(),e._v(" "),e.updatingModule?n("span",{staticClass:"mr-1"},[e._v(e._s(e.index)+"/"+e._s(e.totalModules))]):e._e()]):e._e(),e._v(" "),e.updating?e._e():n("a",{staticClass:"rounded bg-blue-400 shadow-inner text-white p-2",attrs:{href:e.returnLink}},[n("i",{staticClass:"las la-undo"}),e._v(" "),n("span",[e._v("Return")])])])])])])])}),[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"flex justify-center items-center py-6"},[t("img",{staticClass:"w-32",attrs:{src:"/svg/nexopos-variant-1.svg",alt:"NexoPOS"}})])},function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"border-b border-gray-200 py-4 flex items-center justify-center"},[n("h3",{staticClass:"text-xl font-bold text-gray-700"},[e._v("Datebase Update")])])}],!1,null,null,null).exports}},e=>{e.O(0,[898],(()=>{return t=6542,e(e.s=t);var t}));e.O()}]); //# sourceMappingURL=update.min.js.map \ No newline at end of file diff --git a/resources/lang/en.json b/resources/lang/en.json index 21831b428..f88f54d65 100755 --- a/resources/lang/en.json +++ b/resources/lang/en.json @@ -1 +1 @@ -{"displaying {perPage} on {items} items":"displaying {perPage} on {items} items","The document has been generated.":"The document has been generated.","Unexpected error occured.":"Unexpected error occured.","{entries} entries selected":"{entries} entries selected","Download":"Download","Bulk Actions":"Bulk Actions","Go":"Go","Delivery":"Delivery","Take Away":"Take Away","Unknown Type":"Unknown Type","Pending":"Pending","Ongoing":"Ongoing","Delivered":"Delivered","Unknown Status":"Unknown Status","Ready":"Ready","Paid":"Paid","Hold":"Hold","Unpaid":"Unpaid","Partially Paid":"Partially Paid","Save Password":"Save Password","Unable to proceed the form is not valid.":"Unable to proceed the form is not valid.","Submit":"Submit","Register":"Register","An unexpected error occured.":"An unexpected error occured.","Best Cashiers":"Best Cashiers","No result to display.":"No result to display.","Well.. nothing to show for the meantime.":"Well.. nothing to show for the meantime.","Best Customers":"Best Customers","Well.. nothing to show for the meantime":"Well.. nothing to show for the meantime","Total Sales":"Total Sales","Today":"Today","Incomplete Orders":"Incomplete Orders","Wasted Goods":"Wasted Goods","Expenses":"Expenses","Weekly Sales":"Weekly Sales","Week Taxes":"Week Taxes","Net Income":"Net Income","Week Expenses":"Week Expenses","Recents Orders":"Recents Orders","Order":"Order","Clear All":"Clear All","Confirm Your Action":"Confirm Your Action","Save":"Save","The processing status of the order will be changed. Please confirm your action.":"The processing status of the order will be changed. Please confirm your action.","Instalments":"Instalments","Create":"Create","Add Instalment":"Add Instalment","An unexpected error has occured":"An unexpected error has occured","Store Details":"Store Details","Order Code":"Order Code","Cashier":"Cashier","Date":"Date","Customer":"Customer","Type":"Type","Payment Status":"Payment Status","Delivery Status":"Delivery Status","Billing Details":"Billing Details","Shipping Details":"Shipping Details","Product":"Product","Unit Price":"Unit Price","Quantity":"Quantity","Discount":"Discount","Tax":"Tax","Total Price":"Total Price","Expiration Date":"Expiration Date","Sub Total":"Sub Total","Coupons":"Coupons","Shipping":"Shipping","Total":"Total","Due":"Due","Change":"Change","No title is provided":"No title is provided","SKU":"SKU","Barcode":"Barcode","Looks like no products matched the searched term.":"Looks like no products matched the searched term.","The product already exists on the table.":"The product already exists on the table.","The specified quantity exceed the available quantity.":"The specified quantity exceed the available quantity.","Unable to proceed as the table is empty.":"Unable to proceed as the table is empty.","More Details":"More Details","Useful to describe better what are the reasons that leaded to this adjustment.":"Useful to describe better what are the reasons that leaded to this adjustment.","Search":"Search","Unit":"Unit","Operation":"Operation","Procurement":"Procurement","Value":"Value","Actions":"Actions","Search and add some products":"Search and add some products","Proceed":"Proceed","An unexpected error occured":"An unexpected error occured","Load Coupon":"Load Coupon","Apply A Coupon":"Apply A Coupon","Load":"Load","Input the coupon code that should apply to the POS. If a coupon is issued for a customer, that customer must be selected priorly.":"Input the coupon code that should apply to the POS. If a coupon is issued for a customer, that customer must be selected priorly.","Click here to choose a customer.":"Click here to choose a customer.","Coupon Name":"Coupon Name","Usage":"Usage","Unlimited":"Unlimited","Valid From":"Valid From","Valid Till":"Valid Till","Categories":"Categories","Products":"Products","Active Coupons":"Active Coupons","Apply":"Apply","Cancel":"Cancel","Coupon Code":"Coupon Code","The coupon is out from validity date range.":"The coupon is out from validity date range.","The coupon has applied to the cart.":"The coupon has applied to the cart.","Percentage":"Percentage","Flat":"Flat","The coupon has been loaded.":"The coupon has been loaded.","Layaway Parameters":"Layaway Parameters","Minimum Payment":"Minimum Payment","Instalments & Payments":"Instalments & Payments","The final payment date must be the last within the instalments.":"The final payment date must be the last within the instalments.","There is not instalment defined. Please set how many instalments are allowed for this order":"There is not instalment defined. Please set how many instalments are allowed for this order","Amount":"Amount","You must define layaway settings before proceeding.":"You must define layaway settings before proceeding.","Please provide instalments before proceeding.":"Please provide instalments before proceeding.","Unable to procee the form is not valid":"Unable to procee the form is not valid","One or more instalments has an invalid date.":"One or more instalments has an invalid date.","One or more instalments has an invalid amount.":"One or more instalments has an invalid amount.","One or more instalments has a date prior to the current date.":"One or more instalments has a date prior to the current date.","Total instalments must be equal to the order total.":"Total instalments must be equal to the order total.","The customer has been loaded":"The customer has been loaded","This coupon is already added to the cart":"This coupon is already added to the cart","No tax group assigned to the order":"No tax group assigned to the order","Layaway defined":"Layaway defined","Okay":"Okay","An unexpected error has occured while fecthing taxes.":"An unexpected error has occured while fecthing taxes.","OKAY":"OKAY","Loading...":"Loading...","Profile":"Profile","Logout":"Logout","Unamed Page":"Unamed Page","No description":"No description","Name":"Name","Provide a name to the resource.":"Provide a name to the resource.","General":"General","Edit":"Edit","Delete":"Delete","Delete Selected Groups":"Delete Selected Groups","Activate Your Account":"Activate Your Account","Password Recovered":"Password Recovered","Password Recovery":"Password Recovery","Reset Password":"Reset Password","New User Registration":"New User Registration","Your Account Has Been Created":"Your Account Has Been Created","Login":"Login","Save Coupon":"Save Coupon","This field is required":"This field is required","The form is not valid. Please check it and try again":"The form is not valid. Please check it and try again","No Description Provided":"No Description Provided","mainFieldLabel not defined":"mainFieldLabel not defined","Unamed Table":"Unamed Table","Create Customer Group":"Create Customer Group","Save a new customer group":"Save a new customer group","Update Group":"Update Group","Modify an existing customer group":"Modify an existing customer group","Managing Customers Groups":"Managing Customers Groups","Create groups to assign customers":"Create groups to assign customers","Create Customer":"Create Customer","Add a new customers to the system":"Add a new customers to the system","Managing Customers":"Managing Customers","List of registered customers":"List of registered customers","Return":"Return","Your Module":"Your Module","Choose the zip file you would like to upload":"Choose the zip file you would like to upload","Upload":"Upload","Managing Orders":"Managing Orders","Manage all registered orders.":"Manage all registered orders.","Failed":"Failed","Order receipt":"Order receipt","Hide Dashboard":"Hide Dashboard","Taxes":"Taxes","Unknown Payment":"Unknown Payment","Order invoice":"Order invoice","Procurement Name":"Procurement Name","Unable to proceed no products has been provided.":"Unable to proceed no products has been provided.","Unable to proceed, one or more products is not valid.":"Unable to proceed, one or more products is not valid.","Unable to proceed the procurement form is not valid.":"Unable to proceed the procurement form is not valid.","Unable to proceed, no submit url has been provided.":"Unable to proceed, no submit url has been provided.","SKU, Barcode, Product name.":"SKU, Barcode, Product name.","Surname":"Surname","N\/A":"N\/A","Email":"Email","Phone":"Phone","First Address":"First Address","Second Address":"Second Address","Address":"Address","City":"City","PO.Box":"PO.Box","Price":"Price","Print":"Print","Description":"Description","Included Products":"Included Products","Apply Settings":"Apply Settings","Basic Settings":"Basic Settings","Visibility Settings":"Visibility Settings","Year":"Year","Sales":"Sales","Income":"Income","January":"January","Febuary":"Febuary","March":"March","April":"April","May":"May","June":"June","July":"July","August":"August","September":"September","October":"October","November":"November","December":"December","Purchase Price":"Purchase Price","Sale Price":"Sale Price","Profit":"Profit","Tax Value":"Tax Value","Reward System Name":"Reward System Name","Missing Dependency":"Missing Dependency","Go Back":"Go Back","Continue":"Continue","Home":"Home","Not Allowed Action":"Not Allowed Action","Try Again":"Try Again","Access Denied":"Access Denied","Dashboard":"Dashboard","Sign In":"Sign In","Sign Up":"Sign Up","This field is required.":"This field is required.","This field must contain a valid email address.":"This field must contain a valid email address.","Clear Selected Entries ?":"Clear Selected Entries ?","Would you like to clear all selected entries ?":"Would you like to clear all selected entries ?","No bulk confirmation message provided on the CRUD class.":"No bulk confirmation message provided on the CRUD class.","No selection has been made.":"No selection has been made.","No action has been selected.":"No action has been selected.","There is nothing to display...":"There is nothing to display...","Sun":"Sun","Mon":"Mon","Tue":"Tue","Wed":"Wed","Thr":"Thr","Fri":"Fri","Sat":"Sat","Nothing to display":"Nothing to display","Password Forgotten ?":"Password Forgotten ?","OK":"OK","Remember Your Password ?":"Remember Your Password ?","Already registered ?":"Already registered ?","Refresh":"Refresh","Enabled":"Enabled","Disabled":"Disabled","Enable":"Enable","Disable":"Disable","Gallery":"Gallery","Medias Manager":"Medias Manager","Click Here Or Drop Your File To Upload":"Click Here Or Drop Your File To Upload","Nothing has already been uploaded":"Nothing has already been uploaded","File Name":"File Name","Uploaded At":"Uploaded At","By":"By","Previous":"Previous","Next":"Next","Use Selected":"Use Selected","Would you like to clear all the notifications ?":"Would you like to clear all the notifications ?","Permissions":"Permissions","Payment Summary":"Payment Summary","Order Status":"Order Status","Would you proceed ?":"Would you proceed ?","Would you like to create this instalment ?":"Would you like to create this instalment ?","Would you like to delete this instalment ?":"Would you like to delete this instalment ?","Would you like to make this as paid ?":"Would you like to make this as paid ?","Would you like to update that instalment ?":"Would you like to update that instalment ?","Customer Account":"Customer Account","Payment":"Payment","No payment possible for paid order.":"No payment possible for paid order.","Payment History":"Payment History","Unable to proceed the form is not valid":"Unable to proceed the form is not valid","Please provide a valid value":"Please provide a valid value","Refund With Products":"Refund With Products","Refund Shipping":"Refund Shipping","Add Product":"Add Product","Damaged":"Damaged","Unspoiled":"Unspoiled","Summary":"Summary","Payment Gateway":"Payment Gateway","Screen":"Screen","Select the product to perform a refund.":"Select the product to perform a refund.","Please select a payment gateway before proceeding.":"Please select a payment gateway before proceeding.","There is nothing to refund.":"There is nothing to refund.","Please provide a valid payment amount.":"Please provide a valid payment amount.","The refund will be made on the current order.":"The refund will be made on the current order.","Please select a product before proceeding.":"Please select a product before proceeding.","Not enough quantity to proceed.":"Not enough quantity to proceed.","Would you like to delete this product ?":"Would you like to delete this product ?","Customers":"Customers","Order Type":"Order Type","Orders":"Orders","Cash Register":"Cash Register","Reset":"Reset","Cart":"Cart","Comments":"Comments","No products added...":"No products added...","Pay":"Pay","Void":"Void","Current Balance":"Current Balance","Full Payment":"Full Payment","The customer account can only be used once per order. Consider deleting the previously used payment.":"The customer account can only be used once per order. Consider deleting the previously used payment.","Not enough funds to add {amount} as a payment. Available balance {balance}.":"Not enough funds to add {amount} as a payment. Available balance {balance}.","Confirm Full Payment":"Confirm Full Payment","A full payment will be made using {paymentType} for {total}":"A full payment will be made using {paymentType} for {total}","You need to provide some products before proceeding.":"You need to provide some products before proceeding.","Unable to add the product, there is not enough stock. Remaining %s":"Unable to add the product, there is not enough stock. Remaining %s","Add Images":"Add Images","New Group":"New Group","Available Quantity":"Available Quantity","Would you like to delete this group ?":"Would you like to delete this group ?","Your Attention Is Required":"Your Attention Is Required","Please select at least one unit group before you proceed.":"Please select at least one unit group before you proceed.","Unable to proceed, more than one product is set as primary":"Unable to proceed, more than one product is set as primary","Unable to proceed as one of the unit group field is invalid":"Unable to proceed as one of the unit group field is invalid","Would you like to delete this variation ?":"Would you like to delete this variation ?","Details":"Details","Unable to proceed, no product were provided.":"Unable to proceed, no product were provided.","Unable to proceed, one or more product has incorrect values.":"Unable to proceed, one or more product has incorrect values.","Unable to proceed, the procurement form is not valid.":"Unable to proceed, the procurement form is not valid.","Unable to submit, no valid submit URL were provided.":"Unable to submit, no valid submit URL were provided.","Options":"Options","The stock adjustment is about to be made. Would you like to confirm ?":"The stock adjustment is about to be made. Would you like to confirm ?","Would you like to remove this product from the table ?":"Would you like to remove this product from the table ?","Unable to proceed. Select a correct time range.":"Unable to proceed. Select a correct time range.","Unable to proceed. The current time range is not valid.":"Unable to proceed. The current time range is not valid.","Would you like to proceed ?":"Would you like to proceed ?","Will apply various reset method on the system.":"Will apply various reset method on the system.","Wipe Everything":"Wipe Everything","Wipe + Grocery Demo":"Wipe + Grocery Demo","No rules has been provided.":"No rules has been provided.","No valid run were provided.":"No valid run were provided.","Unable to proceed, the form is invalid.":"Unable to proceed, the form is invalid.","Unable to proceed, no valid submit URL is defined.":"Unable to proceed, no valid submit URL is defined.","No title Provided":"No title Provided","Add Rule":"Add Rule","Save Settings":"Save Settings","Ok":"Ok","New Transaction":"New Transaction","Close":"Close","Would you like to delete this order":"Would you like to delete this order","The current order will be void. This action will be recorded. Consider providing a reason for this operation":"The current order will be void. This action will be recorded. Consider providing a reason for this operation","Order Options":"Order Options","Payments":"Payments","Refund & Return":"Refund & Return","Installments":"Installments","The form is not valid.":"The form is not valid.","Balance":"Balance","Input":"Input","Register History":"Register History","Close Register":"Close Register","Cash In":"Cash In","Cash Out":"Cash Out","Register Options":"Register Options","History":"History","Unable to open this register. Only closed register can be opened.":"Unable to open this register. Only closed register can be opened.","Open The Register":"Open The Register","Exit To Orders":"Exit To Orders","Looks like there is no registers. At least one register is required to proceed.":"Looks like there is no registers. At least one register is required to proceed.","Create Cash Register":"Create Cash Register","Yes":"Yes","No":"No","Use":"Use","No coupon available for this customer":"No coupon available for this customer","Select Customer":"Select Customer","No customer match your query...":"No customer match your query...","Customer Name":"Customer Name","Save Customer":"Save Customer","No Customer Selected":"No Customer Selected","In order to see a customer account, you need to select one customer.":"In order to see a customer account, you need to select one customer.","Summary For":"Summary For","Total Purchases":"Total Purchases","Total Owed":"Total Owed","Account Amount":"Account Amount","Last Purchases":"Last Purchases","Status":"Status","No orders...":"No orders...","Account Transaction":"Account Transaction","Product Discount":"Product Discount","Cart Discount":"Cart Discount","Hold Order":"Hold Order","The current order will be set on hold. You can retreive this order from the pending order button. Providing a reference to it might help you to identify the order more quickly.":"The current order will be set on hold. You can retreive this order from the pending order button. Providing a reference to it might help you to identify the order more quickly.","Confirm":"Confirm","Order Note":"Order Note","Note":"Note","More details about this order":"More details about this order","Display On Receipt":"Display On Receipt","Will display the note on the receipt":"Will display the note on the receipt","Open":"Open","Define The Order Type":"Define The Order Type","Payments Gateway":"Payments Gateway","Payment List":"Payment List","List Of Payments":"List Of Payments","No Payment added.":"No Payment added.","Select Payment":"Select Payment","Choose Payment":"Choose Payment","Submit Payment":"Submit Payment","Layaway":"Layaway","On Hold":"On Hold","Tendered":"Tendered","Nothing to display...":"Nothing to display...","Define Quantity":"Define Quantity","Please provide a quantity":"Please provide a quantity","Search Product":"Search Product","There is nothing to display. Have you started the search ?":"There is nothing to display. Have you started the search ?","Shipping & Billing":"Shipping & Billing","Tax & Summary":"Tax & Summary","Settings":"Settings","Select Tax":"Select Tax","Define the tax that apply to the sale.":"Define the tax that apply to the sale.","Define how the tax is computed":"Define how the tax is computed","Exclusive":"Exclusive","Inclusive":"Inclusive","Choose Selling Unit":"Choose Selling Unit","Define when that specific product should expire.":"Define when that specific product should expire.","Renders the automatically generated barcode.":"Renders the automatically generated barcode.","Tax Type":"Tax Type","Adjust how tax is calculated on the item.":"Adjust how tax is calculated on the item.","Unable to proceed. The form is not valid.":"Unable to proceed. The form is not valid.","Units & Quantities":"Units & Quantities","Wholesale Price":"Wholesale Price","Select":"Select","Unsupported print gateway.":"Unsupported print gateway.","Howdy, %s":"Howdy, %s","Would you like to delete this ?":"Would you like to delete this ?","The account you have created for __%s__, require an activation. In order to proceed, please click on the following link":"The account you have created for __%s__, require an activation. In order to proceed, please click on the following link","Your password has been successfully updated on __%s__. You can now login with your new password.":"Your password has been successfully updated on __%s__. You can now login with your new password.","Someone has requested to reset your password on __\"%s\"__. If you remember having done that request, please proceed by clicking the button below. ":"Someone has requested to reset your password on __\"%s\"__. If you remember having done that request, please proceed by clicking the button below. ","Receipt — %s":"Receipt — %s","Invoice — %s":"Invoice — %s","Unable to find a module having the identifier\/namespace \"%s\"":"Unable to find a module having the identifier\/namespace \"%s\"","What is the CRUD single resource name ? [Q] to quit.":"What is the CRUD single resource name ? [Q] to quit.","Which table name should be used ? [Q] to quit.":"Which table name should be used ? [Q] to quit.","What is the main route name to the resource ? [Q] to quit.":"What is the main route name to the resource ? [Q] to quit.","If your CRUD resource has a relation, mention it as follow \"foreign_table, foreign_key, local_key\" ? [S] to skip, [Q] to quit.":"If your CRUD resource has a relation, mention it as follow \"foreign_table, foreign_key, local_key\" ? [S] to skip, [Q] to quit.","Add a new relation ? Mention it as follow \"foreign_table, foreign_key, local_key\" ? [S] to skip, [Q] to quit.":"Add a new relation ? Mention it as follow \"foreign_table, foreign_key, local_key\" ? [S] to skip, [Q] to quit.","No enough paramters provided for the relation.":"No enough paramters provided for the relation.","The CRUD resource \"%s\" for the module \"%s\" has been generated at \"%s\"":"The CRUD resource \"%s\" for the module \"%s\" has been generated at \"%s\"","The CRUD resource \"%s\" has been generated at %s":"The CRUD resource \"%s\" has been generated at %s","An unexpected error has occured.":"An unexpected error has occured.","Localization for %s extracted to %s":"Localization for %s extracted to %s","Unable to find the requested module.":"Unable to find the requested module.","Unable to find a module with the defined identifier \"%s\"":"Unable to find a module with the defined identifier \"%s\"","Unable to find the requested file \"%s\" from the module migration.":"Unable to find the requested file \"%s\" from the module migration.","The migration file has been successfully forgotten.":"The migration file has been successfully forgotten.","Version":"Version","Path":"Path","Index":"Index","Entry Class":"Entry Class","Routes":"Routes","Api":"Api","Controllers":"Controllers","Views":"Views","Attribute":"Attribute","Namespace":"Namespace","Author":"Author","The product barcodes has been refreshed successfully.":"The product barcodes has been refreshed successfully.","Invalid operation provided.":"Invalid operation provided.","Unable to proceed the system is already installed.":"Unable to proceed the system is already installed.","What is the store name ? [Q] to quit.":"What is the store name ? [Q] to quit.","Please provide at least 6 characters for store name.":"Please provide at least 6 characters for store name.","What is the administrator password ? [Q] to quit.":"What is the administrator password ? [Q] to quit.","Please provide at least 6 characters for the administrator password.":"Please provide at least 6 characters for the administrator password.","What is the administrator email ? [Q] to quit.":"What is the administrator email ? [Q] to quit.","Please provide a valid email for the administrator.":"Please provide a valid email for the administrator.","What is the administrator username ? [Q] to quit.":"What is the administrator username ? [Q] to quit.","Please provide at least 5 characters for the administrator username.":"Please provide at least 5 characters for the administrator username.","Downloading latest dev build...":"Downloading latest dev build...","Reset project to HEAD...":"Reset project to HEAD...","Coupons List":"Coupons List","Display all coupons.":"Display all coupons.","No coupons has been registered":"No coupons has been registered","Add a new coupon":"Add a new coupon","Create a new coupon":"Create a new coupon","Register a new coupon and save it.":"Register a new coupon and save it.","Edit coupon":"Edit coupon","Modify Coupon.":"Modify Coupon.","Return to Coupons":"Return to Coupons","Might be used while printing the coupon.":"Might be used while printing the coupon.","Percentage Discount":"Percentage Discount","Flat Discount":"Flat Discount","Define which type of discount apply to the current coupon.":"Define which type of discount apply to the current coupon.","Discount Value":"Discount Value","Define the percentage or flat value.":"Define the percentage or flat value.","Valid Until":"Valid Until","Determin Until When the coupon is valid.":"Determin Until When the coupon is valid.","Minimum Cart Value":"Minimum Cart Value","What is the minimum value of the cart to make this coupon eligible.":"What is the minimum value of the cart to make this coupon eligible.","Maximum Cart Value":"Maximum Cart Value","Valid Hours Start":"Valid Hours Start","Define form which hour during the day the coupons is valid.":"Define form which hour during the day the coupons is valid.","Valid Hours End":"Valid Hours End","Define to which hour during the day the coupons end stop valid.":"Define to which hour during the day the coupons end stop valid.","Limit Usage":"Limit Usage","Define how many time a coupons can be redeemed.":"Define how many time a coupons can be redeemed.","Select Products":"Select Products","The following products will be required to be present on the cart, in order for this coupon to be valid.":"The following products will be required to be present on the cart, in order for this coupon to be valid.","Select Categories":"Select Categories","The products assigned to one of these categories should be on the cart, in order for this coupon to be valid.":"The products assigned to one of these categories should be on the cart, in order for this coupon to be valid.","Created At":"Created At","Undefined":"Undefined","Delete a licence":"Delete a licence","Customer Coupons List":"Customer Coupons List","Display all customer coupons.":"Display all customer coupons.","No customer coupons has been registered":"No customer coupons has been registered","Add a new customer coupon":"Add a new customer coupon","Create a new customer coupon":"Create a new customer coupon","Register a new customer coupon and save it.":"Register a new customer coupon and save it.","Edit customer coupon":"Edit customer coupon","Modify Customer Coupon.":"Modify Customer Coupon.","Return to Customer Coupons":"Return to Customer Coupons","Id":"Id","Limit":"Limit","Coupon_id":"Coupon_id","Customer_id":"Customer_id","Created_at":"Created_at","Updated_at":"Updated_at","Code":"Code","Customers List":"Customers List","Display all customers.":"Display all customers.","No customers has been registered":"No customers has been registered","Add a new customer":"Add a new customer","Create a new customer":"Create a new customer","Register a new customer and save it.":"Register a new customer and save it.","Edit customer":"Edit customer","Modify Customer.":"Modify Customer.","Return to Customers":"Return to Customers","Provide a unique name for the customer.":"Provide a unique name for the customer.","Provide the customer surname":"Provide the customer surname","Group":"Group","Assign the customer to a group":"Assign the customer to a group","Provide the customer email":"Provide the customer email","Phone Number":"Phone Number","Provide the customer phone number":"Provide the customer phone number","PO Box":"PO Box","Provide the customer PO.Box":"Provide the customer PO.Box","Not Defined":"Not Defined","Male":"Male","Female":"Female","Gender":"Gender","Billing Address":"Billing Address","Provide the billing name.":"Provide the billing name.","Provide the billing surname.":"Provide the billing surname.","Billing phone number.":"Billing phone number.","Address 1":"Address 1","Billing First Address.":"Billing First Address.","Address 2":"Address 2","Billing Second Address.":"Billing Second Address.","Country":"Country","Billing Country.":"Billing Country.","Postal Address":"Postal Address","Company":"Company","Shipping Address":"Shipping Address","Provide the shipping name.":"Provide the shipping name.","Provide the shipping surname.":"Provide the shipping surname.","Shipping phone number.":"Shipping phone number.","Shipping First Address.":"Shipping First Address.","Shipping Second Address.":"Shipping Second Address.","Shipping Country.":"Shipping Country.","No group selected and no default group configured.":"No group selected and no default group configured.","The access is granted.":"The access is granted.","Account Credit":"Account Credit","Owed Amount":"Owed Amount","Purchase Amount":"Purchase Amount","Rewards":"Rewards","Delete a customers":"Delete a customers","Delete Selected Customers":"Delete Selected Customers","Customer Groups List":"Customer Groups List","Display all Customers Groups.":"Display all Customers Groups.","No Customers Groups has been registered":"No Customers Groups has been registered","Add a new Customers Group":"Add a new Customers Group","Create a new Customers Group":"Create a new Customers Group","Register a new Customers Group and save it.":"Register a new Customers Group and save it.","Edit Customers Group":"Edit Customers Group","Modify Customers group.":"Modify Customers group.","Return to Customers Groups":"Return to Customers Groups","Reward System":"Reward System","Select which Reward system applies to the group":"Select which Reward system applies to the group","Minimum Credit Amount":"Minimum Credit Amount","Determine in percentage, what is the first minimum credit payment made by all customers on the group, in case of credit order. If left to \"0\", no minimal credit amount is required.":"Determine in percentage, what is the first minimum credit payment made by all customers on the group, in case of credit order. If left to \"0\", no minimal credit amount is required.","A brief description about what this group is about":"A brief description about what this group is about","Created On":"Created On","Customer Orders List":"Customer Orders List","Display all customer orders.":"Display all customer orders.","No customer orders has been registered":"No customer orders has been registered","Add a new customer order":"Add a new customer order","Create a new customer order":"Create a new customer order","Register a new customer order and save it.":"Register a new customer order and save it.","Edit customer order":"Edit customer order","Modify Customer Order.":"Modify Customer Order.","Return to Customer Orders":"Return to Customer Orders","Created at":"Created at","Customer Id":"Customer Id","Discount Percentage":"Discount Percentage","Discount Type":"Discount Type","Final Payment Date":"Final Payment Date","Gross Total":"Gross Total","Net Total":"Net Total","Process Status":"Process Status","Shipping Rate":"Shipping Rate","Shipping Type":"Shipping Type","Title":"Title","Total installments":"Total installments","Updated at":"Updated at","Uuid":"Uuid","Voidance Reason":"Voidance Reason","Customer Rewards List":"Customer Rewards List","Display all customer rewards.":"Display all customer rewards.","No customer rewards has been registered":"No customer rewards has been registered","Add a new customer reward":"Add a new customer reward","Create a new customer reward":"Create a new customer reward","Register a new customer reward and save it.":"Register a new customer reward and save it.","Edit customer reward":"Edit customer reward","Modify Customer Reward.":"Modify Customer Reward.","Return to Customer Rewards":"Return to Customer Rewards","Points":"Points","Target":"Target","Reward Name":"Reward Name","Last Update":"Last Update","Expenses Categories List":"Expenses Categories List","Display All Expense Categories.":"Display All Expense Categories.","No Expense Category has been registered":"No Expense Category has been registered","Add a new Expense Category":"Add a new Expense Category","Create a new Expense Category":"Create a new Expense Category","Register a new Expense Category and save it.":"Register a new Expense Category and save it.","Edit Expense Category":"Edit Expense Category","Modify An Expense Category.":"Modify An Expense Category.","Return to Expense Categories":"Return to Expense Categories","Expenses List":"Expenses List","Display all expenses.":"Display all expenses.","No expenses has been registered":"No expenses has been registered","Add a new expense":"Add a new expense","Create a new expense":"Create a new expense","Register a new expense and save it.":"Register a new expense and save it.","Edit expense":"Edit expense","Modify Expense.":"Modify Expense.","Return to Expenses":"Return to Expenses","Active":"Active","determine if the expense is effective or not. Work for recurring and not reccuring expenses.":"determine if the expense is effective or not. Work for recurring and not reccuring expenses.","Users Group":"Users Group","Assign expense to users group. Expense will therefore be multiplied by the number of entity.":"Assign expense to users group. Expense will therefore be multiplied by the number of entity.","None":"None","Expense Category":"Expense Category","Assign the expense to a category":"Assign the expense to a category","Is the value or the cost of the expense.":"Is the value or the cost of the expense.","If set to Yes, the expense will trigger on defined occurence.":"If set to Yes, the expense will trigger on defined occurence.","Recurring":"Recurring","Start of Month":"Start of Month","Mid of Month":"Mid of Month","End of Month":"End of Month","X days Before Month Ends":"X days Before Month Ends","X days After Month Starts":"X days After Month Starts","Occurence":"Occurence","Define how often this expenses occurs":"Define how often this expenses occurs","Occurence Value":"Occurence Value","Must be used in case of X days after month starts and X days before month ends.":"Must be used in case of X days after month starts and X days before month ends.","Category":"Category","Month Starts":"Month Starts","Month Middle":"Month Middle","Month Ends":"Month Ends","X Days Before Month Starts":"X Days Before Month Starts","X Days Before Month Ends":"X Days Before Month Ends","Unknown Occurance":"Unknown Occurance","Return to Expenses Histories":"Return to Expenses Histories","Expense ID":"Expense ID","Expense Name":"Expense Name","Updated At":"Updated At","The expense history is about to be deleted.":"The expense history is about to be deleted.","Hold Orders List":"Hold Orders List","Display all hold orders.":"Display all hold orders.","No hold orders has been registered":"No hold orders has been registered","Add a new hold order":"Add a new hold order","Create a new hold order":"Create a new hold order","Register a new hold order and save it.":"Register a new hold order and save it.","Edit hold order":"Edit hold order","Modify Hold Order.":"Modify Hold Order.","Return to Hold Orders":"Return to Hold Orders","Process Statuss":"Process Statuss","Orders List":"Orders List","Display all orders.":"Display all orders.","No orders has been registered":"No orders has been registered","Add a new order":"Add a new order","Create a new order":"Create a new order","Register a new order and save it.":"Register a new order and save it.","Edit order":"Edit order","Modify Order.":"Modify Order.","Return to Orders":"Return to Orders","Discount Rate":"Discount Rate","The order and the attached products has been deleted.":"The order and the attached products has been deleted.","Invoice":"Invoice","Receipt":"Receipt","Order Instalments List":"Order Instalments List","Display all Order Instalments.":"Display all Order Instalments.","No Order Instalment has been registered":"No Order Instalment has been registered","Add a new Order Instalment":"Add a new Order Instalment","Create a new Order Instalment":"Create a new Order Instalment","Register a new Order Instalment and save it.":"Register a new Order Instalment and save it.","Edit Order Instalment":"Edit Order Instalment","Modify Order Instalment.":"Modify Order Instalment.","Return to Order Instalment":"Return to Order Instalment","Order Id":"Order Id","Payment Types List":"Payment Types List","Display all payment types.":"Display all payment types.","No payment types has been registered":"No payment types has been registered","Add a new payment type":"Add a new payment type","Create a new payment type":"Create a new payment type","Register a new payment type and save it.":"Register a new payment type and save it.","Edit payment type":"Edit payment type","Modify Payment Type.":"Modify Payment Type.","Return to Payment Types":"Return to Payment Types","Label":"Label","Provide a label to the resource.":"Provide a label to the resource.","Identifier":"Identifier","A payment type having the same identifier already exists.":"A payment type having the same identifier already exists.","Unable to delete a read-only payments type.":"Unable to delete a read-only payments type.","Readonly":"Readonly","Procurements List":"Procurements List","Display all procurements.":"Display all procurements.","No procurements has been registered":"No procurements has been registered","Add a new procurement":"Add a new procurement","Create a new procurement":"Create a new procurement","Register a new procurement and save it.":"Register a new procurement and save it.","Edit procurement":"Edit procurement","Modify Procurement.":"Modify Procurement.","Return to Procurements":"Return to Procurements","Provider Id":"Provider Id","Total Items":"Total Items","Provider":"Provider","Stocked":"Stocked","Procurement Products List":"Procurement Products List","Display all procurement products.":"Display all procurement products.","No procurement products has been registered":"No procurement products has been registered","Add a new procurement product":"Add a new procurement product","Create a new procurement product":"Create a new procurement product","Register a new procurement product and save it.":"Register a new procurement product and save it.","Edit procurement product":"Edit procurement product","Modify Procurement Product.":"Modify Procurement Product.","Return to Procurement Products":"Return to Procurement Products","Define what is the expiration date of the product.":"Define what is the expiration date of the product.","On":"On","Category Products List":"Category Products List","Display all category products.":"Display all category products.","No category products has been registered":"No category products has been registered","Add a new category product":"Add a new category product","Create a new category product":"Create a new category product","Register a new category product and save it.":"Register a new category product and save it.","Edit category product":"Edit category product","Modify Category Product.":"Modify Category Product.","Return to Category Products":"Return to Category Products","No Parent":"No Parent","Preview":"Preview","Provide a preview url to the category.":"Provide a preview url to the category.","Displays On POS":"Displays On POS","Parent":"Parent","If this category should be a child category of an existing category":"If this category should be a child category of an existing category","Total Products":"Total Products","Products List":"Products List","Display all products.":"Display all products.","No products has been registered":"No products has been registered","Add a new product":"Add a new product","Create a new product":"Create a new product","Register a new product and save it.":"Register a new product and save it.","Edit product":"Edit product","Modify Product.":"Modify Product.","Return to Products":"Return to Products","Assigned Unit":"Assigned Unit","The assigned unit for sale":"The assigned unit for sale","Define the regular selling price.":"Define the regular selling price.","Define the wholesale price.":"Define the wholesale price.","Preview Url":"Preview Url","Provide the preview of the current unit.":"Provide the preview of the current unit.","Identification":"Identification","Define the barcode value. Focus the cursor here before scanning the product.":"Define the barcode value. Focus the cursor here before scanning the product.","Define the barcode type scanned.":"Define the barcode type scanned.","EAN 8":"EAN 8","EAN 13":"EAN 13","Barcode Type":"Barcode Type","Determine if the product can be searched on the POS.":"Determine if the product can be searched on the POS.","Searchable":"Searchable","Select to which category the item is assigned.":"Select to which category the item is assigned.","Materialized Product":"Materialized Product","Dematerialized Product":"Dematerialized Product","Define the product type. Applies to all variations.":"Define the product type. Applies to all variations.","Product Type":"Product Type","Define a unique SKU value for the product.":"Define a unique SKU value for the product.","On Sale":"On Sale","Hidden":"Hidden","Define wether the product is available for sale.":"Define wether the product is available for sale.","Enable the stock management on the product. Will not work for service or uncountable products.":"Enable the stock management on the product. Will not work for service or uncountable products.","Stock Management Enabled":"Stock Management Enabled","Units":"Units","Accurate Tracking":"Accurate Tracking","What unit group applies to the actual item. This group will apply during the procurement.":"What unit group applies to the actual item. This group will apply during the procurement.","Unit Group":"Unit Group","Determine the unit for sale.":"Determine the unit for sale.","Selling Unit":"Selling Unit","Expiry":"Expiry","Product Expires":"Product Expires","Set to \"No\" expiration time will be ignored.":"Set to \"No\" expiration time will be ignored.","Prevent Sales":"Prevent Sales","Allow Sales":"Allow Sales","Determine the action taken while a product has expired.":"Determine the action taken while a product has expired.","On Expiration":"On Expiration","Select the tax group that applies to the product\/variation.":"Select the tax group that applies to the product\/variation.","Tax Group":"Tax Group","Define what is the type of the tax.":"Define what is the type of the tax.","Images":"Images","Image":"Image","Choose an image to add on the product gallery":"Choose an image to add on the product gallery","Is Primary":"Is Primary","Define wether the image should be primary. If there are more than one primary image, one will be choosed for you.":"Define wether the image should be primary. If there are more than one primary image, one will be choosed for you.","Sku":"Sku","Materialized":"Materialized","Dematerialized":"Dematerialized","Available":"Available","See Quantities":"See Quantities","See History":"See History","Would you like to delete selected entries ?":"Would you like to delete selected entries ?","Product Histories":"Product Histories","Display all product histories.":"Display all product histories.","No product histories has been registered":"No product histories has been registered","Add a new product history":"Add a new product history","Create a new product history":"Create a new product history","Register a new product history and save it.":"Register a new product history and save it.","Edit product history":"Edit product history","Modify Product History.":"Modify Product History.","Return to Product Histories":"Return to Product Histories","After Quantity":"After Quantity","Before Quantity":"Before Quantity","Operation Type":"Operation Type","Order id":"Order id","Procurement Id":"Procurement Id","Procurement Product Id":"Procurement Product Id","Product Id":"Product Id","Unit Id":"Unit Id","P. Quantity":"P. Quantity","N. Quantity":"N. Quantity","Defective":"Defective","Deleted":"Deleted","Removed":"Removed","Returned":"Returned","Sold":"Sold","Added":"Added","Incoming Transfer":"Incoming Transfer","Outgoing Transfer":"Outgoing Transfer","Transfer Rejected":"Transfer Rejected","Transfer Canceled":"Transfer Canceled","Void Return":"Void Return","Adjustment Return":"Adjustment Return","Adjustment Sale":"Adjustment Sale","Product Unit Quantities List":"Product Unit Quantities List","Display all product unit quantities.":"Display all product unit quantities.","No product unit quantities has been registered":"No product unit quantities has been registered","Add a new product unit quantity":"Add a new product unit quantity","Create a new product unit quantity":"Create a new product unit quantity","Register a new product unit quantity and save it.":"Register a new product unit quantity and save it.","Edit product unit quantity":"Edit product unit quantity","Modify Product Unit Quantity.":"Modify Product Unit Quantity.","Return to Product Unit Quantities":"Return to Product Unit Quantities","Product id":"Product id","Providers List":"Providers List","Display all providers.":"Display all providers.","No providers has been registered":"No providers has been registered","Add a new provider":"Add a new provider","Create a new provider":"Create a new provider","Register a new provider and save it.":"Register a new provider and save it.","Edit provider":"Edit provider","Modify Provider.":"Modify Provider.","Return to Providers":"Return to Providers","Provide the provider email. Mightbe used to send automatted email.":"Provide the provider email. Mightbe used to send automatted email.","Provider surname if necessary.":"Provider surname if necessary.","Contact phone number for the provider. Might be used to send automatted SMS notifications.":"Contact phone number for the provider. Might be used to send automatted SMS notifications.","First address of the provider.":"First address of the provider.","Second address of the provider.":"Second address of the provider.","Further details about the provider":"Further details about the provider","Amount Due":"Amount Due","Amount Paid":"Amount Paid","See Procurements":"See Procurements","Registers List":"Registers List","Display all registers.":"Display all registers.","No registers has been registered":"No registers has been registered","Add a new register":"Add a new register","Create a new register":"Create a new register","Register a new register and save it.":"Register a new register and save it.","Edit register":"Edit register","Modify Register.":"Modify Register.","Return to Registers":"Return to Registers","Closed":"Closed","Define what is the status of the register.":"Define what is the status of the register.","Provide mode details about this cash register.":"Provide mode details about this cash register.","Unable to delete a register that is currently in use":"Unable to delete a register that is currently in use","Used By":"Used By","Register History List":"Register History List","Display all register histories.":"Display all register histories.","No register histories has been registered":"No register histories has been registered","Add a new register history":"Add a new register history","Create a new register history":"Create a new register history","Register a new register history and save it.":"Register a new register history and save it.","Edit register history":"Edit register history","Modify Registerhistory.":"Modify Registerhistory.","Return to Register History":"Return to Register History","Register Id":"Register Id","Action":"Action","Register Name":"Register Name","Done At":"Done At","Reward Systems List":"Reward Systems List","Display all reward systems.":"Display all reward systems.","No reward systems has been registered":"No reward systems has been registered","Add a new reward system":"Add a new reward system","Create a new reward system":"Create a new reward system","Register a new reward system and save it.":"Register a new reward system and save it.","Edit reward system":"Edit reward system","Modify Reward System.":"Modify Reward System.","Return to Reward Systems":"Return to Reward Systems","From":"From","The interval start here.":"The interval start here.","To":"To","The interval ends here.":"The interval ends here.","Points earned.":"Points earned.","Coupon":"Coupon","Decide which coupon you would apply to the system.":"Decide which coupon you would apply to the system.","This is the objective that the user should reach to trigger the reward.":"This is the objective that the user should reach to trigger the reward.","A short description about this system":"A short description about this system","Would you like to delete this reward system ?":"Would you like to delete this reward system ?","Delete Selected Rewards":"Delete Selected Rewards","Would you like to delete selected rewards?":"Would you like to delete selected rewards?","Roles List":"Roles List","Display all roles.":"Display all roles.","No role has been registered.":"No role has been registered.","Add a new role":"Add a new role","Create a new role":"Create a new role","Create a new role and save it.":"Create a new role and save it.","Edit role":"Edit role","Modify Role.":"Modify Role.","Return to Roles":"Return to Roles","Provide a name to the role.":"Provide a name to the role.","Should be a unique value with no spaces or special character":"Should be a unique value with no spaces or special character","Provide more details about what this role is about.":"Provide more details about what this role is about.","Unable to delete a system role.":"Unable to delete a system role.","You do not have enough permissions to perform this action.":"You do not have enough permissions to perform this action.","Taxes List":"Taxes List","Display all taxes.":"Display all taxes.","No taxes has been registered":"No taxes has been registered","Add a new tax":"Add a new tax","Create a new tax":"Create a new tax","Register a new tax and save it.":"Register a new tax and save it.","Edit tax":"Edit tax","Modify Tax.":"Modify Tax.","Return to Taxes":"Return to Taxes","Provide a name to the tax.":"Provide a name to the tax.","Assign the tax to a tax group.":"Assign the tax to a tax group.","Rate":"Rate","Define the rate value for the tax.":"Define the rate value for the tax.","Provide a description to the tax.":"Provide a description to the tax.","Taxes Groups List":"Taxes Groups List","Display all taxes groups.":"Display all taxes groups.","No taxes groups has been registered":"No taxes groups has been registered","Add a new tax group":"Add a new tax group","Create a new tax group":"Create a new tax group","Register a new tax group and save it.":"Register a new tax group and save it.","Edit tax group":"Edit tax group","Modify Tax Group.":"Modify Tax Group.","Return to Taxes Groups":"Return to Taxes Groups","Provide a short description to the tax group.":"Provide a short description to the tax group.","Units List":"Units List","Display all units.":"Display all units.","No units has been registered":"No units has been registered","Add a new unit":"Add a new unit","Create a new unit":"Create a new unit","Register a new unit and save it.":"Register a new unit and save it.","Edit unit":"Edit unit","Modify Unit.":"Modify Unit.","Return to Units":"Return to Units","Preview URL":"Preview URL","Preview of the unit.":"Preview of the unit.","Define the value of the unit.":"Define the value of the unit.","Define to which group the unit should be assigned.":"Define to which group the unit should be assigned.","Base Unit":"Base Unit","Determine if the unit is the base unit from the group.":"Determine if the unit is the base unit from the group.","Provide a short description about the unit.":"Provide a short description about the unit.","Unit Groups List":"Unit Groups List","Display all unit groups.":"Display all unit groups.","No unit groups has been registered":"No unit groups has been registered","Add a new unit group":"Add a new unit group","Create a new unit group":"Create a new unit group","Register a new unit group and save it.":"Register a new unit group and save it.","Edit unit group":"Edit unit group","Modify Unit Group.":"Modify Unit Group.","Return to Unit Groups":"Return to Unit Groups","Users List":"Users List","Display all users.":"Display all users.","No users has been registered":"No users has been registered","Add a new user":"Add a new user","Create a new user":"Create a new user","Register a new user and save it.":"Register a new user and save it.","Edit user":"Edit user","Modify User.":"Modify User.","Return to Users":"Return to Users","Username":"Username","Will be used for various purposes such as email recovery.":"Will be used for various purposes such as email recovery.","Password":"Password","Make a unique and secure password.":"Make a unique and secure password.","Confirm Password":"Confirm Password","Should be the same as the password.":"Should be the same as the password.","Define wether the user can use the application.":"Define wether the user can use the application.","Define the role of the user":"Define the role of the user","Role":"Role","The action you tried to perform is not allowed.":"The action you tried to perform is not allowed.","Not Enough Permissions":"Not Enough Permissions","The resource of the page you tried to access is not available or might have been deleted.":"The resource of the page you tried to access is not available or might have been deleted.","Not Found Exception":"Not Found Exception","Provide your username.":"Provide your username.","Provide your password.":"Provide your password.","Provide your email.":"Provide your email.","Password Confirm":"Password Confirm","define the amount of the transaction.":"define the amount of the transaction.","Further observation while proceeding.":"Further observation while proceeding.","determine what is the transaction type.":"determine what is the transaction type.","Add":"Add","Deduct":"Deduct","Determine the amount of the transaction.":"Determine the amount of the transaction.","Further details about the transaction.":"Further details about the transaction.","Define the installments for the current order.":"Define the installments for the current order.","New Password":"New Password","define your new password.":"define your new password.","confirm your new password.":"confirm your new password.","choose the payment type.":"choose the payment type.","Provide the procurement name.":"Provide the procurement name.","Describe the procurement.":"Describe the procurement.","Define the provider.":"Define the provider.","Mention the provider name.":"Mention the provider name.","Provider Name":"Provider Name","It could be used to send some informations to the provider.":"It could be used to send some informations to the provider.","If the provider has any surname, provide it here.":"If the provider has any surname, provide it here.","Mention the phone number of the provider.":"Mention the phone number of the provider.","Mention the first address of the provider.":"Mention the first address of the provider.","Mention the second address of the provider.":"Mention the second address of the provider.","Mention any description of the provider.":"Mention any description of the provider.","Define what is the unit price of the product.":"Define what is the unit price of the product.","Condition":"Condition","Determine in which condition the product is returned.":"Determine in which condition the product is returned.","Other Observations":"Other Observations","Describe in details the condition of the returned product.":"Describe in details the condition of the returned product.","Unit Group Name":"Unit Group Name","Provide a unit name to the unit.":"Provide a unit name to the unit.","Describe the current unit.":"Describe the current unit.","assign the current unit to a group.":"assign the current unit to a group.","define the unit value.":"define the unit value.","Provide a unit name to the units group.":"Provide a unit name to the units group.","Describe the current unit group.":"Describe the current unit group.","POS":"POS","Open POS":"Open POS","Create Register":"Create Register","Registes List":"Registes List","Use Customer Billing":"Use Customer Billing","Define wether the customer billing information should be used.":"Define wether the customer billing information should be used.","General Shipping":"General Shipping","Define how the shipping is calculated.":"Define how the shipping is calculated.","Shipping Fees":"Shipping Fees","Define shipping fees.":"Define shipping fees.","Use Customer Shipping":"Use Customer Shipping","Define wether the customer shipping information should be used.":"Define wether the customer shipping information should be used.","Invoice Number":"Invoice Number","If the procurement has been issued outside of NexoPOS, please provide a unique reference.":"If the procurement has been issued outside of NexoPOS, please provide a unique reference.","Delivery Time":"Delivery Time","If the procurement has to be delivered at a specific time, define the moment here.":"If the procurement has to be delivered at a specific time, define the moment here.","Automatic Approval":"Automatic Approval","Determine if the procurement should be marked automatically as approved once the Delivery Time occurs.":"Determine if the procurement should be marked automatically as approved once the Delivery Time occurs.","Determine what is the actual payment status of the procurement.":"Determine what is the actual payment status of the procurement.","Determine what is the actual provider of the current procurement.":"Determine what is the actual provider of the current procurement.","Provide a name that will help to identify the procurement.":"Provide a name that will help to identify the procurement.","UOM":"UOM","First Name":"First Name","Define what is the user first name. If not provided, the username is used instead.":"Define what is the user first name. If not provided, the username is used instead.","Second Name":"Second Name","Define what is the user second name. If not provided, the username is used instead.":"Define what is the user second name. If not provided, the username is used instead.","Avatar":"Avatar","Define the image that should be used as an avatar.":"Define the image that should be used as an avatar.","Language":"Language","Choose the language for the current account.":"Choose the language for the current account.","Security":"Security","Old Password":"Old Password","Provide the old password.":"Provide the old password.","Change your password with a better stronger password.":"Change your password with a better stronger password.","Password Confirmation":"Password Confirmation","The profile has been successfully saved.":"The profile has been successfully saved.","The user attribute has been saved.":"The user attribute has been saved.","The options has been successfully updated.":"The options has been successfully updated.","Wrong password provided":"Wrong password provided","Wrong old password provided":"Wrong old password provided","Password Successfully updated.":"Password Successfully updated.","Sign In — NexoPOS":"Sign In — NexoPOS","Sign Up — NexoPOS":"Sign Up — NexoPOS","Password Lost":"Password Lost","Unable to proceed as the token provided is invalid.":"Unable to proceed as the token provided is invalid.","The token has expired. Please request a new activation token.":"The token has expired. Please request a new activation token.","Set New Password":"Set New Password","Database Update":"Database Update","This account is disabled.":"This account is disabled.","Unable to find record having that username.":"Unable to find record having that username.","Unable to find record having that password.":"Unable to find record having that password.","Invalid username or password.":"Invalid username or password.","Unable to login, the provided account is not active.":"Unable to login, the provided account is not active.","You have been successfully connected.":"You have been successfully connected.","The recovery email has been send to your inbox.":"The recovery email has been send to your inbox.","Unable to find a record matching your entry.":"Unable to find a record matching your entry.","No role has been defined for registration. Please contact the administrators.":"No role has been defined for registration. Please contact the administrators.","Your Account has been successfully creaetd.":"Your Account has been successfully creaetd.","Your Account has been created but requires email validation.":"Your Account has been created but requires email validation.","Unable to find the requested user.":"Unable to find the requested user.","Unable to proceed, the provided token is not valid.":"Unable to proceed, the provided token is not valid.","Unable to proceed, the token has expired.":"Unable to proceed, the token has expired.","Your password has been updated.":"Your password has been updated.","Unable to edit a register that is currently in use":"Unable to edit a register that is currently in use","No register has been opened by the logged user.":"No register has been opened by the logged user.","The register is opened.":"The register is opened.","Closing":"Closing","Opening":"Opening","Sale":"Sale","Refund":"Refund","Unable to find the category using the provided identifier":"Unable to find the category using the provided identifier","The category has been deleted.":"The category has been deleted.","Unable to find the category using the provided identifier.":"Unable to find the category using the provided identifier.","Unable to find the attached category parent":"Unable to find the attached category parent","The category has been correctly saved":"The category has been correctly saved","The category has been updated":"The category has been updated","The entry has been successfully deleted.":"The entry has been successfully deleted.","A new entry has been successfully created.":"A new entry has been successfully created.","Unhandled crud resource":"Unhandled crud resource","You need to select at least one item to delete":"You need to select at least one item to delete","You need to define which action to perform":"You need to define which action to perform","Unable to proceed. No matching CRUD resource has been found.":"Unable to proceed. No matching CRUD resource has been found.","This resource is not protected. The access is granted.":"This resource is not protected. The access is granted.","Create Coupon":"Create Coupon","helps you creating a coupon.":"helps you creating a coupon.","Edit Coupon":"Edit Coupon","Editing an existing coupon.":"Editing an existing coupon.","Invalid Request.":"Invalid Request.","Unable to delete a group to which customers are still assigned.":"Unable to delete a group to which customers are still assigned.","The customer group has been deleted.":"The customer group has been deleted.","Unable to find the requested group.":"Unable to find the requested group.","The customer group has been successfully created.":"The customer group has been successfully created.","The customer group has been successfully saved.":"The customer group has been successfully saved.","Unable to transfer customers to the same account.":"Unable to transfer customers to the same account.","All the customers has been trasnfered to the new group %s.":"All the customers has been trasnfered to the new group %s.","The categories has been transfered to the group %s.":"The categories has been transfered to the group %s.","No customer identifier has been provided to proceed to the transfer.":"No customer identifier has been provided to proceed to the transfer.","Unable to find the requested group using the provided id.":"Unable to find the requested group using the provided id.","List all created expenses":"List all created expenses","\"%s\" is not an instance of \"FieldsService\"":"\"%s\" is not an instance of \"FieldsService\"","Manage Medias":"Manage Medias","The operation was successful.":"The operation was successful.","Modules List":"Modules List","List all available modules.":"List all available modules.","Upload A Module":"Upload A Module","Extends NexoPOS features with some new modules.":"Extends NexoPOS features with some new modules.","The notification has been successfully deleted":"The notification has been successfully deleted","All the notificataions has been cleared.":"All the notificataions has been cleared.","POS — NexoPOS":"POS — NexoPOS","Order Invoice — %s":"Order Invoice — %s","Order Receipt — %s":"Order Receipt — %s","The printing event has been successfully dispatched.":"The printing event has been successfully dispatched.","There is a mismatch between the provided order and the order attached to the instalment.":"There is a mismatch between the provided order and the order attached to the instalment.","Unammed Page":"Unammed Page","Unable to edit a procurement that is stocked. Consider performing an adjustment or either delete the procurement.":"Unable to edit a procurement that is stocked. Consider performing an adjustment or either delete the procurement.","New Procurement":"New Procurement","Make a new procurement":"Make a new procurement","Edit Procurement":"Edit Procurement","Perform adjustment on existing procurement.":"Perform adjustment on existing procurement.","%s - Invoice":"%s - Invoice","list of product procured.":"list of product procured.","The product price has been refreshed.":"The product price has been refreshed.","The single variation has been deleted.":"The single variation has been deleted.","List all products available on the system":"List all products available on the system","Edit a product":"Edit a product","Makes modifications to a product":"Makes modifications to a product","Create a product":"Create a product","Add a new product on the system":"Add a new product on the system","Stock Adjustment":"Stock Adjustment","Adjust stock of existing products.":"Adjust stock of existing products.","Lost":"Lost","No stock is provided for the requested product.":"No stock is provided for the requested product.","The product unit quantity has been deleted.":"The product unit quantity has been deleted.","Unable to proceed as the request is not valid.":"Unable to proceed as the request is not valid.","Unsupported action for the product %s.":"Unsupported action for the product %s.","The stock has been adjustment successfully.":"The stock has been adjustment successfully.","Unable to add the product to the cart as it has expired.":"Unable to add the product to the cart as it has expired.","Unable to add a product that has accurate tracking enabled, using an ordinary barcode.":"Unable to add a product that has accurate tracking enabled, using an ordinary barcode.","There is no products matching the current request.":"There is no products matching the current request.","Print Labels":"Print Labels","Customize and print products labels.":"Customize and print products labels.","The form contains one or more errors.":"The form contains one or more errors.","Sales Report":"Sales Report","Provides an overview over the sales during a specific period":"Provides an overview over the sales during a specific period","Sold Stock":"Sold Stock","Provides an overview over the sold stock during a specific period.":"Provides an overview over the sold stock during a specific period.","Profit Report":"Profit Report","Provides an overview of the provide of the products sold.":"Provides an overview of the provide of the products sold.","Cash Flow Report":"Cash Flow Report","Provides an overview on the activity for a specific period.":"Provides an overview on the activity for a specific period.","Annual Report":"Annual Report","Invalid authorization code provided.":"Invalid authorization code provided.","The database has been successfully seeded.":"The database has been successfully seeded.","Rewards System":"Rewards System","Manage all rewards program.":"Manage all rewards program.","Create A Reward System":"Create A Reward System","Add a new reward system.":"Add a new reward system.","Edit A Reward System":"Edit A Reward System","edit an existing reward system with the rules attached.":"edit an existing reward system with the rules attached.","Settings Page Not Found":"Settings Page Not Found","Customers Settings":"Customers Settings","Configure the customers settings of the application.":"Configure the customers settings of the application.","General Settings":"General Settings","Configure the general settings of the application.":"Configure the general settings of the application.","Notifications Settings":"Notifications Settings","Configure the notifications settings of the application.":"Configure the notifications settings of the application.","Invoices Settings":"Invoices Settings","Configure the invoice settings.":"Configure the invoice settings.","Orders Settings":"Orders Settings","Configure the orders settings.":"Configure the orders settings.","POS Settings":"POS Settings","Configure the pos settings.":"Configure the pos settings.","Supplies & Deliveries Settings":"Supplies & Deliveries Settings","Configure the supplies and deliveries settings.":"Configure the supplies and deliveries settings.","Reports Settings":"Reports Settings","Configure the reports.":"Configure the reports.","Reset Settings":"Reset Settings","Reset the data and enable demo.":"Reset the data and enable demo.","Services Providers Settings":"Services Providers Settings","Configure the services providers settings.":"Configure the services providers settings.","Workers Settings":"Workers Settings","Configure the workers settings.":"Configure the workers settings.","%s is not an instance of \"%s\".":"%s is not an instance of \"%s\".","Unable to find the requeted product tax using the provided id":"Unable to find the requeted product tax using the provided id","Unable to find the requested product tax using the provided identifier.":"Unable to find the requested product tax using the provided identifier.","The product tax has been created.":"The product tax has been created.","The product tax has been updated":"The product tax has been updated","Unable to retreive the requested tax group using the provided identifier \"%s\".":"Unable to retreive the requested tax group using the provided identifier \"%s\".","Manage all users available.":"Manage all users available.","Permission Manager":"Permission Manager","Manage all permissions and roles":"Manage all permissions and roles","My Profile":"My Profile","Change your personal settings":"Change your personal settings","The permissions has been updated.":"The permissions has been updated.","Sunday":"Sunday","Monday":"Monday","Tuesday":"Tuesday","Wednesday":"Wednesday","Thursday":"Thursday","Friday":"Friday","Saturday":"Saturday","NexoPOS 4 — Setup Wizard":"NexoPOS 4 — Setup Wizard","The migration has successfully run.":"The migration has successfully run.","Workers Misconfiguration":"Workers Misconfiguration","Unable to initialize the settings page. The identifier \"%s\" cannot be instantiated.":"Unable to initialize the settings page. The identifier \"%s\" cannot be instantiated.","Unable to register. The registration is closed.":"Unable to register. The registration is closed.","Hold Order Cleared":"Hold Order Cleared","[NexoPOS] Activate Your Account":"[NexoPOS] Activate Your Account","[NexoPOS] A New User Has Registered":"[NexoPOS] A New User Has Registered","[NexoPOS] Your Account Has Been Created":"[NexoPOS] Your Account Has Been Created","Unable to find the permission with the namespace \"%s\".":"Unable to find the permission with the namespace \"%s\".","Voided":"Voided","Refunded":"Refunded","Partially Refunded":"Partially Refunded","This email is already in use.":"This email is already in use.","This username is already in use.":"This username is already in use.","The user has been succesfully registered":"The user has been succesfully registered","The current authentication request is invalid":"The current authentication request is invalid","Unable to proceed your session has expired.":"Unable to proceed your session has expired.","You are successfully authenticated":"You are successfully authenticated","The user has been successfully connected":"The user has been successfully connected","Your role is not allowed to login.":"Your role is not allowed to login.","This email is not currently in use on the system.":"This email is not currently in use on the system.","Unable to reset a password for a non active user.":"Unable to reset a password for a non active user.","An email has been send with password reset details.":"An email has been send with password reset details.","Unable to proceed, the reCaptcha validation has failed.":"Unable to proceed, the reCaptcha validation has failed.","Unable to proceed, the code has expired.":"Unable to proceed, the code has expired.","Unable to proceed, the request is not valid.":"Unable to proceed, the request is not valid.","The register has been successfully opened":"The register has been successfully opened","The register has been successfully closed":"The register has been successfully closed","The provided amount is not allowed. The amount should be greater than \"0\". ":"The provided amount is not allowed. The amount should be greater than \"0\". ","The cash has successfully been stored":"The cash has successfully been stored","Not enough fund to cash out.":"Not enough fund to cash out.","The cash has successfully been disbursed.":"The cash has successfully been disbursed.","In Use":"In Use","Opened":"Opened","Delete Selected entries":"Delete Selected entries","%s entries has been deleted":"%s entries has been deleted","%s entries has not been deleted":"%s entries has not been deleted","Unable to find the customer using the provided id.":"Unable to find the customer using the provided id.","The customer has been deleted.":"The customer has been deleted.","The email \"%s\" is already stored on another customer informations.":"The email \"%s\" is already stored on another customer informations.","The customer has been created.":"The customer has been created.","Unable to find the customer using the provided ID.":"Unable to find the customer using the provided ID.","The customer has been edited.":"The customer has been edited.","Unable to find the customer using the provided email.":"Unable to find the customer using the provided email.","The operation will cause negative account for the customer.":"The operation will cause negative account for the customer.","The customer account has been updated.":"The customer account has been updated.","Issuing Coupon Failed":"Issuing Coupon Failed","Unable to apply a coupon attached to the reward \"%s\". It looks like the coupon no more exists.":"Unable to apply a coupon attached to the reward \"%s\". It looks like the coupon no more exists.","The coupon is issued for a customer.":"The coupon is issued for a customer.","The coupon is not issued for the selected customer.":"The coupon is not issued for the selected customer.","Unable to find a coupon with the provided code.":"Unable to find a coupon with the provided code.","The coupon has been updated.":"The coupon has been updated.","The group has been created.":"The group has been created.","The expense has been successfully saved.":"The expense has been successfully saved.","The expense has been successfully updated.":"The expense has been successfully updated.","Unable to find the expense using the provided identifier.":"Unable to find the expense using the provided identifier.","Unable to find the requested expense using the provided id.":"Unable to find the requested expense using the provided id.","The expense has been correctly deleted.":"The expense has been correctly deleted.","Unable to find the requested expense category using the provided id.":"Unable to find the requested expense category using the provided id.","You cannot delete a category which has expenses bound.":"You cannot delete a category which has expenses bound.","The expense category has been deleted.":"The expense category has been deleted.","Unable to find the expense category using the provided ID.":"Unable to find the expense category using the provided ID.","The expense category has been saved":"The expense category has been saved","The expense category has been updated.":"The expense category has been updated.","The expense \"%s\" has been processed.":"The expense \"%s\" has been processed.","The expense \"%s\" has already been processed.":"The expense \"%s\" has already been processed.","The process has been correctly executed and all expenses has been processed.":"The process has been correctly executed and all expenses has been processed.","%s — NexoPOS 4":"%s — NexoPOS 4","The media has been deleted":"The media has been deleted","Unable to find the media.":"Unable to find the media.","Unable to find the requested file.":"Unable to find the requested file.","Unable to find the media entry":"Unable to find the media entry","Payment Types":"Payment Types","Medias":"Medias","List":"List","Customers Groups":"Customers Groups","Create Group":"Create Group","Reward Systems":"Reward Systems","Create Reward":"Create Reward","List Coupons":"List Coupons","Providers":"Providers","Create A Provider":"Create A Provider","Create Expense":"Create Expense","Inventory":"Inventory","Create Product":"Create Product","Create Category":"Create Category","Create Unit":"Create Unit","Unit Groups":"Unit Groups","Create Unit Groups":"Create Unit Groups","Taxes Groups":"Taxes Groups","Create Tax Groups":"Create Tax Groups","Create Tax":"Create Tax","Modules":"Modules","Upload Module":"Upload Module","Users":"Users","Create User":"Create User","Roles":"Roles","Create Roles":"Create Roles","Permissions Manager":"Permissions Manager","Procurements":"Procurements","Reports":"Reports","Sale Report":"Sale Report","Incomes & Loosses":"Incomes & Loosses","Cash Flow":"Cash Flow","Supplies & Deliveries":"Supplies & Deliveries","Invoice Settings":"Invoice Settings","Service Providers":"Service Providers","Notifications":"Notifications","Workers":"Workers","Unable to locate the requested module.":"Unable to locate the requested module.","The module \"%s\" has been disabled as the dependency \"%s\" is missing. ":"The module \"%s\" has been disabled as the dependency \"%s\" is missing. ","The module \"%s\" has been disabled as the dependency \"%s\" is not enabled. ":"The module \"%s\" has been disabled as the dependency \"%s\" is not enabled. ","Unable to detect the folder from where to perform the installation.":"Unable to detect the folder from where to perform the installation.","Invalid Module provided":"Invalid Module provided","The uploaded file is not a valid module.":"The uploaded file is not a valid module.","A migration is required for this module":"A migration is required for this module","The module has been successfully installed.":"The module has been successfully installed.","The migration run successfully.":"The migration run successfully.","The module has correctly been enabled.":"The module has correctly been enabled.","Unable to enable the module.":"Unable to enable the module.","The Module has been disabled.":"The Module has been disabled.","Unable to disable the module.":"Unable to disable the module.","Unable to proceed, the modules management is disabled.":"Unable to proceed, the modules management is disabled.","Missing required parameters to create a notification":"Missing required parameters to create a notification","The order has been placed.":"The order has been placed.","The total amount to be paid today is different from the tendered amount.":"The total amount to be paid today is different from the tendered amount.","The provided coupon \"%s\", can no longer be used":"The provided coupon \"%s\", can no longer be used","The percentage discount provided is not valid.":"The percentage discount provided is not valid.","A discount cannot exceed the sub total value of an order.":"A discount cannot exceed the sub total value of an order.","No payment is expected at the moment. If the customer want to pay early, consider adjusting instalment payments date.":"No payment is expected at the moment. If the customer want to pay early, consider adjusting instalment payments date.","The payment has been saved.":"The payment has been saved.","Unable to edit an order that is completely paid.":"Unable to edit an order that is completely paid.","Unable to proceed as one of the previous submitted payment is missing from the order.":"Unable to proceed as one of the previous submitted payment is missing from the order.","The order payment status cannot switch to hold as a payment has already been made on that order.":"The order payment status cannot switch to hold as a payment has already been made on that order.","Unable to proceed. One of the submitted payment type is not supported.":"Unable to proceed. One of the submitted payment type is not supported.","Unable to proceed, the product \"%s\" has a unit which cannot be retreived. It might have been deleted.":"Unable to proceed, the product \"%s\" has a unit which cannot be retreived. It might have been deleted.","Unable to find the customer using the provided ID. The order creation has failed.":"Unable to find the customer using the provided ID. The order creation has failed.","Unable to proceed a refund on an unpaid order.":"Unable to proceed a refund on an unpaid order.","The current credit has been issued from a refund.":"The current credit has been issued from a refund.","The order has been successfully refunded.":"The order has been successfully refunded.","unable to proceed to a refund as the provided status is not supported.":"unable to proceed to a refund as the provided status is not supported.","The product %s has been successfully refunded.":"The product %s has been successfully refunded.","Unable to find the order product using the provided id.":"Unable to find the order product using the provided id.","Unable to find the requested order using \"%s\" as pivot and \"%s\" as identifier":"Unable to find the requested order using \"%s\" as pivot and \"%s\" as identifier","Unable to fetch the order as the provided pivot argument is not supported.":"Unable to fetch the order as the provided pivot argument is not supported.","The product has been added to the order \"%s\"":"The product has been added to the order \"%s\"","the order has been succesfully computed.":"the order has been succesfully computed.","The order has been deleted.":"The order has been deleted.","The product has been successfully deleted from the order.":"The product has been successfully deleted from the order.","Unable to find the requested product on the provider order.":"Unable to find the requested product on the provider order.","Unpaid Orders Turned Due":"Unpaid Orders Turned Due","No orders to handle for the moment.":"No orders to handle for the moment.","The order has been correctly voided.":"The order has been correctly voided.","Unable to edit an already paid instalment.":"Unable to edit an already paid instalment.","The instalment has been saved.":"The instalment has been saved.","The instalment has been deleted.":"The instalment has been deleted.","The defined amount is not valid.":"The defined amount is not valid.","No further instalments is allowed for this order. The total instalment already covers the order total.":"No further instalments is allowed for this order. The total instalment already covers the order total.","The instalment has been created.":"The instalment has been created.","The provided status is not supported.":"The provided status is not supported.","The order has been successfully updated.":"The order has been successfully updated.","Unable to find the requested procurement using the provided identifier.":"Unable to find the requested procurement using the provided identifier.","Unable to find the assigned provider.":"Unable to find the assigned provider.","The procurement has been created.":"The procurement has been created.","Unable to edit a procurement that has already been stocked. Please consider performing and stock adjustment.":"Unable to edit a procurement that has already been stocked. Please consider performing and stock adjustment.","The provider has been edited.":"The provider has been edited.","Unable to delete the procurement as there is not enough stock remaining for \"%s\". This likely means the stock count has changed either with a sale, adjustment after the procurement has been stocked.":"Unable to delete the procurement as there is not enough stock remaining for \"%s\". This likely means the stock count has changed either with a sale, adjustment after the procurement has been stocked.","Unable to have a unit group id for the product using the reference \"%s\" as \"%s\"":"Unable to have a unit group id for the product using the reference \"%s\" as \"%s\"","The operation has completed.":"The operation has completed.","The procurement has been refreshed.":"The procurement has been refreshed.","The procurement has been reset.":"The procurement has been reset.","The procurement products has been deleted.":"The procurement products has been deleted.","The procurement product has been updated.":"The procurement product has been updated.","Unable to find the procurement product using the provided id.":"Unable to find the procurement product using the provided id.","The product %s has been deleted from the procurement %s":"The product %s has been deleted from the procurement %s","The product with the following ID \"%s\" is not initially included on the procurement":"The product with the following ID \"%s\" is not initially included on the procurement","The procurement products has been updated.":"The procurement products has been updated.","Procurement Automatically Stocked":"Procurement Automatically Stocked","Draft":"Draft","The category has been created":"The category has been created","Unable to find the product using the provided id.":"Unable to find the product using the provided id.","Unable to find the requested product using the provided SKU.":"Unable to find the requested product using the provided SKU.","The variable product has been created.":"The variable product has been created.","The provided barcode \"%s\" is already in use.":"The provided barcode \"%s\" is already in use.","The provided SKU \"%s\" is already in use.":"The provided SKU \"%s\" is already in use.","The product has been saved.":"The product has been saved.","The provided barcode is already in use.":"The provided barcode is already in use.","The provided SKU is already in use.":"The provided SKU is already in use.","The product has been udpated":"The product has been udpated","The variable product has been updated.":"The variable product has been updated.","The product variations has been reset":"The product variations has been reset","The product has been resetted.":"The product has been resetted.","The product \"%s\" has been successfully deleted":"The product \"%s\" has been successfully deleted","Unable to find the requested variation using the provided ID.":"Unable to find the requested variation using the provided ID.","The product stock has been updated.":"The product stock has been updated.","The action is not an allowed operation.":"The action is not an allowed operation.","The product quantity has been updated.":"The product quantity has been updated.","There is no variations to delete.":"There is no variations to delete.","There is no products to delete.":"There is no products to delete.","The product variation has been succesfully created.":"The product variation has been succesfully created.","The product variation has been updated.":"The product variation has been updated.","The provider has been created.":"The provider has been created.","The provider has been updated.":"The provider has been updated.","Unable to find the provider using the specified id.":"Unable to find the provider using the specified id.","The provider has been deleted.":"The provider has been deleted.","Unable to find the provider using the specified identifier.":"Unable to find the provider using the specified identifier.","The provider account has been updated.":"The provider account has been updated.","The procurement payment has been deducted.":"The procurement payment has been deducted.","The dashboard report has been updated.":"The dashboard report has been updated.","Untracked Stock Operation":"Untracked Stock Operation","Unsupported action":"Unsupported action","The expense has been correctly saved.":"The expense has been correctly saved.","The table has been truncated.":"The table has been truncated.","The database has been hard reset.":"The database has been hard reset.","Untitled Settings Page":"Untitled Settings Page","No description provided for this settings page.":"No description provided for this settings page.","The form has been successfully saved.":"The form has been successfully saved.","Unable to reach the host":"Unable to reach the host","Unable to connect to the database using the credentials provided.":"Unable to connect to the database using the credentials provided.","Unable to select the database.":"Unable to select the database.","Access denied for this user.":"Access denied for this user.","The connexion with the database was successful":"The connexion with the database was successful","Cash":"Cash","Bank Payment":"Bank Payment","NexoPOS has been successfuly installed.":"NexoPOS has been successfuly installed.","Database connexion was successful":"Database connexion was successful","A simple tax must not be assigned to a parent tax with the type \"simple\", but \"grouped\" instead.":"A simple tax must not be assigned to a parent tax with the type \"simple\", but \"grouped\" instead.","A tax cannot be his own parent.":"A tax cannot be his own parent.","The tax hierarchy is limited to 1. A sub tax must not have the tax type set to \"grouped\".":"The tax hierarchy is limited to 1. A sub tax must not have the tax type set to \"grouped\".","Unable to find the requested tax using the provided identifier.":"Unable to find the requested tax using the provided identifier.","The tax group has been correctly saved.":"The tax group has been correctly saved.","The tax has been correctly created.":"The tax has been correctly created.","The product tax has been saved.":"The product tax has been saved.","The tax has been successfully deleted.":"The tax has been successfully deleted.","The Unit Group has been created.":"The Unit Group has been created.","The unit group %s has been updated.":"The unit group %s has been updated.","Unable to find the unit group to which this unit is attached.":"Unable to find the unit group to which this unit is attached.","The unit has been saved.":"The unit has been saved.","Unable to find the Unit using the provided id.":"Unable to find the Unit using the provided id.","The unit has been updated.":"The unit has been updated.","The unit group %s has more than one base unit":"The unit group %s has more than one base unit","The unit has been deleted.":"The unit has been deleted.","The activation process has failed.":"The activation process has failed.","Unable to activate the account. The activation token is wrong.":"Unable to activate the account. The activation token is wrong.","Unable to activate the account. The activation token has expired.":"Unable to activate the account. The activation token has expired.","The account has been successfully activated.":"The account has been successfully activated.","unable to find this validation class %s.":"unable to find this validation class %s.","Enable Reward":"Enable Reward","Will activate the reward system for the customers.":"Will activate the reward system for the customers.","Default Customer Account":"Default Customer Account","Default Customer Group":"Default Customer Group","Select to which group each new created customers are assigned to.":"Select to which group each new created customers are assigned to.","Enable Credit & Account":"Enable Credit & Account","The customers will be able to make deposit or obtain credit.":"The customers will be able to make deposit or obtain credit.","Store Name":"Store Name","This is the store name.":"This is the store name.","Store Address":"Store Address","The actual store address.":"The actual store address.","Store City":"Store City","The actual store city.":"The actual store city.","Store Phone":"Store Phone","The phone number to reach the store.":"The phone number to reach the store.","Store Email":"Store Email","The actual store email. Might be used on invoice or for reports.":"The actual store email. Might be used on invoice or for reports.","Store PO.Box":"Store PO.Box","The store mail box number.":"The store mail box number.","Store Fax":"Store Fax","The store fax number.":"The store fax number.","Store Additional Information":"Store Additional Information","Store additional informations.":"Store additional informations.","Store Square Logo":"Store Square Logo","Choose what is the square logo of the store.":"Choose what is the square logo of the store.","Store Rectangle Logo":"Store Rectangle Logo","Choose what is the rectangle logo of the store.":"Choose what is the rectangle logo of the store.","Define the default fallback language.":"Define the default fallback language.","Currency":"Currency","Currency Symbol":"Currency Symbol","This is the currency symbol.":"This is the currency symbol.","Currency ISO":"Currency ISO","The international currency ISO format.":"The international currency ISO format.","Currency Position":"Currency Position","Before the amount":"Before the amount","After the amount":"After the amount","Define where the currency should be located.":"Define where the currency should be located.","Prefered Currency":"Prefered Currency","ISO Currency":"ISO Currency","Symbol":"Symbol","Determine what is the currency indicator that should be used.":"Determine what is the currency indicator that should be used.","Currency Thousand Separator":"Currency Thousand Separator","Define the symbol that indicate thousand. By default \",\" is used.":"Define the symbol that indicate thousand. By default \",\" is used.","Currency Decimal Separator":"Currency Decimal Separator","Define the symbol that indicate decimal number. By default \".\" is used.":"Define the symbol that indicate decimal number. By default \".\" is used.","Currency Precision":"Currency Precision","%s numbers after the decimal":"%s numbers after the decimal","Date Format":"Date Format","This define how the date should be defined. The default format is \"Y-m-d\".":"This define how the date should be defined. The default format is \"Y-m-d\".","Determine the default timezone of the store.":"Determine the default timezone of the store.","Registration":"Registration","Registration Open":"Registration Open","Determine if everyone can register.":"Determine if everyone can register.","Registration Role":"Registration Role","Select what is the registration role.":"Select what is the registration role.","Requires Validation":"Requires Validation","Force account validation after the registration.":"Force account validation after the registration.","Allow Recovery":"Allow Recovery","Allow any user to recover his account.":"Allow any user to recover his account.","Receipts":"Receipts","Receipt Template":"Receipt Template","Default":"Default","Choose the template that applies to receipts":"Choose the template that applies to receipts","Receipt Logo":"Receipt Logo","Provide a URL to the logo.":"Provide a URL to the logo.","Receipt Footer":"Receipt Footer","If you would like to add some disclosure at the bottom of the receipt.":"If you would like to add some disclosure at the bottom of the receipt.","Column A":"Column A","Column B":"Column B","Low Stock products":"Low Stock products","Define if notification should be enabled on low stock products":"Define if notification should be enabled on low stock products","Low Stock Channel":"Low Stock Channel","SMS":"SMS","Define the notification channel for the low stock products.":"Define the notification channel for the low stock products.","Expired products":"Expired products","Define if notification should be enabled on expired products":"Define if notification should be enabled on expired products","Expired Channel":"Expired Channel","Define the notification channel for the expired products.":"Define the notification channel for the expired products.","Notify Administrators":"Notify Administrators","Will notify administrator everytime a new user is registrated.":"Will notify administrator everytime a new user is registrated.","Administrator Notification Title":"Administrator Notification Title","Determine the title of the email send to the administrator.":"Determine the title of the email send to the administrator.","Administrator Notification Content":"Administrator Notification Content","Determine what is the message that will be send to the administrator.":"Determine what is the message that will be send to the administrator.","Notify User":"Notify User","Notify a user when his account is successfully created.":"Notify a user when his account is successfully created.","User Registration Title":"User Registration Title","Determine the title of the mail send to the user when his account is created and active.":"Determine the title of the mail send to the user when his account is created and active.","User Registration Content":"User Registration Content","Determine the body of the mail send to the user when his account is created and active.":"Determine the body of the mail send to the user when his account is created and active.","User Activate Title":"User Activate Title","Determine the title of the mail send to the user.":"Determine the title of the mail send to the user.","User Activate Content":"User Activate Content","Determine the mail that will be send to the use when his account requires an activation.":"Determine the mail that will be send to the use when his account requires an activation.","Order Code Type":"Order Code Type","Determine how the system will generate code for each orders.":"Determine how the system will generate code for each orders.","Sequential":"Sequential","Random Code":"Random Code","Number Sequential":"Number Sequential","Allow Unpaid Orders":"Allow Unpaid Orders","Will prevent incomplete orders to be placed. If credit is allowed, this option should be set to \"yes\".":"Will prevent incomplete orders to be placed. If credit is allowed, this option should be set to \"yes\".","Allow Partial Orders":"Allow Partial Orders","Will prevent partially paid orders to be placed.":"Will prevent partially paid orders to be placed.","Quotation Expiration":"Quotation Expiration","Quotations will get deleted after they defined they has reached.":"Quotations will get deleted after they defined they has reached.","%s Days":"%s Days","Orders Follow Up":"Orders Follow Up","Features":"Features","Sound Effect":"Sound Effect","Enable sound effect on the POS.":"Enable sound effect on the POS.","Show Quantity":"Show Quantity","Will show the quantity selector while choosing a product. Otherwise the default quantity is set to 1.":"Will show the quantity selector while choosing a product. Otherwise the default quantity is set to 1.","Allow Customer Creation":"Allow Customer Creation","Allow customers to be created on the POS.":"Allow customers to be created on the POS.","Quick Product":"Quick Product","Allow quick product to be created from the POS.":"Allow quick product to be created from the POS.","SMS Order Confirmation":"SMS Order Confirmation","Will send SMS to the customer once the order is placed.":"Will send SMS to the customer once the order is placed.","Editable Unit Price":"Editable Unit Price","Allow product unit price to be edited.":"Allow product unit price to be edited.","Use Gross Prices":"Use Gross Prices","Will use gross prices for each products.":"Will use gross prices for each products.","Order Types":"Order Types","Control the order type enabled.":"Control the order type enabled.","Layout":"Layout","Retail Layout":"Retail Layout","Clothing Shop":"Clothing Shop","POS Layout":"POS Layout","Change the layout of the POS.":"Change the layout of the POS.","Printing":"Printing","Printed Document":"Printed Document","Choose the document used for printing aster a sale.":"Choose the document used for printing aster a sale.","Printing Enabled For":"Printing Enabled For","All Orders":"All Orders","From Partially Paid Orders":"From Partially Paid Orders","Only Paid Orders":"Only Paid Orders","Determine when the printing should be enabled.":"Determine when the printing should be enabled.","Printing Gateway":"Printing Gateway","Determine what is the gateway used for printing.":"Determine what is the gateway used for printing.","Enable Cash Registers":"Enable Cash Registers","Determine if the POS will support cash registers.":"Determine if the POS will support cash registers.","Cashier Idle Counter":"Cashier Idle Counter","5 Minutes":"5 Minutes","10 Minutes":"10 Minutes","15 Minutes":"15 Minutes","20 Minutes":"20 Minutes","30 Minutes":"30 Minutes","Selected after how many minutes the system will set the cashier as idle.":"Selected after how many minutes the system will set the cashier as idle.","Cash Disbursement":"Cash Disbursement","Allow cash disbursement by the cashier.":"Allow cash disbursement by the cashier.","Cash Registers":"Cash Registers","Keyboard Shortcuts":"Keyboard Shortcuts","Cancel Order":"Cancel Order","Keyboard shortcut to cancel the current order.":"Keyboard shortcut to cancel the current order.","Keyboard shortcut to hold the current order.":"Keyboard shortcut to hold the current order.","Keyboard shortcut to create a customer.":"Keyboard shortcut to create a customer.","Proceed Payment":"Proceed Payment","Keyboard shortcut to proceed to the payment.":"Keyboard shortcut to proceed to the payment.","Open Shipping":"Open Shipping","Keyboard shortcut to define shipping details.":"Keyboard shortcut to define shipping details.","Open Note":"Open Note","Keyboard shortcut to open the notes.":"Keyboard shortcut to open the notes.","Open Calculator":"Open Calculator","Keyboard shortcut to open the calculator.":"Keyboard shortcut to open the calculator.","Open Category Explorer":"Open Category Explorer","Keyboard shortcut to open the category explorer.":"Keyboard shortcut to open the category explorer.","Order Type Selector":"Order Type Selector","Keyboard shortcut to open the order type selector.":"Keyboard shortcut to open the order type selector.","Toggle Fullscreen":"Toggle Fullscreen","Keyboard shortcut to toggle fullscreen.":"Keyboard shortcut to toggle fullscreen.","Quick Search":"Quick Search","Keyboard shortcut open the quick search popup.":"Keyboard shortcut open the quick search popup.","Amount Shortcuts":"Amount Shortcuts","VAT Type":"VAT Type","Determine the VAT type that should be used.":"Determine the VAT type that should be used.","Flat Rate":"Flat Rate","Flexible Rate":"Flexible Rate","Products Vat":"Products Vat","Products & Flat Rate":"Products & Flat Rate","Products & Flexible Rate":"Products & Flexible Rate","Define the tax group that applies to the sales.":"Define the tax group that applies to the sales.","Define how the tax is computed on sales.":"Define how the tax is computed on sales.","VAT Settings":"VAT Settings","Enable Email Reporting":"Enable Email Reporting","Determine if the reporting should be enabled globally.":"Determine if the reporting should be enabled globally.","Email Provider":"Email Provider","Mailgun":"Mailgun","Select the email provided used on the system.":"Select the email provided used on the system.","SMS Provider":"SMS Provider","Twilio":"Twilio","Select the sms provider used on the system.":"Select the sms provider used on the system.","Enable The Multistore Mode":"Enable The Multistore Mode","Will enable the multistore.":"Will enable the multistore.","Supplies":"Supplies","Public Name":"Public Name","Define what is the user public name. If not provided, the username is used instead.":"Define what is the user public name. If not provided, the username is used instead.","Enable Workers":"Enable Workers","Enable background services for NexoPOS 4.x. Refresh to check wether the option has turned to \"Yes\".":"Enable background services for NexoPOS 4.x. Refresh to check wether the option has turned to \"Yes\".","Test":"Test","Current Week":"Current Week","Previous Week":"Previous Week","Unable to find a module having the identifier \"%\".":"Unable to find a module having the identifier \"%\".","There is no migrations to perform for the module \"%s\"":"There is no migrations to perform for the module \"%s\"","The module migration has successfully been performed for the module \"%s\"":"The module migration has successfully been performed for the module \"%s\"","Sales By Payment Types":"Sales By Payment Types","Provide a report of the sales by payment types, for a specific period.":"Provide a report of the sales by payment types, for a specific period.","Sales By Payments":"Sales By Payments","Order Settings":"Order Settings","Define the order name.":"Define the order name.","Define the date of creation of the order.":"Define the date of creation of the order.","Total Refunds":"Total Refunds","Clients Registered":"Clients Registered","Commissions":"Commissions","Processing Status":"Processing Status","Refunded Products":"Refunded Products","The delivery status of the order will be changed. Please confirm your action.":"The delivery status of the order will be changed. Please confirm your action.","The product price has been updated.":"The product price has been updated.","The editable price feature is disabled.":"The editable price feature is disabled.","Order Refunds":"Order Refunds","Product Price":"Product Price","Before saving the order as laid away, a minimum payment of {amount} is required":"Before saving the order as laid away, a minimum payment of {amount} is required","Unable to proceed":"Unable to proceed","Confirm Payment":"Confirm Payment","An instalment has been detected. Would you like to add as first payment {amount} for the selected payment type \"{paymentType}\"?":"An instalment has been detected. Would you like to add as first payment {amount} for the selected payment type \"{paymentType}\"?","Partially paid orders are disabled.":"Partially paid orders are disabled.","An order is currently being processed.":"An order is currently being processed.","Log out":"Log out","Refund receipt":"Refund receipt","Recompute":"Recompute","Sort Results":"Sort Results","Using Quantity Ascending":"Using Quantity Ascending","Using Quantity Descending":"Using Quantity Descending","Using Sales Ascending":"Using Sales Ascending","Using Sales Descending":"Using Sales Descending","Using Name Ascending":"Using Name Ascending","Using Name Descending":"Using Name Descending","Progress":"Progress","Discounts":"Discounts","An invalid date were provided. Make sure it a prior date to the actual server date.":"An invalid date were provided. Make sure it a prior date to the actual server date.","Computing report from %s...":"Computing report from %s...","The demo has been enabled.":"The demo has been enabled.","Refund Receipt":"Refund Receipt","Codabar":"Codabar","Code 128":"Code 128","Code 39":"Code 39","Code 11":"Code 11","UPC A":"UPC A","UPC E":"UPC E","Dashboard Identifier":"Dashboard Identifier","Store Dashboard":"Store Dashboard","Cashier Dashboard":"Cashier Dashboard","Default Dashboard":"Default Dashboard","Define what should be the home page of the dashboard.":"Define what should be the home page of the dashboard.","%s has been processed, %s has not been processed.":"%s has been processed, %s has not been processed.","Order Refund Receipt — %s":"Order Refund Receipt — %s","Product Sales":"Product Sales","Provides an overview over the best products sold during a specific period.":"Provides an overview over the best products sold during a specific period.","The report will be computed for the current year.":"The report will be computed for the current year.","Unknown report to refresh.":"Unknown report to refresh.","Expenses Settings":"Expenses Settings","Configure the expenses settings of the application.":"Configure the expenses settings of the application.","Report Refreshed":"Report Refreshed","The yearly report has been successfully refreshed for the year \"%s\".":"The yearly report has been successfully refreshed for the year \"%s\".","Countable":"Countable","Piece":"Piece","GST":"GST","SGST":"SGST","CGST":"CGST","Sample Procurement %s":"Sample Procurement %s","generated":"generated","Procurement Expenses":"Procurement Expenses","Products Report":"Products Report","Not Available":"Not Available","The report has been computed successfully.":"The report has been computed successfully.","Create a customer":"Create a customer","Cash Flow List":"Cash Flow List","Display all Cash Flow.":"Display all Cash Flow.","No Cash Flow has been registered":"No Cash Flow has been registered","Add a new Cash Flow":"Add a new Cash Flow","Create a new Cash Flow":"Create a new Cash Flow","Register a new Cash Flow and save it.":"Register a new Cash Flow and save it.","Edit Cash Flow":"Edit Cash Flow","Modify Cash Flow.":"Modify Cash Flow.","Credit":"Credit","Debit":"Debit","All entities attached to this category will either produce a \"credit\" or \"debit\" to the cash flow history.":"All entities attached to this category will either produce a \"credit\" or \"debit\" to the cash flow history.","Account":"Account","Provide the accounting number for this category.":"Provide the accounting number for this category.","Unable to register using this email.":"Unable to register using this email.","Unable to register using this username.":"Unable to register using this username.","Accounting Settings":"Accounting Settings","Configure the accounting settings of the application.":"Configure the accounting settings of the application.","Automatically recorded sale payment.":"Automatically recorded sale payment.","Cash out":"Cash out","An automatically generated expense for cash-out operation.":"An automatically generated expense for cash-out operation.","Sales Refunds":"Sales Refunds","Soiled":"Soiled","Cash Register Cash In":"Cash Register Cash In","Cash Register Cash Out":"Cash Register Cash Out","Accounting":"Accounting","Cash Flow History":"Cash Flow History","Expense Accounts":"Expense Accounts","Create Expense Account":"Create Expense Account","Procurement Cash Flow Account":"Procurement Cash Flow Account","Every procurement will be added to the selected cash flow account":"Every procurement will be added to the selected cash flow account","Sale Cash Flow Account":"Sale Cash Flow Account","Every sales will be added to the selected cash flow account":"Every sales will be added to the selected cash flow account","Every customer credit will be added to the selected cash flow account":"Every customer credit will be added to the selected cash flow account","Every customer credit removed will be added to the selected cash flow account":"Every customer credit removed will be added to the selected cash flow account","Sales Refunds Account":"Sales Refunds Account","Sales refunds will be attached to this cash flow account":"Sales refunds will be attached to this cash flow account","Stock return for spoiled items will be attached to this account":"Stock return for spoiled items will be attached to this account","Stock return for unspoiled items will be attached to this account":"Stock return for unspoiled items will be attached to this account","Cash Register Cash-In Account":"Cash Register Cash-In Account","Cash Register Cash-Out Account":"Cash Register Cash-Out Account","Cash Out Assigned Expense Category":"Cash Out Assigned Expense Category","Every cashout will issue an expense under the selected expense category.":"Every cashout will issue an expense under the selected expense category.","Unable to save an order with instalments amounts which additionnated is less than the order total.":"Unable to save an order with instalments amounts which additionnated is less than the order total.","Cash Register cash-in will be added to the cash flow account":"Cash Register cash-in will be added to the cash flow account","Cash Register cash-out will be added to the cash flow account":"Cash Register cash-out will be added to the cash flow account","No module has been updated yet.":"No module has been updated yet.","The reason has been updated.":"The reason has been updated.","You must select a customer before applying a coupon.":"You must select a customer before applying a coupon.","No coupons for the selected customer...":"No coupons for the selected customer...","Use Coupon":"Use Coupon","Use Customer ?":"Use Customer ?","No customer is selected. Would you like to proceed with this customer ?":"No customer is selected. Would you like to proceed with this customer ?","Change Customer ?":"Change Customer ?","Would you like to assign this customer to the ongoing order ?":"Would you like to assign this customer to the ongoing order ?","Product \/ Service":"Product \/ Service","An error has occured while computing the product.":"An error has occured while computing the product.","Provide a unique name for the product.":"Provide a unique name for the product.","Define what is the sale price of the item.":"Define what is the sale price of the item.","Set the quantity of the product.":"Set the quantity of the product.","Define what is tax type of the item.":"Define what is tax type of the item.","Choose the tax group that should apply to the item.":"Choose the tax group that should apply to the item.","Assign a unit to the product.":"Assign a unit to the product.","Some products has been added to the cart. Would youl ike to discard this order ?":"Some products has been added to the cart. Would youl ike to discard this order ?","Customer Accounts List":"Customer Accounts List","Display all customer accounts.":"Display all customer accounts.","No customer accounts has been registered":"No customer accounts has been registered","Add a new customer account":"Add a new customer account","Create a new customer account":"Create a new customer account","Register a new customer account and save it.":"Register a new customer account and save it.","Edit customer account":"Edit customer account","Modify Customer Account.":"Modify Customer Account.","Return to Customer Accounts":"Return to Customer Accounts","This will be ignored.":"This will be ignored.","Define the amount of the transaction":"Define the amount of the transaction","Define what operation will occurs on the customer account.":"Define what operation will occurs on the customer account.","Account History":"Account History","Provider Procurements List":"Provider Procurements List","Display all provider procurements.":"Display all provider procurements.","No provider procurements has been registered":"No provider procurements has been registered","Add a new provider procurement":"Add a new provider procurement","Create a new provider procurement":"Create a new provider procurement","Register a new provider procurement and save it.":"Register a new provider procurement and save it.","Edit provider procurement":"Edit provider procurement","Modify Provider Procurement.":"Modify Provider Procurement.","Return to Provider Procurements":"Return to Provider Procurements","Delivered On":"Delivered On","Items":"Items","Displays the customer account history for %s":"Displays the customer account history for %s","Procurements by \"%s\"":"Procurements by \"%s\"","Crediting":"Crediting","Deducting":"Deducting","Order Payment":"Order Payment","Order Refund":"Order Refund","Unknown Operation":"Unknown Operation","Unamed Product":"Unamed Product","Bubble":"Bubble","Ding":"Ding","Pop":"Pop","Cash Sound":"Cash Sound","Sale Complete Sound":"Sale Complete Sound","New Item Audio":"New Item Audio","The sound that plays when an item is added to the cart.":"The sound that plays when an item is added to the cart."} \ No newline at end of file +{"displaying {perPage} on {items} items":"displaying {perPage} on {items} items","The document has been generated.":"The document has been generated.","Unexpected error occured.":"Unexpected error occured.","{entries} entries selected":"{entries} entries selected","Download":"Download","Bulk Actions":"Bulk Actions","Go":"Go","Delivery":"Delivery","Take Away":"Take Away","Unknown Type":"Unknown Type","Pending":"Pending","Ongoing":"Ongoing","Delivered":"Delivered","Unknown Status":"Unknown Status","Ready":"Ready","Paid":"Paid","Hold":"Hold","Unpaid":"Unpaid","Partially Paid":"Partially Paid","Save Password":"Save Password","Unable to proceed the form is not valid.":"Unable to proceed the form is not valid.","Submit":"Submit","Register":"Register","An unexpected error occured.":"An unexpected error occured.","Best Cashiers":"Best Cashiers","No result to display.":"No result to display.","Well.. nothing to show for the meantime.":"Well.. nothing to show for the meantime.","Best Customers":"Best Customers","Well.. nothing to show for the meantime":"Well.. nothing to show for the meantime","Total Sales":"Total Sales","Today":"Today","Incomplete Orders":"Incomplete Orders","Wasted Goods":"Wasted Goods","Expenses":"Expenses","Weekly Sales":"Weekly Sales","Week Taxes":"Week Taxes","Net Income":"Net Income","Week Expenses":"Week Expenses","Recents Orders":"Recents Orders","Order":"Order","Clear All":"Clear All","Confirm Your Action":"Confirm Your Action","Save":"Save","The processing status of the order will be changed. Please confirm your action.":"The processing status of the order will be changed. Please confirm your action.","Instalments":"Instalments","Create":"Create","Add Instalment":"Add Instalment","An unexpected error has occured":"An unexpected error has occured","Store Details":"Store Details","Order Code":"Order Code","Cashier":"Cashier","Date":"Date","Customer":"Customer","Type":"Type","Payment Status":"Payment Status","Delivery Status":"Delivery Status","Billing Details":"Billing Details","Shipping Details":"Shipping Details","Product":"Product","Unit Price":"Unit Price","Quantity":"Quantity","Discount":"Discount","Tax":"Tax","Total Price":"Total Price","Expiration Date":"Expiration Date","Sub Total":"Sub Total","Coupons":"Coupons","Shipping":"Shipping","Total":"Total","Due":"Due","Change":"Change","No title is provided":"No title is provided","SKU":"SKU","Barcode":"Barcode","Looks like no products matched the searched term.":"Looks like no products matched the searched term.","The product already exists on the table.":"The product already exists on the table.","The specified quantity exceed the available quantity.":"The specified quantity exceed the available quantity.","Unable to proceed as the table is empty.":"Unable to proceed as the table is empty.","More Details":"More Details","Useful to describe better what are the reasons that leaded to this adjustment.":"Useful to describe better what are the reasons that leaded to this adjustment.","Search":"Search","Unit":"Unit","Operation":"Operation","Procurement":"Procurement","Value":"Value","Actions":"Actions","Search and add some products":"Search and add some products","Proceed":"Proceed","An unexpected error occured":"An unexpected error occured","Load Coupon":"Load Coupon","Apply A Coupon":"Apply A Coupon","Load":"Load","Input the coupon code that should apply to the POS. If a coupon is issued for a customer, that customer must be selected priorly.":"Input the coupon code that should apply to the POS. If a coupon is issued for a customer, that customer must be selected priorly.","Click here to choose a customer.":"Click here to choose a customer.","Coupon Name":"Coupon Name","Usage":"Usage","Unlimited":"Unlimited","Valid From":"Valid From","Valid Till":"Valid Till","Categories":"Categories","Products":"Products","Active Coupons":"Active Coupons","Apply":"Apply","Cancel":"Cancel","Coupon Code":"Coupon Code","The coupon is out from validity date range.":"The coupon is out from validity date range.","The coupon has applied to the cart.":"The coupon has applied to the cart.","Percentage":"Percentage","Flat":"Flat","The coupon has been loaded.":"The coupon has been loaded.","Layaway Parameters":"Layaway Parameters","Minimum Payment":"Minimum Payment","Instalments & Payments":"Instalments & Payments","The final payment date must be the last within the instalments.":"The final payment date must be the last within the instalments.","There is not instalment defined. Please set how many instalments are allowed for this order":"There is not instalment defined. Please set how many instalments are allowed for this order","Amount":"Amount","You must define layaway settings before proceeding.":"You must define layaway settings before proceeding.","Please provide instalments before proceeding.":"Please provide instalments before proceeding.","Unable to procee the form is not valid":"Unable to procee the form is not valid","One or more instalments has an invalid date.":"One or more instalments has an invalid date.","One or more instalments has an invalid amount.":"One or more instalments has an invalid amount.","One or more instalments has a date prior to the current date.":"One or more instalments has a date prior to the current date.","Total instalments must be equal to the order total.":"Total instalments must be equal to the order total.","The customer has been loaded":"The customer has been loaded","This coupon is already added to the cart":"This coupon is already added to the cart","No tax group assigned to the order":"No tax group assigned to the order","Layaway defined":"Layaway defined","Okay":"Okay","An unexpected error has occured while fecthing taxes.":"An unexpected error has occured while fecthing taxes.","OKAY":"OKAY","Loading...":"Loading...","Profile":"Profile","Logout":"Logout","Unamed Page":"Unamed Page","No description":"No description","Name":"Name","Provide a name to the resource.":"Provide a name to the resource.","General":"General","Edit":"Edit","Delete":"Delete","Delete Selected Groups":"Delete Selected Groups","Activate Your Account":"Activate Your Account","Password Recovered":"Password Recovered","Password Recovery":"Password Recovery","Reset Password":"Reset Password","New User Registration":"New User Registration","Your Account Has Been Created":"Your Account Has Been Created","Login":"Login","Save Coupon":"Save Coupon","This field is required":"This field is required","The form is not valid. Please check it and try again":"The form is not valid. Please check it and try again","No Description Provided":"No Description Provided","mainFieldLabel not defined":"mainFieldLabel not defined","Unamed Table":"Unamed Table","Create Customer Group":"Create Customer Group","Save a new customer group":"Save a new customer group","Update Group":"Update Group","Modify an existing customer group":"Modify an existing customer group","Managing Customers Groups":"Managing Customers Groups","Create groups to assign customers":"Create groups to assign customers","Create Customer":"Create Customer","Add a new customers to the system":"Add a new customers to the system","Managing Customers":"Managing Customers","List of registered customers":"List of registered customers","Return":"Return","Your Module":"Your Module","Choose the zip file you would like to upload":"Choose the zip file you would like to upload","Upload":"Upload","Managing Orders":"Managing Orders","Manage all registered orders.":"Manage all registered orders.","Failed":"Failed","Order receipt":"Order receipt","Hide Dashboard":"Hide Dashboard","Taxes":"Taxes","Unknown Payment":"Unknown Payment","Order invoice":"Order invoice","Procurement Name":"Procurement Name","Unable to proceed no products has been provided.":"Unable to proceed no products has been provided.","Unable to proceed, one or more products is not valid.":"Unable to proceed, one or more products is not valid.","Unable to proceed the procurement form is not valid.":"Unable to proceed the procurement form is not valid.","Unable to proceed, no submit url has been provided.":"Unable to proceed, no submit url has been provided.","SKU, Barcode, Product name.":"SKU, Barcode, Product name.","Surname":"Surname","N\/A":"N\/A","Email":"Email","Phone":"Phone","First Address":"First Address","Second Address":"Second Address","Address":"Address","City":"City","PO.Box":"PO.Box","Price":"Price","Print":"Print","Description":"Description","Included Products":"Included Products","Apply Settings":"Apply Settings","Basic Settings":"Basic Settings","Visibility Settings":"Visibility Settings","Year":"Year","Sales":"Sales","Income":"Income","January":"January","Febuary":"Febuary","March":"March","April":"April","May":"May","June":"June","July":"July","August":"August","September":"September","October":"October","November":"November","December":"December","Purchase Price":"Purchase Price","Sale Price":"Sale Price","Profit":"Profit","Tax Value":"Tax Value","Reward System Name":"Reward System Name","Missing Dependency":"Missing Dependency","Go Back":"Go Back","Continue":"Continue","Home":"Home","Not Allowed Action":"Not Allowed Action","Try Again":"Try Again","Access Denied":"Access Denied","Dashboard":"Dashboard","Sign In":"Sign In","Sign Up":"Sign Up","This field is required.":"This field is required.","This field must contain a valid email address.":"This field must contain a valid email address.","Clear Selected Entries ?":"Clear Selected Entries ?","Would you like to clear all selected entries ?":"Would you like to clear all selected entries ?","No selection has been made.":"No selection has been made.","No action has been selected.":"No action has been selected.","There is nothing to display...":"There is nothing to display...","Sun":"Sun","Mon":"Mon","Tue":"Tue","Wed":"Wed","Thr":"Thr","Fri":"Fri","Sat":"Sat","Nothing to display":"Nothing to display","Password Forgotten ?":"Password Forgotten ?","OK":"OK","Remember Your Password ?":"Remember Your Password ?","Already registered ?":"Already registered ?","Refresh":"Refresh","Enabled":"Enabled","Disabled":"Disabled","Enable":"Enable","Disable":"Disable","Gallery":"Gallery","Medias Manager":"Medias Manager","Click Here Or Drop Your File To Upload":"Click Here Or Drop Your File To Upload","Nothing has already been uploaded":"Nothing has already been uploaded","File Name":"File Name","Uploaded At":"Uploaded At","By":"By","Previous":"Previous","Next":"Next","Use Selected":"Use Selected","Would you like to clear all the notifications ?":"Would you like to clear all the notifications ?","Permissions":"Permissions","Payment Summary":"Payment Summary","Order Status":"Order Status","Would you proceed ?":"Would you proceed ?","Would you like to create this instalment ?":"Would you like to create this instalment ?","Would you like to delete this instalment ?":"Would you like to delete this instalment ?","Would you like to make this as paid ?":"Would you like to make this as paid ?","Would you like to update that instalment ?":"Would you like to update that instalment ?","Customer Account":"Customer Account","Payment":"Payment","No payment possible for paid order.":"No payment possible for paid order.","Payment History":"Payment History","Unable to proceed the form is not valid":"Unable to proceed the form is not valid","Please provide a valid value":"Please provide a valid value","Refund With Products":"Refund With Products","Refund Shipping":"Refund Shipping","Add Product":"Add Product","Damaged":"Damaged","Unspoiled":"Unspoiled","Summary":"Summary","Payment Gateway":"Payment Gateway","Screen":"Screen","Select the product to perform a refund.":"Select the product to perform a refund.","Please select a payment gateway before proceeding.":"Please select a payment gateway before proceeding.","There is nothing to refund.":"There is nothing to refund.","Please provide a valid payment amount.":"Please provide a valid payment amount.","The refund will be made on the current order.":"The refund will be made on the current order.","Please select a product before proceeding.":"Please select a product before proceeding.","Not enough quantity to proceed.":"Not enough quantity to proceed.","Would you like to delete this product ?":"Would you like to delete this product ?","Customers":"Customers","Order Type":"Order Type","Orders":"Orders","Cash Register":"Cash Register","Reset":"Reset","Cart":"Cart","Comments":"Comments","No products added...":"No products added...","Pay":"Pay","Void":"Void","Current Balance":"Current Balance","Full Payment":"Full Payment","The customer account can only be used once per order. Consider deleting the previously used payment.":"The customer account can only be used once per order. Consider deleting the previously used payment.","Not enough funds to add {amount} as a payment. Available balance {balance}.":"Not enough funds to add {amount} as a payment. Available balance {balance}.","Confirm Full Payment":"Confirm Full Payment","A full payment will be made using {paymentType} for {total}":"A full payment will be made using {paymentType} for {total}","You need to provide some products before proceeding.":"You need to provide some products before proceeding.","Unable to add the product, there is not enough stock. Remaining %s":"Unable to add the product, there is not enough stock. Remaining %s","Add Images":"Add Images","New Group":"New Group","Available Quantity":"Available Quantity","Would you like to delete this group ?":"Would you like to delete this group ?","Your Attention Is Required":"Your Attention Is Required","Please select at least one unit group before you proceed.":"Please select at least one unit group before you proceed.","Unable to proceed, more than one product is set as primary":"Unable to proceed, more than one product is set as primary","Unable to proceed as one of the unit group field is invalid":"Unable to proceed as one of the unit group field is invalid","Would you like to delete this variation ?":"Would you like to delete this variation ?","Details":"Details","Unable to proceed, no product were provided.":"Unable to proceed, no product were provided.","Unable to proceed, one or more product has incorrect values.":"Unable to proceed, one or more product has incorrect values.","Unable to proceed, the procurement form is not valid.":"Unable to proceed, the procurement form is not valid.","Unable to submit, no valid submit URL were provided.":"Unable to submit, no valid submit URL were provided.","Options":"Options","The stock adjustment is about to be made. Would you like to confirm ?":"The stock adjustment is about to be made. Would you like to confirm ?","Would you like to remove this product from the table ?":"Would you like to remove this product from the table ?","Unable to proceed. Select a correct time range.":"Unable to proceed. Select a correct time range.","Unable to proceed. The current time range is not valid.":"Unable to proceed. The current time range is not valid.","Would you like to proceed ?":"Would you like to proceed ?","Will apply various reset method on the system.":"Will apply various reset method on the system.","Wipe Everything":"Wipe Everything","Wipe + Grocery Demo":"Wipe + Grocery Demo","No rules has been provided.":"No rules has been provided.","No valid run were provided.":"No valid run were provided.","Unable to proceed, the form is invalid.":"Unable to proceed, the form is invalid.","Unable to proceed, no valid submit URL is defined.":"Unable to proceed, no valid submit URL is defined.","No title Provided":"No title Provided","Add Rule":"Add Rule","Save Settings":"Save Settings","Ok":"Ok","New Transaction":"New Transaction","Close":"Close","Would you like to delete this order":"Would you like to delete this order","The current order will be void. This action will be recorded. Consider providing a reason for this operation":"The current order will be void. This action will be recorded. Consider providing a reason for this operation","Order Options":"Order Options","Payments":"Payments","Refund & Return":"Refund & Return","Installments":"Installments","The form is not valid.":"The form is not valid.","Balance":"Balance","Input":"Input","Register History":"Register History","Close Register":"Close Register","Cash In":"Cash In","Cash Out":"Cash Out","Register Options":"Register Options","History":"History","Unable to open this register. Only closed register can be opened.":"Unable to open this register. Only closed register can be opened.","Open The Register":"Open The Register","Exit To Orders":"Exit To Orders","Looks like there is no registers. At least one register is required to proceed.":"Looks like there is no registers. At least one register is required to proceed.","Create Cash Register":"Create Cash Register","Yes":"Yes","No":"No","Use":"Use","No coupon available for this customer":"No coupon available for this customer","Select Customer":"Select Customer","No customer match your query...":"No customer match your query...","Customer Name":"Customer Name","Save Customer":"Save Customer","No Customer Selected":"No Customer Selected","In order to see a customer account, you need to select one customer.":"In order to see a customer account, you need to select one customer.","Summary For":"Summary For","Total Purchases":"Total Purchases","Total Owed":"Total Owed","Account Amount":"Account Amount","Last Purchases":"Last Purchases","Status":"Status","No orders...":"No orders...","Account Transaction":"Account Transaction","Product Discount":"Product Discount","Cart Discount":"Cart Discount","Hold Order":"Hold Order","The current order will be set on hold. You can retreive this order from the pending order button. Providing a reference to it might help you to identify the order more quickly.":"The current order will be set on hold. You can retreive this order from the pending order button. Providing a reference to it might help you to identify the order more quickly.","Confirm":"Confirm","Order Note":"Order Note","Note":"Note","More details about this order":"More details about this order","Display On Receipt":"Display On Receipt","Will display the note on the receipt":"Will display the note on the receipt","Open":"Open","Define The Order Type":"Define The Order Type","Payments Gateway":"Payments Gateway","Payment List":"Payment List","List Of Payments":"List Of Payments","No Payment added.":"No Payment added.","Select Payment":"Select Payment","Choose Payment":"Choose Payment","Submit Payment":"Submit Payment","Layaway":"Layaway","On Hold":"On Hold","Tendered":"Tendered","Nothing to display...":"Nothing to display...","Define Quantity":"Define Quantity","Please provide a quantity":"Please provide a quantity","Search Product":"Search Product","There is nothing to display. Have you started the search ?":"There is nothing to display. Have you started the search ?","Shipping & Billing":"Shipping & Billing","Tax & Summary":"Tax & Summary","Settings":"Settings","Select Tax":"Select Tax","Define the tax that apply to the sale.":"Define the tax that apply to the sale.","Define how the tax is computed":"Define how the tax is computed","Exclusive":"Exclusive","Inclusive":"Inclusive","Choose Selling Unit":"Choose Selling Unit","Define when that specific product should expire.":"Define when that specific product should expire.","Renders the automatically generated barcode.":"Renders the automatically generated barcode.","Tax Type":"Tax Type","Adjust how tax is calculated on the item.":"Adjust how tax is calculated on the item.","Unable to proceed. The form is not valid.":"Unable to proceed. The form is not valid.","Units & Quantities":"Units & Quantities","Wholesale Price":"Wholesale Price","Select":"Select","Unsupported print gateway.":"Unsupported print gateway.","Would you like to delete this ?":"Would you like to delete this ?","The account you have created for __%s__, require an activation. In order to proceed, please click on the following link":"The account you have created for __%s__, require an activation. In order to proceed, please click on the following link","Your password has been successfully updated on __%s__. You can now login with your new password.":"Your password has been successfully updated on __%s__. You can now login with your new password.","Someone has requested to reset your password on __\"%s\"__. If you remember having done that request, please proceed by clicking the button below. ":"Someone has requested to reset your password on __\"%s\"__. If you remember having done that request, please proceed by clicking the button below. ","Receipt — %s":"Receipt — %s","Invoice — %s":"Invoice — %s","Unable to find a module having the identifier\/namespace \"%s\"":"Unable to find a module having the identifier\/namespace \"%s\"","What is the CRUD single resource name ? [Q] to quit.":"What is the CRUD single resource name ? [Q] to quit.","Which table name should be used ? [Q] to quit.":"Which table name should be used ? [Q] to quit.","What is the main route name to the resource ? [Q] to quit.":"What is the main route name to the resource ? [Q] to quit.","If your CRUD resource has a relation, mention it as follow \"foreign_table, foreign_key, local_key\" ? [S] to skip, [Q] to quit.":"If your CRUD resource has a relation, mention it as follow \"foreign_table, foreign_key, local_key\" ? [S] to skip, [Q] to quit.","Add a new relation ? Mention it as follow \"foreign_table, foreign_key, local_key\" ? [S] to skip, [Q] to quit.":"Add a new relation ? Mention it as follow \"foreign_table, foreign_key, local_key\" ? [S] to skip, [Q] to quit.","No enough paramters provided for the relation.":"No enough paramters provided for the relation.","The CRUD resource \"%s\" for the module \"%s\" has been generated at \"%s\"":"The CRUD resource \"%s\" for the module \"%s\" has been generated at \"%s\"","The CRUD resource \"%s\" has been generated at %s":"The CRUD resource \"%s\" has been generated at %s","An unexpected error has occured.":"An unexpected error has occured.","Localization for %s extracted to %s":"Localization for %s extracted to %s","Unable to find the requested module.":"Unable to find the requested module.","Unable to find a module with the defined identifier \"%s\"":"Unable to find a module with the defined identifier \"%s\"","Unable to find the requested file \"%s\" from the module migration.":"Unable to find the requested file \"%s\" from the module migration.","The migration file has been successfully forgotten.":"The migration file has been successfully forgotten.","Version":"Version","Path":"Path","Index":"Index","Entry Class":"Entry Class","Routes":"Routes","Api":"Api","Controllers":"Controllers","Views":"Views","Attribute":"Attribute","Namespace":"Namespace","Author":"Author","The product barcodes has been refreshed successfully.":"The product barcodes has been refreshed successfully.","Invalid operation provided.":"Invalid operation provided.","Unable to proceed the system is already installed.":"Unable to proceed the system is already installed.","What is the store name ? [Q] to quit.":"What is the store name ? [Q] to quit.","Please provide at least 6 characters for store name.":"Please provide at least 6 characters for store name.","What is the administrator password ? [Q] to quit.":"What is the administrator password ? [Q] to quit.","Please provide at least 6 characters for the administrator password.":"Please provide at least 6 characters for the administrator password.","What is the administrator email ? [Q] to quit.":"What is the administrator email ? [Q] to quit.","Please provide a valid email for the administrator.":"Please provide a valid email for the administrator.","What is the administrator username ? [Q] to quit.":"What is the administrator username ? [Q] to quit.","Please provide at least 5 characters for the administrator username.":"Please provide at least 5 characters for the administrator username.","Downloading latest dev build...":"Downloading latest dev build...","Reset project to HEAD...":"Reset project to HEAD...","Coupons List":"Coupons List","Display all coupons.":"Display all coupons.","No coupons has been registered":"No coupons has been registered","Add a new coupon":"Add a new coupon","Create a new coupon":"Create a new coupon","Register a new coupon and save it.":"Register a new coupon and save it.","Edit coupon":"Edit coupon","Modify Coupon.":"Modify Coupon.","Return to Coupons":"Return to Coupons","Might be used while printing the coupon.":"Might be used while printing the coupon.","Percentage Discount":"Percentage Discount","Flat Discount":"Flat Discount","Define which type of discount apply to the current coupon.":"Define which type of discount apply to the current coupon.","Discount Value":"Discount Value","Define the percentage or flat value.":"Define the percentage or flat value.","Valid Until":"Valid Until","Determin Until When the coupon is valid.":"Determin Until When the coupon is valid.","Minimum Cart Value":"Minimum Cart Value","What is the minimum value of the cart to make this coupon eligible.":"What is the minimum value of the cart to make this coupon eligible.","Maximum Cart Value":"Maximum Cart Value","Valid Hours Start":"Valid Hours Start","Define form which hour during the day the coupons is valid.":"Define form which hour during the day the coupons is valid.","Valid Hours End":"Valid Hours End","Define to which hour during the day the coupons end stop valid.":"Define to which hour during the day the coupons end stop valid.","Limit Usage":"Limit Usage","Define how many time a coupons can be redeemed.":"Define how many time a coupons can be redeemed.","Select Products":"Select Products","The following products will be required to be present on the cart, in order for this coupon to be valid.":"The following products will be required to be present on the cart, in order for this coupon to be valid.","Select Categories":"Select Categories","The products assigned to one of these categories should be on the cart, in order for this coupon to be valid.":"The products assigned to one of these categories should be on the cart, in order for this coupon to be valid.","Created At":"Created At","Undefined":"Undefined","Delete a licence":"Delete a licence","Customer Coupons List":"Customer Coupons List","Display all customer coupons.":"Display all customer coupons.","No customer coupons has been registered":"No customer coupons has been registered","Add a new customer coupon":"Add a new customer coupon","Create a new customer coupon":"Create a new customer coupon","Register a new customer coupon and save it.":"Register a new customer coupon and save it.","Edit customer coupon":"Edit customer coupon","Modify Customer Coupon.":"Modify Customer Coupon.","Return to Customer Coupons":"Return to Customer Coupons","Id":"Id","Limit":"Limit","Coupon_id":"Coupon_id","Customer_id":"Customer_id","Created_at":"Created_at","Updated_at":"Updated_at","Code":"Code","Customers List":"Customers List","Display all customers.":"Display all customers.","No customers has been registered":"No customers has been registered","Add a new customer":"Add a new customer","Create a new customer":"Create a new customer","Register a new customer and save it.":"Register a new customer and save it.","Edit customer":"Edit customer","Modify Customer.":"Modify Customer.","Return to Customers":"Return to Customers","Provide a unique name for the customer.":"Provide a unique name for the customer.","Provide the customer surname":"Provide the customer surname","Group":"Group","Assign the customer to a group":"Assign the customer to a group","Provide the customer email":"Provide the customer email","Phone Number":"Phone Number","Provide the customer phone number":"Provide the customer phone number","PO Box":"PO Box","Provide the customer PO.Box":"Provide the customer PO.Box","Not Defined":"Not Defined","Male":"Male","Female":"Female","Gender":"Gender","Billing Address":"Billing Address","Provide the billing name.":"Provide the billing name.","Provide the billing surname.":"Provide the billing surname.","Billing phone number.":"Billing phone number.","Address 1":"Address 1","Billing First Address.":"Billing First Address.","Address 2":"Address 2","Billing Second Address.":"Billing Second Address.","Country":"Country","Billing Country.":"Billing Country.","Postal Address":"Postal Address","Company":"Company","Shipping Address":"Shipping Address","Provide the shipping name.":"Provide the shipping name.","Provide the shipping surname.":"Provide the shipping surname.","Shipping phone number.":"Shipping phone number.","Shipping First Address.":"Shipping First Address.","Shipping Second Address.":"Shipping Second Address.","Shipping Country.":"Shipping Country.","No group selected and no default group configured.":"No group selected and no default group configured.","The access is granted.":"The access is granted.","Account Credit":"Account Credit","Owed Amount":"Owed Amount","Purchase Amount":"Purchase Amount","Rewards":"Rewards","Delete a customers":"Delete a customers","Delete Selected Customers":"Delete Selected Customers","Customer Groups List":"Customer Groups List","Display all Customers Groups.":"Display all Customers Groups.","No Customers Groups has been registered":"No Customers Groups has been registered","Add a new Customers Group":"Add a new Customers Group","Create a new Customers Group":"Create a new Customers Group","Register a new Customers Group and save it.":"Register a new Customers Group and save it.","Edit Customers Group":"Edit Customers Group","Modify Customers group.":"Modify Customers group.","Return to Customers Groups":"Return to Customers Groups","Reward System":"Reward System","Select which Reward system applies to the group":"Select which Reward system applies to the group","Minimum Credit Amount":"Minimum Credit Amount","Determine in percentage, what is the first minimum credit payment made by all customers on the group, in case of credit order. If left to \"0\", no minimal credit amount is required.":"Determine in percentage, what is the first minimum credit payment made by all customers on the group, in case of credit order. If left to \"0\", no minimal credit amount is required.","A brief description about what this group is about":"A brief description about what this group is about","Created On":"Created On","Customer Orders List":"Customer Orders List","Display all customer orders.":"Display all customer orders.","No customer orders has been registered":"No customer orders has been registered","Add a new customer order":"Add a new customer order","Create a new customer order":"Create a new customer order","Register a new customer order and save it.":"Register a new customer order and save it.","Edit customer order":"Edit customer order","Modify Customer Order.":"Modify Customer Order.","Return to Customer Orders":"Return to Customer Orders","Created at":"Created at","Customer Id":"Customer Id","Discount Percentage":"Discount Percentage","Discount Type":"Discount Type","Final Payment Date":"Final Payment Date","Gross Total":"Gross Total","Net Total":"Net Total","Process Status":"Process Status","Shipping Rate":"Shipping Rate","Shipping Type":"Shipping Type","Title":"Title","Total installments":"Total installments","Updated at":"Updated at","Uuid":"Uuid","Voidance Reason":"Voidance Reason","Customer Rewards List":"Customer Rewards List","Display all customer rewards.":"Display all customer rewards.","No customer rewards has been registered":"No customer rewards has been registered","Add a new customer reward":"Add a new customer reward","Create a new customer reward":"Create a new customer reward","Register a new customer reward and save it.":"Register a new customer reward and save it.","Edit customer reward":"Edit customer reward","Modify Customer Reward.":"Modify Customer Reward.","Return to Customer Rewards":"Return to Customer Rewards","Points":"Points","Target":"Target","Reward Name":"Reward Name","Last Update":"Last Update","Expenses Categories List":"Expenses Categories List","Display All Expense Categories.":"Display All Expense Categories.","No Expense Category has been registered":"No Expense Category has been registered","Add a new Expense Category":"Add a new Expense Category","Create a new Expense Category":"Create a new Expense Category","Register a new Expense Category and save it.":"Register a new Expense Category and save it.","Edit Expense Category":"Edit Expense Category","Modify An Expense Category.":"Modify An Expense Category.","Return to Expense Categories":"Return to Expense Categories","Expenses List":"Expenses List","Display all expenses.":"Display all expenses.","No expenses has been registered":"No expenses has been registered","Add a new expense":"Add a new expense","Create a new expense":"Create a new expense","Register a new expense and save it.":"Register a new expense and save it.","Edit expense":"Edit expense","Modify Expense.":"Modify Expense.","Return to Expenses":"Return to Expenses","Active":"Active","determine if the expense is effective or not. Work for recurring and not reccuring expenses.":"determine if the expense is effective or not. Work for recurring and not reccuring expenses.","Users Group":"Users Group","Assign expense to users group. Expense will therefore be multiplied by the number of entity.":"Assign expense to users group. Expense will therefore be multiplied by the number of entity.","None":"None","Expense Category":"Expense Category","Assign the expense to a category":"Assign the expense to a category","Is the value or the cost of the expense.":"Is the value or the cost of the expense.","If set to Yes, the expense will trigger on defined occurence.":"If set to Yes, the expense will trigger on defined occurence.","Recurring":"Recurring","Start of Month":"Start of Month","Mid of Month":"Mid of Month","End of Month":"End of Month","X days Before Month Ends":"X days Before Month Ends","X days After Month Starts":"X days After Month Starts","Occurence":"Occurence","Define how often this expenses occurs":"Define how often this expenses occurs","Occurence Value":"Occurence Value","Must be used in case of X days after month starts and X days before month ends.":"Must be used in case of X days after month starts and X days before month ends.","Category":"Category","Month Starts":"Month Starts","Month Middle":"Month Middle","Month Ends":"Month Ends","X Days Before Month Starts":"X Days Before Month Starts","X Days Before Month Ends":"X Days Before Month Ends","Unknown Occurance":"Unknown Occurance","Return to Expenses Histories":"Return to Expenses Histories","Expense ID":"Expense ID","Expense Name":"Expense Name","Updated At":"Updated At","The expense history is about to be deleted.":"The expense history is about to be deleted.","Hold Orders List":"Hold Orders List","Display all hold orders.":"Display all hold orders.","No hold orders has been registered":"No hold orders has been registered","Add a new hold order":"Add a new hold order","Create a new hold order":"Create a new hold order","Register a new hold order and save it.":"Register a new hold order and save it.","Edit hold order":"Edit hold order","Modify Hold Order.":"Modify Hold Order.","Return to Hold Orders":"Return to Hold Orders","Process Statuss":"Process Statuss","Orders List":"Orders List","Display all orders.":"Display all orders.","No orders has been registered":"No orders has been registered","Add a new order":"Add a new order","Create a new order":"Create a new order","Register a new order and save it.":"Register a new order and save it.","Edit order":"Edit order","Modify Order.":"Modify Order.","Return to Orders":"Return to Orders","Discount Rate":"Discount Rate","The order and the attached products has been deleted.":"The order and the attached products has been deleted.","Invoice":"Invoice","Receipt":"Receipt","Order Instalments List":"Order Instalments List","Display all Order Instalments.":"Display all Order Instalments.","No Order Instalment has been registered":"No Order Instalment has been registered","Add a new Order Instalment":"Add a new Order Instalment","Create a new Order Instalment":"Create a new Order Instalment","Register a new Order Instalment and save it.":"Register a new Order Instalment and save it.","Edit Order Instalment":"Edit Order Instalment","Modify Order Instalment.":"Modify Order Instalment.","Return to Order Instalment":"Return to Order Instalment","Order Id":"Order Id","Payment Types List":"Payment Types List","Display all payment types.":"Display all payment types.","No payment types has been registered":"No payment types has been registered","Add a new payment type":"Add a new payment type","Create a new payment type":"Create a new payment type","Register a new payment type and save it.":"Register a new payment type and save it.","Edit payment type":"Edit payment type","Modify Payment Type.":"Modify Payment Type.","Return to Payment Types":"Return to Payment Types","Label":"Label","Provide a label to the resource.":"Provide a label to the resource.","Identifier":"Identifier","A payment type having the same identifier already exists.":"A payment type having the same identifier already exists.","Unable to delete a read-only payments type.":"Unable to delete a read-only payments type.","Readonly":"Readonly","Procurements List":"Procurements List","Display all procurements.":"Display all procurements.","No procurements has been registered":"No procurements has been registered","Add a new procurement":"Add a new procurement","Create a new procurement":"Create a new procurement","Register a new procurement and save it.":"Register a new procurement and save it.","Edit procurement":"Edit procurement","Modify Procurement.":"Modify Procurement.","Return to Procurements":"Return to Procurements","Provider Id":"Provider Id","Total Items":"Total Items","Provider":"Provider","Stocked":"Stocked","Procurement Products List":"Procurement Products List","Display all procurement products.":"Display all procurement products.","No procurement products has been registered":"No procurement products has been registered","Add a new procurement product":"Add a new procurement product","Create a new procurement product":"Create a new procurement product","Register a new procurement product and save it.":"Register a new procurement product and save it.","Edit procurement product":"Edit procurement product","Modify Procurement Product.":"Modify Procurement Product.","Return to Procurement Products":"Return to Procurement Products","Define what is the expiration date of the product.":"Define what is the expiration date of the product.","On":"On","Category Products List":"Category Products List","Display all category products.":"Display all category products.","No category products has been registered":"No category products has been registered","Add a new category product":"Add a new category product","Create a new category product":"Create a new category product","Register a new category product and save it.":"Register a new category product and save it.","Edit category product":"Edit category product","Modify Category Product.":"Modify Category Product.","Return to Category Products":"Return to Category Products","No Parent":"No Parent","Preview":"Preview","Provide a preview url to the category.":"Provide a preview url to the category.","Displays On POS":"Displays On POS","Parent":"Parent","If this category should be a child category of an existing category":"If this category should be a child category of an existing category","Total Products":"Total Products","Products List":"Products List","Display all products.":"Display all products.","No products has been registered":"No products has been registered","Add a new product":"Add a new product","Create a new product":"Create a new product","Register a new product and save it.":"Register a new product and save it.","Edit product":"Edit product","Modify Product.":"Modify Product.","Return to Products":"Return to Products","Assigned Unit":"Assigned Unit","The assigned unit for sale":"The assigned unit for sale","Define the regular selling price.":"Define the regular selling price.","Define the wholesale price.":"Define the wholesale price.","Preview Url":"Preview Url","Provide the preview of the current unit.":"Provide the preview of the current unit.","Identification":"Identification","Define the barcode value. Focus the cursor here before scanning the product.":"Define the barcode value. Focus the cursor here before scanning the product.","Define the barcode type scanned.":"Define the barcode type scanned.","EAN 8":"EAN 8","EAN 13":"EAN 13","Barcode Type":"Barcode Type","Determine if the product can be searched on the POS.":"Determine if the product can be searched on the POS.","Searchable":"Searchable","Select to which category the item is assigned.":"Select to which category the item is assigned.","Materialized Product":"Materialized Product","Dematerialized Product":"Dematerialized Product","Define the product type. Applies to all variations.":"Define the product type. Applies to all variations.","Product Type":"Product Type","Define a unique SKU value for the product.":"Define a unique SKU value for the product.","On Sale":"On Sale","Hidden":"Hidden","Define wether the product is available for sale.":"Define wether the product is available for sale.","Enable the stock management on the product. Will not work for service or uncountable products.":"Enable the stock management on the product. Will not work for service or uncountable products.","Stock Management Enabled":"Stock Management Enabled","Units":"Units","Accurate Tracking":"Accurate Tracking","What unit group applies to the actual item. This group will apply during the procurement.":"What unit group applies to the actual item. This group will apply during the procurement.","Unit Group":"Unit Group","Determine the unit for sale.":"Determine the unit for sale.","Selling Unit":"Selling Unit","Expiry":"Expiry","Product Expires":"Product Expires","Set to \"No\" expiration time will be ignored.":"Set to \"No\" expiration time will be ignored.","Prevent Sales":"Prevent Sales","Allow Sales":"Allow Sales","Determine the action taken while a product has expired.":"Determine the action taken while a product has expired.","On Expiration":"On Expiration","Select the tax group that applies to the product\/variation.":"Select the tax group that applies to the product\/variation.","Tax Group":"Tax Group","Define what is the type of the tax.":"Define what is the type of the tax.","Images":"Images","Image":"Image","Choose an image to add on the product gallery":"Choose an image to add on the product gallery","Is Primary":"Is Primary","Define wether the image should be primary. If there are more than one primary image, one will be choosed for you.":"Define wether the image should be primary. If there are more than one primary image, one will be choosed for you.","Sku":"Sku","Materialized":"Materialized","Dematerialized":"Dematerialized","Available":"Available","See Quantities":"See Quantities","See History":"See History","Would you like to delete selected entries ?":"Would you like to delete selected entries ?","Product Histories":"Product Histories","Display all product histories.":"Display all product histories.","No product histories has been registered":"No product histories has been registered","Add a new product history":"Add a new product history","Create a new product history":"Create a new product history","Register a new product history and save it.":"Register a new product history and save it.","Edit product history":"Edit product history","Modify Product History.":"Modify Product History.","Return to Product Histories":"Return to Product Histories","After Quantity":"After Quantity","Before Quantity":"Before Quantity","Operation Type":"Operation Type","Order id":"Order id","Procurement Id":"Procurement Id","Procurement Product Id":"Procurement Product Id","Product Id":"Product Id","Unit Id":"Unit Id","P. Quantity":"P. Quantity","N. Quantity":"N. Quantity","Defective":"Defective","Deleted":"Deleted","Removed":"Removed","Returned":"Returned","Sold":"Sold","Added":"Added","Incoming Transfer":"Incoming Transfer","Outgoing Transfer":"Outgoing Transfer","Transfer Rejected":"Transfer Rejected","Transfer Canceled":"Transfer Canceled","Void Return":"Void Return","Adjustment Return":"Adjustment Return","Adjustment Sale":"Adjustment Sale","Product Unit Quantities List":"Product Unit Quantities List","Display all product unit quantities.":"Display all product unit quantities.","No product unit quantities has been registered":"No product unit quantities has been registered","Add a new product unit quantity":"Add a new product unit quantity","Create a new product unit quantity":"Create a new product unit quantity","Register a new product unit quantity and save it.":"Register a new product unit quantity and save it.","Edit product unit quantity":"Edit product unit quantity","Modify Product Unit Quantity.":"Modify Product Unit Quantity.","Return to Product Unit Quantities":"Return to Product Unit Quantities","Product id":"Product id","Providers List":"Providers List","Display all providers.":"Display all providers.","No providers has been registered":"No providers has been registered","Add a new provider":"Add a new provider","Create a new provider":"Create a new provider","Register a new provider and save it.":"Register a new provider and save it.","Edit provider":"Edit provider","Modify Provider.":"Modify Provider.","Return to Providers":"Return to Providers","Provide the provider email. Mightbe used to send automatted email.":"Provide the provider email. Mightbe used to send automatted email.","Provider surname if necessary.":"Provider surname if necessary.","Contact phone number for the provider. Might be used to send automatted SMS notifications.":"Contact phone number for the provider. Might be used to send automatted SMS notifications.","First address of the provider.":"First address of the provider.","Second address of the provider.":"Second address of the provider.","Further details about the provider":"Further details about the provider","Amount Due":"Amount Due","Amount Paid":"Amount Paid","See Procurements":"See Procurements","Registers List":"Registers List","Display all registers.":"Display all registers.","No registers has been registered":"No registers has been registered","Add a new register":"Add a new register","Create a new register":"Create a new register","Register a new register and save it.":"Register a new register and save it.","Edit register":"Edit register","Modify Register.":"Modify Register.","Return to Registers":"Return to Registers","Closed":"Closed","Define what is the status of the register.":"Define what is the status of the register.","Provide mode details about this cash register.":"Provide mode details about this cash register.","Unable to delete a register that is currently in use":"Unable to delete a register that is currently in use","Used By":"Used By","Register History List":"Register History List","Display all register histories.":"Display all register histories.","No register histories has been registered":"No register histories has been registered","Add a new register history":"Add a new register history","Create a new register history":"Create a new register history","Register a new register history and save it.":"Register a new register history and save it.","Edit register history":"Edit register history","Modify Registerhistory.":"Modify Registerhistory.","Return to Register History":"Return to Register History","Register Id":"Register Id","Action":"Action","Register Name":"Register Name","Done At":"Done At","Reward Systems List":"Reward Systems List","Display all reward systems.":"Display all reward systems.","No reward systems has been registered":"No reward systems has been registered","Add a new reward system":"Add a new reward system","Create a new reward system":"Create a new reward system","Register a new reward system and save it.":"Register a new reward system and save it.","Edit reward system":"Edit reward system","Modify Reward System.":"Modify Reward System.","Return to Reward Systems":"Return to Reward Systems","From":"From","The interval start here.":"The interval start here.","To":"To","The interval ends here.":"The interval ends here.","Points earned.":"Points earned.","Coupon":"Coupon","Decide which coupon you would apply to the system.":"Decide which coupon you would apply to the system.","This is the objective that the user should reach to trigger the reward.":"This is the objective that the user should reach to trigger the reward.","A short description about this system":"A short description about this system","Would you like to delete this reward system ?":"Would you like to delete this reward system ?","Delete Selected Rewards":"Delete Selected Rewards","Would you like to delete selected rewards?":"Would you like to delete selected rewards?","Roles List":"Roles List","Display all roles.":"Display all roles.","No role has been registered.":"No role has been registered.","Add a new role":"Add a new role","Create a new role":"Create a new role","Create a new role and save it.":"Create a new role and save it.","Edit role":"Edit role","Modify Role.":"Modify Role.","Return to Roles":"Return to Roles","Provide a name to the role.":"Provide a name to the role.","Should be a unique value with no spaces or special character":"Should be a unique value with no spaces or special character","Provide more details about what this role is about.":"Provide more details about what this role is about.","Unable to delete a system role.":"Unable to delete a system role.","You do not have enough permissions to perform this action.":"You do not have enough permissions to perform this action.","Taxes List":"Taxes List","Display all taxes.":"Display all taxes.","No taxes has been registered":"No taxes has been registered","Add a new tax":"Add a new tax","Create a new tax":"Create a new tax","Register a new tax and save it.":"Register a new tax and save it.","Edit tax":"Edit tax","Modify Tax.":"Modify Tax.","Return to Taxes":"Return to Taxes","Provide a name to the tax.":"Provide a name to the tax.","Assign the tax to a tax group.":"Assign the tax to a tax group.","Rate":"Rate","Define the rate value for the tax.":"Define the rate value for the tax.","Provide a description to the tax.":"Provide a description to the tax.","Taxes Groups List":"Taxes Groups List","Display all taxes groups.":"Display all taxes groups.","No taxes groups has been registered":"No taxes groups has been registered","Add a new tax group":"Add a new tax group","Create a new tax group":"Create a new tax group","Register a new tax group and save it.":"Register a new tax group and save it.","Edit tax group":"Edit tax group","Modify Tax Group.":"Modify Tax Group.","Return to Taxes Groups":"Return to Taxes Groups","Provide a short description to the tax group.":"Provide a short description to the tax group.","Units List":"Units List","Display all units.":"Display all units.","No units has been registered":"No units has been registered","Add a new unit":"Add a new unit","Create a new unit":"Create a new unit","Register a new unit and save it.":"Register a new unit and save it.","Edit unit":"Edit unit","Modify Unit.":"Modify Unit.","Return to Units":"Return to Units","Preview URL":"Preview URL","Preview of the unit.":"Preview of the unit.","Define the value of the unit.":"Define the value of the unit.","Define to which group the unit should be assigned.":"Define to which group the unit should be assigned.","Base Unit":"Base Unit","Determine if the unit is the base unit from the group.":"Determine if the unit is the base unit from the group.","Provide a short description about the unit.":"Provide a short description about the unit.","Unit Groups List":"Unit Groups List","Display all unit groups.":"Display all unit groups.","No unit groups has been registered":"No unit groups has been registered","Add a new unit group":"Add a new unit group","Create a new unit group":"Create a new unit group","Register a new unit group and save it.":"Register a new unit group and save it.","Edit unit group":"Edit unit group","Modify Unit Group.":"Modify Unit Group.","Return to Unit Groups":"Return to Unit Groups","Users List":"Users List","Display all users.":"Display all users.","No users has been registered":"No users has been registered","Add a new user":"Add a new user","Create a new user":"Create a new user","Register a new user and save it.":"Register a new user and save it.","Edit user":"Edit user","Modify User.":"Modify User.","Return to Users":"Return to Users","Username":"Username","Will be used for various purposes such as email recovery.":"Will be used for various purposes such as email recovery.","Password":"Password","Make a unique and secure password.":"Make a unique and secure password.","Confirm Password":"Confirm Password","Should be the same as the password.":"Should be the same as the password.","Define wether the user can use the application.":"Define wether the user can use the application.","Define the role of the user":"Define the role of the user","Role":"Role","The action you tried to perform is not allowed.":"The action you tried to perform is not allowed.","Not Enough Permissions":"Not Enough Permissions","The resource of the page you tried to access is not available or might have been deleted.":"The resource of the page you tried to access is not available or might have been deleted.","Not Found Exception":"Not Found Exception","Provide your username.":"Provide your username.","Provide your password.":"Provide your password.","Provide your email.":"Provide your email.","Password Confirm":"Password Confirm","define the amount of the transaction.":"define the amount of the transaction.","Further observation while proceeding.":"Further observation while proceeding.","determine what is the transaction type.":"determine what is the transaction type.","Add":"Add","Deduct":"Deduct","Determine the amount of the transaction.":"Determine the amount of the transaction.","Further details about the transaction.":"Further details about the transaction.","Define the installments for the current order.":"Define the installments for the current order.","New Password":"New Password","define your new password.":"define your new password.","confirm your new password.":"confirm your new password.","choose the payment type.":"choose the payment type.","Provide the procurement name.":"Provide the procurement name.","Describe the procurement.":"Describe the procurement.","Define the provider.":"Define the provider.","Mention the provider name.":"Mention the provider name.","Provider Name":"Provider Name","It could be used to send some informations to the provider.":"It could be used to send some informations to the provider.","If the provider has any surname, provide it here.":"If the provider has any surname, provide it here.","Mention the phone number of the provider.":"Mention the phone number of the provider.","Mention the first address of the provider.":"Mention the first address of the provider.","Mention the second address of the provider.":"Mention the second address of the provider.","Mention any description of the provider.":"Mention any description of the provider.","Define what is the unit price of the product.":"Define what is the unit price of the product.","Condition":"Condition","Determine in which condition the product is returned.":"Determine in which condition the product is returned.","Other Observations":"Other Observations","Describe in details the condition of the returned product.":"Describe in details the condition of the returned product.","Unit Group Name":"Unit Group Name","Provide a unit name to the unit.":"Provide a unit name to the unit.","Describe the current unit.":"Describe the current unit.","assign the current unit to a group.":"assign the current unit to a group.","define the unit value.":"define the unit value.","Provide a unit name to the units group.":"Provide a unit name to the units group.","Describe the current unit group.":"Describe the current unit group.","POS":"POS","Open POS":"Open POS","Create Register":"Create Register","Registes List":"Registes List","Use Customer Billing":"Use Customer Billing","Define wether the customer billing information should be used.":"Define wether the customer billing information should be used.","General Shipping":"General Shipping","Define how the shipping is calculated.":"Define how the shipping is calculated.","Shipping Fees":"Shipping Fees","Define shipping fees.":"Define shipping fees.","Use Customer Shipping":"Use Customer Shipping","Define wether the customer shipping information should be used.":"Define wether the customer shipping information should be used.","Invoice Number":"Invoice Number","If the procurement has been issued outside of NexoPOS, please provide a unique reference.":"If the procurement has been issued outside of NexoPOS, please provide a unique reference.","Delivery Time":"Delivery Time","If the procurement has to be delivered at a specific time, define the moment here.":"If the procurement has to be delivered at a specific time, define the moment here.","Automatic Approval":"Automatic Approval","Determine if the procurement should be marked automatically as approved once the Delivery Time occurs.":"Determine if the procurement should be marked automatically as approved once the Delivery Time occurs.","Determine what is the actual payment status of the procurement.":"Determine what is the actual payment status of the procurement.","Determine what is the actual provider of the current procurement.":"Determine what is the actual provider of the current procurement.","Provide a name that will help to identify the procurement.":"Provide a name that will help to identify the procurement.","UOM":"UOM","First Name":"First Name","Define what is the user first name. If not provided, the username is used instead.":"Define what is the user first name. If not provided, the username is used instead.","Second Name":"Second Name","Define what is the user second name. If not provided, the username is used instead.":"Define what is the user second name. If not provided, the username is used instead.","Avatar":"Avatar","Define the image that should be used as an avatar.":"Define the image that should be used as an avatar.","Language":"Language","Choose the language for the current account.":"Choose the language for the current account.","Security":"Security","Old Password":"Old Password","Provide the old password.":"Provide the old password.","Change your password with a better stronger password.":"Change your password with a better stronger password.","Password Confirmation":"Password Confirmation","The profile has been successfully saved.":"The profile has been successfully saved.","The user attribute has been saved.":"The user attribute has been saved.","The options has been successfully updated.":"The options has been successfully updated.","Wrong password provided":"Wrong password provided","Wrong old password provided":"Wrong old password provided","Password Successfully updated.":"Password Successfully updated.","Sign In — NexoPOS":"Sign In — NexoPOS","Sign Up — NexoPOS":"Sign Up — NexoPOS","Password Lost":"Password Lost","Unable to proceed as the token provided is invalid.":"Unable to proceed as the token provided is invalid.","The token has expired. Please request a new activation token.":"The token has expired. Please request a new activation token.","Set New Password":"Set New Password","Database Update":"Database Update","This account is disabled.":"This account is disabled.","Unable to find record having that username.":"Unable to find record having that username.","Unable to find record having that password.":"Unable to find record having that password.","Invalid username or password.":"Invalid username or password.","Unable to login, the provided account is not active.":"Unable to login, the provided account is not active.","You have been successfully connected.":"You have been successfully connected.","The recovery email has been send to your inbox.":"The recovery email has been send to your inbox.","Unable to find a record matching your entry.":"Unable to find a record matching your entry.","No role has been defined for registration. Please contact the administrators.":"No role has been defined for registration. Please contact the administrators.","Your Account has been successfully creaetd.":"Your Account has been successfully creaetd.","Your Account has been created but requires email validation.":"Your Account has been created but requires email validation.","Unable to find the requested user.":"Unable to find the requested user.","Unable to proceed, the provided token is not valid.":"Unable to proceed, the provided token is not valid.","Unable to proceed, the token has expired.":"Unable to proceed, the token has expired.","Your password has been updated.":"Your password has been updated.","Unable to edit a register that is currently in use":"Unable to edit a register that is currently in use","No register has been opened by the logged user.":"No register has been opened by the logged user.","The register is opened.":"The register is opened.","Closing":"Closing","Opening":"Opening","Sale":"Sale","Refund":"Refund","Unable to find the category using the provided identifier":"Unable to find the category using the provided identifier","The category has been deleted.":"The category has been deleted.","Unable to find the category using the provided identifier.":"Unable to find the category using the provided identifier.","Unable to find the attached category parent":"Unable to find the attached category parent","The category has been correctly saved":"The category has been correctly saved","The category has been updated":"The category has been updated","The entry has been successfully deleted.":"The entry has been successfully deleted.","A new entry has been successfully created.":"A new entry has been successfully created.","Unhandled crud resource":"Unhandled crud resource","You need to select at least one item to delete":"You need to select at least one item to delete","You need to define which action to perform":"You need to define which action to perform","Unable to proceed. No matching CRUD resource has been found.":"Unable to proceed. No matching CRUD resource has been found.","This resource is not protected. The access is granted.":"This resource is not protected. The access is granted.","Create Coupon":"Create Coupon","helps you creating a coupon.":"helps you creating a coupon.","Edit Coupon":"Edit Coupon","Editing an existing coupon.":"Editing an existing coupon.","Invalid Request.":"Invalid Request.","Unable to delete a group to which customers are still assigned.":"Unable to delete a group to which customers are still assigned.","The customer group has been deleted.":"The customer group has been deleted.","Unable to find the requested group.":"Unable to find the requested group.","The customer group has been successfully created.":"The customer group has been successfully created.","The customer group has been successfully saved.":"The customer group has been successfully saved.","Unable to transfer customers to the same account.":"Unable to transfer customers to the same account.","All the customers has been trasnfered to the new group %s.":"All the customers has been trasnfered to the new group %s.","The categories has been transfered to the group %s.":"The categories has been transfered to the group %s.","No customer identifier has been provided to proceed to the transfer.":"No customer identifier has been provided to proceed to the transfer.","Unable to find the requested group using the provided id.":"Unable to find the requested group using the provided id.","List all created expenses":"List all created expenses","\"%s\" is not an instance of \"FieldsService\"":"\"%s\" is not an instance of \"FieldsService\"","Manage Medias":"Manage Medias","The operation was successful.":"The operation was successful.","Modules List":"Modules List","List all available modules.":"List all available modules.","Upload A Module":"Upload A Module","Extends NexoPOS features with some new modules.":"Extends NexoPOS features with some new modules.","The notification has been successfully deleted":"The notification has been successfully deleted","All the notificataions has been cleared.":"All the notificataions has been cleared.","POS — NexoPOS":"POS — NexoPOS","Order Invoice — %s":"Order Invoice — %s","Order Receipt — %s":"Order Receipt — %s","The printing event has been successfully dispatched.":"The printing event has been successfully dispatched.","There is a mismatch between the provided order and the order attached to the instalment.":"There is a mismatch between the provided order and the order attached to the instalment.","Unammed Page":"Unammed Page","Unable to edit a procurement that is stocked. Consider performing an adjustment or either delete the procurement.":"Unable to edit a procurement that is stocked. Consider performing an adjustment or either delete the procurement.","New Procurement":"New Procurement","Make a new procurement":"Make a new procurement","Edit Procurement":"Edit Procurement","Perform adjustment on existing procurement.":"Perform adjustment on existing procurement.","%s - Invoice":"%s - Invoice","list of product procured.":"list of product procured.","The product price has been refreshed.":"The product price has been refreshed.","The single variation has been deleted.":"The single variation has been deleted.","List all products available on the system":"List all products available on the system","Edit a product":"Edit a product","Makes modifications to a product":"Makes modifications to a product","Create a product":"Create a product","Add a new product on the system":"Add a new product on the system","Stock Adjustment":"Stock Adjustment","Adjust stock of existing products.":"Adjust stock of existing products.","Lost":"Lost","No stock is provided for the requested product.":"No stock is provided for the requested product.","The product unit quantity has been deleted.":"The product unit quantity has been deleted.","Unable to proceed as the request is not valid.":"Unable to proceed as the request is not valid.","Unsupported action for the product %s.":"Unsupported action for the product %s.","The stock has been adjustment successfully.":"The stock has been adjustment successfully.","Unable to add the product to the cart as it has expired.":"Unable to add the product to the cart as it has expired.","Unable to add a product that has accurate tracking enabled, using an ordinary barcode.":"Unable to add a product that has accurate tracking enabled, using an ordinary barcode.","There is no products matching the current request.":"There is no products matching the current request.","Print Labels":"Print Labels","Customize and print products labels.":"Customize and print products labels.","The form contains one or more errors.":"The form contains one or more errors.","Sales Report":"Sales Report","Provides an overview over the sales during a specific period":"Provides an overview over the sales during a specific period","Sold Stock":"Sold Stock","Provides an overview over the sold stock during a specific period.":"Provides an overview over the sold stock during a specific period.","Profit Report":"Profit Report","Provides an overview of the provide of the products sold.":"Provides an overview of the provide of the products sold.","Cash Flow Report":"Cash Flow Report","Provides an overview on the activity for a specific period.":"Provides an overview on the activity for a specific period.","Annual Report":"Annual Report","Invalid authorization code provided.":"Invalid authorization code provided.","The database has been successfully seeded.":"The database has been successfully seeded.","Rewards System":"Rewards System","Manage all rewards program.":"Manage all rewards program.","Create A Reward System":"Create A Reward System","Add a new reward system.":"Add a new reward system.","Edit A Reward System":"Edit A Reward System","edit an existing reward system with the rules attached.":"edit an existing reward system with the rules attached.","Settings Page Not Found":"Settings Page Not Found","Customers Settings":"Customers Settings","Configure the customers settings of the application.":"Configure the customers settings of the application.","General Settings":"General Settings","Configure the general settings of the application.":"Configure the general settings of the application.","Notifications Settings":"Notifications Settings","Configure the notifications settings of the application.":"Configure the notifications settings of the application.","Invoices Settings":"Invoices Settings","Configure the invoice settings.":"Configure the invoice settings.","Orders Settings":"Orders Settings","Configure the orders settings.":"Configure the orders settings.","POS Settings":"POS Settings","Configure the pos settings.":"Configure the pos settings.","Supplies & Deliveries Settings":"Supplies & Deliveries Settings","Configure the supplies and deliveries settings.":"Configure the supplies and deliveries settings.","Reports Settings":"Reports Settings","Configure the reports.":"Configure the reports.","Reset Settings":"Reset Settings","Reset the data and enable demo.":"Reset the data and enable demo.","Services Providers Settings":"Services Providers Settings","Configure the services providers settings.":"Configure the services providers settings.","Workers Settings":"Workers Settings","Configure the workers settings.":"Configure the workers settings.","%s is not an instance of \"%s\".":"%s is not an instance of \"%s\".","Unable to find the requeted product tax using the provided id":"Unable to find the requeted product tax using the provided id","Unable to find the requested product tax using the provided identifier.":"Unable to find the requested product tax using the provided identifier.","The product tax has been created.":"The product tax has been created.","The product tax has been updated":"The product tax has been updated","Unable to retreive the requested tax group using the provided identifier \"%s\".":"Unable to retreive the requested tax group using the provided identifier \"%s\".","Manage all users available.":"Manage all users available.","Permission Manager":"Permission Manager","Manage all permissions and roles":"Manage all permissions and roles","My Profile":"My Profile","Change your personal settings":"Change your personal settings","The permissions has been updated.":"The permissions has been updated.","Sunday":"Sunday","Monday":"Monday","Tuesday":"Tuesday","Wednesday":"Wednesday","Thursday":"Thursday","Friday":"Friday","Saturday":"Saturday","NexoPOS 4 — Setup Wizard":"NexoPOS 4 — Setup Wizard","The migration has successfully run.":"The migration has successfully run.","Workers Misconfiguration":"Workers Misconfiguration","Unable to initialize the settings page. The identifier \"%s\" cannot be instantiated.":"Unable to initialize the settings page. The identifier \"%s\" cannot be instantiated.","Unable to register. The registration is closed.":"Unable to register. The registration is closed.","Hold Order Cleared":"Hold Order Cleared","[NexoPOS] Activate Your Account":"[NexoPOS] Activate Your Account","[NexoPOS] A New User Has Registered":"[NexoPOS] A New User Has Registered","[NexoPOS] Your Account Has Been Created":"[NexoPOS] Your Account Has Been Created","Unable to find the permission with the namespace \"%s\".":"Unable to find the permission with the namespace \"%s\".","Voided":"Voided","Refunded":"Refunded","Partially Refunded":"Partially Refunded","This email is already in use.":"This email is already in use.","This username is already in use.":"This username is already in use.","The user has been succesfully registered":"The user has been succesfully registered","The current authentication request is invalid":"The current authentication request is invalid","Unable to proceed your session has expired.":"Unable to proceed your session has expired.","You are successfully authenticated":"You are successfully authenticated","The user has been successfully connected":"The user has been successfully connected","Your role is not allowed to login.":"Your role is not allowed to login.","This email is not currently in use on the system.":"This email is not currently in use on the system.","Unable to reset a password for a non active user.":"Unable to reset a password for a non active user.","An email has been send with password reset details.":"An email has been send with password reset details.","Unable to proceed, the reCaptcha validation has failed.":"Unable to proceed, the reCaptcha validation has failed.","Unable to proceed, the code has expired.":"Unable to proceed, the code has expired.","Unable to proceed, the request is not valid.":"Unable to proceed, the request is not valid.","The register has been successfully opened":"The register has been successfully opened","The register has been successfully closed":"The register has been successfully closed","The provided amount is not allowed. The amount should be greater than \"0\". ":"The provided amount is not allowed. The amount should be greater than \"0\". ","The cash has successfully been stored":"The cash has successfully been stored","Not enough fund to cash out.":"Not enough fund to cash out.","The cash has successfully been disbursed.":"The cash has successfully been disbursed.","In Use":"In Use","Opened":"Opened","Delete Selected entries":"Delete Selected entries","%s entries has been deleted":"%s entries has been deleted","%s entries has not been deleted":"%s entries has not been deleted","Unable to find the customer using the provided id.":"Unable to find the customer using the provided id.","The customer has been deleted.":"The customer has been deleted.","The email \"%s\" is already stored on another customer informations.":"The email \"%s\" is already stored on another customer informations.","The customer has been created.":"The customer has been created.","Unable to find the customer using the provided ID.":"Unable to find the customer using the provided ID.","The customer has been edited.":"The customer has been edited.","Unable to find the customer using the provided email.":"Unable to find the customer using the provided email.","The operation will cause negative account for the customer.":"The operation will cause negative account for the customer.","The customer account has been updated.":"The customer account has been updated.","Issuing Coupon Failed":"Issuing Coupon Failed","Unable to apply a coupon attached to the reward \"%s\". It looks like the coupon no more exists.":"Unable to apply a coupon attached to the reward \"%s\". It looks like the coupon no more exists.","The coupon is issued for a customer.":"The coupon is issued for a customer.","The coupon is not issued for the selected customer.":"The coupon is not issued for the selected customer.","Unable to find a coupon with the provided code.":"Unable to find a coupon with the provided code.","The coupon has been updated.":"The coupon has been updated.","The group has been created.":"The group has been created.","The expense has been successfully saved.":"The expense has been successfully saved.","The expense has been successfully updated.":"The expense has been successfully updated.","Unable to find the expense using the provided identifier.":"Unable to find the expense using the provided identifier.","Unable to find the requested expense using the provided id.":"Unable to find the requested expense using the provided id.","The expense has been correctly deleted.":"The expense has been correctly deleted.","Unable to find the requested expense category using the provided id.":"Unable to find the requested expense category using the provided id.","You cannot delete a category which has expenses bound.":"You cannot delete a category which has expenses bound.","The expense category has been deleted.":"The expense category has been deleted.","Unable to find the expense category using the provided ID.":"Unable to find the expense category using the provided ID.","The expense category has been saved":"The expense category has been saved","The expense category has been updated.":"The expense category has been updated.","The expense \"%s\" has been processed.":"The expense \"%s\" has been processed.","The expense \"%s\" has already been processed.":"The expense \"%s\" has already been processed.","The process has been correctly executed and all expenses has been processed.":"The process has been correctly executed and all expenses has been processed.","%s — NexoPOS 4":"%s — NexoPOS 4","The media has been deleted":"The media has been deleted","Unable to find the media.":"Unable to find the media.","Unable to find the requested file.":"Unable to find the requested file.","Unable to find the media entry":"Unable to find the media entry","Payment Types":"Payment Types","Medias":"Medias","List":"List","Customers Groups":"Customers Groups","Create Group":"Create Group","Reward Systems":"Reward Systems","Create Reward":"Create Reward","List Coupons":"List Coupons","Providers":"Providers","Create A Provider":"Create A Provider","Create Expense":"Create Expense","Inventory":"Inventory","Create Product":"Create Product","Create Category":"Create Category","Create Unit":"Create Unit","Unit Groups":"Unit Groups","Create Unit Groups":"Create Unit Groups","Taxes Groups":"Taxes Groups","Create Tax Groups":"Create Tax Groups","Create Tax":"Create Tax","Modules":"Modules","Upload Module":"Upload Module","Users":"Users","Create User":"Create User","Roles":"Roles","Create Roles":"Create Roles","Permissions Manager":"Permissions Manager","Procurements":"Procurements","Reports":"Reports","Sale Report":"Sale Report","Incomes & Loosses":"Incomes & Loosses","Cash Flow":"Cash Flow","Supplies & Deliveries":"Supplies & Deliveries","Invoice Settings":"Invoice Settings","Service Providers":"Service Providers","Notifications":"Notifications","Workers":"Workers","Unable to locate the requested module.":"Unable to locate the requested module.","The module \"%s\" has been disabled as the dependency \"%s\" is missing. ":"The module \"%s\" has been disabled as the dependency \"%s\" is missing. ","The module \"%s\" has been disabled as the dependency \"%s\" is not enabled. ":"The module \"%s\" has been disabled as the dependency \"%s\" is not enabled. ","Unable to detect the folder from where to perform the installation.":"Unable to detect the folder from where to perform the installation.","Invalid Module provided":"Invalid Module provided","The uploaded file is not a valid module.":"The uploaded file is not a valid module.","A migration is required for this module":"A migration is required for this module","The module has been successfully installed.":"The module has been successfully installed.","The migration run successfully.":"The migration run successfully.","The module has correctly been enabled.":"The module has correctly been enabled.","Unable to enable the module.":"Unable to enable the module.","The Module has been disabled.":"The Module has been disabled.","Unable to disable the module.":"Unable to disable the module.","Unable to proceed, the modules management is disabled.":"Unable to proceed, the modules management is disabled.","Missing required parameters to create a notification":"Missing required parameters to create a notification","The order has been placed.":"The order has been placed.","The total amount to be paid today is different from the tendered amount.":"The total amount to be paid today is different from the tendered amount.","The provided coupon \"%s\", can no longer be used":"The provided coupon \"%s\", can no longer be used","The percentage discount provided is not valid.":"The percentage discount provided is not valid.","A discount cannot exceed the sub total value of an order.":"A discount cannot exceed the sub total value of an order.","No payment is expected at the moment. If the customer want to pay early, consider adjusting instalment payments date.":"No payment is expected at the moment. If the customer want to pay early, consider adjusting instalment payments date.","The payment has been saved.":"The payment has been saved.","Unable to edit an order that is completely paid.":"Unable to edit an order that is completely paid.","Unable to proceed as one of the previous submitted payment is missing from the order.":"Unable to proceed as one of the previous submitted payment is missing from the order.","The order payment status cannot switch to hold as a payment has already been made on that order.":"The order payment status cannot switch to hold as a payment has already been made on that order.","Unable to proceed. One of the submitted payment type is not supported.":"Unable to proceed. One of the submitted payment type is not supported.","Unable to proceed, the product \"%s\" has a unit which cannot be retreived. It might have been deleted.":"Unable to proceed, the product \"%s\" has a unit which cannot be retreived. It might have been deleted.","Unable to find the customer using the provided ID. The order creation has failed.":"Unable to find the customer using the provided ID. The order creation has failed.","Unable to proceed a refund on an unpaid order.":"Unable to proceed a refund on an unpaid order.","The current credit has been issued from a refund.":"The current credit has been issued from a refund.","The order has been successfully refunded.":"The order has been successfully refunded.","unable to proceed to a refund as the provided status is not supported.":"unable to proceed to a refund as the provided status is not supported.","The product %s has been successfully refunded.":"The product %s has been successfully refunded.","Unable to find the order product using the provided id.":"Unable to find the order product using the provided id.","Unable to find the requested order using \"%s\" as pivot and \"%s\" as identifier":"Unable to find the requested order using \"%s\" as pivot and \"%s\" as identifier","Unable to fetch the order as the provided pivot argument is not supported.":"Unable to fetch the order as the provided pivot argument is not supported.","The product has been added to the order \"%s\"":"The product has been added to the order \"%s\"","the order has been succesfully computed.":"the order has been succesfully computed.","The order has been deleted.":"The order has been deleted.","The product has been successfully deleted from the order.":"The product has been successfully deleted from the order.","Unable to find the requested product on the provider order.":"Unable to find the requested product on the provider order.","Unpaid Orders Turned Due":"Unpaid Orders Turned Due","No orders to handle for the moment.":"No orders to handle for the moment.","The order has been correctly voided.":"The order has been correctly voided.","Unable to edit an already paid instalment.":"Unable to edit an already paid instalment.","The instalment has been saved.":"The instalment has been saved.","The instalment has been deleted.":"The instalment has been deleted.","The defined amount is not valid.":"The defined amount is not valid.","No further instalments is allowed for this order. The total instalment already covers the order total.":"No further instalments is allowed for this order. The total instalment already covers the order total.","The instalment has been created.":"The instalment has been created.","The provided status is not supported.":"The provided status is not supported.","The order has been successfully updated.":"The order has been successfully updated.","Unable to find the requested procurement using the provided identifier.":"Unable to find the requested procurement using the provided identifier.","Unable to find the assigned provider.":"Unable to find the assigned provider.","The procurement has been created.":"The procurement has been created.","Unable to edit a procurement that has already been stocked. Please consider performing and stock adjustment.":"Unable to edit a procurement that has already been stocked. Please consider performing and stock adjustment.","The provider has been edited.":"The provider has been edited.","Unable to delete the procurement as there is not enough stock remaining for \"%s\". This likely means the stock count has changed either with a sale, adjustment after the procurement has been stocked.":"Unable to delete the procurement as there is not enough stock remaining for \"%s\". This likely means the stock count has changed either with a sale, adjustment after the procurement has been stocked.","Unable to have a unit group id for the product using the reference \"%s\" as \"%s\"":"Unable to have a unit group id for the product using the reference \"%s\" as \"%s\"","The operation has completed.":"The operation has completed.","The procurement has been refreshed.":"The procurement has been refreshed.","The procurement has been reset.":"The procurement has been reset.","The procurement products has been deleted.":"The procurement products has been deleted.","The procurement product has been updated.":"The procurement product has been updated.","Unable to find the procurement product using the provided id.":"Unable to find the procurement product using the provided id.","The product %s has been deleted from the procurement %s":"The product %s has been deleted from the procurement %s","The product with the following ID \"%s\" is not initially included on the procurement":"The product with the following ID \"%s\" is not initially included on the procurement","The procurement products has been updated.":"The procurement products has been updated.","Procurement Automatically Stocked":"Procurement Automatically Stocked","Draft":"Draft","The category has been created":"The category has been created","Unable to find the product using the provided id.":"Unable to find the product using the provided id.","Unable to find the requested product using the provided SKU.":"Unable to find the requested product using the provided SKU.","The variable product has been created.":"The variable product has been created.","The provided barcode \"%s\" is already in use.":"The provided barcode \"%s\" is already in use.","The provided SKU \"%s\" is already in use.":"The provided SKU \"%s\" is already in use.","The product has been saved.":"The product has been saved.","The provided barcode is already in use.":"The provided barcode is already in use.","The provided SKU is already in use.":"The provided SKU is already in use.","The product has been udpated":"The product has been udpated","The variable product has been updated.":"The variable product has been updated.","The product variations has been reset":"The product variations has been reset","The product has been resetted.":"The product has been resetted.","The product \"%s\" has been successfully deleted":"The product \"%s\" has been successfully deleted","Unable to find the requested variation using the provided ID.":"Unable to find the requested variation using the provided ID.","The product stock has been updated.":"The product stock has been updated.","The action is not an allowed operation.":"The action is not an allowed operation.","The product quantity has been updated.":"The product quantity has been updated.","There is no variations to delete.":"There is no variations to delete.","There is no products to delete.":"There is no products to delete.","The product variation has been succesfully created.":"The product variation has been succesfully created.","The product variation has been updated.":"The product variation has been updated.","The provider has been created.":"The provider has been created.","The provider has been updated.":"The provider has been updated.","Unable to find the provider using the specified id.":"Unable to find the provider using the specified id.","The provider has been deleted.":"The provider has been deleted.","Unable to find the provider using the specified identifier.":"Unable to find the provider using the specified identifier.","The provider account has been updated.":"The provider account has been updated.","The procurement payment has been deducted.":"The procurement payment has been deducted.","The dashboard report has been updated.":"The dashboard report has been updated.","Untracked Stock Operation":"Untracked Stock Operation","Unsupported action":"Unsupported action","The expense has been correctly saved.":"The expense has been correctly saved.","The table has been truncated.":"The table has been truncated.","The database has been hard reset.":"The database has been hard reset.","Untitled Settings Page":"Untitled Settings Page","No description provided for this settings page.":"No description provided for this settings page.","The form has been successfully saved.":"The form has been successfully saved.","Unable to reach the host":"Unable to reach the host","Unable to connect to the database using the credentials provided.":"Unable to connect to the database using the credentials provided.","Unable to select the database.":"Unable to select the database.","Access denied for this user.":"Access denied for this user.","The connexion with the database was successful":"The connexion with the database was successful","Cash":"Cash","Bank Payment":"Bank Payment","NexoPOS has been successfuly installed.":"NexoPOS has been successfuly installed.","Database connexion was successful":"Database connexion was successful","A simple tax must not be assigned to a parent tax with the type \"simple\", but \"grouped\" instead.":"A simple tax must not be assigned to a parent tax with the type \"simple\", but \"grouped\" instead.","A tax cannot be his own parent.":"A tax cannot be his own parent.","The tax hierarchy is limited to 1. A sub tax must not have the tax type set to \"grouped\".":"The tax hierarchy is limited to 1. A sub tax must not have the tax type set to \"grouped\".","Unable to find the requested tax using the provided identifier.":"Unable to find the requested tax using the provided identifier.","The tax group has been correctly saved.":"The tax group has been correctly saved.","The tax has been correctly created.":"The tax has been correctly created.","The product tax has been saved.":"The product tax has been saved.","The tax has been successfully deleted.":"The tax has been successfully deleted.","The Unit Group has been created.":"The Unit Group has been created.","The unit group %s has been updated.":"The unit group %s has been updated.","Unable to find the unit group to which this unit is attached.":"Unable to find the unit group to which this unit is attached.","The unit has been saved.":"The unit has been saved.","Unable to find the Unit using the provided id.":"Unable to find the Unit using the provided id.","The unit has been updated.":"The unit has been updated.","The unit group %s has more than one base unit":"The unit group %s has more than one base unit","The unit has been deleted.":"The unit has been deleted.","The activation process has failed.":"The activation process has failed.","Unable to activate the account. The activation token is wrong.":"Unable to activate the account. The activation token is wrong.","Unable to activate the account. The activation token has expired.":"Unable to activate the account. The activation token has expired.","The account has been successfully activated.":"The account has been successfully activated.","unable to find this validation class %s.":"unable to find this validation class %s.","Enable Reward":"Enable Reward","Will activate the reward system for the customers.":"Will activate the reward system for the customers.","Default Customer Account":"Default Customer Account","Default Customer Group":"Default Customer Group","Select to which group each new created customers are assigned to.":"Select to which group each new created customers are assigned to.","Enable Credit & Account":"Enable Credit & Account","The customers will be able to make deposit or obtain credit.":"The customers will be able to make deposit or obtain credit.","Store Name":"Store Name","This is the store name.":"This is the store name.","Store Address":"Store Address","The actual store address.":"The actual store address.","Store City":"Store City","The actual store city.":"The actual store city.","Store Phone":"Store Phone","The phone number to reach the store.":"The phone number to reach the store.","Store Email":"Store Email","The actual store email. Might be used on invoice or for reports.":"The actual store email. Might be used on invoice or for reports.","Store PO.Box":"Store PO.Box","The store mail box number.":"The store mail box number.","Store Fax":"Store Fax","The store fax number.":"The store fax number.","Store Additional Information":"Store Additional Information","Store additional informations.":"Store additional informations.","Store Square Logo":"Store Square Logo","Choose what is the square logo of the store.":"Choose what is the square logo of the store.","Store Rectangle Logo":"Store Rectangle Logo","Choose what is the rectangle logo of the store.":"Choose what is the rectangle logo of the store.","Define the default fallback language.":"Define the default fallback language.","Currency":"Currency","Currency Symbol":"Currency Symbol","This is the currency symbol.":"This is the currency symbol.","Currency ISO":"Currency ISO","The international currency ISO format.":"The international currency ISO format.","Currency Position":"Currency Position","Before the amount":"Before the amount","After the amount":"After the amount","Define where the currency should be located.":"Define where the currency should be located.","Prefered Currency":"Prefered Currency","ISO Currency":"ISO Currency","Symbol":"Symbol","Determine what is the currency indicator that should be used.":"Determine what is the currency indicator that should be used.","Currency Thousand Separator":"Currency Thousand Separator","Define the symbol that indicate thousand. By default \",\" is used.":"Define the symbol that indicate thousand. By default \",\" is used.","Currency Decimal Separator":"Currency Decimal Separator","Define the symbol that indicate decimal number. By default \".\" is used.":"Define the symbol that indicate decimal number. By default \".\" is used.","Currency Precision":"Currency Precision","%s numbers after the decimal":"%s numbers after the decimal","Date Format":"Date Format","This define how the date should be defined. The default format is \"Y-m-d\".":"This define how the date should be defined. The default format is \"Y-m-d\".","Determine the default timezone of the store.":"Determine the default timezone of the store.","Registration":"Registration","Registration Open":"Registration Open","Determine if everyone can register.":"Determine if everyone can register.","Registration Role":"Registration Role","Select what is the registration role.":"Select what is the registration role.","Requires Validation":"Requires Validation","Force account validation after the registration.":"Force account validation after the registration.","Allow Recovery":"Allow Recovery","Allow any user to recover his account.":"Allow any user to recover his account.","Receipts":"Receipts","Receipt Template":"Receipt Template","Default":"Default","Choose the template that applies to receipts":"Choose the template that applies to receipts","Receipt Logo":"Receipt Logo","Provide a URL to the logo.":"Provide a URL to the logo.","Receipt Footer":"Receipt Footer","If you would like to add some disclosure at the bottom of the receipt.":"If you would like to add some disclosure at the bottom of the receipt.","Column A":"Column A","Column B":"Column B","Low Stock products":"Low Stock products","Define if notification should be enabled on low stock products":"Define if notification should be enabled on low stock products","Low Stock Channel":"Low Stock Channel","SMS":"SMS","Define the notification channel for the low stock products.":"Define the notification channel for the low stock products.","Expired products":"Expired products","Define if notification should be enabled on expired products":"Define if notification should be enabled on expired products","Expired Channel":"Expired Channel","Define the notification channel for the expired products.":"Define the notification channel for the expired products.","Notify Administrators":"Notify Administrators","Will notify administrator everytime a new user is registrated.":"Will notify administrator everytime a new user is registrated.","Administrator Notification Title":"Administrator Notification Title","Determine the title of the email send to the administrator.":"Determine the title of the email send to the administrator.","Administrator Notification Content":"Administrator Notification Content","Determine what is the message that will be send to the administrator.":"Determine what is the message that will be send to the administrator.","Notify User":"Notify User","Notify a user when his account is successfully created.":"Notify a user when his account is successfully created.","User Registration Title":"User Registration Title","Determine the title of the mail send to the user when his account is created and active.":"Determine the title of the mail send to the user when his account is created and active.","User Registration Content":"User Registration Content","Determine the body of the mail send to the user when his account is created and active.":"Determine the body of the mail send to the user when his account is created and active.","User Activate Title":"User Activate Title","Determine the title of the mail send to the user.":"Determine the title of the mail send to the user.","User Activate Content":"User Activate Content","Determine the mail that will be send to the use when his account requires an activation.":"Determine the mail that will be send to the use when his account requires an activation.","Order Code Type":"Order Code Type","Determine how the system will generate code for each orders.":"Determine how the system will generate code for each orders.","Sequential":"Sequential","Random Code":"Random Code","Number Sequential":"Number Sequential","Allow Unpaid Orders":"Allow Unpaid Orders","Will prevent incomplete orders to be placed. If credit is allowed, this option should be set to \"yes\".":"Will prevent incomplete orders to be placed. If credit is allowed, this option should be set to \"yes\".","Allow Partial Orders":"Allow Partial Orders","Will prevent partially paid orders to be placed.":"Will prevent partially paid orders to be placed.","Quotation Expiration":"Quotation Expiration","Quotations will get deleted after they defined they has reached.":"Quotations will get deleted after they defined they has reached.","%s Days":"%s Days","Orders Follow Up":"Orders Follow Up","Features":"Features","Sound Effect":"Sound Effect","Enable sound effect on the POS.":"Enable sound effect on the POS.","Show Quantity":"Show Quantity","Will show the quantity selector while choosing a product. Otherwise the default quantity is set to 1.":"Will show the quantity selector while choosing a product. Otherwise the default quantity is set to 1.","Allow Customer Creation":"Allow Customer Creation","Allow customers to be created on the POS.":"Allow customers to be created on the POS.","Quick Product":"Quick Product","Allow quick product to be created from the POS.":"Allow quick product to be created from the POS.","SMS Order Confirmation":"SMS Order Confirmation","Will send SMS to the customer once the order is placed.":"Will send SMS to the customer once the order is placed.","Editable Unit Price":"Editable Unit Price","Allow product unit price to be edited.":"Allow product unit price to be edited.","Use Gross Prices":"Use Gross Prices","Will use gross prices for each products.":"Will use gross prices for each products.","Order Types":"Order Types","Control the order type enabled.":"Control the order type enabled.","Layout":"Layout","Retail Layout":"Retail Layout","Clothing Shop":"Clothing Shop","POS Layout":"POS Layout","Change the layout of the POS.":"Change the layout of the POS.","Printing":"Printing","Printed Document":"Printed Document","Choose the document used for printing aster a sale.":"Choose the document used for printing aster a sale.","Printing Enabled For":"Printing Enabled For","All Orders":"All Orders","From Partially Paid Orders":"From Partially Paid Orders","Only Paid Orders":"Only Paid Orders","Determine when the printing should be enabled.":"Determine when the printing should be enabled.","Printing Gateway":"Printing Gateway","Determine what is the gateway used for printing.":"Determine what is the gateway used for printing.","Enable Cash Registers":"Enable Cash Registers","Determine if the POS will support cash registers.":"Determine if the POS will support cash registers.","Cashier Idle Counter":"Cashier Idle Counter","5 Minutes":"5 Minutes","10 Minutes":"10 Minutes","15 Minutes":"15 Minutes","20 Minutes":"20 Minutes","30 Minutes":"30 Minutes","Selected after how many minutes the system will set the cashier as idle.":"Selected after how many minutes the system will set the cashier as idle.","Cash Disbursement":"Cash Disbursement","Allow cash disbursement by the cashier.":"Allow cash disbursement by the cashier.","Cash Registers":"Cash Registers","Keyboard Shortcuts":"Keyboard Shortcuts","Cancel Order":"Cancel Order","Keyboard shortcut to cancel the current order.":"Keyboard shortcut to cancel the current order.","Keyboard shortcut to hold the current order.":"Keyboard shortcut to hold the current order.","Keyboard shortcut to create a customer.":"Keyboard shortcut to create a customer.","Proceed Payment":"Proceed Payment","Keyboard shortcut to proceed to the payment.":"Keyboard shortcut to proceed to the payment.","Open Shipping":"Open Shipping","Keyboard shortcut to define shipping details.":"Keyboard shortcut to define shipping details.","Open Note":"Open Note","Keyboard shortcut to open the notes.":"Keyboard shortcut to open the notes.","Open Calculator":"Open Calculator","Keyboard shortcut to open the calculator.":"Keyboard shortcut to open the calculator.","Open Category Explorer":"Open Category Explorer","Keyboard shortcut to open the category explorer.":"Keyboard shortcut to open the category explorer.","Order Type Selector":"Order Type Selector","Keyboard shortcut to open the order type selector.":"Keyboard shortcut to open the order type selector.","Toggle Fullscreen":"Toggle Fullscreen","Keyboard shortcut to toggle fullscreen.":"Keyboard shortcut to toggle fullscreen.","Quick Search":"Quick Search","Keyboard shortcut open the quick search popup.":"Keyboard shortcut open the quick search popup.","Amount Shortcuts":"Amount Shortcuts","VAT Type":"VAT Type","Determine the VAT type that should be used.":"Determine the VAT type that should be used.","Flat Rate":"Flat Rate","Flexible Rate":"Flexible Rate","Products Vat":"Products Vat","Products & Flat Rate":"Products & Flat Rate","Products & Flexible Rate":"Products & Flexible Rate","Define the tax group that applies to the sales.":"Define the tax group that applies to the sales.","Define how the tax is computed on sales.":"Define how the tax is computed on sales.","VAT Settings":"VAT Settings","Enable Email Reporting":"Enable Email Reporting","Determine if the reporting should be enabled globally.":"Determine if the reporting should be enabled globally.","Email Provider":"Email Provider","Mailgun":"Mailgun","Select the email provided used on the system.":"Select the email provided used on the system.","SMS Provider":"SMS Provider","Twilio":"Twilio","Select the sms provider used on the system.":"Select the sms provider used on the system.","Enable The Multistore Mode":"Enable The Multistore Mode","Will enable the multistore.":"Will enable the multistore.","Supplies":"Supplies","Public Name":"Public Name","Define what is the user public name. If not provided, the username is used instead.":"Define what is the user public name. If not provided, the username is used instead.","Enable Workers":"Enable Workers","Enable background services for NexoPOS 4.x. Refresh to check wether the option has turned to \"Yes\".":"Enable background services for NexoPOS 4.x. Refresh to check wether the option has turned to \"Yes\".","Test":"Test","Current Week":"Current Week","Previous Week":"Previous Week","Unable to find a module having the identifier \"%\".":"Unable to find a module having the identifier \"%\".","There is no migrations to perform for the module \"%s\"":"There is no migrations to perform for the module \"%s\"","The module migration has successfully been performed for the module \"%s\"":"The module migration has successfully been performed for the module \"%s\"","Sales By Payment Types":"Sales By Payment Types","Provide a report of the sales by payment types, for a specific period.":"Provide a report of the sales by payment types, for a specific period.","Sales By Payments":"Sales By Payments","Order Settings":"Order Settings","Define the order name.":"Define the order name.","Define the date of creation of the order.":"Define the date of creation of the order.","Total Refunds":"Total Refunds","Clients Registered":"Clients Registered","Commissions":"Commissions","Processing Status":"Processing Status","Refunded Products":"Refunded Products","The delivery status of the order will be changed. Please confirm your action.":"The delivery status of the order will be changed. Please confirm your action.","The product price has been updated.":"The product price has been updated.","The editable price feature is disabled.":"The editable price feature is disabled.","Order Refunds":"Order Refunds","Product Price":"Product Price","Before saving the order as laid away, a minimum payment of {amount} is required":"Before saving the order as laid away, a minimum payment of {amount} is required","Unable to proceed":"Unable to proceed","Confirm Payment":"Confirm Payment","An instalment has been detected. Would you like to add as first payment {amount} for the selected payment type \"{paymentType}\"?":"An instalment has been detected. Would you like to add as first payment {amount} for the selected payment type \"{paymentType}\"?","Partially paid orders are disabled.":"Partially paid orders are disabled.","An order is currently being processed.":"An order is currently being processed.","Log out":"Log out","Refund receipt":"Refund receipt","Recompute":"Recompute","Sort Results":"Sort Results","Using Quantity Ascending":"Using Quantity Ascending","Using Quantity Descending":"Using Quantity Descending","Using Sales Ascending":"Using Sales Ascending","Using Sales Descending":"Using Sales Descending","Using Name Ascending":"Using Name Ascending","Using Name Descending":"Using Name Descending","Progress":"Progress","Discounts":"Discounts","An invalid date were provided. Make sure it a prior date to the actual server date.":"An invalid date were provided. Make sure it a prior date to the actual server date.","Computing report from %s...":"Computing report from %s...","The demo has been enabled.":"The demo has been enabled.","Refund Receipt":"Refund Receipt","Codabar":"Codabar","Code 128":"Code 128","Code 39":"Code 39","Code 11":"Code 11","UPC A":"UPC A","UPC E":"UPC E","Dashboard Identifier":"Dashboard Identifier","Store Dashboard":"Store Dashboard","Cashier Dashboard":"Cashier Dashboard","Default Dashboard":"Default Dashboard","Define what should be the home page of the dashboard.":"Define what should be the home page of the dashboard.","%s has been processed, %s has not been processed.":"%s has been processed, %s has not been processed.","Order Refund Receipt — %s":"Order Refund Receipt — %s","Product Sales":"Product Sales","Provides an overview over the best products sold during a specific period.":"Provides an overview over the best products sold during a specific period.","The report will be computed for the current year.":"The report will be computed for the current year.","Unknown report to refresh.":"Unknown report to refresh.","Expenses Settings":"Expenses Settings","Configure the expenses settings of the application.":"Configure the expenses settings of the application.","Report Refreshed":"Report Refreshed","The yearly report has been successfully refreshed for the year \"%s\".":"The yearly report has been successfully refreshed for the year \"%s\".","Countable":"Countable","Piece":"Piece","GST":"GST","SGST":"SGST","CGST":"CGST","Sample Procurement %s":"Sample Procurement %s","generated":"generated","Procurement Expenses":"Procurement Expenses","Products Report":"Products Report","Not Available":"Not Available","The report has been computed successfully.":"The report has been computed successfully.","Create a customer":"Create a customer","Cash Flow List":"Cash Flow List","Display all Cash Flow.":"Display all Cash Flow.","No Cash Flow has been registered":"No Cash Flow has been registered","Add a new Cash Flow":"Add a new Cash Flow","Create a new Cash Flow":"Create a new Cash Flow","Register a new Cash Flow and save it.":"Register a new Cash Flow and save it.","Edit Cash Flow":"Edit Cash Flow","Modify Cash Flow.":"Modify Cash Flow.","Credit":"Credit","Debit":"Debit","All entities attached to this category will either produce a \"credit\" or \"debit\" to the cash flow history.":"All entities attached to this category will either produce a \"credit\" or \"debit\" to the cash flow history.","Account":"Account","Provide the accounting number for this category.":"Provide the accounting number for this category.","Unable to register using this email.":"Unable to register using this email.","Unable to register using this username.":"Unable to register using this username.","Accounting Settings":"Accounting Settings","Configure the accounting settings of the application.":"Configure the accounting settings of the application.","Automatically recorded sale payment.":"Automatically recorded sale payment.","Cash out":"Cash out","An automatically generated expense for cash-out operation.":"An automatically generated expense for cash-out operation.","Sales Refunds":"Sales Refunds","Soiled":"Soiled","Cash Register Cash In":"Cash Register Cash In","Cash Register Cash Out":"Cash Register Cash Out","Accounting":"Accounting","Cash Flow History":"Cash Flow History","Expense Accounts":"Expense Accounts","Create Expense Account":"Create Expense Account","Procurement Cash Flow Account":"Procurement Cash Flow Account","Every procurement will be added to the selected cash flow account":"Every procurement will be added to the selected cash flow account","Sale Cash Flow Account":"Sale Cash Flow Account","Every sales will be added to the selected cash flow account":"Every sales will be added to the selected cash flow account","Every customer credit will be added to the selected cash flow account":"Every customer credit will be added to the selected cash flow account","Every customer credit removed will be added to the selected cash flow account":"Every customer credit removed will be added to the selected cash flow account","Sales Refunds Account":"Sales Refunds Account","Sales refunds will be attached to this cash flow account":"Sales refunds will be attached to this cash flow account","Stock return for spoiled items will be attached to this account":"Stock return for spoiled items will be attached to this account","Stock return for unspoiled items will be attached to this account":"Stock return for unspoiled items will be attached to this account","Cash Register Cash-In Account":"Cash Register Cash-In Account","Cash Register Cash-Out Account":"Cash Register Cash-Out Account","Cash Out Assigned Expense Category":"Cash Out Assigned Expense Category","Every cashout will issue an expense under the selected expense category.":"Every cashout will issue an expense under the selected expense category.","Unable to save an order with instalments amounts which additionnated is less than the order total.":"Unable to save an order with instalments amounts which additionnated is less than the order total.","Cash Register cash-in will be added to the cash flow account":"Cash Register cash-in will be added to the cash flow account","Cash Register cash-out will be added to the cash flow account":"Cash Register cash-out will be added to the cash flow account","No module has been updated yet.":"No module has been updated yet.","The reason has been updated.":"The reason has been updated.","You must select a customer before applying a coupon.":"You must select a customer before applying a coupon.","No coupons for the selected customer...":"No coupons for the selected customer...","Use Coupon":"Use Coupon","Use Customer ?":"Use Customer ?","No customer is selected. Would you like to proceed with this customer ?":"No customer is selected. Would you like to proceed with this customer ?","Change Customer ?":"Change Customer ?","Would you like to assign this customer to the ongoing order ?":"Would you like to assign this customer to the ongoing order ?","Product \/ Service":"Product \/ Service","An error has occured while computing the product.":"An error has occured while computing the product.","Provide a unique name for the product.":"Provide a unique name for the product.","Define what is the sale price of the item.":"Define what is the sale price of the item.","Set the quantity of the product.":"Set the quantity of the product.","Define what is tax type of the item.":"Define what is tax type of the item.","Choose the tax group that should apply to the item.":"Choose the tax group that should apply to the item.","Assign a unit to the product.":"Assign a unit to the product.","Some products has been added to the cart. Would youl ike to discard this order ?":"Some products has been added to the cart. Would youl ike to discard this order ?","Customer Accounts List":"Customer Accounts List","Display all customer accounts.":"Display all customer accounts.","No customer accounts has been registered":"No customer accounts has been registered","Add a new customer account":"Add a new customer account","Create a new customer account":"Create a new customer account","Register a new customer account and save it.":"Register a new customer account and save it.","Edit customer account":"Edit customer account","Modify Customer Account.":"Modify Customer Account.","Return to Customer Accounts":"Return to Customer Accounts","This will be ignored.":"This will be ignored.","Define the amount of the transaction":"Define the amount of the transaction","Define what operation will occurs on the customer account.":"Define what operation will occurs on the customer account.","Account History":"Account History","Provider Procurements List":"Provider Procurements List","Display all provider procurements.":"Display all provider procurements.","No provider procurements has been registered":"No provider procurements has been registered","Add a new provider procurement":"Add a new provider procurement","Create a new provider procurement":"Create a new provider procurement","Register a new provider procurement and save it.":"Register a new provider procurement and save it.","Edit provider procurement":"Edit provider procurement","Modify Provider Procurement.":"Modify Provider Procurement.","Return to Provider Procurements":"Return to Provider Procurements","Delivered On":"Delivered On","Items":"Items","Displays the customer account history for %s":"Displays the customer account history for %s","Procurements by \"%s\"":"Procurements by \"%s\"","Crediting":"Crediting","Deducting":"Deducting","Order Payment":"Order Payment","Order Refund":"Order Refund","Unknown Operation":"Unknown Operation","Unamed Product":"Unamed Product","Bubble":"Bubble","Ding":"Ding","Pop":"Pop","Cash Sound":"Cash Sound","Sale Complete Sound":"Sale Complete Sound","New Item Audio":"New Item Audio","The sound that plays when an item is added to the cart.":"The sound that plays when an item is added to the cart.","Howdy, {name}":"Howdy, {name}","Would you like to perform the selected bulk action on the selected entries ?":"Would you like to perform the selected bulk action on the selected entries ?","The payment to be made today is less than what is expected.":"The payment to be made today is less than what is expected.","Unable to select the default customer. Looks like the customer no longer exists. Consider changing the default customer on the settings.":"Unable to select the default customer. Looks like the customer no longer exists. Consider changing the default customer on the settings.","How to change database configuration":"How to change database configuration","Common Database Issues":"Common Database Issues","Setup":"Setup","Compute Products":"Compute Products","Query Exception":"Query Exception","The category products has been refreshed":"The category products has been refreshed","The requested customer cannot be fonud.":"The requested customer cannot be fonud."} \ No newline at end of file diff --git a/resources/lang/es.json b/resources/lang/es.json index b40b4e78d..1da3f145e 100755 --- a/resources/lang/es.json +++ b/resources/lang/es.json @@ -8,7 +8,6 @@ "This field must contain a valid email address.": "Este campo debe contener una direcci\u00f3n de correo electr\u00f3nico v\u00e1lida.", "Clear Selected Entries ?": "Borrar entradas seleccionadas ?", "Would you like to clear all selected entries ?": "\u00bfDesea borrar todas las entradas seleccionadas?", - "No bulk confirmation message provided on the CRUD class.": "No se proporciona ning\u00fan mensaje de confirmaci\u00f3n masivo en la clase CRUD.", "No selection has been made.": "No se ha hecho ninguna selecci\u00f3n.", "No action has been selected.": "No se ha seleccionado ninguna acci\u00f3n.", "There is nothing to display...": "No hay nada que mostrar...", @@ -340,7 +339,6 @@ "An unexpected error has occured while fecthing taxes.": "Ha ocurrido un error inesperado al cobrar impuestos.", "OKAY": "OKEY", "Loading...": "Cargando...", - "Howdy, %s": "Hola,%s", "Profile": "Perfil", "Logout": "Cerrar sesi\u00f3n", "Unamed Page": "P\u00e1gina sin nombre", @@ -1823,61 +1821,72 @@ "Unable to save an order with instalments amounts which additionnated is less than the order total.": "No se puede guardar un pedido con montos a plazos cuyo agregado es menor que el total del pedido.", "Cash Register cash-in will be added to the cash flow account": "El ingreso de efectivo de la caja registradora se agregar\u00e1 a la cuenta de flujo de efectivo", "Cash Register cash-out will be added to the cash flow account": "El retiro de efectivo de la caja registradora se agregar\u00e1 a la cuenta de flujo de efectivo", - "No module has been updated yet.": "No se ha actualizado ningún módulo.", - "The reason has been updated.": "La razón ha sido actualizada.", - "You must select a customer before applying a coupon.": "Debe seleccionar un cliente antes de aplicar un cupón.", + "No module has been updated yet.": "No se ha actualizado ning\u00fan m\u00f3dulo.", + "The reason has been updated.": "La raz\u00f3n ha sido actualizada.", + "You must select a customer before applying a coupon.": "Debe seleccionar un cliente antes de aplicar un cup\u00f3n.", "No coupons for the selected customer...": "No hay cupones para el cliente seleccionado ...", "Use Coupon": "Usar cupon", "Use Customer ?": "Usar cliente?", - "No customer is selected. Would you like to proceed with this customer ?": "No se selecciona ningún cliente.¿Te gustaría proceder con este cliente?", + "No customer is selected. Would you like to proceed with this customer ?": "No se selecciona ning\u00fan cliente.\u00bfTe gustar\u00eda proceder con este cliente?", "Change Customer ?": "Cambiar al cliente?", - "Would you like to assign this customer to the ongoing order ?": "¿Le gustaría asignar a este cliente a la orden en curso?", + "Would you like to assign this customer to the ongoing order ?": "\u00bfLe gustar\u00eda asignar a este cliente a la orden en curso?", "Product \/ Service": "Producto \/ Servicio", "An error has occured while computing the product.": "Se ha producido un error al calcular el producto.", - "Provide a unique name for the product.": "Proporcionar un nombre único para el producto.", - "Define what is the sale price of the item.": "Definir cuál es el precio de venta del artículo.", + "Provide a unique name for the product.": "Proporcionar un nombre \u00fanico para el producto.", + "Define what is the sale price of the item.": "Definir cu\u00e1l es el precio de venta del art\u00edculo.", "Set the quantity of the product.": "Establecer la cantidad del producto.", - "Define what is tax type of the item.": "Definir qué es el tipo de impuesto del artículo.", - "Choose the tax group that should apply to the item.": "Elija el grupo de impuestos que debe aplicarse al artículo.", + "Define what is tax type of the item.": "Definir qu\u00e9 es el tipo de impuesto del art\u00edculo.", + "Choose the tax group that should apply to the item.": "Elija el grupo de impuestos que debe aplicarse al art\u00edculo.", "Assign a unit to the product.": "Asignar una unidad al producto.", - "Some products has been added to the cart. Would youl ike to discard this order ?": "Algunos productos se han agregado al carrito.¿IKE IKE para descartar esta orden?", + "Some products has been added to the cart. Would youl ike to discard this order ?": "Algunos productos se han agregado al carrito.\u00bfIKE IKE para descartar esta orden?", "Customer Accounts List": "Lista de cuentas de clientes", "Display all customer accounts.": "Mostrar todas las cuentas de clientes.", "No customer accounts has been registered": "No se han registrado cuentas de clientes.", - "Add a new customer account": "Añadir una nueva cuenta de cliente", + "Add a new customer account": "A\u00f1adir una nueva cuenta de cliente", "Create a new customer account": "Crear una nueva cuenta de cliente", - "Register a new customer account and save it.": "Registre una nueva cuenta de cliente y guárdela.", + "Register a new customer account and save it.": "Registre una nueva cuenta de cliente y gu\u00e1rdela.", "Edit customer account": "Editar cuenta de cliente", "Modify Customer Account.": "Modificar la cuenta del cliente.", "Return to Customer Accounts": "Volver a las cuentas de los clientes", - "This will be ignored.": "Esto será ignorado.", - "Define the amount of the transaction": "Definir la cantidad de la transacción.", - "Define what operation will occurs on the customer account.": "Defina qué operación ocurre en la cuenta del cliente.", + "This will be ignored.": "Esto ser\u00e1 ignorado.", + "Define the amount of the transaction": "Definir la cantidad de la transacci\u00f3n.", + "Define what operation will occurs on the customer account.": "Defina qu\u00e9 operaci\u00f3n ocurre en la cuenta del cliente.", "Account History": "Historia de la cuenta", "Provider Procurements List": "Lista de adquisiciones de proveedores", "Display all provider procurements.": "Mostrar todas las adquisiciones de proveedores.", "No provider procurements has been registered": "No se han registrado adquisiciones de proveedores.", - "Add a new provider procurement": "Añadir una nueva adquisición del proveedor", - "Create a new provider procurement": "Crear una nueva adquisición de proveedores", - "Register a new provider procurement and save it.": "Registre una nueva adquisición del proveedor y guárdela.", - "Edit provider procurement": "Editar adquisición del proveedor", - "Modify Provider Procurement.": "Modificar la adquisición del proveedor.", + "Add a new provider procurement": "A\u00f1adir una nueva adquisici\u00f3n del proveedor", + "Create a new provider procurement": "Crear una nueva adquisici\u00f3n de proveedores", + "Register a new provider procurement and save it.": "Registre una nueva adquisici\u00f3n del proveedor y gu\u00e1rdela.", + "Edit provider procurement": "Editar adquisici\u00f3n del proveedor", + "Modify Provider Procurement.": "Modificar la adquisici\u00f3n del proveedor.", "Return to Provider Procurements": "Volver a las adquisiciones del proveedor", "Delivered On": "Entregado en", "Items": "Elementos", "Displays the customer account history for %s": "Muestra el historial de la cuenta del cliente para% s", "Procurements by \"%s\"": "Adquisiciones por \"%s\"", - "Crediting": "Acreditación", - "Deducting": "Deducción", + "Crediting": "Acreditaci\u00f3n", + "Deducting": "Deducci\u00f3n", "Order Payment": "Orden de pago", "Order Refund": "Reembolso de pedidos", - "Unknown Operation": "Operación desconocida", + "Unknown Operation": "Operaci\u00f3n desconocida", "Unamed Product": "Producto por calificaciones", "Bubble": "Burbuja", "Ding": "Cosa", - "Pop": "Música pop", + "Pop": "M\u00fasica pop", "Cash Sound": "Sonido en efectivo", "Sale Complete Sound": "Venta de sonido completo", - "New Item Audio": "Nuevo artículo de audio", - "The sound that plays when an item is added to the cart.": "El sonido que se reproduce cuando se agrega un artículo al carrito.." + "New Item Audio": "Nuevo art\u00edculo de audio", + "The sound that plays when an item is added to the cart.": "El sonido que se reproduce cuando se agrega un art\u00edculo al carrito..", + "Howdy, {name}": "Howdy, {name}", + "Would you like to perform the selected bulk action on the selected entries ?": "¿Le gustaría realizar la acción a granel seleccionada en las entradas seleccionadas?", + "The payment to be made today is less than what is expected.": "El pago que se realizará hoy es menor que lo que se espera.", + "Unable to select the default customer. Looks like the customer no longer exists. Consider changing the default customer on the settings.": "No se puede seleccionar el cliente predeterminado.Parece que el cliente ya no existe.Considere cambiar el cliente predeterminado en la configuración.", + "How to change database configuration": "Cómo cambiar la configuración de la base de datos", + "Common Database Issues": "Problemas de base de datos comunes", + "Setup": "Configuración", + "Compute Products": "Cómputo Products", + "Query Exception": "Excepción de consulta", + "The category products has been refreshed": "Los productos de la categoría se han actualizado.", + "The requested customer cannot be fonud.": "El cliente solicitado no se puede encontrar." } \ No newline at end of file diff --git a/resources/lang/fr.json b/resources/lang/fr.json index c60c8cf74..6829eb267 100755 --- a/resources/lang/fr.json +++ b/resources/lang/fr.json @@ -1422,7 +1422,6 @@ "This field must contain a valid email address.": "Ce champ doit contenir une adresse email valide.", "Clear Selected Entries ?": "Effacer les entr\u00e9es s\u00e9lectionn\u00e9es?", "Would you like to clear all selected entries ?": "Souhaitez-vous effacer toutes les entr\u00e9es s\u00e9lectionn\u00e9es?", - "No bulk confirmation message provided on the CRUD class.": "Aucun message de confirmation en vrac pr\u00e9vu sur la classe CRUD.", "No selection has been made.": "Aucune s\u00e9lection n'a \u00e9t\u00e9 faite.", "No action has been selected.": "Aucune action n'a \u00e9t\u00e9 s\u00e9lectionn\u00e9e.", "There is nothing to display...": "Il n'y a rien \u00e0 afficher ...", @@ -1598,7 +1597,6 @@ "Unable to proceed, no valid submit URL is defined.": "Impossible de proc\u00e9der, aucune URL de soumission valide n'est d\u00e9finie.", "Input the coupon code that should apply to the POS. If a coupon is issued for a customer, that customer must be selected priorly.": "Entrez le code de coupon qui devrait s'appliquer au point de vente.Si un coupon est \u00e9mis pour un client, le client doit \u00eatre s\u00e9lectionn\u00e9 prioritaire.", "In order to see a customer account, you need to select one customer.": "Pour voir un compte client, vous devez s\u00e9lectionner un client.", - "Howdy, %s": "Salutations, %s", "The account you have created for __%s__, require an activation. In order to proceed, please click on the following link": "Le compte que vous avez cr\u00e9\u00e9 pour __%s__, n\u00e9cessite une activation.Pour proc\u00e9der, veuillez cliquer sur le lien suivant", "Your password has been successfully updated on __%s__. You can now login with your new password.": "Votre mot de passe a \u00e9t\u00e9 mis \u00e0 jour avec succ\u00e8s sur __%s__.Vous pouvez maintenant vous connecter avec votre nouveau mot de passe.", "Someone has requested to reset your password on __\"%s\"__. If you remember having done that request, please proceed by clicking the button below. ": "Quelqu'un a demand\u00e9 de r\u00e9initialiser votre mot de passe sur __ \"%s\" __.Si vous vous souvenez d'avoir fait cette demande, proc\u00e9dez comme suit en cliquant sur le bouton ci-dessous.", @@ -1823,61 +1821,72 @@ "Unable to save an order with instalments amounts which additionnated is less than the order total.": "Impossible d'enregistrer une commande avec des montants d'acomptes ajout\u00e9s inf\u00e9rieurs au total de la commande.", "Cash Register cash-in will be added to the cash flow account": "L'encaissement de la caisse enregistreuse sera ajout\u00e9 au compte de flux de tr\u00e9sorerie", "Cash Register cash-out will be added to the cash flow account": "L'encaissement de la caisse enregistreuse sera ajout\u00e9 au compte de flux de tr\u00e9sorerie", - "No module has been updated yet.": "Aucun module n'a encore été mis à jour.", - "The reason has been updated.": "La raison a été mise à jour.", - "You must select a customer before applying a coupon.": "Vous devez sélectionner un client avant d'appliquer un coupon.", - "No coupons for the selected customer...": "Aucun coupon pour le client sélectionné...", + "No module has been updated yet.": "Aucun module n'a encore \u00e9t\u00e9 mis \u00e0 jour.", + "The reason has been updated.": "La raison a \u00e9t\u00e9 mise \u00e0 jour.", + "You must select a customer before applying a coupon.": "Vous devez s\u00e9lectionner un client avant d'appliquer un coupon.", + "No coupons for the selected customer...": "Aucun coupon pour le client s\u00e9lectionn\u00e9...", "Use Coupon": "Utiliser le coupon", "Use Customer ?": "Utiliser Client ?", - "No customer is selected. Would you like to proceed with this customer ?": "Aucun client n'est sélectionné. Souhaitez-vous continuer avec ce client ?", + "No customer is selected. Would you like to proceed with this customer ?": "Aucun client n'est s\u00e9lectionn\u00e9. Souhaitez-vous continuer avec ce client ?", "Change Customer ?": "Changer de client ?", - "Would you like to assign this customer to the ongoing order ?": "Souhaitez-vous affecter ce client à la commande en cours ?", + "Would you like to assign this customer to the ongoing order ?": "Souhaitez-vous affecter ce client \u00e0 la commande en cours ?", "Product \/ Service": "Produit \/ Service", "An error has occured while computing the product.": "Une erreur s'est produite lors du calcul du produit.", "Provide a unique name for the product.": "Fournissez un nom unique pour le produit.", - "Define what is the sale price of the item.": "Définir quel est le prix de vente de l'article.", - "Set the quantity of the product.": "Réglez la quantité du produit.", - "Define what is tax type of the item.": "Définissez le type de taxe de l'article.", - "Choose the tax group that should apply to the item.": "Choisissez le groupe de taxes qui doit s'appliquer à l'article.", - "Assign a unit to the product.": "Attribuez une unité au produit.", - "Some products has been added to the cart. Would youl ike to discard this order ?": "Certains produits ont été ajoutés au panier. Souhaitez-vous supprimer cette commande ?", + "Define what is the sale price of the item.": "D\u00e9finir quel est le prix de vente de l'article.", + "Set the quantity of the product.": "R\u00e9glez la quantit\u00e9 du produit.", + "Define what is tax type of the item.": "D\u00e9finissez le type de taxe de l'article.", + "Choose the tax group that should apply to the item.": "Choisissez le groupe de taxes qui doit s'appliquer \u00e0 l'article.", + "Assign a unit to the product.": "Attribuez une unit\u00e9 au produit.", + "Some products has been added to the cart. Would youl ike to discard this order ?": "Certains produits ont \u00e9t\u00e9 ajout\u00e9s au panier. Souhaitez-vous supprimer cette commande ?", "Customer Accounts List": "Liste des comptes clients", "Display all customer accounts.": "Afficher tous les comptes clients.", - "No customer accounts has been registered": "Aucun compte client n'a été enregistré", + "No customer accounts has been registered": "Aucun compte client n'a \u00e9t\u00e9 enregistr\u00e9", "Add a new customer account": "Ajouter un nouveau compte client", - "Create a new customer account": "Créer un nouveau compte client", + "Create a new customer account": "Cr\u00e9er un nouveau compte client", "Register a new customer account and save it.": "Enregistrez un nouveau compte client et enregistrez-le.", "Edit customer account": "Modifier le compte client", "Modify Customer Account.": "Modifier le compte client.", "Return to Customer Accounts": "Retour aux comptes clients", - "This will be ignored.": "Cela sera ignoré.", - "Define the amount of the transaction": "Définir le montant de la transaction", - "Define what operation will occurs on the customer account.": "Définissez quelle opération se produira sur le compte client.", + "This will be ignored.": "Cela sera ignor\u00e9.", + "Define the amount of the transaction": "D\u00e9finir le montant de la transaction", + "Define what operation will occurs on the customer account.": "D\u00e9finissez quelle op\u00e9ration se produira sur le compte client.", "Account History": "Historique du compte", "Provider Procurements List": "Liste des approvisionnements des fournisseurs", "Display all provider procurements.": "Afficher tous les achats des fournisseurs.", - "No provider procurements has been registered": "Aucun achat de fournisseur n'a été enregistré", + "No provider procurements has been registered": "Aucun achat de fournisseur n'a \u00e9t\u00e9 enregistr\u00e9", "Add a new provider procurement": "Ajouter un nouveau fournisseur d'approvisionnement", - "Create a new provider procurement": "Créer un nouveau fournisseur d'approvisionnement", + "Create a new provider procurement": "Cr\u00e9er un nouveau fournisseur d'approvisionnement", "Register a new provider procurement and save it.": "Enregistrez un nouvel achat de fournisseur et enregistrez-le.", "Edit provider procurement": "Modifier l'approvisionnement du fournisseur", "Modify Provider Procurement.": "Modifier l'approvisionnement du fournisseur.", - "Return to Provider Procurements": "Retourner à Approvisionnements des fournisseurs", - "Delivered On": "Livré le", + "Return to Provider Procurements": "Retourner \u00e0 Approvisionnements des fournisseurs", + "Delivered On": "Livr\u00e9 le", "Items": "Articles", "Displays the customer account history for %s": "Affiche l'historique du compte client pour %s", "Procurements by \"%s\"": "Approvisionnements par \"%s\"", - "Crediting": "Créditer", - "Deducting": "Déduire", + "Crediting": "Cr\u00e9diter", + "Deducting": "D\u00e9duire", "Order Payment": "Paiement de la commande", "Order Refund": "Remboursement de la commande", - "Unknown Operation": "Opération inconnue", + "Unknown Operation": "Op\u00e9ration inconnue", "Unamed Product": "Produit sans nom", "Bubble": "Bulle", "Ding": "Ding", "Pop": "Pop", "Cash Sound": "Cash Sound", "Sale Complete Sound": "Vente Son Complet", - "New Item Audio": "Nouvel élément audio", - "The sound that plays when an item is added to the cart.": "Le son qui joue lorsqu'un article est ajouté au panier." + "New Item Audio": "Nouvel \u00e9l\u00e9ment audio", + "The sound that plays when an item is added to the cart.": "Le son qui joue lorsqu'un article est ajout\u00e9 au panier.", + "Howdy, {name}": "Howdy, {name}", + "Would you like to perform the selected bulk action on the selected entries ?": "Souhaitez-vous effectuer l'action en vrac sélectionnée sur les entrées sélectionnées?", + "The payment to be made today is less than what is expected.": "Le paiement à effectuer aujourd'hui est inférieur à ce que l'on attend.", + "Unable to select the default customer. Looks like the customer no longer exists. Consider changing the default customer on the settings.": "Impossible de sélectionner le client par défaut.On dirait que le client n'existe plus.Envisagez de modifier le client par défaut sur les paramètres.", + "How to change database configuration": "Comment modifier la configuration de la base de données", + "Common Database Issues": "Problèmes communs de la base de données", + "Setup": "Installer", + "Compute Products": "Calculer des produits", + "Query Exception": "Exception de requête", + "The category products has been refreshed": "La catégorie Products a été rafraîchi", + "The requested customer cannot be fonud.": "Le client demandé est introuvable." } \ No newline at end of file diff --git a/resources/lang/it.json b/resources/lang/it.json index 293617282..a27e12a46 100755 --- a/resources/lang/it.json +++ b/resources/lang/it.json @@ -7,7 +7,6 @@ "Unexpected error occured.": "Si \u00e8 verificato un errore imprevisto.", "Clear Selected Entries ?": "Cancella voci selezionate?", "Would you like to clear all selected entries ?": "Vuoi cancellare tutte le voci selezionate?", - "No bulk confirmation message provided on the CRUD class.": "Nessun messaggio di conferma in blocco fornito sulla classe CRUD.", "No selection has been made.": "Non \u00e8 stata effettuata alcuna selezione.", "No action has been selected.": "Nessuna azione \u00e8 stata selezionata.", "{entries} entries selected": "{voci} voci selezionate", @@ -353,7 +352,6 @@ "An unexpected error has occured while fecthing taxes.": "Si \u00e8 verificato un errore imprevisto durante l'evasione delle imposte.", "OKAY": "VA BENE", "Loading...": "Caricamento in corso...", - "Howdy, %s": "Ciao, %s", "Profile": "Profilo", "Logout": "Disconnettersi", "Unamed Page": "Pagina senza nome", @@ -1823,8 +1821,8 @@ "Unable to save an order with instalments amounts which additionnated is less than the order total.": "Impossibile salvare un ordine con importi rateali il cui importo aggiuntivo \u00e8 inferiore al totale dell'ordine.", "Cash Register cash-in will be added to the cash flow account": "L'incasso del registratore di cassa verr\u00e0 aggiunto al conto del flusso di cassa", "Cash Register cash-out will be added to the cash flow account": "L'incasso del registratore di cassa verr\u00e0 aggiunto al conto del flusso di cassa", - "No module has been updated yet.": "Nessun modulo è stato ancora aggiornato.", - "The reason has been updated.": "Il motivo è stato aggiornato.", + "No module has been updated yet.": "Nessun modulo \u00e8 stato ancora aggiornato.", + "The reason has been updated.": "Il motivo \u00e8 stato aggiornato.", "You must select a customer before applying a coupon.": "Devi selezionare un cliente prima di applicare un coupon.", "No coupons for the selected customer...": "Nessun coupon per il cliente selezionato...", "Use Coupon": "Usa coupon", @@ -1833,30 +1831,30 @@ "Change Customer ?": "Cambia cliente?", "Would you like to assign this customer to the ongoing order ?": "Vuoi assegnare questo cliente all'ordine in corso?", "Product \/ Service": "Prodotto \/ Servizio", - "An error has occured while computing the product.": "Si è verificato un errore durante il calcolo del prodotto.", + "An error has occured while computing the product.": "Si \u00e8 verificato un errore durante il calcolo del prodotto.", "Provide a unique name for the product.": "Fornire un nome univoco per il prodotto.", - "Define what is the sale price of the item.": "Definire qual è il prezzo di vendita dell'articolo.", - "Set the quantity of the product.": "Imposta la quantità del prodotto.", - "Define what is tax type of the item.": "Definire qual è il tipo di imposta dell'articolo.", + "Define what is the sale price of the item.": "Definire qual \u00e8 il prezzo di vendita dell'articolo.", + "Set the quantity of the product.": "Imposta la quantit\u00e0 del prodotto.", + "Define what is tax type of the item.": "Definire qual \u00e8 il tipo di imposta dell'articolo.", "Choose the tax group that should apply to the item.": "Scegli il gruppo imposte da applicare all'articolo.", - "Assign a unit to the product.": "Assegna un'unità al prodotto.", + "Assign a unit to the product.": "Assegna un'unit\u00e0 al prodotto.", "Some products has been added to the cart. Would youl ike to discard this order ?": "Alcuni prodotti sono stati aggiunti al carrello. Vuoi eliminare questo ordine?", "Customer Accounts List": "Elenco dei conti dei clienti", "Display all customer accounts.": "Visualizza tutti gli account cliente.", - "No customer accounts has been registered": "Nessun account cliente è stato registrato", + "No customer accounts has been registered": "Nessun account cliente \u00e8 stato registrato", "Add a new customer account": "Aggiungi un nuovo account cliente", "Create a new customer account": "Crea un nuovo account cliente", "Register a new customer account and save it.": "Registra un nuovo account cliente e salvalo.", "Edit customer account": "Modifica account cliente", "Modify Customer Account.": "Modifica account cliente.", "Return to Customer Accounts": "Torna agli account dei clienti", - "This will be ignored.": "Questo verrà ignorato.", + "This will be ignored.": "Questo verr\u00e0 ignorato.", "Define the amount of the transaction": "Definire l'importo della transazione", - "Define what operation will occurs on the customer account.": "Definire quale operazione verrà eseguita sul conto cliente.", + "Define what operation will occurs on the customer account.": "Definire quale operazione verr\u00e0 eseguita sul conto cliente.", "Account History": "Cronologia dell'account", "Provider Procurements List": "Elenco degli appalti del fornitore", "Display all provider procurements.": "Visualizza tutti gli appalti del fornitore.", - "No provider procurements has been registered": "Nessun approvvigionamento di fornitori è stato registrato", + "No provider procurements has been registered": "Nessun approvvigionamento di fornitori \u00e8 stato registrato", "Add a new provider procurement": "Aggiungi un nuovo approvvigionamento fornitore", "Create a new provider procurement": "Crea un nuovo approvvigionamento fornitore", "Register a new provider procurement and save it.": "Registra un nuovo approvvigionamento fornitore e salvalo.", @@ -1879,5 +1877,16 @@ "Cash Sound": "Suono di cassa", "Sale Complete Sound": "Vendita Suono Completo", "New Item Audio": "Nuovo elemento audio", - "The sound that plays when an item is added to the cart.": "Il suono che viene riprodotto quando un articolo viene aggiunto al carrello." + "The sound that plays when an item is added to the cart.": "Il suono che viene riprodotto quando un articolo viene aggiunto al carrello.", + "Howdy, {name}": "Howdy, {name}", + "Would you like to perform the selected bulk action on the selected entries ?": "Volete eseguire l'azione sfusa selezionata sulle voci selezionate?", + "The payment to be made today is less than what is expected.": "Il pagamento da apportare oggi è inferiore a quanto previsto.", + "Unable to select the default customer. Looks like the customer no longer exists. Consider changing the default customer on the settings.": "Impossibile selezionare il cliente predefinito.Sembra che il cliente non esista più.Considera di cambiare il cliente predefinito sulle impostazioni.", + "How to change database configuration": "Come modificare la configurazione del database", + "Common Database Issues": "Problemi di database comuni", + "Setup": "Impostare", + "Compute Products": "Computa Products.", + "Query Exception": "Eccezione della query", + "The category products has been refreshed": "La categoria Prodotti è stata aggiornata", + "The requested customer cannot be fonud.": "Il cliente richiesto non può essere trovato." } \ No newline at end of file diff --git a/resources/ts/libraries/snackbar.ts b/resources/ts/libraries/snackbar.ts index 0b82b4ac2..81ed07ced 100755 --- a/resources/ts/libraries/snackbar.ts +++ b/resources/ts/libraries/snackbar.ts @@ -101,13 +101,13 @@ export class SnackBar { */ if ( label ) { buttonNode.textContent = label; - buttonNode.setAttribute( 'class', `px-3 py-2 shadow rounded-lg font-bold ${buttonThemeClass}` ); + buttonNode.setAttribute( 'class', `px-3 py-2 shadow rounded uppercase ${buttonThemeClass}` ); buttonsWrapper.appendChild( buttonNode ); } sampleSnack.appendChild( textNode ); sampleSnack.appendChild( buttonsWrapper ); - sampleSnack.setAttribute( 'class', `md:rounded-lg py-2 px-3 md:w-2/5 w-full z-10 md:my-2 shadow-lg flex justify-between items-center zoom-in-entrance anim-duration-300 ${snackThemeClass}` ); + sampleSnack.setAttribute( 'class', `md:rounded py-2 px-3 md:w-2/5 w-full z-10 md:my-2 shadow-lg flex justify-between items-center zoom-in-entrance anim-duration-300 ${snackThemeClass}` ); snackWrapper.appendChild( sampleSnack ); diff --git a/resources/ts/pos-init.ts b/resources/ts/pos-init.ts index 46cd95e31..bd754b402 100755 --- a/resources/ts/pos-init.ts +++ b/resources/ts/pos-init.ts @@ -231,14 +231,20 @@ export class POS { if (options.ns_customers_default !== false) { nsHttpClient.get(`/api/nexopos/v4/customers/${options.ns_customers_default}`) - .subscribe(customer => { - this.selectCustomer(customer); - resolve({ - status: 'success', - message: __('The customer has been loaded') - }); - }, (error) => { - reject(error); + .subscribe({ + next: customer => { + this.selectCustomer(customer); + resolve({ + status: 'success', + message: __('The customer has been loaded') + }); + }, + error: (error) => { + nsSnackBar + .error( __( 'Unable to select the default customer. Looks like the customer no longer exists. Consider changing the default customer on the settings.' ), __( 'OKAY' ), { duration: 0 }) + .subscribe(); + reject(error); + } }); } @@ -896,12 +902,15 @@ export class POS { */ if (customer.group === undefined || customer.group === null) { nsHttpClient.get(`/api/nexopos/v4/customers/${customer.id}/group`) - .subscribe(group => { - order.customer.group = group; - this.order.next(order); - resolve(order); - }, (error) => { - reject(error); + .subscribe({ + next: group => { + order.customer.group = group; + this.order.next(order); + resolve(order); + }, + error: ( error ) => { + reject(error); + } }); } else { return resolve(order); diff --git a/resources/views/layout/base.blade.php b/resources/views/layout/base.blade.php index 0e3a36a3b..88df23330 100755 --- a/resources/views/layout/base.blade.php +++ b/resources/views/layout/base.blade.php @@ -2,6 +2,8 @@ use App\Classes\Hook; use App\Services\DateService; +use App\Services\Helper; + ?> diff --git a/resources/views/layout/dashboard.blade.php b/resources/views/layout/dashboard.blade.php index ee7ef1ada..8e2d6af7f 100755 --- a/resources/views/layout/dashboard.blade.php +++ b/resources/views/layout/dashboard.blade.php @@ -83,7 +83,9 @@ @yield( 'layout.dashboard.body', View::make( 'common.dashboard.with-header' ) )
    - {!! sprintf( __( 'You\'re using NexoPOS %s' ), 'https://my.nexopos.com/en', config( 'nexopos.version' ) ) !!} + {!! + Hook::filter( 'ns-footer-signature', sprintf( __( 'You\'re using NexoPOS %s' ), 'https://my.nexopos.com/en', config( 'nexopos.version' ) ) ) + !!}
    diff --git a/resources/views/layout/default.blade.php b/resources/views/layout/default.blade.php new file mode 100755 index 000000000..4e7dee375 --- /dev/null +++ b/resources/views/layout/default.blade.php @@ -0,0 +1,22 @@ + + + + + + + {!! $title ?? __( 'Unamed Page' ) !!} + + @yield( 'layout.default.header' ) + + + @yield( 'layout.default.body' ) + @section( 'layout.default.footer' ) + @show + + \ No newline at end of file diff --git a/resources/views/pages/errors/db-exception.blade.php b/resources/views/pages/errors/db-exception.blade.php new file mode 100755 index 000000000..cc90de5c4 --- /dev/null +++ b/resources/views/pages/errors/db-exception.blade.php @@ -0,0 +1,37 @@ +@extends( 'layout.default' ) + +@section( 'layout.default.body' ) +
    +
    + + + +

    {!! $title ?? __( 'Not Allowed Action' ) !!}

    +
    +

    {{ $message }}

    +
    + {{ __( 'NexoPOS wasn\'t able to perform a database request. This error might be related to a misconfiguration on your .env file. The following guide might be useful to help you solving this issue.' ) }} +
    + +
    + +
    +
    +@endsection \ No newline at end of file diff --git a/tests/Feature/CreateTestDatabaseSQLite.php b/tests/Feature/CreateTestDatabaseSQLite.php index e441928f5..271142b6a 100755 --- a/tests/Feature/CreateTestDatabaseSQLite.php +++ b/tests/Feature/CreateTestDatabaseSQLite.php @@ -16,9 +16,6 @@ class CreateTestDatabaseSQLite extends TestCase */ public function test_example() { - DotenvEditor::deleteKey( 'NS_VERSION' ); - DotenvEditor::save(); - file_put_contents( dirname( __FILE__ ) . '/../database.sqlite', '' ); $this->assertTrue(true);