fomantic-ui 2.9.3-beta.0 → 2.9.3-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (186) hide show
  1. package/.all-contributorsrc +9 -0
  2. package/CONTRIBUTORS.md +102 -99
  3. package/dist/components/accordion.css +1 -1
  4. package/dist/components/accordion.js +1 -5
  5. package/dist/components/accordion.min.css +1 -1
  6. package/dist/components/accordion.min.js +2 -2
  7. package/dist/components/ad.css +1 -1
  8. package/dist/components/ad.min.css +1 -1
  9. package/dist/components/api.js +14 -8
  10. package/dist/components/api.min.js +2 -2
  11. package/dist/components/breadcrumb.css +1 -1
  12. package/dist/components/breadcrumb.min.css +1 -1
  13. package/dist/components/button.css +1 -1
  14. package/dist/components/button.min.css +1 -1
  15. package/dist/components/calendar.css +1 -1
  16. package/dist/components/calendar.js +1 -6
  17. package/dist/components/calendar.min.css +1 -1
  18. package/dist/components/calendar.min.js +2 -2
  19. package/dist/components/card.css +1 -1
  20. package/dist/components/card.min.css +1 -1
  21. package/dist/components/checkbox.css +1 -1
  22. package/dist/components/checkbox.js +1 -5
  23. package/dist/components/checkbox.min.css +1 -1
  24. package/dist/components/checkbox.min.js +2 -2
  25. package/dist/components/comment.css +1 -1
  26. package/dist/components/comment.min.css +1 -1
  27. package/dist/components/container.css +1 -1
  28. package/dist/components/container.min.css +1 -1
  29. package/dist/components/dimmer.css +1 -1
  30. package/dist/components/dimmer.js +1 -5
  31. package/dist/components/dimmer.min.css +1 -1
  32. package/dist/components/dimmer.min.js +2 -2
  33. package/dist/components/divider.css +1 -1
  34. package/dist/components/divider.min.css +1 -1
  35. package/dist/components/dropdown.css +1 -1
  36. package/dist/components/dropdown.js +19 -11
  37. package/dist/components/dropdown.min.css +1 -1
  38. package/dist/components/dropdown.min.js +2 -2
  39. package/dist/components/embed.css +1 -1
  40. package/dist/components/embed.js +1 -6
  41. package/dist/components/embed.min.css +1 -1
  42. package/dist/components/embed.min.js +2 -2
  43. package/dist/components/emoji.css +1 -1
  44. package/dist/components/emoji.min.css +1 -1
  45. package/dist/components/feed.css +1 -1
  46. package/dist/components/feed.min.css +1 -1
  47. package/dist/components/flag.css +1 -1
  48. package/dist/components/flag.min.css +1 -1
  49. package/dist/components/flyout.css +1 -1
  50. package/dist/components/flyout.js +15 -8
  51. package/dist/components/flyout.min.css +1 -1
  52. package/dist/components/flyout.min.js +2 -2
  53. package/dist/components/form.css +1 -1
  54. package/dist/components/form.js +6 -6
  55. package/dist/components/form.min.css +1 -1
  56. package/dist/components/form.min.js +2 -2
  57. package/dist/components/grid.css +1 -1
  58. package/dist/components/grid.min.css +1 -1
  59. package/dist/components/header.css +1 -1
  60. package/dist/components/header.min.css +1 -1
  61. package/dist/components/icon.css +1 -1
  62. package/dist/components/icon.min.css +1 -1
  63. package/dist/components/image.css +1 -1
  64. package/dist/components/image.min.css +1 -1
  65. package/dist/components/input.css +1 -1
  66. package/dist/components/input.min.css +1 -1
  67. package/dist/components/item.css +1 -1
  68. package/dist/components/item.min.css +1 -1
  69. package/dist/components/label.css +1 -1
  70. package/dist/components/label.min.css +1 -1
  71. package/dist/components/list.css +1 -1
  72. package/dist/components/list.min.css +1 -1
  73. package/dist/components/loader.css +1 -1
  74. package/dist/components/loader.min.css +1 -1
  75. package/dist/components/menu.css +1 -1
  76. package/dist/components/menu.min.css +1 -1
  77. package/dist/components/message.css +1 -1
  78. package/dist/components/message.min.css +1 -1
  79. package/dist/components/modal.css +1 -1
  80. package/dist/components/modal.js +14 -7
  81. package/dist/components/modal.min.css +1 -1
  82. package/dist/components/modal.min.js +2 -2
  83. package/dist/components/nag.css +1 -1
  84. package/dist/components/nag.js +16 -8
  85. package/dist/components/nag.min.css +1 -1
  86. package/dist/components/nag.min.js +2 -2
  87. package/dist/components/placeholder.css +1 -1
  88. package/dist/components/placeholder.min.css +1 -1
  89. package/dist/components/popup.css +1 -1
  90. package/dist/components/popup.js +18 -12
  91. package/dist/components/popup.min.css +1 -1
  92. package/dist/components/popup.min.js +2 -2
  93. package/dist/components/progress.css +1 -1
  94. package/dist/components/progress.js +1 -6
  95. package/dist/components/progress.min.css +1 -1
  96. package/dist/components/progress.min.js +2 -2
  97. package/dist/components/rail.css +1 -1
  98. package/dist/components/rail.min.css +1 -1
  99. package/dist/components/rating.css +1 -1
  100. package/dist/components/rating.js +1 -5
  101. package/dist/components/rating.min.css +1 -1
  102. package/dist/components/rating.min.js +2 -2
  103. package/dist/components/reset.css +1 -1
  104. package/dist/components/reset.min.css +1 -1
  105. package/dist/components/reveal.css +1 -1
  106. package/dist/components/reveal.min.css +1 -1
  107. package/dist/components/search.css +1 -1
  108. package/dist/components/search.js +1 -5
  109. package/dist/components/search.min.css +1 -1
  110. package/dist/components/search.min.js +2 -2
  111. package/dist/components/segment.css +3 -2
  112. package/dist/components/segment.min.css +2 -2
  113. package/dist/components/shape.css +1 -1
  114. package/dist/components/shape.js +1 -5
  115. package/dist/components/shape.min.css +1 -1
  116. package/dist/components/shape.min.js +2 -2
  117. package/dist/components/sidebar.css +1 -1
  118. package/dist/components/sidebar.js +15 -8
  119. package/dist/components/sidebar.min.css +1 -1
  120. package/dist/components/sidebar.min.js +2 -2
  121. package/dist/components/site.css +1 -1
  122. package/dist/components/site.js +1 -1
  123. package/dist/components/site.min.css +1 -1
  124. package/dist/components/site.min.js +1 -1
  125. package/dist/components/slider.css +1 -1
  126. package/dist/components/slider.js +1 -6
  127. package/dist/components/slider.min.css +1 -1
  128. package/dist/components/slider.min.js +2 -2
  129. package/dist/components/state.js +23 -20
  130. package/dist/components/state.min.js +2 -2
  131. package/dist/components/statistic.css +1 -1
  132. package/dist/components/statistic.min.css +1 -1
  133. package/dist/components/step.css +1 -1
  134. package/dist/components/step.min.css +1 -1
  135. package/dist/components/sticky.css +1 -1
  136. package/dist/components/sticky.js +17 -16
  137. package/dist/components/sticky.min.css +1 -1
  138. package/dist/components/sticky.min.js +2 -2
  139. package/dist/components/tab.css +1 -1
  140. package/dist/components/tab.js +14 -6
  141. package/dist/components/tab.min.css +1 -1
  142. package/dist/components/tab.min.js +2 -2
  143. package/dist/components/table.css +1 -1
  144. package/dist/components/table.min.css +1 -1
  145. package/dist/components/text.css +1 -1
  146. package/dist/components/text.min.css +1 -1
  147. package/dist/components/toast.css +1 -1
  148. package/dist/components/toast.js +16 -8
  149. package/dist/components/toast.min.css +1 -1
  150. package/dist/components/toast.min.js +2 -2
  151. package/dist/components/transition.css +1 -1
  152. package/dist/components/transition.js +1 -5
  153. package/dist/components/transition.min.css +1 -1
  154. package/dist/components/transition.min.js +2 -2
  155. package/dist/components/visibility.js +15 -6
  156. package/dist/components/visibility.min.js +2 -2
  157. package/dist/semantic.css +55 -54
  158. package/dist/semantic.js +215 -185
  159. package/dist/semantic.min.css +2 -2
  160. package/dist/semantic.min.js +2 -2
  161. package/package.json +1 -1
  162. package/src/definitions/behaviors/api.js +13 -7
  163. package/src/definitions/behaviors/form.js +5 -5
  164. package/src/definitions/behaviors/state.js +22 -19
  165. package/src/definitions/behaviors/visibility.js +14 -5
  166. package/src/definitions/elements/segment.less +2 -1
  167. package/src/definitions/modules/accordion.js +0 -4
  168. package/src/definitions/modules/calendar.js +0 -5
  169. package/src/definitions/modules/checkbox.js +0 -4
  170. package/src/definitions/modules/dimmer.js +0 -4
  171. package/src/definitions/modules/dropdown.js +18 -10
  172. package/src/definitions/modules/embed.js +0 -5
  173. package/src/definitions/modules/flyout.js +14 -7
  174. package/src/definitions/modules/modal.js +13 -6
  175. package/src/definitions/modules/nag.js +15 -7
  176. package/src/definitions/modules/popup.js +17 -11
  177. package/src/definitions/modules/progress.js +0 -5
  178. package/src/definitions/modules/rating.js +0 -4
  179. package/src/definitions/modules/search.js +0 -4
  180. package/src/definitions/modules/shape.js +0 -4
  181. package/src/definitions/modules/sidebar.js +14 -7
  182. package/src/definitions/modules/slider.js +0 -5
  183. package/src/definitions/modules/sticky.js +16 -15
  184. package/src/definitions/modules/tab.js +13 -5
  185. package/src/definitions/modules/toast.js +15 -7
  186. package/src/definitions/modules/transition.js +0 -4
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.3-beta.0+cdae7ad - Input
2
+ * # Fomantic-UI 2.9.3-beta.2+824a375 - Input
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.3-beta.0+cdae7ad - Item
2
+ * # Fomantic-UI 2.9.3-beta.2+824a375 - Item
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.3-beta.0+cdae7ad - Item
2
+ * # Fomantic-UI 2.9.3-beta.2+824a375 - Item
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.3-beta.0+cdae7ad - Label
2
+ * # Fomantic-UI 2.9.3-beta.2+824a375 - Label
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.3-beta.0+cdae7ad - Label
2
+ * # Fomantic-UI 2.9.3-beta.2+824a375 - Label
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.3-beta.0+cdae7ad - List
2
+ * # Fomantic-UI 2.9.3-beta.2+824a375 - List
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.3-beta.0+cdae7ad - List
2
+ * # Fomantic-UI 2.9.3-beta.2+824a375 - List
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.3-beta.0+cdae7ad - Loader
2
+ * # Fomantic-UI 2.9.3-beta.2+824a375 - Loader
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.3-beta.0+cdae7ad - Loader
2
+ * # Fomantic-UI 2.9.3-beta.2+824a375 - Loader
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.3-beta.0+cdae7ad - Menu
2
+ * # Fomantic-UI 2.9.3-beta.2+824a375 - Menu
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.3-beta.0+cdae7ad - Menu
2
+ * # Fomantic-UI 2.9.3-beta.2+824a375 - Menu
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.3-beta.0+cdae7ad - Message
2
+ * # Fomantic-UI 2.9.3-beta.2+824a375 - Message
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.3-beta.0+cdae7ad - Message
2
+ * # Fomantic-UI 2.9.3-beta.2+824a375 - Message
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.3-beta.0+cdae7ad - Modal
2
+ * # Fomantic-UI 2.9.3-beta.2+824a375 - Modal
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.3-beta.0+cdae7ad - Modal
2
+ * # Fomantic-UI 2.9.3-beta.2+824a375 - Modal
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -26,15 +26,25 @@
26
26
  $document = $(document),
