public function scopeDynamicFilter(Builder $query, string $filter_id, array $values): Builder 	{ 		return $query->whereHas('productFilters', static function ($query) use ($values, $filter_id): void { 			$whereIn = []; 			$lang = app()->getLocale();  			foreach ($values as $operand => $value) { 				if ($value == null) { 					continue; 				}  				if (is_int($operand)) { 					$whereIn[] = $value;  					continue; 				}  				if ($operand == 'like') { 					$value = '%' . preg_replace('/\s+/', '%', $value) . '%'; 				}  				$query->whereJsonContains('value', [$lang => $value]); 			}  			$query->when($whereIn !== [], static function ($query) use ($whereIn, $lang): void { 				$lang = app()->getLocale(); 				$query->whereJsonContains('value', [$lang => $whereIn[0]]);  				foreach ($whereIn as $value) { 					$query->orWhereJsonContains('value', [$lang => $value]); 				} 			}) 			->whereHas('filter', static function ($query) use ($filter_id): void { 				$query->where('id', $filter_id); 			}); 		}); 	}