1import { a as __toESM } from "./rolldown-runtime-Cql5ZV07.js"; 2import { p as require_react } from "./vendor-charts-D81iZKCV.js"; 3import { g as require_compiler_runtime, t as require_jsx_runtime } from "./vendor-react-HZz3WA9p.js"; 4import "./vendor-dnd-D_JGdZnv.js"; 5import "./vendor-mixpanel-Dh8wsiZW.js"; 6import "./device-CBwMusKw.js"; 7import "./vendor-redux-CLEI5hTp.js"; 8import "./vendor-pdf-DksyQ9Qr.js"; 9import "./vendor-utils-DiM3BD4o.js"; 10import "./vendor-ui-G6aSO5L-.js"; 11import "./dist-Bh07-69G.js"; 12import { G as Plus, b as Trash2 } from "./vendor-lucide-EY3Z5fcy.js"; 13import { t as Button } from "./button-BWyXpawe.js"; 14import "./vendor-twilio-BWAG7uEQ.js"; 15import "./ping-one-CpLVEVLd.js"; 16import "./app-storage-slice-mFVFfzPf.js"; 17import "./spin-Bjb5hq6_.js"; 18import { x as useFormContext, y as useFieldArray } from "./vendor-form-DCqShb_y.js"; 19import "./label-BU8XDazs.js"; 20import { a as AlertDialogDescription, c as AlertDialogTitle, i as AlertDialogContent, o as AlertDialogFooter, r as AlertDialogCancel, s as AlertDialogHeader, t as AlertDialog } from "./alert-dialog-DqgZ-9QP.js"; 21import { Yn as trackMethodCall, m as InputField } from "./main-DDHJZG-i.js"; 22import "./breadcrumb-DaQ4spt4.js"; 23import "./upload-field.utils-D6MOo_v7.js"; 24import "./app-breadcrumb-C_0-hj4G.js"; 25import { d as DEFAULT_GROUP_ID_ITEM, f as INPUT_MAX_LENGTH } from "./settings-sso.constants-Wi3LENBC.js"; 26import { t as SetupFormLayout } from "./setup-form-layout--TVmI94p.js"; 27var import_compiler_runtime$7 = /* @__PURE__ */ __toESM(require_compiler_runtime()); 28var import_jsx_runtime = /* @__PURE__ */ __toESM(require_jsx_runtime()); 29const FormAdminFields = () => { 30 const $ = (0, import_compiler_runtime$7.c)(1); 31 let t0; 32 if ($[0] === Symbol.for("react.memo_cache_sentinel")) { 33 t0 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InputField, { 34 name: "adminEmail", 35 title: "DUO Admin Email", 36 placeholder: "[email protected]", 37 maxLength: 150, 38 required: true 39 }); 40 $[0] = t0; 41 } else t0 = $[0]; 42 return t0; 43}; 44var import_compiler_runtime$6 = /* @__PURE__ */ __toESM(require_compiler_runtime()); 45const FormSection = (t0) => { 46 const $ = (0, import_compiler_runtime$6.c)(5); 47 const { title, children } = t0; 48 let t1; 49 if ($[0] !== title) { 50 t1 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { 51 className: "text-lg leading-7 font-semibold text-foreground", 52 children: title 53 }); 54 $[0] = title; 55 $[1] = t1; 56 } else t1 = $[1]; 57 let t2; 58 if ($[2] !== children || $[3] !== t1) { 59 t2 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { 60 className: "flex flex-col gap-6", 61 children: [t1, children] 62 }); 63 $[2] = children; 64 $[3] = t1; 65 $[4] = t2; 66 } else t2 = $[4]; 67 return t2; 68}; 69var import_compiler_runtime$5 = /* @__PURE__ */ __toESM(require_compiler_runtime()); 70const FormOidcFields = () => { 71 const $ = (0, import_compiler_runtime$5.c)(1); 72 let t0; 73 if ($[0] === Symbol.for("react.memo_cache_sentinel")) { 74 t0 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(FormSection, { 75 title: "Generic OIDC Relying Party Setting", 76 children: [
77 /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InputField, { 78 name: "clientId", 79 title: "Client ID", 80 placeholder: "Client ID", 81 maxLength: 150, 82 required: true 83 }), 84 /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InputField, { 85 name: "clientSecret", 86 title: "Client Secret", 87 placeholder: "Client Secret", 88 maxLength: 150, 89 required: true 90 }), 91 /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InputField, { 92 name: "issuer", 93 title: "Issuer", 94 placeholder: "Issuer", 95 maxLength: 150, 96 required: true 97 }) 98 ] 99 }); 100 $[0] = t0; 101 } else t0 = $[0]; 102 return t0; 103}; 104var import_compiler_runtime$4 = /* @__PURE__ */ __toESM(require_compiler_runtime()); 105const FormApiFields = () => { 106 const $ = (0, import_compiler_runtime$4.c)(1); 107 let t0; 108 if ($[0] === Symbol.for("react.memo_cache_sentinel")) { 109 t0 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(FormSection, { 110 title: "DUO Admin API Setting", 111 children: [ 112 /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InputField, { 113 name: "apiHostName", 114 title: "API Host Name", 115 placeholder: "API Host Name", 116 maxLength: 150 117 }),
118 /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InputField, { 119 name: "integrationKey", 120 title: "Integration Key", 121 placeholder: "Integration Key", 122 maxLength: 150 123 }), 124 /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InputField, { 125 name: "secretKey", 126 title: "Secret Key", 127 placeholder: "Secret Key", 128 maxLength: 150 129 }) 130 ] 131 }); 132 $[0] = t0; 133 } else t0 = $[0]; 134 return t0; 135}; 136var import_react = /* @__PURE__ */ __toESM(require_react()); 137var import_compiler_runtime$3 = /* @__PURE__ */ __toESM(require_compiler_runtime()); 138const FormGroupIdRemoveDialog = (t0) => { 139 const $ = (0, import_compiler_runtime$3.c)(20); 140 const { groupLabel, open, onOpenChange, onConfirm } = t0; 141 const title = `Remove ${groupLabel} Group ID?`; 142 const description = `Are you sure you want to remove this ${groupLabel} Group ID from the ${groupLabel} Group Setting? This action cannot be undone.`; 143 let t1; 144 if ($[0] !== onConfirm || $[1] !== onOpenChange) { 145 t1 = () => { 146 trackMethodCall("handleRemoveSsoGroup", []); 147 onConfirm(); 148 onOpenChange(false); 149 }; 150 $[0] = onConfirm; 151 $[1] = onOpenChange; 152 $[2] = t1; 153 } else t1 = $[2]; 154 const handleRemoveSsoGroup = t1; 155 let t2; 156 if ($[3] !== title) { 157 t2 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertDialogTitle, { children: title }); 158 $[3] = title; 159 $[4] = t2; 160 } else t2 = $[4]; 161 let t3; 162 if ($[5] !== description) { 163 t3 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertDialogDescription, { children: description }); 164 $[5] = description; 165 $[6] = t3; 166 } else t3 = $[6]; 167 let t4; 168 if ($[7] !== t2 || $[8] !== t3) { 169 t4 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(AlertDialogHeader, { children: [t2, t3] }); 170 $[7] = t2; 171 $[8] = t3; 172 $[9] = t4; 173 } else t4 = $[9]; 174 let t5; 175 if ($[10] === Symbol.for("react.memo_cache_sentinel")) { 176 t5 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertDialogCancel, { children: "Cancel" }); 177 $[10] = t5; 178 } else t5 = $[10]; 179 let t6; 180 if ($[11] !== handleRemoveSsoGroup) { 181 t6 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(AlertDialogFooter, { children: [t5, /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, { 182 variant: "destructive", 183 onClick: handleRemoveSsoGroup, 184 children: "Remove" 185 })] }); 186 $[11] = handleRemoveSsoGroup; 187 $[12] = t6; 188 } else t6 = $[12]; 189 let t7; 190 if ($[13] !== t4 || $[14] !== t6) { 191 t7 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(AlertDialogContent, { 192 className: "max-w-[512px]", 193 children: [t4, t6] 194 }); 195 $[13] = t4; 196 $[14] = t6; 197 $[15] = t7; 198 } else t7 = $[15]; 199 let t8; 200 if ($[16] !== onOpenChange || $[17] !== open || $[18] !== t7) { 201 t8 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertDialog, { 202 open, 203 onOpenChange, 204 children: t7 205 }); 206 $[16] = onOpenChange; 207 $[17] = open; 208 $[18] = t7; 209 $[19] = t8; 210 } else t8 = $[19]; 211 return t8; 212}; 213var import_compiler_runtime$2 = /* @__PURE__ */ __toESM(require_compiler_runtime()); 214var RemoveGroupIdButtonWithDialog = (t0) => { 215 const $ = (0, import_compiler_runtime$2.c)(6); 216 const { groupLabel, onRemove } = t0; 217 const [isOpen, setIsOpen] = (0, import_react.useState)(false); 218 let t1; 219 if ($[0] === Symbol.for("react.memo_cache_sentinel")) { 220 t1 = () => setIsOpen(true); 221 $[0] = t1; 222 } else t1 = $[0]; 223 let t2; 224 if ($[1] === Symbol.for("react.memo_cache_sentinel")) { 225 t2 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, { 226 type: "button", 227 variant: "outline", 228 size: "icon", 229 onClick: t1, 230 className: "shrink-0", 231 children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trash2, { className: "size-4" }) 232 }); 233 $[1] = t2; 234 } else t2 = $[1]; 235 let t3; 236 if ($[2] !== groupLabel || $[3] !== isOpen || $[4] !== onRemove) { 237 t3 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [t2, /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FormGroupIdRemoveDialog, { 238 groupLabel, 239 open: isOpen, 240 onOpenChange: setIsOpen, 241 onConfirm: onRemove 242 })] }); 243 $[2] = groupLabel; 244 $[3] = isOpen; 245 $[4] = onRemove; 246 $[5] = t3; 247 } else t3 = $[5]; 248 return t3; 249}; 250const FormGroupInput = (t0) => { 251 const $ = (0, import_compiler_runtime$2.c)(30); 252 const { fieldName, groupLabel, maxLength } = t0; 253 const { control } = useFormContext(); 254 let t1; 255 if ($[0] !== control || $[1] !== fieldName) { 256 t1 = { 257 control, 258 name: fieldName 259 }; 260 $[0] = control; 261 $[1] = fieldName; 262 $[2] = t1; 263 } else t1 = $[2]; 264 const { fields, append, remove } = useFieldArray(t1); 265 let t2; 266 if ($[3] !== fieldName || $[4] !== fields || $[5] !== groupLabel || $[6] !== maxLength || $[7] !== remove) { 267 let t3$1; 268 if ($[9] !== fieldName || $[10] !== groupLabel || $[11] !== maxLength || $[12] !== remove) { 269 t3$1 = (field, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: index === 0 ? /* @__P
269URE__ */ (0, import_jsx_runtime.jsx)("div", { 270 className: "flex flex-col gap-2", 271 children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InputField, { 272 name: `${fieldName}[${index}].value`, 273 title: `${groupLabel} Group ID`, 274 placeholder: `${groupLabel} Group ID`, 275 maxLength 276 }) 277 }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { 278 className: "flex items-end gap-2", 279 children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { 280 className: "flex flex-1 flex-col gap-2", 281 children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InputField, { 282 name: `${fieldName}[${index}].value`, 283 title: `${groupLabel} Group ID`, 284 placeholder: `${groupLabel} Group ID`, 285 maxLength 286 }) 287 }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RemoveGroupIdButtonWithDialog, { 288 groupLabel, 289 onRemove: () => remove(index) 290 })] 291 }) }, field.id); 292 $[9] = fieldName; 293 $[10] = groupLabel; 294 $[11] = maxLength; 295 $[12] = remove; 296 $[13] = t3$1; 297 } else t3$1 = $[13]; 298 t2 = fields.map(t3$1); 299 $[3] = fieldName; 300 $[4] = fields; 301 $[5] = groupLabel; 302 $[6] = maxLength; 303 $[7] = remove; 304 $[8] = t2; 305 } else t2 = $[8]; 306 let t3; 307 if ($[14] !== groupLabel) { 308 t3 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { 309 className: "text-sm leading-5 text-muted-foreground", 310 children: [ 311 "Multiple ", 312 groupLabel, 313 " Groups?" 314 ] 315 }); 316 $[14] = groupLabel; 317 $[15] = t3; 318 } else t3 = $[15]; 319 let t4; 320 if ($[16] !== append) { 321 t4 = () => append(DEFAULT_GROUP_ID_ITEM); 322 $[16] = append; 323 $[17] = t4; 324 } else t4 = $[17]; 325 let t5; 326 if ($[18] === Symbol.for("react.memo_cache_sentinel")) { 327 t5 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Plus, { className: "size-4" }); 328 $[18] = t5; 329 } else t5 = $[18]; 330 let t6; 331 if ($[19] !== groupLabel) { 332 t6 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { 333 className: "text-sm leading-5 font-medium", 334 children: [groupLabel, " Group"] 335 }); 336 $[19] = groupLabel; 337 $[20] = t6; 338 } else t6 = $[20]; 339 let t7; 340 if ($[21] !== t4 || $[22] !== t6) { 341 t7 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Button, { 342 type: "button", 343 variant: "text", 344 className: "h-auto gap-1 p-0", 345 onClick: t4, 346 children: [t5, t6] 347 }); 348 $[21] = t4; 349 $[22] = t6; 350 $[23] = t7; 351 } else t7 = $[23]; 352 let t8; 353 if ($[24] !== t3 || $[25] !== t7) { 354 t8 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { 355 className: "flex items-center gap-2", 356 children: [t3, t7] 357 }); 358 $[24] = t3; 359 $[25] = t7; 360 $[26] = t8; 361 } else t8 = $[26]; 362 let t9; 363 if ($[27] !== t2 || $[28] !== t8) { 364 t9 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { 365 className: "flex flex-col gap-5", 366 children: [t2, t8] 367 }); 368 $[27] = t2; 369 $[28] = t8; 370 $[29] = t9; 371 } else t9 = $[29]; 372 return t9; 373}; 374var import_compiler_runtime$1 = /* @__PURE__ */ __toESM(require_compiler_runtime()); 375const FormGroupFields = () => { 376 const $ = (0, import_compiler_runtime$1.c)(1); 377 let t0; 378 if ($[0] === Symbol.for("react.memo_cache_sentinel")) { 379 t0 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(FormSection, { 380 title: "Group Setting", 381 children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(FormGroupInput, { 382 fieldName: "driverGroupIds", 383 groupLabel: "Driver", 384 maxLength: 150 385 }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FormGroupInput, { 386 fieldName: "operatorGroupIds", 387 groupLabel: "Operator", 388 maxLength: 150 389 })] 390 }); 391 $[0] = t0; 392 } else t0 = $[0]; 393 return t0; 394}; 395var import_compiler_runtime = /* @__PURE__ */ __toESM(require_compiler_runtime()); 396var SettingsSSODuo = () => { 397 const $ = (0, import_compiler_runtime.c)(1); 398 let t0; 399 if ($[0] === Symbol.for("react.memo_cache_sentinel")) { 400 t0 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SetupFormLayout, { 401 providerType: "DUO", 402 children: [
403 /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FormAdminFields, {}), 404 /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FormOidcFields, {}), 405 /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FormApiFields, {}), 406 /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FormGroupFields, {}) 407 ] 408 }); 409 $[0] = t0; 410 } else t0 = $[0]; 411 return t0; 412}; 413var settings_sso_duo_default = SettingsSSODuo; 414export { settings_sso_duo_default as default };
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.