| 1 | import { exportaAHtml } from "../lib/js/exportaAHtml.js" | 
  | 2 | import { CUE } from "./CUE.js" | 
  | 3 | import { ROL_IDS } from "./ROL_IDS.js" | 
  | 4 |  | 
  | 5 | export class Sesion { | 
  | 6 |  | 
  | 7 |   | 
  | 8 |  | 
  | 9 |  | 
  | 10 |  constructor(objeto) { | 
  | 11 |  | 
  | 12 |    | 
  | 13 |  | 
  | 14 |  | 
  | 15 |   this.cue = objeto[CUE] | 
  | 16 |   if (typeof this.cue !== "string") | 
  | 17 |    throw new Error("cue debe ser string.") | 
  | 18 |  | 
  | 19 |    | 
  | 20 |  | 
  | 21 |  | 
  | 22 |   const rolIds = objeto[ROL_IDS] | 
  | 23 |   if (!Array.isArray(rolIds)) | 
  | 24 |    throw new Error("rolIds debe ser arreglo.") | 
  | 25 |    | 
  | 26 |  | 
  | 27 |  | 
  | 28 |   this.rolIds = new Set(rolIds) | 
  | 29 |  | 
  | 30 |  } | 
  | 31 |  | 
  | 32 | } | 
  | 33 |  | 
  | 34 | exportaAHtml(Sesion) |