{"version":3,"sources":["webpack:///./public/javascripts/translations/terms_of_service_modal.js","webpack:///./ui/shims/dummyI18nResource.js?7190","webpack:///./ui/features/terms_of_service_modal/react/TermsOfServiceModal.js","webpack:///./ui/features/terms_of_service_modal/index.js","webpack:///./packages/jquery-scroll-to-visible/index.js","webpack:///./public/javascripts/translations/modal.js","webpack:///./ui/shims/dummyI18nResource.js?1911","webpack:///./ui/shared/instui-bindings/react/InstuiModal.js","webpack:///./ui/shared/axios/index.js","webpack:///./node_modules/@instructure/ui-utils/es/parseUnit.js","webpack:///./public/javascripts/translations/lib.text_helper.js","webpack:///./ui/shims/dummyI18nResource.js?24a1","webpack:///./ui/shared/util/TextHelper.coffee","webpack:///./node_modules/@instructure/ui-prop-types/es/childrenOrValue.js","webpack:///./node_modules/@instructure/ui-prop-types/es/makeRequirable.js","webpack:///./public/javascripts/translations/instructure_misc_plugins.js","webpack:///./ui/shims/dummyI18nResource.js?726f","webpack:///./ui/shared/jquery/jquery.instructure_misc_plugins.js","webpack:///./ui/shared/external-apps/iframeAllowances.js","webpack:///./node_modules/@instructure/ui-prop-types/es/Children.js","webpack:///./node_modules/@instructure/ui-dom-utils/es/findFocusable.js","webpack:///./node_modules/@instructure/ui-heading/es/Heading/theme.js","webpack:///./node_modules/@instructure/ui-heading/es/Heading/themeAdapter.js","webpack:///./node_modules/@instructure/ui-heading/es/Heading/index.js","webpack:///./node_modules/@instructure/ui-dom-utils/es/elementMatches.js"],"names":["mergeI18nTranslations","JSON","parse","scoped","termsOfServiceText","I18n","t","TermsOfServiceCustomContents","React","Component","state","TERMS_OF_SERVICE_CUSTOM_CONTENT","url","fetch","defaultFetchOptions","text","this","setState","render","dangerouslySetInnerHTML","__html","TermsOfServiceModal","open","handleCloseModal","link","focus","handleLinkClick","$rce_container","$","length","$textarea","find","RichContentEditor","callOnRCE","id","className","href","ref","c","onClick","props","preview","onDismiss","size","label","Body","defaultProps","ready","container","document","querySelector","ReactDOM","querySelectorAll","i","fn","scrollToVisible","obj","options","$obj","innerOffset","offset","width","outerWidth","height","outerHeight","top","bottom","left","right","currentTop","selector","windowScrollTop","scrollTop","currentLeft","scrollLeft","currentHeight","currentWidth","outerOffset","each","e","tagName","window","getLiveRegion","getElementById","CanvasInstUIModal","closeButtonLabel","children","otherPropsToPassOnToModal","Modal","liveRegion","Header","CloseButton","data-testid","placement","Heading","forEach","prop","axios","defaults","xsrfCookieName","xsrfHeaderName","originalDefaults","headers","common","Accept","parseUnit","str","value","concat","parseFloat","match","AUTO_LINKIFY_PLACEHOLDER","AUTO_LINKIFY_REGEX","th","quoteClump","lines","raw","join","formatMessage","message","links","placeholderBlocks","replace","push","RegExp","shift","processedLines","quoteBlock","line","delimit","number","isNaN","String","sign","abs","Math","integer","floor","result","mod","truncateText","string","max","ellipsis","wordSeparator","trim","truncateAt","pos","indexOf","substring","plainText","childrenOrValue","propName","componentName","as","Error","makeRequirable","validator","propValue","_len","arguments","rest","Array","_key","apply","setOptions","prompt","htmlEscape","opt","optHtml","html","ifExists","func","call","scrollbarWidth","$div","appendTo","$innerDiv","w1","innerWidth","css","w2","remove","dim","speed","animate","opacity","undim","confirmDelete","extend","$object","$dialog","noMessage","no_message","onContinue","cancelled","isFunction","confirmed","success","data","fadeOut","prepareData","authenticity_token","ajaxJSON","request","status","error","unhandledXHRs","skipConfirmations","dialog","dialog_options","confirmation_class","includes","modal","close","buttons","click","class","confirm","fragmentChange","query","location","search","split","query_hash","item","bind","$doc","found","_checkFragments","fragmentList","doc","fragment","setTimeout","triggerHandler","hash","list","idx","clickLink","eq","hasClass","showIf","bool","index","show","hide","disableIf","indicate","$indicator","zIndex","createElement","position","display","border","backgroundColor","addClass","mouseover","stop","append","singleFlash","fadeIn","scroll","hasScrollbar","clientHeight","scrollHeight","log","msg","console","fillWindowWithMe","opts","minHeight","$this","$wrapper","$main","$not_right_side","$window","$toResize","add","alsoResize","fillWindowWithThisElement","spaceLeftForThis","newHeight","onResize","unbind","autoGrowInput","o","maxWidth","minWidth","comfortZone","filter","val","input","testSubject","fontSize","fontFamily","fontWeight","letterSpacing","whiteSpace","check","testerWidth","newWidth","isValidWidthChange","insertAfter","iframeAllowances","allowances","ENV","LTI_LAUNCH_FRAME_ALLOWANCES","Children","oneOf","validTypes","toArray","validTypeNames","map","type","getDisplayName","child","childName","isRequired","oneOfEach","instanceCount","typeName","errors","Object","keys","enforceOrder","validTypeGroups","validateTypes","childNames","typeNames","formatGroupTypes","typeGroups","types","formatTypes","name","displayName","findFocusable","el","shouldSearchRootNode","element","focusableSelector","matches","from","focusable","hidden","cs","offsetWidth","offsetHeight","positioned","POS","style","toLowerCase","getPropertyValue","visible","body","parentNode","disabled","generator","_ref","borders","colors","spacing","typography","lineHeight","lineHeightFit","h1FontSize","fontSizeXXLarge","h1FontWeight","fontWeightLight","h1FontFamily","h2FontSize","fontSizeXLarge","h2FontWeight","fontWeightNormal","h2FontFamily","h3FontSize","fontSizeLarge","h3FontWeight","fontWeightBold","h3FontFamily","h4FontSize","fontSizeMedium","h4FontWeight","h4FontFamily","h5FontSize","fontSizeSmall","h5FontWeight","h5FontFamily","primaryInverseColor","textLightest","primaryColor","textDarkest","secondaryColor","textDark","secondaryInverseColor","textLight","borderPadding","xxxSmall","borderColor","borderMedium","borderWidth","widthSmall","borderStyle","canvas","variables","_ref2","fontFamilyHeading","themeAdapter","version","_dec","_dec2","_dec3","_class","_class2","_temp","styles","componentId","template","theme","deprecated","testable","_Component","_super","key","_classnames","_this$props","color","level","margin","elementRef","ElementType","getElementType","View","assign","passthroughProps","root","propTypes","elementType","elementMatches","selectorString","node","msMatchesSelector"],"mappings":";;;;;;;;;;;;;;;AAMA,OAAAA,EAAA,MAAsBC,KAAKC,MAAM;;;ACEd,mBAAKC,OAAO;;;;ACkB/B,MAAMC,EAAqBC,EAAKC,EAAE;AAElC,MAAMC,UAAqCC,IAAMC,UAAU;AAAA,KACzDC,MAAQ,CACNC,qCAAiC,GAGZ,0BACrB,MAAMC,EAAM;AACZ,MAAMD,cAA+CE,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3BoE,WAAY,IAAUhQ,KAOtB7B,SAAU,IAAUmG,MAGnB0K,EAAQ9W,aAAe,CACxBwC,SAAU,KACVqV,YAAQ,EACRC,gBAAY,EACZ/K,OAAQ,OACR4K,MAAO,UACPC,MAAO,MACNb,KAAWF,IAAWA,IAAWA,I;AC1KpC;AAAA;AAoCA,SAAS0B,EAAerG,EAAIsG,GAC1B,IAAIC,EAAOvG,GAAM,eAAYA;AAC7B,IAAKuG,EAAM,OAAO;AAClB,OAAOA,EAAKnG,QAAUmG,EAAKnG,QAAQkG,GAAkBC,EAAKC,kBAAkBF","file":"terms_of_service_modal-c-abc5782736.js","sourcesContent":["// this file was auto-generated by rake i18n:generate_js.\n// you probably shouldn't edit it directly\nimport mergeI18nTranslations from '@canvas/i18n/mergeI18nTranslations.js';\n\n// we use JSON.parse here instead of just loading it as a javascript object literal\n// because according to https://v8.dev/blog/cost-of-javascript-2019#json that is faster\nmergeI18nTranslations(JSON.parse(\"{\\\"ar\\\":{\\\"acceptable_use_policy_29a28124\\\":\\\"سياسة الاستخدام المقبولة\\\",\\\"loading_25990131\\\":\\\"جارٍ التحميل...\\\",\\\"preview_53003fd2\\\":\\\"معاينة\\\"},\\\"ca\\\":{\\\"acceptable_use_policy_29a28124\\\":\\\"Política d'ús acceptable\\\",\\\"loading_25990131\\\":\\\"S'està carregant...\\\",\\\"preview_53003fd2\\\":\\\"Visualització prèvia\\\"},\\\"cy\\\":{\\\"acceptable_use_policy_29a28124\\\":\\\"Polisi Defnydd Derbyniol\\\",\\\"loading_25990131\\\":\\\"Wrthi’n llwytho...\\\",\\\"preview_53003fd2\\\":\\\"Rhagolwg\\\"},\\\"da\\\":{\\\"acceptable_use_policy_29a28124\\\":\\\"Acceptabel brugspolitik\\\",\\\"loading_25990131\\\":\\\"Indlæser ...\\\",\\\"preview_53003fd2\\\":\\\"Eksempel\\\"},\\\"da-x-k12\\\":{\\\"acceptable_use_policy_29a28124\\\":\\\"Acceptabel brugspolitik\\\",\\\"loading_25990131\\\":\\\"Indlæser ...\\\",\\\"preview_53003fd2\\\":\\\"Eksempel\\\"},\\\"de\\\":{\\\"acceptable_use_policy_29a28124\\\":\\\"Akzeptierte Nutzungsrichtlinie\\\",\\\"loading_25990131\\\":\\\"Wird geladen ...\\\",\\\"preview_53003fd2\\\":\\\"Vorschau\\\"},\\\"el\\\":{\\\"loading_25990131\\\":\\\"Φόρτωση...\\\",\\\"preview_53003fd2\\\":\\\"Προεπισκόπηση\\\"},\\\"en\\\":{\\\"acceptable_use_policy_29a28124\\\":\\\"Acceptable Use Policy\\\",\\\"loading_25990131\\\":\\\"Loading...\\\",\\\"preview_53003fd2\\\":\\\"Preview\\\"},\\\"en-AU\\\":{\\\"acceptable_use_policy_29a28124\\\":\\\"Acceptable Use Policy\\\",\\\"loading_25990131\\\":\\\"Loading...\\\",\\\"preview_53003fd2\\\":\\\"Preview\\\"},\\\"en-CA\\\":{\\\"acceptable_use_policy_29a28124\\\":\\\"Acceptable Use Policy\\\",\\\"loading_25990131\\\":\\\"Loading...\\\",\\\"preview_53003fd2\\\":\\\"Preview\\\"},\\\"en-GB\\\":{\\\"acceptable_use_policy_29a28124\\\":\\\"Acceptable Use Policy\\\",\\\"loading_25990131\\\":\\\"Loading...\\\",\\\"preview_53003fd2\\\":\\\"Preview\\\"},\\\"es\\\":{\\\"acceptable_use_policy_29a28124\\\":\\\"Política de uso aceptable\\\",\\\"loading_25990131\\\":\\\"Cargando...\\\",\\\"preview_53003fd2\\\":\\\"Vista previa\\\"},\\\"fa\\\":{\\\"acceptable_use_policy_29a28124\\\":\\\"سیاست استفاده قابل قبول \\\",\\\"loading_25990131\\\":\\\"در حال بارگذاری...\\\",\\\"preview_53003fd2\\\":\\\"پیش‌نمایش\\\"},\\\"fi\\\":{\\\"acceptable_use_policy_29a28124\\\":\\\"Sallitun käytön menettely\\\",\\\"loading_25990131\\\":\\\"Ladataan...\\\",\\\"preview_53003fd2\\\":\\\"Esikatsele\\\"},\\\"fr\\\":{\\\"acceptable_use_policy_29a28124\\\":\\\"Règlement d'utilisation acceptable\\\",\\\"loading_25990131\\\":\\\"Chargement...\\\",\\\"preview_53003fd2\\\":\\\"Aperçu\\\"},\\\"fr-CA\\\":{\\\"acceptable_use_policy_29a28124\\\":\\\"Politique d'utilisation acceptable\\\",\\\"loading_25990131\\\":\\\"En cours de chargement...\\\",\\\"preview_53003fd2\\\":\\\"Afficher un aperçu\\\"},\\\"he\\\":{\\\"acceptable_use_policy_29a28124\\\":\\\"מדיניות שימוש מקובלת\\\",\\\"loading_25990131\\\":\\\"טוען...\\\",\\\"preview_53003fd2\\\":\\\"תצוגה מקדימה\\\"},\\\"ht\\\":{\\\"acceptable_use_policy_29a28124\\\":\\\"Politik Itilizsyon Akseptab\\\",\\\"loading_25990131\\\":\\\"Chajman...\\\",\\\"preview_53003fd2\\\":\\\"Apèsi\\\"},\\\"hu\\\":{\\\"loading_25990131\\\":\\\"Töltődik...\\\",\\\"preview_53003fd2\\\":\\\"Előnézet\\\"},\\\"hy\\\":{\\\"loading_25990131\\\":\\\"Բեռնում է...\\\",\\\"preview_53003fd2\\\":\\\"Նախնական դիտում\\\"},\\\"is\\\":{\\\"acceptable_use_policy_29a28124\\\":\\\"Stefna um ásættanlega notkun\\\",\\\"loading_25990131\\\":\\\"Hleð inn...\\\",\\\"preview_53003fd2\\\":\\\"Forskoðun\\\"},\\\"it\\\":{\\\"acceptable_use_policy_29a28124\\\":\\\"Norme di utilizzo accettabile\\\",\\\"loading_25990131\\\":\\\"Caricamento in corso...\\\",\\\"preview_53003fd2\\\":\\\"Anteprima\\\"},\\\"ja\\\":{\\\"acceptable_use_policy_29a28124\\\":\\\"利用規約\\\",\\\"loading_25990131\\\":\\\"読み込み中・・・\\\",\\\"preview_53003fd2\\\":\\\"プレビュー\\\"},\\\"ko\\\":{\\\"loading_25990131\\\":\\\"로드하는 중...\\\"},\\\"mi\\\":{\\\"acceptable_use_policy_29a28124\\\":\\\"Kaupapa Whakamahi e Whakāetia ana\\\",\\\"loading_25990131\\\":\\\"E uta ana ....\\\",\\\"preview_53003fd2\\\":\\\"Arokite\\\"},\\\"nb\\\":{\\\"acceptable_use_policy_29a28124\\\":\\\"Retningslinjer om akseptabel bruk\\\",\\\"loading_25990131\\\":\\\"Laster...\\\",\\\"preview_53003fd2\\\":\\\"Forhåndsvisning\\\"},\\\"nb-x-k12\\\":{\\\"acceptable_use_policy_29a28124\\\":\\\"Retningslinjer om akseptabel bruk\\\",\\\"loading_25990131\\\":\\\"Laster...\\\",\\\"preview_53003fd2\\\":\\\"Forhåndsvisning\\\"},\\\"nl\\\":{\\\"acceptable_use_policy_29a28124\\\":\\\"Acceptabel gebruiksbeleid\\\",\\\"loading_25990131\\\":\\\"Bezig met laden...\\\",\\\"preview_53003fd2\\\":\\\"Voorbeeld\\\"},\\\"nn\\\":{\\\"acceptable_use_policy_29a28124\\\":\\\"Akseptable bruksvilkår\\\",\\\"loading_25990131\\\":\\\"Lastar...\\\",\\\"preview_53003fd2\\\":\\\"Førehandsvising\\\"},\\\"pl\\\":{\\\"acceptable_use_policy_29a28124\\\":\\\"Zasady dozwolonego użytku\\\",\\\"loading_25990131\\\":\\\"Wczytywanie...\\\",\\\"preview_53003fd2\\\":\\\"Podgląd\\\"},\\\"pt\\\":{\\\"acceptable_use_policy_29a28124\\\":\\\"Política de Utilização Aceitável\\\",\\\"loading_25990131\\\":\\\"A carregar...\\\",\\\"preview_53003fd2\\\":\\\"Visualizar\\\"},\\\"pt-BR\\\":{\\\"acceptable_use_policy_29a28124\\\":\\\"Política de uso aceitável\\\",\\\"loading_25990131\\\":\\\"Carregando...\\\",\\\"preview_53003fd2\\\":\\\"Pré-visualização\\\"},\\\"ru\\\":{\\\"acceptable_use_policy_29a28124\\\":\\\"Приемлемая политика использования\\\",\\\"loading_25990131\\\":\\\"Выполняется загрузка...\\\",\\\"preview_53003fd2\\\":\\\"Предварительный просмотр\\\"},\\\"sl\\\":{\\\"acceptable_use_policy_29a28124\\\":\\\"Pravilnik o sprejemljivi rabi\\\",\\\"loading_25990131\\\":\\\"Nalaganje ...\\\",\\\"preview_53003fd2\\\":\\\"Predogled\\\"},\\\"sv\\\":{\\\"acceptable_use_policy_29a28124\\\":\\\"Acceptable Use Policy (Policy för godkänd användning)\\\",\\\"loading_25990131\\\":\\\"Läser in ...\\\",\\\"preview_53003fd2\\\":\\\"Förhandsgranska\\\"},\\\"sv-x-k12\\\":{\\\"acceptable_use_policy_29a28124\\\":\\\"Acceptable Use Policy (Policy för godkänd användning)\\\",\\\"loading_25990131\\\":\\\"Läser in ...\\\",\\\"preview_53003fd2\\\":\\\"Förhandsgranska\\\"},\\\"tr\\\":{\\\"acceptable_use_policy_29a28124\\\":\\\"Uygun Kullanım Koşulları\\\",\\\"loading_25990131\\\":\\\"Yükleniyor...\\\",\\\"preview_53003fd2\\\":\\\"Önizleme\\\"},\\\"uk\\\":{\\\"loading_25990131\\\":\\\"Завантаження...\\\",\\\"preview_53003fd2\\\":\\\"Попередній перегляд\\\"},\\\"zh-Hans\\\":{\\\"acceptable_use_policy_29a28124\\\":\\\"允许使用政策\\\",\\\"loading_25990131\\\":\\\"加载中……\\\",\\\"preview_53003fd2\\\":\\\"预览\\\"},\\\"zh-Hant\\\":{\\\"acceptable_use_policy_29a28124\\\":\\\"可接受使用政策\\\",\\\"loading_25990131\\\":\\\"正在載入……\\\",\\\"preview_53003fd2\\\":\\\"預覽\\\"}}\"));\n","\n import I18n from '@canvas/i18n/i18nObj';\n \n import 'translations/terms_of_service_modal';\n import 'translations/_core';\n \n import 'translations/_core_en';\n\n export default I18n.scoped('terms_of_service_modal');\n ","/*\n * Copyright (C) 2017 - present Instructure, Inc.\n *\n * This file is part of Canvas.\n *\n * Canvas is free software: you can redistribute it and/or modify it under\n * the terms of the GNU Affero General Public License as published by the Free\n * Software Foundation, version 3 of the License.\n *\n * Canvas is distributed in the hope that it will be useful, but WITHOUT ANY\n * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR\n * A PARTICULAR PURPOSE. See the GNU Affero General Public License for more\n * details.\n *\n * You should have received a copy of the GNU Affero General Public License along\n * with this program. If not, see .\n */\n\nimport Modal from '@canvas/instui-bindings/react/InstuiModal'\nimport $ from 'jquery'\nimport React from 'react'\nimport {bool} from 'prop-types'\nimport I18n from 'i18n!terms_of_service_modal'\nimport RichContentEditor from '@canvas/rce/RichContentEditor'\nimport {defaultFetchOptions} from '@instructure/js-utils'\n\nconst termsOfServiceText = I18n.t('Acceptable Use Policy')\n\nclass TermsOfServiceCustomContents extends React.Component {\n state = {\n TERMS_OF_SERVICE_CUSTOM_CONTENT: undefined\n }\n\n async componentDidMount() {\n const url = '/api/v1/terms_of_service_custom_content'\n const TERMS_OF_SERVICE_CUSTOM_CONTENT = await (await fetch(url, defaultFetchOptions)).text()\n\n this.setState({TERMS_OF_SERVICE_CUSTOM_CONTENT})\n }\n\n render() {\n return this.state.TERMS_OF_SERVICE_CUSTOM_CONTENT ? (\n
\n ) : (\n {I18n.t('Loading...')}\n )\n }\n}\n\nexport default class TermsOfServiceModal extends React.Component {\n static propTypes = {\n preview: bool\n }\n\n static defaultProps = {\n preview: false\n }\n\n state = {\n open: false\n }\n\n handleCloseModal = () => {\n this.link.focus()\n this.setState({open: false})\n }\n\n handleLinkClick = () => {\n this.setState(state => {\n const $rce_container = $('#custom_tos_rce_container')\n let TERMS_OF_SERVICE_CUSTOM_CONTENT\n if ($rce_container.length > 0) {\n const $textarea = $rce_container.find('textarea')\n TERMS_OF_SERVICE_CUSTOM_CONTENT = RichContentEditor.callOnRCE($textarea, 'get_code')\n }\n\n return {\n open: !state.open,\n TERMS_OF_SERVICE_CUSTOM_CONTENT\n }\n })\n }\n\n render() {\n return (\n \n {\n this.link = c\n }}\n onClick={this.handleLinkClick}\n >\n {this.props.preview ? I18n.t('Preview') : termsOfServiceText}\n \n {this.state.open && (\n \n \n {this.props.preview ? (\n \n ) : (\n \n )}\n \n \n )}\n \n )\n }\n}\n","/*\n * Copyright (C) 2017 - present Instructure, Inc.\n *\n * This file is part of Canvas.\n *\n * Canvas is free software: you can redistribute it and/or modify it under\n * the terms of the GNU Affero General Public License as published by the Free\n * Software Foundation, version 3 of the License.\n *\n * Canvas is distributed in the hope that it will be useful, but WITHOUT ANY\n * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR\n * A PARTICULAR PURPOSE. See the GNU Affero General Public License for more\n * details.\n *\n * You should have received a copy of the GNU Affero General Public License along\n * with this program. If not, see .\n */\n\nimport ready from '@instructure/ready'\nimport React from 'react'\nimport ReactDOM from 'react-dom'\nimport TermsOfServiceModal from './react/TermsOfServiceModal'\n\nready(() => {\n let container = document.querySelector('#terms_of_service_preview_link')\n if (container) {\n ReactDOM.render(, container)\n } else {\n container = document.querySelectorAll('.terms_of_service_link')\n if (container.length) {\n for (let i = 0; i < container.length; i++) {\n ReactDOM.render(, container[i])\n }\n }\n }\n})\n","/*\n * Copyright (C) 2011 - present Instructure, Inc.\n *\n * This file is part of Canvas.\n *\n * Canvas is free software: you can redistribute it and/or modify it under\n * the terms of the GNU Affero General Public License as published by the Free\n * Software Foundation, version 3 of the License.\n *\n * Canvas is distributed in the hope that it will be useful, but WITHOUT ANY\n * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR\n * A PARTICULAR PURPOSE. See the GNU Affero General Public License for more\n * details.\n *\n * You should have received a copy of the GNU Affero General Public License along\n * with this program. If not, see .\n */\n\n// Scrolls the supplied object until its visible. Call from\n// (\"html,body\") to scroll the window.\n\nimport $ from 'jquery'\nimport './jquery.scrollTo'\n\n$.fn.scrollToVisible = function(obj) {\n const options = {}\n const $obj = $(obj)\n\n if ($obj.length === 0) {\n return\n }\n let innerOffset = $obj.offset(),\n width = $obj.outerWidth(),\n height = $obj.outerHeight(),\n top = innerOffset.top,\n bottom = top + height,\n left = innerOffset.left,\n right = left + width,\n currentTop = this.selector == 'html,body' ? $.windowScrollTop() : this.scrollTop(),\n currentLeft = this.scrollLeft(),\n currentHeight = this.outerHeight(),\n currentWidth = this.outerWidth()\n\n if (this.selector != 'html,body') {\n let outerOffset = $('body').offset()\n this.each(function() {\n try {\n outerOffset = $(this).offset()\n return false\n } catch (e) {}\n })\n top -= outerOffset.top\n bottom -= outerOffset.top\n left -= outerOffset.left\n right -= outerOffset.left\n }\n\n if (this[0].tagName == 'HTML' || this[0].tagName == 'BODY') {\n currentHeight = $(window).height()\n if ($('#wizard_box:visible').length > 0) {\n currentHeight -= $('#wizard_box:visible').height()\n }\n currentWidth = $(window).width()\n top -= currentTop\n left -= currentLeft\n bottom -= currentTop\n right -= currentLeft\n }\n if (top < 0 || (currentHeight < height && bottom > currentHeight)) {\n options.scrollTop = top + currentTop\n } else if (bottom > currentHeight) {\n options.scrollTop = bottom + currentTop - currentHeight + 20\n }\n if (left < 0) {\n options.scrollLeft = left + currentLeft\n } else if (right > currentWidth) {\n options.scrollLeft = right + currentLeft - currentWidth + 20\n }\n if (options.scrollTop == 1) {\n options.scrollTop = 0\n }\n if (options.scrollLeft == 1) {\n options.scrollLeft = 0\n }\n\n this.scrollTop(options.scrollTop)\n this.scrollLeft(options.scrollLeft)\n\n return this\n}\n","// this file was auto-generated by rake i18n:generate_js.\n// you probably shouldn't edit it directly\nimport mergeI18nTranslations from '@canvas/i18n/mergeI18nTranslations.js';\n\n// we use JSON.parse here instead of just loading it as a javascript object literal\n// because according to https://v8.dev/blog/cost-of-javascript-2019#json that is faster\nmergeI18nTranslations(JSON.parse(\"{\\\"ar\\\":{\\\"close_d634289d\\\":\\\"إغلاق\\\"},\\\"ca\\\":{\\\"close_d634289d\\\":\\\"Tanca\\\"},\\\"cy\\\":{\\\"close_d634289d\\\":\\\"Cau\\\"},\\\"da\\\":{\\\"close_d634289d\\\":\\\"Luk\\\"},\\\"da-x-k12\\\":{\\\"close_d634289d\\\":\\\"Luk\\\"},\\\"de\\\":{\\\"close_d634289d\\\":\\\"Schließen\\\"},\\\"el\\\":{\\\"close_d634289d\\\":\\\"Κλείσιμο\\\"},\\\"en\\\":{\\\"close_d634289d\\\":\\\"Close\\\"},\\\"en-AU\\\":{\\\"close_d634289d\\\":\\\"Close\\\"},\\\"en-CA\\\":{\\\"close_d634289d\\\":\\\"Close\\\"},\\\"en-GB\\\":{\\\"close_d634289d\\\":\\\"Close\\\"},\\\"es\\\":{\\\"close_d634289d\\\":\\\"Cerrar\\\"},\\\"fa\\\":{\\\"close_d634289d\\\":\\\"بستن\\\"},\\\"fi\\\":{\\\"close_d634289d\\\":\\\"Sulje\\\"},\\\"fr\\\":{\\\"close_d634289d\\\":\\\"Fermer\\\"},\\\"fr-CA\\\":{\\\"close_d634289d\\\":\\\"Fermer\\\"},\\\"he\\\":{\\\"close_d634289d\\\":\\\"סגירה\\\"},\\\"ht\\\":{\\\"close_d634289d\\\":\\\"Fèmen\\\"},\\\"hu\\\":{\\\"close_d634289d\\\":\\\"Bezárás\\\"},\\\"hy\\\":{\\\"close_d634289d\\\":\\\"Փակել\\\"},\\\"is\\\":{\\\"close_d634289d\\\":\\\"Loka\\\"},\\\"it\\\":{\\\"close_d634289d\\\":\\\"Chiudi\\\"},\\\"ja\\\":{\\\"close_d634289d\\\":\\\"閉じる\\\"},\\\"ko\\\":{\\\"close_d634289d\\\":\\\"닫기\\\"},\\\"mi\\\":{\\\"close_d634289d\\\":\\\"Katia\\\"},\\\"nb\\\":{\\\"close_d634289d\\\":\\\"Lukk\\\"},\\\"nb-x-k12\\\":{\\\"close_d634289d\\\":\\\"Lukk\\\"},\\\"nl\\\":{\\\"close_d634289d\\\":\\\"Sluiten\\\"},\\\"nn\\\":{\\\"close_d634289d\\\":\\\"Lukk\\\"},\\\"pl\\\":{\\\"close_d634289d\\\":\\\"Zamknij\\\"},\\\"pt\\\":{\\\"close_d634289d\\\":\\\"Fechar\\\"},\\\"pt-BR\\\":{\\\"close_d634289d\\\":\\\"Fechar\\\"},\\\"ru\\\":{\\\"close_d634289d\\\":\\\"Закрыть\\\"},\\\"sl\\\":{\\\"close_d634289d\\\":\\\"Zapri\\\"},\\\"sv\\\":{\\\"close_d634289d\\\":\\\"Stäng\\\"},\\\"sv-x-k12\\\":{\\\"close_d634289d\\\":\\\"Stäng\\\"},\\\"tr\\\":{\\\"close_d634289d\\\":\\\"Kapat\\\"},\\\"uk\\\":{\\\"close_d634289d\\\":\\\"Закрити\\\"},\\\"zh-Hans\\\":{\\\"close_d634289d\\\":\\\"关闭\\\"},\\\"zh-Hant\\\":{\\\"close_d634289d\\\":\\\"關閉\\\"}}\"));\n","\n import I18n from '@canvas/i18n/i18nObj';\n \n import 'translations/modal';\n import 'translations/_core';\n \n import 'translations/_core_en';\n\n export default I18n.scoped('modal');\n ","/*\n * Copyright (C) 2017 - present Instructure, Inc.\n *\n * This file is part of Canvas.\n *\n * Canvas is free software: you can redistribute it and/or modify it under\n * the terms of the GNU Affero General Public License as published by the Free\n * Software Foundation, version 3 of the License.\n *\n * Canvas is distributed in the hope that it will be useful, but WITHOUT ANY\n * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR\n * A PARTICULAR PURPOSE. See the GNU Affero General Public License for more\n * details.\n *\n * You should have received a copy of the GNU Affero General Public License along\n * with this program. If not, see .\n */\n\nimport React from 'react'\nimport {string} from 'prop-types'\nimport {CloseButton} from '@instructure/ui-buttons'\nimport {Heading} from '@instructure/ui-heading'\nimport I18n from 'i18n!modal'\nimport {Modal} from '@instructure/ui-modal'\n\n/*\n---\nThis is just a wrapper around the default instructure-ui Modal that:\n * provides a translated close button label that works with Canvas's I18n\n * sets a header title for you if you provide a `label` prop\n\nUse this whenever you don't want to do anything custom with your header or your close button\n\nYou should be able to use it exactly like you'd use an instUi Modal by changing:\nimport {Modal} from '@instructure/ui-overlays'\nto\nimport Modal from '../shared/components/InstuiModal'\n\n\n
\n content of the modal goes here, notice you don't need to do anything for the close button.\n \n \n  \n \n \n
\n\n\n---\n*/\nfunction getLiveRegion() {\n return document.getElementById('flash_screenreader_holder')\n}\n\nexport default function CanvasInstUIModal({\n label,\n closeButtonLabel,\n onDismiss,\n children,\n ...otherPropsToPassOnToModal\n}) {\n return (\n \n \n \n {closeButtonLabel || I18n.t('Close')}\n \n {label}\n \n {children}\n \n )\n}\n\n;['Header', 'Body', 'Footer'].forEach(prop => (CanvasInstUIModal[prop] = Modal[prop]))\n\nCanvasInstUIModal.propTypes = {\n ...Modal.propTypes,\n // InstUI has marked closeButtonLabel as deprecated, but we still allow it.\n // if you just want the default of `I18n.t('Close')` don't pass anything,\n // but if you want something different pass closeButtonLabel=\"something different\"\n closeButtonLabel: string\n}\n\nCanvasInstUIModal.defaultProps = {\n closeButtonLabel: undefined\n}\n","/*\n * Copyright (C) 2015 - present Instructure, Inc.\n *\n * This file is part of Canvas.\n *\n * Canvas is free software: you can redistribute it and/or modify it under\n * the terms of the GNU Affero General Public License as published by the Free\n * Software Foundation, version 3 of the License.\n *\n * Canvas is distributed in the hope that it will be useful, but WITHOUT ANY\n * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR\n * A PARTICULAR PURPOSE. See the GNU Affero General Public License for more\n * details.\n *\n * You should have received a copy of the GNU Affero General Public License along\n * with this program. If not, see .\n */\n\nimport axios from 'axios'\n\n// Add CSRF stuffs to make Canvas happy when we are making requests with axios\naxios.defaults.xsrfCookieName = '_csrf_token'\naxios.defaults.xsrfHeaderName = 'X-CSRF-Token'\n\n// Handle stringified IDs for JSON responses\nconst originalDefaults = axios.defaults.headers.common.Accept\naxios.defaults.headers.common.Accept = 'application/json+canvas-string-ids, ' + originalDefaults\n\n// Rails checks this header to decide if a request is an xhr request\naxios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'\n\nexport default axios\n","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 - present Instructure, Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\n/**\n * ---\n * category: utilities\n * ---\n * Converts a CSS unit value combination into an array of type [ value, unit ]\n *\n * @module parseUnit\n *\n * Example inputs:\n * - '100px'\n * - '20rem'\n * - '10vh'\n * - '400vmin'\n *\n * @param {string} str\n * @returns {Array} Returns array of shape [ value, unit ]\n*/\nfunction parseUnit(str) {\n var value = \"\".concat(str);\n return [parseFloat(value, 10), // eslint-disable-next-line no-useless-escape\n value.match(/[\\d.\\-\\+]*\\s*(.*)/)[1] || ''];\n}\n\nexport default parseUnit;\nexport { parseUnit };","// this file was auto-generated by rake i18n:generate_js.\n// you probably shouldn't edit it directly\nimport mergeI18nTranslations from '@canvas/i18n/mergeI18nTranslations.js';\n\n// we use JSON.parse here instead of just loading it as a javascript object literal\n// because according to https://v8.dev/blog/cost-of-javascript-2019#json that is faster\nmergeI18nTranslations(JSON.parse(\"{\\\"ar\\\":{\\\"lib\\\":{\\\"text_helper\\\":{\\\"ellipsis\\\":\\\"...\\\",\\\"quoted_text_toggle\\\":\\\"إظهار النص المقتبس\\\",\\\"word_separator\\\":\\\" \\\"}}},\\\"ca\\\":{\\\"lib\\\":{\\\"text_helper\\\":{\\\"ellipsis\\\":\\\"...\\\",\\\"quoted_text_toggle\\\":\\\"mostra el text citat\\\",\\\"word_separator\\\":\\\" \\\"}}},\\\"cy\\\":{\\\"lib\\\":{\\\"text_helper\\\":{\\\"ellipsis\\\":\\\"...\\\",\\\"quoted_text_toggle\\\":\\\"dangos testun wedi’i ddyfynnu\\\",\\\"word_separator\\\":\\\" \\\"}}},\\\"da\\\":{\\\"lib\\\":{\\\"text_helper\\\":{\\\"ellipsis\\\":\\\"...\\\",\\\"quoted_text_toggle\\\":\\\"vis tekst i gåseøjne\\\",\\\"word_separator\\\":\\\" \\\"}}},\\\"da-x-k12\\\":{\\\"lib\\\":{\\\"text_helper\\\":{\\\"ellipsis\\\":\\\"...\\\",\\\"quoted_text_toggle\\\":\\\"vis tekst i gåseøjne\\\",\\\"word_separator\\\":\\\" \\\"}}},\\\"de\\\":{\\\"lib\\\":{\\\"text_helper\\\":{\\\"ellipsis\\\":\\\"...\\\",\\\"quoted_text_toggle\\\":\\\"zitierten Text zeigen\\\",\\\"word_separator\\\":\\\" \\\"}}},\\\"el\\\":{\\\"lib\\\":{\\\"text_helper\\\":{\\\"ellipsis\\\":\\\"...\\\",\\\"quoted_text_toggle\\\":\\\"προβολή κειμένου που παρατίθεται\\\"}}},\\\"en\\\":{\\\"lib\\\":{\\\"text_helper\\\":{\\\"ellipsis\\\":\\\"...\\\",\\\"quoted_text_toggle\\\":\\\"show quoted text\\\",\\\"word_separator\\\":\\\" \\\"}}},\\\"en-AU\\\":{\\\"lib\\\":{\\\"text_helper\\\":{\\\"ellipsis\\\":\\\"...\\\",\\\"quoted_text_toggle\\\":\\\"show quoted text\\\",\\\"word_separator\\\":\\\" \\\"}}},\\\"en-CA\\\":{\\\"lib\\\":{\\\"text_helper\\\":{\\\"ellipsis\\\":\\\"...\\\",\\\"quoted_text_toggle\\\":\\\"show quoted text\\\",\\\"word_separator\\\":\\\" \\\"}}},\\\"en-GB\\\":{\\\"lib\\\":{\\\"text_helper\\\":{\\\"ellipsis\\\":\\\"...\\\",\\\"quoted_text_toggle\\\":\\\"show quoted text\\\",\\\"word_separator\\\":\\\" \\\"}}},\\\"es\\\":{\\\"lib\\\":{\\\"text_helper\\\":{\\\"ellipsis\\\":\\\"...\\\",\\\"quoted_text_toggle\\\":\\\"mostrar texto citado\\\",\\\"word_separator\\\":\\\" \\\"}}},\\\"fa\\\":{\\\"lib\\\":{\\\"text_helper\\\":{\\\"ellipsis\\\":\\\"...\\\",\\\"quoted_text_toggle\\\":\\\"نمایش متن نقل شده\\\",\\\"word_separator\\\":\\\" \\\"}}},\\\"fi\\\":{\\\"lib\\\":{\\\"text_helper\\\":{\\\"ellipsis\\\":\\\"...\\\",\\\"quoted_text_toggle\\\":\\\"näytä lainattu teksti\\\",\\\"word_separator\\\":\\\" \\\"}}},\\\"fr\\\":{\\\"lib\\\":{\\\"text_helper\\\":{\\\"ellipsis\\\":\\\"...\\\",\\\"quoted_text_toggle\\\":\\\"afficher le texte entre guillemets\\\",\\\"word_separator\\\":\\\" \\\"}}},\\\"fr-CA\\\":{\\\"lib\\\":{\\\"text_helper\\\":{\\\"ellipsis\\\":\\\"...\\\",\\\"quoted_text_toggle\\\":\\\"afficher le texte entre guillemets\\\",\\\"word_separator\\\":\\\" \\\"}}},\\\"he\\\":{\\\"lib\\\":{\\\"text_helper\\\":{\\\"ellipsis\\\":\\\"...\\\",\\\"quoted_text_toggle\\\":\\\"מציג ציטוט\\\",\\\"word_separator\\\":\\\" \\\"}}},\\\"ht\\\":{\\\"lib\\\":{\\\"text_helper\\\":{\\\"ellipsis\\\":\\\"...\\\",\\\"quoted_text_toggle\\\":\\\"afiche tèks site\\\",\\\"word_separator\\\":\\\" \\\"}}},\\\"hu\\\":{\\\"lib\\\":{\\\"text_helper\\\":{\\\"ellipsis\\\":\\\"...\\\",\\\"quoted_text_toggle\\\":\\\"idézett szöveg megjelenítése\\\",\\\"word_separator\\\":\\\" \\\"}}},\\\"hy\\\":{\\\"lib\\\":{\\\"text_helper\\\":{\\\"ellipsis\\\":\\\"...\\\",\\\"quoted_text_toggle\\\":\\\"ցույց տալ մեջբերվող տեքստը\\\",\\\"word_separator\\\":\\\"-\\\"}}},\\\"is\\\":{\\\"lib\\\":{\\\"text_helper\\\":{\\\"ellipsis\\\":\\\"...\\\",\\\"quoted_text_toggle\\\":\\\"Sýna ívitnaðan texta\\\",\\\"word_separator\\\":\\\" \\\"}}},\\\"it\\\":{\\\"lib\\\":{\\\"text_helper\\\":{\\\"ellipsis\\\":\\\"...\\\",\\\"quoted_text_toggle\\\":\\\"mostra testo citato\\\",\\\"word_separator\\\":\\\" \\\"}}},\\\"ja\\\":{\\\"lib\\\":{\\\"text_helper\\\":{\\\"ellipsis\\\":\\\"...\\\",\\\"quoted_text_toggle\\\":\\\"引用したテキストを表示\\\",\\\"word_separator\\\":\\\" \\\"}}},\\\"ko\\\":{\\\"lib\\\":{\\\"text_helper\\\":{\\\"ellipsis\\\":\\\"...\\\",\\\"quoted_text_toggle\\\":\\\"인용된 텍스트 표시\\\",\\\"word_separator\\\":\\\" \\\"}}},\\\"mi\\\":{\\\"lib\\\":{\\\"text_helper\\\":{\\\"ellipsis\\\":\\\"...\\\",\\\"quoted_text_toggle\\\":\\\"whakaatu kuputuhi faahiti\\\",\\\"word_separator\\\":\\\"-\\\"}}},\\\"nb\\\":{\\\"lib\\\":{\\\"text_helper\\\":{\\\"ellipsis\\\":\\\"...\\\",\\\"quoted_text_toggle\\\":\\\"vis den merkede teksten\\\",\\\"word_separator\\\":\\\" \\\"}}},\\\"nb-x-k12\\\":{\\\"lib\\\":{\\\"text_helper\\\":{\\\"ellipsis\\\":\\\"...\\\",\\\"quoted_text_toggle\\\":\\\"vis den merkede teksten\\\",\\\"word_separator\\\":\\\" \\\"}}},\\\"nl\\\":{\\\"lib\\\":{\\\"text_helper\\\":{\\\"ellipsis\\\":\\\"...\\\",\\\"quoted_text_toggle\\\":\\\"geciteerde tekst tonen\\\",\\\"word_separator\\\":\\\" \\\"}}},\\\"nn\\\":{\\\"lib\\\":{\\\"text_helper\\\":{\\\"ellipsis\\\":\\\"...\\\",\\\"quoted_text_toggle\\\":\\\"vis sitert tekst\\\",\\\"word_separator\\\":\\\" \\\"}}},\\\"pl\\\":{\\\"lib\\\":{\\\"text_helper\\\":{\\\"ellipsis\\\":\\\"...\\\",\\\"quoted_text_toggle\\\":\\\"pokaż cytowany fragment tekstu\\\",\\\"word_separator\\\":\\\" \\\"}}},\\\"pt\\\":{\\\"lib\\\":{\\\"text_helper\\\":{\\\"ellipsis\\\":\\\"...\\\",\\\"quoted_text_toggle\\\":\\\"exibir texto citado\\\",\\\"word_separator\\\":\\\" \\\"}}},\\\"pt-BR\\\":{\\\"lib\\\":{\\\"text_helper\\\":{\\\"ellipsis\\\":\\\"...\\\",\\\"quoted_text_toggle\\\":\\\"exibir texto citado\\\",\\\"word_separator\\\":\\\" \\\"}}},\\\"ru\\\":{\\\"lib\\\":{\\\"text_helper\\\":{\\\"ellipsis\\\":\\\"...\\\",\\\"quoted_text_toggle\\\":\\\"показать цитированный текст\\\",\\\"word_separator\\\":\\\" \\\"}}},\\\"sl\\\":{\\\"lib\\\":{\\\"text_helper\\\":{\\\"ellipsis\\\":\\\"...\\\",\\\"quoted_text_toggle\\\":\\\"prikaži citirano besedilo\\\",\\\"word_separator\\\":\\\" \\\"}}},\\\"sv\\\":{\\\"lib\\\":{\\\"text_helper\\\":{\\\"ellipsis\\\":\\\"...\\\",\\\"quoted_text_toggle\\\":\\\"visa citerad text\\\",\\\"word_separator\\\":\\\" \\\"}}},\\\"sv-x-k12\\\":{\\\"lib\\\":{\\\"text_helper\\\":{\\\"ellipsis\\\":\\\"...\\\",\\\"quoted_text_toggle\\\":\\\"visa citerad text\\\",\\\"word_separator\\\":\\\" \\\"}}},\\\"tr\\\":{\\\"lib\\\":{\\\"text_helper\\\":{\\\"ellipsis\\\":\\\"...\\\",\\\"quoted_text_toggle\\\":\\\"alıntılanan metni göster\\\",\\\"word_separator\\\":\\\" \\\"}}},\\\"uk\\\":{\\\"lib\\\":{\\\"text_helper\\\":{\\\"ellipsis\\\":\\\"...\\\",\\\"quoted_text_toggle\\\":\\\"Показати цитований текст\\\",\\\"word_separator\\\":\\\" \\\"}}},\\\"zh-Hans\\\":{\\\"lib\\\":{\\\"text_helper\\\":{\\\"ellipsis\\\":\\\"...\\\",\\\"quoted_text_toggle\\\":\\\"显示引用的文本\\\",\\\"word_separator\\\":\\\" \\\"}}},\\\"zh-Hant\\\":{\\\"lib\\\":{\\\"text_helper\\\":{\\\"ellipsis\\\":\\\"...\\\",\\\"quoted_text_toggle\\\":\\\"顯示引用的文字\\\",\\\"word_separator\\\":\\\" \\\"}}}}\"));\n","\n import I18n from '@canvas/i18n/i18nObj';\n \n import 'translations/lib.text_helper';\n import 'translations/_core';\n \n import 'translations/_core_en';\n\n export default I18n.scoped('lib.text_helper');\n ","#\n# Copyright (C) 2012 - present Instructure, Inc.\n#\n# This file is part of Canvas.\n#\n# Canvas is free software: you can redistribute it and/or modify it under\n# the terms of the GNU Affero General Public License as published by the Free\n# Software Foundation, version 3 of the License.\n#\n# Canvas is distributed in the hope that it will be useful, but WITHOUT ANY\n# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR\n# A PARTICULAR PURPOSE. See the GNU Affero General Public License for more\n# details.\n#\n# You should have received a copy of the GNU Affero General Public License along\n# with this program. If not, see .\n#\n\nimport $ from 'jquery'\nimport I18n from 'i18n!lib.text_helper'\nimport htmlEscape from 'html-escape'\n\nAUTO_LINKIFY_PLACEHOLDER = \"LINK-PLACEHOLDER\"\nAUTO_LINKIFY_REGEX = ///\n \\b\n ( # Capture 1: entire matched URL\n (?:\n https?:// # http or https protocol\n | # or\n www\\d{0,3}[.] # \"www.\", \"www1.\", \"www2.\" … \"www999.\"\n | # or\n [a-z0-9.\\-]+[.][a-z]{2,4}/ # looks like domain name followed by a slash\n )\n\n (?:\n [^\\s()<>]+ # Run of non-space, non-()<>\n | # or\n \\([^\\s()<>]*\\) # balanced parens, single level\n )+\n\n (?:\n \\([^\\s()<>]*\\) # balanced parens, single level\n | # or\n [^\\s`!()\\[\\]{};:'\".,<>?«»“”‘’] # End with: not a space or one of these punct chars\n )\n ) | (\n LINK-PLACEHOLDER\n )\n///gi\n\nexport default th =\n quoteClump: (lines) ->\n \"\"\n\n formatMessage: (message) ->\n # replace any links with placeholders so we don't escape them\n links = []\n placeholderBlocks = []\n message = message.replace AUTO_LINKIFY_REGEX, (match, i) ->\n placeholderBlocks.push(if match == AUTO_LINKIFY_PLACEHOLDER\n AUTO_LINKIFY_PLACEHOLDER\n else\n link = match\n link = \"http://\" + link unless link[0..6] == 'http://' or link[0..7] == 'https://'\n links.push link\n \"#{htmlEscape(match)}\"\n )\n AUTO_LINKIFY_PLACEHOLDER\n\n # now escape html\n message = htmlEscape message\n\n # now put the links back in\n message = message.replace new RegExp(AUTO_LINKIFY_PLACEHOLDER, 'g'), (match, i) ->\n placeholderBlocks.shift()\n\n # replace newlines\n message = message.replace /\\n/g, '
\\n'\n\n # generate quoting clumps\n processedLines = []\n quoteBlock = []\n for line in message.split(\"\\n\")\n if line.match /^(>|>)/\n quoteBlock.push line\n else\n processedLines.push th.quoteClump(quoteBlock) if quoteBlock.length\n quoteBlock = []\n processedLines.push line\n processedLines.push th.quoteClump(quoteBlock) if quoteBlock.length\n message = processedLines.join \"\\n\"\n\n delimit: (number) ->\n # only process real numbers\n return String(number) if isNaN number\n\n # capture sign and then start working with the absolute value. don't\n # process infinities.\n sign = if number < 0 then '-' else ''\n abs = Math.abs number\n return String(number) if abs is Infinity\n\n # break out the integer portion and initialize the result to just the\n # decimal (if any)\n integer = Math.floor abs\n result = if abs == integer then '' else String(abs).replace(/^\\d+\\./, '.')\n\n # for each comma'd chunk, prepend to the result and remove from integer\n while integer >= 1000\n mod = String(integer).replace(/\\d+(\\d\\d\\d)$/, ',$1')\n integer = Math.floor integer / 1000\n result = mod + result\n\n # integer is now either in [1, 999], or equal to 0 iff number in (-1, 1).\n # prepend it with the sign\n sign + String(integer) + result\n\n truncateText: (string, options = {}) ->\n max = options.max ? 30\n ellipsis = I18n.t('ellipsis', '...')\n wordSeparator = I18n.t('word_separator', ' ')\n\n string = (string ? \"\").replace(/\\s+/g, wordSeparator).trim()\n return string if not string or string.length <= max\n\n truncateAt = 0\n while true\n pos = string.indexOf(wordSeparator, truncateAt + 1)\n break if pos < 0 || pos > max - ellipsis.length\n truncateAt = pos\n truncateAt or= max - ellipsis.length # first word > max, so we cut it\n\n string.substring(0, truncateAt) + ellipsis\n\n plainText: (message) ->\n # remove all html tags from the message returning only the text\n message.replace(/(<([^>]+)>)/ig, '');\n","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 - present Instructure, Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\n/**\n * ---\n * category: utilities/PropTypes\n * ---\n * Verify that either value is provided as a prop if as=\"input\", and children\n * if provided otherwise\n *\n * ```js\n * import { childrenOrValue } from '@instructure/ui-prop-types'\n *\n * class Foo extends Component {\n * static propTypes = {\n * children: childrenOrValue,\n * value: childrenOrValue\n * }\n * ...\n * ```\n */\nfunction childrenOrValue(props, propName, componentName) {\n if (props.as === 'input') {\n if (propName === 'children' && props.children || props.value == void 0) {\n return new Error(\"Prop `value` and not `children` must be supplied if `\".concat(componentName, \" as=\\\"input\\\"`\"));\n }\n } else {\n if (propName === 'value' && props.value != void 0) {\n return new Error(\"Prop `children` and not `value` must be supplied unless `\".concat(componentName, \" as=\\\"input\\\"`\"));\n } else if (!props.children) {\n return new Error(\"Prop `children` should be supplied unless `\".concat(componentName, \" as=\\\"input\\\"`.\"));\n }\n }\n\n return;\n}\n\nexport default childrenOrValue;\nexport { childrenOrValue };","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 - present Instructure, Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\n/**\n * ---\n * category: utilities/PropTypes\n * ---\n * Given a validator function, extends the validator functionality to also\n * ensure that the prop has been provided if `.isRequired` is specified.\n *\n * ```js\n * function validator (props, propName, componentName) {\n * const propValue = props[propName]\n * if (propValue === 'purple') {\n * return new Error(`Purple is not accepted in ${componentName}!`)\n * }\n * }\n *\n * validator.isRequired = makeRequirable(validator)\n * ```\n *\n * @param {function} validator - a validator function\n * @returns {Error} if designated prop is not provided\n */\nfunction makeRequirable(validator) {\n return function (props, propName, componentName) {\n var propValue = props[propName];\n\n if (propValue === null || typeof propValue === 'undefined') {\n return new Error(\"The prop `\".concat(propName, \"` is marked as required in `\").concat(componentName, \"`, but its value is `\").concat(propValue, \"`\"));\n } else {\n for (var _len = arguments.length, rest = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {\n rest[_key - 3] = arguments[_key];\n }\n\n return validator.apply(void 0, [props, propName, componentName].concat(rest));\n }\n };\n}\n\nexport default makeRequirable;\nexport { makeRequirable };","// this file was auto-generated by rake i18n:generate_js.\n// you probably shouldn't edit it directly\nimport mergeI18nTranslations from '@canvas/i18n/mergeI18nTranslations.js';\n\n// we use JSON.parse here instead of just loading it as a javascript object literal\n// because according to https://v8.dev/blog/cost-of-javascript-2019#json that is faster\nmergeI18nTranslations(JSON.parse(\"{\\\"ar\\\":{\\\"buttons\\\":{\\\"cancel\\\":\\\"إلغاء\\\",\\\"delete\\\":\\\"حذف\\\"},\\\"instructure_misc_plugins\\\":{\\\"confirms\\\":{\\\"default_delete_thing\\\":\\\"هل ترغب بالتأكيد في حذف هذا؟\\\"}}},\\\"ca\\\":{\\\"buttons\\\":{\\\"cancel\\\":\\\"Cancel·la\\\",\\\"delete\\\":\\\"Suprimeix\\\"},\\\"instructure_misc_plugins\\\":{\\\"confirms\\\":{\\\"default_delete_thing\\\":\\\"Segur que ho voleu suprimir?\\\"}}},\\\"cy\\\":{\\\"buttons\\\":{\\\"cancel\\\":\\\"Canslo\\\",\\\"delete\\\":\\\"Dileu\\\"},\\\"instructure_misc_plugins\\\":{\\\"confirms\\\":{\\\"default_delete_thing\\\":\\\"Ydych chi’n siŵr eich bod am ddileu hyn?\\\"}}},\\\"da\\\":{\\\"buttons\\\":{\\\"cancel\\\":\\\"Annullér\\\",\\\"delete\\\":\\\"Slet\\\"},\\\"instructure_misc_plugins\\\":{\\\"confirms\\\":{\\\"default_delete_thing\\\":\\\"Er du sikker på, at du vil slette dette?\\\"}}},\\\"da-x-k12\\\":{\\\"buttons\\\":{\\\"cancel\\\":\\\"Annullér\\\",\\\"delete\\\":\\\"Slet\\\"},\\\"instructure_misc_plugins\\\":{\\\"confirms\\\":{\\\"default_delete_thing\\\":\\\"Er du sikker på, at du vil slette dette?\\\"}}},\\\"de\\\":{\\\"buttons\\\":{\\\"cancel\\\":\\\"Abbrechen\\\",\\\"delete\\\":\\\"Löschen\\\"},\\\"instructure_misc_plugins\\\":{\\\"confirms\\\":{\\\"default_delete_thing\\\":\\\"Möchten Sie dies wirklich löschen?\\\"}}},\\\"el\\\":{\\\"buttons\\\":{\\\"cancel\\\":\\\"Ακύρωση\\\",\\\"delete\\\":\\\"Διαγραφή\\\"},\\\"instructure_misc_plugins\\\":{\\\"confirms\\\":{\\\"default_delete_thing\\\":\\\"Είστε σίγουρος/η ότι επιθυμείτε να το διαγράψετε;\\\"}}},\\\"en\\\":{\\\"buttons\\\":{\\\"cancel\\\":\\\"Cancel\\\",\\\"delete\\\":\\\"Delete\\\"},\\\"instructure_misc_plugins\\\":{\\\"confirms\\\":{\\\"default_delete_thing\\\":\\\"Are you sure you want to delete this?\\\"}}},\\\"en-AU\\\":{\\\"buttons\\\":{\\\"cancel\\\":\\\"Cancel\\\",\\\"delete\\\":\\\"Delete\\\"},\\\"instructure_misc_plugins\\\":{\\\"confirms\\\":{\\\"default_delete_thing\\\":\\\"Are you sure you want to delete this?\\\"}}},\\\"en-CA\\\":{\\\"buttons\\\":{\\\"cancel\\\":\\\"Cancel\\\",\\\"delete\\\":\\\"Delete\\\"},\\\"instructure_misc_plugins\\\":{\\\"confirms\\\":{\\\"default_delete_thing\\\":\\\"Are you sure you want to delete this?\\\"}}},\\\"en-GB\\\":{\\\"buttons\\\":{\\\"cancel\\\":\\\"Cancel\\\",\\\"delete\\\":\\\"Delete\\\"},\\\"instructure_misc_plugins\\\":{\\\"confirms\\\":{\\\"default_delete_thing\\\":\\\"Are you sure you want to delete this?\\\"}}},\\\"es\\\":{\\\"buttons\\\":{\\\"cancel\\\":\\\"Cancelar\\\",\\\"delete\\\":\\\"Eliminar\\\"},\\\"instructure_misc_plugins\\\":{\\\"confirms\\\":{\\\"default_delete_thing\\\":\\\"¿Seguro que desea eliminarlo?\\\"}}},\\\"fa\\\":{\\\"buttons\\\":{\\\"cancel\\\":\\\"لغو\\\",\\\"delete\\\":\\\"حذف\\\"},\\\"instructure_misc_plugins\\\":{\\\"confirms\\\":{\\\"default_delete_thing\\\":\\\"مطمئنید که می خواهید این مورد حذف شود؟\\\"}}},\\\"fi\\\":{\\\"buttons\\\":{\\\"cancel\\\":\\\"Peruuta\\\",\\\"delete\\\":\\\"Poista\\\"},\\\"instructure_misc_plugins\\\":{\\\"confirms\\\":{\\\"default_delete_thing\\\":\\\"Haluatko varmasti poistaa tämän?\\\"}}},\\\"fr\\\":{\\\"buttons\\\":{\\\"cancel\\\":\\\"Annuler\\\",\\\"delete\\\":\\\"Supprimer\\\"},\\\"instructure_misc_plugins\\\":{\\\"confirms\\\":{\\\"default_delete_thing\\\":\\\"Voulez-vous vraiment supprimer cet élément ?\\\"}}},\\\"fr-CA\\\":{\\\"buttons\\\":{\\\"cancel\\\":\\\"Annuler\\\",\\\"delete\\\":\\\"Supprimer\\\"},\\\"instructure_misc_plugins\\\":{\\\"confirms\\\":{\\\"default_delete_thing\\\":\\\"Voulez-vous vraiment supprimer cet élément?\\\"}}},\\\"he\\\":{\\\"buttons\\\":{\\\"cancel\\\":\\\"ביטול\\\",\\\"delete\\\":\\\"ביטול\\\"},\\\"instructure_misc_plugins\\\":{\\\"confirms\\\":{\\\"default_delete_thing\\\":\\\"בטוח/ה שרוצה לבטל זאת?\\\"}}},\\\"ht\\\":{\\\"buttons\\\":{\\\"cancel\\\":\\\"Anile\\\",\\\"delete\\\":\\\"Efase\\\"},\\\"instructure_misc_plugins\\\":{\\\"confirms\\\":{\\\"default_delete_thing\\\":\\\"Ou kwè vrèman ou vle efase sa a?\\\"}}},\\\"hu\\\":{\\\"buttons\\\":{\\\"cancel\\\":\\\"Mégse\\\",\\\"delete\\\":\\\"Törlés\\\"},\\\"instructure_misc_plugins\\\":{\\\"confirms\\\":{\\\"default_delete_thing\\\":\\\"Biztos benne, hogy törli ezt?\\\"}}},\\\"hy\\\":{\\\"buttons\\\":{\\\"cancel\\\":\\\"Չեղյալ համարել\\\",\\\"delete\\\":\\\"Ջնջել\\\"},\\\"instructure_misc_plugins\\\":{\\\"confirms\\\":{\\\"default_delete_thing\\\":\\\"Դուք իսկապե՞ս ցանկանում եք ջնջել սա:\\\"}}},\\\"is\\\":{\\\"buttons\\\":{\\\"cancel\\\":\\\"Hætta við\\\",\\\"delete\\\":\\\"Eyða\\\"},\\\"instructure_misc_plugins\\\":{\\\"confirms\\\":{\\\"default_delete_thing\\\":\\\"Viltu örugglega eyða þessu?\\\"}}},\\\"it\\\":{\\\"buttons\\\":{\\\"cancel\\\":\\\"Annulla\\\",\\\"delete\\\":\\\"Elimina\\\"},\\\"instructure_misc_plugins\\\":{\\\"confirms\\\":{\\\"default_delete_thing\\\":\\\"Vuoi eliminare questo?\\\"}}},\\\"ja\\\":{\\\"buttons\\\":{\\\"cancel\\\":\\\"キャンセル\\\",\\\"delete\\\":\\\"削除\\\"},\\\"instructure_misc_plugins\\\":{\\\"confirms\\\":{\\\"default_delete_thing\\\":\\\"これを削除してもよろしいですか?\\\"}}},\\\"ko\\\":{\\\"buttons\\\":{\\\"cancel\\\":\\\"취소\\\",\\\"delete\\\":\\\"삭제\\\"},\\\"instructure_misc_plugins\\\":{\\\"confirms\\\":{\\\"default_delete_thing\\\":\\\"삭제하시겠습니까?\\\"}}},\\\"mi\\\":{\\\"buttons\\\":{\\\"cancel\\\":\\\"Whakakore\\\",\\\"delete\\\":\\\"Muku\\\"},\\\"instructure_misc_plugins\\\":{\\\"confirms\\\":{\\\"default_delete_thing\\\":\\\"E tino hiahia ana koe ki te muku i tēnei?\\\"}}},\\\"nb\\\":{\\\"buttons\\\":{\\\"cancel\\\":\\\"Avbryt\\\",\\\"delete\\\":\\\"Slett\\\"},\\\"instructure_misc_plugins\\\":{\\\"confirms\\\":{\\\"default_delete_thing\\\":\\\"Er du sikker på at du ønsker å slette dette?\\\"}}},\\\"nb-x-k12\\\":{\\\"buttons\\\":{\\\"cancel\\\":\\\"Avbryt\\\",\\\"delete\\\":\\\"Slett\\\"},\\\"instructure_misc_plugins\\\":{\\\"confirms\\\":{\\\"default_delete_thing\\\":\\\"Er du sikker på at du ønsker å slette dette?\\\"}}},\\\"nl\\\":{\\\"buttons\\\":{\\\"cancel\\\":\\\"Annuleren\\\",\\\"delete\\\":\\\"Verwijderen\\\"},\\\"instructure_misc_plugins\\\":{\\\"confirms\\\":{\\\"default_delete_thing\\\":\\\"Weet je zeker dat je dit wilt verwijderen?\\\"}}},\\\"nn\\\":{\\\"buttons\\\":{\\\"cancel\\\":\\\"Avbryt\\\",\\\"delete\\\":\\\"Slett\\\"},\\\"instructure_misc_plugins\\\":{\\\"confirms\\\":{\\\"default_delete_thing\\\":\\\"Er du sikker på at du vil slette dette?\\\"}}},\\\"pl\\\":{\\\"buttons\\\":{\\\"cancel\\\":\\\"Anuluj\\\",\\\"delete\\\":\\\"Usuń\\\"},\\\"instructure_misc_plugins\\\":{\\\"confirms\\\":{\\\"default_delete_thing\\\":\\\"Czy na pewno chcesz usunąć ten element?\\\"}}},\\\"pt\\\":{\\\"buttons\\\":{\\\"cancel\\\":\\\"Cancelar\\\",\\\"delete\\\":\\\"Eliminar\\\"},\\\"instructure_misc_plugins\\\":{\\\"confirms\\\":{\\\"default_delete_thing\\\":\\\"Tem certeza de que deseja excluir isto?\\\"}}},\\\"pt-BR\\\":{\\\"buttons\\\":{\\\"cancel\\\":\\\"Cancelar\\\",\\\"delete\\\":\\\"Excluir\\\"},\\\"instructure_misc_plugins\\\":{\\\"confirms\\\":{\\\"default_delete_thing\\\":\\\"Tem certeza que deseja excluir isto?\\\"}}},\\\"ru\\\":{\\\"buttons\\\":{\\\"cancel\\\":\\\"Отменить\\\",\\\"delete\\\":\\\"Удалить\\\"},\\\"instructure_misc_plugins\\\":{\\\"confirms\\\":{\\\"default_delete_thing\\\":\\\"Действительно хотите удалить?\\\"}}},\\\"sl\\\":{\\\"buttons\\\":{\\\"cancel\\\":\\\"Prekliči\\\",\\\"delete\\\":\\\"Odstrani\\\"}},\\\"sv\\\":{\\\"buttons\\\":{\\\"cancel\\\":\\\"Avbryt\\\",\\\"delete\\\":\\\"Ta bort\\\"},\\\"instructure_misc_plugins\\\":{\\\"confirms\\\":{\\\"default_delete_thing\\\":\\\"Vill du verkligen radera det här?\\\"}}},\\\"sv-x-k12\\\":{\\\"buttons\\\":{\\\"cancel\\\":\\\"Avbryt\\\",\\\"delete\\\":\\\"Ta bort\\\"},\\\"instructure_misc_plugins\\\":{\\\"confirms\\\":{\\\"default_delete_thing\\\":\\\"Vill du verkligen radera det här?\\\"}}},\\\"tr\\\":{\\\"buttons\\\":{\\\"cancel\\\":\\\"İptal\\\",\\\"delete\\\":\\\"Sil\\\"},\\\"instructure_misc_plugins\\\":{\\\"confirms\\\":{\\\"default_delete_thing\\\":\\\"Bunu silmek istediğinize emin misiniz?\\\"}}},\\\"uk\\\":{\\\"buttons\\\":{\\\"cancel\\\":\\\"Скасувати\\\",\\\"delete\\\":\\\"Видалити\\\"}},\\\"zh-Hans\\\":{\\\"buttons\\\":{\\\"cancel\\\":\\\"取消\\\",\\\"delete\\\":\\\"删除\\\"},\\\"instructure_misc_plugins\\\":{\\\"confirms\\\":{\\\"default_delete_thing\\\":\\\"是否确定要删除它?\\\"}}},\\\"zh-Hant\\\":{\\\"buttons\\\":{\\\"cancel\\\":\\\"取消\\\",\\\"delete\\\":\\\"刪除\\\"},\\\"instructure_misc_plugins\\\":{\\\"confirms\\\":{\\\"default_delete_thing\\\":\\\"您是否確定要刪除?\\\"}}}}\"));\n","\n import I18n from '@canvas/i18n/i18nObj';\n \n import 'translations/instructure_misc_plugins';\n import 'translations/_core';\n \n import 'translations/_core_en';\n\n export default I18n.scoped('instructure_misc_plugins');\n ","/*\n * Copyright (C) 2011 - present Instructure, Inc.\n *\n * This file is part of Canvas.\n *\n * Canvas is free software: you can redistribute it and/or modify it under\n * the terms of the GNU Affero General Public License as published by the Free\n * Software Foundation, version 3 of the License.\n *\n * Canvas is distributed in the hope that it will be useful, but WITHOUT ANY\n * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR\n * A PARTICULAR PURPOSE. See the GNU Affero General Public License for more\n * details.\n *\n * You should have received a copy of the GNU Affero General Public License along\n * with this program. If not, see .\n */\nimport I18n from 'i18n!instructure_misc_plugins'\nimport $ from 'jquery'\nimport htmlEscape from 'html-escape'\nimport authenticity_token from '@canvas/authenticity-token'\nimport './jquery.ajaxJSON'\nimport 'jqueryui/dialog'\nimport 'jquery-scroll-to-visible'\nimport 'jquery-scroll-to-visible/jquery.scrollTo'\n\n$.fn.setOptions = function(prompt, options) {\n let result = prompt ? \"' : ''\n\n if (options == null) {\n options = []\n }\n\n options.forEach(opt => {\n const optHtml = htmlEscape(opt)\n result += ''\n })\n\n return this.html($.raw(result))\n}\n\n// this function is to prevent you from doing all kinds of expesive operations on a\n// jquery object that doesn't actually have any elements in it\n// it is similar and inspired by http://www.slideshare.net/paul.irish/perfcompression (slide #42)\n// to use it do something like:\n// $(\"a .bunch #of .nodes\").ifExists(function(orignalQuery){\n// // 'this' points to the original jquery object (in this case, $(\"a .bunch #of .nodes\") );\n// // orignalQuery is the same as 'this';\n// this.slideUp().dialog().show();\n// });\n$.fn.ifExists = function(func) {\n this.length && func.call(this, this)\n return this\n}\n\n// Returns the width of the browser's scroll bars.\n$.fn.scrollbarWidth = function() {\n const $div = $(\n '
'\n ).appendTo(this),\n $innerDiv = $div.find('div')\n // Append our div, do our calculation and then remove it\n const w1 = $innerDiv.innerWidth()\n $div.css('overflow-y', 'scroll')\n const w2 = $innerDiv.innerWidth()\n $div.remove()\n return w1 - w2\n}\n\n// Simple animation for dimming an element's opacity\n$.fn.dim = function(speed) {\n return this.animate({opacity: 0.4}, speed)\n}\n\n$.fn.undim = function(speed) {\n return this.animate({opacity: 1.0}, speed)\n}\n\n// Helper for deleting objects from the DOM and db.\n// url: URL to pass DELETE message. If none provided,\n// behaves as if the request were a success. Useful for testing.\n// message: Confirmation message\n// cancelled: Function to handle cancel.\n// confirmed: Function to handle confirm, before submit.\n// success: What to do on success. If none provided, fades\n// out the element and removes it from the DOM.\n// error: Error.\n// dialog: If present, do a jquery.ui.dialog instead of a confirm(). If an\n// object, it will be merged into the dialog options.\n$.fn.confirmDelete = function(options) {\n var options = $.extend({}, $.fn.confirmDelete.defaults, options)\n const $object = this\n let $dialog = null\n let result = true\n options.noMessage = options.noMessage || options.no_message\n const onContinue = function() {\n if (!result) {\n if (options.cancelled && $.isFunction(options.cancelled)) {\n options.cancelled.call($object)\n }\n return\n }\n if (!options.confirmed) {\n options.confirmed = function() {\n $object.dim()\n }\n }\n options.confirmed.call($object)\n if (options.url) {\n if (!options.success) {\n options.success = function(data) {\n $object.fadeOut('slow', () => {\n $object.remove()\n })\n }\n }\n const data = options.prepareData ? options.prepareData.call($object, $dialog) : {}\n data.authenticity_token = authenticity_token()\n $.ajaxJSON(\n options.url,\n 'DELETE',\n data,\n data => {\n options.success.call($object, data)\n },\n (data, request, status, error) => {\n if (options.error && $.isFunction(options.error)) {\n options.error.call($object, data, request, status, error)\n } else {\n $.ajaxJSON.unhandledXHRs.push(request)\n }\n }\n )\n } else {\n if (!options.success) {\n options.success = function() {\n $object.fadeOut('slow', () => {\n $object.remove()\n })\n }\n }\n options.success.call($object)\n }\n }\n if (options.message && !options.noMessage && !$.skipConfirmations) {\n if (options.dialog) {\n result = false\n const dialog_options = typeof options.dialog === 'object' ? options.dialog : {}\n const confirmation_class = options.url.includes('assignments') ? 'btn-danger' : 'btn-primary'\n $dialog = $(options.message).dialog(\n $.extend(\n {},\n {\n modal: true,\n close: onContinue,\n buttons: [\n {\n text: I18n.t('#buttons.cancel', 'Cancel'),\n click() {\n $(this).dialog('close')\n } // ; onContinue();\n },\n {\n text: I18n.t('#buttons.delete', 'Delete'),\n class: confirmation_class,\n click() {\n result = true\n $(this).dialog('close')\n }\n }\n ]\n },\n dialog_options\n )\n )\n return\n } else {\n result = confirm(options.message)\n }\n }\n onContinue()\n}\n$.fn.confirmDelete.defaults = {\n get message() {\n return I18n.t('confirms.default_delete_thing', 'Are you sure you want to delete this?')\n }\n}\n\n// Watches the given element's location.href for any changes\n// to the fragment (\"#...\") and calls the provided function\n// when there are any.\n// $(document).fragmentChange(function(event, hash) { alert(hash); });\n$.fn.fragmentChange = function(fn) {\n if (fn && fn !== true) {\n const query = (window.location.search || '').replace(/^\\?/, '').split('&')\n // The URL can hard-code a hash regardless of what's\n // actually shown in the hash by specifying a query\n // parameter, hash=some_hash\n let query_hash = null\n for (var i = 0; i < query.length; i++) {\n const item = query[i]\n if (item && item.indexOf('hash=') === 0) {\n query_hash = '#' + item.substring(5)\n }\n }\n this.bind('document_fragment_change', fn)\n const $doc = this\n let found = false\n // Can only be used on the root document,\n // will not work on an iframe, for example.\n for (var i = 0; i < $._checkFragments.fragmentList.length; i++) {\n const obj = $._checkFragments.fragmentList[i]\n if (obj.doc[0] == $doc[0]) {\n found = true\n }\n }\n if (!found) {\n $._checkFragments.fragmentList.push({\n doc: $doc,\n fragment: ''\n })\n }\n $(window).bind('hashchange', $._checkFragments)\n setTimeout(() => {\n if (query_hash && query_hash.length > 0) {\n $doc.triggerHandler('document_fragment_change', query_hash)\n } else if ($doc && $doc[0] && $doc[0].location && $doc[0].location.hash.length > 0) {\n $doc.triggerHandler('document_fragment_change', $doc[0].location.hash)\n }\n }, 500)\n } else {\n this.triggerHandler('document_fragment_change', this[0].location.hash)\n }\n return this\n}\n$._checkFragments = function() {\n const list = $._checkFragments.fragmentList\n for (let idx = 0; idx < list.length; idx++) {\n const obj = list[idx]\n const $doc = obj.doc\n if ($doc[0].location.hash != obj.fragment) {\n $doc.triggerHandler('document_fragment_change', $doc[0].location.hash)\n obj.fragment = $doc[0].location.hash\n $._checkFragments.fragmentList[idx] = obj\n }\n }\n}\n$._checkFragments.fragmentList = []\n// Triggers a click only if the anchor tag isn't disabled.\n$.fn.clickLink = function() {\n const $obj = this.eq(0)\n if (!$obj.hasClass('disabled_link')) {\n $obj.click()\n }\n}\n\n// jQuery supposedly has this built-in, but I haven't\n// had much success with it.\n$.fn.showIf = function(bool) {\n if ($.isFunction(bool)) {\n return this.each(function(index) {\n $(this).showIf(bool.call(this))\n })\n }\n if (bool) {\n this.show()\n } else {\n this.hide()\n }\n return this\n}\n\n$.fn.disableIf = function(bool) {\n if ($.isFunction(bool)) {\n bool = bool.call(this)\n }\n this.prop('disabled', !!bool)\n return this\n}\n\n$.fn.indicate = function(options) {\n options = options || {}\n let $indicator\n if (options == 'remove') {\n $indicator = this.data('indicator')\n if ($indicator) {\n $indicator.remove()\n }\n return\n }\n $('.indicator_box').remove()\n let offset = this.offset()\n if (options && options.offset) {\n offset = options.offset\n }\n const width = this.width()\n const height = this.height()\n const zIndex = (options.container || this).zIndex()\n $indicator = $(document.createElement('div'))\n $indicator.css({\n width: width + 6,\n height: height + 6,\n top: offset.top - 3,\n left: offset.left - 3,\n zIndex: zIndex + 1,\n position: 'absolute',\n display: 'block',\n '-moz-border-radius': 5,\n opacity: 0.8,\n border: '2px solid #870',\n backgroundColor: '#fd0'\n })\n $indicator.addClass('indicator_box')\n $indicator.mouseover(function() {\n $(this)\n .stop()\n .fadeOut('fast', function() {\n $(this).remove()\n })\n })\n if (this.data('indicator')) {\n this.indicate('remove')\n }\n this.data('indicator', $indicator)\n $('body').append($indicator)\n if (options && options.singleFlash) {\n $indicator\n .hide()\n .fadeIn()\n .animate({opacity: 0.8}, 500)\n .fadeOut('slow', function() {\n $(this).remove()\n })\n } else {\n $indicator\n .hide()\n .fadeIn()\n .animate({opacity: 0.8}, 500)\n .fadeOut('slow')\n .fadeIn('slow')\n .animate({opacity: 0.8}, 2500)\n .fadeOut('slow', function() {\n $(this).remove()\n })\n }\n if (options && options.scroll) {\n $('html,body').scrollToVisible($indicator)\n }\n}\n\n$.fn.hasScrollbar = function() {\n return this.length && this[0].clientHeight < this[0].scrollHeight\n}\n\n$.fn.log = function(msg) {\n console.log('%s: %o', msg, this)\n return this\n}\n\n// this is used if you want to fill the browser window with something inside #content but you want to also leave the footer and header on the page.\n$.fn.fillWindowWithMe = function(options) {\n const opts = $.extend({minHeight: 400}, options),\n $this = $(this),\n $wrapper = $('#wrapper'),\n $main = $('#main'),\n $not_right_side = $('#not_right_side'),\n $window = $(window),\n $toResize = $(this).add(opts.alsoResize)\n\n function fillWindowWithThisElement() {\n $toResize.height(0)\n const spaceLeftForThis =\n $window.height() -\n ($wrapper.offset().top + $wrapper.outerHeight()) +\n ($main.height() - $not_right_side.height()),\n newHeight = Math.max(400, spaceLeftForThis)\n\n $toResize.height(newHeight)\n if ($.isFunction(opts.onResize)) {\n opts.onResize.call($this, newHeight)\n }\n }\n fillWindowWithThisElement()\n $window\n .unbind('resize.fillWindowWithMe')\n .bind('resize.fillWindowWithMe', fillWindowWithThisElement)\n return this\n}\n\n$.fn.autoGrowInput = function(o) {\n o = $.extend(\n {\n maxWidth: 1000,\n minWidth: 0,\n comfortZone: 70\n },\n o\n )\n\n this.filter('input:text').each(function() {\n let minWidth = o.minWidth || $(this).width(),\n val = '',\n input = $(this),\n testSubject = $('').css({\n position: 'absolute',\n top: -9999,\n left: -9999,\n width: 'auto',\n fontSize: input.css('fontSize'),\n fontFamily: input.css('fontFamily'),\n fontWeight: input.css('fontWeight'),\n letterSpacing: input.css('letterSpacing'),\n whiteSpace: 'nowrap'\n }),\n check = function() {\n setTimeout(() => {\n if (val === (val = input.val())) {\n return\n }\n\n // Enter new content into testSubject\n testSubject.text(val)\n\n // Calculate new width + whether to change\n const testerWidth = testSubject.width(),\n newWidth =\n testerWidth + o.comfortZone >= minWidth ? testerWidth + o.comfortZone : minWidth,\n currentWidth = input.width(),\n isValidWidthChange =\n (newWidth < currentWidth && newWidth >= minWidth) ||\n (newWidth > minWidth && newWidth < o.maxWidth)\n\n // Animate width\n if (isValidWidthChange) {\n input.width(newWidth)\n }\n })\n }\n\n testSubject.insertAfter(input)\n\n $(this).bind('keyup keydown blur update change', check)\n })\n\n return this\n}\n\nexport default $\n","/*\n * Copyright (C) 2018 - present Instructure, Inc.\n *\n * This file is part of Canvas.\n *\n * Canvas is free software: you can redistribute it and/or modify it under\n * the terms of the GNU Affero General Public License as published by the Free\n * Software Foundation, version 3 of the License.\n *\n * Canvas is distributed in the hope that it will be useful, but WITHOUT ANY\n * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR\n * A PARTICULAR PURPOSE. See the GNU Affero General Public License for more\n * details.\n *\n * You should have received a copy of the GNU Affero General Public License along\n * with this program. If not, see .\n */\n\nconst iframeAllowances = () => {\n const allowances = ENV.LTI_LAUNCH_FRAME_ALLOWANCES || []\n return allowances.join('; ')\n}\n\nexport default iframeAllowances\n","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 - present Instructure, Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\nimport React from 'react';\nimport { makeRequirable } from './makeRequirable';\nvar Children = {\n /**\n * Validate that the children of a component are one of the specified types.\n *\n * ```js\n * import { Children } from '@instructure/ui-prop-types'\n *\n * class Example extends Component {\n * static propTypes = {\n * children: Children.oneOf([Foo, Bar, Baz])\n * }\n *\n * render () {\n * return
{this.props.children}
\n * }\n * }\n * ```\n *\n * This will allow children such as:\n *\n * ```jsx\n * \n * \n * \n * ```\n *\n * OR\n *\n * ```jsx\n * \n * \n * \n * \n * ```\n *\n * But will fail on something like:\n *\n * ```jsx\n * \n *

