58ca4e68db
- Go backend API with full CRUD for all modules (CRM, Sales, Finance, HR, Legal, Marketing, Support, Purchase, Inventory, Projects, Automation, Analytics) - Rust analytics service with parallel report generation - C runtime with POSIX shared memory IPC - PostgreSQL schema with 30+ tables, full migrations - Redis cache, sessions, pub/sub - Kafka event streaming with Zookeeper - WebSocket hub for real-time updates - Automation engine with cron jobs, workflows, event triggers - JWT authentication, multi-tenant from start - Docker Compose with all services - Nginx reverse proxy with rate limiting - Integration tests passing - Feature gap analysis against Fortnox/Odoo/Visma Refs: BOC-001
217 lines
59 KiB
JavaScript
217 lines
59 KiB
JavaScript
import{o as r,aQ as Ae,aS as Pa,M as le,T as R,aT as he,S as He,ac as De,C as we,t as Fa,r as t,j as e,x as M,ag as w,ah as N,ak as oe,y as Q,I as Ne,i as D,u as Aa,p as Ha,n as Da,ai as O,L as ye,v as _,B as Re,q as G,s as b,aR as ze,w as v,A as Ee,al as ge,aj as Ra,z as X}from"./index-oAPVDf-r.js";import{R as za,a as Ie}from"./radio-group-CcrlZGTP.js";import{S as qe,a as Ke,b as Oe,c as Ge,d as V}from"./select-Bi-TzF3J.js";import{P as Ea,D as Ia,W as Ze,T as ke,M as qa,F as We,S as Ka,a as Z,C as Oa,b as Ue,c as Ga}from"./waves-DiawweIQ.js";import{Z as be}from"./zap-RaPdKGJZ.js";import{T as Za}from"./timer-C5oB41EC.js";import{T as Wa}from"./trash-2-A3LTadZ7.js";import{R as $e}from"./refresh-cw-DEBvxUr1.js";import{C as Ua}from"./clock-DRtqJZUo.js";import{M as Je}from"./mail-BT0S3dBU.js";import{F as $a,H as ee,C as Ye,S as Ja}from"./star-C6FiGbGr.js";import{E as Xe}from"./eye-G89nJUb2.js";import{B as ve}from"./building-2-w77rCUKE.js";import{H as xe}from"./heart-BjLemQnU.js";import{L}from"./landmark-BYZTTZdl.js";import{I as Ya}from"./image-DuU1QaV8.js";import{G as Xa}from"./gift-lxeNwCUB.js";import{S as ea}from"./shield-BWGzcrms.js";import{T as fe}from"./triangle-alert-B87swlNS.js";import{G as aa}from"./graduation-cap-Bk5l1TQx.js";import{P as je}from"./palette-xHAcW495.js";import{R as er}from"./radio-G_rzhIIH.js";import{S as ar}from"./settings-BTJAoFnf.js";import{T as rr}from"./ticket-D1bxyCST.js";import{S as sr}from"./scroll-area-B0CEXZGH.js";import{B as tr}from"./badge-Qwi4CUXx.js";import{C as Qe}from"./check-CG8zylH4.js";import{S as Se}from"./search-K36NSOaV.js";import{C as ir}from"./chevron-down-QDDHZwZg.js";import{C as nr}from"./chevron-right-B9rMgght.js";import{A as ra}from"./arrow-left-m6EiMbb-.js";import{I as lr}from"./info-BT66tWy0.js";import{A as or}from"./index-B-MEeiYV.js";import{R as cr}from"./repeat-wK6OxTxo.js";import{C as dr}from"./calendar-Bof-SGwp.js";import"./index-DGH-oZ97.js";import"./circle-030W8joh.js";/**
|
||
* @license lucide-react v0.462.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const sa=r("Accessibility",[["circle",{cx:"16",cy:"4",r:"1",key:"1grugj"}],["path",{d:"m18 19 1-7-6 1",key:"r0i19z"}],["path",{d:"m5 8 3-3 5.5 3-2.36 3.5",key:"9ptxx2"}],["path",{d:"M4.24 14.5a5 5 0 0 0 6.88 6",key:"10kmtu"}],["path",{d:"M13.76 17.5a5 5 0 0 0-6.88-6",key:"2qq6rc"}]]);/**
|
||
* @license lucide-react v0.462.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const ta=r("Baby",[["path",{d:"M9 12h.01",key:"157uk2"}],["path",{d:"M15 12h.01",key:"1k8ypt"}],["path",{d:"M10 16c.5.3 1.2.5 2 .5s1.5-.2 2-.5",key:"1u7htd"}],["path",{d:"M19 6.3a9 9 0 0 1 1.8 3.9 2 2 0 0 1 0 3.6 9 9 0 0 1-17.6 0 2 2 0 0 1 0-3.6A9 9 0 0 1 12 3c2 0 3.5 1.1 3.5 2.5s-.9 2.5-2 2.5c-.8 0-1.5-.4-1.5-1",key:"5yv0yz"}]]);/**
|
||
* @license lucide-react v0.462.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const ae=r("Building",[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2",key:"76otgf"}],["path",{d:"M9 22v-4h6v4",key:"r93iot"}],["path",{d:"M8 6h.01",key:"1dz90k"}],["path",{d:"M16 6h.01",key:"1x0f13"}],["path",{d:"M12 6h.01",key:"1vi96p"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M8 14h.01",key:"6423bh"}]]);/**
|
||
* @license lucide-react v0.462.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const ur=r("BusFront",[["path",{d:"M4 6 2 7",key:"1mqr15"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"m22 7-2-1",key:"1umjhc"}],["rect",{width:"16",height:"16",x:"4",y:"3",rx:"2",key:"1wxw4b"}],["path",{d:"M4 11h16",key:"mpoxn0"}],["path",{d:"M8 15h.01",key:"a7atzg"}],["path",{d:"M16 15h.01",key:"rnfrdf"}],["path",{d:"M6 19v2",key:"1loha6"}],["path",{d:"M18 21v-2",key:"sqyl04"}]]);/**
|
||
* @license lucide-react v0.462.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const _e=r("Bus",[["path",{d:"M8 6v6",key:"18i7km"}],["path",{d:"M15 6v6",key:"1sg6z9"}],["path",{d:"M2 12h19.6",key:"de5uta"}],["path",{d:"M18 18h3s.5-1.7.8-2.8c.1-.4.2-.8.2-1.2 0-.4-.1-.8-.2-1.2l-1.4-5C20.1 6.8 19.1 6 18 6H4a2 2 0 0 0-2 2v10h3",key:"1wwztk"}],["circle",{cx:"7",cy:"18",r:"2",key:"19iecd"}],["path",{d:"M9 18h5",key:"lrx6i"}],["circle",{cx:"16",cy:"18",r:"2",key:"1v4tcr"}]]);/**
|
||
* @license lucide-react v0.462.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Me=r("Church",[["path",{d:"M10 9h4",key:"u4k05v"}],["path",{d:"M12 7v5",key:"ma6bk"}],["path",{d:"M14 22v-4a2 2 0 0 0-4 0v4",key:"1pdhuj"}],["path",{d:"M18 22V5.618a1 1 0 0 0-.553-.894l-4.553-2.277a2 2 0 0 0-1.788 0L6.553 4.724A1 1 0 0 0 6 5.618V22",key:"1rkokr"}],["path",{d:"m18 7 3.447 1.724a1 1 0 0 1 .553.894V20a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9.618a1 1 0 0 1 .553-.894L6 7",key:"1w6esw"}]]);/**
|
||
* @license lucide-react v0.462.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const ia=r("CircleParking",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9 17V7h4a3 3 0 0 1 0 6H9",key:"1dfk2c"}]]);/**
|
||
* @license lucide-react v0.462.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const mr=r("ClipboardList",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]]);/**
|
||
* @license lucide-react v0.462.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const re=r("Construction",[["rect",{x:"2",y:"6",width:"20",height:"8",rx:"1",key:"1estib"}],["path",{d:"M17 14v7",key:"7m2elx"}],["path",{d:"M7 14v7",key:"1cm7wv"}],["path",{d:"M17 3v3",key:"1v4jwn"}],["path",{d:"M7 3v3",key:"7o6guu"}],["path",{d:"M10 14 2.3 6.3",key:"1023jk"}],["path",{d:"m14 6 7.7 7.7",key:"1s8pl2"}],["path",{d:"m8 6 8 8",key:"hl96qh"}]]);/**
|
||
* @license lucide-react v0.462.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const pr=r("DoorOpen",[["path",{d:"M13 4h3a2 2 0 0 1 2 2v14",key:"hrm0s9"}],["path",{d:"M2 20h3",key:"1gaodv"}],["path",{d:"M13 20h9",key:"s90cdi"}],["path",{d:"M10 12v.01",key:"vx6srw"}],["path",{d:"M13 4.562v16.157a1 1 0 0 1-1.242.97L5 20V5.562a2 2 0 0 1 1.515-1.94l4-1A2 2 0 0 1 13 4.561Z",key:"199qr4"}]]);/**
|
||
* @license lucide-react v0.462.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const se=r("Droplet",[["path",{d:"M12 22a7 7 0 0 0 7-7c0-2-1-3.9-3-5.5s-3.5-4-4-6.5c-.5 2.5-2 4.9-4 6.5C6 11.1 5 13 5 15a7 7 0 0 0 7 7z",key:"c7niix"}]]);/**
|
||
* @license lucide-react v0.462.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const na=r("Dumbbell",[["path",{d:"M14.4 14.4 9.6 9.6",key:"ic80wn"}],["path",{d:"M18.657 21.485a2 2 0 1 1-2.829-2.828l-1.767 1.768a2 2 0 1 1-2.829-2.829l6.364-6.364a2 2 0 1 1 2.829 2.829l-1.768 1.767a2 2 0 1 1 2.828 2.829z",key:"nnl7wr"}],["path",{d:"m21.5 21.5-1.4-1.4",key:"1f1ice"}],["path",{d:"M3.9 3.9 2.5 2.5",key:"1evmna"}],["path",{d:"M6.404 12.768a2 2 0 1 1-2.829-2.829l1.768-1.767a2 2 0 1 1-2.828-2.829l2.828-2.828a2 2 0 1 1 2.829 2.828l1.767-1.768a2 2 0 1 1 2.829 2.829z",key:"yhosts"}]]);/**
|
||
* @license lucide-react v0.462.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const hr=r("Factory",[["path",{d:"M2 20a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8l-7 5V8l-7 5V4a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z",key:"159hny"}],["path",{d:"M17 18h1",key:"uldtlt"}],["path",{d:"M12 18h1",key:"s9uhes"}],["path",{d:"M7 18h1",key:"1neino"}]]);/**
|
||
* @license lucide-react v0.462.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const la=r("Fence",[["path",{d:"M4 3 2 5v15c0 .6.4 1 1 1h2c.6 0 1-.4 1-1V5Z",key:"1n2rgs"}],["path",{d:"M6 8h4",key:"utf9t1"}],["path",{d:"M6 18h4",key:"12yh4b"}],["path",{d:"m12 3-2 2v15c0 .6.4 1 1 1h2c.6 0 1-.4 1-1V5Z",key:"3ha7mj"}],["path",{d:"M14 8h4",key:"1r8wg2"}],["path",{d:"M14 18h4",key:"1t3kbu"}],["path",{d:"m20 3-2 2v15c0 .6.4 1 1 1h2c.6 0 1-.4 1-1V5Z",key:"dfd4e2"}]]);/**
|
||
* @license lucide-react v0.462.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const yr=r("Frame",[["line",{x1:"22",x2:"2",y1:"6",y2:"6",key:"15w7dq"}],["line",{x1:"22",x2:"2",y1:"18",y2:"18",key:"1ip48p"}],["line",{x1:"6",x2:"6",y1:"2",y2:"22",key:"a2lnyx"}],["line",{x1:"18",x2:"18",y1:"2",y2:"22",key:"8vb6jd"}]]);/**
|
||
* @license lucide-react v0.462.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const gr=r("Fuel",[["line",{x1:"3",x2:"15",y1:"22",y2:"22",key:"xegly4"}],["line",{x1:"4",x2:"14",y1:"9",y2:"9",key:"xcnuvu"}],["path",{d:"M14 22V4a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v18",key:"16j0yd"}],["path",{d:"M14 13h2a2 2 0 0 1 2 2v2a2 2 0 0 0 2 2a2 2 0 0 0 2-2V9.83a2 2 0 0 0-.59-1.42L18 5",key:"7cu91f"}]]);/**
|
||
* @license lucide-react v0.462.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const kr=r("Hammer",[["path",{d:"m15 12-8.373 8.373a1 1 0 1 1-3-3L12 9",key:"eefl8a"}],["path",{d:"m18 15 4-4",key:"16gjal"}],["path",{d:"m21.5 11.5-1.914-1.914A2 2 0 0 1 19 8.172V7l-2.26-2.26a6 6 0 0 0-4.202-1.756L9 2.96l.92.82A6.18 6.18 0 0 1 12 8.4V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5",key:"b7pghm"}]]);/**
|
||
* @license lucide-react v0.462.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const te=r("Hospital",[["path",{d:"M12 6v4",key:"16clxf"}],["path",{d:"M14 14h-4",key:"esezmu"}],["path",{d:"M14 18h-4",key:"16mqa2"}],["path",{d:"M14 8h-4",key:"z8ypaz"}],["path",{d:"M18 12h2a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-9a2 2 0 0 1 2-2h2",key:"b1k337"}],["path",{d:"M18 22V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v18",key:"16g51d"}]]);/**
|
||
* @license lucide-react v0.462.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const oa=r("Lamp",[["path",{d:"M8 2h8l4 10H4L8 2Z",key:"9dma5w"}],["path",{d:"M12 12v6",key:"3ahymv"}],["path",{d:"M8 22v-2c0-1.1.9-2 2-2h4a2 2 0 0 1 2 2v2H8Z",key:"mwf4oh"}]]);/**
|
||
* @license lucide-react v0.462.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const br=r("Library",[["path",{d:"m16 6 4 14",key:"ji33uf"}],["path",{d:"M12 6v14",key:"1n7gus"}],["path",{d:"M8 8v12",key:"1gg7y9"}],["path",{d:"M4 4v16",key:"6qkkli"}]]);/**
|
||
* @license lucide-react v0.462.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const vr=r("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);/**
|
||
* @license lucide-react v0.462.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const xr=r("Maximize",[["path",{d:"M8 3H5a2 2 0 0 0-2 2v3",key:"1dcmit"}],["path",{d:"M21 8V5a2 2 0 0 0-2-2h-3",key:"1e4gt3"}],["path",{d:"M3 16v3a2 2 0 0 0 2 2h3",key:"wsl5sc"}],["path",{d:"M16 21h3a2 2 0 0 0 2-2v-3",key:"18trek"}]]);/**
|
||
* @license lucide-react v0.462.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const fr=r("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/**
|
||
* @license lucide-react v0.462.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const jr=r("Paintbrush",[["path",{d:"m14.622 17.897-10.68-2.913",key:"vj2p1u"}],["path",{d:"M18.376 2.622a1 1 0 1 1 3.002 3.002L17.36 9.643a.5.5 0 0 0 0 .707l.944.944a2.41 2.41 0 0 1 0 3.408l-.944.944a.5.5 0 0 1-.707 0L8.354 7.348a.5.5 0 0 1 0-.707l.944-.944a2.41 2.41 0 0 1 3.408 0l.944.944a.5.5 0 0 0 .707 0z",key:"18tc5c"}],["path",{d:"M9 8c-1.804 2.71-3.97 3.46-6.583 3.948a.507.507 0 0 0-.302.819l7.32 8.883a1 1 0 0 0 1.185.204C12.735 20.405 16 16.792 16 15",key:"ytzfxy"}]]);/**
|
||
* @license lucide-react v0.462.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const ca=r("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]);/**
|
||
* @license lucide-react v0.462.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const _r=r("PlugZap",[["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m18 3-4 4h6l-4 4",key:"16psg9"}]]);/**
|
||
* @license lucide-react v0.462.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Mr=r("Power",[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]);/**
|
||
* @license lucide-react v0.462.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const ie=r("Route",[["circle",{cx:"6",cy:"19",r:"3",key:"1kj8tv"}],["path",{d:"M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15",key:"1d8sl"}],["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}]]);/**
|
||
* @license lucide-react v0.462.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const wr=r("Ship",[["path",{d:"M12 10.189V14",key:"1p8cqu"}],["path",{d:"M12 2v3",key:"qbqxhf"}],["path",{d:"M19 13V7a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2v6",key:"qpkstq"}],["path",{d:"M19.38 20A11.6 11.6 0 0 0 21 14l-8.188-3.639a2 2 0 0 0-1.624 0L3 14a11.6 11.6 0 0 0 2.81 7.76",key:"7tigtc"}],["path",{d:"M2 21c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1s1.2 1 2.5 1c2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"1924j5"}]]);/**
|
||
* @license lucide-react v0.462.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Nr=r("Shirt",[["path",{d:"M20.38 3.46 16 2a4 4 0 0 1-8 0L3.62 3.46a2 2 0 0 0-1.34 2.23l.58 3.47a1 1 0 0 0 .99.84H6v10c0 1.1.9 2 2 2h8a2 2 0 0 0 2-2V10h2.15a1 1 0 0 0 .99-.84l.58-3.47a2 2 0 0 0-1.34-2.23z",key:"1wgbhj"}]]);/**
|
||
* @license lucide-react v0.462.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Qr=r("ShoppingCart",[["circle",{cx:"8",cy:"21",r:"1",key:"jimo8o"}],["circle",{cx:"19",cy:"21",r:"1",key:"13723u"}],["path",{d:"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12",key:"9zh506"}]]);/**
|
||
* @license lucide-react v0.462.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Sr=r("Shrub",[["path",{d:"M12 22v-7l-2-2",key:"eqv9mc"}],["path",{d:"M17 8v.8A6 6 0 0 1 13.8 20H10A6.5 6.5 0 0 1 7 8a5 5 0 0 1 10 0Z",key:"ubcgy"}],["path",{d:"m14 14-2 2",key:"847xa2"}]]);/**
|
||
* @license lucide-react v0.462.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const ne=r("Signpost",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M12 3v3",key:"1n5kay"}],["path",{d:"M18 6a2 2 0 0 1 1.387.56l2.307 2.22a1 1 0 0 1 0 1.44l-2.307 2.22A2 2 0 0 1 18 13H6a2 2 0 0 1-1.387-.56l-2.306-2.22a1 1 0 0 1 0-1.44l2.306-2.22A2 2 0 0 1 6 6z",key:"gqqp9m"}]]);/**
|
||
* @license lucide-react v0.462.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Cr=r("Smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]);/**
|
||
* @license lucide-react v0.462.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Tr=r("Theater",[["path",{d:"M2 10s3-3 3-8",key:"3xiif0"}],["path",{d:"M22 10s-3-3-3-8",key:"ioaa5q"}],["path",{d:"M10 2c0 4.4-3.6 8-8 8",key:"16fkpi"}],["path",{d:"M14 2c0 4.4 3.6 8 8 8",key:"b9eulq"}],["path",{d:"M2 10s2 2 2 5",key:"1au1lb"}],["path",{d:"M22 10s-2 2-2 5",key:"qi2y5e"}],["path",{d:"M8 15h8",key:"45n4r"}],["path",{d:"M2 22v-1a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v1",key:"1vsc2m"}],["path",{d:"M14 22v-1a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v1",key:"hrha4u"}]]);/**
|
||
* @license lucide-react v0.462.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Vr=r("TrainFront",[["path",{d:"M8 3.1V7a4 4 0 0 0 8 0V3.1",key:"1v71zp"}],["path",{d:"m9 15-1-1",key:"1yrq24"}],["path",{d:"m15 15 1-1",key:"1t0d6s"}],["path",{d:"M9 19c-2.8 0-5-2.2-5-5v-4a8 8 0 0 1 16 0v4c0 2.8-2.2 5-5 5Z",key:"1p0hjs"}],["path",{d:"m8 19-2 3",key:"13i0xs"}],["path",{d:"m16 19 2 3",key:"xo31yx"}]]);/**
|
||
* @license lucide-react v0.462.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const da=r("TramFront",[["rect",{width:"16",height:"16",x:"4",y:"3",rx:"2",key:"1wxw4b"}],["path",{d:"M4 11h16",key:"mpoxn0"}],["path",{d:"M12 3v8",key:"1h2ygw"}],["path",{d:"m8 19-2 3",key:"13i0xs"}],["path",{d:"m18 22-2-3",key:"1p0ohu"}],["path",{d:"M8 15h.01",key:"a7atzg"}],["path",{d:"M16 15h.01",key:"rnfrdf"}]]);/**
|
||
* @license lucide-react v0.462.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Lr=r("TreeDeciduous",[["path",{d:"M8 19a4 4 0 0 1-2.24-7.32A3.5 3.5 0 0 1 9 6.03V6a3 3 0 1 1 6 0v.04a3.5 3.5 0 0 1 3.24 5.65A4 4 0 0 1 16 19Z",key:"oadzkq"}],["path",{d:"M12 19v3",key:"npa21l"}]]);/**
|
||
* @license lucide-react v0.462.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const W=r("UtensilsCrossed",[["path",{d:"m16 2-2.3 2.3a3 3 0 0 0 0 4.2l1.8 1.8a3 3 0 0 0 4.2 0L22 8",key:"n7qcjb"}],["path",{d:"M15 15 3.3 3.3a4.2 4.2 0 0 0 0 6l7.3 7.3c.7.7 2 .7 2.8 0L15 15Zm0 0 7 7",key:"d0u48b"}],["path",{d:"m2.1 21.8 6.4-6.3",key:"yn04lh"}],["path",{d:"m19 5-7 7",key:"194lzd"}]]);/**
|
||
* @license lucide-react v0.462.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Br=r("Warehouse",[["path",{d:"M22 8.35V20a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V8.35A2 2 0 0 1 3.26 6.5l8-3.2a2 2 0 0 1 1.48 0l8 3.2A2 2 0 0 1 22 8.35Z",key:"gksnxg"}],["path",{d:"M6 18h12",key:"9pbo8z"}],["path",{d:"M6 14h12",key:"4cwo0f"}],["rect",{width:"12",height:"12",x:"6",y:"10",key:"apd30q"}]]);/**
|
||
* @license lucide-react v0.462.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Pr=r("Wifi",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]]);/**
|
||
* @license lucide-react v0.462.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Fr=r("Wind",[["path",{d:"M12.8 19.6A2 2 0 1 0 14 16H2",key:"148xed"}],["path",{d:"M17.5 8a2.5 2.5 0 1 1 2 4H2",key:"1u4tom"}],["path",{d:"M9.8 4.4A2 2 0 1 1 11 8H2",key:"75valh"}]]);/**
|
||
* @license lucide-react v0.462.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Ar=r("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]),U=[{id:"transport",name:"Kollektivtrafik & Transport",icon:_e,description:"Hållplatser, stationer och transportinfrastruktur",types:[{value:"bus_stop",label:"Busshållplatser",icon:_e,description:"Hållplatser och busskurer",osmQuery:"highway=bus_stop"},{value:"bus_shelter",label:"Busskurer",icon:ur,description:"Väderskydd vid hållplatser",osmQuery:"amenity=shelter"},{value:"train_station",label:"Tågstationer",icon:da,description:"Järnvägsstationer",osmQuery:"railway=station"},{value:"subway_entrance",label:"Tunnelbaneentréer",icon:Vr,description:"Ingångar till tunnelbana",osmQuery:"railway=subway_entrance"},{value:"tram_stop",label:"Spårvagnshållplatser",icon:da,description:"Hållplatser för spårvagn",osmQuery:"railway=tram_stop"},{value:"ferry_terminal",label:"Färjeterminaler",icon:wr,description:"Hamnar och färjelägen",osmQuery:"amenity=ferry_terminal"},{value:"airport",label:"Flygplatser",icon:Ea,description:"Flygplatsterminaler",osmQuery:"aeroway=terminal"},{value:"taxi_stand",label:"Taxistationer",icon:Ae,description:"Taxistolpar och väntplatser",osmQuery:"amenity=taxi"}]},{id:"parking",name:"Parkering & Laddning",icon:ia,description:"Parkeringar, cykelställ och laddinfrastruktur",types:[{value:"bike_parking",label:"Cykelparkering",icon:Pa,description:"Cykelställ och parkeringar",osmQuery:"amenity=bicycle_parking"},{value:"car_parking",label:"Bilparkering",icon:ia,description:"Parkeringsplatser och P-hus",osmQuery:"amenity=parking"},{value:"motorcycle_parking",label:"MC-parkering",icon:Ae,description:"Parkeringar för motorcyklar",osmQuery:"amenity=motorcycle_parking"},{value:"electric_charging",label:"Elbilsladdare",icon:be,description:"Laddstationer för elbilar",osmQuery:"amenity=charging_station"},{value:"bike_charging",label:"Elcykelladdning",icon:_r,description:"Laddning för elcyklar",osmQuery:"amenity=charging_station"},{value:"parking_meter",label:"Parkeringsautomater",icon:Za,description:"Betalautomater för parkering",osmQuery:"amenity=vending_machine"}]},{id:"street_furniture",name:"Gatumöbler & Infrastruktur",icon:oa,description:"Bänkar, belysning, papperskorgar och annan gatuutrustning",types:[{value:"park_bench",label:"Parkbänkar",icon:le,description:"Sittbänkar i parker",osmQuery:"amenity=bench"},{value:"street_bench",label:"Gatubänkar",icon:le,description:"Bänkar längs gator",osmQuery:"amenity=bench"},{value:"trash_bin",label:"Papperskorgar",icon:Wa,description:"Soptunnor och avfallskärl",osmQuery:"amenity=waste_basket"},{value:"recycling",label:"Återvinningsstationer",icon:$e,description:"Återvinningsbehållare",osmQuery:"amenity=recycling"},{value:"street_lamp",label:"Gatubelysning",icon:oa,description:"Gatlyktor och lampor",osmQuery:"highway=street_lamp"},{value:"park_lamp",label:"Parkbelysning",icon:vr,description:"Belysning i parker",osmQuery:"highway=street_lamp"},{value:"fountain",label:"Fontäner",icon:se,description:"Dekorativa fontäner",osmQuery:"amenity=fountain"},{value:"drinking_water",label:"Dricksvattenposter",icon:se,description:"Vattenfontäner och kranar",osmQuery:"amenity=drinking_water"},{value:"clock",label:"Offentliga klockor",icon:Ua,description:"Klockor på gator och torg",osmQuery:"amenity=clock"},{value:"post_box",label:"Brevlådor",icon:Je,description:"Postlådor och brevlådor",osmQuery:"amenity=post_box"},{value:"telephone",label:"Telefonkiosker",icon:ca,description:"Offentliga telefoner",osmQuery:"amenity=telephone"},{value:"information_board",label:"Informationstavlor",icon:mr,description:"Anslagstavlor och info",osmQuery:"tourism=information"},{value:"wayfinding",label:"Vägvisningsskyltar",icon:ne,description:"Vägvisare och skyltar",osmQuery:"information=guidepost"}]},{id:"recreation",name:"Rekreation & Fritid",icon:na,description:"Lekplatser, utegym, parker och grönområden",types:[{value:"playground",label:"Lekplatser",icon:ta,description:"Lekplatser för barn",osmQuery:"leisure=playground"},{value:"outdoor_gym",label:"Utegym",icon:na,description:"Fitness-stationer utomhus",osmQuery:"leisure=fitness_station"},{value:"dog_park",label:"Hundrastgårdar",icon:Ia,description:"Inhägnade områden för hundar",osmQuery:"leisure=dog_park"},{value:"sports_pitch",label:"Sportplaner",icon:R,description:"Fotbollsplaner, tennisbanor etc",osmQuery:"leisure=pitch"},{value:"skate_park",label:"Skateparker",icon:R,description:"Ramper och skateanläggningar",osmQuery:"leisure=skatepark"},{value:"swimming_pool",label:"Utomhusbad",icon:Ze,description:"Utomhuspooler",osmQuery:"leisure=swimming_pool"},{value:"beach",label:"Badplatser",icon:Ze,description:"Stränder och badbryggor",osmQuery:"natural=beach"},{value:"picnic_area",label:"Picknickplatser",icon:W,description:"Bord och bänkar för picknick",osmQuery:"tourism=picnic_site"},{value:"bbq",label:"Grillplatser",icon:W,description:"Publika grillar",osmQuery:"amenity=bbq"},{value:"golf_course",label:"Golfbanor",icon:$a,description:"Golfanläggningar",osmQuery:"leisure=golf_course"}]},{id:"nature",name:"Natur & Parker",icon:ke,description:"Parker, naturområden, stigar och grönska",types:[{value:"park",label:"Parker",icon:ke,description:"Stadsparker och grönområden",osmQuery:"leisure=park"},{value:"nature_reserve",label:"Naturreservat",icon:qa,description:"Skyddade naturområden",osmQuery:"leisure=nature_reserve"},{value:"hiking_trail",label:"Vandringsleder",icon:he,description:"Märkta stigar och leder",osmQuery:"highway=path"},{value:"viewpoint",label:"Utsiktsplatser",icon:Xe,description:"Utsiktspunkter",osmQuery:"tourism=viewpoint"},{value:"garden",label:"Trädgårdar",icon:We,description:"Botaniska och offentliga trädgårdar",osmQuery:"leisure=garden"},{value:"allotment",label:"Koloniträdgårdar",icon:Sr,description:"Odlingslotter",osmQuery:"landuse=allotments"},{value:"tree_monument",label:"Skyddade träd",icon:Lr,description:"Naturminnen och gamla träd",osmQuery:"natural=tree"}]},{id:"buildings_residential",name:"Bostäder & Fastigheter",icon:ee,description:"Bostadshus, fasader och entréer",types:[{value:"apartment_building",label:"Flerbostadshus",icon:ae,description:"Hyreshus och bostadsrätter",osmQuery:"building=apartments"},{value:"house",label:"Villor & radhus",icon:ee,description:"Enfamiljshus",osmQuery:"building=house"},{value:"building_facade",label:"Fasader",icon:ve,description:"Husfasader och exteriörer",osmQuery:"building=yes"},{value:"building_entrance",label:"Entréer",icon:pr,description:"Portentréer och trapphus",osmQuery:"entrance=main"},{value:"balcony",label:"Balkonger",icon:ee,description:"Balkonger och terrasser",osmQuery:"building=yes"},{value:"roof",label:"Tak",icon:ee,description:"Taklandskap och takmaterial",osmQuery:"building=yes"},{value:"courtyard",label:"Innergårdar",icon:la,description:"Gårdar mellan byggnader",osmQuery:"landuse=residential"},{value:"childhood_home",label:"Barndomshem",icon:xe,description:"Personliga platser och minnen",osmQuery:"building=yes"}]},{id:"buildings_commercial",name:"Kommersiella byggnader",icon:ve,description:"Kontor, butiker och kommersiella fastigheter",types:[{value:"office_building",label:"Kontorsbyggnader",icon:ve,description:"Kontorsfastigheter",osmQuery:"building=office"},{value:"headquarters",label:"Huvudkontor",icon:L,description:"Företagshuvudkontor",osmQuery:"office=company"},{value:"shopping_mall",label:"Köpcentrum",icon:Ka,description:"Gallerior och köpcenter",osmQuery:"shop=mall"},{value:"retail_store",label:"Butiker",icon:Z,description:"Butiksfasader",osmQuery:"shop=yes"},{value:"supermarket",label:"Matbutiker",icon:Qr,description:"Livsmedelsbutiker",osmQuery:"shop=supermarket"},{value:"warehouse",label:"Lagerbyggnader",icon:Br,description:"Lager och logistik",osmQuery:"building=warehouse"},{value:"factory",label:"Industrifastigheter",icon:hr,description:"Fabriker och industri",osmQuery:"building=industrial"},{value:"hotel",label:"Hotell",icon:ae,description:"Hotellfasader",osmQuery:"tourism=hotel"}]},{id:"retail_chains",name:"Butikskedjor & Restauranger",icon:Z,description:"Kedjor, franchises och restauranger",types:[{value:"gas_station",label:"Bensinstationer",icon:gr,description:"Mackar och drivmedel",osmQuery:"amenity=fuel"},{value:"fast_food",label:"Snabbmat",icon:W,description:"Snabbmatsrestauranger",osmQuery:"amenity=fast_food"},{value:"restaurant",label:"Restauranger",icon:W,description:"Restaurangfasader",osmQuery:"amenity=restaurant"},{value:"cafe",label:"Caféer",icon:Oa,description:"Kaféer och konditorier",osmQuery:"amenity=cafe"},{value:"pharmacy",label:"Apotek",icon:te,description:"Apotekslokaler",osmQuery:"amenity=pharmacy"},{value:"bank",label:"Banker",icon:L,description:"Bankkontor",osmQuery:"amenity=bank"},{value:"atm",label:"Bankomater",icon:L,description:"Uttagsautomater",osmQuery:"amenity=atm"},{value:"convenience_store",label:"Närbutiker",icon:Z,description:"Kiosker och servicebutiker",osmQuery:"shop=convenience"},{value:"electronics_store",label:"Elektronikbutiker",icon:Cr,description:"Teknikbutiker",osmQuery:"shop=electronics"},{value:"clothing_store",label:"Klädbutiker",icon:Nr,description:"Modebutiker",osmQuery:"shop=clothes"}]},{id:"advertising",name:"Reklam & Skyltar",icon:ne,description:"Reklamskyltar, affischer och marknadsföring",types:[{value:"billboard",label:"Reklamtavlor",icon:Ya,description:"Stora reklamskyltar",osmQuery:"advertising=billboard"},{value:"poster_board",label:"Affischtavlor",icon:yr,description:"Affischpelare och tavlor",osmQuery:"advertising=poster_box"},{value:"digital_display",label:"Digitala skärmar",icon:fr,description:"LED-skyltar och skärmar",osmQuery:"advertising=screen"},{value:"shop_sign",label:"Butiksskyltar",icon:Z,description:"Fasadskyltar på butiker",osmQuery:"advertising=sign"},{value:"neon_sign",label:"Neonsklyltar",icon:He,description:"Lysande skyltar",osmQuery:"advertising=sign"},{value:"street_ad",label:"Gatupelare",icon:ne,description:"Reklampelare på gator",osmQuery:"advertising=column"},{value:"bus_ad",label:"Bussreklam",icon:_e,description:"Reklam på bussar och hållplatser",osmQuery:"advertising=board"}]},{id:"seasonal",name:"Säsongsrelaterat",icon:Ue,description:"Juldekorationer, sommarutrustning och säsongsbetonat",types:[{value:"christmas_decoration",label:"Juldekorationer",icon:He,description:"Julbelysning och prydnader",osmQuery:"tourism=attraction"},{value:"christmas_tree",label:"Julgranar",icon:ke,description:"Offentliga julgranar",osmQuery:"natural=tree"},{value:"christmas_market",label:"Julmarknader",icon:Xa,description:"Julmarknadstånd",osmQuery:"amenity=marketplace"},{value:"easter_decoration",label:"Påskdekorationer",icon:We,description:"Påskpynt",osmQuery:"tourism=attraction"},{value:"midsummer",label:"Midsommarstänger",icon:De,description:"Midsommarfirande",osmQuery:"tourism=attraction"},{value:"ice_rink",label:"Isbanor",icon:Ue,description:"Skridskobanor",osmQuery:"leisure=ice_rink"},{value:"outdoor_seating",label:"Uteserveringar",icon:W,description:"Säsongsbetonade uteplatser",osmQuery:"amenity=restaurant"}]},{id:"public_services",name:"Offentliga byggnader",icon:L,description:"Myndigheter, skolor och offentlig service",types:[{value:"town_hall",label:"Stadshus",icon:L,description:"Kommunhus och stadshus",osmQuery:"amenity=townhall"},{value:"courthouse",label:"Domstolar",icon:L,description:"Tingsrätter och domstolar",osmQuery:"amenity=courthouse"},{value:"police_station",label:"Polisstationer",icon:ea,description:"Poliskontor",osmQuery:"amenity=police"},{value:"fire_station",label:"Brandstationer",icon:fe,description:"Brandkårer",osmQuery:"amenity=fire_station"},{value:"hospital",label:"Sjukhus",icon:te,description:"Sjukhusentréer",osmQuery:"amenity=hospital"},{value:"health_center",label:"Vårdcentraler",icon:te,description:"Vårdmottagningar",osmQuery:"amenity=clinic"},{value:"school",label:"Skolor",icon:aa,description:"Grundskolor och gymnasium",osmQuery:"amenity=school"},{value:"kindergarten",label:"Förskolor",icon:ta,description:"Dagis och förskolor",osmQuery:"amenity=kindergarten"},{value:"university",label:"Universitet",icon:aa,description:"Högskolor och universitet",osmQuery:"amenity=university"},{value:"library",label:"Bibliotek",icon:br,description:"Folkbibliotek",osmQuery:"amenity=library"},{value:"post_office",label:"Postkontor",icon:Je,description:"Postombud och kontor",osmQuery:"amenity=post_office"},{value:"social_facility",label:"Sociala inrättningar",icon:xe,description:"Äldreboenden, gruppboenden",osmQuery:"amenity=social_facility"}]},{id:"culture",name:"Kultur & Historia",icon:je,description:"Museer, kyrkor, monument och kulturarv",types:[{value:"museum",label:"Museer",icon:je,description:"Museibyggnader",osmQuery:"tourism=museum"},{value:"church",label:"Kyrkor",icon:Me,description:"Kyrkor och kapell",osmQuery:"amenity=place_of_worship"},{value:"mosque",label:"Moskéer",icon:Me,description:"Moskéer",osmQuery:"amenity=place_of_worship"},{value:"synagogue",label:"Synagogor",icon:Me,description:"Synagogor",osmQuery:"amenity=place_of_worship"},{value:"theater",label:"Teatrar",icon:Tr,description:"Teaterbyggnader",osmQuery:"amenity=theatre"},{value:"cinema",label:"Biografer",icon:we,description:"Biobyggnader",osmQuery:"amenity=cinema"},{value:"concert_hall",label:"Konserthus",icon:Ga,description:"Konsertlokaler",osmQuery:"amenity=concert_hall"},{value:"art_gallery",label:"Konstgallerier",icon:je,description:"Gallerier",osmQuery:"tourism=gallery"},{value:"monument",label:"Monument",icon:L,description:"Statyer och minnesmärken",osmQuery:"historic=monument"},{value:"memorial",label:"Minnesmärken",icon:Ye,description:"Minnesplatser",osmQuery:"historic=memorial"},{value:"historic_building",label:"Historiska byggnader",icon:ae,description:"K-märkta byggnader",osmQuery:"historic=building"},{value:"castle",label:"Slott & herrgårdar",icon:Ye,description:"Slott och gods",osmQuery:"historic=castle"},{value:"ruins",label:"Ruiner",icon:ae,description:"Historiska ruiner",osmQuery:"historic=ruins"}]},{id:"infrastructure",name:"Infrastruktur & Teknik",icon:Ar,description:"El, vatten, tele och annan teknisk infrastruktur",types:[{value:"electrical_cabinet",label:"Elskåp",icon:be,description:"Fördelningsskåp för el",osmQuery:"power=cabinet"},{value:"transformer",label:"Transformatorstationer",icon:be,description:"Transformatorer",osmQuery:"power=transformer"},{value:"power_pole",label:"Elstolpar",icon:Mr,description:"Ledningsstolpar",osmQuery:"power=pole"},{value:"telecom_cabinet",label:"Teleskåp",icon:Pr,description:"Telekomskåp",osmQuery:"telecom=cabinet"},{value:"cell_tower",label:"Mobilmaster",icon:er,description:"Telemaster",osmQuery:"man_made=mast"},{value:"water_tower",label:"Vattentorn",icon:se,description:"Vattentorn",osmQuery:"man_made=water_tower"},{value:"fire_hydrant",label:"Brandposter",icon:se,description:"Brandposter för räddningstjänst",osmQuery:"emergency=fire_hydrant"},{value:"manhole",label:"Brunnslock",icon:R,description:"VA-brunnar och lock",osmQuery:"man_made=manhole"},{value:"street_cabinet",label:"Teknikskåp",icon:ar,description:"Diverse teknikskåp",osmQuery:"man_made=street_cabinet"},{value:"wind_turbine",label:"Vindkraftverk",icon:Fr,description:"Vindsnurror",osmQuery:"generator:source=wind"},{value:"solar_panel",label:"Solpaneler",icon:De,description:"Solcellsanläggningar",osmQuery:"generator:source=solar"}]},{id:"safety",name:"Säkerhet & Tillgänglighet",icon:ea,description:"Säkerhetsutrustning, tillgänglighetsanpassningar och nödutrustning",types:[{value:"defibrillator",label:"Hjärtstartare",icon:xe,description:"AED-enheter",osmQuery:"emergency=defibrillator"},{value:"emergency_phone",label:"Nödtelefoner",icon:ca,description:"Larmtelefoner",osmQuery:"emergency=phone"},{value:"first_aid",label:"Första hjälpen",icon:te,description:"Första hjälpen-stationer",osmQuery:"emergency=first_aid_kit"},{value:"fire_extinguisher",label:"Brandsläckare",icon:fe,description:"Publika brandsläckare",osmQuery:"emergency=fire_extinguisher"},{value:"surveillance_camera",label:"Övervakningskameror",icon:Xe,description:"Säkerhetskameror",osmQuery:"man_made=surveillance"},{value:"wheelchair_ramp",label:"Rullstolsramper",icon:sa,description:"Tillgänglighetsanpassningar",osmQuery:"wheelchair=yes"},{value:"tactile_paving",label:"Ledstråk",icon:he,description:"Taktila plattor för synskadade",osmQuery:"tactile_paving=yes"},{value:"accessible_toilet",label:"Handikapptoaletter",icon:sa,description:"Tillgänglighetsanpassade toaletter",osmQuery:"toilets:wheelchair=yes"},{value:"elevator",label:"Hissar",icon:xr,description:"Publika hissar",osmQuery:"highway=elevator"}]},{id:"road_infrastructure",name:"Vägar & Trafik",icon:ie,description:"Vägar, broar, tunnlar och trafikutrustning",types:[{value:"traffic_signal",label:"Trafikljus",icon:fe,description:"Trafiksignaler",osmQuery:"highway=traffic_signals"},{value:"street_sign",label:"Gatuskyltar",icon:ne,description:"Vägskyltar",osmQuery:"traffic_sign=yes"},{value:"speed_camera",label:"Fartkameror",icon:we,description:"Hastighetskameror",osmQuery:"highway=speed_camera"},{value:"road_barrier",label:"Vägbommar",icon:Fa,description:"Bommar och barriärer",osmQuery:"barrier=lift_gate"},{value:"bridge",label:"Broar",icon:ie,description:"Väg- och gångbroar",osmQuery:"man_made=bridge"},{value:"tunnel",label:"Tunnlar",icon:ie,description:"Väg- och gångtunnlar",osmQuery:"tunnel=yes"},{value:"roundabout",label:"Rondeller",icon:$e,description:"Cirkulationsplatser",osmQuery:"junction=roundabout"},{value:"pedestrian_crossing",label:"Övergångsställen",icon:he,description:"Zebramarkering",osmQuery:"highway=crossing"},{value:"bollard",label:"Pollare",icon:R,description:"Trafikpollare",osmQuery:"barrier=bollard"},{value:"guardrail",label:"Räcken",icon:la,description:"Vägräcken",osmQuery:"barrier=guard_rail"}]},{id:"construction",name:"Bygg & Underhåll",icon:re,description:"Byggplatser, underhållsarbeten och renoveringar",types:[{value:"construction_site",label:"Byggarbetsplatser",icon:re,description:"Nybyggnation",osmQuery:"landuse=construction"},{value:"scaffolding",label:"Byggnadsställningar",icon:re,description:"Ställningar på fasader",osmQuery:"construction=yes"},{value:"road_work",label:"Vägarbeten",icon:re,description:"Pågående vägarbeten",osmQuery:"highway=construction"},{value:"demolition",label:"Rivningsobjekt",icon:kr,description:"Byggnader under rivning",osmQuery:"demolished:building=yes"},{value:"renovation",label:"Renoveringsobjekt",icon:jr,description:"Pågående renoveringar",osmQuery:"construction=yes"}]},{id:"custom",name:"Anpassat",icon:Ja,description:"Egna platstyper och speciella behov",types:[{value:"custom_address",label:"Specifik adress",icon:le,description:"En exakt adress eller plats",osmQuery:""},{value:"custom_area",label:"Anpassat område",icon:R,description:"Rita eget område på kartan",osmQuery:""},{value:"competitor_store",label:"Konkurrentbutiker",icon:Z,description:"Specifika konkurrenter",osmQuery:"shop=yes"},{value:"event_location",label:"Eventplatser",icon:rr,description:"Tillfälliga evenemang",osmQuery:"tourism=attraction"},{value:"street_segment",label:"Gatusegment",icon:ie,description:"Alla fastigheter på en gata",osmQuery:"highway=residential"}]}],Hr=U.flatMap(l=>l.types),ua=l=>Hr.find(x=>x.value===l),Dr=({selectedType:l,onSelect:x})=>{const[h,ce]=t.useState(""),[z,k]=t.useState([]),S=t.useMemo(()=>{if(!h.trim())return U;const i=h.toLowerCase();return U.map(n=>{const m=n.types.filter(f=>f.label.toLowerCase().includes(i)||f.description.toLowerCase().includes(i)||f.value.toLowerCase().includes(i));return{...n,types:m}}).filter(n=>n.types.length>0)},[h]),u=h.trim()?S.map(i=>i.id):z,B=i=>{h.trim()||k(n=>n.includes(i)?n.filter(m=>m!==i):[...n,i])},P=t.useMemo(()=>{for(const i of U){const n=i.types.find(m=>m.value===l);if(n)return{type:n,category:i}}return null},[l]),$=U.reduce((i,n)=>i+n.types.length,0);return e.jsxs(M,{className:"glass-card",children:[e.jsxs(w,{className:"pb-3",children:[e.jsxs(N,{className:"flex items-center gap-2",children:[e.jsx(le,{className:"w-5 h-5"}),"Välj platstyp"]}),e.jsxs(oe,{children:[$,"+ platstyper tillgängliga – sök eller bläddra i kategorier"]})]}),e.jsxs(Q,{className:"space-y-4",children:[P&&e.jsxs("div",{className:"flex items-center gap-2 p-3 rounded-lg bg-primary/10 border border-primary/20",children:[e.jsx(Qe,{className:"w-4 h-4 text-primary flex-shrink-0"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"font-medium text-sm text-foreground truncate",children:P.type.label}),e.jsx("p",{className:"text-xs text-muted-foreground truncate",children:P.category.name})]}),e.jsx(tr,{variant:"secondary",className:"flex-shrink-0",children:"Vald"})]}),e.jsxs("div",{className:"relative",children:[e.jsx(Se,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),e.jsx(Ne,{value:h,onChange:i=>ce(i.target.value),placeholder:"Sök platstyp...",className:"pl-10"})]}),e.jsx(sr,{className:"h-[400px] pr-4",children:e.jsx("div",{className:"space-y-2",children:S.length===0?e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsxs("p",{children:['Ingen platstyp hittades för "',h,'"']}),e.jsx("p",{className:"text-sm mt-1",children:"Prova ett annat sökord"})]}):S.map(i=>{const n=i.icon,m=u.includes(i.id),f=i.types.some(d=>d.value===l);return e.jsxs("div",{className:"border border-border rounded-lg overflow-hidden",children:[e.jsxs("button",{onClick:()=>B(i.id),className:D("w-full flex items-center gap-3 p-3 text-left transition-colors","hover:bg-secondary/50",f&&"bg-primary/5"),children:[e.jsx(n,{className:D("w-5 h-5 flex-shrink-0",f?"text-primary":"text-muted-foreground")}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:D("font-medium text-sm truncate",f&&"text-primary"),children:i.name}),e.jsxs("p",{className:"text-xs text-muted-foreground truncate",children:[i.types.length," platstyper"]})]}),m?e.jsx(ir,{className:"w-4 h-4 text-muted-foreground flex-shrink-0"}):e.jsx(nr,{className:"w-4 h-4 text-muted-foreground flex-shrink-0"})]}),m&&e.jsx("div",{className:"border-t border-border bg-background/50",children:e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-1 p-2",children:i.types.map(d=>{const de=d.icon,j=l===d.value;return e.jsxs("button",{onClick:()=>x(d.value),className:D("flex items-start gap-3 p-3 rounded-lg text-left transition-all",j?"bg-primary/10 border-2 border-primary":"border-2 border-transparent hover:bg-secondary/50"),children:[e.jsx(de,{className:D("w-4 h-4 mt-0.5 flex-shrink-0",j?"text-primary":"text-muted-foreground")}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:D("font-medium text-sm truncate",j&&"text-primary"),children:d.label}),e.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2",children:d.description})]}),j&&e.jsx(Qe,{className:"w-4 h-4 text-primary flex-shrink-0 mt-0.5"})]},d.value)})})})]},i.id)})})})]})]})},ma=[{value:1,label:"Mån"},{value:2,label:"Tis"},{value:3,label:"Ons"},{value:4,label:"Tor"},{value:5,label:"Fre"},{value:6,label:"Lör"},{value:7,label:"Sön"}],pa=[{value:7,label:"1 vecka"},{value:14,label:"2 veckor"},{value:30,label:"1 månad"},{value:90,label:"3 månader"},{value:180,label:"6 månader"},{value:365,label:"1 år"}],js=()=>{var Ve,Le,Be;const l=Aa(),{user:x}=Ha(),{isLoading:h,isActiveOrderer:ce}=Da(),z=t.useRef(null),k=t.useRef(null),S=t.useRef([]),[u,B]=t.useState(1),[P,$]=t.useState(!1),[i,n]=t.useState(!1),[m,f]=t.useState(null),[d,de]=t.useState(""),[j,ha]=t.useState(""),[Ce,ya]=t.useState(""),[C,ga]=t.useState(""),[E,ka]=t.useState(""),[ue,ba]=t.useState(50),[T,va]=t.useState(1),[y,me]=t.useState("weekdays"),[I,xa]=t.useState([1,3,5]),[q,fa]=t.useState(7),[F,ja]=t.useState(30),[A,_a]=t.useState(50),[o,Ma]=t.useState([]),[wa,Na]=t.useState(null),H=300,J=T>0?A/T:A,Te=J<=H;t.useEffect(()=>{(async()=>{try{const s=await Ra();s&&f(s)}catch(s){console.error("Failed to fetch mapbox token:",s)}})()},[]),t.useEffect(()=>{if(!(u!==2||!m||!z.current)&&!k.current)return O.accessToken=m,k.current=new O.Map({container:z.current,style:"mapbox://styles/mapbox/streets-v12",center:[18.0686,59.3293],zoom:10}),()=>{k.current&&(k.current.remove(),k.current=null)}},[u,m]),t.useEffect(()=>{if(!k.current||o.length===0)return;S.current.forEach(s=>s.remove()),S.current=[];const a=new O.LngLatBounds;o.forEach(s=>{const c=new O.Marker({color:"#3b82f6"}).setLngLat([s.longitude,s.latitude]).setPopup(new O.Popup().setHTML(`<strong>${s.name||"Plats"}</strong>`)).addTo(k.current);S.current.push(c),a.extend([s.longitude,s.latitude])}),k.current.fitBounds(a,{padding:50})},[o]),t.useEffect(()=>{!x&&!h&&l("/auth")},[x,h,l]);const Qa=async()=>{var a;if(!C||!E){v.error("Välj platstyp och område först");return}n(!0);try{const{data:s,error:c}=await X.functions.invoke("search-locations",{body:{locationType:C,areaName:E}});if(c)throw c;if(s.error)throw new Error(s.error);Ma(s.locations||[]),Na(s.bbox),((a=s.locations)==null?void 0:a.length)>0?v.success(`Hittade ${s.locations.length} platser!`):v.info("Inga platser hittades i detta område")}catch(s){console.error("Search error:",s),v.error(s.message||"Kunde inte söka platser")}finally{n(!1)}},Sa=a=>{xa(s=>s.includes(a)?s.filter(c=>c!==a):[...s,a].sort((c,pe)=>c-pe))},Ca=()=>{const a=o.length||1;let s;if(y==="weekdays"){const c=Math.ceil(F/7);s=I.length*c}else s=Math.ceil(F/q);return A*T*a*s},Ta=async()=>{if(o.length===0){v.error("Inga platser valda");return}if(!Te){v.error(`Max ${H} kr per foto tillåtet. Nuvarande: ${Math.round(J)} kr/foto`);return}$(!0);try{const a=new Date;a.setDate(a.getDate()+F);const{data:s,error:c}=await X.from("campaigns").insert({created_by:x==null?void 0:x.id,title:d.trim(),description:j.trim(),target_description:j.trim(),instructions:Ce.trim()||null,location_type:C,search_area:E.trim(),search_bbox:wa,required_photos:T,reward_credits:A,radius_meters:ue,schedule_type:y,schedule_weekdays:y==="weekdays"?I:null,schedule_interval_days:y==="interval"?q:null,duration_days:F,active_until:a.toISOString(),status:"active",locations_count:o.length}).select("id").single();if(c)throw c;const pe=o.map(p=>({campaign_id:s.id,osm_id:p.osm_id,name:p.name,latitude:p.latitude,longitude:p.longitude})),{data:Va,error:Pe}=await X.from("campaign_locations").insert(pe).select("id");if(Pe)throw Pe;const K=[],La=new Date,Ba=new Date(a);for(const p of Va){let g=new Date(La);for(;g<=Ba;){const Y=g.getDay()===0?7:g.getDay();y==="weekdays"?(I.includes(Y)&&K.push({campaign_id:s.id,campaign_location_id:p.id,scheduled_date:g.toISOString().split("T")[0]}),g.setDate(g.getDate()+1)):(K.push({campaign_id:s.id,campaign_location_id:p.id,scheduled_date:g.toISOString().split("T")[0]}),g.setDate(g.getDate()+q))}}const Fe=500;for(let p=0;p<K.length;p+=Fe){const g=K.slice(p,p+Fe),{error:Y}=await X.from("scheduled_missions").insert(g);Y&&console.error("Error inserting scheduled missions batch:",Y)}v.success(`Kampanj skapad med ${o.length} platser och ${K.length} schemalagda uppdrag!`),l("/orderer/dashboard")}catch(a){console.error("Failed to create campaign:",a),v.error(a.message||"Kunde inte skapa kampanjen")}finally{$(!1)}};return h?e.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center",children:e.jsx(ye,{className:"w-8 h-8 animate-spin text-primary"})}):ce?e.jsxs("div",{className:"min-h-screen bg-background text-foreground pb-24",children:[e.jsxs("header",{className:"sticky top-0 z-10 bg-background/80 backdrop-blur-xl border-b border-border",children:[e.jsxs("div",{className:"flex items-center gap-3 px-4 py-4",children:[e.jsx(_,{variant:"ghost",size:"icon",onClick:()=>u>1?B(u-1):l(-1),children:e.jsx(ra,{className:"w-5 h-5"})}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-xl font-bold",children:"Skapa kampanj"}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Steg ",u," av 4"]})]})]}),e.jsx("div",{className:"h-1 bg-muted",children:e.jsx(G.div,{className:"h-full bg-primary",initial:{width:0},animate:{width:`${u/4*100}%`}})})]}),e.jsx("main",{className:"p-4 space-y-6",children:e.jsxs(or,{mode:"wait",children:[u===1&&e.jsxs(G.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},className:"space-y-6",children:[e.jsxs(M,{className:"glass-card",children:[e.jsx(w,{children:e.jsxs(N,{className:"flex items-center gap-2",children:[e.jsx(R,{className:"w-5 h-5"}),"Vad ska fotograferas?"]})}),e.jsxs(Q,{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(b,{htmlFor:"title",children:"Kampanjens namn *"}),e.jsx(Ne,{id:"title",value:d,onChange:a=>de(a.target.value),placeholder:"T.ex. Dokumentation av busskurer i Tyresö"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(b,{htmlFor:"targetDescription",children:"Vad ska fotas? *"}),e.jsx(ze,{id:"targetDescription",value:j,onChange:a=>ha(a.target.value),placeholder:"T.ex. Ta bild på hela busskuren framifrån, inkludera skador och klotter...",rows:3})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(b,{htmlFor:"instructions",children:"Instruktioner (valfritt)"}),e.jsx(ze,{id:"instructions",value:Ce,onChange:a=>ya(a.target.value),placeholder:"Specifika instruktioner till fotografen...",rows:2})]})]})]}),e.jsx(Dr,{selectedType:C,onSelect:ga}),e.jsx(_,{onClick:()=>d&&j&&C?B(2):v.error("Fyll i alla obligatoriska fält"),className:"w-full",size:"lg",children:"Fortsätt"})]},"step1"),u===2&&e.jsxs(G.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},className:"space-y-6",children:[e.jsxs(M,{className:"glass-card",children:[e.jsxs(w,{children:[e.jsxs(N,{className:"flex items-center gap-2",children:[e.jsx(Se,{className:"w-5 h-5"}),"Sök platser"]}),e.jsxs(oe,{children:["Ange kommun eller område för att hitta alla ",((Ve=ua(C))==null?void 0:Ve.label.toLowerCase())||"platser"]})]}),e.jsxs(Q,{className:"space-y-4",children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx(Ne,{value:E,onChange:a=>ka(a.target.value),placeholder:"T.ex. Tyresö, Nacka, Stockholm...",className:"flex-1"}),e.jsx(_,{onClick:Qa,disabled:i,children:i?e.jsx(ye,{className:"w-4 h-4 animate-spin"}):e.jsx(Se,{className:"w-4 h-4"})})]}),e.jsx("div",{ref:z,className:"w-full h-64 rounded-lg overflow-hidden border border-border"}),o.length>0&&e.jsxs("div",{className:"p-4 rounded-lg bg-primary/10 border border-primary/20",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx(Ee,{className:"w-5 h-5 text-primary"}),e.jsxs("span",{className:"font-semibold",children:[o.length," platser hittade"]})]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Alla platser kommer att få ett eget uppdrag med ditt valda schema"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(b,{children:["Radie per plats: ",ue," meter"]}),e.jsx(ge,{value:[ue],onValueChange:a=>ba(a[0]),min:25,max:200,step:25}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Fotografen måste vara inom denna radie för att genomföra uppdraget"})]})]})]}),e.jsxs(_,{onClick:()=>o.length>0?B(3):v.error("Sök efter platser först"),className:"w-full",size:"lg",disabled:o.length===0,children:["Fortsätt med ",o.length," platser"]})]},"step2"),u===3&&e.jsxs(G.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},className:"space-y-6",children:[e.jsxs(M,{className:"glass-card",children:[e.jsxs(w,{children:[e.jsxs(N,{className:"flex items-center gap-2",children:[e.jsx(cr,{className:"w-5 h-5"}),"Schemaläggning"]}),e.jsx(oe,{children:"Hur ofta ska foton tas på varje plats?"})]}),e.jsxs(Q,{className:"space-y-4",children:[e.jsxs(za,{value:y,onValueChange:a=>me(a),className:"space-y-3",children:[e.jsxs("div",{className:`flex items-center space-x-3 p-3 rounded-lg border cursor-pointer transition-colors ${y==="weekdays"?"border-primary bg-primary/5":"border-border hover:border-primary/50"}`,onClick:()=>me("weekdays"),children:[e.jsx(Ie,{value:"weekdays",id:"weekdays"}),e.jsxs(b,{htmlFor:"weekdays",className:"flex-1 cursor-pointer",children:[e.jsx("span",{className:"font-medium",children:"Specifika veckodagar"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"T.ex. måndag, onsdag, fredag"})]})]}),e.jsxs("div",{className:`flex items-center space-x-3 p-3 rounded-lg border cursor-pointer transition-colors ${y==="interval"?"border-primary bg-primary/5":"border-border hover:border-primary/50"}`,onClick:()=>me("interval"),children:[e.jsx(Ie,{value:"interval",id:"interval"}),e.jsxs(b,{htmlFor:"interval",className:"flex-1 cursor-pointer",children:[e.jsx("span",{className:"font-medium",children:"Intervall"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"T.ex. var 3:e dag, varje vecka"})]})]})]}),y==="weekdays"&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(b,{children:"Välj dagar"}),e.jsx("div",{className:"flex gap-2 flex-wrap",children:ma.map(a=>{const s=I.includes(a.value);return e.jsx("button",{onClick:()=>Sa(a.value),className:`px-4 py-2 rounded-lg border transition-all ${s?"bg-primary text-primary-foreground border-primary":"bg-secondary/20 border-border hover:border-primary/50"}`,children:a.label},a.value)})})]}),y==="interval"&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(b,{children:"Intervall"}),e.jsxs(qe,{value:q.toString(),onValueChange:a=>fa(parseInt(a)),children:[e.jsx(Ke,{children:e.jsx(Oe,{})}),e.jsxs(Ge,{children:[e.jsx(V,{value:"1",children:"Varje dag"}),e.jsx(V,{value:"2",children:"Varannan dag"}),e.jsx(V,{value:"3",children:"Var 3:e dag"}),e.jsx(V,{value:"7",children:"Varje vecka"}),e.jsx(V,{value:"14",children:"Varannan vecka"}),e.jsx(V,{value:"30",children:"Varje månad"})]})]})]})]})]}),e.jsxs(M,{className:"glass-card",children:[e.jsx(w,{children:e.jsxs(N,{className:"flex items-center gap-2",children:[e.jsx(dr,{className:"w-5 h-5"}),"Varaktighet"]})}),e.jsx(Q,{children:e.jsxs(qe,{value:F.toString(),onValueChange:a=>ja(parseInt(a)),children:[e.jsx(Ke,{children:e.jsx(Oe,{})}),e.jsx(Ge,{children:pa.map(a=>e.jsx(V,{value:a.value.toString(),children:a.label},a.value))})]})})]}),e.jsx(_,{onClick:()=>B(4),className:"w-full",size:"lg",children:"Fortsätt"})]},"step3"),u===4&&e.jsxs(G.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},className:"space-y-6",children:[e.jsxs(M,{className:"glass-card",children:[e.jsx(w,{children:e.jsxs(N,{className:"flex items-center gap-2",children:[e.jsx(we,{className:"w-5 h-5"}),"Foton & ersättning"]})}),e.jsxs(Q,{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs(b,{children:["Antal foton per plats: ",T]}),e.jsx(ge,{value:[T],onValueChange:a=>va(a[0]),min:1,max:10,step:1})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(b,{children:["Ersättning per uppdrag: ",A," kr"]}),e.jsx(ge,{value:[A],onValueChange:a=>_a(a[0]),min:25,max:T*H,step:25}),e.jsxs("div",{className:"flex items-center justify-between text-xs",children:[e.jsxs("span",{className:J>H?"text-destructive font-medium":"text-muted-foreground",children:[Math.round(J)," kr/foto"]}),e.jsxs("span",{className:"text-muted-foreground",children:["Max ",H," kr/foto"]})]}),!Te&&e.jsxs("p",{className:"text-xs text-destructive",children:["⚠️ Ersättningen får inte överstiga ",H," kr per foto"]})]})]})]}),e.jsxs(M,{className:"glass-card border-primary/20 bg-gradient-to-r from-primary/5 to-primary/10",children:[e.jsx(w,{children:e.jsxs(N,{className:"flex items-center gap-2",children:[e.jsx(Ee,{className:"w-5 h-5 text-primary"}),"Sammanfattning"]})}),e.jsxs(Q,{className:"space-y-3",children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"Kampanj"}),e.jsx("span",{className:"font-medium",children:d})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"Platstyp"}),e.jsx("span",{className:"font-medium",children:(Le=ua(C))==null?void 0:Le.label})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"Område"}),e.jsx("span",{className:"font-medium",children:E})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"Antal platser"}),e.jsxs("span",{className:"font-medium",children:[o.length," st"]})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"Schema"}),e.jsx("span",{className:"font-medium",children:y==="weekdays"?I.map(a=>{var s;return(s=ma.find(c=>c.value===a))==null?void 0:s.label}).join(", "):`Var ${q}:e dag`})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"Varaktighet"}),e.jsx("span",{className:"font-medium",children:(Be=pa.find(a=>a.value===F))==null?void 0:Be.label})]}),e.jsxs("div",{className:"border-t border-border pt-3 mt-3",children:[e.jsxs("div",{className:"flex justify-between text-lg",children:[e.jsx("span",{className:"font-semibold",children:"Uppskattad totalkostnad"}),e.jsxs("span",{className:"font-bold text-primary",children:[Ca().toLocaleString("sv-SE")," kr"]})]}),e.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["Baserat på ",o.length," platser × ersättning × antal tillfällen"]})]})]})]}),e.jsx(_,{onClick:Ta,className:"w-full",size:"lg",disabled:P,children:P?e.jsxs(e.Fragment,{children:[e.jsx(ye,{className:"w-4 h-4 mr-2 animate-spin"}),"Skapar kampanj..."]}):e.jsxs(e.Fragment,{children:[e.jsx(Qe,{className:"w-4 h-4 mr-2"}),"Skapa kampanj"]})})]},"step4")]})}),e.jsx(Re,{})]}):e.jsxs("div",{className:"min-h-screen bg-background text-foreground pb-24",children:[e.jsx("header",{className:"sticky top-0 z-10 bg-background/80 backdrop-blur-xl border-b border-border",children:e.jsxs("div",{className:"flex items-center gap-3 px-4 py-4",children:[e.jsx(_,{variant:"ghost",size:"icon",onClick:()=>l(-1),children:e.jsx(ra,{className:"w-5 h-5"})}),e.jsx("h1",{className:"text-xl font-bold",children:"Skapa kampanj"})]})}),e.jsx("main",{className:"p-4 space-y-6",children:e.jsxs(M,{className:"glass-card border-amber-500/30",children:[e.jsxs(w,{children:[e.jsxs(N,{className:"flex items-center gap-2",children:[e.jsx(lr,{className:"w-5 h-5 text-amber-500"}),"Bli beställare först"]}),e.jsx(oe,{children:"Du måste vara registrerad och godkänd som beställare för att kunna skapa kampanjer."})]}),e.jsx(Q,{children:e.jsx(_,{onClick:()=>l("/orderer/register"),className:"w-full",children:"Registrera som beställare"})})]})}),e.jsx(Re,{})]})};export{js as default};
|