27
27
  $body = $('body'),
28
28
 
29
- moduleSelector = $allModules.selector || '',
30
-
31
29
  time = Date.now(),
32
30
  performance = [],
33
31
 
34
32
  query = arguments[0],
35
33
  methodInvoked = typeof query === 'string',
36
34
  queryArguments = [].slice.call(arguments, 1),
35
+ contextCheck = function (context, win) {
36
+ var $context;
37
+ if ([window, document].indexOf(context) >= 0) {
38
+ $context = $body;
39
+ } else {
40
+ $context = $(win.document).find(context);
41
+ if ($context.length === 0) {
42
+ $context = win.frameElement ? contextCheck(context, win.parent) : $body;
43
+ }
44
+ }
37
45
 
46
+ return $context;
47
+ },
38
48
  returnedValue
39
49
  ;
40
50
 
@@ -54,7 +64,7 @@
54
64
  moduleNamespace = 'module-' + namespace,
55
65
 
56
66
  $module = $(this),
57
- $context = [window, document].indexOf(settings.context) < 0 ? $document.find(settings.context) : $body,
67
+ $context = contextCheck(settings.context, window),
58
68
  isBody = $context[0] === $body[0],
59
69
  $closeIcon = $module.find(selector.closeIcon),
60
70
  $inputs,
@@ -1271,9 +1281,6 @@
1271
1281
  totalTime += data['Execution Time'];
1272
1282
  });
1273
1283
  title += ' ' + totalTime + 'ms';
