Changeset 3271607
- Timestamp:
- 04/12/2025 08:43:43 PM (10 months ago)
- Location:
- fraktvalg/trunk
- Files:
-
- 1 added
- 21 edited
-
Fraktvalg/PluginControls.php (added)
-
Fraktvalg/REST/Settings/Onboarding.php (modified) (2 diffs)
-
Fraktvalg/Setup.php (modified) (1 diff)
-
Fraktvalg/WooCommerce/ShippingMethod/Fraktvalg.php (modified) (9 diffs)
-
build/Blocks/ShippingSelector/frontend.asset.php (modified) (1 diff)
-
build/Blocks/ShippingSelector/frontend.js (modified) (1 diff)
-
build/Blocks/ShippingSelector/index.asset.php (modified) (1 diff)
-
build/Blocks/ShippingSelector/index.js (modified) (1 diff)
-
build/Blocks/ShippingSelector/style-frontend-rtl.css (modified) (10 diffs)
-
build/Blocks/ShippingSelector/style-frontend.css (modified) (10 diffs)
-
build/fraktvalg-rtl.css (modified) (10 diffs)
-
build/fraktvalg.asset.php (modified) (1 diff)
-
build/fraktvalg.css (modified) (10 diffs)
-
build/fraktvalg.js (modified) (1 diff)
-
build/label-rtl.css (modified) (10 diffs)
-
build/label.asset.php (modified) (1 diff)
-
build/label.css (modified) (10 diffs)
-
build/onboarding-rtl.css (modified) (10 diffs)
-
build/onboarding.asset.php (modified) (1 diff)
-
build/onboarding.css (modified) (10 diffs)
-
build/onboarding.js (modified) (1 diff)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
fraktvalg/trunk/Fraktvalg/REST/Settings/Onboarding.php
r3267354 r3271607 47 47 return in_array($param, ['cart', 'checkout']); 48 48 }, 49 ], 50 ], 51 ] 52 ); 53 54 \register_rest_route( 55 $this->namespace, 56 '/onboarding/store-status', 57 [ 58 'methods' => \WP_REST_Server::READABLE, 59 'callback' => array( $this, 'get_store_status' ), 60 'permission_callback' => array( $this, 'permission_callback' ), 61 ] 62 ); 63 64 \register_rest_route( 65 $this->namespace, 66 '/onboarding/store-address', 67 [ 68 'methods' => \WP_REST_Server::EDITABLE, 69 'callback' => array( $this, 'set_store_address' ), 70 'permission_callback' => array( $this, 'permission_callback' ), 71 'args' => [ 72 'address' => [ 73 'required' => true, 74 'type' => 'string', 75 'sanitize_callback' => 'sanitize_text_field', 76 ], 77 'postcode' => [ 78 'required' => true, 79 'type' => 'string', 80 'sanitize_callback' => 'sanitize_text_field', 81 ], 82 'city' => [ 83 'required' => true, 84 'type' => 'string', 85 'sanitize_callback' => 'sanitize_text_field', 86 ], 87 'country' => [ 88 'required' => true, 89 'type' => 'string', 90 'sanitize_callback' => 'sanitize_text_field', 49 91 ], 50 92 ], … … 125 167 } 126 168 169 /** 170 * Get store status including address information, product dimensions, and require address setting. 171 * 172 * @return \WP_REST_Response Response containing store status information. 173 */ 174 public function get_store_status() { 175 // Get store address information. 176 $store_address = [ 177 'address' => \get_option( 'woocommerce_store_address', '' ), 178 'postcode' => \get_option( 'woocommerce_store_postcode', '' ), 179 'city' => \get_option( 'woocommerce_store_city', '' ), 180 'country' => \get_option( 'woocommerce_default_country', '' ), 181 ]; 182 183 // Check if all address fields are filled. 184 $address_complete = ! empty( $store_address['address'] ) && 185 ! empty( $store_address['postcode'] ) && 186 ! empty( $store_address['city'] ) && 187 ! empty( $store_address['country'] ); 188 189 // Check for products without dimensions or weight. 190 $products_without_dimensions = $this->get_products_without_dimensions(); 191 192 return new \WP_REST_Response( 193 [ 194 'address' => [ 195 'fields' => $store_address, 196 'complete' => $address_complete, 197 ], 198 'products_without_dimensions' => $products_without_dimensions 199 ] 200 ); 201 } 202 203 /** 204 * Set the store address fields. 205 * 206 * @param \WP_REST_Request $request Request object containing address fields. 207 * @return \WP_REST_Response Response indicating success or failure. 208 */ 209 public function set_store_address( $request ) { 210 $address = $request->get_param( 'address' ); 211 $postcode = $request->get_param( 'postcode' ); 212 $city = $request->get_param( 'city' ); 213 $country = $request->get_param( 'country' ); 214 215 \update_option( 'woocommerce_store_address', $address ); 216 \update_option( 'woocommerce_store_postcode', $postcode ); 217 \update_option( 'woocommerce_store_city', $city ); 218 \update_option( 'woocommerce_default_country', $country ); 219 220 return new \WP_REST_Response( 221 [ 222 'status' => 'success', 223 'address' => [ 224 'address' => $address, 225 'postcode' => $postcode, 226 'city' => $city, 227 'country' => $country, 228 ], 229 ] 230 ); 231 } 232 233 /** 234 * Get products without dimensions or weight. 235 * 236 * @return array Array containing a boolean indicating if any products are missing dimensions. 237 */ 238 private function get_products_without_dimensions() { 239 $args = [ 240 'post_type' => 'product', 241 'post_status' => 'publish', 242 'posts_per_page' => 1, // Only need one product to determine if there's an issue 243 'tax_query' => [ 244 [ 245 'taxonomy' => 'product_type', 246 'field' => 'slug', 247 'terms' => 'simple', // Only check simple products. 248 ], 249 ], 250 'meta_query' => [ 251 'relation' => 'OR', 252 // Check for missing weight 253 [ 254 'relation' => 'OR', 255 [ 256 'key' => '_weight', 257 'compare' => 'NOT EXISTS', 258 ], 259 [ 260 'key' => '_weight', 261 'value' => '', 262 'compare' => '=', 263 ], 264 [ 265 'key' => '_weight', 266 'value' => '0', 267 'compare' => '=', 268 ], 269 ], 270 // Check for missing length 271 [ 272 'relation' => 'OR', 273 [ 274 'key' => '_length', 275 'compare' => 'NOT EXISTS', 276 ], 277 [ 278 'key' => '_length', 279 'value' => '', 280 'compare' => '=', 281 ], 282 [ 283 'key' => '_length', 284 'value' => '0', 285 'compare' => '=', 286 ], 287 ], 288 // Check for missing width 289 [ 290 'relation' => 'OR', 291 [ 292 'key' => '_width', 293 'compare' => 'NOT EXISTS', 294 ], 295 [ 296 'key' => '_width', 297 'value' => '', 298 'compare' => '=', 299 ], 300 [ 301 'key' => '_width', 302 'value' => '0', 303 'compare' => '=', 304 ], 305 ], 306 // Check for missing height 307 [ 308 'relation' => 'OR', 309 [ 310 'key' => '_height', 311 'compare' => 'NOT EXISTS', 312 ], 313 [ 314 'key' => '_height', 315 'value' => '', 316 'compare' => '=', 317 ], 318 [ 319 'key' => '_height', 320 'value' => '0', 321 'compare' => '=', 322 ], 323 ], 324 ], 325 ]; 326 327 $products = \get_posts( $args ); 328 329 // Return a simple boolean indicating if any products are missing dimensions 330 return [ 331 'has_products_without_dimensions' => ! empty( $products ), 332 ]; 333 } 334 127 335 public function finalize_onboarding() { 128 336 \update_option( 'fraktvalg_configured', true ); -
fraktvalg/trunk/Fraktvalg/Setup.php
r3267354 r3271607 20 20 21 21 new Settings(); 22 new PluginControls(); 22 23 23 24 new ShippingMethod(); -
fraktvalg/trunk/Fraktvalg/WooCommerce/ShippingMethod/Fraktvalg.php
r3267354 r3271607 7 7 8 8 class Fraktvalg extends \WC_Shipping_Method { 9 10 /** 11 * Stores the cheapest shipping option ID 12 * 13 * @var string|null 14 */ 15 private $cheapest_shipping_id = null; 16 17 /** 18 * Stores the cheapest shipping price 19 * 20 * @var float|null 21 */ 22 private $cheapest_shipping_price = null; 9 23 10 24 public function __construct( $instance_id = 0 ) { … … 174 188 $is_block_theme = function_exists('wp_is_block_theme') && wp_is_block_theme(); 175 189 190 // Reset cheapest shipping variables 191 $this->cheapest_shipping_id = null; 192 $this->cheapest_shipping_price = null; 193 176 194 if ( ! empty( $shippingOptions) ) { 177 195 // Find the cheapest shipping method from non-priority providers 178 196 $cheapest_price = $this->get_cheapest_shipping_price( $shippingOptions, $priorityProvider['providerId'], $settings ); 179 197 180 198 // First, add the priority provider if it exists 181 199 if ( ! empty( $priorityProvider['providerId'] ) && isset( $shippingOptions->{$priorityProvider['providerId']} ) ) { 200 // Find the cheapest priority provider option 201 $cheapest_priority_price = null; 202 $cheapest_priority_option = null; 203 $cheapest_priority_count = null; 204 182 205 foreach ( $shippingOptions->{$priorityProvider['providerId']} as $count => $option ) { 183 $shipping_id = $priorityProvider['providerId'] . ':' . $count;184 185 206 $price = $option->price->withVAT; 186 187 // Apply priority provider discount if set and if priority provider is more expensive than cheapest option188 if ( ! empty( $priorityProvider['discount'] ) && $price > $cheapest_price ) {189 // Calculate the discount amount needed to match or beat the cheapest price190 $discount_amount = $price - $cheapest_price;191 192 // Apply the configured discount type and amount193 if ( 'percent' === $priorityProvider['discountType'] ) {194 // Calculate what percentage discount would be needed to match the cheapest price195 $needed_percent_discount = ( $discount_amount / $price ) * 100;196 197 // Apply the configured discount, but not more than needed to match the cheapest price198 $applied_percent_discount = min( $priorityProvider['discount'], $needed_percent_discount );199 $price = $price * ( 1 - ( $applied_percent_discount / 100 ) );200 } else {201 // Apply the configured fixed discount, but not more than needed to match the cheapest price202 $applied_fixed_discount = min( $priorityProvider['discount'], $discount_amount );203 $price = $price - $applied_fixed_discount;204 }205 }206 207 207 208 // Apply added cost from settings … … 212 213 $price += $settings['freight']['addedCost']; 213 214 } 214 } 215 } 216 217 if ( null === $cheapest_priority_price || $price < $cheapest_priority_price ) { 218 $cheapest_priority_price = $price; 219 $cheapest_priority_option = $option; 220 $cheapest_priority_count = $count; 221 } 222 } 223 224 // Apply discount to the cheapest priority provider option if needed 225 if ( ! empty( $priorityProvider['discount'] ) && $cheapest_priority_price >= $cheapest_price ) { 226 // Apply the configured discount type and amount 227 if ( 'percent' === $priorityProvider['discountType'] ) { 228 // Apply the configured percentage discount 229 $cheapest_priority_price = $cheapest_price * ( 1 - ( $priorityProvider['discount'] / 100 ) ); 230 } else { 231 // Apply the configured fixed discount 232 $cheapest_priority_price = $cheapest_price - $priorityProvider['discount']; 233 } 234 } 235 236 // Now add all priority provider options with appropriate pricing 237 foreach ( $shippingOptions->{$priorityProvider['providerId']} as $count => $option ) { 238 $shipping_id = $priorityProvider['providerId'] . ':' . $count; 239 240 $price = $option->price->withVAT; 241 242 // Apply added cost from settings 243 if ( isset( $settings['freight']['addedCost'] ) ) { 244 if ( ! empty( $settings['freight']['addedCostType'] ) && 'percent' === $settings['freight']['addedCostType'] ) { 245 $price += $price * ( $settings['freight']['addedCost'] / 100 ); 246 } else { 247 $price += $settings['freight']['addedCost']; 248 } 249 } 250 251 // If this is the cheapest priority option, use the discounted price 252 if ( $count === $cheapest_priority_count ) { 253 $price = $cheapest_priority_price; 254 } 255 // For other priority options, apply the same discount percentage if using percentage discount 256 elseif ( ! empty( $priorityProvider['discount'] ) && 'percent' === $priorityProvider['discountType'] ) { 257 $price = $price * ( 1 - ( $priorityProvider['discount'] / 100 ) ); 258 } 259 // For fixed discount, we don't apply it to other options as it's a fixed amount 260 261 // Always round up the price to the next full number. 262 $price = ceil( $price ); 215 263 216 264 // Set the label based on theme type 217 $label = $option->texts->displayName; 218 if ( ! $is_block_theme && isset( $option->texts->shipperName ) ) { 219 $label = $option->texts->shipperName . ' - ' . $label; 220 221 if ( isset( $option->texts->description ) ) { 222 $label .= ' (' . $option->texts->description . ')'; 223 } 265 $label = $option->texts->shipperName . ' - ' . $option->texts->displayName; 266 267 if ( isset( $option->texts->description ) ) { 268 $label .= ' (' . $option->texts->description . ')'; 224 269 } 225 270 … … 230 275 'priority' => true, 231 276 ] ); 277 278 // Track the cheapest priority shipping option 279 if ( null === $this->cheapest_shipping_price || $price < $this->cheapest_shipping_price ) { 280 $this->cheapest_shipping_price = $price; 281 $this->cheapest_shipping_id = $shipping_id; 282 } 232 283 } 233 284 } … … 266 317 'option' => $option, 267 318 ] ); 319 320 // Track the cheapest non-priority shipping option 321 // Only update if no priority provider exists or if this is cheaper than the cheapest priority option 322 if ( empty( $priorityProvider['providerId'] ) || null === $this->cheapest_shipping_price || $price < $this->cheapest_shipping_price ) { 323 $this->cheapest_shipping_price = $price; 324 $this->cheapest_shipping_id = $shipping_id; 325 } 268 326 } 269 327 } … … 293 351 ), 294 352 ] ); 353 354 // Set fallback as cheapest option if no other options exist 355 $this->cheapest_shipping_price = $price; 356 $this->cheapest_shipping_id = 'fallback'; 357 } 358 } 359 360 // Set the default shipping option in WooCommerce 361 if ( ! empty( $this->cheapest_shipping_id ) ) { 362 // Check if a shipping method is already chosen 363 $chosen_shipping_methods = \WC()->session->get( 'chosen_shipping_methods' ); 364 365 // Only set the default if no shipping method is chosen 366 if ( empty( $chosen_shipping_methods ) || ! is_array( $chosen_shipping_methods ) || empty( $chosen_shipping_methods[0] ) ) { 367 // Set the default shipping option in WooCommerce 368 \WC()->session->set( 'chosen_shipping_methods', [ $this->cheapest_shipping_id ] ); 295 369 } 296 370 } … … 308 382 */ 309 383 private function add_shipping_rate( $shipping_id, $label, $price, $package, $meta_data ) { 384 // Use wp_kses_post to allow safe HTML in the label while preventing XSS attacks 385 // This will prevent React from escaping the HTML entities 386 $safe_label = wp_kses_post( $label ); 387 310 388 $this->add_rate( [ 311 389 'id' => $shipping_id, 312 'label' => $ label,390 'label' => $safe_label, 313 391 'cost' => $price, 314 392 'taxes' => false, … … 324 402 * @param string $priority_provider_id The ID of the priority provider to exclude 325 403 * @param array $settings The plugin settings 326 * @return float The cheapest shipping price found404 * @return float|null The cheapest shipping price found 327 405 */ 328 406 private function get_cheapest_shipping_price( $shipping_options, $priority_provider_id, $settings ) { 329 $cheapest_price = PHP_FLOAT_MAX;407 $cheapest_price = null; 330 408 $has_other_providers = false; 331 409 … … 351 429 } 352 430 353 if ( $price < $cheapest_price ) {431 if ( null === $cheapest_price || $price < $cheapest_price ) { 354 432 $cheapest_price = $price; 355 433 } -
fraktvalg/trunk/build/Blocks/ShippingSelector/frontend.asset.php
r3267354 r3271607 1 <?php return array('dependencies' => array('react', 'react-dom', 'wc-blocks-checkout', 'wc-blocks-data-store', 'wp-api-fetch', 'wp- block-editor', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '4de089affb66c785bb90');1 <?php return array('dependencies' => array('react', 'react-dom', 'wc-blocks-checkout', 'wc-blocks-data-store', 'wp-api-fetch', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => 'b9f8ade8925a4162d686'); -
fraktvalg/trunk/build/Blocks/ShippingSelector/frontend.js
r3267354 r3271607 1 (()=>{"use strict";var e,t={ 380:(e,t,r)=>{const i=window.wc.blocksCheckout,a=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"fraktvalg/shipping-selector","version":"1.0.0","title":"Fraktvalg","category":"widgets","description":"Shipping selector from Fraktvalg","parent":["woocommerce/checkout-fields-block","woocommerce/cart-order-summary-totals-block"],"keywords":["fraktvalg","shipping"],"attributes":{"lock":{"type":"object","default":{"remove":true,"move":false}},"primaryColor":{"type":"string","default":"#2F463E"},"secondaryColor":{"type":"string","default":"#4D8965"},"tertiaryColor":{"type":"string","default":"#65C7A4"},"style":{"type":"object"}},"supports":{"html":false,"multiple":false,"reusable":false,"inserter":false,"lock":false,"color":false,"spacing":false,"typography":false,"__experimentalBorder":false},"styles":[{"name":"default","label":"Default","isDefault":true}],"textdomain":"fraktvalg","editorScript":"file:./index.js","viewScript":"file:./frontend.js","style":"file:./style-frontend.css","render":"file:./render.php"}'),s=window.wp.element,l=window.wp.blockEditor,o=window.wp.i18n,n=window.wp.apiFetch;var c=r.n(n);const d=window.wp.data;window.wc.wcBlocksData;var p=r(609);function m({title:e,titleId:t,...r},i){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":t},r),e?p.createElement("title",{id:t},e):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 18.75a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m3 0h6m-9 0H3.375a1.125 1.125 0 0 1-1.125-1.125V14.25m17.25 4.5a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m3 0h1.125c.621 0 1.129-.504 1.09-1.124a17.902 17.902 0 0 0-3.213-9.193 2.056 2.056 0 0 0-1.58-.86H14.25M16.5 18.75h-2.25m0-11.177v-.958c0-.568-.422-1.048-.987-1.106a48.554 48.554 0 0 0-10.026 0 1.106 1.106 0 0 0-.987 1.106v7.635m12-6.677v6.677m0 4.5v-4.5m0 0h-12"}))}const h=p.forwardRef(m);function u({title:e,titleId:t,...r},i){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":t},r),e?p.createElement("title",{id:t},e):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m2.25 12 8.954-8.955c.44-.439 1.152-.439 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25"}))}const f=p.forwardRef(u);function g({title:e,titleId:t,...r},i){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":t},r),e?p.createElement("title",{id:t},e):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m20.25 7.5-.625 10.632a2.25 2.25 0 0 1-2.247 2.118H6.622a2.25 2.25 0 0 1-2.247-2.118L3.75 7.5M10 11.25h4M3.375 7.5h17.25c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125Z"}))}const v=p.forwardRef(g);var w=r(848);const x=e=>{switch(e){case"Parcel":default:return(0,w.jsx)(h,{className:"w-10 h-10 mr-4",style:{color:"var(--fraktvalg-tertiary-color)"}});case"HomeDelivery":return(0,w.jsx)(f,{className:"w-10 h-10 mr-4",style:{color:"var(--fraktvalg-tertiary-color)"}});case"ServiceParcel":return(0,w.jsx)(v,{className:"w-10 h-10 mr-4",style:{color:"var(--fraktvalg-tertiary-color)"}})}};function y({title:e,titleId:t,...r},i){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":t},r),e?p.createElement("title",{id:t},e):null,p.createElement("path",{fillRule:"evenodd",d:"M4.755 10.059a7.5 7.5 0 0 1 12.548-3.364l1.903 1.903h-3.183a.75.75 0 1 0 0 1.5h4.992a.75.75 0 0 0 .75-.75V4.356a.75.75 0 0 0-1.5 0v3.18l-1.9-1.9A9 9 0 0 0 3.306 9.67a.75.75 0 1 0 1.45.388Zm15.408 3.352a.75.75 0 0 0-.919.53 7.5 7.5 0 0 1-12.548 3.364l-1.902-1.903h3.183a.75.75 0 0 0 0-1.5H2.984a.75.75 0 0 0-.75.75v4.992a.75.75 0 0 0 1.5 0v-3.18l1.9 1.9a9 9 0 0 0 15.059-4.035.75.75 0 0 0-.53-.918Z",clipRule:"evenodd"}))}const k=p.forwardRef(y);function b(){return(0,w.jsxs)("div",{className:"flex flex-col justify-center items-center h-64",children:[(0,w.jsx)(k,{className:"h-8 w-8 animate-spin text-primary"}),(0,w.jsx)("div",{className:"text-lg",children:(0,o.__)("Fetching the best shipping options...","fraktvalg")})]})}function j({title:e,titleId:t,...r},i){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":t},r),e?p.createElement("title",{id:t},e):null,p.createElement("path",{fillRule:"evenodd",d:"M11.03 3.97a.75.75 0 0 1 0 1.06l-6.22 6.22H21a.75.75 0 0 1 0 1.5H4.81l6.22 6.22a.75.75 0 1 1-1.06 1.06l-7.5-7.5a.75.75 0 0 1 0-1.06l7.5-7.5a.75.75 0 0 1 1.06 0Z",clipRule:"evenodd"}))}const _=p.forwardRef(j);function O({title:e,titleId:t,...r},i){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":t},r),e?p.createElement("title",{id:t},e):null,p.createElement("path",{fillRule:"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm13.36-1.814a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z",clipRule:"evenodd"}))}const S=p.forwardRef(O);function E(e){var t,r,i="";if("string"==typeof e||"number"==typeof e)i+=e;else if("object"==typeof e)if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=E(e[t]))&&(i&&(i+=" "),i+=r)}else for(r in e)e[r]&&(i&&(i+=" "),i+=r);return i}function N(){for(var e,t,r=0,i="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=E(e))&&(i&&(i+=" "),i+=t);return i}const C=e=>"function"==typeof wc.priceFormat.formatPrice?wc.priceFormat.formatPrice(e):(e/100).toFixed(2);function R({methods:e,selectedShippingMethod:t,onSelectMethod:r,setSelectedShipper:i,showReturnButton:a=!0,isEditor:s=!1,isLoading:l=!1}){return(0,w.jsxs)("div",{className:"py-4",children:[a&&(0,w.jsxs)("button",{className:"mb-4 px-4 py-2 pl-0 transition-all bg-transparent hover:text-secondary rounded-lg",onClick:()=>i(null),disabled:s||l,style:{opacity:s||l?.5:1,cursor:s||l?"not-allowed":"pointer"},children:[(0,w.jsx)(_,{className:"w-4 h-4 inline-block mr-2"}),(0,o.__)("Return to shipping providers","fraktvalg")]}),(0,w.jsx)("div",{className:"flex flex-col gap-2",children:e.map(((e,i)=>(0,w.jsxs)("div",{className:N("border rounded-lg p-4 flex flex-col sm:flex-row transition-all duraction-300 items-center justify-between",{"cursor-pointer hover:bg-tertiary/10 hover:shadow-md":!l,"cursor-not-allowed opacity-50":l&&e?.rate_id!==t}),onClick:()=>!l&&r(e),children:[(0,w.jsxs)("div",{className:"flex items-center",children:[e?.rate_id===t?(0,w.jsx)(S,{className:"w-10 h-10 mr-4 text-primary inline-block"}):e?.icon&&e.icon,(0,w.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,w.jsx)("span",{className:"text-md font-semibold",children:e.name}),(0,w.jsx)("span",{className:"text-sm italic",children:e.description}),(0,w.jsx)("p",{className:"text-sm text-gray-600 flex items-center",children:e.shippingTime})]})]}),(0,w.jsx)("p",{className:"text-md font-medium mt-2 sm:mt-0",children:C(e.price)})]},i)))})]})}function M({logo:e=null,...t}){const{alt:r=""}=t;return e?e.startsWith("http")||e.startsWith("data:image")?(0,w.jsx)("img",{src:e,alt:r,...t}):(e.startsWith("https")||(e=encodeURIComponent(e)),(0,w.jsx)("img",{src:"data:image/svg+xml;utf8,"+e,alt:r,...t})):(0,w.jsx)(h,{...t})}function L({title:e,titleId:t,...r},i){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":t},r),e?p.createElement("title",{id:t},e):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const T=p.forwardRef(L);function P({shippers:e,onSelectShipper:t,editorMode:r}){return(0,w.jsx)("div",{className:"py-4 flex flex-col gap-2",children:Object.entries(e).map((([e,i])=>(0,w.jsxs)("div",{className:"border rounded-lg p-4 bg-white flex flex-col sm:flex-row transition-all duration-300 items-center justify-between cursor-pointer hover:bg-tertiary/10 hover:shadow-md",onClick:()=>"multiple"!==r&&t(i),children:[(0,w.jsxs)("div",{className:"flex items-center",children:[(0,w.jsx)(M,{logo:i?.texts?.logo?.url,alt:i?.details?.label,className:"w-8 h-8 mr-2"}),(0,w.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,w.jsxs)("span",{className:"text-md font-semibold",children:["Fraktes av ",i?.details?.label]}),(0,w.jsxs)("p",{className:"text-sm text-gray-600 flex items-center",children:[(0,w.jsx)(T,{className:"w-4 h-4 inline-block mr-2"}),i?.details?.quickestShippingTime]})]})]}),(0,w.jsxs)("p",{className:"text-md font-medium mt-2 sm:mt-0",children:["Fra ",C(i?.details?.LowestPrice)]})]},e)))})}function D({attributes:e={}}){const{primaryColor:t="#2F463E",secondaryColor:r="#4D8965",tertiaryColor:i="#65C7A4"}=e,[a,n]=(0,s.useState)(null),[p,m]=(0,s.useState)(null),[h,u]=(0,s.useState)(!0),[f,g]=(0,s.useState)(!1),[v,y]=(0,s.useState)({}),[k,j]=(0,s.useState)(!1),_=(0,l.useBlockProps)({className:"wp-block-fraktvalg-shipping-selector"}),O={"--fraktvalg-primary-color":t,"--fraktvalg-secondary-color":r,"--fraktvalg-tertiary-color":i},S=e=>{e&&e.rate_id&&(g(!0),c()({path:"/wc/store/v1/cart/select-shipping-rate",method:"POST",data:{package_id:0,rate_id:e.rate_id}}).then((t=>{m(e.rate_id),(0,d.dispatch)("wc/store/cart").invalidateResolutionForStore()})).catch((e=>{m(null)})).finally((()=>{g(!1)})))},E=()=>{u(!0),c()({path:"/wc/store/v1/cart",method:"GET"}).then((e=>{let t=function(e){let t=[],r={},i=null,a={},s=null;return e?.shipping_rates?.forEach((e=>{e?.shipping_rates?.forEach((e=>{e?.meta_data?.some((e=>"fraktvalg"===e.key))&&(r=e?.meta_data?.find((e=>"option"===e.key))?.value||{},i=e?.rate_id.split(":")[0],t.some((e=>e.id===i))?(s=t.find((e=>e.id===i)),s&&e.price<s.details.LowestPrice&&(s.details.LowestPrice=e.price)):(a=e?.meta_data.find((e=>"option"===e.key))?.value||{},t.push({id:i,details:{label:r?.texts?.shipperName,quickestShippingTime:"2 virkedager",LowestPrice:e.price},shippingOptions:[],...a})))}))})),t}(e);t.forEach((t=>{const r=function(e,t){let r=[];return e?.shipping_rates?.forEach((e=>{e?.shipping_rates?.forEach((e=>{if(!e?.meta_data?.some((e=>"fraktvalg"===e.key)))return;let i=e?.rate_id.split(":")[0],a=e?.meta_data.find((e=>"option"===e.key))?.value,s=a?.delivery?.estimatedDate||(new Date).toISOString().split("T")[0];i===t.id&&r.push({rate_id:e?.rate_id,name:e?.name,description:a?.texts?.description,price:e?.price,icon:a?.delivery?.serviceCode,selected:e?.selected||!1,delivery:{date:s,days:Math.max(1,Math.ceil((new Date(s)-new Date)/864e5))}})}))})),r}(e,t);t.shippingOptions=r.map((e=>({rate_id:e.rate_id,name:e.name,description:e.description,price:e.price,shippingTime:"1-3 virkedager",icon:x(e.delivery.serviceCode),selected:e.selected,delivery:{days:e.delivery.days}})));const i=t?.shippingOptions.find((e=>e.selected))||null;i&&(n(t),m(i.rate_id)),t.details.LowestPrice=Math.min(...t.shippingOptions.map((e=>e.price))),t.details.quickestShippingTime=Math.min(...t.shippingOptions.map((e=>e.delivery.days)))+(0,o.__)(" business days","fraktvalg")})),y(t)})).catch((e=>console.error("Error fetching shipping options:",e))).finally((()=>{u(!1)}))},N=(0,s.useCallback)((()=>{window.shippingOptionsTimeout&&clearTimeout(window.shippingOptionsTimeout),window.shippingOptionsTimeout=setTimeout((()=>{E()}),1e3)}),[]);return(0,s.useEffect)((()=>{E();const e=(0,d.select)("wc/store/cart").getCartData();console.log("Initial Cart Data:",e);let t=JSON.stringify(e.shippingAddress);const r=(0,d.subscribe)((()=>{const e=(0,d.select)("wc/store/cart").getCartData(),r=JSON.stringify(e.shippingAddress);t!==r&&(console.log("Shipping Address Changed:",e.shippingAddress),t=r,N())}));return()=>{r(),window.shippingOptionsTimeout&&clearTimeout(window.shippingOptionsTimeout)}}),[N]),(0,w.jsx)("div",{..._,style:O,children:h?(0,w.jsx)(b,{}):1!==v.length||k?!a||k?(0,w.jsx)(P,{shippers:v,onSelectShipper:e=>{n(e),j(!1)},selectedShippingMethod:p}):(0,w.jsx)(R,{methods:a.shippingOptions,setSelectedShipper:()=>n(null),selectedShippingMethod:p,onSelectMethod:S,isLoading:f}):(0,w.jsx)(R,{methods:v[0].shippingOptions,setSelectedShipper:()=>j(!0),selectedShippingMethod:p,onSelectMethod:S,isLoading:f,showReturnButton:!1})})}var B=r(338);(0,i.registerCheckoutBlock)({metadata:a,component:()=>(0,w.jsx)(D,{})});let F=0;const I=()=>{const e=document.getElementById("fraktvalg-shipping");if(e){let t={};try{const r=e.getAttribute("data-attributes");r&&(t=JSON.parse(r))}catch(e){console.error("Error parsing Fraktvalg block attributes:",e)}(0,B.H)(e).render((0,w.jsx)(D,{attributes:t}))}else F<60&&(F++,setTimeout(I,1e3))};I()},338:(e,t,r)=>{var i=r(795);t.H=i.createRoot,i.hydrateRoot},20:(e,t,r)=>{var i=r(609),a=Symbol.for("react.element"),s=(Symbol.for("react.fragment"),Object.prototype.hasOwnProperty),l=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function n(e,t,r){var i,n={},c=null,d=null;for(i in void 0!==r&&(c=""+r),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(d=t.ref),t)s.call(t,i)&&!o.hasOwnProperty(i)&&(n[i]=t[i]);if(e&&e.defaultProps)for(i in t=e.defaultProps)void 0===n[i]&&(n[i]=t[i]);return{$$typeof:a,type:e,key:c,ref:d,props:n,_owner:l.current}}t.jsx=n,t.jsxs=n},848:(e,t,r)=>{e.exports=r(20)},609:e=>{e.exports=window.React},795:e=>{e.exports=window.ReactDOM}},r={};function i(e){var a=r[e];if(void 0!==a)return a.exports;var s=r[e]={exports:{}};return t[e](s,s.exports,i),s.exports}i.m=t,e=[],i.O=(t,r,a,s)=>{if(!r){var l=1/0;for(d=0;d<e.length;d++){for(var[r,a,s]=e[d],o=!0,n=0;n<r.length;n++)(!1&s||l>=s)&&Object.keys(i.O).every((e=>i.O[e](r[n])))?r.splice(n--,1):(o=!1,s<l&&(l=s));if(o){e.splice(d--,1);var c=a();void 0!==c&&(t=c)}}return t}s=s||0;for(var d=e.length;d>0&&e[d-1][2]>s;d--)e[d]=e[d-1];e[d]=[r,a,s]},i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={64:0,920:0};i.O.j=t=>0===e[t];var t=(t,r)=>{var a,s,[l,o,n]=r,c=0;if(l.some((t=>0!==e[t]))){for(a in o)i.o(o,a)&&(i.m[a]=o[a]);if(n)var d=n(i)}for(t&&t(r);c<l.length;c++)s=l[c],i.o(e,s)&&e[s]&&e[s][0](),e[s]=0;return i.O(d)},r=globalThis.webpackChunkfraktvalg=globalThis.webpackChunkfraktvalg||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var a=i.O(void 0,[920],(()=>i(380)));a=i.O(a)})();1 (()=>{"use strict";var e,t={681:(e,t,r)=>{const a=window.wc.blocksCheckout,i=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"fraktvalg/shipping-selector","version":"1.0.0","title":"Fraktvalg","category":"widgets","description":"Shipping selector from Fraktvalg","parent":["woocommerce/checkout-fields-block","woocommerce/cart-order-summary-totals-block"],"keywords":["fraktvalg","shipping"],"attributes":{"lock":{"type":"object","default":{"remove":true,"move":false}},"primaryColor":{"type":"string","default":"#2F463E"},"secondaryColor":{"type":"string","default":"#4D8965"},"tertiaryColor":{"type":"string","default":"#65C7A4"},"style":{"type":"object"}},"supports":{"html":false,"multiple":false,"reusable":false,"inserter":false,"lock":false,"color":false,"spacing":false,"typography":false,"__experimentalBorder":false},"styles":[{"name":"default","label":"Default","isDefault":true}],"textdomain":"fraktvalg","editorScript":"file:./index.js","viewScript":"file:./frontend.js","style":"file:./style-frontend.css","render":"file:./render.php"}'),l=window.wp.element,s=window.wp.i18n,o=window.wp.apiFetch;var n=r.n(o);const c=window.wp.data;window.wc.wcBlocksData;var d=r(609);function p({title:e,titleId:t,...r},a){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},r),e?d.createElement("title",{id:t},e):null,d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 18.75a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m3 0h6m-9 0H3.375a1.125 1.125 0 0 1-1.125-1.125V14.25m17.25 4.5a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m3 0h1.125c.621 0 1.129-.504 1.09-1.124a17.902 17.902 0 0 0-3.213-9.193 2.056 2.056 0 0 0-1.58-.86H14.25M16.5 18.75h-2.25m0-11.177v-.958c0-.568-.422-1.048-.987-1.106a48.554 48.554 0 0 0-10.026 0 1.106 1.106 0 0 0-.987 1.106v7.635m12-6.677v6.677m0 4.5v-4.5m0 0h-12"}))}const m=d.forwardRef(p);function u({title:e,titleId:t,...r},a){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},r),e?d.createElement("title",{id:t},e):null,d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m2.25 12 8.954-8.955c.44-.439 1.152-.439 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25"}))}const f=d.forwardRef(u);function h({title:e,titleId:t,...r},a){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},r),e?d.createElement("title",{id:t},e):null,d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m20.25 7.5-.625 10.632a2.25 2.25 0 0 1-2.247 2.118H6.622a2.25 2.25 0 0 1-2.247-2.118L3.75 7.5M10 11.25h4M3.375 7.5h17.25c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125Z"}))}const g=d.forwardRef(h);var v=r(848);const w=e=>{switch(e){case"Parcel":default:return(0,v.jsx)(m,{className:"w-10 h-10 mr-4",style:{color:"var(--fraktvalg-tertiary-color)"}});case"HomeDelivery":return(0,v.jsx)(f,{className:"w-10 h-10 mr-4",style:{color:"var(--fraktvalg-tertiary-color)"}});case"ServiceParcel":return(0,v.jsx)(g,{className:"w-10 h-10 mr-4",style:{color:"var(--fraktvalg-tertiary-color)"}})}};function x({title:e,titleId:t,...r},a){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},r),e?d.createElement("title",{id:t},e):null,d.createElement("path",{fillRule:"evenodd",d:"M4.755 10.059a7.5 7.5 0 0 1 12.548-3.364l1.903 1.903h-3.183a.75.75 0 1 0 0 1.5h4.992a.75.75 0 0 0 .75-.75V4.356a.75.75 0 0 0-1.5 0v3.18l-1.9-1.9A9 9 0 0 0 3.306 9.67a.75.75 0 1 0 1.45.388Zm15.408 3.352a.75.75 0 0 0-.919.53 7.5 7.5 0 0 1-12.548 3.364l-1.902-1.903h3.183a.75.75 0 0 0 0-1.5H2.984a.75.75 0 0 0-.75.75v4.992a.75.75 0 0 0 1.5 0v-3.18l1.9 1.9a9 9 0 0 0 15.059-4.035.75.75 0 0 0-.53-.918Z",clipRule:"evenodd"}))}const y=d.forwardRef(x);function b({text:e=(0,s.__)("Fetching the best shipping options...","fraktvalg")}){return(0,v.jsxs)("div",{className:"flex flex-col justify-center items-center h-64",children:[(0,v.jsx)(y,{className:"h-8 w-8 animate-spin text-primary"}),(0,v.jsx)("div",{className:"text-lg",children:e})]})}function k({title:e,titleId:t,...r},a){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},r),e?d.createElement("title",{id:t},e):null,d.createElement("path",{fillRule:"evenodd",d:"M11.03 3.97a.75.75 0 0 1 0 1.06l-6.22 6.22H21a.75.75 0 0 1 0 1.5H4.81l6.22 6.22a.75.75 0 1 1-1.06 1.06l-7.5-7.5a.75.75 0 0 1 0-1.06l7.5-7.5a.75.75 0 0 1 1.06 0Z",clipRule:"evenodd"}))}const j=d.forwardRef(k);function _({title:e,titleId:t,...r},a){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},r),e?d.createElement("title",{id:t},e):null,d.createElement("path",{fillRule:"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm13.36-1.814a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z",clipRule:"evenodd"}))}const O=d.forwardRef(_);function E(e){var t,r,a="";if("string"==typeof e||"number"==typeof e)a+=e;else if("object"==typeof e)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=E(e[t]))&&(a&&(a+=" "),a+=r)}else for(r in e)e[r]&&(a&&(a+=" "),a+=r);return a}function S(){for(var e,t,r=0,a="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=E(e))&&(a&&(a+=" "),a+=t);return a}const N=e=>"function"==typeof wc.priceFormat.formatPrice?wc.priceFormat.formatPrice(e):(e/100).toFixed(0);function C({methods:e,selectedShippingMethod:t,onSelectMethod:r,setSelectedShipper:a,showReturnButton:i=!0,isEditor:l=!1,isLoading:o=!1}){return(0,v.jsxs)("div",{className:"py-4",children:[i&&(0,v.jsxs)("button",{className:"mb-4 px-4 py-2 pl-0 transition-all bg-transparent hover:text-secondary rounded-lg",onClick:()=>a(null),disabled:l||o,style:{opacity:l||o?.5:1,cursor:l||o?"not-allowed":"pointer"},children:[(0,v.jsx)(j,{className:"w-4 h-4 inline-block mr-2"}),(0,s.__)("Return to shipping providers","fraktvalg")]}),(0,v.jsx)("div",{className:"flex flex-col gap-2",role:"radiogroup","aria-label":(0,s.__)("Shipping methods","fraktvalg"),children:e.map(((e,a)=>(0,v.jsx)("button",{type:"button",role:"radio","aria-checked":e?.rate_id===t,className:S("w-full text-left border border-solid rounded-lg p-4 flex flex-col sm:flex-row transition-all duration-300 items-center justify-between",{"cursor-pointer hover:bg-tertiary/10 hover:shadow-md":!o,"cursor-not-allowed opacity-50":o&&e?.rate_id!==t}),onClick:()=>!o&&r(e),onKeyDown:t=>{o||"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),r(e))},disabled:o&&e?.rate_id!==t,children:(0,v.jsxs)("div",{className:"flex items-center w-full",children:[(0,v.jsx)("div",{className:"flex-shrink-0",children:e?.rate_id===t?(0,v.jsx)(O,{className:"w-10 h-10 mr-4 text-primary inline-block"}):e?.icon&&e.icon}),(0,v.jsxs)("div",{className:"flex flex-col gap-1 flex-grow",children:[(0,v.jsx)("span",{className:"text-md font-semibold",dangerouslySetInnerHTML:{__html:e.name}}),(0,v.jsx)("span",{className:"text-sm italic",children:e.description}),(0,v.jsxs)("div",{className:"flex justify-between gap-2 w-full",children:[(0,v.jsx)("p",{className:"text-sm text-nowrap text-gray-600 flex items-center",children:e.shippingTime}),(0,v.jsx)("p",{className:"text-md text-nowrap font-medium mt-2 sm:mt-0",children:N(e.price)})]})]})]})},a)))})]})}function R({logo:e=null,...t}){const{alt:r=""}=t;return e?e.startsWith("http")||e.startsWith("data:image")?(0,v.jsx)("img",{src:e,alt:r,...t}):(e.startsWith("https")||(e=encodeURIComponent(e)),(0,v.jsx)("img",{src:"data:image/svg+xml;utf8,"+e,alt:r,...t})):(0,v.jsx)(m,{...t})}function M({title:e,titleId:t,...r},a){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},r),e?d.createElement("title",{id:t},e):null,d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const T=d.forwardRef(M);function L({shippers:e,onSelectShipper:t,editorMode:r}){return(0,v.jsx)("div",{className:"py-4 flex flex-col gap-2",role:"listbox","aria-label":"Shipping providers",children:Object.entries(e).map((([e,a])=>(0,v.jsxs)("button",{type:"button",className:"w-full text-left border border-solid rounded-lg p-4 bg-white flex flex-col sm:flex-row transition-all duration-300 items-center justify-between cursor-pointer hover:bg-tertiary/10 hover:shadow-md",onClick:()=>"multiple"!==r&&t(a),onKeyDown:e=>{"multiple"===r||"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),t(a))},disabled:"multiple"===r,children:[(0,v.jsxs)("div",{className:"flex items-center",children:[(0,v.jsx)(R,{logo:a?.texts?.logo?.url,alt:a?.details?.label,className:"w-12 h-12 mr-2"}),(0,v.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,v.jsxs)("span",{className:"text-md font-semibold",children:["Fraktes av ",a?.details?.label]}),(0,v.jsxs)("p",{className:"text-sm text-gray-600 flex items-center",children:[(0,v.jsx)(T,{className:"w-4 h-4 inline-block mr-2"}),a?.details?.quickestShippingTime]})]})]}),(0,v.jsxs)("p",{className:"text-md font-medium mt-2 sm:mt-0",children:["Fra ",N(a?.details?.LowestPrice)]})]},e)))})}function D({attributes:e={}}){const{primaryColor:t="#2F463E",secondaryColor:r="#4D8965",tertiaryColor:a="#65C7A4"}=e,[i,o]=(0,l.useState)(null),[d,p]=(0,l.useState)(null),[m,u]=(0,l.useState)(!0),[f,h]=(0,l.useState)(!1),[g,x]=(0,l.useState)({}),[y,k]=(0,l.useState)(!0),j={"--fraktvalg-primary-color":t,"--fraktvalg-secondary-color":r,"--fraktvalg-tertiary-color":a},_=()=>{u(!0),n()({path:"/wc/store/v1/cart",method:"GET"}).then((e=>{let t=function(e){let t=[],r={},a=null,i={},l=null;return e?.shipping_rates?.forEach((e=>{e?.shipping_rates?.forEach((e=>{e?.meta_data?.some((e=>"fraktvalg"===e.key))&&(r=e?.meta_data?.find((e=>"option"===e.key))?.value||{},a=e?.rate_id.split(":")[0],t.some((e=>e.id===a))?(l=t.find((e=>e.id===a)),l&&e.price<l.details.LowestPrice&&(l.details.LowestPrice=e.price)):(i=e?.meta_data.find((e=>"option"===e.key))?.value||{},t.push({id:a,details:{label:r?.texts?.shipperName,quickestShippingTime:"2 virkedager",LowestPrice:e.price},shippingOptions:[],...i})))}))})),t}(e);t.forEach((t=>{const r=function(e,t){let r=[];return e?.shipping_rates?.forEach((e=>{e?.shipping_rates?.forEach((e=>{if(!e?.meta_data?.some((e=>"fraktvalg"===e.key)))return;let a=e?.rate_id.split(":")[0],i=e?.meta_data.find((e=>"option"===e.key))?.value,l=i?.delivery?.estimatedDate||(new Date).toISOString().split("T")[0];a===t.id&&r.push({rate_id:e?.rate_id,name:i?.texts?.displayName||e?.name,description:i?.texts?.description,price:e?.price,icon:i?.delivery?.serviceCode,selected:e?.selected||!1,delivery:{date:l,days:Math.max(1,Math.ceil((new Date(l)-new Date)/864e5))}})}))})),r}(e,t);t.shippingOptions=r.map((e=>({rate_id:e.rate_id,name:e.name,description:e.description,price:e.price,shippingTime:"1-3 virkedager",icon:w(e.delivery.serviceCode),selected:e.selected,delivery:{days:e.delivery.days}})));const a=t?.shippingOptions.find((e=>e.selected))||null;a&&(o(t),p(a.rate_id)),t.details.LowestPrice=Math.min(...t.shippingOptions.map((e=>e.price)));const i=Math.min(...t.shippingOptions.map((e=>e.delivery.days)));t.details.quickestShippingTime=isNaN(i)?"1-3":i+(0,s.__)(" business days","fraktvalg")})),x(t)})).catch((e=>console.error("Error fetching shipping options:",e))).finally((()=>{u(!1)}))},O=(0,l.useCallback)((()=>{window.shippingOptionsTimeout&&clearTimeout(window.shippingOptionsTimeout),window.shippingOptionsTimeout=setTimeout((()=>{_()}),1e3)}),[]);return(0,l.useEffect)((()=>{_();const e=(0,c.select)("wc/store/cart").getCartData();let t=JSON.stringify(e.shippingAddress);const r=(0,c.subscribe)((()=>{const e=(0,c.select)("wc/store/cart").getCartData(),r=JSON.stringify(e.shippingAddress);t!==r&&(t=r,O())}));return()=>{r(),window.shippingOptionsTimeout&&clearTimeout(window.shippingOptionsTimeout)}}),[O]),(0,v.jsx)("div",{className:"wp-block-fraktvalg-shipping-selector",style:j,children:m?(0,v.jsx)(b,{}):f?(0,v.jsx)(b,{text:(0,s.__)("Updating cart totals with your new shipping preference","fraktvalg")}):1===g.length||g.length>1&&!y?(0,v.jsx)(C,{methods:i?.shippingOptions||g[0].shippingOptions,setSelectedShipper:()=>k(!0),selectedShippingMethod:d,onSelectMethod:e=>{e&&e.rate_id&&(h(!0),n()({path:"/wc/store/v1/cart/select-shipping-rate",method:"POST",data:{package_id:0,rate_id:e.rate_id}}).then((t=>{p(e.rate_id),(0,c.dispatch)("wc/store/cart").invalidateResolutionForStore()})).catch((e=>{p(null)})).finally((()=>{h(!1)})))},isLoading:f,showReturnButton:g.length>1}):(0,v.jsx)(L,{shippers:g,onSelectShipper:e=>{o(e),k(!1)},selectedShippingMethod:d})})}var P=r(338);(0,a.registerCheckoutBlock)({metadata:i,component:()=>(0,v.jsx)(D,{})});let B=0;const F=()=>{const e=document.getElementById("fraktvalg-shipping");if(e){let t={};try{const r=e.getAttribute("data-attributes");r&&(t=JSON.parse(r))}catch(e){console.error("Error parsing Fraktvalg block attributes:",e)}(0,P.H)(e).render((0,v.jsx)(D,{attributes:t}))}else B<60&&(B++,setTimeout(F,1e3))};F()},338:(e,t,r)=>{var a=r(795);t.H=a.createRoot,a.hydrateRoot},20:(e,t,r)=>{var a=r(609),i=Symbol.for("react.element"),l=(Symbol.for("react.fragment"),Object.prototype.hasOwnProperty),s=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function n(e,t,r){var a,n={},c=null,d=null;for(a in void 0!==r&&(c=""+r),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(d=t.ref),t)l.call(t,a)&&!o.hasOwnProperty(a)&&(n[a]=t[a]);if(e&&e.defaultProps)for(a in t=e.defaultProps)void 0===n[a]&&(n[a]=t[a]);return{$$typeof:i,type:e,key:c,ref:d,props:n,_owner:s.current}}t.jsx=n,t.jsxs=n},848:(e,t,r)=>{e.exports=r(20)},609:e=>{e.exports=window.React},795:e=>{e.exports=window.ReactDOM}},r={};function a(e){var i=r[e];if(void 0!==i)return i.exports;var l=r[e]={exports:{}};return t[e](l,l.exports,a),l.exports}a.m=t,e=[],a.O=(t,r,i,l)=>{if(!r){var s=1/0;for(d=0;d<e.length;d++){for(var[r,i,l]=e[d],o=!0,n=0;n<r.length;n++)(!1&l||s>=l)&&Object.keys(a.O).every((e=>a.O[e](r[n])))?r.splice(n--,1):(o=!1,l<s&&(s=l));if(o){e.splice(d--,1);var c=i();void 0!==c&&(t=c)}}return t}l=l||0;for(var d=e.length;d>0&&e[d-1][2]>l;d--)e[d]=e[d-1];e[d]=[r,i,l]},a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={64:0,920:0};a.O.j=t=>0===e[t];var t=(t,r)=>{var i,l,[s,o,n]=r,c=0;if(s.some((t=>0!==e[t]))){for(i in o)a.o(o,i)&&(a.m[i]=o[i]);if(n)var d=n(a)}for(t&&t(r);c<s.length;c++)l=s[c],a.o(e,l)&&e[l]&&e[l][0](),e[l]=0;return a.O(d)},r=globalThis.webpackChunkfraktvalg=globalThis.webpackChunkfraktvalg||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var i=a.O(void 0,[920],(()=>a(681)));i=a.O(i)})(); -
fraktvalg/trunk/build/Blocks/ShippingSelector/index.asset.php
r3267354 r3271607 1 <?php return array('dependencies' => array('react', 'wc-blocks-checkout', 'wc-blocks-data-store', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => ' d0aedb33e9727e643b63');1 <?php return array('dependencies' => array('react', 'wc-blocks-checkout', 'wc-blocks-data-store', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '352f818acdf997505d90'); -
fraktvalg/trunk/build/Blocks/ShippingSelector/index.js
r3267354 r3271607 1 (()=>{"use strict";var e,t={870:(e,t,r)=>{const i=window.wp.blocks,a=window.wc.blocksCheckout, s=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"fraktvalg/shipping-selector","version":"1.0.0","title":"Fraktvalg","category":"widgets","description":"Shipping selector from Fraktvalg","parent":["woocommerce/checkout-fields-block","woocommerce/cart-order-summary-totals-block"],"keywords":["fraktvalg","shipping"],"attributes":{"lock":{"type":"object","default":{"remove":true,"move":false}},"primaryColor":{"type":"string","default":"#2F463E"},"secondaryColor":{"type":"string","default":"#4D8965"},"tertiaryColor":{"type":"string","default":"#65C7A4"},"style":{"type":"object"}},"supports":{"html":false,"multiple":false,"reusable":false,"inserter":false,"lock":false,"color":false,"spacing":false,"typography":false,"__experimentalBorder":false},"styles":[{"name":"default","label":"Default","isDefault":true}],"textdomain":"fraktvalg","editorScript":"file:./index.js","viewScript":"file:./frontend.js","style":"file:./style-frontend.css","render":"file:./render.php"}'),l=window.wp.element,n=window.wp.blockEditor,o=window.wp.i18n,c=window.wp.components;var d=r(609);function p({title:e,titleId:t,...r},i){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":t},r),e?d.createElement("title",{id:t},e):null,d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 18.75a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m3 0h6m-9 0H3.375a1.125 1.125 0 0 1-1.125-1.125V14.25m17.25 4.5a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m3 0h1.125c.621 0 1.129-.504 1.09-1.124a17.902 17.902 0 0 0-3.213-9.193 2.056 2.056 0 0 0-1.58-.86H14.25M16.5 18.75h-2.25m0-11.177v-.958c0-.568-.422-1.048-.987-1.106a48.554 48.554 0 0 0-10.026 0 1.106 1.106 0 0 0-.987 1.106v7.635m12-6.677v6.677m0 4.5v-4.5m0 0h-12"}))}const h=d.forwardRef(p),m=JSON.parse('{"single":[{"id":"1","name":"Express Shipping","details":{"LowestPrice":99,"quickestShippingTime":"1-2 business days"},"shippingOptions":[{"rate_id":"express_standard","name":"Standard Delivery","price":99,"shippingTime":"2-3 virkedager","delivery":{"days":2}},{"rate_id":"express_priority","name":"Priority Delivery","price":149,"shippingTime":"1-2 virkedager","delivery":{"days":1}}]}],"multiple":[{"id":"1","name":"Fast Shipping","details":{"LowestPrice":149,"quickestShippingTime":"1 business day"},"shippingOptions":[{"rate_id":"fast_priority","name":"Priority Delivery","price":149,"shippingTime":"1-2 virkedager","delivery":{"days":1}},{"rate_id":"fast_express","name":"Express Delivery","price":199,"shippingTime":"Same Day","delivery":{"days":0}}]},{"id":"2","name":"Budget Shipping","details":{"LowestPrice":49,"quickestShippingTime":"3 business days"},"shippingOptions":[{"rate_id":"budget_standard","name":"Standard Delivery","price":49,"shippingTime":"3-5 virkedager","delivery":{"days":3}},{"rate_id":"budget_express","name":"Express Delivery","price":79,"shippingTime":"2-3 virkedager","delivery":{"days":2}}]}]}');function u({title:e,titleId:t,...r},i){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":t},r),e?d.createElement("title",{id:t},e):null,d.createElement("path",{fillRule:"evenodd",d:"M11.03 3.97a.75.75 0 0 1 0 1.06l-6.22 6.22H21a.75.75 0 0 1 0 1.5H4.81l6.22 6.22a.75.75 0 1 1-1.06 1.06l-7.5-7.5a.75.75 0 0 1 0-1.06l7.5-7.5a.75.75 0 0 1 1.06 0Z",clipRule:"evenodd"}))}const g=d.forwardRef(u);function f({title:e,titleId:t,...r},i){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":t},r),e?d.createElement("title",{id:t},e):null,d.createElement("path",{fillRule:"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm13.36-1.814a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z",clipRule:"evenodd"}))}const v=d.forwardRef(f);function y(e){var t,r,i="";if("string"==typeof e||"number"==typeof e)i+=e;else if("object"==typeof e)if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=y(e[t]))&&(i&&(i+=" "),i+=r)}else for(r in e)e[r]&&(i&&(i+=" "),i+=r);return i}function x(){for(var e,t,r=0,i="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=y(e))&&(i&&(i+=" "),i+=t);return i}const w=e=>"function"==typeof wc.priceFormat.formatPrice?wc.priceFormat.formatPrice(e):(e/100).toFixed(2);var k=r(848);function j({methods:e,selectedShippingMethod:t,onSelectMethod:r,setSelectedShipper:i,showReturnButton:a=!0,isEditor:s=!1,isLoading:l=!1}){return(0,k.jsxs)("div",{className:"py-4",children:[a&&(0,k.jsxs)("button",{className:"mb-4 px-4 py-2 pl-0 transition-all bg-transparent hover:text-secondary rounded-lg",onClick:()=>i(null),disabled:s||l,style:{opacity:s||l?.5:1,cursor:s||l?"not-allowed":"pointer"},children:[(0,k.jsx)(g,{className:"w-4 h-4 inline-block mr-2"}),(0,o.__)("Return to shipping providers","fraktvalg")]}),(0,k.jsx)("div",{className:"flex flex-col gap-2",children:e.map(((e,i)=>(0,k.jsxs)("div",{className:x("border rounded-lg p-4 flex flex-col sm:flex-row transition-all duraction-300 items-center justify-between",{"cursor-pointer hover:bg-tertiary/10 hover:shadow-md":!l,"cursor-not-allowed opacity-50":l&&e?.rate_id!==t}),onClick:()=>!l&&r(e),children:[(0,k.jsxs)("div",{className:"flex items-center",children:[e?.rate_id===t?(0,k.jsx)(v,{className:"w-10 h-10 mr-4 text-primary inline-block"}):e?.icon&&e.icon,(0,k.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,k.jsx)("span",{className:"text-md font-semibold",children:e.name}),(0,k.jsx)("span",{className:"text-sm italic",children:e.description}),(0,k.jsx)("p",{className:"text-sm text-gray-600 flex items-center",children:e.shippingTime})]})]}),(0,k.jsx)("p",{className:"text-md font-medium mt-2 sm:mt-0",children:w(e.price)})]},i)))})]})}function b({logo:e=null,...t}){const{alt:r=""}=t;return e?e.startsWith("http")||e.startsWith("data:image")?(0,k.jsx)("img",{src:e,alt:r,...t}):(e.startsWith("https")||(e=encodeURIComponent(e)),(0,k.jsx)("img",{src:"data:image/svg+xml;utf8,"+e,alt:r,...t})):(0,k.jsx)(h,{...t})}function _({title:e,titleId:t,...r},i){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":t},r),e?d.createElement("title",{id:t},e):null,d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const S=d.forwardRef(_);function C({shippers:e,onSelectShipper:t,editorMode:r}){return(0,k.jsx)("div",{className:"py-4 flex flex-col gap-2",children:Object.entries(e).map((([e,i])=>(0,k.jsxs)("div",{className:"border rounded-lg p-4 bg-white flex flex-col sm:flex-row transition-all duration-300 items-center justify-between cursor-pointer hover:bg-tertiary/10 hover:shadow-md",onClick:()=>"multiple"!==r&&t(i),children:[(0,k.jsxs)("div",{className:"flex items-center",children:[(0,k.jsx)(b,{logo:i?.texts?.logo?.url,alt:i?.details?.label,className:"w-8 h-8 mr-2"}),(0,k.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,k.jsxs)("span",{className:"text-md font-semibold",children:["Fraktes av ",i?.details?.label]}),(0,k.jsxs)("p",{className:"text-sm text-gray-600 flex items-center",children:[(0,k.jsx)(S,{className:"w-4 h-4 inline-block mr-2"}),i?.details?.quickestShippingTime]})]})]}),(0,k.jsxs)("p",{className:"text-md font-medium mt-2 sm:mt-0",children:["Fra ",w(i?.details?.LowestPrice)]})]},e)))})}function O({title:e,titleId:t,...r},i){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":t},r),e?d.createElement("title",{id:t},e):null,d.createElement("path",{fillRule:"evenodd",d:"M4.755 10.059a7.5 7.5 0 0 1 12.548-3.364l1.903 1.903h-3.183a.75.75 0 1 0 0 1.5h4.992a.75.75 0 0 0 .75-.75V4.356a.75.75 0 0 0-1.5 0v3.18l-1.9-1.9A9 9 0 0 0 3.306 9.67a.75.75 0 1 0 1.45.388Zm15.408 3.352a.75.75 0 0 0-.919.53 7.5 7.5 0 0 1-12.548 3.364l-1.902-1.903h3.183a.75.75 0 0 0 0-1.5H2.984a.75.75 0 0 0-.75.75v4.992a.75.75 0 0 0 1.5 0v-3.18l1.9 1.9a9 9 0 0 0 15.059-4.035.75.75 0 0 0-.53-.918Z",clipRule:"evenodd"}))}const E=d.forwardRef(O);function N(){return(0,k.jsxs)("div",{className:"flex flex-col justify-center items-center h-64",children:[(0,k.jsx)(E,{className:"h-8 w-8 animate-spin text-primary"}),(0,k.jsx)("div",{className:"text-lg",children:(0,o.__)("Fetching the best shipping options...","fraktvalg")})]})}const M=window.wp.apiFetch;var P=r.n(M);const T=window.wp.data;function R({title:e,titleId:t,...r},i){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":t},r),e?d.createElement("title",{id:t},e):null,d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m2.25 12 8.954-8.955c.44-.439 1.152-.439 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25"}))}window.wc.wcBlocksData;const B=d.forwardRef(R);function L({title:e,titleId:t,...r},i){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":t},r),e?d.createElement("title",{id:t},e):null,d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m20.25 7.5-.625 10.632a2.25 2.25 0 0 1-2.247 2.118H6.622a2.25 2.25 0 0 1-2.247-2.118L3.75 7.5M10 11.25h4M3.375 7.5h17.25c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125Z"}))}const D=d.forwardRef(L),F=e=>{switch(e){case"Parcel":default:return(0,k.jsx)(h,{className:"w-10 h-10 mr-4",style:{color:"var(--fraktvalg-tertiary-color)"}});case"HomeDelivery":return(0,k.jsx)(B,{className:"w-10 h-10 mr-4",style:{color:"var(--fraktvalg-tertiary-color)"}});case"ServiceParcel":return(0,k.jsx)(D,{className:"w-10 h-10 mr-4",style:{color:"var(--fraktvalg-tertiary-color)"}})}};(0,i.registerBlockType)(s.name,{...s,edit:function({attributes:e,setAttributes:t}){const{primaryColor:r="#2F463E",secondaryColor:i="#4D8965",tertiaryColor:a="#65C7A4",editorMode:s="single"}=e,[d,p]=(0,l.useState)(null),[u,g]=(0,l.useState)(null),[f,v]=(0,l.useState)(!0),[y,x]=(0,l.useState)({}),[w,b]=(0,l.useState)(null),_=(0,n.useBlockProps)(),S={"--fraktvalg-primary-color":r,"--fraktvalg-secondary-color":i,"--fraktvalg-tertiary-color":a},O=e=>{g(e?.rate_id)};return(0,l.useEffect)((()=>{const e=m[s];if(e){const t=e.map((e=>({...e,shippingOptions:e.shippingOptions.map((e=>({...e,icon:(0,k.jsx)(h,{className:"w-10 h-10 mr-4",style:{color:"var(--fraktvalg-tertiary-color)"}})})))})));x(t),p(null),g(null),v(!1)}}),[s]),(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(n.InspectorControls,{children:(0,k.jsx)(c.PanelBody,{title:(0,o.__)("Preview Settings","fraktvalg"),initialOpen:!0,children:(0,k.jsx)(c.PanelRow,{children:(0,k.jsxs)(c.__experimentalVStack,{spacing:2,children:[(0,k.jsx)("p",{className:"text-sm",children:(0,o.__)("Preview Mode:","fraktvalg")}),(0,k.jsxs)(c.ButtonGroup,{children:[(0,k.jsx)(c.Button,{variant:"single"===s?"primary":"secondary",onClick:()=>t({editorMode:"single"}),children:(0,o.__)("Shipping methods","fraktvalg")}),(0,k.jsx)(c.Button,{variant:"multiple"===s?"primary":"secondary",onClick:()=>t({editorMode:"multiple"}),children:(0,o.__)("Shipping providers","fraktvalg")})]})]})})})}),(0,k.jsx)(n.InspectorControls,{group:"styles",children:(0,k.jsx)(c.PanelBody,{title:(0,o.__)("Color Settings","fraktvalg"),initialOpen:!0,children:(0,k.jsx)(c.PanelRow,{children:(0,k.jsxs)(c.__experimentalVStack,{spacing:4,children:[(0,k.jsxs)("div",{className:"flex items-center gap-2",children:[(0,k.jsx)(c.ColorIndicator,{colorValue:r}),(0,k.jsx)(c.Button,{variant:"link",onClick:()=>b("primary"===w?null:"primary"),children:(0,o.__)("Primary Color","fraktvalg")})]}),"primary"===w&&(0,k.jsx)(c.ColorPicker,{color:r,onChange:e=>t({primaryColor:e}),enableAlpha:!1}),(0,k.jsxs)("div",{className:"flex items-center gap-2",children:[(0,k.jsx)(c.ColorIndicator,{colorValue:i}),(0,k.jsx)(c.Button,{variant:"link",onClick:()=>b("secondary"===w?null:"secondary"),children:(0,o.__)("Secondary Color","fraktvalg")})]}),"secondary"===w&&(0,k.jsx)(c.ColorPicker,{color:i,onChange:e=>t({secondaryColor:e}),enableAlpha:!1}),(0,k.jsxs)("div",{className:"flex items-center gap-2",children:[(0,k.jsx)(c.ColorIndicator,{colorValue:a}),(0,k.jsx)(c.Button,{variant:"link",onClick:()=>b("tertiary"===w?null:"tertiary"),children:(0,o.__)("Tertiary Color","fraktvalg")})]}),"tertiary"===w&&(0,k.jsx)(c.ColorPicker,{color:a,onChange:e=>t({tertiaryColor:e}),enableAlpha:!1})]})})})}),(0,k.jsx)("div",{..._,style:S,children:f?(0,k.jsx)(N,{}):(0,k.jsx)(k.Fragment,{children:1===y.length?(0,k.jsx)(j,{methods:y[0].shippingOptions,setSelectedShipper:p,selectedShippingMethod:u,onSelectMethod:O}):(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(C,{shippers:y,onSelectShipper:e=>{"multiple"!==s&&p(e)},selectedShippingMethod:u,editorMode:s}),d&&"multiple"!==s&&(0,k.jsx)(j,{methods:d.shippingOptions,setSelectedShipper:p,selectedShippingMethod:u,onSelectMethod:O})]})})})]})},save:()=>null}),(0,a.registerCheckoutBlock)({metadata:s,component:function({attributes:e={}}){const{primaryColor:t="#2F463E",secondaryColor:r="#4D8965",tertiaryColor:i="#65C7A4"}=e,[a,s]=(0,l.useState)(null),[c,d]=(0,l.useState)(null),[p,h]=(0,l.useState)(!0),[m,u]=(0,l.useState)(!1),[g,f]=(0,l.useState)({}),[v,y]=(0,l.useState)(!1),x=(0,n.useBlockProps)({className:"wp-block-fraktvalg-shipping-selector"}),w={"--fraktvalg-primary-color":t,"--fraktvalg-secondary-color":r,"--fraktvalg-tertiary-color":i},b=e=>{e&&e.rate_id&&(u(!0),P()({path:"/wc/store/v1/cart/select-shipping-rate",method:"POST",data:{package_id:0,rate_id:e.rate_id}}).then((t=>{d(e.rate_id),(0,T.dispatch)("wc/store/cart").invalidateResolutionForStore()})).catch((e=>{d(null)})).finally((()=>{u(!1)})))},_=()=>{h(!0),P()({path:"/wc/store/v1/cart",method:"GET"}).then((e=>{let t=function(e){let t=[],r={},i=null,a={},s=null;return e?.shipping_rates?.forEach((e=>{e?.shipping_rates?.forEach((e=>{e?.meta_data?.some((e=>"fraktvalg"===e.key))&&(r=e?.meta_data?.find((e=>"option"===e.key))?.value||{},i=e?.rate_id.split(":")[0],t.some((e=>e.id===i))?(s=t.find((e=>e.id===i)),s&&e.price<s.details.LowestPrice&&(s.details.LowestPrice=e.price)):(a=e?.meta_data.find((e=>"option"===e.key))?.value||{},t.push({id:i,details:{label:r?.texts?.shipperName,quickestShippingTime:"2 virkedager",LowestPrice:e.price},shippingOptions:[],...a})))}))})),t}(e);t.forEach((t=>{const r=function(e,t){let r=[];return e?.shipping_rates?.forEach((e=>{e?.shipping_rates?.forEach((e=>{if(!e?.meta_data?.some((e=>"fraktvalg"===e.key)))return;let i=e?.rate_id.split(":")[0],a=e?.meta_data.find((e=>"option"===e.key))?.value,s=a?.delivery?.estimatedDate||(new Date).toISOString().split("T")[0];i===t.id&&r.push({rate_id:e?.rate_id,name:e?.name,description:a?.texts?.description,price:e?.price,icon:a?.delivery?.serviceCode,selected:e?.selected||!1,delivery:{date:s,days:Math.max(1,Math.ceil((new Date(s)-new Date)/864e5))}})}))})),r}(e,t);t.shippingOptions=r.map((e=>({rate_id:e.rate_id,name:e.name,description:e.description,price:e.price,shippingTime:"1-3 virkedager",icon:F(e.delivery.serviceCode),selected:e.selected,delivery:{days:e.delivery.days}})));const i=t?.shippingOptions.find((e=>e.selected))||null;i&&(s(t),d(i.rate_id)),t.details.LowestPrice=Math.min(...t.shippingOptions.map((e=>e.price))),t.details.quickestShippingTime=Math.min(...t.shippingOptions.map((e=>e.delivery.days)))+(0,o.__)(" business days","fraktvalg")})),f(t)})).catch((e=>console.error("Error fetching shipping options:",e))).finally((()=>{h(!1)}))},S=(0,l.useCallback)((()=>{window.shippingOptionsTimeout&&clearTimeout(window.shippingOptionsTimeout),window.shippingOptionsTimeout=setTimeout((()=>{_()}),1e3)}),[]);return(0,l.useEffect)((()=>{_();const e=(0,T.select)("wc/store/cart").getCartData();console.log("Initial Cart Data:",e);let t=JSON.stringify(e.shippingAddress);const r=(0,T.subscribe)((()=>{const e=(0,T.select)("wc/store/cart").getCartData(),r=JSON.stringify(e.shippingAddress);t!==r&&(console.log("Shipping Address Changed:",e.shippingAddress),t=r,S())}));return()=>{r(),window.shippingOptionsTimeout&&clearTimeout(window.shippingOptionsTimeout)}}),[S]),(0,k.jsx)("div",{...x,style:w,children:p?(0,k.jsx)(N,{}):1!==g.length||v?!a||v?(0,k.jsx)(C,{shippers:g,onSelectShipper:e=>{s(e),y(!1)},selectedShippingMethod:c}):(0,k.jsx)(j,{methods:a.shippingOptions,setSelectedShipper:()=>s(null),selectedShippingMethod:c,onSelectMethod:b,isLoading:m}):(0,k.jsx)(j,{methods:g[0].shippingOptions,setSelectedShipper:()=>y(!0),selectedShippingMethod:c,onSelectMethod:b,isLoading:m,showReturnButton:!1})})}})},20:(e,t,r)=>{var i=r(609),a=Symbol.for("react.element"),s=Symbol.for("react.fragment"),l=Object.prototype.hasOwnProperty,n=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,r){var i,s={},c=null,d=null;for(i in void 0!==r&&(c=""+r),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(d=t.ref),t)l.call(t,i)&&!o.hasOwnProperty(i)&&(s[i]=t[i]);if(e&&e.defaultProps)for(i in t=e.defaultProps)void 0===s[i]&&(s[i]=t[i]);return{$$typeof:a,type:e,key:c,ref:d,props:s,_owner:n.current}}t.Fragment=s,t.jsx=c,t.jsxs=c},848:(e,t,r)=>{e.exports=r(20)},609:e=>{e.exports=window.React}},r={};function i(e){var a=r[e];if(void 0!==a)return a.exports;var s=r[e]={exports:{}};return t[e](s,s.exports,i),s.exports}i.m=t,e=[],i.O=(t,r,a,s)=>{if(!r){var l=1/0;for(d=0;d<e.length;d++){for(var[r,a,s]=e[d],n=!0,o=0;o<r.length;o++)(!1&s||l>=s)&&Object.keys(i.O).every((e=>i.O[e](r[o])))?r.splice(o--,1):(n=!1,s<l&&(l=s));if(n){e.splice(d--,1);var c=a();void 0!==c&&(t=c)}}return t}s=s||0;for(var d=e.length;d>0&&e[d-1][2]>s;d--)e[d]=e[d-1];e[d]=[r,a,s]},i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={328:0,920:0};i.O.j=t=>0===e[t];var t=(t,r)=>{var a,s,[l,n,o]=r,c=0;if(l.some((t=>0!==e[t]))){for(a in n)i.o(n,a)&&(i.m[a]=n[a]);if(o)var d=o(i)}for(t&&t(r);c<l.length;c++)s=l[c],i.o(e,s)&&e[s]&&e[s][0](),e[s]=0;return i.O(d)},r=globalThis.webpackChunkfraktvalg=globalThis.webpackChunkfraktvalg||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var a=i.O(void 0,[920],(()=>i(870)));a=i.O(a)})();1 (()=>{"use strict";var e,t={870:(e,t,r)=>{const i=window.wp.blocks,a=window.wc.blocksCheckout,l=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"fraktvalg/shipping-selector","version":"1.0.0","title":"Fraktvalg","category":"widgets","description":"Shipping selector from Fraktvalg","parent":["woocommerce/checkout-fields-block","woocommerce/cart-order-summary-totals-block"],"keywords":["fraktvalg","shipping"],"attributes":{"lock":{"type":"object","default":{"remove":true,"move":false}},"primaryColor":{"type":"string","default":"#2F463E"},"secondaryColor":{"type":"string","default":"#4D8965"},"tertiaryColor":{"type":"string","default":"#65C7A4"},"style":{"type":"object"}},"supports":{"html":false,"multiple":false,"reusable":false,"inserter":false,"lock":false,"color":false,"spacing":false,"typography":false,"__experimentalBorder":false},"styles":[{"name":"default","label":"Default","isDefault":true}],"textdomain":"fraktvalg","editorScript":"file:./index.js","viewScript":"file:./frontend.js","style":"file:./style-frontend.css","render":"file:./render.php"}'),s=window.wp.element,n=window.wp.blockEditor,o=window.wp.i18n,c=window.wp.components;var d=r(609);function p({title:e,titleId:t,...r},i){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":t},r),e?d.createElement("title",{id:t},e):null,d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 18.75a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m3 0h6m-9 0H3.375a1.125 1.125 0 0 1-1.125-1.125V14.25m17.25 4.5a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m3 0h1.125c.621 0 1.129-.504 1.09-1.124a17.902 17.902 0 0 0-3.213-9.193 2.056 2.056 0 0 0-1.58-.86H14.25M16.5 18.75h-2.25m0-11.177v-.958c0-.568-.422-1.048-.987-1.106a48.554 48.554 0 0 0-10.026 0 1.106 1.106 0 0 0-.987 1.106v7.635m12-6.677v6.677m0 4.5v-4.5m0 0h-12"}))}const m=d.forwardRef(p),h=JSON.parse('{"single":[{"id":"1","name":"Express Shipping","details":{"LowestPrice":99,"quickestShippingTime":"1-2 business days"},"shippingOptions":[{"rate_id":"express_standard","name":"Standard Delivery","price":99,"shippingTime":"2-3 virkedager","delivery":{"days":2}},{"rate_id":"express_priority","name":"Priority Delivery","price":149,"shippingTime":"1-2 virkedager","delivery":{"days":1}}]}],"multiple":[{"id":"1","name":"Fast Shipping","details":{"LowestPrice":149,"quickestShippingTime":"1 business day"},"shippingOptions":[{"rate_id":"fast_priority","name":"Priority Delivery","price":149,"shippingTime":"1-2 virkedager","delivery":{"days":1}},{"rate_id":"fast_express","name":"Express Delivery","price":199,"shippingTime":"Same Day","delivery":{"days":0}}]},{"id":"2","name":"Budget Shipping","details":{"LowestPrice":49,"quickestShippingTime":"3 business days"},"shippingOptions":[{"rate_id":"budget_standard","name":"Standard Delivery","price":49,"shippingTime":"3-5 virkedager","delivery":{"days":3}},{"rate_id":"budget_express","name":"Express Delivery","price":79,"shippingTime":"2-3 virkedager","delivery":{"days":2}}]}]}');function u({title:e,titleId:t,...r},i){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":t},r),e?d.createElement("title",{id:t},e):null,d.createElement("path",{fillRule:"evenodd",d:"M11.03 3.97a.75.75 0 0 1 0 1.06l-6.22 6.22H21a.75.75 0 0 1 0 1.5H4.81l6.22 6.22a.75.75 0 1 1-1.06 1.06l-7.5-7.5a.75.75 0 0 1 0-1.06l7.5-7.5a.75.75 0 0 1 1.06 0Z",clipRule:"evenodd"}))}const f=d.forwardRef(u);function g({title:e,titleId:t,...r},i){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":t},r),e?d.createElement("title",{id:t},e):null,d.createElement("path",{fillRule:"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm13.36-1.814a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z",clipRule:"evenodd"}))}const v=d.forwardRef(g);function y(e){var t,r,i="";if("string"==typeof e||"number"==typeof e)i+=e;else if("object"==typeof e)if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=y(e[t]))&&(i&&(i+=" "),i+=r)}else for(r in e)e[r]&&(i&&(i+=" "),i+=r);return i}function x(){for(var e,t,r=0,i="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=y(e))&&(i&&(i+=" "),i+=t);return i}const w=e=>"function"==typeof wc.priceFormat.formatPrice?wc.priceFormat.formatPrice(e):(e/100).toFixed(0);var k=r(848);function j({methods:e,selectedShippingMethod:t,onSelectMethod:r,setSelectedShipper:i,showReturnButton:a=!0,isEditor:l=!1,isLoading:s=!1}){return(0,k.jsxs)("div",{className:"py-4",children:[a&&(0,k.jsxs)("button",{className:"mb-4 px-4 py-2 pl-0 transition-all bg-transparent hover:text-secondary rounded-lg",onClick:()=>i(null),disabled:l||s,style:{opacity:l||s?.5:1,cursor:l||s?"not-allowed":"pointer"},children:[(0,k.jsx)(f,{className:"w-4 h-4 inline-block mr-2"}),(0,o.__)("Return to shipping providers","fraktvalg")]}),(0,k.jsx)("div",{className:"flex flex-col gap-2",role:"radiogroup","aria-label":(0,o.__)("Shipping methods","fraktvalg"),children:e.map(((e,i)=>(0,k.jsx)("button",{type:"button",role:"radio","aria-checked":e?.rate_id===t,className:x("w-full text-left border border-solid rounded-lg p-4 flex flex-col sm:flex-row transition-all duration-300 items-center justify-between",{"cursor-pointer hover:bg-tertiary/10 hover:shadow-md":!s,"cursor-not-allowed opacity-50":s&&e?.rate_id!==t}),onClick:()=>!s&&r(e),onKeyDown:t=>{s||"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),r(e))},disabled:s&&e?.rate_id!==t,children:(0,k.jsxs)("div",{className:"flex items-center w-full",children:[(0,k.jsx)("div",{className:"flex-shrink-0",children:e?.rate_id===t?(0,k.jsx)(v,{className:"w-10 h-10 mr-4 text-primary inline-block"}):e?.icon&&e.icon}),(0,k.jsxs)("div",{className:"flex flex-col gap-1 flex-grow",children:[(0,k.jsx)("span",{className:"text-md font-semibold",dangerouslySetInnerHTML:{__html:e.name}}),(0,k.jsx)("span",{className:"text-sm italic",children:e.description}),(0,k.jsxs)("div",{className:"flex justify-between gap-2 w-full",children:[(0,k.jsx)("p",{className:"text-sm text-nowrap text-gray-600 flex items-center",children:e.shippingTime}),(0,k.jsx)("p",{className:"text-md text-nowrap font-medium mt-2 sm:mt-0",children:w(e.price)})]})]})]})},i)))})]})}function b({logo:e=null,...t}){const{alt:r=""}=t;return e?e.startsWith("http")||e.startsWith("data:image")?(0,k.jsx)("img",{src:e,alt:r,...t}):(e.startsWith("https")||(e=encodeURIComponent(e)),(0,k.jsx)("img",{src:"data:image/svg+xml;utf8,"+e,alt:r,...t})):(0,k.jsx)(m,{...t})}function _({title:e,titleId:t,...r},i){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":t},r),e?d.createElement("title",{id:t},e):null,d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const S=d.forwardRef(_);function C({shippers:e,onSelectShipper:t,editorMode:r}){return(0,k.jsx)("div",{className:"py-4 flex flex-col gap-2",role:"listbox","aria-label":"Shipping providers",children:Object.entries(e).map((([e,i])=>(0,k.jsxs)("button",{type:"button",className:"w-full text-left border border-solid rounded-lg p-4 bg-white flex flex-col sm:flex-row transition-all duration-300 items-center justify-between cursor-pointer hover:bg-tertiary/10 hover:shadow-md",onClick:()=>"multiple"!==r&&t(i),onKeyDown:e=>{"multiple"===r||"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),t(i))},disabled:"multiple"===r,children:[(0,k.jsxs)("div",{className:"flex items-center",children:[(0,k.jsx)(b,{logo:i?.texts?.logo?.url,alt:i?.details?.label,className:"w-12 h-12 mr-2"}),(0,k.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,k.jsxs)("span",{className:"text-md font-semibold",children:["Fraktes av ",i?.details?.label]}),(0,k.jsxs)("p",{className:"text-sm text-gray-600 flex items-center",children:[(0,k.jsx)(S,{className:"w-4 h-4 inline-block mr-2"}),i?.details?.quickestShippingTime]})]})]}),(0,k.jsxs)("p",{className:"text-md font-medium mt-2 sm:mt-0",children:["Fra ",w(i?.details?.LowestPrice)]})]},e)))})}function O({title:e,titleId:t,...r},i){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":t},r),e?d.createElement("title",{id:t},e):null,d.createElement("path",{fillRule:"evenodd",d:"M4.755 10.059a7.5 7.5 0 0 1 12.548-3.364l1.903 1.903h-3.183a.75.75 0 1 0 0 1.5h4.992a.75.75 0 0 0 .75-.75V4.356a.75.75 0 0 0-1.5 0v3.18l-1.9-1.9A9 9 0 0 0 3.306 9.67a.75.75 0 1 0 1.45.388Zm15.408 3.352a.75.75 0 0 0-.919.53 7.5 7.5 0 0 1-12.548 3.364l-1.902-1.903h3.183a.75.75 0 0 0 0-1.5H2.984a.75.75 0 0 0-.75.75v4.992a.75.75 0 0 0 1.5 0v-3.18l1.9 1.9a9 9 0 0 0 15.059-4.035.75.75 0 0 0-.53-.918Z",clipRule:"evenodd"}))}const E=d.forwardRef(O);function N({text:e=(0,o.__)("Fetching the best shipping options...","fraktvalg")}){return(0,k.jsxs)("div",{className:"flex flex-col justify-center items-center h-64",children:[(0,k.jsx)(E,{className:"h-8 w-8 animate-spin text-primary"}),(0,k.jsx)("div",{className:"text-lg",children:e})]})}const T=window.wp.apiFetch;var M=r.n(T);const P=window.wp.data;function D({title:e,titleId:t,...r},i){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":t},r),e?d.createElement("title",{id:t},e):null,d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m2.25 12 8.954-8.955c.44-.439 1.152-.439 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25"}))}window.wc.wcBlocksData;const R=d.forwardRef(D);function L({title:e,titleId:t,...r},i){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":t},r),e?d.createElement("title",{id:t},e):null,d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m20.25 7.5-.625 10.632a2.25 2.25 0 0 1-2.247 2.118H6.622a2.25 2.25 0 0 1-2.247-2.118L3.75 7.5M10 11.25h4M3.375 7.5h17.25c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125Z"}))}const B=d.forwardRef(L),F=e=>{switch(e){case"Parcel":default:return(0,k.jsx)(m,{className:"w-10 h-10 mr-4",style:{color:"var(--fraktvalg-tertiary-color)"}});case"HomeDelivery":return(0,k.jsx)(R,{className:"w-10 h-10 mr-4",style:{color:"var(--fraktvalg-tertiary-color)"}});case"ServiceParcel":return(0,k.jsx)(B,{className:"w-10 h-10 mr-4",style:{color:"var(--fraktvalg-tertiary-color)"}})}};(0,i.registerBlockType)(l.name,{...l,edit:function({attributes:e,setAttributes:t}){const{primaryColor:r="#2F463E",secondaryColor:i="#4D8965",tertiaryColor:a="#65C7A4",editorMode:l="single"}=e,[d,p]=(0,s.useState)(null),[u,f]=(0,s.useState)(null),[g,v]=(0,s.useState)(!0),[y,x]=(0,s.useState)({}),[w,b]=(0,s.useState)(null),_=(0,n.useBlockProps)(),S={"--fraktvalg-primary-color":r,"--fraktvalg-secondary-color":i,"--fraktvalg-tertiary-color":a},O=e=>{f(e?.rate_id)};return(0,s.useEffect)((()=>{const e=h[l];if(e){const t=e.map((e=>({...e,shippingOptions:e.shippingOptions.map((e=>({...e,icon:(0,k.jsx)(m,{className:"w-10 h-10 mr-4",style:{color:"var(--fraktvalg-tertiary-color)"}})})))})));x(t),p(null),f(null),v(!1)}}),[l]),(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(n.InspectorControls,{children:(0,k.jsx)(c.PanelBody,{title:(0,o.__)("Preview Settings","fraktvalg"),initialOpen:!0,children:(0,k.jsx)(c.PanelRow,{children:(0,k.jsxs)(c.__experimentalVStack,{spacing:2,children:[(0,k.jsx)("p",{className:"text-sm",children:(0,o.__)("Preview Mode:","fraktvalg")}),(0,k.jsxs)(c.ButtonGroup,{children:[(0,k.jsx)(c.Button,{variant:"single"===l?"primary":"secondary",onClick:()=>t({editorMode:"single"}),children:(0,o.__)("Shipping methods","fraktvalg")}),(0,k.jsx)(c.Button,{variant:"multiple"===l?"primary":"secondary",onClick:()=>t({editorMode:"multiple"}),children:(0,o.__)("Shipping providers","fraktvalg")})]})]})})})}),(0,k.jsx)(n.InspectorControls,{group:"styles",children:(0,k.jsx)(c.PanelBody,{title:(0,o.__)("Color Settings","fraktvalg"),initialOpen:!0,children:(0,k.jsx)(c.PanelRow,{children:(0,k.jsxs)(c.__experimentalVStack,{spacing:4,children:[(0,k.jsxs)("div",{className:"flex items-center gap-2",children:[(0,k.jsx)(c.ColorIndicator,{colorValue:r}),(0,k.jsx)(c.Button,{variant:"link",onClick:()=>b("primary"===w?null:"primary"),children:(0,o.__)("Primary Color","fraktvalg")})]}),"primary"===w&&(0,k.jsx)(c.ColorPicker,{color:r,onChange:e=>t({primaryColor:e}),enableAlpha:!1}),(0,k.jsxs)("div",{className:"flex items-center gap-2",children:[(0,k.jsx)(c.ColorIndicator,{colorValue:i}),(0,k.jsx)(c.Button,{variant:"link",onClick:()=>b("secondary"===w?null:"secondary"),children:(0,o.__)("Secondary Color","fraktvalg")})]}),"secondary"===w&&(0,k.jsx)(c.ColorPicker,{color:i,onChange:e=>t({secondaryColor:e}),enableAlpha:!1}),(0,k.jsxs)("div",{className:"flex items-center gap-2",children:[(0,k.jsx)(c.ColorIndicator,{colorValue:a}),(0,k.jsx)(c.Button,{variant:"link",onClick:()=>b("tertiary"===w?null:"tertiary"),children:(0,o.__)("Tertiary Color","fraktvalg")})]}),"tertiary"===w&&(0,k.jsx)(c.ColorPicker,{color:a,onChange:e=>t({tertiaryColor:e}),enableAlpha:!1})]})})})}),(0,k.jsx)("div",{..._,style:S,children:g?(0,k.jsx)(N,{}):(0,k.jsx)(k.Fragment,{children:1===y.length?(0,k.jsx)(j,{methods:y[0].shippingOptions,setSelectedShipper:p,selectedShippingMethod:u,onSelectMethod:O}):(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(C,{shippers:y,onSelectShipper:e=>{"multiple"!==l&&p(e)},selectedShippingMethod:u,editorMode:l}),d&&"multiple"!==l&&(0,k.jsx)(j,{methods:d.shippingOptions,setSelectedShipper:p,selectedShippingMethod:u,onSelectMethod:O})]})})})]})},save:()=>null}),(0,a.registerCheckoutBlock)({metadata:l,component:function({attributes:e={}}){const{primaryColor:t="#2F463E",secondaryColor:r="#4D8965",tertiaryColor:i="#65C7A4"}=e,[a,l]=(0,s.useState)(null),[n,c]=(0,s.useState)(null),[d,p]=(0,s.useState)(!0),[m,h]=(0,s.useState)(!1),[u,f]=(0,s.useState)({}),[g,v]=(0,s.useState)(!0),y={"--fraktvalg-primary-color":t,"--fraktvalg-secondary-color":r,"--fraktvalg-tertiary-color":i},x=()=>{p(!0),M()({path:"/wc/store/v1/cart",method:"GET"}).then((e=>{let t=function(e){let t=[],r={},i=null,a={},l=null;return e?.shipping_rates?.forEach((e=>{e?.shipping_rates?.forEach((e=>{e?.meta_data?.some((e=>"fraktvalg"===e.key))&&(r=e?.meta_data?.find((e=>"option"===e.key))?.value||{},i=e?.rate_id.split(":")[0],t.some((e=>e.id===i))?(l=t.find((e=>e.id===i)),l&&e.price<l.details.LowestPrice&&(l.details.LowestPrice=e.price)):(a=e?.meta_data.find((e=>"option"===e.key))?.value||{},t.push({id:i,details:{label:r?.texts?.shipperName,quickestShippingTime:"2 virkedager",LowestPrice:e.price},shippingOptions:[],...a})))}))})),t}(e);t.forEach((t=>{const r=function(e,t){let r=[];return e?.shipping_rates?.forEach((e=>{e?.shipping_rates?.forEach((e=>{if(!e?.meta_data?.some((e=>"fraktvalg"===e.key)))return;let i=e?.rate_id.split(":")[0],a=e?.meta_data.find((e=>"option"===e.key))?.value,l=a?.delivery?.estimatedDate||(new Date).toISOString().split("T")[0];i===t.id&&r.push({rate_id:e?.rate_id,name:a?.texts?.displayName||e?.name,description:a?.texts?.description,price:e?.price,icon:a?.delivery?.serviceCode,selected:e?.selected||!1,delivery:{date:l,days:Math.max(1,Math.ceil((new Date(l)-new Date)/864e5))}})}))})),r}(e,t);t.shippingOptions=r.map((e=>({rate_id:e.rate_id,name:e.name,description:e.description,price:e.price,shippingTime:"1-3 virkedager",icon:F(e.delivery.serviceCode),selected:e.selected,delivery:{days:e.delivery.days}})));const i=t?.shippingOptions.find((e=>e.selected))||null;i&&(l(t),c(i.rate_id)),t.details.LowestPrice=Math.min(...t.shippingOptions.map((e=>e.price)));const a=Math.min(...t.shippingOptions.map((e=>e.delivery.days)));t.details.quickestShippingTime=isNaN(a)?"1-3":a+(0,o.__)(" business days","fraktvalg")})),f(t)})).catch((e=>console.error("Error fetching shipping options:",e))).finally((()=>{p(!1)}))},w=(0,s.useCallback)((()=>{window.shippingOptionsTimeout&&clearTimeout(window.shippingOptionsTimeout),window.shippingOptionsTimeout=setTimeout((()=>{x()}),1e3)}),[]);return(0,s.useEffect)((()=>{x();const e=(0,P.select)("wc/store/cart").getCartData();let t=JSON.stringify(e.shippingAddress);const r=(0,P.subscribe)((()=>{const e=(0,P.select)("wc/store/cart").getCartData(),r=JSON.stringify(e.shippingAddress);t!==r&&(t=r,w())}));return()=>{r(),window.shippingOptionsTimeout&&clearTimeout(window.shippingOptionsTimeout)}}),[w]),(0,k.jsx)("div",{className:"wp-block-fraktvalg-shipping-selector",style:y,children:d?(0,k.jsx)(N,{}):m?(0,k.jsx)(N,{text:(0,o.__)("Updating cart totals with your new shipping preference","fraktvalg")}):1===u.length||u.length>1&&!g?(0,k.jsx)(j,{methods:a?.shippingOptions||u[0].shippingOptions,setSelectedShipper:()=>v(!0),selectedShippingMethod:n,onSelectMethod:e=>{e&&e.rate_id&&(h(!0),M()({path:"/wc/store/v1/cart/select-shipping-rate",method:"POST",data:{package_id:0,rate_id:e.rate_id}}).then((t=>{c(e.rate_id),(0,P.dispatch)("wc/store/cart").invalidateResolutionForStore()})).catch((e=>{c(null)})).finally((()=>{h(!1)})))},isLoading:m,showReturnButton:u.length>1}):(0,k.jsx)(C,{shippers:u,onSelectShipper:e=>{l(e),v(!1)},selectedShippingMethod:n})})}})},20:(e,t,r)=>{var i=r(609),a=Symbol.for("react.element"),l=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,n=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,r){var i,l={},c=null,d=null;for(i in void 0!==r&&(c=""+r),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(d=t.ref),t)s.call(t,i)&&!o.hasOwnProperty(i)&&(l[i]=t[i]);if(e&&e.defaultProps)for(i in t=e.defaultProps)void 0===l[i]&&(l[i]=t[i]);return{$$typeof:a,type:e,key:c,ref:d,props:l,_owner:n.current}}t.Fragment=l,t.jsx=c,t.jsxs=c},848:(e,t,r)=>{e.exports=r(20)},609:e=>{e.exports=window.React}},r={};function i(e){var a=r[e];if(void 0!==a)return a.exports;var l=r[e]={exports:{}};return t[e](l,l.exports,i),l.exports}i.m=t,e=[],i.O=(t,r,a,l)=>{if(!r){var s=1/0;for(d=0;d<e.length;d++){for(var[r,a,l]=e[d],n=!0,o=0;o<r.length;o++)(!1&l||s>=l)&&Object.keys(i.O).every((e=>i.O[e](r[o])))?r.splice(o--,1):(n=!1,l<s&&(s=l));if(n){e.splice(d--,1);var c=a();void 0!==c&&(t=c)}}return t}l=l||0;for(var d=e.length;d>0&&e[d-1][2]>l;d--)e[d]=e[d-1];e[d]=[r,a,l]},i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={328:0,920:0};i.O.j=t=>0===e[t];var t=(t,r)=>{var a,l,[s,n,o]=r,c=0;if(s.some((t=>0!==e[t]))){for(a in n)i.o(n,a)&&(i.m[a]=n[a]);if(o)var d=o(i)}for(t&&t(r);c<s.length;c++)l=s[c],i.o(e,l)&&e[l]&&e[l][0](),e[l]=0;return i.O(d)},r=globalThis.webpackChunkfraktvalg=globalThis.webpackChunkfraktvalg||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var a=i.O(void 0,[920],(()=>i(870)));a=i.O(a)})(); -
fraktvalg/trunk/build/Blocks/ShippingSelector/style-frontend-rtl.css
r3267354 r3271607 493 493 display: none; 494 494 } 495 .container { 496 width: 100%; 497 } 498 @media (min-width: 640px) { 499 500 .container { 501 max-width: 640px; 502 } 503 } 504 @media (min-width: 768px) { 505 506 .container { 507 max-width: 768px; 508 } 509 } 510 @media (min-width: 1024px) { 511 512 .container { 513 max-width: 1024px; 514 } 515 } 516 @media (min-width: 1280px) { 517 518 .container { 519 max-width: 1280px; 520 } 521 } 522 @media (min-width: 1536px) { 523 524 .container { 525 max-width: 1536px; 526 } 527 } 495 528 .sr-only { 496 529 position: absolute; … … 572 605 margin-right: 0.5rem; 573 606 } 607 .ml-3 { 608 margin-right: 0.75rem; 609 } 574 610 .mr-1 { 575 611 margin-left: 0.25rem; … … 632 668 height: 2.5rem; 633 669 } 670 .h-12 { 671 height: 3rem; 672 } 634 673 .h-16 { 635 674 height: 4rem; … … 671 710 width: 2.75rem; 672 711 } 712 .w-12 { 713 width: 3rem; 714 } 673 715 .w-16 { 674 716 width: 4rem; … … 716 758 flex: 1 1 0%; 717 759 } 760 .flex-shrink-0 { 761 flex-shrink: 0; 762 } 718 763 .shrink-0 { 719 764 flex-shrink: 0; 765 } 766 .flex-grow { 767 flex-grow: 1; 720 768 } 721 769 .grow { … … 816 864 white-space: nowrap; 817 865 } 866 .text-nowrap { 867 text-wrap: nowrap; 868 } 818 869 .rounded { 819 870 border-radius: 0.25rem; … … 840 891 border-bottom-width: 2px; 841 892 } 893 .border-l-4 { 894 border-right-width: 4px; 895 } 842 896 .border-t-2 { 843 897 border-top-width: 2px; 898 } 899 .border-solid { 900 border-style: solid; 844 901 } 845 902 .border-dashed { … … 884 941 border-color: rgb(254 240 138 / var(--tw-border-opacity)); 885 942 } 943 .border-yellow-400 { 944 --tw-border-opacity: 1; 945 border-color: rgb(250 204 21 / var(--tw-border-opacity)); 946 } 886 947 .bg-gray-200 { 887 948 --tw-bg-opacity: 1; … … 932 993 --tw-bg-opacity: 1; 933 994 background-color: rgb(254 249 195 / var(--tw-bg-opacity)); 995 } 996 .bg-yellow-50 { 997 --tw-bg-opacity: 1; 998 background-color: rgb(254 252 232 / var(--tw-bg-opacity)); 934 999 } 935 1000 .bg-opacity-50 { … … 1114 1179 --tw-text-opacity: 1; 1115 1180 color: rgb(255 255 255 / var(--tw-text-opacity)); 1181 } 1182 .text-yellow-400 { 1183 --tw-text-opacity: 1; 1184 color: rgb(250 204 21 / var(--tw-text-opacity)); 1185 } 1186 .text-yellow-700 { 1187 --tw-text-opacity: 1; 1188 color: rgb(161 98 7 / var(--tw-text-opacity)); 1116 1189 } 1117 1190 .opacity-50 { -
fraktvalg/trunk/build/Blocks/ShippingSelector/style-frontend.css
r3267354 r3271607 493 493 display: none; 494 494 } 495 .container { 496 width: 100%; 497 } 498 @media (min-width: 640px) { 499 500 .container { 501 max-width: 640px; 502 } 503 } 504 @media (min-width: 768px) { 505 506 .container { 507 max-width: 768px; 508 } 509 } 510 @media (min-width: 1024px) { 511 512 .container { 513 max-width: 1024px; 514 } 515 } 516 @media (min-width: 1280px) { 517 518 .container { 519 max-width: 1280px; 520 } 521 } 522 @media (min-width: 1536px) { 523 524 .container { 525 max-width: 1536px; 526 } 527 } 495 528 .sr-only { 496 529 position: absolute; … … 572 605 margin-left: 0.5rem; 573 606 } 607 .ml-3 { 608 margin-left: 0.75rem; 609 } 574 610 .mr-1 { 575 611 margin-right: 0.25rem; … … 632 668 height: 2.5rem; 633 669 } 670 .h-12 { 671 height: 3rem; 672 } 634 673 .h-16 { 635 674 height: 4rem; … … 671 710 width: 2.75rem; 672 711 } 712 .w-12 { 713 width: 3rem; 714 } 673 715 .w-16 { 674 716 width: 4rem; … … 716 758 flex: 1 1 0%; 717 759 } 760 .flex-shrink-0 { 761 flex-shrink: 0; 762 } 718 763 .shrink-0 { 719 764 flex-shrink: 0; 765 } 766 .flex-grow { 767 flex-grow: 1; 720 768 } 721 769 .grow { … … 816 864 white-space: nowrap; 817 865 } 866 .text-nowrap { 867 text-wrap: nowrap; 868 } 818 869 .rounded { 819 870 border-radius: 0.25rem; … … 840 891 border-bottom-width: 2px; 841 892 } 893 .border-l-4 { 894 border-left-width: 4px; 895 } 842 896 .border-t-2 { 843 897 border-top-width: 2px; 898 } 899 .border-solid { 900 border-style: solid; 844 901 } 845 902 .border-dashed { … … 884 941 border-color: rgb(254 240 138 / var(--tw-border-opacity)); 885 942 } 943 .border-yellow-400 { 944 --tw-border-opacity: 1; 945 border-color: rgb(250 204 21 / var(--tw-border-opacity)); 946 } 886 947 .bg-gray-200 { 887 948 --tw-bg-opacity: 1; … … 932 993 --tw-bg-opacity: 1; 933 994 background-color: rgb(254 249 195 / var(--tw-bg-opacity)); 995 } 996 .bg-yellow-50 { 997 --tw-bg-opacity: 1; 998 background-color: rgb(254 252 232 / var(--tw-bg-opacity)); 934 999 } 935 1000 .bg-opacity-50 { … … 1114 1179 --tw-text-opacity: 1; 1115 1180 color: rgb(255 255 255 / var(--tw-text-opacity)); 1181 } 1182 .text-yellow-400 { 1183 --tw-text-opacity: 1; 1184 color: rgb(250 204 21 / var(--tw-text-opacity)); 1185 } 1186 .text-yellow-700 { 1187 --tw-text-opacity: 1; 1188 color: rgb(161 98 7 / var(--tw-text-opacity)); 1116 1189 } 1117 1190 .opacity-50 { -
fraktvalg/trunk/build/fraktvalg-rtl.css
r3267354 r3271607 493 493 display: none; 494 494 } 495 .container { 496 width: 100%; 497 } 498 @media (min-width: 640px) { 499 500 .container { 501 max-width: 640px; 502 } 503 } 504 @media (min-width: 768px) { 505 506 .container { 507 max-width: 768px; 508 } 509 } 510 @media (min-width: 1024px) { 511 512 .container { 513 max-width: 1024px; 514 } 515 } 516 @media (min-width: 1280px) { 517 518 .container { 519 max-width: 1280px; 520 } 521 } 522 @media (min-width: 1536px) { 523 524 .container { 525 max-width: 1536px; 526 } 527 } 495 528 .sr-only { 496 529 position: absolute; … … 572 605 margin-right: 0.5rem; 573 606 } 607 .ml-3 { 608 margin-right: 0.75rem; 609 } 574 610 .mr-1 { 575 611 margin-left: 0.25rem; … … 632 668 height: 2.5rem; 633 669 } 670 .h-12 { 671 height: 3rem; 672 } 634 673 .h-16 { 635 674 height: 4rem; … … 671 710 width: 2.75rem; 672 711 } 712 .w-12 { 713 width: 3rem; 714 } 673 715 .w-16 { 674 716 width: 4rem; … … 716 758 flex: 1 1 0%; 717 759 } 760 .flex-shrink-0 { 761 flex-shrink: 0; 762 } 718 763 .shrink-0 { 719 764 flex-shrink: 0; 765 } 766 .flex-grow { 767 flex-grow: 1; 720 768 } 721 769 .grow { … … 816 864 white-space: nowrap; 817 865 } 866 .text-nowrap { 867 text-wrap: nowrap; 868 } 818 869 .rounded { 819 870 border-radius: 0.25rem; … … 840 891 border-bottom-width: 2px; 841 892 } 893 .border-l-4 { 894 border-right-width: 4px; 895 } 842 896 .border-t-2 { 843 897 border-top-width: 2px; 898 } 899 .border-solid { 900 border-style: solid; 844 901 } 845 902 .border-dashed { … … 884 941 border-color: rgb(254 240 138 / var(--tw-border-opacity)); 885 942 } 943 .border-yellow-400 { 944 --tw-border-opacity: 1; 945 border-color: rgb(250 204 21 / var(--tw-border-opacity)); 946 } 886 947 .bg-gray-200 { 887 948 --tw-bg-opacity: 1; … … 932 993 --tw-bg-opacity: 1; 933 994 background-color: rgb(254 249 195 / var(--tw-bg-opacity)); 995 } 996 .bg-yellow-50 { 997 --tw-bg-opacity: 1; 998 background-color: rgb(254 252 232 / var(--tw-bg-opacity)); 934 999 } 935 1000 .bg-opacity-50 { … … 1114 1179 --tw-text-opacity: 1; 1115 1180 color: rgb(255 255 255 / var(--tw-text-opacity)); 1181 } 1182 .text-yellow-400 { 1183 --tw-text-opacity: 1; 1184 color: rgb(250 204 21 / var(--tw-text-opacity)); 1185 } 1186 .text-yellow-700 { 1187 --tw-text-opacity: 1; 1188 color: rgb(161 98 7 / var(--tw-text-opacity)); 1116 1189 } 1117 1190 .opacity-50 { -
fraktvalg/trunk/build/fraktvalg.asset.php
r3267354 r3271607 1 <?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-i18n'), 'version' => ' e35a277769283e6546f1');1 <?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-i18n'), 'version' => 'a2230453f1f63f553c30'); -
fraktvalg/trunk/build/fraktvalg.css
r3267354 r3271607 493 493 display: none; 494 494 } 495 .container { 496 width: 100%; 497 } 498 @media (min-width: 640px) { 499 500 .container { 501 max-width: 640px; 502 } 503 } 504 @media (min-width: 768px) { 505 506 .container { 507 max-width: 768px; 508 } 509 } 510 @media (min-width: 1024px) { 511 512 .container { 513 max-width: 1024px; 514 } 515 } 516 @media (min-width: 1280px) { 517 518 .container { 519 max-width: 1280px; 520 } 521 } 522 @media (min-width: 1536px) { 523 524 .container { 525 max-width: 1536px; 526 } 527 } 495 528 .sr-only { 496 529 position: absolute; … … 572 605 margin-left: 0.5rem; 573 606 } 607 .ml-3 { 608 margin-left: 0.75rem; 609 } 574 610 .mr-1 { 575 611 margin-right: 0.25rem; … … 632 668 height: 2.5rem; 633 669 } 670 .h-12 { 671 height: 3rem; 672 } 634 673 .h-16 { 635 674 height: 4rem; … … 671 710 width: 2.75rem; 672 711 } 712 .w-12 { 713 width: 3rem; 714 } 673 715 .w-16 { 674 716 width: 4rem; … … 716 758 flex: 1 1 0%; 717 759 } 760 .flex-shrink-0 { 761 flex-shrink: 0; 762 } 718 763 .shrink-0 { 719 764 flex-shrink: 0; 765 } 766 .flex-grow { 767 flex-grow: 1; 720 768 } 721 769 .grow { … … 816 864 white-space: nowrap; 817 865 } 866 .text-nowrap { 867 text-wrap: nowrap; 868 } 818 869 .rounded { 819 870 border-radius: 0.25rem; … … 840 891 border-bottom-width: 2px; 841 892 } 893 .border-l-4 { 894 border-left-width: 4px; 895 } 842 896 .border-t-2 { 843 897 border-top-width: 2px; 898 } 899 .border-solid { 900 border-style: solid; 844 901 } 845 902 .border-dashed { … … 884 941 border-color: rgb(254 240 138 / var(--tw-border-opacity)); 885 942 } 943 .border-yellow-400 { 944 --tw-border-opacity: 1; 945 border-color: rgb(250 204 21 / var(--tw-border-opacity)); 946 } 886 947 .bg-gray-200 { 887 948 --tw-bg-opacity: 1; … … 932 993 --tw-bg-opacity: 1; 933 994 background-color: rgb(254 249 195 / var(--tw-bg-opacity)); 995 } 996 .bg-yellow-50 { 997 --tw-bg-opacity: 1; 998 background-color: rgb(254 252 232 / var(--tw-bg-opacity)); 934 999 } 935 1000 .bg-opacity-50 { … … 1114 1179 --tw-text-opacity: 1; 1115 1180 color: rgb(255 255 255 / var(--tw-text-opacity)); 1181 } 1182 .text-yellow-400 { 1183 --tw-text-opacity: 1; 1184 color: rgb(250 204 21 / var(--tw-text-opacity)); 1185 } 1186 .text-yellow-700 { 1187 --tw-text-opacity: 1; 1188 color: rgb(161 98 7 / var(--tw-text-opacity)); 1116 1189 } 1117 1190 .opacity-50 { -
fraktvalg/trunk/build/fraktvalg.js
r3267354 r3271607 1 (()=>{"use strict";var e={338:(e,t,a)=>{var g=a(795);t.H=g.createRoot,g.hydrateRoot},20:(e,t,a)=>{var g=a(609),i=Symbol.for("react.element"),s=Symbol.for("react.fragment"),l=Object.prototype.hasOwnProperty,r=g.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,M={key:!0,ref:!0,__self:!0,__source:!0};function I(e,t,a){var g,s={},I=null,c=null;for(g in void 0!==a&&(I=""+a),void 0!==t.key&&(I=""+t.key),void 0!==t.ref&&(c=t.ref),t)l.call(t,g)&&!M.hasOwnProperty(g)&&(s[g]=t[g]);if(e&&e.defaultProps)for(g in t=e.defaultProps)void 0===s[g]&&(s[g]=t[g]);return{$$typeof:i,type:e,key:I,ref:c,props:s,_owner:r.current}}t.Fragment=s,t.jsx=I,t.jsxs=I},848:(e,t,a)=>{e.exports=a(20)},609:e=>{e.exports=window.React},795:e=>{e.exports=window.ReactDOM}},t={};function a(g){var i=t[g];if(void 0!==i)return i.exports;var s=t[g]={exports:{}};return e[g](s,s.exports,a),s.exports}a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var g in t)a.o(t,g)&&!a.o(e,g)&&Object.defineProperty(e,g,{enumerable:!0,get:t[g]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var g=a(609),i=a(338);function s(e){var t,a,g="";if("string"==typeof e||"number"==typeof e)g+=e;else if("object"==typeof e)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(a=s(e[t]))&&(g&&(g+=" "),g+=a)}else for(a in e)e[a]&&(g&&(g+=" "),g+=a);return g}function l(){for(var e,t,a=0,g="",i=arguments.length;a<i;a++)(e=arguments[a])&&(t=s(e))&&(g&&(g+=" "),g+=t);return g}var r=a(848);function M({tabs:e,activeTab:t,setTab:a}){return(0,r.jsx)("div",{className:"border-b border-gray-200 bg-white",children:(0,r.jsx)("div",{className:"mx-auto max-w-7xl px-4 sm:px-6 lg:px-8",children:(0,r.jsx)("nav",{children:(0,r.jsx)("div",{className:"flex h-16 justify-between",children:(0,r.jsxs)("div",{className:"flex",children:[(0,r.jsx)("div",{className:"flex shrink-0 items-center",children:(0,r.jsx)("img",{className:"block h-8 w-auto",src:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjwhLS0gQ3JlYXRlZCB3aXRoIElua3NjYXBlIChodHRwOi8vd3d3Lmlua3NjYXBlLm9yZy8pIC0tPgoKPHN2ZwogICB3aWR0aD0iMzUwIgogICBoZWlnaHQ9Ijk2LjI3NzM1OSIKICAgdmlld0JveD0iMCAwIDkyLjYwNDE1NiAyNS40NzMzODEiCiAgIHZlcnNpb249IjEuMSIKICAgaWQ9InN2ZzEiCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sbnM6c3ZnPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPGRlZnMKICAgICBpZD0iZGVmczEiPgogICAgPGNsaXBQYXRoCiAgICAgICBjbGlwUGF0aFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIKICAgICAgIGlkPSJjbGlwUGF0aDEwMSI+CiAgICAgIDxwYXRoCiAgICAgICAgIGQ9Ik0gMCwwIEggNzY4MCBWIDQzMjAgSCAwIFoiCiAgICAgICAgIHR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m5vbnplcm87c3Ryb2tlOm5vbmUiCiAgICAgICB0cmFuc2Zvcm09Im1hdHJpeCgwLjEzMTEzMTUsMCwwLDAuMTMxMTMxNSwtNjEuOTEwMzYzLC01Mi4xOTM1MDkpIgogICAgICAgY2xpcC1wYXRoPSJ1cmwoI2NsaXBQYXRoMTMxKSIgLz4KICA8L2c+Cjwvc3ZnPgo=",alt:""})}),(0,r.jsx)("div",{className:"hidden sm:-my-px sm:ml-6 sm:flex sm:space-x-8",children:e.map((e=>(0,r.jsx)("button",{type:"button",className:l("border-transparent text-gray-500 hover:text-secondary hover:border-secondary whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm",e.value===t?"text-primary border-primary":""),onClick:()=>a(e.value),children:e.label},e.value)))})]})})})})})}const I=window.wp.apiFetch;var c=a.n(I);const n=window.wp.i18n;function C({title:e,children:t}){return(0,r.jsxs)("div",{className:"py-10",children:[(0,r.jsx)("header",{children:(0,r.jsx)("div",{className:"mx-auto max-w-7xl px-4 sm:px-6 lg:px-8",children:(0,r.jsx)("h1",{className:"text-3xl font-bold tracking-tight text-gray-900",children:e})})}),(0,r.jsx)("main",{children:(0,r.jsx)("div",{className:"mx-auto max-w-7xl px-4 py-8 sm:px-6 lg:px-8",children:t})})]})}function N({title:e,titleId:t,...a},i){return g.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":t},a),e?g.createElement("title",{id:t},e):null,g.createElement("path",{fillRule:"evenodd",d:"M4.755 10.059a7.5 7.5 0 0 1 12.548-3.364l1.903 1.903h-3.183a.75.75 0 1 0 0 1.5h4.992a.75.75 0 0 0 .75-.75V4.356a.75.75 0 0 0-1.5 0v3.18l-1.9-1.9A9 9 0 0 0 3.306 9.67a.75.75 0 1 0 1.45.388Zm15.408 3.352a.75.75 0 0 0-.919.53 7.5 7.5 0 0 1-12.548 3.364l-1.902-1.903h3.183a.75.75 0 0 0 0-1.5H2.984a.75.75 0 0 0-.75.75v4.992a.75.75 0 0 0 1.5 0v-3.18l1.9 1.9a9 9 0 0 0 15.059-4.035.75.75 0 0 0-.53-.918Z",clipRule:"evenodd"}))}const o=g.forwardRef(N);function d({title:e,titleId:t,...a},i){return g.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":t},a),e?g.createElement("title",{id:t},e):null,g.createElement("path",{fillRule:"evenodd",d:"M12 3.75a.75.75 0 0 1 .75.75v6.75h6.75a.75.75 0 0 1 0 1.5h-6.75v6.75a.75.75 0 0 1-1.5 0v-6.75H4.5a.75.75 0 0 1 0-1.5h6.75V4.5a.75.75 0 0 1 .75-.75Z",clipRule:"evenodd"}))}const A=g.forwardRef(d);function j({title:e,titleId:t,...a},i){return g.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":t},a),e?g.createElement("title",{id:t},e):null,g.createElement("path",{fillRule:"evenodd",d:"M12.97 3.97a.75.75 0 0 1 1.06 0l7.5 7.5a.75.75 0 0 1 0 1.06l-7.5 7.5a.75.75 0 1 1-1.06-1.06l6.22-6.22H3a.75.75 0 0 1 0-1.5h16.19l-6.22-6.22a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const x=g.forwardRef(j);function u({title:e,titleId:t,...a},i){return g.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":t},a),e?g.createElement("title",{id:t},e):null,g.createElement("path",{fillRule:"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm13.36-1.814a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z",clipRule:"evenodd"}))}const w=g.forwardRef(u);function D({type:e="notice",title:t,children:a,className:g=""}){const i=l("border rounded-md p-2","success"===e?"bg-green-100 border-green-200":"","notice"===e?"bg-yellow-100 border-yellow-200":"","error"===e?"bg-red-100 border-red-200":"",g);return(0,r.jsxs)("div",{className:i,children:[(0,r.jsx)("div",{className:"text-md text-black font-semibold",children:t}),a&&(0,r.jsx)("div",{className:"text-sm text-black",children:a})]})}function m({children:e}){return(0,r.jsx)("div",{className:"w-full mt-2 bg-gray-50 rounded-lg p-5 help-content border border-gray-200 space-y-4",children:(0,r.jsx)("div",{className:"text-sm text-gray-600",children:e})})}function T({field:e,name:t,label:a,value:i=!1,callback:s,required:l=!1,children:M}){const[I,c]=(0,g.useState)(i);return(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsxs)("label",{className:"inline-flex items-center cursor-pointer",children:[(0,r.jsx)("input",{name:t,type:"checkbox",checked:i,onChange:e=>{c(e.target.checked),s(e)},required:l,className:"sr-only peer"}),(0,r.jsx)("div",{className:"relative w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 rounded-full peer dark:bg-gray-200 peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-primary"}),(0,r.jsx)("span",{className:"ms-3 mr-2 text-sm",children:a})]}),M,e?.stateDescriptions?.enabled&&I&&(0,r.jsx)(m,{children:e?.stateDescriptions?.enabled}),e?.stateDescriptions?.disabled&&!I&&(0,r.jsx)(m,{children:e?.stateDescriptions?.disabled})]})}function L({name:e,label:t,value:a="",placeholder:g="",required:i=!1,callback:s,children:l}){return(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-sm font-medium text-gray-700",children:t}),(0,r.jsx)("input",{name:e,type:"password",value:a,onChange:s,onPaste:s,placeholder:g,required:i,className:"mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-primary focus:border-primary sm:text-sm"}),l]})}function p({name:e,label:t,value:a="",placeholder:g="",required:i=!1,callback:s,children:l}){return(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-sm font-medium text-gray-700",children:t}),(0,r.jsx)("input",{name:e,type:"text",value:a,onChange:s,onPaste:s,placeholder:g,required:i,className:"mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-primary focus:border-primary sm:text-sm"}),l]})}function y({name:e,label:t,value:a="",placeholder:i="",required:s=!1,callback:l,children:M,...I}){const[c,n]=(0,g.useState)(null!=a?a:0);return(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)("label",{className:"block text-sm font-medium text-gray-700",children:t}),(0,r.jsx)("input",{name:e,type:"number",value:c,onChange:l,onPaste:e=>{const t=e.clipboardData.getData("text"),a=parseInt(t,10);!isNaN(a)&&a>=0&&n(a),l(e)},placeholder:i,required:s,min:"0",className:"hidden"}),(0,r.jsxs)("div",{className:"inline-flex items-center gap-4",children:[(0,r.jsx)("button",{onClick:()=>{c>0&&n(c-1)},className:"px-2 py-1 font-mono text-lg text-gray-700 border border-gray-200 rounded-md hover:bg-gray-100",children:"-"}),(0,r.jsx)("span",{className:"text-lg font-mono font-semibold",children:c}),(0,r.jsx)("button",{onClick:()=>{n(c+1)},className:"px-2 py-1 font-mono text-lg text-gray-700 border border-gray-200 rounded-md hover:bg-gray-100",children:"+"})]})]}),M]})}function h({title:e,titleId:t,...a},i){return g.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":t},a),e?g.createElement("title",{id:t},e):null,g.createElement("path",{fillRule:"evenodd",d:"M16.28 11.47a.75.75 0 0 1 0 1.06l-7.5 7.5a.75.75 0 0 1-1.06-1.06L14.69 12 7.72 5.03a.75.75 0 0 1 1.06-1.06l7.5 7.5Z",clipRule:"evenodd"}))}const z=g.forwardRef(h);function b({title:e,titleId:t,...a},i){return g.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":t},a),e?g.createElement("title",{id:t},e):null,g.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z"}))}const v=g.forwardRef(b);function k({includeOptional:e=!1,provider:t,fields:a,callback:i}){const[s,l]=(0,g.useState)({}),[M,I]=(0,g.useState)({}),[c,C]=(0,g.useState)(null),N=e=>{if("paste"===e.type){const a={target:{name:e.target.name,value:e.clipboardData.getData("text"),type:e.target.type}},g={...s};return"checkbox"===a.target.type?g[a.target.name]=a.target.checked:g[a.target.name]=a.target.value,l(g),i(t,g),C(a.target.name),void setTimeout((()=>{C(null)}),100)}if(c===e.target.name)return;const a={...s};"checkbox"===e.target.type?a[e.target.name]=e.target.checked:a[e.target.name]=e.target.value,l(a),i(t,a)};(0,g.useEffect)((()=>{a.forEach((e=>{e?.value&&l({...s,[e.name]:e.value})}))}),[]);const o=e=>{switch(e.type){case"boolean":return(0,r.jsx)(T,{name:e.name,label:e.label,value:s?.[e.name],callback:N,required:e.required,field:e,children:(0,r.jsx)(r.Fragment,{children:e?.description&&(0,r.jsx)(m,{children:e?.description})})});case"password":return(0,r.jsx)(L,{name:e.name,label:e.label,value:s?.[e.name],placeholder:e.placeholder,callback:N,required:e.required,field:e,children:(0,r.jsx)(r.Fragment,{children:e?.description&&(0,r.jsx)(m,{children:e?.description})})});case"number":return(0,r.jsx)(y,{name:e.name,label:e.label,value:s?.[e.name],placeholder:e.placeholder,callback:N,required:e.required,field:e,children:(0,r.jsx)(r.Fragment,{children:e?.description&&(0,r.jsx)(m,{children:e?.description})})});default:return(0,r.jsx)(p,{name:e.name,label:e.label,value:s?.[e.name],placeholder:e.placeholder,callback:N,required:e.required,field:e,children:(0,r.jsx)(r.Fragment,{children:e?.description&&(0,r.jsx)(m,{children:e?.description})})})}};return(0,r.jsx)(r.Fragment,{children:a.flatMap(((t,a)=>t?.optional&&!e?[]:(0,r.jsxs)("div",{children:[o(t),t?.help&&(0,r.jsxs)("div",{className:"mt-2",children:[(0,r.jsxs)("button",{type:"button",className:"text-sm text-custom hover:text-custom-dark flex items-center cursor-pointer help-toggle",onClick:()=>{return e=t.name,void I((t=>({...t,[e]:!t[e]})));var e},children:[(0,r.jsx)(v,{className:"w-5 h-5 mr-1"}),(0,r.jsx)("span",{children:t?.help?.label||(0,n.__)("Help","fraktvalg")})]}),M[t.name]&&(0,r.jsxs)(m,{children:[(0,r.jsx)("p",{children:t?.help?.text}),t?.help?.url?.link&&(0,r.jsx)("div",{className:"mt-3",children:(0,r.jsxs)("a",{href:t?.help?.url?.link,target:"_blank",className:"inline-flex items-center text-custom hover:text-custom-dark font-medium",children:[(0,r.jsx)("span",{children:t?.help?.url?.label}),(0,r.jsx)(z,{className:"ml-1 w-4 h-4"})]})})]})]})]},a)))})}function f({disabled:e=!1,plain:t=!1,className:a,children:g,onClick:i=()=>{},...s}){const M=l("block w-full bg-primary text-white rounded-md p-3","hover:bg-primary/90 hover:text-white","active:bg-primary/90 active:text-white","focus:bg-primary/90 focus:text-white","disabled:bg-black/80",a);return s.href?(0,r.jsx)("a",{className:M,...s,children:g}):(0,r.jsx)("button",{onClick:i,disabled:e,className:M,...s,children:g})}function O({title:e,titleId:t,...a},i){return g.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":t},a),e?g.createElement("title",{id:t},e):null,g.createElement("path",{fillRule:"evenodd",d:"M11.47 7.72a.75.75 0 0 1 1.06 0l7.5 7.5a.75.75 0 1 1-1.06 1.06L12 9.31l-6.97 6.97a.75.75 0 0 1-1.06-1.06l7.5-7.5Z",clipRule:"evenodd"}))}const E=g.forwardRef(O);function S({title:e,titleId:t,...a},i){return g.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":t},a),e?g.createElement("title",{id:t},e):null,g.createElement("path",{fillRule:"evenodd",d:"M12.53 16.28a.75.75 0 0 1-1.06 0l-7.5-7.5a.75.75 0 0 1 1.06-1.06L12 14.69l6.97-6.97a.75.75 0 1 1 1.06 1.06l-7.5 7.5Z",clipRule:"evenodd"}))}const Y=g.forwardRef(S);function U({title:e,titleId:t,...a},i){return g.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":t},a),e?g.createElement("title",{id:t},e):null,g.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 18.75a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m3 0h6m-9 0H3.375a1.125 1.125 0 0 1-1.125-1.125V14.25m17.25 4.5a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m3 0h1.125c.621 0 1.129-.504 1.09-1.124a17.902 17.902 0 0 0-3.213-9.193 2.056 2.056 0 0 0-1.58-.86H14.25M16.5 18.75h-2.25m0-11.177v-.958c0-.568-.422-1.048-.987-1.106a48.554 48.554 0 0 0-10.026 0 1.106 1.106 0 0 0-.987 1.106v7.635m12-6.677v6.677m0 4.5v-4.5m0 0h-12"}))}const Q=g.forwardRef(U);function G({logo:e=null,...t}){const{alt:a=""}=t;return e?e.startsWith("http")||e.startsWith("data:image")?(0,r.jsx)("img",{src:e,alt:a,...t}):(e.startsWith("https")||(e=encodeURIComponent(e)),(0,r.jsx)("img",{src:"data:image/svg+xml;utf8,"+e,alt:a,...t})):(0,r.jsx)(Q,{...t})}function B({supplierId:e,supplier:t,title:a,content:i,isConnected:s=!1,visible:M=!0,classNames:I="",innerClassNames:c=""}){const[C,N]=(0,g.useState)(M),o=l("border bg-white rounded-md",I),d=l("border-t-2 border-gray-100 p-4",c);return(0,r.jsxs)("div",{className:o,children:[(0,r.jsx)("button",{className:"flex w-full p-4 items-center justify-between",onClick:()=>N(!C),children:(0,r.jsx)("h2",{className:"text-lg font-bold w-full",children:(0,r.jsxs)("div",{className:"flex item-center justify-between focus:outline-none w-full",children:[(0,r.jsxs)("div",{className:"flex",children:[t?.logo&&(0,r.jsx)("div",{children:(0,r.jsx)(G,{logo:t?.logo,alt:a,className:"w-8 h-8 mr-2"})}),(0,r.jsx)("div",{className:"inline-flex items-center gap-4",children:(0,r.jsx)("span",{children:a})})]}),(0,r.jsxs)("div",{className:"flex items-center gap-4",children:[s&&(0,r.jsx)("div",{className:"px-3 py-1 text-sm rounded-full bg-green-100 text-green-600",children:(0,n.__)("Connected","fraktvalg")}),!s&&(0,r.jsx)("div",{className:"px-3 py-1 text-sm rounded-full bg-red-100 text-red-600",children:(0,n.__)("Disconnected","fraktvalg")}),C?(0,r.jsx)(E,{className:"h-6 w-6 text-gray-600"}):(0,r.jsx)(Y,{className:"h-6 w-6 text-gray-600"})]})]})})}),C&&(0,r.jsx)("div",{className:d,children:i})]})}function Z({title:e,titleId:t,...a},i){return g.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":t},a),e?g.createElement("title",{id:t},e):null,g.createElement("path",{d:"M6.5 2.25a.75.75 0 0 0-1.5 0v3a.75.75 0 0 0 1.5 0V4.5h6.75a.75.75 0 0 0 0-1.5H6.5v-.75ZM11 6.5a.75.75 0 0 0-1.5 0v3a.75.75 0 0 0 1.5 0v-.75h2.25a.75.75 0 0 0 0-1.5H11V6.5ZM5.75 10a.75.75 0 0 1 .75.75v.75h6.75a.75.75 0 0 1 0 1.5H6.5v.75a.75.75 0 0 1-1.5 0v-3a.75.75 0 0 1 .75-.75ZM2.75 7.25H8.5v1.5H2.75a.75.75 0 0 1 0-1.5ZM4 3H2.75a.75.75 0 0 0 0 1.5H4V3ZM2.75 11.5H4V13H2.75a.75.75 0 0 1 0-1.5Z"}))}const X=g.forwardRef(Z);function R({setProvider:e,setTab:t}){const[a,i]=(0,g.useState)({}),[s,l]=(0,g.useState)({}),[M,I]=(0,g.useState)(null),[N,d]=(0,g.useState)(""),[j,u]=(0,g.useState)(!0),[m,T]=(0,g.useState)(null),[L,p]=(0,g.useState)(10),[y,h]=(0,g.useState)("percent"),[z,b]=(0,g.useState)(""),[v,O]=(0,g.useState)({}),E=(e,t)=>{O({...v,[e]:t})},S=()=>{I(null),d(""),c()({path:"fraktvalg/v1/settings/providers/mine",method:"GET"}).then((e=>{l(e?.mine?.data||{}),i(e?.available?.data||{}),e?.available?.data&&Object.keys(e?.available?.data).map((t=>{O({...v,[t]:e?.available?.data[t]?.fields})})),e?.mine?.data&&e?.mine?.data?.forEach((e=>{if(a[e?.id]){let t={...a};delete t[e?.id],i(t)}O({...v,[e?.id]:e?.fields})}))})).catch((e=>{d("fetching providers"),I(e?.message)})).then((()=>{u(!1)}))},Y=()=>{c()({path:"fraktvalg/v1/settings/providers/priority",method:"GET"}).then((e=>{T(e?.data?.providerId),p(e?.data?.discount),h(e?.data?.discountType)}))},U=e=>{b(e),I(null),d(""),c()({path:"fraktvalg/v1/settings/providers/store",method:"POST",data:{providerId:e,fieldValues:v[e]}}).then((e=>{b(""),S()})).catch((e=>{b(""),d("saving provider settings"),I(e?.message||(0,n.__)("Failed to save provider settings","fraktvalg"))}))};return(0,g.useEffect)((()=>{S(),Y()}),[]),j?(0,r.jsx)(C,{title:"My providers",children:(0,r.jsxs)("div",{className:"flex flex-col justify-center items-center h-64",children:[(0,r.jsx)(o,{className:"h-8 w-8 animate-spin text-primary"}),(0,r.jsx)("div",{className:"text-lg",children:(0,n.__)("Fetching available providers...","fraktvalg")})]})}):(0,r.jsx)(C,{title:"My providers",children:(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-3",children:[M&&(0,r.jsx)(D,{type:"error",title:`Error ${N||"fetching providers"}`,children:M}),Object.keys(s).map((a=>(0,r.jsx)(B,{isConnected:!0,title:s[a]?.name,supplierId:a,supplier:s[a],content:(0,r.jsxs)("div",{className:"relative grid grid-cols-1 gap-4",children:[z===a&&(0,r.jsxs)("div",{className:"absolute w-full h-full top-0 left-0 bg-white flex flex-col justify-center items-center gap-2",children:[(0,r.jsx)(o,{className:"h-6 w-6 animate-spin text-primary"}),(0,r.jsx)("span",{children:(0,n.__)("Saving provider settings, one moment please...","fraktvalg")})]}),(0,r.jsx)(k,{includeOptional:!0,provider:a,fields:s[a]?.fields||[],callback:E}),(0,r.jsxs)("div",{className:"flex flex-col md:flex-row justify-between gap-2",children:[(0,r.jsx)("div",{className:"flex flex-col md:flex-row justify-start gap-2",children:(0,r.jsxs)(f,{type:"button",className:"md:inline-block md:w-fit",onClick:()=>{e(s[a]),t("shipping-methods")},children:[(0,r.jsx)(X,{className:"w-4 h-4 mr-2 inline-block"}),(0,n.__)("Configure shipping methods","fraktvalg")]})}),(0,r.jsxs)("div",{className:"flex flex-col md:flex-row justify-end gap-2",children:[(0,r.jsx)(f,{className:"md:inline-block md:w-fit bg-red-600 hover:bg-red-500 active:bg-red-500 focus:bg-red-500",type:"button",onClick:()=>{return e=s[a],void(confirm((0,n.__)("Are you sure you want to disconnect this provider?","fraktvalg"))&&(b(e?.id),I(null),d(""),c()({path:"fraktvalg/v1/settings/providers/disconnect",method:"POST",data:{provider:e?.id}}).then((e=>{b(""),S()})).catch((e=>{b(""),d("disconnecting provider"),I(e?.message||(0,n.__)("Failed to disconnect provider","fraktvalg"))}))));var e},children:(0,n.__)("Disconnect provider","fraktvalg")}),(0,r.jsx)(f,{className:"md:inline-block md:w-fit",type:"button",onClick:()=>U(s[a]),children:(0,n.__)("Update provider settings","fraktvalg")})]})]})]})},a))),(0,r.jsx)("hr",{className:"border-gray-200 my-2"}),Object.keys(a).map((e=>(0,r.jsx)(B,{title:a[e]?.name,supplierId:e,supplier:a[e],visible:!1,content:(0,r.jsxs)("div",{className:"relative grid grid-cols-1 gap-4",children:[z===e&&(0,r.jsxs)("div",{className:"absolute w-full h-full top-0 left-0 bg-white flex flex-col justify-center items-center gap-2",children:[(0,r.jsx)(o,{className:"h-6 w-6 animate-spin text-primary"}),(0,r.jsx)("span",{children:(0,n.__)("Connecting provider, one moment please...","fraktvalg")})]}),(0,r.jsx)(k,{provider:e,fields:a[e]?.fields||[],callback:E}),(0,r.jsx)(f,{type:"button",onClick:()=>U(e),children:(0,n.__)("Connect to this provider","fraktvalg")})]})},e))),(0,r.jsx)("div",{className:"bg-white rounded-lg shadow p-6 border-2 border-dashed border-gray-300",children:(0,r.jsxs)("div",{className:"flex flex-col items-center text-center",children:[(0,r.jsx)("div",{className:"w-16 h-16 bg-primary/10 rounded-full flex items-center justify-center mb-4",children:(0,r.jsx)(A,{className:"w-8 h-8 text-primary"})}),(0,r.jsx)("h2",{className:"text-xl font-semibold text-gray-900 mb-2",children:(0,n.__)("More providers are coming 🥳","fraktvalg")}),(0,r.jsx)("p",{className:"text-gray-600 mb-4",children:(0,n.__)("We are continually working to integrate more shipping providers to you you more opportunities.","fraktvalg")}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)("p",{className:"text-sm text-gray-600",children:(0,n.__)("Is there someone you would like to see here?","fraktvalg")}),(0,r.jsxs)("a",{href:"mailto:[email protected]",className:"inline-flex items-center text-custom hover:text-custom-dark font-medium",children:[(0,r.jsx)("span",{children:(0,n.__)("Send us an e-mail","fraktvalg")}),(0,r.jsx)(x,{className:"ml-1 w-4 h-4"})]})]})]})}),Object.keys(s).length>1&&(0,r.jsxs)("div",{className:"bg-white rounded-lg shadow p-6",children:[(0,r.jsx)("h2",{className:"text-xl font-semibold text-gray-900 mb-2",children:(0,n.__)("Preferred provider","fraktvalg")}),(0,r.jsx)("p",{className:"text-gray-600 mb-4",children:(0,n.__)("Choose which provider should always be the cheapest option in your store. This gives you the opportunity to prioritize one provider by making their prices more competitive.","fraktvalg")}),(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-4",children:[(0,r.jsx)("p",{children:(0,n.__)("Price reduction for your preferred provider","fraktvalg")}),(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)("input",{value:L,onChange:e=>p(e.target.value),type:"number",min:"0",step:"1",placeholder:"10",className:"w-16 border border-gray-300 rounded-md p-2"}),(0,r.jsxs)("select",{className:"border border-gray-300 rounded-md p-2",value:y,onChange:e=>h(e.target.value),children:[(0,r.jsx)("option",{value:"percent",children:"%"}),(0,r.jsx)("option",{value:"fixed",children:"NOK"})]}),(0,r.jsx)("label",{htmlFor:"something",children:(0,n.__)("Determine how much cheaper your preferred provider should be compared to the cheapest competitor.","fraktvalg")})]}),(0,r.jsx)("div",{className:"flex gap-4",children:Object.keys(s).map((e=>(0,r.jsxs)("label",{className:"relative cursor-pointer grow flex flex-col gap-2 items-center border-2 border-gray-300 rounded-lg p-4 hover:border-primary peer-checked:border-primary transition-all duration-200",children:[(0,r.jsx)("input",{type:"radio",name:"preferred_provider",value:e,className:"sr-only peer",defaultChecked:m===e,onChange:()=>T(m===e?null:e)}),s[e]?.logo&&(0,r.jsx)(G,{logo:s[e]?.logo,className:"w-8 h-8"}),(0,r.jsx)("span",{className:"text-lg font-medium text-gray-900",children:s[e]?.name}),(0,r.jsx)("div",{className:"absolute top-2 right-2 hidden peer-checked:block",children:(0,r.jsx)(w,{className:"w-6 h-6 text-primary"})}),(0,r.jsx)("p",{className:"text-sm text-gray-5400 text-center",children:s[e]?.description}),(0,r.jsx)("p",{className:"text-xs text-primary font-medium peer-checked:block hidden",children:(0,n.__)("Currently chosen as your preferred provider","fraktvalg")})]},e)))}),(0,r.jsx)(f,{type:"button",onClick:()=>{I(null),d(""),c()({path:"fraktvalg/v1/settings/providers/priority/store",method:"POST",data:{priorityProvider:{providerId:m,discount:L,discountType:y}}}).then((e=>{Y()})).catch((e=>{d("saving priority provider settings"),I(e?.message||(0,n.__)("Failed to save priority provider settings","fraktvalg"))}))},children:(0,n.__)("Save preferred provider preferences","fraktvalg")})]})]})]})})}function F({title:e,children:t,open:a=!1}){const[i,s]=(0,g.useState)(a||!1);return(0,r.jsxs)("div",{className:"border bg-white rounded-md",children:[(0,r.jsxs)("button",{className:"w-full flex p-4 justify-between",onClick:()=>s(!i),children:[(0,r.jsx)("h2",{className:"text-lg text-left font-bold w-full",children:e}),(0,r.jsx)("div",{className:"relative inline-block",children:i?(0,r.jsx)(E,{className:"h-6 w-6 text-primary"}):(0,r.jsx)(Y,{className:"h-6 w-6 text-primary"})})]}),i&&(0,r.jsx)("div",{className:"p-4",children:t})]})}function P({}){const[e,t]=(0,g.useState)(null),[a,i]=(0,g.useState)({freight:{addedCost:0,addedCostType:"fixed",custom:{name:(0,n.__)("Shipping & handling","fraktvalg"),price:100,type:"fixed"}},useProduction:!0,names:[]}),[s,l]=(0,g.useState)(!0),M=e=>{switch(e.target.name){case"freight[addedCost]":i({...a,freight:{...a.freight,addedCost:e.target.value}});break;case"freight[addedCostType]":i({...a,freight:{...a.freight,addedCostType:e.target.value}});break;case"freight[custom][name]":i({...a,freight:{...a.freight,custom:{...a.freight.custom,name:e.target.value}}});break;case"freight[custom][price]":i({...a,freight:{...a.freight,custom:{...a.freight.custom,price:e.target.value}}});break;case"freight[custom][type]":i({...a,freight:{...a.freight,custom:{...a.freight.custom,type:e.target.value}}});break;case"useProduction":i({...a,useProduction:e.target.checked});break;default:i({...a,[e.target.name]:e.target.value})}};return(0,g.useEffect)((()=>{t(null),l(!0),c()({path:"/fraktvalg/v1/settings/optional-settings",method:"GET"}).then((e=>{i(e?.data||a),l(!1)})).catch((e=>{t({type:"error",title:(0,n.__)("Error fetching optional settings","fraktvalg"),message:e?.message}),l(!1)}))}),[]),s?(0,r.jsx)(C,{title:"My providers",children:(0,r.jsxs)("div",{className:"flex flex-col justify-center items-center h-64",children:[(0,r.jsx)(o,{className:"h-8 w-8 animate-spin text-primary"}),(0,r.jsx)("div",{className:"text-lg",children:"Fetching optional settings..."})]})}):(0,r.jsx)(C,{title:"Optional settings",children:(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-3",children:[(0,r.jsxs)(F,{title:(0,n.__)("Backup shipping option","fraktvalg"),open:!0,children:[(0,r.jsx)("p",{children:(0,n.__)("If Fraktvalg should ever become unavailable, or no shiopping options are returned, returns this shipping alternative by default.","fraktvalg")}),(0,r.jsxs)("div",{className:"mt-2 grid grid-cols-1 gap-4",children:[(0,r.jsx)(p,{label:(0,n.__)("Shipping option name","fraktvalg"),name:"freight[custom][name]",value:a.freight.custom.name,callback:M}),(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)("input",{name:"freight[custom][price]",value:a.freight.custom.price,onChange:M,type:"number",min:"0",step:"1",placeholder:"25",className:"w-16 border border-gray-300 rounded-md p-2"}),(0,r.jsxs)("select",{name:"freight[custom][type]",className:"border border-gray-300 rounded-md p-2",value:a.freight.custom.type,onChange:M,children:[(0,r.jsx)("option",{value:"percent",children:"%"}),(0,r.jsx)("option",{value:"fixed",children:"NOK"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"something",children:(0,n.__)("Backup shipping cost","fraktvalg")}),(0,r.jsx)("p",{className:"text-xs italic",children:(0,n.__)("The backup shipping cost can be set to either a fixed value, or a percentage of the order total.","fraktvalg")})]})]})]})]}),(0,r.jsxs)(F,{title:(0,n.__)("Shipping cost adjustments","fraktvalg"),open:!0,children:[(0,n.__)("Safeguard your shipping costs with these optional alternatives.","fraktvalg"),(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)("input",{name:"freight[addedCost]",value:a.freight.addedCost,onChange:M,type:"number",min:"0",step:"1",placeholder:"10",className:"w-16 border border-gray-300 rounded-md p-2"}),(0,r.jsxs)("select",{name:"freight[addedCostType]",className:"border border-gray-300 rounded-md p-2",value:a.freight.addedCostType,onChange:M,children:[(0,r.jsx)("option",{value:"percent",children:"%"}),(0,r.jsx)("option",{value:"fixed",children:"NOK"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"something",children:(0,n.__)("Add an optional surcharge to all shipping options","fraktvalg")}),(0,r.jsx)("p",{className:"text-xs italic",children:(0,n.__)("Additional shipping surcharges are meant to cover administrative- and handling costs, and is automatically added to all shipping alternatives.","fraktvalg")})]})]})]}),(0,r.jsxs)(F,{title:(0,n.__)("Shop environment","fraktvalg"),open:!0,children:[(0,r.jsx)("p",{children:(0,n.__)("Some times, you wish to use the shipping providers test environments, for example on a staging site. Doing so will not create legitimate shipping requests, and prevents yo ufrom incurring charges while testing your store setup.","fraktvalg")}),(0,r.jsx)("div",{className:"mt-2 grid grid-cols-1 gap-4",children:(0,r.jsx)(T,{label:(0,n.__)("Use production environments","fraktvalg"),name:"useProduction",value:a.useProduction,callback:M})})]}),e&&(0,r.jsx)(D,{type:e.type,title:e.title,children:e.message}),(0,r.jsx)(f,{type:"button",onClick:()=>{t(null),c()({path:"/fraktvalg/v1/settings/optional-settings",method:"POST",data:{options:a}}).then((e=>{t({type:e?.type,title:e?.title,message:e?.message})})).catch((e=>{t({type:"error",title:(0,n.__)("Error saving optional settings","fraktvalg"),message:e?.message})}))},children:(0,n.__)("Save optional settings","fraktvalg")})]})})}function _({title:e,titleId:t,...a},i){return g.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":t},a),e?g.createElement("title",{id:t},e):null,g.createElement("path",{fillRule:"evenodd",d:"M19.449 8.448 16.388 11a4.52 4.52 0 0 1 0 2.002l3.061 2.55a8.275 8.275 0 0 0 0-7.103ZM15.552 19.45 13 16.388a4.52 4.52 0 0 1-2.002 0l-2.55 3.061a8.275 8.275 0 0 0 7.103 0ZM4.55 15.552 7.612 13a4.52 4.52 0 0 1 0-2.002L4.551 8.45a8.275 8.275 0 0 0 0 7.103ZM8.448 4.55 11 7.612a4.52 4.52 0 0 1 2.002 0l2.55-3.061a8.275 8.275 0 0 0-7.103 0Zm8.657-.86a9.776 9.776 0 0 1 1.79 1.415 9.776 9.776 0 0 1 1.414 1.788 9.764 9.764 0 0 1 0 10.211 9.777 9.777 0 0 1-1.415 1.79 9.777 9.777 0 0 1-1.788 1.414 9.764 9.764 0 0 1-10.212 0 9.776 9.776 0 0 1-1.788-1.415 9.776 9.776 0 0 1-1.415-1.788 9.764 9.764 0 0 1 0-10.212 9.774 9.774 0 0 1 1.415-1.788A9.774 9.774 0 0 1 6.894 3.69a9.764 9.764 0 0 1 10.211 0ZM14.121 9.88a2.985 2.985 0 0 0-1.11-.704 3.015 3.015 0 0 0-2.022 0 2.985 2.985 0 0 0-1.11.704c-.326.325-.56.705-.704 1.11a3.015 3.015 0 0 0 0 2.022c.144.405.378.785.704 1.11.325.326.705.56 1.11.704.652.233 1.37.233 2.022 0a2.985 2.985 0 0 0 1.11-.704c.326-.325.56-.705.704-1.11a3.016 3.016 0 0 0 0-2.022 2.985 2.985 0 0 0-.704-1.11Z",clipRule:"evenodd"}))}const W=g.forwardRef(_);function J({title:e,titleId:t,...a},i){return g.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":t},a),e?g.createElement("title",{id:t},e):null,g.createElement("path",{d:"M4.913 2.658c2.075-.27 4.19-.408 6.337-.408 2.147 0 4.262.139 6.337.408 1.922.25 3.291 1.861 3.405 3.727a4.403 4.403 0 0 0-1.032-.211 50.89 50.89 0 0 0-8.42 0c-2.358.196-4.04 2.19-4.04 4.434v4.286a4.47 4.47 0 0 0 2.433 3.984L7.28 21.53A.75.75 0 0 1 6 21v-4.03a48.527 48.527 0 0 1-1.087-.128C2.905 16.58 1.5 14.833 1.5 12.862V6.638c0-1.97 1.405-3.718 3.413-3.979Z"}),g.createElement("path",{d:"M15.75 7.5c-1.376 0-2.739.057-4.086.169C10.124 7.797 9 9.103 9 10.609v4.285c0 1.507 1.128 2.814 2.67 2.94 1.243.102 2.5.157 3.768.165l2.782 2.781a.75.75 0 0 0 1.28-.53v-2.39l.33-.026c1.542-.125 2.67-1.433 2.67-2.94v-4.286c0-1.505-1.125-2.811-2.664-2.94A49.392 49.392 0 0 0 15.75 7.5Z"}))}const K=g.forwardRef(J);function H({}){return(0,r.jsx)(C,{title:"Support",children:(0,r.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-5",children:[(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-3 bg-tertiary/10 p-5 rounded-md",children:[(0,r.jsx)("h2",{className:"text-lg font-semibold",children:(0,n.__)("Fraktvalg support","fraktvalg")}),(0,r.jsx)("p",{className:"text-sm",children:(0,n.__)("For help with the Fraktvalg API, your subscription, or other questions, please contact us directly.","fraktvalg")}),(0,r.jsx)("div",{className:"justify-end align-bottom",children:(0,r.jsxs)(f,{href:"mailto:[email protected]",className:"inline-flex items-center gap-3",children:[(0,r.jsx)(W,{className:"w-4 h-4 inline-block"}),(0,n.__)("Contact Fraktvalg support","fraktvalg")]})})]}),(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-3 bg-tertiary/10 p-5 rounded-md",children:[(0,r.jsx)("h2",{className:"text-lg font-semibold",children:(0,n.__)("Community support","fraktvalg")}),(0,r.jsx)("p",{className:"text-sm",children:(0,n.__)("If you are having trouble with WordPress, or using the plugin, please use the community support forums at WordPress.org.","fraktvalg")}),(0,r.jsx)("div",{className:"justify-end align-bottom",children:(0,r.jsxs)(f,{href:"https://wordpress.org/support/plugin/fraktvalg/",className:"inline-flex items-center gap-3",children:[(0,r.jsx)(K,{className:"w-4 h-4 inline-block"}),(0,n.__)("Visit the WordPress.org support forums","fraktvalg"),(0,r.jsx)("span",{className:"sr-only",children:(0,n.__)("External link, opens in a new tab","frakt")})]})})]})]})})}function V({title:e,titleId:t,...a},i){return g.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":t},a),e?g.createElement("title",{id:t},e):null,g.createElement("path",{fillRule:"evenodd",d:"M11.03 3.97a.75.75 0 0 1 0 1.06l-6.22 6.22H21a.75.75 0 0 1 0 1.5H4.81l6.22 6.22a.75.75 0 1 1-1.06 1.06l-7.5-7.5a.75.75 0 0 1 0-1.06l7.5-7.5a.75.75 0 0 1 1.06 0Z",clipRule:"evenodd"}))}const q=g.forwardRef(V);function $({supplier:e,setTab:t}){const[a,i]=(0,g.useState)(!1),[s,l]=(0,g.useState)([]);return(0,g.useEffect)((()=>{i(!0),c()({path:"fraktvalg/v1/settings/providers/methods",method:"POST",data:{shipper_id:e.id}}).then((e=>{l(e),i(!1)}))}),[]),(0,r.jsxs)(C,{title:(0,r.jsxs)("div",{className:"flex justify-between",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[e?.logo&&(0,r.jsx)("div",{children:(0,r.jsx)(G,{logo:e?.logo,alt:e?.name,className:"w-8 h-8 mr-2"})}),(0,r.jsx)("div",{className:"inline-flex items-center gap-4",children:(0,r.jsx)("span",{children:e?.name})})]}),(0,r.jsx)("div",{children:(0,r.jsxs)(f,{type:"button",onClick:()=>t("providers"),className:"text-sm",children:[(0,r.jsx)(q,{className:"h-4 w-4 mr-2 inline-block"}),(0,n.__)("Back to providers","fraktvalg")]})})]}),children:[a&&(0,r.jsxs)("div",{className:"flex flex-col justify-center items-center h-64",children:[(0,r.jsx)(o,{className:"h-8 w-8 animate-spin text-primary"}),(0,r.jsx)("div",{className:"text-lg",children:(0,n.__)("Loading shipping methods...","fraktvalg")})]}),!a&&0===s.length&&(0,r.jsx)(D,{children:(0,n.__)("This provider does not offer any shipping methods that can be modified.","fraktvalg")}),!a&&s.length>0&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("table",{className:"min-w-full divide-y divide-gray-200",children:[(0,r.jsx)("thead",{className:"bg-gray-50",children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:(0,n.__)("Active","fraktvalg")}),(0,r.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:(0,n.__)("Name","fraktvalg")}),(0,r.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:(0,n.__)("Price","fraktvalg")})]})}),(0,r.jsx)("tbody",{className:"bg-white divide-y divide-gray-200",children:s.map(((e,t)=>(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:(0,r.jsxs)("label",{children:[(0,r.jsx)("input",{type:"checkbox",checked:e.active,onChange:()=>{const e=[...s];e[t].active=!e[t].active,l(e)}}),(0,r.jsx)("span",{className:"ml",children:(0,n.__)("Active","fraktvalg")})]})}),(0,r.jsx)("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900",children:(0,r.jsxs)("div",{className:"flex flex-col",children:[(0,r.jsx)("small",{className:"text-gray-500",children:e.originalName}),(0,r.jsx)("input",{type:"text",value:e.name,onChange:e=>{const a=[...s];a[t].name=e.target.value,l(a)},className:"border border-gray-300 rounded-md p-2"})]})}),(0,r.jsx)("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-right text-gray-500",children:(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,r.jsxs)("label",{children:[(0,r.jsx)("span",{className:"mr-2",children:(0,n.__)("Set a fixed price for this shipping method","fraktvalg")}),(0,r.jsx)("input",{type:"checkbox",checked:e.canEditPrice,onChange:()=>{const e=[...s];e[t].canEditPrice=!e[t].canEditPrice,l(e)}})]}),(0,r.jsx)("input",{type:"number",value:e.price||"",disabled:!e.canEditPrice,onChange:e=>{const a=[...s];a[t].price=e.target.value,l(a)},className:"border border-gray-300 rounded-md p-2"})]})})]},e.id)))})]}),(0,r.jsx)("div",{className:"flex flex-col md:flex-row justify-end gap-2 mt-4",children:(0,r.jsx)(f,{type:"button",onClick:()=>{c()({path:"fraktvalg/v1/settings/providers/methods/store",method:"POST",data:{shipper_id:e.id,fields:s}}).then((e=>{console.log(e)}))},className:"md:inline-block md:w-fit",children:(0,n.__)("Save shipping overrides","fraktvalg")})})]})]})}function ee({}){const[e,t]=(0,g.useState)("providers"),[a,i]=(0,g.useState)(null);return(0,r.jsxs)("div",{className:"min-h-full",children:[(0,r.jsx)(M,{tabs:[{label:"My providers",value:"providers"},{label:"Optional settings",value:"settings"},{label:"Support",value:"support"}],activeTab:e,setTab:t}),"providers"===e&&(0,r.jsx)(R,{setProvider:i,setTab:t}),"shipping-methods"===e&&(0,r.jsx)($,{supplier:a,setTab:t}),"settings"===e&&(0,r.jsx)(P,{}),"support"===e&&(0,r.jsx)(H,{})]})}const te=document.getElementById("fraktvalg-settings");te&&(0,i.H)(te).render((0,r.jsx)(ee,{}))})();1 (()=>{"use strict";var e={338:(e,t,a)=>{var s=a(795);t.H=s.createRoot,s.hydrateRoot},20:(e,t,a)=>{var s=a(609),g=Symbol.for("react.element"),i=Symbol.for("react.fragment"),l=Object.prototype.hasOwnProperty,r=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,M={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,a){var s,i={},c=null,I=null;for(s in void 0!==a&&(c=""+a),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(I=t.ref),t)l.call(t,s)&&!M.hasOwnProperty(s)&&(i[s]=t[s]);if(e&&e.defaultProps)for(s in t=e.defaultProps)void 0===i[s]&&(i[s]=t[s]);return{$$typeof:g,type:e,key:c,ref:I,props:i,_owner:r.current}}t.Fragment=i,t.jsx=c,t.jsxs=c},848:(e,t,a)=>{e.exports=a(20)},609:e=>{e.exports=window.React},795:e=>{e.exports=window.ReactDOM}},t={};function a(s){var g=t[s];if(void 0!==g)return g.exports;var i=t[s]={exports:{}};return e[s](i,i.exports,a),i.exports}a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var s in t)a.o(t,s)&&!a.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var s=a(609),g=a(338);function i(e){var t,a,s="";if("string"==typeof e||"number"==typeof e)s+=e;else if("object"==typeof e)if(Array.isArray(e)){var g=e.length;for(t=0;t<g;t++)e[t]&&(a=i(e[t]))&&(s&&(s+=" "),s+=a)}else for(a in e)e[a]&&(s&&(s+=" "),s+=a);return s}function l(){for(var e,t,a=0,s="",g=arguments.length;a<g;a++)(e=arguments[a])&&(t=i(e))&&(s&&(s+=" "),s+=t);return s}var r=a(848);function M({tabs:e,activeTab:t,setTab:a}){return(0,r.jsx)("div",{className:"border-b border-gray-200 bg-white",children:(0,r.jsx)("div",{className:"mx-auto max-w-7xl px-4 sm:px-6 lg:px-8",children:(0,r.jsx)("nav",{children:(0,r.jsx)("div",{className:"flex h-16 justify-between",children:(0,r.jsxs)("div",{className:"flex",children:[(0,r.jsx)("div",{className:"flex shrink-0 items-center",children:(0,r.jsx)("img",{className:"block h-8 w-auto",src:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjwhLS0gQ3JlYXRlZCB3aXRoIElua3NjYXBlIChodHRwOi8vd3d3Lmlua3NjYXBlLm9yZy8pIC0tPgoKPHN2ZwogICB3aWR0aD0iMzUwIgogICBoZWlnaHQ9Ijk2LjI3NzM1OSIKICAgdmlld0JveD0iMCAwIDkyLjYwNDE1NiAyNS40NzMzODEiCiAgIHZlcnNpb249IjEuMSIKICAgaWQ9InN2ZzEiCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sbnM6c3ZnPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+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kwNTY0IDQ3LjkxODgzLDAgODYuOTA1NzYsLTM4Ljk4MzAzIDg2LjkwNTc2LC04Ni45MDU2NCAwLC00Ny45MTg3IC0zOC45ODY5MywtODYuOTA1NjQgLTg2LjkwNTc2LC04Ni45MDU2NCIKICAgICAgIHN0eWxlPSJmaWxsOiMyZjQ2M2U7ZmlsbC1vcGFjaXR5OjE7ZmlsbC1ydWxlOm5vbnplcm87c3Ryb2tlOm5vbmUiCiAgICAgICB0cmFuc2Zvcm09Im1hdHJpeCgwLjEzMTEzMTUsMCwwLDAuMTMxMTMxNSwtNjEuOTEwMzYzLC01Mi4xOTM1MDkpIgogICAgICAgY2xpcC1wYXRoPSJ1cmwoI2NsaXBQYXRoMTMxKSIgLz4KICA8L2c+Cjwvc3ZnPgo=",alt:""})}),(0,r.jsx)("div",{className:"hidden sm:-my-px sm:ml-6 sm:flex sm:space-x-8",children:e.map((e=>(0,r.jsx)("button",{type:"button",className:l("border-transparent text-gray-500 hover:text-secondary hover:border-secondary whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm",e.value===t?"text-primary border-primary":""),onClick:()=>a(e.value),children:e.label},e.value)))})]})})})})})}const c=window.wp.apiFetch;var I=a.n(c);const n=window.wp.i18n;function C({title:e,children:t}){return(0,r.jsxs)("div",{className:"py-10",children:[(0,r.jsx)("header",{children:(0,r.jsx)("div",{className:"mx-auto max-w-7xl px-4 sm:px-6 lg:px-8",children:(0,r.jsx)("h1",{className:"text-3xl font-bold tracking-tight text-gray-900",children:e})})}),(0,r.jsx)("main",{children:(0,r.jsx)("div",{className:"mx-auto max-w-7xl px-4 py-8 sm:px-6 lg:px-8",children:t})})]})}function o({title:e,titleId:t,...a},g){return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:g,"aria-labelledby":t},a),e?s.createElement("title",{id:t},e):null,s.createElement("path",{fillRule:"evenodd",d:"M4.755 10.059a7.5 7.5 0 0 1 12.548-3.364l1.903 1.903h-3.183a.75.75 0 1 0 0 1.5h4.992a.75.75 0 0 0 .75-.75V4.356a.75.75 0 0 0-1.5 0v3.18l-1.9-1.9A9 9 0 0 0 3.306 9.67a.75.75 0 1 0 1.45.388Zm15.408 3.352a.75.75 0 0 0-.919.53 7.5 7.5 0 0 1-12.548 3.364l-1.902-1.903h3.183a.75.75 0 0 0 0-1.5H2.984a.75.75 0 0 0-.75.75v4.992a.75.75 0 0 0 1.5 0v-3.18l1.9 1.9a9 9 0 0 0 15.059-4.035.75.75 0 0 0-.53-.918Z",clipRule:"evenodd"}))}const N=s.forwardRef(o);function d({title:e,titleId:t,...a},g){return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:g,"aria-labelledby":t},a),e?s.createElement("title",{id:t},e):null,s.createElement("path",{fillRule:"evenodd",d:"M12 3.75a.75.75 0 0 1 .75.75v6.75h6.75a.75.75 0 0 1 0 1.5h-6.75v6.75a.75.75 0 0 1-1.5 0v-6.75H4.5a.75.75 0 0 1 0-1.5h6.75V4.5a.75.75 0 0 1 .75-.75Z",clipRule:"evenodd"}))}const A=s.forwardRef(d);function j({title:e,titleId:t,...a},g){return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:g,"aria-labelledby":t},a),e?s.createElement("title",{id:t},e):null,s.createElement("path",{fillRule:"evenodd",d:"M12.97 3.97a.75.75 0 0 1 1.06 0l7.5 7.5a.75.75 0 0 1 0 1.06l-7.5 7.5a.75.75 0 1 1-1.06-1.06l6.22-6.22H3a.75.75 0 0 1 0-1.5h16.19l-6.22-6.22a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const x=s.forwardRef(j);function u({title:e,titleId:t,...a},g){return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:g,"aria-labelledby":t},a),e?s.createElement("title",{id:t},e):null,s.createElement("path",{fillRule:"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm13.36-1.814a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z",clipRule:"evenodd"}))}const w=s.forwardRef(u);function D({type:e="notice",title:t,children:a,className:s=""}){const g=l("border rounded-md p-2","success"===e?"bg-green-100 border-green-200":"","notice"===e?"bg-yellow-100 border-yellow-200":"","error"===e?"bg-red-100 border-red-200":"",s);return(0,r.jsxs)("div",{className:g,children:[(0,r.jsx)("div",{className:"text-md text-black font-semibold",children:t}),a&&(0,r.jsx)("div",{className:"text-sm text-black",children:a})]})}function m({children:e}){return(0,r.jsx)("div",{className:"w-full mt-2 bg-gray-50 rounded-lg p-5 help-content border border-gray-200 space-y-4",children:(0,r.jsx)("div",{className:"text-sm text-gray-600",children:e})})}function T({field:e,name:t,label:a,value:g=!1,callback:i,onChange:l,required:M=!1,children:c}){const[I,n]=(0,s.useState)(g);return(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsxs)("label",{className:"inline-flex items-center cursor-pointer",children:[(0,r.jsx)("input",{name:t,type:"checkbox",checked:g,onChange:e=>{n(e.target.checked),l?l(e):i&&i(e)},required:M,className:"sr-only peer"}),(0,r.jsx)("div",{className:"relative w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 rounded-full peer dark:bg-gray-200 peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-primary"}),(0,r.jsx)("span",{className:"ms-3 mr-2 text-sm",children:a})]}),c,e?.stateDescriptions?.enabled&&I&&(0,r.jsx)(m,{children:e?.stateDescriptions?.enabled}),e?.stateDescriptions?.disabled&&!I&&(0,r.jsx)(m,{children:e?.stateDescriptions?.disabled})]})}function L({name:e,label:t,value:a="",placeholder:s="",required:g=!1,callback:i,onChange:l,children:M}){const c=l||i;return(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-sm font-medium text-gray-700",children:t}),(0,r.jsx)("input",{name:e,type:"password",value:a,onChange:c,onPaste:c,placeholder:s,required:g,className:"mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-primary focus:border-primary sm:text-sm"}),M]})}function p({name:e,label:t,value:a="",placeholder:s="",required:g=!1,callback:i,onChange:l,readOnly:M=!1,children:c}){const I=l||i;return(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-sm font-medium text-gray-700",children:t}),(0,r.jsx)("input",{name:e,type:"text",value:a,onChange:I,onPaste:I,placeholder:s,required:g,readOnly:M,className:"mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-primary focus:border-primary sm:text-sm"}),c]})}function y({name:e,label:t,value:a="",placeholder:g="",required:i=!1,callback:l,onChange:M,children:c,...I}){const[n,C]=(0,s.useState)(null!=a?a:0),o=M||l;return(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)("label",{className:"block text-sm font-medium text-gray-700",children:t}),(0,r.jsx)("input",{name:e,type:"number",value:n,onChange:o,onPaste:e=>{const t=e.clipboardData.getData("text"),a=parseInt(t,10);!isNaN(a)&&a>=0&&(C(a),o)&&o({target:{value:a}})},placeholder:g,required:i,min:"0",className:"hidden"}),(0,r.jsxs)("div",{className:"inline-flex items-center gap-4",children:[(0,r.jsx)("button",{onClick:()=>{n>0&&(C(n-1),o)&&o({target:{value:n-1}})},className:"px-2 py-1 font-mono text-lg text-gray-700 border border-gray-200 rounded-md hover:bg-gray-100",children:"-"}),(0,r.jsx)("span",{className:"text-lg font-mono font-semibold",children:n}),(0,r.jsx)("button",{onClick:()=>{C(n+1),o&&o({target:{value:n+1}})},className:"px-2 py-1 font-mono text-lg text-gray-700 border border-gray-200 rounded-md hover:bg-gray-100",children:"+"})]})]}),c]})}function h({title:e,titleId:t,...a},g){return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:g,"aria-labelledby":t},a),e?s.createElement("title",{id:t},e):null,s.createElement("path",{fillRule:"evenodd",d:"M16.28 11.47a.75.75 0 0 1 0 1.06l-7.5 7.5a.75.75 0 0 1-1.06-1.06L14.69 12 7.72 5.03a.75.75 0 0 1 1.06-1.06l7.5 7.5Z",clipRule:"evenodd"}))}const z=s.forwardRef(h);function b({title:e,titleId:t,...a},g){return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:g,"aria-labelledby":t},a),e?s.createElement("title",{id:t},e):null,s.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z"}))}const v=s.forwardRef(b);function k({includeOptional:e=!1,provider:t,fields:a,callback:g}){const[i,l]=(0,s.useState)({}),[M,c]=(0,s.useState)({}),[I,C]=(0,s.useState)(null),o=e=>{if("paste"===e.type){const a={target:{name:e.target.name,value:e.clipboardData.getData("text"),type:e.target.type}},s={...i};return"checkbox"===a.target.type?s[a.target.name]=a.target.checked:s[a.target.name]=a.target.value,l(s),g(t,s),C(a.target.name),void setTimeout((()=>{C(null)}),100)}if(I===e.target.name)return;const a={...i};"checkbox"===e.target.type?a[e.target.name]=e.target.checked:a[e.target.name]=e.target.value,l(a),g(t,a)};(0,s.useEffect)((()=>{a.forEach((e=>{e?.value&&l({...i,[e.name]:e.value})}))}),[]);const N=e=>{switch(e.type){case"boolean":return(0,r.jsx)(T,{name:e.name,label:e.label,value:i?.[e.name],callback:o,required:e.required,field:e,children:(0,r.jsx)(r.Fragment,{children:e?.description&&(0,r.jsx)(m,{children:e?.description})})});case"password":return(0,r.jsx)(L,{name:e.name,label:e.label,value:i?.[e.name],placeholder:e.placeholder,callback:o,required:e.required,field:e,children:(0,r.jsx)(r.Fragment,{children:e?.description&&(0,r.jsx)(m,{children:e?.description})})});case"number":return(0,r.jsx)(y,{name:e.name,label:e.label,value:i?.[e.name],placeholder:e.placeholder,callback:o,required:e.required,field:e,children:(0,r.jsx)(r.Fragment,{children:e?.description&&(0,r.jsx)(m,{children:e?.description})})});default:return(0,r.jsx)(p,{name:e.name,label:e.label,value:i?.[e.name],placeholder:e.placeholder,callback:o,required:e.required,field:e,children:(0,r.jsx)(r.Fragment,{children:e?.description&&(0,r.jsx)(m,{children:e?.description})})})}};return(0,r.jsx)(r.Fragment,{children:a.flatMap(((t,a)=>t?.optional&&!e?[]:(0,r.jsxs)("div",{children:[N(t),t?.help&&(0,r.jsxs)("div",{className:"mt-2",children:[(0,r.jsxs)("button",{type:"button",className:"text-sm text-custom hover:text-custom-dark flex items-center cursor-pointer help-toggle",onClick:()=>{return e=t.name,void c((t=>({...t,[e]:!t[e]})));var e},children:[(0,r.jsx)(v,{className:"w-5 h-5 mr-1"}),(0,r.jsx)("span",{children:t?.help?.label||(0,n.__)("Help","fraktvalg")})]}),M[t.name]&&(0,r.jsxs)(m,{children:[(0,r.jsx)("p",{children:t?.help?.text}),t?.help?.url?.link&&(0,r.jsx)("div",{className:"mt-3",children:(0,r.jsxs)("a",{href:t?.help?.url?.link,target:"_blank",className:"inline-flex items-center text-custom hover:text-custom-dark font-medium",children:[(0,r.jsx)("span",{children:t?.help?.url?.label}),(0,r.jsx)(z,{className:"ml-1 w-4 h-4"})]})})]})]})]},a)))})}function f({disabled:e=!1,plain:t=!1,className:a,children:s,onClick:g=()=>{},...i}){const M=l("block w-full bg-primary text-white rounded-md p-3","hover:bg-primary/90 hover:text-white","active:bg-primary/90 active:text-white","focus:bg-primary/90 focus:text-white","disabled:bg-black/80",a);return i.href?(0,r.jsx)("a",{className:M,...i,children:s}):(0,r.jsx)("button",{onClick:g,disabled:e,className:M,...i,children:s})}function O({title:e,titleId:t,...a},g){return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:g,"aria-labelledby":t},a),e?s.createElement("title",{id:t},e):null,s.createElement("path",{fillRule:"evenodd",d:"M11.47 7.72a.75.75 0 0 1 1.06 0l7.5 7.5a.75.75 0 1 1-1.06 1.06L12 9.31l-6.97 6.97a.75.75 0 0 1-1.06-1.06l7.5-7.5Z",clipRule:"evenodd"}))}const E=s.forwardRef(O);function S({title:e,titleId:t,...a},g){return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:g,"aria-labelledby":t},a),e?s.createElement("title",{id:t},e):null,s.createElement("path",{fillRule:"evenodd",d:"M12.53 16.28a.75.75 0 0 1-1.06 0l-7.5-7.5a.75.75 0 0 1 1.06-1.06L12 14.69l6.97-6.97a.75.75 0 1 1 1.06 1.06l-7.5 7.5Z",clipRule:"evenodd"}))}const Y=s.forwardRef(S);function U({title:e,titleId:t,...a},g){return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:g,"aria-labelledby":t},a),e?s.createElement("title",{id:t},e):null,s.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 18.75a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m3 0h6m-9 0H3.375a1.125 1.125 0 0 1-1.125-1.125V14.25m17.25 4.5a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m3 0h1.125c.621 0 1.129-.504 1.09-1.124a17.902 17.902 0 0 0-3.213-9.193 2.056 2.056 0 0 0-1.58-.86H14.25M16.5 18.75h-2.25m0-11.177v-.958c0-.568-.422-1.048-.987-1.106a48.554 48.554 0 0 0-10.026 0 1.106 1.106 0 0 0-.987 1.106v7.635m12-6.677v6.677m0 4.5v-4.5m0 0h-12"}))}const Q=s.forwardRef(U);function G({logo:e=null,...t}){const{alt:a=""}=t;return e?e.startsWith("http")||e.startsWith("data:image")?(0,r.jsx)("img",{src:e,alt:a,...t}):(e.startsWith("https")||(e=encodeURIComponent(e)),(0,r.jsx)("img",{src:"data:image/svg+xml;utf8,"+e,alt:a,...t})):(0,r.jsx)(Q,{...t})}function B({supplierId:e,supplier:t,title:a,content:g,isConnected:i=!1,visible:M=!0,classNames:c="",innerClassNames:I=""}){const[C,o]=(0,s.useState)(M),N=l("border bg-white rounded-md",c),d=l("border-t-2 border-gray-100 p-4",I);return(0,r.jsxs)("div",{className:N,children:[(0,r.jsx)("button",{className:"flex w-full p-4 items-center justify-between",onClick:()=>o(!C),children:(0,r.jsx)("h2",{className:"text-lg font-bold w-full",children:(0,r.jsxs)("div",{className:"flex item-center justify-between focus:outline-none w-full",children:[(0,r.jsxs)("div",{className:"flex",children:[t?.logo&&(0,r.jsx)("div",{children:(0,r.jsx)(G,{logo:t?.logo,alt:a,className:"w-8 h-8 mr-2"})}),(0,r.jsx)("div",{className:"inline-flex items-center gap-4",children:(0,r.jsx)("span",{children:a})})]}),(0,r.jsxs)("div",{className:"flex items-center gap-4",children:[i&&(0,r.jsx)("div",{className:"px-3 py-1 text-sm rounded-full bg-green-100 text-green-600",children:(0,n.__)("Connected","fraktvalg")}),!i&&(0,r.jsx)("div",{className:"px-3 py-1 text-sm rounded-full bg-red-100 text-red-600",children:(0,n.__)("Disconnected","fraktvalg")}),C?(0,r.jsx)(E,{className:"h-6 w-6 text-gray-600"}):(0,r.jsx)(Y,{className:"h-6 w-6 text-gray-600"})]})]})})}),C&&(0,r.jsx)("div",{className:d,children:g})]})}function Z({title:e,titleId:t,...a},g){return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:g,"aria-labelledby":t},a),e?s.createElement("title",{id:t},e):null,s.createElement("path",{d:"M6.5 2.25a.75.75 0 0 0-1.5 0v3a.75.75 0 0 0 1.5 0V4.5h6.75a.75.75 0 0 0 0-1.5H6.5v-.75ZM11 6.5a.75.75 0 0 0-1.5 0v3a.75.75 0 0 0 1.5 0v-.75h2.25a.75.75 0 0 0 0-1.5H11V6.5ZM5.75 10a.75.75 0 0 1 .75.75v.75h6.75a.75.75 0 0 1 0 1.5H6.5v.75a.75.75 0 0 1-1.5 0v-3a.75.75 0 0 1 .75-.75ZM2.75 7.25H8.5v1.5H2.75a.75.75 0 0 1 0-1.5ZM4 3H2.75a.75.75 0 0 0 0 1.5H4V3ZM2.75 11.5H4V13H2.75a.75.75 0 0 1 0-1.5Z"}))}const X=s.forwardRef(Z);function F({setProvider:e,setTab:t}){const[a,g]=(0,s.useState)({}),[i,l]=(0,s.useState)({}),[M,c]=(0,s.useState)(null),[o,d]=(0,s.useState)(""),[j,u]=(0,s.useState)(!0),[m,T]=(0,s.useState)(null),[L,p]=(0,s.useState)(10),[y,h]=(0,s.useState)("percent"),[z,b]=(0,s.useState)(""),[v,O]=(0,s.useState)(""),[E,S]=(0,s.useState)({}),Y=(e,t)=>{S({...E,[e]:t})},U=()=>{c(null),d(""),I()({path:"fraktvalg/v1/settings/providers/mine",method:"GET"}).then((e=>{l(e?.mine?.data||{}),g(e?.available?.data||{}),e?.available?.data&&Object.keys(e?.available?.data).map((t=>{S({...E,[t]:e?.available?.data[t]?.fields})})),e?.mine?.data&&e?.mine?.data?.forEach((e=>{if(a[e?.id]){let t={...a};delete t[e?.id],g(t)}S({...E,[e?.id]:e?.fields})}))})).catch((e=>{d("fetching providers"),c(e?.message)})).then((()=>{u(!1)}))},Q=()=>{I()({path:"fraktvalg/v1/settings/providers/priority",method:"GET"}).then((e=>{T(e?.data?.providerId),p(e?.data?.discount),h(e?.data?.discountType)}))},Z=e=>{b(e),c(null),d(""),I()({path:"fraktvalg/v1/settings/providers/store",method:"POST",data:{providerId:e,fieldValues:E[e]}}).then((e=>{b(""),U()})).catch((e=>{b(""),d("saving provider settings"),c(e?.message||(0,n.__)("Failed to save provider settings","fraktvalg"))}))};return(0,s.useEffect)((()=>{U(),Q()}),[]),j?(0,r.jsx)(C,{title:"My providers",children:(0,r.jsxs)("div",{className:"flex flex-col justify-center items-center h-64",children:[(0,r.jsx)(N,{className:"h-8 w-8 animate-spin text-primary"}),(0,r.jsx)("div",{className:"text-lg",children:(0,n.__)("Fetching available providers...","fraktvalg")})]})}):(0,r.jsx)(C,{title:"My providers",children:(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-3",children:[M&&(0,r.jsx)(D,{type:"error",title:`Error ${o||"fetching providers"}`,children:M}),Object.keys(i).map((a=>(0,r.jsx)(B,{isConnected:!0,title:i[a]?.name,supplierId:a,supplier:i[a],content:(0,r.jsxs)("div",{className:"relative grid grid-cols-1 gap-4",children:[z===a&&(0,r.jsxs)("div",{className:"absolute w-full h-full top-0 left-0 bg-white flex flex-col justify-center items-center gap-2",children:[(0,r.jsx)(N,{className:"h-6 w-6 animate-spin text-primary"}),(0,r.jsx)("span",{children:(0,n.__)("Saving provider settings, one moment please...","fraktvalg")})]}),(0,r.jsx)(k,{includeOptional:!0,provider:a,fields:i[a]?.fields||[],callback:Y}),(0,r.jsxs)("div",{className:"flex flex-col md:flex-row justify-between gap-2",children:[(0,r.jsx)("div",{className:"flex flex-col md:flex-row justify-start gap-2",children:(0,r.jsxs)(f,{type:"button",className:"md:inline-block md:w-fit",onClick:()=>{e(i[a]),t("shipping-methods")},children:[(0,r.jsx)(X,{className:"w-4 h-4 mr-2 inline-block"}),(0,n.__)("Configure shipping methods","fraktvalg")]})}),(0,r.jsxs)("div",{className:"flex flex-col md:flex-row justify-end gap-2",children:[(0,r.jsx)(f,{className:"md:inline-block md:w-fit bg-red-600 hover:bg-red-500 active:bg-red-500 focus:bg-red-500",type:"button",onClick:()=>{return e=i[a],void(confirm((0,n.__)("Are you sure you want to disconnect this provider?","fraktvalg"))&&(b(e?.id),c(null),d(""),I()({path:"fraktvalg/v1/settings/providers/disconnect",method:"POST",data:{provider:e?.id}}).then((e=>{b(""),U()})).catch((e=>{b(""),d("disconnecting provider"),c(e?.message||(0,n.__)("Failed to disconnect provider","fraktvalg"))}))));var e},children:(0,n.__)("Disconnect provider","fraktvalg")}),(0,r.jsx)(f,{className:"md:inline-block md:w-fit",type:"button",onClick:()=>Z(i[a]),children:(0,n.__)("Update provider settings","fraktvalg")})]})]})]})},a))),(0,r.jsx)("hr",{className:"border-gray-200 my-2"}),Object.keys(a).map((e=>(0,r.jsx)(B,{title:a[e]?.name,supplierId:e,supplier:a[e],visible:!1,content:(0,r.jsxs)("div",{className:"relative grid grid-cols-1 gap-4",children:[z===e&&(0,r.jsxs)("div",{className:"absolute w-full h-full top-0 left-0 bg-white flex flex-col justify-center items-center gap-2",children:[(0,r.jsx)(N,{className:"h-6 w-6 animate-spin text-primary"}),(0,r.jsx)("span",{children:(0,n.__)("Connecting provider, one moment please...","fraktvalg")})]}),(0,r.jsx)(k,{provider:e,fields:a[e]?.fields||[],callback:Y}),(0,r.jsx)(f,{type:"button",onClick:()=>Z(e),children:(0,n.__)("Connect to this provider","fraktvalg")})]})},e))),(0,r.jsx)("div",{className:"bg-white rounded-lg shadow p-6 border-2 border-dashed border-gray-300",children:(0,r.jsxs)("div",{className:"flex flex-col items-center text-center",children:[(0,r.jsx)("div",{className:"w-16 h-16 bg-primary/10 rounded-full flex items-center justify-center mb-4",children:(0,r.jsx)(A,{className:"w-8 h-8 text-primary"})}),(0,r.jsx)("h2",{className:"text-xl font-semibold text-gray-900 mb-2",children:(0,n.__)("More providers are coming 🥳","fraktvalg")}),(0,r.jsx)("p",{className:"text-gray-600 mb-4",children:(0,n.__)("We are continually working to integrate more shipping providers to you you more opportunities.","fraktvalg")}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)("p",{className:"text-sm text-gray-600",children:(0,n.__)("Is there someone you would like to see here?","fraktvalg")}),(0,r.jsxs)("a",{href:"mailto:[email protected]",className:"inline-flex items-center text-custom hover:text-custom-dark font-medium",children:[(0,r.jsx)("span",{children:(0,n.__)("Send us an e-mail","fraktvalg")}),(0,r.jsx)(x,{className:"ml-1 w-4 h-4"})]})]})]})}),Object.keys(i).length>1&&(0,r.jsxs)("div",{className:"bg-white rounded-lg shadow p-6",children:[(0,r.jsx)("h2",{className:"text-xl font-semibold text-gray-900 mb-2",children:(0,n.__)("Preferred provider","fraktvalg")}),(0,r.jsx)("p",{className:"text-gray-600 mb-4",children:(0,n.__)("Choose which provider should always be the cheapest option in your store. This gives you the opportunity to prioritize one provider by making their prices more competitive.","fraktvalg")}),(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-4",children:[v&&(0,r.jsx)(D,{type:"success",children:v}),(0,r.jsx)("p",{children:(0,n.__)("Price reduction for your preferred provider","fraktvalg")}),(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)("input",{value:L,onChange:e=>p(e.target.value),type:"number",min:"0",step:"1",placeholder:"10",className:"w-16 border border-gray-300 rounded-md p-2"}),(0,r.jsxs)("select",{className:"border border-gray-300 rounded-md p-2",value:y,onChange:e=>h(e.target.value),children:[(0,r.jsx)("option",{value:"percent",children:"%"}),(0,r.jsx)("option",{value:"fixed",children:"NOK"})]}),(0,r.jsx)("label",{htmlFor:"something",children:(0,n.__)("Determine how much cheaper your preferred provider should be compared to the cheapest competitor.","fraktvalg")})]}),(0,r.jsx)("div",{className:"flex gap-4",children:Object.keys(i).map((e=>(0,r.jsxs)("label",{className:"relative cursor-pointer grow flex flex-col gap-2 items-center border-2 border-gray-300 rounded-lg p-4 hover:border-primary peer-checked:border-primary transition-all duration-200",onClick:t=>{t.preventDefault(),T(m===i[e]?.id?null:i[e]?.id)},children:[(0,r.jsx)("input",{type:"radio",name:"preferred_provider",value:e,className:"sr-only peer",checked:m===i[e]?.id}),i[e]?.logo&&(0,r.jsx)(G,{logo:i[e]?.logo,className:"w-8 h-8"}),(0,r.jsx)("span",{className:"text-lg font-medium text-gray-900",children:i[e]?.name}),(0,r.jsx)("div",{className:"absolute top-2 right-2 hidden peer-checked:block",children:(0,r.jsx)(w,{className:"w-6 h-6 text-primary"})}),(0,r.jsx)("p",{className:"text-sm text-gray-5400 text-center",children:i[e]?.description}),(0,r.jsx)("p",{className:"text-xs text-primary font-medium peer-checked:block hidden",children:(0,n.__)("Currently chosen as your preferred provider","fraktvalg")})]},e)))}),(0,r.jsx)(f,{type:"button",onClick:()=>{c(null),d(""),O(""),I()({path:"fraktvalg/v1/settings/providers/priority/store",method:"POST",data:{priorityProvider:{providerId:m,discount:L,discountType:y}}}).then((e=>{Q(),O((0,n.__)("Preferred provider settings saved successfully","fraktvalg")),setTimeout((()=>{O("")}),5e3)})).catch((e=>{d("saving priority provider settings"),c(e?.message||(0,n.__)("Failed to save priority provider settings","fraktvalg"))}))},children:(0,n.__)("Save preferred provider preferences","fraktvalg")})]})]})]})})}function R({title:e,children:t,open:a=!1}){const[g,i]=(0,s.useState)(a||!1);return(0,r.jsxs)("div",{className:"border bg-white rounded-md",children:[(0,r.jsxs)("button",{className:"w-full flex p-4 justify-between",onClick:()=>i(!g),children:[(0,r.jsx)("h2",{className:"text-lg text-left font-bold w-full",children:e}),(0,r.jsx)("div",{className:"relative inline-block",children:g?(0,r.jsx)(E,{className:"h-6 w-6 text-primary"}):(0,r.jsx)(Y,{className:"h-6 w-6 text-primary"})})]}),g&&(0,r.jsx)("div",{className:"p-4",children:t})]})}function P({}){const[e,t]=(0,s.useState)(null),[a,g]=(0,s.useState)({freight:{addedCost:0,addedCostType:"fixed",custom:{name:(0,n.__)("Shipping & handling","fraktvalg"),price:100,type:"fixed"}},useProduction:!0,names:[]}),[i,l]=(0,s.useState)(!0),M=e=>{switch(e.target.name){case"freight[addedCost]":g({...a,freight:{...a.freight,addedCost:e.target.value}});break;case"freight[addedCostType]":g({...a,freight:{...a.freight,addedCostType:e.target.value}});break;case"freight[custom][name]":g({...a,freight:{...a.freight,custom:{...a.freight.custom,name:e.target.value}}});break;case"freight[custom][price]":g({...a,freight:{...a.freight,custom:{...a.freight.custom,price:e.target.value}}});break;case"freight[custom][type]":g({...a,freight:{...a.freight,custom:{...a.freight.custom,type:e.target.value}}});break;case"useProduction":g({...a,useProduction:e.target.checked});break;default:g({...a,[e.target.name]:e.target.value})}};return(0,s.useEffect)((()=>{t(null),l(!0),I()({path:"/fraktvalg/v1/settings/optional-settings",method:"GET"}).then((e=>{g(e?.data||a),l(!1)})).catch((e=>{t({type:"error",title:(0,n.__)("Error fetching optional settings","fraktvalg"),message:e?.message}),l(!1)}))}),[]),i?(0,r.jsx)(C,{title:"My providers",children:(0,r.jsxs)("div",{className:"flex flex-col justify-center items-center h-64",children:[(0,r.jsx)(N,{className:"h-8 w-8 animate-spin text-primary"}),(0,r.jsx)("div",{className:"text-lg",children:"Fetching optional settings..."})]})}):(0,r.jsx)(C,{title:"Optional settings",children:(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-3",children:[(0,r.jsxs)(R,{title:(0,n.__)("Backup shipping option","fraktvalg"),open:!0,children:[(0,r.jsx)("p",{children:(0,n.__)("If Fraktvalg should ever become unavailable, or no shiopping options are returned, returns this shipping alternative by default.","fraktvalg")}),(0,r.jsxs)("div",{className:"mt-2 grid grid-cols-1 gap-4",children:[(0,r.jsx)(p,{label:(0,n.__)("Shipping option name","fraktvalg"),name:"freight[custom][name]",value:a.freight.custom.name,callback:M}),(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)("input",{name:"freight[custom][price]",value:a.freight.custom.price,onChange:M,type:"number",min:"0",step:"1",placeholder:"25",className:"w-16 border border-gray-300 rounded-md p-2"}),(0,r.jsxs)("select",{name:"freight[custom][type]",className:"border border-gray-300 rounded-md p-2",value:a.freight.custom.type,onChange:M,children:[(0,r.jsx)("option",{value:"percent",children:"%"}),(0,r.jsx)("option",{value:"fixed",children:"NOK"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"something",children:(0,n.__)("Backup shipping cost","fraktvalg")}),(0,r.jsx)("p",{className:"text-xs italic",children:(0,n.__)("The backup shipping cost can be set to either a fixed value, or a percentage of the order total.","fraktvalg")})]})]})]})]}),(0,r.jsxs)(R,{title:(0,n.__)("Shipping cost adjustments","fraktvalg"),open:!0,children:[(0,n.__)("Safeguard your shipping costs with these optional alternatives.","fraktvalg"),(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)("input",{name:"freight[addedCost]",value:a.freight.addedCost,onChange:M,type:"number",min:"0",step:"1",placeholder:"10",className:"w-16 border border-gray-300 rounded-md p-2"}),(0,r.jsxs)("select",{name:"freight[addedCostType]",className:"border border-gray-300 rounded-md p-2",value:a.freight.addedCostType,onChange:M,children:[(0,r.jsx)("option",{value:"percent",children:"%"}),(0,r.jsx)("option",{value:"fixed",children:"NOK"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"something",children:(0,n.__)("Add an optional surcharge to all shipping options","fraktvalg")}),(0,r.jsx)("p",{className:"text-xs italic",children:(0,n.__)("Additional shipping surcharges are meant to cover administrative- and handling costs, and is automatically added to all shipping alternatives.","fraktvalg")})]})]})]}),(0,r.jsxs)(R,{title:(0,n.__)("Shop environment","fraktvalg"),open:!0,children:[(0,r.jsx)("p",{children:(0,n.__)("Some times, you wish to use the shipping providers test environments, for example on a staging site. Doing so will not create legitimate shipping requests, and prevents yo ufrom incurring charges while testing your store setup.","fraktvalg")}),(0,r.jsx)("div",{className:"mt-2 grid grid-cols-1 gap-4",children:(0,r.jsx)(T,{label:(0,n.__)("Use production environments","fraktvalg"),name:"useProduction",value:a.useProduction,callback:M})})]}),e&&(0,r.jsx)(D,{type:e.type,title:e.title,children:e.message}),(0,r.jsx)(f,{type:"button",onClick:()=>{t(null),I()({path:"/fraktvalg/v1/settings/optional-settings",method:"POST",data:{options:a}}).then((e=>{t({type:e?.type,title:e?.title,message:e?.message})})).catch((e=>{t({type:"error",title:(0,n.__)("Error saving optional settings","fraktvalg"),message:e?.message})}))},children:(0,n.__)("Save optional settings","fraktvalg")})]})})}function _({title:e,titleId:t,...a},g){return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:g,"aria-labelledby":t},a),e?s.createElement("title",{id:t},e):null,s.createElement("path",{fillRule:"evenodd",d:"M19.449 8.448 16.388 11a4.52 4.52 0 0 1 0 2.002l3.061 2.55a8.275 8.275 0 0 0 0-7.103ZM15.552 19.45 13 16.388a4.52 4.52 0 0 1-2.002 0l-2.55 3.061a8.275 8.275 0 0 0 7.103 0ZM4.55 15.552 7.612 13a4.52 4.52 0 0 1 0-2.002L4.551 8.45a8.275 8.275 0 0 0 0 7.103ZM8.448 4.55 11 7.612a4.52 4.52 0 0 1 2.002 0l2.55-3.061a8.275 8.275 0 0 0-7.103 0Zm8.657-.86a9.776 9.776 0 0 1 1.79 1.415 9.776 9.776 0 0 1 1.414 1.788 9.764 9.764 0 0 1 0 10.211 9.777 9.777 0 0 1-1.415 1.79 9.777 9.777 0 0 1-1.788 1.414 9.764 9.764 0 0 1-10.212 0 9.776 9.776 0 0 1-1.788-1.415 9.776 9.776 0 0 1-1.415-1.788 9.764 9.764 0 0 1 0-10.212 9.774 9.774 0 0 1 1.415-1.788A9.774 9.774 0 0 1 6.894 3.69a9.764 9.764 0 0 1 10.211 0ZM14.121 9.88a2.985 2.985 0 0 0-1.11-.704 3.015 3.015 0 0 0-2.022 0 2.985 2.985 0 0 0-1.11.704c-.326.325-.56.705-.704 1.11a3.015 3.015 0 0 0 0 2.022c.144.405.378.785.704 1.11.325.326.705.56 1.11.704.652.233 1.37.233 2.022 0a2.985 2.985 0 0 0 1.11-.704c.326-.325.56-.705.704-1.11a3.016 3.016 0 0 0 0-2.022 2.985 2.985 0 0 0-.704-1.11Z",clipRule:"evenodd"}))}const W=s.forwardRef(_);function J({title:e,titleId:t,...a},g){return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:g,"aria-labelledby":t},a),e?s.createElement("title",{id:t},e):null,s.createElement("path",{d:"M4.913 2.658c2.075-.27 4.19-.408 6.337-.408 2.147 0 4.262.139 6.337.408 1.922.25 3.291 1.861 3.405 3.727a4.403 4.403 0 0 0-1.032-.211 50.89 50.89 0 0 0-8.42 0c-2.358.196-4.04 2.19-4.04 4.434v4.286a4.47 4.47 0 0 0 2.433 3.984L7.28 21.53A.75.75 0 0 1 6 21v-4.03a48.527 48.527 0 0 1-1.087-.128C2.905 16.58 1.5 14.833 1.5 12.862V6.638c0-1.97 1.405-3.718 3.413-3.979Z"}),s.createElement("path",{d:"M15.75 7.5c-1.376 0-2.739.057-4.086.169C10.124 7.797 9 9.103 9 10.609v4.285c0 1.507 1.128 2.814 2.67 2.94 1.243.102 2.5.157 3.768.165l2.782 2.781a.75.75 0 0 0 1.28-.53v-2.39l.33-.026c1.542-.125 2.67-1.433 2.67-2.94v-4.286c0-1.505-1.125-2.811-2.664-2.94A49.392 49.392 0 0 0 15.75 7.5Z"}))}const K=s.forwardRef(J);function H({}){return(0,r.jsx)(C,{title:"Support",children:(0,r.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-5",children:[(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-3 bg-tertiary/10 p-5 rounded-md",children:[(0,r.jsx)("h2",{className:"text-lg font-semibold",children:(0,n.__)("Fraktvalg support","fraktvalg")}),(0,r.jsx)("p",{className:"text-sm",children:(0,n.__)("For help with the Fraktvalg API, your subscription, or other questions, please contact us directly.","fraktvalg")}),(0,r.jsx)("div",{className:"justify-end align-bottom",children:(0,r.jsxs)(f,{href:"mailto:[email protected]",className:"inline-flex items-center gap-3",children:[(0,r.jsx)(W,{className:"w-4 h-4 inline-block"}),(0,n.__)("Contact Fraktvalg support","fraktvalg")]})})]}),(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-3 bg-tertiary/10 p-5 rounded-md",children:[(0,r.jsx)("h2",{className:"text-lg font-semibold",children:(0,n.__)("Community support","fraktvalg")}),(0,r.jsx)("p",{className:"text-sm",children:(0,n.__)("If you are having trouble with WordPress, or using the plugin, please use the community support forums at WordPress.org.","fraktvalg")}),(0,r.jsx)("div",{className:"justify-end align-bottom",children:(0,r.jsxs)(f,{href:"https://wordpress.org/support/plugin/fraktvalg/",className:"inline-flex items-center gap-3",children:[(0,r.jsx)(K,{className:"w-4 h-4 inline-block"}),(0,n.__)("Visit the WordPress.org support forums","fraktvalg"),(0,r.jsx)("span",{className:"sr-only",children:(0,n.__)("External link, opens in a new tab","frakt")})]})})]})]})})}function V({title:e,titleId:t,...a},g){return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:g,"aria-labelledby":t},a),e?s.createElement("title",{id:t},e):null,s.createElement("path",{fillRule:"evenodd",d:"M11.03 3.97a.75.75 0 0 1 0 1.06l-6.22 6.22H21a.75.75 0 0 1 0 1.5H4.81l6.22 6.22a.75.75 0 1 1-1.06 1.06l-7.5-7.5a.75.75 0 0 1 0-1.06l7.5-7.5a.75.75 0 0 1 1.06 0Z",clipRule:"evenodd"}))}const q=s.forwardRef(V);function $({supplier:e,setTab:t}){const[a,g]=(0,s.useState)(!1),[i,l]=(0,s.useState)(!1),[M,c]=(0,s.useState)([]),[o,d]=(0,s.useState)(null);return(0,s.useEffect)((()=>{let e;return o&&(e=setTimeout((()=>{d(null)}),3e3)),()=>clearTimeout(e)}),[o]),(0,s.useEffect)((()=>{g(!0),I()({path:"fraktvalg/v1/settings/providers/methods",method:"POST",data:{shipper_id:e.id}}).then((e=>{c(e),g(!1)}))}),[]),(0,r.jsxs)(C,{title:(0,r.jsxs)("div",{className:"flex justify-between",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[e?.logo&&(0,r.jsx)("div",{children:(0,r.jsx)(G,{logo:e?.logo,alt:e?.name,className:"w-8 h-8 mr-2"})}),(0,r.jsx)("div",{className:"inline-flex items-center gap-4",children:(0,r.jsx)("span",{children:e?.name})})]}),(0,r.jsx)("div",{children:(0,r.jsxs)(f,{type:"button",onClick:()=>t("providers"),className:"text-sm",children:[(0,r.jsx)(q,{className:"h-4 w-4 mr-2 inline-block"}),(0,n.__)("Back to providers","fraktvalg")]})})]}),children:["success"===o&&(0,r.jsx)(D,{type:"success",className:"mb-4",children:(0,n.__)("Shipping methods saved successfully!","fraktvalg")}),"error"===o&&(0,r.jsx)(D,{type:"error",className:"mb-4",children:(0,n.__)("Failed to save shipping methods. Please try again.","fraktvalg")}),a&&(0,r.jsxs)("div",{className:"flex flex-col justify-center items-center h-64",children:[(0,r.jsx)(N,{className:"h-8 w-8 animate-spin text-primary"}),(0,r.jsx)("div",{className:"text-lg",children:(0,n.__)("Loading shipping methods...","fraktvalg")})]}),!a&&0===M.length&&(0,r.jsx)(D,{children:(0,n.__)("This provider does not offer any shipping methods that can be modified.","fraktvalg")}),!a&&M.length>0&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("table",{className:"min-w-full divide-y divide-gray-200",children:[(0,r.jsx)("thead",{className:"bg-gray-50",children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:(0,n.__)("Active","fraktvalg")}),(0,r.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:(0,n.__)("Name","fraktvalg")}),(0,r.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:(0,n.__)("Price","fraktvalg")})]})}),(0,r.jsx)("tbody",{className:"bg-white divide-y divide-gray-200",children:M.map(((e,t)=>(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:(0,r.jsxs)("label",{children:[(0,r.jsx)("input",{type:"checkbox",checked:e.active,onChange:()=>{const e=[...M];e[t].active=!e[t].active,c(e)}}),(0,r.jsx)("span",{className:"ml",children:(0,n.__)("Active","fraktvalg")})]})}),(0,r.jsx)("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900",children:(0,r.jsxs)("div",{className:"flex flex-col",children:[(0,r.jsx)("small",{className:"text-gray-500",children:e.originalName}),(0,r.jsx)("input",{type:"text",value:e.name,onChange:e=>{const a=[...M];a[t].name=e.target.value,c(a)},className:"border border-gray-300 rounded-md p-2"})]})}),(0,r.jsx)("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-right text-gray-500",children:(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,r.jsxs)("label",{children:[(0,r.jsx)("span",{className:"mr-2",children:(0,n.__)("Set a fixed price for this shipping method","fraktvalg")}),(0,r.jsx)("input",{type:"checkbox",checked:e.canEditPrice,onChange:()=>{const e=[...M];e[t].canEditPrice=!e[t].canEditPrice,c(e)}})]}),(0,r.jsx)("input",{type:"number",value:e.price||"",disabled:!e.canEditPrice,onChange:e=>{const a=[...M];a[t].price=e.target.value,c(a)},className:"border border-gray-300 rounded-md p-2"})]})})]},e.id)))})]}),(0,r.jsx)("div",{className:"flex flex-col md:flex-row justify-end gap-2 mt-4",children:(0,r.jsx)(f,{type:"button",onClick:()=>(l(!0),d(null),void I()({path:"fraktvalg/v1/settings/providers/methods/store",method:"POST",data:{shipper_id:e.id,fields:M}}).then((e=>{d("success"),l(!1)})).catch((e=>{d("error"),l(!1)}))),className:"md:inline-block md:w-fit",disabled:i,children:i?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(N,{className:"h-4 w-4 mr-2 inline-block animate-spin"}),(0,n.__)("Saving...","fraktvalg")]}):(0,n.__)("Save shipping overrides","fraktvalg")})})]})]})}function ee({}){const[e,t]=(0,s.useState)("providers"),[a,g]=(0,s.useState)(null);return(0,r.jsxs)("div",{className:"min-h-full",children:[(0,r.jsx)(M,{tabs:[{label:"My providers",value:"providers"},{label:"Optional settings",value:"settings"},{label:"Support",value:"support"}],activeTab:e,setTab:t}),"providers"===e&&(0,r.jsx)(F,{setProvider:g,setTab:t}),"shipping-methods"===e&&(0,r.jsx)($,{supplier:a,setTab:t}),"settings"===e&&(0,r.jsx)(P,{}),"support"===e&&(0,r.jsx)(H,{})]})}const te=document.getElementById("fraktvalg-settings");te&&(0,g.H)(te).render((0,r.jsx)(ee,{}))})(); -
fraktvalg/trunk/build/label-rtl.css
r3267354 r3271607 493 493 display: none; 494 494 } 495 .container { 496 width: 100%; 497 } 498 @media (min-width: 640px) { 499 500 .container { 501 max-width: 640px; 502 } 503 } 504 @media (min-width: 768px) { 505 506 .container { 507 max-width: 768px; 508 } 509 } 510 @media (min-width: 1024px) { 511 512 .container { 513 max-width: 1024px; 514 } 515 } 516 @media (min-width: 1280px) { 517 518 .container { 519 max-width: 1280px; 520 } 521 } 522 @media (min-width: 1536px) { 523 524 .container { 525 max-width: 1536px; 526 } 527 } 495 528 .sr-only { 496 529 position: absolute; … … 572 605 margin-right: 0.5rem; 573 606 } 607 .ml-3 { 608 margin-right: 0.75rem; 609 } 574 610 .mr-1 { 575 611 margin-left: 0.25rem; … … 632 668 height: 2.5rem; 633 669 } 670 .h-12 { 671 height: 3rem; 672 } 634 673 .h-16 { 635 674 height: 4rem; … … 671 710 width: 2.75rem; 672 711 } 712 .w-12 { 713 width: 3rem; 714 } 673 715 .w-16 { 674 716 width: 4rem; … … 716 758 flex: 1 1 0%; 717 759 } 760 .flex-shrink-0 { 761 flex-shrink: 0; 762 } 718 763 .shrink-0 { 719 764 flex-shrink: 0; 765 } 766 .flex-grow { 767 flex-grow: 1; 720 768 } 721 769 .grow { … … 816 864 white-space: nowrap; 817 865 } 866 .text-nowrap { 867 text-wrap: nowrap; 868 } 818 869 .rounded { 819 870 border-radius: 0.25rem; … … 840 891 border-bottom-width: 2px; 841 892 } 893 .border-l-4 { 894 border-right-width: 4px; 895 } 842 896 .border-t-2 { 843 897 border-top-width: 2px; 898 } 899 .border-solid { 900 border-style: solid; 844 901 } 845 902 .border-dashed { … … 884 941 border-color: rgb(254 240 138 / var(--tw-border-opacity)); 885 942 } 943 .border-yellow-400 { 944 --tw-border-opacity: 1; 945 border-color: rgb(250 204 21 / var(--tw-border-opacity)); 946 } 886 947 .bg-gray-200 { 887 948 --tw-bg-opacity: 1; … … 932 993 --tw-bg-opacity: 1; 933 994 background-color: rgb(254 249 195 / var(--tw-bg-opacity)); 995 } 996 .bg-yellow-50 { 997 --tw-bg-opacity: 1; 998 background-color: rgb(254 252 232 / var(--tw-bg-opacity)); 934 999 } 935 1000 .bg-opacity-50 { … … 1114 1179 --tw-text-opacity: 1; 1115 1180 color: rgb(255 255 255 / var(--tw-text-opacity)); 1181 } 1182 .text-yellow-400 { 1183 --tw-text-opacity: 1; 1184 color: rgb(250 204 21 / var(--tw-text-opacity)); 1185 } 1186 .text-yellow-700 { 1187 --tw-text-opacity: 1; 1188 color: rgb(161 98 7 / var(--tw-text-opacity)); 1116 1189 } 1117 1190 .opacity-50 { -
fraktvalg/trunk/build/label.asset.php
r3267354 r3271607 1 <?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-i18n'), 'version' => ' 3a54e5c16bf4c3e5e68c');1 <?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-i18n'), 'version' => '912110abc81535a6873b'); -
fraktvalg/trunk/build/label.css
r3267354 r3271607 493 493 display: none; 494 494 } 495 .container { 496 width: 100%; 497 } 498 @media (min-width: 640px) { 499 500 .container { 501 max-width: 640px; 502 } 503 } 504 @media (min-width: 768px) { 505 506 .container { 507 max-width: 768px; 508 } 509 } 510 @media (min-width: 1024px) { 511 512 .container { 513 max-width: 1024px; 514 } 515 } 516 @media (min-width: 1280px) { 517 518 .container { 519 max-width: 1280px; 520 } 521 } 522 @media (min-width: 1536px) { 523 524 .container { 525 max-width: 1536px; 526 } 527 } 495 528 .sr-only { 496 529 position: absolute; … … 572 605 margin-left: 0.5rem; 573 606 } 607 .ml-3 { 608 margin-left: 0.75rem; 609 } 574 610 .mr-1 { 575 611 margin-right: 0.25rem; … … 632 668 height: 2.5rem; 633 669 } 670 .h-12 { 671 height: 3rem; 672 } 634 673 .h-16 { 635 674 height: 4rem; … … 671 710 width: 2.75rem; 672 711 } 712 .w-12 { 713 width: 3rem; 714 } 673 715 .w-16 { 674 716 width: 4rem; … … 716 758 flex: 1 1 0%; 717 759 } 760 .flex-shrink-0 { 761 flex-shrink: 0; 762 } 718 763 .shrink-0 { 719 764 flex-shrink: 0; 765 } 766 .flex-grow { 767 flex-grow: 1; 720 768 } 721 769 .grow { … … 816 864 white-space: nowrap; 817 865 } 866 .text-nowrap { 867 text-wrap: nowrap; 868 } 818 869 .rounded { 819 870 border-radius: 0.25rem; … … 840 891 border-bottom-width: 2px; 841 892 } 893 .border-l-4 { 894 border-left-width: 4px; 895 } 842 896 .border-t-2 { 843 897 border-top-width: 2px; 898 } 899 .border-solid { 900 border-style: solid; 844 901 } 845 902 .border-dashed { … … 884 941 border-color: rgb(254 240 138 / var(--tw-border-opacity)); 885 942 } 943 .border-yellow-400 { 944 --tw-border-opacity: 1; 945 border-color: rgb(250 204 21 / var(--tw-border-opacity)); 946 } 886 947 .bg-gray-200 { 887 948 --tw-bg-opacity: 1; … … 932 993 --tw-bg-opacity: 1; 933 994 background-color: rgb(254 249 195 / var(--tw-bg-opacity)); 995 } 996 .bg-yellow-50 { 997 --tw-bg-opacity: 1; 998 background-color: rgb(254 252 232 / var(--tw-bg-opacity)); 934 999 } 935 1000 .bg-opacity-50 { … … 1114 1179 --tw-text-opacity: 1; 1115 1180 color: rgb(255 255 255 / var(--tw-text-opacity)); 1181 } 1182 .text-yellow-400 { 1183 --tw-text-opacity: 1; 1184 color: rgb(250 204 21 / var(--tw-text-opacity)); 1185 } 1186 .text-yellow-700 { 1187 --tw-text-opacity: 1; 1188 color: rgb(161 98 7 / var(--tw-text-opacity)); 1116 1189 } 1117 1190 .opacity-50 { -
fraktvalg/trunk/build/onboarding-rtl.css
r3267354 r3271607 493 493 display: none; 494 494 } 495 .container { 496 width: 100%; 497 } 498 @media (min-width: 640px) { 499 500 .container { 501 max-width: 640px; 502 } 503 } 504 @media (min-width: 768px) { 505 506 .container { 507 max-width: 768px; 508 } 509 } 510 @media (min-width: 1024px) { 511 512 .container { 513 max-width: 1024px; 514 } 515 } 516 @media (min-width: 1280px) { 517 518 .container { 519 max-width: 1280px; 520 } 521 } 522 @media (min-width: 1536px) { 523 524 .container { 525 max-width: 1536px; 526 } 527 } 495 528 .sr-only { 496 529 position: absolute; … … 572 605 margin-right: 0.5rem; 573 606 } 607 .ml-3 { 608 margin-right: 0.75rem; 609 } 574 610 .mr-1 { 575 611 margin-left: 0.25rem; … … 632 668 height: 2.5rem; 633 669 } 670 .h-12 { 671 height: 3rem; 672 } 634 673 .h-16 { 635 674 height: 4rem; … … 671 710 width: 2.75rem; 672 711 } 712 .w-12 { 713 width: 3rem; 714 } 673 715 .w-16 { 674 716 width: 4rem; … … 716 758 flex: 1 1 0%; 717 759 } 760 .flex-shrink-0 { 761 flex-shrink: 0; 762 } 718 763 .shrink-0 { 719 764 flex-shrink: 0; 765 } 766 .flex-grow { 767 flex-grow: 1; 720 768 } 721 769 .grow { … … 816 864 white-space: nowrap; 817 865 } 866 .text-nowrap { 867 text-wrap: nowrap; 868 } 818 869 .rounded { 819 870 border-radius: 0.25rem; … … 840 891 border-bottom-width: 2px; 841 892 } 893 .border-l-4 { 894 border-right-width: 4px; 895 } 842 896 .border-t-2 { 843 897 border-top-width: 2px; 898 } 899 .border-solid { 900 border-style: solid; 844 901 } 845 902 .border-dashed { … … 884 941 border-color: rgb(254 240 138 / var(--tw-border-opacity)); 885 942 } 943 .border-yellow-400 { 944 --tw-border-opacity: 1; 945 border-color: rgb(250 204 21 / var(--tw-border-opacity)); 946 } 886 947 .bg-gray-200 { 887 948 --tw-bg-opacity: 1; … … 932 993 --tw-bg-opacity: 1; 933 994 background-color: rgb(254 249 195 / var(--tw-bg-opacity)); 995 } 996 .bg-yellow-50 { 997 --tw-bg-opacity: 1; 998 background-color: rgb(254 252 232 / var(--tw-bg-opacity)); 934 999 } 935 1000 .bg-opacity-50 { … … 1114 1179 --tw-text-opacity: 1; 1115 1180 color: rgb(255 255 255 / var(--tw-text-opacity)); 1181 } 1182 .text-yellow-400 { 1183 --tw-text-opacity: 1; 1184 color: rgb(250 204 21 / var(--tw-text-opacity)); 1185 } 1186 .text-yellow-700 { 1187 --tw-text-opacity: 1; 1188 color: rgb(161 98 7 / var(--tw-text-opacity)); 1116 1189 } 1117 1190 .opacity-50 { -
fraktvalg/trunk/build/onboarding.asset.php
r3267354 r3271607 1 <?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-i18n'), 'version' => ' a4c185f7fadc98631e4b');1 <?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-i18n'), 'version' => 'b123a41e3ff33f749456'); -
fraktvalg/trunk/build/onboarding.css
r3267354 r3271607 493 493 display: none; 494 494 } 495 .container { 496 width: 100%; 497 } 498 @media (min-width: 640px) { 499 500 .container { 501 max-width: 640px; 502 } 503 } 504 @media (min-width: 768px) { 505 506 .container { 507 max-width: 768px; 508 } 509 } 510 @media (min-width: 1024px) { 511 512 .container { 513 max-width: 1024px; 514 } 515 } 516 @media (min-width: 1280px) { 517 518 .container { 519 max-width: 1280px; 520 } 521 } 522 @media (min-width: 1536px) { 523 524 .container { 525 max-width: 1536px; 526 } 527 } 495 528 .sr-only { 496 529 position: absolute; … … 572 605 margin-left: 0.5rem; 573 606 } 607 .ml-3 { 608 margin-left: 0.75rem; 609 } 574 610 .mr-1 { 575 611 margin-right: 0.25rem; … … 632 668 height: 2.5rem; 633 669 } 670 .h-12 { 671 height: 3rem; 672 } 634 673 .h-16 { 635 674 height: 4rem; … … 671 710 width: 2.75rem; 672 711 } 712 .w-12 { 713 width: 3rem; 714 } 673 715 .w-16 { 674 716 width: 4rem; … … 716 758 flex: 1 1 0%; 717 759 } 760 .flex-shrink-0 { 761 flex-shrink: 0; 762 } 718 763 .shrink-0 { 719 764 flex-shrink: 0; 765 } 766 .flex-grow { 767 flex-grow: 1; 720 768 } 721 769 .grow { … … 816 864 white-space: nowrap; 817 865 } 866 .text-nowrap { 867 text-wrap: nowrap; 868 } 818 869 .rounded { 819 870 border-radius: 0.25rem; … … 840 891 border-bottom-width: 2px; 841 892 } 893 .border-l-4 { 894 border-left-width: 4px; 895 } 842 896 .border-t-2 { 843 897 border-top-width: 2px; 898 } 899 .border-solid { 900 border-style: solid; 844 901 } 845 902 .border-dashed { … … 884 941 border-color: rgb(254 240 138 / var(--tw-border-opacity)); 885 942 } 943 .border-yellow-400 { 944 --tw-border-opacity: 1; 945 border-color: rgb(250 204 21 / var(--tw-border-opacity)); 946 } 886 947 .bg-gray-200 { 887 948 --tw-bg-opacity: 1; … … 932 993 --tw-bg-opacity: 1; 933 994 background-color: rgb(254 249 195 / var(--tw-bg-opacity)); 995 } 996 .bg-yellow-50 { 997 --tw-bg-opacity: 1; 998 background-color: rgb(254 252 232 / var(--tw-bg-opacity)); 934 999 } 935 1000 .bg-opacity-50 { … … 1114 1179 --tw-text-opacity: 1; 1115 1180 color: rgb(255 255 255 / var(--tw-text-opacity)); 1181 } 1182 .text-yellow-400 { 1183 --tw-text-opacity: 1; 1184 color: rgb(250 204 21 / var(--tw-text-opacity)); 1185 } 1186 .text-yellow-700 { 1187 --tw-text-opacity: 1; 1188 color: rgb(161 98 7 / var(--tw-text-opacity)); 1116 1189 } 1117 1190 .opacity-50 { -
fraktvalg/trunk/build/onboarding.js
r3267354 r3271607 1 (()=>{"use strict";var e={338:(e,t, g)=>{var a=g(795);t.H=a.createRoot,a.hydrateRoot},20:(e,t,g)=>{var a=g(609),s=Symbol.for("react.element"),M=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,l=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,I={key:!0,ref:!0,__self:!0,__source:!0};function r(e,t,g){var a,M={},r=null,c=null;for(a in void 0!==g&&(r=""+g),void 0!==t.key&&(r=""+t.key),void 0!==t.ref&&(c=t.ref),t)i.call(t,a)&&!I.hasOwnProperty(a)&&(M[a]=t[a]);if(e&&e.defaultProps)for(a in t=e.defaultProps)void 0===M[a]&&(M[a]=t[a]);return{$$typeof:s,type:e,key:r,ref:c,props:M,_owner:l.current}}t.Fragment=M,t.jsx=r,t.jsxs=r},848:(e,t,g)=>{e.exports=g(20)},609:e=>{e.exports=window.React},795:e=>{e.exports=window.ReactDOM}},t={};function g(a){var s=t[a];if(void 0!==s)return s.exports;var M=t[a]={exports:{}};return e[a](M,M.exports,g),M.exports}g.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return g.d(t,{a:t}),t},g.d=(e,t)=>{for(var a in t)g.o(t,a)&&!g.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},g.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var a=g(609),s=g(338);const M=window.wp.apiFetch;var i=g.n(M);const l=window.wp.i18n;function I(e){var t,g,a="";if("string"==typeof e||"number"==typeof e)a+=e;else if("object"==typeof e)if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(g=I(e[t]))&&(a&&(a+=" "),a+=g)}else for(g in e)e[g]&&(a&&(a+=" "),a+=g);return a}function r(){for(var e,t,g=0,a="",s=arguments.length;g<s;g++)(e=arguments[g])&&(t=I(e))&&(a&&(a+=" "),a+=t);return a}var c=g(848);function C({disabled:e=!1,plain:t=!1,className:g,children:a,onClick:s=()=>{},...M}){const i=r("block w-full bg-primary text-white rounded-md p-3","hover:bg-primary/90 hover:text-white","active:bg-primary/90 active:text-white","focus:bg-primary/90 focus:text-white","disabled:bg-black/80",g);return M.href?(0,c.jsx)("a",{className:i,...M,children:a}):(0,c.jsx)("button",{onClick:s,disabled:e,className:i,...M,children:a})}function N({type:e="notice",title:t,children:g,className:a=""}){const s=r("border rounded-md p-2","success"===e?"bg-green-100 border-green-200":"","notice"===e?"bg-yellow-100 border-yellow-200":"","error"===e?"bg-red-100 border-red-200":"",a);return(0,c.jsxs)("div",{className:s,children:[(0,c.jsx)("div",{className:"text-md text-black font-semibold",children:t}),g&&(0,c.jsx)("div",{className:"text-sm text-black",children:g})]})}function n({title:e,titleId:t,...g},s){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},g),e?a.createElement("title",{id:t},e):null,a.createElement("path",{fillRule:"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm8.706-1.442c1.146-.573 2.437.463 2.126 1.706l-.709 2.836.042-.02a.75.75 0 0 1 .67 1.34l-.04.022c-1.147.573-2.438-.463-2.127-1.706l.71-2.836-.042.02a.75.75 0 1 1-.671-1.34l.041-.022ZM12 9a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z",clipRule:"evenodd"}))}const A=a.forwardRef(n);function o({title:e,titleId:t,...g},s){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},g),e?a.createElement("title",{id:t},e):null,a.createElement("path",{fillRule:"evenodd",d:"M16.28 11.47a.75.75 0 0 1 0 1.06l-7.5 7.5a.75.75 0 0 1-1.06-1.06L14.69 12 7.72 5.03a.75.75 0 0 1 1.06-1.06l7.5 7.5Z",clipRule:"evenodd"}))}const j=a.forwardRef(o);function d({nextStep:e}){const[t,g]=(0,a.useState)(""),[s,M]=(0,a.useState)(null);return(0,c.jsxs)("div",{className:"space-y-8",children:[(0,c.jsxs)("div",{children:[(0,c.jsx)("h2",{className:"text-xl font-semibold text-gray-900",children:(0,l.__)("Activate license","fraktvalg")}),(0,c.jsx)("p",{className:"mt-1 text-sm text-gray-500",children:(0,l.__)("Your license will be activated for the domain: ","fraktvalg")+window.location.host})]}),(0,c.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-5 gap-6",children:[(0,c.jsx)("div",{className:"md:col-span-3 bg-white rounded-lg border border-gra-200 p-6",children:(0,c.jsxs)("div",{className:"space-y-4",children:[(0,c.jsxs)("div",{children:[(0,c.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",htmlFor:"license",children:(0,l.__)("License key","fraktvalg")}),(0,c.jsx)("input",{type:"text",name:"license",id:"license",value:t,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-primary",placeholder:(0,l.__)("Enter your license key","fraktvalg"),onChange:e=>g(e.target.value)})]}),s&&(0,c.jsx)(N,{type:s.type,title:s.title,className:"my-2",children:s.message}),(0,c.jsx)("div",{className:"w-full mt-1",children:(0,c.jsx)(C,{onClick:()=>{M(null),i()({path:"/fraktvalg/v1/settings/api-key",method:"POST",data:{api_key:t}}).then((t=>{e()})).catch((e=>{M({type:"error",title:(0,l.__)("An error was encountered when validating your API key","fraktvalg"),message:e?.message})}))},disabled:!t.length>0,children:(0,l.__)("Activate license","fraktvalg")})})]})}),(0,c.jsxs)("div",{className:"md:col-span-2 bg-tertiary/10 rounded-lg p-6 flex flex-col",children:[(0,c.jsxs)("div",{className:"flex items-center space-x-2 text-custom mb-4",children:[(0,c.jsx)(A,{className:"w-5 h-5"}),(0,c.jsx)("span",{className:"font-medium",children:(0,l.__)("Need a license?","fraktvalg")})]}),(0,c.jsx)("p",{className:"text-sm text-gray-600 mb-4",children:(0,l.__)("To use Fraktvalg you first need to register an account. It only takes a moment to get started.","fraktvalg")}),(0,c.jsxs)("a",{href:"https://Fraktvalg.no?utm_source=plugin&utm_medium=register&utm_campaign=onboarding",className:"mt-auto group inline-flex items-center text-cuistom hover:text-custom-dark font-medium",children:[(0,c.jsx)("span",{children:(0,l.__)("Register at fraktvalg.no","fraktvalg")}),(0,c.jsx)(j,{className:"ml-1 w-4 h-4"})]})]})]})]})}function u({children:e}){return(0,c.jsx)("div",{className:"w-full mt-2 bg-gray-50 rounded-lg p-5 help-content border border-gray-200 space-y-4",children:(0,c.jsx)("div",{className:"text-sm text-gray-600",children:e})})}function x({field:e,name:t,label:g,value:s=!1,callback:M,required:i=!1,children:l}){const[I,r]=(0,a.useState)(s);return(0,c.jsxs)("div",{className:"relative",children:[(0,c.jsxs)("label",{className:"inline-flex items-center cursor-pointer",children:[(0,c.jsx)("input",{name:t,type:"checkbox",checked:s,onChange:e=>{r(e.target.checked),M(e)},required:i,className:"sr-only peer"}),(0,c.jsx)("div",{className:"relative w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 rounded-full peer dark:bg-gray-200 peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-primary"}),(0,c.jsx)("span",{className:"ms-3 mr-2 text-sm",children:g})]}),l,e?.stateDescriptions?.enabled&&I&&(0,c.jsx)(u,{children:e?.stateDescriptions?.enabled}),e?.stateDescriptions?.disabled&&!I&&(0,c.jsx)(u,{children:e?.stateDescriptions?.disabled})]})}function D({name:e,label:t,value:g="",placeholder:a="",required:s=!1,callback:M,children:i}){return(0,c.jsxs)("div",{children:[(0,c.jsx)("label",{className:"block text-sm font-medium text-gray-700",children:t}),(0,c.jsx)("input",{name:e,type:"password",value:g,onChange:M,onPaste:M,placeholder:a,required:s,className:"mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-primary focus:border-primary sm:text-sm"}),i]})}function w({name:e,label:t,value:g="",placeholder:a="",required:s=!1,callback:M,children:i}){return(0,c.jsxs)("div",{children:[(0,c.jsx)("label",{className:"block text-sm font-medium text-gray-700",children:t}),(0,c.jsx)("input",{name:e,type:"text",value:g,onChange:M,onPaste:M,placeholder:a,required:s,className:"mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-primary focus:border-primary sm:text-sm"}),i]})}function T({name:e,label:t,value:g="",placeholder:s="",required:M=!1,callback:i,children:l,...I}){const[r,C]=(0,a.useState)(null!=g?g:0);return(0,c.jsxs)("div",{children:[(0,c.jsxs)("div",{className:"flex items-center justify-between",children:[(0,c.jsx)("label",{className:"block text-sm font-medium text-gray-700",children:t}),(0,c.jsx)("input",{name:e,type:"number",value:r,onChange:i,onPaste:e=>{const t=e.clipboardData.getData("text"),g=parseInt(t,10);!isNaN(g)&&g>=0&&C(g),i(e)},placeholder:s,required:M,min:"0",className:"hidden"}),(0,c.jsxs)("div",{className:"inline-flex items-center gap-4",children:[(0,c.jsx)("button",{onClick:()=>{r>0&&C(r-1)},className:"px-2 py-1 font-mono text-lg text-gray-700 border border-gray-200 rounded-md hover:bg-gray-100",children:"-"}),(0,c.jsx)("span",{className:"text-lg font-mono font-semibold",children:r}),(0,c.jsx)("button",{onClick:()=>{C(r+1)},className:"px-2 py-1 font-mono text-lg text-gray-700 border border-gray-200 rounded-md hover:bg-gray-100",children:"+"})]})]}),l]})}function L({title:e,titleId:t,...g},s){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},g),e?a.createElement("title",{id:t},e):null,a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z"}))}const m=a.forwardRef(L);function y({includeOptional:e=!1,provider:t,fields:g,callback:s}){const[M,i]=(0,a.useState)({}),[I,r]=(0,a.useState)({}),[C,N]=(0,a.useState)(null),n=e=>{if("paste"===e.type){const g={target:{name:e.target.name,value:e.clipboardData.getData("text"),type:e.target.type}},a={...M};return"checkbox"===g.target.type?a[g.target.name]=g.target.checked:a[g.target.name]=g.target.value,i(a),s(t,a),N(g.target.name),void setTimeout((()=>{N(null)}),100)}if(C===e.target.name)return;const g={...M};"checkbox"===e.target.type?g[e.target.name]=e.target.checked:g[e.target.name]=e.target.value,i(g),s(t,g)};(0,a.useEffect)((()=>{g.forEach((e=>{e?.value&&i({...M,[e.name]:e.value})}))}),[]);const A=e=>{switch(e.type){case"boolean":return(0,c.jsx)(x,{name:e.name,label:e.label,value:M?.[e.name],callback:n,required:e.required,field:e,children:(0,c.jsx)(c.Fragment,{children:e?.description&&(0,c.jsx)(u,{children:e?.description})})});case"password":return(0,c.jsx)(D,{name:e.name,label:e.label,value:M?.[e.name],placeholder:e.placeholder,callback:n,required:e.required,field:e,children:(0,c.jsx)(c.Fragment,{children:e?.description&&(0,c.jsx)(u,{children:e?.description})})});case"number":return(0,c.jsx)(T,{name:e.name,label:e.label,value:M?.[e.name],placeholder:e.placeholder,callback:n,required:e.required,field:e,children:(0,c.jsx)(c.Fragment,{children:e?.description&&(0,c.jsx)(u,{children:e?.description})})});default:return(0,c.jsx)(w,{name:e.name,label:e.label,value:M?.[e.name],placeholder:e.placeholder,callback:n,required:e.required,field:e,children:(0,c.jsx)(c.Fragment,{children:e?.description&&(0,c.jsx)(u,{children:e?.description})})})}};return(0,c.jsx)(c.Fragment,{children:g.flatMap(((t,g)=>t?.optional&&!e?[]:(0,c.jsxs)("div",{children:[A(t),t?.help&&(0,c.jsxs)("div",{className:"mt-2",children:[(0,c.jsxs)("button",{type:"button",className:"text-sm text-custom hover:text-custom-dark flex items-center cursor-pointer help-toggle",onClick:()=>{return e=t.name,void r((t=>({...t,[e]:!t[e]})));var e},children:[(0,c.jsx)(m,{className:"w-5 h-5 mr-1"}),(0,c.jsx)("span",{children:t?.help?.label||(0,l.__)("Help","fraktvalg")})]}),I[t.name]&&(0,c.jsxs)(u,{children:[(0,c.jsx)("p",{children:t?.help?.text}),t?.help?.url?.link&&(0,c.jsx)("div",{className:"mt-3",children:(0,c.jsxs)("a",{href:t?.help?.url?.link,target:"_blank",className:"inline-flex items-center text-custom hover:text-custom-dark font-medium",children:[(0,c.jsx)("span",{children:t?.help?.url?.label}),(0,c.jsx)(j,{className:"ml-1 w-4 h-4"})]})})]})]})]},g)))})}function z({title:e,titleId:t,...g},s){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},g),e?a.createElement("title",{id:t},e):null,a.createElement("path",{fillRule:"evenodd",d:"M11.47 7.72a.75.75 0 0 1 1.06 0l7.5 7.5a.75.75 0 1 1-1.06 1.06L12 9.31l-6.97 6.97a.75.75 0 0 1-1.06-1.06l7.5-7.5Z",clipRule:"evenodd"}))}const p=a.forwardRef(z);function h({title:e,titleId:t,...g},s){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},g),e?a.createElement("title",{id:t},e):null,a.createElement("path",{fillRule:"evenodd",d:"M12.53 16.28a.75.75 0 0 1-1.06 0l-7.5-7.5a.75.75 0 0 1 1.06-1.06L12 14.69l6.97-6.97a.75.75 0 1 1 1.06 1.06l-7.5 7.5Z",clipRule:"evenodd"}))}const k=a.forwardRef(h);function b({title:e,titleId:t,...g},s){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},g),e?a.createElement("title",{id:t},e):null,a.createElement("path",{fillRule:"evenodd",d:"M4.755 10.059a7.5 7.5 0 0 1 12.548-3.364l1.903 1.903h-3.183a.75.75 0 1 0 0 1.5h4.992a.75.75 0 0 0 .75-.75V4.356a.75.75 0 0 0-1.5 0v3.18l-1.9-1.9A9 9 0 0 0 3.306 9.67a.75.75 0 1 0 1.45.388Zm15.408 3.352a.75.75 0 0 0-.919.53 7.5 7.5 0 0 1-12.548 3.364l-1.902-1.903h3.183a.75.75 0 0 0 0-1.5H2.984a.75.75 0 0 0-.75.75v4.992a.75.75 0 0 0 1.5 0v-3.18l1.9 1.9a9 9 0 0 0 15.059-4.035.75.75 0 0 0-.53-.918Z",clipRule:"evenodd"}))}const O=a.forwardRef(b);function E({title:e,titleId:t,...g},s){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},g),e?a.createElement("title",{id:t},e):null,a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 18.75a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m3 0h6m-9 0H3.375a1.125 1.125 0 0 1-1.125-1.125V14.25m17.25 4.5a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m3 0h1.125c.621 0 1.129-.504 1.09-1.124a17.902 17.902 0 0 0-3.213-9.193 2.056 2.056 0 0 0-1.58-.86H14.25M16.5 18.75h-2.25m0-11.177v-.958c0-.568-.422-1.048-.987-1.106a48.554 48.554 0 0 0-10.026 0 1.106 1.106 0 0 0-.987 1.106v7.635m12-6.677v6.677m0 4.5v-4.5m0 0h-12"}))}const S=a.forwardRef(E);function Y({logo:e=null,...t}){const{alt:g=""}=t;return e?e.startsWith("http")||e.startsWith("data:image")?(0,c.jsx)("img",{src:e,alt:g,...t}):(e.startsWith("https")||(e=encodeURIComponent(e)),(0,c.jsx)("img",{src:"data:image/svg+xml;utf8,"+e,alt:g,...t})):(0,c.jsx)(S,{...t})}function v({supplierId:e,supplier:t,title:g,content:s,isConnected:M=!1,visible:i=!0,classNames:I="",innerClassNames:C=""}){const[N,n]=(0,a.useState)(i),A=r("border bg-white rounded-md",I),o=r("border-t-2 border-gray-100 p-4",C);return(0,c.jsxs)("div",{className:A,children:[(0,c.jsx)("button",{className:"flex w-full p-4 items-center justify-between",onClick:()=>n(!N),children:(0,c.jsx)("h2",{className:"text-lg font-bold w-full",children:(0,c.jsxs)("div",{className:"flex item-center justify-between focus:outline-none w-full",children:[(0,c.jsxs)("div",{className:"flex",children:[t?.logo&&(0,c.jsx)("div",{children:(0,c.jsx)(Y,{logo:t?.logo,alt:g,className:"w-8 h-8 mr-2"})}),(0,c.jsx)("div",{className:"inline-flex items-center gap-4",children:(0,c.jsx)("span",{children:g})})]}),(0,c.jsxs)("div",{className:"flex items-center gap-4",children:[M&&(0,c.jsx)("div",{className:"px-3 py-1 text-sm rounded-full bg-green-100 text-green-600",children:(0,l.__)("Connected","fraktvalg")}),!M&&(0,c.jsx)("div",{className:"px-3 py-1 text-sm rounded-full bg-red-100 text-red-600",children:(0,l.__)("Disconnected","fraktvalg")}),N?(0,c.jsx)(p,{className:"h-6 w-6 text-gray-600"}):(0,c.jsx)(k,{className:"h-6 w-6 text-gray-600"})]})]})})}),N&&(0,c.jsx)("div",{className:o,children:s})]})}function f({nextStep:e}){const[t,g]=(0,a.useState)({}),[s,M]=(0,a.useState)(null),[I,r]=(0,a.useState)(!0),[N,n]=(0,a.useState)(null),[A,o]=(0,a.useState)(""),[j,d]=(0,a.useState)([]),[u,x]=(0,a.useState)({}),D=(e,t)=>{x({...u,[e]:t})};return(0,a.useEffect)((()=>{M(null),i()({path:"fraktvalg/v1/settings/providers",method:"GET"}).then((e=>{g(e?.data||{})})).catch((e=>{M(e?.message)})).then((()=>{r(!1)}))}),[]),I?(0,c.jsxs)("div",{className:"flex flex-col justify-center items-center h-64",children:[(0,c.jsx)(O,{className:"h-8 w-8 animate-spin text-primary"}),(0,c.jsx)("div",{className:"text-lg",children:"Fetching available providers..."})]}):(0,c.jsxs)("div",{className:"grid grid-cols-1 gap-3",children:[(0,c.jsx)("span",{className:"text-xl",children:"Nesten ferdig, vi trenger å vite hvilke fraktleverandører du har en avtale med."}),s&&(0,c.jsxs)("div",{className:"bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded relative mb-4",role:"alert",children:[(0,c.jsxs)("strong",{className:"font-bold",children:[(0,l.__)("Error:","fraktvalg")," "]}),(0,c.jsx)("span",{className:"block sm:inline",children:s})]}),Object.keys(t).map((e=>(0,c.jsx)(v,{title:t[e]?.name,supplierId:e,supplier:t[e],visible:!1,isConnected:j.includes(e),content:(0,c.jsxs)("div",{className:"relative grid grid-cols-1 gap-4",children:[A===e&&(0,c.jsxs)("div",{className:"absolute w-full h-full top-0 left-0 bg-white flex flex-col justify-center items-center gap-2",children:[(0,c.jsx)(O,{className:"h-6 w-6 animate-spin text-primary"}),(0,c.jsx)("span",{children:(0,l.__)("Connecting provider, one moment please...","fraktvalg")})]}),(0,c.jsx)(y,{provider:e,fields:t[e]?.fields||[],callback:D}),(0,c.jsx)(C,{type:"button",onClick:()=>(e=>{o(e),M(null),i()({path:"fraktvalg/v1/settings/providers/store",method:"POST",data:{providerId:e,fieldValues:u[e]}}).then((t=>{o(""),d([...j,e])})).catch((e=>{console.error(e),M(e?.message||(0,l.__)("Failed to connect to provider","fraktvalg")),o("")}))})(e),children:(0,l.__)("Connect to this provider","fraktvalg")})]})},e))),(0,c.jsx)(C,{type:"button",onClick:e,children:(0,l.__)("Next step","fraktvalg")})]})}function U({title:e,titleId:t,...g},s){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},g),e?a.createElement("title",{id:t},e):null,a.createElement("path",{fillRule:"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm13.36-1.814a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z",clipRule:"evenodd"}))}const Q=a.forwardRef(U);function G({nextStep:e}){return(0,c.jsxs)("div",{className:"flex flex-col justify-center items-center gap-4",children:[(0,c.jsx)("div",{children:(0,c.jsx)(Q,{className:"w-20 h-20 text-primary"})}),(0,c.jsx)("span",{className:"text-2xl text-center",children:(0,l.__)("Fraktvalg is now set up and ready to use.","fraktvalg")}),(0,c.jsx)(C,{onClick:()=>e(),children:(0,l.__)("Finish setup","fraktvalg")})]})}function B({current:e=!1,future:t=!1,past:g=!1,setStep:a=null,label:s=null,step:M}){const i="flex items-center justify-center w-8 h-8 border-2 border-gray-300 bg-white rounded-full shrink-0"+(e?" border-primary text-primary":"")+(g?" border-primary/80 text-primary/90":""),l="flex items-center text-custom space-x-2.5"+(null!==a&&!0===g?" cursor-pointer":"");return(0,c.jsxs)("li",{className:l,onClick:()=>{!0===g&&null!==a&&a(M)},children:[(0,c.jsx)("span",{className:i,children:(0,c.jsx)("span",{className:"font-medium",children:e?(0,c.jsx)("strong",{children:M}):M})}),s&&(0,c.jsx)("span",{children:(0,c.jsx)("div",{className:"font-medium leading-tight",children:e?(0,c.jsx)("strong",{children:s}):s})})]})}function Z({currentStep:e,steps:t,labels:g,setStep:a=null,...s}){return(0,c.jsxs)("div",{className:"mb-10",children:[(0,c.jsxs)("span",{className:"sr-only",children:["Step ",e," of ",t]}),(0,c.jsx)("ol",{className:"items-center w-full space-y-4 sm:flex sm:space-x-8 sm:space-y-0 sm:justify-center max-w-2xl mx-auto",children:[...Array(t)].map(((t,s)=>(0,c.jsx)(B,{current:s+1===e,past:s+1<e,future:s+1>e,setStep:a,step:s+1,label:g[s]},s)))})]})}function X({title:e,children:t,open:g=!1}){const[s,M]=(0,a.useState)(g||!1);return(0,c.jsxs)("div",{className:"border bg-white rounded-md",children:[(0,c.jsxs)("button",{className:"w-full flex p-4 justify-between",onClick:()=>M(!s),children:[(0,c.jsx)("h2",{className:"text-lg text-left font-bold w-full",children:e}),(0,c.jsx)("div",{className:"relative inline-block",children:s?(0,c.jsx)(p,{className:"h-6 w-6 text-primary"}):(0,c.jsx)(k,{className:"h-6 w-6 text-primary"})})]}),s&&(0,c.jsx)("div",{className:"p-4",children:t})]})}function F({nextStep:e}){const[t,g]=(0,a.useState)(null),[s,M]=(0,a.useState)(!1),[I,r]=(0,a.useState)({freight:{addedCost:0,addedCostType:"fixed",custom:{name:(0,l.__)("Shipping & handling","fraktvalg"),price:100,type:"fixed"}},useProduction:!0,names:[]}),n=e=>{switch(e.target.name){case"freight[addedCost]":r({...I,freight:{...I.freight,addedCost:e.target.value}});break;case"freight[addedCostType]":r({...I,freight:{...I.freight,addedCostType:e.target.value}});break;case"freight[custom][name]":r({...I,freight:{...I.freight,custom:{...I.freight.custom,name:e.target.value}}});break;case"freight[custom][price]":r({...I,freight:{...I.freight,custom:{...I.freight.custom,price:e.target.value}}});break;case"freight[custom][type]":r({...I,freight:{...I.freight,custom:{...I.freight.custom,type:e.target.value}}});break;case"useProduction":r({...I,useProduction:e.target.checked});break;default:r({...I,[e.target.name]:e.target.value})}};return(0,c.jsxs)("div",{className:"grid grid-cols-1 gap-3",children:[(0,c.jsx)("span",{className:"text-xl",children:(0,l.__)("Almost there! Are there any optional settings you would like to change?","fraktvalg")}),(0,c.jsx)(X,{title:(0,l.__)("Backup shipping option","fraktvalg"),open:!0,children:(0,c.jsxs)("div",{className:"relative grid grid-cols-1 gap-4",children:[(0,c.jsx)("p",{children:(0,l.__)("If Fraktvalg should ever become unavailable, or no shiopping options are returned, returns this shipping alternative by default.","fraktvalg")}),(0,c.jsxs)("div",{className:"mt-2 grid grid-cols-1 gap-4",children:[(0,c.jsx)(w,{label:(0,l.__)("Shipping option name","fraktvalg"),name:"freight[custom][name]",value:I.freight.custom.name,callback:n}),(0,c.jsxs)("div",{className:"flex items-center gap-3",children:[(0,c.jsx)("input",{name:"freight[custom][price]",value:I.freight.custom.price,onChange:n,type:"number",min:"0",step:"1",placeholder:"25",className:"w-16 border border-gray-300 rounded-md p-2"}),(0,c.jsxs)("select",{name:"freight[custom][type]",className:"border border-gray-300 rounded-md p-2",value:I.freight.custom.type,onChange:n,children:[(0,c.jsx)("option",{value:"percent",children:"%"}),(0,c.jsx)("option",{value:"fixed",children:"NOK"})]}),(0,c.jsxs)("div",{children:[(0,c.jsx)("label",{htmlFor:"something",children:(0,l.__)("Backup shipping cost","fraktvalg")}),(0,c.jsx)("p",{className:"text-xs italic",children:(0,l.__)("The backup shipping cost can be set to either a fixed value, or a percentage of the order total.","fraktvalg")})]})]})]})]})}),(0,c.jsxs)(X,{title:(0,l.__)("Shipping cost adjustments","fraktvalg"),children:[(0,l.__)("Safeguard your shipping costs with these optional alternatives.","fraktvalg"),(0,c.jsxs)("div",{className:"flex items-center gap-3",children:[(0,c.jsx)("input",{name:"freight[addedCost]",value:I.freight.addedCost,onChange:n,type:"number",min:"0",step:"1",placeholder:"10",className:"w-16 border border-gray-300 rounded-md p-2"}),(0,c.jsxs)("select",{name:"freight[addedCostType]",className:"border border-gray-300 rounded-md p-2",value:I.freight.addedCostType,onChange:n,children:[(0,c.jsx)("option",{value:"percent",children:"%"}),(0,c.jsx)("option",{value:"fixed",children:"NOK"})]}),(0,c.jsxs)("div",{children:[(0,c.jsx)("label",{htmlFor:"something",children:(0,l.__)("Add an optional surcharge to all shipping options","fraktvalg")}),(0,c.jsx)("p",{className:"text-xs italic",children:(0,l.__)("Additional shipping surcharges are meant to cover administrative- and handling costs, and is automatically added to all shipping alternatives.","fraktvalg")})]})]})]}),(0,c.jsxs)(X,{title:(0,l.__)("Shop environment","fraktvalg"),open:!1,children:[(0,c.jsx)("p",{children:(0,l.__)("Some times, you wish to use the shipping providers test environments, for example on a staging site. Doing so will not create legitimate shipping requests, and prevents yo ufrom incurring charges while testing your store setup.","fraktvalg")}),(0,c.jsx)("div",{className:"mt-2 grid grid-cols-1 gap-4",children:(0,c.jsx)(x,{label:(0,l.__)("Use production environments","fraktvalg"),name:"useProduction",value:I.useProduction,callback:n})})]}),t&&(0,c.jsx)(N,{type:t.type,title:t.title,children:t.message}),(0,c.jsx)(C,{type:"button",onClick:()=>{g(null),M(!1),i()({path:"/fraktvalg/v1/settings/optional-settings",method:"POST",data:{options:I}}).then((e=>{g({type:e?.type,title:e?.title,message:e?.message}),M(!0)})).catch((e=>{g({type:"error",title:(0,l.__)("Error saving optional settings","fraktvalg"),message:e?.message})}))},children:(0,l.__)("Save optional settings","fraktvalg")}),s&&(0,c.jsx)(C,{type:"button",onClick:e,children:(0,l.__)("Finish setup","fraktvalg")})]})}function R({title:e,titleId:t,...g},s){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},g),e?a.createElement("title",{id:t},e):null,a.createElement("path",{d:"M21.731 2.269a2.625 2.625 0 0 0-3.712 0l-1.157 1.157 3.712 3.712 1.157-1.157a2.625 2.625 0 0 0 0-3.712ZM19.513 8.199l-3.712-3.712-8.4 8.4a5.25 5.25 0 0 0-1.32 2.214l-.8 2.685a.75.75 0 0 0 .933.933l2.685-.8a5.25 5.25 0 0 0 2.214-1.32l8.4-8.4Z"}),a.createElement("path",{d:"M5.25 5.25a3 3 0 0 0-3 3v10.5a3 3 0 0 0 3 3h10.5a3 3 0 0 0 3-3V13.5a.75.75 0 0 0-1.5 0v5.25a1.5 1.5 0 0 1-1.5 1.5H5.25a1.5 1.5 0 0 1-1.5-1.5V8.25a1.5 1.5 0 0 1 1.5-1.5h5.25a.75.75 0 0 0 0-1.5H5.25Z"}))}const _=a.forwardRef(R);function P({nextStep:e}){const[t,g]=(0,a.useState)(!0),[s,M]=(0,a.useState)({}),[I,r]=(0,a.useState)({cart:!1,checkout:!1}),[N,n]=(0,a.useState)({cart:!1,checkout:!1}),[A,o]=(0,a.useState)({cart:!1,checkout:!1});(0,a.useEffect)((()=>{j()}),[]);const j=async()=>{try{const e=await i()({path:"/fraktvalg/v1/onboarding/theme-status",method:"GET"});M(e),g(!1)}catch(e){console.error("Error checking theme status:",e),g(!1)}},d=async(e,t)=>{if("create"===t){n((t=>({...t,[e]:!0})));try{await i()({path:"/fraktvalg/v1/onboarding/create-template",method:"POST",data:{template:e}}),await j(),o((t=>({...t,[e]:!0})))}catch(e){console.error("Error creating template:",e)}finally{n((t=>({...t,[e]:!1})))}}else if("edit"===t){const t=s.urls[e];t&&(window.open(t,"_blank"),r((t=>({...t,[e]:!0}))))}};return t?(0,c.jsxs)("div",{className:"flex flex-col justify-center items-center h-64",children:[(0,c.jsx)(O,{className:"h-8 w-8 animate-spin text-primary"}),(0,c.jsx)("div",{className:"text-lg",children:(0,l.__)("Checking which templates are in use on this site...","fraktvalg")})]}):(0,c.jsxs)("div",{className:"grid grid-cols-1 gap-6 p-6",children:[(0,c.jsxs)("div",{className:"text-center",children:[(0,c.jsx)("h2",{className:"text-xl font-semibold mb-4",children:(0,l.__)("Template Configuration","fraktvalg")}),(0,c.jsx)("p",{className:"text-gray-600 mb-6",children:(()=>{switch((()=>{const{isBlockCartTemplate:e,isBlockCheckoutTemplate:t}=s;return e&&t?"all-blocks":e||t?"mixed":"classic"})()){case"all-blocks":return(0,l.__)("Your theme uses block templates. Choose how you want to add the Fraktvalg block to your templates:","fraktvalg");case"mixed":return(0,l.__)("Your theme uses a mix of block and classic templates. You can configure the block templates below:","fraktvalg");default:return(0,l.__)("Your theme does not use block templates. You can proceed to the next step without configuring any templates.","fraktvalg")}})()})]}),s.urls&&(s.isBlockCartTemplate&&void 0!==s.urls.cart||s.isBlockCheckoutTemplate&&void 0!==s.urls.checkout)&&(0,c.jsxs)("ul",{className:"space-y-4",children:[void 0!==s.urls.cart&&s.isBlockCartTemplate&&(0,c.jsxs)("li",{className:"flex flex-col p-4 bg-white rounded-lg shadow-sm border",children:[(0,c.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,c.jsxs)("div",{className:"flex items-center",children:[(0,c.jsx)("span",{className:"font-medium",children:(0,l.__)("Cart Template","fraktvalg")}),I.cart&&(0,c.jsx)(Q,{className:"h-5 w-5 text-green-500 ml-2"})]})}),(0,c.jsxs)("div",{className:"flex gap-4",children:[(0,c.jsx)("button",{onClick:()=>d("cart","create"),disabled:N.cart||A.cart,className:"flex-1 px-4 py-2 bg-primary text-white rounded hover:bg-primary-dark transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:N.cart?(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(O,{className:"h-4 w-4 animate-spin inline mr-2"}),(0,l.__)("Creating...","fraktvalg")]}):A.cart?(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(Q,{className:"h-4 w-4 inline mr-2"}),(0,l.__)("Block Auto-added","fraktvalg")]}):(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(Q,{className:"h-4 w-4 inline mr-2"}),(0,l.__)("Auto-add Block","fraktvalg")]})}),(0,c.jsxs)("button",{onClick:()=>d("cart","edit"),className:"flex-1 px-4 py-2 bg-white text-primary border border-primary rounded hover:bg-gray-50 transition-colors",children:[(0,c.jsx)(_,{className:"h-4 w-4 inline mr-2"}),(0,l.__)("Customize Manually","fraktvalg")]})]})]}),void 0!==s.urls.checkout&&s.isBlockCheckoutTemplate&&(0,c.jsxs)("li",{className:"flex flex-col p-4 bg-white rounded-lg shadow-sm border",children:[(0,c.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,c.jsxs)("div",{className:"flex items-center",children:[(0,c.jsx)("span",{className:"font-medium",children:(0,l.__)("Checkout Template","fraktvalg")}),I.checkout&&(0,c.jsx)(Q,{className:"h-5 w-5 text-green-500 ml-2"})]})}),(0,c.jsxs)("div",{className:"flex gap-4",children:[(0,c.jsx)("button",{onClick:()=>d("checkout","create"),disabled:N.checkout||A.checkout,className:"flex-1 px-4 py-2 bg-primary text-white rounded hover:bg-primary-dark transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:N.checkout?(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(O,{className:"h-4 w-4 animate-spin inline mr-2"}),(0,l.__)("Creating...","fraktvalg")]}):A.checkout?(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(Q,{className:"h-4 w-4 inline mr-2"}),(0,l.__)("Block Auto-added","fraktvalg")]}):(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(Q,{className:"h-4 w-4 inline mr-2"}),(0,l.__)("Auto-add Block","fraktvalg")]})}),(0,c.jsxs)("button",{onClick:()=>d("checkout","edit"),className:"flex-1 px-4 py-2 bg-white text-primary border border-primary rounded hover:bg-gray-50 transition-colors",children:[(0,c.jsx)(_,{className:"h-4 w-4 inline mr-2"}),(0,l.__)("Customize Manually","fraktvalg")]})]})]})]}),(0,c.jsx)(C,{type:"button",onClick:e,children:(0,l.__)("Next step","fraktvalg")})]})}function J(){const[e,t]=(0,a.useState)(1),g=[(0,l.__)("License","fraktvalg"),(0,l.__)("Providers","fraktvalg"),(0,l.__)("Templates","fraktvalg"),(0,l.__)("Settings","fraktvalg"),(0,l.__)("Finished","fraktvalg")];e>g.length&&i()({path:"/fraktvalg/v1/onboarding/complete",method:"POST"}).then((()=>{window.location.href="index.php"}));const s=()=>{t(e+1)};return(0,c.jsx)("div",{className:"top-0 left-0 w-full",children:(0,c.jsx)("div",{className:"flex justify-center p-8 mt-16",children:(0,c.jsxs)("div",{className:"grid gap-8",children:[(0,c.jsx)("div",{className:"m-auto",children:(0,c.jsx)("img",{src:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjwhLS0gQ3JlYXRlZCB3aXRoIElua3NjYXBlIChodHRwOi8vd3d3Lmlua3NjYXBlLm9yZy8pIC0tPgoKPHN2ZwogICB3aWR0aD0iMzUwIgogICBoZWlnaHQ9Ijk2LjI3NzM1OSIKICAgdmlld0JveD0iMCAwIDkyLjYwNDE1NiAyNS40NzMzODEiCiAgIHZlcnNpb249IjEuMSIKICAgaWQ9InN2ZzEiCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sbnM6c3ZnPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPGRlZnMKICAgICBpZD0iZGVmczEiPgogICAgPGNsaXBQYXRoCiAgICAgICBjbGlwUGF0aFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIKICAgICAgIGlkPSJjbGlwUGF0aDEwMSI+CiAgICAgIDxwYXRoCiAgICAgICAgIGQ9Ik0gMCwwIEggNzY4MCBWIDQzMjAgSCAwIFoiCiAgICAgICAgIHRyYW5zZm9ybT0ibWF0cml4KDAuMjUwMDAwMDEsMCwwLDAuMjUwMDAwMDEsLTI1Mi4zNDE1NiwtNjkuNTExNzIxKSIKICAgICAgICAgY2x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MzYzLC01Mi4xOTM1MDkpIgogICAgICAgY2xpcC1wYXRoPSJ1cmwoI2NsaXBQYXRoMTMxKSIgLz4KICA8L2c+Cjwvc3ZnPgo=",alt:"Fraktvalg logo"})}),(0,c.jsx)(Z,{currentStep:e,steps:g.length,labels:g,setStep:t}),(0,c.jsxs)("div",{className:"max-w-5xl bg-white rounded-lg shadow p-6",children:[1===e&&(0,c.jsx)(d,{nextStep:s}),2===e&&(0,c.jsx)(f,{nextStep:s}),3===e&&(0,c.jsx)(P,{nextStep:s}),4===e&&(0,c.jsx)(F,{nextStep:s}),5===e&&(0,c.jsx)(G,{nextStep:s})]})]})})})}const W=document.getElementById("fraktvalg-onboarding");W&&(0,s.H)(W).render((0,c.jsx)(J,{}))})();1 (()=>{"use strict";var e={338:(e,t,s)=>{var a=s(795);t.H=a.createRoot,a.hydrateRoot},20:(e,t,s)=>{var a=s(609),g=Symbol.for("react.element"),l=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,r=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};function M(e,t,s){var a,l={},M=null,I=null;for(a in void 0!==s&&(M=""+s),void 0!==t.key&&(M=""+t.key),void 0!==t.ref&&(I=t.ref),t)i.call(t,a)&&!c.hasOwnProperty(a)&&(l[a]=t[a]);if(e&&e.defaultProps)for(a in t=e.defaultProps)void 0===l[a]&&(l[a]=t[a]);return{$$typeof:g,type:e,key:M,ref:I,props:l,_owner:r.current}}t.Fragment=l,t.jsx=M,t.jsxs=M},848:(e,t,s)=>{e.exports=s(20)},609:e=>{e.exports=window.React},795:e=>{e.exports=window.ReactDOM}},t={};function s(a){var g=t[a];if(void 0!==g)return g.exports;var l=t[a]={exports:{}};return e[a](l,l.exports,s),l.exports}s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var a in t)s.o(t,a)&&!s.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var a=s(609),g=s(338);const l=window.wp.apiFetch;var i=s.n(l);const r=window.wp.i18n;function c(e){var t,s,a="";if("string"==typeof e||"number"==typeof e)a+=e;else if("object"==typeof e)if(Array.isArray(e)){var g=e.length;for(t=0;t<g;t++)e[t]&&(s=c(e[t]))&&(a&&(a+=" "),a+=s)}else for(s in e)e[s]&&(a&&(a+=" "),a+=s);return a}function M(){for(var e,t,s=0,a="",g=arguments.length;s<g;s++)(e=arguments[s])&&(t=c(e))&&(a&&(a+=" "),a+=t);return a}var I=s(848);function n({disabled:e=!1,plain:t=!1,className:s,children:a,onClick:g=()=>{},...l}){const i=M("block w-full bg-primary text-white rounded-md p-3","hover:bg-primary/90 hover:text-white","active:bg-primary/90 active:text-white","focus:bg-primary/90 focus:text-white","disabled:bg-black/80",s);return l.href?(0,I.jsx)("a",{className:i,...l,children:a}):(0,I.jsx)("button",{onClick:g,disabled:e,className:i,...l,children:a})}function o({type:e="notice",title:t,children:s,className:a=""}){const g=M("border rounded-md p-2","success"===e?"bg-green-100 border-green-200":"","notice"===e?"bg-yellow-100 border-yellow-200":"","error"===e?"bg-red-100 border-red-200":"",a);return(0,I.jsxs)("div",{className:g,children:[(0,I.jsx)("div",{className:"text-md text-black font-semibold",children:t}),s&&(0,I.jsx)("div",{className:"text-sm text-black",children:s})]})}function C({title:e,titleId:t,...s},g){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:g,"aria-labelledby":t},s),e?a.createElement("title",{id:t},e):null,a.createElement("path",{fillRule:"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm8.706-1.442c1.146-.573 2.437.463 2.126 1.706l-.709 2.836.042-.02a.75.75 0 0 1 .67 1.34l-.04.022c-1.147.573-2.438-.463-2.127-1.706l.71-2.836-.042.02a.75.75 0 1 1-.671-1.34l.041-.022ZM12 9a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z",clipRule:"evenodd"}))}const d=a.forwardRef(C);function N({title:e,titleId:t,...s},g){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:g,"aria-labelledby":t},s),e?a.createElement("title",{id:t},e):null,a.createElement("path",{fillRule:"evenodd",d:"M16.28 11.47a.75.75 0 0 1 0 1.06l-7.5 7.5a.75.75 0 0 1-1.06-1.06L14.69 12 7.72 5.03a.75.75 0 0 1 1.06-1.06l7.5 7.5Z",clipRule:"evenodd"}))}const A=a.forwardRef(N);function j({nextStep:e}){const[t,s]=(0,a.useState)(""),[g,l]=(0,a.useState)(null);return(0,I.jsxs)("div",{className:"space-y-8",children:[(0,I.jsxs)("div",{children:[(0,I.jsx)("h2",{className:"text-xl font-semibold text-gray-900",children:(0,r.__)("Activate license","fraktvalg")}),(0,I.jsx)("p",{className:"mt-1 text-sm text-gray-500",children:(0,r.__)("Your license will be activated for the domain: ","fraktvalg")+window.location.host})]}),(0,I.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-5 gap-6",children:[(0,I.jsx)("div",{className:"md:col-span-3 bg-white rounded-lg border border-gra-200 p-6",children:(0,I.jsxs)("div",{className:"space-y-4",children:[(0,I.jsxs)("div",{children:[(0,I.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",htmlFor:"license",children:(0,r.__)("License key","fraktvalg")}),(0,I.jsx)("input",{type:"text",name:"license",id:"license",value:t,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-primary",placeholder:(0,r.__)("Enter your license key","fraktvalg"),onChange:e=>s(e.target.value)})]}),g&&(0,I.jsx)(o,{type:g.type,title:g.title,className:"my-2",children:g.message}),(0,I.jsx)("div",{className:"w-full mt-1",children:(0,I.jsx)(n,{onClick:()=>{l(null),i()({path:"/fraktvalg/v1/settings/api-key",method:"POST",data:{api_key:t}}).then((t=>{e()})).catch((e=>{l({type:"error",title:(0,r.__)("An error was encountered when validating your API key","fraktvalg"),message:e?.message})}))},disabled:!t.length>0,children:(0,r.__)("Activate license","fraktvalg")})})]})}),(0,I.jsxs)("div",{className:"md:col-span-2 bg-tertiary/10 rounded-lg p-6 flex flex-col",children:[(0,I.jsxs)("div",{className:"flex items-center space-x-2 text-custom mb-4",children:[(0,I.jsx)(d,{className:"w-5 h-5"}),(0,I.jsx)("span",{className:"font-medium",children:(0,r.__)("Need a license?","fraktvalg")})]}),(0,I.jsx)("p",{className:"text-sm text-gray-600 mb-4",children:(0,r.__)("To use Fraktvalg you first need to register an account. It only takes a moment to get started.","fraktvalg")}),(0,I.jsxs)("a",{href:"https://Fraktvalg.no?utm_source=plugin&utm_medium=register&utm_campaign=onboarding",className:"mt-auto group inline-flex items-center text-cuistom hover:text-custom-dark font-medium",children:[(0,I.jsx)("span",{children:(0,r.__)("Register at fraktvalg.no","fraktvalg")}),(0,I.jsx)(A,{className:"ml-1 w-4 h-4"})]})]})]})]})}function u({children:e}){return(0,I.jsx)("div",{className:"w-full mt-2 bg-gray-50 rounded-lg p-5 help-content border border-gray-200 space-y-4",children:(0,I.jsx)("div",{className:"text-sm text-gray-600",children:e})})}function x({field:e,name:t,label:s,value:g=!1,callback:l,onChange:i,required:r=!1,children:c}){const[M,n]=(0,a.useState)(g);return(0,I.jsxs)("div",{className:"relative",children:[(0,I.jsxs)("label",{className:"inline-flex items-center cursor-pointer",children:[(0,I.jsx)("input",{name:t,type:"checkbox",checked:g,onChange:e=>{n(e.target.checked),i?i(e):l&&l(e)},required:r,className:"sr-only peer"}),(0,I.jsx)("div",{className:"relative w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 rounded-full peer dark:bg-gray-200 peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-primary"}),(0,I.jsx)("span",{className:"ms-3 mr-2 text-sm",children:s})]}),c,e?.stateDescriptions?.enabled&&M&&(0,I.jsx)(u,{children:e?.stateDescriptions?.enabled}),e?.stateDescriptions?.disabled&&!M&&(0,I.jsx)(u,{children:e?.stateDescriptions?.disabled})]})}function m({name:e,label:t,value:s="",placeholder:a="",required:g=!1,callback:l,onChange:i,children:r}){const c=i||l;return(0,I.jsxs)("div",{children:[(0,I.jsx)("label",{className:"block text-sm font-medium text-gray-700",children:t}),(0,I.jsx)("input",{name:e,type:"password",value:s,onChange:c,onPaste:c,placeholder:a,required:g,className:"mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-primary focus:border-primary sm:text-sm"}),r]})}function w({name:e,label:t,value:s="",placeholder:a="",required:g=!1,callback:l,onChange:i,readOnly:r=!1,children:c}){const M=i||l;return(0,I.jsxs)("div",{children:[(0,I.jsx)("label",{className:"block text-sm font-medium text-gray-700",children:t}),(0,I.jsx)("input",{name:e,type:"text",value:s,onChange:M,onPaste:M,placeholder:a,required:g,readOnly:r,className:"mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-primary focus:border-primary sm:text-sm"}),c]})}function D({name:e,label:t,value:s="",placeholder:g="",required:l=!1,callback:i,onChange:r,children:c,...M}){const[n,o]=(0,a.useState)(null!=s?s:0),C=r||i;return(0,I.jsxs)("div",{children:[(0,I.jsxs)("div",{className:"flex items-center justify-between",children:[(0,I.jsx)("label",{className:"block text-sm font-medium text-gray-700",children:t}),(0,I.jsx)("input",{name:e,type:"number",value:n,onChange:C,onPaste:e=>{const t=e.clipboardData.getData("text"),s=parseInt(t,10);!isNaN(s)&&s>=0&&(o(s),C)&&C({target:{value:s}})},placeholder:g,required:l,min:"0",className:"hidden"}),(0,I.jsxs)("div",{className:"inline-flex items-center gap-4",children:[(0,I.jsx)("button",{onClick:()=>{n>0&&(o(n-1),C)&&C({target:{value:n-1}})},className:"px-2 py-1 font-mono text-lg text-gray-700 border border-gray-200 rounded-md hover:bg-gray-100",children:"-"}),(0,I.jsx)("span",{className:"text-lg font-mono font-semibold",children:n}),(0,I.jsx)("button",{onClick:()=>{o(n+1),C&&C({target:{value:n+1}})},className:"px-2 py-1 font-mono text-lg text-gray-700 border border-gray-200 rounded-md hover:bg-gray-100",children:"+"})]})]}),c]})}function T({title:e,titleId:t,...s},g){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:g,"aria-labelledby":t},s),e?a.createElement("title",{id:t},e):null,a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z"}))}const L=a.forwardRef(T);function y({includeOptional:e=!1,provider:t,fields:s,callback:g}){const[l,i]=(0,a.useState)({}),[c,M]=(0,a.useState)({}),[n,o]=(0,a.useState)(null),C=e=>{if("paste"===e.type){const s={target:{name:e.target.name,value:e.clipboardData.getData("text"),type:e.target.type}},a={...l};return"checkbox"===s.target.type?a[s.target.name]=s.target.checked:a[s.target.name]=s.target.value,i(a),g(t,a),o(s.target.name),void setTimeout((()=>{o(null)}),100)}if(n===e.target.name)return;const s={...l};"checkbox"===e.target.type?s[e.target.name]=e.target.checked:s[e.target.name]=e.target.value,i(s),g(t,s)};(0,a.useEffect)((()=>{s.forEach((e=>{e?.value&&i({...l,[e.name]:e.value})}))}),[]);const d=e=>{switch(e.type){case"boolean":return(0,I.jsx)(x,{name:e.name,label:e.label,value:l?.[e.name],callback:C,required:e.required,field:e,children:(0,I.jsx)(I.Fragment,{children:e?.description&&(0,I.jsx)(u,{children:e?.description})})});case"password":return(0,I.jsx)(m,{name:e.name,label:e.label,value:l?.[e.name],placeholder:e.placeholder,callback:C,required:e.required,field:e,children:(0,I.jsx)(I.Fragment,{children:e?.description&&(0,I.jsx)(u,{children:e?.description})})});case"number":return(0,I.jsx)(D,{name:e.name,label:e.label,value:l?.[e.name],placeholder:e.placeholder,callback:C,required:e.required,field:e,children:(0,I.jsx)(I.Fragment,{children:e?.description&&(0,I.jsx)(u,{children:e?.description})})});default:return(0,I.jsx)(w,{name:e.name,label:e.label,value:l?.[e.name],placeholder:e.placeholder,callback:C,required:e.required,field:e,children:(0,I.jsx)(I.Fragment,{children:e?.description&&(0,I.jsx)(u,{children:e?.description})})})}};return(0,I.jsx)(I.Fragment,{children:s.flatMap(((t,s)=>t?.optional&&!e?[]:(0,I.jsxs)("div",{children:[d(t),t?.help&&(0,I.jsxs)("div",{className:"mt-2",children:[(0,I.jsxs)("button",{type:"button",className:"text-sm text-custom hover:text-custom-dark flex items-center cursor-pointer help-toggle",onClick:()=>{return e=t.name,void M((t=>({...t,[e]:!t[e]})));var e},children:[(0,I.jsx)(L,{className:"w-5 h-5 mr-1"}),(0,I.jsx)("span",{children:t?.help?.label||(0,r.__)("Help","fraktvalg")})]}),c[t.name]&&(0,I.jsxs)(u,{children:[(0,I.jsx)("p",{children:t?.help?.text}),t?.help?.url?.link&&(0,I.jsx)("div",{className:"mt-3",children:(0,I.jsxs)("a",{href:t?.help?.url?.link,target:"_blank",className:"inline-flex items-center text-custom hover:text-custom-dark font-medium",children:[(0,I.jsx)("span",{children:t?.help?.url?.label}),(0,I.jsx)(A,{className:"ml-1 w-4 h-4"})]})})]})]})]},s)))})}function h({title:e,titleId:t,...s},g){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:g,"aria-labelledby":t},s),e?a.createElement("title",{id:t},e):null,a.createElement("path",{fillRule:"evenodd",d:"M11.47 7.72a.75.75 0 0 1 1.06 0l7.5 7.5a.75.75 0 1 1-1.06 1.06L12 9.31l-6.97 6.97a.75.75 0 0 1-1.06-1.06l7.5-7.5Z",clipRule:"evenodd"}))}const p=a.forwardRef(h);function z({title:e,titleId:t,...s},g){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:g,"aria-labelledby":t},s),e?a.createElement("title",{id:t},e):null,a.createElement("path",{fillRule:"evenodd",d:"M12.53 16.28a.75.75 0 0 1-1.06 0l-7.5-7.5a.75.75 0 0 1 1.06-1.06L12 14.69l6.97-6.97a.75.75 0 1 1 1.06 1.06l-7.5 7.5Z",clipRule:"evenodd"}))}const b=a.forwardRef(z);function k({title:e,titleId:t,...s},g){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:g,"aria-labelledby":t},s),e?a.createElement("title",{id:t},e):null,a.createElement("path",{fillRule:"evenodd",d:"M4.755 10.059a7.5 7.5 0 0 1 12.548-3.364l1.903 1.903h-3.183a.75.75 0 1 0 0 1.5h4.992a.75.75 0 0 0 .75-.75V4.356a.75.75 0 0 0-1.5 0v3.18l-1.9-1.9A9 9 0 0 0 3.306 9.67a.75.75 0 1 0 1.45.388Zm15.408 3.352a.75.75 0 0 0-.919.53 7.5 7.5 0 0 1-12.548 3.364l-1.902-1.903h3.183a.75.75 0 0 0 0-1.5H2.984a.75.75 0 0 0-.75.75v4.992a.75.75 0 0 0 1.5 0v-3.18l1.9 1.9a9 9 0 0 0 15.059-4.035.75.75 0 0 0-.53-.918Z",clipRule:"evenodd"}))}const f=a.forwardRef(k);function v({title:e,titleId:t,...s},g){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:g,"aria-labelledby":t},s),e?a.createElement("title",{id:t},e):null,a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 18.75a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m3 0h6m-9 0H3.375a1.125 1.125 0 0 1-1.125-1.125V14.25m17.25 4.5a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m3 0h1.125c.621 0 1.129-.504 1.09-1.124a17.902 17.902 0 0 0-3.213-9.193 2.056 2.056 0 0 0-1.58-.86H14.25M16.5 18.75h-2.25m0-11.177v-.958c0-.568-.422-1.048-.987-1.106a48.554 48.554 0 0 0-10.026 0 1.106 1.106 0 0 0-.987 1.106v7.635m12-6.677v6.677m0 4.5v-4.5m0 0h-12"}))}const O=a.forwardRef(v);function S({logo:e=null,...t}){const{alt:s=""}=t;return e?e.startsWith("http")||e.startsWith("data:image")?(0,I.jsx)("img",{src:e,alt:s,...t}):(e.startsWith("https")||(e=encodeURIComponent(e)),(0,I.jsx)("img",{src:"data:image/svg+xml;utf8,"+e,alt:s,...t})):(0,I.jsx)(O,{...t})}function E({supplierId:e,supplier:t,title:s,content:g,isConnected:l=!1,visible:i=!0,classNames:c="",innerClassNames:n=""}){const[o,C]=(0,a.useState)(i),d=M("border bg-white rounded-md",c),N=M("border-t-2 border-gray-100 p-4",n);return(0,I.jsxs)("div",{className:d,children:[(0,I.jsx)("button",{className:"flex w-full p-4 items-center justify-between",onClick:()=>C(!o),children:(0,I.jsx)("h2",{className:"text-lg font-bold w-full",children:(0,I.jsxs)("div",{className:"flex item-center justify-between focus:outline-none w-full",children:[(0,I.jsxs)("div",{className:"flex",children:[t?.logo&&(0,I.jsx)("div",{children:(0,I.jsx)(S,{logo:t?.logo,alt:s,className:"w-8 h-8 mr-2"})}),(0,I.jsx)("div",{className:"inline-flex items-center gap-4",children:(0,I.jsx)("span",{children:s})})]}),(0,I.jsxs)("div",{className:"flex items-center gap-4",children:[l&&(0,I.jsx)("div",{className:"px-3 py-1 text-sm rounded-full bg-green-100 text-green-600",children:(0,r.__)("Connected","fraktvalg")}),!l&&(0,I.jsx)("div",{className:"px-3 py-1 text-sm rounded-full bg-red-100 text-red-600",children:(0,r.__)("Disconnected","fraktvalg")}),o?(0,I.jsx)(p,{className:"h-6 w-6 text-gray-600"}):(0,I.jsx)(b,{className:"h-6 w-6 text-gray-600"})]})]})})}),o&&(0,I.jsx)("div",{className:N,children:g})]})}function Y({nextStep:e}){const[t,s]=(0,a.useState)({}),[g,l]=(0,a.useState)(null),[c,M]=(0,a.useState)(!0),[o,C]=(0,a.useState)(null),[d,N]=(0,a.useState)(""),[A,j]=(0,a.useState)([]),[u,x]=(0,a.useState)({}),m=(e,t)=>{x({...u,[e]:t})};return(0,a.useEffect)((()=>{l(null),i()({path:"fraktvalg/v1/settings/providers",method:"GET"}).then((e=>{s(e?.data||{})})).catch((e=>{l(e?.message)})).then((()=>{M(!1)}))}),[]),c?(0,I.jsxs)("div",{className:"flex flex-col justify-center items-center h-64",children:[(0,I.jsx)(f,{className:"h-8 w-8 animate-spin text-primary"}),(0,I.jsx)("div",{className:"text-lg",children:"Fetching available providers..."})]}):(0,I.jsxs)("div",{className:"grid grid-cols-1 gap-3",children:[(0,I.jsx)("span",{className:"text-xl",children:"Nesten ferdig, vi trenger å vite hvilke fraktleverandører du har en avtale med."}),g&&(0,I.jsxs)("div",{className:"bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded relative mb-4",role:"alert",children:[(0,I.jsxs)("strong",{className:"font-bold",children:[(0,r.__)("Error:","fraktvalg")," "]}),(0,I.jsx)("span",{className:"block sm:inline",children:g})]}),Object.keys(t).map((e=>(0,I.jsx)(E,{title:t[e]?.name,supplierId:e,supplier:t[e],visible:!1,isConnected:A.includes(e),content:(0,I.jsxs)("div",{className:"relative grid grid-cols-1 gap-4",children:[d===e&&(0,I.jsxs)("div",{className:"absolute w-full h-full top-0 left-0 bg-white flex flex-col justify-center items-center gap-2",children:[(0,I.jsx)(f,{className:"h-6 w-6 animate-spin text-primary"}),(0,I.jsx)("span",{children:(0,r.__)("Connecting provider, one moment please...","fraktvalg")})]}),(0,I.jsx)(y,{provider:e,fields:t[e]?.fields||[],callback:m}),(0,I.jsx)(n,{type:"button",onClick:()=>(e=>{N(e),l(null),i()({path:"fraktvalg/v1/settings/providers/store",method:"POST",data:{providerId:e,fieldValues:u[e]}}).then((t=>{N(""),j([...A,e])})).catch((e=>{console.error(e),l(e?.message||(0,r.__)("Failed to connect to provider","fraktvalg")),N("")}))})(e),children:(0,r.__)("Connect to this provider","fraktvalg")})]})},e))),(0,I.jsx)(n,{type:"button",onClick:e,children:(0,r.__)("Next step","fraktvalg")})]})}function U({title:e,titleId:t,...s},g){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:g,"aria-labelledby":t},s),e?a.createElement("title",{id:t},e):null,a.createElement("path",{fillRule:"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm13.36-1.814a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z",clipRule:"evenodd"}))}const Q=a.forwardRef(U);function G({nextStep:e}){return(0,I.jsxs)("div",{className:"flex flex-col justify-center items-center gap-4",children:[(0,I.jsx)("div",{children:(0,I.jsx)(Q,{className:"w-20 h-20 text-primary"})}),(0,I.jsx)("span",{className:"text-2xl text-center",children:(0,r.__)("Fraktvalg is now set up and ready to use.","fraktvalg")}),(0,I.jsx)(n,{onClick:()=>e(),children:(0,r.__)("Finish setup","fraktvalg")})]})}function B({current:e=!1,future:t=!1,past:s=!1,setStep:a=null,label:g=null,step:l}){const i="flex items-center justify-center w-8 h-8 border-2 border-gray-300 bg-white rounded-full shrink-0"+(e?" border-primary text-primary":"")+(s?" border-primary/80 text-primary/90":""),r="flex items-center text-custom space-x-2.5"+(null!==a&&!0===s?" cursor-pointer":"");return(0,I.jsxs)("li",{className:r,onClick:()=>{!0===s&&null!==a&&a(l)},children:[(0,I.jsx)("span",{className:i,children:(0,I.jsx)("span",{className:"font-medium",children:e?(0,I.jsx)("strong",{children:l}):l})}),g&&(0,I.jsx)("span",{children:(0,I.jsx)("div",{className:"font-medium leading-tight",children:e?(0,I.jsx)("strong",{children:g}):g})})]})}function _({currentStep:e,steps:t,labels:s,setStep:a=null,...g}){return(0,I.jsxs)("div",{className:"mb-10",children:[(0,I.jsxs)("span",{className:"sr-only",children:["Step ",e," of ",t]}),(0,I.jsx)("ol",{className:"items-center w-full space-y-4 sm:flex sm:space-x-8 sm:space-y-0 sm:justify-center max-w-2xl mx-auto",children:[...Array(t)].map(((t,g)=>(0,I.jsx)(B,{current:g+1===e,past:g+1<e,future:g+1>e,setStep:a,step:g+1,label:s[g]},g)))})]})}function Z({title:e,children:t,open:s=!1}){const[g,l]=(0,a.useState)(s||!1);return(0,I.jsxs)("div",{className:"border bg-white rounded-md",children:[(0,I.jsxs)("button",{className:"w-full flex p-4 justify-between",onClick:()=>l(!g),children:[(0,I.jsx)("h2",{className:"text-lg text-left font-bold w-full",children:e}),(0,I.jsx)("div",{className:"relative inline-block",children:g?(0,I.jsx)(p,{className:"h-6 w-6 text-primary"}):(0,I.jsx)(b,{className:"h-6 w-6 text-primary"})})]}),g&&(0,I.jsx)("div",{className:"p-4",children:t})]})}function X({nextStep:e}){const[t,s]=(0,a.useState)(null),[g,l]=(0,a.useState)(!1),[c,M]=(0,a.useState)({freight:{addedCost:0,addedCostType:"fixed",custom:{name:(0,r.__)("Shipping & handling","fraktvalg"),price:100,type:"fixed"}},useProduction:!0,names:[]}),C=e=>{switch(e.target.name){case"freight[addedCost]":M({...c,freight:{...c.freight,addedCost:e.target.value}});break;case"freight[addedCostType]":M({...c,freight:{...c.freight,addedCostType:e.target.value}});break;case"freight[custom][name]":M({...c,freight:{...c.freight,custom:{...c.freight.custom,name:e.target.value}}});break;case"freight[custom][price]":M({...c,freight:{...c.freight,custom:{...c.freight.custom,price:e.target.value}}});break;case"freight[custom][type]":M({...c,freight:{...c.freight,custom:{...c.freight.custom,type:e.target.value}}});break;case"useProduction":M({...c,useProduction:e.target.checked});break;default:M({...c,[e.target.name]:e.target.value})}};return(0,I.jsxs)("div",{className:"grid grid-cols-1 gap-3",children:[(0,I.jsx)("span",{className:"text-xl",children:(0,r.__)("Almost there! Are there any optional settings you would like to change?","fraktvalg")}),(0,I.jsx)(Z,{title:(0,r.__)("Backup shipping option","fraktvalg"),open:!0,children:(0,I.jsxs)("div",{className:"relative grid grid-cols-1 gap-4",children:[(0,I.jsx)("p",{children:(0,r.__)("If Fraktvalg should ever become unavailable, or no shiopping options are returned, returns this shipping alternative by default.","fraktvalg")}),(0,I.jsxs)("div",{className:"mt-2 grid grid-cols-1 gap-4",children:[(0,I.jsx)(w,{label:(0,r.__)("Shipping option name","fraktvalg"),name:"freight[custom][name]",value:c.freight.custom.name,callback:C}),(0,I.jsxs)("div",{className:"flex items-center gap-3",children:[(0,I.jsx)("input",{name:"freight[custom][price]",value:c.freight.custom.price,onChange:C,type:"number",min:"0",step:"1",placeholder:"25",className:"w-16 border border-gray-300 rounded-md p-2"}),(0,I.jsxs)("select",{name:"freight[custom][type]",className:"border border-gray-300 rounded-md p-2",value:c.freight.custom.type,onChange:C,children:[(0,I.jsx)("option",{value:"percent",children:"%"}),(0,I.jsx)("option",{value:"fixed",children:"NOK"})]}),(0,I.jsxs)("div",{children:[(0,I.jsx)("label",{htmlFor:"something",children:(0,r.__)("Backup shipping cost","fraktvalg")}),(0,I.jsx)("p",{className:"text-xs italic",children:(0,r.__)("The backup shipping cost can be set to either a fixed value, or a percentage of the order total.","fraktvalg")})]})]})]})]})}),(0,I.jsxs)(Z,{title:(0,r.__)("Shipping cost adjustments","fraktvalg"),children:[(0,r.__)("Safeguard your shipping costs with these optional alternatives.","fraktvalg"),(0,I.jsxs)("div",{className:"flex items-center gap-3",children:[(0,I.jsx)("input",{name:"freight[addedCost]",value:c.freight.addedCost,onChange:C,type:"number",min:"0",step:"1",placeholder:"10",className:"w-16 border border-gray-300 rounded-md p-2"}),(0,I.jsxs)("select",{name:"freight[addedCostType]",className:"border border-gray-300 rounded-md p-2",value:c.freight.addedCostType,onChange:C,children:[(0,I.jsx)("option",{value:"percent",children:"%"}),(0,I.jsx)("option",{value:"fixed",children:"NOK"})]}),(0,I.jsxs)("div",{children:[(0,I.jsx)("label",{htmlFor:"something",children:(0,r.__)("Add an optional surcharge to all shipping options","fraktvalg")}),(0,I.jsx)("p",{className:"text-xs italic",children:(0,r.__)("Additional shipping surcharges are meant to cover administrative- and handling costs, and is automatically added to all shipping alternatives.","fraktvalg")})]})]})]}),(0,I.jsxs)(Z,{title:(0,r.__)("Shop environment","fraktvalg"),open:!1,children:[(0,I.jsx)("p",{children:(0,r.__)("Some times, you wish to use the shipping providers test environments, for example on a staging site. Doing so will not create legitimate shipping requests, and prevents yo ufrom incurring charges while testing your store setup.","fraktvalg")}),(0,I.jsx)("div",{className:"mt-2 grid grid-cols-1 gap-4",children:(0,I.jsx)(x,{label:(0,r.__)("Use production environments","fraktvalg"),name:"useProduction",value:c.useProduction,callback:C})})]}),t&&(0,I.jsx)(o,{type:t.type,title:t.title,children:t.message}),(0,I.jsx)(n,{type:"button",onClick:()=>{s(null),l(!1),i()({path:"/fraktvalg/v1/settings/optional-settings",method:"POST",data:{options:c}}).then((e=>{s({type:e?.type,title:e?.title,message:e?.message}),l(!0)})).catch((e=>{s({type:"error",title:(0,r.__)("Error saving optional settings","fraktvalg"),message:e?.message})}))},children:(0,r.__)("Save optional settings","fraktvalg")}),g&&(0,I.jsx)(n,{type:"button",onClick:e,children:(0,r.__)("Next step","fraktvalg")})]})}function F({title:e,titleId:t,...s},g){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:g,"aria-labelledby":t},s),e?a.createElement("title",{id:t},e):null,a.createElement("path",{d:"M21.731 2.269a2.625 2.625 0 0 0-3.712 0l-1.157 1.157 3.712 3.712 1.157-1.157a2.625 2.625 0 0 0 0-3.712ZM19.513 8.199l-3.712-3.712-8.4 8.4a5.25 5.25 0 0 0-1.32 2.214l-.8 2.685a.75.75 0 0 0 .933.933l2.685-.8a5.25 5.25 0 0 0 2.214-1.32l8.4-8.4Z"}),a.createElement("path",{d:"M5.25 5.25a3 3 0 0 0-3 3v10.5a3 3 0 0 0 3 3h10.5a3 3 0 0 0 3-3V13.5a.75.75 0 0 0-1.5 0v5.25a1.5 1.5 0 0 1-1.5 1.5H5.25a1.5 1.5 0 0 1-1.5-1.5V8.25a1.5 1.5 0 0 1 1.5-1.5h5.25a.75.75 0 0 0 0-1.5H5.25Z"}))}const R=a.forwardRef(F);function P({nextStep:e}){const[t,s]=(0,a.useState)(!0),[g,l]=(0,a.useState)({}),[c,M]=(0,a.useState)({cart:!1,checkout:!1}),[o,C]=(0,a.useState)({cart:!1,checkout:!1}),[d,N]=(0,a.useState)({cart:!1,checkout:!1});(0,a.useEffect)((()=>{A()}),[]);const A=async()=>{try{const e=await i()({path:"/fraktvalg/v1/onboarding/theme-status",method:"GET"});l(e),s(!1)}catch(e){console.error("Error checking theme status:",e),s(!1)}},j=async(e,t)=>{if("create"===t){C((t=>({...t,[e]:!0})));try{await i()({path:"/fraktvalg/v1/onboarding/create-template",method:"POST",data:{template:e}}),await A(),N((t=>({...t,[e]:!0})))}catch(e){console.error("Error creating template:",e)}finally{C((t=>({...t,[e]:!1})))}}else if("edit"===t){const t=g.urls[e];t&&(window.open(t,"_blank"),M((t=>({...t,[e]:!0}))))}};return t?(0,I.jsxs)("div",{className:"flex flex-col justify-center items-center h-64",children:[(0,I.jsx)(f,{className:"h-8 w-8 animate-spin text-primary"}),(0,I.jsx)("div",{className:"text-lg",children:(0,r.__)("Checking which templates are in use on this site...","fraktvalg")})]}):(0,I.jsxs)("div",{className:"grid grid-cols-1 gap-6 p-6",children:[(0,I.jsxs)("div",{className:"text-center",children:[(0,I.jsx)("h2",{className:"text-xl font-semibold mb-4",children:(0,r.__)("Template Configuration","fraktvalg")}),(0,I.jsx)("p",{className:"text-gray-600 mb-6",children:(()=>{switch((()=>{const{isBlockCartTemplate:e,isBlockCheckoutTemplate:t}=g;return e&&t?"all-blocks":e||t?"mixed":"classic"})()){case"all-blocks":return(0,r.__)("Your theme uses block templates. Choose how you want to add the Fraktvalg block to your templates:","fraktvalg");case"mixed":return(0,r.__)("Your theme uses a mix of block and classic templates. You can configure the block templates below:","fraktvalg");default:return(0,r.__)("Your theme does not use block templates. You can proceed to the next step without configuring any templates.","fraktvalg")}})()})]}),g.urls&&(g.isBlockCartTemplate&&void 0!==g.urls.cart||g.isBlockCheckoutTemplate&&void 0!==g.urls.checkout)&&(0,I.jsxs)("ul",{className:"space-y-4",children:[void 0!==g.urls.cart&&g.isBlockCartTemplate&&(0,I.jsxs)("li",{className:"flex flex-col p-4 bg-white rounded-lg shadow-sm border",children:[(0,I.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,I.jsxs)("div",{className:"flex items-center",children:[(0,I.jsx)("span",{className:"font-medium",children:(0,r.__)("Cart Template","fraktvalg")}),c.cart&&(0,I.jsx)(Q,{className:"h-5 w-5 text-green-500 ml-2"})]})}),(0,I.jsxs)("div",{className:"flex gap-4",children:[(0,I.jsx)("button",{onClick:()=>j("cart","create"),disabled:o.cart||d.cart,className:"flex-1 px-4 py-2 bg-primary text-white rounded hover:bg-primary-dark transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:o.cart?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(f,{className:"h-4 w-4 animate-spin inline mr-2"}),(0,r.__)("Creating...","fraktvalg")]}):d.cart?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Q,{className:"h-4 w-4 inline mr-2"}),(0,r.__)("Block Auto-added","fraktvalg")]}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Q,{className:"h-4 w-4 inline mr-2"}),(0,r.__)("Auto-add Block","fraktvalg")]})}),(0,I.jsxs)("button",{onClick:()=>j("cart","edit"),className:"flex-1 px-4 py-2 bg-white text-primary border border-primary rounded hover:bg-gray-50 transition-colors",children:[(0,I.jsx)(R,{className:"h-4 w-4 inline mr-2"}),(0,r.__)("Customize Manually","fraktvalg")]})]})]}),void 0!==g.urls.checkout&&g.isBlockCheckoutTemplate&&(0,I.jsxs)("li",{className:"flex flex-col p-4 bg-white rounded-lg shadow-sm border",children:[(0,I.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,I.jsxs)("div",{className:"flex items-center",children:[(0,I.jsx)("span",{className:"font-medium",children:(0,r.__)("Checkout Template","fraktvalg")}),c.checkout&&(0,I.jsx)(Q,{className:"h-5 w-5 text-green-500 ml-2"})]})}),(0,I.jsxs)("div",{className:"flex gap-4",children:[(0,I.jsx)("button",{onClick:()=>j("checkout","create"),disabled:o.checkout||d.checkout,className:"flex-1 px-4 py-2 bg-primary text-white rounded hover:bg-primary-dark transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:o.checkout?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(f,{className:"h-4 w-4 animate-spin inline mr-2"}),(0,r.__)("Creating...","fraktvalg")]}):d.checkout?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Q,{className:"h-4 w-4 inline mr-2"}),(0,r.__)("Block Auto-added","fraktvalg")]}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Q,{className:"h-4 w-4 inline mr-2"}),(0,r.__)("Auto-add Block","fraktvalg")]})}),(0,I.jsxs)("button",{onClick:()=>j("checkout","edit"),className:"flex-1 px-4 py-2 bg-white text-primary border border-primary rounded hover:bg-gray-50 transition-colors",children:[(0,I.jsx)(R,{className:"h-4 w-4 inline mr-2"}),(0,r.__)("Customize Manually","fraktvalg")]})]})]})]}),(0,I.jsx)(n,{type:"button",onClick:e,children:(0,r.__)("Next step","fraktvalg")})]})}function J({title:e,titleId:t,...s},g){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:g,"aria-labelledby":t},s),e?a.createElement("title",{id:t},e):null,a.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003ZM12 8.25a.75.75 0 0 1 .75.75v3.75a.75.75 0 0 1-1.5 0V9a.75.75 0 0 1 .75-.75Zm0 8.25a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z",clipRule:"evenodd"}))}const W=a.forwardRef(J);function K({title:e,content:t,badge:s=null,visible:g=!1,classNames:l="",innerClassNames:i=""}){const[r,c]=(0,a.useState)(g),n=M("border bg-white rounded-md",l),o=M("border-t-2 border-gray-100 p-4",i);return(0,I.jsxs)("div",{className:n,children:[(0,I.jsx)("button",{className:"flex w-full p-4 items-center justify-between",onClick:()=>c(!r),children:(0,I.jsx)("h2",{className:"text-lg font-bold w-full",children:(0,I.jsxs)("div",{className:"flex item-center justify-between focus:outline-none w-full",children:[(0,I.jsx)("div",{className:"flex",children:e}),(0,I.jsxs)("div",{className:"flex items-center gap-4",children:[s&&(0,I.jsx)("div",{className:"px-3 py-1 text-sm rounded-full bg-red-100 text-red-600",children:s}),r?(0,I.jsx)(p,{className:"h-6 w-6 text-gray-600"}):(0,I.jsx)(b,{className:"h-6 w-6 text-gray-600"})]})]})})}),r&&(0,I.jsx)("div",{className:o,children:t})]})}function V({nextStep:e}){const[t,s]=(0,a.useState)(!0),[g,l]=(0,a.useState)({}),[c,M]=(0,a.useState)(!1),[o,C]=(0,a.useState)({address:!1});(0,a.useEffect)((()=>{d()}),[]),(0,a.useEffect)((()=>{g.address&&g.address.fields&&!g.address.fields.country&&l((e=>({...e,address:{...e.address,fields:{...e.address.fields,country:"NO"}}})))}),[g]);const d=async()=>{try{const e=await i()({path:"/fraktvalg/v1/onboarding/store-status",method:"GET"});l(e),s(!1)}catch(e){console.error("Error fetching store status:",e),s(!1)}},N=(e,t)=>{l((s=>({...s,address:{...s.address,fields:{...s.address.fields,[e]:t}}})))};if(t)return(0,I.jsxs)("div",{className:"flex flex-col justify-center items-center h-64",children:[(0,I.jsx)(f,{className:"h-8 w-8 animate-spin text-primary"}),(0,I.jsx)("div",{className:"text-lg",children:(0,r.__)("Loading store settings, and checking products...","fraktvalg")})]});const A=(0,I.jsxs)("div",{className:"mt-4",children:[(0,I.jsx)("p",{className:"text-sm text-gray-600 mb-4",children:(0,r.__)("It is important to have an accurate store address, as all shipping options need to know the sender location to accurately provide shipping estimates, even if the recipient address is less explicit.","fraktvalg")}),(0,I.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,I.jsxs)("div",{children:[(0,I.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:(0,r.__)("Street Address","fraktvalg")}),(0,I.jsx)(w,{value:g.address?.fields?.address||"",onChange:e=>N("address",e.target.value),placeholder:(0,r.__)("Enter your store address","fraktvalg")})]}),(0,I.jsxs)("div",{children:[(0,I.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:(0,r.__)("Postal Code","fraktvalg")}),(0,I.jsx)(w,{value:g.address?.fields?.postcode||"",onChange:e=>N("postcode",e.target.value),placeholder:(0,r.__)("Enter your postal code","fraktvalg")})]}),(0,I.jsxs)("div",{children:[(0,I.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:(0,r.__)("City","fraktvalg")}),(0,I.jsx)(w,{value:g.address?.fields?.city||"",onChange:e=>N("city",e.target.value),placeholder:(0,r.__)("Enter your city","fraktvalg")})]}),(0,I.jsxs)("div",{children:[(0,I.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:(0,r.__)("Country","fraktvalg")}),(0,I.jsx)(w,{value:g.address?.fields?.country||"NO",onChange:e=>N("country",e.target.value),readOnly:!0,placeholder:(0,r.__)("Norway","fraktvalg")})]})]}),(0,I.jsx)("div",{className:"mt-4 flex justify-end",children:(0,I.jsx)(n,{type:"button",onClick:async()=>{M(!0);try{const e=g.address?.fields||{};await i()({path:"/fraktvalg/v1/onboarding/store-address",method:"POST",data:{address:e.address||"",postcode:e.postcode||"",city:e.city||"",country:e.country||"NO"}}),l((e=>({...e,address:{...e.address,complete:!0}}))),C((e=>({...e,address:!0}))),setTimeout((()=>{C((e=>({...e,address:!1})))}),3e3)}catch(e){console.error("Error updating store address:",e)}finally{M(!1)}},disabled:c,children:c?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(f,{className:"h-4 w-4 mr-2 animate-spin"}),(0,r.__)("Saving...","fraktvalg")]}):(0,I.jsx)(I.Fragment,{children:(0,r.__)("Save Address","fraktvalg")})})}),o.address&&(0,I.jsxs)("div",{className:"mt-2 text-green-600 text-sm flex items-center",children:[(0,I.jsx)(Q,{className:"h-4 w-4 mr-1"}),(0,r.__)("Address saved successfully","fraktvalg")]})]}),j=(0,I.jsxs)("div",{className:"mt-4",children:[(0,I.jsx)("p",{className:"text-sm text-gray-600 mb-4",children:(0,r.__)("Most shipping providers require the dimensions (width, height, and length) of a product, as well as its weight. This is used to more accurately calculate shipping costs, and without it you are more likely t use your fallback prices, or charge lower shipping costs than intended from your customers.","fraktvalg")}),g.products_without_dimensions&&g.products_without_dimensions.has_products_without_dimensions?(0,I.jsx)("div",{children:(0,I.jsx)("div",{className:"bg-yellow-50 border-l-4 border-yellow-400 p-4 mb-4",children:(0,I.jsxs)("div",{className:"flex",children:[(0,I.jsx)("div",{className:"flex-shrink-0",children:(0,I.jsx)(W,{className:"h-5 w-5 text-yellow-400"})}),(0,I.jsx)("div",{className:"ml-3",children:(0,I.jsx)("p",{className:"text-sm text-yellow-700",children:(0,r.__)("Some products appear to be missing dimensions or weight information. This may cause shipping prices to be inaccurate or unavailable. Note that this check does not account for variable products, we recommend you double-check the product information in WooCommerce.","fraktvalg")})})]})})}):(0,I.jsx)("p",{className:"text-green-600",children:(0,r.__)("All products have complete dimension and weight information.","fraktvalg")})]}),u=g.address&&!g.address.complete?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(W,{className:"h-4 w-4 inline mr-1"}),(0,r.__)("Incomplete","fraktvalg")]}):null,x=g.products_without_dimensions&&g.products_without_dimensions.has_products_without_dimensions?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(W,{className:"h-4 w-4 inline mr-1"}),(0,r.__)("Products missing dimensions","fraktvalg")]}):null;return(0,I.jsxs)("div",{className:"grid grid-cols-1 gap-6 p-6",children:[(0,I.jsxs)("div",{className:"text-center",children:[(0,I.jsx)("h2",{className:"text-xl font-semibold mb-4",children:(0,r.__)("Store Settings","fraktvalg")}),(0,I.jsx)("p",{className:"text-gray-600 mb-6",children:(0,r.__)("Configure your store settings for Fraktvalg shipping options:","fraktvalg")})]}),(0,I.jsxs)("div",{className:"space-y-4",children:[(0,I.jsx)(K,{title:(0,r.__)("Store Address","fraktvalg"),badge:u,content:A,visible:g.address&&!g.address.complete}),(0,I.jsx)(K,{title:(0,r.__)("Package Dimensions","fraktvalg"),badge:x,content:j,visible:g.products_without_dimensions&&g.products_without_dimensions.has_products_without_dimensions})]}),(0,I.jsx)(n,{type:"button",onClick:e,children:(0,r.__)("Next step","fraktvalg")})]})}function H(){const[e,t]=(0,a.useState)(1),s=[(0,r.__)("License","fraktvalg"),(0,r.__)("Providers","fraktvalg"),(0,r.__)("Templates","fraktvalg"),(0,r.__)("Plugin Settings","fraktvalg"),(0,r.__)("Store Settings","fraktvalg"),(0,r.__)("Finished","fraktvalg")];e>s.length&&i()({path:"/fraktvalg/v1/onboarding/complete",method:"POST"}).then((()=>{window.location.href="index.php"}));const g=()=>{t(e+1)};return(0,I.jsx)("div",{className:"top-0 left-0 w-full",children:(0,I.jsx)("div",{className:"flex justify-center p-8 mt-16",children:(0,I.jsxs)("div",{className:"grid gap-8",children:[(0,I.jsx)("div",{className:"m-auto",children:(0,I.jsx)("img",{src:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjwhLS0gQ3JlYXRlZCB3aXRoIElua3NjYXBlIChodHRwOi8vd3d3Lmlua3NjYXBlLm9yZy8pIC0tPgoKPHN2ZwogICB3aWR0aD0iMzUwIgogICBoZWlnaHQ9Ijk2LjI3NzM1OSIKICAgdmlld0JveD0iMCAwIDkyLjYwNDE1NiAyNS40NzMzODEiCiAgIHZlcnNpb249IjEuMSIKICAgaWQ9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UyLDAgLTg2LjkwMzU2LDM4Ljk4Njk0IC04Ni45MDM1Niw4Ni45MDU2NCAwLDQ3LjkyMjYxIDM4Ljk4NTA0LDg2LjkwNTY0IDg2LjkwMzU2LDg2LjkwNTY0IDQ3LjkxODgzLDAgODYuOTA1NzYsLTM4Ljk4MzAzIDg2LjkwNTc2LC04Ni45MDU2NCAwLC00Ny45MTg3IC0zOC45ODY5MywtODYuOTA1NjQgLTg2LjkwNTc2LC04Ni45MDU2NCIKICAgICAgIHN0eWxlPSJmaWxsOiMyZjQ2M2U7ZmlsbC1vcGFjaXR5OjE7ZmlsbC1ydWxlOm5vbnplcm87c3Ryb2tlOm5vbmUiCiAgICAgICB0cmFuc2Zvcm09Im1hdHJpeCgwLjEzMTEzMTUsMCwwLDAuMTMxMTMxNSwtNjEuOTEwMzYzLC01Mi4xOTM1MDkpIgogICAgICAgY2xpcC1wYXRoPSJ1cmwoI2NsaXBQYXRoMTMxKSIgLz4KICA8L2c+Cjwvc3ZnPgo=",alt:"Fraktvalg logo"})}),(0,I.jsx)(_,{currentStep:e,steps:s.length,labels:s,setStep:t}),(0,I.jsxs)("div",{className:"max-w-5xl bg-white rounded-lg shadow p-6",children:[1===e&&(0,I.jsx)(j,{nextStep:g}),2===e&&(0,I.jsx)(Y,{nextStep:g}),3===e&&(0,I.jsx)(P,{nextStep:g}),4===e&&(0,I.jsx)(X,{nextStep:g}),5===e&&(0,I.jsx)(V,{nextStep:g}),6===e&&(0,I.jsx)(G,{nextStep:g})]})]})})})}const q=document.getElementById("fraktvalg-onboarding");q&&(0,g.H)(q).render((0,I.jsx)(H,{}))})(); -
fraktvalg/trunk/readme.txt
r3267354 r3271607 54 54 == Changelog == 55 55 56 = 1.2.0 (2025-04-12) = 57 * Improved shipping method front-end presentation. 58 * Improved accessibility of shipping provider and method interfaces. 59 * Improved onboarding to guide users through required store settings. 60 * Add a means to reset the plugin to the onboarding stage. 61 * Added more contextual feedbacks in the settings panels. 62 * Resolve an issue where preferred providers did not alwways properly apply discounts, and only matched prices. 63 * Fixed so you can de-select a preferred shipping provider. 64 56 65 = 1.1.0 (2025-04-06) = 57 66 * Align the shipping block better on the x-axis in themes.
Note: See TracChangeset
for help on using the changeset viewer.