From 854c9a6d4acdf7e36550969e388eebc2b4748916 Mon Sep 17 00:00:00 2001 From: Semantic Pusher Robot Date: Sun, 28 Jan 2018 23:18:04 -0800 Subject: [PATCH] Updated component to version 2.2.14 --- RELEASE-NOTES.md | 5 ++++ composer.json | 2 +- index.js | 10 ++++---- package.json | 2 +- popup.css | 59 ++++++++++++++++++++++++++++++++---------------- popup.js | 10 ++++---- popup.min.css | 4 ++-- popup.min.js | 2 +- 8 files changed, 59 insertions(+), 35 deletions(-) diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index 8af2078..338a7b8 100755 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -1,3 +1,8 @@ +### Version 2.2.14 - Jan 29, 2018 + +- **Popup** - Fixed an error which could cause popup not to move to right offset context when using a different target setting. +- **Menu / Popup** - Fixed issue where `inverted menu` rules would cause popup inside a menu to have incorrect link styling in `link list` **Thanks @banandrew** [#5585](https://github.com/Semantic-Org/Semantic-UI/issues/5585) [#5603](https://github.com/Semantic-Org/Semantic-UI/issues/5603) + ### Version 2.2.12 - Aug 07, 2017 - **Popup** - Fixed a regression with `popup` in `2.2.11` that caused popups to appear out of place in some cases due to incorrect calculation of `offsetParent` [#5549](https://github.com/Semantic-Org/Semantic-UI/issues/5549) [#5597](https://github.com/Semantic-Org/Semantic-UI/issues/5597) [#5590](https://github.com/Semantic-Org/Semantic-UI/issues/5590) diff --git a/composer.json b/composer.json index 401a3b0..07c6860 100755 --- a/composer.json +++ b/composer.json @@ -15,5 +15,5 @@ "framework" ], "license": "MIT", - "version": "2.2.13" + "version": "2.2.14" } \ No newline at end of file diff --git a/index.js b/index.js index 53a4d56..6185d22 100755 --- a/index.js +++ b/index.js @@ -1,5 +1,5 @@ /*! - * # Semantic UI 2.2.12 - Popup + * # Semantic UI 2.2.14 - Popup * http://github.com/semantic-org/semantic-ui/ * * @@ -626,11 +626,11 @@ module.exports = function(parameters) { } return distanceFromBoundary; }, - offsetParent: function($target) { + offsetParent: function($element) { var - element = ($target !== undefined) - ? $target[0] - : $module[0], + element = ($element !== undefined) + ? $element[0] + : $target[0], parentNode = element.parentNode, $node = $(parentNode) ; diff --git a/package.json b/package.json index edbe3b5..1ac5cbd 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "semantic-ui-popup", - "version": "2.2.13", + "version": "2.2.14", "title": "Semantic UI - Popup", "description": "Single component release of popup", "homepage": "http://www.semantic-ui.com", diff --git a/popup.css b/popup.css index c4518ae..f4120eb 100755 --- a/popup.css +++ b/popup.css @@ -1,5 +1,5 @@ /*! - * # Semantic UI 2.2.12 - Popup + * # Semantic UI 2.2.14 - Popup * http://github.com/semantic-org/semantic-ui/ * * @@ -33,7 +33,8 @@ font-style: normal; color: rgba(0, 0, 0, 0.87); border-radius: 0.28571429rem; - box-shadow: 0px 2px 4px 0px rgba(34, 36, 38, 0.12), 0px 2px 10px 0px rgba(34, 36, 38, 0.15); + -webkit-box-shadow: 0px 2px 4px 0px rgba(34, 36, 38, 0.12), 0px 2px 10px 0px rgba(34, 36, 38, 0.15); + box-shadow: 0px 2px 4px 0px rgba(34, 36, 38, 0.12), 0px 2px 10px 0px rgba(34, 36, 38, 0.15); } .ui.popup > .header { padding: 0em; @@ -54,7 +55,8 @@ -webkit-transform: rotate(45deg); transform: rotate(45deg); z-index: 2; - box-shadow: 1px 1px 0px 0px #bababc; + -webkit-box-shadow: 1px 1px 0px 0px #bababc; + box-shadow: 1px 1px 0px 0px #bababc; } @@ -85,7 +87,8 @@ -webkit-transform: rotate(45deg); transform: rotate(45deg); z-index: 2; - box-shadow: 1px 1px 0px 0px #bababc; + -webkit-box-shadow: 1px 1px 0px 0px #bababc; + box-shadow: 1px 1px 0px 0px #bababc; } /* Popup */ @@ -106,7 +109,8 @@ font-style: normal; color: rgba(0, 0, 0, 0.87); border-radius: 0.28571429rem; - box-shadow: 0px 2px 4px 0px rgba(34, 36, 38, 0.12), 0px 2px 10px 0px rgba(34, 36, 38, 0.15); + -webkit-box-shadow: 0px 2px 4px 0px rgba(34, 36, 38, 0.12), 0px 2px 10px 0px rgba(34, 36, 38, 0.15); + box-shadow: 0px 2px 4px 0px rgba(34, 36, 38, 0.12), 0px 2px 10px 0px rgba(34, 36, 38, 0.15); z-index: 1; } @@ -205,7 +209,8 @@ /* Arrow */ [data-tooltip][data-inverted]:before { - box-shadow: none !important; + -webkit-box-shadow: none !important; + box-shadow: none !important; } /* Arrow Position */ @@ -218,7 +223,8 @@ background: #1B1C1D; color: #FFFFFF; border: none; - box-shadow: none; + -webkit-box-shadow: none; + box-shadow: none; } [data-tooltip][data-inverted]:after .header { background-color: none; @@ -366,15 +372,18 @@ /* Arrow */ [data-position~="bottom"][data-tooltip]:before { background: #FFFFFF; - box-shadow: -1px -1px 0px 0px #bababc; + -webkit-box-shadow: -1px -1px 0px 0px #bababc; + box-shadow: -1px -1px 0px 0px #bababc; } [data-position="left center"][data-tooltip]:before { background: #FFFFFF; - box-shadow: 1px -1px 0px 0px #bababc; + -webkit-box-shadow: 1px -1px 0px 0px #bababc; + box-shadow: 1px -1px 0px 0px #bababc; } [data-position="right center"][data-tooltip]:before { background: #FFFFFF; - box-shadow: -1px 1px 0px 0px #bababc; + -webkit-box-shadow: -1px 1px 0px 0px #bababc; + box-shadow: -1px 1px 0px 0px #bababc; } [data-position~="top"][data-tooltip]:before { background: #FFFFFF; @@ -383,15 +392,18 @@ /* Inverted Arrow Color */ [data-inverted][data-position~="bottom"][data-tooltip]:before { background: #1B1C1D; - box-shadow: -1px -1px 0px 0px #bababc; + -webkit-box-shadow: -1px -1px 0px 0px #bababc; + box-shadow: -1px -1px 0px 0px #bababc; } [data-inverted][data-position="left center"][data-tooltip]:before { background: #1B1C1D; - box-shadow: 1px -1px 0px 0px #bababc; + -webkit-box-shadow: 1px -1px 0px 0px #bababc; + box-shadow: 1px -1px 0px 0px #bababc; } [data-inverted][data-position="right center"][data-tooltip]:before { background: #1B1C1D; - box-shadow: -1px 1px 0px 0px #bababc; + -webkit-box-shadow: -1px 1px 0px 0px #bababc; + box-shadow: -1px 1px 0px 0px #bababc; } [data-inverted][data-position~="top"][data-tooltip]:before { background: #1B1C1D; @@ -488,7 +500,8 @@ left: 50%; right: auto; bottom: auto; - box-shadow: -1px -1px 0px 0px #bababc; + -webkit-box-shadow: -1px -1px 0px 0px #bababc; + box-shadow: -1px -1px 0px 0px #bababc; } .ui.bottom.left.popup { margin-left: 0em; @@ -500,7 +513,8 @@ right: auto; bottom: auto; margin-left: 0em; - box-shadow: -1px -1px 0px 0px #bababc; + -webkit-box-shadow: -1px -1px 0px 0px #bababc; + box-shadow: -1px -1px 0px 0px #bababc; } .ui.bottom.right.popup { margin-right: 0em; @@ -512,7 +526,8 @@ bottom: auto; left: auto; margin-left: 0em; - box-shadow: -1px -1px 0px 0px #bababc; + -webkit-box-shadow: -1px -1px 0px 0px #bababc; + box-shadow: -1px -1px 0px 0px #bababc; } /*--- Above ---*/ @@ -556,7 +571,8 @@ bottom: auto; left: auto; margin-top: -0.30714286em; - box-shadow: 1px -1px 0px 0px #bababc; + -webkit-box-shadow: 1px -1px 0px 0px #bababc; + box-shadow: 1px -1px 0px 0px #bababc; } /*--- Right Center ---*/ @@ -568,7 +584,8 @@ bottom: auto; right: auto; margin-top: -0.30714286em; - box-shadow: -1px 1px 0px 0px #bababc; + -webkit-box-shadow: -1px 1px 0px 0px #bababc; + box-shadow: -1px 1px 0px 0px #bababc; } /* Arrow Color By Location */ @@ -678,7 +695,8 @@ background: #1B1C1D; color: #FFFFFF; border: none; - box-shadow: none; + -webkit-box-shadow: none; + box-shadow: none; } .ui.inverted.popup .header { background-color: none; @@ -686,7 +704,8 @@ } .ui.inverted.popup:before { background-color: #1B1C1D; - box-shadow: none !important; + -webkit-box-shadow: none !important; + box-shadow: none !important; } /*-------------- diff --git a/popup.js b/popup.js index 2358be0..32ac531 100755 --- a/popup.js +++ b/popup.js @@ -1,5 +1,5 @@ /*! - * # Semantic UI 2.2.12 - Popup + * # Semantic UI 2.2.14 - Popup * http://github.com/semantic-org/semantic-ui/ * * @@ -625,11 +625,11 @@ $.fn.popup = function(parameters) { } return distanceFromBoundary; }, - offsetParent: function($target) { + offsetParent: function($element) { var - element = ($target !== undefined) - ? $target[0] - : $module[0], + element = ($element !== undefined) + ? $element[0] + : $target[0], parentNode = element.parentNode, $node = $(parentNode) ; diff --git a/popup.min.css b/popup.min.css index dc080ab..67398a7 100755 --- a/popup.min.css +++ b/popup.min.css @@ -1,9 +1,9 @@ /*! - * # Semantic UI 2.2.12 - Popup + * # Semantic UI 2.2.14 - Popup * http://github.com/semantic-org/semantic-ui/ * * * Released under the MIT license * http://opensource.org/licenses/MIT * - */.ui.popup{display:none;position:absolute;top:0;right:0;min-width:-webkit-min-content;min-width:-moz-min-content;min-width:min-content;z-index:1900;border:1px solid #d4d4d5;line-height:1.4285em;max-width:250px;background:#fff;padding:.833em 1em;font-weight:400;font-style:normal;color:rgba(0,0,0,.87);border-radius:.28571429rem;box-shadow:0 2px 4px 0 rgba(34,36,38,.12),0 2px 10px 0 rgba(34,36,38,.15)}.ui.popup>.header{padding:0;font-family:Lato,'Helvetica Neue',Arial,Helvetica,sans-serif;font-size:1.14285714em;line-height:1.2;font-weight:700}.ui.popup>.header+.content{padding-top:.5em}.ui.popup:before{position:absolute;content:'';width:.71428571em;height:.71428571em;background:#fff;-webkit-transform:rotate(45deg);transform:rotate(45deg);z-index:2;box-shadow:1px 1px 0 0 #bababc}[data-tooltip]{position:relative}[data-tooltip]:before{pointer-events:none;position:absolute;content:'';font-size:1rem;width:.71428571em;height:.71428571em;background:#fff;-webkit-transform:rotate(45deg);transform:rotate(45deg);z-index:2;box-shadow:1px 1px 0 0 #bababc}[data-tooltip]:after{pointer-events:none;content:attr(data-tooltip);position:absolute;text-transform:none;text-align:left;white-space:nowrap;font-size:1rem;border:1px solid #d4d4d5;line-height:1.4285em;max-width:none;background:#fff;padding:.833em 1em;font-weight:400;font-style:normal;color:rgba(0,0,0,.87);border-radius:.28571429rem;box-shadow:0 2px 4px 0 rgba(34,36,38,.12),0 2px 10px 0 rgba(34,36,38,.15);z-index:1}[data-tooltip]:not([data-position]):before{top:auto;right:auto;bottom:100%;left:50%;background:#fff;margin-left:-.07142857rem;margin-bottom:.14285714rem}[data-tooltip]:not([data-position]):after{left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%);bottom:100%;margin-bottom:.5em}[data-tooltip]:after,[data-tooltip]:before{pointer-events:none;visibility:hidden}[data-tooltip]:before{opacity:0;-webkit-transform:rotate(45deg) scale(0)!important;transform:rotate(45deg) scale(0)!important;-webkit-transform-origin:center top;transform-origin:center top;-webkit-transition:all .1s ease;transition:all .1s ease}[data-tooltip]:after{opacity:1;-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-transition:all .1s ease;transition:all .1s ease}[data-tooltip]:hover:after,[data-tooltip]:hover:before{visibility:visible;pointer-events:auto}[data-tooltip]:hover:before{-webkit-transform:rotate(45deg) scale(1)!important;transform:rotate(45deg) scale(1)!important;opacity:1}[data-tooltip]:after,[data-tooltip][data-position="bottom center"]:after,[data-tooltip][data-position="top center"]:after{-webkit-transform:translateX(-50%) scale(0)!important;transform:translateX(-50%) scale(0)!important}[data-tooltip]:hover:after,[data-tooltip][data-position="bottom center"]:hover:after{-webkit-transform:translateX(-50%) scale(1)!important;transform:translateX(-50%) scale(1)!important}[data-tooltip][data-position="left center"]:after,[data-tooltip][data-position="right center"]:after{-webkit-transform:translateY(-50%) scale(0)!important;transform:translateY(-50%) scale(0)!important}[data-tooltip][data-position="left center"]:hover:after,[data-tooltip][data-position="right center"]:hover:after{-webkit-transform:translateY(-50%) scale(1)!important;transform:translateY(-50%) scale(1)!important}[data-tooltip][data-position="bottom left"]:after,[data-tooltip][data-position="bottom right"]:after,[data-tooltip][data-position="top left"]:after,[data-tooltip][data-position="top right"]:after{-webkit-transform:scale(0)!important;transform:scale(0)!important}[data-tooltip][data-position="bottom left"]:hover:after,[data-tooltip][data-position="bottom right"]:hover:after,[data-tooltip][data-position="top left"]:hover:after,[data-tooltip][data-position="top right"]:hover:after{-webkit-transform:scale(1)!important;transform:scale(1)!important}[data-tooltip][data-inverted]:before{box-shadow:none!important}[data-tooltip][data-inverted]:before{background:#1b1c1d}[data-tooltip][data-inverted]:after{background:#1b1c1d;color:#fff;border:none;box-shadow:none}[data-tooltip][data-inverted]:after .header{background-color:none;color:#fff}[data-position="top center"][data-tooltip]:after{top:auto;right:auto;left:50%;bottom:100%;-webkit-transform:translateX(-50%);transform:translateX(-50%);margin-bottom:.5em}[data-position="top center"][data-tooltip]:before{top:auto;right:auto;bottom:100%;left:50%;background:#fff;margin-left:-.07142857rem;margin-bottom:.14285714rem}[data-position="top left"][data-tooltip]:after{top:auto;right:auto;left:0;bottom:100%;margin-bottom:.5em}[data-position="top left"][data-tooltip]:before{top:auto;right:auto;bottom:100%;left:1em;margin-left:-.07142857rem;margin-bottom:.14285714rem}[data-position="top right"][data-tooltip]:after{top:auto;left:auto;right:0;bottom:100%;margin-bottom:.5em}[data-position="top right"][data-tooltip]:before{top:auto;left:auto;bottom:100%;right:1em;margin-left:-.07142857rem;margin-bottom:.14285714rem}[data-position="bottom center"][data-tooltip]:after{bottom:auto;right:auto;left:50%;top:100%;-webkit-transform:translateX(-50%);transform:translateX(-50%);margin-top:.5em}[data-position="bottom center"][data-tooltip]:before{bottom:auto;right:auto;top:100%;left:50%;margin-left:-.07142857rem;margin-top:.14285714rem}[data-position="bottom left"][data-tooltip]:after{left:0;top:100%;margin-top:.5em}[data-position="bottom left"][data-tooltip]:before{bottom:auto;right:auto;top:100%;left:1em;margin-left:-.07142857rem;margin-top:.14285714rem}[data-position="bottom right"][data-tooltip]:after{right:0;top:100%;margin-top:.5em}[data-position="bottom right"][data-tooltip]:before{bottom:auto;left:auto;top:100%;right:1em;margin-left:-.14285714rem;margin-top:.07142857rem}[data-position="left center"][data-tooltip]:after{right:100%;top:50%;margin-right:.5em;-webkit-transform:translateY(-50%);transform:translateY(-50%)}[data-position="left center"][data-tooltip]:before{right:100%;top:50%;margin-top:-.14285714rem;margin-right:-.07142857rem}[data-position="right center"][data-tooltip]:after{left:100%;top:50%;margin-left:.5em;-webkit-transform:translateY(-50%);transform:translateY(-50%)}[data-position="right center"][data-tooltip]:before{left:100%;top:50%;margin-top:-.07142857rem;margin-left:.14285714rem}[data-position~=bottom][data-tooltip]:before{background:#fff;box-shadow:-1px -1px 0 0 #bababc}[data-position="left center"][data-tooltip]:before{background:#fff;box-shadow:1px -1px 0 0 #bababc}[data-position="right center"][data-tooltip]:before{background:#fff;box-shadow:-1px 1px 0 0 #bababc}[data-position~=top][data-tooltip]:before{background:#fff}[data-inverted][data-position~=bottom][data-tooltip]:before{background:#1b1c1d;box-shadow:-1px -1px 0 0 #bababc}[data-inverted][data-position="left center"][data-tooltip]:before{background:#1b1c1d;box-shadow:1px -1px 0 0 #bababc}[data-inverted][data-position="right center"][data-tooltip]:before{background:#1b1c1d;box-shadow:-1px 1px 0 0 #bababc}[data-inverted][data-position~=top][data-tooltip]:before{background:#1b1c1d}[data-position~=bottom][data-tooltip]:before{-webkit-transform-origin:center bottom;transform-origin:center bottom}[data-position~=bottom][data-tooltip]:after{-webkit-transform-origin:center top;transform-origin:center top}[data-position="left center"][data-tooltip]:before{-webkit-transform-origin:top center;transform-origin:top center}[data-position="left center"][data-tooltip]:after{-webkit-transform-origin:right center;transform-origin:right center}[data-position="right center"][data-tooltip]:before{-webkit-transform-origin:right center;transform-origin:right center}[data-position="right center"][data-tooltip]:after{-webkit-transform-origin:left center;transform-origin:left center}.ui.popup{margin:0}.ui.top.popup{margin:0 0 .71428571em}.ui.top.left.popup{-webkit-transform-origin:left bottom;transform-origin:left bottom}.ui.top.center.popup{-webkit-transform-origin:center bottom;transform-origin:center bottom}.ui.top.right.popup{-webkit-transform-origin:right bottom;transform-origin:right bottom}.ui.left.center.popup{margin:0 .71428571em 0 0;-webkit-transform-origin:right 50%;transform-origin:right 50%}.ui.right.center.popup{margin:0 0 0 .71428571em;-webkit-transform-origin:left 50%;transform-origin:left 50%}.ui.bottom.popup{margin:.71428571em 0 0}.ui.bottom.left.popup{-webkit-transform-origin:left top;transform-origin:left top}.ui.bottom.center.popup{-webkit-transform-origin:center top;transform-origin:center top}.ui.bottom.right.popup{-webkit-transform-origin:right top;transform-origin:right top}.ui.bottom.center.popup:before{margin-left:-.30714286em;top:-.30714286em;left:50%;right:auto;bottom:auto;box-shadow:-1px -1px 0 0 #bababc}.ui.bottom.left.popup{margin-left:0}.ui.bottom.left.popup:before{top:-.30714286em;left:1em;right:auto;bottom:auto;margin-left:0;box-shadow:-1px -1px 0 0 #bababc}.ui.bottom.right.popup{margin-right:0}.ui.bottom.right.popup:before{top:-.30714286em;right:1em;bottom:auto;left:auto;margin-left:0;box-shadow:-1px -1px 0 0 #bababc}.ui.top.center.popup:before{top:auto;right:auto;bottom:-.30714286em;left:50%;margin-left:-.30714286em}.ui.top.left.popup{margin-left:0}.ui.top.left.popup:before{bottom:-.30714286em;left:1em;top:auto;right:auto;margin-left:0}.ui.top.right.popup{margin-right:0}.ui.top.right.popup:before{bottom:-.30714286em;right:1em;top:auto;left:auto;margin-left:0}.ui.left.center.popup:before{top:50%;right:-.30714286em;bottom:auto;left:auto;margin-top:-.30714286em;box-shadow:1px -1px 0 0 #bababc}.ui.right.center.popup:before{top:50%;left:-.30714286em;bottom:auto;right:auto;margin-top:-.30714286em;box-shadow:-1px 1px 0 0 #bababc}.ui.bottom.popup:before{background:#fff}.ui.left.center.popup:before,.ui.right.center.popup:before{background:#fff}.ui.top.popup:before{background:#fff}.ui.inverted.bottom.popup:before{background:#1b1c1d}.ui.inverted.left.center.popup:before,.ui.inverted.right.center.popup:before{background:#1b1c1d}.ui.inverted.top.popup:before{background:#1b1c1d}.ui.popup>.ui.grid:not(.padded){width:calc(100% + 1.75rem);margin:-.7rem -.875rem}.ui.loading.popup{display:block;visibility:hidden;z-index:-1}.ui.animating.popup,.ui.visible.popup{display:block}.ui.visible.popup{-webkit-transform:translateZ(0);transform:translateZ(0);-webkit-backface-visibility:hidden;backface-visibility:hidden}.ui.basic.popup:before{display:none}.ui.wide.popup{max-width:350px}.ui[class*="very wide"].popup{max-width:550px}@media only screen and (max-width:767px){.ui.wide.popup,.ui[class*="very wide"].popup{max-width:250px}}.ui.fluid.popup{width:100%;max-width:none}.ui.inverted.popup{background:#1b1c1d;color:#fff;border:none;box-shadow:none}.ui.inverted.popup .header{background-color:none;color:#fff}.ui.inverted.popup:before{background-color:#1b1c1d;box-shadow:none!important}.ui.flowing.popup{max-width:none}.ui.mini.popup{font-size:.78571429rem}.ui.tiny.popup{font-size:.85714286rem}.ui.small.popup{font-size:.92857143rem}.ui.popup{font-size:1rem}.ui.large.popup{font-size:1.14285714rem}.ui.huge.popup{font-size:1.42857143rem} \ No newline at end of file + */.ui.popup{display:none;position:absolute;top:0;right:0;min-width:-webkit-min-content;min-width:-moz-min-content;min-width:min-content;z-index:1900;border:1px solid #d4d4d5;line-height:1.4285em;max-width:250px;background:#fff;padding:.833em 1em;font-weight:400;font-style:normal;color:rgba(0,0,0,.87);border-radius:.28571429rem;-webkit-box-shadow:0 2px 4px 0 rgba(34,36,38,.12),0 2px 10px 0 rgba(34,36,38,.15);box-shadow:0 2px 4px 0 rgba(34,36,38,.12),0 2px 10px 0 rgba(34,36,38,.15)}.ui.popup>.header{padding:0;font-family:Lato,'Helvetica Neue',Arial,Helvetica,sans-serif;font-size:1.14285714em;line-height:1.2;font-weight:700}.ui.popup>.header+.content{padding-top:.5em}.ui.popup:before{position:absolute;content:'';width:.71428571em;height:.71428571em;background:#fff;-webkit-transform:rotate(45deg);transform:rotate(45deg);z-index:2;-webkit-box-shadow:1px 1px 0 0 #bababc;box-shadow:1px 1px 0 0 #bababc}[data-tooltip]{position:relative}[data-tooltip]:before{pointer-events:none;position:absolute;content:'';font-size:1rem;width:.71428571em;height:.71428571em;background:#fff;-webkit-transform:rotate(45deg);transform:rotate(45deg);z-index:2;-webkit-box-shadow:1px 1px 0 0 #bababc;box-shadow:1px 1px 0 0 #bababc}[data-tooltip]:after{pointer-events:none;content:attr(data-tooltip);position:absolute;text-transform:none;text-align:left;white-space:nowrap;font-size:1rem;border:1px solid #d4d4d5;line-height:1.4285em;max-width:none;background:#fff;padding:.833em 1em;font-weight:400;font-style:normal;color:rgba(0,0,0,.87);border-radius:.28571429rem;-webkit-box-shadow:0 2px 4px 0 rgba(34,36,38,.12),0 2px 10px 0 rgba(34,36,38,.15);box-shadow:0 2px 4px 0 rgba(34,36,38,.12),0 2px 10px 0 rgba(34,36,38,.15);z-index:1}[data-tooltip]:not([data-position]):before{top:auto;right:auto;bottom:100%;left:50%;background:#fff;margin-left:-.07142857rem;margin-bottom:.14285714rem}[data-tooltip]:not([data-position]):after{left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%);bottom:100%;margin-bottom:.5em}[data-tooltip]:after,[data-tooltip]:before{pointer-events:none;visibility:hidden}[data-tooltip]:before{opacity:0;-webkit-transform:rotate(45deg) scale(0)!important;transform:rotate(45deg) scale(0)!important;-webkit-transform-origin:center top;transform-origin:center top;-webkit-transition:all .1s ease;transition:all .1s ease}[data-tooltip]:after{opacity:1;-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-transition:all .1s ease;transition:all .1s ease}[data-tooltip]:hover:after,[data-tooltip]:hover:before{visibility:visible;pointer-events:auto}[data-tooltip]:hover:before{-webkit-transform:rotate(45deg) scale(1)!important;transform:rotate(45deg) scale(1)!important;opacity:1}[data-tooltip]:after,[data-tooltip][data-position="bottom center"]:after,[data-tooltip][data-position="top center"]:after{-webkit-transform:translateX(-50%) scale(0)!important;transform:translateX(-50%) scale(0)!important}[data-tooltip]:hover:after,[data-tooltip][data-position="bottom center"]:hover:after{-webkit-transform:translateX(-50%) scale(1)!important;transform:translateX(-50%) scale(1)!important}[data-tooltip][data-position="left center"]:after,[data-tooltip][data-position="right center"]:after{-webkit-transform:translateY(-50%) scale(0)!important;transform:translateY(-50%) scale(0)!important}[data-tooltip][data-position="left center"]:hover:after,[data-tooltip][data-position="right center"]:hover:after{-webkit-transform:translateY(-50%) scale(1)!important;transform:translateY(-50%) scale(1)!important}[data-tooltip][data-position="bottom left"]:after,[data-tooltip][data-position="bottom right"]:after,[data-tooltip][data-position="top left"]:after,[data-tooltip][data-position="top right"]:after{-webkit-transform:scale(0)!important;transform:scale(0)!important}[data-tooltip][data-position="bottom left"]:hover:after,[data-tooltip][data-position="bottom right"]:hover:after,[data-tooltip][data-position="top left"]:hover:after,[data-tooltip][data-position="top right"]:hover:after{-webkit-transform:scale(1)!important;transform:scale(1)!important}[data-tooltip][data-inverted]:before{-webkit-box-shadow:none!important;box-shadow:none!important}[data-tooltip][data-inverted]:before{background:#1b1c1d}[data-tooltip][data-inverted]:after{background:#1b1c1d;color:#fff;border:none;-webkit-box-shadow:none;box-shadow:none}[data-tooltip][data-inverted]:after .header{background-color:none;color:#fff}[data-position="top center"][data-tooltip]:after{top:auto;right:auto;left:50%;bottom:100%;-webkit-transform:translateX(-50%);transform:translateX(-50%);margin-bottom:.5em}[data-position="top center"][data-tooltip]:before{top:auto;right:auto;bottom:100%;left:50%;background:#fff;margin-left:-.07142857rem;margin-bottom:.14285714rem}[data-position="top left"][data-tooltip]:after{top:auto;right:auto;left:0;bottom:100%;margin-bottom:.5em}[data-position="top left"][data-tooltip]:before{top:auto;right:auto;bottom:100%;left:1em;margin-left:-.07142857rem;margin-bottom:.14285714rem}[data-position="top right"][data-tooltip]:after{top:auto;left:auto;right:0;bottom:100%;margin-bottom:.5em}[data-position="top right"][data-tooltip]:before{top:auto;left:auto;bottom:100%;right:1em;margin-left:-.07142857rem;margin-bottom:.14285714rem}[data-position="bottom center"][data-tooltip]:after{bottom:auto;right:auto;left:50%;top:100%;-webkit-transform:translateX(-50%);transform:translateX(-50%);margin-top:.5em}[data-position="bottom center"][data-tooltip]:before{bottom:auto;right:auto;top:100%;left:50%;margin-left:-.07142857rem;margin-top:.14285714rem}[data-position="bottom left"][data-tooltip]:after{left:0;top:100%;margin-top:.5em}[data-position="bottom left"][data-tooltip]:before{bottom:auto;right:auto;top:100%;left:1em;margin-left:-.07142857rem;margin-top:.14285714rem}[data-position="bottom right"][data-tooltip]:after{right:0;top:100%;margin-top:.5em}[data-position="bottom right"][data-tooltip]:before{bottom:auto;left:auto;top:100%;right:1em;margin-left:-.14285714rem;margin-top:.07142857rem}[data-position="left center"][data-tooltip]:after{right:100%;top:50%;margin-right:.5em;-webkit-transform:translateY(-50%);transform:translateY(-50%)}[data-position="left center"][data-tooltip]:before{right:100%;top:50%;margin-top:-.14285714rem;margin-right:-.07142857rem}[data-position="right center"][data-tooltip]:after{left:100%;top:50%;margin-left:.5em;-webkit-transform:translateY(-50%);transform:translateY(-50%)}[data-position="right center"][data-tooltip]:before{left:100%;top:50%;margin-top:-.07142857rem;margin-left:.14285714rem}[data-position~=bottom][data-tooltip]:before{background:#fff;-webkit-box-shadow:-1px -1px 0 0 #bababc;box-shadow:-1px -1px 0 0 #bababc}[data-position="left center"][data-tooltip]:before{background:#fff;-webkit-box-shadow:1px -1px 0 0 #bababc;box-shadow:1px -1px 0 0 #bababc}[data-position="right center"][data-tooltip]:before{background:#fff;-webkit-box-shadow:-1px 1px 0 0 #bababc;box-shadow:-1px 1px 0 0 #bababc}[data-position~=top][data-tooltip]:before{background:#fff}[data-inverted][data-position~=bottom][data-tooltip]:before{background:#1b1c1d;-webkit-box-shadow:-1px -1px 0 0 #bababc;box-shadow:-1px -1px 0 0 #bababc}[data-inverted][data-position="left center"][data-tooltip]:before{background:#1b1c1d;-webkit-box-shadow:1px -1px 0 0 #bababc;box-shadow:1px -1px 0 0 #bababc}[data-inverted][data-position="right center"][data-tooltip]:before{background:#1b1c1d;-webkit-box-shadow:-1px 1px 0 0 #bababc;box-shadow:-1px 1px 0 0 #bababc}[data-inverted][data-position~=top][data-tooltip]:before{background:#1b1c1d}[data-position~=bottom][data-tooltip]:before{-webkit-transform-origin:center bottom;transform-origin:center bottom}[data-position~=bottom][data-tooltip]:after{-webkit-transform-origin:center top;transform-origin:center top}[data-position="left center"][data-tooltip]:before{-webkit-transform-origin:top center;transform-origin:top center}[data-position="left center"][data-tooltip]:after{-webkit-transform-origin:right center;transform-origin:right center}[data-position="right center"][data-tooltip]:before{-webkit-transform-origin:right center;transform-origin:right center}[data-position="right center"][data-tooltip]:after{-webkit-transform-origin:left center;transform-origin:left center}.ui.popup{margin:0}.ui.top.popup{margin:0 0 .71428571em}.ui.top.left.popup{-webkit-transform-origin:left bottom;transform-origin:left bottom}.ui.top.center.popup{-webkit-transform-origin:center bottom;transform-origin:center bottom}.ui.top.right.popup{-webkit-transform-origin:right bottom;transform-origin:right bottom}.ui.left.center.popup{margin:0 .71428571em 0 0;-webkit-transform-origin:right 50%;transform-origin:right 50%}.ui.right.center.popup{margin:0 0 0 .71428571em;-webkit-transform-origin:left 50%;transform-origin:left 50%}.ui.bottom.popup{margin:.71428571em 0 0}.ui.bottom.left.popup{-webkit-transform-origin:left top;transform-origin:left top}.ui.bottom.center.popup{-webkit-transform-origin:center top;transform-origin:center top}.ui.bottom.right.popup{-webkit-transform-origin:right top;transform-origin:right top}.ui.bottom.center.popup:before{margin-left:-.30714286em;top:-.30714286em;left:50%;right:auto;bottom:auto;-webkit-box-shadow:-1px -1px 0 0 #bababc;box-shadow:-1px -1px 0 0 #bababc}.ui.bottom.left.popup{margin-left:0}.ui.bottom.left.popup:before{top:-.30714286em;left:1em;right:auto;bottom:auto;margin-left:0;-webkit-box-shadow:-1px -1px 0 0 #bababc;box-shadow:-1px -1px 0 0 #bababc}.ui.bottom.right.popup{margin-right:0}.ui.bottom.right.popup:before{top:-.30714286em;right:1em;bottom:auto;left:auto;margin-left:0;-webkit-box-shadow:-1px -1px 0 0 #bababc;box-shadow:-1px -1px 0 0 #bababc}.ui.top.center.popup:before{top:auto;right:auto;bottom:-.30714286em;left:50%;margin-left:-.30714286em}.ui.top.left.popup{margin-left:0}.ui.top.left.popup:before{bottom:-.30714286em;left:1em;top:auto;right:auto;margin-left:0}.ui.top.right.popup{margin-right:0}.ui.top.right.popup:before{bottom:-.30714286em;right:1em;top:auto;left:auto;margin-left:0}.ui.left.center.popup:before{top:50%;right:-.30714286em;bottom:auto;left:auto;margin-top:-.30714286em;-webkit-box-shadow:1px -1px 0 0 #bababc;box-shadow:1px -1px 0 0 #bababc}.ui.right.center.popup:before{top:50%;left:-.30714286em;bottom:auto;right:auto;margin-top:-.30714286em;-webkit-box-shadow:-1px 1px 0 0 #bababc;box-shadow:-1px 1px 0 0 #bababc}.ui.bottom.popup:before{background:#fff}.ui.left.center.popup:before,.ui.right.center.popup:before{background:#fff}.ui.top.popup:before{background:#fff}.ui.inverted.bottom.popup:before{background:#1b1c1d}.ui.inverted.left.center.popup:before,.ui.inverted.right.center.popup:before{background:#1b1c1d}.ui.inverted.top.popup:before{background:#1b1c1d}.ui.popup>.ui.grid:not(.padded){width:calc(100% + 1.75rem);margin:-.7rem -.875rem}.ui.loading.popup{display:block;visibility:hidden;z-index:-1}.ui.animating.popup,.ui.visible.popup{display:block}.ui.visible.popup{-webkit-transform:translateZ(0);transform:translateZ(0);-webkit-backface-visibility:hidden;backface-visibility:hidden}.ui.basic.popup:before{display:none}.ui.wide.popup{max-width:350px}.ui[class*="very wide"].popup{max-width:550px}@media only screen and (max-width:767px){.ui.wide.popup,.ui[class*="very wide"].popup{max-width:250px}}.ui.fluid.popup{width:100%;max-width:none}.ui.inverted.popup{background:#1b1c1d;color:#fff;border:none;-webkit-box-shadow:none;box-shadow:none}.ui.inverted.popup .header{background-color:none;color:#fff}.ui.inverted.popup:before{background-color:#1b1c1d;-webkit-box-shadow:none!important;box-shadow:none!important}.ui.flowing.popup{max-width:none}.ui.mini.popup{font-size:.78571429rem}.ui.tiny.popup{font-size:.85714286rem}.ui.small.popup{font-size:.92857143rem}.ui.popup{font-size:1rem}.ui.large.popup{font-size:1.14285714rem}.ui.huge.popup{font-size:1.42857143rem} \ No newline at end of file diff --git a/popup.min.js b/popup.min.js index 5605175..e0af649 100755 --- a/popup.min.js +++ b/popup.min.js @@ -1 +1 @@ -!function(t,e,o,n){"use strict";e=void 0!==e&&e.Math==Math?e:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),t.fn.popup=function(n){var i,r=t(this),a=t(o),s=t(e),p=t("body"),l=r.selector||"",u=(new Date).getTime(),c=[],d=arguments[0],f="string"==typeof d,g=[].slice.call(arguments,1);return r.each(function(){var r,h,v,m,b,w,y=t.isPlainObject(n)?t.extend(!0,{},t.fn.popup.settings,n):t.extend({},t.fn.popup.settings),C=y.selector,T=y.className,P=y.error,x=y.metadata,k=y.namespace,S="."+y.namespace,E="module-"+k,O=t(this),A=t(y.context),D=t(y.scrollContext),j=t(y.boundary),F=y.target?t(y.target):O,R=0,H=!1,N=!1,V=this,M=O.data(E);w={initialize:function(){w.debug("Initializing",O),w.createID(),w.bind.events(),!w.exists()&&y.preserve&&w.create(),y.observeChanges&&w.observeChanges(),w.instantiate()},instantiate:function(){w.verbose("Storing instance",w),M=w,O.data(E,M)},observeChanges:function(){"MutationObserver"in e&&(v=new MutationObserver(w.event.documentChanged),v.observe(o,{childList:!0,subtree:!0}),w.debug("Setting up mutation observer",v))},refresh:function(){y.popup?r=t(y.popup).eq(0):y.inline&&(r=F.nextAll(C.popup).eq(0),y.popup=r),y.popup?(r.addClass(T.loading),h=w.get.offsetParent(),r.removeClass(T.loading),y.movePopup&&w.has.popup()&&w.get.offsetParent(r)[0]!==h[0]&&(w.debug("Moving popup to the same offset parent as target"),r.detach().appendTo(h))):h=y.inline?w.get.offsetParent(F):w.has.popup()?w.get.offsetParent(r):p,h.is("html")&&h[0]!==p[0]&&(w.debug("Setting page as offset parent"),h=p),w.get.variation()&&w.set.variation()},reposition:function(){w.refresh(),w.set.position()},destroy:function(){w.debug("Destroying previous module"),v&&v.disconnect(),r&&!y.preserve&&w.removePopup(),clearTimeout(w.hideTimer),clearTimeout(w.showTimer),w.unbind.close(),w.unbind.events(),O.removeData(E)},event:{start:function(e){var o=t.isPlainObject(y.delay)?y.delay.show:y.delay;clearTimeout(w.hideTimer),N||(w.showTimer=setTimeout(w.show,o))},end:function(){var e=t.isPlainObject(y.delay)?y.delay.hide:y.delay;clearTimeout(w.showTimer),w.hideTimer=setTimeout(w.hide,e)},touchstart:function(t){N=!0,w.show()},resize:function(){w.is.visible()&&w.set.position()},documentChanged:function(e){[].forEach.call(e,function(e){e.removedNodes&&[].forEach.call(e.removedNodes,function(e){(e==V||t(e).find(V).length>0)&&(w.debug("Element removed from DOM, tearing down events"),w.destroy())})})},hideGracefully:function(e){var n=t(e.target),i=t.contains(o.documentElement,e.target),r=n.closest(C.popup).length>0;e&&!r&&i?(w.debug("Click occurred outside popup hiding popup"),w.hide()):w.debug("Click was inside popup, keeping popup open")}},create:function(){var e=w.get.html(),o=w.get.title(),n=w.get.content();e||n||o?(w.debug("Creating pop-up html"),e||(e=y.templates.popup({title:o,content:n})),r=t("
").addClass(T.popup).data(x.activator,O).html(e),y.inline?(w.verbose("Inserting popup element inline",r),r.insertAfter(O)):(w.verbose("Appending popup element to body",r),r.appendTo(A)),w.refresh(),w.set.variation(),y.hoverable&&w.bind.popup(),y.onCreate.call(r,V)):0!==F.next(C.popup).length?(w.verbose("Pre-existing popup found"),y.inline=!0,y.popup=F.next(C.popup).data(x.activator,O),w.refresh(),y.hoverable&&w.bind.popup()):y.popup?(t(y.popup).data(x.activator,O),w.verbose("Used popup specified in settings"),w.refresh(),y.hoverable&&w.bind.popup()):w.debug("No content specified skipping display",V)},createID:function(){b=(Math.random().toString(16)+"000000000").substr(2,8),m="."+b,w.verbose("Creating unique id for element",b)},toggle:function(){w.debug("Toggling pop-up"),w.is.hidden()?(w.debug("Popup is hidden, showing pop-up"),w.unbind.close(),w.show()):(w.debug("Popup is visible, hiding pop-up"),w.hide())},show:function(t){if(t=t||function(){},w.debug("Showing pop-up",y.transition),w.is.hidden()&&(!w.is.active()||!w.is.dropdown())){if(w.exists()||w.create(),!1===y.onShow.call(r,V))return void w.debug("onShow callback returned false, cancelling popup animation");y.preserve||y.popup||w.refresh(),r&&w.set.position()&&(w.save.conditions(),y.exclusive&&w.hideAll(),w.animate.show(t))}},hide:function(t){if(t=t||function(){},w.is.visible()||w.is.animating()){if(!1===y.onHide.call(r,V))return void w.debug("onHide callback returned false, cancelling popup animation");w.remove.visible(),w.unbind.close(),w.restore.conditions(),w.animate.hide(t)}},hideAll:function(){t(C.popup).filter("."+T.popupVisible).each(function(){t(this).data(x.activator).popup("hide")})},exists:function(){return!!r&&(y.inline||y.popup?w.has.popup():r.closest(A).length>=1)},removePopup:function(){w.has.popup()&&!y.popup&&(w.debug("Removing popup",r),r.remove(),r=void 0,y.onRemove.call(r,V))},save:{conditions:function(){w.cache={title:O.attr("title")},w.cache.title&&O.removeAttr("title"),w.verbose("Saving original attributes",w.cache.title)}},restore:{conditions:function(){return w.cache&&w.cache.title&&(O.attr("title",w.cache.title),w.verbose("Restoring original attributes",w.cache.title)),!0}},supports:{svg:function(){return"undefined"==typeof SVGGraphicsElement}},animate:{show:function(e){e=t.isFunction(e)?e:function(){},y.transition&&void 0!==t.fn.transition&&O.transition("is supported")?(w.set.visible(),r.transition({animation:y.transition+" in",queue:!1,debug:y.debug,verbose:y.verbose,duration:y.duration,onComplete:function(){w.bind.close(),e.call(r,V),y.onVisible.call(r,V)}})):w.error(P.noTransition)},hide:function(e){if(e=t.isFunction(e)?e:function(){},w.debug("Hiding pop-up"),!1===y.onHide.call(r,V))return void w.debug("onHide callback returned false, cancelling popup animation");y.transition&&void 0!==t.fn.transition&&O.transition("is supported")?r.transition({animation:y.transition+" out",queue:!1,duration:y.duration,debug:y.debug,verbose:y.verbose,onComplete:function(){w.reset(),e.call(r,V),y.onHidden.call(r,V)}}):w.error(P.noTransition)}},change:{content:function(t){r.html(t)}},get:{html:function(){return O.removeData(x.html),O.data(x.html)||y.html},title:function(){return O.removeData(x.title),O.data(x.title)||y.title},content:function(){return O.removeData(x.content),O.data(x.content)||O.attr("title")||y.content},variation:function(){return O.removeData(x.variation),O.data(x.variation)||y.variation},popup:function(){return r},popupOffset:function(){return r.offset()},calculations:function(){var t,o=F[0],n=j[0]==e,i=y.inline||y.popup&&y.movePopup?F.position():F.offset(),a=n?{top:0,left:0}:j.offset(),p={},l=n?{top:s.scrollTop(),left:s.scrollLeft()}:{top:0,left:0};return p={target:{element:F[0],width:F.outerWidth(),height:F.outerHeight(),top:i.top,left:i.left,margin:{}},popup:{width:r.outerWidth(),height:r.outerHeight()},parent:{width:h.outerWidth(),height:h.outerHeight()},screen:{top:a.top,left:a.left,scroll:{top:l.top,left:l.left},width:j.width(),height:j.height()}},y.setFluidWidth&&w.is.fluid()&&(p.container={width:r.parent().outerWidth()},p.popup.width=p.container.width),p.target.margin.top=y.inline?parseInt(e.getComputedStyle(o).getPropertyValue("margin-top"),10):0,p.target.margin.left=y.inline?w.is.rtl()?parseInt(e.getComputedStyle(o).getPropertyValue("margin-right"),10):parseInt(e.getComputedStyle(o).getPropertyValue("margin-left"),10):0,t=p.screen,p.boundary={top:t.top+t.scroll.top,bottom:t.top+t.scroll.top+t.height,left:t.left+t.scroll.left,right:t.left+t.scroll.left+t.width},p},id:function(){return b},startEvent:function(){return"hover"==y.on?"mouseenter":"focus"==y.on&&"focus"},scrollEvent:function(){return"scroll"},endEvent:function(){return"hover"==y.on?"mouseleave":"focus"==y.on&&"blur"},distanceFromBoundary:function(t,e){var o,n,i={};return e=e||w.get.calculations(),o=e.popup,n=e.boundary,t&&(i={top:t.top-n.top,left:t.left-n.left,right:n.right-(t.left+o.width),bottom:n.bottom-(t.top+o.height)},w.verbose("Distance from boundaries determined",t,i)),i},offsetParent:function(e){var o=void 0!==e?e[0]:O[0],n=o.parentNode,i=t(n);if(n)for(var r="none"===i.css("transform"),a="static"===i.css("position"),s=i.is("html");n&&!s&&a&&r;)n=n.parentNode,i=t(n),r="none"===i.css("transform"),a="static"===i.css("position"),s=i.is("html");return i&&i.length>0?i:t()},positions:function(){return{"top left":!1,"top center":!1,"top right":!1,"bottom left":!1,"bottom center":!1,"bottom right":!1,"left center":!1,"right center":!1}},nextPosition:function(t){var e=t.split(" "),o=e[0],n=e[1],i={top:"bottom",bottom:"top",left:"right",right:"left"},r={left:"center",center:"right",right:"left"},a={"top left":"top center","top center":"top right","top right":"right center","right center":"bottom right","bottom right":"bottom center","bottom center":"bottom left","bottom left":"left center","left center":"top left"},s="top"==o||"bottom"==o,p=!1,l=!1,u=!1;return H||(w.verbose("All available positions available"),H=w.get.positions()),w.debug("Recording last position tried",t),H[t]=!0,"opposite"===y.prefer&&(u=[i[o],n],u=u.join(" "),p=!0===H[u],w.debug("Trying opposite strategy",u)),"adjacent"===y.prefer&&s&&(u=[o,r[n]],u=u.join(" "),l=!0===H[u],w.debug("Trying adjacent strategy",u)),(l||p)&&(w.debug("Using backup position",u),u=a[t]),u}},set:{position:function(t,e){if(0===F.length||0===r.length)return void w.error(P.notFound);var o,n,i,a,s,p,l,u;if(e=e||w.get.calculations(),t=t||O.data(x.position)||y.position,o=O.data(x.offset)||y.offset,n=y.distanceAway,i=e.target,a=e.popup,s=e.parent,0===i.width&&0===i.height&&!w.is.svg(i.element))return w.debug("Popup target is hidden, no action taken"),!1;switch(y.inline&&(w.debug("Adding margin to calculation",i.margin),"left center"==t||"right center"==t?(o+=i.margin.top,n+=-i.margin.left):"top left"==t||"top center"==t||"top right"==t?(o+=i.margin.left,n-=i.margin.top):(o+=i.margin.left,n+=i.margin.top)),w.debug("Determining popup position from calculations",t,e),w.is.rtl()&&(t=t.replace(/left|right/g,function(t){return"left"==t?"right":"left"}),w.debug("RTL: Popup position updated",t)),R==y.maxSearchDepth&&"string"==typeof y.lastResort&&(t=y.lastResort),t){case"top left":p={top:"auto",bottom:s.height-i.top+n,left:i.left+o,right:"auto"};break;case"top center":p={bottom:s.height-i.top+n,left:i.left+i.width/2-a.width/2+o,top:"auto",right:"auto"};break;case"top right":p={bottom:s.height-i.top+n,right:s.width-i.left-i.width-o,top:"auto",left:"auto"};break;case"left center":p={top:i.top+i.height/2-a.height/2+o,right:s.width-i.left+n,left:"auto",bottom:"auto"};break;case"right center":p={top:i.top+i.height/2-a.height/2+o,left:i.left+i.width+n,bottom:"auto",right:"auto"};break;case"bottom left":p={top:i.top+i.height+n,left:i.left+o,bottom:"auto",right:"auto"};break;case"bottom center":p={top:i.top+i.height+n,left:i.left+i.width/2-a.width/2+o,bottom:"auto",right:"auto"};break;case"bottom right":p={top:i.top+i.height+n,right:s.width-i.left-i.width-o,left:"auto",bottom:"auto"}}if(void 0===p&&w.error(P.invalidPosition,t),w.debug("Calculated popup positioning values",p),r.css(p).removeClass(T.position).addClass(t).addClass(T.loading),l=w.get.popupOffset(),u=w.get.distanceFromBoundary(l,e),w.is.offstage(u,t)){if(w.debug("Position is outside viewport",t),R0}},is:{offstage:function(e,o){var n=[];return t.each(e,function(t,e){e<-y.jitter&&(w.debug("Position exceeds allowable distance from edge",t,e,o),n.push(t))}),n.length>0},svg:function(t){return w.supports.svg()&&t instanceof SVGGraphicsElement},active:function(){return O.hasClass(T.active)},animating:function(){return void 0!==r&&r.hasClass(T.animating)},fluid:function(){return void 0!==r&&r.hasClass(T.fluid)},visible:function(){return void 0!==r&&r.hasClass(T.popupVisible)},dropdown:function(){return O.hasClass(T.dropdown)},hidden:function(){return!w.is.visible()},rtl:function(){return"rtl"==O.css("direction")}},reset:function(){w.remove.visible(),y.preserve?void 0!==t.fn.transition&&r.transition("remove transition"):w.removePopup()},setting:function(e,o){if(t.isPlainObject(e))t.extend(!0,y,e);else{if(void 0===o)return y[e];y[e]=o}},internal:function(e,o){if(t.isPlainObject(e))t.extend(!0,w,e);else{if(void 0===o)return w[e];w[e]=o}},debug:function(){!y.silent&&y.debug&&(y.performance?w.performance.log(arguments):(w.debug=Function.prototype.bind.call(console.info,console,y.name+":"),w.debug.apply(console,arguments)))},verbose:function(){!y.silent&&y.verbose&&y.debug&&(y.performance?w.performance.log(arguments):(w.verbose=Function.prototype.bind.call(console.info,console,y.name+":"),w.verbose.apply(console,arguments)))},error:function(){y.silent||(w.error=Function.prototype.bind.call(console.error,console,y.name+":"),w.error.apply(console,arguments))},performance:{log:function(t){var e,o,n;y.performance&&(e=(new Date).getTime(),n=u||e,o=e-n,u=e,c.push({Name:t[0],Arguments:[].slice.call(t,1)||"",Element:V,"Execution Time":o})),clearTimeout(w.performance.timer),w.performance.timer=setTimeout(w.performance.display,500)},display:function(){var e=y.name+":",o=0;u=!1,clearTimeout(w.performance.timer),t.each(c,function(t,e){o+=e["Execution Time"]}),e+=" "+o+"ms",l&&(e+=" '"+l+"'"),(void 0!==console.group||void 0!==console.table)&&c.length>0&&(console.groupCollapsed(e),console.table?console.table(c):t.each(c,function(t,e){console.log(e.Name+": "+e["Execution Time"]+"ms")}),console.groupEnd()),c=[]}},invoke:function(e,o,n){var r,a,s,p=M;return o=o||g,n=V||n,"string"==typeof e&&void 0!==p&&(e=e.split(/[\. ]/),r=e.length-1,t.each(e,function(o,n){var i=o!=r?n+e[o+1].charAt(0).toUpperCase()+e[o+1].slice(1):e;if(t.isPlainObject(p[i])&&o!=r)p=p[i];else{if(void 0!==p[i])return a=p[i],!1;if(!t.isPlainObject(p[n])||o==r)return void 0!==p[n]&&(a=p[n],!1);p=p[n]}})),t.isFunction(a)?s=a.apply(n,o):void 0!==a&&(s=a),t.isArray(i)?i.push(s):void 0!==i?i=[i,s]:void 0!==s&&(i=s),a}},f?(void 0===M&&w.initialize(),w.invoke(d)):(void 0!==M&&M.invoke("destroy"),w.initialize())}),void 0!==i?i:this},t.fn.popup.settings={name:"Popup",silent:!1,debug:!1,verbose:!1,performance:!0,namespace:"popup",observeChanges:!0,onCreate:function(){},onRemove:function(){},onShow:function(){},onVisible:function(){},onHide:function(){},onUnplaceable:function(){},onHidden:function(){},on:"hover",boundary:e,addTouchEvents:!0,position:"top left",variation:"",movePopup:!0,target:!1,popup:!1,inline:!1,preserve:!1,hoverable:!1,content:!1,html:!1,title:!1,closable:!0,hideOnScroll:"auto",exclusive:!1,context:"body",scrollContext:e,prefer:"opposite",lastResort:!1,delay:{show:50,hide:70},setFluidWidth:!0,duration:200,transition:"scale",distanceAway:0,jitter:2,offset:0,maxSearchDepth:15,error:{invalidPosition:"The position you specified is not a valid position",cannotPlace:"Popup does not fit within the boundaries of the viewport",method:"The method you called is not defined.",noTransition:"This module requires ui transitions ",notFound:"The target or popup you specified does not exist on the page"},metadata:{activator:"activator",content:"content",html:"html",offset:"offset",position:"position",title:"title",variation:"variation"},className:{active:"active",animating:"animating",dropdown:"dropdown",fluid:"fluid",loading:"loading",popup:"ui popup",position:"top left center bottom right",visible:"visible",popupVisible:"visible"},selector:{popup:".ui.popup"},templates:{escape:function(t){var e=/[&<>"'`]/g,o=/[&<>"'`]/,n={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},i=function(t){return n[t]};return o.test(t)?t.replace(e,i):t},popup:function(e){var o="",n=t.fn.popup.settings.templates.escape;return void 0!==typeof e&&(void 0!==typeof e.title&&e.title&&(e.title=n(e.title),o+='
'+e.title+"
"),void 0!==typeof e.content&&e.content&&(e.content=n(e.content),o+='
'+e.content+"
")),o}}}}(jQuery,window,document); \ No newline at end of file +!function(t,e,o,n){"use strict";e=void 0!==e&&e.Math==Math?e:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),t.fn.popup=function(i){var r,a=t(this),s=t(o),p=t(e),l=t("body"),u=a.selector||"",c=(new Date).getTime(),d=[],f=arguments[0],g="string"==typeof f,h=[].slice.call(arguments,1);return a.each(function(){var a,m,v,b,w,y,C=t.isPlainObject(i)?t.extend(!0,{},t.fn.popup.settings,i):t.extend({},t.fn.popup.settings),T=C.selector,P=C.className,x=C.error,k=C.metadata,S=C.namespace,E="."+C.namespace,O="module-"+S,A=t(this),D=t(C.context),j=t(C.scrollContext),F=t(C.boundary),R=C.target?t(C.target):A,H=0,N=!1,V=!1,M=this,W=A.data(O);y={initialize:function(){y.debug("Initializing",A),y.createID(),y.bind.events(),!y.exists()&&C.preserve&&y.create(),C.observeChanges&&y.observeChanges(),y.instantiate()},instantiate:function(){y.verbose("Storing instance",y),W=y,A.data(O,W)},observeChanges:function(){"MutationObserver"in e&&((v=new MutationObserver(y.event.documentChanged)).observe(o,{childList:!0,subtree:!0}),y.debug("Setting up mutation observer",v))},refresh:function(){C.popup?a=t(C.popup).eq(0):C.inline&&(a=R.nextAll(T.popup).eq(0),C.popup=a),C.popup?(a.addClass(P.loading),m=y.get.offsetParent(),a.removeClass(P.loading),C.movePopup&&y.has.popup()&&y.get.offsetParent(a)[0]!==m[0]&&(y.debug("Moving popup to the same offset parent as target"),a.detach().appendTo(m))):m=C.inline?y.get.offsetParent(R):y.has.popup()?y.get.offsetParent(a):l,m.is("html")&&m[0]!==l[0]&&(y.debug("Setting page as offset parent"),m=l),y.get.variation()&&y.set.variation()},reposition:function(){y.refresh(),y.set.position()},destroy:function(){y.debug("Destroying previous module"),v&&v.disconnect(),a&&!C.preserve&&y.removePopup(),clearTimeout(y.hideTimer),clearTimeout(y.showTimer),y.unbind.close(),y.unbind.events(),A.removeData(O)},event:{start:function(e){var o=t.isPlainObject(C.delay)?C.delay.show:C.delay;clearTimeout(y.hideTimer),V||(y.showTimer=setTimeout(y.show,o))},end:function(){var e=t.isPlainObject(C.delay)?C.delay.hide:C.delay;clearTimeout(y.showTimer),y.hideTimer=setTimeout(y.hide,e)},touchstart:function(t){V=!0,y.show()},resize:function(){y.is.visible()&&y.set.position()},documentChanged:function(e){[].forEach.call(e,function(e){e.removedNodes&&[].forEach.call(e.removedNodes,function(e){(e==M||t(e).find(M).length>0)&&(y.debug("Element removed from DOM, tearing down events"),y.destroy())})})},hideGracefully:function(e){var n=t(e.target),i=t.contains(o.documentElement,e.target),r=n.closest(T.popup).length>0;e&&!r&&i?(y.debug("Click occurred outside popup hiding popup"),y.hide()):y.debug("Click was inside popup, keeping popup open")}},create:function(){var e=y.get.html(),o=y.get.title(),n=y.get.content();e||n||o?(y.debug("Creating pop-up html"),e||(e=C.templates.popup({title:o,content:n})),a=t("
").addClass(P.popup).data(k.activator,A).html(e),C.inline?(y.verbose("Inserting popup element inline",a),a.insertAfter(A)):(y.verbose("Appending popup element to body",a),a.appendTo(D)),y.refresh(),y.set.variation(),C.hoverable&&y.bind.popup(),C.onCreate.call(a,M)):0!==R.next(T.popup).length?(y.verbose("Pre-existing popup found"),C.inline=!0,C.popup=R.next(T.popup).data(k.activator,A),y.refresh(),C.hoverable&&y.bind.popup()):C.popup?(t(C.popup).data(k.activator,A),y.verbose("Used popup specified in settings"),y.refresh(),C.hoverable&&y.bind.popup()):y.debug("No content specified skipping display",M)},createID:function(){w=(Math.random().toString(16)+"000000000").substr(2,8),b="."+w,y.verbose("Creating unique id for element",w)},toggle:function(){y.debug("Toggling pop-up"),y.is.hidden()?(y.debug("Popup is hidden, showing pop-up"),y.unbind.close(),y.show()):(y.debug("Popup is visible, hiding pop-up"),y.hide())},show:function(t){if(t=t||function(){},y.debug("Showing pop-up",C.transition),y.is.hidden()&&(!y.is.active()||!y.is.dropdown())){if(y.exists()||y.create(),!1===C.onShow.call(a,M))return void y.debug("onShow callback returned false, cancelling popup animation");C.preserve||C.popup||y.refresh(),a&&y.set.position()&&(y.save.conditions(),C.exclusive&&y.hideAll(),y.animate.show(t))}},hide:function(t){if(t=t||function(){},y.is.visible()||y.is.animating()){if(!1===C.onHide.call(a,M))return void y.debug("onHide callback returned false, cancelling popup animation");y.remove.visible(),y.unbind.close(),y.restore.conditions(),y.animate.hide(t)}},hideAll:function(){t(T.popup).filter("."+P.popupVisible).each(function(){t(this).data(k.activator).popup("hide")})},exists:function(){return!!a&&(C.inline||C.popup?y.has.popup():a.closest(D).length>=1)},removePopup:function(){y.has.popup()&&!C.popup&&(y.debug("Removing popup",a),a.remove(),a=n,C.onRemove.call(a,M))},save:{conditions:function(){y.cache={title:A.attr("title")},y.cache.title&&A.removeAttr("title"),y.verbose("Saving original attributes",y.cache.title)}},restore:{conditions:function(){return y.cache&&y.cache.title&&(A.attr("title",y.cache.title),y.verbose("Restoring original attributes",y.cache.title)),!0}},supports:{svg:function(){return"undefined"==typeof SVGGraphicsElement}},animate:{show:function(e){e=t.isFunction(e)?e:function(){},C.transition&&t.fn.transition!==n&&A.transition("is supported")?(y.set.visible(),a.transition({animation:C.transition+" in",queue:!1,debug:C.debug,verbose:C.verbose,duration:C.duration,onComplete:function(){y.bind.close(),e.call(a,M),C.onVisible.call(a,M)}})):y.error(x.noTransition)},hide:function(e){e=t.isFunction(e)?e:function(){},y.debug("Hiding pop-up"),!1!==C.onHide.call(a,M)?C.transition&&t.fn.transition!==n&&A.transition("is supported")?a.transition({animation:C.transition+" out",queue:!1,duration:C.duration,debug:C.debug,verbose:C.verbose,onComplete:function(){y.reset(),e.call(a,M),C.onHidden.call(a,M)}}):y.error(x.noTransition):y.debug("onHide callback returned false, cancelling popup animation")}},change:{content:function(t){a.html(t)}},get:{html:function(){return A.removeData(k.html),A.data(k.html)||C.html},title:function(){return A.removeData(k.title),A.data(k.title)||C.title},content:function(){return A.removeData(k.content),A.data(k.content)||A.attr("title")||C.content},variation:function(){return A.removeData(k.variation),A.data(k.variation)||C.variation},popup:function(){return a},popupOffset:function(){return a.offset()},calculations:function(){var t,o=R[0],n=F[0]==e,i=C.inline||C.popup&&C.movePopup?R.position():R.offset(),r=n?{top:0,left:0}:F.offset(),s={},l=n?{top:p.scrollTop(),left:p.scrollLeft()}:{top:0,left:0};return s={target:{element:R[0],width:R.outerWidth(),height:R.outerHeight(),top:i.top,left:i.left,margin:{}},popup:{width:a.outerWidth(),height:a.outerHeight()},parent:{width:m.outerWidth(),height:m.outerHeight()},screen:{top:r.top,left:r.left,scroll:{top:l.top,left:l.left},width:F.width(),height:F.height()}},C.setFluidWidth&&y.is.fluid()&&(s.container={width:a.parent().outerWidth()},s.popup.width=s.container.width),s.target.margin.top=C.inline?parseInt(e.getComputedStyle(o).getPropertyValue("margin-top"),10):0,s.target.margin.left=C.inline?y.is.rtl()?parseInt(e.getComputedStyle(o).getPropertyValue("margin-right"),10):parseInt(e.getComputedStyle(o).getPropertyValue("margin-left"),10):0,t=s.screen,s.boundary={top:t.top+t.scroll.top,bottom:t.top+t.scroll.top+t.height,left:t.left+t.scroll.left,right:t.left+t.scroll.left+t.width},s},id:function(){return w},startEvent:function(){return"hover"==C.on?"mouseenter":"focus"==C.on&&"focus"},scrollEvent:function(){return"scroll"},endEvent:function(){return"hover"==C.on?"mouseleave":"focus"==C.on&&"blur"},distanceFromBoundary:function(t,e){var o,n,i={};return o=(e=e||y.get.calculations()).popup,n=e.boundary,t&&(i={top:t.top-n.top,left:t.left-n.left,right:n.right-(t.left+o.width),bottom:n.bottom-(t.top+o.height)},y.verbose("Distance from boundaries determined",t,i)),i},offsetParent:function(e){var o=(e!==n?e[0]:R[0]).parentNode,i=t(o);if(o)for(var r="none"===i.css("transform"),a="static"===i.css("position"),s=i.is("html");o&&!s&&a&&r;)o=o.parentNode,r="none"===(i=t(o)).css("transform"),a="static"===i.css("position"),s=i.is("html");return i&&i.length>0?i:t()},positions:function(){return{"top left":!1,"top center":!1,"top right":!1,"bottom left":!1,"bottom center":!1,"bottom right":!1,"left center":!1,"right center":!1}},nextPosition:function(t){var e=t.split(" "),o=e[0],n=e[1],i="top"==o||"bottom"==o,r=!1,a=!1,s=!1;return N||(y.verbose("All available positions available"),N=y.get.positions()),y.debug("Recording last position tried",t),N[t]=!0,"opposite"===C.prefer&&(s=(s=[{top:"bottom",bottom:"top",left:"right",right:"left"}[o],n]).join(" "),r=!0===N[s],y.debug("Trying opposite strategy",s)),"adjacent"===C.prefer&&i&&(s=(s=[o,{left:"center",center:"right",right:"left"}[n]]).join(" "),a=!0===N[s],y.debug("Trying adjacent strategy",s)),(a||r)&&(y.debug("Using backup position",s),s={"top left":"top center","top center":"top right","top right":"right center","right center":"bottom right","bottom right":"bottom center","bottom center":"bottom left","bottom left":"left center","left center":"top left"}[t]),s}},set:{position:function(t,e){if(0!==R.length&&0!==a.length){var o,i,r,s,p,l,u,c;if(e=e||y.get.calculations(),t=t||A.data(k.position)||C.position,o=A.data(k.offset)||C.offset,i=C.distanceAway,r=e.target,s=e.popup,p=e.parent,0===r.width&&0===r.height&&!y.is.svg(r.element))return y.debug("Popup target is hidden, no action taken"),!1;switch(C.inline&&(y.debug("Adding margin to calculation",r.margin),"left center"==t||"right center"==t?(o+=r.margin.top,i+=-r.margin.left):"top left"==t||"top center"==t||"top right"==t?(o+=r.margin.left,i-=r.margin.top):(o+=r.margin.left,i+=r.margin.top)),y.debug("Determining popup position from calculations",t,e),y.is.rtl()&&(t=t.replace(/left|right/g,function(t){return"left"==t?"right":"left"}),y.debug("RTL: Popup position updated",t)),H==C.maxSearchDepth&&"string"==typeof C.lastResort&&(t=C.lastResort),t){case"top left":l={top:"auto",bottom:p.height-r.top+i,left:r.left+o,right:"auto"};break;case"top center":l={bottom:p.height-r.top+i,left:r.left+r.width/2-s.width/2+o,top:"auto",right:"auto"};break;case"top right":l={bottom:p.height-r.top+i,right:p.width-r.left-r.width-o,top:"auto",left:"auto"};break;case"left center":l={top:r.top+r.height/2-s.height/2+o,right:p.width-r.left+i,left:"auto",bottom:"auto"};break;case"right center":l={top:r.top+r.height/2-s.height/2+o,left:r.left+r.width+i,bottom:"auto",right:"auto"};break;case"bottom left":l={top:r.top+r.height+i,left:r.left+o,bottom:"auto",right:"auto"};break;case"bottom center":l={top:r.top+r.height+i,left:r.left+r.width/2-s.width/2+o,bottom:"auto",right:"auto"};break;case"bottom right":l={top:r.top+r.height+i,right:p.width-r.left-r.width-o,left:"auto",bottom:"auto"}}if(l===n&&y.error(x.invalidPosition,t),y.debug("Calculated popup positioning values",l),a.css(l).removeClass(P.position).addClass(t).addClass(P.loading),u=y.get.popupOffset(),c=y.get.distanceFromBoundary(u,e),y.is.offstage(c,t)){if(y.debug("Position is outside viewport",t),H0}},is:{offstage:function(e,o){var n=[];return t.each(e,function(t,e){e<-C.jitter&&(y.debug("Position exceeds allowable distance from edge",t,e,o),n.push(t))}),n.length>0},svg:function(t){return y.supports.svg()&&t instanceof SVGGraphicsElement},active:function(){return A.hasClass(P.active)},animating:function(){return a!==n&&a.hasClass(P.animating)},fluid:function(){return a!==n&&a.hasClass(P.fluid)},visible:function(){return a!==n&&a.hasClass(P.popupVisible)},dropdown:function(){return A.hasClass(P.dropdown)},hidden:function(){return!y.is.visible()},rtl:function(){return"rtl"==A.css("direction")}},reset:function(){y.remove.visible(),C.preserve?t.fn.transition!==n&&a.transition("remove transition"):y.removePopup()},setting:function(e,o){if(t.isPlainObject(e))t.extend(!0,C,e);else{if(o===n)return C[e];C[e]=o}},internal:function(e,o){if(t.isPlainObject(e))t.extend(!0,y,e);else{if(o===n)return y[e];y[e]=o}},debug:function(){!C.silent&&C.debug&&(C.performance?y.performance.log(arguments):(y.debug=Function.prototype.bind.call(console.info,console,C.name+":"),y.debug.apply(console,arguments)))},verbose:function(){!C.silent&&C.verbose&&C.debug&&(C.performance?y.performance.log(arguments):(y.verbose=Function.prototype.bind.call(console.info,console,C.name+":"),y.verbose.apply(console,arguments)))},error:function(){C.silent||(y.error=Function.prototype.bind.call(console.error,console,C.name+":"),y.error.apply(console,arguments))},performance:{log:function(t){var e,o;C.performance&&(o=(e=(new Date).getTime())-(c||e),c=e,d.push({Name:t[0],Arguments:[].slice.call(t,1)||"",Element:M,"Execution Time":o})),clearTimeout(y.performance.timer),y.performance.timer=setTimeout(y.performance.display,500)},display:function(){var e=C.name+":",o=0;c=!1,clearTimeout(y.performance.timer),t.each(d,function(t,e){o+=e["Execution Time"]}),e+=" "+o+"ms",u&&(e+=" '"+u+"'"),(console.group!==n||console.table!==n)&&d.length>0&&(console.groupCollapsed(e),console.table?console.table(d):t.each(d,function(t,e){console.log(e.Name+": "+e["Execution Time"]+"ms")}),console.groupEnd()),d=[]}},invoke:function(e,o,i){var a,s,p,l=W;return o=o||h,i=M||i,"string"==typeof e&&l!==n&&(e=e.split(/[\. ]/),a=e.length-1,t.each(e,function(o,i){var r=o!=a?i+e[o+1].charAt(0).toUpperCase()+e[o+1].slice(1):e;if(t.isPlainObject(l[r])&&o!=a)l=l[r];else{if(l[r]!==n)return s=l[r],!1;if(!t.isPlainObject(l[i])||o==a)return l[i]!==n&&(s=l[i],!1);l=l[i]}})),t.isFunction(s)?p=s.apply(i,o):s!==n&&(p=s),t.isArray(r)?r.push(p):r!==n?r=[r,p]:p!==n&&(r=p),s}},g?(W===n&&y.initialize(),y.invoke(f)):(W!==n&&W.invoke("destroy"),y.initialize())}),r!==n?r:this},t.fn.popup.settings={name:"Popup",silent:!1,debug:!1,verbose:!1,performance:!0,namespace:"popup",observeChanges:!0,onCreate:function(){},onRemove:function(){},onShow:function(){},onVisible:function(){},onHide:function(){},onUnplaceable:function(){},onHidden:function(){},on:"hover",boundary:e,addTouchEvents:!0,position:"top left",variation:"",movePopup:!0,target:!1,popup:!1,inline:!1,preserve:!1,hoverable:!1,content:!1,html:!1,title:!1,closable:!0,hideOnScroll:"auto",exclusive:!1,context:"body",scrollContext:e,prefer:"opposite",lastResort:!1,delay:{show:50,hide:70},setFluidWidth:!0,duration:200,transition:"scale",distanceAway:0,jitter:2,offset:0,maxSearchDepth:15,error:{invalidPosition:"The position you specified is not a valid position",cannotPlace:"Popup does not fit within the boundaries of the viewport",method:"The method you called is not defined.",noTransition:"This module requires ui transitions ",notFound:"The target or popup you specified does not exist on the page"},metadata:{activator:"activator",content:"content",html:"html",offset:"offset",position:"position",title:"title",variation:"variation"},className:{active:"active",animating:"animating",dropdown:"dropdown",fluid:"fluid",loading:"loading",popup:"ui popup",position:"top left center bottom right",visible:"visible",popupVisible:"visible"},selector:{popup:".ui.popup"},templates:{escape:function(t){var e={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"};return/[&<>"'`]/.test(t)?t.replace(/[&<>"'`]/g,function(t){return e[t]}):t},popup:function(e){var o="",i=t.fn.popup.settings.templates.escape;return typeof e!==n&&(typeof e.title!==n&&e.title&&(e.title=i(e.title),o+='
'+e.title+"
"),typeof e.content!==n&&e.content&&(e.content=i(e.content),o+='
'+e.content+"
")),o}}}}(jQuery,window,document); \ No newline at end of file