1274
- if (moduleSelector) {
1275
- title += ' \'' + moduleSelector + '\'';
1276
- }
1277
1284
  if (performance.length > 0) {
1278
1285
  console.groupCollapsed(title);
1279
1286
  if (console.table) {
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.3-beta.0+cdae7ad - Modal
2
+ * # Fomantic-UI 2.9.3-beta.2+824a375 - Modal
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*
2
- * # Fomantic UI - 2.9.3-beta.0+cdae7ad
2
+ * # Fomantic UI - 2.9.3-beta.2+824a375
3
3
  * https://github.com/fomantic/Fomantic-UI
4
4
  * https://fomantic-ui.com/
5
5
  *
@@ -8,4 +8,4 @@
8
8
  * https://opensource.org/licenses/MIT
9
9
  *
10
10
  */
11
- !function(X,R,U){"use strict";function V(e){return"function"==typeof e&&"number"!=typeof e.nodeType}R=void 0!==R&&R.Math===Math?R:globalThis,X.fn.modal=function(L){var N,e=X(this),I=X(R),j=X(U),z=X("body"),q=e.selector||"",B=Date.now(),W=[],P=L,K="string"==typeof P,Q=[].slice.call(arguments,1);return e.each(function(){var i,o,s,e,n,t,a,r,c,l,d,u=X.isPlainObject(L)?X.extend(!0,{},X.fn.modal.settings,L):X.extend({},X.fn.modal.settings),f=u.selector,m=u.className,h=u.namespace,g=u.fields,v=u.error,p="."+h,b="module-"+h,y=X(this),x=[R,U].indexOf(u.context)<0?j.find(u.context):z,k=x[0]===z[0],w=y.find(f.closeIcon),C=y.hasClass("modal"),S=this,A=C?y.data(b):void 0,M=!1,D="",T="",H=!1,F=!1,O=!1,E={initialize:function(){var s;E.create.id(),C||(E.create.modal(),V(u.onHidden)||(u.onHidden=function(){E.destroy(),y.remove()})),y.addClass(u.class),""!==u.title&&y.find(f.title).html(E.helpers.escape(u.title,u.preserveHTML)).addClass(u.classTitle),""!==u.content&&y.find(f.content).html(E.helpers.escape(u.content,u.preserveHTML)).addClass(u.classContent),E.has.configActions()&&(0===(s=y.find(f.actions).addClass(u.classActions)).length?s=X("<div/>",{class:m.actions+" "+(u.classActions||"")}).appendTo(y):s.empty(),u.actions.forEach(function(e){var t=e[g.icon]?"<i "+(e[g.text]?'aria-hidden="true"':"")+' class="'+E.helpers.deQuote(e[g.icon])+' icon"></i>':"",i=E.helpers.escape(e[g.text]||"",u.preserveHTML),n=E.helpers.deQuote(e[g.class]||""),o=e[g.click]&&V(e[g.click])?e[g.click]:function(){};s.append(X("<button/>",{html:t+i,"aria-label":(e[g.text]||e[g.icon]||"").replace(/<[^>]+(>|$)/g,""),class:m.button+" "+n,on:{click:function(){var e=X(this);e.is(f.approve)||e.is(f.deny)||!1===o.call(S,y)||E.hide()}}}))})),E.cache={},E.verbose("Initializing dimmer",x),E.create.dimmer(),u.allowMultiple&&E.create.innerDimmer(),u.centered||y.addClass("top aligned"),E.refreshModals(),E.bind.events(),E.observeChanges(),E.instantiate(),u.autoShow&&E.show()},instantiate:function(){E.verbose("Storing instance of modal"),A=E,y.data(b,A)},create:{modal:function(){var e;y=X("<div/>",{class:m.modal,role:"dialog","aria-modal":!0}),u.closeIcon&&(w=X("<i/>",{class:m.close,role:"button",tabindex:0,"aria-label":u.text.close}),y.append(w)),""!==u.title&&(e="_"+E.get.id()+"title",y.attr("aria-labelledby",e),X("<div/>",{class:m.title,id:e}).appendTo(y)),""!==u.content&&(e="_"+E.get.id()+"desc",y.attr("aria-describedby",e),X("<div/>",{class:m.content,id:e}).appendTo(y)),E.has.configActions()&&X("<div/>",{class:m.actions}).appendTo(y),x.append(y),S=y[0]},dimmer:function(){var e={debug:u.debug,dimmerName:"modals"},e=X.extend(!0,e,u.dimmerSettings);void 0===X.fn.dimmer?E.error(v.dimmer):(E.debug("Creating dimmer"),n=x.dimmer(e),H=E.is.scrolling(),u.detachable?(E.verbose("Modal is detachable, moving content into dimmer"),n.dimmer("add content",y)):E.set.undetached(),t=n.dimmer("get dimmer"))},id:function(){l=(Math.random().toString(16)+"000000000").slice(2,10),c="."+l,E.verbose("Creating unique id for element",l)},innerDimmer:function(){0===y.find(f.dimmer).length&&X("<div/>",{class:m.innerDimmer}).prependTo(y)}},destroy:function(){d&&d.disconnect(),E.verbose("Destroying previous modal"),y.removeData(b).off(p),I.off(c),t.off(c),w.off(c),i&&i.off(c),x.dimmer("destroy")},observeChanges:function(){"MutationObserver"in R&&((d=new MutationObserver(function(e){function o(e){for(var t=[],i=0,n=e.length;i<n;i++)Array.prototype.push.apply(t,o(e[i].childNodes)),t.push(e[i]);return t}var i=!1,n=!1;e.every(function(e){var t;return"attributes"===e.type?O&&("disabled"===e.attributeName||0<X(e.target).find(":input").addBack(":input").length)&&(n=!0):(i=!0,t=X(o(e.addedNodes)).filter("a[href], [tabindex], :input:enabled").filter(":visible"),e=X(o(e.removedNodes)).filter("a[href], [tabindex], :input"),(0<t.length||0<e.length)&&(n=!0)),!n}),i&&u.observeChanges&&(E.debug("DOM tree modified, refreshing"),E.refresh()),n&&E.refreshInputs()})).observe(S,{attributeFilter:["class","disabled"],attributes:!0,childList:!0,subtree:!0}),E.debug("Setting up mutation observer",d))},refresh:function(){E.remove.scrolling(),E.cacheSizes(),E.can.useFlex()||E.set.modalOffset(),E.set.screenHeight(),E.set.type()},refreshModals:function(){s=y.siblings(f.modal),o=s.add(y)},refreshInputs:function(){i&&i.off("keydown"+c),0===(i=y.find("a[href], [tabindex], :input:enabled").filter(":visible").filter(function(){return 0===X(this).closest(".disabled").length})).length?(i=y).attr("tabindex",-1):y.removeAttr("tabindex"),i.first().on("keydown"+c,E.event.inputKeyDown.first),i.last().on("keydown"+c,E.event.inputKeyDown.last),u.autofocus&&0===i.filter(":focus").length&&E.set.autofocus()},attachEvents:function(e,t){var i=X(e);t=V(E[t])?E[t]:E.toggle,0<i.length?(E.debug("Attaching modal events to element",e,t),i.off(p).on("click"+p,t)):E.error(v.notFound,e)},bind:{events:function(){E.verbose("Attaching events"),y.on("click"+p,f.close,E.event.close).on("click"+p,f.approve,E.event.approve).on("click"+p,f.deny,E.event.deny),w.on("keyup"+c,E.event.closeKeyUp),I.on("resize"+c,E.event.resize).on("focus"+c,E.event.focus)},scrollLock:function(){n[0].addEventListener("touchmove",E.event.preventScroll,{passive:!1})}},unbind:{scrollLock:function(){n[0].removeEventListener("touchmove",E.event.preventScroll,{passive:!1})}},get:{id:function(){return l},element:function(){return y},settings:function(){return u}},event:{approve:function(){M||!1===u.onApprove.call(S,X(this))?E.verbose("Approve callback returned false cancelling hide"):(M=!0,E.hide(function(){M=!1}))},preventScroll:function(e){-1!==e.target.className.indexOf("dimmer")&&e.preventDefault()},deny:function(){M||!1===u.onDeny.call(S,X(this))?E.verbose("Deny callback returned false cancelling hide"):(M=!0,E.hide(function(){M=!1}))},close:function(){E.hide()},closeKeyUp:function(e){e=e.which;e!==u.keys.enter&&e!==u.keys.space||!y.hasClass(m.front)||E.hide()},inputKeyDown:{first:function(e){e.which===u.keys.tab&&e.shiftKey&&(i.last().trigger("focus"),e.preventDefault())},last:function(e){e.which!==u.keys.tab||e.shiftKey||(i.first().trigger("focus"),e.preventDefault())}},mousedown:function(e){var t=X(e.target),i=E.is.rtl();(a=0<t.closest(f.modal).length)&&E.verbose("Mouse down event registered inside the modal"),(r=E.is.scrolling()&&(!i&&I.outerWidth()-u.scrollbarWidth<=e.clientX||i&&u.scrollbarWidth>=e.clientX))&&E.verbose("Mouse down event registered inside the scrollbar")},mouseup:function(e){if(u.closable)if(a)E.debug("Dimmer clicked but mouse down was initially registered inside the modal");else if(r)E.debug("Dimmer clicked but mouse down was initially registered inside the scrollbar");else{var t=0<X(e.target).closest(f.modal).length,e=X.contains(U.documentElement,e.target);if(!t&&e&&E.is.active()&&y.hasClass(m.front)){if(E.debug("Dimmer clicked, hiding all modals"),u.allowMultiple){if(!E.hideAll())return}else if(!E.hide())return;E.remove.clickaway()}}else E.verbose("Dimmer clicked but closable setting is disabled")},debounce:function(e,t){clearTimeout(E.timer),E.timer=setTimeout(e,t)},keyboard:function(e){e.which===u.keys.escape&&(u.closable?(E.debug("Escape key pressed hiding modal"),y.hasClass(m.front)&&E.hide()):E.debug("Escape key pressed, but closable is set to false"),e.preventDefault())},resize:function(){n.dimmer("is active")&&(E.is.animating()||E.is.active())&&requestAnimationFrame(E.refresh)},focus:function(){n.dimmer("is active")&&E.is.active()&&u.autofocus&&requestAnimationFrame(E.set.autofocus)}},toggle:function(){E.is.active()||E.is.animating()?E.hide():E.show()},show:function(e){e=V(e)?e:function(){},E.refreshModals(),E.set.dimmerSettings(),E.set.dimmerStyles(),E.showModal(e)},hide:function(e){return e=V(e)?e:function(){},E.refreshModals(),E.hideModal(e)},showModal:function(e){e=V(e)?e:function(){},E.is.animating()||!E.is.active()?!1===u.onShow.call(S)?E.verbose("Show callback returned false cancelling show"):(F=E.has.scrollbar(),E.showDimmer(),E.cacheSizes(),F&&E.set.bodyMargin(),E.can.useFlex()?E.remove.legacy():(E.set.legacy(),E.set.modalOffset(),E.debug("Using non-flex legacy modal positioning.")),E.set.screenHeight(),E.set.type(),E.set.clickaway(),!u.allowMultiple&&E.others.active()?E.hideOthers(E.showModal):(M=!1,u.allowMultiple&&(E.others.active()&&s.filter("."+m.active).find(f.dimmer).addClass("active"),u.detachable&&y.detach().appendTo(t)),u.transition&&void 0!==X.fn.transition?(E.debug("Showing modal with css animations"),E.set.observeAttributes(!1),y.transition({debug:u.debug,verbose:u.verbose,silent:u.silent,animation:(u.transition.showMethod||u.transition)+" in",queue:u.queue,duration:u.transition.showDuration||u.duration,useFailSafe:!0,onComplete:function(){u.onVisible.apply(S),u.keyboardShortcuts&&E.add.keyboardShortcuts(),E.save.focus(),E.set.active(),E.refreshInputs(),requestAnimationFrame(E.set.observeAttributes),e()}})):E.error(v.noTransition))):E.debug("Modal is already visible")},hideModal:function(e,t,i){var n=s.filter("."+m.active).last();if(e=V(e)?e:function(){},!1===u.onHide.call(S,X(this)))return E.verbose("Hide callback returned false cancelling hide"),M=!1;(E.is.animating()||E.is.active())&&(E.debug("Hiding modal"),u.transition&&void 0!==X.fn.transition?(E.remove.active(),E.set.observeAttributes(!1),y.transition({debug:u.debug,verbose:u.verbose,silent:u.silent,animation:(u.transition.hideMethod||u.transition)+" out",queue:u.queue,duration:u.transition.hideDuration||u.duration,useFailSafe:!0,onStart:function(){E.others.active()||E.others.animating()||t||E.hideDimmer(),u.keyboardShortcuts&&!E.others.active()&&E.remove.keyboardShortcuts()},onComplete:function(){E.unbind.scrollLock(),E.remove.active(),u.allowMultiple&&(n.addClass(m.front),y.removeClass(m.front),(i?o:n).find(f.dimmer).removeClass("active")),V(u.onHidden)&&u.onHidden.call(S),E.remove.dimmerStyles(),E.restore.focus(),e()}})):E.error(v.noTransition))},showDimmer:function(){n.dimmer("is animating")||!n.dimmer("is active")?(F&&(k||t.css("top",n.scrollTop()),E.save.bodyMargin()),E.debug("Showing dimmer"),n.dimmer("show")):E.debug("Dimmer already visible")},hideDimmer:function(){n.dimmer("is animating")||n.dimmer("is active")?(E.unbind.scrollLock(),n.dimmer("hide",function(){F&&E.restore.bodyMargin(),E.remove.clickaway(),E.remove.screenHeight()})):E.debug("Dimmer is not visible cannot hide")},hideAll:function(i){var n,e=o.filter("."+m.active+", ."+m.animating);if(i=V(i)?i:function(){},0<e.length)return E.debug("Hiding all visible modals"),n=!0,X(e.get().reverse()).each(function(e,t){n=n&&X(t).modal("hide modal",i,!1,!0)}),n&&E.hideDimmer(),n},hideOthers:function(e){var t=s.filter("."+m.active+", ."+m.animating);e=V(e)?e:function(){},0<t.length&&(E.debug("Hiding other modals",s),t.modal("hide modal",e,!0))},others:{active:function(){return 0<s.filter("."+m.active).length},animating:function(){return 0<s.filter("."+m.animating).length}},add:{keyboardShortcuts:function(){E.verbose("Adding keyboard shortcuts"),j.on("keydown"+p,E.event.keyboard)}},save:{focus:function(){0<X(U.activeElement).closest(y).length||(e=X(U.activeElement).trigger("blur"))},bodyMargin:function(){D=x.css((k?"margin-":"padding-")+(E.can.leftBodyScrollbar()?"left":"right"));var e=parseInt(D.replace(/[^\d.]/g,""),10),t=k?R.innerWidth-U.documentElement.clientWidth:x[0].offsetWidth-x[0].clientWidth;T=e+t}},restore:{focus:function(){e&&0<e.length&&u.restoreFocus&&e.trigger("focus")},bodyMargin:function(){var i=E.can.leftBodyScrollbar()?"left":"right";x.css((k?"margin-":"padding-")+i,D),x.find(f.bodyFixed.replace("right",i)).each(function(){var e=X(this),t="fixed"===e.css("position")?"padding-"+i:i;e.css(t,"")})}},remove:{active:function(){y.removeClass(m.active)},legacy:function(){y.removeClass(m.legacy)},clickaway:function(){u.detachable||y.off("mousedown"+c),t.off("mousedown"+c),t.off("mouseup"+c)},dimmerStyles:function(){t.removeClass(m.inverted),n.removeClass(m.blurring)},bodyStyle:function(){""===x.attr("style")&&(E.verbose("Removing style attribute"),x.removeAttr("style"))},screenHeight:function(){E.debug("Removing page height"),x.css("height",""),E.remove.bodyStyle()},keyboardShortcuts:function(){E.verbose("Removing keyboard shortcuts"),j.off("keydown"+p)},scrolling:function(){H||n.removeClass(m.scrolling),y.removeClass(m.scrolling)}},cacheSizes:function(){y.addClass(m.loading);var e=y.prop("scrollHeight"),t=y.outerWidth(),i=y.outerHeight();void 0!==E.cache.pageHeight&&0===i||(X.extend(E.cache,{pageHeight:j.outerHeight(),width:t,height:i+u.offset,scrollHeight:e+u.offset,contextHeight:(k?I:n).height()}),E.cache.topOffset=-E.cache.height/2),y.removeClass(m.loading),E.debug("Caching modal and container sizes",E.cache)},helpers:{deQuote:function(e){return String(e).replace(/"/g,"")},escape:function(e,t){if(t)return e;var i={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"};return/["&'<>`]/.test(e)?(e=e.replace(/&(?![\d#a-z]{1,12};)/gi,"&amp;")).replace(/["'<>`]/g,function(e){return i[e]}):e}},can:{leftBodyScrollbar:function(){return void 0===E.cache.leftBodyScrollbar&&(E.cache.leftBodyScrollbar=E.is.rtl()&&(E.is.iframe&&!E.is.firefox()||E.is.safari()||E.is.edge()||E.is.ie())),E.cache.leftBodyScrollbar},useFlex:function(){return"auto"===u.useFlex?u.detachable&&!E.is.ie():(u.useFlex&&E.is.ie()?E.debug("useFlex true is not supported in IE"):u.useFlex&&!u.detachable&&E.debug("useFlex true in combination with detachable false is not supported"),u.useFlex)},fit:function(){var e=E.cache.contextHeight,t=E.cache.contextHeight/2,i=E.cache.topOffset,n=E.cache.scrollHeight,o=E.cache.height,s=u.padding;return o<n?t+i+n+s<e:o+2*s<e}},has:{configActions:function(){return Array.isArray(u.actions)&&0<u.actions.length},scrollbar:function(){return k||"hidden"!==x.css("overflow-y")}},is:{active:function(){return y.hasClass(m.active)},ie:function(){var e,t;return void 0===E.cache.isIE&&(e=!R.ActiveXObject&&"ActiveXObject"in R,t="ActiveXObject"in R,E.cache.isIE=e||t),E.cache.isIE},animating:function(){return y.transition("is animating")},scrolling:function(){return n.hasClass(m.scrolling)},modernBrowser:function(){return!(R.ActiveXObject||"ActiveXObject"in R)},rtl:function(){return void 0===E.cache.isRTL&&(E.cache.isRTL="rtl"===y.attr("dir")||"rtl"===y.css("direction")||"rtl"===z.attr("dir")||"rtl"===z.css("direction")||"rtl"===x.attr("dir")||"rtl"===x.css("direction")),E.cache.isRTL},safari:function(){return void 0===E.cache.isSafari&&(E.cache.isSafari=/constructor/i.test(R.HTMLElement)||!!R.ApplePaySession),E.cache.isSafari},edge:function(){return void 0===E.cache.isEdge&&(E.cache.isEdge=!!R.setImmediate&&!E.is.ie()),E.cache.isEdge},firefox:function(){return void 0===E.cache.isFirefox&&(E.cache.isFirefox=!!R.InstallTrigger),E.cache.isFirefox},iframe:function(){return!(self===top)}},set:{observeAttributes:function(e){O=!1!==e},autofocus:function(){var e=i.filter("[autofocus]"),t=i.filter(":input"),e=(0<e.length?e:0<t.length?t:i.filter(":not(i.close)")).first();0<(e=0===e.length&&0<i.length?i.first():e).length&&e.trigger("focus")},bodyMargin:function(){var i=E.can.leftBodyScrollbar()?"left":"right";(u.detachable||E.can.fit())&&x.css((k?"margin-":"padding-")+i,T+"px"),x.find(f.bodyFixed.replace("right",i)).each(function(){var e=X(this),t="fixed"===e.css("position")?"padding-"+i:i;e.css(t,"calc("+e.css(t)+" + "+T+"px)")})},clickaway:function(){u.detachable||y.on("mousedown"+c,E.event.mousedown),t.on("mousedown"+c,E.event.mousedown),t.on("mouseup"+c,E.event.mouseup)},dimmerSettings:function(){var e;void 0===X.fn.dimmer?E.error(v.dimmer):(e={debug:u.debug,dimmerName:"modals",closable:"auto",useFlex:E.can.useFlex(),duration:{show:u.transition.showDuration||u.duration,hide:u.transition.hideDuration||u.duration}},e=X.extend(!0,e,u.dimmerSettings),u.inverted&&(e.variation=void 0!==e.variation?e.variation+" inverted":"inverted"),x.dimmer("setting",e))},dimmerStyles:function(){u.inverted?t.addClass(m.inverted):t.removeClass(m.inverted),u.blurring?n.addClass(m.blurring):n.removeClass(m.blurring)},modalOffset:function(){var e;u.detachable?y.css({marginTop:!y.hasClass("aligned")&&E.can.fit()?-E.cache.height/2:u.padding/2,marginLeft:-E.cache.width/2}):(e=E.can.fit(),y.css({top:!y.hasClass("aligned")&&e?j.scrollTop()+(E.cache.contextHeight-E.cache.height)/2:!e||y.hasClass("top")?j.scrollTop()+u.padding:j.scrollTop()+(E.cache.contextHeight-E.cache.height-u.padding),marginLeft:-E.cache.width/2})),E.verbose("Setting modal offset for legacy mode")},screenHeight:function(){E.can.fit()?x.css("height",""):y.hasClass("bottom")||(E.debug("Modal is taller than page content, resizing page height"),x.css("height",E.cache.height+2*u.padding+"px"))},active:function(){y.addClass(m.active+" "+m.front),s.filter("."+m.active).removeClass(m.front)},scrolling:function(){n.addClass(m.scrolling),y.addClass(m.scrolling),E.unbind.scrollLock()},legacy:function(){y.addClass(m.legacy)},type:function(){E.can.fit()?(E.verbose("Modal fits on screen"),E.others.active()||E.others.animating()||(E.remove.scrolling(),E.bind.scrollLock())):y.hasClass("bottom")?E.verbose("Bottom aligned modal not fitting on screen is unsupported for scrolling"):(E.verbose("Modal cannot fit on screen setting to scrolling"),E.set.scrolling())},undetached:function(){n.addClass(m.undetached)}},setting:function(e,t){if(E.debug("Changing setting",e,t),X.isPlainObject(e))X.extend(!0,u,e);else{if(void 0===t)return u[e];X.isPlainObject(u[e])?X.extend(!0,u[e],t):u[e]=t}},internal:function(e,t){if(X.isPlainObject(e))X.extend(!0,E,e);else{if(void 0===t)return E[e];E[e]=t}},debug:function(){!u.silent&&u.debug&&(u.performance?E.performance.log(arguments):(E.debug=Function.prototype.bind.call(console.info,console,u.name+":"),E.debug.apply(console,arguments)))},verbose:function(){!u.silent&&u.verbose&&u.debug&&(u.performance?E.performance.log(arguments):(E.verbose=Function.prototype.bind.call(console.info,console,u.name+":"),E.verbose.apply(console,arguments)))},error:function(){u.silent||(E.error=Function.prototype.bind.call(console.error,console,u.name+":"),E.error.apply(console,arguments))},performance:{log:function(e){var t,i;u.performance&&(i=(t=Date.now())-(B||t),B=t,W.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:S,"Execution Time":i})),clearTimeout(E.performance.timer),E.performance.timer=setTimeout(E.performance.display,500)},display:function(){var e=u.name+":",i=0;B=!1,clearTimeout(E.performance.timer),X.each(W,function(e,t){i+=t["Execution Time"]}),e+=" "+i+"ms",q&&(e+=" '"+q+"'"),0<W.length&&(console.groupCollapsed(e),console.table?console.table(W):X.each(W,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),W=[]}},invoke:function(n,e,t){var o,s,i,a=A;return e=e||Q,t=t||S,"string"==typeof n&&void 0!==a&&(n=n.split(/[ .]/),o=n.length-1,X.each(n,function(e,t){var i=e!==o?t+n[e+1].charAt(0).toUpperCase()+n[e+1].slice(1):n;if(X.isPlainObject(a[i])&&e!==o)a=a[i];else{if(void 0!==a[i])return s=a[i],!1;{if(!X.isPlainObject(a[t])||e===o)return void 0!==a[t]?s=a[t]:E.error(v.method,n),!1;a=a[t]}}})),V(s)?i=s.apply(t,e):void 0!==s&&(i=s),Array.isArray(N)?N.push(i):void 0!==N?N=[N,i]:void 0!==i&&(N=i),s}};K?(void 0===A&&(V(u.templates[P])&&(u.autoShow=!0,u.className.modal=u.className.template,u=X.extend(!0,{},u,u.templates[P].apply(E,Q)),m=u.className,u.namespace,g=u.fields,v=u.error),E.initialize()),V(u.templates[P])||E.invoke(P)):(void 0!==A&&A.invoke("destroy"),E.initialize(),N=y)}),void 0!==N?N:this},X.modal=X.fn.modal,X.fn.modal.settings={name:"Modal",namespace:"modal",useFlex:"auto",offset:0,silent:!1,debug:!1,verbose:!1,performance:!0,observeChanges:!1,allowMultiple:!1,detachable:!0,closable:!0,autofocus:!0,restoreFocus:!0,autoShow:!1,inverted:!1,blurring:!1,centered:!0,dimmerSettings:{closable:!1,useCSS:!0},keyboardShortcuts:!0,context:"body",queue:!1,duration:500,transition:"scale",padding:50,scrollbarWidth:10,title:"",content:"",class:"",classTitle:"",classContent:"",classActions:"",closeIcon:!1,actions:!1,preserveHTML:!0,fields:{class:"class",text:"text",icon:"icon",click:"click"},onShow:function(){},onVisible:function(){},onHide:function(){return!0},onHidden:!1,onApprove:function(){return!0},onDeny:function(){return!0},keys:{space:32,enter:13,escape:27,tab:9},selector:{title:"> .header",content:"> .content",actions:"> .actions",close:"> .close",closeIcon:"> .close",approve:".actions .positive, .actions .approve, .actions .ok",deny:".actions .negative, .actions .deny, .actions .cancel",modal:".ui.modal",dimmer:"> .ui.dimmer",bodyFixed:"> .ui.fixed.menu, > .ui.right.toast-container, > .ui.right.sidebar, > .ui.fixed.nag, > .ui.fixed.nag > .close",prompt:".ui.input > input"},error:{dimmer:"UI Dimmer, a required component is not included in this page",method:"The method you called is not defined.",notFound:"The element you specified could not be found"},className:{active:"active",animating:"animating",blurring:"blurring",inverted:"inverted",legacy:"legacy",loading:"loading",scrolling:"scrolling",undetached:"undetached",front:"front",close:"close icon",button:"ui button",modal:"ui modal",title:"header",content:"content",actions:"actions",template:"ui tiny modal",ok:"positive",cancel:"negative",prompt:"ui fluid input",innerDimmer:"ui inverted dimmer"},text:{ok:"Ok",cancel:"Cancel",close:"Close"}},X.fn.modal.settings.templates={getArguments:function(e){e=[].slice.call(e);return X.isPlainObject(e[0])?X.extend({handler:function(){},content:"",title:""},e[0]):(V(e[e.length-1])||e.push(function(){}),{handler:e.pop(),content:e.pop()||"",title:e.pop()||""})},alert:function(){var e=this.get.settings(),t=e.templates.getArguments(arguments),i=t.handler;return{title:t.title,content:t.content,onApprove:i,actions:[{text:e.text.ok,class:e.className.ok,click:i}]}},confirm:function(){function e(){n.handler(!0)}function t(){n.handler(!1)}var i=this.get.settings(),n=i.templates.getArguments(arguments);return{title:n.title,content:n.content,onApprove:e,onDeny:t,actions:[{text:i.text.ok,class:i.className.ok,click:e},{text:i.text.cancel,class:i.className.cancel,click:t}]}},prompt:function(){function e(){var e=i.get.settings(),e=i.get.element().find(e.selector.prompt)[0];o.handler(X(e).val())}function t(){o.handler(null)}var i=this,n=this.get.settings(),o=n.templates.getArguments(arguments);return 0===X(X.parseHTML(o.content)).filter(".ui.input").length&&(o.content+='<p><div class="'+this.helpers.deQuote(n.className.prompt)+'"><input placeholder="'+this.helpers.deQuote(o.placeholder||"")+'" type="text" value="'+this.helpers.deQuote(o.defaultValue||"")+'"></div></p>'),{title:o.title,content:o.content,onApprove:e,onDeny:t,actions:[{text:n.text.ok,class:n.className.ok,click:e},{text:n.text.cancel,class:n.className.cancel,click:t}]}}}}(jQuery,window,document);
11
+ !function(X,R,U){"use strict";function V(e){return"function"==typeof e&&"number"!=typeof e.nodeType}R=void 0!==R&&R.Math===Math?R:globalThis,X.fn.modal=function(L){var N,e=X(this),I=X(R),j=X(U),z=X("body"),q=Date.now(),B=[],W=L,P="string"==typeof W,K=[].slice.call(arguments,1),Q=function(e,t){var n;return 0<=[R,U].indexOf(e)?n=z:0===(n=X(t.document).find(e)).length&&(n=t.frameElement?Q(e,t.parent):z),n};return e.each(function(){var n,o,s,e,i,t,a,r,c,l,d,u=X.isPlainObject(L)?X.extend(!0,{},X.fn.modal.settings,L):X.extend({},X.fn.modal.settings),f=u.selector,m=u.className,h=u.namespace,g=u.fields,v=u.error,p="."+h,b="module-"+h,y=X(this),x=Q(u.context,R),k=x[0]===z[0],w=y.find(f.closeIcon),C=y.hasClass("modal"),S=this,A=C?y.data(b):void 0,M=!1,D="",T="",H=!1,F=!1,O=!1,E={initialize:function(){var s;E.create.id(),C||(E.create.modal(),V(u.onHidden)||(u.onHidden=function(){E.destroy(),y.remove()})),y.addClass(u.class),""!==u.title&&y.find(f.title).html(E.helpers.escape(u.title,u.preserveHTML)).addClass(u.classTitle),""!==u.content&&y.find(f.content).html(E.helpers.escape(u.content,u.preserveHTML)).addClass(u.classContent),E.has.configActions()&&(0===(s=y.find(f.actions).addClass(u.classActions)).length?s=X("<div/>",{class:m.actions+" "+(u.classActions||"")}).appendTo(y):s.empty(),u.actions.forEach(function(e){var t=e[g.icon]?"<i "+(e[g.text]?'aria-hidden="true"':"")+' class="'+E.helpers.deQuote(e[g.icon])+' icon"></i>':"",n=E.helpers.escape(e[g.text]||"",u.preserveHTML),i=E.helpers.deQuote(e[g.class]||""),o=e[g.click]&&V(e[g.click])?e[g.click]:function(){};s.append(X("<button/>",{html:t+n,"aria-label":(e[g.text]||e[g.icon]||"").replace(/<[^>]+(>|$)/g,""),class:m.button+" "+i,on:{click:function(){var e=X(this);e.is(f.approve)||e.is(f.deny)||!1===o.call(S,y)||E.hide()}}}))})),E.cache={},E.verbose("Initializing dimmer",x),E.create.dimmer(),u.allowMultiple&&E.create.innerDimmer(),u.centered||y.addClass("top aligned"),E.refreshModals(),E.bind.events(),E.observeChanges(),E.instantiate(),u.autoShow&&E.show()},instantiate:function(){E.verbose("Storing instance of modal"),A=E,y.data(b,A)},create:{modal:function(){var e;y=X("<div/>",{class:m.modal,role:"dialog","aria-modal":!0}),u.closeIcon&&(w=X("<i/>",{class:m.close,role:"button",tabindex:0,"aria-label":u.text.close}),y.append(w)),""!==u.title&&(e="_"+E.get.id()+"title",y.attr("aria-labelledby",e),X("<div/>",{class:m.title,id:e}).appendTo(y)),""!==u.content&&(e="_"+E.get.id()+"desc",y.attr("aria-describedby",e),X("<div/>",{class:m.content,id:e}).appendTo(y)),E.has.configActions()&&X("<div/>",{class:m.actions}).appendTo(y),x.append(y),S=y[0]},dimmer:function(){var e={debug:u.debug,dimmerName:"modals"},e=X.extend(!0,e,u.dimmerSettings);void 0===X.fn.dimmer?E.error(v.dimmer):(E.debug("Creating dimmer"),i=x.dimmer(e),H=E.is.scrolling(),u.detachable?(E.verbose("Modal is detachable, moving content into dimmer"),i.dimmer("add content",y)):E.set.undetached(),t=i.dimmer("get dimmer"))},id:function(){l=(Math.random().toString(16)+"000000000").slice(2,10),c="."+l,E.verbose("Creating unique id for element",l)},innerDimmer:function(){0===y.find(f.dimmer).length&&X("<div/>",{class:m.innerDimmer}).prependTo(y)}},destroy:function(){d&&d.disconnect(),E.verbose("Destroying previous modal"),y.removeData(b).off(p),I.off(c),t.off(c),w.off(c),n&&n.off(c),x.dimmer("destroy")},observeChanges:function(){"MutationObserver"in R&&((d=new MutationObserver(function(e){function o(e){for(var t=[],n=0,i=e.length;n<i;n++)Array.prototype.push.apply(t,o(e[n].childNodes)),t.push(e[n]);return t}var n=!1,i=!1;e.every(function(e){var t;return"attributes"===e.type?O&&("disabled"===e.attributeName||0<X(e.target).find(":input").addBack(":input").length)&&(i=!0):(n=!0,t=X(o(e.addedNodes)).filter("a[href], [tabindex], :input:enabled").filter(":visible"),e=X(o(e.removedNodes)).filter("a[href], [tabindex], :input"),(0<t.length||0<e.length)&&(i=!0)),!i}),n&&u.observeChanges&&(E.debug("DOM tree modified, refreshing"),E.refresh()),i&&E.refreshInputs()})).observe(S,{attributeFilter:["class","disabled"],attributes:!0,childList:!0,subtree:!0}),E.debug("Setting up mutation observer",d))},refresh:function(){E.remove.scrolling(),E.cacheSizes(),E.can.useFlex()||E.set.modalOffset(),E.set.screenHeight(),E.set.type()},refreshModals:function(){s=y.siblings(f.modal),o=s.add(y)},refreshInputs:function(){n&&n.off("keydown"+c),0===(n=y.find("a[href], [tabindex], :input:enabled").filter(":visible").filter(function(){return 0===X(this).closest(".disabled").length})).length?(n=y).attr("tabindex",-1):y.removeAttr("tabindex"),n.first().on("keydown"+c,E.event.inputKeyDown.first),n.last().on("keydown"+c,E.event.inputKeyDown.last),u.autofocus&&0===n.filter(":focus").length&&E.set.autofocus()},attachEvents:function(e,t){var n=X(e);t=V(E[t])?E[t]:E.toggle,0<n.length?(E.debug("Attaching modal events to element",e,t),n.off(p).on("click"+p,t)):E.error(v.notFound,e)},bind:{events:function(){E.verbose("Attaching events"),y.on("click"+p,f.close,E.event.close).on("click"+p,f.approve,E.event.approve).on("click"+p,f.deny,E.event.deny),w.on("keyup"+c,E.event.closeKeyUp),I.on("resize"+c,E.event.resize).on("focus"+c,E.event.focus)},scrollLock:function(){i[0].addEventListener("touchmove",E.event.preventScroll,{passive:!1})}},unbind:{scrollLock:function(){i[0].removeEventListener("touchmove",E.event.preventScroll,{passive:!1})}},get:{id:function(){return l},element:function(){return y},settings:function(){return u}},event:{approve:function(){M||!1===u.onApprove.call(S,X(this))?E.verbose("Approve callback returned false cancelling hide"):(M=!0,E.hide(function(){M=!1}))},preventScroll:function(e){-1!==e.target.className.indexOf("dimmer")&&e.preventDefault()},deny:function(){M||!1===u.onDeny.call(S,X(this))?E.verbose("Deny callback returned false cancelling hide"):(M=!0,E.hide(function(){M=!1}))},close:function(){E.hide()},closeKeyUp:function(e){e=e.which;e!==u.keys.enter&&e!==u.keys.space||!y.hasClass(m.front)||E.hide()},inputKeyDown:{first:function(e){e.which===u.keys.tab&&e.shiftKey&&(n.last().trigger("focus"),e.preventDefault())},last:function(e){e.which!==u.keys.tab||e.shiftKey||(n.first().trigger("focus"),e.preventDefault())}},mousedown:function(e){var t=X(e.target),n=E.is.rtl();(a=0<t.closest(f.modal).length)&&E.verbose("Mouse down event registered inside the modal"),(r=E.is.scrolling()&&(!n&&I.outerWidth()-u.scrollbarWidth<=e.clientX||n&&u.scrollbarWidth>=e.clientX))&&E.verbose("Mouse down event registered inside the scrollbar")},mouseup:function(e){if(u.closable)if(a)E.debug("Dimmer clicked but mouse down was initially registered inside the modal");else if(r)E.debug("Dimmer clicked but mouse down was initially registered inside the scrollbar");else{var t=0<X(e.target).closest(f.modal).length,e=X.contains(U.documentElement,e.target);if(!t&&e&&E.is.active()&&y.hasClass(m.front)){if(E.debug("Dimmer clicked, hiding all modals"),u.allowMultiple){if(!E.hideAll())return}else if(!E.hide())return;E.remove.clickaway()}}else E.verbose("Dimmer clicked but closable setting is disabled")},debounce:function(e,t){clearTimeout(E.timer),E.timer=setTimeout(e,t)},keyboard:function(e){e.which===u.keys.escape&&(u.closable?(E.debug("Escape key pressed hiding modal"),y.hasClass(m.front)&&E.hide()):E.debug("Escape key pressed, but closable is set to false"),e.preventDefault())},resize:function(){i.dimmer("is active")&&(E.is.animating()||E.is.active())&&requestAnimationFrame(E.refresh)},focus:function(){i.dimmer("is active")&&E.is.active()&&u.autofocus&&requestAnimationFrame(E.set.autofocus)}},toggle:function(){E.is.active()||E.is.animating()?E.hide():E.show()},show:function(e){e=V(e)?e:function(){},E.refreshModals(),E.set.dimmerSettings(),E.set.dimmerStyles(),E.showModal(e)},hide:function(e){return e=V(e)?e:function(){},E.refreshModals(),E.hideModal(e)},showModal:function(e){e=V(e)?e:function(){},E.is.animating()||!E.is.active()?!1===u.onShow.call(S)?E.verbose("Show callback returned false cancelling show"):(F=E.has.scrollbar(),E.showDimmer(),E.cacheSizes(),F&&E.set.bodyMargin(),E.can.useFlex()?E.remove.legacy():(E.set.legacy(),E.set.modalOffset(),E.debug("Using non-flex legacy modal positioning.")),E.set.screenHeight(),E.set.type(),E.set.clickaway(),!u.allowMultiple&&E.others.active()?E.hideOthers(E.showModal):(M=!1,u.allowMultiple&&(E.others.active()&&s.filter("."+m.active).find(f.dimmer).addClass("active"),u.detachable&&y.detach().appendTo(t)),u.transition&&void 0!==X.fn.transition?(E.debug("Showing modal with css animations"),E.set.observeAttributes(!1),y.transition({debug:u.debug,verbose:u.verbose,silent:u.silent,animation:(u.transition.showMethod||u.transition)+" in",queue:u.queue,duration:u.transition.showDuration||u.duration,useFailSafe:!0,onComplete:function(){u.onVisible.apply(S),u.keyboardShortcuts&&E.add.keyboardShortcuts(),E.save.focus(),E.set.active(),E.refreshInputs(),requestAnimationFrame(E.set.observeAttributes),e()}})):E.error(v.noTransition))):E.debug("Modal is already visible")},hideModal:function(e,t,n){var i=s.filter("."+m.active).last();if(e=V(e)?e:function(){},!1===u.onHide.call(S,X(this)))return E.verbose("Hide callback returned false cancelling hide"),M=!1;(E.is.animating()||E.is.active())&&(E.debug("Hiding modal"),u.transition&&void 0!==X.fn.transition?(E.remove.active(),E.set.observeAttributes(!1),y.transition({debug:u.debug,verbose:u.verbose,silent:u.silent,animation:(u.transition.hideMethod||u.transition)+" out",queue:u.queue,duration:u.transition.hideDuration||u.duration,useFailSafe:!0,onStart:function(){E.others.active()||E.others.animating()||t||E.hideDimmer(),u.keyboardShortcuts&&!E.others.active()&&E.remove.keyboardShortcuts()},onComplete:function(){E.unbind.scrollLock(),E.remove.active(),u.allowMultiple&&(i.addClass(m.front),y.removeClass(m.front),(n?o:i).find(f.dimmer).removeClass("active")),V(u.onHidden)&&u.onHidden.call(S),E.remove.dimmerStyles(),E.restore.focus(),e()}})):E.error(v.noTransition))},showDimmer:function(){i.dimmer("is animating")||!i.dimmer("is active")?(F&&(k||t.css("top",i.scrollTop()),E.save.bodyMargin()),E.debug("Showing dimmer"),i.dimmer("show")):E.debug("Dimmer already visible")},hideDimmer:function(){i.dimmer("is animating")||i.dimmer("is active")?(E.unbind.scrollLock(),i.dimmer("hide",function(){F&&E.restore.bodyMargin(),E.remove.clickaway(),E.remove.screenHeight()})):E.debug("Dimmer is not visible cannot hide")},hideAll:function(n){var i,e=o.filter("."+m.active+", ."+m.animating);if(n=V(n)?n:function(){},0<e.length)return E.debug("Hiding all visible modals"),i=!0,X(e.get().reverse()).each(function(e,t){i=i&&X(t).modal("hide modal",n,!1,!0)}),i&&E.hideDimmer(),i},hideOthers:function(e){var t=s.filter("."+m.active+", ."+m.animating);e=V(e)?e:function(){},0<t.length&&(E.debug("Hiding other modals",s),t.modal("hide modal",e,!0))},others:{active:function(){return 0<s.filter("."+m.active).length},animating:function(){return 0<s.filter("."+m.animating).length}},add:{keyboardShortcuts:function(){E.verbose("Adding keyboard shortcuts"),j.on("keydown"+p,E.event.keyboard)}},save:{focus:function(){0<X(U.activeElement).closest(y).length||(e=X(U.activeElement).trigger("blur"))},bodyMargin:function(){D=x.css((k?"margin-":"padding-")+(E.can.leftBodyScrollbar()?"left":"right"));var e=parseInt(D.replace(/[^\d.]/g,""),10),t=k?R.innerWidth-U.documentElement.clientWidth:x[0].offsetWidth-x[0].clientWidth;T=e+t}},restore:{focus:function(){e&&0<e.length&&u.restoreFocus&&e.trigger("focus")},bodyMargin:function(){var n=E.can.leftBodyScrollbar()?"left":"right";x.css((k?"margin-":"padding-")+n,D),x.find(f.bodyFixed.replace("right",n)).each(function(){var e=X(this),t="fixed"===e.css("position")?"padding-"+n:n;e.css(t,"")})}},remove:{active:function(){y.removeClass(m.active)},legacy:function(){y.removeClass(m.legacy)},clickaway:function(){u.detachable||y.off("mousedown"+c),t.off("mousedown"+c),t.off("mouseup"+c)},dimmerStyles:function(){t.removeClass(m.inverted),i.removeClass(m.blurring)},bodyStyle:function(){""===x.attr("style")&&(E.verbose("Removing style attribute"),x.removeAttr("style"))},screenHeight:function(){E.debug("Removing page height"),x.css("height",""),E.remove.bodyStyle()},keyboardShortcuts:function(){E.verbose("Removing keyboard shortcuts"),j.off("keydown"+p)},scrolling:function(){H||i.removeClass(m.scrolling),y.removeClass(m.scrolling)}},cacheSizes:function(){y.addClass(m.loading);var e=y.prop("scrollHeight"),t=y.outerWidth(),n=y.outerHeight();void 0!==E.cache.pageHeight&&0===n||(X.extend(E.cache,{pageHeight:j.outerHeight(),width:t,height:n+u.offset,scrollHeight:e+u.offset,contextHeight:(k?I:i).height()}),E.cache.topOffset=-E.cache.height/2),y.removeClass(m.loading),E.debug("Caching modal and container sizes",E.cache)},helpers:{deQuote:function(e){return String(e).replace(/"/g,"")},escape:function(e,t){if(t)return e;var n={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"};return/["&'<>`]/.test(e)?(e=e.replace(/&(?![\d#a-z]{1,12};)/gi,"&amp;")).replace(/["'<>`]/g,function(e){return n[e]}):e}},can:{leftBodyScrollbar:function(){return void 0===E.cache.leftBodyScrollbar&&(E.cache.leftBodyScrollbar=E.is.rtl()&&(E.is.iframe&&!E.is.firefox()||E.is.safari()||E.is.edge()||E.is.ie())),E.cache.leftBodyScrollbar},useFlex:function(){return"auto"===u.useFlex?u.detachable&&!E.is.ie():(u.useFlex&&E.is.ie()?E.debug("useFlex true is not supported in IE"):u.useFlex&&!u.detachable&&E.debug("useFlex true in combination with detachable false is not supported"),u.useFlex)},fit:function(){var e=E.cache.contextHeight,t=E.cache.contextHeight/2,n=E.cache.topOffset,i=E.cache.scrollHeight,o=E.cache.height,s=u.padding;return o<i?t+n+i+s<e:o+2*s<e}},has:{configActions:function(){return Array.isArray(u.actions)&&0<u.actions.length},scrollbar:function(){return k||"hidden"!==x.css("overflow-y")}},is:{active:function(){return y.hasClass(m.active)},ie:function(){var e,t;return void 0===E.cache.isIE&&(e=!R.ActiveXObject&&"ActiveXObject"in R,t="ActiveXObject"in R,E.cache.isIE=e||t),E.cache.isIE},animating:function(){return y.transition("is animating")},scrolling:function(){return i.hasClass(m.scrolling)},modernBrowser:function(){return!(R.ActiveXObject||"ActiveXObject"in R)},rtl:function(){return void 0===E.cache.isRTL&&(E.cache.isRTL="rtl"===y.attr("dir")||"rtl"===y.css("direction")||"rtl"===z.attr("dir")||"rtl"===z.css("direction")||"rtl"===x.attr("dir")||"rtl"===x.css("direction")),E.cache.isRTL},safari:function(){return void 0===E.cache.isSafari&&(E.cache.isSafari=/constructor/i.test(R.HTMLElement)||!!R.ApplePaySession),E.cache.isSafari},edge:function(){return void 0===E.cache.isEdge&&(E.cache.isEdge=!!R.setImmediate&&!E.is.ie()),E.cache.isEdge},firefox:function(){return void 0===E.cache.isFirefox&&(E.cache.isFirefox=!!R.InstallTrigger),E.cache.isFirefox},iframe:function(){return!(self===top)}},set:{observeAttributes:function(e){O=!1!==e},autofocus:function(){var e=n.filter("[autofocus]"),t=n.filter(":input"),e=(0<e.length?e:0<t.length?t:n.filter(":not(i.close)")).first();0<(e=0===e.length&&0<n.length?n.first():e).length&&e.trigger("focus")},bodyMargin:function(){var n=E.can.leftBodyScrollbar()?"left":"right";(u.detachable||E.can.fit())&&x.css((k?"margin-":"padding-")+n,T+"px"),x.find(f.bodyFixed.replace("right",n)).each(function(){var e=X(this),t="fixed"===e.css("position")?"padding-"+n:n;e.css(t,"calc("+e.css(t)+" + "+T+"px)")})},clickaway:function(){u.detachable||y.on("mousedown"+c,E.event.mousedown),t.on("mousedown"+c,E.event.mousedown),t.on("mouseup"+c,E.event.mouseup)},dimmerSettings:function(){var e;void 0===X.fn.dimmer?E.error(v.dimmer):(e={debug:u.debug,dimmerName:"modals",closable:"auto",useFlex:E.can.useFlex(),duration:{show:u.transition.showDuration||u.duration,hide:u.transition.hideDuration||u.duration}},e=X.extend(!0,e,u.dimmerSettings),u.inverted&&(e.variation=void 0!==e.variation?e.variation+" inverted":"inverted"),x.dimmer("setting",e))},dimmerStyles:function(){u.inverted?t.addClass(m.inverted):t.removeClass(m.inverted),u.blurring?i.addClass(m.blurring):i.removeClass(m.blurring)},modalOffset:function(){var e;u.detachable?y.css({marginTop:!y.hasClass("aligned")&&E.can.fit()?-E.cache.height/2:u.padding/2,marginLeft:-E.cache.width/2}):(e=E.can.fit(),y.css({top:!y.hasClass("aligned")&&e?j.scrollTop()+(E.cache.contextHeight-E.cache.height)/2:!e||y.hasClass("top")?j.scrollTop()+u.padding:j.scrollTop()+(E.cache.contextHeight-E.cache.height-u.padding),marginLeft:-E.cache.width/2})),E.verbose("Setting modal offset for legacy mode")},screenHeight:function(){E.can.fit()?x.css("height",""):y.hasClass("bottom")||(E.debug("Modal is taller than page content, resizing page height"),x.css("height",E.cache.height+2*u.padding+"px"))},active:function(){y.addClass(m.active+" "+m.front),s.filter("."+m.active).removeClass(m.front)},scrolling:function(){i.addClass(m.scrolling),y.addClass(m.scrolling),E.unbind.scrollLock()},legacy:function(){y.addClass(m.legacy)},type:function(){E.can.fit()?(E.verbose("Modal fits on screen"),E.others.active()||E.others.animating()||(E.remove.scrolling(),E.bind.scrollLock())):y.hasClass("bottom")?E.verbose("Bottom aligned modal not fitting on screen is unsupported for scrolling"):(E.verbose("Modal cannot fit on screen setting to scrolling"),E.set.scrolling())},undetached:function(){i.addClass(m.undetached)}},setting:function(e,t){if(E.debug("Changing setting",e,t),X.isPlainObject(e))X.extend(!0,u,e);else{if(void 0===t)return u[e];X.isPlainObject(u[e])?X.extend(!0,u[e],t):u[e]=t}},internal:function(e,t){if(X.isPlainObject(e))X.extend(!0,E,e);else{if(void 0===t)return E[e];E[e]=t}},debug:function(){!u.silent&&u.debug&&(u.performance?E.performance.log(arguments):(E.debug=Function.prototype.bind.call(console.info,console,u.name+":"),E.debug.apply(console,arguments)))},verbose:function(){!u.silent&&u.verbose&&u.debug&&(u.performance?E.performance.log(arguments):(E.verbose=Function.prototype.bind.call(console.info,console,u.name+":"),E.verbose.apply(console,arguments)))},error:function(){u.silent||(E.error=Function.prototype.bind.call(console.error,console,u.name+":"),E.error.apply(console,arguments))},performance:{log:function(e){var t,n;u.performance&&(n=(t=Date.now())-(q||t),q=t,B.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:S,"Execution Time":n})),clearTimeout(E.performance.timer),E.performance.timer=setTimeout(E.performance.display,500)},display:function(){var e=u.name+":",n=0;q=!1,clearTimeout(E.performance.timer),X.each(B,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",0<B.length&&(console.groupCollapsed(e),console.table?console.table(B):X.each(B,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),B=[]}},invoke:function(i,e,t){var o,s,n,a=A;return e=e||K,t=t||S,"string"==typeof i&&void 0!==a&&(i=i.split(/[ .]/),o=i.length-1,X.each(i,function(e,t){var n=e!==o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(X.isPlainObject(a[n])&&e!==o)a=a[n];else{if(void 0!==a[n])return s=a[n],!1;{if(!X.isPlainObject(a[t])||e===o)return void 0!==a[t]?s=a[t]:E.error(v.method,i),!1;a=a[t]}}})),V(s)?n=s.apply(t,e):void 0!==s&&(n=s),Array.isArray(N)?N.push(n):void 0!==N?N=[N,n]:void 0!==n&&(N=n),s}};P?(void 0===A&&(V(u.templates[W])&&(u.autoShow=!0,u.className.modal=u.className.template,u=X.extend(!0,{},u,u.templates[W].apply(E,K)),m=u.className,u.namespace,g=u.fields,v=u.error),E.initialize()),V(u.templates[W])||E.invoke(W)):(void 0!==A&&A.invoke("destroy"),E.initialize(),N=y)}),void 0!==N?N:this},X.modal=X.fn.modal,X.fn.modal.settings={name:"Modal",namespace:"modal",useFlex:"auto",offset:0,silent:!1,debug:!1,verbose:!1,performance:!0,observeChanges:!1,allowMultiple:!1,detachable:!0,closable:!0,autofocus:!0,restoreFocus:!0,autoShow:!1,inverted:!1,blurring:!1,centered:!0,dimmerSettings:{closable:!1,useCSS:!0},keyboardShortcuts:!0,context:"body",queue:!1,duration:500,transition:"scale",padding:50,scrollbarWidth:10,title:"",content:"",class:"",classTitle:"",classContent:"",classActions:"",closeIcon:!1,actions:!1,preserveHTML:!0,fields:{class:"class",text:"text",icon:"icon",click:"click"},onShow:function(){},onVisible:function(){},onHide:function(){return!0},onHidden:!1,onApprove:function(){return!0},onDeny:function(){return!0},keys:{space:32,enter:13,escape:27,tab:9},selector:{title:"> .header",content:"> .content",actions:"> .actions",close:"> .close",closeIcon:"> .close",approve:".actions .positive, .actions .approve, .actions .ok",deny:".actions .negative, .actions .deny, .actions .cancel",modal:".ui.modal",dimmer:"> .ui.dimmer",bodyFixed:"> .ui.fixed.menu, > .ui.right.toast-container, > .ui.right.sidebar, > .ui.fixed.nag, > .ui.fixed.nag > .close",prompt:".ui.input > input"},error:{dimmer:"UI Dimmer, a required component is not included in this page",method:"The method you called is not defined.",notFound:"The element you specified could not be found"},className:{active:"active",animating:"animating",blurring:"blurring",inverted:"inverted",legacy:"legacy",loading:"loading",scrolling:"scrolling",undetached:"undetached",front:"front",close:"close icon",button:"ui button",modal:"ui modal",title:"header",content:"content",actions:"actions",template:"ui tiny modal",ok:"positive",cancel:"negative",prompt:"ui fluid input",innerDimmer:"ui inverted dimmer"},text:{ok:"Ok",cancel:"Cancel",close:"Close"}},X.fn.modal.settings.templates={getArguments:function(e){e=[].slice.call(e);return X.isPlainObject(e[0])?X.extend({handler:function(){},content:"",title:""},e[0]):(V(e[e.length-1])||e.push(function(){}),{handler:e.pop(),content:e.pop()||"",title:e.pop()||""})},alert:function(){var e=this.get.settings(),t=e.templates.getArguments(arguments),n=t.handler;return{title:t.title,content:t.content,onApprove:n,actions:[{text:e.text.ok,class:e.className.ok,click:n}]}},confirm:function(){function e(){i.handler(!0)}function t(){i.handler(!1)}var n=this.get.settings(),i=n.templates.getArguments(arguments);return{title:i.title,content:i.content,onApprove:e,onDeny:t,actions:[{text:n.text.ok,class:n.className.ok,click:e},{text:n.text.cancel,class:n.className.cancel,click:t}]}},prompt:function(){function e(){var e=n.get.settings(),e=n.get.element().find(e.selector.prompt)[0];o.handler(X(e).val())}function t(){o.handler(null)}var n=this,i=this.get.settings(),o=i.templates.getArguments(arguments);return 0===X(X.parseHTML(o.content)).filter(".ui.input").length&&(o.content+='<p><div class="'+this.helpers.deQuote(i.className.prompt)+'"><input placeholder="'+this.helpers.deQuote(o.placeholder||"")+'" type="text" value="'+this.helpers.deQuote(o.defaultValue||"")+'"></div></p>'),{title:o.title,content:o.content,onApprove:e,onDeny:t,actions:[{text:i.text.ok,class:i.className.ok,click:e},{text:i.text.cancel,class:i.className.cancel,click:t}]}}}}(jQuery,window,document);
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.3-beta.0+cdae7ad - Nag
2
+ * # Fomantic-UI 2.9.3-beta.2+824a375 - Nag
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.3-beta.0+cdae7ad - Nag
2
+ * # Fomantic-UI 2.9.3-beta.2+824a375 - Nag
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -22,7 +22,7 @@
22
22
  $.fn.nag = function (parameters) {
23
23
  var
24
24
  $allModules = $(this),
25
- moduleSelector = $allModules.selector || '',
25
+ $body = $('body'),
26
26
 
27
27
  time = Date.now(),
28
28
  performance = [],
@@ -30,6 +30,19 @@
30
30
  query = arguments[0],
31
31
  methodInvoked = typeof query === 'string',
32
32
  queryArguments = [].slice.call(arguments, 1),
33
+ contextCheck = function (context, win) {
34
+ var $context;
35
+ if ([window, document].indexOf(context) >= 0) {
36
+ $context = $(context);
37
+ } else {
38
+ $context = $(win.document).find(context);
39
+ if ($context.length === 0) {
40
+ $context = win.frameElement ? contextCheck(context, win.parent) : $body;
41
+ }
42
+ }
43
+
44
+ return $context;
45
+ },
33
46
  returnedValue
34
47
  ;
35
48
  $allModules.each(function () {
@@ -47,9 +60,7 @@
47
60
 
48
61
  $module = $(this),
49
62
 
50
- $context = settings.context
51
- ? ([window, document].indexOf(settings.context) < 0 ? $(document).find(settings.context) : $(settings.context))
52
- : $('body'),
63
+ $context = settings.context ? contextCheck(settings.context, window) : $body,
53
64
 
54
65
  element = this,
55
66
  instance = $module.data(moduleNamespace),
@@ -379,9 +390,6 @@
379
390
  totalTime += data['Execution Time'];
380
391
  });
381
392
  title += ' ' + totalTime + 'ms';
382
- if (moduleSelector) {
383
- title += ' \'' + moduleSelector + '\'';
384
- }
385
393
  if (performance.length > 0) {
386
394
  console.groupCollapsed(title);
387
395
  if (console.table) {
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.3-beta.0+cdae7ad - Nag
2
+ * # Fomantic-UI 2.9.3-beta.2+824a375 - Nag
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*
2
- * # Fomantic UI - 2.9.3-beta.0+cdae7ad
2
+ * # Fomantic UI - 2.9.3-beta.2+824a375
3
3
  * https://github.com/fomantic/Fomantic-UI
4
4
  * https://fomantic-ui.com/
5
5
  *
@@ -8,4 +8,4 @@
8
8
  * https://opensource.org/licenses/MIT
9
9
  *
10
10
  */
11
- !function(x,w,S){"use strict";w=void 0!==w&&w.Math===Math?w:globalThis,x.fn.nag=function(g){var p,e=x(this),m=e.selector||"",f=Date.now(),h=[],v=g,b="string"==typeof v,y=[].slice.call(arguments,1);return e.each(function(){var t,i=x.isPlainObject(g)?x.extend(!0,{},x.fn.nag.settings,g):x.extend({},x.fn.nag.settings),e=i.selector,c=i.error,o=i.namespace,n="."+o,a=o+"-module",r=x(this),s=i.context?[w,S].indexOf(i.context)<0?x(S).find(i.context):x(i.context):x("body"),l=this,d=r.data(a),u={initialize:function(){u.verbose("Initializing element"),"string"!=typeof i.value&&(i.value=JSON.stringify(i.value)),t=u.get.storage(),r.on("click"+n,e.close,u.dismiss).data(a,u),i.detachable&&r.parent()[0]!==s[0]&&r.detach().prependTo(s),0<i.displayTime&&setTimeout(u.hide,i.displayTime),u.show()},destroy:function(){u.verbose("Destroying instance"),r.removeData(a).off(n)},show:function(){if(u.should.show()&&!r.is(":visible")){if(!1===i.onShow.call(l))return u.debug("onShow callback returned false, cancelling nag animation"),!1;u.debug("Showing nag",i.animation.show),"fade"===i.animation.show?r.fadeIn(i.duration,i.easing,i.onVisible):r.slideDown(i.duration,i.easing,i.onVisible)}},hide:function(){if(!1===i.onHide.call(l))return u.debug("onHide callback returned false, cancelling nag animation"),!1;u.debug("Hiding nag",i.animation.hide),"fade"===i.animation.hide?r.fadeOut(i.duration,i.easing,i.onHidden):r.slideUp(i.duration,i.easing,i.onHidden)},dismiss:function(e){!1!==u.hide()&&i.storageMethod&&(u.debug("Dismissing nag",i.storageMethod,i.key,i.value,i.expires),u.storage.set(i.key,i.value)),e.stopImmediatePropagation(),e.preventDefault()},should:{show:function(){return i.persist?(u.debug("Persistent nag is set, can show nag"),!0):u.storage.get(i.key)!=i.value.toString()?(u.debug("Stored value is not set, can show nag",u.storage.get(i.key)),!0):(u.debug("Stored value is set, cannot show nag",u.storage.get(i.key)),!1)}},get:{expirationDate:function(e){if((e="number"==typeof e?new Date(Date.now()+864e5*e):e)instanceof Date&&e.getTime())return e.toUTCString();u.error(c.expiresFormat)},storage:function(){return"localstorage"===i.storageMethod&&void 0!==w.localStorage?(u.debug("Using local storage"),w.localStorage):"sessionstorage"===i.storageMethod&&void 0!==w.sessionStorage?(u.debug("Using session storage"),w.sessionStorage):"cookie"in S?(u.debug("Using cookie"),{setItem:function(e,o,n){e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),o=encodeURIComponent(o).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[B-D])/g,decodeURIComponent);var t,i="";for(t in n)Object.prototype.hasOwnProperty.call(n,t)&&(i+="; "+t,"string"==typeof n[t]&&(i+="="+n[t].split(";")[0]));S.cookie=e+"="+o+i},getItem:function(e){for(var o=S.cookie.split("; "),n=0,t=o.length;n<t;n++){var i=o[n].split("=");if(e===i[0].replace(/(%[\da-f]{2})+/gi,decodeURIComponent))return i[1]||""}},removeItem:function(e,o){t.setItem(e,"",o)}}):void u.error(c.noStorage)},storageOptions:function(){var e={};return i.expires&&(e.expires=u.get.expirationDate(i.expires)),i.domain&&(e.domain=i.domain),i.path&&(e.path=i.path),i.secure&&(e.secure=i.secure),i.samesite&&(e.samesite=i.samesite),e}},clear:function(){u.storage.remove(i.key)},storage:{set:function(e,o){var n=u.get.storageOptions();t===w.localStorage&&n.expires&&(u.debug("Storing expiration value in localStorage",e,n.expires),t.setItem(e+i.expirationKey,n.expires)),u.debug("Value stored",e,o);try{t.setItem(e,o,n)}catch(e){u.error(c.setItem,e)}},get:function(e){var o,n=t.getItem(e);return t===w.localStorage&&null!=(o=t.getItem(e+i.expirationKey))&&new Date(o)<new Date&&(u.debug("Value in localStorage has expired. Deleting key",e),u.storage.remove(e),n=null),n="undefined"!==n&&"null"!==n&&null!=n?n:void 0},remove:function(e){var o=u.get.storageOptions();o.expires=u.get.expirationDate(-1),t===w.localStorage&&t.removeItem(e+i.expirationKey),t.removeItem(e,o)}},setting:function(e,o){if(u.debug("Changing setting",e,o),x.isPlainObject(e))x.extend(!0,i,e);else{if(void 0===o)return i[e];x.isPlainObject(i[e])?x.extend(!0,i[e],o):i[e]=o}},internal:function(e,o){if(x.isPlainObject(e))x.extend(!0,u,e);else{if(void 0===o)return u[e];u[e]=o}},debug:function(){!i.silent&&i.debug&&(i.performance?u.performance.log(arguments):(u.debug=Function.prototype.bind.call(console.info,console,i.name+":"),u.debug.apply(console,arguments)))},verbose:function(){!i.silent&&i.verbose&&i.debug&&(i.performance?u.performance.log(arguments):(u.verbose=Function.prototype.bind.call(console.info,console,i.name+":"),u.verbose.apply(console,arguments)))},error:function(){i.silent||(u.error=Function.prototype.bind.call(console.error,console,i.name+":"),u.error.apply(console,arguments))},performance:{log:function(e){var o,n;i.performance&&(n=(o=Date.now())-(f||o),f=o,h.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:l,"Execution Time":n})),clearTimeout(u.performance.timer),u.performance.timer=setTimeout(u.performance.display,500)},display:function(){var e=i.name+":",n=0;f=!1,clearTimeout(u.performance.timer),x.each(h,function(e,o){n+=o["Execution Time"]}),e+=" "+n+"ms",m&&(e+=" '"+m+"'"),0<h.length&&(console.groupCollapsed(e),console.table?console.table(h):x.each(h,function(e,o){console.log(o.Name+": "+o["Execution Time"]+"ms")}),console.groupEnd()),h=[]}},invoke:function(t,e,o){var i,a,n,r,s=d;return e=e||y,o=o||l,"string"==typeof t&&void 0!==s&&(t=t.split(/[ .]/),i=t.length-1,x.each(t,function(e,o){var n=e!==i?o+t[e+1].charAt(0).toUpperCase()+t[e+1].slice(1):t;if(x.isPlainObject(s[n])&&e!==i)s=s[n];else{if(void 0!==s[n])return a=s[n],!1;{if(!x.isPlainObject(s[o])||e===i)return void 0!==s[o]?a=s[o]:u.error(c.method,t),!1;s=s[o]}}})),"function"==typeof(r=a)&&"number"!=typeof r.nodeType?n=a.apply(o,e):void 0!==a&&(n=a),Array.isArray(p)?p.push(n):void 0!==p?p=[p,n]:void 0!==n&&(p=n),a}};b?(void 0===d&&u.initialize(),u.invoke(v)):(void 0!==d&&d.invoke("destroy"),u.initialize())}),void 0!==p?p:this},x.fn.nag.settings={name:"Nag",silent:!1,debug:!1,verbose:!1,performance:!0,namespace:"Nag",persist:!1,displayTime:0,animation:{show:"slide",hide:"slide"},context:!1,detachable:!1,expires:30,domain:!1,path:"/",secure:!1,samesite:!1,storageMethod:"cookie",key:"nag",value:"dismiss",expirationKey:"ExpirationDate",error:{noStorage:"Unsupported storage method",method:"The method you called is not defined.",setItem:"Unexpected error while setting value",expiresFormat:'"expires" must be a number of days or a Date Object'},className:{bottom:"bottom",fixed:"fixed"},selector:{close:"> .close.icon"},duration:500,easing:"easeOutQuad",onShow:function(){},onVisible:function(){},onHide:function(){},onHidden:function(){}},x.extend(x.easing,{easeOutQuad:function(e){return 1-(1-e)*(1-e)}})}(jQuery,window,document);
11
+ !function(w,S,D){"use strict";S=void 0!==S&&S.Math===Math?S:globalThis,w.fn.nag=function(g){var p,e=w(this),m=w("body"),f=Date.now(),h=[],v=g,b="string"==typeof v,y=[].slice.call(arguments,1),x=function(e,n){var o;return 0<=[S,D].indexOf(e)?o=w(e):0===(o=w(n.document).find(e)).length&&(o=n.frameElement?x(e,n.parent):m),o};return e.each(function(){var t,i=w.isPlainObject(g)?w.extend(!0,{},w.fn.nag.settings,g):w.extend({},w.fn.nag.settings),e=i.selector,l=i.error,n=i.namespace,o="."+n,a=n+"-module",r=w(this),s=i.context?x(i.context,S):m,c=this,d=r.data(a),u={initialize:function(){u.verbose("Initializing element"),"string"!=typeof i.value&&(i.value=JSON.stringify(i.value)),t=u.get.storage(),r.on("click"+o,e.close,u.dismiss).data(a,u),i.detachable&&r.parent()[0]!==s[0]&&r.detach().prependTo(s),0<i.displayTime&&setTimeout(u.hide,i.displayTime),u.show()},destroy:function(){u.verbose("Destroying instance"),r.removeData(a).off(o)},show:function(){if(u.should.show()&&!r.is(":visible")){if(!1===i.onShow.call(c))return u.debug("onShow callback returned false, cancelling nag animation"),!1;u.debug("Showing nag",i.animation.show),"fade"===i.animation.show?r.fadeIn(i.duration,i.easing,i.onVisible):r.slideDown(i.duration,i.easing,i.onVisible)}},hide:function(){if(!1===i.onHide.call(c))return u.debug("onHide callback returned false, cancelling nag animation"),!1;u.debug("Hiding nag",i.animation.hide),"fade"===i.animation.hide?r.fadeOut(i.duration,i.easing,i.onHidden):r.slideUp(i.duration,i.easing,i.onHidden)},dismiss:function(e){!1!==u.hide()&&i.storageMethod&&(u.debug("Dismissing nag",i.storageMethod,i.key,i.value,i.expires),u.storage.set(i.key,i.value)),e.stopImmediatePropagation(),e.preventDefault()},should:{show:function(){return i.persist?(u.debug("Persistent nag is set, can show nag"),!0):u.storage.get(i.key)!=i.value.toString()?(u.debug("Stored value is not set, can show nag",u.storage.get(i.key)),!0):(u.debug("Stored value is set, cannot show nag",u.storage.get(i.key)),!1)}},get:{expirationDate:function(e){if((e="number"==typeof e?new Date(Date.now()+864e5*e):e)instanceof Date&&e.getTime())return e.toUTCString();u.error(l.expiresFormat)},storage:function(){return"localstorage"===i.storageMethod&&void 0!==S.localStorage?(u.debug("Using local storage"),S.localStorage):"sessionstorage"===i.storageMethod&&void 0!==S.sessionStorage?(u.debug("Using session storage"),S.sessionStorage):"cookie"in D?(u.debug("Using cookie"),{setItem:function(e,n,o){e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),n=encodeURIComponent(n).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[B-D])/g,decodeURIComponent);var t,i="";for(t in o)Object.prototype.hasOwnProperty.call(o,t)&&(i+="; "+t,"string"==typeof o[t]&&(i+="="+o[t].split(";")[0]));D.cookie=e+"="+n+i},getItem:function(e){for(var n=D.cookie.split("; "),o=0,t=n.length;o<t;o++){var i=n[o].split("=");if(e===i[0].replace(/(%[\da-f]{2})+/gi,decodeURIComponent))return i[1]||""}},removeItem:function(e,n){t.setItem(e,"",n)}}):void u.error(l.noStorage)},storageOptions:function(){var e={};return i.expires&&(e.expires=u.get.expirationDate(i.expires)),i.domain&&(e.domain=i.domain),i.path&&(e.path=i.path),i.secure&&(e.secure=i.secure),i.samesite&&(e.samesite=i.samesite),e}},clear:function(){u.storage.remove(i.key)},storage:{set:function(e,n){var o=u.get.storageOptions();t===S.localStorage&&o.expires&&(u.debug("Storing expiration value in localStorage",e,o.expires),t.setItem(e+i.expirationKey,o.expires)),u.debug("Value stored",e,n);try{t.setItem(e,n,o)}catch(e){u.error(l.setItem,e)}},get:function(e){var n,o=t.getItem(e);return t===S.localStorage&&null!=(n=t.getItem(e+i.expirationKey))&&new Date(n)<new Date&&(u.debug("Value in localStorage has expired. Deleting key",e),u.storage.remove(e),o=null),o="undefined"!==o&&"null"!==o&&null!=o?o:void 0},remove:function(e){var n=u.get.storageOptions();n.expires=u.get.expirationDate(-1),t===S.localStorage&&t.removeItem(e+i.expirationKey),t.removeItem(e,n)}},setting:function(e,n){if(u.debug("Changing setting",e,n),w.isPlainObject(e))w.extend(!0,i,e);else{if(void 0===n)return i[e];w.isPlainObject(i[e])?w.extend(!0,i[e],n):i[e]=n}},internal:function(e,n){if(w.isPlainObject(e))w.extend(!0,u,e);else{if(void 0===n)return u[e];u[e]=n}},debug:function(){!i.silent&&i.debug&&(i.performance?u.performance.log(arguments):(u.debug=Function.prototype.bind.call(console.info,console,i.name+":"),u.debug.apply(console,arguments)))},verbose:function(){!i.silent&&i.verbose&&i.debug&&(i.performance?u.performance.log(arguments):(u.verbose=Function.prototype.bind.call(console.info,console,i.name+":"),u.verbose.apply(console,arguments)))},error:function(){i.silent||(u.error=Function.prototype.bind.call(console.error,console,i.name+":"),u.error.apply(console,arguments))},performance:{log:function(e){var n,o;i.performance&&(o=(n=Date.now())-(f||n),f=n,h.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:c,"Execution Time":o})),clearTimeout(u.performance.timer),u.performance.timer=setTimeout(u.performance.display,500)},display:function(){var e=i.name+":",o=0;f=!1,clearTimeout(u.performance.timer),w.each(h,function(e,n){o+=n["Execution Time"]}),e+=" "+o+"ms",0<h.length&&(console.groupCollapsed(e),console.table?console.table(h):w.each(h,function(e,n){console.log(n.Name+": "+n["Execution Time"]+"ms")}),console.groupEnd()),h=[]}},invoke:function(t,e,n){var i,a,o,r,s=d;return e=e||y,n=n||c,"string"==typeof t&&void 0!==s&&(t=t.split(/[ .]/),i=t.length-1,w.each(t,function(e,n){var o=e!==i?n+t[e+1].charAt(0).toUpperCase()+t[e+1].slice(1):t;if(w.isPlainObject(s[o])&&e!==i)s=s[o];else{if(void 0!==s[o])return a=s[o],!1;{if(!w.isPlainObject(s[n])||e===i)return void 0!==s[n]?a=s[n]:u.error(l.method,t),!1;s=s[n]}}})),"function"==typeof(r=a)&&"number"!=typeof r.nodeType?o=a.apply(n,e):void 0!==a&&(o=a),Array.isArray(p)?p.push(o):void 0!==p?p=[p,o]:void 0!==o&&(p=o),a}};b?(void 0===d&&u.initialize(),u.invoke(v)):(void 0!==d&&d.invoke("destroy"),u.initialize())}),void 0!==p?p:this},w.fn.nag.settings={name:"Nag",silent:!1,debug:!1,verbose:!1,performance:!0,namespace:"Nag",persist:!1,displayTime:0,animation:{show:"slide",hide:"slide"},context:!1,detachable:!1,expires:30,domain:!1,path:"/",secure:!1,samesite:!1,storageMethod:"cookie",key:"nag",value:"dismiss",expirationKey:"ExpirationDate",error:{noStorage:"Unsupported storage method",method:"The method you called is not defined.",setItem:"Unexpected error while setting value",expiresFormat:'"expires" must be a number of days or a Date Object'},className:{bottom:"bottom",fixed:"fixed"},selector:{close:"> .close.icon"},duration:500,easing:"easeOutQuad",onShow:function(){},onVisible:function(){},onHide:function(){},onHidden:function(){}},w.extend(w.easing,{easeOutQuad:function(e){return 1-(1-e)*(1-e)}})}(jQuery,window,document);
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.3-beta.0+cdae7ad - Placeholder
2
+ * # Fomantic-UI 2.9.3-beta.2+824a375 - Placeholder
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.3-beta.0+cdae7ad - Placeholder
2
+ * # Fomantic-UI 2.9.3-beta.2+824a375 - Placeholder
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.3-beta.0+cdae7ad - Popup
2
+ * # Fomantic-UI 2.9.3-beta.2+824a375 - Popup
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.3-beta.0+cdae7ad - Popup
2
+ * # Fomantic-UI 2.9.3-beta.2+824a375 - Popup
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -26,8 +26,6 @@
26
26
  $window = $(window),
27
27
  $body = $('body'),
28
28
 
29
- moduleSelector = $allModules.selector || '',
30
-
31
29
  clickEvent = 'ontouchstart' in document.documentElement
32
30
  ? 'touchstart'
33
31
  : 'click',
@@ -38,6 +36,19 @@
38
36
  query = arguments[0],
39
37
  methodInvoked = typeof query === 'string',
40
38
  queryArguments = [].slice.call(arguments, 1),
39
+ contextCheck = function (context, win) {
40
+ var $context;
41
+ if ([window, document].indexOf(context) >= 0) {
42
+ $context = $(context);
43
+ } else {
44
+ $context = $(win.document).find(context);
45
+ if ($context.length === 0) {
46
+ $context = win.frameElement ? contextCheck(context, win.parent) : $body;
47
+ }
48
+ }
49
+
50
+ return $context;
51
+ },
41
52
 
42
53
  returnedValue
43
54
  ;
@@ -57,12 +68,10 @@
57
68
  moduleNamespace = 'module-' + namespace,
58
69
 
59
70
  $module = $(this),
60
- $context = [window, document].indexOf(settings.context) < 0 ? $document.find(settings.context) : $(settings.context),
61
- $scrollContext = [window, document].indexOf(settings.scrollContext) < 0 ? $document.find(settings.scrollContext) : $(settings.scrollContext),
62
- $boundary = [window, document].indexOf(settings.boundary) < 0 ? $document.find(settings.boundary) : $(settings.boundary),
63
- $target = settings.target
64
- ? ([window, document].indexOf(settings.target) < 0 ? $document.find(settings.target) : $(settings.target))
65
- : $module,
71
+ $context = contextCheck(settings.context, window),
72
+ $scrollContext = contextCheck(settings.scrollContext, window),
73
+ $boundary = contextCheck(settings.boundary, window),
74
+ $target = settings.target ? contextCheck(settings.target, window) : $module,
66
75
 
67
76
  $popup,
68
77
  $offsetParent,
@@ -1246,9 +1255,6 @@
1246
1255
  totalTime += data['Execution Time'];
1247
1256
  });
1248
1257
  title += ' ' + totalTime + 'ms';
1249
- if (moduleSelector) {
1250
- title += ' \'' + moduleSelector + '\'';
1251
- }
1252
1258
  if (performance.length > 0) {
1253
1259
  console.groupCollapsed(title);
1254
1260
  if (console.table) {
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.3-beta.0+cdae7ad - Popup
2
+ * # Fomantic-UI 2.9.3-beta.2+824a375 - Popup
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *