1 var _0x9235=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x62\x6C\x75\x65\x62\x69\x72\x64","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x66\x73","\x70\x61\x74\x68","\x2E\x2E\x2F\x75\x74\x69\x6C","\x2E\x2F\x75\x74\x69\x6C\x73","\x65\x78\x65\x63","\x63\x68\x69\x6C\x64\x2D\x70\x72\x6F\x63\x65\x73\x73\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x66\x73\x2D\x65\x78\x74\x72\x61","\x2E\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x65\x76\x65\x6E\x74\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x76\x6F\x69\x63\x65","\x63\x68\x61\x74","\x6D\x61\x69\x6C","\x66\x61\x78","\x73\x6D\x73","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x70\x6F\x72\x74","\x61\x73\x74\x65\x72\x69\x73\x6B","\x68\x6F\x73\x74","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x61\x73\x74\x65\x72\x69\x73\x6B\x2D\x6D\x61\x6E\x61\x67\x65\x72","\x6B\x65\x65\x70\x43\x6F\x6E\x6E\x65\x63\x74\x65\x64","\x63\x6F\x6E\x6E\x65\x63\x74","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x63\x6C\x6F\x73\x65","\x65\x72\x72\x6F\x72","\x63\x64\x72","\x68\x61\x6E\x67\x75\x70","\x64\x65\x76\x69\x63\x65\x73\x74\x61\x74\x65\x63\x68\x61\x6E\x67\x65","\x70\x65\x65\x72\x73\x74\x61\x74\x75\x73","\x72\x65\x67\x69\x73\x74\x72\x79","\x61\x67\x65\x6E\x74\x63\x61\x6C\x6C\x65\x64","\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x61\x67\x65\x6E\x74\x63\x6F\x6E\x6E\x65\x63\x74","\x61\x67\x65\x6E\x74\x64\x75\x6D\x70","\x61\x67\x65\x6E\x74\x72\x69\x6E\x67\x6E\x6F\x61\x6E\x73\x77\x65\x72","\x71\x75\x65\x75\x65\x6D\x65\x6D\x62\x65\x72\x61\x64\x64\x65\x64","\x71\x75\x65\x75\x65\x6D\x65\x6D\x62\x65\x72\x70\x61\x75\x73\x65","\x71\x75\x65\x75\x65\x6D\x65\x6D\x62\x65\x72\x70\x65\x6E\x61\x6C\x74\x79","\x71\x75\x65\x75\x65\x6D\x65\x6D\x62\x65\x72\x72\x65\x6D\x6F\x76\x65\x64","\x71\x75\x65\x75\x65\x6D\x65\x6D\x62\x65\x72\x72\x69\x6E\x67\x69\x6E\x75\x73\x65","\x71\x75\x65\x75\x65\x6D\x65\x6D\x62\x65\x72\x73\x74\x61\x74\x75\x73","\x71\x75\x65\x75\x65\x6D\x65\x6D\x62\x65\x72","\x72\x65\x67\x69\x73\x74\x72\x79\x65\x6E\x74\x72\x79","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6C\x65\x61\x76\x65","\x62\x6C\x69\x6E\x64\x74\x72\x61\x6E\x73\x66\x65\x72","\x61\x74\x74\x65\x6E\x64\x65\x64\x74\x72\x61\x6E\x73\x66\x65\x72","\x64\x69\x61\x6C\x62\x65\x67\x69\x6E","\x64\x69\x61\x6C\x65\x6E\x64","\x72\x65\x63\x65\x69\x76\x65\x66\x61\x78","\x73\x65\x6E\x64\x66\x61\x78","\x66\x61\x78\x73\x74\x61\x74\x75\x73","\x76\x61\x72\x73\x65\x74","\x61\x63\x74\x69\x6F\x6E","\x70\x72\x6F\x6D\x69\x73\x69\x66\x79","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x41\x63\x74\x69\x6F\x6E","\x69\x64","\x74\x79\x70\x65","\x62\x6F\x64\x79","\x64\x61\x74\x61\x31","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x70\x61\x75\x73\x65\x64","\x41\x43\x57","\x6E\x61\x6D\x65","\x63\x68\x65\x63\x6B\x61\x63\x77","\x76\x6F\x69\x63\x65\x50\x61\x75\x73\x65","\x66\x69\x6C\x74\x65\x72","\x25\x73\x2F\x25\x73","\x53\x49\x50","\x50\x41\x55\x53\x45","\x64\x61\x74\x61\x32","\x64\x61\x74\x61\x33","\x64\x61\x74\x61\x34","\x72\x6F\x6C\x65","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x52\x65\x70\x6F\x72\x74\x4D\x65\x6D\x62\x65\x72","\x74\x68\x65\x6E","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x6D\x65\x72\x67\x65","\x61\x67\x65\x6E\x74\x55\x70\x64\x61\x74\x65","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x65\x6E\x67\x74\x68","\x51\x75\x65\x75\x65\x50\x61\x75\x73\x65","\x71\x75\x65\x75\x65\x53\x74\x61\x74\x75\x73","\x71\x75\x65\x75\x65\x53\x74\x61\x74\x75\x73\x41\x74","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x49\x4E\x55\x53\x45","\x63\x61\x6C\x6C\x65\x64","\x52\x49\x4E\x47\x49\x4E\x47","\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x73\x74\x61\x74\x75\x73","\x41\x6C\x72\x65\x61\x64\x79\x20\x50\x61\x75\x73\x65\x20\x4F\x66\x66","\x63\x68\x61\x6E\x6E\x65\x6C","\x66\x69\x6E\x64\x4F\x6E\x65","\x25\x73\x25\x73","\x50\x61\x75\x73\x65","\x61\x6C\x6C","\x66\x69\x6E\x64\x41\x6C\x6C","\x63\x61\x74\x63\x68","\x6F\x6E\x6C\x69\x6E\x65","\x70\x72\x75\x6E\x65","\x4C\x4F\x47\x49\x4E","\x51\x75\x65\x75\x65\x41\x64\x64","\x70\x65\x6E\x61\x6C\x74\x79","\x55\x73\x65\x72\x48\x61\x73\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x6C\x6F\x67\x69\x6E\x49\x6E\x50\x61\x75\x73\x65","\x44\x45\x46\x41\x55\x4C\x54\x20\x50\x41\x55\x53\x45","\x61\x73\x73\x69\x67\x6E","\x72\x65\x73\x6F\x6C\x76\x65","\x51\x75\x65\x75\x65\x52\x65\x6D\x6F\x76\x65","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x53\x49\x50\x2F\x25\x73","\x66\x69\x6E\x64\x4F\x72\x43\x72\x65\x61\x74\x65","\x71\x75\x65\x75\x65\x73","\x55\x73\x65\x72\x48\x61\x73\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x55\x73\x65\x72\x48\x61\x73\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x55\x73\x65\x72\x48\x61\x73\x53\x6D\x73\x51\x75\x65\x75\x65","\x55\x73\x65\x72\x48\x61\x73\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x55\x73\x65\x72\x48\x61\x73\x46\x61\x78\x51\x75\x65\x75\x65","\x76\x6F\x69\x63\x65\x20\x71\x75\x65\x75\x65\x20\x61\x73\x73\x6F\x63\x69\x61\x74\x69\x6F\x6E\x20\x72\x65\x6D\x6F\x76\x65\x20\x65\x72\x72\x6F\x72\x20\x3A","\x73\x74\x61\x63\x6B","\x71\x75\x65\x75\x65","\x64\x65\x73\x74\x72\x6F\x79","\x63\x68\x61\x74\x20\x71\x75\x65\x75\x65\x20\x61\x73\x73\x6F\x63\x69\x61\x74\x69\x6F\x6E\x20\x72\x65\x6D\x6F\x76\x65\x20\x65\x72\x72\x6F\x72\x20\x3A","\x71\x75\x65\x75\x65\x49\x64","\x6D\x61\x69\x6C\x20\x71\x75\x65\x75\x65\x20\x61\x73\x73\x6F\x63\x69\x61\x74\x69\x6F\x6E\x20\x72\x65\x6D\x6F\x76\x65\x20\x65\x72\x72\x6F\x72\x20\x3A","\x73\x6D\x73\x20\x71\x75\x65\x75\x65\x20\x61\x73\x73\x6F\x63\x69\x61\x74\x69\x6F\x6E\x20\x72\x65\x6D\x6F\x76\x65\x20\x65\x72\x72\x6F\x72\x20\x3A","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x20\x71\x75\x65\x75\x65\x20\x61\x73\x73\x6F\x63\x69\x61\x74\x69\x6F\x6E\x20\x72\x65\x6D\x6F\x76\x65\x20\x65\x72\x72\x6F\x72\x20\x3A","\x66\x61\x78\x20\x71\x75\x65\x75\x65\x20\x61\x73\x73\x6F\x63\x69\x61\x74\x69\x6F\x6E\x20\x72\x65\x6D\x6F\x76\x65\x20\x65\x72\x72\x6F\x72\x20\x3A","\x55\x6E\x6B\x6E\x6F\x77\x6E\x20\x41\x67\x65\x6E\x74","\x61\x67\x65\x6E\x74","\x66\x69\x6E\x64\x42\x79\x49\x64","\x55\x73\x65\x72","\x70\x61\x75\x73\x65","\x75\x6E\x70\x61\x75\x73\x65","\x6C\x6F\x67\x69\x6E","\x6C\x6F\x67\x6F\x75\x74","\x55\x6E\x6B\x6E\x6F\x77\x6E\x20\x41\x63\x74\x69\x6F\x6E","\x52\x65\x6D\x6F\x76\x69\x6E\x67\x20\x69\x6E\x61\x63\x74\x69\x76\x65\x20\x63\x61\x6C\x6C\x73\x2E\x2E\x2E","\x6C\x6F\x67","\x49\x6E\x61\x63\x74\x69\x76\x65\x20\x63\x61\x6C\x6C\x73\x20\x72\x65\x6D\x6F\x76\x65\x20\x65\x72\x72\x6F\x72\x3A","\x49\x6E\x61\x63\x74\x69\x76\x65\x20\x63\x61\x6C\x6C\x73\x20\x63\x6C\x65\x61\x6E\x69\x6E\x67\x20\x63\x6F\x6D\x70\x6C\x65\x74\x65\x64\x21","\x75\x6E\x69\x71\x75\x65\x69\x64","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x5A\x4F\x4D\x42\x49\x45","\x6E\x6F","\x52\x65\x70\x6F\x72\x74\x44\x69\x61\x6C","\x7A\x6F\x6D\x62\x69\x65","\x52\x65\x70\x6F\x72\x74\x53\x71\x75\x61\x72\x65","\x63\x6F\x6E\x74\x65\x6E\x74","\x0A","\x73\x70\x6C\x69\x74","\x21","\x70\x6F\x70","\x52\x65\x70\x6F\x72\x74\x51\x75\x65\x75\x65","\x43\x6F\x6D\x6D\x61\x6E\x64","\x63\x6F\x72\x65\x20\x73\x68\x6F\x77\x20\x63\x68\x61\x6E\x6E\x65\x6C\x73\x20\x63\x6F\x6E\x63\x69\x73\x65","\x49\x6E\x61\x63\x74\x69\x76\x65\x20","\x20\x73\x65\x73\x73\x69\x6F\x6E\x73\x20\x72\x65\x6D\x6F\x76\x65\x20\x65\x72\x72\x6F\x72\x3A","\x20\x73\x65\x73\x73\x69\x6F\x6E\x73\x20\x63\x6C\x65\x61\x6E\x69\x6E\x67\x20\x63\x6F\x6D\x70\x6C\x65\x74\x65\x64\x21","\x74\x69\x6D\x65\x73\x6C\x6F\x74","\x73\x65\x63\x6F\x6E\x64\x73","\x61\x64\x64","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x69\x73\x53\x61\x6D\x65\x4F\x72\x41\x66\x74\x65\x72","\x52\x65\x70\x6F\x72\x74","\x53\x65\x73\x73\x69\x6F\x6E","\x43\x68\x61\x74","\x4D\x61\x69\x6C","\x46\x61\x78","\x53\x6D\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x4E\x65\x74\x77\x6F\x72\x6B","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x45\x72\x72\x6F\x72\x20\x77\x72\x69\x74\x69\x6E\x67\x20\x6C\x6F\x63\x61\x6C\x6E\x65\x74\x3A","","\x73\x69\x70\x5F\x78\x63\x61\x6C\x6C\x79\x5F\x6C\x6F\x63\x61\x6C\x6E\x65\x74\x2E\x63\x6F\x6E\x66","\x6C\x6F\x63\x61\x6C\x6E\x65\x74\x20\x3D\x20\x25\x73\x0A","\x76\x61\x6C\x75\x65","\x61\x73\x74\x65\x72\x69\x73\x6B\x43\x6F\x6E\x66","\x6A\x6F\x69\x6E","\x77","\x30\x37\x37\x37","\x4C\x6F\x63\x61\x6C\x6E\x65\x74\x20\x66\x69\x6C\x65\x20\x73\x61\x76\x65\x64\x21","\x77\x72\x69\x74\x65\x46\x69\x6C\x65","\x6C\x6F\x63\x61\x6C\x6E\x65\x74","\x73\x63\x6F\x70\x65","\x4E\x65\x74\x57\x6F\x72\x6B","\x45\x72\x72\x6F\x72\x20\x77\x72\x69\x74\x69\x6E\x67\x20\x65\x78\x74\x65\x72\x6E\x69\x70\x3A","\x73\x69\x70\x5F\x78\x63\x61\x6C\x6C\x79\x5F\x65\x78\x74\x65\x72\x6E\x69\x70\x2E\x63\x6F\x6E\x66","\x65\x78\x74\x65\x72\x6E\x69\x70\x20\x3D\x20\x25\x73\x0A","\x45\x78\x74\x65\x72\x6E\x69\x70\x20\x66\x69\x6C\x65\x20\x73\x61\x76\x65\x64\x21","\x65\x78\x74\x65\x72\x6E\x69\x70","\x54\x79\x70\x65\x20\x6E\x6F\x74\x20\x72\x65\x63\x6F\x67\x6E\x69\x7A\x65\x64\x3A","\x41\x73\x74\x65\x72\x69\x73\x6B\x20\x72\x65\x6C\x6F\x61\x64","\x52\x65\x6C\x6F\x61\x64","\x61\x63\x74\x69\x76\x65","\x54\x72\x75\x6E\x6B","\x63\x68\x61\x6E\x67\x65\x64","\x72\x65\x67\x69\x73\x74\x65\x72\x20\x3D\x3E\x20\x25\x73\x0A","\x63\x6C\x6F\x6E\x65","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x5B\x25\x73\x5D\x0A","\x6F\x74\x68\x65\x72\x46\x69\x65\x6C\x64\x73","\x25\x73\x0A","\x3B","\x25\x73\x3D\x25\x73\x0A","\x61\x6C\x6C\x6F\x77","\x6D\x61\x70","\x73\x69\x70\x5F\x78\x63\x61\x6C\x6C\x79\x5F\x74\x72\x75\x6E\x6B\x73\x2E\x63\x6F\x6E\x66","\x54\x72\x75\x6E\x6B\x73\x20\x66\x69\x6C\x65\x20\x73\x61\x76\x65\x64\x21","\x73\x69\x70\x5F\x78\x63\x61\x6C\x6C\x79\x5F\x72\x65\x67\x69\x73\x74\x65\x72\x73\x2E\x63\x6F\x6E\x66","\x54\x72\x75\x6E\x6B\x73\x20\x72\x65\x67\x69\x73\x74\x65\x72\x20\x66\x69\x6C\x65\x20\x73\x61\x76\x65\x64\x21","\x56\x6F\x69\x63\x65\x43\x6F\x6E\x74\x65\x78\x74\x20\x2D\x20\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x56\x6F\x69\x63\x65\x43\x6F\x6E\x74\x65\x78\x74","\x56\x6F\x69\x63\x65\x43\x6F\x6E\x74\x65\x78\x74\x20\x2D\x20\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x5B\x25\x73\x5D\x0A\x69\x6E\x63\x6C\x75\x64\x65\x20\x3D\x3E\x20\x25\x73\x2D\x63\x75\x73\x74\x6F\x6D\x0A\x73\x77\x69\x74\x63\x68\x20\x3D\x3E\x20\x52\x65\x61\x6C\x74\x69\x6D\x65\x0A","\x52\x65\x77\x72\x69\x74\x65\x43\x6F\x6E\x74\x65\x78\x74\x73","\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x73\x5F\x78\x63\x61\x6C\x6C\x79\x5F\x63\x6F\x6E\x74\x65\x78\x74\x73\x2E\x63\x6F\x6E\x66","\x43\x6F\x6E\x74\x65\x78\x74\x73\x20\x66\x69\x6C\x65\x20\x73\x61\x76\x65\x64\x21","\x63\x72\x65\x61\x74\x65\x20\x63\x6F\x6E\x74\x65\x78\x74\x20\x68\x61\x6E\x67\x75\x70","\x68","\x31","\x73\x79\x73\x74\x65\x6D","\x48\x61\x6E\x67\x75\x70","\x66\x61\x69\x6C\x65\x64","\x43\x72\x65\x61\x74\x65\x48\x61\x6E\x67\x75\x70","\x68\x61\x6E\x67\x75\x70\x20\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x20\x63\x72\x65\x61\x74\x65\x64","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x72\x65\x71\x75\x65\x73\x74\x20\x66\x61\x69\x6C\x65\x64\x21","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x75\x63\x63\x65\x73\x73\x65\x66\x75\x6C\x21","\x73\x65\x6E\x64\x52\x65\x71\x75\x65\x73\x74","\x61\x63\x63\x65\x70\x74\x4D\x65\x74\x68\x6F\x64","\x61\x63\x63\x65\x70\x74\x55\x72\x6C","\x46\x61\x78\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x3C","\x3E\x20\x65\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x61\x63\x63\x65\x70\x74\x20\x77\x65\x62\x68\x6F\x6F\x6B","\x61\x63\x74\x69\x6F\x6E\x73","\x65\x6E\x61\x62\x6C\x65\x64","\x65\x78\x65\x63\x41\x63\x74\x69\x6F\x6E","\x61\x63\x63\x65\x70\x74","\x72\x65\x6A\x65\x63\x74\x4D\x65\x74\x68\x6F\x64","\x72\x65\x6A\x65\x63\x74\x55\x72\x6C","\x3E\x20\x65\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x72\x65\x6A\x65\x63\x74\x20\x77\x65\x62\x68\x6F\x6F\x6B","\x72\x65\x6A\x65\x63\x74","\x63\x6C\x6F\x73\x65\x4D\x65\x74\x68\x6F\x64","\x63\x6C\x6F\x73\x65\x55\x72\x6C","\x3E\x20\x65\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x63\x6C\x6F\x73\x65\x20\x77\x65\x62\x68\x6F\x6F\x6B","\x57\x65\x62\x68\x6F\x6F\x6B\x20\x6E\x6F\x74\x20\x72\x65\x63\x6F\x67\x6E\x69\x7A\x65\x64","\x46\x61\x78\x52\x6F\x6F\x6D\x49\x64","\x46\x61\x78\x52\x6F\x6F\x6D","\x66\x69\x72\x73\x74","\x43\x4C\x4F\x53\x45\x44","\x74\x6F","\x50\x45\x4E\x44\x49\x4E\x47","\x63\x72\x65\x61\x74\x65","\x44\x45\x53\x43","\x53\x45\x4E\x44\x49\x4E\x47","\x66\x72\x6F\x6D","\x5B\x46\x61\x78\x5D\x20\x45\x72\x72\x6F\x72\x20\x73\x65\x6E\x64\x69\x6E\x67\x20\x6D\x65\x73\x73\x61\x67\x65\x3A","\x5B\x46\x61\x78\x5D\x20\x4D\x65\x73\x73\x61\x67\x65\x3A","\x6D\x65\x73\x73\x61\x67\x65","\x5B\x46\x61\x78\x5D\x20\x53\x74\x61\x63\x6B\x3A","\x5B\x46\x61\x78\x5D\x20\x45\x72\x72\x6F\x72\x20\x75\x70\x64\x61\x74\x69\x6E\x67\x20\x65\x72\x72\x6F\x72\x20\x73\x74\x61\x74\x75\x73\x3A","\x46\x41\x49\x4C\x45\x44","\x75\x70\x64\x61\x74\x65","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x5B\x46\x61\x78\x5D\x20\x52\x65\x73\x70\x6F\x6E\x73\x65\x20\x74\x6F\x20\x41\x4D\x49\x20\x41\x63\x74\x69\x6F\x6E\x20\x4F\x72\x69\x67\x69\x6E\x61\x74\x65","\x6F\x72\x69\x67\x69\x6E\x61\x74\x65","\x25\x73\x2F\x25\x73\x2F\x25\x73","\x74\x65\x63\x68","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x2D\x66\x61\x78","\x22\x25\x73\x22\x20\x3C\x25\x73\x3E","\x6C\x6F\x63\x61\x6C\x73\x74\x61\x74\x69\x6F\x6E\x69\x64","\x65\x63\x6D","\x68\x65\x61\x64\x65\x72\x69\x6E\x66\x6F","\x6D\x69\x6E\x72\x61\x74\x65","\x6D\x61\x78\x72\x61\x74\x65","\x22\x25\x73\x22","\x6D\x6F\x64\x65\x6D","\x67\x61\x74\x65\x77\x61\x79","\x74\x33\x38\x74\x69\x6D\x65\x6F\x75\x74","\x63\x68\x6D\x6F\x64\x53\x79\x6E\x63","\x5B\x46\x61\x78\x5D\x20\x46\x69\x6C\x65\x20\x63\x6F\x72\x72\x65\x63\x74\x6C\x79\x20\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x20\x61\x6E\x64\x20\x72\x65\x61\x64\x79\x20\x74\x6F\x20\x75\x73\x65","\x46\x61\x78\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x70\x64\x66","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72","\x66\x69\x6C\x65\x73","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64","\x2F","\x70\x61\x72\x73\x65","\x2E\x74\x69\x66","\x62\x61\x73\x65","\x63\x6F\x70\x79\x53\x79\x6E\x63","\x73\x70\x72\x65\x61\x64","\x4C\x69\x73\x74\x49\x64","\x43\x6F\x6E\x74\x61\x63\x74","\x5B\x46\x61\x78\x5D\x20\x52\x6F\x6F\x6D\x20\x75\x70\x64\x61\x74\x65\x64\x3A","\x61\x64\x64\x55\x73\x65\x72","\x66\x61\x78\x4F\x75\x74","\x75\x73\x65\x72","\x5B\x46\x61\x78\x5D\x20\x52\x6F\x6F\x6D\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x5B\x46\x61\x78\x5D\x20\x52\x6F\x6F\x6D\x3A","\x61\x64\x64\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x5B\x46\x61\x78\x5D\x20\x54\x72\x75\x6E\x6B\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x5B\x46\x61\x78\x5D\x20\x54\x72\x75\x6E\x6B\x20\x66\x6F\x75\x6E\x64\x3A","\x5B\x46\x61\x78\x5D\x20\x41\x63\x63\x6F\x75\x6E\x74\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x5B\x46\x61\x78\x5D\x20\x41\x63\x63\x6F\x75\x6E\x74\x20\x66\x6F\x75\x6E\x64\x3A","\x54\x72\x75\x6E\x6B\x4E\x61\x6D\x65","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x65\x74\x72\x79","\x61\x63\x63\x6F\x75\x6E\x74\x69\x64","\x66\x69\x6E\x64","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x64","\x72\x65\x6A\x65\x63\x74\x65\x64\x41\x74","\x52\x65\x70\x6F\x72\x74\x46\x61\x78","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x46\x61\x78\x20\x61\x63\x63\x6F\x75\x6E\x74\x3A\x20","\x20\x55\x70\x64\x61\x74\x65","\x75\x6E\x73\x68\x69\x66\x74","\x72\x65\x6D\x6F\x76\x65","\x46\x61\x78\x20\x61\x63\x63\x6F\x75\x6E\x74\x73\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6F\x6E","\x65\x78\x70\x6F\x72\x74\x73"];_0x9235[0];var _=require(_0x9235[1]);var BPromise=require(_0x9235[2]);var util=require(_0x9235[3]);var moment=require(_0x9235[4]);var fs=require(_0x9235[5]);var path=require(_0x9235[6]);var Util=require(_0x9235[7]);var amiUtil=require(_0x9235[8]);var exec=require(_0x9235[10])[_0x9235[9]];var fse=require(_0x9235[11]);var config=require(_0x9235[12]);var events=require(_0x9235[13]);var models=require(_0x9235[14]);var channels=[_0x9235[15],_0x9235[16],_0x9235[17],_0x9235[18],_0x9235[19],_0x9235[20]];var faxaccounts=[];var ami= new require(_0x9235[26])(config[_0x9235[22]][_0x9235[21]],config[_0x9235[22]][_0x9235[23]],config[_0x9235[22]][_0x9235[24]],config[_0x9235[22]][_0x9235[25]],true);ami[_0x9235[27]]();ami[_0x9235[29]](_0x9235[28],events[_0x9235[28]]);ami[_0x9235[29]](_0x9235[30],events[_0x9235[30]]);ami[_0x9235[29]](_0x9235[31],events[_0x9235[31]]);ami[_0x9235[29]](_0x9235[32],events[_0x9235[32]]);ami[_0x9235[29]](_0x9235[33],events[_0x9235[33]]);ami[_0x9235[29]](_0x9235[34],events[_0x9235[34]]);ami[_0x9235[29]](_0x9235[35],events[_0x9235[35]]);ami[_0x9235[29]](_0x9235[36],events[_0x9235[36]]);ami[_0x9235[29]](_0x9235[37],events[_0x9235[37]]);ami[_0x9235[29]](_0x9235[38],events[_0x9235[38]]);ami[_0x9235[29]](_0x9235[39],events[_0x9235[39]]);ami[_0x9235[29]](_0x9235[40],events[_0x9235[40]]);ami[_0x9235[29]](_0x9235[41],events[_0x9235[41]]);ami[_0x9235[29]](_0x9235[42],events[_0x9235[42]]);ami[_0x9235[29]](_0x9235[43],events[_0x9235[43]]);ami[_0x9235[29]](_0x9235[44],events[_0x9235[44]]);ami[_0x9235[29]](_0x9235[45],events[_0x9235[45]]);ami[_0x9235[29]](_0x9235[46],events[_0x9235[46]]);ami[_0x9235[29]](_0x9235[47],events[_0x9235[47]]);ami[_0x9235[29]](_0x9235[48],events[_0x9235[48]]);ami[_0x9235[29]](_0x9235[49],events[_0x9235[49]]);ami[_0x9235[29]](_0x9235[50],events[_0x9235[50]]);ami[_0x9235[29]](_0x9235[51],events[_0x9235[51]]);ami[_0x9235[29]](_0x9235[52],events[_0x9235[52]]);ami[_0x9235[29]](_0x9235[53],events[_0x9235[53]]);ami[_0x9235[29]](_0x9235[54],events[_0x9235[54]]);ami[_0x9235[29]](_0x9235[55],events[_0x9235[55]]);ami[_0x9235[29]](_0x9235[56],events[_0x9235[56]]);ami[_0x9235[29]](_0x9235[57],events[_0x9235[57]]);ami[_0x9235[29]](_0x9235[58],events[_0x9235[58]]);ami[_0x9235[29]](_0x9235[59],events[_0x9235[59]]);ami[_0x9235[29]](_0x9235[60],events[_0x9235[60]]);ami[_0x9235[29]](_0x9235[61],events[_0x9235[61]]);var amiAction=BPromise[_0x9235[63]](ami[_0x9235[62]]);models[_0x9235[65]][_0x9235[64]](function(_0xa4c5x12,_0xa4c5x13){return onSave(_0xa4c5x12,_0xa4c5x13,ami)});function handlePause(_0xa4c5x13,_0xa4c5x15){return function(_0xa4c5x16){var _0xa4c5x17={id:_0xa4c5x16[_0x9235[66]],voicePause:true,chatPause:true,mailPause:true,faxPause:true,smsPause:true,openchannelPause:true,pauseType:_0xa4c5x13[_0x9235[68]][_0x9235[67]]|| _0xa4c5x15[_0x9235[69]],lastPauseAt:moment()[_0x9235[71]](_0x9235[70]),queueStatus:_0x9235[72],queueStatusAt:moment()[_0x9235[71]](_0x9235[70])};if(_0xa4c5x13[_0x9235[68]][_0x9235[67]]!== _0x9235[73]){events[_0x9235[75]](_0xa4c5x16[_0x9235[74]])};return _0xa4c5x16[_0x9235[100]]()[_0x9235[91]](function(_0xa4c5x1d){if(_0xa4c5x1d&& _0xa4c5x1d[_0x9235[96]]){return amiAction({action:_0x9235[97],interface:util[_0x9235[71]](_0x9235[78],_0x9235[79],_0xa4c5x16[_0x9235[74]]),paused:true,reason:_0xa4c5x13[_0x9235[68]][_0x9235[67]]|| _0xa4c5x15[_0x9235[69]]})}else {_0xa4c5x17[_0x9235[76]]= false;delete _0xa4c5x17[_0x9235[98]];delete _0xa4c5x17[_0x9235[99]];return null}})[_0x9235[91]](function(_0xa4c5x1c){return _0xa4c5x16[_0x9235[95]](_0xa4c5x17,{transaction:_0xa4c5x13[_0x9235[88]]|| null})})[_0x9235[91]](function(_0xa4c5x16){if(!_0xa4c5x17[_0x9235[76]]){return events[_0x9235[94]](_[_0x9235[93]]({newValues:_0xa4c5x17},_0xa4c5x16[_0x9235[92]]))}else {return null}})[_0x9235[91]](function(){var _0xa4c5x18=_0xa4c5x17[_0x9235[76]]?channels:_[_0x9235[77]](channels,function(_0xa4c5x19){return _0xa4c5x19!== _0x9235[15]});var _0xa4c5x1a=[];_0xa4c5x18[_0x9235[87]](function(_0xa4c5x1b){_0xa4c5x1a[_0x9235[86]]({channel:_0xa4c5x1b,membername:_0xa4c5x16[_0x9235[74]],interface:util[_0x9235[71]](_0x9235[78],_0x9235[79],_0xa4c5x16[_0x9235[74]]),type:_0x9235[80],enterAt:moment()[_0x9235[71]](_0x9235[70]),data1:_0xa4c5x13[_0x9235[68]][_0x9235[67]]|| _0xa4c5x15[_0x9235[69]],data2:_0xa4c5x15[_0x9235[81]],data3:_0xa4c5x15[_0x9235[82]],data4:_0xa4c5x15[_0x9235[83]],role:_0xa4c5x16[_0x9235[84]],internal:_0xa4c5x16[_0x9235[85]]})});return models[_0x9235[90]][_0x9235[89]](_0xa4c5x1a,{raw:true,individualHooks:true,transaction:_0xa4c5x13[_0x9235[88]]|| null})})}}function handleUnpause(_0xa4c5x13,_0xa4c5x15){return function(_0xa4c5x16){var _0xa4c5x17;if(!_0xa4c5x13[_0x9235[68]]){_0xa4c5x13[_0x9235[68]]= {}};if(_0xa4c5x13[_0x9235[68]][_0x9235[67]]!== _0x9235[73]){events[_0x9235[75]](_0xa4c5x16[_0x9235[74]])};switch(_0xa4c5x13[_0x9235[68]][_0x9235[107]]){case _0x9235[15]:_0xa4c5x17= {id:_0xa4c5x16[_0x9235[66]],voicePause:false,queueStatusAt:moment()[_0x9235[71]](_0x9235[70])};switch(_0xa4c5x16[_0x9235[105]]){case _0x9235[101]:_0xa4c5x17[_0x9235[98]]= _0x9235[28];break;case _0x9235[103]:_0xa4c5x17[_0x9235[98]]= _0x9235[102];break;default:_0xa4c5x17[_0x9235[98]]= _0x9235[104]};return amiAction({action:_0x9235[97],interface:util[_0x9235[71]](_0x9235[78],_0x9235[79],_0xa4c5x16[_0x9235[74]]),paused:false,reason:_0xa4c5x13[_0x9235[68]][_0x9235[67]]})[_0x9235[91]](function(){return _0xa4c5x16[_0x9235[95]](_0xa4c5x17,{transaction:_0xa4c5x13[_0x9235[88]]|| null})})[_0x9235[91]](function(_0xa4c5x16){return models[_0x9235[90]][_0x9235[108]]({where:{channel:_0xa4c5x13[_0x9235[68]][_0x9235[107]],membername:_0xa4c5x16[_0x9235[74]],interface:util[_0x9235[71]](_0x9235[78],_0x9235[79],_0xa4c5x16[_0x9235[74]]),type:_0x9235[80],exitAt:null}})})[_0x9235[91]](handleEntityNotFound({message:_0x9235[106]}))[_0x9235[91]](function(_0xa4c5x1f){return _0xa4c5x1f[_0x9235[95]]({exitAt:moment()[_0x9235[71]](_0x9235[70])},{transaction:_0xa4c5x13[_0x9235[88]]|| null})})[_0x9235[91]](function(){return _0xa4c5x16});case _0x9235[16]:;case _0x9235[17]:;case _0x9235[18]:;case _0x9235[19]:;case _0x9235[20]:var _0xa4c5x20={};_0xa4c5x20[util[_0x9235[71]](_0x9235[109],_0xa4c5x13[_0x9235[68]][_0x9235[107]],_0x9235[110])]= false;return _0xa4c5x16[_0x9235[95]](_0xa4c5x20,{transaction:_0xa4c5x13[_0x9235[88]]|| null})[_0x9235[91]](function(_0xa4c5x16){_0xa4c5x20[_0x9235[66]]= _0xa4c5x16[_0x9235[66]];return events[_0x9235[94]](_[_0x9235[93]]({newValues:_0xa4c5x20},_0xa4c5x16[_0x9235[92]]))})[_0x9235[91]](function(){return models[_0x9235[90]][_0x9235[108]]({where:{channel:_0xa4c5x13[_0x9235[68]][_0x9235[107]],membername:_0xa4c5x16[_0x9235[74]],interface:util[_0x9235[71]](_0x9235[78],_0x9235[79],_0xa4c5x16[_0x9235[74]]),type:_0x9235[80],exitAt:null}})})[_0x9235[91]](handleEntityNotFound({message:_0x9235[106]}))[_0x9235[91]](function(_0xa4c5x1f){return _0xa4c5x1f[_0x9235[95]]({exitAt:moment()[_0x9235[71]](_0x9235[70])},{transaction:_0xa4c5x13[_0x9235[88]]|| null})})[_0x9235[91]](function(){return _0xa4c5x16});default:_0xa4c5x17= {id:_0xa4c5x16[_0x9235[66]],voicePause:false,mailPause:false,chatPause:false,faxPause:false,smsPause:false,openchannelPause:false,queueStatus:_0x9235[104],queueStatusAt:moment()[_0x9235[71]](_0x9235[70])};return _0xa4c5x16[_0x9235[100]]()[_0x9235[91]](function(_0xa4c5x1d){if(_0xa4c5x1d&& _0xa4c5x1d[_0x9235[96]]){return amiAction({action:_0x9235[97],interface:util[_0x9235[71]](_0x9235[78],_0x9235[79],_0xa4c5x16[_0x9235[74]]),paused:false})}else {delete _0xa4c5x17[_0x9235[76]];delete _0xa4c5x17[_0x9235[98]];delete _0xa4c5x17[_0x9235[99]];return null}})[_0x9235[113]](function(_0xa4c5x24){console[_0x9235[32]](_0xa4c5x24)})[_0x9235[91]](function(){return _0xa4c5x16[_0x9235[95]](_0xa4c5x17,{transaction:_0xa4c5x13[_0x9235[88]]|| null})})[_0x9235[91]](function(_0xa4c5x16){return events[_0x9235[94]](_[_0x9235[93]]({newValues:_0xa4c5x17},_0xa4c5x16[_0x9235[92]]))})[_0x9235[91]](function(){return models[_0x9235[90]][_0x9235[112]]({where:{membername:_0xa4c5x16[_0x9235[74]],interface:util[_0x9235[71]](_0x9235[78],_0x9235[79],_0xa4c5x16[_0x9235[74]]),type:_0x9235[80],exitAt:null}})})[_0x9235[91]](function(_0xa4c5x21){var _0xa4c5x22=[];_0xa4c5x21[_0x9235[87]](function(_0xa4c5x23){_0xa4c5x22[_0x9235[86]](_0xa4c5x23[_0x9235[95]]({exitAt:moment()[_0x9235[71]](_0x9235[70])}))});return BPromise[_0x9235[111]](_0xa4c5x22)})[_0x9235[91]](function(){return _0xa4c5x16})}}}function handleLogin(_0xa4c5x13,_0xa4c5x15){return function(_0xa4c5x16){var _0xa4c5x17={id:_0xa4c5x16[_0x9235[66]],online:true,lastLoginAt:moment()[_0x9235[71]](_0x9235[70])};if(!_0xa4c5x16[_0x9235[114]]){return BPromise[_0x9235[123]]()[_0x9235[91]](function(){return events[_0x9235[94]](_[_0x9235[122]]({newValues:_0xa4c5x17},_0xa4c5x16[_0x9235[92]],_0xa4c5x17))})[_0x9235[91]](function(){return _0xa4c5x16[_0x9235[100]]()})[_0x9235[91]](function(_0xa4c5x26){var _0xa4c5x27=[];_0xa4c5x26[_0x9235[87]](function(_0xa4c5x28){_0xa4c5x27[_0x9235[86]](amiAction({action:_0x9235[117],queue:_0xa4c5x28[_0x9235[74]],interface:util[_0x9235[71]](_0x9235[78],_0x9235[79],_0xa4c5x16[_0x9235[74]]),membername:_0xa4c5x16[_0x9235[74]],penalty:_0xa4c5x28[_0x9235[119]][_0x9235[118]]}))});if(_0xa4c5x16[_0x9235[120]]){_0xa4c5x27[_0x9235[86]](amiAction({action:_0x9235[97],interface:util[_0x9235[71]](_0x9235[78],_0x9235[79],_0xa4c5x16[_0x9235[74]]),paused:true,reason:_0x9235[121]}))};return _0xa4c5x27})[_0x9235[111]]()[_0x9235[91]](function(_0xa4c5x1c){var _0xa4c5x1a=[];channels[_0x9235[87]](function(_0xa4c5x1b){_0xa4c5x1a[_0x9235[86]]({channel:_0xa4c5x1b,membername:_0xa4c5x16[_0x9235[74]],interface:util[_0x9235[71]](_0x9235[78],_0x9235[79],_0xa4c5x16[_0x9235[74]]),type:_0x9235[116],enterAt:moment()[_0x9235[71]](_0x9235[70]),role:_0xa4c5x16[_0x9235[84]],internal:_0xa4c5x16[_0x9235[85]]})});return models[_0x9235[90]][_0x9235[89]](_0xa4c5x1a,{raw:true,individualHooks:true})})[_0x9235[91]](function(){return _0xa4c5x16[_0x9235[95]](_0xa4c5x17)})[_0x9235[91]](amiUtil[_0x9235[115]](amiAction))}}}function handleLogout(_0xa4c5x13,_0xa4c5x15){return function(_0xa4c5x16){if(_0xa4c5x16[_0x9235[114]]){return BPromise[_0x9235[123]]()[_0x9235[91]](function(){return events[_0x9235[94]](_[_0x9235[122]]({newValues:{id:_0xa4c5x16[_0x9235[66]],online:false}},_0xa4c5x16[_0x9235[92]],{online:false}))})[_0x9235[91]](function(){return models[_0x9235[125]][_0x9235[112]]()})[_0x9235[91]](function(_0xa4c5x26){var _0xa4c5x27=[];_0xa4c5x26[_0x9235[87]](function(_0xa4c5x28){_0xa4c5x27[_0x9235[86]](amiAction({action:_0x9235[124],queue:_0xa4c5x28[_0x9235[74]],interface:util[_0x9235[71]](_0x9235[78],_0x9235[79],_0xa4c5x16[_0x9235[74]])}))});return BPromise[_0x9235[111]](_0xa4c5x27)[_0x9235[113]](function(_0xa4c5x24){console[_0x9235[32]](_0x9235[124],_0xa4c5x24)})})[_0x9235[91]](function(_0xa4c5x1c){return models[_0x9235[90]][_0x9235[112]]({where:{membername:_0xa4c5x16[_0x9235[74]],interface:util[_0x9235[71]](_0x9235[78],_0x9235[79],_0xa4c5x16[_0x9235[74]]),type:_0x9235[116],exitAt:null}})})[_0x9235[91]](function(_0xa4c5x21){var _0xa4c5x22=[];_0xa4c5x21[_0x9235[87]](function(_0xa4c5x23){_0xa4c5x22[_0x9235[86]](_0xa4c5x23[_0x9235[95]]({exitAt:moment()[_0x9235[71]](_0x9235[70])}))});return BPromise[_0x9235[111]](_0xa4c5x22)})[_0x9235[91]](function(){return _0xa4c5x16[_0x9235[95]]({online:false})})[_0x9235[91]](amiUtil[_0x9235[115]](amiAction))}}}function handleQueueAdd(_0xa4c5x13,_0xa4c5x15){return function(_0xa4c5x16){var _0xa4c5x2b=[];switch(_0xa4c5x13[_0x9235[68]][_0x9235[107]]){case _0x9235[15]:_0xa4c5x13[_0x9235[68]][_0x9235[128]][_0x9235[87]](function(_0xa4c5x2c){_0xa4c5x2b[_0x9235[86]](models[_0x9235[119]][_0x9235[127]]({where:{UserId:_0xa4c5x16[_0x9235[66]],queue:_0xa4c5x2c},defaults:{queue:_0xa4c5x2c,location:util[_0x9235[71]](_0x9235[126],_0xa4c5x16[_0x9235[74]]),membername:_0xa4c5x16[_0x9235[74]],UserId:_0xa4c5x16[_0x9235[66]]},transaction:_0xa4c5x13[_0x9235[88]]|| null,individualHooks:true,raw:true}))});return BPromise[_0x9235[111]](_0xa4c5x2b)[_0x9235[91]](function(){var _0xa4c5x27=[];_0xa4c5x13[_0x9235[68]][_0x9235[128]][_0x9235[87]](function(_0xa4c5x2c){_0xa4c5x27[_0x9235[86]](amiAction({action:_0x9235[117],queue:_0xa4c5x2c,interface:util[_0x9235[71]](_0x9235[78],_0x9235[79],_0xa4c5x16[_0x9235[74]]),membername:_0xa4c5x16[_0x9235[74]]}))});return BPromise[_0x9235[111]](_0xa4c5x27)})[_0x9235[113]](function(_0xa4c5x24){console[_0x9235[32]](_0xa4c5x24)});case _0x9235[16]:_0xa4c5x13[_0x9235[68]][_0x9235[128]][_0x9235[87]](function(_0xa4c5x2c){_0xa4c5x2b[_0x9235[86]](models[_0x9235[129]][_0x9235[127]]({where:{UserId:_0xa4c5x16[_0x9235[66]],ChatQueueId:_0xa4c5x2c[_0x9235[66]]},defaults:{ChatQueueId:_0xa4c5x2c[_0x9235[66]],queue:_0xa4c5x2c[_0x9235[74]],UserId:_0xa4c5x16[_0x9235[66]]},transaction:_0xa4c5x13[_0x9235[88]]|| null,individualHooks:true,raw:true}))});return BPromise[_0x9235[111]](_0xa4c5x2b)[_0x9235[113]](function(_0xa4c5x24){console[_0x9235[32]](_0xa4c5x24)});case _0x9235[17]:_0xa4c5x13[_0x9235[68]][_0x9235[128]][_0x9235[87]](function(_0xa4c5x2c){_0xa4c5x2b[_0x9235[86]](models[_0x9235[130]][_0x9235[127]]({where:{UserId:_0xa4c5x16[_0x9235[66]],MailQueueId:_0xa4c5x2c[_0x9235[66]]},defaults:{MailQueueId:_0xa4c5x2c[_0x9235[66]],queue:_0xa4c5x2c[_0x9235[74]],UserId:_0xa4c5x16[_0x9235[66]]},transaction:_0xa4c5x13[_0x9235[88]]|| null,individualHooks:true,raw:true}))});return BPromise[_0x9235[111]](_0xa4c5x2b)[_0x9235[113]](function(_0xa4c5x24){console[_0x9235[32]](_0xa4c5x24)});case _0x9235[19]:_0xa4c5x13[_0x9235[68]][_0x9235[128]][_0x9235[87]](function(_0xa4c5x2c){_0xa4c5x2b[_0x9235[86]](models[_0x9235[131]][_0x9235[127]]({where:{UserId:_0xa4c5x16[_0x9235[66]],SmsQueueId:_0xa4c5x2c[_0x9235[66]]},defaults:{SmsQueueId:_0xa4c5x2c[_0x9235[66]],queue:_0xa4c5x2c[_0x9235[74]],UserId:_0xa4c5x16[_0x9235[66]]},transaction:_0xa4c5x13[_0x9235[88]]|| null,individualHooks:true,raw:true}))});return BPromise[_0x9235[111]](_0xa4c5x2b)[_0x9235[113]](function(_0xa4c5x24){console[_0x9235[32]](_0xa4c5x24)});case _0x9235[20]:_0xa4c5x13[_0x9235[68]][_0x9235[128]][_0x9235[87]](function(_0xa4c5x2c){_0xa4c5x2b[_0x9235[86]](models[_0x9235[132]][_0x9235[127]]({where:{UserId:_0xa4c5x16[_0x9235[66]],OpenchannelQueueId:_0xa4c5x2c[_0x9235[66]]},defaults:{OpenchannelQueueId:_0xa4c5x2c[_0x9235[66]],queue:_0xa4c5x2c[_0x9235[74]],UserId:_0xa4c5x16[_0x9235[66]]},transaction:_0xa4c5x13[_0x9235[88]]|| null,individualHooks:true,raw:true}))});return BPromise[_0x9235[111]](_0xa4c5x2b)[_0x9235[113]](function(_0xa4c5x24){console[_0x9235[32]](_0xa4c5x24)});case _0x9235[18]:_0xa4c5x13[_0x9235[68]][_0x9235[128]][_0x9235[87]](function(_0xa4c5x2c){_0xa4c5x2b[_0x9235[86]](models[_0x9235[133]][_0x9235[127]]({where:{UserId:_0xa4c5x16[_0x9235[66]],FaxQueueId:_0xa4c5x2c[_0x9235[66]]},defaults:{faxQueueId:_0xa4c5x2c[_0x9235[66]],queue:_0xa4c5x2c[_0x9235[74]],UserId:_0xa4c5x16[_0x9235[66]]},transaction:_0xa4c5x13[_0x9235[88]]|| null,individualHooks:true,raw:true}))});return BPromise[_0x9235[111]](_0xa4c5x2b)[_0x9235[113]](function(_0xa4c5x24){console[_0x9235[32]](_0xa4c5x24)});default:}}}function handleQueueRemove(_0xa4c5x13,_0xa4c5x15){return function(_0xa4c5x16){switch(_0xa4c5x13[_0x9235[68]][_0x9235[107]]){case _0x9235[15]:return models[_0x9235[119]][_0x9235[137]]({where:{UserId:_0xa4c5x16[_0x9235[66]],queue:_0xa4c5x13[_0x9235[68]][_0x9235[136]]},transaction:_0xa4c5x13[_0x9235[88]]|| null,individualHooks:true,raw:true})[_0x9235[91]](function(){return amiAction({action:_0x9235[124],queue:_0xa4c5x13[_0x9235[68]][_0x9235[136]],interface:util[_0x9235[71]](_0x9235[78],_0x9235[79],_0xa4c5x16[_0x9235[74]])})})[_0x9235[113]](function(_0xa4c5x24){console[_0x9235[32]](_0x9235[134],_0xa4c5x24[_0x9235[135]])});case _0x9235[16]:return models[_0x9235[129]][_0x9235[137]]({where:{UserId:_0xa4c5x16[_0x9235[66]],ChatQueueId:_0xa4c5x13[_0x9235[68]][_0x9235[139]]},transaction:_0xa4c5x13[_0x9235[88]]|| null,individualHooks:true,raw:true})[_0x9235[113]](function(_0xa4c5x24){console[_0x9235[32]](_0x9235[138],_0xa4c5x24)});case _0x9235[17]:return models[_0x9235[130]][_0x9235[137]]({where:{UserId:_0xa4c5x16[_0x9235[66]],MailQueueId:_0xa4c5x13[_0x9235[68]][_0x9235[139]]},transaction:_0xa4c5x13[_0x9235[88]]|| null,individualHooks:true,raw:true})[_0x9235[113]](function(_0xa4c5x24){console[_0x9235[32]](_0x9235[140],_0xa4c5x24)});case _0x9235[19]:return models[_0x9235[131]][_0x9235[137]]({where:{UserId:_0xa4c5x16[_0x9235[66]],SmsQueueId:_0xa4c5x13[_0x9235[68]][_0x9235[139]]},transaction:_0xa4c5x13[_0x9235[88]]|| null,individualHooks:true,raw:true})[_0x9235[113]](function(_0xa4c5x24){console[_0x9235[32]](_0x9235[141],_0xa4c5x24)});case _0x9235[20]:return models[_0x9235[132]][_0x9235[137]]({where:{UserId:_0xa4c5x16[_0x9235[66]],OpenchannelQueueId:_0xa4c5x13[_0x9235[68]][_0x9235[139]]},transaction:_0xa4c5x13[_0x9235[88]]|| null,individualHooks:true,raw:true})[_0x9235[113]](function(_0xa4c5x24){console[_0x9235[32]](_0x9235[142],_0xa4c5x24)});case _0x9235[18]:return models[_0x9235[133]][_0x9235[137]]({where:{UserId:_0xa4c5x16[_0x9235[66]],FaxQueueId:_0xa4c5x13[_0x9235[68]][_0x9235[139]]},transaction:_0xa4c5x13[_0x9235[88]]|| null,individualHooks:true,raw:true})[_0x9235[113]](function(_0xa4c5x24){console[_0x9235[32]](_0x9235[143],_0xa4c5x24)});default:}}}function handleEntityNotFound(_0xa4c5x2f){return function(_0xa4c5x30){if(!_0xa4c5x30){throw _0xa4c5x2f};return _0xa4c5x30}}function onSave(_0xa4c5x15,_0xa4c5x13,ami){switch(_0xa4c5x15[_0x9235[74]]){case _0x9235[148]:return models[_0x9235[147]][_0x9235[146]](_0xa4c5x13[_0x9235[68]][_0x9235[145]])[_0x9235[91]](handleEntityNotFound({message:_0x9235[144]}))[_0x9235[91]](handlePause(_0xa4c5x13,_0xa4c5x15));case _0x9235[149]:return models[_0x9235[147]][_0x9235[146]](_0xa4c5x13[_0x9235[68]][_0x9235[145]])[_0x9235[91]](handleEntityNotFound({message:_0x9235[144]}))[_0x9235[91]](handleUnpause(_0xa4c5x13,_0xa4c5x15));case _0x9235[150]:return models[_0x9235[147]][_0x9235[146]](_0xa4c5x15[_0x9235[69]])[_0x9235[91]](handleEntityNotFound({message:_0x9235[144]}))[_0x9235[91]](handleLogin(_0xa4c5x13,_0xa4c5x15))[_0x9235[91]](function(){return models[_0x9235[147]][_0x9235[146]](_0xa4c5x15[_0x9235[69]])});case _0x9235[151]:return models[_0x9235[147]][_0x9235[146]](_0xa4c5x15[_0x9235[69]])[_0x9235[91]](handleEntityNotFound({message:_0x9235[144]}))[_0x9235[91]](handleUnpause(_0xa4c5x13,_0xa4c5x15))[_0x9235[91]](handleLogout(_0xa4c5x13,_0xa4c5x15));case _0x9235[117]:return models[_0x9235[147]][_0x9235[146]](_0xa4c5x13[_0x9235[68]][_0x9235[145]])[_0x9235[91]](handleEntityNotFound({message:_0x9235[144]}))[_0x9235[91]](handleQueueAdd(_0xa4c5x13,_0xa4c5x15));case _0x9235[124]:return models[_0x9235[147]][_0x9235[146]](_0xa4c5x13[_0x9235[68]][_0x9235[145]])[_0x9235[91]](handleEntityNotFound({message:_0x9235[144]}))[_0x9235[91]](handleQueueRemove(_0xa4c5x13,_0xa4c5x15));default:throw {message:_0x9235[152]}}}function clean(ami,channels){removeInactiveCalls(ami);_[_0x9235[87]](channels,function(_0xa4c5x1b){removeExpiredApplications(_0xa4c5x1b)})}function removeInactiveCalls(ami){console[_0x9235[154]](_0x9235[153]);var _0xa4c5x34=[],_0xa4c5x35=[];return amiAction({action:_0x9235[170],command:_0x9235[171]})[_0x9235[91]](function(_0xa4c5x3a){var _0xa4c5x3b;if(_0xa4c5x3a&& _0xa4c5x3a[_0x9235[164]]){var _0xa4c5x3c=_0xa4c5x3a[_0x9235[164]][_0x9235[166]](_0x9235[165]);_[_0x9235[87]](_0xa4c5x3c,function(_0xa4c5x19){if(_0xa4c5x19){_0xa4c5x3b= _0xa4c5x19[_0x9235[166]](_0x9235[167]);_0xa4c5x3b[_0x9235[96]]=== 14&& _0xa4c5x35[_0x9235[86]](_0xa4c5x3b[_0x9235[168]]())}})};return models[_0x9235[169]][_0x9235[112]]({where:{$or:[{queuecallerleaveAt:null,queuecallerexit:false},{queuecallerexit:false,queuecallerabandon:false,queuecallercomplete:false,queuecallerleaveAt:{$ne:null}}]}})})[_0x9235[91]](function(_0xa4c5x39){_[_0x9235[87]](_0xa4c5x39,function(_0xa4c5x37){if(!_[_0x9235[158]](_0xa4c5x35,_0xa4c5x37[_0x9235[157]])){_0xa4c5x34[_0x9235[86]](_0xa4c5x37[_0x9235[95]]({queuecallerleaveAt:moment()[_0x9235[71]](_0x9235[70]),queuecallerexitAt:moment()[_0x9235[71]](_0x9235[70]),queuecallerexit:true,queuecallerexitreason:_0x9235[162]}))}});return models[_0x9235[163]][_0x9235[112]]({where:{leaveAt:null}})})[_0x9235[91]](function(_0xa4c5x38){_[_0x9235[87]](_0xa4c5x38,function(_0xa4c5x37){if(!_[_0x9235[158]](_0xa4c5x35,_0xa4c5x37[_0x9235[157]])){_0xa4c5x34[_0x9235[86]](_0xa4c5x37[_0x9235[95]]({leaveAt:moment()[_0x9235[71]](_0x9235[70]),network:_0x9235[160]}))}});return models[_0x9235[161]][_0x9235[112]]({where:{endtime:null}})})[_0x9235[91]](function(_0xa4c5x36){_[_0x9235[87]](_0xa4c5x36,function(_0xa4c5x37){if(!_[_0x9235[158]](_0xa4c5x35,_0xa4c5x37[_0x9235[157]])){_0xa4c5x34[_0x9235[86]](_0xa4c5x37[_0x9235[95]]({endtime:moment()[_0x9235[71]](_0x9235[70]),dialstatus:_0x9235[159]}))}});return _0xa4c5x34})[_0x9235[111]]()[_0x9235[91]](function(){console[_0x9235[154]](_0x9235[156])})[_0x9235[113]](function(_0xa4c5x24){console[_0x9235[32]](_0x9235[155],_0xa4c5x24)})}function removeExpiredApplications(_0xa4c5x1b){return models[_0x9235[180]+ _0xa4c5x1b+ _0x9235[181]][_0x9235[112]]({where:{leaveAt:null,timeslot:{$ne:null}}})[_0x9235[91]](function(_0xa4c5x3e){var _0xa4c5x3f,_0xa4c5x40=[];_[_0x9235[87]](_0xa4c5x3e,function(_0xa4c5x41){_0xa4c5x3f= moment(_0xa4c5x41[_0x9235[178]])[_0x9235[177]](_0xa4c5x41[_0x9235[175]],_0x9235[176]);if(moment()[_0x9235[179]](_0xa4c5x3f)){_0xa4c5x40[_0x9235[86]](_0xa4c5x41[_0x9235[95]]({timeout:true,leaveAt:moment()[_0x9235[71]](_0x9235[70])}))}});return _0xa4c5x40})[_0x9235[111]]()[_0x9235[91]](function(){console[_0x9235[154]](_0x9235[172]+ _0xa4c5x1b+ _0x9235[174])})[_0x9235[113]](function(_0xa4c5x24){console[_0x9235[32]](_0x9235[172]+ _0xa4c5x1b+ _0x9235[173],_0xa4c5x24)})}var channelModels=[_0x9235[182],_0x9235[183],_0x9235[184],_0x9235[185],_0x9235[186]];clean(ami,channelModels);setInterval(function(){clean(ami,channelModels)},10* 60* 1000);models[_0x9235[187]][_0x9235[64]](function(_0xa4c5x12){networkRewrite(_0xa4c5x12,ami)});models[_0x9235[187]][_0x9235[188]](function(_0xa4c5x12){networkRewrite(_0xa4c5x12,ami)});models[_0x9235[187]][_0x9235[189]](function(_0xa4c5x12){networkRewrite(_0xa4c5x12,ami)});function networkRewrite(_0xa4c5x12,ami){switch(_0xa4c5x12[_0x9235[67]]){case _0x9235[201]:return models[_0x9235[203]][_0x9235[202]](_0x9235[201])[_0x9235[112]]()[_0x9235[91]](function(_0xa4c5x44){var _0xa4c5x45=_0x9235[191];var _0xa4c5x46=_0x9235[192];_0xa4c5x44[_0x9235[87]](function(_0xa4c5x47){_0xa4c5x45+= util[_0x9235[71]](_0x9235[193],_0xa4c5x47[_0x9235[194]])});fs[_0x9235[200]](path[_0x9235[196]](config[_0x9235[195]],_0xa4c5x46),_0xa4c5x45,{flags:_0x9235[197],mode:parseInt(_0x9235[198],8)},function(_0xa4c5x24){if(_0xa4c5x24){throw _0xa4c5x24};reload(ami);console[_0x9235[154]](_0x9235[199])})})[_0x9235[113]](function(_0xa4c5x24){console[_0x9235[32]](_0x9235[190],_0xa4c5x24)});case _0x9235[208]:return models[_0x9235[187]][_0x9235[202]](_0x9235[208])[_0x9235[112]]()[_0x9235[91]](function(_0xa4c5x48){var _0xa4c5x49=_0x9235[191];var _0xa4c5x4a=_0x9235[205];_0xa4c5x48[_0x9235[87]](function(_0xa4c5x4b){_0xa4c5x49+= util[_0x9235[71]](_0x9235[206],_0xa4c5x4b[_0x9235[194]])});fs[_0x9235[200]](path[_0x9235[196]](config[_0x9235[195]],_0xa4c5x4a),_0xa4c5x49,{flags:_0x9235[197],mode:parseInt(_0x9235[198],8)},function(_0xa4c5x24){if(_0xa4c5x24){throw _0xa4c5x24};reload(ami);console[_0x9235[154]](_0x9235[207])})})[_0x9235[113]](function(_0xa4c5x24){console[_0x9235[32]](_0x9235[204],_0xa4c5x24)});default:console[_0x9235[32]](_0x9235[209],_0xa4c5x12[_0x9235[67]])}}function reload(ami){return amiAction({Action:_0x9235[211]})[_0x9235[91]](function(_0xa4c5x3c){console[_0x9235[154]](_0x9235[210],_0xa4c5x3c)})[_0x9235[113]](function(_0xa4c5x24){console[_0x9235[32]](_0x9235[210],_0xa4c5x24)})}models[_0x9235[213]][_0x9235[64]](function(_0xa4c5x12){if(_0xa4c5x12[_0x9235[212]]){trunksRewrite(_0xa4c5x12[_0x9235[92]],ami,false)}});models[_0x9235[213]][_0x9235[188]](function(_0xa4c5x12){if(!_0xa4c5x12[_0x9235[214]](_0x9235[105])&& !_0xa4c5x12[_0x9235[214]](_0x9235[36])){trunksRewrite(_0xa4c5x12[_0x9235[92]],ami,false)}});models[_0x9235[213]][_0x9235[189]](function(_0xa4c5x12){trunksRewrite(_0xa4c5x12[_0x9235[92]],ami,true)});function trunksRewrite(_0xa4c5x12,ami,_0xa4c5x4e){var _0xa4c5x4f=_0x9235[191];var _0xa4c5x50=_0x9235[191];var _0xa4c5x51=_0x9235[215];if(!_0xa4c5x4e&& _0xa4c5x12[_0x9235[212]]){var _0xa4c5x52=_[_0x9235[216]](_0xa4c5x12);delete _0xa4c5x52[_0x9235[217]];delete _0xa4c5x52[_0x9235[178]];delete _0xa4c5x52[_0x9235[212]];delete _0xa4c5x52[_0x9235[105]];delete _0xa4c5x52[_0x9235[36]];if(_0xa4c5x52[_0x9235[37]]){_0xa4c5x50+= util[_0x9235[71]](_0xa4c5x51,_0xa4c5x52[_0x9235[37]])};delete _0xa4c5x52[_0x9235[37]];_0xa4c5x4f+= util[_0x9235[71]](_0x9235[218],_0xa4c5x52[_0x9235[74]]);if(_0xa4c5x52[_0x9235[219]]){_0xa4c5x4f+= util[_0x9235[71]](_0x9235[220],_0xa4c5x52[_0x9235[219]]);delete _0xa4c5x52[_0x9235[219]]};for(var _0xa4c5x53 in _0xa4c5x52){if(_0xa4c5x52[_0xa4c5x53]){switch(_0xa4c5x53){case _0x9235[223]:var _0xa4c5x54=_0xa4c5x52[_0xa4c5x53][_0x9235[166]](_0x9235[221]);_0xa4c5x54[_0x9235[87]](function(_0xa4c5x19){_0xa4c5x4f+= util[_0x9235[71]](_0x9235[222],_0xa4c5x53,_0xa4c5x19)});break;default:_0xa4c5x4f+= util[_0x9235[71]](_0x9235[222],_0xa4c5x53,_0xa4c5x52[_0xa4c5x53])}}}};return models[_0x9235[213]][_0x9235[112]]({where:{name:{$ne:_0xa4c5x12[_0x9235[74]]},active:true}})[_0x9235[91]](function(_0xa4c5x55){var _0xa4c5x56=_[_0x9235[224]](_0xa4c5x55,_0x9235[92]);_0xa4c5x56[_0x9235[87]](function(_0xa4c5x57){delete _0xa4c5x57[_0x9235[217]];delete _0xa4c5x57[_0x9235[178]];delete _0xa4c5x57[_0x9235[212]];delete _0xa4c5x57[_0x9235[105]];delete _0xa4c5x57[_0x9235[36]];if(_0xa4c5x57[_0x9235[37]]){_0xa4c5x50+= util[_0x9235[71]](_0xa4c5x51,_0xa4c5x57[_0x9235[37]])};delete _0xa4c5x57[_0x9235[37]];_0xa4c5x4f+= util[_0x9235[71]](_0x9235[218],_0xa4c5x57[_0x9235[74]]);if(_0xa4c5x57[_0x9235[219]]){_0xa4c5x4f+= util[_0x9235[71]](_0x9235[220],_0xa4c5x57[_0x9235[219]]);delete _0xa4c5x57[_0x9235[219]]};for(var _0xa4c5x53 in _0xa4c5x57){if(_0xa4c5x57[_0xa4c5x53]){switch(_0xa4c5x53){case _0x9235[223]:var _0xa4c5x54=_0xa4c5x57[_0xa4c5x53][_0x9235[166]](_0x9235[221]);_0xa4c5x54[_0x9235[87]](function(_0xa4c5x19){_0xa4c5x4f+= util[_0x9235[71]](_0x9235[222],_0xa4c5x53,_0xa4c5x19)});break;default:_0xa4c5x4f+= util[_0x9235[71]](_0x9235[222],_0xa4c5x53,_0xa4c5x57[_0xa4c5x53])}}}});fs[_0x9235[200]](path[_0x9235[196]](config[_0x9235[195]],_0x9235[225]),_0xa4c5x4f,{flags:_0x9235[197],mode:parseInt(_0x9235[198],8)},function(_0xa4c5x24){if(_0xa4c5x24){throw _0xa4c5x24};console[_0x9235[154]](_0x9235[226]);fs[_0x9235[200]](path[_0x9235[196]](config[_0x9235[195]],_0x9235[227]),_0xa4c5x50,{flags:_0x9235[197],mode:parseInt(_0x9235[198],8)},function(_0xa4c5x24){if(_0xa4c5x24){throw _0xa4c5x24};reload(ami);console[_0x9235[154]](_0x9235[228])})})})[_0x9235[113]](function(_0xa4c5x24){console[_0x9235[32]](_0xa4c5x24)})}models[_0x9235[230]][_0x9235[64]](function(_0xa4c5x12){return BPromise[_0x9235[123]]()[_0x9235[91]](rewriteContexts(_0xa4c5x12,ami,false))[_0x9235[91]](createHangup(_0xa4c5x12))[_0x9235[113]](function(_0xa4c5x24){console[_0x9235[32]](_0x9235[229],_0xa4c5x24)})});models[_0x9235[230]][_0x9235[189]](function(_0xa4c5x12){return BPromise[_0x9235[123]]()[_0x9235[91]](rewriteContexts(_0xa4c5x12,ami,true))[_0x9235[113]](function(_0xa4c5x24){console[_0x9235[32]](_0x9235[231],_0xa4c5x24)})});function rewriteContexts(_0xa4c5x12,ami,_0xa4c5x59){return function(){var _0xa4c5x5a=_0x9235[191];if(!_0xa4c5x59){_0xa4c5x5a= util[_0x9235[71]](_0x9235[232],_0xa4c5x12[_0x9235[74]],_0xa4c5x12[_0x9235[74]])};return models[_0x9235[230]][_0x9235[112]]({where:{id:{$ne:_0xa4c5x12[_0x9235[66]]}}})[_0x9235[91]](function(_0xa4c5x5b){_0xa4c5x5b[_0x9235[87]](function(_0xa4c5x57){_0xa4c5x5a+= util[_0x9235[71]](_0x9235[232],_0xa4c5x57[_0x9235[74]],_0xa4c5x57[_0x9235[74]])});fs[_0x9235[200]](path[_0x9235[196]](config[_0x9235[195]],_0x9235[234]),_0xa4c5x5a,{flags:_0x9235[197],mode:parseInt(_0x9235[198],8)},function(_0xa4c5x24){if(_0xa4c5x24){throw _0xa4c5x24};console[_0x9235[154]](_0x9235[235]);return amiAction({Action:_0x9235[211]},function(_0xa4c5x24,_0xa4c5x3c){if(_0xa4c5x24){console[_0x9235[32]](_0xa4c5x24)}else {console[_0x9235[154]](_0xa4c5x3c)}})})})[_0x9235[113]](function(_0xa4c5x24){console[_0x9235[32]](_0x9235[233],_0xa4c5x24)})}}function createHangup(_0xa4c5x12){return function(){console[_0x9235[154]](_0x9235[236],_0xa4c5x12[_0x9235[74]]);var _0xa4c5x20=[{context:_0xa4c5x12[_0x9235[74]],exten:_0x9235[237],priority:_0x9235[238],VoiceContextId:_0xa4c5x12[_0x9235[66]],type:_0x9235[239],app:_0x9235[240]},{context:_0xa4c5x12[_0x9235[74]],exten:_0x9235[241],priority:_0x9235[238],VoiceContextId:_0xa4c5x12[_0x9235[66]],type:_0x9235[239],app:_0x9235[240]}];return models[_0x9235[244]][_0x9235[89]](_0xa4c5x20)[_0x9235[91]](function(){console[_0x9235[154]](_0x9235[243])})[_0x9235[113]](function(_0xa4c5x24){console[_0x9235[32]](_0x9235[242],_0xa4c5x24)})}}function execRequest(_0xa4c5x12,_0xa4c5x5e,_0xa4c5x5f){return Util[_0x9235[247]](_0xa4c5x12,_0xa4c5x5e,_0xa4c5x5f)[_0x9235[91]](function(_0xa4c5x60){console[_0x9235[154]](_0x9235[246])})[_0x9235[113]](function(_0xa4c5x24){console[_0x9235[32]](_0x9235[245])})}function webhook(_0xa4c5x12,_0xa4c5x62,_0xa4c5x63){return function(_0xa4c5x3c){var _0xa4c5x64=_0xa4c5x62;switch(_0xa4c5x63){case _0x9235[255]:if(_0xa4c5x64[_0x9235[248]]&& _0xa4c5x64[_0x9235[249]]){console[_0x9235[154]](_0x9235[250]+ _0xa4c5x64[_0x9235[74]]+ _0x9235[251]);execRequest(_0xa4c5x12[_0x9235[92]]|| _0xa4c5x12,_0xa4c5x64[_0x9235[248]],_0xa4c5x64[_0x9235[249]])};if(_0xa4c5x64[_0x9235[252]][_0x9235[96]]){_[_0x9235[87]](_0xa4c5x64[_0x9235[252]],function(_0xa4c5x15){if(_0xa4c5x15[_0x9235[253]]){Util[_0x9235[254]](_0xa4c5x15,_0xa4c5x12)}})};break;case _0x9235[259]:if(_0xa4c5x64[_0x9235[256]]&& _0xa4c5x64[_0x9235[257]]){console[_0x9235[154]](_0x9235[250]+ _0xa4c5x64[_0x9235[74]]+ _0x9235[258]);execRequest(_0xa4c5x12[_0x9235[92]]|| _0xa4c5x12,_0xa4c5x64[_0x9235[256]],_0xa4c5x64[_0x9235[257]])};break;case _0x9235[31]:if(_0xa4c5x64[_0x9235[260]]&& _0xa4c5x64[_0x9235[261]]){console[_0x9235[154]](_0x9235[250]+ _0xa4c5x64[_0x9235[74]]+ _0x9235[262]);execRequest(_0xa4c5x12[_0x9235[92]]|| _0xa4c5x12,_0xa4c5x64[_0x9235[260]],_0xa4c5x64[_0x9235[261]])};break;default:console[_0x9235[154]](_0x9235[263])}}}function getFaxRoom(){return function(_0xa4c5x62,_0xa4c5x66){if(_0xa4c5x66[_0x9235[264]]){return models[_0x9235[265]][_0x9235[146]](_0xa4c5x66.FaxRoomId)}else {return models[_0x9235[265]][_0x9235[112]]({limit:1,where:{contact:_0xa4c5x66[_0x9235[268]],FaxAccountId:_0xa4c5x62[_0x9235[66]]},order:[[_0x9235[217],_0x9235[271]]]})[_0x9235[91]](function(_0xa4c5x67){var _0xa4c5x68=_[_0x9235[266]](_0xa4c5x67);if(!_0xa4c5x68|| _0xa4c5x68[_0x9235[105]]=== _0x9235[267]){return models[_0x9235[265]][_0x9235[270]]({contact:_0xa4c5x66[_0x9235[268]],account:_0xa4c5x62[_0x9235[74]],status:_0x9235[269],FaxAccountId:_0xa4c5x62[_0x9235[66]]})}else {return _0xa4c5x68}})}}}function sendFax(_0xa4c5x6a,_0xa4c5x6b,_0xa4c5x6c){if(_0xa4c5x6a[_0x9235[105]]=== _0x9235[272]){var _0xa4c5x6d;var _0xa4c5x6e=_0xa4c5x6a;var _0xa4c5x6f=_0xa4c5x6a[_0x9235[273]];var _0xa4c5x70=_0xa4c5x6a[_0x9235[268]];var _0xa4c5x71;var _0xa4c5x72;var _0xa4c5x73,_0xa4c5x74;return models[_0x9235[326]][_0x9235[108]]({where:{localstationid:_0xa4c5x6e[_0x9235[273]]}})[_0x9235[91]](function(_0xa4c5x79){if(!_0xa4c5x79){throw new Error(_0x9235[323])};console[_0x9235[154]](_0x9235[324],_0xa4c5x79[_0x9235[288]]);_0xa4c5x71= _[_0x9235[216]](_0xa4c5x79[_0x9235[92]]);return models[_0x9235[213]][_0x9235[108]]({where:{name:_0xa4c5x71[_0x9235[325]]},attributes:[_0x9235[74]]})})[_0x9235[91]](function(_0xa4c5x78){if(!_0xa4c5x78){throw new Error(_0x9235[321])};console[_0x9235[154]](_0x9235[322],_0xa4c5x78[_0x9235[74]]);_0xa4c5x72= _[_0x9235[216]](_0xa4c5x78[_0x9235[92]]);return})[_0x9235[91]](function(){return [_0xa4c5x71,_0xa4c5x6e]})[_0x9235[311]](getFaxRoom())[_0x9235[91]](function(_0xa4c5x77){if(!_0xa4c5x77){throw new Error(_0x9235[318])};console[_0x9235[154]](_0x9235[319],_0xa4c5x77[_0x9235[66]]);_0xa4c5x6d= _0xa4c5x77;return _0xa4c5x6d[_0x9235[320]](_0xa4c5x6e[_0x9235[66]])})[_0x9235[91]](function(){return _0xa4c5x6d[_0x9235[95]]({status:_0x9235[269],lastEvent:_0x9235[272],lastEventAt:moment()[_0x9235[71]](_0x9235[70]),faxOut:++_0xa4c5x6d[_0x9235[316]]},{individualHooks:true,user:_0xa4c5x6c[_0x9235[317]]})})[_0x9235[91]](function(_0xa4c5x20){console[_0x9235[154]](_0x9235[314],_0xa4c5x20[_0x9235[66]]);return _0xa4c5x6d[_0x9235[315]](_0xa4c5x6e.UserId)})[_0x9235[91]](function(){return models[_0x9235[147]][_0x9235[146]](_0xa4c5x6e.UserId)})[_0x9235[91]](function(){if(_0xa4c5x71[_0x9235[312]]){return models[_0x9235[313]][_0x9235[127]]({where:{ListId:_0xa4c5x71[_0x9235[312]],$or:[{phone:_0xa4c5x70},{fax:_0xa4c5x70}]},defaults:{fax:_0xa4c5x70,phone:_0xa4c5x70,firstName:_0xa4c5x70,ListId:_0xa4c5x71[_0x9235[312]]}})}else {return []}})[_0x9235[311]](function(_0xa4c5x75,_0xa4c5x76){if(_0xa4c5x76!== undefined&& !_0xa4c5x76){return _0xa4c5x75[_0x9235[95]]({fax:_0xa4c5x70})};return})[_0x9235[91]](function(){_0xa4c5x73= _0xa4c5x6e[_0x9235[299]][0][_0x9235[6]];if(_0xa4c5x6e[_0x9235[299]][0][_0x9235[67]]=== _0x9235[300]){_0xa4c5x74= path[_0x9235[196]](config[_0x9235[301]],_0x9235[302],_0x9235[303],_0x9235[18],_0x9235[304],_0x9235[305],_0x9235[306],path[_0x9235[307]](_0xa4c5x73)[_0x9235[74]]+ _0x9235[308])}else {_0xa4c5x74= path[_0x9235[196]](config[_0x9235[301]],_0x9235[302],_0x9235[303],_0x9235[18],_0x9235[304],_0x9235[305],_0x9235[306],path[_0x9235[307]](_0xa4c5x73)[_0x9235[309]]);fse[_0x9235[310]](_0xa4c5x73,_0xa4c5x74);return}})[_0x9235[91]](function(){fs[_0x9235[297]](_0xa4c5x74,511);console[_0x9235[154]](_0x9235[298]);return models[_0x9235[281]][_0x9235[280]]({filename:_0xa4c5x74,localstationid:_0xa4c5x6e[_0x9235[273]],retry:_0xa4c5x6b},{where:{id:_0xa4c5x6e[_0x9235[66]]}})})[_0x9235[91]](function(_0xa4c5x6a){return amiAction({action:_0x9235[283],channel:util[_0x9235[71]](_0x9235[284],_0xa4c5x71[_0x9235[285]],_0xa4c5x72[_0x9235[74]],_0xa4c5x70),exten:_0xa4c5x70,context:_0x9235[286],priority:1,callerid:util[_0x9235[71]](_0x9235[287],_0xa4c5x71[_0x9235[288]],_0xa4c5x71[_0x9235[288]]),variable:{FAXNAME:_0xa4c5x71[_0x9235[74]],FAXNUMBER:_0xa4c5x70,FAXECM:_0xa4c5x71[_0x9235[289]],FAXHEADERINFO:_0xa4c5x71[_0x9235[290]],FAXLOCALSTATIONID:_0xa4c5x71[_0x9235[288]],FAXMINRATE:_0xa4c5x71[_0x9235[291]],FAXMAXRATE:_0xa4c5x71[_0x9235[292]],FAXMODEM:util[_0x9235[71]](_0x9235[293],_0xa4c5x71[_0x9235[294]]),FAXGATEWAY:_0xa4c5x71[_0x9235[295]],FAXT38TIMEOUT:_0xa4c5x71[_0x9235[296]],FAXOUTFILE:_0xa4c5x74},account:_0xa4c5x71[_0x9235[288]]})})[_0x9235[91]](function(_0xa4c5x3c){console[_0x9235[154]](_0x9235[282]);console[_0x9235[154]](_0xa4c5x3c)})[_0x9235[113]](function(_0xa4c5x24){console[_0x9235[32]](_0x9235[274],_0xa4c5x24);console[_0x9235[32]](_0x9235[275],_0xa4c5x24[_0x9235[276]]);console[_0x9235[32]](_0x9235[277],_0xa4c5x24[_0x9235[135]]);return models[_0x9235[281]][_0x9235[280]]({status:_0x9235[279]},{where:{id:_0xa4c5x6e[_0x9235[66]]}})[_0x9235[91]](function(_0xa4c5x20){if(_0xa4c5x6d){return _0xa4c5x6d[_0x9235[95]]({lastEvent:_0x9235[279]})};return})[_0x9235[113]](function(_0xa4c5x24){console[_0x9235[32]](_0x9235[278],_0xa4c5x24);console[_0x9235[32]](_0x9235[275],_0xa4c5x24[_0x9235[276]]);console[_0x9235[32]](_0x9235[277],_0xa4c5x24[_0x9235[135]])})})}}models[_0x9235[281]][_0x9235[64]](function(_0xa4c5x12){sendFax(_0xa4c5x12[_0x9235[92]],0,_0xa4c5x12[_0x9235[327]])});models[_0x9235[281]][_0x9235[188]](function(_0xa4c5x12){if(_0xa4c5x12[_0x9235[214]](_0x9235[105])&& _0xa4c5x12[_0x9235[105]]=== _0x9235[272]){sendFax(_0xa4c5x12[_0x9235[92]],_0xa4c5x12[_0x9235[328]]+ 1,_0xa4c5x12[_0x9235[327]])}});models[_0x9235[333]][_0x9235[188]](function(_0xa4c5x12){var _0xa4c5x62=_[_0x9235[330]](faxaccounts,{id:parseInt(_0xa4c5x12[_0x9235[329]])});if(_0xa4c5x62&& _0xa4c5x12[_0x9235[214]](_0x9235[331])){webhook(_0xa4c5x12[_0x9235[92]],_0xa4c5x62,_0x9235[255])};if(_0xa4c5x62&& _0xa4c5x12[_0x9235[214]](_0x9235[332])){webhook(_0xa4c5x12[_0x9235[92]],_0xa4c5x62,_0x9235[259])}});models[_0x9235[265]][_0x9235[188]](function(_0xa4c5x12){var _0xa4c5x7a=_[_0x9235[330]](faxaccounts,{id:_0xa4c5x12[_0x9235[334]]});if(_0xa4c5x7a&& _0xa4c5x12[_0x9235[214]](_0x9235[105])&& _0xa4c5x12[_0x9235[105]]=== _0x9235[267]){webhook(_0xa4c5x12[_0x9235[92]],_0xa4c5x7a,_0x9235[31])}});models[_0x9235[326]][_0x9235[64]](function(_0xa4c5x12){faxaccounts[_0x9235[86]](_0xa4c5x12[_0x9235[92]])});models[_0x9235[326]][_0x9235[188]](function(_0xa4c5x12){var _0xa4c5x7b=_[_0x9235[330]](faxaccounts,{id:_0xa4c5x12[_0x9235[66]]});if(_0xa4c5x7b){console[_0x9235[154]](_0x9235[335]+ _0xa4c5x7b[_0x9235[74]]+ _0x9235[336]);_[_0x9235[93]](_0xa4c5x7b,_0xa4c5x12[_0x9235[92]])}else {faxaccounts[_0x9235[337]](_0xa4c5x12[_0x9235[92]])}});models[_0x9235[326]][_0x9235[189]](function(_0xa4c5x12){_[_0x9235[338]](faxaccounts,{id:_0xa4c5x12[_0x9235[66]]})});models[_0x9235[326]][_0x9235[112]]({raw:true})[_0x9235[91]](function(_0xa4c5x7c){faxaccounts= _0xa4c5x7c})[_0x9235[113]](function(_0xa4c5x24){console[_0x9235[32]](_0x9235[339],_0xa4c5x24)});module[_0x9235[340]]= ami