diff --git a/.env.example b/.env.example index f8e1df298..fd9039197 100644 --- a/.env.example +++ b/.env.example @@ -86,6 +86,7 @@ COOKIE_DOMAIN=null SECURE_COOKIES=false API_TOKEN_EXPIRATION_YEARS=15 BS_TABLE_STORAGE=cookieStorage +BS_TABLE_DEEPLINK=true # -------------------------------------------- # OPTIONAL: SECURITY HEADER SETTINGS diff --git a/app/Http/Controllers/Api/AssetsController.php b/app/Http/Controllers/Api/AssetsController.php index 1b671386a..38f135681 100644 --- a/app/Http/Controllers/Api/AssetsController.php +++ b/app/Http/Controllers/Api/AssetsController.php @@ -592,6 +592,11 @@ class AssetsController extends Controller } } } + if ($field->element == 'checkbox') { + if(is_array($field_val)) { + $field_val = implode(',', $field_val); + } + } $asset->{$field->db_column} = $field_val; @@ -614,7 +619,7 @@ class AssetsController extends Controller $asset->image = $asset->getImageUrl(); } - return response()->json(Helper::formatStandardApiResponse('success', $asset, trans('admin/hardware/message.create.success'))); + return response()->json(Helper::formatStandardApiResponse('success', (new AssetsTransformer)->transformAsset($asset), trans('admin/hardware/message.create.success'))); } return response()->json(Helper::formatStandardApiResponse('error', null, $asset->getErrors()), 200); @@ -642,26 +647,35 @@ class AssetsController extends Controller } /** - * this is here just legacy reasons. Api\AssetController - * used image_source once to allow encoded image uploads. - */ + * this is here just legacy reasons. Api\AssetController + * used image_source once to allow encoded image uploads. + */ if ($request->has('image_source')) { $request->offsetSet('image', $request->offsetGet('image_source')); - } + } $asset = $request->handleImages($asset); $model = $asset->model; - + // Update custom fields if (($model) && (isset($model->fieldset))) { foreach ($model->fieldset->fields as $field) { + $field_val = $request->input($field->db_column, null); + if ($request->has($field->db_column)) { if ($field->field_encrypted == '1') { if (Gate::allows('admin')) { - $asset->{$field->db_column} = Crypt::encrypt($request->input($field->db_column)); + $asset->{$field->db_column} = Crypt::encrypt($field_val); } - } else { - $asset->{$field->db_column} = $request->input($field->db_column); + } + if ($field->element == 'checkbox') { + if(is_array($field_val)) { + $field_val = implode(',', $field_val); + $asset->{$field->db_column} = $field_val; + } + } + else { + $asset->{$field->db_column} = $field_val; } } } @@ -686,7 +700,7 @@ class AssetsController extends Controller if ($asset->image) { $asset->image = $asset->getImageUrl(); } - return response()->json(Helper::formatStandardApiResponse('success', $asset, trans('admin/hardware/message.update.success'))); + return response()->json(Helper::formatStandardApiResponse('success', (new AssetsTransformer)->transformAsset($asset), trans('admin/hardware/message.update.success'))); } return response()->json(Helper::formatStandardApiResponse('error', null, $asset->getErrors()), 200); } diff --git a/app/Http/Controllers/Api/ReportsController.php b/app/Http/Controllers/Api/ReportsController.php index a91d8a9bc..3c1faa103 100644 --- a/app/Http/Controllers/Api/ReportsController.php +++ b/app/Http/Controllers/Api/ReportsController.php @@ -45,6 +45,10 @@ class ReportsController extends Controller $actionlogs = $actionlogs->where('action_type', '=', $request->input('action_type'))->orderBy('created_at', 'desc'); } + if ($request->filled('user_id')) { + $actionlogs = $actionlogs->where('user_id', '=', $request->input('user_id')); + } + if ($request->filled('action_source')) { $actionlogs = $actionlogs->where('action_source', '=', $request->input('action_source'))->orderBy('created_at', 'desc'); } diff --git a/app/Http/Controllers/Api/UsersController.php b/app/Http/Controllers/Api/UsersController.php index 6d32e8b6f..5ef45ee4d 100644 --- a/app/Http/Controllers/Api/UsersController.php +++ b/app/Http/Controllers/Api/UsersController.php @@ -560,7 +560,26 @@ class UsersController extends Controller { $this->authorize('view', User::class); $this->authorize('view', Asset::class); - $assets = Asset::where('assigned_to', '=', $id)->where('assigned_type', '=', User::class)->with('model')->get(); + $assets = Asset::where('assigned_to', '=', $id)->where('assigned_type', '=', User::class)->with('model'); + + + // Filter on category ID + if ($request->filled('category_id')) { + $assets = $assets->InCategory($request->input('category_id')); + } + + + // Filter on model ID + if ($request->filled('model_id')) { + + $model_ids = $request->input('model_id'); + if (!is_array($model_ids)) { + $model_ids = array($model_ids); + } + $assets = $assets->InModelList($model_ids); + } + + $assets = $assets->get(); return (new AssetsTransformer)->transformAssets($assets, $assets->count(), $request); } @@ -661,7 +680,17 @@ class UsersController extends Controller $user = User::find($request->get('id')); $user->two_factor_secret = null; $user->two_factor_enrolled = 0; - $user->save(); + $user->saveQuietly(); + + // Log the reset + $logaction = new Actionlog(); + $logaction->target_type = User::class; + $logaction->target_id = $user->id; + $logaction->item_type = User::class; + $logaction->item_id = $user->id; + $logaction->created_at = date('Y-m-d H:i:s'); + $logaction->user_id = Auth::user()->id; + $logaction->logaction('2FA reset'); return response()->json(['message' => trans('admin/settings/general.two_factor_reset_success')], 200); } catch (\Exception $e) { diff --git a/app/Http/Controllers/AssetModelsController.php b/app/Http/Controllers/AssetModelsController.php index 484a2e2f8..8d387f968 100755 --- a/app/Http/Controllers/AssetModelsController.php +++ b/app/Http/Controllers/AssetModelsController.php @@ -7,6 +7,7 @@ use App\Http\Requests\ImageUploadRequest; use App\Models\Actionlog; use App\Models\Asset; use App\Models\AssetModel; +use App\Models\CustomField; use App\Models\User; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\DB; @@ -486,11 +487,11 @@ class AssetModelsController extends Controller * @param array $defaultValues * @return void */ - private function assignCustomFieldsDefaultValues(AssetModel $model, array $defaultValues) + private function assignCustomFieldsDefaultValues(AssetModel $model, array $defaultValues): bool { $data = array(); foreach ($defaultValues as $customFieldId => $defaultValue) { - $customField = \App\Models\CustomField::find($customFieldId); + $customField = CustomField::find($customFieldId); $data[$customField->db_column] = $defaultValue; } diff --git a/app/Http/Controllers/Assets/AssetsController.php b/app/Http/Controllers/Assets/AssetsController.php index 0683a54e3..6054718e6 100755 --- a/app/Http/Controllers/Assets/AssetsController.php +++ b/app/Http/Controllers/Assets/AssetsController.php @@ -102,6 +102,10 @@ class AssetsController extends Controller { $this->authorize(Asset::class); + // There are a lot more rules to add here but prevents + // errors around `asset_tags` not being present below. + $this->validate($request, ['asset_tags' => ['required', 'array']]); + // Handle asset tags - there could be one, or potentially many. // This is only necessary on create, not update, since bulk editing is handled // differently diff --git a/app/Http/Controllers/CustomFieldsController.php b/app/Http/Controllers/CustomFieldsController.php index ffe5eceec..23ea9da34 100644 --- a/app/Http/Controllers/CustomFieldsController.php +++ b/app/Http/Controllers/CustomFieldsController.php @@ -260,7 +260,7 @@ class CustomFieldsController extends Controller $field->name = trim(e($request->get("name"))); $field->element = e($request->get("element")); - $field->field_values = e($request->get("field_values")); + $field->field_values = $request->get("field_values"); $field->user_id = Auth::id(); $field->help_text = $request->get("help_text"); $field->show_in_email = $show_in_email; diff --git a/app/Http/Controllers/SettingsController.php b/app/Http/Controllers/SettingsController.php index b1cb620a8..dbb6f6622 100755 --- a/app/Http/Controllers/SettingsController.php +++ b/app/Http/Controllers/SettingsController.php @@ -20,6 +20,7 @@ use DB; use enshrined\svgSanitize\Sanitizer; use Illuminate\Http\Request; use Illuminate\Support\Facades\Storage; +use Illuminate\Validation\Rule; use Image; use Input; use Redirect; @@ -499,6 +500,19 @@ class SettingsController extends Controller */ public function postSecurity(Request $request) { + $this->validate($request, [ + 'pwd_secure_complexity' => 'array', + 'pwd_secure_complexity.*' => [ + Rule::in([ + 'disallow_same_pwd_as_user_fields', + 'letters', + 'numbers', + 'symbols', + 'case_diff', + ]) + ] + ]); + if (is_null($setting = Setting::getSettings())) { return redirect()->to('admin')->with('error', trans('admin/settings/message.update.error')); } diff --git a/app/Http/Requests/StoreAssetRequest.php b/app/Http/Requests/StoreAssetRequest.php index 74988b6c6..8e7559673 100644 --- a/app/Http/Requests/StoreAssetRequest.php +++ b/app/Http/Requests/StoreAssetRequest.php @@ -4,6 +4,8 @@ namespace App\Http\Requests; use App\Models\Asset; use App\Models\Company; +use Carbon\Carbon; +use Carbon\Exceptions\InvalidFormatException; use Illuminate\Support\Facades\Gate; class StoreAssetRequest extends ImageUploadRequest @@ -27,6 +29,8 @@ class StoreAssetRequest extends ImageUploadRequest ? Company::getIdForCurrentUser($this->company_id) : $this->company_id; + $this->parseLastAuditDate(); + $this->merge([ 'asset_tag' => $this->asset_tag ?? Asset::autoincrement_asset(), 'company_id' => $idForCurrentUser, @@ -48,4 +52,21 @@ class StoreAssetRequest extends ImageUploadRequest return $rules; } + + private function parseLastAuditDate(): void + { + if ($this->input('last_audit_date')) { + try { + $lastAuditDate = Carbon::parse($this->input('last_audit_date')); + + $this->merge([ + 'last_audit_date' => $lastAuditDate->startOfDay()->format('Y-m-d H:i:s'), + ]); + } catch (InvalidFormatException $e) { + // we don't need to do anything here... + // we'll keep the provided date in an + // invalid format so validation picks it up later + } + } + } } diff --git a/app/Models/Asset.php b/app/Models/Asset.php index 112c79aee..f9c9ce15e 100644 --- a/app/Models/Asset.php +++ b/app/Models/Asset.php @@ -90,27 +90,29 @@ class Asset extends Depreciable ]; protected $rules = [ - 'model_id' => 'required|integer|exists:models,id,deleted_at,NULL|not_array', - 'status_id' => 'required|integer|exists:status_labels,id', - 'asset_tag' => 'required|min:1|max:255|unique_undeleted:assets,asset_tag|not_array', - 'name' => 'nullable|max:255', - 'company_id' => 'nullable|integer|exists:companies,id', - 'warranty_months' => 'nullable|numeric|digits_between:0,240', - 'last_checkout' => 'nullable|date_format:Y-m-d H:i:s', + 'model_id' => 'required|integer|exists:models,id,deleted_at,NULL|not_array', + 'status_id' => 'required|integer|exists:status_labels,id', + 'asset_tag' => 'required|min:1|max:255|unique_undeleted:assets,asset_tag|not_array', + 'name' => 'nullable|max:255', + 'company_id' => 'nullable|integer|exists:companies,id', + 'warranty_months' => 'nullable|numeric|digits_between:0,240', + 'last_checkout' => 'nullable|date_format:Y-m-d H:i:s', 'expected_checkin' => 'nullable|date', - 'location_id' => 'nullable|exists:locations,id', - 'rtd_location_id' => 'nullable|exists:locations,id', - 'purchase_date' => 'nullable|date|date_format:Y-m-d', - 'serial' => 'nullable|unique_undeleted:assets,serial', - 'purchase_cost' => 'nullable|numeric|gte:0', - 'supplier_id' => 'nullable|exists:suppliers,id', - 'asset_eol_date' => 'nullable|date', - 'eol_explicit' => 'nullable|boolean', - 'byod' => 'nullable|boolean', - 'order_number' => 'nullable|string|max:191', - 'notes' => 'nullable|string|max:65535', - 'assigned_to' => 'nullable|integer', - 'requestable' => 'nullable|boolean', + 'last_audit_date' => 'nullable|date_format:Y-m-d H:i:s', + 'next_audit_date' => 'nullable|date|after:last_audit_date', + 'location_id' => 'nullable|exists:locations,id', + 'rtd_location_id' => 'nullable|exists:locations,id', + 'purchase_date' => 'nullable|date|date_format:Y-m-d', + 'serial' => 'nullable|unique_undeleted:assets,serial', + 'purchase_cost' => 'nullable|numeric|gte:0', + 'supplier_id' => 'nullable|exists:suppliers,id', + 'asset_eol_date' => 'nullable|date', + 'eol_explicit' => 'nullable|boolean', + 'byod' => 'nullable|boolean', + 'order_number' => 'nullable|string|max:191', + 'notes' => 'nullable|string|max:65535', + 'assigned_to' => 'nullable|integer', + 'requestable' => 'nullable|boolean', ]; /** diff --git a/app/Models/CustomFieldset.php b/app/Models/CustomFieldset.php index a62f96d63..71be28e8a 100644 --- a/app/Models/CustomFieldset.php +++ b/app/Models/CustomFieldset.php @@ -5,6 +5,8 @@ namespace App\Models; use Gate; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; +use Illuminate\Support\Facades\Log; +use Illuminate\Validation\Rule; use Watson\Validating\ValidatingTrait; class CustomFieldset extends Model @@ -92,8 +94,19 @@ class CustomFieldset extends Model array_push($rule, $field->attributes['format']); $rules[$field->db_column_name()] = $rule; - //add not_array to rules for all fields - $rules[$field->db_column_name()][] = 'not_array'; + + // add not_array to rules for all fields but checkboxes + if ($field->element != 'checkbox') { + $rules[$field->db_column_name()][] = 'not_array'; + } + + if ($field->element == 'checkbox') { + $rules[$field->db_column_name()][] = 'checkboxes'; + } + + if ($field->element == 'radio') { + $rules[$field->db_column_name()][] = 'radio_buttons'; + } } return $rules; diff --git a/app/Models/Labels/Tapes/Dymo/LabelWriter_1933081.php b/app/Models/Labels/Tapes/Dymo/LabelWriter_1933081.php new file mode 100644 index 000000000..9b56012f7 --- /dev/null +++ b/app/Models/Labels/Tapes/Dymo/LabelWriter_1933081.php @@ -0,0 +1,89 @@ +getPrintableArea(); + + $currentX = $pa->x1; + $currentY = $pa->y1; + $usableWidth = $pa->w; + + $barcodeSize = $pa->h - self::TAG_SIZE; + + if ($record->has('barcode2d')) { + static::writeText( + $pdf, $record->get('tag'), + $pa->x1, $pa->y2 - self::TAG_SIZE, + 'freesans', 'b', self::TAG_SIZE, 'C', + $barcodeSize, self::TAG_SIZE, true, 0 + ); + static::write2DBarcode( + $pdf, $record->get('barcode2d')->content, $record->get('barcode2d')->type, + $currentX, $currentY, + $barcodeSize, $barcodeSize + ); + $currentX += $barcodeSize + self::BARCODE_MARGIN; + $usableWidth -= $barcodeSize + self::BARCODE_MARGIN; + } else { + static::writeText( + $pdf, $record->get('tag'), + $pa->x1, $pa->y2 - self::TAG_SIZE, + 'freesans', 'b', self::TAG_SIZE, 'R', + $usableWidth, self::TAG_SIZE, true, 0 + ); + } + + if ($record->has('title')) { + static::writeText( + $pdf, $record->get('title'), + $currentX, $currentY, + 'freesans', 'b', self::TITLE_SIZE, 'L', + $usableWidth, self::TITLE_SIZE, true, 0 + ); + $currentY += self::TITLE_SIZE + self::TITLE_MARGIN; + } + + foreach ($record->get('fields') as $field) { + static::writeText( + $pdf, (($field['label']) ? $field['label'].' ' : '') . $field['value'], + $currentX, $currentY, + 'freesans', '', self::FIELD_SIZE, 'L', + $usableWidth, self::FIELD_SIZE, true, 0, 0.3 + ); + $currentY += self::FIELD_SIZE + self::FIELD_MARGIN; + } + + if ($record->has('barcode1d')) { + static::write1DBarcode( + $pdf, $record->get('barcode1d')->content, $record->get('barcode1d')->type, + $currentX, $barcodeSize + self::BARCODE_MARGIN, $usableWidth - self::TAG_SIZE, self::TAG_SIZE + ); + } + } + +} diff --git a/app/Models/Labels/Tapes/Dymo/LabelWriter_2112283.php b/app/Models/Labels/Tapes/Dymo/LabelWriter_2112283.php new file mode 100644 index 000000000..e1305bd06 --- /dev/null +++ b/app/Models/Labels/Tapes/Dymo/LabelWriter_2112283.php @@ -0,0 +1,89 @@ +getPrintableArea(); + + $currentX = $pa->x1; + $currentY = $pa->y1; + $usableWidth = $pa->w; + + $barcodeSize = $pa->h - self::TAG_SIZE; + + if ($record->has('barcode2d')) { + static::writeText( + $pdf, $record->get('tag'), + $pa->x1, $pa->y2 - self::TAG_SIZE, + 'freesans', 'b', self::TAG_SIZE, 'C', + $barcodeSize, self::TAG_SIZE, true, 0 + ); + static::write2DBarcode( + $pdf, $record->get('barcode2d')->content, $record->get('barcode2d')->type, + $currentX, $currentY, + $barcodeSize, $barcodeSize + ); + $currentX += $barcodeSize + self::BARCODE_MARGIN; + $usableWidth -= $barcodeSize + self::BARCODE_MARGIN; + } else { + static::writeText( + $pdf, $record->get('tag'), + $pa->x1, $pa->y2 - self::TAG_SIZE, + 'freesans', 'b', self::TAG_SIZE, 'R', + $usableWidth, self::TAG_SIZE, true, 0 + ); + } + + if ($record->has('title')) { + static::writeText( + $pdf, $record->get('title'), + $currentX, $currentY, + 'freesans', 'b', self::TITLE_SIZE, 'L', + $usableWidth, self::TITLE_SIZE, true, 0 + ); + $currentY += self::TITLE_SIZE + self::TITLE_MARGIN; + } + + foreach ($record->get('fields') as $field) { + static::writeText( + $pdf, (($field['label']) ? $field['label'].' ' : '') . $field['value'], + $currentX, $currentY, + 'freesans', '', self::FIELD_SIZE, 'L', + $usableWidth, self::FIELD_SIZE, true, 0, 0.3 + ); + $currentY += self::FIELD_SIZE + self::FIELD_MARGIN; + } + + if ($record->has('barcode1d')) { + static::write1DBarcode( + $pdf, $record->get('barcode1d')->content, $record->get('barcode1d')->type, + $currentX, $barcodeSize + self::BARCODE_MARGIN, $usableWidth - self::TAG_SIZE, self::TAG_SIZE + ); + } + } + +} diff --git a/app/Presenters/AccessoryPresenter.php b/app/Presenters/AccessoryPresenter.php index cc4f9badf..fd6122cab 100644 --- a/app/Presenters/AccessoryPresenter.php +++ b/app/Presenters/AccessoryPresenter.php @@ -41,6 +41,7 @@ class AccessoryPresenter extends Presenter 'field' => 'name', 'searchable' => true, 'sortable' => true, + 'switchable' => false, 'title' => trans('general.name'), 'formatter' => 'accessoriesLinkFormatter', ], [ diff --git a/app/Presenters/ActionlogPresenter.php b/app/Presenters/ActionlogPresenter.php index ddff10864..2794b6c5f 100644 --- a/app/Presenters/ActionlogPresenter.php +++ b/app/Presenters/ActionlogPresenter.php @@ -38,10 +38,14 @@ class ActionlogPresenter extends Presenter public function icon() { - + // User related icons if ($this->itemType() == 'user') { + if ($this->actionType()=='2fa reset') { + return 'fa-solid fa-mobile-screen'; + } + if ($this->actionType()=='create new') { return 'fa-solid fa-user-plus'; } @@ -61,6 +65,7 @@ class ActionlogPresenter extends Presenter if ($this->actionType()=='update') { return 'fa-solid fa-user-pen'; } + return 'fa-solid fa-user'; } diff --git a/app/Presenters/AssetMaintenancesPresenter.php b/app/Presenters/AssetMaintenancesPresenter.php index 5f9694b44..3908720dc 100644 --- a/app/Presenters/AssetMaintenancesPresenter.php +++ b/app/Presenters/AssetMaintenancesPresenter.php @@ -85,6 +85,7 @@ class AssetMaintenancesPresenter extends Presenter 'field' => 'title', 'searchable' => true, 'sortable' => true, + 'switchable' => false, 'title' => trans('admin/asset_maintenances/form.title'), ], [ 'field' => 'start_date', diff --git a/app/Presenters/AssetModelPresenter.php b/app/Presenters/AssetModelPresenter.php index 85a0fa58e..da93092b9 100644 --- a/app/Presenters/AssetModelPresenter.php +++ b/app/Presenters/AssetModelPresenter.php @@ -35,6 +35,7 @@ class AssetModelPresenter extends Presenter 'field' => 'name', 'searchable' => true, 'sortable' => true, + 'switchable' => false, 'visible' => true, 'title' => trans('general.name'), 'formatter' => 'modelsLinkFormatter', diff --git a/app/Presenters/AssetPresenter.php b/app/Presenters/AssetPresenter.php index dd88b07fd..5f900a6a8 100644 --- a/app/Presenters/AssetPresenter.php +++ b/app/Presenters/AssetPresenter.php @@ -55,6 +55,7 @@ class AssetPresenter extends Presenter 'field' => 'asset_tag', 'searchable' => true, 'sortable' => true, + 'switchable' => false, 'title' => trans('admin/hardware/table.asset_tag'), 'visible' => true, 'formatter' => 'hardwareLinkFormatter', @@ -316,7 +317,7 @@ class AssetPresenter extends Presenter 'field' => 'checkincheckout', 'searchable' => false, 'sortable' => false, - 'switchable' => true, + 'switchable' => false, 'title' => trans('general.checkin').'/'.trans('general.checkout'), 'visible' => true, 'formatter' => 'hardwareInOutFormatter', diff --git a/app/Presenters/CategoryPresenter.php b/app/Presenters/CategoryPresenter.php index e9276a341..fbf431637 100644 --- a/app/Presenters/CategoryPresenter.php +++ b/app/Presenters/CategoryPresenter.php @@ -25,6 +25,7 @@ class CategoryPresenter extends Presenter 'field' => 'name', 'searchable' => true, 'sortable' => true, + 'switchable' => false, 'title' => trans('general.name'), 'visible' => true, 'formatter' => 'categoriesLinkFormatter', diff --git a/app/Presenters/CompanyPresenter.php b/app/Presenters/CompanyPresenter.php index ec2e7cfc5..7603191fc 100644 --- a/app/Presenters/CompanyPresenter.php +++ b/app/Presenters/CompanyPresenter.php @@ -25,7 +25,7 @@ class CompanyPresenter extends Presenter 'field' => 'name', 'searchable' => true, 'sortable' => true, - 'switchable' => true, + 'switchable' => false, 'title' => trans('admin/companies/table.name'), 'visible' => true, 'formatter' => 'companiesLinkFormatter', diff --git a/app/Presenters/ComponentPresenter.php b/app/Presenters/ComponentPresenter.php index c7468911a..d142d7abc 100644 --- a/app/Presenters/ComponentPresenter.php +++ b/app/Presenters/ComponentPresenter.php @@ -126,7 +126,7 @@ class ComponentPresenter extends Presenter 'field' => 'checkincheckout', 'searchable' => false, 'sortable' => false, - 'switchable' => true, + 'switchable' => false, 'title' => trans('general.checkin').'/'.trans('general.checkout'), 'visible' => true, 'formatter' => 'componentsInOutFormatter', diff --git a/app/Presenters/ConsumablePresenter.php b/app/Presenters/ConsumablePresenter.php index abb599de4..d3e73de1c 100644 --- a/app/Presenters/ConsumablePresenter.php +++ b/app/Presenters/ConsumablePresenter.php @@ -35,6 +35,7 @@ class ConsumablePresenter extends Presenter 'field' => 'name', 'searchable' => true, 'sortable' => true, + 'switchable' => false, 'title' => trans('general.name'), 'visible' => true, 'formatter' => 'consumablesLinkFormatter', diff --git a/app/Presenters/DepreciationPresenter.php b/app/Presenters/DepreciationPresenter.php index 2a293a46f..9df1fe132 100644 --- a/app/Presenters/DepreciationPresenter.php +++ b/app/Presenters/DepreciationPresenter.php @@ -25,6 +25,7 @@ class DepreciationPresenter extends Presenter 'field' => 'name', 'searchable' => true, 'sortable' => true, + 'switchable' => false, 'title' => trans('general.name'), 'visible' => true, 'formatter' => 'depreciationsLinkFormatter', diff --git a/app/Presenters/DepreciationReportPresenter.php b/app/Presenters/DepreciationReportPresenter.php index ea8834237..50a8b73b5 100644 --- a/app/Presenters/DepreciationReportPresenter.php +++ b/app/Presenters/DepreciationReportPresenter.php @@ -34,6 +34,7 @@ class DepreciationReportPresenter extends Presenter "field" => "name", "searchable" => true, "sortable" => true, + 'switchable' => false, "title" => trans('admin/hardware/form.name'), "visible" => false, ], [ diff --git a/app/Presenters/LicensePresenter.php b/app/Presenters/LicensePresenter.php index c5c898266..8ca8e120f 100644 --- a/app/Presenters/LicensePresenter.php +++ b/app/Presenters/LicensePresenter.php @@ -33,6 +33,7 @@ class LicensePresenter extends Presenter 'field' => 'name', 'searchable' => true, 'sortable' => true, + 'switchable' => false, 'title' => trans('general.name'), 'formatter' => 'licensesLinkFormatter', ], [ @@ -186,7 +187,7 @@ class LicensePresenter extends Presenter 'field' => 'checkincheckout', 'searchable' => false, 'sortable' => false, - 'switchable' => true, + 'switchable' => false, 'title' => trans('general.checkin').'/'.trans('general.checkout'), 'visible' => true, 'formatter' => 'licensesInOutFormatter', @@ -280,7 +281,7 @@ class LicensePresenter extends Presenter 'field' => 'checkincheckout', 'searchable' => false, 'sortable' => false, - 'switchable' => true, + 'switchable' => false, 'title' => trans('general.checkin').'/'.trans('general.checkout'), 'visible' => true, 'formatter' => 'licenseSeatInOutFormatter', diff --git a/app/Presenters/LocationPresenter.php b/app/Presenters/LocationPresenter.php index 6a9bc0b56..56d710ac9 100644 --- a/app/Presenters/LocationPresenter.php +++ b/app/Presenters/LocationPresenter.php @@ -31,6 +31,7 @@ class LocationPresenter extends Presenter 'field' => 'name', 'searchable' => true, 'sortable' => true, + 'switchable' => false, 'title' => trans('admin/locations/table.name'), 'visible' => true, 'formatter' => 'locationsLinkFormatter', diff --git a/app/Presenters/ManufacturerPresenter.php b/app/Presenters/ManufacturerPresenter.php index ad6b5443b..3e36cbcde 100644 --- a/app/Presenters/ManufacturerPresenter.php +++ b/app/Presenters/ManufacturerPresenter.php @@ -27,6 +27,7 @@ class ManufacturerPresenter extends Presenter 'field' => 'name', 'searchable' => true, 'sortable' => true, + 'switchable' => false, 'title' => trans('admin/manufacturers/table.name'), 'visible' => true, 'formatter' => 'manufacturersLinkFormatter', diff --git a/app/Presenters/UserPresenter.php b/app/Presenters/UserPresenter.php index 211057c54..4726205c7 100644 --- a/app/Presenters/UserPresenter.php +++ b/app/Presenters/UserPresenter.php @@ -38,7 +38,7 @@ class UserPresenter extends Presenter 'searchable' => false, 'sortable' => false, 'switchable' => true, - 'title' => 'Avatar', + 'title' => trans('general.importer.avatar'), 'visible' => false, 'formatter' => 'imageFormatter', ], @@ -175,7 +175,7 @@ class UserPresenter extends Presenter 'field' => 'username', 'searchable' => true, 'sortable' => true, - 'switchable' => true, + 'switchable' => false, 'title' => trans('admin/users/table.username'), 'visible' => true, 'formatter' => 'usersLinkFormatter', diff --git a/app/Providers/ValidationServiceProvider.php b/app/Providers/ValidationServiceProvider.php index bf9f5c55c..7b9c9902c 100644 --- a/app/Providers/ValidationServiceProvider.php +++ b/app/Providers/ValidationServiceProvider.php @@ -2,9 +2,12 @@ namespace App\Providers; +use App\Models\CustomField; use App\Models\Department; use App\Models\Setting; use DB; +use Illuminate\Support\Facades\Crypt; +use Illuminate\Support\Facades\Log; use Illuminate\Support\ServiceProvider; use Illuminate\Validation\Rule; use Validator; @@ -293,6 +296,39 @@ class ValidationServiceProvider extends ServiceProvider Validator::extend('not_array', function ($attribute, $value, $parameters, $validator) { return !is_array($value); }); + + // This is only used in Models/CustomFieldset.php - it does automatic validation for checkboxes by making sure + // that the submitted values actually exist in the options. + Validator::extend('checkboxes', function ($attribute, $value, $parameters, $validator){ + $field = CustomField::where('db_column', $attribute)->first(); + $options = $field->formatFieldValuesAsArray(); + + if(is_array($value)) { + $invalid = array_diff($value, $options); + if(count($invalid) > 0) { + return false; + } + } + + // for legacy, allows users to submit a comma separated string of options + elseif(!is_array($value)) { + $exploded = array_map('trim', explode(',', $value)); + $invalid = array_diff($exploded, $options); + if(count($invalid) > 0) { + return false; + } + } + + return true; + }); + + // Validates that a radio button option exists + Validator::extend('radio_buttons', function ($attribute, $value) { + $field = CustomField::where('db_column', $attribute)->first(); + $options = $field->formatFieldValuesAsArray(); + + return in_array($value, $options); + }); } /** diff --git a/config/session.php b/config/session.php index a47294a8c..5c6cb27a9 100644 --- a/config/session.php +++ b/config/session.php @@ -174,4 +174,17 @@ return [ 'bs_table_storage' => env('BS_TABLE_STORAGE', 'cookieStorage'), + + /* + |-------------------------------------------------------------------------- + | Bootstrap Table Enable Deeplinking + |-------------------------------------------------------------------------- + | + | Use deeplinks to directly link to search results, sorting, and pagination + | + | More info: https://github.com/generals-space/bootstrap-table-addrbar/blob/master/readme(EN).md + */ + + 'bs_table_addrbar' => env('BS_TABLE_DEEPLINK', true), + ]; diff --git a/config/version.php b/config/version.php index a1d26453d..4812c3368 100644 --- a/config/version.php +++ b/config/version.php @@ -1,10 +1,10 @@ 'v6.3.3', - 'full_app_version' => 'v6.3.3 - build 12903-g0f63fa23e', - 'build_version' => '12903', + 'full_app_version' => 'v6.3.3 - build 13056-gb34156ca2', + 'build_version' => '13056', 'prerelease_version' => '', - 'hash_version' => 'g0f63fa23e', - 'full_hash' => 'v6.3.3-67-g0f63fa23e', + 'hash_version' => 'gb34156ca2', + 'full_hash' => 'v6.3.3-151-gb34156ca2', 'branch' => 'develop', ); \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 3a81578e6..37902c1ff 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2379,9 +2379,9 @@ } }, "alpinejs": { - "version": "3.13.5", - "resolved": "https://registry.npmjs.org/alpinejs/-/alpinejs-3.13.5.tgz", - "integrity": "sha512-1d2XeNGN+Zn7j4mUAKXtAgdc4/rLeadyTMWeJGXF5DzwawPBxwTiBhFFm6w/Ei8eJxUZeyNWWSD9zknfdz1kEw==", + "version": "3.13.7", + "resolved": "https://registry.npmjs.org/alpinejs/-/alpinejs-3.13.7.tgz", + "integrity": "sha512-rcTyjTANbsePq1hb7eSekt3qjI94HLGeO6JaRjCssCVbIIc+qBrc7pO5S/+2JB6oojIibjM6FA+xRI3zhGPZIg==", "requires": { "@vue/reactivity": "~3.1.1" } diff --git a/package.json b/package.json index f02b78db0..fab86d9d2 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "acorn-import-assertions": "^1.9.0", "admin-lte": "^2.4.18", "ajv": "^6.12.6", - "alpinejs": "^3.13.5", + "alpinejs": "^3.13.6", "blueimp-file-upload": "^9.34.0", "bootstrap": "^3.4.1", "bootstrap-colorpicker": "^2.5.3", diff --git a/public/js/dist/all-defer.js b/public/js/dist/all-defer.js index 50470c93f..5d43f61e3 100644 --- a/public/js/dist/all-defer.js +++ b/public/js/dist/all-defer.js @@ -211,8 +211,8 @@ }); }); } - function destroyTree(root) { - walk(root, (el) => { + function destroyTree(root, walker = walk) { + walker(root, (el) => { cleanupAttributes(el); cleanupElement(el); }); @@ -413,7 +413,7 @@ if (name == Symbol.unscopables) return false; return objects.some( - (obj) => Object.prototype.hasOwnProperty.call(obj, name) + (obj) => Object.prototype.hasOwnProperty.call(obj, name) || Reflect.has(obj, name) ); }, get({ objects }, name, thisProxy) { @@ -421,7 +421,7 @@ return collapseProxies; return Reflect.get( objects.find( - (obj) => Object.prototype.hasOwnProperty.call(obj, name) + (obj) => Reflect.has(obj, name) ) || {}, name, thisProxy @@ -452,6 +452,8 @@ Object.entries(Object.getOwnPropertyDescriptors(obj)).forEach(([key, { value, enumerable }]) => { if (enumerable === false || value === void 0) return; + if (typeof value === "object" && value !== null && value.__v_skip) + return; let path = basePath === "" ? key : `${basePath}.${key}`; if (typeof value === "object" && value !== null && value._x_interceptor) { obj[key] = value.initialize(data2, path, key); @@ -1619,7 +1621,7 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el); get raw() { return raw; }, - version: "3.13.5", + version: "3.13.7", flushAndStopDeferringMutations, dontAutoEvaluateFunctions, disableEffectScheduling, @@ -2423,12 +2425,10 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el); }); function getArrayOfRefObject(el) { let refObjects = []; - let currentEl = el; - while (currentEl) { - if (currentEl._x_refs) - refObjects.push(currentEl._x_refs); - currentEl = currentEl.parentNode; - } + findClosest(el, (i) => { + if (i._x_refs) + refObjects.push(i._x_refs); + }); return refObjects; } @@ -3088,13 +3088,21 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el); if (isObject2(items)) { items = Object.entries(items).map(([key, value]) => { let scope2 = getIterationScopeVariables(iteratorNames, value, key, items); - evaluateKey((value2) => keys.push(value2), { scope: { index: key, ...scope2 } }); + evaluateKey((value2) => { + if (keys.includes(value2)) + warn("Duplicate key on x-for", el); + keys.push(value2); + }, { scope: { index: key, ...scope2 } }); scopes.push(scope2); }); } else { for (let i = 0; i < items.length; i++) { let scope2 = getIterationScopeVariables(iteratorNames, items[i], i, items); - evaluateKey((value) => keys.push(value), { scope: { index: i, ...scope2 } }); + evaluateKey((value) => { + if (keys.includes(value)) + warn("Duplicate key on x-for", el); + keys.push(value); + }, { scope: { index: i, ...scope2 } }); scopes.push(scope2); } } @@ -3142,7 +3150,7 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el); let marker = document.createElement("div"); mutateDom(() => { if (!elForSpot) - warn(`x-for ":key" is undefined or invalid`, templateEl); + warn(`x-for ":key" is undefined or invalid`, templateEl, keyForSpot, lookup); elForSpot.after(marker); elInSpot.after(elForSpot); elForSpot._x_currentIfEl && elForSpot.after(elForSpot._x_currentIfEl); @@ -3169,7 +3177,7 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el); }; mutateDom(() => { lastEl.after(clone2); - initTree(clone2); + skipDuringClone(() => initTree(clone2))(); }); if (typeof key === "object") { warn("x-for key cannot be an object, it must be a string or an integer", templateEl); @@ -3253,7 +3261,7 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el); addScopeToNode(clone2, {}, el); mutateDom(() => { el.after(clone2); - initTree(clone2); + skipDuringClone(() => initTree(clone2))(); }); el._x_currentIfEl = clone2; el._x_undoIf = () => { diff --git a/public/js/dist/bootstrap-table.js b/public/js/dist/bootstrap-table.js index 7d45dced5..69d67d52e 100644 --- a/public/js/dist/bootstrap-table.js +++ b/public/js/dist/bootstrap-table.js @@ -8941,2137 +8941,6 @@ })); -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery')) : - typeof define === 'function' && define.amd ? define(['jquery'], factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.jQuery)); -})(this, (function ($$6) { 'use strict'; - - function _iterableToArrayLimit(arr, i) { - var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; - if (null != _i) { - var _s, - _e, - _x, - _r, - _arr = [], - _n = !0, - _d = !1; - try { - if (_x = (_i = _i.call(arr)).next, 0 === i) { - if (Object(_i) !== _i) return; - _n = !1; - } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); - } catch (err) { - _d = !0, _e = err; - } finally { - try { - if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; - } finally { - if (_d) throw _e; - } - } - return _arr; - } - } - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - function _defineProperties(target, props) { - for (var i = 0; i < props.length; i++) { - var descriptor = props[i]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if ("value" in descriptor) descriptor.writable = true; - Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); - } - } - function _createClass(Constructor, protoProps, staticProps) { - if (protoProps) _defineProperties(Constructor.prototype, protoProps); - if (staticProps) _defineProperties(Constructor, staticProps); - Object.defineProperty(Constructor, "prototype", { - writable: false - }); - return Constructor; - } - function _inherits(subClass, superClass) { - if (typeof superClass !== "function" && superClass !== null) { - throw new TypeError("Super expression must either be null or a function"); - } - subClass.prototype = Object.create(superClass && superClass.prototype, { - constructor: { - value: subClass, - writable: true, - configurable: true - } - }); - Object.defineProperty(subClass, "prototype", { - writable: false - }); - if (superClass) _setPrototypeOf(subClass, superClass); - } - function _getPrototypeOf(o) { - _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { - return o.__proto__ || Object.getPrototypeOf(o); - }; - return _getPrototypeOf(o); - } - function _setPrototypeOf(o, p) { - _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { - o.__proto__ = p; - return o; - }; - return _setPrototypeOf(o, p); - } - function _isNativeReflectConstruct() { - if (typeof Reflect === "undefined" || !Reflect.construct) return false; - if (Reflect.construct.sham) return false; - if (typeof Proxy === "function") return true; - try { - Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - return true; - } catch (e) { - return false; - } - } - function _assertThisInitialized(self) { - if (self === void 0) { - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - } - return self; - } - function _possibleConstructorReturn(self, call) { - if (call && (typeof call === "object" || typeof call === "function")) { - return call; - } else if (call !== void 0) { - throw new TypeError("Derived constructors may only return object or undefined"); - } - return _assertThisInitialized(self); - } - function _createSuper(Derived) { - var hasNativeReflectConstruct = _isNativeReflectConstruct(); - return function _createSuperInternal() { - var Super = _getPrototypeOf(Derived), - result; - if (hasNativeReflectConstruct) { - var NewTarget = _getPrototypeOf(this).constructor; - result = Reflect.construct(Super, arguments, NewTarget); - } else { - result = Super.apply(this, arguments); - } - return _possibleConstructorReturn(this, result); - }; - } - function _superPropBase(object, property) { - while (!Object.prototype.hasOwnProperty.call(object, property)) { - object = _getPrototypeOf(object); - if (object === null) break; - } - return object; - } - function _get() { - if (typeof Reflect !== "undefined" && Reflect.get) { - _get = Reflect.get.bind(); - } else { - _get = function _get(target, property, receiver) { - var base = _superPropBase(target, property); - if (!base) return; - var desc = Object.getOwnPropertyDescriptor(base, property); - if (desc.get) { - return desc.get.call(arguments.length < 3 ? target : receiver); - } - return desc.value; - }; - } - return _get.apply(this, arguments); - } - function _slicedToArray(arr, i) { - return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); - } - function _arrayWithHoles(arr) { - if (Array.isArray(arr)) return arr; - } - function _unsupportedIterableToArray(o, minLen) { - if (!o) return; - if (typeof o === "string") return _arrayLikeToArray(o, minLen); - var n = Object.prototype.toString.call(o).slice(8, -1); - if (n === "Object" && o.constructor) n = o.constructor.name; - if (n === "Map" || n === "Set") return Array.from(o); - if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); - } - function _arrayLikeToArray(arr, len) { - if (len == null || len > arr.length) len = arr.length; - for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; - return arr2; - } - function _nonIterableRest() { - throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - } - function _toPrimitive(input, hint) { - if (typeof input !== "object" || input === null) return input; - var prim = input[Symbol.toPrimitive]; - if (prim !== undefined) { - var res = prim.call(input, hint || "default"); - if (typeof res !== "object") return res; - throw new TypeError("@@toPrimitive must return a primitive value."); - } - return (hint === "string" ? String : Number)(input); - } - function _toPropertyKey(arg) { - var key = _toPrimitive(arg, "string"); - return typeof key === "symbol" ? key : String(key); - } - - var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; - - var check = function (it) { - return it && it.Math == Math && it; - }; - - // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 - var global$b = - // eslint-disable-next-line es/no-global-this -- safe - check(typeof globalThis == 'object' && globalThis) || - check(typeof window == 'object' && window) || - // eslint-disable-next-line no-restricted-globals -- safe - check(typeof self == 'object' && self) || - check(typeof commonjsGlobal == 'object' && commonjsGlobal) || - // eslint-disable-next-line no-new-func -- fallback - (function () { return this; })() || Function('return this')(); - - var objectGetOwnPropertyDescriptor = {}; - - var fails$d = function (exec) { - try { - return !!exec(); - } catch (error) { - return true; - } - }; - - var fails$c = fails$d; - - // Detect IE8's incomplete defineProperty implementation - var descriptors = !fails$c(function () { - // eslint-disable-next-line es/no-object-defineproperty -- required for testing - return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7; - }); - - var fails$b = fails$d; - - var functionBindNative = !fails$b(function () { - // eslint-disable-next-line es/no-function-prototype-bind -- safe - var test = (function () { /* empty */ }).bind(); - // eslint-disable-next-line no-prototype-builtins -- safe - return typeof test != 'function' || test.hasOwnProperty('prototype'); - }); - - var NATIVE_BIND$2 = functionBindNative; - - var call$5 = Function.prototype.call; - - var functionCall = NATIVE_BIND$2 ? call$5.bind(call$5) : function () { - return call$5.apply(call$5, arguments); - }; - - var objectPropertyIsEnumerable = {}; - - var $propertyIsEnumerable$1 = {}.propertyIsEnumerable; - // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe - var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor; - - // Nashorn ~ JDK8 bug - var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable$1.call({ 1: 2 }, 1); - - // `Object.prototype.propertyIsEnumerable` method implementation - // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable - objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) { - var descriptor = getOwnPropertyDescriptor$1(this, V); - return !!descriptor && descriptor.enumerable; - } : $propertyIsEnumerable$1; - - var createPropertyDescriptor$3 = function (bitmap, value) { - return { - enumerable: !(bitmap & 1), - configurable: !(bitmap & 2), - writable: !(bitmap & 4), - value: value - }; - }; - - var NATIVE_BIND$1 = functionBindNative; - - var FunctionPrototype$1 = Function.prototype; - var call$4 = FunctionPrototype$1.call; - var uncurryThisWithBind = NATIVE_BIND$1 && FunctionPrototype$1.bind.bind(call$4, call$4); - - var functionUncurryThis = NATIVE_BIND$1 ? uncurryThisWithBind : function (fn) { - return function () { - return call$4.apply(fn, arguments); - }; - }; - - var uncurryThis$g = functionUncurryThis; - - var toString$5 = uncurryThis$g({}.toString); - var stringSlice$1 = uncurryThis$g(''.slice); - - var classofRaw$2 = function (it) { - return stringSlice$1(toString$5(it), 8, -1); - }; - - var uncurryThis$f = functionUncurryThis; - var fails$a = fails$d; - var classof$5 = classofRaw$2; - - var $Object$3 = Object; - var split = uncurryThis$f(''.split); - - // fallback for non-array-like ES3 and non-enumerable old V8 strings - var indexedObject = fails$a(function () { - // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346 - // eslint-disable-next-line no-prototype-builtins -- safe - return !$Object$3('z').propertyIsEnumerable(0); - }) ? function (it) { - return classof$5(it) == 'String' ? split(it, '') : $Object$3(it); - } : $Object$3; - - // we can't use just `it == null` since of `document.all` special case - // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec - var isNullOrUndefined$2 = function (it) { - return it === null || it === undefined; - }; - - var isNullOrUndefined$1 = isNullOrUndefined$2; - - var $TypeError$6 = TypeError; - - // `RequireObjectCoercible` abstract operation - // https://tc39.es/ecma262/#sec-requireobjectcoercible - var requireObjectCoercible$3 = function (it) { - if (isNullOrUndefined$1(it)) throw $TypeError$6("Can't call method on " + it); - return it; - }; - - // toObject with fallback for non-array-like ES3 strings - var IndexedObject$2 = indexedObject; - var requireObjectCoercible$2 = requireObjectCoercible$3; - - var toIndexedObject$5 = function (it) { - return IndexedObject$2(requireObjectCoercible$2(it)); - }; - - var documentAll$2 = typeof document == 'object' && document.all; - - // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot - // eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing - var IS_HTMLDDA = typeof documentAll$2 == 'undefined' && documentAll$2 !== undefined; - - var documentAll_1 = { - all: documentAll$2, - IS_HTMLDDA: IS_HTMLDDA - }; - - var $documentAll$1 = documentAll_1; - - var documentAll$1 = $documentAll$1.all; - - // `IsCallable` abstract operation - // https://tc39.es/ecma262/#sec-iscallable - var isCallable$c = $documentAll$1.IS_HTMLDDA ? function (argument) { - return typeof argument == 'function' || argument === documentAll$1; - } : function (argument) { - return typeof argument == 'function'; - }; - - var isCallable$b = isCallable$c; - var $documentAll = documentAll_1; - - var documentAll = $documentAll.all; - - var isObject$7 = $documentAll.IS_HTMLDDA ? function (it) { - return typeof it == 'object' ? it !== null : isCallable$b(it) || it === documentAll; - } : function (it) { - return typeof it == 'object' ? it !== null : isCallable$b(it); - }; - - var global$a = global$b; - var isCallable$a = isCallable$c; - - var aFunction = function (argument) { - return isCallable$a(argument) ? argument : undefined; - }; - - var getBuiltIn$4 = function (namespace, method) { - return arguments.length < 2 ? aFunction(global$a[namespace]) : global$a[namespace] && global$a[namespace][method]; - }; - - var uncurryThis$e = functionUncurryThis; - - var objectIsPrototypeOf = uncurryThis$e({}.isPrototypeOf); - - var engineUserAgent = typeof navigator != 'undefined' && String(navigator.userAgent) || ''; - - var global$9 = global$b; - var userAgent = engineUserAgent; - - var process = global$9.process; - var Deno = global$9.Deno; - var versions = process && process.versions || Deno && Deno.version; - var v8 = versions && versions.v8; - var match, version; - - if (v8) { - match = v8.split('.'); - // in old Chrome, versions of V8 isn't V8 = Chrome / 10 - // but their correct versions are not interesting for us - version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]); - } - - // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0` - // so check `userAgent` even if `.v8` exists, but 0 - if (!version && userAgent) { - match = userAgent.match(/Edge\/(\d+)/); - if (!match || match[1] >= 74) { - match = userAgent.match(/Chrome\/(\d+)/); - if (match) version = +match[1]; - } - } - - var engineV8Version = version; - - /* eslint-disable es/no-symbol -- required for testing */ - - var V8_VERSION$2 = engineV8Version; - var fails$9 = fails$d; - - // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing - var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$9(function () { - var symbol = Symbol(); - // Chrome 38 Symbol has incorrect toString conversion - // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances - return !String(symbol) || !(Object(symbol) instanceof Symbol) || - // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances - !Symbol.sham && V8_VERSION$2 && V8_VERSION$2 < 41; - }); - - /* eslint-disable es/no-symbol -- required for testing */ - - var NATIVE_SYMBOL$1 = symbolConstructorDetection; - - var useSymbolAsUid = NATIVE_SYMBOL$1 - && !Symbol.sham - && typeof Symbol.iterator == 'symbol'; - - var getBuiltIn$3 = getBuiltIn$4; - var isCallable$9 = isCallable$c; - var isPrototypeOf = objectIsPrototypeOf; - var USE_SYMBOL_AS_UID$1 = useSymbolAsUid; - - var $Object$2 = Object; - - var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) { - return typeof it == 'symbol'; - } : function (it) { - var $Symbol = getBuiltIn$3('Symbol'); - return isCallable$9($Symbol) && isPrototypeOf($Symbol.prototype, $Object$2(it)); - }; - - var $String$3 = String; - - var tryToString$1 = function (argument) { - try { - return $String$3(argument); - } catch (error) { - return 'Object'; - } - }; - - var isCallable$8 = isCallable$c; - var tryToString = tryToString$1; - - var $TypeError$5 = TypeError; - - // `Assert: IsCallable(argument) is true` - var aCallable$2 = function (argument) { - if (isCallable$8(argument)) return argument; - throw $TypeError$5(tryToString(argument) + ' is not a function'); - }; - - var aCallable$1 = aCallable$2; - var isNullOrUndefined = isNullOrUndefined$2; - - // `GetMethod` abstract operation - // https://tc39.es/ecma262/#sec-getmethod - var getMethod$1 = function (V, P) { - var func = V[P]; - return isNullOrUndefined(func) ? undefined : aCallable$1(func); - }; - - var call$3 = functionCall; - var isCallable$7 = isCallable$c; - var isObject$6 = isObject$7; - - var $TypeError$4 = TypeError; - - // `OrdinaryToPrimitive` abstract operation - // https://tc39.es/ecma262/#sec-ordinarytoprimitive - var ordinaryToPrimitive$1 = function (input, pref) { - var fn, val; - if (pref === 'string' && isCallable$7(fn = input.toString) && !isObject$6(val = call$3(fn, input))) return val; - if (isCallable$7(fn = input.valueOf) && !isObject$6(val = call$3(fn, input))) return val; - if (pref !== 'string' && isCallable$7(fn = input.toString) && !isObject$6(val = call$3(fn, input))) return val; - throw $TypeError$4("Can't convert object to primitive value"); - }; - - var sharedExports = {}; - var shared$3 = { - get exports(){ return sharedExports; }, - set exports(v){ sharedExports = v; }, - }; - - var global$8 = global$b; - - // eslint-disable-next-line es/no-object-defineproperty -- safe - var defineProperty$3 = Object.defineProperty; - - var defineGlobalProperty$3 = function (key, value) { - try { - defineProperty$3(global$8, key, { value: value, configurable: true, writable: true }); - } catch (error) { - global$8[key] = value; - } return value; - }; - - var global$7 = global$b; - var defineGlobalProperty$2 = defineGlobalProperty$3; - - var SHARED = '__core-js_shared__'; - var store$3 = global$7[SHARED] || defineGlobalProperty$2(SHARED, {}); - - var sharedStore = store$3; - - var store$2 = sharedStore; - - (shared$3.exports = function (key, value) { - return store$2[key] || (store$2[key] = value !== undefined ? value : {}); - })('versions', []).push({ - version: '3.29.0', - mode: 'global', - copyright: '© 2014-2023 Denis Pushkarev (zloirock.ru)', - license: 'https://github.com/zloirock/core-js/blob/v3.29.0/LICENSE', - source: 'https://github.com/zloirock/core-js' - }); - - var requireObjectCoercible$1 = requireObjectCoercible$3; - - var $Object$1 = Object; - - // `ToObject` abstract operation - // https://tc39.es/ecma262/#sec-toobject - var toObject$4 = function (argument) { - return $Object$1(requireObjectCoercible$1(argument)); - }; - - var uncurryThis$d = functionUncurryThis; - var toObject$3 = toObject$4; - - var hasOwnProperty = uncurryThis$d({}.hasOwnProperty); - - // `HasOwnProperty` abstract operation - // https://tc39.es/ecma262/#sec-hasownproperty - // eslint-disable-next-line es/no-object-hasown -- safe - var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) { - return hasOwnProperty(toObject$3(it), key); - }; - - var uncurryThis$c = functionUncurryThis; - - var id = 0; - var postfix = Math.random(); - var toString$4 = uncurryThis$c(1.0.toString); - - var uid$2 = function (key) { - return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$4(++id + postfix, 36); - }; - - var global$6 = global$b; - var shared$2 = sharedExports; - var hasOwn$6 = hasOwnProperty_1; - var uid$1 = uid$2; - var NATIVE_SYMBOL = symbolConstructorDetection; - var USE_SYMBOL_AS_UID = useSymbolAsUid; - - var Symbol$2 = global$6.Symbol; - var WellKnownSymbolsStore = shared$2('wks'); - var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$2['for'] || Symbol$2 : Symbol$2 && Symbol$2.withoutSetter || uid$1; - - var wellKnownSymbol$7 = function (name) { - if (!hasOwn$6(WellKnownSymbolsStore, name)) { - WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn$6(Symbol$2, name) - ? Symbol$2[name] - : createWellKnownSymbol('Symbol.' + name); - } return WellKnownSymbolsStore[name]; - }; - - var call$2 = functionCall; - var isObject$5 = isObject$7; - var isSymbol$1 = isSymbol$2; - var getMethod = getMethod$1; - var ordinaryToPrimitive = ordinaryToPrimitive$1; - var wellKnownSymbol$6 = wellKnownSymbol$7; - - var $TypeError$3 = TypeError; - var TO_PRIMITIVE = wellKnownSymbol$6('toPrimitive'); - - // `ToPrimitive` abstract operation - // https://tc39.es/ecma262/#sec-toprimitive - var toPrimitive$1 = function (input, pref) { - if (!isObject$5(input) || isSymbol$1(input)) return input; - var exoticToPrim = getMethod(input, TO_PRIMITIVE); - var result; - if (exoticToPrim) { - if (pref === undefined) pref = 'default'; - result = call$2(exoticToPrim, input, pref); - if (!isObject$5(result) || isSymbol$1(result)) return result; - throw $TypeError$3("Can't convert object to primitive value"); - } - if (pref === undefined) pref = 'number'; - return ordinaryToPrimitive(input, pref); - }; - - var toPrimitive = toPrimitive$1; - var isSymbol = isSymbol$2; - - // `ToPropertyKey` abstract operation - // https://tc39.es/ecma262/#sec-topropertykey - var toPropertyKey$3 = function (argument) { - var key = toPrimitive(argument, 'string'); - return isSymbol(key) ? key : key + ''; - }; - - var global$5 = global$b; - var isObject$4 = isObject$7; - - var document$1 = global$5.document; - // typeof document.createElement is 'object' in old IE - var EXISTS$1 = isObject$4(document$1) && isObject$4(document$1.createElement); - - var documentCreateElement$1 = function (it) { - return EXISTS$1 ? document$1.createElement(it) : {}; - }; - - var DESCRIPTORS$9 = descriptors; - var fails$8 = fails$d; - var createElement = documentCreateElement$1; - - // Thanks to IE8 for its funny defineProperty - var ie8DomDefine = !DESCRIPTORS$9 && !fails$8(function () { - // eslint-disable-next-line es/no-object-defineproperty -- required for testing - return Object.defineProperty(createElement('div'), 'a', { - get: function () { return 7; } - }).a != 7; - }); - - var DESCRIPTORS$8 = descriptors; - var call$1 = functionCall; - var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable; - var createPropertyDescriptor$2 = createPropertyDescriptor$3; - var toIndexedObject$4 = toIndexedObject$5; - var toPropertyKey$2 = toPropertyKey$3; - var hasOwn$5 = hasOwnProperty_1; - var IE8_DOM_DEFINE$1 = ie8DomDefine; - - // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe - var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor; - - // `Object.getOwnPropertyDescriptor` method - // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor - objectGetOwnPropertyDescriptor.f = DESCRIPTORS$8 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) { - O = toIndexedObject$4(O); - P = toPropertyKey$2(P); - if (IE8_DOM_DEFINE$1) try { - return $getOwnPropertyDescriptor$1(O, P); - } catch (error) { /* empty */ } - if (hasOwn$5(O, P)) return createPropertyDescriptor$2(!call$1(propertyIsEnumerableModule$1.f, O, P), O[P]); - }; - - var objectDefineProperty = {}; - - var DESCRIPTORS$7 = descriptors; - var fails$7 = fails$d; - - // V8 ~ Chrome 36- - // https://bugs.chromium.org/p/v8/issues/detail?id=3334 - var v8PrototypeDefineBug = DESCRIPTORS$7 && fails$7(function () { - // eslint-disable-next-line es/no-object-defineproperty -- required for testing - return Object.defineProperty(function () { /* empty */ }, 'prototype', { - value: 42, - writable: false - }).prototype != 42; - }); - - var isObject$3 = isObject$7; - - var $String$2 = String; - var $TypeError$2 = TypeError; - - // `Assert: Type(argument) is Object` - var anObject$4 = function (argument) { - if (isObject$3(argument)) return argument; - throw $TypeError$2($String$2(argument) + ' is not an object'); - }; - - var DESCRIPTORS$6 = descriptors; - var IE8_DOM_DEFINE = ie8DomDefine; - var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug; - var anObject$3 = anObject$4; - var toPropertyKey$1 = toPropertyKey$3; - - var $TypeError$1 = TypeError; - // eslint-disable-next-line es/no-object-defineproperty -- safe - var $defineProperty = Object.defineProperty; - // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe - var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; - var ENUMERABLE = 'enumerable'; - var CONFIGURABLE$1 = 'configurable'; - var WRITABLE = 'writable'; - - // `Object.defineProperty` method - // https://tc39.es/ecma262/#sec-object.defineproperty - objectDefineProperty.f = DESCRIPTORS$6 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) { - anObject$3(O); - P = toPropertyKey$1(P); - anObject$3(Attributes); - if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) { - var current = $getOwnPropertyDescriptor(O, P); - if (current && current[WRITABLE]) { - O[P] = Attributes.value; - Attributes = { - configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1], - enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE], - writable: false - }; - } - } return $defineProperty(O, P, Attributes); - } : $defineProperty : function defineProperty(O, P, Attributes) { - anObject$3(O); - P = toPropertyKey$1(P); - anObject$3(Attributes); - if (IE8_DOM_DEFINE) try { - return $defineProperty(O, P, Attributes); - } catch (error) { /* empty */ } - if ('get' in Attributes || 'set' in Attributes) throw $TypeError$1('Accessors not supported'); - if ('value' in Attributes) O[P] = Attributes.value; - return O; - }; - - var DESCRIPTORS$5 = descriptors; - var definePropertyModule$4 = objectDefineProperty; - var createPropertyDescriptor$1 = createPropertyDescriptor$3; - - var createNonEnumerableProperty$2 = DESCRIPTORS$5 ? function (object, key, value) { - return definePropertyModule$4.f(object, key, createPropertyDescriptor$1(1, value)); - } : function (object, key, value) { - object[key] = value; - return object; - }; - - var makeBuiltInExports = {}; - var makeBuiltIn$2 = { - get exports(){ return makeBuiltInExports; }, - set exports(v){ makeBuiltInExports = v; }, - }; - - var DESCRIPTORS$4 = descriptors; - var hasOwn$4 = hasOwnProperty_1; - - var FunctionPrototype = Function.prototype; - // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe - var getDescriptor = DESCRIPTORS$4 && Object.getOwnPropertyDescriptor; - - var EXISTS = hasOwn$4(FunctionPrototype, 'name'); - // additional protection from minified / mangled / dropped function names - var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something'; - var CONFIGURABLE = EXISTS && (!DESCRIPTORS$4 || (DESCRIPTORS$4 && getDescriptor(FunctionPrototype, 'name').configurable)); - - var functionName = { - EXISTS: EXISTS, - PROPER: PROPER, - CONFIGURABLE: CONFIGURABLE - }; - - var uncurryThis$b = functionUncurryThis; - var isCallable$6 = isCallable$c; - var store$1 = sharedStore; - - var functionToString = uncurryThis$b(Function.toString); - - // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper - if (!isCallable$6(store$1.inspectSource)) { - store$1.inspectSource = function (it) { - return functionToString(it); - }; - } - - var inspectSource$2 = store$1.inspectSource; - - var global$4 = global$b; - var isCallable$5 = isCallable$c; - - var WeakMap$1 = global$4.WeakMap; - - var weakMapBasicDetection = isCallable$5(WeakMap$1) && /native code/.test(String(WeakMap$1)); - - var shared$1 = sharedExports; - var uid = uid$2; - - var keys = shared$1('keys'); - - var sharedKey$2 = function (key) { - return keys[key] || (keys[key] = uid(key)); - }; - - var hiddenKeys$4 = {}; - - var NATIVE_WEAK_MAP = weakMapBasicDetection; - var global$3 = global$b; - var isObject$2 = isObject$7; - var createNonEnumerableProperty$1 = createNonEnumerableProperty$2; - var hasOwn$3 = hasOwnProperty_1; - var shared = sharedStore; - var sharedKey$1 = sharedKey$2; - var hiddenKeys$3 = hiddenKeys$4; - - var OBJECT_ALREADY_INITIALIZED = 'Object already initialized'; - var TypeError$1 = global$3.TypeError; - var WeakMap = global$3.WeakMap; - var set, get, has; - - var enforce = function (it) { - return has(it) ? get(it) : set(it, {}); - }; - - var getterFor = function (TYPE) { - return function (it) { - var state; - if (!isObject$2(it) || (state = get(it)).type !== TYPE) { - throw TypeError$1('Incompatible receiver, ' + TYPE + ' required'); - } return state; - }; - }; - - if (NATIVE_WEAK_MAP || shared.state) { - var store = shared.state || (shared.state = new WeakMap()); - /* eslint-disable no-self-assign -- prototype methods protection */ - store.get = store.get; - store.has = store.has; - store.set = store.set; - /* eslint-enable no-self-assign -- prototype methods protection */ - set = function (it, metadata) { - if (store.has(it)) throw TypeError$1(OBJECT_ALREADY_INITIALIZED); - metadata.facade = it; - store.set(it, metadata); - return metadata; - }; - get = function (it) { - return store.get(it) || {}; - }; - has = function (it) { - return store.has(it); - }; - } else { - var STATE = sharedKey$1('state'); - hiddenKeys$3[STATE] = true; - set = function (it, metadata) { - if (hasOwn$3(it, STATE)) throw TypeError$1(OBJECT_ALREADY_INITIALIZED); - metadata.facade = it; - createNonEnumerableProperty$1(it, STATE, metadata); - return metadata; - }; - get = function (it) { - return hasOwn$3(it, STATE) ? it[STATE] : {}; - }; - has = function (it) { - return hasOwn$3(it, STATE); - }; - } - - var internalState = { - set: set, - get: get, - has: has, - enforce: enforce, - getterFor: getterFor - }; - - var uncurryThis$a = functionUncurryThis; - var fails$6 = fails$d; - var isCallable$4 = isCallable$c; - var hasOwn$2 = hasOwnProperty_1; - var DESCRIPTORS$3 = descriptors; - var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE; - var inspectSource$1 = inspectSource$2; - var InternalStateModule = internalState; - - var enforceInternalState = InternalStateModule.enforce; - var getInternalState = InternalStateModule.get; - var $String$1 = String; - // eslint-disable-next-line es/no-object-defineproperty -- safe - var defineProperty$2 = Object.defineProperty; - var stringSlice = uncurryThis$a(''.slice); - var replace$1 = uncurryThis$a(''.replace); - var join = uncurryThis$a([].join); - - var CONFIGURABLE_LENGTH = DESCRIPTORS$3 && !fails$6(function () { - return defineProperty$2(function () { /* empty */ }, 'length', { value: 8 }).length !== 8; - }); - - var TEMPLATE = String(String).split('String'); - - var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) { - if (stringSlice($String$1(name), 0, 7) === 'Symbol(') { - name = '[' + replace$1($String$1(name), /^Symbol\(([^)]*)\)/, '$1') + ']'; - } - if (options && options.getter) name = 'get ' + name; - if (options && options.setter) name = 'set ' + name; - if (!hasOwn$2(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) { - if (DESCRIPTORS$3) defineProperty$2(value, 'name', { value: name, configurable: true }); - else value.name = name; - } - if (CONFIGURABLE_LENGTH && options && hasOwn$2(options, 'arity') && value.length !== options.arity) { - defineProperty$2(value, 'length', { value: options.arity }); - } - try { - if (options && hasOwn$2(options, 'constructor') && options.constructor) { - if (DESCRIPTORS$3) defineProperty$2(value, 'prototype', { writable: false }); - // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable - } else if (value.prototype) value.prototype = undefined; - } catch (error) { /* empty */ } - var state = enforceInternalState(value); - if (!hasOwn$2(state, 'source')) { - state.source = join(TEMPLATE, typeof name == 'string' ? name : ''); - } return value; - }; - - // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative - // eslint-disable-next-line no-extend-native -- required - Function.prototype.toString = makeBuiltIn$1(function toString() { - return isCallable$4(this) && getInternalState(this).source || inspectSource$1(this); - }, 'toString'); - - var isCallable$3 = isCallable$c; - var definePropertyModule$3 = objectDefineProperty; - var makeBuiltIn = makeBuiltInExports; - var defineGlobalProperty$1 = defineGlobalProperty$3; - - var defineBuiltIn$2 = function (O, key, value, options) { - if (!options) options = {}; - var simple = options.enumerable; - var name = options.name !== undefined ? options.name : key; - if (isCallable$3(value)) makeBuiltIn(value, name, options); - if (options.global) { - if (simple) O[key] = value; - else defineGlobalProperty$1(key, value); - } else { - try { - if (!options.unsafe) delete O[key]; - else if (O[key]) simple = true; - } catch (error) { /* empty */ } - if (simple) O[key] = value; - else definePropertyModule$3.f(O, key, { - value: value, - enumerable: false, - configurable: !options.nonConfigurable, - writable: !options.nonWritable - }); - } return O; - }; - - var objectGetOwnPropertyNames = {}; - - var ceil = Math.ceil; - var floor = Math.floor; - - // `Math.trunc` method - // https://tc39.es/ecma262/#sec-math.trunc - // eslint-disable-next-line es/no-math-trunc -- safe - var mathTrunc = Math.trunc || function trunc(x) { - var n = +x; - return (n > 0 ? floor : ceil)(n); - }; - - var trunc = mathTrunc; - - // `ToIntegerOrInfinity` abstract operation - // https://tc39.es/ecma262/#sec-tointegerorinfinity - var toIntegerOrInfinity$2 = function (argument) { - var number = +argument; - // eslint-disable-next-line no-self-compare -- NaN check - return number !== number || number === 0 ? 0 : trunc(number); - }; - - var toIntegerOrInfinity$1 = toIntegerOrInfinity$2; - - var max = Math.max; - var min$1 = Math.min; - - // Helper for a popular repeating case of the spec: - // Let integer be ? ToInteger(index). - // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length). - var toAbsoluteIndex$1 = function (index, length) { - var integer = toIntegerOrInfinity$1(index); - return integer < 0 ? max(integer + length, 0) : min$1(integer, length); - }; - - var toIntegerOrInfinity = toIntegerOrInfinity$2; - - var min = Math.min; - - // `ToLength` abstract operation - // https://tc39.es/ecma262/#sec-tolength - var toLength$1 = function (argument) { - return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991 - }; - - var toLength = toLength$1; - - // `LengthOfArrayLike` abstract operation - // https://tc39.es/ecma262/#sec-lengthofarraylike - var lengthOfArrayLike$3 = function (obj) { - return toLength(obj.length); - }; - - var toIndexedObject$3 = toIndexedObject$5; - var toAbsoluteIndex = toAbsoluteIndex$1; - var lengthOfArrayLike$2 = lengthOfArrayLike$3; - - // `Array.prototype.{ indexOf, includes }` methods implementation - var createMethod$3 = function (IS_INCLUDES) { - return function ($this, el, fromIndex) { - var O = toIndexedObject$3($this); - var length = lengthOfArrayLike$2(O); - var index = toAbsoluteIndex(fromIndex, length); - var value; - // Array#includes uses SameValueZero equality algorithm - // eslint-disable-next-line no-self-compare -- NaN check - if (IS_INCLUDES && el != el) while (length > index) { - value = O[index++]; - // eslint-disable-next-line no-self-compare -- NaN check - if (value != value) return true; - // Array#indexOf ignores holes, Array#includes - not - } else for (;length > index; index++) { - if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0; - } return !IS_INCLUDES && -1; - }; - }; - - var arrayIncludes = { - // `Array.prototype.includes` method - // https://tc39.es/ecma262/#sec-array.prototype.includes - includes: createMethod$3(true), - // `Array.prototype.indexOf` method - // https://tc39.es/ecma262/#sec-array.prototype.indexof - indexOf: createMethod$3(false) - }; - - var uncurryThis$9 = functionUncurryThis; - var hasOwn$1 = hasOwnProperty_1; - var toIndexedObject$2 = toIndexedObject$5; - var indexOf = arrayIncludes.indexOf; - var hiddenKeys$2 = hiddenKeys$4; - - var push$2 = uncurryThis$9([].push); - - var objectKeysInternal = function (object, names) { - var O = toIndexedObject$2(object); - var i = 0; - var result = []; - var key; - for (key in O) !hasOwn$1(hiddenKeys$2, key) && hasOwn$1(O, key) && push$2(result, key); - // Don't enum bug & hidden keys - while (names.length > i) if (hasOwn$1(O, key = names[i++])) { - ~indexOf(result, key) || push$2(result, key); - } - return result; - }; - - // IE8- don't enum bug keys - var enumBugKeys$3 = [ - 'constructor', - 'hasOwnProperty', - 'isPrototypeOf', - 'propertyIsEnumerable', - 'toLocaleString', - 'toString', - 'valueOf' - ]; - - var internalObjectKeys$1 = objectKeysInternal; - var enumBugKeys$2 = enumBugKeys$3; - - var hiddenKeys$1 = enumBugKeys$2.concat('length', 'prototype'); - - // `Object.getOwnPropertyNames` method - // https://tc39.es/ecma262/#sec-object.getownpropertynames - // eslint-disable-next-line es/no-object-getownpropertynames -- safe - objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { - return internalObjectKeys$1(O, hiddenKeys$1); - }; - - var objectGetOwnPropertySymbols = {}; - - // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe - objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols; - - var getBuiltIn$2 = getBuiltIn$4; - var uncurryThis$8 = functionUncurryThis; - var getOwnPropertyNamesModule = objectGetOwnPropertyNames; - var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols; - var anObject$2 = anObject$4; - - var concat$1 = uncurryThis$8([].concat); - - // all object keys, includes non-enumerable and symbols - var ownKeys$1 = getBuiltIn$2('Reflect', 'ownKeys') || function ownKeys(it) { - var keys = getOwnPropertyNamesModule.f(anObject$2(it)); - var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f; - return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys; - }; - - var hasOwn = hasOwnProperty_1; - var ownKeys = ownKeys$1; - var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor; - var definePropertyModule$2 = objectDefineProperty; - - var copyConstructorProperties$1 = function (target, source, exceptions) { - var keys = ownKeys(source); - var defineProperty = definePropertyModule$2.f; - var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f; - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - if (!hasOwn(target, key) && !(exceptions && hasOwn(exceptions, key))) { - defineProperty(target, key, getOwnPropertyDescriptor(source, key)); - } - } - }; - - var fails$5 = fails$d; - var isCallable$2 = isCallable$c; - - var replacement = /#|\.prototype\./; - - var isForced$1 = function (feature, detection) { - var value = data[normalize(feature)]; - return value == POLYFILL ? true - : value == NATIVE ? false - : isCallable$2(detection) ? fails$5(detection) - : !!detection; - }; - - var normalize = isForced$1.normalize = function (string) { - return String(string).replace(replacement, '.').toLowerCase(); - }; - - var data = isForced$1.data = {}; - var NATIVE = isForced$1.NATIVE = 'N'; - var POLYFILL = isForced$1.POLYFILL = 'P'; - - var isForced_1 = isForced$1; - - var global$2 = global$b; - var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f; - var createNonEnumerableProperty = createNonEnumerableProperty$2; - var defineBuiltIn$1 = defineBuiltIn$2; - var defineGlobalProperty = defineGlobalProperty$3; - var copyConstructorProperties = copyConstructorProperties$1; - var isForced = isForced_1; - - /* - options.target - name of the target object - options.global - target is the global object - options.stat - export as static methods of target - options.proto - export as prototype methods of target - options.real - real prototype method for the `pure` version - options.forced - export even if the native feature is available - options.bind - bind methods to the target, required for the `pure` version - options.wrap - wrap constructors to preventing global pollution, required for the `pure` version - options.unsafe - use the simple assignment of property instead of delete + defineProperty - options.sham - add a flag to not completely full polyfills - options.enumerable - export as enumerable property - options.dontCallGetSet - prevent calling a getter on target - options.name - the .name of the function if it does not match the key - */ - var _export = function (options, source) { - var TARGET = options.target; - var GLOBAL = options.global; - var STATIC = options.stat; - var FORCED, target, key, targetProperty, sourceProperty, descriptor; - if (GLOBAL) { - target = global$2; - } else if (STATIC) { - target = global$2[TARGET] || defineGlobalProperty(TARGET, {}); - } else { - target = (global$2[TARGET] || {}).prototype; - } - if (target) for (key in source) { - sourceProperty = source[key]; - if (options.dontCallGetSet) { - descriptor = getOwnPropertyDescriptor(target, key); - targetProperty = descriptor && descriptor.value; - } else targetProperty = target[key]; - FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced); - // contained in target - if (!FORCED && targetProperty !== undefined) { - if (typeof sourceProperty == typeof targetProperty) continue; - copyConstructorProperties(sourceProperty, targetProperty); - } - // add a flag to not completely full polyfills - if (options.sham || (targetProperty && targetProperty.sham)) { - createNonEnumerableProperty(sourceProperty, 'sham', true); - } - defineBuiltIn$1(target, key, sourceProperty, options); - } - }; - - var internalObjectKeys = objectKeysInternal; - var enumBugKeys$1 = enumBugKeys$3; - - // `Object.keys` method - // https://tc39.es/ecma262/#sec-object.keys - // eslint-disable-next-line es/no-object-keys -- safe - var objectKeys$3 = Object.keys || function keys(O) { - return internalObjectKeys(O, enumBugKeys$1); - }; - - var DESCRIPTORS$2 = descriptors; - var uncurryThis$7 = functionUncurryThis; - var objectKeys$2 = objectKeys$3; - var toIndexedObject$1 = toIndexedObject$5; - var $propertyIsEnumerable = objectPropertyIsEnumerable.f; - - var propertyIsEnumerable = uncurryThis$7($propertyIsEnumerable); - var push$1 = uncurryThis$7([].push); - - // `Object.{ entries, values }` methods implementation - var createMethod$2 = function (TO_ENTRIES) { - return function (it) { - var O = toIndexedObject$1(it); - var keys = objectKeys$2(O); - var length = keys.length; - var i = 0; - var result = []; - var key; - while (length > i) { - key = keys[i++]; - if (!DESCRIPTORS$2 || propertyIsEnumerable(O, key)) { - push$1(result, TO_ENTRIES ? [key, O[key]] : O[key]); - } - } - return result; - }; - }; - - var objectToArray = { - // `Object.entries` method - // https://tc39.es/ecma262/#sec-object.entries - entries: createMethod$2(true), - // `Object.values` method - // https://tc39.es/ecma262/#sec-object.values - values: createMethod$2(false) - }; - - var $$5 = _export; - var $entries = objectToArray.entries; - - // `Object.entries` method - // https://tc39.es/ecma262/#sec-object.entries - $$5({ target: 'Object', stat: true }, { - entries: function entries(O) { - return $entries(O); - } - }); - - var classofRaw$1 = classofRaw$2; - var uncurryThis$6 = functionUncurryThis; - - var functionUncurryThisClause = function (fn) { - // Nashorn bug: - // https://github.com/zloirock/core-js/issues/1128 - // https://github.com/zloirock/core-js/issues/1130 - if (classofRaw$1(fn) === 'Function') return uncurryThis$6(fn); - }; - - var uncurryThis$5 = functionUncurryThisClause; - var aCallable = aCallable$2; - var NATIVE_BIND = functionBindNative; - - var bind$1 = uncurryThis$5(uncurryThis$5.bind); - - // optional / simple context binding - var functionBindContext = function (fn, that) { - aCallable(fn); - return that === undefined ? fn : NATIVE_BIND ? bind$1(fn, that) : function (/* ...args */) { - return fn.apply(that, arguments); - }; - }; - - var classof$4 = classofRaw$2; - - // `IsArray` abstract operation - // https://tc39.es/ecma262/#sec-isarray - // eslint-disable-next-line es/no-array-isarray -- safe - var isArray$2 = Array.isArray || function isArray(argument) { - return classof$4(argument) == 'Array'; - }; - - var wellKnownSymbol$5 = wellKnownSymbol$7; - - var TO_STRING_TAG$1 = wellKnownSymbol$5('toStringTag'); - var test = {}; - - test[TO_STRING_TAG$1] = 'z'; - - var toStringTagSupport = String(test) === '[object z]'; - - var TO_STRING_TAG_SUPPORT$2 = toStringTagSupport; - var isCallable$1 = isCallable$c; - var classofRaw = classofRaw$2; - var wellKnownSymbol$4 = wellKnownSymbol$7; - - var TO_STRING_TAG = wellKnownSymbol$4('toStringTag'); - var $Object = Object; - - // ES3 wrong here - var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments'; - - // fallback for IE11 Script Access Denied error - var tryGet = function (it, key) { - try { - return it[key]; - } catch (error) { /* empty */ } - }; - - // getting tag from ES6+ `Object.prototype.toString` - var classof$3 = TO_STRING_TAG_SUPPORT$2 ? classofRaw : function (it) { - var O, tag, result; - return it === undefined ? 'Undefined' : it === null ? 'Null' - // @@toStringTag case - : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag - // builtinTag case - : CORRECT_ARGUMENTS ? classofRaw(O) - // ES3 arguments fallback - : (result = classofRaw(O)) == 'Object' && isCallable$1(O.callee) ? 'Arguments' : result; - }; - - var uncurryThis$4 = functionUncurryThis; - var fails$4 = fails$d; - var isCallable = isCallable$c; - var classof$2 = classof$3; - var getBuiltIn$1 = getBuiltIn$4; - var inspectSource = inspectSource$2; - - var noop = function () { /* empty */ }; - var empty = []; - var construct = getBuiltIn$1('Reflect', 'construct'); - var constructorRegExp = /^\s*(?:class|function)\b/; - var exec$1 = uncurryThis$4(constructorRegExp.exec); - var INCORRECT_TO_STRING = !constructorRegExp.exec(noop); - - var isConstructorModern = function isConstructor(argument) { - if (!isCallable(argument)) return false; - try { - construct(noop, empty, argument); - return true; - } catch (error) { - return false; - } - }; - - var isConstructorLegacy = function isConstructor(argument) { - if (!isCallable(argument)) return false; - switch (classof$2(argument)) { - case 'AsyncFunction': - case 'GeneratorFunction': - case 'AsyncGeneratorFunction': return false; - } - try { - // we can't check .prototype since constructors produced by .bind haven't it - // `Function#toString` throws on some built-it function in some legacy engines - // (for example, `DOMQuad` and similar in FF41-) - return INCORRECT_TO_STRING || !!exec$1(constructorRegExp, inspectSource(argument)); - } catch (error) { - return true; - } - }; - - isConstructorLegacy.sham = true; - - // `IsConstructor` abstract operation - // https://tc39.es/ecma262/#sec-isconstructor - var isConstructor$1 = !construct || fails$4(function () { - var called; - return isConstructorModern(isConstructorModern.call) - || !isConstructorModern(Object) - || !isConstructorModern(function () { called = true; }) - || called; - }) ? isConstructorLegacy : isConstructorModern; - - var isArray$1 = isArray$2; - var isConstructor = isConstructor$1; - var isObject$1 = isObject$7; - var wellKnownSymbol$3 = wellKnownSymbol$7; - - var SPECIES$1 = wellKnownSymbol$3('species'); - var $Array = Array; - - // a part of `ArraySpeciesCreate` abstract operation - // https://tc39.es/ecma262/#sec-arrayspeciescreate - var arraySpeciesConstructor$1 = function (originalArray) { - var C; - if (isArray$1(originalArray)) { - C = originalArray.constructor; - // cross-realm fallback - if (isConstructor(C) && (C === $Array || isArray$1(C.prototype))) C = undefined; - else if (isObject$1(C)) { - C = C[SPECIES$1]; - if (C === null) C = undefined; - } - } return C === undefined ? $Array : C; - }; - - var arraySpeciesConstructor = arraySpeciesConstructor$1; - - // `ArraySpeciesCreate` abstract operation - // https://tc39.es/ecma262/#sec-arrayspeciescreate - var arraySpeciesCreate$2 = function (originalArray, length) { - return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length); - }; - - var bind = functionBindContext; - var uncurryThis$3 = functionUncurryThis; - var IndexedObject$1 = indexedObject; - var toObject$2 = toObject$4; - var lengthOfArrayLike$1 = lengthOfArrayLike$3; - var arraySpeciesCreate$1 = arraySpeciesCreate$2; - - var push = uncurryThis$3([].push); - - // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation - var createMethod$1 = function (TYPE) { - var IS_MAP = TYPE == 1; - var IS_FILTER = TYPE == 2; - var IS_SOME = TYPE == 3; - var IS_EVERY = TYPE == 4; - var IS_FIND_INDEX = TYPE == 6; - var IS_FILTER_REJECT = TYPE == 7; - var NO_HOLES = TYPE == 5 || IS_FIND_INDEX; - return function ($this, callbackfn, that, specificCreate) { - var O = toObject$2($this); - var self = IndexedObject$1(O); - var boundFunction = bind(callbackfn, that); - var length = lengthOfArrayLike$1(self); - var index = 0; - var create = specificCreate || arraySpeciesCreate$1; - var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined; - var value, result; - for (;length > index; index++) if (NO_HOLES || index in self) { - value = self[index]; - result = boundFunction(value, index, O); - if (TYPE) { - if (IS_MAP) target[index] = result; // map - else if (result) switch (TYPE) { - case 3: return true; // some - case 5: return value; // find - case 6: return index; // findIndex - case 2: push(target, value); // filter - } else switch (TYPE) { - case 4: return false; // every - case 7: push(target, value); // filterReject - } - } - } - return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target; - }; - }; - - var arrayIteration = { - // `Array.prototype.forEach` method - // https://tc39.es/ecma262/#sec-array.prototype.foreach - forEach: createMethod$1(0), - // `Array.prototype.map` method - // https://tc39.es/ecma262/#sec-array.prototype.map - map: createMethod$1(1), - // `Array.prototype.filter` method - // https://tc39.es/ecma262/#sec-array.prototype.filter - filter: createMethod$1(2), - // `Array.prototype.some` method - // https://tc39.es/ecma262/#sec-array.prototype.some - some: createMethod$1(3), - // `Array.prototype.every` method - // https://tc39.es/ecma262/#sec-array.prototype.every - every: createMethod$1(4), - // `Array.prototype.find` method - // https://tc39.es/ecma262/#sec-array.prototype.find - find: createMethod$1(5), - // `Array.prototype.findIndex` method - // https://tc39.es/ecma262/#sec-array.prototype.findIndex - findIndex: createMethod$1(6), - // `Array.prototype.filterReject` method - // https://github.com/tc39/proposal-array-filtering - filterReject: createMethod$1(7) - }; - - var objectDefineProperties = {}; - - var DESCRIPTORS$1 = descriptors; - var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug; - var definePropertyModule$1 = objectDefineProperty; - var anObject$1 = anObject$4; - var toIndexedObject = toIndexedObject$5; - var objectKeys$1 = objectKeys$3; - - // `Object.defineProperties` method - // https://tc39.es/ecma262/#sec-object.defineproperties - // eslint-disable-next-line es/no-object-defineproperties -- safe - objectDefineProperties.f = DESCRIPTORS$1 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) { - anObject$1(O); - var props = toIndexedObject(Properties); - var keys = objectKeys$1(Properties); - var length = keys.length; - var index = 0; - var key; - while (length > index) definePropertyModule$1.f(O, key = keys[index++], props[key]); - return O; - }; - - var getBuiltIn = getBuiltIn$4; - - var html$1 = getBuiltIn('document', 'documentElement'); - - /* global ActiveXObject -- old IE, WSH */ - - var anObject = anObject$4; - var definePropertiesModule = objectDefineProperties; - var enumBugKeys = enumBugKeys$3; - var hiddenKeys = hiddenKeys$4; - var html = html$1; - var documentCreateElement = documentCreateElement$1; - var sharedKey = sharedKey$2; - - var GT = '>'; - var LT = '<'; - var PROTOTYPE = 'prototype'; - var SCRIPT = 'script'; - var IE_PROTO = sharedKey('IE_PROTO'); - - var EmptyConstructor = function () { /* empty */ }; - - var scriptTag = function (content) { - return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT; - }; - - // Create object with fake `null` prototype: use ActiveX Object with cleared prototype - var NullProtoObjectViaActiveX = function (activeXDocument) { - activeXDocument.write(scriptTag('')); - activeXDocument.close(); - var temp = activeXDocument.parentWindow.Object; - activeXDocument = null; // avoid memory leak - return temp; - }; - - // Create object with fake `null` prototype: use iframe Object with cleared prototype - var NullProtoObjectViaIFrame = function () { - // Thrash, waste and sodomy: IE GC bug - var iframe = documentCreateElement('iframe'); - var JS = 'java' + SCRIPT + ':'; - var iframeDocument; - iframe.style.display = 'none'; - html.appendChild(iframe); - // https://github.com/zloirock/core-js/issues/475 - iframe.src = String(JS); - iframeDocument = iframe.contentWindow.document; - iframeDocument.open(); - iframeDocument.write(scriptTag('document.F=Object')); - iframeDocument.close(); - return iframeDocument.F; - }; - - // Check for document.domain and active x support - // No need to use active x approach when document.domain is not set - // see https://github.com/es-shims/es5-shim/issues/150 - // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346 - // avoid IE GC bug - var activeXDocument; - var NullProtoObject = function () { - try { - activeXDocument = new ActiveXObject('htmlfile'); - } catch (error) { /* ignore */ } - NullProtoObject = typeof document != 'undefined' - ? document.domain && activeXDocument - ? NullProtoObjectViaActiveX(activeXDocument) // old IE - : NullProtoObjectViaIFrame() - : NullProtoObjectViaActiveX(activeXDocument); // WSH - var length = enumBugKeys.length; - while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]]; - return NullProtoObject(); - }; - - hiddenKeys[IE_PROTO] = true; - - // `Object.create` method - // https://tc39.es/ecma262/#sec-object.create - // eslint-disable-next-line es/no-object-create -- safe - var objectCreate = Object.create || function create(O, Properties) { - var result; - if (O !== null) { - EmptyConstructor[PROTOTYPE] = anObject(O); - result = new EmptyConstructor(); - EmptyConstructor[PROTOTYPE] = null; - // add "__proto__" for Object.getPrototypeOf polyfill - result[IE_PROTO] = O; - } else result = NullProtoObject(); - return Properties === undefined ? result : definePropertiesModule.f(result, Properties); - }; - - var wellKnownSymbol$2 = wellKnownSymbol$7; - var create = objectCreate; - var defineProperty$1 = objectDefineProperty.f; - - var UNSCOPABLES = wellKnownSymbol$2('unscopables'); - var ArrayPrototype = Array.prototype; - - // Array.prototype[@@unscopables] - // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables - if (ArrayPrototype[UNSCOPABLES] == undefined) { - defineProperty$1(ArrayPrototype, UNSCOPABLES, { - configurable: true, - value: create(null) - }); - } - - // add a key to Array.prototype[@@unscopables] - var addToUnscopables$1 = function (key) { - ArrayPrototype[UNSCOPABLES][key] = true; - }; - - var $$4 = _export; - var $find = arrayIteration.find; - var addToUnscopables = addToUnscopables$1; - - var FIND = 'find'; - var SKIPS_HOLES = true; - - // Shouldn't skip holes - if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; }); - - // `Array.prototype.find` method - // https://tc39.es/ecma262/#sec-array.prototype.find - $$4({ target: 'Array', proto: true, forced: SKIPS_HOLES }, { - find: function find(callbackfn /* , that = undefined */) { - return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); - } - }); - - // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables - addToUnscopables(FIND); - - var TO_STRING_TAG_SUPPORT$1 = toStringTagSupport; - var classof$1 = classof$3; - - // `Object.prototype.toString` method implementation - // https://tc39.es/ecma262/#sec-object.prototype.tostring - var objectToString = TO_STRING_TAG_SUPPORT$1 ? {}.toString : function toString() { - return '[object ' + classof$1(this) + ']'; - }; - - var TO_STRING_TAG_SUPPORT = toStringTagSupport; - var defineBuiltIn = defineBuiltIn$2; - var toString$3 = objectToString; - - // `Object.prototype.toString` method - // https://tc39.es/ecma262/#sec-object.prototype.tostring - if (!TO_STRING_TAG_SUPPORT) { - defineBuiltIn(Object.prototype, 'toString', toString$3, { unsafe: true }); - } - - var classof = classof$3; - - var $String = String; - - var toString$2 = function (argument) { - if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string'); - return $String(argument); - }; - - // a string of all valid unicode whitespaces - var whitespaces$2 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' + - '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; - - var uncurryThis$2 = functionUncurryThis; - var requireObjectCoercible = requireObjectCoercible$3; - var toString$1 = toString$2; - var whitespaces$1 = whitespaces$2; - - var replace = uncurryThis$2(''.replace); - var ltrim = RegExp('^[' + whitespaces$1 + ']+'); - var rtrim = RegExp('(^|[^' + whitespaces$1 + '])[' + whitespaces$1 + ']+$'); - - // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation - var createMethod = function (TYPE) { - return function ($this) { - var string = toString$1(requireObjectCoercible($this)); - if (TYPE & 1) string = replace(string, ltrim, ''); - if (TYPE & 2) string = replace(string, rtrim, '$1'); - return string; - }; - }; - - var stringTrim = { - // `String.prototype.{ trimLeft, trimStart }` methods - // https://tc39.es/ecma262/#sec-string.prototype.trimstart - start: createMethod(1), - // `String.prototype.{ trimRight, trimEnd }` methods - // https://tc39.es/ecma262/#sec-string.prototype.trimend - end: createMethod(2), - // `String.prototype.trim` method - // https://tc39.es/ecma262/#sec-string.prototype.trim - trim: createMethod(3) - }; - - var global$1 = global$b; - var fails$3 = fails$d; - var uncurryThis$1 = functionUncurryThis; - var toString = toString$2; - var trim = stringTrim.trim; - var whitespaces = whitespaces$2; - - var $parseInt$1 = global$1.parseInt; - var Symbol$1 = global$1.Symbol; - var ITERATOR = Symbol$1 && Symbol$1.iterator; - var hex = /^[+-]?0x/i; - var exec = uncurryThis$1(hex.exec); - var FORCED$1 = $parseInt$1(whitespaces + '08') !== 8 || $parseInt$1(whitespaces + '0x16') !== 22 - // MS Edge 18- broken with boxed symbols - || (ITERATOR && !fails$3(function () { $parseInt$1(Object(ITERATOR)); })); - - // `parseInt` method - // https://tc39.es/ecma262/#sec-parseint-string-radix - var numberParseInt = FORCED$1 ? function parseInt(string, radix) { - var S = trim(toString(string)); - return $parseInt$1(S, (radix >>> 0) || (exec(hex, S) ? 16 : 10)); - } : $parseInt$1; - - var $$3 = _export; - var $parseInt = numberParseInt; - - // `parseInt` method - // https://tc39.es/ecma262/#sec-parseint-string-radix - $$3({ global: true, forced: parseInt != $parseInt }, { - parseInt: $parseInt - }); - - var fails$2 = fails$d; - var wellKnownSymbol$1 = wellKnownSymbol$7; - var V8_VERSION$1 = engineV8Version; - - var SPECIES = wellKnownSymbol$1('species'); - - var arrayMethodHasSpeciesSupport$2 = function (METHOD_NAME) { - // We can't use this feature detection in V8 since it causes - // deoptimization and serious performance degradation - // https://github.com/zloirock/core-js/issues/677 - return V8_VERSION$1 >= 51 || !fails$2(function () { - var array = []; - var constructor = array.constructor = {}; - constructor[SPECIES] = function () { - return { foo: 1 }; - }; - return array[METHOD_NAME](Boolean).foo !== 1; - }); - }; - - var $$2 = _export; - var $filter = arrayIteration.filter; - var arrayMethodHasSpeciesSupport$1 = arrayMethodHasSpeciesSupport$2; - - var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport$1('filter'); - - // `Array.prototype.filter` method - // https://tc39.es/ecma262/#sec-array.prototype.filter - // with adding support of @@species - $$2({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, { - filter: function filter(callbackfn /* , thisArg */) { - return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); - } - }); - - var DESCRIPTORS = descriptors; - var uncurryThis = functionUncurryThis; - var call = functionCall; - var fails$1 = fails$d; - var objectKeys = objectKeys$3; - var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols; - var propertyIsEnumerableModule = objectPropertyIsEnumerable; - var toObject$1 = toObject$4; - var IndexedObject = indexedObject; - - // eslint-disable-next-line es/no-object-assign -- safe - var $assign = Object.assign; - // eslint-disable-next-line es/no-object-defineproperty -- required for testing - var defineProperty = Object.defineProperty; - var concat = uncurryThis([].concat); - - // `Object.assign` method - // https://tc39.es/ecma262/#sec-object.assign - var objectAssign = !$assign || fails$1(function () { - // should have correct order of operations (Edge bug) - if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', { - enumerable: true, - get: function () { - defineProperty(this, 'b', { - value: 3, - enumerable: false - }); - } - }), { b: 2 })).b !== 1) return true; - // should work with symbols and should have deterministic property order (V8 bug) - var A = {}; - var B = {}; - // eslint-disable-next-line es/no-symbol -- safe - var symbol = Symbol(); - var alphabet = 'abcdefghijklmnopqrst'; - A[symbol] = 7; - alphabet.split('').forEach(function (chr) { B[chr] = chr; }); - return $assign({}, A)[symbol] != 7 || objectKeys($assign({}, B)).join('') != alphabet; - }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length` - var T = toObject$1(target); - var argumentsLength = arguments.length; - var index = 1; - var getOwnPropertySymbols = getOwnPropertySymbolsModule.f; - var propertyIsEnumerable = propertyIsEnumerableModule.f; - while (argumentsLength > index) { - var S = IndexedObject(arguments[index++]); - var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S); - var length = keys.length; - var j = 0; - var key; - while (length > j) { - key = keys[j++]; - if (!DESCRIPTORS || call(propertyIsEnumerable, S, key)) T[key] = S[key]; - } - } return T; - } : $assign; - - var $$1 = _export; - var assign = objectAssign; - - // `Object.assign` method - // https://tc39.es/ecma262/#sec-object.assign - // eslint-disable-next-line es/no-object-assign -- required for testing - $$1({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, { - assign: assign - }); - - var $TypeError = TypeError; - var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; // 2 ** 53 - 1 == 9007199254740991 - - var doesNotExceedSafeInteger$1 = function (it) { - if (it > MAX_SAFE_INTEGER) throw $TypeError('Maximum allowed index exceeded'); - return it; - }; - - var toPropertyKey = toPropertyKey$3; - var definePropertyModule = objectDefineProperty; - var createPropertyDescriptor = createPropertyDescriptor$3; - - var createProperty$1 = function (object, key, value) { - var propertyKey = toPropertyKey(key); - if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value)); - else object[propertyKey] = value; - }; - - var $ = _export; - var fails = fails$d; - var isArray = isArray$2; - var isObject = isObject$7; - var toObject = toObject$4; - var lengthOfArrayLike = lengthOfArrayLike$3; - var doesNotExceedSafeInteger = doesNotExceedSafeInteger$1; - var createProperty = createProperty$1; - var arraySpeciesCreate = arraySpeciesCreate$2; - var arrayMethodHasSpeciesSupport = arrayMethodHasSpeciesSupport$2; - var wellKnownSymbol = wellKnownSymbol$7; - var V8_VERSION = engineV8Version; - - var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable'); - - // We can't use this feature detection in V8 since it causes - // deoptimization and serious performance degradation - // https://github.com/zloirock/core-js/issues/679 - var IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || !fails(function () { - var array = []; - array[IS_CONCAT_SPREADABLE] = false; - return array.concat()[0] !== array; - }); - - var isConcatSpreadable = function (O) { - if (!isObject(O)) return false; - var spreadable = O[IS_CONCAT_SPREADABLE]; - return spreadable !== undefined ? !!spreadable : isArray(O); - }; - - var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !arrayMethodHasSpeciesSupport('concat'); - - // `Array.prototype.concat` method - // https://tc39.es/ecma262/#sec-array.prototype.concat - // with adding support of @@isConcatSpreadable and @@species - $({ target: 'Array', proto: true, arity: 1, forced: FORCED }, { - // eslint-disable-next-line no-unused-vars -- required for `.length` - concat: function concat(arg) { - var O = toObject(this); - var A = arraySpeciesCreate(O, 0); - var n = 0; - var i, k, length, len, E; - for (i = -1, length = arguments.length; i < length; i++) { - E = i === -1 ? O : arguments[i]; - if (isConcatSpreadable(E)) { - len = lengthOfArrayLike(E); - doesNotExceedSafeInteger(n + len); - for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]); - } else { - doesNotExceedSafeInteger(n + 1); - createProperty(A, n++, E); - } - } - A.length = n; - return A; - } - }); - - /** - * @author: Dennis Hernández - * @update: https://github.com/wenzhixin - * @version: v1.2.0 - */ - - $$6.akottr.dragtable.prototype._restoreState = function (persistObj) { - var i = 0; - for (var _i = 0, _Object$entries = Object.entries(persistObj); _i < _Object$entries.length; _i++) { - var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2), - field = _Object$entries$_i[0], - value = _Object$entries$_i[1]; - var $th = this.originalTable.el.find("th[data-field=\"".concat(field, "\"]")); - if (!$th.length) { - i++; - continue; - } - this.originalTable.startIndex = $th.prevAll().length + 1; - this.originalTable.endIndex = parseInt(value, 10) + 1 - i; - this._bubbleCols(); - } - }; - - // From MDN site, https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter - var filterFn = function filterFn() { - if (!Array.prototype.filter) { - Array.prototype.filter = function (fun /* , thisArg*/) { - if (this === undefined || this === null) { - throw new TypeError(); - } - var t = Object(this); - var len = t.length >>> 0; - if (typeof fun !== 'function') { - throw new TypeError(); - } - var res = []; - var thisArg = arguments.length >= 2 ? arguments[1] : undefined; - for (var i = 0; i < len; i++) { - if (i in t) { - var val = t[i]; - - // NOTE: Technically this should Object.defineProperty at - // the next index, as push can be affected by - // properties on Object.prototype and Array.prototype. - // But this method's new, and collisions should be - // rare, so use the more-compatible alternative. - if (fun.call(thisArg, val, i, t)) { - res.push(val); - } - } - } - return res; - }; - } - }; - Object.assign($$6.fn.bootstrapTable.defaults, { - reorderableColumns: false, - maxMovingRows: 10, - // eslint-disable-next-line no-unused-vars - onReorderColumn: function onReorderColumn(headerFields) { - return false; - }, - dragaccept: null - }); - Object.assign($$6.fn.bootstrapTable.events, { - 'reorder-column.bs.table': 'onReorderColumn' - }); - $$6.fn.bootstrapTable.methods.push('orderColumns'); - $$6.BootstrapTable = /*#__PURE__*/function (_$$BootstrapTable) { - _inherits(_class, _$$BootstrapTable); - var _super = _createSuper(_class); - function _class() { - _classCallCheck(this, _class); - return _super.apply(this, arguments); - } - _createClass(_class, [{ - key: "initHeader", - value: function initHeader() { - var _get2; - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - (_get2 = _get(_getPrototypeOf(_class.prototype), "initHeader", this)).call.apply(_get2, [this].concat(args)); - if (!this.options.reorderableColumns) { - return; - } - this.makeColumnsReorderable(); - } - }, { - key: "_toggleColumn", - value: function _toggleColumn() { - var _get3; - for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { - args[_key2] = arguments[_key2]; - } - (_get3 = _get(_getPrototypeOf(_class.prototype), "_toggleColumn", this)).call.apply(_get3, [this].concat(args)); - if (!this.options.reorderableColumns) { - return; - } - this.makeColumnsReorderable(); - } - }, { - key: "toggleView", - value: function toggleView() { - var _get4; - for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { - args[_key3] = arguments[_key3]; - } - (_get4 = _get(_getPrototypeOf(_class.prototype), "toggleView", this)).call.apply(_get4, [this].concat(args)); - if (!this.options.reorderableColumns) { - return; - } - if (this.options.cardView) { - return; - } - this.makeColumnsReorderable(); - } - }, { - key: "resetView", - value: function resetView() { - var _get5; - for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) { - args[_key4] = arguments[_key4]; - } - (_get5 = _get(_getPrototypeOf(_class.prototype), "resetView", this)).call.apply(_get5, [this].concat(args)); - if (!this.options.reorderableColumns) { - return; - } - this.makeColumnsReorderable(); - } - }, { - key: "makeColumnsReorderable", - value: function makeColumnsReorderable() { - var _this = this; - var order = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; - try { - $$6(this.$el).dragtable('destroy'); - } catch (e) { - // do nothing - } - $$6(this.$el).dragtable({ - maxMovingRows: this.options.maxMovingRows, - dragaccept: this.options.dragaccept, - clickDelay: 200, - dragHandle: '.th-inner', - restoreState: order ? order : this.columnsSortOrder, - beforeStop: function beforeStop(table) { - var sortOrder = {}; - table.el.find('th').each(function (i, el) { - sortOrder[$$6(el).data('field')] = i; - }); - _this.columnsSortOrder = sortOrder; - if (_this.options.cookie) { - _this.persistReorderColumnsState(_this); - } - var ths = []; - var formatters = []; - var columns = []; - var columnsHidden = []; - var columnIndex = -1; - var optionsColumns = []; - _this.$header.find('th:not(.detail)').each(function (i, el) { - ths.push($$6(el).data('field')); - formatters.push($$6(el).data('formatter')); - }); - - // Exist columns not shown - if (ths.length < _this.columns.length) { - columnsHidden = _this.columns.filter(function (column) { - return !column.visible; - }); - for (var i = 0; i < columnsHidden.length; i++) { - ths.push(columnsHidden[i].field); - formatters.push(columnsHidden[i].formatter); - } - } - for (var _i2 = 0; _i2 < ths.length; _i2++) { - columnIndex = _this.fieldsColumnsIndex[ths[_i2]]; - if (columnIndex !== -1) { - _this.fieldsColumnsIndex[ths[_i2]] = _i2; - _this.columns[columnIndex].fieldIndex = _i2; - columns.push(_this.columns[columnIndex]); - } - } - _this.columns = columns; - filterFn(); // Support arr.length) len = arr.length; + for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; + return arr2; + } + function _nonIterableRest() { + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + } + + var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; + + var check = function (it) { + return it && it.Math === Math && it; + }; + + // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 + var global$g = + // eslint-disable-next-line es/no-global-this -- safe + check(typeof globalThis == 'object' && globalThis) || + check(typeof window == 'object' && window) || + // eslint-disable-next-line no-restricted-globals -- safe + check(typeof self == 'object' && self) || + check(typeof commonjsGlobal == 'object' && commonjsGlobal) || + check(typeof commonjsGlobal == 'object' && commonjsGlobal) || + // eslint-disable-next-line no-new-func -- fallback + (function () { return this; })() || Function('return this')(); + + var objectGetOwnPropertyDescriptor = {}; + + var fails$l = function (exec) { + try { + return !!exec(); + } catch (error) { + return true; + } + }; + + var fails$k = fails$l; + + // Detect IE8's incomplete defineProperty implementation + var descriptors = !fails$k(function () { + // eslint-disable-next-line es/no-object-defineproperty -- required for testing + return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7; + }); + + var fails$j = fails$l; + + var functionBindNative = !fails$j(function () { + // eslint-disable-next-line es/no-function-prototype-bind -- safe + var test = (function () { /* empty */ }).bind(); + // eslint-disable-next-line no-prototype-builtins -- safe + return typeof test != 'function' || test.hasOwnProperty('prototype'); + }); + + var NATIVE_BIND$2 = functionBindNative; + + var call$d = Function.prototype.call; + + var functionCall = NATIVE_BIND$2 ? call$d.bind(call$d) : function () { + return call$d.apply(call$d, arguments); + }; + + var objectPropertyIsEnumerable = {}; + + var $propertyIsEnumerable$1 = {}.propertyIsEnumerable; + // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe + var getOwnPropertyDescriptor$2 = Object.getOwnPropertyDescriptor; + + // Nashorn ~ JDK8 bug + var NASHORN_BUG = getOwnPropertyDescriptor$2 && !$propertyIsEnumerable$1.call({ 1: 2 }, 1); + + // `Object.prototype.propertyIsEnumerable` method implementation + // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable + objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) { + var descriptor = getOwnPropertyDescriptor$2(this, V); + return !!descriptor && descriptor.enumerable; + } : $propertyIsEnumerable$1; + + var createPropertyDescriptor$5 = function (bitmap, value) { + return { + enumerable: !(bitmap & 1), + configurable: !(bitmap & 2), + writable: !(bitmap & 4), + value: value + }; + }; + + var NATIVE_BIND$1 = functionBindNative; + + var FunctionPrototype$1 = Function.prototype; + var call$c = FunctionPrototype$1.call; + var uncurryThisWithBind = NATIVE_BIND$1 && FunctionPrototype$1.bind.bind(call$c, call$c); + + var functionUncurryThis = NATIVE_BIND$1 ? uncurryThisWithBind : function (fn) { + return function () { + return call$c.apply(fn, arguments); + }; + }; + + var uncurryThis$i = functionUncurryThis; + + var toString$7 = uncurryThis$i({}.toString); + var stringSlice$4 = uncurryThis$i(''.slice); + + var classofRaw$2 = function (it) { + return stringSlice$4(toString$7(it), 8, -1); + }; + + var uncurryThis$h = functionUncurryThis; + var fails$i = fails$l; + var classof$8 = classofRaw$2; + + var $Object$4 = Object; + var split$1 = uncurryThis$h(''.split); + + // fallback for non-array-like ES3 and non-enumerable old V8 strings + var indexedObject = fails$i(function () { + // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346 + // eslint-disable-next-line no-prototype-builtins -- safe + return !$Object$4('z').propertyIsEnumerable(0); + }) ? function (it) { + return classof$8(it) === 'String' ? split$1(it, '') : $Object$4(it); + } : $Object$4; + + // we can't use just `it == null` since of `document.all` special case + // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec + var isNullOrUndefined$4 = function (it) { + return it === null || it === undefined; + }; + + var isNullOrUndefined$3 = isNullOrUndefined$4; + + var $TypeError$b = TypeError; + + // `RequireObjectCoercible` abstract operation + // https://tc39.es/ecma262/#sec-requireobjectcoercible + var requireObjectCoercible$4 = function (it) { + if (isNullOrUndefined$3(it)) throw new $TypeError$b("Can't call method on " + it); + return it; + }; + + // toObject with fallback for non-array-like ES3 strings + var IndexedObject$1 = indexedObject; + var requireObjectCoercible$3 = requireObjectCoercible$4; + + var toIndexedObject$6 = function (it) { + return IndexedObject$1(requireObjectCoercible$3(it)); + }; + + // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot + var documentAll = typeof document == 'object' && document.all; + + // `IsCallable` abstract operation + // https://tc39.es/ecma262/#sec-iscallable + // eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing + var isCallable$h = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) { + return typeof argument == 'function' || argument === documentAll; + } : function (argument) { + return typeof argument == 'function'; + }; + + var isCallable$g = isCallable$h; + + var isObject$a = function (it) { + return typeof it == 'object' ? it !== null : isCallable$g(it); + }; + + var global$f = global$g; + var isCallable$f = isCallable$h; + + var aFunction = function (argument) { + return isCallable$f(argument) ? argument : undefined; + }; + + var getBuiltIn$4 = function (namespace, method) { + return arguments.length < 2 ? aFunction(global$f[namespace]) : global$f[namespace] && global$f[namespace][method]; + }; + + var uncurryThis$g = functionUncurryThis; + + var objectIsPrototypeOf = uncurryThis$g({}.isPrototypeOf); + + var engineUserAgent = typeof navigator != 'undefined' && String(navigator.userAgent) || ''; + + var global$e = global$g; + var userAgent = engineUserAgent; + + var process = global$e.process; + var Deno = global$e.Deno; + var versions = process && process.versions || Deno && Deno.version; + var v8 = versions && versions.v8; + var match, version; + + if (v8) { + match = v8.split('.'); + // in old Chrome, versions of V8 isn't V8 = Chrome / 10 + // but their correct versions are not interesting for us + version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]); + } + + // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0` + // so check `userAgent` even if `.v8` exists, but 0 + if (!version && userAgent) { + match = userAgent.match(/Edge\/(\d+)/); + if (!match || match[1] >= 74) { + match = userAgent.match(/Chrome\/(\d+)/); + if (match) version = +match[1]; + } + } + + var engineV8Version = version; + + /* eslint-disable es/no-symbol -- required for testing */ + var V8_VERSION$2 = engineV8Version; + var fails$h = fails$l; + var global$d = global$g; + + var $String$5 = global$d.String; + + // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing + var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$h(function () { + var symbol = Symbol('symbol detection'); + // Chrome 38 Symbol has incorrect toString conversion + // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances + // nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will, + // of course, fail. + return !$String$5(symbol) || !(Object(symbol) instanceof Symbol) || + // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances + !Symbol.sham && V8_VERSION$2 && V8_VERSION$2 < 41; + }); + + /* eslint-disable es/no-symbol -- required for testing */ + var NATIVE_SYMBOL$1 = symbolConstructorDetection; + + var useSymbolAsUid = NATIVE_SYMBOL$1 + && !Symbol.sham + && typeof Symbol.iterator == 'symbol'; + + var getBuiltIn$3 = getBuiltIn$4; + var isCallable$e = isCallable$h; + var isPrototypeOf$2 = objectIsPrototypeOf; + var USE_SYMBOL_AS_UID$1 = useSymbolAsUid; + + var $Object$3 = Object; + + var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) { + return typeof it == 'symbol'; + } : function (it) { + var $Symbol = getBuiltIn$3('Symbol'); + return isCallable$e($Symbol) && isPrototypeOf$2($Symbol.prototype, $Object$3(it)); + }; + + var $String$4 = String; + + var tryToString$2 = function (argument) { + try { + return $String$4(argument); + } catch (error) { + return 'Object'; + } + }; + + var isCallable$d = isCallable$h; + var tryToString$1 = tryToString$2; + + var $TypeError$a = TypeError; + + // `Assert: IsCallable(argument) is true` + var aCallable$4 = function (argument) { + if (isCallable$d(argument)) return argument; + throw new $TypeError$a(tryToString$1(argument) + ' is not a function'); + }; + + var aCallable$3 = aCallable$4; + var isNullOrUndefined$2 = isNullOrUndefined$4; + + // `GetMethod` abstract operation + // https://tc39.es/ecma262/#sec-getmethod + var getMethod$3 = function (V, P) { + var func = V[P]; + return isNullOrUndefined$2(func) ? undefined : aCallable$3(func); + }; + + var call$b = functionCall; + var isCallable$c = isCallable$h; + var isObject$9 = isObject$a; + + var $TypeError$9 = TypeError; + + // `OrdinaryToPrimitive` abstract operation + // https://tc39.es/ecma262/#sec-ordinarytoprimitive + var ordinaryToPrimitive$1 = function (input, pref) { + var fn, val; + if (pref === 'string' && isCallable$c(fn = input.toString) && !isObject$9(val = call$b(fn, input))) return val; + if (isCallable$c(fn = input.valueOf) && !isObject$9(val = call$b(fn, input))) return val; + if (pref !== 'string' && isCallable$c(fn = input.toString) && !isObject$9(val = call$b(fn, input))) return val; + throw new $TypeError$9("Can't convert object to primitive value"); + }; + + var sharedStore = {exports: {}}; + + var isPure = false; + + var global$c = global$g; + + // eslint-disable-next-line es/no-object-defineproperty -- safe + var defineProperty$6 = Object.defineProperty; + + var defineGlobalProperty$3 = function (key, value) { + try { + defineProperty$6(global$c, key, { value: value, configurable: true, writable: true }); + } catch (error) { + global$c[key] = value; + } return value; + }; + + var globalThis$1 = global$g; + var defineGlobalProperty$2 = defineGlobalProperty$3; + + var SHARED = '__core-js_shared__'; + var store$3 = sharedStore.exports = globalThis$1[SHARED] || defineGlobalProperty$2(SHARED, {}); + + (store$3.versions || (store$3.versions = [])).push({ + version: '3.36.0', + mode: 'global', + copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)', + license: 'https://github.com/zloirock/core-js/blob/v3.36.0/LICENSE', + source: 'https://github.com/zloirock/core-js' + }); + + var sharedStoreExports = sharedStore.exports; + + var store$2 = sharedStoreExports; + + var shared$4 = function (key, value) { + return store$2[key] || (store$2[key] = value || {}); + }; + + var requireObjectCoercible$2 = requireObjectCoercible$4; + + var $Object$2 = Object; + + // `ToObject` abstract operation + // https://tc39.es/ecma262/#sec-toobject + var toObject$4 = function (argument) { + return $Object$2(requireObjectCoercible$2(argument)); + }; + + var uncurryThis$f = functionUncurryThis; + var toObject$3 = toObject$4; + + var hasOwnProperty = uncurryThis$f({}.hasOwnProperty); + + // `HasOwnProperty` abstract operation + // https://tc39.es/ecma262/#sec-hasownproperty + // eslint-disable-next-line es/no-object-hasown -- safe + var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) { + return hasOwnProperty(toObject$3(it), key); + }; + + var uncurryThis$e = functionUncurryThis; + + var id = 0; + var postfix = Math.random(); + var toString$6 = uncurryThis$e(1.0.toString); + + var uid$2 = function (key) { + return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$6(++id + postfix, 36); + }; + + var global$b = global$g; + var shared$3 = shared$4; + var hasOwn$a = hasOwnProperty_1; + var uid$1 = uid$2; + var NATIVE_SYMBOL = symbolConstructorDetection; + var USE_SYMBOL_AS_UID = useSymbolAsUid; + + var Symbol$1 = global$b.Symbol; + var WellKnownSymbolsStore = shared$3('wks'); + var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1['for'] || Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1; + + var wellKnownSymbol$f = function (name) { + if (!hasOwn$a(WellKnownSymbolsStore, name)) { + WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn$a(Symbol$1, name) + ? Symbol$1[name] + : createWellKnownSymbol('Symbol.' + name); + } return WellKnownSymbolsStore[name]; + }; + + var call$a = functionCall; + var isObject$8 = isObject$a; + var isSymbol$1 = isSymbol$2; + var getMethod$2 = getMethod$3; + var ordinaryToPrimitive = ordinaryToPrimitive$1; + var wellKnownSymbol$e = wellKnownSymbol$f; + + var $TypeError$8 = TypeError; + var TO_PRIMITIVE = wellKnownSymbol$e('toPrimitive'); + + // `ToPrimitive` abstract operation + // https://tc39.es/ecma262/#sec-toprimitive + var toPrimitive$1 = function (input, pref) { + if (!isObject$8(input) || isSymbol$1(input)) return input; + var exoticToPrim = getMethod$2(input, TO_PRIMITIVE); + var result; + if (exoticToPrim) { + if (pref === undefined) pref = 'default'; + result = call$a(exoticToPrim, input, pref); + if (!isObject$8(result) || isSymbol$1(result)) return result; + throw new $TypeError$8("Can't convert object to primitive value"); + } + if (pref === undefined) pref = 'number'; + return ordinaryToPrimitive(input, pref); + }; + + var toPrimitive = toPrimitive$1; + var isSymbol = isSymbol$2; + + // `ToPropertyKey` abstract operation + // https://tc39.es/ecma262/#sec-topropertykey + var toPropertyKey$2 = function (argument) { + var key = toPrimitive(argument, 'string'); + return isSymbol(key) ? key : key + ''; + }; + + var global$a = global$g; + var isObject$7 = isObject$a; + + var document$1 = global$a.document; + // typeof document.createElement is 'object' in old IE + var EXISTS$1 = isObject$7(document$1) && isObject$7(document$1.createElement); + + var documentCreateElement$2 = function (it) { + return EXISTS$1 ? document$1.createElement(it) : {}; + }; + + var DESCRIPTORS$e = descriptors; + var fails$g = fails$l; + var createElement = documentCreateElement$2; + + // Thanks to IE8 for its funny defineProperty + var ie8DomDefine = !DESCRIPTORS$e && !fails$g(function () { + // eslint-disable-next-line es/no-object-defineproperty -- required for testing + return Object.defineProperty(createElement('div'), 'a', { + get: function () { return 7; } + }).a !== 7; + }); + + var DESCRIPTORS$d = descriptors; + var call$9 = functionCall; + var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable; + var createPropertyDescriptor$4 = createPropertyDescriptor$5; + var toIndexedObject$5 = toIndexedObject$6; + var toPropertyKey$1 = toPropertyKey$2; + var hasOwn$9 = hasOwnProperty_1; + var IE8_DOM_DEFINE$1 = ie8DomDefine; + + // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe + var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor; + + // `Object.getOwnPropertyDescriptor` method + // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor + objectGetOwnPropertyDescriptor.f = DESCRIPTORS$d ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) { + O = toIndexedObject$5(O); + P = toPropertyKey$1(P); + if (IE8_DOM_DEFINE$1) try { + return $getOwnPropertyDescriptor$1(O, P); + } catch (error) { /* empty */ } + if (hasOwn$9(O, P)) return createPropertyDescriptor$4(!call$9(propertyIsEnumerableModule$1.f, O, P), O[P]); + }; + + var objectDefineProperty = {}; + + var DESCRIPTORS$c = descriptors; + var fails$f = fails$l; + + // V8 ~ Chrome 36- + // https://bugs.chromium.org/p/v8/issues/detail?id=3334 + var v8PrototypeDefineBug = DESCRIPTORS$c && fails$f(function () { + // eslint-disable-next-line es/no-object-defineproperty -- required for testing + return Object.defineProperty(function () { /* empty */ }, 'prototype', { + value: 42, + writable: false + }).prototype !== 42; + }); + + var isObject$6 = isObject$a; + + var $String$3 = String; + var $TypeError$7 = TypeError; + + // `Assert: Type(argument) is Object` + var anObject$b = function (argument) { + if (isObject$6(argument)) return argument; + throw new $TypeError$7($String$3(argument) + ' is not an object'); + }; + + var DESCRIPTORS$b = descriptors; + var IE8_DOM_DEFINE = ie8DomDefine; + var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug; + var anObject$a = anObject$b; + var toPropertyKey = toPropertyKey$2; + + var $TypeError$6 = TypeError; + // eslint-disable-next-line es/no-object-defineproperty -- safe + var $defineProperty = Object.defineProperty; + // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe + var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; + var ENUMERABLE = 'enumerable'; + var CONFIGURABLE$1 = 'configurable'; + var WRITABLE = 'writable'; + + // `Object.defineProperty` method + // https://tc39.es/ecma262/#sec-object.defineproperty + objectDefineProperty.f = DESCRIPTORS$b ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) { + anObject$a(O); + P = toPropertyKey(P); + anObject$a(Attributes); + if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) { + var current = $getOwnPropertyDescriptor(O, P); + if (current && current[WRITABLE]) { + O[P] = Attributes.value; + Attributes = { + configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1], + enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE], + writable: false + }; + } + } return $defineProperty(O, P, Attributes); + } : $defineProperty : function defineProperty(O, P, Attributes) { + anObject$a(O); + P = toPropertyKey(P); + anObject$a(Attributes); + if (IE8_DOM_DEFINE) try { + return $defineProperty(O, P, Attributes); + } catch (error) { /* empty */ } + if ('get' in Attributes || 'set' in Attributes) throw new $TypeError$6('Accessors not supported'); + if ('value' in Attributes) O[P] = Attributes.value; + return O; + }; + + var DESCRIPTORS$a = descriptors; + var definePropertyModule$4 = objectDefineProperty; + var createPropertyDescriptor$3 = createPropertyDescriptor$5; + + var createNonEnumerableProperty$5 = DESCRIPTORS$a ? function (object, key, value) { + return definePropertyModule$4.f(object, key, createPropertyDescriptor$3(1, value)); + } : function (object, key, value) { + object[key] = value; + return object; + }; + + var makeBuiltIn$3 = {exports: {}}; + + var DESCRIPTORS$9 = descriptors; + var hasOwn$8 = hasOwnProperty_1; + + var FunctionPrototype = Function.prototype; + // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe + var getDescriptor = DESCRIPTORS$9 && Object.getOwnPropertyDescriptor; + + var EXISTS = hasOwn$8(FunctionPrototype, 'name'); + // additional protection from minified / mangled / dropped function names + var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something'; + var CONFIGURABLE = EXISTS && (!DESCRIPTORS$9 || (DESCRIPTORS$9 && getDescriptor(FunctionPrototype, 'name').configurable)); + + var functionName = { + EXISTS: EXISTS, + PROPER: PROPER, + CONFIGURABLE: CONFIGURABLE + }; + + var uncurryThis$d = functionUncurryThis; + var isCallable$b = isCallable$h; + var store$1 = sharedStoreExports; + + var functionToString = uncurryThis$d(Function.toString); + + // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper + if (!isCallable$b(store$1.inspectSource)) { + store$1.inspectSource = function (it) { + return functionToString(it); + }; + } + + var inspectSource$2 = store$1.inspectSource; + + var global$9 = global$g; + var isCallable$a = isCallable$h; + + var WeakMap$1 = global$9.WeakMap; + + var weakMapBasicDetection = isCallable$a(WeakMap$1) && /native code/.test(String(WeakMap$1)); + + var shared$2 = shared$4; + var uid = uid$2; + + var keys = shared$2('keys'); + + var sharedKey$3 = function (key) { + return keys[key] || (keys[key] = uid(key)); + }; + + var hiddenKeys$4 = {}; + + var NATIVE_WEAK_MAP = weakMapBasicDetection; + var global$8 = global$g; + var isObject$5 = isObject$a; + var createNonEnumerableProperty$4 = createNonEnumerableProperty$5; + var hasOwn$7 = hasOwnProperty_1; + var shared$1 = sharedStoreExports; + var sharedKey$2 = sharedKey$3; + var hiddenKeys$3 = hiddenKeys$4; + + var OBJECT_ALREADY_INITIALIZED = 'Object already initialized'; + var TypeError$2 = global$8.TypeError; + var WeakMap = global$8.WeakMap; + var set, get, has; + + var enforce = function (it) { + return has(it) ? get(it) : set(it, {}); + }; + + var getterFor = function (TYPE) { + return function (it) { + var state; + if (!isObject$5(it) || (state = get(it)).type !== TYPE) { + throw new TypeError$2('Incompatible receiver, ' + TYPE + ' required'); + } return state; + }; + }; + + if (NATIVE_WEAK_MAP || shared$1.state) { + var store = shared$1.state || (shared$1.state = new WeakMap()); + /* eslint-disable no-self-assign -- prototype methods protection */ + store.get = store.get; + store.has = store.has; + store.set = store.set; + /* eslint-enable no-self-assign -- prototype methods protection */ + set = function (it, metadata) { + if (store.has(it)) throw new TypeError$2(OBJECT_ALREADY_INITIALIZED); + metadata.facade = it; + store.set(it, metadata); + return metadata; + }; + get = function (it) { + return store.get(it) || {}; + }; + has = function (it) { + return store.has(it); + }; + } else { + var STATE = sharedKey$2('state'); + hiddenKeys$3[STATE] = true; + set = function (it, metadata) { + if (hasOwn$7(it, STATE)) throw new TypeError$2(OBJECT_ALREADY_INITIALIZED); + metadata.facade = it; + createNonEnumerableProperty$4(it, STATE, metadata); + return metadata; + }; + get = function (it) { + return hasOwn$7(it, STATE) ? it[STATE] : {}; + }; + has = function (it) { + return hasOwn$7(it, STATE); + }; + } + + var internalState = { + set: set, + get: get, + has: has, + enforce: enforce, + getterFor: getterFor + }; + + var uncurryThis$c = functionUncurryThis; + var fails$e = fails$l; + var isCallable$9 = isCallable$h; + var hasOwn$6 = hasOwnProperty_1; + var DESCRIPTORS$8 = descriptors; + var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE; + var inspectSource$1 = inspectSource$2; + var InternalStateModule$3 = internalState; + + var enforceInternalState = InternalStateModule$3.enforce; + var getInternalState$3 = InternalStateModule$3.get; + var $String$2 = String; + // eslint-disable-next-line es/no-object-defineproperty -- safe + var defineProperty$5 = Object.defineProperty; + var stringSlice$3 = uncurryThis$c(''.slice); + var replace$2 = uncurryThis$c(''.replace); + var join$1 = uncurryThis$c([].join); + + var CONFIGURABLE_LENGTH = DESCRIPTORS$8 && !fails$e(function () { + return defineProperty$5(function () { /* empty */ }, 'length', { value: 8 }).length !== 8; + }); + + var TEMPLATE = String(String).split('String'); + + var makeBuiltIn$2 = makeBuiltIn$3.exports = function (value, name, options) { + if (stringSlice$3($String$2(name), 0, 7) === 'Symbol(') { + name = '[' + replace$2($String$2(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']'; + } + if (options && options.getter) name = 'get ' + name; + if (options && options.setter) name = 'set ' + name; + if (!hasOwn$6(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) { + if (DESCRIPTORS$8) defineProperty$5(value, 'name', { value: name, configurable: true }); + else value.name = name; + } + if (CONFIGURABLE_LENGTH && options && hasOwn$6(options, 'arity') && value.length !== options.arity) { + defineProperty$5(value, 'length', { value: options.arity }); + } + try { + if (options && hasOwn$6(options, 'constructor') && options.constructor) { + if (DESCRIPTORS$8) defineProperty$5(value, 'prototype', { writable: false }); + // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable + } else if (value.prototype) value.prototype = undefined; + } catch (error) { /* empty */ } + var state = enforceInternalState(value); + if (!hasOwn$6(state, 'source')) { + state.source = join$1(TEMPLATE, typeof name == 'string' ? name : ''); + } return value; + }; + + // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative + // eslint-disable-next-line no-extend-native -- required + Function.prototype.toString = makeBuiltIn$2(function toString() { + return isCallable$9(this) && getInternalState$3(this).source || inspectSource$1(this); + }, 'toString'); + + var makeBuiltInExports = makeBuiltIn$3.exports; + + var isCallable$8 = isCallable$h; + var definePropertyModule$3 = objectDefineProperty; + var makeBuiltIn$1 = makeBuiltInExports; + var defineGlobalProperty$1 = defineGlobalProperty$3; + + var defineBuiltIn$8 = function (O, key, value, options) { + if (!options) options = {}; + var simple = options.enumerable; + var name = options.name !== undefined ? options.name : key; + if (isCallable$8(value)) makeBuiltIn$1(value, name, options); + if (options.global) { + if (simple) O[key] = value; + else defineGlobalProperty$1(key, value); + } else { + try { + if (!options.unsafe) delete O[key]; + else if (O[key]) simple = true; + } catch (error) { /* empty */ } + if (simple) O[key] = value; + else definePropertyModule$3.f(O, key, { + value: value, + enumerable: false, + configurable: !options.nonConfigurable, + writable: !options.nonWritable + }); + } return O; + }; + + var objectGetOwnPropertyNames = {}; + + var ceil = Math.ceil; + var floor$1 = Math.floor; + + // `Math.trunc` method + // https://tc39.es/ecma262/#sec-math.trunc + // eslint-disable-next-line es/no-math-trunc -- safe + var mathTrunc = Math.trunc || function trunc(x) { + var n = +x; + return (n > 0 ? floor$1 : ceil)(n); + }; + + var trunc = mathTrunc; + + // `ToIntegerOrInfinity` abstract operation + // https://tc39.es/ecma262/#sec-tointegerorinfinity + var toIntegerOrInfinity$3 = function (argument) { + var number = +argument; + // eslint-disable-next-line no-self-compare -- NaN check + return number !== number || number === 0 ? 0 : trunc(number); + }; + + var toIntegerOrInfinity$2 = toIntegerOrInfinity$3; + + var max = Math.max; + var min$1 = Math.min; + + // Helper for a popular repeating case of the spec: + // Let integer be ? ToInteger(index). + // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length). + var toAbsoluteIndex$1 = function (index, length) { + var integer = toIntegerOrInfinity$2(index); + return integer < 0 ? max(integer + length, 0) : min$1(integer, length); + }; + + var toIntegerOrInfinity$1 = toIntegerOrInfinity$3; + + var min = Math.min; + + // `ToLength` abstract operation + // https://tc39.es/ecma262/#sec-tolength + var toLength$1 = function (argument) { + var len = toIntegerOrInfinity$1(argument); + return len > 0 ? min(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991 + }; + + var toLength = toLength$1; + + // `LengthOfArrayLike` abstract operation + // https://tc39.es/ecma262/#sec-lengthofarraylike + var lengthOfArrayLike$2 = function (obj) { + return toLength(obj.length); + }; + + var toIndexedObject$4 = toIndexedObject$6; + var toAbsoluteIndex = toAbsoluteIndex$1; + var lengthOfArrayLike$1 = lengthOfArrayLike$2; + + // `Array.prototype.{ indexOf, includes }` methods implementation + var createMethod$2 = function (IS_INCLUDES) { + return function ($this, el, fromIndex) { + var O = toIndexedObject$4($this); + var length = lengthOfArrayLike$1(O); + if (length === 0) return !IS_INCLUDES && -1; + var index = toAbsoluteIndex(fromIndex, length); + var value; + // Array#includes uses SameValueZero equality algorithm + // eslint-disable-next-line no-self-compare -- NaN check + if (IS_INCLUDES && el !== el) while (length > index) { + value = O[index++]; + // eslint-disable-next-line no-self-compare -- NaN check + if (value !== value) return true; + // Array#indexOf ignores holes, Array#includes - not + } else for (;length > index; index++) { + if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0; + } return !IS_INCLUDES && -1; + }; + }; + + var arrayIncludes = { + // `Array.prototype.includes` method + // https://tc39.es/ecma262/#sec-array.prototype.includes + includes: createMethod$2(true), + // `Array.prototype.indexOf` method + // https://tc39.es/ecma262/#sec-array.prototype.indexof + indexOf: createMethod$2(false) + }; + + var uncurryThis$b = functionUncurryThis; + var hasOwn$5 = hasOwnProperty_1; + var toIndexedObject$3 = toIndexedObject$6; + var indexOf$1 = arrayIncludes.indexOf; + var hiddenKeys$2 = hiddenKeys$4; + + var push$2 = uncurryThis$b([].push); + + var objectKeysInternal = function (object, names) { + var O = toIndexedObject$3(object); + var i = 0; + var result = []; + var key; + for (key in O) !hasOwn$5(hiddenKeys$2, key) && hasOwn$5(O, key) && push$2(result, key); + // Don't enum bug & hidden keys + while (names.length > i) if (hasOwn$5(O, key = names[i++])) { + ~indexOf$1(result, key) || push$2(result, key); + } + return result; + }; + + // IE8- don't enum bug keys + var enumBugKeys$3 = [ + 'constructor', + 'hasOwnProperty', + 'isPrototypeOf', + 'propertyIsEnumerable', + 'toLocaleString', + 'toString', + 'valueOf' + ]; + + var internalObjectKeys$1 = objectKeysInternal; + var enumBugKeys$2 = enumBugKeys$3; + + var hiddenKeys$1 = enumBugKeys$2.concat('length', 'prototype'); + + // `Object.getOwnPropertyNames` method + // https://tc39.es/ecma262/#sec-object.getownpropertynames + // eslint-disable-next-line es/no-object-getownpropertynames -- safe + objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { + return internalObjectKeys$1(O, hiddenKeys$1); + }; + + var objectGetOwnPropertySymbols = {}; + + // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe + objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols; + + var getBuiltIn$2 = getBuiltIn$4; + var uncurryThis$a = functionUncurryThis; + var getOwnPropertyNamesModule = objectGetOwnPropertyNames; + var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols; + var anObject$9 = anObject$b; + + var concat$1 = uncurryThis$a([].concat); + + // all object keys, includes non-enumerable and symbols + var ownKeys$1 = getBuiltIn$2('Reflect', 'ownKeys') || function ownKeys(it) { + var keys = getOwnPropertyNamesModule.f(anObject$9(it)); + var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f; + return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys; + }; + + var hasOwn$4 = hasOwnProperty_1; + var ownKeys = ownKeys$1; + var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor; + var definePropertyModule$2 = objectDefineProperty; + + var copyConstructorProperties$1 = function (target, source, exceptions) { + var keys = ownKeys(source); + var defineProperty = definePropertyModule$2.f; + var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f; + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + if (!hasOwn$4(target, key) && !(exceptions && hasOwn$4(exceptions, key))) { + defineProperty(target, key, getOwnPropertyDescriptor(source, key)); + } + } + }; + + var fails$d = fails$l; + var isCallable$7 = isCallable$h; + + var replacement = /#|\.prototype\./; + + var isForced$1 = function (feature, detection) { + var value = data[normalize(feature)]; + return value === POLYFILL ? true + : value === NATIVE ? false + : isCallable$7(detection) ? fails$d(detection) + : !!detection; + }; + + var normalize = isForced$1.normalize = function (string) { + return String(string).replace(replacement, '.').toLowerCase(); + }; + + var data = isForced$1.data = {}; + var NATIVE = isForced$1.NATIVE = 'N'; + var POLYFILL = isForced$1.POLYFILL = 'P'; + + var isForced_1 = isForced$1; + + var global$7 = global$g; + var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f; + var createNonEnumerableProperty$3 = createNonEnumerableProperty$5; + var defineBuiltIn$7 = defineBuiltIn$8; + var defineGlobalProperty = defineGlobalProperty$3; + var copyConstructorProperties = copyConstructorProperties$1; + var isForced = isForced_1; + + /* + options.target - name of the target object + options.global - target is the global object + options.stat - export as static methods of target + options.proto - export as prototype methods of target + options.real - real prototype method for the `pure` version + options.forced - export even if the native feature is available + options.bind - bind methods to the target, required for the `pure` version + options.wrap - wrap constructors to preventing global pollution, required for the `pure` version + options.unsafe - use the simple assignment of property instead of delete + defineProperty + options.sham - add a flag to not completely full polyfills + options.enumerable - export as enumerable property + options.dontCallGetSet - prevent calling a getter on target + options.name - the .name of the function if it does not match the key + */ + var _export = function (options, source) { + var TARGET = options.target; + var GLOBAL = options.global; + var STATIC = options.stat; + var FORCED, target, key, targetProperty, sourceProperty, descriptor; + if (GLOBAL) { + target = global$7; + } else if (STATIC) { + target = global$7[TARGET] || defineGlobalProperty(TARGET, {}); + } else { + target = global$7[TARGET] && global$7[TARGET].prototype; + } + if (target) for (key in source) { + sourceProperty = source[key]; + if (options.dontCallGetSet) { + descriptor = getOwnPropertyDescriptor$1(target, key); + targetProperty = descriptor && descriptor.value; + } else targetProperty = target[key]; + FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced); + // contained in target + if (!FORCED && targetProperty !== undefined) { + if (typeof sourceProperty == typeof targetProperty) continue; + copyConstructorProperties(sourceProperty, targetProperty); + } + // add a flag to not completely full polyfills + if (options.sham || (targetProperty && targetProperty.sham)) { + createNonEnumerableProperty$3(sourceProperty, 'sham', true); + } + defineBuiltIn$7(target, key, sourceProperty, options); + } + }; + + var classof$7 = classofRaw$2; + + // `IsArray` abstract operation + // https://tc39.es/ecma262/#sec-isarray + // eslint-disable-next-line es/no-array-isarray -- safe + var isArray$2 = Array.isArray || function isArray(argument) { + return classof$7(argument) === 'Array'; + }; + + var $TypeError$5 = TypeError; + var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; // 2 ** 53 - 1 == 9007199254740991 + + var doesNotExceedSafeInteger$1 = function (it) { + if (it > MAX_SAFE_INTEGER) throw $TypeError$5('Maximum allowed index exceeded'); + return it; + }; + + var DESCRIPTORS$7 = descriptors; + var definePropertyModule$1 = objectDefineProperty; + var createPropertyDescriptor$2 = createPropertyDescriptor$5; + + var createProperty$1 = function (object, key, value) { + if (DESCRIPTORS$7) definePropertyModule$1.f(object, key, createPropertyDescriptor$2(0, value)); + else object[key] = value; + }; + + var wellKnownSymbol$d = wellKnownSymbol$f; + + var TO_STRING_TAG$2 = wellKnownSymbol$d('toStringTag'); + var test = {}; + + test[TO_STRING_TAG$2] = 'z'; + + var toStringTagSupport = String(test) === '[object z]'; + + var TO_STRING_TAG_SUPPORT$2 = toStringTagSupport; + var isCallable$6 = isCallable$h; + var classofRaw$1 = classofRaw$2; + var wellKnownSymbol$c = wellKnownSymbol$f; + + var TO_STRING_TAG$1 = wellKnownSymbol$c('toStringTag'); + var $Object$1 = Object; + + // ES3 wrong here + var CORRECT_ARGUMENTS = classofRaw$1(function () { return arguments; }()) === 'Arguments'; + + // fallback for IE11 Script Access Denied error + var tryGet = function (it, key) { + try { + return it[key]; + } catch (error) { /* empty */ } + }; + + // getting tag from ES6+ `Object.prototype.toString` + var classof$6 = TO_STRING_TAG_SUPPORT$2 ? classofRaw$1 : function (it) { + var O, tag, result; + return it === undefined ? 'Undefined' : it === null ? 'Null' + // @@toStringTag case + : typeof (tag = tryGet(O = $Object$1(it), TO_STRING_TAG$1)) == 'string' ? tag + // builtinTag case + : CORRECT_ARGUMENTS ? classofRaw$1(O) + // ES3 arguments fallback + : (result = classofRaw$1(O)) === 'Object' && isCallable$6(O.callee) ? 'Arguments' : result; + }; + + var uncurryThis$9 = functionUncurryThis; + var fails$c = fails$l; + var isCallable$5 = isCallable$h; + var classof$5 = classof$6; + var getBuiltIn$1 = getBuiltIn$4; + var inspectSource = inspectSource$2; + + var noop = function () { /* empty */ }; + var construct = getBuiltIn$1('Reflect', 'construct'); + var constructorRegExp = /^\s*(?:class|function)\b/; + var exec$1 = uncurryThis$9(constructorRegExp.exec); + var INCORRECT_TO_STRING = !constructorRegExp.test(noop); + + var isConstructorModern = function isConstructor(argument) { + if (!isCallable$5(argument)) return false; + try { + construct(noop, [], argument); + return true; + } catch (error) { + return false; + } + }; + + var isConstructorLegacy = function isConstructor(argument) { + if (!isCallable$5(argument)) return false; + switch (classof$5(argument)) { + case 'AsyncFunction': + case 'GeneratorFunction': + case 'AsyncGeneratorFunction': return false; + } + try { + // we can't check .prototype since constructors produced by .bind haven't it + // `Function#toString` throws on some built-it function in some legacy engines + // (for example, `DOMQuad` and similar in FF41-) + return INCORRECT_TO_STRING || !!exec$1(constructorRegExp, inspectSource(argument)); + } catch (error) { + return true; + } + }; + + isConstructorLegacy.sham = true; + + // `IsConstructor` abstract operation + // https://tc39.es/ecma262/#sec-isconstructor + var isConstructor$1 = !construct || fails$c(function () { + var called; + return isConstructorModern(isConstructorModern.call) + || !isConstructorModern(Object) + || !isConstructorModern(function () { called = true; }) + || called; + }) ? isConstructorLegacy : isConstructorModern; + + var isArray$1 = isArray$2; + var isConstructor = isConstructor$1; + var isObject$4 = isObject$a; + var wellKnownSymbol$b = wellKnownSymbol$f; + + var SPECIES$2 = wellKnownSymbol$b('species'); + var $Array = Array; + + // a part of `ArraySpeciesCreate` abstract operation + // https://tc39.es/ecma262/#sec-arrayspeciescreate + var arraySpeciesConstructor$1 = function (originalArray) { + var C; + if (isArray$1(originalArray)) { + C = originalArray.constructor; + // cross-realm fallback + if (isConstructor(C) && (C === $Array || isArray$1(C.prototype))) C = undefined; + else if (isObject$4(C)) { + C = C[SPECIES$2]; + if (C === null) C = undefined; + } + } return C === undefined ? $Array : C; + }; + + var arraySpeciesConstructor = arraySpeciesConstructor$1; + + // `ArraySpeciesCreate` abstract operation + // https://tc39.es/ecma262/#sec-arrayspeciescreate + var arraySpeciesCreate$1 = function (originalArray, length) { + return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length); + }; + + var fails$b = fails$l; + var wellKnownSymbol$a = wellKnownSymbol$f; + var V8_VERSION$1 = engineV8Version; + + var SPECIES$1 = wellKnownSymbol$a('species'); + + var arrayMethodHasSpeciesSupport$1 = function (METHOD_NAME) { + // We can't use this feature detection in V8 since it causes + // deoptimization and serious performance degradation + // https://github.com/zloirock/core-js/issues/677 + return V8_VERSION$1 >= 51 || !fails$b(function () { + var array = []; + var constructor = array.constructor = {}; + constructor[SPECIES$1] = function () { + return { foo: 1 }; + }; + return array[METHOD_NAME](Boolean).foo !== 1; + }); + }; + + var $$5 = _export; + var fails$a = fails$l; + var isArray = isArray$2; + var isObject$3 = isObject$a; + var toObject$2 = toObject$4; + var lengthOfArrayLike = lengthOfArrayLike$2; + var doesNotExceedSafeInteger = doesNotExceedSafeInteger$1; + var createProperty = createProperty$1; + var arraySpeciesCreate = arraySpeciesCreate$1; + var arrayMethodHasSpeciesSupport = arrayMethodHasSpeciesSupport$1; + var wellKnownSymbol$9 = wellKnownSymbol$f; + var V8_VERSION = engineV8Version; + + var IS_CONCAT_SPREADABLE = wellKnownSymbol$9('isConcatSpreadable'); + + // We can't use this feature detection in V8 since it causes + // deoptimization and serious performance degradation + // https://github.com/zloirock/core-js/issues/679 + var IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || !fails$a(function () { + var array = []; + array[IS_CONCAT_SPREADABLE] = false; + return array.concat()[0] !== array; + }); + + var isConcatSpreadable = function (O) { + if (!isObject$3(O)) return false; + var spreadable = O[IS_CONCAT_SPREADABLE]; + return spreadable !== undefined ? !!spreadable : isArray(O); + }; + + var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !arrayMethodHasSpeciesSupport('concat'); + + // `Array.prototype.concat` method + // https://tc39.es/ecma262/#sec-array.prototype.concat + // with adding support of @@isConcatSpreadable and @@species + $$5({ target: 'Array', proto: true, arity: 1, forced: FORCED }, { + // eslint-disable-next-line no-unused-vars -- required for `.length` + concat: function concat(arg) { + var O = toObject$2(this); + var A = arraySpeciesCreate(O, 0); + var n = 0; + var i, k, length, len, E; + for (i = -1, length = arguments.length; i < length; i++) { + E = i === -1 ? O : arguments[i]; + if (isConcatSpreadable(E)) { + len = lengthOfArrayLike(E); + doesNotExceedSafeInteger(n + len); + for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]); + } else { + doesNotExceedSafeInteger(n + 1); + createProperty(A, n++, E); + } + } + A.length = n; + return A; + } + }); + + var objectDefineProperties = {}; + + var internalObjectKeys = objectKeysInternal; + var enumBugKeys$1 = enumBugKeys$3; + + // `Object.keys` method + // https://tc39.es/ecma262/#sec-object.keys + // eslint-disable-next-line es/no-object-keys -- safe + var objectKeys$3 = Object.keys || function keys(O) { + return internalObjectKeys(O, enumBugKeys$1); + }; + + var DESCRIPTORS$6 = descriptors; + var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug; + var definePropertyModule = objectDefineProperty; + var anObject$8 = anObject$b; + var toIndexedObject$2 = toIndexedObject$6; + var objectKeys$2 = objectKeys$3; + + // `Object.defineProperties` method + // https://tc39.es/ecma262/#sec-object.defineproperties + // eslint-disable-next-line es/no-object-defineproperties -- safe + objectDefineProperties.f = DESCRIPTORS$6 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) { + anObject$8(O); + var props = toIndexedObject$2(Properties); + var keys = objectKeys$2(Properties); + var length = keys.length; + var index = 0; + var key; + while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]); + return O; + }; + + var getBuiltIn = getBuiltIn$4; + + var html$1 = getBuiltIn('document', 'documentElement'); + + /* global ActiveXObject -- old IE, WSH */ + var anObject$7 = anObject$b; + var definePropertiesModule = objectDefineProperties; + var enumBugKeys = enumBugKeys$3; + var hiddenKeys = hiddenKeys$4; + var html = html$1; + var documentCreateElement$1 = documentCreateElement$2; + var sharedKey$1 = sharedKey$3; + + var GT = '>'; + var LT = '<'; + var PROTOTYPE = 'prototype'; + var SCRIPT = 'script'; + var IE_PROTO$1 = sharedKey$1('IE_PROTO'); + + var EmptyConstructor = function () { /* empty */ }; + + var scriptTag = function (content) { + return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT; + }; + + // Create object with fake `null` prototype: use ActiveX Object with cleared prototype + var NullProtoObjectViaActiveX = function (activeXDocument) { + activeXDocument.write(scriptTag('')); + activeXDocument.close(); + var temp = activeXDocument.parentWindow.Object; + activeXDocument = null; // avoid memory leak + return temp; + }; + + // Create object with fake `null` prototype: use iframe Object with cleared prototype + var NullProtoObjectViaIFrame = function () { + // Thrash, waste and sodomy: IE GC bug + var iframe = documentCreateElement$1('iframe'); + var JS = 'java' + SCRIPT + ':'; + var iframeDocument; + iframe.style.display = 'none'; + html.appendChild(iframe); + // https://github.com/zloirock/core-js/issues/475 + iframe.src = String(JS); + iframeDocument = iframe.contentWindow.document; + iframeDocument.open(); + iframeDocument.write(scriptTag('document.F=Object')); + iframeDocument.close(); + return iframeDocument.F; + }; + + // Check for document.domain and active x support + // No need to use active x approach when document.domain is not set + // see https://github.com/es-shims/es5-shim/issues/150 + // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346 + // avoid IE GC bug + var activeXDocument; + var NullProtoObject = function () { + try { + activeXDocument = new ActiveXObject('htmlfile'); + } catch (error) { /* ignore */ } + NullProtoObject = typeof document != 'undefined' + ? document.domain && activeXDocument + ? NullProtoObjectViaActiveX(activeXDocument) // old IE + : NullProtoObjectViaIFrame() + : NullProtoObjectViaActiveX(activeXDocument); // WSH + var length = enumBugKeys.length; + while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]]; + return NullProtoObject(); + }; + + hiddenKeys[IE_PROTO$1] = true; + + // `Object.create` method + // https://tc39.es/ecma262/#sec-object.create + // eslint-disable-next-line es/no-object-create -- safe + var objectCreate = Object.create || function create(O, Properties) { + var result; + if (O !== null) { + EmptyConstructor[PROTOTYPE] = anObject$7(O); + result = new EmptyConstructor(); + EmptyConstructor[PROTOTYPE] = null; + // add "__proto__" for Object.getPrototypeOf polyfill + result[IE_PROTO$1] = O; + } else result = NullProtoObject(); + return Properties === undefined ? result : definePropertiesModule.f(result, Properties); + }; + + var wellKnownSymbol$8 = wellKnownSymbol$f; + var create$3 = objectCreate; + var defineProperty$4 = objectDefineProperty.f; + + var UNSCOPABLES = wellKnownSymbol$8('unscopables'); + var ArrayPrototype = Array.prototype; + + // Array.prototype[@@unscopables] + // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables + if (ArrayPrototype[UNSCOPABLES] === undefined) { + defineProperty$4(ArrayPrototype, UNSCOPABLES, { + configurable: true, + value: create$3(null) + }); + } + + // add a key to Array.prototype[@@unscopables] + var addToUnscopables$1 = function (key) { + ArrayPrototype[UNSCOPABLES][key] = true; + }; + + var iterators = {}; + + var fails$9 = fails$l; + + var correctPrototypeGetter = !fails$9(function () { + function F() { /* empty */ } + F.prototype.constructor = null; + // eslint-disable-next-line es/no-object-getprototypeof -- required for testing + return Object.getPrototypeOf(new F()) !== F.prototype; + }); + + var hasOwn$3 = hasOwnProperty_1; + var isCallable$4 = isCallable$h; + var toObject$1 = toObject$4; + var sharedKey = sharedKey$3; + var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter; + + var IE_PROTO = sharedKey('IE_PROTO'); + var $Object = Object; + var ObjectPrototype = $Object.prototype; + + // `Object.getPrototypeOf` method + // https://tc39.es/ecma262/#sec-object.getprototypeof + // eslint-disable-next-line es/no-object-getprototypeof -- safe + var objectGetPrototypeOf$1 = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : function (O) { + var object = toObject$1(O); + if (hasOwn$3(object, IE_PROTO)) return object[IE_PROTO]; + var constructor = object.constructor; + if (isCallable$4(constructor) && object instanceof constructor) { + return constructor.prototype; + } return object instanceof $Object ? ObjectPrototype : null; + }; + + var fails$8 = fails$l; + var isCallable$3 = isCallable$h; + var isObject$2 = isObject$a; + var getPrototypeOf$1 = objectGetPrototypeOf$1; + var defineBuiltIn$6 = defineBuiltIn$8; + var wellKnownSymbol$7 = wellKnownSymbol$f; + + var ITERATOR$5 = wellKnownSymbol$7('iterator'); + var BUGGY_SAFARI_ITERATORS$1 = false; + + // `%IteratorPrototype%` object + // https://tc39.es/ecma262/#sec-%iteratorprototype%-object + var IteratorPrototype$2, PrototypeOfArrayIteratorPrototype, arrayIterator; + + /* eslint-disable es/no-array-prototype-keys -- safe */ + if ([].keys) { + arrayIterator = [].keys(); + // Safari 8 has buggy iterators w/o `next` + if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS$1 = true; + else { + PrototypeOfArrayIteratorPrototype = getPrototypeOf$1(getPrototypeOf$1(arrayIterator)); + if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype$2 = PrototypeOfArrayIteratorPrototype; + } + } + + var NEW_ITERATOR_PROTOTYPE = !isObject$2(IteratorPrototype$2) || fails$8(function () { + var test = {}; + // FF44- legacy iterators case + return IteratorPrototype$2[ITERATOR$5].call(test) !== test; + }); + + if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$2 = {}; + + // `%IteratorPrototype%[@@iterator]()` method + // https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator + if (!isCallable$3(IteratorPrototype$2[ITERATOR$5])) { + defineBuiltIn$6(IteratorPrototype$2, ITERATOR$5, function () { + return this; + }); + } + + var iteratorsCore = { + IteratorPrototype: IteratorPrototype$2, + BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS$1 + }; + + var defineProperty$3 = objectDefineProperty.f; + var hasOwn$2 = hasOwnProperty_1; + var wellKnownSymbol$6 = wellKnownSymbol$f; + + var TO_STRING_TAG = wellKnownSymbol$6('toStringTag'); + + var setToStringTag$4 = function (target, TAG, STATIC) { + if (target && !STATIC) target = target.prototype; + if (target && !hasOwn$2(target, TO_STRING_TAG)) { + defineProperty$3(target, TO_STRING_TAG, { configurable: true, value: TAG }); + } + }; + + var IteratorPrototype$1 = iteratorsCore.IteratorPrototype; + var create$2 = objectCreate; + var createPropertyDescriptor$1 = createPropertyDescriptor$5; + var setToStringTag$3 = setToStringTag$4; + var Iterators$3 = iterators; + + var returnThis$1 = function () { return this; }; + + var iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) { + var TO_STRING_TAG = NAME + ' Iterator'; + IteratorConstructor.prototype = create$2(IteratorPrototype$1, { next: createPropertyDescriptor$1(+!ENUMERABLE_NEXT, next) }); + setToStringTag$3(IteratorConstructor, TO_STRING_TAG, false); + Iterators$3[TO_STRING_TAG] = returnThis$1; + return IteratorConstructor; + }; + + var uncurryThis$8 = functionUncurryThis; + var aCallable$2 = aCallable$4; + + var functionUncurryThisAccessor = function (object, key, method) { + try { + // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe + return uncurryThis$8(aCallable$2(Object.getOwnPropertyDescriptor(object, key)[method])); + } catch (error) { /* empty */ } + }; + + var isObject$1 = isObject$a; + + var isPossiblePrototype$1 = function (argument) { + return isObject$1(argument) || argument === null; + }; + + var isPossiblePrototype = isPossiblePrototype$1; + + var $String$1 = String; + var $TypeError$4 = TypeError; + + var aPossiblePrototype$1 = function (argument) { + if (isPossiblePrototype(argument)) return argument; + throw new $TypeError$4("Can't set " + $String$1(argument) + ' as a prototype'); + }; + + /* eslint-disable no-proto -- safe */ + var uncurryThisAccessor = functionUncurryThisAccessor; + var anObject$6 = anObject$b; + var aPossiblePrototype = aPossiblePrototype$1; + + // `Object.setPrototypeOf` method + // https://tc39.es/ecma262/#sec-object.setprototypeof + // Works with __proto__ only. Old v8 can't work with null proto objects. + // eslint-disable-next-line es/no-object-setprototypeof -- safe + var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () { + var CORRECT_SETTER = false; + var test = {}; + var setter; + try { + setter = uncurryThisAccessor(Object.prototype, '__proto__', 'set'); + setter(test, []); + CORRECT_SETTER = test instanceof Array; + } catch (error) { /* empty */ } + return function setPrototypeOf(O, proto) { + anObject$6(O); + aPossiblePrototype(proto); + if (CORRECT_SETTER) setter(O, proto); + else O.__proto__ = proto; + return O; + }; + }() : undefined); + + var $$4 = _export; + var call$8 = functionCall; + var FunctionName = functionName; + var isCallable$2 = isCallable$h; + var createIteratorConstructor$1 = iteratorCreateConstructor; + var getPrototypeOf = objectGetPrototypeOf$1; + var setPrototypeOf = objectSetPrototypeOf; + var setToStringTag$2 = setToStringTag$4; + var createNonEnumerableProperty$2 = createNonEnumerableProperty$5; + var defineBuiltIn$5 = defineBuiltIn$8; + var wellKnownSymbol$5 = wellKnownSymbol$f; + var Iterators$2 = iterators; + var IteratorsCore = iteratorsCore; + + var PROPER_FUNCTION_NAME$1 = FunctionName.PROPER; + var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE; + var IteratorPrototype = IteratorsCore.IteratorPrototype; + var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS; + var ITERATOR$4 = wellKnownSymbol$5('iterator'); + var KEYS = 'keys'; + var VALUES = 'values'; + var ENTRIES = 'entries'; + + var returnThis = function () { return this; }; + + var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) { + createIteratorConstructor$1(IteratorConstructor, NAME, next); + + var getIterationMethod = function (KIND) { + if (KIND === DEFAULT && defaultIterator) return defaultIterator; + if (!BUGGY_SAFARI_ITERATORS && KIND && KIND in IterablePrototype) return IterablePrototype[KIND]; + + switch (KIND) { + case KEYS: return function keys() { return new IteratorConstructor(this, KIND); }; + case VALUES: return function values() { return new IteratorConstructor(this, KIND); }; + case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); }; + } + + return function () { return new IteratorConstructor(this); }; + }; + + var TO_STRING_TAG = NAME + ' Iterator'; + var INCORRECT_VALUES_NAME = false; + var IterablePrototype = Iterable.prototype; + var nativeIterator = IterablePrototype[ITERATOR$4] + || IterablePrototype['@@iterator'] + || DEFAULT && IterablePrototype[DEFAULT]; + var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT); + var anyNativeIterator = NAME === 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator; + var CurrentIteratorPrototype, methods, KEY; + + // fix native + if (anyNativeIterator) { + CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable())); + if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) { + if (getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) { + if (setPrototypeOf) { + setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype); + } else if (!isCallable$2(CurrentIteratorPrototype[ITERATOR$4])) { + defineBuiltIn$5(CurrentIteratorPrototype, ITERATOR$4, returnThis); + } + } + // Set @@toStringTag to native iterators + setToStringTag$2(CurrentIteratorPrototype, TO_STRING_TAG, true); + } + } + + // fix Array.prototype.{ values, @@iterator }.name in V8 / FF + if (PROPER_FUNCTION_NAME$1 && DEFAULT === VALUES && nativeIterator && nativeIterator.name !== VALUES) { + if (CONFIGURABLE_FUNCTION_NAME) { + createNonEnumerableProperty$2(IterablePrototype, 'name', VALUES); + } else { + INCORRECT_VALUES_NAME = true; + defaultIterator = function values() { return call$8(nativeIterator, this); }; + } + } + + // export additional methods + if (DEFAULT) { + methods = { + values: getIterationMethod(VALUES), + keys: IS_SET ? defaultIterator : getIterationMethod(KEYS), + entries: getIterationMethod(ENTRIES) + }; + if (FORCED) for (KEY in methods) { + if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) { + defineBuiltIn$5(IterablePrototype, KEY, methods[KEY]); + } + } else $$4({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods); + } + + // define iterator + if (IterablePrototype[ITERATOR$4] !== defaultIterator) { + defineBuiltIn$5(IterablePrototype, ITERATOR$4, defaultIterator, { name: DEFAULT }); + } + Iterators$2[NAME] = defaultIterator; + + return methods; + }; + + // `CreateIterResultObject` abstract operation + // https://tc39.es/ecma262/#sec-createiterresultobject + var createIterResultObject$3 = function (value, done) { + return { value: value, done: done }; + }; + + var toIndexedObject$1 = toIndexedObject$6; + var addToUnscopables = addToUnscopables$1; + var Iterators$1 = iterators; + var InternalStateModule$2 = internalState; + var defineProperty$2 = objectDefineProperty.f; + var defineIterator$1 = iteratorDefine; + var createIterResultObject$2 = createIterResultObject$3; + var DESCRIPTORS$5 = descriptors; + + var ARRAY_ITERATOR = 'Array Iterator'; + var setInternalState$2 = InternalStateModule$2.set; + var getInternalState$2 = InternalStateModule$2.getterFor(ARRAY_ITERATOR); + + // `Array.prototype.entries` method + // https://tc39.es/ecma262/#sec-array.prototype.entries + // `Array.prototype.keys` method + // https://tc39.es/ecma262/#sec-array.prototype.keys + // `Array.prototype.values` method + // https://tc39.es/ecma262/#sec-array.prototype.values + // `Array.prototype[@@iterator]` method + // https://tc39.es/ecma262/#sec-array.prototype-@@iterator + // `CreateArrayIterator` internal method + // https://tc39.es/ecma262/#sec-createarrayiterator + var es_array_iterator = defineIterator$1(Array, 'Array', function (iterated, kind) { + setInternalState$2(this, { + type: ARRAY_ITERATOR, + target: toIndexedObject$1(iterated), // target + index: 0, // next index + kind: kind // kind + }); + // `%ArrayIteratorPrototype%.next` method + // https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next + }, function () { + var state = getInternalState$2(this); + var target = state.target; + var index = state.index++; + if (!target || index >= target.length) { + state.target = undefined; + return createIterResultObject$2(undefined, true); + } + switch (state.kind) { + case 'keys': return createIterResultObject$2(index, false); + case 'values': return createIterResultObject$2(target[index], false); + } return createIterResultObject$2([index, target[index]], false); + }, 'values'); + + // argumentsList[@@iterator] is %ArrayProto_values% + // https://tc39.es/ecma262/#sec-createunmappedargumentsobject + // https://tc39.es/ecma262/#sec-createmappedargumentsobject + var values = Iterators$1.Arguments = Iterators$1.Array; + + // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables + addToUnscopables('keys'); + addToUnscopables('values'); + addToUnscopables('entries'); + + // V8 ~ Chrome 45- bug + if (DESCRIPTORS$5 && values.name !== 'values') try { + defineProperty$2(values, 'name', { value: 'values' }); + } catch (error) { /* empty */ } + + var DESCRIPTORS$4 = descriptors; + var uncurryThis$7 = functionUncurryThis; + var call$7 = functionCall; + var fails$7 = fails$l; + var objectKeys$1 = objectKeys$3; + var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols; + var propertyIsEnumerableModule = objectPropertyIsEnumerable; + var toObject = toObject$4; + var IndexedObject = indexedObject; + + // eslint-disable-next-line es/no-object-assign -- safe + var $assign = Object.assign; + // eslint-disable-next-line es/no-object-defineproperty -- required for testing + var defineProperty$1 = Object.defineProperty; + var concat = uncurryThis$7([].concat); + + // `Object.assign` method + // https://tc39.es/ecma262/#sec-object.assign + var objectAssign = !$assign || fails$7(function () { + // should have correct order of operations (Edge bug) + if (DESCRIPTORS$4 && $assign({ b: 1 }, $assign(defineProperty$1({}, 'a', { + enumerable: true, + get: function () { + defineProperty$1(this, 'b', { + value: 3, + enumerable: false + }); + } + }), { b: 2 })).b !== 1) return true; + // should work with symbols and should have deterministic property order (V8 bug) + var A = {}; + var B = {}; + // eslint-disable-next-line es/no-symbol -- safe + var symbol = Symbol('assign detection'); + var alphabet = 'abcdefghijklmnopqrst'; + A[symbol] = 7; + alphabet.split('').forEach(function (chr) { B[chr] = chr; }); + return $assign({}, A)[symbol] !== 7 || objectKeys$1($assign({}, B)).join('') !== alphabet; + }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length` + var T = toObject(target); + var argumentsLength = arguments.length; + var index = 1; + var getOwnPropertySymbols = getOwnPropertySymbolsModule.f; + var propertyIsEnumerable = propertyIsEnumerableModule.f; + while (argumentsLength > index) { + var S = IndexedObject(arguments[index++]); + var keys = getOwnPropertySymbols ? concat(objectKeys$1(S), getOwnPropertySymbols(S)) : objectKeys$1(S); + var length = keys.length; + var j = 0; + var key; + while (length > j) { + key = keys[j++]; + if (!DESCRIPTORS$4 || call$7(propertyIsEnumerable, S, key)) T[key] = S[key]; + } + } return T; + } : $assign; + + var $$3 = _export; + var assign = objectAssign; + + // `Object.assign` method + // https://tc39.es/ecma262/#sec-object.assign + // eslint-disable-next-line es/no-object-assign -- required for testing + $$3({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, { + assign: assign + }); + + var DESCRIPTORS$3 = descriptors; + var fails$6 = fails$l; + var uncurryThis$6 = functionUncurryThis; + var objectGetPrototypeOf = objectGetPrototypeOf$1; + var objectKeys = objectKeys$3; + var toIndexedObject = toIndexedObject$6; + var $propertyIsEnumerable = objectPropertyIsEnumerable.f; + + var propertyIsEnumerable = uncurryThis$6($propertyIsEnumerable); + var push$1 = uncurryThis$6([].push); + + // in some IE versions, `propertyIsEnumerable` returns incorrect result on integer keys + // of `null` prototype objects + var IE_BUG = DESCRIPTORS$3 && fails$6(function () { + // eslint-disable-next-line es/no-object-create -- safe + var O = Object.create(null); + O[2] = 2; + return !propertyIsEnumerable(O, 2); + }); + + // `Object.{ entries, values }` methods implementation + var createMethod$1 = function (TO_ENTRIES) { + return function (it) { + var O = toIndexedObject(it); + var keys = objectKeys(O); + var IE_WORKAROUND = IE_BUG && objectGetPrototypeOf(O) === null; + var length = keys.length; + var i = 0; + var result = []; + var key; + while (length > i) { + key = keys[i++]; + if (!DESCRIPTORS$3 || (IE_WORKAROUND ? key in O : propertyIsEnumerable(O, key))) { + push$1(result, TO_ENTRIES ? [key, O[key]] : O[key]); + } + } + return result; + }; + }; + + var objectToArray = { + // `Object.entries` method + // https://tc39.es/ecma262/#sec-object.entries + entries: createMethod$1(true), + // `Object.values` method + // https://tc39.es/ecma262/#sec-object.values + values: createMethod$1(false) + }; + + var $$2 = _export; + var $entries = objectToArray.entries; + + // `Object.entries` method + // https://tc39.es/ecma262/#sec-object.entries + $$2({ target: 'Object', stat: true }, { + entries: function entries(O) { + return $entries(O); + } + }); + + var TO_STRING_TAG_SUPPORT$1 = toStringTagSupport; + var classof$4 = classof$6; + + // `Object.prototype.toString` method implementation + // https://tc39.es/ecma262/#sec-object.prototype.tostring + var objectToString = TO_STRING_TAG_SUPPORT$1 ? {}.toString : function toString() { + return '[object ' + classof$4(this) + ']'; + }; + + var TO_STRING_TAG_SUPPORT = toStringTagSupport; + var defineBuiltIn$4 = defineBuiltIn$8; + var toString$5 = objectToString; + + // `Object.prototype.toString` method + // https://tc39.es/ecma262/#sec-object.prototype.tostring + if (!TO_STRING_TAG_SUPPORT) { + defineBuiltIn$4(Object.prototype, 'toString', toString$5, { unsafe: true }); + } + + var classof$3 = classof$6; + + var $String = String; + + var toString$4 = function (argument) { + if (classof$3(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string'); + return $String(argument); + }; + + var anObject$5 = anObject$b; + + // `RegExp.prototype.flags` getter implementation + // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags + var regexpFlags$1 = function () { + var that = anObject$5(this); + var result = ''; + if (that.hasIndices) result += 'd'; + if (that.global) result += 'g'; + if (that.ignoreCase) result += 'i'; + if (that.multiline) result += 'm'; + if (that.dotAll) result += 's'; + if (that.unicode) result += 'u'; + if (that.unicodeSets) result += 'v'; + if (that.sticky) result += 'y'; + return result; + }; + + var fails$5 = fails$l; + var global$6 = global$g; + + // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError + var $RegExp$2 = global$6.RegExp; + + var UNSUPPORTED_Y$1 = fails$5(function () { + var re = $RegExp$2('a', 'y'); + re.lastIndex = 2; + return re.exec('abcd') !== null; + }); + + // UC Browser bug + // https://github.com/zloirock/core-js/issues/1008 + var MISSED_STICKY = UNSUPPORTED_Y$1 || fails$5(function () { + return !$RegExp$2('a', 'y').sticky; + }); + + var BROKEN_CARET = UNSUPPORTED_Y$1 || fails$5(function () { + // https://bugzilla.mozilla.org/show_bug.cgi?id=773687 + var re = $RegExp$2('^r', 'gy'); + re.lastIndex = 2; + return re.exec('str') !== null; + }); + + var regexpStickyHelpers = { + BROKEN_CARET: BROKEN_CARET, + MISSED_STICKY: MISSED_STICKY, + UNSUPPORTED_Y: UNSUPPORTED_Y$1 + }; + + var fails$4 = fails$l; + var global$5 = global$g; + + // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError + var $RegExp$1 = global$5.RegExp; + + var regexpUnsupportedDotAll = fails$4(function () { + var re = $RegExp$1('.', 's'); + return !(re.dotAll && re.test('\n') && re.flags === 's'); + }); + + var fails$3 = fails$l; + var global$4 = global$g; + + // babel-minify and Closure Compiler transpiles RegExp('(?b)', 'g') -> /(?b)/g and it causes SyntaxError + var $RegExp = global$4.RegExp; + + var regexpUnsupportedNcg = fails$3(function () { + var re = $RegExp('(?b)', 'g'); + return re.exec('b').groups.a !== 'b' || + 'b'.replace(re, '$c') !== 'bc'; + }); + + /* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */ + /* eslint-disable regexp/no-useless-quantifier -- testing */ + var call$6 = functionCall; + var uncurryThis$5 = functionUncurryThis; + var toString$3 = toString$4; + var regexpFlags = regexpFlags$1; + var stickyHelpers = regexpStickyHelpers; + var shared = shared$4; + var create$1 = objectCreate; + var getInternalState$1 = internalState.get; + var UNSUPPORTED_DOT_ALL = regexpUnsupportedDotAll; + var UNSUPPORTED_NCG = regexpUnsupportedNcg; + + var nativeReplace = shared('native-string-replace', String.prototype.replace); + var nativeExec = RegExp.prototype.exec; + var patchedExec = nativeExec; + var charAt$3 = uncurryThis$5(''.charAt); + var indexOf = uncurryThis$5(''.indexOf); + var replace$1 = uncurryThis$5(''.replace); + var stringSlice$2 = uncurryThis$5(''.slice); + + var UPDATES_LAST_INDEX_WRONG = (function () { + var re1 = /a/; + var re2 = /b*/g; + call$6(nativeExec, re1, 'a'); + call$6(nativeExec, re2, 'a'); + return re1.lastIndex !== 0 || re2.lastIndex !== 0; + })(); + + var UNSUPPORTED_Y = stickyHelpers.BROKEN_CARET; + + // nonparticipating capturing group, copied from es5-shim's String#split patch. + var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined; + + var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG; + + if (PATCH) { + patchedExec = function exec(string) { + var re = this; + var state = getInternalState$1(re); + var str = toString$3(string); + var raw = state.raw; + var result, reCopy, lastIndex, match, i, object, group; + + if (raw) { + raw.lastIndex = re.lastIndex; + result = call$6(patchedExec, raw, str); + re.lastIndex = raw.lastIndex; + return result; + } + + var groups = state.groups; + var sticky = UNSUPPORTED_Y && re.sticky; + var flags = call$6(regexpFlags, re); + var source = re.source; + var charsAdded = 0; + var strCopy = str; + + if (sticky) { + flags = replace$1(flags, 'y', ''); + if (indexOf(flags, 'g') === -1) { + flags += 'g'; + } + + strCopy = stringSlice$2(str, re.lastIndex); + // Support anchored sticky behavior. + if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt$3(str, re.lastIndex - 1) !== '\n')) { + source = '(?: ' + source + ')'; + strCopy = ' ' + strCopy; + charsAdded++; + } + // ^(? + rx + ) is needed, in combination with some str slicing, to + // simulate the 'y' flag. + reCopy = new RegExp('^(?:' + source + ')', flags); + } + + if (NPCG_INCLUDED) { + reCopy = new RegExp('^' + source + '$(?!\\s)', flags); + } + if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex; + + match = call$6(nativeExec, sticky ? reCopy : re, strCopy); + + if (sticky) { + if (match) { + match.input = stringSlice$2(match.input, charsAdded); + match[0] = stringSlice$2(match[0], charsAdded); + match.index = re.lastIndex; + re.lastIndex += match[0].length; + } else re.lastIndex = 0; + } else if (UPDATES_LAST_INDEX_WRONG && match) { + re.lastIndex = re.global ? match.index + match[0].length : lastIndex; + } + if (NPCG_INCLUDED && match && match.length > 1) { + // Fix browsers whose `exec` methods don't consistently return `undefined` + // for NPCG, like IE8. NOTE: This doesn't work for /(.?)?/ + call$6(nativeReplace, match[0], reCopy, function () { + for (i = 1; i < arguments.length - 2; i++) { + if (arguments[i] === undefined) match[i] = undefined; + } + }); + } + + if (match && groups) { + match.groups = object = create$1(null); + for (i = 0; i < groups.length; i++) { + group = groups[i]; + object[group[0]] = match[group[1]]; + } + } + + return match; + }; + } + + var regexpExec$2 = patchedExec; + + var $$1 = _export; + var exec = regexpExec$2; + + // `RegExp.prototype.exec` method + // https://tc39.es/ecma262/#sec-regexp.prototype.exec + $$1({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, { + exec: exec + }); + + var call$5 = functionCall; + var hasOwn$1 = hasOwnProperty_1; + var isPrototypeOf$1 = objectIsPrototypeOf; + var regExpFlags = regexpFlags$1; + + var RegExpPrototype$2 = RegExp.prototype; + + var regexpGetFlags = function (R) { + var flags = R.flags; + return flags === undefined && !('flags' in RegExpPrototype$2) && !hasOwn$1(R, 'flags') && isPrototypeOf$1(RegExpPrototype$2, R) + ? call$5(regExpFlags, R) : flags; + }; + + var PROPER_FUNCTION_NAME = functionName.PROPER; + var defineBuiltIn$3 = defineBuiltIn$8; + var anObject$4 = anObject$b; + var $toString$1 = toString$4; + var fails$2 = fails$l; + var getRegExpFlags = regexpGetFlags; + + var TO_STRING = 'toString'; + var RegExpPrototype$1 = RegExp.prototype; + var nativeToString = RegExpPrototype$1[TO_STRING]; + + var NOT_GENERIC = fails$2(function () { return nativeToString.call({ source: 'a', flags: 'b' }) !== '/a/b'; }); + // FF44- RegExp#toString has a wrong name + var INCORRECT_NAME = PROPER_FUNCTION_NAME && nativeToString.name !== TO_STRING; + + // `RegExp.prototype.toString` method + // https://tc39.es/ecma262/#sec-regexp.prototype.tostring + if (NOT_GENERIC || INCORRECT_NAME) { + defineBuiltIn$3(RegExpPrototype$1, TO_STRING, function toString() { + var R = anObject$4(this); + var pattern = $toString$1(R.source); + var flags = $toString$1(getRegExpFlags(R)); + return '/' + pattern + '/' + flags; + }, { unsafe: true }); + } + + var uncurryThis$4 = functionUncurryThis; + var toIntegerOrInfinity = toIntegerOrInfinity$3; + var toString$2 = toString$4; + var requireObjectCoercible$1 = requireObjectCoercible$4; + + var charAt$2 = uncurryThis$4(''.charAt); + var charCodeAt = uncurryThis$4(''.charCodeAt); + var stringSlice$1 = uncurryThis$4(''.slice); + + var createMethod = function (CONVERT_TO_STRING) { + return function ($this, pos) { + var S = toString$2(requireObjectCoercible$1($this)); + var position = toIntegerOrInfinity(pos); + var size = S.length; + var first, second; + if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined; + first = charCodeAt(S, position); + return first < 0xD800 || first > 0xDBFF || position + 1 === size + || (second = charCodeAt(S, position + 1)) < 0xDC00 || second > 0xDFFF + ? CONVERT_TO_STRING + ? charAt$2(S, position) + : first + : CONVERT_TO_STRING + ? stringSlice$1(S, position, position + 2) + : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000; + }; + }; + + var stringMultibyte = { + // `String.prototype.codePointAt` method + // https://tc39.es/ecma262/#sec-string.prototype.codepointat + codeAt: createMethod(false), + // `String.prototype.at` method + // https://github.com/mathiasbynens/String.prototype.at + charAt: createMethod(true) + }; + + var charAt$1 = stringMultibyte.charAt; + var toString$1 = toString$4; + var InternalStateModule$1 = internalState; + var defineIterator = iteratorDefine; + var createIterResultObject$1 = createIterResultObject$3; + + var STRING_ITERATOR = 'String Iterator'; + var setInternalState$1 = InternalStateModule$1.set; + var getInternalState = InternalStateModule$1.getterFor(STRING_ITERATOR); + + // `String.prototype[@@iterator]` method + // https://tc39.es/ecma262/#sec-string.prototype-@@iterator + defineIterator(String, 'String', function (iterated) { + setInternalState$1(this, { + type: STRING_ITERATOR, + string: toString$1(iterated), + index: 0 + }); + // `%StringIteratorPrototype%.next` method + // https://tc39.es/ecma262/#sec-%stringiteratorprototype%.next + }, function next() { + var state = getInternalState(this); + var string = state.string; + var index = state.index; + var point; + if (index >= string.length) return createIterResultObject$1(undefined, true); + point = charAt$1(string, index); + state.index += point.length; + return createIterResultObject$1(point, false); + }); + + // TODO: Remove from `core-js@4` since it's moved to entry points + + var call$4 = functionCall; + var defineBuiltIn$2 = defineBuiltIn$8; + var regexpExec$1 = regexpExec$2; + var fails$1 = fails$l; + var wellKnownSymbol$4 = wellKnownSymbol$f; + var createNonEnumerableProperty$1 = createNonEnumerableProperty$5; + + var SPECIES = wellKnownSymbol$4('species'); + var RegExpPrototype = RegExp.prototype; + + var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) { + var SYMBOL = wellKnownSymbol$4(KEY); + + var DELEGATES_TO_SYMBOL = !fails$1(function () { + // String methods call symbol-named RegExp methods + var O = {}; + O[SYMBOL] = function () { return 7; }; + return ''[KEY](O) !== 7; + }); + + var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails$1(function () { + // Symbol-named RegExp methods call .exec + var execCalled = false; + var re = /a/; + + if (KEY === 'split') { + // We can't use real regex here since it causes deoptimization + // and serious performance degradation in V8 + // https://github.com/zloirock/core-js/issues/306 + re = {}; + // RegExp[@@split] doesn't call the regex's exec method, but first creates + // a new one. We need to return the patched regex when creating the new one. + re.constructor = {}; + re.constructor[SPECIES] = function () { return re; }; + re.flags = ''; + re[SYMBOL] = /./[SYMBOL]; + } + + re.exec = function () { + execCalled = true; + return null; + }; + + re[SYMBOL](''); + return !execCalled; + }); + + if ( + !DELEGATES_TO_SYMBOL || + !DELEGATES_TO_EXEC || + FORCED + ) { + var nativeRegExpMethod = /./[SYMBOL]; + var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) { + var $exec = regexp.exec; + if ($exec === regexpExec$1 || $exec === RegExpPrototype.exec) { + if (DELEGATES_TO_SYMBOL && !forceStringMethod) { + // The native String method already delegates to @@method (this + // polyfilled function), leasing to infinite recursion. + // We avoid it by directly calling the native @@method method. + return { done: true, value: call$4(nativeRegExpMethod, regexp, str, arg2) }; + } + return { done: true, value: call$4(nativeMethod, str, regexp, arg2) }; + } + return { done: false }; + }); + + defineBuiltIn$2(String.prototype, KEY, methods[0]); + defineBuiltIn$2(RegExpPrototype, SYMBOL, methods[1]); + } + + if (SHAM) createNonEnumerableProperty$1(RegExpPrototype[SYMBOL], 'sham', true); + }; + + // `SameValue` abstract operation + // https://tc39.es/ecma262/#sec-samevalue + // eslint-disable-next-line es/no-object-is -- safe + var sameValue$1 = Object.is || function is(x, y) { + // eslint-disable-next-line no-self-compare -- NaN check + return x === y ? x !== 0 || 1 / x === 1 / y : x !== x && y !== y; + }; + + var call$3 = functionCall; + var anObject$3 = anObject$b; + var isCallable$1 = isCallable$h; + var classof$2 = classofRaw$2; + var regexpExec = regexpExec$2; + + var $TypeError$3 = TypeError; + + // `RegExpExec` abstract operation + // https://tc39.es/ecma262/#sec-regexpexec + var regexpExecAbstract = function (R, S) { + var exec = R.exec; + if (isCallable$1(exec)) { + var result = call$3(exec, R, S); + if (result !== null) anObject$3(result); + return result; + } + if (classof$2(R) === 'RegExp') return call$3(regexpExec, R, S); + throw new $TypeError$3('RegExp#exec called on incompatible receiver'); + }; + + var call$2 = functionCall; + var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic; + var anObject$2 = anObject$b; + var isNullOrUndefined$1 = isNullOrUndefined$4; + var requireObjectCoercible = requireObjectCoercible$4; + var sameValue = sameValue$1; + var toString = toString$4; + var getMethod$1 = getMethod$3; + var regExpExec = regexpExecAbstract; + + // @@search logic + fixRegExpWellKnownSymbolLogic('search', function (SEARCH, nativeSearch, maybeCallNative) { + return [ + // `String.prototype.search` method + // https://tc39.es/ecma262/#sec-string.prototype.search + function search(regexp) { + var O = requireObjectCoercible(this); + var searcher = isNullOrUndefined$1(regexp) ? undefined : getMethod$1(regexp, SEARCH); + return searcher ? call$2(searcher, regexp, O) : new RegExp(regexp)[SEARCH](toString(O)); + }, + // `RegExp.prototype[@@search]` method + // https://tc39.es/ecma262/#sec-regexp.prototype-@@search + function (string) { + var rx = anObject$2(this); + var S = toString(string); + var res = maybeCallNative(nativeSearch, rx, S); + + if (res.done) return res.value; + + var previousLastIndex = rx.lastIndex; + if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0; + var result = regExpExec(rx, S); + if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex; + return result === null ? -1 : result.index; + } + ]; + }); + + // iterable DOM collections + // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods + var domIterables = { + CSSRuleList: 0, + CSSStyleDeclaration: 0, + CSSValueList: 0, + ClientRectList: 0, + DOMRectList: 0, + DOMStringList: 0, + DOMTokenList: 1, + DataTransferItemList: 0, + FileList: 0, + HTMLAllCollection: 0, + HTMLCollection: 0, + HTMLFormElement: 0, + HTMLSelectElement: 0, + MediaList: 0, + MimeTypeArray: 0, + NamedNodeMap: 0, + NodeList: 1, + PaintRequestList: 0, + Plugin: 0, + PluginArray: 0, + SVGLengthList: 0, + SVGNumberList: 0, + SVGPathSegList: 0, + SVGPointList: 0, + SVGStringList: 0, + SVGTransformList: 0, + SourceBufferList: 0, + StyleSheetList: 0, + TextTrackCueList: 0, + TextTrackList: 0, + TouchList: 0 + }; + + // in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList` + var documentCreateElement = documentCreateElement$2; + + var classList = documentCreateElement('span').classList; + var DOMTokenListPrototype$1 = classList && classList.constructor && classList.constructor.prototype; + + var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1; + + var global$3 = global$g; + var DOMIterables = domIterables; + var DOMTokenListPrototype = domTokenListPrototype; + var ArrayIteratorMethods = es_array_iterator; + var createNonEnumerableProperty = createNonEnumerableProperty$5; + var setToStringTag$1 = setToStringTag$4; + var wellKnownSymbol$3 = wellKnownSymbol$f; + + var ITERATOR$3 = wellKnownSymbol$3('iterator'); + var ArrayValues = ArrayIteratorMethods.values; + + var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) { + if (CollectionPrototype) { + // some Chrome versions have non-configurable methods on DOMTokenList + if (CollectionPrototype[ITERATOR$3] !== ArrayValues) try { + createNonEnumerableProperty(CollectionPrototype, ITERATOR$3, ArrayValues); + } catch (error) { + CollectionPrototype[ITERATOR$3] = ArrayValues; + } + setToStringTag$1(CollectionPrototype, COLLECTION_NAME, true); + if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) { + // some Chrome versions have non-configurable methods on DOMTokenList + if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try { + createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]); + } catch (error) { + CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME]; + } + } + } + }; + + for (var COLLECTION_NAME in DOMIterables) { + handlePrototype(global$3[COLLECTION_NAME] && global$3[COLLECTION_NAME].prototype, COLLECTION_NAME); + } + + handlePrototype(DOMTokenListPrototype, 'DOMTokenList'); + + var global$2 = global$g; + var DESCRIPTORS$2 = descriptors; + + // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe + var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; + + // Avoid NodeJS experimental warning + var safeGetBuiltIn$1 = function (name) { + if (!DESCRIPTORS$2) return global$2[name]; + var descriptor = getOwnPropertyDescriptor(global$2, name); + return descriptor && descriptor.value; + }; + + var fails = fails$l; + var wellKnownSymbol$2 = wellKnownSymbol$f; + var DESCRIPTORS$1 = descriptors; + var IS_PURE = isPure; + + var ITERATOR$2 = wellKnownSymbol$2('iterator'); + + var urlConstructorDetection = !fails(function () { + // eslint-disable-next-line unicorn/relative-url-style -- required for testing + var url = new URL('b?a=1&b=2&c=3', 'http://a'); + var params = url.searchParams; + var params2 = new URLSearchParams('a=1&a=2&b=3'); + var result = ''; + url.pathname = 'c%20d'; + params.forEach(function (value, key) { + params['delete']('b'); + result += key + value; + }); + params2['delete']('a', 2); + // `undefined` case is a Chromium 117 bug + // https://bugs.chromium.org/p/v8/issues/detail?id=14222 + params2['delete']('b', undefined); + return (IS_PURE && (!url.toJSON || !params2.has('a', 1) || params2.has('a', 2) || !params2.has('a', undefined) || params2.has('b'))) + || (!params.size && (IS_PURE || !DESCRIPTORS$1)) + || !params.sort + || url.href !== 'http://a/c%20d?a=1&c=3' + || params.get('c') !== '3' + || String(new URLSearchParams('?a=1')) !== 'a=1' + || !params[ITERATOR$2] + // throws in Edge + || new URL('https://a@b').username !== 'a' + || new URLSearchParams(new URLSearchParams('a=b')).get('a') !== 'b' + // not punycoded in Edge + || new URL('http://тест').host !== 'xn--e1aybc' + // not escaped in Chrome 62- + || new URL('http://a#б').hash !== '#%D0%B1' + // fails in Chrome 66- + || result !== 'a1c3' + // throws in Safari + || new URL('http://x', undefined).host !== 'x'; + }); + + var makeBuiltIn = makeBuiltInExports; + var defineProperty = objectDefineProperty; + + var defineBuiltInAccessor$1 = function (target, name, descriptor) { + if (descriptor.get) makeBuiltIn(descriptor.get, name, { getter: true }); + if (descriptor.set) makeBuiltIn(descriptor.set, name, { setter: true }); + return defineProperty.f(target, name, descriptor); + }; + + var defineBuiltIn$1 = defineBuiltIn$8; + + var defineBuiltIns$1 = function (target, src, options) { + for (var key in src) defineBuiltIn$1(target, key, src[key], options); + return target; + }; + + var isPrototypeOf = objectIsPrototypeOf; + + var $TypeError$2 = TypeError; + + var anInstance$1 = function (it, Prototype) { + if (isPrototypeOf(Prototype, it)) return it; + throw new $TypeError$2('Incorrect invocation'); + }; + + var classofRaw = classofRaw$2; + var uncurryThis$3 = functionUncurryThis; + + var functionUncurryThisClause = function (fn) { + // Nashorn bug: + // https://github.com/zloirock/core-js/issues/1128 + // https://github.com/zloirock/core-js/issues/1130 + if (classofRaw(fn) === 'Function') return uncurryThis$3(fn); + }; + + var uncurryThis$2 = functionUncurryThisClause; + var aCallable$1 = aCallable$4; + var NATIVE_BIND = functionBindNative; + + var bind$1 = uncurryThis$2(uncurryThis$2.bind); + + // optional / simple context binding + var functionBindContext = function (fn, that) { + aCallable$1(fn); + return that === undefined ? fn : NATIVE_BIND ? bind$1(fn, that) : function (/* ...args */) { + return fn.apply(that, arguments); + }; + }; + + var classof$1 = classof$6; + var getMethod = getMethod$3; + var isNullOrUndefined = isNullOrUndefined$4; + var Iterators = iterators; + var wellKnownSymbol$1 = wellKnownSymbol$f; + + var ITERATOR$1 = wellKnownSymbol$1('iterator'); + + var getIteratorMethod$2 = function (it) { + if (!isNullOrUndefined(it)) return getMethod(it, ITERATOR$1) + || getMethod(it, '@@iterator') + || Iterators[classof$1(it)]; + }; + + var call$1 = functionCall; + var aCallable = aCallable$4; + var anObject$1 = anObject$b; + var tryToString = tryToString$2; + var getIteratorMethod$1 = getIteratorMethod$2; + + var $TypeError$1 = TypeError; + + var getIterator$1 = function (argument, usingIterator) { + var iteratorMethod = arguments.length < 2 ? getIteratorMethod$1(argument) : usingIterator; + if (aCallable(iteratorMethod)) return anObject$1(call$1(iteratorMethod, argument)); + throw new $TypeError$1(tryToString(argument) + ' is not iterable'); + }; + + var $TypeError = TypeError; + + var validateArgumentsLength$1 = function (passed, required) { + if (passed < required) throw new $TypeError('Not enough arguments'); + return passed; + }; + + var uncurryThis$1 = functionUncurryThis; + + var arraySlice$1 = uncurryThis$1([].slice); + + var arraySlice = arraySlice$1; + + var floor = Math.floor; + + var sort = function (array, comparefn) { + var length = array.length; + + if (length < 8) { + // insertion sort + var i = 1; + var element, j; + + while (i < length) { + j = i; + element = array[i]; + while (j && comparefn(array[j - 1], element) > 0) { + array[j] = array[--j]; + } + if (j !== i++) array[j] = element; + } + } else { + // merge sort + var middle = floor(length / 2); + var left = sort(arraySlice(array, 0, middle), comparefn); + var right = sort(arraySlice(array, middle), comparefn); + var llength = left.length; + var rlength = right.length; + var lindex = 0; + var rindex = 0; + + while (lindex < llength || rindex < rlength) { + array[lindex + rindex] = (lindex < llength && rindex < rlength) + ? comparefn(left[lindex], right[rindex]) <= 0 ? left[lindex++] : right[rindex++] + : lindex < llength ? left[lindex++] : right[rindex++]; + } + } + + return array; + }; + + var arraySort$1 = sort; + + // TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env` + + var $ = _export; + var global$1 = global$g; + var safeGetBuiltIn = safeGetBuiltIn$1; + var call = functionCall; + var uncurryThis = functionUncurryThis; + var DESCRIPTORS = descriptors; + var USE_NATIVE_URL = urlConstructorDetection; + var defineBuiltIn = defineBuiltIn$8; + var defineBuiltInAccessor = defineBuiltInAccessor$1; + var defineBuiltIns = defineBuiltIns$1; + var setToStringTag = setToStringTag$4; + var createIteratorConstructor = iteratorCreateConstructor; + var InternalStateModule = internalState; + var anInstance = anInstance$1; + var isCallable = isCallable$h; + var hasOwn = hasOwnProperty_1; + var bind = functionBindContext; + var classof = classof$6; + var anObject = anObject$b; + var isObject = isObject$a; + var $toString = toString$4; + var create = objectCreate; + var createPropertyDescriptor = createPropertyDescriptor$5; + var getIterator = getIterator$1; + var getIteratorMethod = getIteratorMethod$2; + var createIterResultObject = createIterResultObject$3; + var validateArgumentsLength = validateArgumentsLength$1; + var wellKnownSymbol = wellKnownSymbol$f; + var arraySort = arraySort$1; + + var ITERATOR = wellKnownSymbol('iterator'); + var URL_SEARCH_PARAMS = 'URLSearchParams'; + var URL_SEARCH_PARAMS_ITERATOR = URL_SEARCH_PARAMS + 'Iterator'; + var setInternalState = InternalStateModule.set; + var getInternalParamsState = InternalStateModule.getterFor(URL_SEARCH_PARAMS); + var getInternalIteratorState = InternalStateModule.getterFor(URL_SEARCH_PARAMS_ITERATOR); + + var nativeFetch = safeGetBuiltIn('fetch'); + var NativeRequest = safeGetBuiltIn('Request'); + var Headers = safeGetBuiltIn('Headers'); + var RequestPrototype = NativeRequest && NativeRequest.prototype; + var HeadersPrototype = Headers && Headers.prototype; + var RegExp$1 = global$1.RegExp; + var TypeError$1 = global$1.TypeError; + var decodeURIComponent = global$1.decodeURIComponent; + var encodeURIComponent = global$1.encodeURIComponent; + var charAt = uncurryThis(''.charAt); + var join = uncurryThis([].join); + var push = uncurryThis([].push); + var replace = uncurryThis(''.replace); + var shift = uncurryThis([].shift); + var splice = uncurryThis([].splice); + var split = uncurryThis(''.split); + var stringSlice = uncurryThis(''.slice); + + var plus = /\+/g; + var sequences = Array(4); + + var percentSequence = function (bytes) { + return sequences[bytes - 1] || (sequences[bytes - 1] = RegExp$1('((?:%[\\da-f]{2}){' + bytes + '})', 'gi')); + }; + + var percentDecode = function (sequence) { + try { + return decodeURIComponent(sequence); + } catch (error) { + return sequence; + } + }; + + var deserialize = function (it) { + var result = replace(it, plus, ' '); + var bytes = 4; + try { + return decodeURIComponent(result); + } catch (error) { + while (bytes) { + result = replace(result, percentSequence(bytes--), percentDecode); + } + return result; + } + }; + + var find = /[!'()~]|%20/g; + + var replacements = { + '!': '%21', + "'": '%27', + '(': '%28', + ')': '%29', + '~': '%7E', + '%20': '+' + }; + + var replacer = function (match) { + return replacements[match]; + }; + + var serialize = function (it) { + return replace(encodeURIComponent(it), find, replacer); + }; + + var URLSearchParamsIterator = createIteratorConstructor(function Iterator(params, kind) { + setInternalState(this, { + type: URL_SEARCH_PARAMS_ITERATOR, + target: getInternalParamsState(params).entries, + index: 0, + kind: kind + }); + }, URL_SEARCH_PARAMS, function next() { + var state = getInternalIteratorState(this); + var target = state.target; + var index = state.index++; + if (!target || index >= target.length) { + state.target = undefined; + return createIterResultObject(undefined, true); + } + var entry = target[index]; + switch (state.kind) { + case 'keys': return createIterResultObject(entry.key, false); + case 'values': return createIterResultObject(entry.value, false); + } return createIterResultObject([entry.key, entry.value], false); + }, true); + + var URLSearchParamsState = function (init) { + this.entries = []; + this.url = null; + + if (init !== undefined) { + if (isObject(init)) this.parseObject(init); + else this.parseQuery(typeof init == 'string' ? charAt(init, 0) === '?' ? stringSlice(init, 1) : init : $toString(init)); + } + }; + + URLSearchParamsState.prototype = { + type: URL_SEARCH_PARAMS, + bindURL: function (url) { + this.url = url; + this.update(); + }, + parseObject: function (object) { + var entries = this.entries; + var iteratorMethod = getIteratorMethod(object); + var iterator, next, step, entryIterator, entryNext, first, second; + + if (iteratorMethod) { + iterator = getIterator(object, iteratorMethod); + next = iterator.next; + while (!(step = call(next, iterator)).done) { + entryIterator = getIterator(anObject(step.value)); + entryNext = entryIterator.next; + if ( + (first = call(entryNext, entryIterator)).done || + (second = call(entryNext, entryIterator)).done || + !call(entryNext, entryIterator).done + ) throw new TypeError$1('Expected sequence with length 2'); + push(entries, { key: $toString(first.value), value: $toString(second.value) }); + } + } else for (var key in object) if (hasOwn(object, key)) { + push(entries, { key: key, value: $toString(object[key]) }); + } + }, + parseQuery: function (query) { + if (query) { + var entries = this.entries; + var attributes = split(query, '&'); + var index = 0; + var attribute, entry; + while (index < attributes.length) { + attribute = attributes[index++]; + if (attribute.length) { + entry = split(attribute, '='); + push(entries, { + key: deserialize(shift(entry)), + value: deserialize(join(entry, '=')) + }); + } + } + } + }, + serialize: function () { + var entries = this.entries; + var result = []; + var index = 0; + var entry; + while (index < entries.length) { + entry = entries[index++]; + push(result, serialize(entry.key) + '=' + serialize(entry.value)); + } return join(result, '&'); + }, + update: function () { + this.entries.length = 0; + this.parseQuery(this.url.query); + }, + updateURL: function () { + if (this.url) this.url.update(); + } + }; + + // `URLSearchParams` constructor + // https://url.spec.whatwg.org/#interface-urlsearchparams + var URLSearchParamsConstructor = function URLSearchParams(/* init */) { + anInstance(this, URLSearchParamsPrototype); + var init = arguments.length > 0 ? arguments[0] : undefined; + var state = setInternalState(this, new URLSearchParamsState(init)); + if (!DESCRIPTORS) this.size = state.entries.length; + }; + + var URLSearchParamsPrototype = URLSearchParamsConstructor.prototype; + + defineBuiltIns(URLSearchParamsPrototype, { + // `URLSearchParams.prototype.append` method + // https://url.spec.whatwg.org/#dom-urlsearchparams-append + append: function append(name, value) { + var state = getInternalParamsState(this); + validateArgumentsLength(arguments.length, 2); + push(state.entries, { key: $toString(name), value: $toString(value) }); + if (!DESCRIPTORS) this.length++; + state.updateURL(); + }, + // `URLSearchParams.prototype.delete` method + // https://url.spec.whatwg.org/#dom-urlsearchparams-delete + 'delete': function (name /* , value */) { + var state = getInternalParamsState(this); + var length = validateArgumentsLength(arguments.length, 1); + var entries = state.entries; + var key = $toString(name); + var $value = length < 2 ? undefined : arguments[1]; + var value = $value === undefined ? $value : $toString($value); + var index = 0; + while (index < entries.length) { + var entry = entries[index]; + if (entry.key === key && (value === undefined || entry.value === value)) { + splice(entries, index, 1); + if (value !== undefined) break; + } else index++; + } + if (!DESCRIPTORS) this.size = entries.length; + state.updateURL(); + }, + // `URLSearchParams.prototype.get` method + // https://url.spec.whatwg.org/#dom-urlsearchparams-get + get: function get(name) { + var entries = getInternalParamsState(this).entries; + validateArgumentsLength(arguments.length, 1); + var key = $toString(name); + var index = 0; + for (; index < entries.length; index++) { + if (entries[index].key === key) return entries[index].value; + } + return null; + }, + // `URLSearchParams.prototype.getAll` method + // https://url.spec.whatwg.org/#dom-urlsearchparams-getall + getAll: function getAll(name) { + var entries = getInternalParamsState(this).entries; + validateArgumentsLength(arguments.length, 1); + var key = $toString(name); + var result = []; + var index = 0; + for (; index < entries.length; index++) { + if (entries[index].key === key) push(result, entries[index].value); + } + return result; + }, + // `URLSearchParams.prototype.has` method + // https://url.spec.whatwg.org/#dom-urlsearchparams-has + has: function has(name /* , value */) { + var entries = getInternalParamsState(this).entries; + var length = validateArgumentsLength(arguments.length, 1); + var key = $toString(name); + var $value = length < 2 ? undefined : arguments[1]; + var value = $value === undefined ? $value : $toString($value); + var index = 0; + while (index < entries.length) { + var entry = entries[index++]; + if (entry.key === key && (value === undefined || entry.value === value)) return true; + } + return false; + }, + // `URLSearchParams.prototype.set` method + // https://url.spec.whatwg.org/#dom-urlsearchparams-set + set: function set(name, value) { + var state = getInternalParamsState(this); + validateArgumentsLength(arguments.length, 1); + var entries = state.entries; + var found = false; + var key = $toString(name); + var val = $toString(value); + var index = 0; + var entry; + for (; index < entries.length; index++) { + entry = entries[index]; + if (entry.key === key) { + if (found) splice(entries, index--, 1); + else { + found = true; + entry.value = val; + } + } + } + if (!found) push(entries, { key: key, value: val }); + if (!DESCRIPTORS) this.size = entries.length; + state.updateURL(); + }, + // `URLSearchParams.prototype.sort` method + // https://url.spec.whatwg.org/#dom-urlsearchparams-sort + sort: function sort() { + var state = getInternalParamsState(this); + arraySort(state.entries, function (a, b) { + return a.key > b.key ? 1 : -1; + }); + state.updateURL(); + }, + // `URLSearchParams.prototype.forEach` method + forEach: function forEach(callback /* , thisArg */) { + var entries = getInternalParamsState(this).entries; + var boundFunction = bind(callback, arguments.length > 1 ? arguments[1] : undefined); + var index = 0; + var entry; + while (index < entries.length) { + entry = entries[index++]; + boundFunction(entry.value, entry.key, this); + } + }, + // `URLSearchParams.prototype.keys` method + keys: function keys() { + return new URLSearchParamsIterator(this, 'keys'); + }, + // `URLSearchParams.prototype.values` method + values: function values() { + return new URLSearchParamsIterator(this, 'values'); + }, + // `URLSearchParams.prototype.entries` method + entries: function entries() { + return new URLSearchParamsIterator(this, 'entries'); + } + }, { enumerable: true }); + + // `URLSearchParams.prototype[@@iterator]` method + defineBuiltIn(URLSearchParamsPrototype, ITERATOR, URLSearchParamsPrototype.entries, { name: 'entries' }); + + // `URLSearchParams.prototype.toString` method + // https://url.spec.whatwg.org/#urlsearchparams-stringification-behavior + defineBuiltIn(URLSearchParamsPrototype, 'toString', function toString() { + return getInternalParamsState(this).serialize(); + }, { enumerable: true }); + + // `URLSearchParams.prototype.size` getter + // https://github.com/whatwg/url/pull/734 + if (DESCRIPTORS) defineBuiltInAccessor(URLSearchParamsPrototype, 'size', { + get: function size() { + return getInternalParamsState(this).entries.length; + }, + configurable: true, + enumerable: true + }); + + setToStringTag(URLSearchParamsConstructor, URL_SEARCH_PARAMS); + + $({ global: true, constructor: true, forced: !USE_NATIVE_URL }, { + URLSearchParams: URLSearchParamsConstructor + }); + + // Wrap `fetch` and `Request` for correct work with polyfilled `URLSearchParams` + if (!USE_NATIVE_URL && isCallable(Headers)) { + var headersHas = uncurryThis(HeadersPrototype.has); + var headersSet = uncurryThis(HeadersPrototype.set); + + var wrapRequestOptions = function (init) { + if (isObject(init)) { + var body = init.body; + var headers; + if (classof(body) === URL_SEARCH_PARAMS) { + headers = init.headers ? new Headers(init.headers) : new Headers(); + if (!headersHas(headers, 'content-type')) { + headersSet(headers, 'content-type', 'application/x-www-form-urlencoded;charset=UTF-8'); + } + return create(init, { + body: createPropertyDescriptor(0, $toString(body)), + headers: createPropertyDescriptor(0, headers) + }); + } + } return init; + }; + + if (isCallable(nativeFetch)) { + $({ global: true, enumerable: true, dontCallGetSet: true, forced: true }, { + fetch: function fetch(input /* , init */) { + return nativeFetch(input, arguments.length > 1 ? wrapRequestOptions(arguments[1]) : {}); + } + }); + } + + if (isCallable(NativeRequest)) { + var RequestConstructor = function Request(input /* , init */) { + anInstance(this, RequestPrototype); + return new NativeRequest(input, arguments.length > 1 ? wrapRequestOptions(arguments[1]) : {}); + }; + + RequestPrototype.constructor = RequestConstructor; + RequestConstructor.prototype = RequestPrototype; + + $({ global: true, constructor: true, dontCallGetSet: true, forced: true }, { + Request: RequestConstructor + }); + } + } + + /** + * @author: general + * @website: note.generals.space + * @email: generals.space@gmail.com + * @github: https://github.com/generals-space/bootstrap-table-addrbar + * @update: zhixin wen + */ + + Object.assign($$6.fn.bootstrapTable.defaults, { + addrbar: false, + addrPrefix: '' + }); + $$6.BootstrapTable = /*#__PURE__*/function (_$$BootstrapTable) { + _inherits(_class, _$$BootstrapTable); + function _class() { + _classCallCheck(this, _class); + return _callSuper(this, _class, arguments); + } + _createClass(_class, [{ + key: "init", + value: function init() { + var _get2; + if (this.options.pagination && this.options.addrbar) { + this.initAddrbar(); + } + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + (_get2 = _get(_getPrototypeOf(_class.prototype), "init", this)).call.apply(_get2, [this].concat(args)); + } + + /* + * Priority order: + * The value specified by the user has the highest priority. + * If it is not specified, it will be obtained from the address bar. + * If it is not obtained, the default value will be used. + */ + }, { + key: "getDefaultOptionValue", + value: function getDefaultOptionValue(optionName, prefixName) { + if (this.options[optionName] !== $$6.BootstrapTable.DEFAULTS[optionName]) { + return this.options[optionName]; + } + return this.searchParams.get("".concat(this.options.addrPrefix || '').concat(prefixName)) || $$6.BootstrapTable.DEFAULTS[optionName]; + } + }, { + key: "initAddrbar", + value: function initAddrbar() { + var _this = this; + // 标志位, 初始加载后关闭 + this.addrbarInit = true; + this.searchParams = new URLSearchParams(window.location.search.substring(1)); + this.options.pageNumber = +this.getDefaultOptionValue('pageNumber', 'page'); + this.options.pageSize = +this.getDefaultOptionValue('pageSize', 'size'); + this.options.sortOrder = this.getDefaultOptionValue('sortOrder', 'order'); + this.options.sortName = this.getDefaultOptionValue('sortName', 'sort'); + this.options.searchText = this.getDefaultOptionValue('searchText', 'search'); + var prefix = this.options.addrPrefix || ''; + var onLoadSuccess = this.options.onLoadSuccess; + var onPageChange = this.options.onPageChange; + this.options.onLoadSuccess = function (data) { + if (_this.addrbarInit) { + _this.addrbarInit = false; + } else { + _this.updateHistoryState(prefix); + } + if (onLoadSuccess) { + onLoadSuccess.call(_this, data); + } + }; + this.options.onPageChange = function (number, size) { + _this.updateHistoryState(prefix); + if (onPageChange) { + onPageChange.call(_this, number, size); + } + }; + } + }, { + key: "updateHistoryState", + value: function updateHistoryState(prefix) { + var params = {}; + params["".concat(prefix, "page")] = this.options.pageNumber; + params["".concat(prefix, "size")] = this.options.pageSize; + params["".concat(prefix, "order")] = this.options.sortOrder; + params["".concat(prefix, "sort")] = this.options.sortName; + params["".concat(prefix, "search")] = this.options.searchText; + for (var _i = 0, _Object$entries = Object.entries(params); _i < _Object$entries.length; _i++) { + var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2), + key = _Object$entries$_i[0], + value = _Object$entries$_i[1]; + if (value === undefined) { + this.searchParams.delete(key); + } else { + this.searchParams.set(key, value); + } + } + var url = "?".concat(this.searchParams.toString()); + if (location.hash) { + url += location.hash; + } + window.history.pushState({}, '', url); + } + }, { + key: "resetSearch", + value: function resetSearch(text) { + _get(_getPrototypeOf(_class.prototype), "resetSearch", this).call(this, text); + this.options.searchText = text || ''; + } + }]); + return _class; + }($$6.BootstrapTable); + +})); + jQuery.base64 = (function($) { // private property diff --git a/public/mix-manifest.json b/public/mix-manifest.json index 6c7fa0e60..0c7d2c8a8 100644 --- a/public/mix-manifest.json +++ b/public/mix-manifest.json @@ -31,9 +31,9 @@ "/css/webfonts/fa-v4compatibility.woff2": "/css/webfonts/fa-v4compatibility.woff2?id=e11465c0eff0549edd4e8ea6bbcf242f", "/css/dist/bootstrap-table.css": "/css/dist/bootstrap-table.css?id=99c395f0bab5966f32f63f4e55899e64", "/js/build/vendor.js": "/js/build/vendor.js?id=a2b971da417306a63385c8098acfe4af", - "/js/dist/bootstrap-table.js": "/js/dist/bootstrap-table.js?id=d0eb38da8b772a21b827b7df208dc4fe", + "/js/dist/bootstrap-table.js": "/js/dist/bootstrap-table.js?id=857da5daffd13e0553510e5ccd410c79", "/js/dist/all.js": "/js/dist/all.js?id=13bdb521e0c745d7f81dae3fb110b650", - "/js/dist/all-defer.js": "/js/dist/all-defer.js?id=19ccc62a8f1ea103dede4808837384d4", + "/js/dist/all-defer.js": "/js/dist/all-defer.js?id=18d36546bdad8285c229008df799b343", "/css/dist/skins/skin-green.min.css": "/css/dist/skins/skin-green.min.css?id=0a82a6ae6bb4e58fe62d162c4fb50397", "/css/dist/skins/skin-green-dark.min.css": "/css/dist/skins/skin-green-dark.min.css?id=d419cb63a12dc175d71645c876bfc2ab", "/css/dist/skins/skin-black.min.css": "/css/dist/skins/skin-black.min.css?id=76482123f6c70e866d6b971ba91de7bb", diff --git a/resources/lang/en-US/admin/settings/general.php b/resources/lang/en-US/admin/settings/general.php index 33cfd7b41..71fb8eb2c 100644 --- a/resources/lang/en-US/admin/settings/general.php +++ b/resources/lang/en-US/admin/settings/general.php @@ -261,7 +261,7 @@ return [ 'two_factor_enrollment' => 'Two-Factor Enrollment', 'two_factor_enabled_text' => 'Enable Two Factor', 'two_factor_reset' => 'Reset Two-Factor Secret', - 'two_factor_reset_help' => 'This will force the user to enroll their device with Google Authenticator again. This can be useful if their currently enrolled device is lost or stolen. ', + 'two_factor_reset_help' => 'This will force the user to enroll their device with their authenticator app again. This can be useful if their currently enrolled device is lost or stolen. ', 'two_factor_reset_success' => 'Two factor device successfully reset', 'two_factor_reset_error' => 'Two factor device reset failed', 'two_factor_enabled_warning' => 'Enabling two-factor if it is not currently enabled will immediately force you to authenticate with a Google Auth enrolled device. You will have the ability to enroll your device if one is not currently enrolled.', diff --git a/resources/lang/en-US/general.php b/resources/lang/en-US/general.php index bf1702484..9f9a0e08c 100644 --- a/resources/lang/en-US/general.php +++ b/resources/lang/en-US/general.php @@ -1,6 +1,7 @@ '2FA reset', 'accessories' => 'Accessories', 'activated' => 'Activated', 'accepted_date' => 'Date Accepted', diff --git a/resources/lang/en-US/validation.php b/resources/lang/en-US/validation.php index 1c6ad8a14..05374e23a 100644 --- a/resources/lang/en-US/validation.php +++ b/resources/lang/en-US/validation.php @@ -105,6 +105,8 @@ return [ 'gte' => [ 'numeric' => 'Value cannot be negative' ], + 'checkboxes' => ':attribute contains invalid options.', + 'radio_buttons' => ':attribute is invalid.', /* @@ -151,4 +153,10 @@ return [ 'attributes' => [], + /* + |-------------------------------------------------------------------------- + | Generic Validation Messages + |-------------------------------------------------------------------------- + */ + 'invalid_value_in_field' => 'Invalid value included in this field', ]; diff --git a/resources/views/custom_fields/fields/edit.blade.php b/resources/views/custom_fields/fields/edit.blade.php index 504b556fa..e21e9fba4 100644 --- a/resources/views/custom_fields/fields/edit.blade.php +++ b/resources/views/custom_fields/fields/edit.blade.php @@ -135,7 +135,7 @@ @if (!$field->id) -
+
- @endif @@ -298,11 +297,16 @@ }).change(); // Only display the field element if the type is not text + // and don't display encryption option for checkbox or radio $(".field_element").change(function(){ $(this).find("option:selected").each(function(){ if (($(this).attr("value")!="text") && ($(this).attr("value")!="textarea")){ $("#field_values_text").show(); + if ($(this).attr("value") == "checkbox" || $(this).attr("value") == "radio") { + $("#encryption_section").hide(); + } } else{ + $("#encryption_section").show(); $("#field_values_text").hide(); } }); diff --git a/resources/views/hardware/view.blade.php b/resources/views/hardware/view.blade.php index a32503d7e..550359eb0 100755 --- a/resources/views/hardware/view.blade.php +++ b/resources/views/hardware/view.blade.php @@ -904,27 +904,18 @@ @endcan @can('delete', $asset) - @if ($asset->deleted_at=='') -
- +
+ @if ($asset->deleted_at=='') + {{ trans('general.delete') }} -
- @endif + @else +
+ @csrf + +
+ @endif @endcan - @if ($asset->deleted_at!='') -
-
- @csrf - -
-
- @endif - - @if ($snipeSettings->qr_code=='1') - QR code for {{ $asset->getDisplayNameAttribute() }} - @endif - @if (($asset->assignedTo) && ($asset->deleted_at==''))

