diff --git a/nested_admin/static/nested_admin/dist/nested_admin.js b/nested_admin/static/nested_admin/dist/nested_admin.js index edd4f4b..b557e97 100644 --- a/nested_admin/static/nested_admin/dist/nested_admin.js +++ b/nested_admin/static/nested_admin/dist/nested_admin.js @@ -3886,7 +3886,7 @@ DJNesting.updateFormAttributes = function ($elem, search, replace, selector) { var addBackMethod = $.fn.addBack ? 'addBack' : 'andSelf'; $elem.find(selector)[addBackMethod]().each(function () { var $node = $(this), - attrs = ['id', 'name', 'for', 'href', 'class', 'onclick', 'data-inline-formset']; + attrs = ['id', 'name', 'for', 'href', 'class', 'onclick', 'data-inline-formset', 'data-django-croppable-image-for', 'data-django-croppable-crop-for']; $.each(attrs, function (i, attrName) { var attrVal = $node.attr(attrName); diff --git a/nested_admin/static/nested_admin/dist/nested_admin.js.map b/nested_admin/static/nested_admin/dist/nested_admin.js.map index 07b84c6..8a65abe 100644 --- a/nested_admin/static/nested_admin/dist/nested_admin.js.map +++ b/nested_admin/static/nested_admin/dist/nested_admin.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../../webpack/bootstrap","../src/nested-admin/grp$.js","../src/nested-admin/index.js","../src/nested-admin/jquery.djangoformset.js","../src/nested-admin/jquery.djnutils.js","../src/nested-admin/jquery.shim.js","../src/nested-admin/jquery.ui.djnsortable.js","../src/nested-admin/jquery.ui.nestedsortable.js","../src/nested-admin/regexquote.js","../src/nested-admin/sortable.js","../src/nested-admin/utils.js","webpack://DJNesting/./nested_admin/static/nested_admin/src/nested_admin.scss?4513","../../../../node_modules/core-js/modules/_a-function.js","../../../../node_modules/core-js/modules/_add-to-unscopables.js","../../../../node_modules/core-js/modules/_an-object.js","../../../../node_modules/core-js/modules/_array-methods.js","../../../../node_modules/core-js/modules/_array-species-constructor.js","../../../../node_modules/core-js/modules/_array-species-create.js","../../../../node_modules/core-js/modules/_cof.js","../../../../node_modules/core-js/modules/_core.js","../../../../node_modules/core-js/modules/_ctx.js","../../../../node_modules/core-js/modules/_defined.js","../../../../node_modules/core-js/modules/_descriptors.js","../../../../node_modules/core-js/modules/_dom-create.js","../../../../node_modules/core-js/modules/_export.js","../../../../node_modules/core-js/modules/_fails.js","../../../../node_modules/core-js/modules/_fix-re-wks.js","../../../../node_modules/core-js/modules/_global.js","../../../../node_modules/core-js/modules/_has.js","../../../../node_modules/core-js/modules/_hide.js","../../../../node_modules/core-js/modules/_ie8-dom-define.js","../../../../node_modules/core-js/modules/_iobject.js","../../../../node_modules/core-js/modules/_is-array.js","../../../../node_modules/core-js/modules/_is-object.js","../../../../node_modules/core-js/modules/_is-regexp.js","../../../../node_modules/core-js/modules/_object-dp.js","../../../../node_modules/core-js/modules/_property-desc.js","../../../../node_modules/core-js/modules/_redefine.js","../../../../node_modules/core-js/modules/_shared.js","../../../../node_modules/core-js/modules/_strict-method.js","../../../../node_modules/core-js/modules/_to-integer.js","../../../../node_modules/core-js/modules/_to-length.js","../../../../node_modules/core-js/modules/_to-object.js","../../../../node_modules/core-js/modules/_to-primitive.js","../../../../node_modules/core-js/modules/_uid.js","../../../../node_modules/core-js/modules/_wks.js","../../../../node_modules/core-js/modules/es6.array.find.js","../../../../node_modules/core-js/modules/es6.array.sort.js","../../../../node_modules/core-js/modules/es6.function.name.js","../../../../node_modules/core-js/modules/es6.regexp.match.js","../../../../node_modules/core-js/modules/es6.regexp.replace.js","../../../../node_modules/core-js/modules/es6.regexp.split.js","../../../../external \"grappelli\"","../../../../external \"grp\""],"names":["$","require","grp$","$sel","window","grp","jQuery","fn","init","$grpSel","prevObject","module","exports","grappelli","DJNesting","DjangoFormset","document","ready","filter","i","element","childNodes","length","css","not","closest","addClass","on","onMutate","e","$inline","$items","find","$rows","children","removeClass","each","row","n","rootGroup","djangoFormset","updatePositions","djangoFormsetPrefix","trigger","regexQuote","pluginName","inline","opts","emptyClass","predeleteClass","prefix","_$totalForms","attr","_$template","inlineModelClassName","djnData","extend","childTypes","data","options","formsetFkModel","addButtonSelector","removeButtonSelector","deleteButtonSelector","formClass","formClassSelector","initRelatedFields","initAutocompleteFields","_setupPolymorphic","_bindEvents","_initializeForms","is","createSortable","Error","menu","forEach","c","type","name","$addButton","$menu","after","totalForms","mgmtVal","maxForms","parents","hide","_initializeForm","form","$form","formPrefix","djangoFormPrefix","hasClass","toggleClass","minForms","self","hideRemoveButton","djangoFormsetForms","showHideMethod","$el","off","preventDefault","stopPropagation","next","add","hideMenu","show","$menuButtons","parent","polymorphicType","target","remove","deleteClickHandler","stopImmediatePropagation","$deleteInput","undelete","$deleteButton","index","djangoFormIndex","isInitial","innerHTML","_fillGap","delete","checked","$childInline","childFormset","removeAttr","spliceIndex","ctype","$template","clone","id","isNested","replace","append","createContainerElement","updateFormAttributes","RegExp","$firstTemplate","eq","compatibleParents","el","fkModel","compatModels","parentModel","isPolymorphic","indexOf","input","value","setAttribute","parentNode","appendChild","removeChild","insertBefore","isNumeric","spliceInto","reinitDateTimeFields","DjangoInlines","initPrepopulatedFields","reinitDateTimeShortCuts","updateSelectFilter","grp_collapsible","addBackMethod","addBack","toggle_handler_slctr","closed_css","open_css","on_toggle","curated_content_type","formsetModelClassName","$buttons","$initialForm","$newForm","formsets","toArray","sort","a","b","oldIndex","oldFormPrefixRegex","_makeRoomForInsert","initialFormCount","totalFormCount","gapIndex","$existingForm","isNewAddition","oldFormsetPrefix","newFormsetPrefix","newIndex","$before","currentPosition","prevAll","$oldInline","$currentFormInline","oldDjangoFormset","$parentInline","$parentForm","parentPkField","pk","$parentPk","djangoFormField","val","setTimeout","newValue","$field","parseInt","args","arguments","makeArray","slice","prototype","prefixCache","inlineFormsetData","nestedOptions","djangoPrefixIndex","$this","first","forattr","$group","groupId","cacheKey","match","substr","getElementById","prefixIndex","filterDjangoFormsetForms","formsetPrefix","formId","getAttribute","formIndex","forms","$forms","sortedForms","Array","push","apply","pushStack","fieldName","$empty","matches","isNaN","namePrefix","fieldPart","substring","fieldNameData","prefixAndIndex","filterDjangoField","djRegexCache","fieldId","django","ui","undefined","t","s","r","o","nodeName","toLowerCase","href","test","disabled","expr","filters","visible","version","keyCode","BACKSPACE","COMMA","DELETE","DOWN","END","ENTER","ESCAPE","HOME","LEFT","NUMPAD_ADD","NUMPAD_DECIMAL","NUMPAD_DIVIDE","NUMPAD_ENTER","NUMPAD_MULTIPLY","NUMPAD_SUBTRACT","PAGE_DOWN","PAGE_UP","PERIOD","RIGHT","SPACE","TAB","UP","focus","call","scrollParent","ie","zIndex","uniqueId","removeUniqueId","createPseudo","focusable","tabbable","outerWidth","jquery","parseFloat","innerWidth","innerHeight","outerHeight","removeData","camelCase","exec","navigator","userAgent","support","selectstart","createElement","disableSelection","bind","enableSelection","unbind","plugin","plugins","nodeType","hasScroll","cleanData","triggerHandler","widget","h","l","u","split","Widget","_createWidget","_proto","_childConstructors","isFunction","_super","_superApply","widgetEventPrefix","constructor","namespace","widgetName","widgetFullName","bridge","hasOwnProperty","isPlainObject","concat","charAt","get","error","option","_init","defaultElement","create","uuid","eventNamespace","_getCreateOptions","bindings","hoverable","_on","destroy","style","ownerDocument","defaultView","parentWindow","_create","_trigger","_getCreateEventData","noop","_destroy","shift","pop","_setOptions","_setOption","enable","disable","guid","delegate","_off","join","undelegate","_delay","_hoverable","mouseenter","currentTarget","mouseleave","_focusable","focusin","focusout","Event","originalEvent","isDefaultPrevented","effect","duration","isEmptyObject","complete","delay","effects","easing","queue","mouseup","cancel","distance","_mouseInit","_mouseDown","started","_mouseDestroy","_mouseMoveDelegate","_mouseUpDelegate","_mouseStarted","_mouseUp","_mouseDownEvent","which","_mouseCapture","mouseDelayMet","_mouseDelayTimer","_mouseDistanceMet","_mouseDelayMet","_mouseStart","_mouseMove","documentMode","button","_mouseDrag","_mouseStop","Math","max","abs","pageX","pageY","p","width","height","offset","top","left","isWindow","scrollTop","scrollLeft","round","d","f","position","scrollbarWidth","offsetWidth","clientWidth","getScrollInfo","scrollWidth","scrollHeight","getWithinInfo","of","m","g","v","y","_","within","x","k","collision","w","at","D","T","M","S","my","offsetFractions","marginLeft","marginTop","targetWidth","targetHeight","elemWidth","elemHeight","collisionPosition","collisionWidth","collisionHeight","elem","using","horizontal","vertical","important","fit","flip","flipfit","getElementsByTagName","visibility","border","margin","background","documentElement","firstChild","cssText","mouse","appendTo","axis","connectWith","containment","cursor","cursorAt","dropOnEmpty","forcePlaceholderSize","forceHelperSize","grid","handle","helper","items","opacity","placeholder","revert","scroll","scrollSensitivity","scrollSpeed","scope","tolerance","_isOverAxis","reference","size","containerCache","refresh","floating","item","key","event","overrideHandle","that","reverting","_refreshItems","currentItem","nodes","validHandle","_removeCurrentsFromItems","noActivation","currentContainer","refreshPositions","_createHelper","_cacheHelperProportions","_cacheMargins","margins","click","_getParentOffset","relative","_getRelativeOffset","cssPosition","originalPosition","_generatePosition","originalPageX","originalPageY","_adjustOffsetFromHelper","domPosition","prev","_createPlaceholder","_setContainment","_storedCursor","_storedOpacity","_storedZIndex","tagName","overflowOffset","_uiHash","_preserveHelperProportions","containers","ddmanager","current","dropBehaviour","prepareOffsets","dragging","positionAbs","_convertPositionTo","lastPositionAbs","scrolled","offsetHeight","itemElement","intersection","_intersectsWithPointer","instance","contains","direction","_intersectsWithSides","_rearrange","_contactContainers","drag","noPropagation","drop","cur","animate","offsetParent","body","_clear","_storedCSS","over","_noFinalSort","prepend","serialize","_getItemsAsjQuery","connected","str","res","attribute","expression","ret","_intersectsWith","x1","x2","helperProportions","y1","y2","dyClick","dxClick","isOverElement","forcePointerForContainers","isOverElementHeight","isOverElementWidth","verticalDirection","_getDragVerticalDirection","horizontalDirection","_getDragHorizontalDirection","isOverBottomHalf","isOverRightHalf","delta","_connectWith","String","queries","j","inst","list","grep","targetData","_queries","queriesLength","fast","toleranceElement","custom","refreshContainers","className","update","container","innermostContainer","innermostIndex","dist","itemWithLeastDistance","posProperty","sizeProperty","base","nearBottom","obj","isArray","right","bottom","po","ce","co","pos","mod","scrollIsRootNode","hardRefresh","nextSibling","counter","delayedTriggers","before","fromOutside","cancelHelperRemoval","handler","handlerProxy","_inst","sender","nearest","selector","node","parentsUntil","expando","random","createChildNestedSortable","childContainer","$childContainer","widgetConstructor","newInstance","$otherContainer","addToConnectWith","otherInstance","djnsortable","tabSize","disableNesting","errorClass","nestedContainerSelector","doNotClear","containerElementSelector","listItemSelector","maxLevels","revertOnError","protectRoot","rootID","rtl","fixedNestingDepth","showErrorDiv","keepInParent","isAllowed","canConnectWith","container1","container2","model1","model2","instance2","container1Level","_getLevel","container2Level","$element","dataOptions","_connectWithMap","$document","originalConnectWith","lastItemElement","$itemElement","containerSel","$childItems","itemElementClosestContainer","_clearEmpty","_parentItem","parentItem","level","childLevels","_getChildLevels","placeholderClassName","phClassSearch","phOrigClassName","phOrigClassNameEndPos","previousItem","previousSibling","nextItem","beyondMaxLevels","containerInstance","_isAllowed","$previousItemChildContainer","lastRearrangedElement","placeholderParentItem","comparisonElement","previousTopOffset","sDepth","startDepthCount","_recursiveArray","depth","pid","$item","childContainers","result","child","levels","isRoot","origConnectWith","$elements","splice","newContainer","nestedSortable","count","groupData","fieldNames","groupFkName","formsetFkName","parentPkVal","parentPrefix","sortableOptions","sortableExcludes","$parentGroup","parentFieldNames","parentPkFieldName","regex","$inlineLabel","html","$fields","$positionField","setPosition","hasValue","siblings","inArray","$currentItem","$originalTr","trTagName","prop","$tr","$originalTd","tdTagName","numColumns","td","$placeholder","$currItem","paddingTop","paddingBottom","paddingLeft","paddingRight","childModels","currentModel","isPolymorphicChild","start","stop","receive","$nextItem","nextAll","$elem","search","$node","attrs","attrName","attrVal","JSON","parse","dependencyIds","map","LOOKUP_URLS","related","lookupUrls","lookupFields","lookupRelated","fk","grp_related_fk","lookup_url","m2m","grp_related_m2m","generic","contentType","objectId","grp_related_generic","content_type","object_id","lookupAutocomplete","grp_autocomplete_fk","autocomplete_lookup_url","autocomplete","grp_autocomplete_m2m","grp_autocomplete_generic","field","$input","dependencyList","dependencies","prepopulate","DateTimeShortcuts","SelectFilter","namearr","patchSelectFilter","oldFn","field_id","field_name","is_stacked","djangoFuncs","funcName","patchDjangoFunction","callCount","django_fn_patch","grpFuncs","patchGrpFunction","grp_fn_patch"],"mappings":";;AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAK;AACL;AACA;;AAEA;AACA;AACA,yDAAiD,cAAc;AAC/D;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;;AAGA;AACA;;;;;;;;;;;;;;;ACnEA,IAAMA,IAAI,mBAAAC,CAAA,4FAAAA,CAAV;AAEA;;;;;;;;AAMA,SAASC,IAAT,CAAcC,IAAd,EAAoB;AAClB,MAAI,OAAOC,OAAOC,GAAd,KAAsB,WAA1B,EAAuC;AACrC,WAAOL,EAAEG,IAAF,CAAP;AACD;;AACD,MAAIC,OAAOC,GAAP,CAAWC,MAAX,CAAkBC,EAAlB,CAAqBC,IAArB,KAA8BR,EAAEO,EAAF,CAAKC,IAAvC,EAA6C;AAC3C,WAAOR,EAAEG,IAAF,CAAP;AACD;;AACD,MAAMM,UAAUL,OAAOC,GAAP,CAAWC,MAAX,CAAkBH,IAAlB,CAAhB;;AACA,MAAIA,KAAKO,UAAT,EAAqB;AACnBD,YAAQC,UAAR,GAAqBR,KAAKC,KAAKO,UAAV,CAArB;AACD;;AACD,SAAOD,OAAP;AACD;;AAEDE,OAAOC,OAAP,GAAiBV,IAAjB,C;;;;;;;;;;;;;;;;ACtBA,IAAMF,IAAI,mBAAAC,CAAA,4FAAAA,CAAV;;AACA,IAAMY,YAAY,mBAAAZ,CAAQ,4BAAR,CAAlB;;AACA,IAAMa,YAAY,mBAAAb,CAAA,6EAAAA,CAAlB;;AACAa,UAAUC,aAAV,GAA0B,mBAAAd,CAAA,2GAA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ACA;AACA;AACA,mJAAwF;AACxF;AACA;AACA;;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,eAAe;AACzB;AACA;AACA;AACA,wCAAwC;AACxC;AACA,8BAA8B;AAC9B,6BAA6B;AAC7B,+BAA+B;AAC/B,mCAAmC;AACnC,SAAS,iCAAiC;AAC1C;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC3CA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;ACfA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;ACLA,iBAAiB;;AAEjB;AACA;AACA;;;;;;;;;;;;ACJA,6BAA6B;AAC7B,uCAAuC;;;;;;;;;;;;ACDvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACJA;AACA;AACA,iCAAiC,QAAQ,mBAAmB,UAAU,EAAE,EAAE;AAC1E,CAAC;;;;;;;;;;;;ACHD;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kFAAkF,uBAAuB;AACzG,iEAAiE;AACjE,+DAA+D;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,eAAe;AACf,eAAe;AACf,eAAe;AACf,gBAAgB;AAChB;;;;;;;;;;;;AC1CA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,UAAU;AACvC;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,gCAAgC,qCAAqC;AACrE;AACA;AACA,2BAA2B,gCAAgC;AAC3D;AACA;AACA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA;AACA;AACA,yCAAyC;;;;;;;;;;;;ACLzC,uBAAuB;AACvB;AACA;AACA;;;;;;;;;;;;ACHA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;;;;;;;;;;;;ACPA;AACA,uIAAsE,mBAAmB,UAAU,EAAE,EAAE;AACvG,CAAC;;;;;;;;;;;;ACFD;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACLA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACJA;AACA;AACA;;;;;;;;;;;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACPA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,YAAY;AACf;AACA;AACA;AACA;;;;;;;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA,CAAC;AACD;AACA,CAAC;;;;;;;;;;;;AC9BD;AACA;AACA,kDAAkD;AAClD;AACA,uCAAuC;AACvC;;;;;;;;;;;;;ACLA;AACA;;AAEA;AACA;AACA;AACA,yCAAyC,cAAc;AACvD,GAAG;AACH;;;;;;;;;;;;ACRA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACLA;AACA;AACA;AACA;AACA,2DAA2D;AAC3D;;;;;;;;;;;;ACLA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACXA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACJA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,gBAAgB,EAAE;AAC5D;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;;;;;ACtBD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,CAAC;;;;;;;;;;;;ACfD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC;;;;;;;;;;;;ACTD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC;;;;;;;;;;;;ACXD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,2BAA2B;AAClD,WAAW;AACX;AACA;AACA;AACA;AACA;AACA,mFAAmF;AACnF;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;ACtED,aAAa,sCAAsC,EAAE,I;;;;;;;;;;;ACArD,aAAa,gCAAgC,EAAE,I","file":"nested_admin.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n","const $ = require('jquery');\n\n/**\n * For grappelli 2.14, converts a django.jQuery instance to a grp.jQuery\n * instance. Otherwise (if grappelli is not present, or for grappelli <= 2.13,\n * where the grappelli jQuery instance is the same as django's), returns the\n * object that was passed in, unchanged.\n */\nfunction grp$($sel) {\n if (typeof window.grp === 'undefined') {\n return $($sel);\n }\n if (window.grp.jQuery.fn.init === $.fn.init) {\n return $($sel);\n }\n const $grpSel = window.grp.jQuery($sel);\n if ($sel.prevObject) {\n $grpSel.prevObject = grp$($sel.prevObject);\n }\n return $grpSel;\n}\n\nmodule.exports = grp$;\n","const $ = require('jquery');\nconst grappelli = require('grappelli');\nconst DJNesting = require('./utils');\nDJNesting.DjangoFormset = require('./jquery.djangoformset');\n\n$(document).ready(function() {\n // Remove the border on any empty fieldsets\n $('fieldset.grp-module, fieldset.module').filter(function(i, element) {\n return element.childNodes.length == 0;\n }).css('border-width', '0');\n\n // Set predelete class on any form elements with the DELETE input checked.\n // These can occur on forms rendered after a validation error.\n $('input[name$=\"-DELETE\"]:checked').not('[name*=\"__prefix__\"]').closest('.djn-inline-form').addClass('grp-predelete');\n\n $(document).on('djnesting:initialized djnesting:mutate', function onMutate(e, $inline) {\n var $items = $inline.find('> .djn-items, > .tabular > .module > .djn-items');\n var $rows = $items.children('.djn-tbody');\n $rows.removeClass('row1 row2');\n $rows.each(function(i, row) {\n var n = 1 + (i % 2);\n $(row).addClass('row' + n);\n });\n });\n\n // Register the nested formset on top level djnesting-stacked elements.\n // It will handle recursing down the nested inlines.\n $('.djn-group-root').each(function(i, rootGroup) {\n $(rootGroup).djangoFormset();\n });\n\n $('form').on('submit.djnesting', function(e) {\n $('.djn-group').each(function() {\n DJNesting.updatePositions($(this).djangoFormsetPrefix());\n $(document).trigger('djnesting:mutate', [$(this).djangoFormset().$inline]);\n });\n });\n});\n\nmodule.exports = DJNesting;\n","'use strict';\n\nconst $ = require('jquery');\nconst regexQuote = require('./regexquote');\nconst DJNesting = require('./utils');\nconst grappelli = require('grappelli');\nconst grp = require('grp');\nconst grp$ = require('./grp$');\n\nvar pluginName = 'djangoFormset';\n\nclass DjangoFormset {\n constructor(inline) {\n this.opts = {\n emptyClass: 'empty-form grp-empty-form djn-empty-form',\n predeleteClass: 'grp-predelete'\n };\n this.$inline = $(inline);\n this.prefix = this.$inline.djangoFormsetPrefix();\n this._$totalForms = this.$inline.find('#id_' + this.prefix + '-TOTAL_FORMS');\n this._$totalForms.attr('autocomplete', 'off');\n this._$template = $('#' + this.prefix + '-empty');\n\n var inlineModelClassName = this.$inline.djnData('inlineModel');\n\n this.opts = $.extend({}, this.opts, {\n childTypes: this.$inline.data('inlineFormset').options.childTypes,\n formsetFkModel: this.$inline.djnData('formsetFkModel'),\n addButtonSelector: '.djn-add-handler.djn-model-' + inlineModelClassName,\n removeButtonSelector: '.djn-remove-handler.djn-model-' + inlineModelClassName,\n deleteButtonSelector: '.djn-delete-handler.djn-model-' + inlineModelClassName,\n formClass: 'dynamic-form grp-dynamic-form djn-dynamic-form-' + inlineModelClassName,\n formClassSelector: '.djn-dynamic-form-' + inlineModelClassName\n });\n\n DJNesting.initRelatedFields(this.prefix, this.$inline.djnData());\n DJNesting.initAutocompleteFields(this.prefix, this.$inline.djnData());\n\n if (this.opts.childTypes) {\n this._setupPolymorphic();\n }\n this._bindEvents();\n\n this._initializeForms();\n\n this.$inline.find('.djn-items:not([id*=\"-empty\"])').trigger('djnesting:init');\n\n // initialize nested formsets\n this.$inline.find('.djn-group[id$=\"-group\"][id^=\"' + this.prefix + '\"][data-inline-formset]:not([id*=\"-empty\"])').each(function() {\n $(this)[pluginName]();\n });\n\n if (this.$inline.is('.djn-group-root')) {\n DJNesting.createSortable(this.$inline);\n }\n\n $(document).trigger('djnesting:initialized', [this.$inline, this]);\n }\n _setupPolymorphic() {\n if (!this.opts.childTypes) {\n throw Error('The polymorphic fieldset options.childTypes is not defined!');\n }\n let menu = '
';\n const $addButton = this.$inline.find(this.opts.addButtonSelector);\n const $menu = $(menu);\n $addButton.after($menu);\n }\n\n _initializeForms() {\n var totalForms = this.mgmtVal('TOTAL_FORMS');\n var maxForms = this.mgmtVal('MAX_NUM_FORMS');\n if (maxForms <= totalForms) {\n this.$inline.find(this.opts.addButtonSelector).parents('.djn-add-item').hide();\n }\n for (var i = 0; i < totalForms; i++) {\n this._initializeForm('#' + this.prefix + '-' + i);\n }\n }\n _initializeForm(form) {\n var $form = $(form);\n var formPrefix = $form.djangoFormPrefix();\n $form.addClass(this.opts.formClass);\n if ($form.hasClass('has_original')) {\n $('#id_' + formPrefix + 'DELETE:checked').toggleClass(this.opts.predeleteClass);\n }\n var minForms = this.mgmtVal('MIN_NUM_FORMS');\n var totalForms = this.mgmtVal('TOTAL_FORMS');\n var self = this;\n var hideRemoveButton = (totalForms <= minForms);\n this.$inline.djangoFormsetForms().each(function() {\n var showHideMethod = (hideRemoveButton) ? 'hide' : 'show';\n $(this).find(self.opts.removeButtonSelector)[showHideMethod]();\n });\n }\n _bindEvents($el) {\n var self = this;\n if (typeof $el == 'undefined') {\n $el = this.$inline;\n }\n const $addButton = $el.find(this.opts.addButtonSelector);\n $addButton.off('click.djnesting').on('click.djnesting', function(e) {\n e.preventDefault();\n e.stopPropagation();\n const $menu = $(this).next('.polymorphic-type-menu');\n if (!$menu.length) {\n self.add();\n } else {\n if (!$menu.is(':visible')) {\n function hideMenu() {\n $menu.hide();\n $(document).off('click', hideMenu);\n }\n $(document).on('click', hideMenu);\n }\n $menu.show();\n }\n });\n const $menuButtons = $addButton.parent().find('> .polymorphic-type-menu a');\n $menuButtons.off('click.djnesting').on('click.djnesting', function(e) {\n e.preventDefault();\n e.stopPropagation();\n const polymorphicType = $(this).attr('data-type');\n self.add(null, polymorphicType);\n const $menu = $(e.target).closest('.polymorphic-type-menu');\n if ($menu.is(':visible')) {\n $menu.hide();\n }\n });\n $el.find(this.opts.removeButtonSelector).filter(function() {\n return !$(this).closest('.djn-empty-form').length;\n }).off('click.djnesting').on('click.djnesting', function(e) {\n e.preventDefault();\n e.stopPropagation();\n var $form = $(this).closest(self.opts.formClassSelector);\n self.remove($form);\n });\n\n var deleteClickHandler = function(e) {\n e.preventDefault();\n e.stopImmediatePropagation();\n var $form = $(this).closest(self.opts.formClassSelector);\n var $deleteInput = $('#id_' + $form.djangoFormPrefix() + 'DELETE');\n if (!$deleteInput.is(':checked')) {\n self['delete']($form);\n } else {\n self.undelete($form);\n }\n };\n\n var $deleteButton = $el.find(this.opts.deleteButtonSelector)\n .filter(function() { return !$(this).closest('.djn-empty-form').length; });\n\n $deleteButton.off('click.djnesting').on('click.djnesting', deleteClickHandler);\n $deleteButton.find('[id$=\"-DELETE\"]').on('mousedown.djnesting', deleteClickHandler);\n }\n remove(form) {\n var $form = $(form);\n var totalForms = this.mgmtVal('TOTAL_FORMS');\n var minForms = this.mgmtVal('MIN_NUM_FORMS');\n var maxForms = this.mgmtVal('MAX_NUM_FORMS');\n var index = $form.djangoFormIndex();\n var isInitial = $form.data('isInitial');\n\n // Clearing out the form HTML itself using DOM APIs is much faster\n // than using jQuery to remove the element. Using jQuery is so\n // slow that it hangs the page.\n $form[0].innerHTML = \"\";\n $form.remove();\n\n totalForms -= 1;\n this.mgmtVal('TOTAL_FORMS', totalForms);\n\n if (maxForms - totalForms >= 0) {\n this.$inline.find(this.opts.addButtonSelector).parents('.djn-add-item').show();\n }\n\n this._fillGap(index, isInitial);\n\n var self = this;\n var hideRemoveButton = (totalForms <= minForms);\n this.$inline.djangoFormsetForms().each(function() {\n var showHideMethod = (hideRemoveButton) ? 'hide' : 'show';\n $(this).find(self.opts.removeButtonSelector)[showHideMethod]();\n });\n\n DJNesting.updatePositions(this.prefix);\n $(document).trigger('djnesting:mutate', [this.$inline]);\n\n // Also fire using the events that were added in Django 1.9\n $(document).trigger('formset:removed', [$form, this.prefix]);\n }\n delete(form) {\n var self = this,\n $form = $(form),\n formPrefix = $form.djangoFormPrefix(),\n $deleteInput = $('#id_' + formPrefix + 'DELETE');\n\n if ($form.hasClass(this.opts.predeleteClass)) {\n return;\n }\n\n if (!$form.data('isInitial')) {\n return;\n }\n $deleteInput.attr('checked', 'checked');\n if ($deleteInput.length) {\n $deleteInput[0].checked = true;\n }\n $form.addClass(this.opts.predeleteClass);\n\n $form.find('.djn-group').each(function() {\n var $childInline = $(this);\n var childFormset = $childInline.djangoFormset();\n $childInline.djangoFormsetForms().each(function() {\n if ($(this).hasClass(self.opts.predeleteClass)) {\n $(this).data('alreadyDeleted', true);\n } else {\n childFormset.delete(this);\n }\n });\n });\n $form.find('.cropduster-form').each(function() {\n var formPrefix = $(this).djangoFormsetPrefix() + '-0-';\n var $deleteInput = $('#id_' + formPrefix + 'DELETE');\n $deleteInput.attr('checked', 'checked');\n if ($deleteInput.length) {\n $deleteInput[0].checked = true;\n }\n });\n DJNesting.updatePositions(this.prefix);\n $(document).trigger('djnesting:mutate', [this.$inline]);\n $(document).trigger('formset:deleted', [$form, this.prefix]);\n }\n undelete(form) {\n var $form = $(form),\n formPrefix = $form.djangoFormPrefix(),\n $deleteInput = $('#id_' + formPrefix + 'DELETE');\n\n if ($form.parent().closest('.' + this.opts.predeleteClass).length) {\n return;\n }\n if ($form.hasClass('has_original')) {\n $deleteInput.removeAttr('checked');\n if ($deleteInput.length) {\n $deleteInput[0].checked = false;\n }\n $form.removeClass(this.opts.predeleteClass);\n }\n $form.data('alreadyDeleted', false);\n $form.find('.djn-group').each(function() {\n var $childInline = $(this);\n var childFormset = $childInline.djangoFormset();\n $childInline.djangoFormsetForms().each(function() {\n if ($(this).data('alreadyDeleted')) {\n $(this).data('alreadyDeleted', false);\n } else {\n childFormset.undelete(this);\n }\n });\n });\n $form.find('.cropduster-form').each(function() {\n var formPrefix = $(this).djangoFormsetPrefix() + '-0-';\n var $deleteInput = $('#id_' + formPrefix + 'DELETE');\n $deleteInput.removeAttr('checked');\n if ($deleteInput.length) {\n $deleteInput[0].checked = false;\n }\n });\n DJNesting.updatePositions(this.prefix);\n $(document).trigger('djnesting:mutate', [this.$inline]);\n $(document).trigger('formset:undeleted', [$form, this.prefix]);\n }\n add(spliceIndex, ctype) {\n var self = this;\n const $template = (ctype) ? $(`#${this.prefix}-empty-${ctype}`) : this._$template;\n var $form = $template.clone(true);\n\n // For django-grappelli >= 2.14, where the grp.jQuery instance is not\n // the same as django.jQuery, we must copy any prepopulated_field\n // dependency data from grp.jQuery to the cloned nodes.\n grp$($template).find(':data(dependency_ids)').each(function() {\n const id = $(this).attr('id');\n const $el = $form.find(`#${id}`);\n grp$($el).data($.extend({}, $el.data(), grp$(this).data()));\n });\n\n var index = this.mgmtVal('TOTAL_FORMS');\n var maxForms = this.mgmtVal('MAX_NUM_FORMS');\n var isNested = this.$inline.hasClass('djn-group-nested');\n\n $(document).trigger('djnesting:beforeadded', [this.$inline, $form]);\n\n $form.removeClass(this.opts.emptyClass);\n $form.addClass('djn-item');\n $form.attr('id', $form.attr('id').replace(/\\-empty.*?$/, '-' + index));\n\n if (isNested) {\n $form.append(DJNesting.createContainerElement());\n }\n\n DJNesting.updateFormAttributes($form,\n new RegExp('([#_]id_|[\\\\#]|^id_|\\\"|^)' + regexQuote(this.prefix) + '\\\\-(?:__prefix__|empty)\\\\-', 'g'),\n '$1' + this.prefix + '-' + index + '-');\n\n let $firstTemplate = this._$template;\n if (this.opts.childTypes) {\n $firstTemplate = $template.closest('.djn-group')\n .find('> .djn-items > [id*=\"-empty\"], > .djn-fieldset > .djn-items > [id*=\"-empty\"]').eq(0);\n }\n if (this.opts.childTypes) {\n const compatibleParents = this.$inline.djnData('compatibleParents') || {};\n $form.find('> .djn-group').each((i, el) => {\n const fkModel = $(el).djnData('formsetFkModel');\n const compatModels = compatibleParents[ctype] || [];\n const $el = $(el);\n const parentModel = $el.djnData('inlineParentModel');\n const isPolymorphic = !!($el.data('inlineFormset').options.childTypes);\n const formPrefix = $el.data('inlineFormset').options.prefix;\n if (parentModel !== ctype || (isPolymorphic && fkModel !== ctype && compatModels.indexOf(fkModel) === -1)) {\n $el.find('input[id$=\"_FORMS\"]').each((i, input) => {\n input.value = 0\n input.setAttribute('value', '0');\n el.parentNode.appendChild(input);\n });\n el.parentNode.removeChild(el);\n }\n });\n }\n\n $form.insertBefore($firstTemplate);\n\n this.mgmtVal('TOTAL_FORMS', index + 1);\n if ((maxForms - (index + 1)) <= 0) {\n this.$inline.find(this.opts.addButtonSelector).parents('.djn-add-item').hide();\n }\n\n DJNesting.updatePositions(this.prefix);\n\n if ($.isNumeric(spliceIndex)) {\n this.spliceInto($form, spliceIndex, true);\n } else {\n $(document).trigger('djnesting:mutate', [this.$inline]);\n }\n\n if (grappelli) {\n grappelli.reinitDateTimeFields(grp$($form));\n }\n DJNesting.DjangoInlines.initPrepopulatedFields($form);\n DJNesting.DjangoInlines.reinitDateTimeShortCuts();\n DJNesting.DjangoInlines.updateSelectFilter($form);\n DJNesting.initRelatedFields(this.prefix);\n DJNesting.initAutocompleteFields(this.prefix);\n if (grp && grp.jQuery.fn.grp_collapsible) {\n var addBackMethod = (grp.jQuery.fn.addBack) ? 'addBack' : 'andSelf';\n grp$($form).find(\n '.grp-collapse:not([id$=\"-empty\"]):not([id*=\"-empty-\"])'\n )[addBackMethod]().grp_collapsible({\n toggle_handler_slctr: '.grp-collapse-handler:first',\n closed_css: 'closed grp-closed',\n open_css: 'open grp-open',\n on_toggle: function() {\n $(document).trigger('djnesting:toggle', [self.$inline]);\n }\n });\n }\n if (typeof $.fn.curated_content_type == 'function') {\n $form.find('.curated-content-type-select').each(function() {\n $(this).curated_content_type();\n });\n }\n\n this._initializeForm($form);\n this._bindEvents($form);\n\n if (ctype) {\n const formsetModelClassName = this.$inline.djnData('inlineModel');\n const inlineModelClassName = $form.attr('data-inline-model');\n const $buttons = $form.find(`.djn-model-${formsetModelClassName}`);\n $buttons.addClass(`djn-model-${inlineModelClassName}`);\n $form.addClass(`djn-dynamic-form-${inlineModelClassName}`);\n }\n\n // find any nested formsets\n $form.find('.djn-group[id$=\"-group\"][id^=\"' + this.prefix + '\"][data-inline-formset]:not([id*=\"-empty\"])').each(function() {\n $(this)[pluginName]();\n });\n\n // Fire an event on the document so other javascript applications\n // can be alerted to the newly inserted inline\n $(document).trigger('djnesting:added', [this.$inline, $form]);\n\n // Also fire using the events that were added in Django 1.9\n $(document).trigger('formset:added', [$form, this.prefix]);\n\n return $form;\n }\n _fillGap(index, isInitial) {\n var $initialForm, $newForm;\n var formsets = this.$inline.djangoFormsetForms().toArray();\n // Sort formsets in index order, so that we get the last indexed form for the swap.\n formsets.sort(function(a, b) { return $(a).djangoFormIndex() - $(b).djangoFormIndex(); });\n formsets.forEach(function(form) {\n var $form = $(form);\n var i = $form.djangoFormIndex();\n if (i <= index) {\n return;\n }\n if ($form.data('isInitial')) {\n $initialForm = $form;\n } else {\n $newForm = $form;\n }\n });\n var $form = (isInitial) ? $initialForm || $newForm : $newForm;\n if (!$form) {\n return;\n }\n var oldIndex = $form.djangoFormIndex();\n var oldFormPrefixRegex = new RegExp('([\\\\#_]|^)'\n + regexQuote(this.prefix + '-' + oldIndex) + '(?!\\\\-\\\\d)');\n $form.attr('id', this.prefix + '-' + index);\n DJNesting.updateFormAttributes($form, oldFormPrefixRegex, '$1' + this.prefix + '-' + index);\n\n // Update prefixes on nested DjangoFormset objects\n $form.find('.djn-group').each(function() {\n var $childInline = $(this);\n var childFormset = $childInline.djangoFormset();\n childFormset.prefix = $childInline.djangoFormsetPrefix();\n });\n\n $(document).trigger('djnesting:attrchange', [this.$inline, $form]);\n\n if (isInitial && $initialForm && $newForm) {\n this._fillGap(oldIndex, false);\n }\n }\n _makeRoomForInsert() {\n var initialFormCount = this.mgmtVal('INITIAL_FORMS'),\n totalFormCount = this.mgmtVal('TOTAL_FORMS'),\n gapIndex = initialFormCount,\n $existingForm = $('#' + this.prefix + '-' + gapIndex);\n\n if (!$existingForm.length) {\n return;\n }\n\n var oldFormPrefixRegex = new RegExp('([\\\\#_]|^)'\n + regexQuote(this.prefix) + '-' + gapIndex + '(?!\\\\-\\\\d)');\n $existingForm.attr('id', this.prefix + '-' + totalFormCount);\n DJNesting.updateFormAttributes($existingForm, oldFormPrefixRegex, '$1' + this.prefix + '-' + totalFormCount);\n\n // Update prefixes on nested DjangoFormset objects\n $existingForm.find('.djn-group').each(function() {\n var $childInline = $(this);\n var childFormset = $childInline.djangoFormset();\n childFormset.prefix = $childInline.djangoFormsetPrefix();\n });\n\n $(document).trigger('djnesting:attrchange', [this.$inline, $existingForm]);\n }\n /**\n * Splice a form into the current formset at new position `index`.\n */\n spliceInto($form, index, isNewAddition) {\n var initialFormCount = this.mgmtVal('INITIAL_FORMS'),\n totalFormCount = this.mgmtVal('TOTAL_FORMS'),\n oldFormsetPrefix = $form.djangoFormsetPrefix(),\n newFormsetPrefix = this.prefix,\n isInitial = $form.data('isInitial'),\n newIndex, $before;\n\n // Make sure the form being spliced is from a different inline\n if ($form.djangoFormsetPrefix() == this.prefix) {\n var currentPosition = $form.prevAll('.djn-item:not(.djn-no-drag,.djn-thead)').length;\n if (currentPosition === index || typeof index == 'undefined') {\n DJNesting.updatePositions(newFormsetPrefix);\n return;\n }\n $before = this.$inline.find('> .djn-items, > .tabular > .module > .djn-items').find('> .djn-item:not(#' + $form.attr('id') + ')').eq(index);\n $before.after($form);\n } else {\n var $oldInline = $('#' + oldFormsetPrefix + '-group');\n var $currentFormInline = $form.closest('.djn-group');\n\n if ($currentFormInline.djangoFormsetPrefix() != newFormsetPrefix) {\n $before = this.$inline.find('> .djn-items, > .tabular > .module > .djn-items').find('> .djn-item').eq(index);\n $before.after($form);\n }\n\n var oldDjangoFormset = $oldInline.djangoFormset();\n oldDjangoFormset.mgmtVal('TOTAL_FORMS', oldDjangoFormset.mgmtVal('TOTAL_FORMS') - 1);\n oldDjangoFormset._fillGap($form.djangoFormIndex(), isInitial);\n\n if (isInitial) {\n oldDjangoFormset.mgmtVal('INITIAL_FORMS', oldDjangoFormset.mgmtVal('INITIAL_FORMS') - 1);\n\n var $parentInline = this.$inline.parent().closest('.djn-group');\n if ($parentInline.length) {\n var $parentForm = this.$inline.closest('.djn-inline-form');\n var parentPkField = ($parentInline.djnData('fieldNames') || {}).pk;\n var $parentPk = $parentForm.djangoFormField(parentPkField);\n if (!$parentPk.val()) {\n $form.data('isInitial', false);\n $form.attr('data-is-initial', 'false');\n isInitial = false;\n // Set initial form counts to 0 on nested DjangoFormsets\n setTimeout(function() {\n $form.find('[name^=\"' + $form.djangoFormPrefix() + '\"][name$=\"-INITIAL_FORMS\"]')\n .val('0').trigger('change');\n }, 0);\n }\n }\n }\n\n if (isInitial) {\n this._makeRoomForInsert();\n }\n\n // Replace the ids for the splice form\n var oldFormPrefixRegex = new RegExp('([\\\\#_]|^)' + regexQuote($form.attr('id')) + '(?!\\\\-\\\\d)');\n newIndex = (isInitial) ? initialFormCount : totalFormCount;\n $form.attr('id', newFormsetPrefix + '-' + newIndex);\n DJNesting.updateFormAttributes($form, oldFormPrefixRegex, '$1' + newFormsetPrefix + '-' + newIndex);\n\n // Update prefixes on nested DjangoFormset objects\n $form.find('.djn-group').each(function() {\n var $childInline = $(this);\n var childFormset = $childInline.djangoFormset();\n childFormset.prefix = $childInline.djangoFormsetPrefix();\n });\n\n $(document).trigger('djnesting:attrchange', [this.$inline, $form]);\n\n if (isInitial) {\n this.mgmtVal('INITIAL_FORMS', initialFormCount + 1);\n }\n this.mgmtVal('TOTAL_FORMS', totalFormCount + 1);\n\n DJNesting.updatePositions(oldFormsetPrefix);\n $(document).trigger('djnesting:mutate', [$oldInline]);\n }\n\n DJNesting.updatePositions(newFormsetPrefix);\n if (!isNewAddition) {\n $(document).trigger('djnesting:mutate', [this.$inline]);\n }\n }\n mgmtVal(name, newValue) {\n var $field = this.$inline.find('#id_' + this.prefix + '-' + name);\n if (typeof newValue == 'undefined') {\n return parseInt($field.val(), 10);\n } else {\n return parseInt($field.val(newValue).trigger('change').val(), 10);\n }\n }\n}\n\n$.fn[pluginName] = function() {\n var options, fn, args;\n var $el = this.eq(0);\n\n if (arguments.length === 0 || (arguments.length === 1 && $.type(arguments[0]) != 'string')) {\n options = arguments[0];\n var djangoFormset = $el.data(pluginName);\n if (!djangoFormset) {\n djangoFormset = new DjangoFormset($el, options);\n $el.data(pluginName, djangoFormset);\n }\n return djangoFormset;\n }\n\n fn = arguments[0];\n args = $.makeArray(arguments).slice(1);\n\n if (fn in DjangoFormset.prototype) {\n return $el.data(pluginName)[fn](args);\n } else {\n throw new Error('Unknown function call ' + fn + ' for $.fn.' + pluginName);\n }\n};\n\nmodule.exports = DjangoFormset;\n","const $ = require('jquery');\n\nvar prefixCache = {};\n\n$.fn.djnData = function(name) {\n var inlineFormsetData = $(this).data('inlineFormset') || {},\n nestedOptions = inlineFormsetData.nestedOptions || {};\n if (!name) {\n return nestedOptions;\n } else {\n return nestedOptions[name];\n }\n};\n\n$.fn.djangoPrefixIndex = function() {\n var $this = (this.length > 1) ? this.first() : this;\n var id = $this.attr('id'),\n name = $this.attr('name'),\n forattr = $this.attr('for'),\n prefix, $form, $group, groupId, cacheKey, match, index;\n\n if ((match = prefixCache[id]) || (match = prefixCache[name]) || (match = prefixCache[forattr])) {\n return match;\n }\n\n if (id && !prefix) {\n prefix = (id.match(/^(.*)\\-group$/) || [null, null])[1];\n }\n\n if (id && !prefix && $this.is('.djn-item') && id.match(/\\d+$/)) {\n [cacheKey, prefix, index] = id.match(/(.*?)\\-(\\d+)$/) || [null, null, null];\n }\n\n if (!prefix) {\n $form = $this.closest('.djn-inline-form');\n if ($form.length) {\n [cacheKey, prefix, index] = $form.attr('id').match(/(.*?)\\-(\\d+)$/)\n || [null, null, null];\n } else {\n $group = $this.closest('.djn-group');\n if (!$group.length) {\n return null;\n }\n groupId = $group.attr('id') || '';\n prefix = (groupId.match(/^(.*)\\-group$/) || [null, null])[1];\n }\n } else {\n if (prefix.substr(0, 3) == 'id_') {\n prefix = prefix.substr(3);\n }\n\n if (!document.getElementById(prefix + '-group')) {\n return null;\n }\n }\n if (cacheKey) {\n prefixCache[cacheKey] = [prefix, index];\n }\n\n return [prefix, index];\n};\n\n$.fn.djangoFormPrefix = function() {\n var prefixIndex = this.djangoPrefixIndex();\n if (!prefixIndex || !prefixIndex[1]) {\n return null;\n }\n return prefixIndex[0] + '-' + prefixIndex[1] + '-';\n};\n\n$.fn.djangoFormIndex = function() {\n var prefixIndex = this.djangoPrefixIndex();\n return (!prefixIndex || !prefixIndex[1]) ? null : parseInt(prefixIndex[1], 10);\n};\n\n$.fn.djangoFormsetPrefix = function() {\n var prefixIndex = this.djangoPrefixIndex();\n return (!prefixIndex) ? null : prefixIndex[0];\n};\n\nvar filterDjangoFormsetForms = function(form, $group, formsetPrefix) {\n var formId = form.getAttribute('id'),\n formIndex = formId.substr(formsetPrefix.length + 1);\n\n // Check if form id matches /{prefix}-\\d+/\n if (formId.indexOf(formsetPrefix) !== 0) { return false; }\n return (!formIndex.match(/\\D/));\n};\n\n// Selects all initial forms within the same formset as the\n// element the method is being called on.\n$.fn.djangoFormsetForms = function() {\n var forms = [];\n this.each(function() {\n var $this = $(this),\n formsetPrefix = $this.djangoFormsetPrefix(),\n $group = (formsetPrefix) ? $('#' + formsetPrefix + '-group') : null,\n $forms;\n\n if (!formsetPrefix || !$group.length) return;\n\n $forms = $group.find('.djn-inline-form').filter(function() {\n return filterDjangoFormsetForms(this, $group, formsetPrefix);\n });\n var sortedForms = $forms.toArray().sort(function(a, b) {\n return $(a).djangoFormIndex() - $(b).djangoFormIndex;\n });\n Array.prototype.push.apply(forms, sortedForms);\n });\n return this.pushStack(forms);\n};\n\nif (typeof($.djangoFormField) != 'function') {\n $.djangoFormField = function(fieldName, prefix, index) {\n var $empty = $([]), matches;\n if (matches = prefix.match(/^(.+)\\-(\\d+)\\-$/)) {\n prefix = matches[1];\n index = matches[2];\n }\n index = parseInt(index, 10);\n if (isNaN(index)) {\n return $empty;\n }\n var namePrefix = prefix + '-' + index + '-';\n if (fieldName == '*') {\n return $('*[name^=\"' + namePrefix + '\"]').filter(function() {\n var fieldPart = $(this).attr('name').substring(namePrefix.length);\n return (fieldPart.indexOf('-') === -1);\n });\n }\n var $field = $('#id_' + namePrefix + fieldName);\n if (!$field.length && (fieldName == 'pk' || fieldName == 'position')) {\n var $group = $('#' + prefix + '-group'),\n fieldNameData = $group.djnData('fieldNames') || {};\n fieldName = fieldNameData[fieldName];\n if (!fieldName) { return $empty; }\n $field = $('#id_' + namePrefix + fieldName);\n }\n return $field;\n };\n}\n\nif (typeof($.fn.djangoFormField) != 'function') {\n /**\n * Given a django model's field name, and the forms index in the\n * formset, returns the field's input element, or an empty jQuery\n * object on failure.\n *\n * @param String fieldName - 'pk', 'position', or the field's\n * name in django (e.g. 'content_type',\n * 'url', etc.)\n * @return jQuery object containing the field's input element, or\n * an empty jQuery object on failure\n */\n $.fn.djangoFormField = function(fieldName, index) {\n var prefixAndIndex = this.djangoPrefixIndex();\n var $empty = $([]);\n if (!prefixAndIndex) {\n return $empty;\n }\n var prefix = prefixAndIndex[0];\n if (typeof(index) == 'undefined') {\n index = prefixAndIndex[1];\n if (typeof(index) == 'undefined') {\n return $empty;\n }\n }\n return $.djangoFormField(fieldName, prefix, index);\n };\n}\n\nif (typeof($.fn.filterDjangoField) != 'function') {\n var djRegexCache = {};\n $.fn.filterDjangoField = function(prefix, fieldName, index) {\n var $field, fieldNameData;\n if (typeof index != 'undefined') {\n if (typeof index == 'string') {\n index = parseInt(index, 10);\n }\n if (typeof index == 'number' && !isNaN(index)) {\n var fieldId = 'id_' + prefix + '-' + index + '-' + fieldName;\n $field = $('#' + fieldId);\n }\n } else {\n if (typeof(djRegexCache[prefix]) != 'object') {\n djRegexCache[prefix] = {};\n }\n if (typeof(djRegexCache[prefix][fieldName]) == 'undefined') {\n djRegexCache[prefix][fieldName] = new RegExp('^' + prefix + '-\\\\d+-' + fieldName + '$');\n } \n $field = this.find('input[name$=\"' + fieldName + '\"]').filter(function() {\n return this.getAttribute('name').match(djRegexCache[prefix][fieldName]);\n }); \n }\n if (!$field.length && (fieldName == 'pk' || fieldName == 'position')) {\n fieldNameData = $('#' + prefix + '-group').djnData('fieldNames') || {};\n if (typeof(fieldNameData[fieldName]) && fieldNameData[fieldName] != fieldName) {\n $field = $(this).filterDjangoField(prefix, fieldNameData[fieldName], index);\n }\n }\n return $field;\n };\n}\n","module.exports = window.django.jQuery;\n","'use strict';\n\nconst $ = require('jquery');\n/*!\n * jQuery UI Sortable @VERSION\n * http://jqueryui.com\n *\n * Copyright 2012 jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/sortable/\n *\n * Depends:\n *\tjquery.ui.core.js\n *\tjquery.ui.mouse.js\n *\tjquery.ui.widget.js\n */\nif ($.ui === undefined) {\n var jQuery = $;\n (function(e,t){function i(t,i){var s,n,r,o=t.nodeName.toLowerCase();return\"area\"===o?(s=t.parentNode,n=s.name,t.href&&n&&\"map\"===s.nodeName.toLowerCase()?(r=e(\"img[usemap=#\"+n+\"]\")[0],!!r&&a(r)):!1):(/input|select|textarea|button|object/.test(o)?!t.disabled:\"a\"===o?t.href||i:i)&&a(t)}function a(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return\"hidden\"===e.css(this,\"visibility\")}).length}var s=0,n=/^ui-id-\\d+$/;e.ui=e.ui||{},e.extend(e.ui,{version:\"1.10.3\",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({focus:function(t){return function(i,a){return\"number\"==typeof i?this.each(function(){var t=this;setTimeout(function(){e(t).focus(),a&&a.call(t)},i)}):t.apply(this,arguments)}}(e.fn.focus),scrollParent:function(){var t;return t=e.ui.ie&&/(static|relative)/.test(this.css(\"position\"))||/absolute/.test(this.css(\"position\"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(e.css(this,\"position\"))&&/(auto|scroll)/.test(e.css(this,\"overflow\")+e.css(this,\"overflow-y\")+e.css(this,\"overflow-x\"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(e.css(this,\"overflow\")+e.css(this,\"overflow-y\")+e.css(this,\"overflow-x\"))}).eq(0),/fixed/.test(this.css(\"position\"))||!t.length?e(document):t},zIndex:function(i){if(i!==t)return this.css(\"zIndex\",i);if(this.length)for(var a,s,n=e(this[0]);n.length&&n[0]!==document;){if(a=n.css(\"position\"),(\"absolute\"===a||\"relative\"===a||\"fixed\"===a)&&(s=parseInt(n.css(\"zIndex\"),10),!isNaN(s)&&0!==s))return s;n=n.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id=\"ui-id-\"+ ++s)})},removeUniqueId:function(){return this.each(function(){n.test(this.id)&&e(this).removeAttr(\"id\")})}}),e.extend(e.expr[\":\"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(i){return!!e.data(i,t)}}):function(t,i,a){return!!e.data(t,a[3])},focusable:function(t){return i(t,!isNaN(e.attr(t,\"tabindex\")))},tabbable:function(t){var a=e.attr(t,\"tabindex\"),s=isNaN(a);return(s||a>=0)&&i(t,!s)}}),e(\"\").outerWidth(1).jquery||e.each([\"Width\",\"Height\"],function(i,a){function s(t,i,a,s){return e.each(n,function(){i-=parseFloat(e.css(t,\"padding\"+this))||0,a&&(i-=parseFloat(e.css(t,\"border\"+this+\"Width\"))||0),s&&(i-=parseFloat(e.css(t,\"margin\"+this))||0)}),i}var n=\"Width\"===a?[\"Left\",\"Right\"]:[\"Top\",\"Bottom\"],r=a.toLowerCase(),o={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn[\"inner\"+a]=function(i){return i===t?o[\"inner\"+a].call(this):this.each(function(){e(this).css(r,s(this,i)+\"px\")})},e.fn[\"outer\"+a]=function(t,i){return\"number\"!=typeof t?o[\"outer\"+a].call(this,t):this.each(function(){e(this).css(r,s(this,t,!0,i)+\"px\")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e(\"\").data(\"a-b\",\"a\").removeData(\"a-b\").data(\"a-b\")&&(e.fn.removeData=function(t){return function(i){return arguments.length?t.call(this,e.camelCase(i)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie [\\w.]+/.exec(navigator.userAgent.toLowerCase()),e.support.selectstart=\"onselectstart\"in document.createElement(\"div\"),e.fn.extend({disableSelection:function(){return this.bind((e.support.selectstart?\"selectstart\":\"mousedown\")+\".ui-disableSelection\",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(\".ui-disableSelection\")}}),e.extend(e.ui,{plugin:{add:function(t,i,a){var s,n=e.ui[t].prototype;for(s in a)n.plugins[s]=n.plugins[s]||[],n.plugins[s].push([i,a[s]])},call:function(e,t,i){var a,s=e.plugins[t];if(s&&e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType)for(a=0;s.length>a;a++)e.options[s[a][0]]&&s[a][1].apply(e.element,i)}},hasScroll:function(t,i){if(\"hidden\"===e(t).css(\"overflow\"))return!1;var a=i&&\"left\"===i?\"scrollLeft\":\"scrollTop\",s=!1;return t[a]>0?!0:(t[a]=1,s=t[a]>0,t[a]=0,s)}})})(jQuery);(function(e,t){var i=0,s=Array.prototype.slice,a=e.cleanData;e.cleanData=function(t){for(var i,s=0;null!=(i=t[s]);s++)try{e(i).triggerHandler(\"remove\")}catch(n){}a(t)},e.widget=function(i,s,a){var n,r,o,h,l={},u=i.split(\".\")[0];i=i.split(\".\")[1],n=u+\"-\"+i,a||(a=s,s=e.Widget),e.expr[\":\"][n.toLowerCase()]=function(t){return!!e.data(t,n)},e[u]=e[u]||{},r=e[u][i],o=e[u][i]=function(e,i){return this._createWidget?(arguments.length&&this._createWidget(e,i),t):new o(e,i)},e.extend(o,r,{version:a.version,_proto:e.extend({},a),_childConstructors:[]}),h=new s,h.options=e.widget.extend({},h.options),e.each(a,function(i,a){return e.isFunction(a)?(l[i]=function(){var e=function(){return s.prototype[i].apply(this,arguments)},t=function(e){return s.prototype[i].apply(this,e)};return function(){var i,s=this._super,n=this._superApply;return this._super=e,this._superApply=t,i=a.apply(this,arguments),this._super=s,this._superApply=n,i}}(),t):(l[i]=a,t)}),o.prototype=e.widget.extend(h,{widgetEventPrefix:r?h.widgetEventPrefix:i},l,{constructor:o,namespace:u,widgetName:i,widgetFullName:n}),r?(e.each(r._childConstructors,function(t,i){var s=i.prototype;e.widget(s.namespace+\".\"+s.widgetName,o,i._proto)}),delete r._childConstructors):s._childConstructors.push(o),e.widget.bridge(i,o)},e.widget.extend=function(i){for(var a,n,r=s.call(arguments,1),o=0,h=r.length;h>o;o++)for(a in r[o])n=r[o][a],r[o].hasOwnProperty(a)&&n!==t&&(i[a]=e.isPlainObject(n)?e.isPlainObject(i[a])?e.widget.extend({},i[a],n):e.widget.extend({},n):n);return i},e.widget.bridge=function(i,a){var n=a.prototype.widgetFullName||i;e.fn[i]=function(r){var o=\"string\"==typeof r,h=s.call(arguments,1),l=this;return r=!o&&h.length?e.widget.extend.apply(null,[r].concat(h)):r,o?this.each(function(){var s,a=e.data(this,n);return a?e.isFunction(a[r])&&\"_\"!==r.charAt(0)?(s=a[r].apply(a,h),s!==a&&s!==t?(l=s&&s.jquery?l.pushStack(s.get()):s,!1):t):e.error(\"no such method '\"+r+\"' for \"+i+\" widget instance\"):e.error(\"cannot call methods on \"+i+\" prior to initialization; \"+\"attempted to call method '\"+r+\"'\")}):this.each(function(){var t=e.data(this,n);t?t.option(r||{})._init():e.data(this,n,new a(r,this))}),l}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:\"widget\",widgetEventPrefix:\"\",defaultElement:\"