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A,IACP,6FAEFiC,SAAU,CACRC,GAAI,aACJC,GAAI,mBAIRjC,EAAE,mBACCC,GAAG,SAAS,SAASC,GACpBA,EAAEC,iBACF,MAAMC,EAAQJ,EAAEK,MAEZD,EAAM8B,QAAQ,0BAA0BC,QAI5C/B,EACG8B,QAAQ,MACRE,KAAK,MACLC,KAAK,sBACLC,YAAY,CACXC,KAAAA,GACEnC,EAAMoC,YAAY,wBACpB,GAEN,IACCC,OAAO,gDACPZ,KAAK,CAACC,SAAShC,EAAAA,EAAAA,IAAG,qCAErBE,EAAE,qBAAqBC,GAAG,SAAS,WACjC,MAAMyC,EAAS1C,EAAEK,MACjBqC,EAAOF,YAAY,6BACnB,MAAMG,EAASD,EAAOE,SAAS,SAC/BD,EAAOE,KAAK,OAAgC,SAAxBF,EAAOE,KAAK,QAAqB,WAAa,OACpE,GACF,CACD,CA7GD,CA6GGC,O","sources":["webpack:///indico/modules/vc/client/js/index.js"],"sourcesContent":["// This file is part of Indico.\n// Copyright (C) 2002 - 2024 CERN\n//\n// Indico is free software; you can redistribute it and/or\n// modify it under the terms of the MIT License; see the\n// LICENSE file for more details.\n\n/* global choiceConfirmPrompt:false, confirmPrompt:false, build_url:false */\n\nimport {$T} from 'indico/utils/i18n';\n\n(function(global) {\n // TODO: Add plugin i18n\n const $t = $T;\n\n global.eventManageVCRooms = function() {\n $('.js-vcroom-remove').on('click', function(e) {\n e.preventDefault();\n const $this = $(this);\n let title, msg;\n\n function execute(url) {\n const csrf = $('', {\n type: 'hidden',\n name: 'csrf_token',\n value: $('#csrf-token').attr('content'),\n });\n $('
', {\n action: url,\n method: 'post',\n })\n .append(csrf)\n .appendTo('body')\n .submit();\n }\n\n if ($this.data('numEvents') === 1) {\n title = $t('Delete videoconference');\n msg = `${$t('Do you really want to remove this videoconference from the event?')} ${$t(\n 'Since it is only used in this event, it will be deleted from the server, too!'\n )}`;\n msg += $this.data('extraMsg');\n confirmPrompt(msg, title).then(function() {\n execute($this.data('href'));\n });\n } else {\n title = $t('Detach videoconference');\n msg = $t\n .ngettext(\n '*',\n 'This videoconference is used in other Indico events.
Do you want to \\\n delete it from all {0} events or just detach \\\n it from this event?',\n $this.data('numEvents')\n )\n .format($this.data('numEvents'));\n msg += $this.data('extraMsg');\n choiceConfirmPrompt(msg, title, $t('Detach'), $t('Delete')).then(function(choice) {\n const url = build_url($this.data('href'), {delete_all: choice === 2 ? '1' : ''});\n execute(url);\n });\n }\n });\n\n $('.js-vcroom-refresh').on('click', function(e) {\n e.preventDefault();\n const $this = $(this);\n const csrf = $('', {\n type: 'hidden',\n name: 'csrf_token',\n value: $('#csrf-token').attr('content'),\n });\n $('', {\n action: $this.data('href'),\n method: 'post',\n })\n .append(csrf)\n .appendTo('body')\n .submit();\n });\n\n $('.vc-room-entry.deleted').qtip({\n content: $T(\n 'This room has been deleted and cannot be used. You can detach it from the event, however.'\n ),\n position: {\n my: 'top center',\n at: 'bottom center',\n },\n });\n\n $('.toggle-details')\n .on('click', function(e) {\n e.preventDefault();\n const $this = $(this);\n\n if ($this.closest('.vc-room-entry.deleted').length) {\n return;\n }\n\n $this\n .closest('tr')\n .next('tr')\n .find('.details-container')\n .slideToggle({\n start() {\n $this.toggleClass('icon-next icon-expand');\n },\n });\n })\n .filter('.vc-room-entry:not(.deleted) .toggle-details')\n .qtip({content: $T('Click to toggle collapse status')});\n\n $('.toggle .i-button').on('click', function() {\n const toggle = $(this);\n toggle.toggleClass('icon-eye icon-eye-blocked');\n const $input = toggle.siblings('input');\n $input.prop('type', $input.prop('type') === 'text' ? 'password' : 'text');\n });\n };\n})(window);\n"],"names":["global","$t","$T","eventManageVCRooms","$","on","e","preventDefault","$this","this","title","msg","execute","url","csrf","type","name","value","attr","action","method","append","appendTo","submit","data","confirmPrompt","then","ngettext","format","choiceConfirmPrompt","choice","build_url","delete_all","qtip","content","position","my","at","closest","length","next","find","slideToggle","start","toggleClass","filter","toggle","$input","siblings","prop","window"],"sourceRoot":""}