{{ trans('admin/hardware/form.checkedout_to') }}

@@ -982,9 +973,17 @@
@endif + + @if ($snipeSettings->qr_code=='1') +
+ QR code for {{ $asset->getDisplayNameAttribute() }} +
+ @endif +
+
diff --git a/resources/views/licenses/view.blade.php b/resources/views/licenses/view.blade.php index b23023f48..4f47055c2 100755 --- a/resources/views/licenses/view.blade.php +++ b/resources/views/licenses/view.blade.php @@ -174,23 +174,56 @@ @endif - @if ($license->supplier_id) -
-
- - {{ trans('general.supplier') }} - -
-
- @if ($license->supplier) - + @if ($license->supplier) +
+
+ {{ trans('general.supplier') }} +
+
+ @can('view', \App\Models\Supplier::class) + + {{ $license->supplier->name }} + + @else {{ $license->supplier->name }} - - @else - {{ trans('general.deleted') }} - @endif + @endcan + + @if ($license->supplier->url) +
{{ $license->supplier->url }} + @endif + + @if ($license->supplier->phone) +
+ {{ $license->supplier->phone }} + @endif + + @if ($license->supplier->email) +
{{ $license->supplier->email }} + @endif + + @if ($license->supplier->address) +
{{ $license->supplier->address }} + @endif + @if ($license->supplier->address2) +
{{ $license->supplier->address2 }} + @endif + @if ($license->supplier->city) +
{{ $license->supplier->city }}, + @endif + @if ($license->supplier->state) + {{ $license->supplier->state }} + @endif + @if ($license->supplier->country) + {{ $license->supplier->country }} + @endif + @if ($license->supplier->zip) + {{ $license->supplier->zip }} + @endif + +
-
+ @else + {{ trans('general.deleted') }} @endif diff --git a/resources/views/models/custom_fields_form.blade.php b/resources/views/models/custom_fields_form.blade.php index bae98373e..3c49ef8f7 100644 --- a/resources/views/models/custom_fields_form.blade.php +++ b/resources/views/models/custom_fields_form.blade.php @@ -9,7 +9,7 @@ @if ($field->element=='listbox') {{ Form::select($field->db_column_name(), $field->formatFieldValuesAsArray(), - Request::old($field->db_column_name(),(isset($item) ? Helper::gracefulDecrypt($field, htmlspecialchars($item->{$field->db_column_name()}, ENT_QUOTES)) : $field->defaultValue($model->id))), ['class'=>'format select2 form-control']) }} + Request::old($field->db_column_name(),(isset($item) ? Helper::gracefulDecrypt($field, $item->{$field->db_column_name()}) : $field->defaultValue($model->id))), ['class'=>'format select2 form-control']) }} @elseif ($field->element=='textarea') diff --git a/resources/views/models/custom_fields_form_bulk_edit.blade.php b/resources/views/models/custom_fields_form_bulk_edit.blade.php index f30c60d33..dc0ad1f88 100644 --- a/resources/views/models/custom_fields_form_bulk_edit.blade.php +++ b/resources/views/models/custom_fields_form_bulk_edit.blade.php @@ -25,7 +25,7 @@ @if ($field->element=='listbox') {{ Form::select($field->db_column_name(), $field->formatFieldValuesAsArray(), - Request::old($field->db_column_name(),(isset($item) ? Helper::gracefulDecrypt($field, htmlspecialchars($item->{$field->db_column_name()}, ENT_QUOTES)) : $field->defaultValue($model->id))), ['class'=>'format select2 form-control']) }} + Request::old($field->db_column_name(),(isset($item) ? Helper::gracefulDecrypt($field, $item->{$field->db_column_name()}) : $field->defaultValue($model->id))), ['class'=>'format select2 form-control']) }} @elseif ($field->element=='textarea') @if($field->is_unique) diff --git a/resources/views/models/view.blade.php b/resources/views/models/view.blade.php index 91f112d8a..76d332299 100755 --- a/resources/views/models/view.blade.php +++ b/resources/views/models/view.blade.php @@ -236,6 +236,12 @@ @endif + @if ($model->created_at) +
  • {{ trans('general.created_at') }}: + {{ Helper::getFormattedDateObject($model->created_at, 'datetime', false) }} +
  • + @endif + @if ($model->min_amt)
  • {{ trans('general.min_amt') }}: {{$model->min_amt }} @@ -313,11 +319,6 @@
  • @endif - - - @if ($model->deleted_at!='') -

  • {{ trans('admin/models/general.restore') }}
  • - @endif @if ($model->note) @@ -337,22 +338,32 @@ @can('create', \App\Models\AssetModel::class) @endcan @can('delete', \App\Models\AssetModel::class) @if ($model->assets_count > 0) -
    - +
    @else -
    - - {{ trans('general.delete') }} -
    + @endif + + +
    + @if ($model->deleted_at!='') +
    + @csrf + +
    + @else + + {{ trans('general.delete') }} + @endif +
    + @endcan
    diff --git a/resources/views/partials/bootstrap-table.blade.php b/resources/views/partials/bootstrap-table.blade.php index 95f2785b6..a3d6b6df2 100644 --- a/resources/views/partials/bootstrap-table.blade.php +++ b/resources/views/partials/bootstrap-table.blade.php @@ -46,16 +46,19 @@ stickyHeader: true, stickyHeaderOffsetLeft: parseInt($('body').css('padding-left'), 10), stickyHeaderOffsetRight: parseInt($('body').css('padding-right'), 10), - locale: locale, + locale: '{{ app()->getLocale() }}', undefinedText: '', iconsPrefix: 'fa', cookieStorage: '{{ config('session.bs_table_storage') }}', cookie: true, cookieExpire: '2y', + showColumnsToggleAll: true, + minimumCountColumns: 2, mobileResponsive: true, maintainSelected: true, trimOnSearch: false, showSearchClearButton: true, + addrbar: {{ (config('session.bs_table_addrbar') == 'true') ? 'true' : 'false'}}, // deeplink search phrases, sorting, etc paginationFirstText: "{{ trans('general.first') }}", paginationLastText: "{{ trans('general.last') }}", paginationPreText: "{{ trans('general.previous') }}", @@ -85,7 +88,7 @@ export: 'fa-download', clearSearch: 'fa-times' }, - exportOptions: export_options, + exportOptions: export_options, exportTypes: ['xlsx', 'excel', 'csv', 'pdf','json', 'xml', 'txt', 'sql', 'doc' ], onLoadSuccess: function () { $('[data-tooltip="true"]').tooltip(); // Needed to attach tooltips after ajax call diff --git a/resources/views/settings/security.blade.php b/resources/views/settings/security.blade.php index a23b8cece..f108683dc 100644 --- a/resources/views/settings/security.blade.php +++ b/resources/views/settings/security.blade.php @@ -74,12 +74,11 @@ -
    +
    {{ Form::label('pwd_secure_complexity', trans('admin/settings/general.pwd_secure_complexity')) }}
    - + @if ($errors->has('pwd_secure_complexity.*')) + {{ trans('validation.invalid_value_in_field') }} + @endif

    {{ trans('admin/settings/general.pwd_secure_complexity_help') }}

    diff --git a/resources/views/users/edit.blade.php b/resources/views/users/edit.blade.php index 8d24e440b..9a2a039af 100755 --- a/resources/views/users/edit.blade.php +++ b/resources/views/users/edit.blade.php @@ -499,18 +499,21 @@
    @endif - -
    -
    - {{ trans('admin/settings/general.two_factor_reset') }} - - - + @if ((Auth::user()->isSuperUser()) && ($user->two_factor_active_and_enrolled()) && ($snipeSettings->two_factor_enabled!='0') && ($snipeSettings->two_factor_enabled!='')) + +
    + +
    +

    {{ trans('admin/settings/general.two_factor_reset_help') }}

    +
    -
    -

    {{ trans('admin/settings/general.two_factor_reset_help') }}

    -
    -
    + @endif + @endif @@ -702,7 +705,7 @@ $(document).ready(function() { $("#two_factor_resetrow").removeClass('success'); $("#two_factor_resetrow").removeClass('danger'); $("#two_factor_resetstatus").html(''); - $("#two_factor_reseticon").html(''); + $("#two_factor_reseticon").html(' '); $.ajax({ url: '{{ route('api.users.two_factor_reset', ['id'=> $user->id]) }}', type: 'POST', @@ -715,13 +718,12 @@ $(document).ready(function() { success: function (data) { $("#two_factor_reseticon").html(''); - $("#two_factor_resetstatus").html('' + data.message); + $("#two_factor_resetstatus").html(' ' + data.message + ''); }, error: function (data) { $("#two_factor_reseticon").html(''); - $("#two_factor_reseticon").html(''); - $('#two_factor_resetstatus').text(data.message); + $("#two_factor_resetstatus").html(' ' + data.message + ''); } diff --git a/resources/views/users/print.blade.php b/resources/views/users/print.blade.php index 324fda1b0..2c9b4719f 100644 --- a/resources/views/users/print.blade.php +++ b/resources/views/users/print.blade.php @@ -110,6 +110,7 @@ {{ trans('general.name') }} {{ trans('general.category') }} {{ trans('admin/hardware/form.model') }} + {{ trans('admin/hardware/form.default_location') }} {{ trans('general.location') }} {{ trans('admin/hardware/form.serial') }} {{ trans('admin/hardware/table.checkout_date') }} @@ -129,6 +130,7 @@ {{ $asset->name }} {{ (($asset->model) && ($asset->model->category)) ? $asset->model->category->name : trans('general.invalid_category') }} {{ ($asset->model) ? $asset->model->name : trans('general.invalid_model') }} + {{ ($asset->defaultLoc) ? $asset->defaultLoc->name : '' }} {{ ($asset->location) ? $asset->location->name : '' }} {{ $asset->serial }} @@ -155,6 +157,7 @@ {{ $asset->asset_tag }} {{ $asset->name }} {{ $asset->model->category->name }} + {{ ($asset->defaultLoc) ? $asset->defaultLoc->name : '' }} {{ ($asset->location) ? $asset->location->name : '' }} {{ $asset->model->name }} {{ $asset->serial }} diff --git a/resources/views/users/view.blade.php b/resources/views/users/view.blade.php index a8c24b932..3dbd9ff53 100755 --- a/resources/views/users/view.blade.php +++ b/resources/views/users/view.blade.php @@ -597,7 +597,7 @@
    - @if ((Auth::user()->isSuperUser()) && ($snipeSettings->two_factor_enabled!='0') && ($snipeSettings->two_factor_enabled!='')) + @if ((Auth::user()->isSuperUser()) && ($user->two_factor_active_and_enrolled()) && ($snipeSettings->two_factor_enabled!='0') && ($snipeSettings->two_factor_enabled!=''))
    diff --git a/tests/Feature/Api/Accessories/AccessoryCheckoutTest.php b/tests/Feature/Api/Accessories/AccessoryCheckoutTest.php index d65a3ad61..854a96ada 100644 --- a/tests/Feature/Api/Accessories/AccessoryCheckoutTest.php +++ b/tests/Feature/Api/Accessories/AccessoryCheckoutTest.php @@ -7,13 +7,10 @@ use App\Models\Actionlog; use App\Models\User; use App\Notifications\CheckoutAccessoryNotification; use Illuminate\Support\Facades\Notification; -use Tests\Support\InteractsWithSettings; use Tests\TestCase; class AccessoryCheckoutTest extends TestCase { - use InteractsWithSettings; - public function testCheckingOutAccessoryRequiresCorrectPermission() { $this->actingAsForApi(User::factory()->create()) diff --git a/tests/Feature/Api/Assets/AssetCheckinTest.php b/tests/Feature/Api/Assets/AssetCheckinTest.php index 6f8daf569..add90a067 100644 --- a/tests/Feature/Api/Assets/AssetCheckinTest.php +++ b/tests/Feature/Api/Assets/AssetCheckinTest.php @@ -11,13 +11,10 @@ use App\Models\Statuslabel; use App\Models\User; use Illuminate\Support\Carbon; use Illuminate\Support\Facades\Event; -use Tests\Support\InteractsWithSettings; use Tests\TestCase; class AssetCheckinTest extends TestCase { - use InteractsWithSettings; - public function testCheckingInAssetRequiresCorrectPermission() { $this->actingAsForApi(User::factory()->create()) diff --git a/tests/Feature/Api/Assets/AssetIndexTest.php b/tests/Feature/Api/Assets/AssetIndexTest.php index 778483c1c..3175db695 100644 --- a/tests/Feature/Api/Assets/AssetIndexTest.php +++ b/tests/Feature/Api/Assets/AssetIndexTest.php @@ -6,13 +6,10 @@ use App\Models\Asset; use App\Models\Company; use App\Models\User; use Illuminate\Testing\Fluent\AssertableJson; -use Tests\Support\InteractsWithSettings; use Tests\TestCase; class AssetIndexTest extends TestCase { - use InteractsWithSettings; - public function testAssetIndexReturnsExpectedAssets() { Asset::factory()->count(3)->create(); diff --git a/tests/Feature/Api/Assets/AssetStoreTest.php b/tests/Feature/Api/Assets/AssetStoreTest.php index 92a58a500..e98da36cf 100644 --- a/tests/Feature/Api/Assets/AssetStoreTest.php +++ b/tests/Feature/Api/Assets/AssetStoreTest.php @@ -9,15 +9,11 @@ use App\Models\Location; use App\Models\Statuslabel; use App\Models\Supplier; use App\Models\User; -use Carbon\Carbon; use Illuminate\Testing\Fluent\AssertableJson; -use Tests\Support\InteractsWithSettings; use Tests\TestCase; class AssetStoreTest extends TestCase { - use InteractsWithSettings; - public function testRequiresPermissionToCreateAsset() { $this->actingAsForApi(User::factory()->create()) @@ -69,8 +65,7 @@ class AssetStoreTest extends TestCase $this->assertEquals('random_string', $asset->asset_tag); $this->assertEquals($userAssigned->id, $asset->assigned_to); $this->assertTrue($asset->company->is($company)); - // I don't see this on the GUI side either, but it's in the docs so I'm guessing that's a mistake? It wasn't in the controller. - // $this->assertEquals('2023-09-03', $asset->last_audit_date); + $this->assertEquals('2023-09-03 00:00:00', $asset->last_audit_date->format('Y-m-d H:i:s')); $this->assertTrue($asset->location->is($location)); $this->assertTrue($asset->model->is($model)); $this->assertEquals('A New Asset', $asset->name); @@ -86,6 +81,52 @@ class AssetStoreTest extends TestCase $this->assertEquals(10, $asset->warranty_months); } + public function testSetsLastAuditDateToMidnightOfProvidedDate() + { + $response = $this->actingAsForApi(User::factory()->superuser()->create()) + ->postJson(route('api.assets.store'), [ + 'last_audit_date' => '2023-09-03 12:23:45', + 'asset_tag' => '1234', + 'model_id' => AssetModel::factory()->create()->id, + 'status_id' => Statuslabel::factory()->create()->id, + ]) + ->assertOk() + ->assertStatusMessageIs('success'); + + $asset = Asset::find($response['payload']['id']); + $this->assertEquals('00:00:00', $asset->last_audit_date->format('H:i:s')); + } + + public function testLastAuditDateCanBeNull() + { + $response = $this->actingAsForApi(User::factory()->superuser()->create()) + ->postJson(route('api.assets.store'), [ + // 'last_audit_date' => '2023-09-03 12:23:45', + 'asset_tag' => '1234', + 'model_id' => AssetModel::factory()->create()->id, + 'status_id' => Statuslabel::factory()->create()->id, + ]) + ->assertOk() + ->assertStatusMessageIs('success'); + + $asset = Asset::find($response['payload']['id']); + $this->assertNull($asset->last_audit_date); + } + + public function testNonDateUsedForLastAuditDateReturnsValidationError() + { + $response = $this->actingAsForApi(User::factory()->superuser()->create()) + ->postJson(route('api.assets.store'), [ + 'last_audit_date' => 'this-is-not-valid', + 'asset_tag' => '1234', + 'model_id' => AssetModel::factory()->create()->id, + 'status_id' => Statuslabel::factory()->create()->id, + ]) + ->assertStatusMessageIs('error'); + + $this->assertNotNull($response->json('messages.last_audit_date')); + } + public function testArchivedDepreciateAndPhysicalCanBeNull() { $model = AssetModel::factory()->ipadModel()->create(); diff --git a/tests/Feature/Api/Assets/AssetsForSelectListTest.php b/tests/Feature/Api/Assets/AssetsForSelectListTest.php index cccae38d3..3c5e1e4e7 100644 --- a/tests/Feature/Api/Assets/AssetsForSelectListTest.php +++ b/tests/Feature/Api/Assets/AssetsForSelectListTest.php @@ -5,13 +5,10 @@ namespace Tests\Feature\Api\Assets; use App\Models\Asset; use App\Models\Company; use App\Models\User; -use Tests\Support\InteractsWithSettings; use Tests\TestCase; class AssetsForSelectListTest extends TestCase { - use InteractsWithSettings; - public function testAssetsCanBeSearchedForByAssetTag() { Asset::factory()->create(['asset_tag' => '0001']); diff --git a/tests/Feature/Api/Assets/RequestableAssetsTest.php b/tests/Feature/Api/Assets/RequestableAssetsTest.php index 8649b1b00..d90e45f22 100644 --- a/tests/Feature/Api/Assets/RequestableAssetsTest.php +++ b/tests/Feature/Api/Assets/RequestableAssetsTest.php @@ -5,13 +5,10 @@ namespace Tests\Feature\Api\Assets; use App\Models\Asset; use App\Models\Company; use App\Models\User; -use Tests\Support\InteractsWithSettings; use Tests\TestCase; class RequestableAssetsTest extends TestCase { - use InteractsWithSettings; - public function testViewingRequestableAssetsRequiresCorrectPermission() { $this->actingAsForApi(User::factory()->create()) diff --git a/tests/Feature/Api/Components/ComponentIndexTest.php b/tests/Feature/Api/Components/ComponentIndexTest.php index ee83b7a46..517724a49 100644 --- a/tests/Feature/Api/Components/ComponentIndexTest.php +++ b/tests/Feature/Api/Components/ComponentIndexTest.php @@ -5,13 +5,10 @@ namespace Tests\Feature\Api\Components; use App\Models\Company; use App\Models\Component; use App\Models\User; -use Tests\Support\InteractsWithSettings; use Tests\TestCase; class ComponentIndexTest extends TestCase { - use InteractsWithSettings; - public function testComponentIndexAdheresToCompanyScoping() { [$companyA, $companyB] = Company::factory()->count(2)->create(); diff --git a/tests/Feature/Api/Consumables/ConsumableCheckoutTest.php b/tests/Feature/Api/Consumables/ConsumableCheckoutTest.php index 103be96ac..1528e65aa 100644 --- a/tests/Feature/Api/Consumables/ConsumableCheckoutTest.php +++ b/tests/Feature/Api/Consumables/ConsumableCheckoutTest.php @@ -7,13 +7,10 @@ use App\Models\Consumable; use App\Models\User; use App\Notifications\CheckoutConsumableNotification; use Illuminate\Support\Facades\Notification; -use Tests\Support\InteractsWithSettings; use Tests\TestCase; class ConsumableCheckoutTest extends TestCase { - use InteractsWithSettings; - public function testCheckingOutConsumableRequiresCorrectPermission() { $this->actingAsForApi(User::factory()->create()) diff --git a/tests/Feature/Api/Consumables/ConsumablesIndexTest.php b/tests/Feature/Api/Consumables/ConsumablesIndexTest.php index 33c10ed07..00fa43da2 100644 --- a/tests/Feature/Api/Consumables/ConsumablesIndexTest.php +++ b/tests/Feature/Api/Consumables/ConsumablesIndexTest.php @@ -5,13 +5,10 @@ namespace Tests\Feature\Api\Consumables; use App\Models\Company; use App\Models\Consumable; use App\Models\User; -use Tests\Support\InteractsWithSettings; use Tests\TestCase; class ConsumablesIndexTest extends TestCase { - use InteractsWithSettings; - public function testConsumableIndexAdheresToCompanyScoping() { [$companyA, $companyB] = Company::factory()->count(2)->create(); diff --git a/tests/Feature/Api/Departments/DepartmentIndexTest.php b/tests/Feature/Api/Departments/DepartmentIndexTest.php index 1a3884308..11ab5df9b 100644 --- a/tests/Feature/Api/Departments/DepartmentIndexTest.php +++ b/tests/Feature/Api/Departments/DepartmentIndexTest.php @@ -5,15 +5,11 @@ namespace Tests\Feature\Api\Departments; use App\Models\Company; use App\Models\Department; use App\Models\User; -use Illuminate\Routing\Route; use Illuminate\Testing\Fluent\AssertableJson; -use Tests\Support\InteractsWithSettings; use Tests\TestCase; class DepartmentIndexTest extends TestCase { - use InteractsWithSettings; - public function testViewingDepartmentIndexRequiresAuthentication() { $this->getJson(route('api.departments.index'))->assertRedirect(); diff --git a/tests/Feature/Api/Groups/GroupStoreTest.php b/tests/Feature/Api/Groups/GroupStoreTest.php index 9ffba5191..31a69fb46 100644 --- a/tests/Feature/Api/Groups/GroupStoreTest.php +++ b/tests/Feature/Api/Groups/GroupStoreTest.php @@ -4,13 +4,10 @@ namespace Tests\Feature\Api\Groups; use App\Models\Group; use App\Models\User; -use Tests\Support\InteractsWithSettings; use Tests\TestCase; class GroupStoreTest extends TestCase { - use InteractsWithSettings; - public function testStoringGroupRequiresSuperAdminPermission() { $this->actingAsForApi(User::factory()->create()) diff --git a/tests/Feature/Api/Licenses/LicensesIndexTest.php b/tests/Feature/Api/Licenses/LicensesIndexTest.php index a21a27da7..603002a09 100644 --- a/tests/Feature/Api/Licenses/LicensesIndexTest.php +++ b/tests/Feature/Api/Licenses/LicensesIndexTest.php @@ -5,13 +5,10 @@ namespace Tests\Feature\Api\Licenses; use App\Models\Company; use App\Models\License; use App\Models\User; -use Tests\Support\InteractsWithSettings; use Tests\TestCase; class LicensesIndexTest extends TestCase { - use InteractsWithSettings; - public function testLicensesIndexAdheresToCompanyScoping() { [$companyA, $companyB] = Company::factory()->count(2)->create(); diff --git a/tests/Feature/Api/Locations/LocationsForSelectListTest.php b/tests/Feature/Api/Locations/LocationsForSelectListTest.php index 4170cfc7f..bfc7fc537 100644 --- a/tests/Feature/Api/Locations/LocationsForSelectListTest.php +++ b/tests/Feature/Api/Locations/LocationsForSelectListTest.php @@ -5,13 +5,10 @@ namespace Tests\Feature\Api\Locations; use App\Models\Location; use App\Models\User; use Illuminate\Testing\Fluent\AssertableJson; -use Tests\Support\InteractsWithSettings; use Tests\TestCase; class LocationsForSelectListTest extends TestCase { - use InteractsWithSettings; - public function testGettingLocationListRequiresProperPermission() { $this->actingAsForApi(User::factory()->create()) diff --git a/tests/Feature/Api/Users/UpdateUserApiTest.php b/tests/Feature/Api/Users/UpdateUserApiTest.php index 0786b171e..f58aae4a0 100644 --- a/tests/Feature/Api/Users/UpdateUserApiTest.php +++ b/tests/Feature/Api/Users/UpdateUserApiTest.php @@ -3,13 +3,10 @@ namespace Tests\Feature\Api\Users; use App\Models\User; -use Tests\Support\InteractsWithSettings; use Tests\TestCase; class UpdateUserApiTest extends TestCase { - use InteractsWithSettings; - public function testApiUsersCanBeActivatedWithNumber() { $admin = User::factory()->superuser()->create(); diff --git a/tests/Feature/Api/Users/UsersForSelectListTest.php b/tests/Feature/Api/Users/UsersForSelectListTest.php index 8cdf700f0..1ebfcf72e 100644 --- a/tests/Feature/Api/Users/UsersForSelectListTest.php +++ b/tests/Feature/Api/Users/UsersForSelectListTest.php @@ -6,13 +6,10 @@ use App\Models\Company; use App\Models\User; use Illuminate\Testing\Fluent\AssertableJson; use Laravel\Passport\Passport; -use Tests\Support\InteractsWithSettings; use Tests\TestCase; class UsersForSelectListTest extends TestCase { - use InteractsWithSettings; - public function testUsersAreReturned() { $users = User::factory()->superuser()->count(3)->create(); diff --git a/tests/Feature/Api/Users/UsersSearchTest.php b/tests/Feature/Api/Users/UsersSearchTest.php index 723a115db..72f23017f 100644 --- a/tests/Feature/Api/Users/UsersSearchTest.php +++ b/tests/Feature/Api/Users/UsersSearchTest.php @@ -5,13 +5,10 @@ namespace Tests\Feature\Api\Users; use App\Models\Company; use App\Models\User; use Laravel\Passport\Passport; -use Tests\Support\InteractsWithSettings; use Tests\TestCase; class UsersSearchTest extends TestCase { - use InteractsWithSettings; - public function testCanSearchByUserFirstAndLastName() { User::factory()->create(['first_name' => 'Luke', 'last_name' => 'Skywalker']); diff --git a/tests/Feature/Api/Users/UsersUpdateTest.php b/tests/Feature/Api/Users/UsersUpdateTest.php index 953a671cf..d6e0f9e46 100644 --- a/tests/Feature/Api/Users/UsersUpdateTest.php +++ b/tests/Feature/Api/Users/UsersUpdateTest.php @@ -8,13 +8,10 @@ use App\Models\Group; use App\Models\Location; use App\Models\User; use Illuminate\Support\Facades\Hash; -use Tests\Support\InteractsWithSettings; use Tests\TestCase; class UsersUpdateTest extends TestCase { - use InteractsWithSettings; - public function testCanUpdateUserViaPatch() { $admin = User::factory()->superuser()->create(); diff --git a/tests/Feature/Checkins/AccessoryCheckinTest.php b/tests/Feature/Checkins/AccessoryCheckinTest.php index 25cd5d0d8..56030991e 100644 --- a/tests/Feature/Checkins/AccessoryCheckinTest.php +++ b/tests/Feature/Checkins/AccessoryCheckinTest.php @@ -8,13 +8,10 @@ use App\Models\User; use App\Notifications\CheckinAccessoryNotification; use Illuminate\Support\Facades\Event; use Illuminate\Support\Facades\Notification; -use Tests\Support\InteractsWithSettings; use Tests\TestCase; class AccessoryCheckinTest extends TestCase { - use InteractsWithSettings; - public function testCheckingInAccessoryRequiresCorrectPermission() { $accessory = Accessory::factory()->checkedOutToUser()->create(); diff --git a/tests/Feature/Checkins/AssetCheckinTest.php b/tests/Feature/Checkins/AssetCheckinTest.php index fb6d21a6a..1e6d2b995 100644 --- a/tests/Feature/Checkins/AssetCheckinTest.php +++ b/tests/Feature/Checkins/AssetCheckinTest.php @@ -11,13 +11,10 @@ use App\Models\Statuslabel; use App\Models\User; use Illuminate\Support\Carbon; use Illuminate\Support\Facades\Event; -use Tests\Support\InteractsWithSettings; use Tests\TestCase; class AssetCheckinTest extends TestCase { - use InteractsWithSettings; - public function testCheckingInAssetRequiresCorrectPermission() { $this->actingAs(User::factory()->create()) diff --git a/tests/Feature/CheckoutAcceptances/AccessoryAcceptanceTest.php b/tests/Feature/CheckoutAcceptances/AccessoryAcceptanceTest.php index a49b1167c..bdaf0e780 100644 --- a/tests/Feature/CheckoutAcceptances/AccessoryAcceptanceTest.php +++ b/tests/Feature/CheckoutAcceptances/AccessoryAcceptanceTest.php @@ -7,13 +7,10 @@ use App\Models\CheckoutAcceptance; use App\Notifications\AcceptanceAssetAcceptedNotification; use App\Notifications\AcceptanceAssetDeclinedNotification; use Notification; -use Tests\Support\InteractsWithSettings; use Tests\TestCase; class AccessoryAcceptanceTest extends TestCase { - use InteractsWithSettings; - /** * This can be absorbed into a bigger test */ diff --git a/tests/Feature/Checkouts/AccessoryCheckoutTest.php b/tests/Feature/Checkouts/AccessoryCheckoutTest.php index cbe9801cc..11224e4d1 100644 --- a/tests/Feature/Checkouts/AccessoryCheckoutTest.php +++ b/tests/Feature/Checkouts/AccessoryCheckoutTest.php @@ -7,13 +7,10 @@ use App\Models\Actionlog; use App\Models\User; use App\Notifications\CheckoutAccessoryNotification; use Illuminate\Support\Facades\Notification; -use Tests\Support\InteractsWithSettings; use Tests\TestCase; class AccessoryCheckoutTest extends TestCase { - use InteractsWithSettings; - public function testCheckingOutAccessoryRequiresCorrectPermission() { $this->actingAs(User::factory()->create()) diff --git a/tests/Feature/Checkouts/ConsumableCheckoutTest.php b/tests/Feature/Checkouts/ConsumableCheckoutTest.php index 5785d0572..e38ae96c8 100644 --- a/tests/Feature/Checkouts/ConsumableCheckoutTest.php +++ b/tests/Feature/Checkouts/ConsumableCheckoutTest.php @@ -7,13 +7,10 @@ use App\Models\Consumable; use App\Models\User; use App\Notifications\CheckoutConsumableNotification; use Illuminate\Support\Facades\Notification; -use Tests\Support\InteractsWithSettings; use Tests\TestCase; class ConsumableCheckoutTest extends TestCase { - use InteractsWithSettings; - public function testCheckingOutConsumableRequiresCorrectPermission() { $this->actingAs(User::factory()->create()) diff --git a/tests/Feature/Checkouts/LicenseCheckoutTest.php b/tests/Feature/Checkouts/LicenseCheckoutTest.php index 978fac28f..2f4f51d4a 100644 --- a/tests/Feature/Checkouts/LicenseCheckoutTest.php +++ b/tests/Feature/Checkouts/LicenseCheckoutTest.php @@ -6,13 +6,10 @@ use App\Models\Asset; use App\Models\License; use App\Models\LicenseSeat; use App\Models\User; -use Tests\Support\InteractsWithSettings; use Tests\TestCase; class LicenseCheckoutTest extends TestCase { - use InteractsWithSettings; - public function testNotesAreStoredInActionLogOnCheckoutToAsset() { $admin = User::factory()->superuser()->create(); diff --git a/tests/Feature/DashboardTest.php b/tests/Feature/DashboardTest.php index 4e9459fb0..4690a1390 100644 --- a/tests/Feature/DashboardTest.php +++ b/tests/Feature/DashboardTest.php @@ -3,13 +3,10 @@ namespace Tests\Feature; use App\Models\User; -use Tests\Support\InteractsWithSettings; use Tests\TestCase; class DashboardTest extends TestCase { - use InteractsWithSettings; - public function testUsersWithoutAdminAccessAreRedirected() { $this->actingAs(User::factory()->create()) diff --git a/tests/Feature/Notifications/Email/EmailNotificationsUponCheckinTest.php b/tests/Feature/Notifications/Email/EmailNotificationsUponCheckinTest.php index dbe79c572..4ae415f1e 100644 --- a/tests/Feature/Notifications/Email/EmailNotificationsUponCheckinTest.php +++ b/tests/Feature/Notifications/Email/EmailNotificationsUponCheckinTest.php @@ -7,7 +7,6 @@ use App\Models\Asset; use App\Models\User; use App\Notifications\CheckinAssetNotification; use Illuminate\Support\Facades\Notification; -use Tests\Support\InteractsWithSettings; use Tests\TestCase; /** @@ -15,8 +14,6 @@ use Tests\TestCase; */ class EmailNotificationsUponCheckinTest extends TestCase { - use InteractsWithSettings; - protected function setUp(): void { parent::setUp(); diff --git a/tests/Feature/Notifications/Webhooks/SlackNotificationsUponCheckinTest.php b/tests/Feature/Notifications/Webhooks/SlackNotificationsUponCheckinTest.php index b6bb7801a..29bf06d9d 100644 --- a/tests/Feature/Notifications/Webhooks/SlackNotificationsUponCheckinTest.php +++ b/tests/Feature/Notifications/Webhooks/SlackNotificationsUponCheckinTest.php @@ -14,7 +14,6 @@ use App\Notifications\CheckinAssetNotification; use App\Notifications\CheckinLicenseSeatNotification; use Illuminate\Database\Eloquent\Model; use Illuminate\Support\Facades\Notification; -use Tests\Support\InteractsWithSettings; use Tests\TestCase; /** @@ -22,8 +21,6 @@ use Tests\TestCase; */ class SlackNotificationsUponCheckinTest extends TestCase { - use InteractsWithSettings; - protected function setUp(): void { parent::setUp(); diff --git a/tests/Feature/Notifications/Webhooks/SlackNotificationsUponCheckoutTest.php b/tests/Feature/Notifications/Webhooks/SlackNotificationsUponCheckoutTest.php index 550f7c5b1..048448cad 100644 --- a/tests/Feature/Notifications/Webhooks/SlackNotificationsUponCheckoutTest.php +++ b/tests/Feature/Notifications/Webhooks/SlackNotificationsUponCheckoutTest.php @@ -16,7 +16,6 @@ use App\Notifications\CheckoutConsumableNotification; use App\Notifications\CheckoutLicenseSeatNotification; use Illuminate\Database\Eloquent\Model; use Illuminate\Support\Facades\Notification; -use Tests\Support\InteractsWithSettings; use Tests\TestCase; /** @@ -24,8 +23,6 @@ use Tests\TestCase; */ class SlackNotificationsUponCheckoutTest extends TestCase { - use InteractsWithSettings; - protected function setUp(): void { parent::setUp(); diff --git a/tests/Feature/Reports/CustomReportTest.php b/tests/Feature/Reports/CustomReportTest.php index dd3199212..d90e4cb2a 100644 --- a/tests/Feature/Reports/CustomReportTest.php +++ b/tests/Feature/Reports/CustomReportTest.php @@ -8,14 +8,10 @@ use App\Models\User; use Illuminate\Testing\TestResponse; use League\Csv\Reader; use PHPUnit\Framework\Assert; -use Tests\Support\InteractsWithSettings; use Tests\TestCase; - class CustomReportTest extends TestCase { - use InteractsWithSettings; - protected function setUp(): void { parent::setUp(); diff --git a/tests/Feature/Users/UpdateUserTest.php b/tests/Feature/Users/UpdateUserTest.php index 92245059e..934fbce2b 100644 --- a/tests/Feature/Users/UpdateUserTest.php +++ b/tests/Feature/Users/UpdateUserTest.php @@ -3,13 +3,10 @@ namespace Tests\Feature\Users; use App\Models\User; -use Tests\Support\InteractsWithSettings; use Tests\TestCase; class UpdateUserTest extends TestCase { - use InteractsWithSettings; - public function testUsersCanBeActivatedWithNumber() { $admin = User::factory()->superuser()->create(); diff --git a/tests/Support/InteractsWithSettings.php b/tests/Support/InitializesSettings.php similarity index 90% rename from tests/Support/InteractsWithSettings.php rename to tests/Support/InitializesSettings.php index a8c007018..7c08e6f89 100644 --- a/tests/Support/InteractsWithSettings.php +++ b/tests/Support/InitializesSettings.php @@ -4,7 +4,7 @@ namespace Tests\Support; use App\Models\Setting; -trait InteractsWithSettings +trait InitializesSettings { protected Settings $settings; diff --git a/tests/TestCase.php b/tests/TestCase.php index 535f9a3e2..0c5ecc37e 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -9,7 +9,7 @@ use RuntimeException; use Tests\Support\AssertsAgainstSlackNotifications; use Tests\Support\CustomTestMacros; use Tests\Support\InteractsWithAuthentication; -use Tests\Support\InteractsWithSettings; +use Tests\Support\InitializesSettings; abstract class TestCase extends BaseTestCase { @@ -17,6 +17,7 @@ abstract class TestCase extends BaseTestCase use CreatesApplication; use CustomTestMacros; use InteractsWithAuthentication; + use InitializesSettings; use LazilyRefreshDatabase; private array $globallyDisabledMiddleware = [ @@ -25,20 +26,23 @@ abstract class TestCase extends BaseTestCase protected function setUp(): void { - if (!file_exists(realpath(__DIR__ . '/../') . '/.env.testing')) { - throw new RuntimeException( - '.env.testing file does not exist. Aborting to avoid wiping your local database' - ); - } + $this->guardAgainstMissingEnv(); parent::setUp(); + $this->registerCustomMacros(); + $this->withoutMiddleware($this->globallyDisabledMiddleware); - if (collect(class_uses_recursive($this))->contains(InteractsWithSettings::class)) { - $this->initializeSettings(); - } + $this->initializeSettings(); + } - $this->registerCustomMacros(); + private function guardAgainstMissingEnv(): void + { + if (!file_exists(realpath(__DIR__ . '/../') . '/.env.testing')) { + throw new RuntimeException( + '.env.testing file does not exist. Aborting to avoid wiping your local database.' + ); + } } } diff --git a/tests/Unit/AssetMaintenanceTest.php b/tests/Unit/AssetMaintenanceTest.php index 69c4c3093..46a0efdd7 100644 --- a/tests/Unit/AssetMaintenanceTest.php +++ b/tests/Unit/AssetMaintenanceTest.php @@ -2,14 +2,10 @@ namespace Tests\Unit; use App\Models\AssetMaintenance; -use Carbon\Carbon; -use Tests\Support\InteractsWithSettings; use Tests\TestCase; class AssetMaintenanceTest extends TestCase { - use InteractsWithSettings; - public function testZerosOutWarrantyIfBlank() { $c = new AssetMaintenance; diff --git a/tests/Unit/AssetModelTest.php b/tests/Unit/AssetModelTest.php index aec8edf69..4cc62e20a 100644 --- a/tests/Unit/AssetModelTest.php +++ b/tests/Unit/AssetModelTest.php @@ -4,13 +4,10 @@ namespace Tests\Unit; use App\Models\Asset; use App\Models\Category; use App\Models\AssetModel; -use Tests\Support\InteractsWithSettings; use Tests\TestCase; class AssetModelTest extends TestCase { - use InteractsWithSettings; - public function testAnAssetModelContainsAssets() { $category = Category::factory()->create([ diff --git a/tests/Unit/AssetTest.php b/tests/Unit/AssetTest.php index d3d9a9011..9c3a76af6 100644 --- a/tests/Unit/AssetTest.php +++ b/tests/Unit/AssetTest.php @@ -5,13 +5,10 @@ use App\Models\Asset; use App\Models\AssetModel; use App\Models\Category; use Carbon\Carbon; -use Tests\Support\InteractsWithSettings; use Tests\TestCase; class AssetTest extends TestCase { - use InteractsWithSettings; - public function testAutoIncrement() { $this->settings->enableAutoIncrement(); diff --git a/tests/Unit/CategoryTest.php b/tests/Unit/CategoryTest.php index e5c98a67a..c3c9b0de8 100644 --- a/tests/Unit/CategoryTest.php +++ b/tests/Unit/CategoryTest.php @@ -4,13 +4,10 @@ namespace Tests\Unit; use App\Models\Category; use App\Models\AssetModel; use App\Models\Asset; -use Tests\Support\InteractsWithSettings; use Tests\TestCase; class CategoryTest extends TestCase { - use InteractsWithSettings; - public function testFailsEmptyValidation() { // An Asset requires a name, a qty, and a category_id. diff --git a/tests/Unit/CompanyScopingTest.php b/tests/Unit/CompanyScopingTest.php index 669dd5ed4..3923dd9f7 100644 --- a/tests/Unit/CompanyScopingTest.php +++ b/tests/Unit/CompanyScopingTest.php @@ -12,13 +12,10 @@ use App\Models\License; use App\Models\LicenseSeat; use App\Models\User; use Illuminate\Database\Eloquent\Model; -use Tests\Support\InteractsWithSettings; use Tests\TestCase; class CompanyScopingTest extends TestCase { - use InteractsWithSettings; - public function models(): array { return [ diff --git a/tests/Unit/ComponentTest.php b/tests/Unit/ComponentTest.php index 8f71057bf..df8f64771 100644 --- a/tests/Unit/ComponentTest.php +++ b/tests/Unit/ComponentTest.php @@ -5,13 +5,10 @@ use App\Models\Category; use App\Models\Company; use App\Models\Component; use App\Models\Location; -use Tests\Support\InteractsWithSettings; use Tests\TestCase; class ComponentTest extends TestCase { - use InteractsWithSettings; - public function testAComponentBelongsToACompany() { $component = Component::factory() diff --git a/tests/Unit/DepreciationTest.php b/tests/Unit/DepreciationTest.php index ed033cf44..4dd842227 100644 --- a/tests/Unit/DepreciationTest.php +++ b/tests/Unit/DepreciationTest.php @@ -5,13 +5,10 @@ use App\Models\Depreciation; use App\Models\Category; use App\Models\License; use App\Models\AssetModel; -use Tests\Support\InteractsWithSettings; use Tests\TestCase; class DepreciationTest extends TestCase { - use InteractsWithSettings; - public function testADepreciationHasModels() { $depreciation = Depreciation::factory()->create(); diff --git a/tests/Unit/LdapTest.php b/tests/Unit/LdapTest.php index c286b3849..6beb0d211 100644 --- a/tests/Unit/LdapTest.php +++ b/tests/Unit/LdapTest.php @@ -3,8 +3,6 @@ namespace Tests\Unit; use App\Models\Ldap; -use Exception; -use Tests\Support\InteractsWithSettings; use Tests\TestCase; /** @@ -12,7 +10,6 @@ use Tests\TestCase; */ class LdapTest extends TestCase { - use InteractsWithSettings; use \phpmock\phpunit\PHPMock; public function testConnect() diff --git a/tests/Unit/Models/Company/GetIdForCurrentUserTest.php b/tests/Unit/Models/Company/GetIdForCurrentUserTest.php index 1ca88d7ca..6d77c8873 100644 --- a/tests/Unit/Models/Company/GetIdForCurrentUserTest.php +++ b/tests/Unit/Models/Company/GetIdForCurrentUserTest.php @@ -4,13 +4,10 @@ namespace Tests\Unit\Models\Company; use App\Models\Company; use App\Models\User; -use Tests\Support\InteractsWithSettings; use Tests\TestCase; class GetIdForCurrentUserTest extends TestCase { - use InteractsWithSettings; - public function testReturnsProvidedValueWhenFullCompanySupportDisabled() { $this->settings->disableMultipleFullCompanySupport(); diff --git a/tests/Unit/NotificationTest.php b/tests/Unit/NotificationTest.php index 64cf8afb0..8005759a1 100644 --- a/tests/Unit/NotificationTest.php +++ b/tests/Unit/NotificationTest.php @@ -8,13 +8,10 @@ use App\Models\Category; use Carbon\Carbon; use App\Notifications\CheckoutAssetNotification; use Illuminate\Support\Facades\Notification; -use Tests\Support\InteractsWithSettings; use Tests\TestCase; class NotificationTest extends TestCase { - use InteractsWithSettings; - public function testAUserIsEmailedIfTheyCheckoutAnAssetWithEULA() { $admin = User::factory()->superuser()->create(); diff --git a/tests/Unit/SnipeModelTest.php b/tests/Unit/SnipeModelTest.php index ad4231010..2bc81da61 100644 --- a/tests/Unit/SnipeModelTest.php +++ b/tests/Unit/SnipeModelTest.php @@ -2,13 +2,10 @@ namespace Tests\Unit; use App\Models\SnipeModel; -use Tests\Support\InteractsWithSettings; use Tests\TestCase; class SnipeModelTest extends TestCase { - use InteractsWithSettings; - public function testSetsPurchaseDatesAppropriately() { $c = new SnipeModel; diff --git a/webpack.mix.js b/webpack.mix.js index fdda6618a..cbf7fe123 100644 --- a/webpack.mix.js +++ b/webpack.mix.js @@ -183,11 +183,11 @@ mix [ "./resources/assets/js/dragtable.js", './node_modules/bootstrap-table/dist/bootstrap-table.js', - "./resources/assets/js/bootstrap-table-reorder-columns.js", './node_modules/bootstrap-table/dist/extensions/mobile/bootstrap-table-mobile.js', './node_modules/bootstrap-table/dist/extensions/export/bootstrap-table-export.js', './node_modules/bootstrap-table/dist/extensions/cookie/bootstrap-table-cookie.js', './node_modules/bootstrap-table/dist/extensions/sticky-header/bootstrap-table-sticky-header.js', + './node_modules/bootstrap-table/dist/extensions/addrbar/bootstrap-table-addrbar.js', './resources/assets/js/extensions/jquery.base64.js', './node_modules/tableexport.jquery.plugin/tableExport.min.js', './node_modules/tableexport.jquery.plugin/libs/jsPDF/jspdf.umd.min.js',