Example

\n * \n *
\n * ```\n * @returns {Error} if validation failed\n */\n oneOf: function oneOf(validTypes) {\n function validator(props, propName, componentName) {\n var children = React.Children.toArray(props[propName]);\n var validTypeNames = validTypes.map(function (type) {\n return type ? getDisplayName(type) : type;\n });\n\n for (var i = 0; i < children.length; i++) {\n var child = children[i];\n\n if (child && child.type) {\n var childName = getDisplayName(child.type);\n\n if (validTypeNames.indexOf(childName) < 0) {\n return new Error(\"Expected one of \".concat(validTypeNames.join(', '), \" in \").concat(componentName, \" but found '\").concat(childName, \"'\"));\n }\n } else if (child) {\n return new Error(\"Expected one of \".concat(validTypeNames.join(', '), \" in \").concat(componentName, \" but found an element with unknown type: \").concat(child));\n }\n }\n }\n\n validator.isRequired = makeRequirable(validator);\n return validator;\n },\n\n /**\n * Ensures that there is exactly one of each specified child\n *\n * ```js\n * import { Children } from '@instructure/ui-prop-types'\n *\n * class Example extends Component {\n * static propTypes = {\n * children: Children.oneOfEach([Foo, Bar, Baz])\n * }\n *\n * render () {\n * return
{this.props.children}
\n * }\n * }\n * ```\n *\n * This will enforce the following:\n *\n * ```jsx\n * \n * \n * \n * \n * \n * ```\n * An error will be thrown\n * - If any of the children are not provided (ex. Foo, Bar, but missing Baz)\n * - If multiple children of the same type are provided (ex. Foo, Foo, Bar, and Baz)\n *\n * @param {Array} validTypes - Array of child types\n * @returns {Error} if validation failed\n */\n oneOfEach: function oneOfEach(validTypes) {\n return function (props, propName, componentName) {\n var children = React.Children.toArray(props[propName]);\n var instanceCount = {};\n var validTypeNames = validTypes.map(function (type) {\n var typeName = getDisplayName(type);\n instanceCount[typeName] = 0;\n return typeName;\n });\n\n for (var i = 0; i < children.length; i++) {\n var child = children[i];\n\n if (child && child.type) {\n var childName = getDisplayName(child.type);\n\n if (validTypeNames.indexOf(childName) < 0) {\n return new Error(\"Expected one of \".concat(validTypeNames.join(', '), \" in \").concat(componentName, \" but found '\").concat(childName, \"'\"));\n }\n\n instanceCount[childName] = (instanceCount[childName] || 0) + 1;\n } else if (child) {\n return new Error(\"Expected one of \".concat(validTypeNames.join(', '), \" in \").concat(componentName, \" but found an element of unknown type: \").concat(child));\n }\n }\n\n var errors = [];\n Object.keys(instanceCount).forEach(function (childName) {\n if (instanceCount[childName] > 1) {\n errors.push(\"\".concat(instanceCount[childName], \" children of type \").concat(childName));\n }\n\n if (instanceCount[childName] === 0) {\n errors.push(\"0 children of type \".concat(childName));\n }\n });\n\n if (errors.length > 0) {\n return new Error(\"Expected exactly one of each \".concat(validTypeNames.join(', '), \" in \").concat(componentName, \" but found:\\n \").concat(errors.join('\\n')));\n }\n };\n },\n\n /**\n * Validate the type and order of children for a component.\n *\n * ```js\n * import { Children } from '@instructure/ui-prop-types'\n *\n * class Example extends Component {\n * static propTypes = {\n * children: Children.enforceOrder([Foo, Bar, Baz])\n * }\n *\n * render () {\n * return
{this.props.children}
\n * }\n * }\n * ```\n *\n * This will enforce the following:\n *\n * ```jsx\n * \n * \n * \n * \n * \n * ```\n *\n * This validator will also allow various permutations of the order.\n *\n * ```js\n * import { Children } from '@instructure/ui-prop-types'\n *\n * class Example extends Component {\n * static propTypes = {\n * children: Children.enforceOrder(\n * [Foo, Bar, Baz],\n * [Foo, Bar],\n * [Bar, Baz],\n * )\n * }\n *\n * render () {\n * return
{this.props.children}
\n * }\n * }\n * ```\n *\n * This will enforce one of the following:\n *\n * ```jsx\n * \n * \n * \n * \n * \n * ```\n *\n * OR\n *\n * ```jsx\n * \n * \n * \n * \n * ```\n *\n * OR\n *\n * ```jsx\n * \n * \n * \n * \n * ```\n *\n * @param {...Array} validTypeGroups One or more Arrays of valid types\n * @returns {Error} if validation failed\n */\n enforceOrder: function enforceOrder() {\n for (var _len = arguments.length, validTypeGroups = new Array(_len), _key = 0; _key < _len; _key++) {\n validTypeGroups[_key] = arguments[_key];\n }\n\n function validateTypes(childNames, typeNames) {\n for (var i = 0; i < childNames.length; i++) {\n if (childNames[i] !== typeNames[i]) {\n return false;\n }\n }\n\n return true;\n }\n\n function formatGroupTypes(componentName, typeGroups) {\n return typeGroups.map(function (types) {\n return formatTypes(componentName, types);\n }).join('\\n\\n');\n }\n\n function formatTypes(componentName, types) {\n var children = types.map(function (type) {\n if (type) {\n return getDisplayName(type);\n } else {\n return '??';\n }\n }).map(function (name) {\n return \" <\".concat(name, \" />\");\n }).join('\\n');\n return \"<\".concat(componentName, \">\\n\").concat(children, \"\\n\");\n }\n\n function validator(props, propName, componentName) {\n var childNames = React.Children.toArray(props[propName]).map(function (child) {\n if (child && child.type) {\n return getDisplayName(child.type);\n } else if (child) {\n return null;\n }\n }); // Validate each group, if any of them are valid we're done\n\n for (var i = 0; i < validTypeGroups.length; i++) {\n var validTypeNames = validTypeGroups[i].map(function (type) {\n if (type) {\n return getDisplayName(type);\n } else {\n return '??';\n }\n });\n\n if (validateTypes(childNames, validTypeNames)) {\n return;\n }\n } // If we make it through the loop then children are not valid\n\n\n return new Error(\"Expected children of \".concat(componentName, \" in one of the following formats:\\n \").concat(formatGroupTypes(componentName, validTypeGroups), \"\\n\\n\\n Instead of:\\n \").concat(formatTypes(componentName, childNames)));\n }\n\n validator.isRequired = makeRequirable(validator);\n return validator;\n }\n}; // TODO: Remove when we further break up ui-utils and bringing this in no longer creates\n// a circular dep\n\nvar getDisplayName = function getDisplayName(Component) {\n return typeof Component === 'string' ? Component : Component.displayName || Component.name;\n};\n\nexport default Children;\nexport {\n/**\n * ---\n * category: utilities/PropTypes\n * ---\n * @module Children\n */\nChildren };","import _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\n\n/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 - present Instructure, Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\n/**\n * Adapted from jQuery UI core\n *\n * http://jqueryui.com\n *\n * Copyright 2014 jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/category/ui-core/\n **/\nimport { getComputedStyle, findDOMNode, elementMatches } from './';\n\nfunction findFocusable(el, filter, shouldSearchRootNode) {\n var element = findDOMNode(el);\n\n if (!element || typeof element.querySelectorAll !== 'function') {\n return [];\n }\n\n var focusableSelector = 'a[href],frame,iframe,object,input:not([type=hidden]),select,textarea,button,*[tabindex]';\n var matches = Array.from(element.querySelectorAll(focusableSelector));\n\n if (shouldSearchRootNode && elementMatches(element, focusableSelector)) {\n matches = [].concat(_toConsumableArray(matches), [element]);\n }\n\n return matches.filter(function (el) {\n if (typeof filter === 'function') {\n return filter(el) && focusable(el);\n } else {\n return focusable(el);\n }\n });\n}\n\nfunction hidden(element) {\n var cs = getComputedStyle(element);\n return cs.display !== 'inline' && element.offsetWidth <= 0 && element.offsetHeight <= 0 || cs.display === 'none';\n}\n\nfunction positioned(element) {\n var POS = ['fixed', 'absolute'];\n if (POS.includes(element.style.position.toLowerCase())) return true;\n if (POS.includes(getComputedStyle(element).getPropertyValue('position').toLowerCase())) return true;\n return false;\n}\n\nfunction visible(element) {\n /* eslint no-param-reassign:0 */\n while (element) {\n if (element === document.body) break;\n if (hidden(element)) return false;\n if (positioned(element)) break;\n element = element.parentNode;\n }\n\n return true;\n}\n\nfunction focusable(element) {\n return !element.disabled && visible(element);\n}\n\nexport default findFocusable;\nexport {\n/**\n* ---\n* category: utilities/a11y\n* ---\n*\n* Given an element, finds and returns all visible, focusable children.\n* Focusable elements include input, select, textarea, button, and object.\n* Anchor tags are also focusable if they include an href or\n* tabindex attribute (including tabindeces less than zero).\n*\n* @param {ReactComponent|DomNode} el - component or DOM node\n* @param {Function} filter - a function to filter the matching nodes\n* @param {Boolean} shouldSearchRootNode - should the root node be included in the search\n* @returns {Array} array of all tabbable children\n*/\nfindFocusable };","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 - present Instructure, Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\nexport default function generator(_ref) {\n var borders = _ref.borders,\n colors = _ref.colors,\n spacing = _ref.spacing,\n typography = _ref.typography;\n return {\n lineHeight: typography.lineHeightFit,\n h1FontSize: typography.fontSizeXXLarge,\n h1FontWeight: typography.fontWeightLight,\n h1FontFamily: typography.fontFamily,\n h2FontSize: typography.fontSizeXLarge,\n h2FontWeight: typography.fontWeightNormal,\n h2FontFamily: typography.fontFamily,\n h3FontSize: typography.fontSizeLarge,\n h3FontWeight: typography.fontWeightBold,\n h3FontFamily: typography.fontFamily,\n h4FontSize: typography.fontSizeMedium,\n h4FontWeight: typography.fontWeightBold,\n h4FontFamily: typography.fontFamily,\n h5FontSize: typography.fontSizeSmall,\n h5FontWeight: typography.fontWeightNormal,\n h5FontFamily: typography.fontFamily,\n primaryInverseColor: colors.textLightest,\n primaryColor: colors.textDarkest,\n secondaryColor: colors.textDark,\n secondaryInverseColor: colors.textLight,\n borderPadding: spacing.xxxSmall,\n borderColor: colors.borderMedium,\n borderWidth: borders.widthSmall,\n borderStyle: borders.style\n };\n}\n\ngenerator.canvas = function (variables) {\n return {\n primaryColor: variables['ic-brand-font-color-dark']\n };\n};\n\ngenerator['instructure'] = function (_ref2) {\n var typography = _ref2.typography;\n return {\n h1FontFamily: typography.fontFamilyHeading,\n h2FontFamily: typography.fontFamilyHeading,\n h3FontWeight: typography.fontWeightBold,\n h3FontSize: '2.125rem',\n h4FontWeight: typography.fontWeightBold,\n h4FontSize: typography.fontSizeLarge,\n h5FontWeight: typography.fontWeightBold,\n h5FontSize: typography.fontSizeMedium\n };\n};","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 - present Instructure, Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\nimport { createThemeAdapter } from '@instructure/ui-themeable';\nvar map = {\n fontFamily: ['h1FontFamily', 'h2FontFamily', 'h3FontFamily', 'h4FontFamily', 'h5FontFamily']\n};\nexport var themeAdapter = createThemeAdapter({\n map: map,\n version: '8.0.0'\n});","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\n\nvar _dec, _dec2, _dec3, _class, _class2, _temp;\n\n/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 - present Instructure, Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport { View } from '@instructure/ui-view';\nimport { themeable, ThemeablePropTypes } from '@instructure/ui-themeable';\nimport { childrenOrValue } from '@instructure/ui-prop-types';\nimport { deprecated, getElementType, passthroughProps } from '@instructure/ui-react-utils';\nimport { testable } from '@instructure/ui-testable';\nvar styles = {\n componentId: 'blnAQ',\n template: function template(theme) {\n return \"\\n\\n.blnAQ_bGBk{line-height:\".concat(theme.lineHeight || 'inherit', \";margin:0}\\n\\ninput.blnAQ_bGBk[type]{-moz-appearance:none;-webkit-appearance:none;appearance:none;background:none;border:none;border-radius:0;box-shadow:none;box-sizing:border-box;color:inherit;display:block;height:auto;line-height:inherit;margin:-0.375rem 0 0 0;outline:0;padding:0;text-align:start;width:100%}\\n\\n[dir=ltr] input.blnAQ_bGBk[type]{text-align:left}\\n\\n[dir=rtl] input.blnAQ_bGBk[type]{text-align:right}\\n\\ninput.blnAQ_bGBk[type]:focus{outline:none}\\n\\n.blnAQ_fCtg{font-family:\").concat(theme.h1FontFamily || 'inherit', \";font-size:\").concat(theme.h1FontSize || 'inherit', \";font-weight:\").concat(theme.h1FontWeight || 'inherit', \"}\\n\\n.blnAQ_cVrl{font-family:\").concat(theme.h2FontFamily || 'inherit', \";font-size:\").concat(theme.h2FontSize || 'inherit', \";font-weight:\").concat(theme.h2FontWeight || 'inherit', \"}\\n\\n.blnAQ_dnfM{font-family:\").concat(theme.h3FontFamily || 'inherit', \";font-size:\").concat(theme.h3FontSize || 'inherit', \";font-weight:\").concat(theme.h3FontWeight || 'inherit', \"}\\n\\n.blnAQ_KGwv{font-family:\").concat(theme.h4FontFamily || 'inherit', \";font-size:\").concat(theme.h4FontSize || 'inherit', \";font-weight:\").concat(theme.h4FontWeight || 'inherit', \"}\\n\\n.blnAQ_eYKA{font-family:\").concat(theme.h5FontFamily || 'inherit', \";font-size:\").concat(theme.h5FontSize || 'inherit', \";font-weight:\").concat(theme.h5FontWeight || 'inherit', \"}\\n\\n.blnAQ_dbSc{font-size:inherit;font-weight:inherit;line-height:inherit;margin:0}\\n\\n.blnAQ_bACI{border-top:\").concat(theme.borderWidth || 'inherit', \" \").concat(theme.borderStyle || 'inherit', \" \").concat(theme.borderColor || 'inherit', \";padding-top:\").concat(theme.borderPadding || 'inherit', \"}\\n\\n.blnAQ_kWwi{border-bottom:\").concat(theme.borderWidth || 'inherit', \" \").concat(theme.borderStyle || 'inherit', \" \").concat(theme.borderColor || 'inherit', \";padding-bottom:\").concat(theme.borderPadding || 'inherit', \"}\\n\\n.blnAQ_drOs{color:inherit}\\n\\n.blnAQ_eCSh{color:\").concat(theme.primaryColor || 'inherit', \"}\\n\\n.blnAQ_buuG{color:\").concat(theme.secondaryColor || 'inherit', \"}\\n\\n.blnAQ_bFtJ{color:\").concat(theme.primaryInverseColor || 'inherit', \"}\\n\\n.blnAQ_dsSB{color:\").concat(theme.secondaryInverseColor || 'inherit', \"}\\n\\n.blnAQ_bOQC{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\");\n },\n 'root': 'blnAQ_bGBk',\n 'level--h1': 'blnAQ_fCtg',\n 'level--h2': 'blnAQ_cVrl',\n 'level--h3': 'blnAQ_dnfM',\n 'level--h4': 'blnAQ_KGwv',\n 'level--h5': 'blnAQ_eYKA',\n 'level--reset': 'blnAQ_dbSc',\n 'border--top': 'blnAQ_bACI',\n 'border--bottom': 'blnAQ_kWwi',\n 'color--inherit': 'blnAQ_drOs',\n 'color--primary': 'blnAQ_eCSh',\n 'color--secondary': 'blnAQ_buuG',\n 'color--primary-inverse': 'blnAQ_bFtJ',\n 'color--secondary-inverse': 'blnAQ_dsSB',\n 'ellipsis': 'blnAQ_bOQC'\n};\nimport theme from './theme';\nimport { themeAdapter } from './themeAdapter';\n/**\n---\ncategory: components\n---\n**/\n\nvar Heading = (_dec = deprecated('8.0.0', {\n ellipsis: ''\n}), _dec2 = testable(), _dec3 = themeable(theme, styles, themeAdapter), _dec(_class = _dec2(_class = _dec3(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {\n _inherits(Heading, _Component);\n\n var _super = _createSuper(Heading);\n\n function Heading() {\n _classCallCheck(this, Heading);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(Heading, [{\n key: \"render\",\n value: function render() {\n var _classnames;\n\n var _this$props = this.props,\n border = _this$props.border,\n children = _this$props.children,\n color = _this$props.color,\n level = _this$props.level,\n margin = _this$props.margin,\n elementRef = _this$props.elementRef,\n ellipsis = _this$props.ellipsis,\n props = _objectWithoutProperties(_this$props, [\"border\", \"children\", \"color\", \"level\", \"margin\", \"elementRef\", \"ellipsis\"]);\n\n var ElementType = getElementType(Heading, this.props, function () {\n if (level === 'reset') {\n return 'span';\n } else {\n return level;\n }\n });\n return /*#__PURE__*/React.createElement(View, Object.assign({}, passthroughProps(props), {\n className: classnames((_classnames = {}, _defineProperty(_classnames, styles.root, true), _defineProperty(_classnames, styles[\"level--\".concat(level)], true), _defineProperty(_classnames, styles[\"color--\".concat(color)], color), _defineProperty(_classnames, styles[\"border--\".concat(border)], border !== 'none'), _defineProperty(_classnames, styles.ellipsis, ellipsis), _classnames)),\n as: ElementType,\n margin: margin,\n elementRef: elementRef\n }), children);\n }\n }]);\n\n Heading.displayName = \"Heading\";\n return Heading;\n}(Component), _class2.propTypes = {\n /**\n * Add a top- or bottom-border to the Heading\n */\n border: PropTypes.oneOf(['none', 'top', 'bottom']),\n\n /**\n * The text content of the Heading\n */\n children: childrenOrValue,\n\n /**\n * The font color to render\n */\n color: PropTypes.oneOf(['primary', 'secondary', 'primary-inverse', 'secondary-inverse', 'inherit']),\n\n /**\n * The *visual* appearance of the Heading: h1 is largest; h5 is smallest.\n */\n level: PropTypes.oneOf(['h1', 'h2', 'h3', 'h4', 'h5', 'reset']),\n\n /**\n * Choose the element Heading should render as. Will default to the `level` prop\n * if not specified.\n */\n as: PropTypes.elementType,\n // eslint-disable-line react/require-default-props\n\n /**\n * Valid values are `0`, `none`, `auto`, `xxx-small`, `xx-small`, `x-small`,\n * `small`, `medium`, `large`, `x-large`, `xx-large`. Apply these values via\n * familiar CSS-like shorthand. For example: `margin=\"small auto large\"`.\n */\n margin: ThemeablePropTypes.spacing,\n\n /**\n * Provides a ref to the underlying HTML element\n */\n elementRef: PropTypes.func,\n\n /* eslint-disable react/require-default-props */\n\n /**\n * __Deprecated - use ` instead`__\n */\n ellipsis: PropTypes.bool\n /* eslint-enable react/require-default-props */\n\n}, _class2.defaultProps = {\n children: null,\n margin: void 0,\n elementRef: void 0,\n border: 'none',\n color: 'inherit',\n level: 'h2'\n}, _temp)) || _class) || _class) || _class);\nexport default Heading;\nexport { Heading };","/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 - present Instructure, Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\nimport { findDOMNode } from './findDOMNode';\n/**\n * ---\n * category: utilities/DOM\n * ---\n *\n * Polyfill for Element.matches (https://developer.mozilla.org/en-US/docs/Web/API/Element/matches)\n *\n * @param {ReactComponent|DomNode} el - component or DOM node\n * @param {String} selectorString - a string representing the selector to test\n * @returns {boolean} if the element would be selected by the specified selector string\n */\n\nfunction elementMatches(el, selectorString) {\n var node = el && findDOMNode(el);\n if (!node) return false;\n return node.matches ? node.matches(selectorString) : node.msMatchesSelector(selectorString);\n}\n\nexport default elementMatches;\nexport { elementMatches };"],"sourceRoot":""}